	.file	"467585.c"
	.intel_syntax noprefix
	.text
	.globl	contents
	.bss
	.align 32
	.type	contents, @object
	.size	contents, 100
contents:
	.zero	100
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"Enter a series of parantheses: "
	.align 8
.LC1:
	.string	"The braces aren't nested properly."
	.align 8
.LC2:
	.string	"The braces are nested properly, congrats."
	.text
	.globl	main
	.type	main, @function
main:
.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, 16
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	mov	BYTE PTR -1[rbp], al
	jmp	.L2
.L16:
	cmp	BYTE PTR -1[rbp], 123
	je	.L3
	cmp	BYTE PTR -1[rbp], 91
	je	.L3
	cmp	BYTE PTR -1[rbp], 40
	je	.L3
	cmp	BYTE PTR -1[rbp], 125
	je	.L3
	cmp	BYTE PTR -1[rbp], 93
	je	.L3
	cmp	BYTE PTR -1[rbp], 41
	jne	.L19
.L3:
	movsx	eax, BYTE PTR -1[rbp]
	cmp	eax, 125
	je	.L5
	cmp	eax, 125
	jg	.L20
	cmp	eax, 123
	je	.L7
	cmp	eax, 123
	jg	.L20
	cmp	eax, 93
	je	.L8
	cmp	eax, 93
	jg	.L20
	cmp	eax, 91
	je	.L9
	cmp	eax, 91
	jg	.L20
	cmp	eax, 40
	je	.L10
	cmp	eax, 41
	je	.L11
	jmp	.L20
.L7:
	movsx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	push
	jmp	.L4
.L5:
	call	pop
	cmp	al, 123
	je	.L21
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L13
.L10:
	movsx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	push
	jmp	.L4
.L11:
	call	pop
	cmp	al, 40
	je	.L22
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L13
.L9:
	movsx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	push
	jmp	.L4
.L8:
	call	pop
	cmp	al, 91
	je	.L23
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L13
.L19:
	nop
	jmp	.L4
.L20:
	nop
	jmp	.L4
.L21:
	nop
	jmp	.L4
.L22:
	nop
	jmp	.L4
.L23:
	nop
.L4:
	call	getchar@PLT
	mov	BYTE PTR -1[rbp], al
.L2:
	cmp	BYTE PTR -1[rbp], 10
	jne	.L16
	call	is_empty
	test	al, al
	je	.L17
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L18
.L17:
	lea	rdi, .LC1[rip]
	call	puts@PLT
.L18:
	mov	eax, 0
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	make_empty
	.type	make_empty, @function
make_empty:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR top[rip], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	make_empty, .-make_empty
	.globl	is_empty
	.type	is_empty, @function
is_empty:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR top[rip]
	test	eax, eax
	sete	al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	is_empty, .-is_empty
	.globl	is_full
	.type	is_full, @function
is_full:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR top[rip]
	cmp	eax, 100
	sete	al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	is_full, .-is_full
	.section	.rodata
.LC3:
	.string	"The stack is overflowing"
	.text
	.globl	push
	.type	push, @function
push:
.LFB10:
	.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	eax, edi
	mov	BYTE PTR -4[rbp], al
	call	is_full
	test	al, al
	je	.L30
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L32
.L30:
	mov	eax, DWORD PTR top[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR top[rip], edx
	cdqe
	lea	rcx, contents[rip]
	movzx	edx, BYTE PTR -4[rbp]
	mov	BYTE PTR [rax+rcx], dl
.L32:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	push, .-push
	.section	.rodata
.LC4:
	.string	"The stack is underflowing"
	.text
	.globl	pop
	.type	pop, @function
pop:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	is_empty
	test	al, al
	je	.L34
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L33
.L34:
	mov	eax, DWORD PTR top[rip]
	sub	eax, 1
	mov	DWORD PTR top[rip], eax
	mov	eax, DWORD PTR top[rip]
	cdqe
	lea	rdx, contents[rip]
	movzx	eax, BYTE PTR [rax+rdx]
.L33:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	pop, .-pop
	.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	"467585.c"
	.text
	.comm	contents,100,4
	.global	top
	.bss
	.align	2
	.type	top, %object
	.size	top, 4
top:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter a series of parantheses: \000"
	.align	2
.LC1:
	.ascii	"The braces aren't nested properly.\000"
	.align	2
.LC2:
	.ascii	"The braces are nested properly, congrats.\000"
	.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	r0, .L24
	bl	printf
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-5]
	b	.L2
