	.file	"112485.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Thread creation failed"
	.align 8
.LC1:
	.string	"Waiting for threads to finish..."
.LC2:
	.string	"Picked up a thread"
.LC3:
	.string	"pthread_join failed"
.LC4:
	.string	"All done"
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -80[rbp], 0
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	mov	rdx, rax
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, thread_function[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	je	.L3
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	add	DWORD PTR -80[rbp], 1
.L2:
	cmp	DWORD PTR -80[rbp], 5
	jle	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR -80[rbp], 5
	jmp	.L5
.L8:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	mov	rax, QWORD PTR -64[rbp+rax*8]
	lea	rdx, -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jne	.L6
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L7
.L6:
	lea	rdi, .LC3[rip]
	call	perror@PLT
.L7:
	sub	DWORD PTR -80[rbp], 1
.L5:
	cmp	DWORD PTR -80[rbp], 0
	jns	.L8
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC5:
	.string	"thread_function is running. Argument was %d\n"
.LC8:
	.string	"Bye from %d\n"
	.text
	.globl	thread_function
	.type	thread_function, @function
thread_function:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	call	rand@PLT
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movsd	xmm0, QWORD PTR .LC6[rip]
	mulsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR .LC7[rip]
	divsd	xmm0, xmm1
	cvttsd2si	eax, xmm0
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	sleep@PLT
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE7:
	.size	thread_function, .-thread_function
	.section	.rodata
	.align 8
.LC6:
	.long	0
	.long	1075970048
	.align 8
.LC7:
	.long	0
	.long	1105199104
	.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	"112485.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Thread creation failed\000"
	.align	2
.LC1:
	.ascii	"Waiting for threads to finish...\000"
	.align	2
.LC2:
	.ascii	"Picked up a thread\000"
	.align	2
.LC3:
	.ascii	"pthread_join failed\000"
	.align	2
.LC4:
	.ascii	"All done\000"
	.align	2
.LC5:
	.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, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L2
.L4:
	sub	r2, fp, #32
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	add	r0, r2, r3
	ldr	r3, [fp, #-40]
	ldr	r2, .L10+4
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L3
	ldr	r0, .L10+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L2:
	ldr	r3, [fp, #-40]
	cmp	r3, #5
	ble	.L4
	ldr	r0, .L10+12
	bl	puts
	mov	r3, #5
	str	r3, [fp, #-40]
	b	.L5
.L8:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-28]
	sub	r2, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L10+16
	bl	puts
	b	.L7
.L6:
	ldr	r0, .L10+20
	bl	perror
.L7:
	ldr	r3, [fp, #-40]
	sub	r3, r3, #1
	str	r3, [fp, #-40]
.L5:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L10+24
	bl	puts
	mov	r0, #0
	bl	exit
.L11:
	.align	2
.L10:
	.word	.LC5
	.word	thread_function
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.section	.rodata
	.align	2
.LC6:
	.ascii	"thread_function is running. Argument was %d\012\000"
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.global	__aeabi_d2iz
	.align	2
.LC7:
	.ascii	"Bye from %d\012\000"
	.text
	.align	2
	.global	thread_function
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_function, %function
thread_function:
	@ 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]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, .L13
	bl	printf
	bl	rand
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L13+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L13+8
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	sleep
	ldr	r1, [fp, #-12]
	ldr	r0, .L13+12
	bl	printf
	mov	r0, #0
	bl	pthread_exit
.L14:
	.align	2
.L13:
	.word	.LC6
	.word	1075970048
	.word	1105199104
	.word	.LC7
	.size	thread_function, .-thread_function
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
