	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function doc_lookup
_doc_lookup:                            ## @doc_lookup
	.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
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, %rbx
	leaq	24(%rdi), %r12
	movq	%r12, %rdi
	callq	_pthread_mutex_lock
	testl	%r13d, %r13d
	jle	LBB0_2
## %bb.1:
	cmpl	%r13d, (%rbx)
	jge	LBB0_3
LBB0_2:
	movq	%r12, %rdi
	callq	_pthread_mutex_unlock
	movq	_STORAGE_ERR_ILLEGAL_LOCAL_ID@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	4(%rbx), %eax
	cmpl	%r13d, %eax
	jge	LBB0_4
## %bb.5:
	notl	%eax
	addl	%r13d, %eax
	movl	%eax, %ecx
	sarl	$11, %ecx
	movslq	%ecx, %rcx
	shlq	$3, %rcx
	addq	16(%rbx), %rcx
	andl	$2047, %eax                     ## imm = 0x7FF
	movl	%eax, %r13d
	movq	%rcx, %rbx
	jmp	LBB0_6
LBB0_4:
	addq	$8, %rbx
LBB0_6:
	movq	(%rbx), %rax
	movl	%r13d, %ecx
	movq	(%rax,%rcx,8), %rbx
	movq	%r12, %rdi
	callq	_pthread_mutex_unlock
	movq	_FILE_OFFSET_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%rbx, %rax
	movq	%rax, (%r14)
	xorq	%rbx, %r15
	movq	_STORAGE_SECRET_MASK@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	testq	%r15, (%rcx)
	je	LBB0_9
## %bb.7:
	movq	_STORAGE_ERR_WRONG_SECRET@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_STORAGE_ERR_ILLEGAL_LOCAL_ID,4,2 ## @STORAGE_ERR_ILLEGAL_LOCAL_ID
	.comm	_FILE_OFFSET_MASK,8,3           ## @FILE_OFFSET_MASK
	.comm	_STORAGE_SECRET_MASK,8,3        ## @STORAGE_SECRET_MASK
	.comm	_STORAGE_ERR_WRONG_SECRET,4,2   ## @STORAGE_ERR_WRONG_SECRET
	.no_dead_strip	_doc_lookup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function doc_lookup
_doc_lookup:                            ; @doc_lookup
	.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
	mov	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x23, x0
	add	x21, x0, #24
	mov	x0, x21
	bl	_pthread_mutex_lock
	cmp	w22, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	w8, [x23]
	cmp	w8, w22
	b.ge	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_pthread_mutex_unlock
Lloh0:
	adrp	x8, _STORAGE_ERR_ILLEGAL_LOCAL_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STORAGE_ERR_ILLEGAL_LOCAL_ID@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_3:
	ldr	w8, [x23, #4]
	cmp	w8, w22
	b.ge	LBB0_5
; %bb.4:
	mvn	w8, w8
	add	w9, w8, w22
	ldr	x8, [x23, #16]
	asr	w10, w9, #11
	add	x8, x8, w10, sxtw #3
	and	w22, w9, #0x7ff
	b	LBB0_6
LBB0_5:
	add	x8, x23, #8
LBB0_6:
	ldr	x8, [x8]
	ldr	x22, [x8, w22, uxtw #3]
	mov	x0, x21
	bl	_pthread_mutex_unlock
Lloh3:
	adrp	x8, _FILE_OFFSET_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FILE_OFFSET_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	and	x8, x8, x22
	str	x8, [x20]
	eor	x8, x22, x19
Lloh6:
	adrp	x9, _STORAGE_SECRET_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _STORAGE_SECRET_MASK@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _STORAGE_ERR_WRONG_SECRET@GOTPAGE
Lloh10:
	ldr	x10, [x10, _STORAGE_ERR_WRONG_SECRET@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	x9, x8
	csel	w0, wzr, w10, eq
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_STORAGE_ERR_ILLEGAL_LOCAL_ID,4,2 ; @STORAGE_ERR_ILLEGAL_LOCAL_ID
	.comm	_FILE_OFFSET_MASK,8,3           ; @FILE_OFFSET_MASK
	.comm	_STORAGE_SECRET_MASK,8,3        ; @STORAGE_SECRET_MASK
	.comm	_STORAGE_ERR_WRONG_SECRET,4,2   ; @STORAGE_ERR_WRONG_SECRET
	.no_dead_strip	_doc_lookup
.subsections_via_symbols
