	.file	"514800.c"
	.intel_syntax noprefix
	.text
	.local	str_key
	.comm	str_key,4,4
	.local	str_alloc_key_once
	.comm	str_alloc_key_once,4,4
	.section	.rodata
	.align 8
.LC0:
	.string	"Thread %lx : allocating buffer at %p\n"
	.text
	.globl	str_accumulate
	.type	str_accumulate, @function
str_accumulate:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	lea	rsi, str_alloc_key[rip]
	lea	rdi, str_alloc_key_once[rip]
	call	pthread_once@PLT
	mov	eax, DWORD PTR str_key[rip]
	mov	edi, eax
	call	pthread_getspecific@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	mov	edi, 1024
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L3
	mov	eax, 0
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR str_key[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	pthread_setspecific@PLT
	call	pthread_self@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	mov	rsi, rcx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	rax, QWORD PTR -8[rbp]
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	str_accumulate, .-str_accumulate
	.section	.rodata
	.align 8
.LC1:
	.string	"Thread %lx : allocated key %d\n"
	.text
	.type	str_alloc_key, @function
str_alloc_key:
.LFB7:
	.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, 8
	.cfi_offset 3, -24
	lea	rsi, str_alloc_destroy_accu[rip]
	lea	rdi, str_key[rip]
	call	pthread_key_create@PLT
	mov	ebx, DWORD PTR str_key[rip]
	call	pthread_self@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	str_alloc_key, .-str_alloc_key
	.section	.rodata
	.align 8
.LC2:
	.string	"Thread %lx : freeing buffer at %p\n"
	.text
	.type	str_alloc_destroy_accu, @function
str_alloc_destroy_accu:
.LFB8:
	.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
	call	pthread_self@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	mov	rsi, rcx
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	str_alloc_destroy_accu, .-str_alloc_destroy_accu
	.section	.rodata
.LC3:
	.string	"Result of "
.LC4:
	.string	" thread"
.LC5:
	.string	"Thread %lx: \"%s\" \n"
	.text
	.globl	process
	.type	process, @function
process:
.LFB9:
	.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
	lea	rdi, .LC3[rip]
	call	str_accumulate
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	str_accumulate
	mov	QWORD PTR -8[rbp], rax
	lea	rdi, .LC4[rip]
	call	str_accumulate
	mov	QWORD PTR -8[rbp], rax
	call	pthread_self@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	mov	rsi, rcx
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	process, .-process
	.section	.rodata
.LC6:
	.string	"first"
.LC7:
	.string	"second"
.LC8:
	.string	"initial thread"
.LC9:
	.string	"Thread %lx :\"%s\"\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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 -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC3[rip]
	call	str_accumulate
	mov	QWORD PTR -16[rbp], rax
	lea	rax, -32[rbp]
	lea	rcx, .LC6[rip]
	lea	rdx, process[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -24[rbp]
	lea	rcx, .LC7[rip]
	lea	rdx, process[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rdi, .LC8[rip]
	call	str_accumulate
	mov	QWORD PTR -16[rbp], rax
	call	pthread_self@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, rax
	mov	rsi, rcx
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"514800.c"
	.text
	.local	str_key
	.comm	str_key,4,4
	.local	str_alloc_key_once
	.comm	str_alloc_key_once,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Thread %lx : allocating buffer at %p\012\000"
	.text
	.align	2
	.global	str_accumulate
	.syntax unified
	.arm
	.fpu softvfp
	.type	str_accumulate, %function
str_accumulate:
	@ 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	r1, .L5
	ldr	r0, .L5+4
	bl	pthread_once
	ldr	r3, .L5+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_getspecific
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	mov	r0, #1024
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L3
	mov	r3, #0
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L5+8
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	pthread_setspecific
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L5+12
	bl	printf
.L2:
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	strcat
	ldr	r3, [fp, #-8]
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	str_alloc_key
	.word	str_alloc_key_once
	.word	str_key
	.word	.LC0
	.size	str_accumulate, .-str_accumulate
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Thread %lx : allocated key %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	str_alloc_key, %function
str_alloc_key:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L8
	ldr	r0, .L8+4
	bl	pthread_key_create
	bl	pthread_self
	mov	r1, r0
	ldr	r3, .L8+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L8+8
	bl	printf
	nop
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	str_alloc_destroy_accu
	.word	str_key
	.word	.LC1
	.size	str_alloc_key, .-str_alloc_key
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Thread %lx : freeing buffer at %p\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	str_alloc_destroy_accu, %function
str_alloc_destroy_accu:
	@ 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]
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L11
	bl	printf
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC2
	.size	str_alloc_destroy_accu, .-str_alloc_destroy_accu
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Result of \000"
	.align	2
.LC4:
	.ascii	" thread\000"
	.align	2
.LC5:
	.ascii	"Thread %lx: \"%s\" \012\000"
	.text
	.align	2
	.global	process
	.syntax unified
	.arm
	.fpu softvfp
	.type	process, %function
process:
	@ 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	r0, .L15
	bl	str_accumulate
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	str_accumulate
	str	r0, [fp, #-8]
	ldr	r0, .L15+4
	bl	str_accumulate
	str	r0, [fp, #-8]
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L15+8
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	process, .-process
	.section	.rodata
	.align	2
.LC6:
	.ascii	"first\000"
	.align	2
.LC7:
	.ascii	"second\000"
	.align	2
.LC8:
	.ascii	"initial thread\000"
	.align	2
.LC9:
	.ascii	"Thread %lx :\"%s\"\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L20+4
	bl	str_accumulate
	str	r0, [fp, #-12]
	sub	r0, fp, #20
	ldr	r3, .L20+8
	ldr	r2, .L20+12
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #16
	ldr	r3, .L20+16
	ldr	r2, .L20+12
	mov	r1, #0
	bl	pthread_create
	ldr	r0, .L20+20
	bl	str_accumulate
	str	r0, [fp, #-12]
	bl	pthread_self
	mov	r3, r0
	ldr	r2, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L20+24
	bl	printf
	ldr	r3, [fp, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC10
	.word	.LC3
	.word	.LC6
	.word	process
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
