	.file	"225143127.c"
	.intel_syntax noprefix
	.text
	.globl	factorial
	.type	factorial, @function
factorial:
.LFB0:
	.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, 56
	.cfi_offset 3, -24
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rsi, rax
	mov	eax, DWORD PTR -52[rbp]
	add	eax, 1
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -40[rbp], rdx
	movsx	rdx, eax
	mov	r8, rdx
	mov	r9d, 0
	movsx	rdx, eax
	mov	rcx, rdx
	mov	ebx, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	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, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 1
	mov	DWORD PTR -44[rbp], 1
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -44[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -32[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	imul	eax, DWORD PTR -44[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	add	DWORD PTR -44[rbp], 1
.L5:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jle	.L6
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -52[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	rsp, rsi
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	factorial, .-factorial
	.section	.rodata
.LC0:
	.string	"the_stack_data/225143127.c"
.LC1:
	.string	"1 == factorial(0)"
.LC2:
	.string	"1 == factorial(1)"
.LC3:
	.string	"2 == factorial(2)"
.LC4:
	.string	"6 == factorial(3)"
.LC5:
	.string	"24 == factorial(4)"
.LC6:
	.string	"120 == factorial(5)"
	.text
	.globl	test
	.type	test, @function
test:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 0
	call	factorial
	cmp	eax, 1
	je	.L10
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 18
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L10:
	mov	edi, 1
	call	factorial
	cmp	eax, 1
	je	.L11
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 19
	lea	rsi, .LC0[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L11:
	mov	edi, 2
	call	factorial
	cmp	eax, 2
	je	.L12
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 20
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L12:
	mov	edi, 3
	call	factorial
	cmp	eax, 6
	je	.L13
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 21
	lea	rsi, .LC0[rip]
	lea	rdi, .LC4[rip]
	call	__assert_fail@PLT
.L13:
	mov	edi, 4
	call	factorial
	cmp	eax, 24
	je	.L14
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 22
	lea	rsi, .LC0[rip]
	lea	rdi, .LC5[rip]
	call	__assert_fail@PLT
.L14:
	mov	edi, 5
	call	factorial
	cmp	eax, 120
	je	.L16
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 23
	lea	rsi, .LC0[rip]
	lea	rdi, .LC6[rip]
	call	__assert_fail@PLT
.L16:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	test, .-test
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	test
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"test"
	.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	"225143127.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	factorial
	.syntax unified
	.arm
	.fpu softvfp
	.type	factorial, %function
factorial:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, sp
	mov	lr, r3
	ldr	r3, [fp, #-24]
	add	ip, r3, #1
	sub	r3, ip, #1
	str	r3, [fp, #-16]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r2, #1
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L2
.L3:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [fp, #-20]
	mul	r1, r2, r3
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L2:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	ble	.L3
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	ldr	r3, [r3, r2, lsl #2]
	mov	sp, lr
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.size	factorial, .-factorial
	.section	.rodata
	.align	2
.LC1:
	.ascii	"the_stack_data/225143127.c\000"
	.align	2
.LC2:
	.ascii	"1 == factorial(0)\000"
	.align	2
.LC3:
	.ascii	"1 == factorial(1)\000"
	.align	2
.LC4:
	.ascii	"2 == factorial(2)\000"
	.align	2
.LC5:
	.ascii	"6 == factorial(3)\000"
	.align	2
.LC6:
	.ascii	"24 == factorial(4)\000"
	.align	2
.LC7:
	.ascii	"120 == factorial(5)\000"
	.text
	.align	2
	.global	test
	.syntax unified
	.arm
	.fpu softvfp
	.type	test, %function
test:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #0
	bl	factorial
	mov	r3, r0
	cmp	r3, #1
	beq	.L9
	ldr	r3, .L16
	mov	r2, #18
	ldr	r1, .L16+4
	ldr	r0, .L16+8
	bl	__assert_fail
.L9:
	mov	r0, #1
	bl	factorial
	mov	r3, r0
	cmp	r3, #1
	beq	.L10
	ldr	r3, .L16
	mov	r2, #19
	ldr	r1, .L16+4
	ldr	r0, .L16+12
	bl	__assert_fail
.L10:
	mov	r0, #2
	bl	factorial
	mov	r3, r0
	cmp	r3, #2
	beq	.L11
	ldr	r3, .L16
	mov	r2, #20
	ldr	r1, .L16+4
	ldr	r0, .L16+16
	bl	__assert_fail
.L11:
	mov	r0, #3
	bl	factorial
	mov	r3, r0
	cmp	r3, #6
	beq	.L12
	ldr	r3, .L16
	mov	r2, #21
	ldr	r1, .L16+4
	ldr	r0, .L16+20
	bl	__assert_fail
.L12:
	mov	r0, #4
	bl	factorial
	mov	r3, r0
	cmp	r3, #24
	beq	.L13
	ldr	r3, .L16
	mov	r2, #22
	ldr	r1, .L16+4
	ldr	r0, .L16+24
	bl	__assert_fail
.L13:
	mov	r0, #5
	bl	factorial
	mov	r3, r0
	cmp	r3, #120
	beq	.L15
	ldr	r3, .L16
	mov	r2, #23
	ldr	r1, .L16+4
	ldr	r0, .L16+28
	bl	__assert_fail
.L15:
	nop
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	__PRETTY_FUNCTION__.4218
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	test, .-test
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	test
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.4218, %object
	.size	__PRETTY_FUNCTION__.4218, 5
__PRETTY_FUNCTION__.4218:
	.ascii	"test\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
