	.file	"166377.c"
	.intel_syntax noprefix
	.text
	.globl	halloweenParty
	.type	halloweenParty, @function
halloweenParty:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	shr	rdx, 63
	add	rax, rdx
	sar	rax
	neg	rax
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	shr	rcx, 63
	add	rax, rcx
	sar	rax
	imul	rax, rdx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	halloweenParty, .-halloweenParty
	.section	.rodata
.LC0:
	.string	"OUTPUT_PATH"
.LC1:
	.string	"w"
.LC2:
	.string	"%ld\n"
	.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	getenv@PLT
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	eax, 0
	call	readline
	mov	QWORD PTR -32[rbp], rax
	lea	rcx, -56[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -64[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	cmp	QWORD PTR -32[rbp], rax
	je	.L4
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L5
.L4:
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	DWORD PTR -68[rbp], 0
	jmp	.L6
.L9:
	mov	eax, 0
	call	readline
	mov	QWORD PTR -24[rbp], rax
	lea	rcx, -48[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -60[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	cmp	QWORD PTR -24[rbp], rax
	je	.L7
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L8
.L7:
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	mov	rdi, rax
	call	halloweenParty
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -68[rbp], 1
.L6:
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, DWORD PTR -64[rbp]
	jl	.L9
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.globl	readline
	.type	readline, @function
readline:
.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, 48
	mov	QWORD PTR -48[rbp], 1024
	mov	QWORD PTR -40[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
.L16:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR stdin[rip]
	mov	rax, QWORD PTR -48[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, eax
	mov	eax, ecx
	sub	eax, esi
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L19
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	sub	rax, 1
	cmp	QWORD PTR -40[rbp], rax
	jb	.L14
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	je	.L14
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rax
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	je	.L20
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -48[rbp], rax
	jmp	.L16
.L19:
	nop
	jmp	.L14
.L20:
	nop
.L14:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L17
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
.L17:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	readline, .-readline
	.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	"166377.c"
	.text
	.align	2
	.global	halloweenParty
	.syntax unified
	.arm
	.fpu softvfp
	.type	halloweenParty, %function
halloweenParty:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	rsb	r3, r3, #0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	mul	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	halloweenParty, .-halloweenParty
	.section	.rodata
	.align	2
.LC0:
	.ascii	"OUTPUT_PATH\000"
	.align	2
.LC1:
	.ascii	"w\000"
	.align	2
.LC2:
	.ascii	"%ld\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 = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L12+4
	bl	getenv
	mov	r3, r0
	ldr	r1, .L12+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-32]
	bl	readline
	str	r0, [fp, #-28]
	sub	r3, fp, #44
	mov	r2, #10
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	strtol
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	beq	.L4
	ldr	r3, [fp, #-44]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L5
.L4:
	mov	r0, #1
	bl	exit
.L5:
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L6
.L9:
	bl	readline
	str	r0, [fp, #-20]
	sub	r3, fp, #40
	mov	r2, #10
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	strtol
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	beq	.L7
	ldr	r3, [fp, #-40]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L8
.L7:
	mov	r0, #1
	bl	exit
.L8:
	ldr	r0, [fp, #-16]
	bl	halloweenParty
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, .L12+12
	ldr	r0, [fp, #-32]
	bl	fprintf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L6:
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L9
	ldr	r0, [fp, #-32]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	readline
	.syntax unified
	.arm
	.fpu softvfp
	.type	readline, %function
readline:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r3, #1024
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-28]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
.L18:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	mov	r1, r3
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, [fp, #-16]
	bl	fgets
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L21
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bcc	.L16
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L16
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-20]
	bl	realloc
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-28]
	b	.L18
.L21:
	nop
	b	.L16
.L22:
	nop
.L16:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L19
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
.L19:
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-20]
	bl	realloc
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	stdin
	.size	readline, .-readline
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
