	.file	"890682.c"
	.intel_syntax noprefix
	.text
	.local	bufp
	.comm	bufp,4,4
	.local	buffer
	.comm	buffer,4000,32
	.globl	keytabs
	.section	.rodata
.LC0:
	.string	"auto"
.LC1:
	.string	"break"
.LC2:
	.string	"case"
.LC3:
	.string	"char"
.LC4:
	.string	"const"
.LC5:
	.string	"continue"
.LC6:
	.string	"default"
.LC7:
	.string	"for"
.LC8:
	.string	"int"
.LC9:
	.string	"unsigned"
.LC10:
	.string	"void"
.LC11:
	.string	"volatile"
.LC12:
	.string	"while"
	.section	.data.rel.local,"aw"
	.align 32
	.type	keytabs, @object
	.size	keytabs, 208
keytabs:
	.quad	.LC0
	.long	0
	.zero	4
	.quad	.LC1
	.long	0
	.zero	4
	.quad	.LC2
	.long	0
	.zero	4
	.quad	.LC3
	.long	0
	.zero	4
	.quad	.LC4
	.long	0
	.zero	4
	.quad	.LC5
	.long	0
	.zero	4
	.quad	.LC6
	.long	0
	.zero	4
	.quad	.LC7
	.long	0
	.zero	4
	.quad	.LC8
	.long	0
	.zero	4
	.quad	.LC9
	.long	0
	.zero	4
	.quad	.LC10
	.long	0
	.zero	4
	.quad	.LC11
	.long	0
	.zero	4
	.quad	.LC12
	.long	0
	.zero	4
	.section	.rodata
.LC13:
	.string	"%s:%d\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
	add	rsp, -128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -120[rbp], 0
	jmp	.L2
.L3:
	lea	rax, -112[rbp]
	lea	rsi, keytabs[rip]
	mov	rdi, rax
	call	binsearch
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	DWORD PTR 8[rax], edx
.L2:
	lea	rax, -112[rbp]
	mov	esi, 100
	mov	rdi, rax
	call	getword
	cmp	eax, -1
	jne	.L3
	lea	rax, keytabs[rip]
	mov	QWORD PTR -120[rbp], rax
	mov	DWORD PTR -124[rbp], 0
	jmp	.L4
.L5:
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	add	QWORD PTR -120[rbp], 16
	add	DWORD PTR -124[rbp], 1
.L4:
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, 12
	jbe	.L5
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.type	getword, @function
getword:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	nop
.L9:
	call	__ctype_b_loc@PLT
	mov	rbx, QWORD PTR [rax]
	mov	eax, 0
	call	getch
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, rax
	add	rax, rbx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L9
	cmp	DWORD PTR -20[rbp], -1
	je	.L10
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	mov	edx, DWORD PTR -20[rbp]
	mov	BYTE PTR [rax], dl
.L10:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 1024
	test	eax, eax
	jne	.L13
	mov	rax, QWORD PTR -40[rbp]
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -20[rbp]
	jmp	.L12
.L16:
	call	__ctype_b_loc@PLT
	mov	rbx, QWORD PTR [rax]
	mov	eax, 0
	call	getch
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rbx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8
	test	eax, eax
	jne	.L14
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	ungetch
	jmp	.L15
.L14:
	add	QWORD PTR -40[rbp], 1
.L13:
	sub	DWORD PTR -44[rbp], 1
	cmp	DWORD PTR -44[rbp], 0
	jg	.L16
.L15:
	mov	rax, QWORD PTR -40[rbp]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
.L12:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getword, .-getword
	.type	binsearch, @function
binsearch:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 208
	mov	QWORD PTR -16[rbp], rax
	mov	QWORD PTR -8[rbp], 0
	jmp	.L18
.L22:
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, QWORD PTR -24[rbp]
	sar	rax, 4
	mov	rdx, rax
	shr	rdx, 63
	add	rax, rdx
	sar	rax
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jns	.L19
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L18
.L19:
	cmp	DWORD PTR -28[rbp], 0
	jle	.L20
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	mov	QWORD PTR -24[rbp], rax
	jmp	.L18
.L20:
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L21
.L18:
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jb	.L22
	mov	eax, 0
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	binsearch, .-binsearch
	.type	getch, @function
