	.file	"62636522.c"
	.intel_syntax noprefix
	.text
	.globl	var
	.data
	.align 4
	.type	var, @object
	.size	var, 4
var:
	.long	1
	.globl	num
	.align 4
	.type	num, @object
	.size	num, 4
num:
	.long	5
	.globl	m_var
	.bss
	.align 32
	.type	m_var, @object
	.size	m_var, 40
m_var:
	.zero	40
	.globl	m_num
	.align 32
	.type	m_num, @object
	.size	m_num, 40
m_num:
	.zero	40
	.section	.rodata
.LC0:
	.string	"*"
.LC1:
	.string	"----thread %d finish\n"
.LC2:
	.string	"**"
	.text
	.globl	tfn
	.type	tfn, @function
tfn:
.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	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, m_var[rip]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR var[rip], 22
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, m_num[rip]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR num[rip], 66
	lea	rdi, m_var[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, m_num[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	pthread_exit@PLT
.L2:
	cmp	DWORD PTR -4[rbp], 2
	jne	.L3
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, m_num[rip]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR var[rip], 33
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, m_var[rip]
	call	pthread_mutex_lock@PLT
	mov	DWORD PTR num[rip], 99
	lea	rdi, m_var[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, m_num[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	pthread_exit@PLT
.L3:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	tfn, .-tfn
	.section	.rodata
.LC3:
	.string	"var = %d, num = %d\n"
	.align 8
.LC4:
	.string	"------------destroy mutex finish"
	.align 8
.LC5:
	.string	"------------join thread finish"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 0
	lea	rdi, m_var[rip]
	call	pthread_mutex_init@PLT
	mov	esi, 0
	lea	rdi, m_num[rip]
	call	pthread_mutex_init@PLT
	lea	rax, -24[rbp]
	mov	ecx, 1
	lea	rdx, tfn[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	mov	ecx, 2
	lea	rdx, tfn[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	edi, 3
	call	sleep@PLT
	mov	edx, DWORD PTR num[rip]
	mov	eax, DWORD PTR var[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, m_var[rip]
	call	pthread_mutex_destroy@PLT
	mov	DWORD PTR -32[rbp], eax
	lea	rdi, m_num[rip]
	call	pthread_mutex_destroy@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -32[rbp], 0
	jne	.L6
	cmp	DWORD PTR -28[rbp], 0
	jne	.L6
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L6:
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"62636522.c"
	.text
	.global	var
	.data
	.align	2
	.type	var, %object
	.size	var, 4
var:
	.word	1
	.global	num
	.align	2
	.type	num, %object
	.size	num, 4
num:
	.word	5
	.comm	m_var,24,4
	.comm	m_num,24,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"*\000"
	.align	2
.LC1:
	.ascii	"----thread %d finish\012\000"
	.align	2
.LC2:
	.ascii	"**\000"
	.text
	.align	2
	.global	tfn
	.syntax unified
	.arm
	.fpu softvfp
	.type	tfn, %function
tfn:
	@ 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, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bne	.L2
	ldr	r0, .L5
	bl	puts
	ldr	r0, .L5+4
	bl	pthread_mutex_lock
	ldr	r3, .L5+8
	mov	r2, #22
	str	r2, [r3]
	mov	r0, #1
	bl	sleep
	ldr	r0, .L5+12
	bl	pthread_mutex_lock
	ldr	r3, .L5+16
	mov	r2, #66
	str	r2, [r3]
	ldr	r0, .L5+4
	bl	pthread_mutex_unlock
	ldr	r0, .L5+12
	bl	pthread_mutex_unlock
	ldr	r1, [fp, #-8]
	ldr	r0, .L5+20
	bl	printf
	mov	r0, #0
	bl	pthread_exit
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	bne	.L3
	ldr	r0, .L5+24
	bl	puts
	ldr	r0, .L5+12
	bl	pthread_mutex_lock
	ldr	r3, .L5+8
	mov	r2, #33
	str	r2, [r3]
	mov	r0, #1
	bl	sleep
	ldr	r0, .L5+4
	bl	pthread_mutex_lock
	ldr	r3, .L5+16
	mov	r2, #99
	str	r2, [r3]
	ldr	r0, .L5+4
	bl	pthread_mutex_unlock
	ldr	r0, .L5+12
	bl	pthread_mutex_unlock
	ldr	r1, [fp, #-8]
	ldr	r0, .L5+20
	bl	printf
	mov	r0, #0
	bl	pthread_exit
.L3:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	m_var
	.word	var
	.word	m_num
	.word	num
	.word	.LC1
	.word	.LC2
	.size	tfn, .-tfn
	.section	.rodata
	.align	2
.LC3:
	.ascii	"var = %d, num = %d\012\000"
	.align	2
.LC4:
	.ascii	"------------destroy mutex finish\000"
	.align	2
.LC5:
	.ascii	"------------join thread finish\000"
	.align	2
.LC6:
	.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
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L11+4
	bl	pthread_mutex_init
	mov	r1, #0
	ldr	r0, .L11+8
	bl	pthread_mutex_init
	sub	r0, fp, #24
	mov	r3, #1
	ldr	r2, .L11+12
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #20
	mov	r3, #2
	ldr	r2, .L11+12
	mov	r1, #0
	bl	pthread_create
	mov	r0, #3
	bl	sleep
	ldr	r3, .L11+16
	ldr	r3, [r3]
	ldr	r2, .L11+20
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L11+24
	bl	printf
	ldr	r0, .L11+4
	bl	pthread_mutex_destroy
	str	r0, [fp, #-16]
	ldr	r0, .L11+8
	bl	pthread_mutex_destroy
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L11+28
	bl	puts
.L8:
	ldr	r3, [fp, #-24]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r0, .L11+32
	bl	puts
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC6
	.word	m_var
	.word	m_num
	.word	tfn
	.word	var
	.word	num
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
