	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_accel_ce_init
_nouveau_accel_ce_init:                 ## @nouveau_accel_ce_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	8(%rdi), %rax
	movq	_NV_DEVICE_INFO_V0_KEPLER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.2:
	movl	16(%rbx), %eax
	cmpl	$163, %eax
	jl	LBB0_7
## %bb.3:
	cmpl	$170, %eax
	je	LBB0_7
## %bb.4:
	cmpl	$172, %eax
	je	LBB0_7
## %bb.5:
	movq	_NvDmaFB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_NvDmaTT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%r8d, %r8d
	jmp	LBB0_6
LBB0_1:
	movq	%r14, %rdi
	callq	_nvif_fifo_runlist_ce
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
LBB0_6:
	movq	%rbx, %r9
	callq	_nouveau_channel_new
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_NV_ERROR                       ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_DEVICE_INFO_V0_KEPLER,8,3   ## @NV_DEVICE_INFO_V0_KEPLER
	.comm	_NvDmaFB,4,2                    ## @NvDmaFB
	.comm	_NvDmaTT,4,2                    ## @NvDmaTT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create ce channel, %d\n"

	.no_dead_strip	_nouveau_accel_ce_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_accel_ce_init
_nouveau_accel_ce_init:                 ; @nouveau_accel_ce_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	x20, x0
	ldr	x8, [x20, #8]!
Lloh0:
	adrp	x9, _NV_DEVICE_INFO_V0_KEPLER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NV_DEVICE_INFO_V0_KEPLER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.1:
	ldr	w8, [x19, #16]
	cmp	w8, #163
	b.lt	LBB0_8
; %bb.2:
	cmp	w8, #170
	b.eq	LBB0_8
; %bb.3:
	cmp	w8, #172
	b.eq	LBB0_8
; %bb.4:
Lloh3:
	adrp	x8, _NvDmaFB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NvDmaFB@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _NvDmaTT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NvDmaTT@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_nvif_fifo_runlist_ce
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	mov	w4, #1
LBB0_6:
	mov	x5, x19
	bl	_nouveau_channel_new
	mov	x2, x0
	cbz	w0, LBB0_8
; %bb.7:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_NV_ERROR
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_DEVICE_INFO_V0_KEPLER,8,3   ; @NV_DEVICE_INFO_V0_KEPLER
	.comm	_NvDmaFB,4,2                    ; @NvDmaFB
	.comm	_NvDmaTT,4,2                    ; @NvDmaTT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create ce channel, %d\n"

	.no_dead_strip	_nouveau_accel_ce_init
.subsections_via_symbols
