	.file	"395264.c"
	.intel_syntax noprefix
	.text
	.globl	mutex_
	.bss
	.align 32
	.type	mutex_, @object
	.size	mutex_, 40
mutex_:
	.zero	40
	.globl	sem_
	.align 32
	.type	sem_, @object
	.size	sem_, 32
sem_:
	.zero	32
	.section	.rodata
.LC0:
	.string	"Start Clean up..."
	.text
	.globl	Cleanup
	.type	Cleanup, @function
Cleanup:
.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
	lea	rdi, .LC0[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Cleanup, .-Cleanup
	.section	.rodata
.LC1:
	.string	"In running..."
.LC2:
	.string	"Finished...."
	.text
	.globl	RunFunc
	.type	RunFunc, @function
RunFunc:
.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, 160
	mov	QWORD PTR -152[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, Cleanup[rip]
	mov	QWORD PTR -128[rbp], rax
	mov	QWORD PTR -120[rbp], 0
	lea	rax, -112[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	__sigsetjmp@PLT
	endbr64
	mov	DWORD PTR -132[rbp], eax
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR -120[rbp]
	mov	rdx, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	rdx
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	__pthread_unwind_next@PLT
.L4:
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	__pthread_register_cancel@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	sleep@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	__pthread_unregister_cancel@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdx, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	rdx
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	RunFunc, .-RunFunc
	.section	.rodata
.LC3:
	.string	"Func2 post..."
.LC4:
	.string	"Func2 lock..."
.LC5:
	.string	"Func2 locked."
	.text
	.globl	Func2
	.type	Func2, @function
Func2:
.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
.L8:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, sem_[rip]
	call	sem_post@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, mutex_[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L8
	.cfi_endproc
.LFE8:
	.size	Func2, .-Func2
	.section	.rodata
.LC6:
	.string	"Func1 wait..."
.LC7:
	.string	"Func1 runing..."
	.text
	.globl	Func1
	.type	Func1, @function
Func1:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
.L10:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, sem_[rip]
	call	sem_wait@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, mutex_[rip]
	call	pthread_mutex_unlock@PLT
	jmp	.L10
	.cfi_endproc
.LFE9:
	.size	Func1, .-Func1
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 0
	lea	rdi, sem_[rip]
	call	sem_init@PLT
	mov	esi, 0
	lea	rdi, mutex_[rip]
	call	pthread_mutex_init@PLT
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, Func1[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, Func2[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	call	getchar@PLT
	lea	rdi, mutex_[rip]
	call	pthread_mutex_destroy@PLT
	lea	rdi, sem_[rip]
	call	sem_destroy@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.weak	__pthread_unwind_next
	.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	"395264.c"
	.text
	.comm	mutex_,24,4
	.comm	sem_,16,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Start Clean up...\000"
	.text
	.align	2
	.global	Cleanup
	.syntax unified
	.arm
	.fpu softvfp
	.type	Cleanup, %function
Cleanup:
	@ 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, .L2
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	Cleanup, .-Cleanup
	.section	.rodata
	.align	2
.LC1:
	.ascii	"In running...\000"
	.align	2
.LC2:
	.ascii	"Finished....\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	RunFunc
	.syntax unified
	.arm
	.fpu softvfp
	.type	RunFunc, %function
RunFunc:
	@ args = 0, pretend = 0, frame = 312
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #312
	str	r0, [fp, #-312]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L9+4
	str	r3, [fp, #-304]
	mov	r3, #0
	str	r3, [fp, #-300]
	sub	r3, fp, #292
	mov	r1, #0
	mov	r0, r3
	bl	__sigsetjmp
	mov	r3, r0
	str	r3, [fp, #-296]
	ldr	r3, [fp, #-296]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-304]
	ldr	r0, [fp, #-300]
	blx	r3
	sub	r3, fp, #292
	mov	r0, r3
	bl	__pthread_unwind_next
.L6:
	sub	r3, fp, #292
	mov	r0, r3
	bl	__pthread_register_cancel
	ldr	r0, .L9+8
	bl	puts
	mov	r0, #1
	bl	sleep
	ldr	r0, .L9+12
	bl	puts
	sub	r3, fp, #292
	mov	r0, r3
	bl	__pthread_unregister_cancel
	ldr	r3, [fp, #-304]
	ldr	r0, [fp, #-300]
	blx	r3
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	Cleanup
	.word	.LC1
	.word	.LC2
	.size	RunFunc, .-RunFunc
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Func2 post...\000"
	.align	2
.LC5:
	.ascii	"Func2 lock...\000"
	.align	2
.LC6:
	.ascii	"Func2 locked.\000"
	.text
	.align	2
	.global	Func2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Func2, %function
Func2:
	@ 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]
.L12:
	ldr	r0, .L13
	bl	puts
	ldr	r0, .L13+4
	bl	sem_post
	ldr	r0, .L13+8
	bl	puts
	ldr	r0, .L13+12
	bl	pthread_mutex_lock
	ldr	r0, .L13+16
	bl	puts
	b	.L12
.L14:
	.align	2
.L13:
	.word	.LC4
	.word	sem_
	.word	.LC5
	.word	mutex_
	.word	.LC6
	.size	Func2, .-Func2
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Func1 wait...\000"
	.align	2
.LC8:
	.ascii	"Func1 runing...\000"
	.text
	.align	2
	.global	Func1
	.syntax unified
	.arm
	.fpu softvfp
	.type	Func1, %function
Func1:
	@ 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]
.L16:
	ldr	r0, .L17
	bl	puts
	ldr	r0, .L17+4
	bl	sem_wait
	ldr	r0, .L17+8
	bl	puts
	ldr	r0, .L17+12
	bl	pthread_mutex_unlock
	b	.L16
.L18:
	.align	2
.L17:
	.word	.LC7
	.word	sem_
	.word	.LC8
	.word	mutex_
	.size	Func1, .-Func1
	.section	.rodata
	.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 = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L22+4
	bl	sem_init
	mov	r1, #0
	ldr	r0, .L22+8
	bl	pthread_mutex_init
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L22+12
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #12
	mov	r3, #0
	ldr	r2, .L22+16
	mov	r1, #0
	bl	pthread_create
	bl	getchar
	ldr	r0, .L22+8
	bl	pthread_mutex_destroy
	ldr	r0, .L22+4
	bl	sem_destroy
	mov	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC9
	.word	sem_
	.word	mutex_
	.word	Func1
	.word	Func2
	.size	main, .-main
	.weak	__pthread_unwind_next
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
