	.file	"extr_kern_umtx.c_do_rw_rdlock.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"urdlck"
	.text
	.p2align 4
	.type	do_rw_rdlock, @function
do_rw_rdlock:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	r12, QWORD PTR [rdi]
	lea	rdi, 8[rbx]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	lea	rsi, 40[rsp]
	call	fueword32@PLT
	cmp	eax, -1
	je	.L65
	mov	rdi, QWORD PTR 40[rsp]
	call	GET_SHARE@PLT
	mov	esi, DWORD PTR TYPE_RWLOCK[rip]
	mov	rcx, r12
	mov	rdi, rbx
	mov	edx, eax
	call	umtx_key_get@PLT
	test	eax, eax
	jne	.L1
	lea	rdx, 36[rsp]
	test	r15, r15
	je	.L4
	mov	rdi, rdx
	mov	rsi, r15
	mov	QWORD PTR [rsp], rdx
	call	abs_timeout_init2@PLT
	mov	rdx, QWORD PTR [rsp]
.L4:
	mov	r13, QWORD PTR URWLOCK_WRITE_OWNER[rip]
	or	r14, QWORD PTR 40[rsp]
	test	QWORD PTR URWLOCK_PREFER_READER[rip], r14
	jne	.L5
	or	r13, QWORD PTR URWLOCK_WRITE_WAITERS[rip]
.L5:
	test	r15, r15
	mov	eax, 0
	lea	r14, 56[rsp]
	cmovne	rax, rdx
	mov	QWORD PTR 8[rsp], rax
	lea	rax, 48[rsp]
	mov	QWORD PTR [rsp], rax
	lea	rax, 4[rbx]
	mov	QWORD PTR 16[rsp], rax
.L6:
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, rbx
	call	fueword32@PLT
	cmp	eax, -1
	je	.L7
	mov	rdi, QWORD PTR 48[rsp]
	test	r13, rdi
	je	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rsi, QWORD PTR 48[rsp]
	mov	rdx, r14
	mov	rdi, rbx
	lea	rcx, 1[rsi]
	call	casueword32@PLT
	cmp	eax, -1
	je	.L7
	test	eax, eax
	je	.L67
	mov	esi, 1
	mov	rdi, rbp
	call	umtxq_check_susp@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L13
	mov	rdi, QWORD PTR 56[rsp]
	mov	QWORD PTR 48[rsp], rdi
	test	rdi, r13
	jne	.L9