.L16:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #123
	beq	.L3
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #91
	beq	.L3
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #40
	beq	.L3
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #125
	beq	.L3
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #93
	beq	.L3
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #41
	bne	.L19
.L3:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #125
	beq	.L5
	cmp	r3, #125
	bgt	.L20
	cmp	r3, #123
	beq	.L7
	cmp	r3, #123
	bgt	.L20
	cmp	r3, #93
	beq	.L8
	cmp	r3, #93
	bgt	.L20
	cmp	r3, #91
	beq	.L9
	cmp	r3, #91
	bgt	.L20
	cmp	r3, #40
	beq	.L10
	cmp	r3, #41
	beq	.L11
	b	.L20
.L7:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	push
	b	.L4
.L5:
	bl	pop
	mov	r3, r0
	cmp	r3, #123
	beq	.L21
	ldr	r0, .L24+4
	bl	puts
	mov	r3, #1
	b	.L13
.L10:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	push
	b	.L4
.L11:
	bl	pop
	mov	r3, r0
	cmp	r3, #40
	beq	.L22
	ldr	r0, .L24+4
	bl	puts
	mov	r3, #1
	b	.L13
.L9:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	push
	b	.L4
.L8:
	bl	pop
	mov	r3, r0
	cmp	r3, #91
	beq	.L23
	ldr	r0, .L24+4
	bl	puts
	mov	r3, #1
	b	.L13
.L19:
	nop
	b	.L4
.L20:
	nop
	b	.L4
.L21:
	nop
	b	.L4
.L22:
	nop
	b	.L4
.L23:
	nop
.L4:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-5]
.L2:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L16
	bl	is_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	ldr	r0, .L24+8
	bl	puts
	b	.L18
.L17:
	ldr	r0, .L24+4
	bl	puts
.L18:
	mov	r3, #0
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	make_empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_empty, %function
make_empty:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L27
	mov	r2, #0
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L28:
	.align	2
.L27:
	.word	top
	.size	make_empty, .-make_empty
	.align	2
	.global	is_empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_empty, %function
is_empty:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L31
	ldr	r3, [r3]
	cmp	r3, #0
	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
.L32:
	.align	2
.L31:
	.word	top
	.size	is_empty, .-is_empty
	.align	2
	.global	is_full
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_full, %function
is_full:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L35
	ldr	r3, [r3]
	cmp	r3, #100
	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
.L36:
	.align	2
.L35:
	.word	top
	.size	is_full, .-is_full
	.section	.rodata
	.align	2
.LC3:
	.ascii	"The stack is overflowing\000"
	.text
	.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
	mov	r3, r0
	strb	r3, [fp, #-5]
	bl	is_full
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	ldr	r0, .L41
	bl	puts
	b	.L40
.L38:
	ldr	r3, .L41+4
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L41+4
	str	r2, [r1]
	ldr	r1, .L41+8
	ldrb	r2, [fp, #-5]
	strb	r2, [r1, r3]
.L40:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC3
	.word	top
	.word	contents
	.size	push, .-push
	.section	.rodata
	.align	2
.LC4:
	.ascii	"The stack is underflowing\000"
	.text
	.align	2
	.global	pop
	.syntax unified
	.arm
	.fpu softvfp
	.type	pop, %function
pop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	is_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L44
	ldr	r0, .L47
	bl	puts
	b	.L43
.L44:
	ldr	r3, .L47+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L47+4
	str	r3, [r2]
	ldr	r3, .L47+4
	ldr	r3, [r3]
	ldr	r2, .L47+8
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
.L43:
	mov	r0, r3
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC4
	.word	top
	.word	contents
	.size	pop, .-pop
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
