	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _hl_mmu_map
__hl_mmu_map:                           ## @_hl_mmu_map
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, -160(%rbp)                ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movl	$0, -56(%rbp)
	movl	$0, -52(%rbp)
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_PAGE_SIZE_2MB@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	24(%rdx), %ecx
	movq	%rdx, -152(%rbp)                ## 8-byte Spill
	movl	28(%rdx), %edx
	movq	%rsi, %rdi
	movq	%r15, %rsi
	callq	_hl_mem_area_inside_range
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	cmpq	%r15, %r13
	je	LBB0_3
## %bb.2:
	movq	-152(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_49
LBB0_3:
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	movq	%r13, -136(%rbp)                ## 8-byte Spill
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_get_hop0_addr
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_get_hop0_pte_addr
	movq	%rax, %r15
	movq	(%rax), %rsi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_get_alloc_next_hop_addr
	movq	_ULLONG_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	jne	LBB0_13
## %bb.4:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	jmp	LBB0_5
LBB0_13:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_get_hop1_pte_addr
	movq	%rax, %r13
	movq	(%rax), %rsi
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_get_alloc_next_hop_addr
	movq	_ULLONG_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movq	%rax, %r15
	jmp	LBB0_5
LBB0_15:
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_get_hop2_pte_addr
	movq	%rax, %r15
	movq	(%rax), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_get_alloc_next_hop_addr
	movq	_ULLONG_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.16:
	xorl	%esi, %esi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%rax, %rbx
	jmp	LBB0_5
LBB0_17:
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	movq	%r15, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_get_hop3_pte_addr
	movq	%rax, %r13
	movq	(%rax), %rsi
	movq	-136(%rbp), %r15                ## 8-byte Reload
	cmpq	-96(%rbp), %r15                 ## 8-byte Folded Reload
	jne	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rax
	xorl	%r12d, %r12d
	jmp	LBB0_22
LBB0_19:
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_get_alloc_next_hop_addr
	movq	%rax, %rsi
	movq	_ULLONG_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_21
## %bb.20:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_21:
	movq	%rbx, %rdi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdx
	callq	_get_hop4_pte_addr
	movq	(%rax), %rsi
	movq	%rax, %r12
LBB0_22:
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	cmpq	$0, 8(%rbx)
	je	LBB0_31
## %bb.23:
	cmpl	$0, -100(%rbp)                  ## 4-byte Folded Reload
	je	LBB0_31
## %bb.24:
	movq	_PTE_PHYS_ADDR_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	16(%rbx), %rdi
	andq	%rdx, %rdi
	movq	_LAST_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	movq	_PAGE_PRESENT_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	movq	%r8, %rcx
	orq	%r9, %rcx
	orq	%rdi, %rcx
	cmpq	%rcx, %rsi
	jne	LBB0_25
## %bb.26:
	cmpl	$0, -56(%rbp)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_30
## %bb.27:
	cmpl	$0, -52(%rbp)
	jne	LBB0_30
## %bb.28:
	cmpl	$0, -48(%rbp)
	jne	LBB0_30
## %bb.29:
	cmpl	$0, -44(%rbp)
	je	LBB0_33
LBB0_30:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_44
LBB0_31:
	movq	_PAGE_PRESENT_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	testq	%rsi, %r9
	je	LBB0_32
## %bb.41:
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%rbx), %edi
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rdx
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_dbg
	movl	(%rbx), %edi
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rdx
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_dbg
	movl	(%rbx), %edi
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rdx
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_dbg
	movl	(%rbx), %edi
	movq	(%r13), %rdx
	leaq	L_.str.7(%rip), %rsi
	movq	%r13, %rcx
	callq	_dev_dbg
	cmpq	-96(%rbp), %r15                 ## 8-byte Folded Reload
	je	LBB0_43
## %bb.42:
	movl	(%rbx), %edi
	movq	(%r12), %rdx
	leaq	L_.str.8(%rip), %rsi
	movq	%r12, %rcx
	callq	_dev_dbg
	jmp	LBB0_43
LBB0_25:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_43:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_44:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
LBB0_5:
	cmpl	$0, -44(%rbp)
	je	LBB0_7
## %bb.6:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_free_hop
LBB0_7:
	cmpl	$0, -48(%rbp)
	je	LBB0_9
