	.file	"234561.c"
	.intel_syntax noprefix
	.text
	.globl	shared_variable
	.bss
	.align 4
	.type	shared_variable, @object
	.size	shared_variable, 4
shared_variable:
	.zero	4
	.globl	my_sem
	.align 32
	.type	my_sem, @object
	.size	my_sem, 32
my_sem:
	.zero	32
	.text
	.globl	fun1
	.type	fun1, @function
fun1:
.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
	lea	rdi, my_sem[rip]
	call	sem_wait@PLT
	mov	eax, DWORD PTR shared_variable[rip]
	mov	DWORD PTR -4[rbp], eax
	add	DWORD PTR -4[rbp], 1
	mov	edi, 2
	call	sleep@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR shared_variable[rip], eax
	lea	rdi, my_sem[rip]
	call	sem_post@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	fun1, .-fun1
	.globl	fun2
	.type	fun2, @function
fun2:
.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, 16
	lea	rdi, my_sem[rip]
	call	sem_wait@PLT
	mov	eax, DWORD PTR shared_variable[rip]
	mov	DWORD PTR -4[rbp], eax
	add	DWORD PTR -4[rbp], 1
	mov	edi, 2
	call	sleep@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR shared_variable[rip], eax
	lea	rdi, my_sem[rip]
	call	sem_post@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fun2, .-fun2
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 1
	mov	esi, 0
	lea	rdi, my_sem[rip]
	call	sem_init@PLT
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, fun1[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, fun2[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	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
	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
.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	"234561.c"
	.text
	.comm	shared_variable,4,4
	.comm	my_sem,16,4
	.align	2
	.global	fun1
	.syntax unified
	.arm
	.fpu softvfp
	.type	fun1, %function
fun1:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L2
	bl	sem_wait
	ldr	r3, .L2+4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	mov	r0, #2
	bl	sleep
	ldr	r2, .L2+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r0, .L2
	bl	sem_post
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	my_sem
	.word	shared_variable
	.size	fun1, .-fun1
	.align	2
	.global	fun2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fun2, %function
fun2:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L5
	bl	sem_wait
	ldr	r3, .L5+4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	mov	r0, #2
	bl	sleep
	ldr	r2, .L5+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r0, .L5
	bl	sem_post
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	my_sem
	.word	shared_variable
	.size	fun2, .-fun2
	.section	.rodata
	.align	2
.LC0:
	.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, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #1
	mov	r1, #0
	ldr	r0, .L10+4
	bl	sem_init
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L10+8
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #12
	mov	r3, #0
	ldr	r2, .L10+12
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-12]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	my_sem
	.word	fun1
	.word	fun2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
