	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_get_doc                     ## -- Begin function do_get_doc
	.p2align	4, 0x90
_do_get_doc:                            ## @do_get_doc
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, %r15
	movq	%rcx, %r14
	movq	%rdx, %r12
	movl	%esi, %r13d
	xorl	%esi, %esi
	callq	_get_volume_f
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movl	%r13d, %esi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_doc_lookup
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:
	xorl	%r12d, %r12d
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_12
## %bb.4:
	movq	(%r15), %rax
	movq	%rax, -48(%rbp)
	movq	(%r14), %rdi
	cmpl	%r13d, (%rdi)
	jg	LBB0_5
## %bb.8:
	addq	$16, %rdi
	callq	_pthread_mutex_lock
	movq	(%r14), %rdi
	cmpl	%r13d, (%rdi)
	jle	LBB0_10
## %bb.9:
	addq	$16, %rdi
	callq	_pthread_mutex_unlock
	movq	(%r14), %rdi
LBB0_5:
	incl	%r13d
	leaq	-48(%rbp), %rcx
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_doc_lookup
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	_STORAGE_ERR_WRONG_SECRET@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
LBB0_7:
	movq	-48(%rbp), %rbx
	jmp	LBB0_11
LBB0_1:
	movq	_STORAGE_ERR_UNKNOWN_VOLUME_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	sete	%al
	movzbl	%al, %edi
	callq	_assert
	movq	(%r14), %rdi
	movq	8(%rdi), %rbx
	addq	$16, %rdi
	callq	_pthread_mutex_unlock
LBB0_11:
	subl	(%r15), %ebx
	addl	$-8, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_STORAGE_ERR_UNKNOWN_VOLUME_ID,4,2 ## @STORAGE_ERR_UNKNOWN_VOLUME_ID
	.comm	_STORAGE_ERR_WRONG_SECRET,4,2   ## @STORAGE_ERR_WRONG_SECRET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_get_doc                     ; -- Begin function do_get_doc
	.p2align	2
_do_get_doc:                            ; @do_get_doc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	w1, #0
	bl	_get_volume_f
	str	x0, [x21]
	cbz	x0, LBB0_9
; %bb.1:
	mov	x1, x22
	mov	x2, x23
	mov	x3, x20
	bl	_doc_lookup
	cbnz	w0, LBB0_13
; %bb.2:
	cbz	x19, LBB0_12
; %bb.3:
	ldr	x8, [x20]
	str	x8, [sp, #8]
	ldr	x0, [x21]
	ldr	w8, [x0]
	cmp	w8, w22
	b.gt	LBB0_6
; %bb.4:
	add	x0, x0, #16
	bl	_pthread_mutex_lock
	ldr	x8, [x21]
	ldr	w9, [x8]
	cmp	w9, w22
	b.le	LBB0_10
; %bb.5:
	add	x0, x8, #16
	bl	_pthread_mutex_unlock
	ldr	x0, [x21]
LBB0_6:
	add	w1, w22, #1
	add	x3, sp, #8
	mov	x2, #0
	bl	_doc_lookup
	cbz	w0, LBB0_8
; %bb.7:
Lloh0:
	adrp	x8, _STORAGE_ERR_WRONG_SECRET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STORAGE_ERR_WRONG_SECRET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_12
LBB0_8:
	ldr	x21, [sp, #8]
	b	LBB0_11
LBB0_9:
Lloh3:
	adrp	x8, _STORAGE_ERR_UNKNOWN_VOLUME_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STORAGE_ERR_UNKNOWN_VOLUME_ID@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_10:
	cset	w0, eq
	bl	_assert
	ldr	x8, [x21]
	ldr	x21, [x8, #8]
	add	x0, x8, #16
	bl	_pthread_mutex_unlock
LBB0_11:
	ldr	w8, [x20]
	sub	w8, w21, w8
	sub	w8, w8, #8
	str	w8, [x19]
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_STORAGE_ERR_UNKNOWN_VOLUME_ID,4,2 ; @STORAGE_ERR_UNKNOWN_VOLUME_ID
	.comm	_STORAGE_ERR_WRONG_SECRET,4,2   ; @STORAGE_ERR_WRONG_SECRET
.subsections_via_symbols
