	.file	"761635.c"
	.intel_syntax noprefix
	.text
	.globl	substr
	.bss
	.align 8
	.type	substr, @object
	.size	substr, 11
substr:
	.zero	11
	.globl	str
	.align 32
	.type	str, @object
	.size	str, 1000001
str:
	.zero	1000001
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -16[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	lea	rsi, substr[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -36[rbp], 0
	call	getchar@PLT
	mov	BYTE PTR -41[rbp], al
	cmp	BYTE PTR -41[rbp], 10
	je	.L2
	cmp	BYTE PTR -41[rbp], 13
	je	.L2
	mov	rdx, QWORD PTR stdin[rip]
	movsx	eax, BYTE PTR -41[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ungetc@PLT
.L2:
	call	getchar@PLT
	mov	BYTE PTR -41[rbp], al
	cmp	BYTE PTR -41[rbp], 10
	je	.L4
	cmp	BYTE PTR -41[rbp], 13
	je	.L4
	mov	rdx, QWORD PTR stdin[rip]
	movsx	eax, BYTE PTR -41[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ungetc@PLT
	jmp	.L4
.L7:
	cmp	BYTE PTR -41[rbp], 10
	je	.L19
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -36[rbp], edx
	cdqe
	lea	rcx, str[rip]
	movzx	edx, BYTE PTR -41[rbp]
	mov	BYTE PTR [rax+rcx], dl
.L4:
	call	getchar@PLT
	mov	BYTE PTR -41[rbp], al
	cmp	BYTE PTR -41[rbp], -1
	jne	.L7
	jmp	.L6
.L19:
	nop
.L6:
	lea	rdi, substr[rip]
	call	strlen@PLT
	mov	DWORD PTR -24[rbp], eax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, substr[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, substr[rip]
	mov	BYTE PTR [rax+rdx], cl
	add	DWORD PTR -32[rbp], 1
.L8:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L9
	lea	rdi, str[rip]
	call	strlen@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, str[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, str[rip]
	mov	BYTE PTR [rax+rdx], cl
	add	DWORD PTR -28[rbp], 1
.L10:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L11
	lea	rax, str[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L12
.L15:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	je	.L13
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	je	.L13
	cmp	DWORD PTR -40[rbp], 0
	jne	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -16[rbp], rax
.L14:
	add	DWORD PTR -40[rbp], 1
.L13:
	add	QWORD PTR -8[rbp], 1
.L12:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, substr[rip]
	mov	rdi, rax
	call	strstr@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L15
	cmp	QWORD PTR -16[rbp], 0
	je	.L16
	lea	rcx, str[rip]
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, rcx
	mov	rdx, rax
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L16:
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L17:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"761635.c"
	.text
	.comm	substr,11,4
	.comm	str,1000001,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\000"
	.align	2
.LC1:
	.ascii	"%d %d\012\000"
	.align	2
.LC2:
	.ascii	"-1\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r1, .L19
	ldr	r0, .L19+4
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-28]
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-37]
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L2
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #13
	beq	.L2
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	ldr	r2, .L19+8
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	ungetc
.L2:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-37]
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L4
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #13
	beq	.L4
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	ldr	r2, .L19+8
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	ungetc
	b	.L4
.L5:
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	ldr	r1, .L19+12
	ldrb	r2, [fp, #-37]
	strb	r2, [r1, r3]
.L4:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-37]
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L5
	nop
	ldr	r0, .L19
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L8
.L9:
	ldr	r2, .L19
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r1, r3, #255
	ldr	r2, .L19
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L8:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L9
	ldr	r0, .L19+12
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L10
.L11:
	ldr	r2, .L19+12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r1, r3, #255
	ldr	r2, .L19+12
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L10:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L11
	ldr	r3, .L19+12
	str	r3, [fp, #-16]
	b	.L12
.L15:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	beq	.L13
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-36]
.L14:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L13:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L12:
	ldr	r1, .L19
	ldr	r0, [fp, #-16]
	bl	strstr
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-36]
	ldr	r2, .L19+12
	sub	r3, r3, r2
	mov	r2, r3
	ldr	r1, [fp, #-32]
	ldr	r0, .L19+16
	bl	printf
	b	.L17
.L16:
	ldr	r0, .L19+20
	bl	puts
.L17:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	substr
	.word	.LC0
	.word	stdin
	.word	str
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
