	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_gem_prime_import_sg_table ## -- Begin function nouveau_gem_prime_import_sg_table
	.p2align	4, 0x90
_nouveau_gem_prime_import_sg_table:     ## @nouveau_gem_prime_import_sg_table
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rax
	movq	%rdi, %rbx
	movq	_TTM_PL_FLAG_TT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	-16(%rbp), %r10
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r10
	pushq	%rax
	callq	_nouveau_bo_new
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %edi
LBB0_5:
	callq	_ERR_PTR
	jmp	LBB0_6
LBB0_2:
	movq	_NOUVEAU_GEM_DOMAIN_GART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-16(%rbp), %rcx
	movl	%eax, 12(%rcx)
	movl	8(%rcx), %esi
	movq	%rbx, %rdi
	callq	_drm_gem_object_alloc
	movq	-16(%rbp), %rcx
	movq	%rax, (%rcx)
	movq	-16(%rbp), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:
	movq	%rax, (%rcx)
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	xorl	%ebx, %ebx
	leaq	-16(%rbp), %rsi
	xorl	%edi, %edi
	callq	_nouveau_bo_ref
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_FLAG_TT,4,2             ## @TTM_PL_FLAG_TT
	.comm	_NOUVEAU_GEM_DOMAIN_GART,4,2    ## @NOUVEAU_GEM_DOMAIN_GART
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_gem_prime_import_sg_table ; -- Begin function nouveau_gem_prime_import_sg_table
	.p2align	2
_nouveau_gem_prime_import_sg_table:     ; @nouveau_gem_prime_import_sg_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x6, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _TTM_PL_FLAG_TT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTM_PL_FLAG_TT@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	add	x7, sp, #8
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_nouveau_bo_new
	cbz	w0, LBB0_2
LBB0_1:
	bl	_ERR_PTR
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _NOUVEAU_GEM_DOMAIN_GART@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NOUVEAU_GEM_DOMAIN_GART@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	str	w8, [x9, #12]
	ldr	w1, [x9, #8]
	mov	x0, x19
	bl	_drm_gem_object_alloc
	ldr	x8, [sp, #8]
	str	x0, [x8]
	ldr	x8, [sp, #8]
	ldr	x9, [x8]
	cbz	x9, LBB0_5
; %bb.3:
	str	x8, [x9]
	ldr	x8, [sp, #8]
	ldr	x0, [x8]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	add	x1, sp, #8
	mov	x0, #0
	bl	_nouveau_bo_ref
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_FLAG_TT,4,2             ; @TTM_PL_FLAG_TT
	.comm	_NOUVEAU_GEM_DOMAIN_GART,4,2    ; @NOUVEAU_GEM_DOMAIN_GART
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
