	.file	"982710.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Input please number you want find:"
.LC1:
	.string	"%d"
.LC2:
	.string	"\nWe found you number in %d.\n"
	.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, 4032
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -4028[rbp], 0
	mov	DWORD PTR -4024[rbp], 0
	mov	DWORD PTR -4032[rbp], 0
	mov	DWORD PTR -4020[rbp], 0
	mov	DWORD PTR -4028[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -4028[rbp]
	cdqe
	mov	edx, DWORD PTR -4028[rbp]
	mov	DWORD PTR -4016[rbp+rax*4], edx
	add	DWORD PTR -4028[rbp], 1
.L2:
	cmp	DWORD PTR -4028[rbp], 999
	jle	.L3
	mov	DWORD PTR -4020[rbp], 1000
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -4032[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -4032[rbp]
	mov	edx, DWORD PTR -4020[rbp]
	lea	rcx, -4016[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	binsearch_orig
	mov	DWORD PTR -4024[rbp], eax
	mov	eax, DWORD PTR -4024[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4032[rbp]
	mov	edx, DWORD PTR -4020[rbp]
	lea	rcx, -4016[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	binsearch_my
	mov	DWORD PTR -4024[rbp], eax
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	binsearch_orig
	.type	binsearch_orig, @function
binsearch_orig:
.LFB1:
	.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L6
.L10:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -8[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 -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jge	.L7
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L8
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	DWORD PTR -12[rbp], eax
	jmp	.L6
.L8:
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L9
.L6:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jle	.L10
	mov	eax, -1
.L9:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	binsearch_orig, .-binsearch_orig
	.section	.rodata
	.align 8
.LC3:
	.string	"\nbefore cycle high = %d; low = %d; mid = %d;\n"
	.align 8
.LC4:
	.string	"if_ high = %d;low = %d; mid = %d;\n"
	.align 8
.LC5:
	.string	"else_  high = %d;low = %d; mid = %d;\n"
	.align 8
.LC6:
	.string	"In the end we get low = %d; high = %d; mid = %d; v [ mid ] = %d; x = %d;\n"
	.text
	.globl	binsearch_my
	.type	binsearch_my, @function
binsearch_my:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	js	.L12
	cmp	DWORD PTR -20[rbp], 1000
	jle	.L15
.L12:
	mov	eax, -1
	jmp	.L14
.L18:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -12[rbp], eax
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jge	.L16
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L17
.L16:
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 1
	mov	DWORD PTR -16[rbp], eax
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	add	DWORD PTR -4[rbp], 1
	mov	ecx, DWORD PTR -4[rbp]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	test	edx, edx
	jne	.L15
	call	getchar@PLT
.L15:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jl	.L18
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L18
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	esi, DWORD PTR [rax]
	mov	edi, DWORD PTR -20[rbp]
	mov	ecx, DWORD PTR -12[rbp]
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -12[rbp], 0
	js	.L19
	cmp	DWORD PTR -12[rbp], 999
	jg	.L19
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L14
.L19:
	mov	eax, -1
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	binsearch_my, .-binsearch_my
	.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	"982710.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Input please number you want find:\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"\012We found you number in %d.\012\000"
	.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 = 4024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #4016
	sub	sp, sp, #8
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-4020]
	mov	r3, #0
	str	r3, [fp, #-4016]
	mov	r3, #0
	str	r3, [fp, #-4024]
	mov	r3, #0
	str	r3, [fp, #-4012]
	mov	r3, #0
	str	r3, [fp, #-4020]
	b	.L2
.L3:
	ldr	r3, [fp, #-4020]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-4020]
	str	r2, [r3, #-4004]
	ldr	r3, [fp, #-4020]
	add	r3, r3, #1
	str	r3, [fp, #-4020]
.L2:
	ldr	r3, [fp, #-4020]
	cmp	r3, #1000
	blt	.L3
	mov	r3, #1000
	str	r3, [fp, #-4012]
	ldr	r0, .L5+4
	bl	printf
	sub	r3, fp, #4016
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L5+8
	bl	__isoc99_scanf
	ldr	r0, [fp, #-4024]
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-4012]
	mov	r1, r3
	bl	binsearch_orig
	str	r0, [fp, #-4016]
	ldr	r1, [fp, #-4016]
	ldr	r0, .L5+12
	bl	printf
	ldr	r0, [fp, #-4024]
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-4012]
	mov	r1, r3
	bl	binsearch_my
	str	r0, [fp, #-4016]
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	binsearch_orig
	.syntax unified
	.arm
	.fpu softvfp
	.type	binsearch_orig, %function
binsearch_orig:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L8
.L12:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	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, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bge	.L9
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L8
.L9:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	ble	.L10
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L8
.L10:
	ldr	r3, [fp, #-8]
	b	.L11
.L8:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L12
	mvn	r3, #0
.L11:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	binsearch_orig, .-binsearch_orig
	.section	.rodata
	.align	2
.LC4:
	.ascii	"\012before cycle high = %d; low = %d; mid = %d;\012"
	.ascii	"\000"
	.align	2
.LC5:
	.ascii	"if_ high = %d;low = %d; mid = %d;\012\000"
	.align	2
.LC6:
	.ascii	"else_  high = %d;low = %d; mid = %d;\012\000"
	.align	2
.LC7:
	.ascii	"In the end we get low = %d; high = %d; mid = %d; v "
	.ascii	"[ mid ] = %d; x = %d;\012\000"
	.text
	.align	2
	.global	binsearch_my
	.syntax unified
	.arm
	.fpu softvfp
	.type	binsearch_my, %function
binsearch_my:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	blt	.L14
	ldr	r3, [fp, #-24]
	cmp	r3, #1000
	ble	.L17
.L14:
	mvn	r3, #0
	b	.L16
.L20:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-12]
	ldr	r0, .L22
	bl	printf
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bge	.L18
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-12]
	ldr	r0, .L22+4
	bl	printf
	b	.L19
.L18:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-12]
	ldr	r0, .L22+8
	bl	printf
.L19:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r3, .L22+12
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L17
	bl	getchar
.L17:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L20
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L20
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-20]
	ldr	r0, .L22+16
	bl	printf
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	blt	.L21
	ldr	r3, [fp, #-16]
	cmp	r3, #1000
	bge	.L21
	ldr	r3, [fp, #-16]
	b	.L16
.L21:
	mvn	r3, #0
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	1717986919
	.word	.LC7
	.size	binsearch_my, .-binsearch_my
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
