	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_rwlock_timedrdlock     ## -- Begin function pthread_rwlock_timedrdlock
	.p2align	4, 0x90
_pthread_rwlock_timedrdlock:            ## @pthread_rwlock_timedrdlock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_2
## %bb.3:
	movq	%rsi, %r15
	movq	_PTHREAD_RWLOCK_INITIALIZER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	callq	_pte_rwlock_check_need_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	movq	_EBUSY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_14
LBB0_6:
	movq	(%rbx), %r13
LBB0_7:
	movq	(%r13), %rax
	movq	_PTE_RWLOCK_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.8:
	leaq	24(%r13), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_pthread_mutex_timedlock
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	8(%r13), %rax
	incq	%rax
	movq	%rax, 8(%r13)
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.10:
	leaq	28(%r13), %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_pthread_mutex_timedlock
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	movl	%eax, %r12d
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_13
## %bb.12:
	incq	16(%r13)
	jmp	LBB0_13
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_14:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	16(%r13), %rax
	subq	%rax, 8(%r13)
	movq	$0, 16(%r13)
	movq	%rbx, %rdi
	callq	_pthread_mutex_unlock
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r12d
LBB0_13:
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	jmp	LBB0_14
LBB0_17:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTHREAD_RWLOCK_INITIALIZER,8,3 ## @PTHREAD_RWLOCK_INITIALIZER
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PTE_RWLOCK_MAGIC,8,3           ## @PTE_RWLOCK_MAGIC
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_rwlock_timedrdlock     ; -- Begin function pthread_rwlock_timedrdlock
	.p2align	2
_pthread_rwlock_timedrdlock:            ; @pthread_rwlock_timedrdlock
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_12
; %bb.1:
	mov	x20, x0
	ldr	x23, [x0]
	cbz	x23, LBB0_12
; %bb.2:
	mov	x19, x1
Lloh0:
	adrp	x8, _PTHREAD_RWLOCK_INITIALIZER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTHREAD_RWLOCK_INITIALIZER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x23, x8
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_pte_rwlock_check_need_init
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_13
LBB0_5:
	ldr	x23, [x20]
LBB0_6:
	ldr	x8, [x23]
Lloh6:
	adrp	x9, _PTE_RWLOCK_MAGIC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PTE_RWLOCK_MAGIC@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.7:
	add	x20, x23, #24
	mov	x0, x20
	mov	x1, x19
	bl	_pthread_mutex_timedlock
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.8:
	ldr	x8, [x23, #8]
	add	x8, x8, #1
	str	x8, [x23, #8]
Lloh9:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.9:
	add	x22, x23, #28
	mov	x0, x22
	mov	x1, x19
	bl	_pthread_mutex_timedlock
	cbz	w0, LBB0_14
; %bb.10:
	mov	x21, x0
Lloh12:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_16
; %bb.11:
	ldr	x8, [x23, #16]
	add	x8, x8, #1
	str	x8, [x23, #16]
	b	LBB0_16
LBB0_12:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	ldp	x9, x8, [x23, #8]
	sub	x8, x9, x8
	stp	x8, xzr, [x23, #8]
	mov	x0, x22
	bl	_pthread_mutex_unlock
	cbz	w0, LBB0_17
; %bb.15:
	mov	x21, x0
LBB0_16:
	mov	x0, x20
	bl	_pthread_mutex_unlock
	b	LBB0_13
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_pthread_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTHREAD_RWLOCK_INITIALIZER,8,3 ; @PTHREAD_RWLOCK_INITIALIZER
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PTE_RWLOCK_MAGIC,8,3           ; @PTE_RWLOCK_MAGIC
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
