	.file	"814744.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"R > M: %d - ARR[M]: %d - L: %d - R: %d \n"
	.text
	.globl	binarySearchRecursive
	.type	binarySearchRecursive, @function
binarySearchRecursive:
.LFB6:
	.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, r8d
	mov	BYTE PTR -40[rbp], al
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L2
	mov	eax, DWORD PTR -32[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	BYTE PTR -40[rbp], 0
	je	.L3
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	esi, DWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L3:
	mov	eax, DWORD PTR -28[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	.L4
	mov	eax, DWORD PTR -28[rbp]
	jmp	.L5
.L4:
	mov	eax, DWORD PTR -32[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	.L6
	mov	eax, DWORD PTR -32[rbp]
	jmp	.L5
.L6:
	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	.L7
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L5
.L7:
	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
	jge	.L8
	movzx	ecx, BYTE PTR -40[rbp]
	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	r8d, ecx
	mov	ecx, edx
	mov	edx, edi
	mov	rdi, rax
	call	binarySearchRecursive
	jmp	.L5
.L8:
	movzx	edi, BYTE PTR -40[rbp]
	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	r8d, edi
	mov	rdi, rax
	call	binarySearchRecursive
	jmp	.L5
.L2:
	mov	eax, -1
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	binarySearchRecursive, .-binarySearchRecursive
	.section	.rodata
	.align 8
.LC1:
	.string	"I > M: %d - ARR[M]: %d - L: %d - R: %d \n"
	.text
	.globl	binarySearchIterative
	.type	binarySearchIterative, @function
binarySearchIterative:
.LFB7:
	.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, r8d
	mov	BYTE PTR -40[rbp], al
	jmp	.L10
.L17:
	mov	eax, DWORD PTR -32[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	edx, eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	BYTE PTR -40[rbp], 0
	je	.L11
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	esi, DWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L11:
	mov	eax, DWORD PTR -28[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	.L12
	mov	eax, DWORD PTR -28[rbp]
	jmp	.L13
.L12:
	mov	eax, DWORD PTR -32[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	.L14
	mov	eax, DWORD PTR -32[rbp]
	jmp	.L13
.L14:
	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	.L15
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L13
.L15:
	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
	jge	.L16
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	mov	DWORD PTR -32[rbp], eax
	jmp	.L10
.L16:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR -28[rbp], eax
.L10:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jle	.L17
	mov	eax, -1
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	binarySearchIterative, .-binarySearchIterative
	.section	.rodata
	.align 8
.LC2:
	.string	"%zu (size of ARR) / %zu (size of ARR first element) = %d (N)\n"
.LC3:
	.string	"Result: %d - %d"
	.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -65[rbp], 1
	mov	DWORD PTR -48[rbp], 2
	mov	DWORD PTR -44[rbp], 3
	mov	DWORD PTR -40[rbp], 4
	mov	DWORD PTR -36[rbp], 10
	mov	DWORD PTR -32[rbp], 40
	mov	DWORD PTR -28[rbp], 41
	mov	DWORD PTR -24[rbp], 42
	mov	DWORD PTR -20[rbp], 43
	mov	DWORD PTR -16[rbp], 44
	mov	DWORD PTR -12[rbp], 45
	mov	DWORD PTR -64[rbp], 10
	mov	DWORD PTR -60[rbp], 10
	cmp	BYTE PTR -65[rbp], 0
	je	.L19
	mov	eax, DWORD PTR -64[rbp]
	mov	ecx, eax
	mov	edx, 4
	mov	esi, 40
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L19:
	movzx	ecx, BYTE PTR -65[rbp]
	mov	eax, DWORD PTR -64[rbp]
	lea	esi, -1[rax]
	mov	edx, DWORD PTR -60[rbp]
	lea	rax, -48[rbp]
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, esi
	mov	esi, 0
	mov	rdi, rax
	call	binarySearchIterative
	mov	DWORD PTR -56[rbp], eax
	movzx	ecx, BYTE PTR -65[rbp]
	mov	eax, DWORD PTR -64[rbp]
	lea	esi, -1[rax]
	mov	edx, DWORD PTR -60[rbp]
	lea	rax, -48[rbp]
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, esi
	mov	esi, 0
	mov	rdi, rax
	call	binarySearchRecursive
	mov	DWORD PTR -52[rbp], eax
	mov	edx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -56[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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	"814744.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"R > M: %d - ARR[M]: %d - L: %d - R: %d \012\000"
	.text
	.align	2
	.global	binarySearchRecursive
	.syntax unified
	.arm
	.fpu softvfp
	.type	binarySearchRecursive, %function
binarySearchRecursive:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	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	r3, [fp, #-24]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldrb	r3, [fp, #4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-8]
	ldr	r0, .L9
	bl	printf
.L3:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L4
	ldr	r3, [fp, #-20]
	b	.L5
.L4:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L6
	ldr	r3, [fp, #-24]
	b	.L5
.L6:
	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	.L7
	ldr	r3, [fp, #-8]
	b	.L5
.L7:
	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
	bge	.L8
	ldr	r3, [fp, #-8]
	sub	r2, r3, #1
	ldrb	r3, [fp, #4]	@ zero_extendqisi2
	str	r3, [sp]
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	binarySearchRecursive
	mov	r3, r0
	b	.L5
.L8:
	ldr	r3, [fp, #-8]
	add	r1, r3, #1
	ldrb	r3, [fp, #4]	@ zero_extendqisi2
	str	r3, [sp]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	binarySearchRecursive
	mov	r3, r0
	b	.L5
.L2:
	mvn	r3, #0
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC1
	.size	binarySearchRecursive, .-binarySearchRecursive
	.section	.rodata
	.align	2
.LC2:
	.ascii	"I > M: %d - ARR[M]: %d - L: %d - R: %d \012\000"
	.text
	.align	2
	.global	binarySearchIterative
	.syntax unified
	.arm
	.fpu softvfp
	.type	binarySearchIterative, %function
binarySearchIterative:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	b	.L12
.L19:
	ldr	r3, [fp, #-24]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldrb	r3, [fp, #4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-8]
	ldr	r0, .L20
	bl	printf
.L13:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L14
	ldr	r3, [fp, #-20]
	b	.L15
.L14:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L16
	ldr	r3, [fp, #-24]
	b	.L15
.L16:
	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	.L17
	ldr	r3, [fp, #-8]
	b	.L15
.L17:
	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
	bge	.L18
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L12
.L18:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L12:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L19
	mvn	r3, #0
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC2
	.size	binarySearchIterative, .-binarySearchIterative
	.section	.rodata
	.align	2
.LC3:
	.ascii	"%zu (size of ARR) / %zu (size of ARR first element)"
	.ascii	" = %d (N)\012\000"
	.align	2
.LC4:
	.ascii	"Result: %d - %d\000"
	.align	2
.LC0:
	.word	2
	.word	3
	.word	4
	.word	10
	.word	40
	.word	41
	.word	42
	.word	43
	.word	44
	.word	45
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	strb	r3, [fp, #-65]
	ldr	r3, .L26+4
	sub	ip, fp, #48
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	mov	r3, #10
	str	r3, [fp, #-64]
	mov	r3, #10
	str	r3, [fp, #-60]
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-64]
	mov	r2, #4
	mov	r1, #40
	ldr	r0, .L26+8
	bl	printf
.L23:
	ldr	r3, [fp, #-64]
	sub	r2, r3, #1
	sub	r0, fp, #48
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	str	r3, [sp]
	ldr	r3, [fp, #-60]
	mov	r1, #0
	bl	binarySearchIterative
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-64]
	sub	r2, r3, #1
	sub	r0, fp, #48
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	str	r3, [sp]
	ldr	r3, [fp, #-60]
	mov	r1, #0
	bl	binarySearchRecursive
	str	r0, [fp, #-52]
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-56]
	ldr	r0, .L26+12
	bl	printf
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC5
	.word	.LC0
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
