	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lima_vm_map_page_table
_lima_vm_map_page_table:                ## @lima_vm_map_page_table
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	cmpq	%rcx, %rdx
	jg	LBB0_17
## %bb.1:
	xorl	%r15d, %r15d
	movq	_LIMA_PAGE_SIZE@GOTPCREL(%rip), %r13
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_LIMA_VM_FLAGS_CACHE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	orq	(%rdx,%r15,8), %rcx
	incq	%r15
	movq	%rcx, (%rax,%rsi,8)
	addq	(%r13), %r14
	cmpq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	jg	LBB0_16
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	%r14, %rdi
	callq	_LIMA_PBE
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_LIMA_BTE
	movq	%rax, %rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	movq	%rbx, %r12
	shlq	$4, %r12
	movq	8(%rdx,%r12), %rax
	testq	%rax, %rax
	jne	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movl	(%rax), %edi
	movq	(%r13), %rsi
	movq	_LIMA_VM_NUM_PT_PER_BT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rsi
	addq	%r12, %rdx
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	callq	_dma_alloc_wc
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdx
	movq	%rax, 8(%rdx,%r12)
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_LIMA_VM_NUM_PT_PER_BT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rbx
	movq	_LIMA_VM_NUM_PT_PER_BT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	testl	%r9d, %r9d
	jle	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %r8
	movq	(%rdx,%r12), %rdx
	cmpl	$1, %r9d
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r12
	xorl	%edi, %edi
	movq	_LIMA_VM_FLAG_PRESENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r9d, %r11d
	andl	$-2, %r11d
	movq	%rbx, %r12
	leaq	(%r8,%rbx,8), %rsi
	addq	$8, %rsi
	xorl	%edi, %edi
	movq	_LIMA_VM_FLAG_PRESENT@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rcx), %rbx
	orq	%rdx, %rbx
	movq	%rbx, -8(%rsi,%rdi,8)
	addq	(%r13), %rdx
	movq	(%rcx), %rbx
	orq	%rdx, %rbx
	movq	%rbx, (%rsi,%rdi,8)
	addq	(%r13), %rdx
	addq	$2, %rdi
	cmpq	%rdi, %r11
	jne	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, %r9b
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r8,%r12,8), %rsi
	orq	(%rcx), %rdx
	movq	%rdx, (%rsi,%rdi,8)
	jmp	LBB0_14
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_4:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rsi, %r14
	je	LBB0_6
## %bb.5:
	decq	%r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_lima_vm_unmap_page_table
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIMA_PAGE_SIZE,8,3             ## @LIMA_PAGE_SIZE
	.comm	_LIMA_VM_NUM_PT_PER_BT_SHIFT,8,3 ## @LIMA_VM_NUM_PT_PER_BT_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_LIMA_VM_NUM_PT_PER_BT,4,2      ## @LIMA_VM_NUM_PT_PER_BT
	.comm	_LIMA_VM_FLAG_PRESENT,8,3       ## @LIMA_VM_FLAG_PRESENT
	.comm	_LIMA_VM_FLAGS_CACHE,8,3        ## @LIMA_VM_FLAGS_CACHE
	.no_dead_strip	_lima_vm_map_page_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lima_vm_map_page_table
_lima_vm_map_page_table:                ; @lima_vm_map_page_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	cmp	x2, x3
	b.le	LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_3:
	mov	x21, x3
	mov	x27, x1
	mov	x19, #0
Lloh0:
	adrp	x26, _LIMA_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _LIMA_PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x28, _LIMA_VM_FLAG_PRESENT@GOTPAGE
Lloh3:
	ldr	x28, [x28, _LIMA_VM_FLAG_PRESENT@GOTPAGEOFF]
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x23, x2
Lloh4:
	adrp	x22, _LIMA_VM_FLAGS_CACHE@GOTPAGE
Lloh5:
	ldr	x22, [x22, _LIMA_VM_FLAGS_CACHE@GOTPAGEOFF]
	str	x3, [sp, #16]                   ; 8-byte Folded Spill
	ldr	x20, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x27, x21
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x27, x19, lsl #3]
	add	x19, x19, #1
	ldr	x9, [x22]
	orr	x8, x9, x8
	str	x8, [x0, x24, lsl #3]
	ldr	x8, [x26]
	add	x23, x8, x23
	cmp	x23, x21
	b.gt	LBB0_1
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	mov	x0, x23
	bl	_LIMA_PBE
	mov	x25, x0
	mov	x0, x23
	bl	_LIMA_BTE
	mov	x24, x0
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	add	x9, x8, x25, lsl #4
	ldr	x0, [x9, #8]
	cbnz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, x27
	ldr	x9, [x20, #16]
	ldr	w0, [x9]
	ldr	x9, [x26]
Lloh6:
	adrp	x10, _LIMA_VM_NUM_PT_PER_BT_SHIFT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _LIMA_VM_NUM_PT_PER_BT_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	lsl	x1, x9, x10
	lsl	x27, x25, #4
	add	x2, x8, x27
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, ___GFP_ZERO@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___GFP_ZERO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w9, w8
	bl	_dma_alloc_wc
	ldr	x10, [x20]
	add	x8, x10, x27
	str	x0, [x8, #8]
	cbz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh15:
	adrp	x8, _LIMA_VM_NUM_PT_PER_BT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LIMA_VM_NUM_PT_PER_BT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x9, [x9, #8]
Lloh18:
	adrp	x11, _LIMA_VM_NUM_PT_PER_BT_SHIFT@GOTPAGE
Lloh19:
	ldr	x11, [x11, _LIMA_VM_NUM_PT_PER_BT_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x11]
	lsl	x11, x25, x11
	add	x9, x9, x11, lsl #3
	ldr	x10, [x10, x27]
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x28]
	orr	x11, x11, x10
	str	x11, [x9], #8
	ldr	x11, [x26]
	add	x10, x11, x10
	subs	x8, x8, #1
	b.ne	LBB0_10
	b	LBB0_4
LBB0_11:
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x23, x1
	b.eq	LBB0_13
; %bb.12:
	sub	x2, x23, #1
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_lima_vm_unmap_page_table
LBB0_13:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_LIMA_PAGE_SIZE,8,3             ; @LIMA_PAGE_SIZE
	.comm	_LIMA_VM_NUM_PT_PER_BT_SHIFT,8,3 ; @LIMA_VM_NUM_PT_PER_BT_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_LIMA_VM_NUM_PT_PER_BT,4,2      ; @LIMA_VM_NUM_PT_PER_BT
	.comm	_LIMA_VM_FLAG_PRESENT,8,3       ; @LIMA_VM_FLAG_PRESENT
	.comm	_LIMA_VM_FLAGS_CACHE,8,3        ; @LIMA_VM_FLAGS_CACHE
	.no_dead_strip	_lima_vm_map_page_table
.subsections_via_symbols
