	.file	"40429.c"
	.intel_syntax noprefix
	.text
	.globl	thread_args
	.bss
	.align 16
	.type	thread_args, @object
	.size	thread_args, 16
thread_args:
	.zero	16
	.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -64[rbp], 1
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -48[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L2
	cmp	DWORD PTR -52[rbp], 1
	jne	.L3
.L2:
	mov	DWORD PTR -64[rbp], 1
	mov	eax, 0
	jmp	.L10
.L3:
	cmp	DWORD PTR -52[rbp], 2
	jne	.L5
	mov	DWORD PTR -64[rbp], 2
	mov	eax, 0
	jmp	.L10
.L5:
	mov	DWORD PTR thread_args[rip], 1
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR thread_args[rip+4], eax
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	add	eax, 1
	mov	DWORD PTR thread_args[rip+8], eax
	mov	eax, DWORD PTR -52[rbp]
	mov	DWORD PTR thread_args[rip+12], eax
	mov	DWORD PTR -60[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, thread_args[rip]
	add	rdx, rax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, factorial[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -60[rbp], 1
.L6:
	cmp	DWORD PTR -60[rbp], 1
	jle	.L7
	mov	DWORD PTR -56[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	mov	rax, QWORD PTR -32[rbp+rax*8]
	lea	rdx, -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -64[rbp]
	imul	eax, edx
	mov	DWORD PTR -64[rbp], eax
	add	DWORD PTR -56[rbp], 1
.L8:
	cmp	DWORD PTR -56[rbp], 1
	jle	.L9
	mov	eax, 0
.L10:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -24[rbp], 1
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -24[rbp]
	imul	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -24[rbp], eax
	add	DWORD PTR -20[rbp], 1
.L13:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jle	.L14
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	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	"40429.c"
	.text
	.comm	thread_args,16,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r1, fp, #40
	mov	r2, #10
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L3
.L2:
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r3, #0
	b	.L10
.L3:
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	bne	.L5
	mov	r3, #2
	str	r3, [fp, #-32]
	mov	r3, #0
	b	.L10
.L5:
	ldr	r3, .L12+4
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, .L12+4
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	add	r3, r3, #1
	ldr	r2, .L12+4
	str	r3, [r2, #8]
	ldr	r2, .L12+4
	ldr	r3, [fp, #-20]
	str	r3, [r2, #12]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L6
.L7:
	sub	r2, fp, #16
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r0, r2, r3
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #3
	ldr	r2, .L12+4
	add	r3, r3, r2
	ldr	r2, .L12+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L6:
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	ble	.L7
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L8
.L9:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-12]
	sub	r2, fp, #36
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-36]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	mul	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L8:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	ble	.L9
	mov	r3, #0
.L10:
	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	.LC0
	.word	thread_args
	.word	factorial
	.size	main, .-main
	.align	2
	.global	factorial
	.syntax unified
	.arm
	.fpu softvfp
	.type	factorial, %function
factorial:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-32]
	mov	r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
	b	.L15
.L16:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	mul	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L15:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	ble	.L16
	ldr	r3, [fp, #-24]
	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
