	.file	"878672.c"
	.intel_syntax noprefix
	.text
	.globl	stack
	.bss
	.align 8
	.type	stack, @object
	.size	stack, 10
stack:
	.zero	10
	.globl	top_ptr
	.align 8
	.type	top_ptr, @object
	.size	top_ptr, 8
top_ptr:
	.zero	8
	.section	.rodata
.LC0:
	.string	"Enter parentheses or braces: "
.LC1:
	.string	"Unmatched braces/parantheses."
.LC2:
	.string	"Nested properly."
	.align 8
.LC3:
	.string	"Closing braces/parenthesis missing."
	.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
	mov	BYTE PTR -2[rbp], 0
	call	clear
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L10:
	movsx	eax, BYTE PTR -1[rbp]
	cmp	eax, 125
	je	.L3
	cmp	eax, 125
	jg	.L2
	cmp	eax, 123
	je	.L4
	cmp	eax, 123
	jg	.L2
	cmp	eax, 93
	je	.L5
	cmp	eax, 93
	jg	.L2
	cmp	eax, 91
	je	.L4
	cmp	eax, 91
	jg	.L2
	cmp	eax, 40
	je	.L4
	cmp	eax, 41
	je	.L6
	jmp	.L2
.L4:
	movsx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	push
	jmp	.L2
.L6:
	call	pop
	cmp	al, 40
	je	.L2
	mov	BYTE PTR -2[rbp], 1
	jmp	.L2
.L5:
	call	pop
	cmp	al, 91
	je	.L2
	mov	BYTE PTR -2[rbp], 1
	jmp	.L2
.L3:
	call	pop
	cmp	al, 123
	je	.L15
	mov	BYTE PTR -2[rbp], 1
.L15:
	nop
.L2:
	call	getchar@PLT
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], 10
	jne	.L10
	cmp	BYTE PTR -2[rbp], 0
	je	.L11
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L12
.L11:
	call	is_empty
	test	al, al
	je	.L13
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L12
.L13:
	lea	rdi, .LC3[rip]
	call	puts@PLT
.L12:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	push
	.type	push, @function
push:
.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, 16
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	call	is_full
	test	al, al
	je	.L17
	call	stack_overflow
.L17:
	mov	rax, QWORD PTR top_ptr[rip]
	lea	rdx, 1[rax]
	mov	QWORD PTR top_ptr[rip], rdx
	movzx	edx, BYTE PTR -4[rbp]
	mov	BYTE PTR [rax], dl
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB8:
	.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	.L19
	call	stack_underflow
