	.file	"111933.c"
	.intel_syntax noprefix
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.globl	bufp
	.align 4
	.type	bufp, @object
	.size	bufp, 4
bufp:
	.zero	4
	.text
	.globl	getch
	.type	getch, @function
getch:
.LFB0:
	.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 bufp[rip]
	test	eax, eax
	jle	.L2
	mov	eax, DWORD PTR bufp[rip]
	sub	eax, 1
	mov	DWORD PTR bufp[rip], eax
	mov	eax, DWORD PTR bufp[rip]
	cdqe
	lea	rdx, buf[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	jmp	.L4
.L2:
	call	getchar@PLT
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getch, .-getch
	.section	.rodata
.LC0:
	.string	"BOOMSTACK!"
	.text
	.globl	ungetch
	.type	ungetch, @function
ungetch:
.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, 16
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	mov	eax, DWORD PTR bufp[rip]
	cmp	eax, 100
	jle	.L6
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L7
.L6:
	mov	eax, DWORD PTR bufp[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR bufp[rip], edx
	cdqe
	lea	rcx, buf[rip]
	movzx	edx, BYTE PTR -4[rbp]
	mov	BYTE PTR [rax+rcx], dl
	mov	eax, 0
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	ungetch, .-ungetch
	.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	"111933.c"
	.text
	.comm	buf,100,4
	.global	bufp
	.bss
	.align	2
	.type	bufp, %object
	.size	bufp, 4
bufp:
	.space	4
	.text
	.align	2
	.global	getch
	.syntax unified
	.arm
	.fpu softvfp
	.type	getch, %function
getch:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L5
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L2
	ldr	r3, .L5
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L5
	str	r3, [r2]
	ldr	r3, .L5
	ldr	r3, [r3]
	ldr	r2, .L5+4
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	b	.L3
.L2:
	bl	getchar
	mov	r3, r0
	and	r3, r3, #255
.L3:
	mov	r0, r3
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	bufp
	.word	buf
	.size	getch, .-getch
	.section	.rodata
	.align	2
.LC0:
	.ascii	"BOOMSTACK!\000"
	.text
	.align	2
	.global	ungetch
	.syntax unified
	.arm
	.fpu softvfp
	.type	ungetch, %function
ungetch:
	@ 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]
	ldr	r3, .L10
	ldr	r3, [r3]
	cmp	r3, #100
	ble	.L8
	ldr	r0, .L10+4
	bl	printf
	mov	r3, #255
	b	.L9
.L8:
	ldr	r3, .L10
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L10
	str	r2, [r1]
	ldr	r1, .L10+8
	ldrb	r2, [fp, #-5]
	strb	r2, [r1, r3]
	mov	r3, #0
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	bufp
	.word	.LC0
	.word	buf
	.size	ungetch, .-ungetch
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
