	.file	"2458.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Thread1: hello world!\n"
	.text
	.globl	thread_routine1
	.type	thread_routine1, @function
thread_routine1:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	sleep@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	thread_routine1, .-thread_routine1
	.section	.rodata
.LC1:
	.string	"thread2: I'm running...\n"
	.align 8
.LC2:
	.string	"thread2: main thread id is not equal thread2\n"
.LC3:
	.string	"thread2: main thread exit!\n"
.LC4:
	.string	"thread2: exit!\n"
.LC5:
	.string	"thread2: process exit!\n"
	.text
	.globl	thread_routine2
	.type	thread_routine2, @function
thread_routine2:
.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 stdout[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	call	pthread_self@PLT
	mov	rdi, rax
	call	pthread_detach@PLT
	call	pthread_self@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_equal@PLT
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 45
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
.L4:
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE7:
	.size	thread_routine2, .-thread_routine2
	.section	.rodata
.LC6:
	.string	"create thread fail.\n"
	.align 8
.LC7:
	.string	"main thread: thread1 terminated!\n\n"
.LC8:
	.string	"main thread: exit!\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 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	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, thread_routine1[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	edi, -1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 34
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	call	pthread_self@PLT
	mov	rdx, rax
	lea	rax, -16[rbp]
	mov	rcx, rdx
	lea	rdx, thread_routine2[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	edi, -1
	call	exit@PLT
.L7:
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE8:
	.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	"2458.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Thread1: hello world!\012\000"
	.text
	.align	2
	.global	thread_routine1
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_routine1, %function
thread_routine1:
	@ 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	r3, .L3
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L3+4
	bl	fwrite
	mov	r0, #1
	bl	sleep
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	stdout
	.word	.LC0
	.size	thread_routine1, .-thread_routine1
	.section	.rodata
	.align	2
.LC1:
	.ascii	"thread2: I'm running...\012\000"
	.align	2
.LC2:
	.ascii	"thread2: main thread id is not equal thread2\012\000"
	.align	2
.LC3:
	.ascii	"thread2: main thread exit!\012\000"
	.align	2
.LC4:
	.ascii	"thread2: exit!\012\000"
	.align	2
.LC5:
	.ascii	"thread2: process exit!\012\000"
	.text
	.align	2
	.global	thread_routine2
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_routine2, %function
thread_routine2:
	@ 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, .L7
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L7+4
	bl	fwrite
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	bl	pthread_self
	mov	r3, r0
	mov	r0, r3
	bl	pthread_detach
	bl	pthread_self
	mov	r3, r0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	pthread_equal
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r2, #45
	mov	r1, #1
	ldr	r0, .L7+8
	bl	fwrite
.L6:
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	pthread_join
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L7+12
	bl	fwrite
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L7+16
	bl	fwrite
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L7+20
	bl	fwrite
	mov	r0, #0
	bl	pthread_exit
.L8:
	.align	2
.L7:
	.word	stdout
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	thread_routine2, .-thread_routine2
	.section	.rodata
	.align	2
.LC6:
	.ascii	"create thread fail.\012\000"
	.align	2
.LC7:
	.ascii	"main thread: thread1 terminated!\012\012\000"
	.align	2
.LC8:
	.ascii	"main thread: exit!\012\000"
	.align	2
.LC9:
	.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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L13+4
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L13+12
	bl	fwrite
	mvn	r0, #0
	bl	exit
.L10:
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L13+16
	ldr	r3, [r3]
	mov	r2, #34
	mov	r1, #1
	ldr	r0, .L13+20
	bl	fwrite
	bl	pthread_self
	mov	r3, r0
	sub	r0, fp, #12
	ldr	r2, .L13+24
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L13+12
	bl	fwrite
	mvn	r0, #0
	bl	exit
.L11:
	ldr	r3, .L13+16
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L13+28
	bl	fwrite
	mov	r0, #0
	bl	pthread_exit
.L14:
	.align	2
.L13:
	.word	.LC9
	.word	thread_routine1
	.word	stderr
	.word	.LC6
	.word	stdout
	.word	.LC7
	.word	thread_routine2
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
