	.file	"1002194.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%lu\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, 48
	mov	DWORD PTR -48[rbp], 999999
	mov	DWORD PTR -24[rbp], 10
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -44[rbp], eax
	mov	QWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -40[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -40[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -40[rbp]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -40[rbp], 1
.L2:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L3
	mov	DWORD PTR -36[rbp], 1
	jmp	.L4
.L9:
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	factorial
	mov	esi, eax
	mov	eax, DWORD PTR -48[rbp]
	cdq
	idiv	esi
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	factorial
	mov	ecx, eax
	mov	eax, DWORD PTR -48[rbp]
	cdq
	idiv	ecx
	mov	DWORD PTR -48[rbp], edx
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	mov	rcx, rax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	rax, rcx
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -32[rbp], eax
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -32[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -32[rbp], 1
.L5:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L6
	sub	DWORD PTR -44[rbp], 1
	cmp	DWORD PTR -48[rbp], 0
	je	.L13
	add	DWORD PTR -36[rbp], 1
.L4:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L9
	jmp	.L8
.L13:
	nop
.L8:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L10
.L11:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	mov	rcx, rax
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	rax, rcx
	mov	QWORD PTR -16[rbp], rax
	add	DWORD PTR -28[rbp], 1
.L10:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L11
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	factorial
	.type	factorial, @function
factorial:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 1
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	imul	eax, edx
	mov	DWORD PTR -4[rbp], eax
.L15:
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -20[rbp], edx
	cmp	eax, 1
	jg	.L16
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	factorial, .-factorial
	.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	"1002194.c"
	.text
	.global	__aeabi_idiv
	.global	__aeabi_idivmod
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%lu\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #64
	ldr	r3, .L14
	str	r3, [fp, #-72]
	mov	r3, #10
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-68]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L2
.L3:
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-64]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L2:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	blt	.L3
	mov	r3, #1
	str	r3, [fp, #-60]
	b	.L4
.L9:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-60]
	sub	r3, r2, r3
	mov	r0, r3
	bl	factorial
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-60]
	sub	r3, r2, r3
	mov	r0, r3
	bl	factorial
	mov	r2, r0
	ldr	r3, [fp, #-72]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-72]
	sub	r5, fp, #36
	ldmia	r5, {r4-r5}
	mov	r2, r4
	mov	r3, r5
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #2
	orr	r1, r1, r2, lsr #30
	lsl	r0, r2, #2
	mov	r2, r0
	mov	r3, r1
	adds	r2, r2, r4
	adc	r3, r3, r5
	adds	r1, r2, r2
	str	r1, [fp, #-84]
	adc	r3, r3, r3
	str	r3, [fp, #-80]
	sub	r3, fp, #84
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r2, r3, #255
	mov	r3, #0
	adds	r8, r0, r2
	adc	r9, r1, r3
	str	r8, [fp, #-36]
	str	r9, [fp, #-32]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-56]
	b	.L5
.L6:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	ldr	r2, [fp, #-44]
	add	r2, r2, r3
	ldr	r3, [fp, #-56]
	ldr	r1, [fp, #-44]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L5:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	blt	.L6
	ldr	r3, [fp, #-68]
	sub	r3, r3, #1
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L4:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	blt	.L9
	b	.L8
.L13:
	nop
.L8:
	mov	r3, #0
	str	r3, [fp, #-52]
	b	.L10
.L11:
	sub	r5, fp, #36
	ldmia	r5, {r4-r5}
	mov	r2, r4
	mov	r3, r5
	mov	r0, #0
	mov	r1, #0
	lsl	r1, r3, #2
	orr	r1, r1, r2, lsr #30
	lsl	r0, r2, #2
	mov	r2, r0
	mov	r3, r1
	adds	r2, r2, r4
	adc	r3, r3, r5
	adds	r1, r2, r2
	str	r1, [fp, #-92]
	adc	r3, r3, r3
	str	r3, [fp, #-88]
	sub	r3, fp, #92
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r2, r3, #255
	mov	r3, #0
	adds	r6, r0, r2
	adc	r7, r1, r3
	str	r6, [fp, #-36]
	str	r7, [fp, #-32]
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L10:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-68]
	cmp	r2, r3
	blt	.L11
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	ldr	r0, .L14+4
	bl	printf
	ldr	r0, [fp, #-44]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L15:
	.align	2
.L14:
	.word	999999
	.word	.LC0
	.size	main, .-main
	.align	2
	.global	factorial
	.syntax unified
	.arm
	.fpu softvfp
	.type	factorial, %function
factorial:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L17
.L18:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	mul	r3, r2, r3
	str	r3, [fp, #-8]
.L17:
	ldr	r3, [fp, #-16]
	sub	r2, r3, #1
	str	r2, [fp, #-16]
	cmp	r3, #1
	bgt	.L18
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	factorial, .-factorial
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
