	.file	"148577081.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%c\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	call	getch
	mov	BYTE PTR -1[rbp], al
	movsx	eax, BYTE PTR -1[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	movsx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	ungetch
	call	getch
	mov	BYTE PTR -1[rbp], al
	movsx	eax, BYTE PTR -1[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	buf
	.data
	.align 4
	.type	buf, @object
	.size	buf, 4
buf:
	.long	-1
	.text
	.globl	getch
	.type	getch, @function
getch:
.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, DWORD PTR buf[rip]
	cmp	eax, -1
	je	.L4
	mov	eax, DWORD PTR buf[rip]
	mov	BYTE PTR -1[rbp], al
	mov	DWORD PTR buf[rip], -1
	movsx	eax, BYTE PTR -1[rbp]
	jmp	.L5
.L4:
	call	getchar@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getch, .-getch
	.section	.rodata
.LC1:
	.string	"ungetch: buffer full"
	.text
	.globl	ungetch
	.type	ungetch, @function
ungetch:
.LFB2:
	.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	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR buf[rip]
	cmp	eax, -1
	je	.L7
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L9
.L7:
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR buf[rip], eax
.L9:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"148577081.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%c\012\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
	bl	getch
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L3
	bl	printf
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	ungetch
	bl	getch
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L3
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	main, .-main
	.global	buf
	.data
	.align	2
	.type	buf, %object
	.size	buf, 4
buf:
	.word	-1
	.text
	.align	2
	.global	getch
	.syntax unified
	.arm
	.fpu softvfp
	.type	getch, %function
getch:
	@ 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	r3, .L8
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L6
	ldr	r3, .L8
	ldr	r3, [r3]
	strb	r3, [fp, #-5]
	ldr	r3, .L8
	mvn	r2, #0
	str	r2, [r3]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	b	.L7
.L6:
	bl	getchar
	mov	r3, r0
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	buf
	.size	getch, .-getch
	.section	.rodata
	.align	2
.LC1:
	.ascii	"ungetch: buffer full\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
	str	r0, [fp, #-8]
	ldr	r3, .L14
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L11
	ldr	r0, .L14+4
	bl	puts
	b	.L13
.L11:
	ldr	r2, .L14
	ldr	r3, [fp, #-8]
	str	r3, [r2]
.L13:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	buf
	.word	.LC1
	.size	ungetch, .-ungetch
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
