Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>


#define	ll_int	long long int


int Binary_Search(ll_int *box, int n, ll_int num)
{
	int mid;
	int left, right;


	left = 0;
	right = n - 1;
	while(left <= right){
		mid = (left + right) / 2;

		if(num == box[mid])
			return 1;
		else if(num < box[mid])
			right = mid - 1;
		else if(box[mid] < num)
			left = mid + 1;
	}

	return 0;
}


int main()
{
	int n, q;
	ll_int *box, num;
	int i;


	scanf("%d", &n);

	box = (ll_int *)malloc(sizeof(ll_int) * n);

	for(i = 0; i < n; i++)
		scanf("%lld", &box[i]);


	scanf("%d", &q);

	for(i = 0; i < q; i++){
		scanf("%lld", &num);

		if(Binary_Search(box, n, num))
			printf("1\n");
		else
			printf("0\n");
	}

	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Binary_Search
	.type	Binary_Search, @function
Binary_Search:
.LFB39:
	.cfi_startproc
	endbr64
	subl	$1, %esi
	js	.L6
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rax), %esi
.L4:
	cmpl	%ecx, %esi
	jl	.L6
.L5:
	leal	(%rsi,%rcx), %eax
	sarl	%eax
	movslq	%eax, %r8
	cmpq	%rdx, (%rdi,%r8,8)
	je	.L7
	jg	.L10
	jge	.L4
	leal	1(%rax), %ecx
	cmpl	%ecx, %esi
	jge	.L5
.L6:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	Binary_Search, .-Binary_Search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"1"
.LC3:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %r15
	testl	%ebx, %ebx
	jle	.L12
	movq	%rax, %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$8, %r12
	cmpl	%ebx, 8(%rsp)
	jg	.L13
.L12:
	leaq	12(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L14
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r12
	leaq	.LC3(%rip), %r14
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rbp, %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	movq	16(%rsp), %rdi
	subl	$1, %edx
	js	.L15
	xorl	%ecx, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rax), %edx
.L18:
	cmpl	%ecx, %edx
	jl	.L15
.L19:
	leal	(%rcx,%rdx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpq	(%r15,%rsi,8), %rdi
	je	.L16
	jl	.L28
	jle	.L18
	leal	1(%rax), %ecx
	cmpl	%ecx, %edx
	jge	.L19
.L15:
	movq	%r14, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
.L14:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r13, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Binary_Search
	.type	Binary_Search, @function
Binary_Search:
.LFB39:
	.cfi_startproc
	endbr64
	subl	$1, %esi
	js	.L6
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rax), %esi
.L4:
	cmpl	%ecx, %esi
	jl	.L6
.L5:
	leal	(%rsi,%rcx), %eax
	sarl	%eax
	movslq	%eax, %r8
	cmpq	%rdx, (%rdi,%r8,8)
	je	.L7
	jg	.L10
	jge	.L4
	leal	1(%rax), %ecx
	cmpl	%ecx, %esi
	jge	.L5
.L6:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	Binary_Search, .-Binary_Search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"1"
.LC3:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %r15
	testl	%ebx, %ebx
	jle	.L12
	movq	%rax, %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$8, %r12
	cmpl	%ebx, 8(%rsp)
	jg	.L13
.L12:
	leaq	12(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L14
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r12
	leaq	.LC3(%rip), %r14
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rbp, %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	movq	16(%rsp), %rdi
	subl	$1, %edx
	js	.L15
	xorl	%ecx, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rax), %edx
.L18:
	cmpl	%ecx, %edx
	jl	.L15
