	.file	"507079.c"
	.intel_syntax noprefix
	.text
	.globl	top
	.bss
	.align 8
	.type	top, @object
	.size	top, 8
top:
	.zero	8
	.text
	.globl	new_node
	.type	new_node, @function
new_node:
.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	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	new_node, .-new_node
	.globl	isempty
	.type	isempty, @function
isempty:
.LFB7:
	.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[rip]
	test	rax, rax
	jne	.L4
	mov	eax, 1
	jmp	.L5
.L4:
	mov	eax, 0
.L5:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	isempty, .-isempty
	.section	.rodata
.LC0:
	.string	"\nPush not possible"
.LC1:
	.string	"%c pushed to stack\n"
	.text
	.globl	push
	.type	push, @function
push:
.LFB8:
	.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	eax, edi
	mov	BYTE PTR -20[rbp], al
	mov	eax, 0
	call	new_node
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L7
	lea	rdi, .LC0[rip]
	call	puts@PLT
.L7:
	mov	eax, 0
	call	isempty
	test	eax, eax
	je	.L8
	mov	rax, QWORD PTR -8[rbp]
	movzx	edx, BYTE PTR -20[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR top[rip], rax
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -8[rbp]
	movzx	edx, BYTE PTR -20[rbp]
	mov	BYTE PTR [rax], dl
	mov	rdx, QWORD PTR top[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR top[rip], rax
.L9:
	movsx	eax, BYTE PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	push, .-push
	.section	.rodata
	.align 8
.LC2:
	.string	"\n**Stack already empty but string not fully read**"
.LC3:
	.string	"%c popped from stack\n"
	.text
	.globl	pop
	.type	pop, @function
pop:
.LFB9:
	.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, 0
	call	isempty
	test	eax, eax
	je	.L11
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L12
.L11:
	mov	rax, QWORD PTR top[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR top[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR top[rip], rax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -8[rbp], 0
	mov	eax, 1
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	pop, .-pop
	.section	.rodata
.LC4:
	.string	"\n%c is scanned\n"
	.align 8
.LC5:
	.string	"\n**Unknown character %c read**\n"
	.align 8
.LC6:
	.string	"\n**String fully read**\n\n**Stack is empty**"
	.text
	.globl	pda
	.type	pda, @function
pda:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L14
.L20:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 48
	je	.L15
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 49
	je	.L15
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L16
.L15:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 48
	jne	.L17
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	push
	jmp	.L18
.L17:
	mov	eax, 0
	call	pop
	test	eax, eax
	je	.L22
.L18:
	add	DWORD PTR -4[rbp], 1
.L14:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L20
	jmp	.L19
.L22:
	nop
.L19:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L21
	mov	eax, 0
	call	isempty
	test	eax, eax
	je	.L21
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L16
.L21:
	mov	eax, 0
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pda, .-pda
	.section	.rodata
.LC7:
	.string	"***Pushdown Automaton***"
	.align 8
.LC8:
	.string	"Which accepts input string of form 0^n1^n(n>=1)"
	.align 8
.LC9:
	.string	"by empty stack method of acceptance\n"
.LC10:
	.string	"Enter string: "
.LC11:
	.string	"%s"
	.align 8
.LC12:
	.string	"\nString %s is ACCEPTED by pda\n"
	.align 8
.LC13:
	.string	"\nString %s is NOT ACCEPTED by pda\n"
.LC14:
	.string	"\nExit? (y/N): "
.LC15:
	.string	" %c"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 288
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
.L26:
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	pda
	test	eax, eax
	je	.L24
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L25
.L24:
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L25:
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -273[rbp]
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 10
	call	putchar@PLT
	movzx	eax, BYTE PTR -273[rbp]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	cmp	eax, 89
	jne	.L26
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"507079.c"
	.text
	.global	top
	.bss
	.align	2
	.type	top, %object
	.size	top, 4
top:
	.space	4
	.text
	.align	2
	.global	new_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_node, %function
new_node:
	@ 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	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	new_node, .-new_node
	.align	2
	.global	isempty
	.syntax unified
	.arm
	.fpu softvfp
	.type	isempty, %function
isempty:
	@ 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, .L6
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L4
	mov	r3, #1
	b	.L5
.L4:
	mov	r3, #0
.L5:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L7:
	.align	2
.L6:
	.word	top
	.size	isempty, .-isempty
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Push not possible\000"
	.align	2
.LC1:
	.ascii	"%c pushed to stack\012\000"
	.text
	.align	2
	.global	push
	.syntax unified
	.arm
	.fpu softvfp
	.type	push, %function
push:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, r0
	strb	r3, [fp, #-13]
	bl	new_node
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L9
	ldr	r0, .L12
	bl	puts
.L9:
	bl	isempty
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-8]
	ldrb	r2, [fp, #-13]
	strb	r2, [r3]
	ldr	r2, .L12+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	b	.L11
.L10:
	ldr	r3, [fp, #-8]
	ldrb	r2, [fp, #-13]
	strb	r2, [r3]
	ldr	r3, .L12+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r2, .L12+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
.L11:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L12+8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	top
	.word	.LC1
	.size	push, .-push
	.section	.rodata
	.align	2
.LC2:
	.ascii	"\012**Stack already empty but string not fully read"
	.ascii	"**\000"
	.align	2
.LC3:
	.ascii	"%c popped from stack\012\000"
	.text
	.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
	bl	isempty
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L17
	bl	puts
	mov	r3, #0
	b	.L16
.L15:
	ldr	r3, .L17+4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L17+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, .L17+4
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L17+8
	bl	printf
	ldr	r0, [fp, #-8]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #1
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC2
	.word	top
	.word	.LC3
	.size	pop, .-pop
	.section	.rodata
	.align	2
.LC4:
	.ascii	"\012%c is scanned\012\000"
	.align	2
.LC5:
	.ascii	"\012**Unknown character %c read**\012\000"
	.align	2
.LC6:
	.ascii	"\012**String fully read**\012\012**Stack is empty**"
	.ascii	"\000"
	.text
	.align	2
	.global	pda
	.syntax unified
	.arm
	.fpu softvfp
	.type	pda, %function
pda:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L20
.L26:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L29
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #48
	beq	.L21
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #49
	beq	.L21
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L29+4
	bl	printf
	mov	r3, #0
	b	.L22
.L21:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L23
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	push
	b	.L24
.L23:
	bl	pop
	mov	r3, r0
	cmp	r3, #0
	beq	.L28
.L24:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L20:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L26
	b	.L25
.L28:
	nop
.L25:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L27
	bl	isempty
	mov	r3, r0
	cmp	r3, #0
	beq	.L27
	ldr	r0, .L29+8
	bl	puts
	mov	r3, #1
	b	.L22
.L27:
	mov	r3, #0
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	pda, .-pda
	.section	.rodata
	.align	2
.LC7:
	.ascii	"***Pushdown Automaton***\000"
	.align	2
.LC8:
	.ascii	"Which accepts input string of form 0^n1^n(n>=1)\000"
	.align	2
.LC9:
	.ascii	"by empty stack method of acceptance\012\000"
	.align	2
.LC10:
	.ascii	"Enter string: \000"
	.align	2
.LC11:
	.ascii	"%s\000"
	.align	2
.LC12:
	.ascii	"\012String %s is ACCEPTED by pda\012\000"
	.align	2
.LC13:
	.ascii	"\012String %s is NOT ACCEPTED by pda\012\000"
	.align	2
.LC14:
	.ascii	"\012Exit? (y/N): \000"
	.align	2
.LC15:
	.ascii	" %c\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 264
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #264
	ldr	r3, .L36
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L36+4
	bl	puts
	ldr	r0, .L36+8
	bl	puts
	ldr	r0, .L36+12
	bl	puts
.L34:
	ldr	r0, .L36+16
	bl	printf
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L36+20
	bl	__isoc99_scanf
	sub	r3, fp, #264
	mov	r0, r3
	bl	pda
	mov	r3, r0
	cmp	r3, #0
	beq	.L32
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L36+24
	bl	printf
	b	.L33
.L32:
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L36+28
	bl	printf
.L33:
	ldr	r0, .L36+32
	bl	printf
	sub	r3, fp, #264
	sub	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L36+36
	bl	__isoc99_scanf
	mov	r0, #10
	bl	putchar
	ldrb	r3, [fp, #-265]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	cmp	r3, #89
	bne	.L34
	nop
	ldr	r3, .L36
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC16
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
