	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv44_vm_map_sg
_nv44_vm_map_sg:                        ## @nv44_vm_map_sg
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%r8d, %r13d
	movl	%ecx, %r12d
	movq	%rsi, %rcx
	movq	(%rdi), %rax
	movq	(%rax), %rdx
	movl	%r12d, %eax
	andl	$3, %eax
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movl	$4, %ebx
	subl	%eax, %ebx
	cmpl	%r13d, %ebx
	cmovgel	%r13d, %ebx
	movl	(%rdx), %esi
	movq	%rcx, %r15
	movq	%rcx, %rdi
	movq	%r14, %rdx
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	callq	_nv44_vm_fill
	addl	%ebx, %r12d
	movslq	%ebx, %rax
	leaq	(%r14,%rax,4), %r14
	subl	%eax, %r13d
	cmpl	$4, %r13d
	jl	LBB0_4
LBB0_5:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	leal	(,%r12,4), %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movl	%r13d, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rbx), %eax
	movl	4(%rcx,%rbx), %r12d
	sarl	$12, %eax
	movl	8(%rcx,%rbx), %r14d
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	12(%rcx,%rbx), %r13d
	leal	(%r15,%rbx), %esi
	movl	%r12d, %edx
	shll	$15, %edx
	andl	$-134217728, %edx               ## imm = 0xF8000000
	orl	%eax, %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_nv_wo32
	leal	(%r15,%rbx), %esi
	addl	$4, %esi
	sarl	$17, %r12d
	movl	%r14d, %edx
	shll	$10, %edx
	andl	$-4194304, %edx                 ## imm = 0xFFC00000
	orl	%r12d, %edx
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_nv_wo32
	leal	(%r15,%rbx), %esi
	addl	$8, %esi
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	sarl	$22, %eax
	movl	%r13d, %edx
	shll	$5, %edx
	andl	$-131072, %edx                  ## imm = 0xFFFE0000
	orl	%eax, %edx
	movq	%r14, %rdi
	callq	_nv_wo32
	addl	$4, %r12d
	leal	(%r15,%rbx), %esi
	addl	$12, %esi
	sarl	$27, %r13d
	orl	$1073741824, %r13d              ## imm = 0x40000000
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_nv_wo32
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leal	-4(%rax), %r13d
	addq	$16, %rbx
	cmpl	$7, %eax
	ja	LBB0_6
## %bb.7:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	addq	%rbx, %r14
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testl	%r13d, %r13d
	je	LBB0_9
LBB0_10:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r14, %rdx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nv44_vm_fill                   ## TAILCALL
LBB0_1:
	movq	%rcx, %r15
	cmpl	$4, %r13d
	jge	LBB0_5
LBB0_4:
	movq	%r15, %rdi
	testl	%r13d, %r13d
	jne	LBB0_10
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nv44_vm_map_sg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv44_vm_map_sg
_nv44_vm_map_sg:                        ; @nv44_vm_map_sg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x5
	mov	x22, x4
	mov	x20, x3
	mov	x21, x1
	ldr	x8, [x0]
	ldr	x24, [x8]
	ands	w8, w3, #0x3
	b.eq	LBB0_2
; %bb.1:
	mov	w9, #4
	sub	w8, w9, w8
	cmp	w8, w22
	csel	w23, w8, w22, lt
	ldr	w1, [x24]
	mov	x0, x21
	mov	x2, x19
	mov	x3, x20
	mov	x4, x23
	bl	_nv44_vm_fill
	add	w20, w23, w20
	add	x19, x19, w23, sxtw #2
	sub	w22, w22, w23
LBB0_2:
	cmp	w22, #4
	b.lt	LBB0_6
; %bb.3:
	str	x24, [sp, #8]                   ; 8-byte Folded Spill
	mov	x23, #0
	lsl	w25, w20, #2
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x26, x22
	add	x8, x19, x23
	ldp	w9, w27, [x8]
	ldp	w28, w24, [x8, #8]
	add	w22, w25, w23
	lsl	w8, w27, #15
	and	w8, w8, #0xf8000000
	orr	w2, w8, w9, asr #12
	mov	x0, x21
	mov	x1, x22
	bl	_nv_wo32
	add	w1, w22, #4
	lsl	w8, w28, #10
	and	w8, w8, #0xffc00000
	orr	w2, w8, w27, asr #17
	mov	x0, x21
	bl	_nv_wo32
	add	w1, w22, #8
	lsl	w8, w24, #5
	and	w8, w8, #0xfffe0000
	orr	w2, w8, w28, asr #22
	mov	x0, x21
	bl	_nv_wo32
	add	w20, w20, #4
	add	w1, w22, #12
	asr	w8, w24, #27
	orr	w2, w8, #0x40000000
	mov	x0, x21
	bl	_nv_wo32
	sub	w22, w26, #4
	add	x23, x23, #16
	cmp	w26, #7
	b.hi	LBB0_4
; %bb.5:
	add	x19, x19, x23
	ldr	x24, [sp, #8]                   ; 8-byte Folded Reload
LBB0_6:
	cbz	w22, LBB0_8
; %bb.7:
	ldr	w1, [x24]
	mov	x0, x21
	mov	x2, x19
	mov	x3, x20
	mov	x4, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_nv44_vm_fill
LBB0_8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nv44_vm_map_sg
.subsections_via_symbols