.L8:
	call	URWLOCK_READER_COUNT@PLT
	xor	edi, edi
	cmp	QWORD PTR URWLOCK_MAX_READERS[rip], rax
	sete	dil
	call	__predict_false@PLT
	test	rax, rax
	je	.L10
	mov	rdi, r12
	call	umtx_key_release@PLT
	mov	eax, DWORD PTR EAGAIN[rip]
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rbx, QWORD PTR 72[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L68
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	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
.L7:
	.cfi_restore_state
	mov	rdi, r12
	call	umtx_key_release@PLT
.L65:
	mov	eax, DWORD PTR EFAULT[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, r12
	call	umtxq_lock@PLT
	mov	rdi, r12
	call	umtxq_busy@PLT
	mov	rdi, r12
	call	umtxq_unlock@PLT
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, rbx
	call	fueword32@PLT
	cmp	eax, -1
	jne	.L20
	mov	r15d, DWORD PTR EFAULT[rip]
	test	r15d, r15d
	je	.L20
.L62:
	mov	rdi, r12
	call	umtxq_unbusy_unlocked@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rcx, QWORD PTR URWLOCK_READ_WAITERS[rip]
	test	rsi, rcx
	jne	.L19
	or	rcx, rsi
	mov	rdx, r14
	mov	rdi, rbx
	call	casueword32@PLT
	cmp	eax, -1
	je	.L69
	mov	rdx, QWORD PTR 56[rsp]
	test	eax, eax
	je	.L70
	xor	esi, esi
	mov	rdi, rbp
	mov	QWORD PTR 48[rsp], rdx
	call	umtxq_check_susp@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L62
.L20:
	mov	rsi, QWORD PTR 48[rsp]
	test	rsi, r13
	jne	.L21
.L25:
	mov	rdi, r12
	call	umtxq_unbusy_unlocked@PLT
	mov	esi, 1
	mov	rdi, rbp
	call	umtxq_check_susp@PLT
	mov	r15d, eax
	test	eax, eax
	je	.L6
.L13:
	mov	rdi, r12
	call	umtx_key_release@PLT
	cmp	DWORD PTR ERESTART[rip], r15d
	mov	eax, r15d
	jne	.L1
	mov	eax, DWORD PTR EINTR[rip]
	jmp	.L1
.L70:
	xor	edi, edi
	cmp	QWORD PTR 48[rsp], rdx
	sete	dil
	call	MPASS@PLT
.L19:
	lea	rax, 64[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	mov	rsi, rax
	mov	QWORD PTR 24[rsp], rax
	call	fueword32@PLT
	cmp	eax, -1
	je	.L64
	mov	rax, QWORD PTR 64[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	lea	rsi, 1[rax]
	call	suword32@PLT
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, r12
	call	umtxq_lock@PLT
	mov	rdi, r12
	call	umtxq_insert@PLT
	mov	rdi, r12
	call	umtxq_unbusy@PLT
	mov	rdx, QWORD PTR 8[rsp]
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	call	umtxq_sleep@PLT
	mov	rdi, r12
	mov	r15d, eax
	call	umtxq_busy@PLT
	mov	rdi, r12
	call	umtxq_remove@PLT
	mov	rdi, r12
	call	umtxq_unlock@PLT
	test	r15d, r15d
	jne	.L28
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, rbx
	call	fueword32@PLT
	cmp	eax, -1
	je	.L71
.L27:
	test	QWORD PTR 48[rsp], r13
	jne	.L29
	xor	r15d, r15d
.L28:
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	call	fueword32@PLT
	cmp	eax, -1
	je	.L64
	mov	rax, QWORD PTR 64[rsp]
	mov	rdi, QWORD PTR 16[rsp]
	lea	rsi, -1[rax]
	call	suword32@PLT
	cmp	QWORD PTR 64[rsp], 1
	je	.L72
.L31:
	mov	rdi, r12
	call	umtxq_unbusy_unlocked@PLT
	test	r15d, r15d
	je	.L6
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L67:
	mov	rax, QWORD PTR 48[rsp]
	xor	edi, edi
	cmp	QWORD PTR 56[rsp], rax
	sete	dil
	call	MPASS@PLT
	mov	rdi, r12
	call	umtx_key_release@PLT
	xor	eax, eax
	jmp	.L1
.L69:
	mov	r15d, DWORD PTR EFAULT[rip]
	test	r15d, r15d
	jne	.L62
	test	QWORD PTR 48[rsp], r13
	je	.L25
	jmp	.L19
.L71:
	mov	r15d, DWORD PTR EFAULT[rip]
	jmp	.L28
.L72:
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, rbx
	call	fueword32@PLT
	cmp	eax, -1
	jne	.L32
	jmp	.L64
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rdx, QWORD PTR 56[rsp]
	test	eax, eax
	je	.L73
	xor	esi, esi
	mov	rdi, rbp
	mov	QWORD PTR 48[rsp], rdx
	call	umtxq_check_susp@PLT
	test	eax, eax
	jne	.L74
.L32:
	mov	rcx, QWORD PTR URWLOCK_READ_WAITERS[rip]
	mov	rsi, QWORD PTR 48[rsp]
	mov	rdx, r14
	mov	rdi, rbx
	not	rcx
	and	rcx, rsi
	call	casueword32@PLT
	cmp	eax, -1
	jne	.L33
	mov	r15d, DWORD PTR EFAULT[rip]
	jmp	.L31
.L73:
	xor	edi, edi
	cmp	QWORD PTR 48[rsp], rdx
	sete	dil
	call	MPASS@PLT
	jmp	.L31
.L74:
	test	r15d, r15d
	cmove	r15d, eax
	jmp	.L62
.L64:
	mov	rdi, r12
	call	umtxq_unbusy_unlocked@PLT
	mov	r15d, DWORD PTR EFAULT[rip]
	jmp	.L13
.L68:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	do_rw_rdlock, .-do_rw_rdlock
	.comm	URWLOCK_WRITE_WAITERS,8,8
	.comm	URWLOCK_WRITE_OWNER,8,8
	.comm	URWLOCK_READ_WAITERS,8,8
	.comm	URWLOCK_PREFER_READER,8,8
	.comm	URWLOCK_MAX_READERS,8,8
	.comm	TYPE_RWLOCK,4,4
	.comm	ERESTART,4,4
	.comm	EINTR,4,4
	.comm	EFAULT,4,4
	.comm	EAGAIN,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_kern_umtx.c_do_rw_rdlock.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"urdlck\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_rw_rdlock, %function
do_rw_rdlock:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	sub	sp, sp, #44
	mov	r9, r3
	ldr	r3, .L80
	add	r0, r1, #8
	mov	r5, r1
	add	r1, sp, #20
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ldr	r8, [r6]
	bl	fueword32
	cmn	r0, #1
	beq	.L70
	ldr	r3, .L80+4
	ldr	r0, [sp, #20]
	ldr	r4, [r3]
	bl	GET_SHARE
	mov	r1, r4
	mov	r2, r0
	mov	r3, r8
	mov	r0, r5
	bl	umtx_key_get
	subs	r4, r0, #0
	bne	.L1
	cmp	r9, #0
	add	r4, sp, #16
	beq	.L4
	mov	r0, r4
	mov	r1, r9
	bl	abs_timeout_init2
.L4:
	ldr	r3, .L80+8
	ldr	r2, [sp, #20]
	ldr	r1, [r3]
	orr	r2, r7, r2
	ldr	r3, .L80+12
	tst	r2, r1
	ldr	r7, [r3]
	ldreq	r3, .L80+16
	ldr	r10, .L80+20
	ldreq	r3, [r3]
	ldr	fp, .L80+24
	orreq	r7, r7, r3
	cmp	r9, #0
	movne	r3, r4
	moveq	r3, #0
	ldr	r9, .L80+28
	str	r3, [sp, #4]
.L6:
	mov	r0, r5
	add	r1, sp, #24
	bl	fueword32
	cmn	r0, #1
	beq	.L7
	ldr	r0, [sp, #24]
	tst	r7, r0
	beq	.L8
	b	.L9
.L10:
	ldr	r1, [sp, #24]
	mov	r0, r5
	add	r2, sp, #28
	add	r3, r1, #1
	bl	casueword32
	cmn	r0, #1
	beq	.L7
	cmp	r0, #0
	beq	.L72
	mov	r1, #1
	mov	r0, r6
	bl	umtxq_check_susp
	cmp	r0, #0
	bne	.L60
	ldr	r0, [sp, #28]
	tst	r0, r7
	str	r0, [sp, #24]
	bne	.L9
.L8:
	bl	URWLOCK_READER_COUNT
	ldr	r3, [r9]
	sub	r0, r3, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	__predict_false
	cmp	r0, #0
	beq	.L10
	mov	r0, r8
	bl	umtx_key_release
	ldr	r3, .L80+32
	ldr	r4, [r3]
.L1:
	ldr	r3, .L80
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L73
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	mov	r0, r8
	bl	umtx_key_release
.L70:
	ldr	r3, .L80+36
	ldr	r4, [r3]
	b	.L1
.L9:
	mov	r0, r8
	bl	umtxq_lock
	mov	r0, r8
	bl	umtxq_busy
	mov	r0, r8
	bl	umtxq_unlock
	mov	r0, r5
	add	r1, sp, #24
	bl	fueword32
	cmn	r0, #1
	bne	.L20
	ldr	r3, .L80+36
	ldr	r4, [r3]
	cmp	r4, #0
	beq	.L20
.L15:
	mov	r0, r8
	bl	umtxq_unbusy_unlocked
	b	.L13
.L21:
	ldr	r3, [r10]
	ands	r4, r1, r3
	bne	.L19
	mov	r0, r5
	orr	r3, r1, r3
	add	r2, sp, #28
	bl	casueword32
	cmn	r0, #1
	beq	.L74
	cmp	r0, #0
	ldr	r3, [sp, #28]
	beq	.L75
	mov	r1, r4
	mov	r0, r6
	str	r3, [sp, #24]
	bl	umtxq_check_susp
	cmp	r0, #0
	bne	.L62
.L20:
	ldr	r1, [sp, #24]
	tst	r1, r7
	bne	.L21
.L25:
	mov	r0, r8
	bl	umtxq_unbusy_unlocked
	mov	r1, #1
	mov	r0, r6
	bl	umtxq_check_susp
	subs	r4, r0, #0
	beq	.L6
.L13:
	mov	r0, r8
	bl	umtx_key_release
	ldr	r3, .L80+40
	ldr	r3, [r3]
	cmp	r3, r4
	ldreq	r3, .L80+44
	ldreq	r4, [r3]
	b	.L1
.L75:
	ldr	r0, [sp, #24]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	MPASS
.L19:
	add	r3, r5, #4
	mov	r0, r3
	add	r1, sp, #32
	str	r3, [sp, #8]
	bl	fueword32
	cmn	r0, #1
	beq	.L69
	ldr	r1, [sp, #32]
	ldr	r0, [sp, #8]
	add	r1, r1, #1
	bl	suword32
	ldr	r4, [sp, #4]
	str	r6, [sp, #12]
	b	.L27
.L29:
	mov	r0, r8
	bl	umtxq_lock
	mov	r0, r8
	bl	umtxq_insert
	mov	r0, r8
	bl	umtxq_unbusy
	mov	r2, r4
	mov	r1, fp
	mov	r0, r8
	bl	umtxq_sleep
	mov	r6, r0
	mov	r0, r8
	bl	umtxq_busy
	mov	r0, r8
	bl	umtxq_remove
	mov	r0, r8
	bl	umtxq_unlock
	cmp	r6, #0
	bne	.L64
	mov	r0, r5
	add	r1, sp, #24
	bl	fueword32
	cmn	r0, #1
	beq	.L76
.L27:
	ldr	r0, [sp, #24]
	ands	r6, r7, r0
	bne	.L29
.L64:
	mov	r4, r6
	ldr	r6, [sp, #12]
.L28:
	ldr	r0, [sp, #8]
	add	r1, sp, #32
	bl	fueword32
	cmn	r0, #1
	beq	.L69
	ldr	r1, [sp, #32]
	ldr	r0, [sp, #8]
	sub	r1, r1, #1
	bl	suword32
	ldr	r3, [sp, #32]
	cmp	r3, #1
	beq	.L77
.L31:
	mov	r0, r8
	bl	umtxq_unbusy_unlocked
	cmp	r4, #0
	beq	.L6
	b	.L13
.L72:
	ldr	r3, [sp, #24]
	mov	r4, r0
	ldr	r0, [sp, #28]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	MPASS
	mov	r0, r8
	bl	umtx_key_release
	b	.L1
.L60:
	mov	r4, r0
	b	.L13
.L74:
	ldr	r3, .L80+36
	ldr	r4, [r3]
	cmp	r4, #0
	bne	.L15
	ldr	r3, [sp, #24]
	tst	r7, r3
	beq	.L25
	b	.L19
.L76:
	ldr	r3, .L80+36
	ldr	r6, [sp, #12]
	ldr	r4, [r3]
	b	.L28
.L62:
	mov	r4, r0
	b	.L15
.L77:
	mov	r0, r5
	add	r1, sp, #24
	bl	fueword32
	cmn	r0, #1
	bne	.L32
	b	.L69
.L33:
	cmp	r0, #0
	ldr	r3, [sp, #28]
	beq	.L78
	mov	r1, #0
	mov	r0, r6
	str	r3, [sp, #24]
	bl	umtxq_check_susp
	cmp	r0, #0
	bne	.L79
.L32:
	ldr	r1, [sp, #24]
	ldr	r3, [r10]
	mov	r0, r5
	bic	r3, r1, r3
	add	r2, sp, #28
	bl	casueword32
	cmn	r0, #1
	bne	.L33
	ldr	r3, .L80+36
	ldr	r4, [r3]
	b	.L31
.L78:
	ldr	r0, [sp, #24]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	MPASS
	b	.L31
.L79:
	mov	r3, r0
	cmp	r4, #0
	mov	r0, r8
	moveq	r4, r3
	bl	umtxq_unbusy_unlocked
	b	.L13
.L69:
	mov	r0, r8
	bl	umtxq_unbusy_unlocked
	ldr	r3, .L80+36
	ldr	r4, [r3]
	b	.L13
.L73:
	bl	__stack_chk_fail
.L81:
	.align	2
.L80:
	.word	.LC1
	.word	TYPE_RWLOCK
	.word	URWLOCK_PREFER_READER
	.word	URWLOCK_WRITE_OWNER
	.word	URWLOCK_WRITE_WAITERS
	.word	URWLOCK_READ_WAITERS
	.word	.LC0
	.word	URWLOCK_MAX_READERS
	.word	EAGAIN
	.word	EFAULT
	.word	ERESTART
	.word	EINTR
	.size	do_rw_rdlock, .-do_rw_rdlock
	.comm	URWLOCK_WRITE_WAITERS,4,4
	.comm	URWLOCK_WRITE_OWNER,4,4
	.comm	URWLOCK_READ_WAITERS,4,4
	.comm	URWLOCK_PREFER_READER,4,4
	.comm	URWLOCK_MAX_READERS,4,4
	.comm	TYPE_RWLOCK,4,4
	.comm	ERESTART,4,4
	.comm	EINTR,4,4
	.comm	EFAULT,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
