	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_vm_map_sg              ## -- Begin function nouveau_vm_map_sg
	.p2align	4, 0x90
_nouveau_vm_map_sg:                     ## @nouveau_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	(%rdi), %r8
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rax), %rdi
	movq	(%r8), %rax
	movl	%eax, %ecx
	sarl	%cl, %edx
	leal	-12(%rax), %r9d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rdi), %edi
	movl	%edi, %ecx
	subl	%r9d, %ecx
	movl	$1, %r14d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	testl	%edx, %edx
	je	LBB0_3
## %bb.1:
	movl	%esi, %r12d
	sarl	$12, %r12d
	addl	8(%r8), %r12d
	movl	$-1, %ebx
	movl	%edi, %ecx
	shll	%cl, %ebx
	notl	%ebx
	andl	%r12d, %ebx
	movl	%r9d, %ecx
	sarl	%cl, %ebx
	movl	%edi, %ecx
	sarl	%cl, %r12d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	subl	(%rcx), %r12d
	xorl	%edi, %edi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rcx), %rax
	setne	%dil
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movslq	%r12d, %r12
	movq	(%rax,%r12,8), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leal	(%rdx,%rbx), %r13d
	xorl	%edi, %edi
	cmpl	%r14d, %r13d
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	cmovnel	%r14d, %r13d
	movl	%r13d, %r15d
	subl	%ebx, %r15d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r9
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	callq	*24(%rax)
	xorl	%edi, %edi
	cmpl	%r14d, %r13d
	setge	%dil
	callq	_unlikely
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	$0, %eax
	cmovnel	%eax, %r13d
	addl	%ecx, %r12d
	movslq	%r15d, %rax
	leaq	(%rbx,%rax,4), %rbx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	%r13d, %ebx
	subl	%r15d, %edx
	jne	LBB0_2
LBB0_3:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*16(%rax)                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_vm_map_sg              ; -- Begin function nouveau_vm_map_sg
	.p2align	2
_nouveau_vm_map_sg:                     ; @nouveau_vm_map_sg
	.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
	stp	x0, x3, [sp, #8]                ; 16-byte Folded Spill
	ldp	x9, x8, [x0]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	ldr	x26, [x8, #16]
	ldr	x8, [x9]
	asr	w27, w2, w8
	cbz	w27, LBB0_3
; %bb.1:
	sub	w10, w8, #12
	ldr	w11, [x26, #8]
	sub	w12, w11, w10
	mov	w13, #1
	lsl	w28, w13, w12
	ldr	w9, [x9, #8]
	add	w9, w9, w1, asr #12
	mov	w12, #-1
	lsl	w12, w12, w11
	bic	w12, w9, w12
	asr	w23, w12, w10
	asr	w9, w9, w11
	ldr	x10, [sp, #24]                  ; 8-byte Folded Reload
	ldr	w10, [x10]
	sub	w19, w9, w10
	ldr	x9, [x26]
	cmp	x8, x9
	cset	w21, ne
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	x22, [x8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x8, [x8, #8]
	ldr	x8, [x8, w19, sxtw #3]
	ldr	x24, [x8, x21, lsl #3]
	add	w25, w27, w23
	cmp	w25, w28
	cset	w0, ge
	bl	_unlikely
	cmp	x0, #0
	csel	w20, w25, w28, eq
	sub	w25, w20, w23
	ldr	x8, [x26, #24]
	ldp	x0, x2, [sp, #8]                ; 16-byte Folded Reload
	mov	x1, x24
	mov	x3, x23
	mov	x4, x25
	mov	x5, x22
	blr	x8
	sub	w27, w27, w25
	add	x22, x22, w25, sxtw #2
	cmp	w20, w28
	cset	w0, ge
	bl	_unlikely
	cmp	x0, #0
	csel	w23, w20, wzr, eq
	cinc	w19, w19, ne
	cbnz	w27, LBB0_2
LBB0_3:
	ldr	x1, [x26, #16]
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	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
	br	x1
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
