	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_sgdma_create_ttm       ## -- Begin function nouveau_sgdma_create_ttm
	.p2align	4, 0x90
_nouveau_sgdma_create_ttm:              ## @nouveau_sgdma_create_ttm
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	(%rdi), %edi
	callq	_nouveau_bdev
	movq	%rax, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	(%r12), %rax
	movq	_NV_DEVICE_INFO_V0_TESLA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.4:
	movq	_nv04_sgdma_backend@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	_nv50_sgdma_backend@GOTPCREL(%rip), %rax
LBB0_5:
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_ttm_dma_tt_init
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	cmoveq	%rbx, %rax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ## @NV_DEVICE_INFO_V0_TESLA
	.comm	_nv04_sgdma_backend,4,2         ## @nv04_sgdma_backend
	.comm	_nv50_sgdma_backend,4,2         ## @nv50_sgdma_backend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_sgdma_create_ttm       ; -- Begin function nouveau_sgdma_create_ttm
	.p2align	2
_nouveau_sgdma_create_ttm:              ; @nouveau_sgdma_create_ttm
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_nouveau_bdev
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _NV_DEVICE_INFO_V0_TESLA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NV_DEVICE_INFO_V0_TESLA@GOTPAGEOFF]
Lloh5:
	adrp	x10, _nv50_sgdma_backend@GOTPAGE
Lloh6:
	ldr	x10, [x10, _nv50_sgdma_backend@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x11, _nv04_sgdma_backend@GOTPAGE
Lloh9:
	ldr	x11, [x11, _nv04_sgdma_backend@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x11, x10, lt
	str	x8, [x0]
	mov	x1, x20
	mov	x2, x19
	bl	_ttm_dma_tt_init
	cmp	x0, #0
	csel	x0, x21, xzr, eq
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ; @NV_DEVICE_INFO_V0_TESLA
	.comm	_nv04_sgdma_backend,4,2         ; @nv04_sgdma_backend
	.comm	_nv50_sgdma_backend,4,2         ; @nv50_sgdma_backend
.subsections_via_symbols
