	.file	"536192.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"input.txt"
.LC2:
	.string	"output.txt.5"
.LC3:
	.string	"%07lu\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
	sub	rsp, 176
	mov	DWORD PTR -164[rbp], edi
	mov	QWORD PTR -176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -128[rbp], 5000000
	mov	QWORD PTR -120[rbp], 1
	mov	rax, QWORD PTR -128[rbp]
	mov	edx, 0
	div	QWORD PTR -120[rbp]
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	QWORD PTR -144[rbp], 0
	jmp	.L2
.L18:
	mov	rax, QWORD PTR -112[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -144[rbp], 0
	je	.L3
	mov	rax, QWORD PTR -128[rbp]
	jmp	.L4
.L3:
	mov	eax, 0
.L4:
	mov	QWORD PTR -96[rbp], rax
	cmp	QWORD PTR -144[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -128[rbp]
	jmp	.L6
.L5:
	mov	eax, 10000000
.L6:
	mov	QWORD PTR -88[rbp], rax
	cmp	QWORD PTR -144[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -128[rbp]
	jmp	.L8
.L7:
	mov	eax, 0
.L8:
	mov	QWORD PTR -80[rbp], rax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L11
	mov	eax, 1
	jmp	.L19
.L12:
	mov	rdx, QWORD PTR -72[rbp]
	lea	rcx, -152[rbp]
	lea	rax, -160[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	rax, QWORD PTR -160[rbp]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -96[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	ja	.L11
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, QWORD PTR -88[rbp]
	jnb	.L11
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR -80[rbp]
	mov	edx, 0
	div	QWORD PTR -120[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR -80[rbp]
	mov	edx, 0
	div	QWORD PTR -120[rbp]
	mov	QWORD PTR -24[rbp], rdx
	mov	rdx, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 1
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	mov	esi, eax
	mov	rcx, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	or	edx, esi
	mov	BYTE PTR [rax], dl
.L11:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L12
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	WORD PTR -12[rbp], 119
	mov	WORD PTR -10[rbp], 97
	lea	rdx, -12[rbp]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rax
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -64[rbp], rax
	cmp	QWORD PTR -64[rbp], 0
	jne	.L13
	mov	eax, 1
	jmp	.L19
.L13:
	mov	QWORD PTR -136[rbp], 0
	jmp	.L14
.L16:
	mov	rax, QWORD PTR -136[rbp]
	mov	edx, 0
	div	QWORD PTR -120[rbp]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -136[rbp]
	mov	edx, 0
	div	QWORD PTR -120[rbp]
	mov	QWORD PTR -48[rbp], rdx
	mov	rdx, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	rdx, QWORD PTR -48[rbp]
	mov	ecx, edx
	sar	eax, cl
	and	eax, 1
	test	eax, eax
	je	.L15
	mov	rdx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -80[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L15:
	add	QWORD PTR -136[rbp], 1
.L14:
	mov	rax, QWORD PTR -136[rbp]
	cmp	rax, QWORD PTR -128[rbp]
	jb	.L16
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	free@PLT
	add	QWORD PTR -144[rbp], 1
.L2:
	cmp	QWORD PTR -144[rbp], 1
	jbe	.L18
	mov	eax, 0
.L19:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"536192.c"
	.text
	.global	__aeabi_uidiv
	.section	.rodata
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"input.txt\000"
	.global	__aeabi_uidivmod
	.align	2
.LC3:
	.ascii	"output.txt.5\000"
	.align	2
.LC4:
	.ascii	"%07lu\012\000"
	.align	2
.LC0:
	.ascii	"w\000"
	.ascii	"a\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L21+4
	str	r3, [fp, #-68]
	mov	r3, #1
	str	r3, [fp, #-64]
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-68]
	bl	__aeabi_uidiv
	mov	r3, r0
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-84]
	mov	r3, #0
	str	r3, [fp, #-80]
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L2
.L18:
	mov	r1, #1
	ldr	r0, [fp, #-60]
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-68]
	b	.L4
.L3:
	mov	r3, #0
.L4:
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-68]
	b	.L6
.L5:
	ldr	r3, .L21+8
.L6:
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-68]
	b	.L8
.L7:
	mov	r3, #0
.L8:
	str	r3, [fp, #-44]
	ldr	r1, .L21+12
	ldr	r0, .L21+16
	bl	fopen
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L11
	mov	r3, #1
	b	.L19
.L12:
	sub	r1, fp, #80
	sub	r3, fp, #84
	ldr	r2, [fp, #-40]
	mov	r0, r3
	bl	getline
	ldr	r3, [fp, #-84]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bhi	.L11
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	bcs	.L11
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-44]
	sub	r3, r2, r3
	ldr	r1, [fp, #-64]
	mov	r0, r3
	bl	__aeabi_uidiv
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-44]
	sub	r3, r2, r3
	ldr	r1, [fp, #-64]
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #24
	asr	r2, r3, #24
	mov	r1, #1
	ldr	r3, [fp, #-16]
	lsl	r3, r1, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r1, [fp, #-56]
	ldr	r3, [fp, #-20]
	add	r3, r1, r3
	and	r2, r2, #255
	strb	r2, [r3]
.L11:
	ldr	r0, [fp, #-40]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r0, [fp, #-40]
	bl	fclose
	ldr	r3, .L21+20
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	sub	r2, fp, #12
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #1
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L21+24
	bl	fopen
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L13
	mov	r3, #1
	b	.L19
.L13:
	mov	r3, #0
	str	r3, [fp, #-72]
	b	.L14
.L16:
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-72]
	bl	__aeabi_uidiv
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-72]
	ldr	r1, [fp, #-64]
	mov	r0, r3
	bl	__aeabi_uidivmod
	mov	r3, r1
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	asr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L15
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, .L21+28
	ldr	r0, [fp, #-36]
	bl	fprintf
.L15:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L14:
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	bcc	.L16
	ldr	r0, [fp, #-36]
	bl	fclose
	ldr	r0, [fp, #-56]
	bl	free
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L2:
	ldr	r3, [fp, #-76]
	cmp	r3, #1
	bls	.L18
	mov	r3, #0
.L19:
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC5
	.word	5000000
	.word	10000000
	.word	.LC1
	.word	.LC2
	.word	.LC0
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
