	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bitmap_load                    ## -- Begin function bitmap_load
	.p2align	4, 0x90
_bitmap_load:                           ## @bitmap_load
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	48(%rdi), %r14
	xorl	%r15d, %r15d
	testq	%r14, %r14
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r12
	cmpq	$0, (%rdi)
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	leaq	-40(%rbp), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_bitmap_start_sync
	addq	-40(%rbp), %rbx
	cmpq	(%r12), %rbx
	jl	LBB0_3
LBB0_4:
	movq	%r14, %rdi
	callq	_bitmap_close_sync
	cmpq	$0, 8(%r12)
	je	LBB0_7
## %bb.5:
	movq	(%r14), %rax
	cmpq	16(%r12), %rax
	jne	LBB0_6
LBB0_7:
	movq	24(%r12), %r15
	jmp	LBB0_8
LBB0_6:
	xorl	%r15d, %r15d
LBB0_8:
	leaq	44(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_bitmap_init_from_disk
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	jne	LBB0_11
## %bb.9:
	movq	_BITMAP_STALE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %r15
	movq	%r15, %rsi
	callq	_clear_bit
	movq	_MD_RECOVERY_NEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rsi
	callq	_set_bit
	movl	40(%r12), %eax
	movq	32(%r12), %rdi
	movl	%eax, (%rdi)
	callq	_md_wakeup_thread
	movq	%r14, %rdi
	callq	_bitmap_update_sb
	movq	_BITMAP_WRITE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	movl	$0, %r15d
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BITMAP_STALE,4,2               ## @BITMAP_STALE
	.comm	_MD_RECOVERY_NEEDED,4,2         ## @MD_RECOVERY_NEEDED
	.comm	_BITMAP_WRITE_ERROR,4,2         ## @BITMAP_WRITE_ERROR
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bitmap_load                    ; -- Begin function bitmap_load
	.p2align	2
_bitmap_load:                           ; @bitmap_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x19, [x0, #48]
	cbz	x19, LBB0_11
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	bl	_bitmap_start_sync
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	add	x21, x8, x21
	cmp	x21, x9
	b.lt	LBB0_3
LBB0_4:
	mov	x0, x19
	bl	_bitmap_close_sync
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x8, [x19]
	ldr	x9, [x20, #16]
	cmp	x8, x9
	b.ne	LBB0_7
LBB0_6:
	ldr	x21, [x20, #24]
	b	LBB0_8
LBB0_7:
	mov	x21, #0
LBB0_8:
	add	x22, x20, #44
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x21
	bl	_bitmap_init_from_disk
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	cbnz	w21, LBB0_12
; %bb.9:
Lloh0:
	adrp	x8, _BITMAP_STALE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BITMAP_STALE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x21, x19, #8
	mov	x1, x21
	bl	_clear_bit
Lloh3:
	adrp	x8, _MD_RECOVERY_NEEDED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MD_RECOVERY_NEEDED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	x1, [x19, #16]
	bl	_set_bit
	ldr	w8, [x20, #40]
	ldr	x0, [x20, #32]
	str	w8, [x0]
	bl	_md_wakeup_thread
	mov	x0, x19
	bl	_bitmap_update_sb
Lloh6:
	adrp	x8, _BITMAP_WRITE_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BITMAP_WRITE_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_11
; %bb.10:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_11:
	mov	w21, #0
LBB0_12:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BITMAP_STALE,4,2               ; @BITMAP_STALE
	.comm	_MD_RECOVERY_NEEDED,4,2         ; @MD_RECOVERY_NEEDED
	.comm	_BITMAP_WRITE_ERROR,4,2         ; @BITMAP_WRITE_ERROR
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
