	.file	"370969.c"
	.intel_syntax noprefix
	.text
	.globl	binarySearch
	.type	binarySearch, @function
binarySearch:
.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 -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L2
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -36[rbp], eax
	jne	.L3
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L4
.L3:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -36[rbp], eax
	jle	.L5
	mov	eax, DWORD PTR -4[rbp]
	lea	esi, 1[rax]
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	binarySearch
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -4[rbp]
	lea	edi, -1[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	esi, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, edx
	mov	edx, edi
	mov	rdi, rax
	call	binarySearch
	jmp	.L4
.L2:
	mov	eax, -1
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	binarySearch, .-binarySearch
	.section	.rodata
	.align 8
.LC0:
	.string	"0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841"
.LC1:
	.string	"Searched: %d, index: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -128[rbp], 0
	mov	DWORD PTR -124[rbp], 1
	mov	DWORD PTR -120[rbp], 4
	mov	DWORD PTR -116[rbp], 9
	mov	DWORD PTR -112[rbp], 16
	mov	DWORD PTR -108[rbp], 25
	mov	DWORD PTR -104[rbp], 36
	mov	DWORD PTR -100[rbp], 49
	mov	DWORD PTR -96[rbp], 64
	mov	DWORD PTR -92[rbp], 81
	mov	DWORD PTR -88[rbp], 100
	mov	DWORD PTR -84[rbp], 121
	mov	DWORD PTR -80[rbp], 144
	mov	DWORD PTR -76[rbp], 169
	mov	DWORD PTR -72[rbp], 196
	mov	DWORD PTR -68[rbp], 225
	mov	DWORD PTR -64[rbp], 256
	mov	DWORD PTR -60[rbp], 289
	mov	DWORD PTR -56[rbp], 324
	mov	DWORD PTR -52[rbp], 361
	mov	DWORD PTR -48[rbp], 400
	mov	DWORD PTR -44[rbp], 441
	mov	DWORD PTR -40[rbp], 484
	mov	DWORD PTR -36[rbp], 529
	mov	DWORD PTR -32[rbp], 576
	mov	DWORD PTR -28[rbp], 625
	mov	DWORD PTR -24[rbp], 676
	mov	DWORD PTR -20[rbp], 729
	mov	DWORD PTR -16[rbp], 784
	mov	DWORD PTR -12[rbp], 841
	mov	DWORD PTR -132[rbp], 30
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -132[rbp]
	lea	edx, -1[rax]
	lea	rax, -128[rbp]
	mov	ecx, 2
	mov	esi, 0
	mov	rdi, rax
	call	binarySearch
	mov	edx, eax
	mov	esi, 2
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -132[rbp]
	lea	edx, -1[rax]
	lea	rax, -128[rbp]
	mov	ecx, 4
	mov	esi, 0
	mov	rdi, rax
	call	binarySearch
	mov	edx, eax
	mov	esi, 4
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -132[rbp]
	lea	edx, -1[rax]
	lea	rax, -128[rbp]
	mov	ecx, 10
	mov	esi, 0
	mov	rdi, rax
	call	binarySearch
	mov	edx, eax
	mov	esi, 10
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -132[rbp]
	lea	edx, -1[rax]
	lea	rax, -128[rbp]
	mov	ecx, 257
	mov	esi, 0
	mov	rdi, rax
	call	binarySearch
	mov	edx, eax
	mov	esi, 257
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -132[rbp]
	lea	edx, -1[rax]
	lea	rax, -128[rbp]
	mov	ecx, 256
	mov	esi, 0
	mov	rdi, rax
	call	binarySearch
	mov	edx, eax
	mov	esi, 256
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -132[rbp]
	lea	edx, -1[rax]
	lea	rax, -128[rbp]
	mov	ecx, 400
	mov	esi, 0
	mov	rdi, rax
	call	binarySearch
	mov	edx, eax
	mov	esi, 400
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -132[rbp]
	lea	edx, -1[rax]
	lea	rax, -128[rbp]
	mov	ecx, 441
	mov	esi, 0
	mov	rdi, rax
	call	binarySearch
	mov	edx, eax
	mov	esi, 441
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"370969.c"
	.text
	.align	2
	.global	binarySearch
	.syntax unified
	.arm
	.fpu softvfp
	.type	binarySearch, %function
binarySearch:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L2
	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, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L3
	ldr	r3, [fp, #-8]
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L5
	ldr	r3, [fp, #-8]
	add	r1, r3, #1
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	binarySearch
	mov	r3, r0
	b	.L4
.L5:
	ldr	r3, [fp, #-8]
	sub	r2, r3, #1
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	binarySearch
	mov	r3, r0
	b	.L4
.L2:
	mvn	r3, #0
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	binarySearch, .-binarySearch
	.section	.rodata
	.align	2
.LC1:
	.ascii	"0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, "
	.ascii	"169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 5"
	.ascii	"29, 576, 625, 676, 729, 784, 841\000"
	.align	2
.LC2:
	.ascii	"Searched: %d, index: %d\012\000"
	.align	2
.LC0:
	.word	0
	.word	1
	.word	4
	.word	9
	.word	16
	.word	25
	.word	36
	.word	49
	.word	64
	.word	81
	.word	100
	.word	121
	.word	144
	.word	169
	.word	196
	.word	225
	.word	256
	.word	289
	.word	324
	.word	361
	.word	400
	.word	441
	.word	484
	.word	529
	.word	576
	.word	625
	.word	676
	.word	729
	.word	784
	.word	841
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L9+4
	sub	r3, fp, #128
	mov	r1, r2
	mov	r2, #120
	mov	r0, r3
	bl	memcpy
	mov	r3, #30
	str	r3, [fp, #-132]
	ldr	r0, .L9+8
	bl	puts
	ldr	r3, [fp, #-132]
	sub	r2, r3, #1
	sub	r0, fp, #128
	mov	r3, #2
	mov	r1, #0
	bl	binarySearch
	mov	r3, r0
	mov	r2, r3
	mov	r1, #2
	ldr	r0, .L9+12
	bl	printf
	ldr	r3, [fp, #-132]
	sub	r2, r3, #1
	sub	r0, fp, #128
	mov	r3, #4
	mov	r1, #0
	bl	binarySearch
	mov	r3, r0
	mov	r2, r3
	mov	r1, #4
	ldr	r0, .L9+12
	bl	printf
	ldr	r3, [fp, #-132]
	sub	r2, r3, #1
	sub	r0, fp, #128
	mov	r3, #10
	mov	r1, #0
	bl	binarySearch
	mov	r3, r0
	mov	r2, r3
	mov	r1, #10
	ldr	r0, .L9+12
	bl	printf
	ldr	r3, [fp, #-132]
	sub	r2, r3, #1
	sub	r0, fp, #128
	ldr	r3, .L9+16
	mov	r1, #0
	bl	binarySearch
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L9+16
	ldr	r0, .L9+12
	bl	printf
	ldr	r3, [fp, #-132]
	sub	r2, r3, #1
	sub	r0, fp, #128
	mov	r3, #256
	mov	r1, #0
	bl	binarySearch
	mov	r3, r0
	mov	r2, r3
	mov	r1, #256
	ldr	r0, .L9+12
	bl	printf
	ldr	r3, [fp, #-132]
	sub	r2, r3, #1
	sub	r0, fp, #128
	mov	r3, #400
	mov	r1, #0
	bl	binarySearch
	mov	r3, r0
	mov	r2, r3
	mov	r1, #400
	ldr	r0, .L9+12
	bl	printf
	ldr	r3, [fp, #-132]
	sub	r2, r3, #1
	sub	r0, fp, #128
	ldr	r3, .L9+20
	mov	r1, #0
	bl	binarySearch
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L9+20
	ldr	r0, .L9+12
	bl	printf
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	257
	.word	441
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
