	.file	"118704.c"
	.intel_syntax noprefix
	.text
	.globl	merge_sorted_arrays
	.type	merge_sorted_arrays, @function
merge_sorted_arrays:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	esi, 4
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	jmp	.L2
.L6:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jg	.L3
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -32[rbp], rdx
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
.L4:
	mov	rdx, QWORD PTR -16[rbp]
	lea	rcx, 1[rdx]
	mov	QWORD PTR -16[rbp], rcx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	mov	DWORD PTR [rdx], eax
.L2:
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -48[rbp]
	jnb	.L7
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -64[rbp]
	jb	.L6
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -32[rbp], rdx
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -16[rbp], rdx
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
.L7:
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -48[rbp]
	jb	.L8
	jmp	.L9
.L10:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -16[rbp], rdx
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
.L9:
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -64[rbp]
	jb	.L10
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	merge_sorted_arrays, .-merge_sorted_arrays
	.section	.rodata
	.align 8
.LC0:
	.string	"\n The new array after merging the two arrays is ..."
.LC1:
	.string	"%d "
	.text
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 2
	mov	DWORD PTR -28[rbp], 7
	mov	DWORD PTR -24[rbp], 8
	mov	DWORD PTR -20[rbp], 12
	mov	DWORD PTR -44[rbp], -1
	mov	DWORD PTR -40[rbp], 0
	mov	DWORD PTR -36[rbp], 10
	lea	rax, -44[rbp]
	mov	QWORD PTR -72[rbp], rax
	lea	rax, -32[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	rdx, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, 4
	mov	esi, 3
	mov	rdi, rax
	call	merge_sorted_arrays
	mov	QWORD PTR -56[rbp], rax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	QWORD PTR -80[rbp], 0
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -80[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	QWORD PTR -80[rbp], 1
.L13:
	cmp	QWORD PTR -80[rbp], 6
	jbe	.L14
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"118704.c"
	.text
	.align	2
	.global	merge_sorted_arrays
	.syntax unified
	.arm
	.fpu softvfp
	.type	merge_sorted_arrays, %function
merge_sorted_arrays:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-8]
	b	.L2
.L6:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-32]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L3
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	str	r2, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	b	.L4
.L3:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
.L4:
	ldr	r2, [fp, #-12]
	add	r1, r2, #1
	str	r1, [fp, #-12]
	lsl	r2, r2, #2
	ldr	r1, [fp, #-8]
	add	r2, r1, r2
	str	r3, [r2]
.L2:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bcs	.L7
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bcc	.L6
	b	.L7
.L8:
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	str	r2, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	add	r1, r3, #1
	str	r1, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
.L7:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bcc	.L8
	b	.L9
.L10:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	add	r1, r3, #1
	str	r1, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
.L9:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bcc	.L10
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	merge_sorted_arrays, .-merge_sorted_arrays
	.section	.rodata
	.align	2
.LC2:
	.ascii	"\012 The new array after merging the two arrays is "
	.ascii	"...\000"
	.align	2
.LC3:
	.ascii	"%d \000"
	.align	2
.LC0:
	.word	2
	.word	7
	.word	8
	.word	12
	.align	2
.LC1:
	.word	-1
	.word	0
	.word	10
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L17+4
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r2, .L17+8
	sub	r3, fp, #36
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	sub	r3, fp, #36
	str	r3, [fp, #-48]
	sub	r3, fp, #24
	str	r3, [fp, #-44]
	mov	r3, #4
	ldr	r2, [fp, #-44]
	mov	r1, #3
	ldr	r0, [fp, #-48]
	bl	merge_sorted_arrays
	str	r0, [fp, #-40]
	ldr	r0, .L17+12
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L13
.L14:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L17+16
	bl	printf
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L13:
	ldr	r3, [fp, #-52]
	cmp	r3, #6
	bls	.L14
	mov	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
