	.file	"54825341.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"\nEnter the no. of elements: "
.LC1:
	.string	"%d"
.LC2:
	.string	"\nEnter the elements: "
	.align 8
.LC3:
	.string	"\nEnter the number to search for: "
	.align 8
.LC4:
	.string	"\nYour number %d is found at location %d"
.LC5:
	.string	"\nYour Number %d is not found!"
	.text
	.globl	linearSearch
	.type	linearSearch, @function
linearSearch:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 56
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	DWORD PTR -80[rbp], 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -84[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -72[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L2:
	cmp	rsp, rdx
	je	.L3
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L2
.L3:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L4
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L4:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -64[rbp], rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -76[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -76[rbp], 1
.L5:
	mov	eax, DWORD PTR -84[rbp]
	cmp	DWORD PTR -76[rbp], eax
	jl	.L6
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -88[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -76[rbp], 0
	jmp	.L7
.L10:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -76[rbp]
	movsx	rdx, edx
	mov	edx, DWORD PTR [rax+rdx*4]
	mov	eax, DWORD PTR -88[rbp]
	cmp	edx, eax
	jne	.L8
	mov	eax, DWORD PTR -76[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -88[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -80[rbp], 1
	jmp	.L9
.L8:
	add	DWORD PTR -76[rbp], 1
.L7:
	mov	eax, DWORD PTR -84[rbp]
	cmp	DWORD PTR -76[rbp], eax
	jl	.L10
.L9:
	cmp	DWORD PTR -80[rbp], 0
	jne	.L11
	mov	eax, DWORD PTR -88[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L11:
	mov	rsp, rbx
	nop
	mov	rax, QWORD PTR -56[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	linearSearch, .-linearSearch
	.section	.rodata
	.align 8
.LC6:
	.string	"\nEnter the number of elements : "
	.align 8
.LC7:
	.string	"\nEnter the elements in ascending order : "
	.align 8
.LC8:
	.string	"\nEnter element to be searched: "
	.align 8
.LC9:
	.string	"\n\nYour number %d is found at location %d"
	.text
	.globl	binarySearch
	.type	binarySearch, @function
binarySearch:
.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, 448
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -424[rbp], 0
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -440[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -436[rbp], 0
	jmp	.L14
.L15:
	lea	rdx, -416[rbp]
	mov	eax, DWORD PTR -436[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -436[rbp], 1
.L14:
	mov	eax, DWORD PTR -440[rbp]
	cmp	DWORD PTR -436[rbp], eax
	jl	.L15
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -444[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -432[rbp], 0
	mov	eax, DWORD PTR -440[rbp]
	sub	eax, 1
	mov	DWORD PTR -428[rbp], eax
	jmp	.L16
.L20:
	mov	edx, DWORD PTR -432[rbp]
	mov	eax, DWORD PTR -428[rbp]
	add	eax, edx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -420[rbp], eax
	mov	eax, DWORD PTR -420[rbp]
	cdqe
	mov	edx, DWORD PTR -416[rbp+rax*4]
	mov	eax, DWORD PTR -444[rbp]
	cmp	edx, eax
	jne	.L17
	mov	eax, DWORD PTR -420[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -444[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -424[rbp], 1
	jmp	.L18
.L17:
	mov	eax, DWORD PTR -420[rbp]
	cdqe
	mov	edx, DWORD PTR -416[rbp+rax*4]
	mov	eax, DWORD PTR -444[rbp]
	cmp	edx, eax
	jle	.L19
	mov	eax, DWORD PTR -420[rbp]
	sub	eax, 1
	mov	DWORD PTR -428[rbp], eax
	jmp	.L16
.L19:
	mov	eax, DWORD PTR -420[rbp]
	cdqe
	mov	edx, DWORD PTR -416[rbp+rax*4]
	mov	eax, DWORD PTR -444[rbp]
	cmp	edx, eax
	jge	.L16
	mov	eax, DWORD PTR -420[rbp]
	add	eax, 1
	mov	DWORD PTR -432[rbp], eax
.L16:
	mov	eax, DWORD PTR -432[rbp]
	cmp	eax, DWORD PTR -428[rbp]
	jle	.L20
.L18:
	cmp	DWORD PTR -424[rbp], 0
	jne	.L23
	mov	eax, DWORD PTR -444[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L23:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	binarySearch, .-binarySearch
	.section	.rodata
.LC10:
	.string	"\n\nChoose operation"
.LC11:
	.string	"\n1.Linear Search"
.LC12:
	.string	"\n2.Binary Search"
.LC13:
	.string	"\n3.Exit"
.LC14:
	.string	"Invalid choice"
	.text
	.globl	main
	.type	main, @function
main:
.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L30:
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC13[rip]
	call	puts@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 3
	je	.L32
	cmp	eax, 3
	jg	.L26
	cmp	eax, 1
	je	.L27
	cmp	eax, 2
	je	.L28
	jmp	.L26
.L27:
	mov	eax, 0
	call	linearSearch
	jmp	.L29
.L28:
	mov	eax, 0
	call	binarySearch
	jmp	.L29
.L26:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	jmp	.L29
.L32:
	nop
.L29:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 2
	jle	.L30
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"54825341.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Enter the no. of elements: \000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"\012Enter the elements: \000"
	.align	2
.LC3:
	.ascii	"\012Enter the number to search for: \000"
	.align	2
.LC4:
	.ascii	"\012Your number %d is found at location %d\000"
	.align	2
.LC5:
	.ascii	"\012Your Number %d is not found!\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	linearSearch
	.syntax unified
	.arm
	.fpu softvfp
	.type	linearSearch, %function
linearSearch:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r0, .L10+4
	bl	printf
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L10+8
	bl	__isoc99_scanf
	ldr	ip, [fp, #-36]
	sub	r3, ip, #1
	str	r3, [fp, #-24]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-20]
	ldr	r0, .L10+12
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L2
.L3:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L10+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L2:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L3
	ldr	r0, .L10+16
	bl	printf
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L10+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L4
.L7:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bne	.L5
	ldr	r1, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r0, .L10+20
	bl	printf
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L6
.L5:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L4:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L7
.L6:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-40]
	mov	r1, r3
	ldr	r0, .L10+24
	bl	printf
.L8:
	mov	sp, r4
	nop
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	linearSearch, .-linearSearch
	.section	.rodata
	.align	2
.LC7:
	.ascii	"\012Enter the number of elements : \000"
	.align	2
.LC8:
	.ascii	"\012Enter the elements in ascending order : \000"
	.align	2
.LC9:
	.ascii	"\012Enter element to be searched: \000"
	.align	2
.LC10:
	.ascii	"\012\012Your number %d is found at location %d\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	binarySearch
	.syntax unified
	.arm
	.fpu softvfp
	.type	binarySearch, %function
binarySearch:
	@ args = 0, pretend = 0, frame = 432
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #432
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-416]
	ldr	r0, .L23+4
	bl	printf
	sub	r3, fp, #432
	mov	r1, r3
	ldr	r0, .L23+8
	bl	__isoc99_scanf
	ldr	r0, .L23+12
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-428]
	b	.L13
.L14:
	sub	r2, fp, #408
	ldr	r3, [fp, #-428]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L23+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-428]
	add	r3, r3, #1
	str	r3, [fp, #-428]
.L13:
	ldr	r3, [fp, #-432]
	ldr	r2, [fp, #-428]
	cmp	r2, r3
	blt	.L14
	ldr	r0, .L23+16
	bl	printf
	sub	r3, fp, #436
	mov	r1, r3
	ldr	r0, .L23+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-424]
	ldr	r3, [fp, #-432]
	sub	r3, r3, #1
	str	r3, [fp, #-420]
	b	.L15
.L19:
	ldr	r2, [fp, #-424]
	ldr	r3, [fp, #-420]
	add	r3, r2, r3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-412]
	ldr	r3, [fp, #-412]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-404]
	ldr	r3, [fp, #-436]
	cmp	r2, r3
	bne	.L16
	ldr	r1, [fp, #-436]
	ldr	r3, [fp, #-412]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r0, .L23+20
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-416]
	b	.L17
.L16:
	ldr	r3, [fp, #-412]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-404]
	ldr	r3, [fp, #-436]
	cmp	r2, r3
	ble	.L18
	ldr	r3, [fp, #-412]
	sub	r3, r3, #1
	str	r3, [fp, #-420]
	b	.L15
.L18:
	ldr	r3, [fp, #-412]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-404]
	ldr	r3, [fp, #-436]
	cmp	r2, r3
	bge	.L15
	ldr	r3, [fp, #-412]
	add	r3, r3, #1
	str	r3, [fp, #-424]
.L15:
	ldr	r2, [fp, #-424]
	ldr	r3, [fp, #-420]
	cmp	r2, r3
	ble	.L19
.L17:
	ldr	r3, [fp, #-416]
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-436]
	mov	r1, r3
	ldr	r0, .L23+24
	bl	printf
.L22:
	nop
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC11
	.word	.LC7
	.word	.LC1
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC5
	.size	binarySearch, .-binarySearch
	.section	.rodata
	.align	2
.LC12:
	.ascii	"\012\012Choose operation\000"
	.align	2
.LC13:
	.ascii	"\0121.Linear Search\000"
	.align	2
.LC14:
	.ascii	"\0122.Binary Search\000"
	.align	2
.LC15:
	.ascii	"\0123.Exit\000"
	.align	2
.LC16:
	.ascii	"Invalid choice\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L31:
	ldr	r0, .L34+4
	bl	printf
	ldr	r0, .L34+8
	bl	printf
	ldr	r0, .L34+12
	bl	printf
	ldr	r0, .L34+16
	bl	puts
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L34+20
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	beq	.L33
	cmp	r3, #3
	bgt	.L27
	cmp	r3, #1
	beq	.L28
	cmp	r3, #2
	beq	.L29
	b	.L27
.L28:
	bl	linearSearch
	b	.L30
.L29:
	bl	binarySearch
	b	.L30
.L27:
	ldr	r0, .L34+24
	bl	puts
	b	.L30
.L33:
	nop
.L30:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L31
	nop
	ldr	r3, .L34
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC17
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC1
	.word	.LC16
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
