	.file	"78774.c"
	.intel_syntax noprefix
	.text
	.local	thread_log_key
	.comm	thread_log_key,4,4
	.section	.rodata
.LC0:
	.string	"%s\n"
	.text
	.globl	write_to_thread_log
	.type	write_to_thread_log, @function
write_to_thread_log:
.LFB0:
	.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	eax, DWORD PTR thread_log_key[rip]
	mov	edi, eax
	call	pthread_getspecific@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	write_to_thread_log, .-write_to_thread_log
	.globl	close_thread_log
	.type	close_thread_log, @function
close_thread_log:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	close_thread_log, .-close_thread_log
	.section	.rodata
.LC1:
	.string	"thread%d.log"
.LC2:
	.string	"w"
.LC3:
	.string	"Thread starting."
	.text
	.globl	thread_function
	.type	thread_function, @function
thread_function:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	pthread_self@PLT
	mov	edx, eax
	lea	rax, -32[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -32[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	eax, DWORD PTR thread_log_key[rip]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	pthread_setspecific@PLT
	lea	rdi, .LC3[rip]
	call	write_to_thread_log
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	thread_function, .-thread_function
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, close_thread_log[rip]
	lea	rdi, thread_log_key[rip]
	call	pthread_key_create@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L7
.L8:
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, thread_function[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -52[rbp], 1
.L7:
	cmp	DWORD PTR -52[rbp], 4
	jle	.L8
	mov	DWORD PTR -52[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	add	DWORD PTR -52[rbp], 1
.L9:
	cmp	DWORD PTR -52[rbp], 4
	jle	.L10
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.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	"78774.c"
	.text
	.local	thread_log_key
	.comm	thread_log_key,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\012\000"
	.text
	.align	2
	.global	write_to_thread_log
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_to_thread_log, %function
write_to_thread_log:
	@ 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, .L2
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_getspecific
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r1, .L2+4
	ldr	r0, [fp, #-8]
	bl	fprintf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	thread_log_key
	.word	.LC0
	.size	write_to_thread_log, .-write_to_thread_log
	.align	2
	.global	close_thread_log
	.syntax unified
	.arm
	.fpu softvfp
	.type	close_thread_log, %function
close_thread_log:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	close_thread_log, .-close_thread_log
	.section	.rodata
	.align	2
.LC1:
	.ascii	"thread%d.log\000"
	.align	2
.LC2:
	.ascii	"w\000"
	.align	2
.LC3:
	.ascii	"Thread starting.\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	thread_function
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_function, %function
thread_function:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	pthread_self
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #28
	ldr	r1, .L8+4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #28
	ldr	r1, .L8+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-32]
	ldr	r3, .L8+12
	ldr	r3, [r3]
	ldr	r1, [fp, #-32]
	mov	r0, r3
	bl	pthread_setspecific
	ldr	r0, .L8+16
	bl	write_to_thread_log
	mov	r3, #0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.word	thread_log_key
	.word	.LC3
	.size	thread_function, .-thread_function
	.section	.rodata
	.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 = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L17+4
	ldr	r0, .L17+8
	bl	pthread_key_create
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L11
.L12:
	sub	r2, fp, #28
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L17+12
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L11:
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L12
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L13
.L14:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-24]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L13:
	ldr	r3, [fp, #-32]
	cmp	r3, #4
	ble	.L14
	mov	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC5
	.word	close_thread_log
	.word	thread_log_key
	.word	thread_function
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
