	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_pte
_alloc_pte:                             ## @alloc_pte
	.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
	movl	%r8d, %r15d
	movq	%rcx, %r12
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_PM_LEVEL_SIZE
	cmpq	%rbx, %rax
	jae	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_increase_address_space
	movl	(%r14), %edi
	jmp	LBB0_2
LBB0_3:
	movq	%rbx, %rsi
	movl	(%r14), %ebx
	leal	-1(%rbx), %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r14), %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_PM_LEVEL_INDEX
	leaq	(%r14,%rax,4), %r14
	cmpl	%r13d, -44(%rbp)                ## 4-byte Folded Reload
	jle	LBB0_14
## %bb.4:
	addl	$-2, %ebx
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_PM_LEVEL_INDEX
	leaq	(%r14,%rax,4), %r14
	leal	-1(%rbx), %eax
	cmpl	%r13d, %ebx
	movl	%eax, %ebx
	jle	LBB0_14
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_IOMMU_PTE_PRESENT
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %edi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%r15d, %edi
	callq	_get_zeroed_page
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %r13
	movl	%r15d, %r12d
	leal	1(%rbx), %r15d
	movq	%rax, %rdi
	callq	_virt_to_phys
	movl	%r15d, %edi
	movl	%r12d, %r15d
	movq	%r13, %r12
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	movl	%eax, %esi
	callq	_PM_LEVEL_PDE
	movl	%eax, %edi
	movl	%eax, (%r14)
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	callq	_IOMMU_PTE_PAGE
	movq	%rax, %r14
	testq	%r12, %r12
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%ebx, %r13d
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, (%r12)
	jmp	LBB0_13
LBB0_8:
	xorl	%r14d, %r14d
LBB0_14:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_alloc_pte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_pte
_alloc_pte:                             ; @alloc_pte
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	ldr	w0, [x0]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_PM_LEVEL_SIZE
	cmp	x0, x22
	b.hs	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x23
	mov	x1, x19
	bl	_increase_address_space
	ldr	w0, [x23]
	b	LBB0_1
LBB0_3:
	ldr	w26, [x23]
	sub	w25, w26, #1
	ldr	x23, [x23, #8]
	mov	x0, x25
	mov	x1, x22
	bl	_PM_LEVEL_INDEX
	add	x24, x23, x0, lsl #2
	cmp	w25, w21
	b.le	LBB0_14
; %bb.4:
	sub	w23, w26, #2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	mov	x1, x22
	bl	_PM_LEVEL_INDEX
	add	x24, x24, x0, lsl #2
	sub	w8, w23, #1
	cmp	w23, w21
	mov	x23, x8
	b.le	LBB0_14
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_IOMMU_PTE_PRESENT
	cbz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x24]
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_get_zeroed_page
	cbz	x0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w25, w23, #1
	bl	_virt_to_phys
	mov	x1, x0
	mov	x0, x25
	bl	_PM_LEVEL_PDE
	str	w0, [x24]
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_IOMMU_PTE_PAGE
	mov	x24, x0
	cbz	x20, LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w21, w23
	b.ne	LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	str	x24, [x20]
	b	LBB0_5
LBB0_13:
	mov	x24, #0
LBB0_14:
	mov	x0, x24
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_alloc_pte
.subsections_via_symbols
