	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmz_get_chunk_mapping          ## -- Begin function dmz_get_chunk_mapping
	.p2align	4, 0x90
_dmz_get_chunk_mapping:                 ## @dmz_get_chunk_mapping
	.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
	movl	%esi, %r14d
	movq	_DMZ_MAP_ENTRIES_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%esi, %eax
	shrq	%cl, %rax
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	8(%rdi), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	(%rax), %r13
	movq	_DMZ_MAP_ENTRIES_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	movslq	%eax, %r15
	callq	_dmz_lock_map
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	xorl	%ebx, %ebx
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13,%r15,4), %edi
	callq	_le32_to_cpu
	movq	_DMZ_MAP_UNMAPPED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	_REQ_OP_WRITE@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_16
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	_DMZ_ALLOC_RND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_dmz_alloc_zone
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%rax, %rsi
	movl	%r14d, %edx
	callq	_dmz_map_zone
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_dmz_get
	cmpl	%r14d, (%rax)
	jne	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_dmz_seq_write_err
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_dmz_handle_seq_write_err
	testl	%eax, %eax
	jne	LBB0_6
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	_DMZ_SEQ_WRITE_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$4, %rsi
	callq	_clear_bit
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	%rbx, %rdi
	callq	_dmz_in_reclaim
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_dmz_wait_for_reclaim
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	callq	_dmz_bdev_is_dying
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_dmz_wait_for_free_zones
	jmp	LBB0_1
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	jmp	LBB0_16
LBB0_15:
	movq	%rbx, %rdi
	callq	_dmz_activate_zone
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_dmz_lru_zone
LBB0_16:
	movq	%r12, %rdi
	callq	_dmz_unlock_map
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMZ_MAP_ENTRIES_SHIFT,4,2      ## @DMZ_MAP_ENTRIES_SHIFT
	.comm	_DMZ_MAP_ENTRIES_MASK,4,2       ## @DMZ_MAP_ENTRIES_MASK
	.comm	_DMZ_MAP_UNMAPPED,4,2           ## @DMZ_MAP_UNMAPPED
	.comm	_REQ_OP_WRITE,4,2               ## @REQ_OP_WRITE
	.comm	_DMZ_ALLOC_RND,4,2              ## @DMZ_ALLOC_RND
	.comm	_EIO,4,2                        ## @EIO
	.comm	_DMZ_SEQ_WRITE_ERR,4,2          ## @DMZ_SEQ_WRITE_ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmz_get_chunk_mapping          ; -- Begin function dmz_get_chunk_mapping
	.p2align	2
_dmz_get_chunk_mapping:                 ; @dmz_get_chunk_mapping
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _DMZ_MAP_ENTRIES_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMZ_MAP_ENTRIES_SHIFT@GOTPAGEOFF]
	ldr	x9, [x0, #8]
Lloh2:
	ldr	w8, [x8]
	mov	w10, w1
	lsr	x8, x10, x8
	ldr	x8, [x9, x8, lsl #3]
	ldr	x23, [x8]
Lloh3:
	adrp	x8, _DMZ_MAP_ENTRIES_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMZ_MAP_ENTRIES_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w1
	sxtw	x24, w8
	bl	_dmz_lock_map
	mov	x22, #0
Lloh6:
	adrp	x25, _DMZ_MAP_UNMAPPED@GOTPAGE
Lloh7:
	ldr	x25, [x25, _DMZ_MAP_UNMAPPED@GOTPAGEOFF]
Lloh8:
	adrp	x26, _REQ_OP_WRITE@GOTPAGE
Lloh9:
	ldr	x26, [x26, _REQ_OP_WRITE@GOTPAGEOFF]
Lloh10:
	adrp	x27, _DMZ_ALLOC_RND@GOTPAGE
Lloh11:
	ldr	x27, [x27, _DMZ_ALLOC_RND@GOTPAGEOFF]
Lloh12:
	adrp	x28, _DMZ_SEQ_WRITE_ERR@GOTPAGE
Lloh13:
	ldr	x28, [x28, _DMZ_SEQ_WRITE_ERR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23, x24, lsl #2]
	bl	_le32_to_cpu
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x26]
	cmp	w8, w20
	b.ne	LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x27]
	mov	x0, x19
	bl	_dmz_alloc_zone
	cbz	x0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_dmz_map_zone
	b	LBB0_9
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x1, x0
	mov	x0, x19
	bl	_dmz_get
	ldr	w8, [x0]
	cmp	w8, w21
	b.ne	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x22, x0
	bl	_dmz_seq_write_err
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_dmz_handle_seq_write_err
	cbnz	w0, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x28]
	add	x1, x22, #4
	bl	_clear_bit
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x22
	bl	_dmz_in_reclaim
	cbz	x0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_dmz_wait_for_reclaim
	b	LBB0_1
LBB0_11:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x19]
	bl	_dmz_bdev_is_dying
	cbnz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_dmz_wait_for_free_zones
	mov	x22, #0
	b	LBB0_1
LBB0_13:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x22, x0
	b	LBB0_15
LBB0_14:
	mov	x0, x22
	bl	_dmz_activate_zone
	mov	x0, x19
	mov	x1, x22
	bl	_dmz_lru_zone
LBB0_15:
	mov	x0, x19
	bl	_dmz_unlock_map
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DMZ_MAP_ENTRIES_SHIFT,4,2      ; @DMZ_MAP_ENTRIES_SHIFT
	.comm	_DMZ_MAP_ENTRIES_MASK,4,2       ; @DMZ_MAP_ENTRIES_MASK
	.comm	_DMZ_MAP_UNMAPPED,4,2           ; @DMZ_MAP_UNMAPPED
	.comm	_REQ_OP_WRITE,4,2               ; @REQ_OP_WRITE
	.comm	_DMZ_ALLOC_RND,4,2              ; @DMZ_ALLOC_RND
	.comm	_EIO,4,2                        ; @EIO
	.comm	_DMZ_SEQ_WRITE_ERR,4,2          ; @DMZ_SEQ_WRITE_ERR
.subsections_via_symbols
