	.file	"849831.c"
	.intel_syntax noprefix
	.text
	.globl	stack_init
	.type	stack_init, @function
stack_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 80[rax], -1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	stack_init, .-stack_init
	.globl	stack_empty
	.type	stack_empty, @function
stack_empty:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 80[rax]
	cmp	eax, -1
	sete	al
	movzx	eax, al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	stack_empty, .-stack_empty
	.globl	stack_full
	.type	stack_full, @function
stack_full:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 80[rax]
	cmp	eax, 19
	sete	al
	movzx	eax, al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	stack_full, .-stack_full
	.globl	push
	.type	push, @function
push:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	stack_full
	test	eax, eax
	je	.L7
	mov	eax, -1
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 80[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -12[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 80[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 80[rax], edx
	mov	eax, 0
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	stack_empty
	test	eax, eax
	je	.L10
	mov	eax, -1
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 80[rax]
	lea	ecx, -1[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 80[rdx], ecx
	mov	rdx, QWORD PTR -8[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	pop, .-pop
	.globl	stack
	.bss
	.align 32
	.type	stack, @object
	.size	stack, 84
stack:
	.zero	84
	.section	.rodata
.LC0:
	.string	"push 1!"
.LC1:
	.string	"push 2!"
.LC2:
	.string	"push 3!"
.LC3:
	.string	"push 4!"
.LC4:
	.string	"pop:%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.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
	lea	rax, stack[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	stack_init
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	push
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 2
	mov	rdi, rax
	call	push
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 3
	mov	rdi, rax
	call	push
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 4
	mov	rdi, rax
	call	push
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	pop
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	pop
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	pop
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	pop
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.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	"849831.c"
	.text
	.align	2
	.global	stack_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	stack_init, %function
stack_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mvn	r2, #0
	str	r2, [r3, #80]
	nop
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	stack_init, .-stack_init
	.align	2
	.global	stack_empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	stack_empty, %function
stack_empty:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #80]
	cmn	r3, #1
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	stack_empty, .-stack_empty
	.align	2
	.global	stack_full
	.syntax unified
	.arm
	.fpu softvfp
	.type	stack_full, %function
stack_full:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #80]
	cmp	r3, #19
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	stack_full, .-stack_full
	.align	2
	.global	push
	.syntax unified
	.arm
	.fpu softvfp
	.type	push, %function
push:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	stack_full
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	mvn	r3, #0
	b	.L8
.L7:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #80]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #80]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #80]
	mov	r3, #0
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	push, .-push
	.align	2
	.global	pop
	.syntax unified
	.arm
	.fpu softvfp
	.type	pop, %function
pop:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	stack_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	mvn	r3, #0
	b	.L11
.L10:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #80]
	sub	r1, r3, #1
	ldr	r2, [fp, #-8]
	str	r1, [r2, #80]
	ldr	r2, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	pop, .-pop
	.comm	stack,84,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"push 1!\000"
	.align	2
.LC1:
	.ascii	"push 2!\000"
	.align	2
.LC2:
	.ascii	"push 3!\000"
	.align	2
.LC3:
	.ascii	"push 4!\000"
	.align	2
.LC4:
	.ascii	"pop:%d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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	r3, .L14
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	stack_init
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	push
	ldr	r0, .L14+4
	bl	puts
	mov	r1, #2
	ldr	r0, [fp, #-8]
	bl	push
	ldr	r0, .L14+8
	bl	puts
	mov	r1, #3
	ldr	r0, [fp, #-8]
	bl	push
	ldr	r0, .L14+12
	bl	puts
	mov	r1, #4
	ldr	r0, [fp, #-8]
	bl	push
	ldr	r0, .L14+16
	bl	puts
	ldr	r0, [fp, #-8]
	bl	pop
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r0, [fp, #-8]
	bl	pop
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r0, [fp, #-8]
	bl	pop
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r0, [fp, #-8]
	bl	pop
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	stack
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