.L19:
	leal	(%rcx,%rdx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpq	(%r15,%rsi,8), %rdi
	je	.L16
	jl	.L28
	jle	.L18
	leal	1(%rax), %ecx
	cmpl	%ecx, %edx
	jge	.L19
.L15:
	movq	%r14, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
.L14:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r13, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```
rule
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Binary_Search
	.type	Binary_Search, @function
Binary_Search:
.LFB39:
	.cfi_startproc
	endbr64
	subl	$1, %esi
	js	.L6
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rax), %esi
.L4:
	cmpl	%ecx, %esi
	jl	.L6
.L5:
	leal	(%rsi,%rcx), %eax
	sarl	%eax
	movslq	%eax, %r8
	cmpq	%rdx, (%rdi,%r8,8)
	je	.L7
	jg	.L10
	jge	.L4
	leal	1(%rax), %ecx
	cmpl	%ecx, %esi
	jge	.L5
.L6:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	Binary_Search, .-Binary_Search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"1"
.LC3:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %r15
	testl	%ebx, %ebx
	jle	.L12
	movq	%rax, %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$8, %r12
	cmpl	%ebx, 8(%rsp)
	jg	.L13
.L12:
	leaq	12(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L14
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r12
	leaq	.LC3(%rip), %r14
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rbp, %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	movq	16(%rsp), %rdi
	subl	$1, %edx
	js	.L15
	xorl	%ecx, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rax), %edx
.L18:
	cmpl	%ecx, %edx
	jl	.L15
.L19:
	leal	(%rcx,%rdx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpq	(%r15,%rsi,8), %rdi
	je	.L16
	jl	.L28
	jle	.L18
	leal	1(%rax), %ecx
	cmpl	%ecx, %edx
	jge	.L19
.L15:
	movq	%r14, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
.L14:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r13, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```
```c
#include <stdio.h>
#include <stdlib.h>


#define	ll_int	long long int


int Binary_Search(ll_int *box, int n, ll_int num)
{
	int mid;
	int left, right;


	left = 0;
	right = n - 1;
	while(left <= right){
		mid = (left + right) / 2;

		if(num == box[mid])
			return 1;
		else if(num < box[mid])
			right = mid - 1;
		else if(box[mid] < num)
			left = mid + 1;
	}

	return 0;
}


int main()
{
	int n, q;
	ll_int *box, num;
	int i;


	scanf("%d", &n);

	box = (ll_int *)malloc(sizeof(ll_int) * n);

	for(i = 0; i < n; i++)
		scanf("%lld", &box[i]);


	scanf("%d", &q);

	for(i = 0; i < q; i++){
		scanf("%lld", &num);

		if(Binary_Search(box, n, num))
			printf("1\n");
		else
			printf("0\n");
	}

	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>


#define	ll_int	long long int


int Binary_Search(ll_int *box, int n, ll_int num)
{
	int mid;
	int left, right;


	left = 0;
	right = n - 1;
	while(left <= right){
		mid = (left + right) / 2;

		if(num == box[mid])
			return 1;
		else if(num < box[mid])
			right = mid - 1;
		else if(box[mid] < num)
			left = mid + 1;
	}

	return 0;
}


int main()
{
	int n, q;
	ll_int *box, num;
	int i;


	scanf("%d", &n);

	box = (ll_int *)malloc(sizeof(ll_int) * n);

	for(i = 0; i < n; i++)
		scanf("%lld", &box[i]);


	scanf("%d", &q);

	for(i = 0; i < q; i++){
		scanf("%lld", &num);

		if(Binary_Search(box, n, num))
			printf("1\n");
		else
			printf("0\n");
	}

	return 0;
}
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

4
1 2 2 4
3
2
3
6
 4
1 1 2 4
3
0
3
8
 4
0 1 2 7
3
0
7
10
 4
0 1 2 6
3
0
3
6
 4
1 2 1 4
2
0
3
8
 4
0 1 2 7
1
0
5
3
 4
0 2 3 4
3
2
3
4
 4
0 1 2 7
1
-1
5
3
 4
0 2 1 3
3
-1
3
6
 4
0 2 2 1
3
4
3
0

1
0
0
 0
0
0
 1
1
0
 1
0
1
 0
0
 1
 1
1
1
 0
 0
1
0
 0
0
1

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>


#define	ll_int	long long int


int Binary_Search(ll_int *box, int n, ll_int num)
{
	int mid;
	int left, right;


	left = 0;
	right = n - 1;
	while(left <= right){
		mid = (left + right) / 2;

		if(num == box[mid])
			return 1;
		else if(num < box[mid])
			right = mid - 1;
		else if(box[mid] < num)
			left = mid + 1;
	}

	return 0;
}


int main()
{
	int n, q;
	ll_int *box, num;
	int i;


	scanf("%d", &n);

	box = (ll_int *)malloc(sizeof(ll_int) * n);

	for(i = 0; i < n; i++)
		scanf("%lld", &box[i]);


	scanf("%d", &q);

	for(i = 0; i < q; i++){
		scanf("%lld", &num);

		if(Binary_Search(box, n, num))
			printf("1\n");
		else
			printf("0\n");
	}

	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Binary_Search
	.type	Binary_Search, @function
Binary_Search:
.LFB39:
	.cfi_startproc
	endbr64
	subl	$1, %esi
	js	.L6
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rax), %esi
.L4:
	cmpl	%ecx, %esi
	jl	.L6
.L5:
	leal	(%rsi,%rcx), %eax
	sarl	%eax
	movslq	%eax, %r8
	cmpq	%rdx, (%rdi,%r8,8)
	je	.L7
	jg	.L10
	jge	.L4
	leal	1(%rax), %ecx
	cmpl	%ecx, %esi
	jge	.L5
.L6:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	Binary_Search, .-Binary_Search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"1"
.LC3:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %r15
	testl	%ebx, %ebx
	jle	.L12
	movq	%rax, %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$8, %r12
	cmpl	%ebx, 8(%rsp)
	jg	.L13
.L12:
	leaq	12(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L14
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r12
	leaq	.LC3(%rip), %r14
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rbp, %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	movq	16(%rsp), %rdi
	subl	$1, %edx
	js	.L15
	xorl	%ecx, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rax), %edx
.L18:
	cmpl	%ecx, %edx
	jl	.L15
.L19:
	leal	(%rcx,%rdx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpq	(%r15,%rsi,8), %rdi
	je	.L16
	jl	.L28
	jle	.L18
	leal	1(%rax), %ecx
	cmpl	%ecx, %edx
	jge	.L19
.L15:
	movq	%r14, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
.L14:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r13, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Binary_Search
	.type	Binary_Search, @function
Binary_Search:
.LFB39:
	.cfi_startproc
	endbr64
	subl	$1, %esi
	js	.L6
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	leal	-1(%rax), %esi
.L4:
	cmpl	%ecx, %esi
	jl	.L6
.L5:
	leal	(%rsi,%rcx), %eax
	sarl	%eax
	movslq	%eax, %r8
	cmpq	%rdx, (%rdi,%r8,8)
	je	.L7
	jg	.L10
	jge	.L4
	leal	1(%rax), %ecx
	cmpl	%ecx, %esi
	jge	.L5
.L6:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	Binary_Search, .-Binary_Search
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
.LC2:
	.string	"1"
.LC3:
	.string	"0"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rdi
	movq	%rdi, %rbx
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %r15
	testl	%ebx, %ebx
	jle	.L12
	movq	%rax, %r12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$8, %r12
	cmpl	%ebx, 8(%rsp)
	jg	.L13
.L12:
	leaq	12(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L14
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %rbp
	leaq	16(%rsp), %r12
	leaq	.LC3(%rip), %r14
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rbp, %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edx
	movq	16(%rsp), %rdi
	subl	$1, %edx
	js	.L15
	xorl	%ecx, %ecx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L28:
	leal	-1(%rax), %edx
.L18:
	cmpl	%ecx, %edx
	jl	.L15
.L19:
	leal	(%rcx,%rdx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpq	(%r15,%rsi,8), %rdi
	je	.L16
	jl	.L28
	jle	.L18
	leal	1(%rax), %ecx
	cmpl	%ecx, %edx
	jge	.L19
.L15:
	movq	%r14, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
.L14:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movq	%r13, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L20
	jmp	.L14
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.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:
```