getch:
.LFB3:
	.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	.L24
	mov	eax, DWORD PTR bufp[rip]
	sub	eax, 1
	mov	DWORD PTR bufp[rip], eax
	mov	eax, DWORD PTR bufp[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, buffer[rip]
	mov	eax, DWORD PTR [rdx+rax]
	jmp	.L26
.L24:
	call	getchar@PLT
.L26:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	getch, .-getch
	.section	.rodata
.LC14:
	.string	"error: buffer overflow"
	.text
	.type	ungetch, @function
ungetch:
.LFB4:
	.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 bufp[rip]
	cmp	eax, 999
	jg	.L28
	mov	eax, DWORD PTR bufp[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR bufp[rip], edx
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, buffer[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	jmp	.L30
.L28:
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
.L30:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	"890682.c"
	.text
	.local	bufp
	.comm	bufp,4,4
	.local	buffer
	.comm	buffer,4000,4
	.global	keytabs
	.section	.rodata
	.align	2
.LC0:
	.ascii	"auto\000"
	.align	2
.LC1:
	.ascii	"break\000"
	.align	2
.LC2:
	.ascii	"case\000"
	.align	2
.LC3:
	.ascii	"char\000"
	.align	2
.LC4:
	.ascii	"const\000"
	.align	2
.LC5:
	.ascii	"continue\000"
	.align	2
.LC6:
	.ascii	"default\000"
	.align	2
.LC7:
	.ascii	"for\000"
	.align	2
.LC8:
	.ascii	"int\000"
	.align	2
.LC9:
	.ascii	"unsigned\000"
	.align	2
.LC10:
	.ascii	"void\000"
	.align	2
.LC11:
	.ascii	"volatile\000"
	.align	2
.LC12:
	.ascii	"while\000"
	.data
	.align	2
	.type	keytabs, %object
	.size	keytabs, 104
keytabs:
	.word	.LC0
	.word	0
	.word	.LC1
	.word	0
	.word	.LC2
	.word	0
	.word	.LC3
	.word	0
	.word	.LC4
	.word	0
	.word	.LC5
	.word	0
	.word	.LC6
	.word	0
	.word	.LC7
	.word	0
	.word	.LC8
	.word	0
	.word	.LC9
	.word	0
	.word	.LC10
	.word	0
	.word	.LC11
	.word	0
	.word	.LC12
	.word	0
	.section	.rodata
	.align	2
.LC13:
	.ascii	"%s:%d\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-116]
	b	.L2
.L3:
	sub	r3, fp, #108
	ldr	r1, .L8+4
	mov	r0, r3
	bl	binsearch
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-116]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-116]
	str	r2, [r3, #4]
.L2:
	sub	r3, fp, #108
	mov	r1, #100
	mov	r0, r3
	bl	getword
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r3, .L8+4
	str	r3, [fp, #-116]
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L4
.L5:
	ldr	r3, [fp, #-116]
	ldr	r1, [r3]
	ldr	r3, [fp, #-116]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r0, .L8+8
	bl	printf
	ldr	r3, [fp, #-116]
	add	r3, r3, #8
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L4:
	ldr	r3, [fp, #-112]
	cmp	r3, #12
	bls	.L5
	mov	r3, #0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC14
	.word	keytabs
	.word	.LC13
	.size	main, .-main
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getword, %function
getword:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	nop
.L11:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r4, [r3]
	bl	getch
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #1
	add	r3, r4, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	beq	.L12
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	str	r2, [fp, #-24]
	ldr	r2, [fp, #-16]
	and	r2, r2, #255
	strb	r2, [r3]
.L12:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #1024
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-24]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	b	.L14
.L18:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r4, [r3]
	bl	getch
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-24]
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r4, r3
	ldrh	r3, [r3]
	and	r3, r3, #8
	cmp	r3, #0
	bne	.L16
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	ungetch
	b	.L17
.L16:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L15:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bgt	.L18
.L17:
	ldr	r3, [fp, #-24]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
.L14:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	getword, .-getword
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	binsearch, %function
binsearch:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	add	r3, r3, #104
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L20
.L24:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	asr	r3, r3, #3
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	lsl	r3, r3, #3
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	strcmp
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L21
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
	b	.L20
.L21:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L22
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	str	r3, [fp, #-20]
	b	.L20
.L22:
	ldr	r3, [fp, #-12]
	b	.L23
.L20:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bcc	.L24
	mov	r3, #0
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	binsearch, .-binsearch
	.align	2
	.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, .L29
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L26
	ldr	r3, .L29
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L29
	str	r3, [r2]
	ldr	r3, .L29
	ldr	r3, [r3]
	ldr	r2, .L29+4
	ldr	r3, [r2, r3, lsl #2]
	b	.L28
.L26:
	bl	getchar
	mov	r3, r0
.L28:
	mov	r0, r3
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	bufp
	.word	buffer
	.size	getch, .-getch
	.section	.rodata
	.align	2
.LC15:
	.ascii	"error: buffer overflow\000"
	.text
	.align	2
	.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, .L35
	ldr	r3, [r3]
	cmp	r3, #1000
	bge	.L32
	ldr	r3, .L35
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L35
	str	r2, [r1]
	ldr	r1, .L35+4
	ldr	r2, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	b	.L34
.L32:
	ldr	r0, .L35+8
	bl	printf
.L34:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	bufp
	.word	buffer
	.word	.LC15
	.size	ungetch, .-ungetch
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