## %bb.8:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_free_hop
LBB0_9:
	cmpl	$0, -52(%rbp)
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_free_hop
LBB0_11:
	negl	%r12d
	cmpl	$0, -56(%rbp)
	je	LBB0_49
## %bb.12:
	movq	%rbx, %rdi
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	callq	_free_hop
LBB0_49:
	movl	%r12d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	movq	_PTE_PHYS_ADDR_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_LAST_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_33:
	orq	%r8, %r9
	andq	-160(%rbp), %rdx                ## 8-byte Folded Reload
	orq	%r9, %rdx
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_write_final_pte
	cmpl	$0, -56(%rbp)
	movq	-144(%rbp), %r14                ## 8-byte Reload
	je	LBB0_35
## %bb.34:
	movq	_PTE_PHYS_ADDR_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	andq	%r14, %rdx
	movq	_PAGE_PRESENT_MASK@GOTPCREL(%rip), %rax
	orq	(%rax), %rdx
	movq	%rbx, %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	callq	_write_pte
LBB0_35:
	cmpl	$0, -52(%rbp)
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_37
## %bb.36:
	movq	_PTE_PHYS_ADDR_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	andq	%r15, %rdx
	movq	_PAGE_PRESENT_MASK@GOTPCREL(%rip), %rax
	orq	(%rax), %rdx
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	callq	_write_pte
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_get_pte
LBB0_37:
	cmpl	$0, -48(%rbp)
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_39
## %bb.38:
	movq	_PTE_PHYS_ADDR_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	andq	%r14, %rdx
	movq	_PAGE_PRESENT_MASK@GOTPCREL(%rip), %rax
	orq	(%rax), %rdx
	movq	%rbx, %rdi
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	callq	_write_pte
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_get_pte
LBB0_39:
	cmpq	%r12, -136(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_45
## %bb.40:
	movq	%r14, %rsi
	jmp	LBB0_48
LBB0_45:
	cmpl	$0, -44(%rbp)
	je	LBB0_46
## %bb.47:
	movq	_PTE_PHYS_ADDR_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	andq	%r15, %rdx
	movq	_PAGE_PRESENT_MASK@GOTPCREL(%rip), %rax
	orq	(%rax), %rdx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_write_pte
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_get_pte
	movq	%r15, %rsi
	jmp	LBB0_48
LBB0_46:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
LBB0_48:
	movq	%rbx, %rdi
	callq	_get_pte
	movq	%rbx, %rdi
	callq	_flush
	xorl	%r12d, %r12d
	jmp	LBB0_49
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE_2MB,8,3              ## @PAGE_SIZE_2MB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DRAM mapping should use huge pages only\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_ULLONG_MAX,8,3                 ## @ULLONG_MAX
	.comm	_PTE_PHYS_ADDR_MASK,8,3         ## @PTE_PHYS_ADDR_MASK
	.comm	_LAST_MASK,8,3                  ## @LAST_MASK
	.comm	_PAGE_PRESENT_MASK,8,3          ## @PAGE_PRESENT_MASK
L_.str.1:                               ## @.str.1
	.asciz	"DRAM: mapping already exists for virt_addr 0x%llx\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"DRAM mapping should not allocate more hops\n"

L_.str.3:                               ## @.str.3
	.asciz	"mapping already exists for virt_addr 0x%llx\n"

L_.str.4:                               ## @.str.4
	.asciz	"hop0 pte: 0x%llx (0x%llx)\n"

L_.str.5:                               ## @.str.5
	.asciz	"hop1 pte: 0x%llx (0x%llx)\n"

L_.str.6:                               ## @.str.6
	.asciz	"hop2 pte: 0x%llx (0x%llx)\n"

L_.str.7:                               ## @.str.7
	.asciz	"hop3 pte: 0x%llx (0x%llx)\n"

L_.str.8:                               ## @.str.8
	.asciz	"hop4 pte: 0x%llx (0x%llx)\n"

	.no_dead_strip	__hl_mmu_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _hl_mmu_map
__hl_mmu_map:                           ; @_hl_mmu_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x23, x3
	mov	x28, x2
	mov	x26, x1
	mov	x19, x0
	ldr	x22, [x0]
	stp	xzr, xzr, [sp, #64]
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _PAGE_SIZE_2MB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE_2MB@GOTPAGEOFF]
Lloh5:
	ldr	x24, [x8]
	ldp	w3, w2, [x22, #24]
	mov	x0, x1
	mov	x1, x23
	bl	_hl_mem_area_inside_range
	cmp	w0, #0
	ccmp	x24, x23, #4, ne
	b.ne	LBB0_3
; %bb.1:
	mov	x27, x0
	mov	x0, x19
	bl	_get_hop0_addr
	mov	x1, x0
	mov	x0, x19
	mov	x2, x26
	bl	_get_hop0_pte_addr
	mov	x25, x0
	ldr	x1, [x0]
	add	x2, sp, #76
	mov	x0, x19
	bl	_get_alloc_next_hop_addr
Lloh6:
	adrp	x20, _ULLONG_MAX@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ULLONG_MAX@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	str	x0, [sp, #56]                   ; 8-byte Folded Spill
	b.ne	LBB0_4
; %bb.2:
	mov	x20, #0
	mov	x22, #0
	mov	x1, #0
	b	LBB0_26
LBB0_3:
	ldr	w0, [x22]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _EFAULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_34
LBB0_4:
	mov	x1, x0
	mov	x0, x19
	mov	x2, x26
	bl	_get_hop1_pte_addr
	str	x0, [sp, #48]                   ; 8-byte Folded Spill
	ldr	x1, [x0]
	add	x2, sp, #72
	mov	x0, x19
	bl	_get_alloc_next_hop_addr
	mov	x9, x0
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x22, #0
	mov	x1, #0
	mov	x20, x9
	b	LBB0_26
LBB0_6:
	mov	x0, x19
	str	x9, [sp, #40]                   ; 8-byte Folded Spill
	mov	x1, x9
	mov	x2, x26
	bl	_get_hop2_pte_addr
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	ldr	x1, [x0]
	add	x2, sp, #68
	mov	x0, x19
	bl	_get_alloc_next_hop_addr
	mov	x9, x0
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x1, #0
	ldr	x20, [sp, #40]                  ; 8-byte Folded Reload
	mov	x22, x9
	b	LBB0_26
LBB0_8:
	mov	x0, x19
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	mov	x1, x9
	mov	x2, x26
	bl	_get_hop3_pte_addr
	ldr	x1, [x0]
	cmp	x24, x23
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	b.ne	LBB0_10
; %bb.9:
	str	xzr, [sp, #16]                  ; 8-byte Folded Spill
	mov	x20, #0
	mov	x8, x0
	ldr	x9, [x22, #8]
	cbnz	x9, LBB0_13
	b	LBB0_20
LBB0_10:
	add	x2, sp, #64
	mov	x0, x19
	bl	_get_alloc_next_hop_addr
	mov	x1, x0
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.11:
	ldr	x20, [sp, #40]                  ; 8-byte Folded Reload
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_26
LBB0_12:
	mov	x0, x19
	str	x1, [sp, #16]                   ; 8-byte Folded Spill
	mov	x2, x26
	bl	_get_hop4_pte_addr
	mov	x8, x0
	ldr	x1, [x0]
	mov	x20, x0
	ldr	x9, [x22, #8]
	cbz	x9, LBB0_20
LBB0_13:
	cbz	w27, LBB0_20
; %bb.14:
Lloh13:
	adrp	x9, _PTE_PHYS_ADDR_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PTE_PHYS_ADDR_MASK@GOTPAGEOFF]
	ldr	x11, [x22, #16]
Lloh15:
	ldr	x10, [x9]
	and	x9, x10, x11
Lloh16:
	adrp	x11, _LAST_MASK@GOTPAGE
Lloh17:
	ldr	x11, [x11, _LAST_MASK@GOTPAGEOFF]
Lloh18:
	ldr	x11, [x11]
	orr	x12, x9, x11
Lloh19:
	adrp	x9, _PAGE_PRESENT_MASK@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PAGE_PRESENT_MASK@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	orr	x12, x12, x9
	cmp	x1, x12
	b.ne	LBB0_23
; %bb.15:
	ldr	w12, [sp, #76]
	cbnz	w12, LBB0_19
; %bb.16:
	ldr	w12, [sp, #72]
	cbnz	w12, LBB0_19
; %bb.17:
	ldr	w12, [sp, #68]
	cbnz	w12, LBB0_19
; %bb.18:
	ldr	w12, [sp, #64]
	cbz	w12, LBB0_36
LBB0_19:
	ldr	w0, [x22]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh24:
	adrp	x8, _EFAULT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_25
LBB0_20:
Lloh26:
	adrp	x9, _PAGE_PRESENT_MASK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _PAGE_PRESENT_MASK@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	tst	x9, x1
	b.eq	LBB0_35
; %bb.21:
	ldr	w0, [x22]
	str	x26, [sp]
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	ldr	w0, [x22]
	ldr	x2, [x25]
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x3, x25
	bl	_dev_dbg
	ldr	w0, [x22]
	ldr	x3, [sp, #48]                   ; 8-byte Folded Reload
	ldr	x2, [x3]
Lloh33:
	adrp	x1, l_.str.5@PAGE
Lloh34:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x22]
	ldr	x3, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x2, [x3]
Lloh35:
	adrp	x1, l_.str.6@PAGE
Lloh36:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x22]
	ldr	x3, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x2, [x3]
Lloh37:
	adrp	x1, l_.str.7@PAGE
Lloh38:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_dbg
	cmp	x24, x23
	b.eq	LBB0_24
; %bb.22:
	ldr	w0, [x22]
	ldr	x2, [x20]
Lloh39:
	adrp	x1, l_.str.8@PAGE
Lloh40:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x3, x20
	bl	_dev_dbg
	b	LBB0_24
LBB0_23:
	ldr	w0, [x22]
	str	x26, [sp]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_24:
Lloh43:
	adrp	x8, _EINVAL@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_25:
	ldr	w21, [x8]
	ldr	x20, [sp, #40]                  ; 8-byte Folded Reload
	ldp	x1, x22, [sp, #16]              ; 16-byte Folded Reload
LBB0_26:
	ldr	w8, [sp, #64]
	cbz	w8, LBB0_28
; %bb.27:
	mov	x0, x19
	bl	_free_hop
LBB0_28:
	ldr	w8, [sp, #68]
	cbz	w8, LBB0_30
; %bb.29:
	mov	x0, x19
	mov	x1, x22
	bl	_free_hop
LBB0_30:
	neg	w22, w21
	ldr	w8, [sp, #72]
	cbz	w8, LBB0_32
; %bb.31:
	mov	x0, x19
	mov	x1, x20
	bl	_free_hop
LBB0_32:
	ldr	w8, [sp, #76]
	cbz	w8, LBB0_34
; %bb.33:
	mov	x0, x19
	ldr	x1, [sp, #56]                   ; 8-byte Folded Reload
	bl	_free_hop
LBB0_34:
	mov	x0, x22
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_35:
Lloh45:
	adrp	x10, _PTE_PHYS_ADDR_MASK@GOTPAGE
Lloh46:
	ldr	x10, [x10, _PTE_PHYS_ADDR_MASK@GOTPAGEOFF]
Lloh47:
	ldr	x10, [x10]
Lloh48:
	adrp	x11, _LAST_MASK@GOTPAGE
Lloh49:
	ldr	x11, [x11, _LAST_MASK@GOTPAGEOFF]
Lloh50:
	ldr	x11, [x11]
LBB0_36:
	and	x10, x10, x28
	orr	x10, x10, x11
	orr	x2, x10, x9
	mov	x0, x19
	mov	x1, x8
	bl	_write_final_pte
	ldr	w8, [sp, #76]
	ldr	x20, [sp, #56]                  ; 8-byte Folded Reload
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	cbz	w8, LBB0_38
; %bb.37:
Lloh51:
	adrp	x8, _PTE_PHYS_ADDR_MASK@GOTPAGE
Lloh52:
	ldr	x8, [x8, _PTE_PHYS_ADDR_MASK@GOTPAGEOFF]
Lloh53:
	ldr	x8, [x8]
	and	x8, x8, x20
Lloh54:
	adrp	x9, _PAGE_PRESENT_MASK@GOTPAGE
Lloh55:
	ldr	x9, [x9, _PAGE_PRESENT_MASK@GOTPAGEOFF]
Lloh56:
	ldr	x9, [x9]
	orr	x2, x8, x9
	mov	x0, x19
	mov	x1, x25
	bl	_write_pte
LBB0_38:
	ldr	w8, [sp, #72]
	ldr	x21, [sp, #40]                  ; 8-byte Folded Reload
	cbz	w8, LBB0_40
; %bb.39:
Lloh57:
	adrp	x8, _PTE_PHYS_ADDR_MASK@GOTPAGE
Lloh58:
	ldr	x8, [x8, _PTE_PHYS_ADDR_MASK@GOTPAGEOFF]
Lloh59:
	ldr	x8, [x8]
	and	x8, x8, x21
Lloh60:
	adrp	x9, _PAGE_PRESENT_MASK@GOTPAGE
Lloh61:
	ldr	x9, [x9, _PAGE_PRESENT_MASK@GOTPAGEOFF]
Lloh62:
	ldr	x9, [x9]
	orr	x2, x8, x9
	mov	x0, x19
	ldr	x1, [sp, #48]                   ; 8-byte Folded Reload
	bl	_write_pte
	mov	x0, x19
	mov	x1, x20
	bl	_get_pte
LBB0_40:
	ldr	w8, [sp, #68]
	cbz	w8, LBB0_42
; %bb.41:
Lloh63:
	adrp	x8, _PTE_PHYS_ADDR_MASK@GOTPAGE
Lloh64:
	ldr	x8, [x8, _PTE_PHYS_ADDR_MASK@GOTPAGEOFF]
Lloh65:
	ldr	x8, [x8]
	and	x8, x8, x22
Lloh66:
	adrp	x9, _PAGE_PRESENT_MASK@GOTPAGE
Lloh67:
	ldr	x9, [x9, _PAGE_PRESENT_MASK@GOTPAGEOFF]
Lloh68:
	ldr	x9, [x9]
	orr	x2, x8, x9
	mov	x0, x19
	ldr	x1, [sp, #32]                   ; 8-byte Folded Reload
	bl	_write_pte
	mov	x0, x19
	mov	x1, x21
	bl	_get_pte
LBB0_42:
	cmp	x24, x23
	b.ne	LBB0_44
; %bb.43:
	mov	x1, x22
	b	LBB0_47
LBB0_44:
	ldr	w8, [sp, #64]
	cbz	w8, LBB0_46
; %bb.45:
Lloh69:
	adrp	x8, _PTE_PHYS_ADDR_MASK@GOTPAGE
Lloh70:
	ldr	x8, [x8, _PTE_PHYS_ADDR_MASK@GOTPAGEOFF]
Lloh71:
	ldr	x8, [x8]
	ldp	x1, x20, [sp, #8]               ; 16-byte Folded Reload
	and	x8, x8, x20
Lloh72:
	adrp	x9, _PAGE_PRESENT_MASK@GOTPAGE
Lloh73:
	ldr	x9, [x9, _PAGE_PRESENT_MASK@GOTPAGEOFF]
Lloh74:
	ldr	x9, [x9]
	orr	x2, x8, x9
	mov	x0, x19
	bl	_write_pte
	mov	x0, x19
	mov	x1, x22
	bl	_get_pte
	mov	x1, x20
	b	LBB0_47
LBB0_46:
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
LBB0_47:
	mov	x0, x19
	bl	_get_pte
	mov	x0, x19
	bl	_flush
	mov	w22, #0
	b	LBB0_34
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE_2MB,8,3              ; @PAGE_SIZE_2MB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DRAM mapping should use huge pages only\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_ULLONG_MAX,8,3                 ; @ULLONG_MAX
	.comm	_PTE_PHYS_ADDR_MASK,8,3         ; @PTE_PHYS_ADDR_MASK
	.comm	_LAST_MASK,8,3                  ; @LAST_MASK
	.comm	_PAGE_PRESENT_MASK,8,3          ; @PAGE_PRESENT_MASK
l_.str.1:                               ; @.str.1
	.asciz	"DRAM: mapping already exists for virt_addr 0x%llx\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"DRAM mapping should not allocate more hops\n"

l_.str.3:                               ; @.str.3
	.asciz	"mapping already exists for virt_addr 0x%llx\n"

l_.str.4:                               ; @.str.4
	.asciz	"hop0 pte: 0x%llx (0x%llx)\n"

l_.str.5:                               ; @.str.5
	.asciz	"hop1 pte: 0x%llx (0x%llx)\n"

l_.str.6:                               ; @.str.6
	.asciz	"hop2 pte: 0x%llx (0x%llx)\n"

l_.str.7:                               ; @.str.7
	.asciz	"hop3 pte: 0x%llx (0x%llx)\n"

l_.str.8:                               ; @.str.8
	.asciz	"hop4 pte: 0x%llx (0x%llx)\n"

	.no_dead_strip	__hl_mmu_map
.subsections_via_symbols
