	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nexus_dmamap_load_buffer
_nexus_dmamap_load_buffer:              ## @nexus_dmamap_load_buffer
	.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
	movq	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	16(%rbp), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	testq	%r15, %r15
	jg	LBB0_3
	jmp	LBB0_8
LBB0_1:
	movq	8(%r13), %r12
	testq	%r15, %r15
	jle	LBB0_8
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_pmap_kextract
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pmap_extract
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_PAGE_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	movslq	%edx, %rdx
	subq	%rdx, %rcx
	movq	(%r13), %rdx
	cmpq	%rdx, %rcx
	cmovgeq	%rdx, %rcx
	cmpq	%rcx, %r15
	cmovlq	%r15, %rcx
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%rax, %rdx
	movq	%r12, %r8
	movq	24(%rbp), %r9
	callq	_nexus_dmamap_addseg
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%ebx, %rbx
	addq	%rax, %rbx
	subq	%rax, %r15
	jg	LBB0_3
LBB0_8:
	xorl	%eax, %eax
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movq	_EFBIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_EFBIG,4,2                      ## @EFBIG
	.no_dead_strip	_nexus_dmamap_load_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nexus_dmamap_load_buffer
_nexus_dmamap_load_buffer:              ; @nexus_dmamap_load_buffer
	.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, x7
	mov	x22, x6
	mov	x21, x4
	mov	x19, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
	cbz	x6, LBB0_2
; %bb.1:
	cmp	x19, #1
	b.ge	LBB0_3
	b	LBB0_9
LBB0_2:
	ldr	x22, [x25, #8]
	cmp	x19, #1
	b.lt	LBB0_9
LBB0_3:
Lloh0:
	adrp	x26, _kernel_pmap@GOTPAGE
Lloh1:
	ldr	x26, [x26, _kernel_pmap@GOTPAGEOFF]
Lloh2:
	adrp	x27, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x28, _PAGE_MASK@GOTPAGE
Lloh5:
	ldr	x28, [x28, _PAGE_MASK@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	cmp	x8, x21
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_pmap_kextract
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x23
	bl	_pmap_extract
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x0
	ldr	x8, [x27]
	ldr	w9, [x28]
	and	w9, w9, w2
	sub	x8, x8, w9, sxtw
	ldr	x9, [x25]
	cmp	x8, x9
	csel	x8, x8, x9, lt
	cmp	x19, x8
	csel	x3, x19, x8, lt
	mov	x0, x25
	mov	x1, x24
	mov	x4, x22
	mov	x5, x20
	bl	_nexus_dmamap_addseg
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x0, w23, sxtw
	sub	x19, x19, x0
	cmp	x19, #0
	b.gt	LBB0_4
LBB0_9:
Lloh6:
	adrp	x8, _EFBIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFBIG@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	x19, #0
	csel	w0, wzr, w8, eq
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_EFBIG,4,2                      ; @EFBIG
	.no_dead_strip	_nexus_dmamap_load_buffer
.subsections_via_symbols
