	.file	"97013528.c"
	.intel_syntax noprefix
	.text
	.globl	rwlock_init
	.type	rwlock_init, @function
rwlock_init:
.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 -8[rbp]
	mov	DWORD PTR 64[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 1
	mov	esi, 0
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 32
	mov	edx, 1
	mov	esi, 0
	mov	rdi, rax
	call	sem_init@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	rwlock_init, .-rwlock_init
	.globl	rwlock_acquire_readlock
	.type	rwlock_acquire_readlock, @function
rwlock_acquire_readlock:
.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
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 64[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 64[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 64[rax]
	cmp	eax, 1
	jne	.L3
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 32
	mov	rdi, rax
	call	sem_wait@PLT
.L3:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	rwlock_acquire_readlock, .-rwlock_acquire_readlock
	.globl	rwlock_release_readlock
	.type	rwlock_release_readlock, @function
rwlock_release_readlock:
.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
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	sem_wait@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 64[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 64[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 64[rax]
	test	eax, eax
	jne	.L5
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 32
	mov	rdi, rax
	call	sem_post@PLT
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	rwlock_release_readlock, .-rwlock_release_readlock
	.globl	rwlock_acquire_writelock
	.type	rwlock_acquire_writelock, @function
rwlock_acquire_writelock:
.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
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 32
	mov	rdi, rax
	call	sem_wait@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	rwlock_acquire_writelock, .-rwlock_acquire_writelock
	.globl	rwlock_release_writelock
	.type	rwlock_release_writelock, @function
rwlock_release_writelock:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 32
	mov	rdi, rax
	call	sem_post@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	rwlock_release_writelock, .-rwlock_release_writelock
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"97013528.c"
	.text
	.align	2
	.global	rwlock_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	rwlock_init, %function
rwlock_init:
	@ 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, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #32]
	ldr	r3, [fp, #-8]
	mov	r2, #1
	mov	r1, #0
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-8]
	add	r3, r3, #16
	mov	r2, #1
	mov	r1, #0
	mov	r0, r3
	bl	sem_init
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rwlock_init, .-rwlock_init
	.align	2
	.global	rwlock_acquire_readlock
	.syntax unified
	.arm
	.fpu softvfp
	.type	rwlock_acquire_readlock, %function
rwlock_acquire_readlock:
	@ 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, [fp, #-8]
	mov	r0, r3
	bl	sem_wait
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #32]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #32]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #32]
	cmp	r3, #1
	bne	.L3
	ldr	r3, [fp, #-8]
	add	r3, r3, #16
	mov	r0, r3
	bl	sem_wait
.L3:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	sem_post
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rwlock_acquire_readlock, .-rwlock_acquire_readlock
	.align	2
	.global	rwlock_release_readlock
	.syntax unified
	.arm
	.fpu softvfp
	.type	rwlock_release_readlock, %function
rwlock_release_readlock:
	@ 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, [fp, #-8]
	mov	r0, r3
	bl	sem_wait
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #32]
	sub	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #32]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #32]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-8]
	add	r3, r3, #16
	mov	r0, r3
	bl	sem_post
.L5:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	sem_post
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rwlock_release_readlock, .-rwlock_release_readlock
	.align	2
	.global	rwlock_acquire_writelock
	.syntax unified
	.arm
	.fpu softvfp
	.type	rwlock_acquire_writelock, %function
rwlock_acquire_writelock:
	@ 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, [fp, #-8]
	add	r3, r3, #16
	mov	r0, r3
	bl	sem_wait
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rwlock_acquire_writelock, .-rwlock_acquire_writelock
	.align	2
	.global	rwlock_release_writelock
	.syntax unified
	.arm
	.fpu softvfp
	.type	rwlock_release_writelock, %function
rwlock_release_writelock:
	@ 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, [fp, #-8]
	add	r3, r3, #16
	mov	r0, r3
	bl	sem_post
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rwlock_release_writelock, .-rwlock_release_writelock
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	mov	r3, #0
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
