	.file	"789420.c"
	.intel_syntax noprefix
	.text
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 15773108
t:
	.zero	15773108
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	str
	.align 32
	.type	str, @object
	.size	str, 2333
str:
	.zero	2333
	.text
	.globl	insert
	.type	insert, @function
insert:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], 1
	jmp	.L2
.L9:
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	cmp	DWORD PTR -8[rbp], eax
	jge	.L3
	add	DWORD PTR -24[rbp], 1
	mov	DWORD PTR -28[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -20[rbp], 1
.L4:
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cmp	DWORD PTR -20[rbp], eax
	jl	.L5
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L6
.L8:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, t[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L7
	mov	eax, DWORD PTR cnt[rip]
	add	eax, 1
	mov	DWORD PTR cnt[rip], eax
	mov	ecx, DWORD PTR cnt[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	add	rax, rdx
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, t[rip]
	mov	DWORD PTR [rdx+rax], ecx
.L7:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 3
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, t[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -16[rbp], eax
	add	DWORD PTR -12[rbp], 1
.L6:
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cmp	DWORD PTR -12[rbp], eax
	jl	.L8
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	imul	rax, rax, 676
	lea	rdx, t[rip+672]
	mov	DWORD PTR [rax+rdx], 1
	add	DWORD PTR -28[rbp], 1
.L2:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jle	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	insert, .-insert
	.globl	query
	.type	query, @function
query:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	edx, 15773108
	mov	esi, 0
	lea	rdi, t[rip]
	call	memset@PLT
	mov	DWORD PTR ans[rip], 0
	mov	eax, DWORD PTR ans[rip]
	mov	DWORD PTR cnt[rip], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	insert
	mov	DWORD PTR -4[rbp], 1
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	imul	rax, rax, 676
	lea	rdx, t[rip+672]
	mov	edx, DWORD PTR [rax+rdx]
	mov	eax, DWORD PTR ans[rip]
	add	eax, edx
	mov	DWORD PTR ans[rip], eax
	add	DWORD PTR -4[rbp], 1
.L11:
	mov	eax, DWORD PTR cnt[rip]
	cmp	DWORD PTR -4[rbp], eax
	jle	.L12
	mov	eax, DWORD PTR ans[rip]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	query, .-query
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, n[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L15
.L16:
	lea	rsi, str[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, str[rip]
	call	query
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	eax, DWORD PTR n[rip]
	lea	edx, -1[rax]
	mov	DWORD PTR n[rip], edx
	test	eax, eax
	jne	.L16
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"789420.c"
	.text
	.comm	t,15773108,4
	.comm	cnt,4,4
	.comm	n,4,4
	.comm	ans,4,4
	.comm	str,2333,4
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r0, [fp, #-40]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L2
.L9:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L3
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L2
.L3:
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	b	.L4
.L5:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L4:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L5
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-16]
	b	.L6
.L8:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-8]
	ldr	r0, .L10
	ldr	r1, [fp, #-20]
	mov	r2, r1
	lsl	r2, r2, #1
	add	r2, r2, r1
	lsl	r3, r2, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L10+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L10+4
	str	r3, [r2]
	ldr	r3, .L10+4
	ldr	r0, [r3]
	ldr	ip, .L10
	ldr	r1, [fp, #-20]
	mov	r2, r1
	lsl	r2, r2, #1
	add	r2, r2, r1
	lsl	r3, r2, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	str	r0, [ip, r3, lsl #2]
.L7:
	ldr	r0, .L10
	ldr	r1, [fp, #-20]
	mov	r2, r1
	lsl	r2, r2, #1
	add	r2, r2, r1
	lsl	r3, r2, #3
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L6:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L8
	ldr	r2, .L10
	ldr	r3, [fp, #-20]
	mov	r1, #676
	mul	r3, r1, r3
	add	r3, r2, r3
	add	r3, r3, #672
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L2:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L9
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	t
	.word	cnt
	.size	insert, .-insert
	.align	2
	.global	query
	.syntax unified
	.arm
	.fpu softvfp
	.type	query, %function
query:
	@ 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]
	ldr	r2, .L16
	mov	r1, #0
	ldr	r0, .L16+4
	bl	memset
	ldr	r3, .L16+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L16+8
	ldr	r3, [r3]
	ldr	r2, .L16+12
	str	r3, [r2]
	ldr	r0, [fp, #-16]
	bl	insert
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L13
.L14:
	ldr	r2, .L16+4
	ldr	r3, [fp, #-8]
	mov	r1, #676
	mul	r3, r1, r3
	add	r3, r2, r3
	add	r3, r3, #672
	ldr	r2, [r3]
	ldr	r3, .L16+8
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L16+8
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L13:
	ldr	r3, .L16+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	ble	.L14
	ldr	r3, .L16+8
	ldr	r3, [r3]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	15773108
	.word	t
	.word	ans
	.word	cnt
	.size	query, .-query
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L22
	ldr	r0, .L22+4
	bl	__isoc99_scanf
	b	.L19
.L20:
	ldr	r1, .L22+8
	ldr	r0, .L22+12
	bl	__isoc99_scanf
	ldr	r0, .L22+8
	bl	query
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L22+16
	bl	printf
.L19:
	ldr	r3, .L22
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r1, .L22
	str	r2, [r1]
	cmp	r3, #0
	bne	.L20
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	n
	.word	.LC0
	.word	str
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
