	.file	"1005296.c"
	.intel_syntax noprefix
	.text
	.globl	InitStack
	.type	InitStack, @function
InitStack:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	add	rax, rax
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rax
	add	rax, rdx
	mov	WORD PTR [rax], 0
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L3
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	InitStack, .-InitStack
	.section	.rodata
.LC0:
	.string	"Stack is full"
	.text
	.globl	PushStack
	.type	PushStack, @function
PushStack:
.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, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, edx
	mov	DWORD PTR -24[rbp], ecx
	mov	WORD PTR -20[rbp], ax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -24[rbp], eax
	jg	.L5
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L4
.L5:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, WORD PTR -20[rbp]
	mov	WORD PTR [rdx], ax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	PushStack, .-PushStack
	.section	.rodata
.LC1:
	.string	"Stack is empty"
	.text
	.globl	PopStack
	.type	PopStack, @function
PopStack:
.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	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jg	.L8
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rax, rax
	lea	rdx, -2[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	edx, WORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	WORD PTR [rax], dx
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rax, rax
	lea	rdx, -2[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	PopStack, .-PopStack
	.section	.rodata
.LC2:
	.string	"Maximum stack size? : "
.LC3:
	.string	"%d"
	.align 8
.LC4:
	.string	"Init stack (default value : 0)"
.LC5:
	.string	"%dth item : %d\n"
.LC6:
	.string	"Current Position : %d\n"
	.align 8
.LC7:
	.string	"\n1: Print, 2: Push, 3: Pop, 4: End"
.LC8:
	.string	"\nCurrent Stack Status"
.LC9:
	.string	"\nInput value to push : "
.LC10:
	.string	"\nPoped value : %d\n"
.LC11:
	.string	"End"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -36[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -36[rbp]
	lea	rcx, -32[rbp]
	lea	rax, -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	InitStack
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L11
.L12:
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cwde
	mov	edx, DWORD PTR -20[rbp]
	lea	ecx, 1[rdx]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -20[rbp], 1
.L11:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L12
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L20:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 1
	jne	.L13
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L14
.L15:
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	cwde
	mov	edx, DWORD PTR -20[rbp]
	lea	ecx, 1[rdx]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -20[rbp], 1
.L14:
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L15
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L20
.L13:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 2
	jne	.L17
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	ecx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -28[rbp]
	movsx	edx, ax
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, -32[rbp]
	mov	rdi, rax
	call	PushStack
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L20
.L17:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 3
	jne	.L22
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, -38[rbp]
	lea	rcx, -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	PopStack
	movzx	eax, WORD PTR -38[rbp]
	cwde
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	WORD PTR -38[rbp], 0
	jmp	.L20
.L22:
	nop
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	"1005296.c"
	.text
	.align	2
	.global	InitStack
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitStack, %function
InitStack:
	@ 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]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #1
	add	r3, r2, r3
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-20]
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	InitStack, .-InitStack
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Stack is full\000"
	.text
	.align	2
	.global	PushStack
	.syntax unified
	.arm
	.fpu softvfp
	.type	PushStack, %function
PushStack:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r3, [fp, #-20]
	mov	r3, r2	@ movhi
	strh	r3, [fp, #-14]	@ movhi
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bgt	.L5
	ldr	r0, .L7
	bl	puts
	b	.L4
.L5:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrh	r2, [fp, #-14]	@ movhi
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-12]
	str	r2, [r3]
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.size	PushStack, .-PushStack
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Stack is empty\000"
	.text
	.align	2
	.global	PopStack
	.syntax unified
	.arm
	.fpu softvfp
	.type	PopStack, %function
PopStack:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L10
	ldr	r0, .L12
	bl	puts
	b	.L9
.L10:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r3, r3, #-2147483647
	lsl	r3, r3, #1
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrsh	r2, [r3]
	ldr	r3, [fp, #-16]
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r3, r3, #-2147483647
	lsl	r3, r3, #1
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-12]
	str	r2, [r3]
.L9:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC1
	.size	PopStack, .-PopStack
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Maximum stack size? : \000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"Init stack (default value : 0)\000"
	.align	2
.LC5:
	.ascii	"%dth item : %d\012\000"
	.align	2
.LC6:
	.ascii	"Current Position : %d\012\000"
	.align	2
.LC7:
	.ascii	"\0121: Print, 2: Push, 3: Pop, 4: End\000"
	.align	2
.LC8:
	.ascii	"\012Current Stack Status\000"
	.align	2
.LC9:
	.ascii	"\012Input value to push : \000"
	.align	2
.LC10:
	.ascii	"\012Poped value : %d\012\000"
	.align	2
.LC11:
	.ascii	"End\000"
	.align	2
.LC12:
	.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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L27+4
	bl	printf
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L27+8
	bl	__isoc99_scanf
	ldr	r2, [fp, #-28]
	sub	r1, fp, #24
	sub	r3, fp, #32
	mov	r0, r3
	bl	InitStack
	ldr	r0, .L27+12
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L15
.L16:
	ldr	r3, [fp, #-12]
	add	r1, r3, #1
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r0, .L27+16
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L15:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L16
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L27+20
	bl	printf
.L24:
	ldr	r0, .L27+24
	bl	puts
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L27+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L17
	ldr	r0, .L27+28
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L18
.L19:
	ldr	r3, [fp, #-12]
	add	r1, r3, #1
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r0, .L27+16
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L18:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L19
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L27+20
	bl	printf
	b	.L24
.L17:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L21
	ldr	r0, .L27+32
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L27+8
	bl	__isoc99_scanf
	ldr	r0, [fp, #-32]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r3, [fp, #-28]
	sub	r1, fp, #24
	bl	PushStack
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L27+20
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L24
.L21:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L26
	ldr	r3, [fp, #-32]
	sub	r2, fp, #34
	sub	r1, fp, #24
	mov	r0, r3
	bl	PopStack
	ldrsh	r3, [fp, #-34]
	mov	r1, r3
	ldr	r0, .L27+36
	bl	printf
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L27+20
	bl	printf
	mov	r3, #0
	strh	r3, [fp, #-34]	@ movhi
	b	.L24
.L26:
	nop
	ldr	r3, [fp, #-32]
	mov	r0, r3
	bl	free
	ldr	r0, .L27+40
	bl	puts
	nop
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC12
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
