	.file	"983980.c"
	.intel_syntax noprefix
	.text
	.globl	check
	.type	check, @function
check:
.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	QWORD PTR -8[rbp], rdi
	jmp	.L2
.L5:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L3
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L4
.L3:
	add	QWORD PTR -8[rbp], 1
.L2:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L5
	mov	rax, QWORD PTR -8[rbp]
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	check, .-check
	.globl	fillbuff
	.type	fillbuff, @function
fillbuff:
.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	QWORD PTR -8[rbp], rdi
	mov	rdx, QWORD PTR stdin[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fillbuff, .-fillbuff
	.section	.rodata
.LC0:
	.string	"\t\n\f\r "
	.text
	.globl	simplescanf
	.type	simplescanf, @function
simplescanf:
.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, 2320
	mov	QWORD PTR -2312[rbp], rdi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L9
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L9:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -2300[rbp], 0
	mov	DWORD PTR -2296[rbp], 0
	mov	DWORD PTR -2292[rbp], 0
	mov	DWORD PTR -2264[rbp], 8
	mov	DWORD PTR -2260[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -2256[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -2248[rbp], rax
	lea	rax, -2240[rbp]
	mov	rdi, rax
	call	fillbuff
	mov	QWORD PTR -2288[rbp], rax
	jmp	.L10
.L29:
	mov	DWORD PTR -2300[rbp], 0
	jmp	.L11
.L13:
	add	QWORD PTR -2312[rbp], 1
	add	DWORD PTR -2292[rbp], 1
.L11:
	mov	rax, QWORD PTR -2312[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L12
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -2312[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L13
.L12:
	mov	rax, QWORD PTR -2312[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L32
	mov	rax, QWORD PTR -2312[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 115
	jne	.L16
	mov	rax, QWORD PTR -2288[rbp]
	mov	rdi, rax
	call	check
	mov	QWORD PTR -2288[rbp], rax
	mov	rax, QWORD PTR -2288[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L17
	lea	rax, -2240[rbp]
	mov	rdi, rax
	call	fillbuff
	mov	QWORD PTR -2288[rbp], rax
	jmp	.L10
.L17:
	mov	eax, DWORD PTR -2264[rbp]
	cmp	eax, 47
	ja	.L18
	mov	rax, QWORD PTR -2248[rbp]
	mov	edx, DWORD PTR -2264[rbp]
	mov	edx, edx
	add	rax, rdx
	mov	edx, DWORD PTR -2264[rbp]
	add	edx, 8
	mov	DWORD PTR -2264[rbp], edx
	jmp	.L19
.L18:
	mov	rax, QWORD PTR -2256[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -2256[rbp], rdx
.L19:
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -2280[rbp], rax
	mov	rax, QWORD PTR -2288[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcspn@PLT
	mov	DWORD PTR -2300[rbp], eax
	mov	eax, DWORD PTR -2300[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -2288[rbp]
	mov	rax, QWORD PTR -2280[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	eax, DWORD PTR -2300[rbp]
	cdqe
	add	QWORD PTR -2288[rbp], rax
	add	DWORD PTR -2296[rbp], 1
	mov	DWORD PTR -2292[rbp], 0
	jmp	.L20
.L16:
	mov	rax, QWORD PTR -2312[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 100
	jne	.L21
	mov	rax, QWORD PTR -2288[rbp]
	mov	rdi, rax
	call	check
	mov	QWORD PTR -2288[rbp], rax
	mov	rax, QWORD PTR -2288[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L22
	lea	rax, -2240[rbp]
	mov	rdi, rax
	call	fillbuff
	mov	QWORD PTR -2288[rbp], rax
	jmp	.L10
.L22:
	mov	eax, DWORD PTR -2264[rbp]
	cmp	eax, 47
	ja	.L23
	mov	rax, QWORD PTR -2248[rbp]
	mov	edx, DWORD PTR -2264[rbp]
	mov	edx, edx
	add	rax, rdx
	mov	edx, DWORD PTR -2264[rbp]
	add	edx, 8
	mov	DWORD PTR -2264[rbp], edx
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -2256[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -2256[rbp], rdx
.L24:
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -2272[rbp], rax
	mov	rax, QWORD PTR -2288[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcspn@PLT
	mov	DWORD PTR -2300[rbp], eax
	mov	eax, DWORD PTR -2300[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -2288[rbp]
	lea	rax, -1216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	lea	rax, -1216[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -2272[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -2300[rbp]
	cdqe
	add	QWORD PTR -2288[rbp], rax
	add	DWORD PTR -2296[rbp], 1
	mov	DWORD PTR -2292[rbp], 0
	jmp	.L20
.L21:
	mov	rax, QWORD PTR -2312[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 99
	jne	.L20
	mov	DWORD PTR -2300[rbp], 1
	cmp	DWORD PTR -2292[rbp], 0
	jle	.L25
	mov	rax, QWORD PTR -2288[rbp]
	mov	rdi, rax
	call	check
	mov	QWORD PTR -2288[rbp], rax
	mov	rax, QWORD PTR -2288[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L25
	lea	rax, -2240[rbp]
	mov	rdi, rax
	call	fillbuff
	mov	QWORD PTR -2288[rbp], rax
	jmp	.L10
.L25:
	mov	eax, DWORD PTR -2264[rbp]
	cmp	eax, 47
	ja	.L26
	mov	rax, QWORD PTR -2248[rbp]
	mov	edx, DWORD PTR -2264[rbp]
	mov	edx, edx
	add	rax, rdx
	mov	edx, DWORD PTR -2264[rbp]
	add	edx, 8
	mov	DWORD PTR -2264[rbp], edx
	jmp	.L27
.L26:
	mov	rax, QWORD PTR -2256[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -2256[rbp], rdx
.L27:
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -2280[rbp], rax
	mov	eax, DWORD PTR -2300[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -2288[rbp]
	mov	rax, QWORD PTR -2280[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	rax, QWORD PTR -2288[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L28
	lea	rax, -2240[rbp]
	mov	rdi, rax
	call	fillbuff
	mov	QWORD PTR -2288[rbp], rax
	mov	DWORD PTR -2300[rbp], 0
.L28:
	mov	eax, DWORD PTR -2300[rbp]
	cdqe
	add	QWORD PTR -2288[rbp], rax
	add	DWORD PTR -2296[rbp], 1
	mov	DWORD PTR -2292[rbp], 0
.L20:
	add	QWORD PTR -2312[rbp], 1
.L10:
	mov	rax, QWORD PTR -2312[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L29
	jmp	.L15
.L32:
	nop
.L15:
	mov	eax, DWORD PTR -2296[rbp]
	mov	rsi, QWORD PTR -184[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	simplescanf, .-simplescanf
	.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	"983980.c"
	.text
	.align	2
	.global	check
	.syntax unified
	.arm
	.fpu softvfp
	.type	check, %function
check:
	@ 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]
	b	.L2
.L5:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-8]
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L5
	ldr	r3, [fp, #-8]
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	check, .-check
	.align	2
	.global	fillbuff
	.syntax unified
	.arm
	.fpu softvfp
	.type	fillbuff, %function
fillbuff:
	@ 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, .L8
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, #1024
	ldr	r0, [fp, #-8]
	bl	fgets
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	stdin
	.size	fillbuff, .-fillbuff
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\011\012\014\015 \000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	simplescanf
	.syntax unified
	.arm
	.fpu softvfp
	.type	simplescanf, %function
simplescanf:
	@ args = 4, pretend = 16, frame = 2088
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2080
	sub	sp, sp, #8
	ldr	r3, [fp, #4]
	str	r3, [fp, #-2088]
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-2076]
	mov	r3, #0
	str	r3, [fp, #-2072]
	mov	r3, #0
	str	r3, [fp, #-2068]
	add	r3, fp, #8
	str	r3, [fp, #-2084]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	fillbuff
	str	r0, [fp, #-2080]
	b	.L11
.L24:
	mov	r3, #0
	str	r3, [fp, #-2076]
	b	.L12
.L14:
	ldr	r3, [fp, #-2088]
	add	r3, r3, #1
	str	r3, [fp, #-2088]
	ldr	r3, [fp, #-2068]
	add	r3, r3, #1
	str	r3, [fp, #-2068]
.L12:
	ldr	r3, [fp, #-2088]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L13
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-2088]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L14
.L13:
	ldr	r3, [fp, #-2088]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L27
	ldr	r3, [fp, #-2088]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #115
	bne	.L17
	ldr	r0, [fp, #-2080]
	bl	check
	str	r0, [fp, #-2080]
	ldr	r3, [fp, #-2080]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L18
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	fillbuff
	str	r0, [fp, #-2080]
	b	.L11
.L18:
	ldr	r3, [fp, #-2084]
	add	r2, r3, #4
	str	r2, [fp, #-2084]
	ldr	r3, [r3]
	str	r3, [fp, #-2064]
	ldr	r1, .L28+4
	ldr	r0, [fp, #-2080]
	bl	strcspn
	mov	r3, r0
	str	r3, [fp, #-2076]
	ldr	r3, [fp, #-2076]
	mov	r2, r3
	ldr	r1, [fp, #-2080]
	ldr	r0, [fp, #-2064]
	bl	strncpy
	ldr	r3, [fp, #-2076]
	ldr	r2, [fp, #-2080]
	add	r3, r2, r3
	str	r3, [fp, #-2080]
	ldr	r3, [fp, #-2072]
	add	r3, r3, #1
	str	r3, [fp, #-2072]
	mov	r3, #0
	str	r3, [fp, #-2068]
	b	.L19
.L17:
	ldr	r3, [fp, #-2088]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #100
	bne	.L20
	ldr	r0, [fp, #-2080]
	bl	check
	str	r0, [fp, #-2080]
	ldr	r3, [fp, #-2080]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L21
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	fillbuff
	str	r0, [fp, #-2080]
	b	.L11
.L21:
	ldr	r3, [fp, #-2084]
	add	r2, r3, #4
	str	r2, [fp, #-2084]
	ldr	r3, [r3]
	str	r3, [fp, #-2060]
	ldr	r1, .L28+4
	ldr	r0, [fp, #-2080]
	bl	strcspn
	mov	r3, r0
	str	r3, [fp, #-2076]
	ldr	r2, [fp, #-2076]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-2080]
	mov	r0, r3
	bl	strncpy
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-2060]
	str	r2, [r3]
	ldr	r3, [fp, #-2076]
	ldr	r2, [fp, #-2080]
	add	r3, r2, r3
	str	r3, [fp, #-2080]
	ldr	r3, [fp, #-2072]
	add	r3, r3, #1
	str	r3, [fp, #-2072]
	mov	r3, #0
	str	r3, [fp, #-2068]
	b	.L19
.L20:
	ldr	r3, [fp, #-2088]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #99
	bne	.L19
	mov	r3, #1
	str	r3, [fp, #-2076]
	ldr	r3, [fp, #-2068]
	cmp	r3, #0
	ble	.L22
	ldr	r0, [fp, #-2080]
	bl	check
	str	r0, [fp, #-2080]
	ldr	r3, [fp, #-2080]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L22
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	fillbuff
	str	r0, [fp, #-2080]
	b	.L11
.L22:
	ldr	r3, [fp, #-2084]
	add	r2, r3, #4
	str	r2, [fp, #-2084]
	ldr	r3, [r3]
	str	r3, [fp, #-2064]
	ldr	r3, [fp, #-2076]
	mov	r2, r3
	ldr	r1, [fp, #-2080]
	ldr	r0, [fp, #-2064]
	bl	strncpy
	ldr	r3, [fp, #-2080]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L23
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	fillbuff
	str	r0, [fp, #-2080]
	mov	r3, #0
	str	r3, [fp, #-2076]
.L23:
	ldr	r3, [fp, #-2076]
	ldr	r2, [fp, #-2080]
	add	r3, r2, r3
	str	r3, [fp, #-2080]
	ldr	r3, [fp, #-2072]
	add	r3, r3, #1
	str	r3, [fp, #-2072]
	mov	r3, #0
	str	r3, [fp, #-2068]
.L19:
	ldr	r3, [fp, #-2088]
	add	r3, r3, #1
	str	r3, [fp, #-2088]
.L11:
	ldr	r3, [fp, #-2088]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L24
	b	.L16
.L27:
	nop
.L16:
	ldr	r3, [fp, #-2072]
	ldr	r2, .L28
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L29:
	.align	2
.L28:
	.word	.LC1
	.word	.LC0
	.size	simplescanf, .-simplescanf
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
