	.file	"234518006.c"
	.intel_syntax noprefix
	.text
	.data
	.align 8
	.type	wN, @object
	.size	wN, 8
wN:
	.quad	81
	.section	.rodata
.LC0:
	.string	"\n"
.LC1:
	.string	""
	.text
	.type	fold, @function
fold:
.LFB6:
	.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, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	rax, QWORD PTR wN[rip]
	lea	rdx, -1[rax]
	mov	QWORD PTR -48[rbp], rdx
	mov	rdx, rax
	mov	r10, rdx
	mov	r11d, 0
	mov	rdx, rax
	mov	r8, rdx
	mov	r9d, 0
	mov	rdx, rax
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L2:
	cmp	rsp, rdx
	je	.L3
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L2
.L3:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L4
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L4:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -40[rbp], rax
	mov	QWORD PTR -56[rbp], 0
	mov	DWORD PTR -60[rbp], 0
.L12:
	cmp	QWORD PTR -56[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -56[rbp], rax
.L5:
	mov	rax, QWORD PTR wN[rip]
	mov	ecx, eax
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L15
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L8
	add	DWORD PTR -60[rbp], 1
	cmp	DWORD PTR -60[rbp], 1
	jne	.L9
	cmp	QWORD PTR -56[rbp], 0
	jne	.L16
.L9:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L12
.L8:
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	strchr@PLT
	test	rax, rax
	je	.L11
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rcx, QWORD PTR stdout[rip]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -60[rbp], 1
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	DWORD PTR -60[rbp], 0
	jmp	.L12
.L16:
	nop
	jmp	.L12
.L15:
	nop
	mov	rsp, rbx
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fold, .-fold
	.section	.rodata
.LC2:
	.string	"-w"
.LC3:
	.string	"r"
.LC4:
	.string	"fopen"
.LC5:
	.string	"fclose"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 1
	jle	.L18
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	je	.L19
	mov	eax, 2
	jmp	.L20
.L19:
	mov	eax, 1
.L20:
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	je	.L22
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	add	rax, 2
	mov	rdi, rax
	call	atol@PLT
	add	rax, 1
	mov	QWORD PTR wN[rip], rax
	cmp	DWORD PTR -20[rbp], 2
	jne	.L22
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fold
	jmp	.L22
.L25:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L23
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fold
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	eax, -1
	jne	.L24
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L24:
	add	DWORD PTR -12[rbp], 1
.L22:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L25
	jmp	.L26
.L18:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fold
.L26:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"234518006.c"
	.text
	.data
	.align	2
	.type	wN, %object
	.size	wN, 4
wN:
	.word	81
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012\000"
	.align	2
.LC1:
	.ascii	"\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fold, %function
fold:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, .L14+4
	ldr	ip, [r3]
	sub	r3, ip, #1
	str	r3, [fp, #-28]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-36]
.L9:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L2
	ldr	r0, [fp, #-40]
	bl	ftell
	str	r0, [fp, #-32]
.L2:
	ldr	r3, .L14+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	fgets
	ldr	r0, [fp, #-40]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	ldr	r1, .L14+8
	ldr	r0, [fp, #-24]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L6
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L13
.L6:
	ldr	r0, .L14+12
	bl	puts
	b	.L9
.L5:
	mov	r1, #10
	ldr	r0, [fp, #-24]
	bl	strchr
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldr	r0, [fp, #-24]
	bl	strlen
	str	r0, [fp, #-20]
	ldr	r3, .L14+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	mov	r1, #1
	ldr	r0, [fp, #-24]
	bl	fwrite
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	b	.L9
.L8:
	ldr	r0, [fp, #-24]
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L9
.L13:
	nop
	b	.L9
.L12:
	nop
	mov	sp, r4
	nop
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	wN
	.word	.LC0
	.word	.LC1
	.word	stdout
	.size	fold, .-fold
	.section	.rodata
	.align	2
.LC3:
	.ascii	"-w\000"
	.align	2
.LC4:
	.ascii	"r\000"
	.align	2
.LC5:
	.ascii	"fopen\000"
	.align	2
.LC6:
	.ascii	"fclose\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L17
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L27
	mov	r0, r3
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
	mov	r3, #2
	b	.L19
.L18:
	mov	r3, #1
.L19:
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L27
	mov	r0, r3
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r3, #2
	mov	r0, r3
	bl	atol
	mov	r3, r0
	add	r3, r3, #1
	ldr	r2, .L27+4
	str	r3, [r2]
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L21
	ldr	r3, .L27+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fold
	b	.L21
.L24:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L22
	ldr	r0, .L27+16
	bl	perror
	mov	r0, #1
	bl	exit
.L22:
	ldr	r0, [fp, #-8]
	bl	fold
	ldr	r0, [fp, #-8]
	bl	fclose
	mov	r3, r0
	cmn	r3, #1
	bne	.L23
	ldr	r0, .L27+20
	bl	perror
	mov	r0, #1
	bl	exit
.L23:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L21:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L24
	b	.L25
.L17:
	ldr	r3, .L27+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fold
.L25:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC3
	.word	wN
	.word	stdin
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
