	.file	"extr_pthread_rwlock_timedrdlock.c_pthread_rwlock_timedrdlock.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pthread_rwlock_timedrdlock
	.type	pthread_rwlock_timedrdlock, @function
pthread_rwlock_timedrdlock:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	test	rdi, rdi
	je	.L20
	mov	rbp, QWORD PTR [rdi]
	test	rbp, rbp
	je	.L20
	cmp	rbp, QWORD PTR PTHREAD_RWLOCK_INITIALIZER[rip]
	mov	r13, rsi
	je	.L22
.L5:
	mov	rax, QWORD PTR PTW32_RWLOCK_MAGIC[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L8
.L20:
	mov	r12d, DWORD PTR EINVAL[rip]
.L1:
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	lea	r14, 24[rbp]
	mov	rsi, r13
	mov	rdi, r14
	call	pthread_mutex_timedlock@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rax, QWORD PTR 8[rbp]
	add	rax, 1
	cmp	rax, QWORD PTR INT_MAX[rip]
	mov	QWORD PTR 8[rbp], rax
	je	.L23
.L9:
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	rdi, r14
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	pthread_mutex_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	QWORD PTR 8[rsp], rdi
	call	ptw32_rwlock_check_need_init@PLT
	mov	rdi, QWORD PTR 8[rsp]
	test	eax, eax
	mov	r12d, eax
	je	.L7
	cmp	DWORD PTR EBUSY[rip], eax
	jne	.L1
.L7:
	mov	rbp, QWORD PTR [rdi]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	lea	r15, 28[rbp]
	mov	rsi, r13
	mov	rdi, r15
	call	pthread_mutex_timedlock@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L10
	cmp	DWORD PTR ETIMEDOUT[rip], eax
	jne	.L19
	add	QWORD PTR 16[rbp], 1
.L19:
	mov	rdi, r14
	call	pthread_mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 16[rbp]
	sub	QWORD PTR 8[rbp], rax
	mov	rdi, r15
	mov	QWORD PTR 16[rbp], 0
	call	pthread_mutex_unlock@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L9
	jmp	.L19
	.cfi_endproc
.LFE0:
	.size	pthread_rwlock_timedrdlock, .-pthread_rwlock_timedrdlock
	.comm	PTW32_RWLOCK_MAGIC,8,8
	.comm	PTHREAD_RWLOCK_INITIALIZER,8,8
	.comm	INT_MAX,8,8
	.comm	ETIMEDOUT,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pthread_rwlock_timedrdlock.c_pthread_rwlock_timedrdlock.c"
	.text
	.align	2
	.global	pthread_rwlock_timedrdlock
	.syntax unified
	.arm
	.fpu softvfp
	.type	pthread_rwlock_timedrdlock, %function
pthread_rwlock_timedrdlock:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r4, r0, #0
	beq	.L20
	ldr	r5, [r4]
	cmp	r5, #0
	beq	.L20
	ldr	r3, .L24
	mov	r7, r1
	ldr	r3, [r3]
	cmp	r5, r3
	beq	.L22
.L5:
	ldr	r3, .L24+4
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L8
.L20:
	ldr	r3, .L24+8
	ldr	r6, [r3]
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	add	r4, r5, #12
	mov	r0, r4
	mov	r1, r7
	bl	pthread_mutex_timedlock
	subs	r6, r0, #0
	bne	.L1
	ldr	r2, .L24+12
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [r5, #4]
	beq	.L23
.L9:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	pthread_mutex_unlock
.L22:
	bl	ptw32_rwlock_check_need_init
	subs	r6, r0, #0
	beq	.L7
	ldr	r3, .L24+16
	ldr	r3, [r3]
	cmp	r3, r6
	bne	.L1
.L7:
	ldr	r5, [r4]
	b	.L5
.L23:
	add	r8, r5, #16
	mov	r1, r7
	mov	r0, r8
	bl	pthread_mutex_timedlock
	subs	r6, r0, #0
	beq	.L10
	ldr	r3, .L24+20
	ldr	r3, [r3]
	cmp	r3, r6
	ldreq	r3, [r5, #8]
	addeq	r3, r3, #1
	streq	r3, [r5, #8]
.L19:
	mov	r0, r4
	bl	pthread_mutex_unlock
	b	.L1
.L10:
	ldr	r3, [r5, #4]
	ldr	r2, [r5, #8]
	mov	r0, r8
	sub	r3, r3, r2
	stmib	r5, {r3, r6}
	bl	pthread_mutex_unlock
	subs	r6, r0, #0
	beq	.L9
	b	.L19
.L25:
	.align	2
.L24:
	.word	PTHREAD_RWLOCK_INITIALIZER
	.word	PTW32_RWLOCK_MAGIC
	.word	EINVAL
	.word	INT_MAX
	.word	EBUSY
	.word	ETIMEDOUT
	.size	pthread_rwlock_timedrdlock, .-pthread_rwlock_timedrdlock
	.comm	PTW32_RWLOCK_MAGIC,4,4
	.comm	PTHREAD_RWLOCK_INITIALIZER,4,4
	.comm	INT_MAX,4,4
	.comm	ETIMEDOUT,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
