	.file	"422296.c"
	.intel_syntax noprefix
	.text
	.globl	size
	.bss
	.align 4
	.type	size, @object
	.size	size, 4
size:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Index out of range"
	.text
	.globl	insert
	.type	insert, @function
insert:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	cmp	DWORD PTR -24[rbp], 0
	js	.L2
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jge	.L2
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	DWORD PTR -4[rbp], eax
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	sub	DWORD PTR -4[rbp], 1
.L3:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jg	.L4
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L5
.L2:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	insert, .-insert
	.section	.rodata
.LC1:
	.string	"Enter %d integers:\n"
.LC2:
	.string	"%d"
	.text
	.globl	arr_init
	.type	arr_init, @function
arr_init:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -4[rbp], 1
.L7:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L8
	mov	edi, 10
	call	putchar@PLT
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	arr_init, .-arr_init
	.section	.rodata
.LC3:
	.string	"Input array size: "
.LC4:
	.string	"Original array:\n[ "
.LC5:
	.string	"%d "
.LC6:
	.string	"]"
.LC7:
	.string	"\nArray after insert:\n[ "
.LC8:
	.string	"%d 0 "
	.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
	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
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, size[rip]
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	ecx, DWORD PTR size[rip]
	movsx	rax, ecx
	sub	rax, 1
	mov	QWORD PTR -72[rbp], rax
	movsx	rax, ecx
	mov	r14, rax
	mov	r15d, 0
	movsx	rax, ecx
	mov	r12, rax
	mov	r13d, 0
	movsx	rax, ecx
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rsi, rax
	and	rsi, -4096
	mov	rdx, rsp
	sub	rdx, rsi
.L10:
	cmp	rsp, rdx
	je	.L11
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L10
.L11:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L12
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L12:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -64[rbp], rax
	movsx	rax, ecx
	sal	rax, 2
	shr	rax, 2
	mov	edx, eax
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	arr_init
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -76[rbp], 0
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -76[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -76[rbp], 1
.L13:
	mov	eax, DWORD PTR size[rip]
	cmp	DWORD PTR -76[rbp], eax
	jl	.L14
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	DWORD PTR -80[rbp], 0
	mov	DWORD PTR -84[rbp], 0
	jmp	.L15
.L17:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	DWORD PTR -80[rbp], eax
	jge	.L16
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR -80[rbp], eax
.L16:
	add	DWORD PTR -84[rbp], 1
.L15:
	mov	eax, DWORD PTR size[rip]
	cmp	DWORD PTR -84[rbp], eax
	jl	.L17
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -88[rbp], 0
	jmp	.L18
.L21:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -88[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	DWORD PTR -80[rbp], eax
	jne	.L19
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -88[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L20
.L19:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -88[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L20:
	add	DWORD PTR -88[rbp], 1
.L18:
	mov	eax, DWORD PTR size[rip]
	cmp	DWORD PTR -88[rbp], eax
	jl	.L21
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rsp, rbx
	nop
	mov	rax, QWORD PTR -56[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.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	"422296.c"
	.text
	.comm	size,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Index out of range\000"
	.text
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	blt	.L2
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bge	.L2
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L3
.L4:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bgt	.L4
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	b	.L5
.L2:
	ldr	r0, .L6
	bl	puts
	mov	r0, #1
	bl	exit
.L5:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.size	insert, .-insert
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Enter %d integers:\012\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.text
	.align	2
	.global	arr_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	arr_init, %function
arr_init:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, .L11
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L9
.L10:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L11+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L9:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L10
	mov	r0, #10
	bl	putchar
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC1
	.word	.LC2
	.size	arr_init, .-arr_init
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Input array size: \000"
	.align	2
.LC4:
	.ascii	"Original array:\012[ \000"
	.align	2
.LC5:
	.ascii	"%d \000"
	.align	2
.LC6:
	.ascii	"]\000"
	.align	2
.LC7:
	.ascii	"\012Array after insert:\012[ \000"
	.align	2
.LC8:
	.ascii	"%d 0 \000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r0, .L24+4
	bl	printf
	ldr	r1, .L24+8
	ldr	r0, .L24+12
	bl	__isoc99_scanf
	mov	r0, #10
	bl	putchar
	ldr	r3, .L24+8
	ldr	ip, [r3]
	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]
	mov	r3, ip
	lsl	r3, r3, #2
	lsr	r3, r3, #2
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	arr_init
	ldr	r0, .L24+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L14
.L15:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L24+20
	bl	printf
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L14:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L15
	ldr	r0, .L24+24
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L16
.L18:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-36]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bge	.L17
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-36]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-32]
.L17:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L16:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L18
	ldr	r0, .L24+28
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L19
.L22:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-40]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bne	.L20
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-40]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L24+32
	bl	printf
	b	.L21
.L20:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-40]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L24+20
	bl	printf
.L21:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L19:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L22
	ldr	r0, .L24+24
	bl	puts
	mov	sp, r4
	nop
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC9
	.word	.LC3
	.word	size
	.word	.LC2
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