.L19:
	mov	rax, QWORD PTR top_ptr[rip]
	sub	rax, 1
	mov	QWORD PTR top_ptr[rip], rax
	mov	rax, QWORD PTR top_ptr[rip]
	movzx	eax, BYTE PTR [rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pop, .-pop
	.globl	clear
	.type	clear, @function
clear:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rax, stack[rip]
	mov	QWORD PTR top_ptr[rip], rax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	clear, .-clear
	.globl	is_empty
	.type	is_empty, @function
is_empty:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR top_ptr[rip]
	lea	rdx, stack[rip]
	cmp	rax, rdx
	sete	al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	is_empty, .-is_empty
	.globl	is_full
	.type	is_full, @function
is_full:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR top_ptr[rip]
	lea	rdx, stack[rip+10]
	cmp	rax, rdx
	sete	al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	is_full, .-is_full
	.section	.rodata
.LC4:
	.string	"Stack underflow; Exit 1"
	.text
	.globl	stack_underflow
	.type	stack_underflow, @function
stack_underflow:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE12:
	.size	stack_underflow, .-stack_underflow
	.section	.rodata
.LC5:
	.string	"Stack overflow; Exit 1"
	.text
	.globl	stack_overflow
	.type	stack_overflow, @function
stack_overflow:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE13:
	.size	stack_overflow, .-stack_overflow
	.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	"878672.c"
	.text
	.comm	stack,10,4
	.comm	top_ptr,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter parentheses or braces: \000"
	.align	2
.LC1:
	.ascii	"Unmatched braces/parantheses.\000"
	.align	2
.LC2:
	.ascii	"Nested properly.\000"
	.align	2
.LC3:
	.ascii	"Closing braces/parenthesis missing.\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
	mov	r3, #0
	strb	r3, [fp, #-6]
	bl	clear
	ldr	r0, .L16
	bl	printf
	b	.L2
.L10:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #125
	beq	.L3
	cmp	r3, #125
	bgt	.L2
	cmp	r3, #123
	beq	.L4
	cmp	r3, #123
	bgt	.L2
	cmp	r3, #93
	beq	.L5
	cmp	r3, #93
	bgt	.L2
	cmp	r3, #91
	beq	.L4
	cmp	r3, #91
	bgt	.L2
	cmp	r3, #40
	beq	.L4
	cmp	r3, #41
	beq	.L6
	b	.L2
.L4:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	push
	b	.L2
.L6:
	bl	pop
	mov	r3, r0
	cmp	r3, #40
	beq	.L2
	mov	r3, #1
	strb	r3, [fp, #-6]
	b	.L2
.L5:
	bl	pop
	mov	r3, r0
	cmp	r3, #91
	beq	.L2
	mov	r3, #1
	strb	r3, [fp, #-6]
	b	.L2
.L3:
	bl	pop
	mov	r3, r0
	cmp	r3, #123
	beq	.L15
	mov	r3, #1
	strb	r3, [fp, #-6]
.L15:
	nop
.L2:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L10
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L11
	ldr	r0, .L16+4
	bl	puts
	b	.L12
.L11:
	bl	is_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	ldr	r0, .L16+8
	bl	puts
	b	.L12
.L13:
	ldr	r0, .L16+12
	bl	puts
.L12:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.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	.L19
	bl	stack_overflow
.L19:
	ldr	r3, .L20
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L20
	str	r2, [r1]
	ldrb	r2, [fp, #-5]
	strb	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	top_ptr
	.size	push, .-push
	.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	.L23
	bl	stack_underflow
.L23:
	ldr	r3, .L25
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L25
	str	r3, [r2]
	ldr	r3, .L25
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	top_ptr
	.size	pop, .-pop
	.align	2
	.global	clear
	.syntax unified
	.arm
	.fpu softvfp
	.type	clear, %function
clear:
	@ 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, .L28
	ldr	r2, .L28+4
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L29:
	.align	2
.L28:
	.word	top_ptr
	.word	stack
	.size	clear, .-clear
	.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, .L32
	ldr	r3, [r3]
	ldr	r2, .L32+4
	cmp	r3, r2
	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
.L33:
	.align	2
.L32:
	.word	top_ptr
	.word	stack
	.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, .L36
	ldr	r3, [r3]
	ldr	r2, .L36+4
	cmp	r3, r2
	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
.L37:
	.align	2
.L36:
	.word	top_ptr
	.word	stack+10
	.size	is_full, .-is_full
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Stack underflow; Exit 1\000"
	.text
	.align	2
	.global	stack_underflow
	.syntax unified
	.arm
	.fpu softvfp
	.type	stack_underflow, %function
stack_underflow:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L39
	bl	puts
	mov	r0, #1
	bl	exit
.L40:
	.align	2
.L39:
	.word	.LC4
	.size	stack_underflow, .-stack_underflow
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Stack overflow; Exit 1\000"
	.text
	.align	2
	.global	stack_overflow
	.syntax unified
	.arm
	.fpu softvfp
	.type	stack_overflow, %function
stack_overflow:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L42
	bl	puts
	mov	r0, #1
	bl	exit
.L43:
	.align	2
.L42:
	.word	.LC5
	.size	stack_overflow, .-stack_overflow
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
