	.file	"15763316.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	" %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	sub	rsp, 56
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -44[rbp], 0
	lea	rax, -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	ebx, 0
	jmp	.L2
.L3:
	movsx	rdx, ebx
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	lea	rdx, name.2[rip]
	add	rax, rdx
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	add	ebx, 1
.L2:
	mov	eax, DWORD PTR -56[rbp]
	cmp	ebx, eax
	jl	.L3
	mov	ebx, 0
	jmp	.L4
.L16:
	lea	rdi, temp.1[rip]
	mov	eax, 0
	call	gets@PLT
	mov	r12d, 0
	jmp	.L5
.L8:
	movsx	rdx, r12d
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	lea	rdx, name.2[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, temp.1[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L6
	mov	DWORD PTR -44[rbp], r12d
	jmp	.L7
.L6:
	add	r12d, 1
.L5:
	mov	eax, DWORD PTR -56[rbp]
	cmp	r12d, eax
	jl	.L8
.L7:
	lea	rdx, -48[rbp]
	lea	rax, -52[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -48[rbp]
	test	eax, eax
	jne	.L9
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, money.0[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -52[rbp]
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, money.0[rip]
	mov	DWORD PTR [rdx+rax], ecx
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, money.0[rip]
	mov	esi, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -52[rbp]
	mov	ecx, DWORD PTR -48[rbp]
	cdq
	idiv	ecx
	mov	eax, DWORD PTR -52[rbp]
	sub	edx, eax
	lea	ecx, [rsi+rdx]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, money.0[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	r12d, 0
	jmp	.L11
.L15:
	lea	rdi, temp.1[rip]
	mov	eax, 0
	call	gets@PLT
	mov	r13d, 0
	jmp	.L12
.L14:
	movsx	rdx, r13d
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	lea	rdx, name.2[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, temp.1[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	movsx	rax, r13d
	lea	rdx, 0[0+rax*4]
	lea	rax, money.0[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, DWORD PTR -48[rbp]
	cdq
	idiv	esi
	add	ecx, eax
	movsx	rax, r13d
	lea	rdx, 0[0+rax*4]
	lea	rax, money.0[rip]
	mov	DWORD PTR [rdx+rax], ecx
.L13:
	add	r13d, 1
.L12:
	mov	eax, DWORD PTR -56[rbp]
	cmp	r13d, eax
	jl	.L14
	add	r12d, 1
.L11:
	mov	eax, DWORD PTR -48[rbp]
	cmp	r12d, eax
	jl	.L15
.L10:
	add	ebx, 1
.L4:
	mov	eax, DWORD PTR -56[rbp]
	cmp	ebx, eax
	jl	.L16
	mov	ebx, 0
	jmp	.L17
.L20:
	mov	r12d, 0
	jmp	.L18
.L19:
	movsx	rcx, r12d
	movsx	rdx, ebx
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	lea	rdx, [rax+rcx]
	lea	rax, name.2[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	add	r12d, 1
.L18:
	movsx	rcx, r12d
	movsx	rdx, ebx
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	lea	rdx, [rax+rcx]
	lea	rax, name.2[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L19
	movsx	rax, ebx
	lea	rdx, 0[0+rax*4]
	lea	rax, money.0[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	ebx, 1
.L17:
	mov	eax, DWORD PTR -56[rbp]
	cmp	ebx, eax
	jl	.L20
	mov	eax, 0
	mov	rsi, QWORD PTR -40[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	add	rsp, 56
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.local	name.2
	.comm	name.2,165,32
	.local	temp.1
	.comm	temp.1,15,8
	.local	money.0
	.comm	money.0,44,32
	.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	"15763316.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\012\000"
	.align	2
.LC1:
	.ascii	"%d %d\012\000"
	.global	__aeabi_idivmod
	.global	__aeabi_idiv
	.align	2
.LC2:
	.ascii	" %d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #32
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-28]
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L23+4
	bl	__isoc99_scanf
	mov	r4, #0
	b	.L2
.L3:
	mov	r3, r4
	lsl	r3, r3, #4
	sub	r3, r3, r4
	ldr	r2, .L23+8
	add	r3, r3, r2
	mov	r0, r3
	bl	gets
	add	r4, r4, #1
.L2:
	ldr	r3, [fp, #-40]
	cmp	r4, r3
	blt	.L3
	mov	r4, #0
	b	.L4
.L16:
	ldr	r0, .L23+12
	bl	gets
	mov	r5, #0
	b	.L5
.L8:
	mov	r3, r5
	lsl	r3, r3, #4
	sub	r3, r3, r5
	ldr	r2, .L23+8
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L23+12
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	str	r5, [fp, #-28]
	b	.L7
.L6:
	add	r5, r5, #1
.L5:
	ldr	r3, [fp, #-40]
	cmp	r5, r3
	blt	.L8
.L7:
	sub	r2, fp, #32
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L23+16
	bl	__isoc99_scanf
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L9
	ldr	r2, .L23+20
	ldr	r3, [fp, #-28]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-36]
	sub	r2, r2, r3
	ldr	r1, .L23+20
	ldr	r3, [fp, #-28]
	str	r2, [r1, r3, lsl #2]
	b	.L10
.L9:
	ldr	r2, .L23+20
	ldr	r3, [fp, #-28]
	ldr	r5, [r2, r3, lsl #2]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-36]
	sub	r3, r2, r3
	add	r2, r5, r3
	ldr	r1, .L23+20
	ldr	r3, [fp, #-28]
	str	r2, [r1, r3, lsl #2]
	mov	r5, #0
	b	.L11
.L15:
	ldr	r0, .L23+12
	bl	gets
	mov	r6, #0
	b	.L12
.L14:
	mov	r3, r6
	lsl	r3, r3, #4
	sub	r3, r3, r6
	ldr	r2, .L23+8
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L23+12
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldr	r3, .L23+20
	ldr	r7, [r3, r6, lsl #2]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	add	r3, r7, r3
	ldr	r2, .L23+20
	str	r3, [r2, r6, lsl #2]
.L13:
	add	r6, r6, #1
.L12:
	ldr	r3, [fp, #-40]
	cmp	r6, r3
	blt	.L14
	add	r5, r5, #1
.L11:
	ldr	r3, [fp, #-32]
	cmp	r5, r3
	blt	.L15
.L10:
	add	r4, r4, #1
.L4:
	ldr	r3, [fp, #-40]
	cmp	r4, r3
	blt	.L16
	mov	r4, #0
	b	.L17
.L20:
	mov	r5, #0
	b	.L18
.L19:
	ldr	r2, .L23+8
	mov	r3, r4
	lsl	r3, r3, #4
	sub	r3, r3, r4
	add	r3, r2, r3
	add	r3, r3, r5
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	add	r5, r5, #1
.L18:
	ldr	r2, .L23+8
	mov	r3, r4
	lsl	r3, r3, #4
	sub	r3, r3, r4
	add	r3, r2, r3
	add	r3, r3, r5
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L23+20
	ldr	r3, [r3, r4, lsl #2]
	mov	r1, r3
	ldr	r0, .L23+24
	bl	printf
	add	r4, r4, #1
.L17:
	ldr	r3, [fp, #-40]
	cmp	r4, r3
	blt	.L20
	mov	r3, #0
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC3
	.word	.LC0
	.word	name.5299
	.word	temp.5300
	.word	.LC1
	.word	money.5301
	.word	.LC2
	.size	main, .-main
	.local	name.5299
	.comm	name.5299,165,4
	.local	temp.5300
	.comm	temp.5300,15,4
	.local	money.5301
	.comm	money.5301,44,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
