	.file	"296738.c"
	.intel_syntax noprefix
	.text
	.globl	data
	.bss
	.align 32
	.type	data, @object
	.size	data, 400004
data:
	.zero	400004
	.globl	sum
	.align 32
	.type	sum, @object
	.size	sum, 400008
sum:
	.zero	400008
	.globl	S
	.align 4
	.type	S, @object
	.size	S, 4
S:
	.zero	4
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, edx
	sub	eax, ecx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.globl	search
	.type	search, @function
search:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L4
.L8:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, sum[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -20[rbp]
	sub	edx, 1
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, sum[rip]
	mov	ecx, DWORD PTR [rcx+rdx]
	sub	eax, ecx
	mov	edx, eax
	mov	eax, DWORD PTR S[rip]
	cmp	edx, eax
	jle	.L5
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, 1
	mov	DWORD PTR -28[rbp], eax
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, sum[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -20[rbp]
	sub	edx, 1
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, sum[rip]
	mov	ecx, DWORD PTR [rcx+rdx]
	sub	eax, ecx
	mov	edx, eax
	mov	eax, DWORD PTR S[rip]
	cmp	edx, eax
	jge	.L6
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	mov	DWORD PTR -24[rbp], eax
	jmp	.L4
.L6:
	mov	eax, DWORD PTR -8[rbp]
	jmp	.L7
.L4:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jle	.L8
	jmp	.L9
.L11:
	add	DWORD PTR -8[rbp], 1
.L9:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jg	.L10
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, sum[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -20[rbp]
	sub	edx, 1
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, sum[rip]
	mov	ecx, DWORD PTR [rcx+rdx]
	sub	eax, ecx
	mov	edx, eax
	mov	eax, DWORD PTR S[rip]
	cmp	edx, eax
	jl	.L11
.L10:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jg	.L12
	mov	eax, DWORD PTR -8[rbp]
	jmp	.L7
.L12:
	mov	eax, -1
.L7:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	search, .-search
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], -1
	mov	DWORD PTR sum[rip], 0
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -24[rbp], 0
	jmp	.L14
.L22:
	lea	rax, -36[rbp]
	lea	rdx, S[rip]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -28[rbp], 1
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, data[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, data[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, sum[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	ecx, eax
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, sum[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -28[rbp], 1
.L15:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L16
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, sum[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR S[rip]
	cmp	edx, eax
	jge	.L17
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L18
.L17:
	mov	DWORD PTR -28[rbp], 1
	jmp	.L19
.L21:
	mov	edx, DWORD PTR -36[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	search
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], -1
	je	.L20
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, DWORD PTR -28[rbp]
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jle	.L20
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -20[rbp], eax
.L20:
	add	DWORD PTR -28[rbp], 1
.L19:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L21
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	add	DWORD PTR -24[rbp], 1
.L14:
	mov	eax, DWORD PTR -32[rbp]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L22
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"296738.c"
	.text
	.comm	data,400004,4
	.comm	sum,400008,4
	.comm	S,4,4
	.align	2
	.global	cmp
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmp, %function
cmp:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	cmp, .-cmp
	.align	2
	.global	search
	.syntax unified
	.arm
	.fpu softvfp
	.type	search, %function
search:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-8]
	b	.L4
.L8:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r2, .L13
	ldr	r3, [fp, #-12]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	ldr	r1, .L13
	ldr	r3, [r1, r3, lsl #2]
	sub	r2, r2, r3
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L5
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L4
.L5:
	ldr	r2, .L13
	ldr	r3, [fp, #-12]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	ldr	r1, .L13
	ldr	r3, [r1, r3, lsl #2]
	sub	r2, r2, r3
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L6
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L4
.L6:
	ldr	r3, [fp, #-12]
	b	.L7
.L4:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L8
	b	.L9
.L11:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L9:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bgt	.L10
	ldr	r2, .L13
	ldr	r3, [fp, #-12]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	ldr	r1, .L13
	ldr	r3, [r1, r3, lsl #2]
	sub	r2, r2, r3
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L11
.L10:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bgt	.L12
	ldr	r3, [fp, #-12]
	b	.L7
.L12:
	mvn	r3, #0
.L7:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L14:
	.align	2
.L13:
	.word	sum
	.word	S
	.size	search, .-search
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%d%d\000"
	.align	2
.LC2:
	.ascii	"0\000"
	.align	2
.LC3:
	.ascii	"%d\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L27+4
	mov	r2, #0
	str	r2, [r3]
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L27+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L16
.L24:
	sub	r3, fp, #36
	ldr	r2, .L27+12
	mov	r1, r3
	ldr	r0, .L27+16
	bl	__isoc99_scanf
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L17
.L18:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, .L27+20
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L27+8
	bl	__isoc99_scanf
	ldr	r2, .L27+20
	ldr	r3, [fp, #-28]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r1, .L27+4
	ldr	r3, [r1, r3, lsl #2]
	add	r2, r2, r3
	ldr	r1, .L27+4
	ldr	r3, [fp, #-28]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L17:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L18
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	ldr	r2, .L27+4
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, .L27+12
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L19
	ldr	r0, .L27+24
	bl	puts
	b	.L20
.L19:
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L21
.L23:
	ldr	r3, [fp, #-36]
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-28]
	bl	search
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	beq	.L22
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L22
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
.L22:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L21:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L23
	ldr	r1, [fp, #-20]
	ldr	r0, .L27+28
	bl	printf
.L20:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L16:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L24
	mov	r3, #0
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC4
	.word	sum
	.word	.LC0
	.word	S
	.word	.LC1
	.word	data
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
