	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv84_fifo_context_detach
_nv84_fifo_context_detach:              ## @nv84_fifo_context_detach
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	callq	_nouveau_bar
	movq	%rax, %r14
	movq	(%r12), %r13
	movq	8(%r12), %r15
	movq	(%rbx), %rdi
	callq	_nv_engidx
                                        ## kill: def $eax killed $eax def $rax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_4
## %bb.1:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	$32, %ebx
	xorl	%r14d, %r14d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movl	$1, %r14d
	movl	$96, %ebx
	jmp	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movl	$4, %r14d
	movl	$160, %ebx
	jmp	LBB0_7
LBB0_3:
	movl	$2, %r14d
	movl	$192, %ebx
LBB0_7:
	movl	$1, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movq	%r13, %rdi
	movl	$9504, %esi                     ## imm = 0x2520
	movl	$63, %edx
	movl	%eax, %ecx
	callq	_nv_mask
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_nv_gpuobj
	movl	(%rax), %edx
	sarl	$12, %edx
	movq	%r13, %rdi
	movl	$13052, %esi                    ## imm = 0x32FC
	callq	_nv_wr32
	movq	%r13, %rdi
	movl	$13052, %esi                    ## imm = 0x32FC
	movl	$-1, %edx
	movl	$-1, %ecx
	callq	_nv_wait_ne
	movl	%eax, %r14d
	movq	%r13, %rdi
	movl	$9504, %esi                     ## imm = 0x2520
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_nv_wr32
	testl	%r14d, %r14d
	je	LBB0_8
LBB0_10:
	movl	(%r15), %edi
	xorl	%r14d, %r14d
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	movl	%ebx, %esi
	orl	$4, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	movl	%ebx, %esi
	orl	$8, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	movl	%ebx, %esi
	orl	$12, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	movl	%ebx, %esi
	orl	$16, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	orl	$20, %ebx
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	*(%rdi)
	jmp	LBB0_11
LBB0_8:
	movl	(%r12), %r14d
	movq	%r12, %rdi
	callq	_nouveau_client_name
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_nv_error
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.9:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_2
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel %d [%s] unload timeout\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_nv84_fifo_context_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv84_fifo_context_detach
_nv84_fifo_context_detach:              ; @nv84_fifo_context_detach
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	bl	_nouveau_bar
	mov	x19, x0
	ldp	x24, x20, [x23]
	ldr	x0, [x21]
	bl	_nv_engidx
	sub	w9, w0, #128
	cmp	w9, #4
	b.hi	LBB0_3
; %bb.1:
	mov	w8, #0
	mov	w0, #0
	mov	w21, #32
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
	mov	w8, #1
	mov	w21, #96
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_4:
	mov	w8, #4
	mov	w21, #160
	b	LBB0_6
LBB0_5:
	mov	w8, #2
	mov	w21, #192
LBB0_6:
	mov	w9, #1
	lsl	w3, w9, w8
	mov	x0, x24
	mov	w1, #9504
	mov	w2, #63
	bl	_nv_mask
	mov	x25, x0
	mov	x0, x20
	bl	_nv_gpuobj
	ldr	w8, [x0]
	asr	w2, w8, #12
	mov	x0, x24
	mov	w1, #13052
	bl	_nv_wr32
	mov	x0, x24
	mov	w1, #13052
	mov	w2, #-1
	mov	w3, #-1
	bl	_nv_wait_ne
	mov	x26, x0
	mov	x0, x24
	mov	w1, #9504
	mov	x2, x25
	bl	_nv_wr32
	cbz	w26, LBB0_8
LBB0_7:
	ldr	w0, [x20]
	mov	x1, x21
	mov	w2, #0
	bl	_nv_wo32
	ldr	w0, [x20]
	orr	w1, w21, #0x4
	mov	w2, #0
	bl	_nv_wo32
	ldr	w0, [x20]
	orr	w1, w21, #0x8
	mov	w2, #0
	bl	_nv_wo32
	ldr	w0, [x20]
	orr	w1, w21, #0xc
	mov	w2, #0
	bl	_nv_wo32
	ldr	w0, [x20]
	orr	w1, w21, #0x10
	mov	w2, #0
	bl	_nv_wo32
	ldr	w0, [x20]
	mov	w8, #20
	orr	w1, w21, w8
	mov	w2, #0
	bl	_nv_wo32
	ldr	x8, [x19]
	mov	x0, x19
	blr	x8
	mov	w0, #0
	b	LBB0_11
LBB0_8:
	ldr	w25, [x23]
	mov	x0, x23
	bl	_nouveau_client_name
	mov	x3, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x25
	bl	_nv_error
	cbz	w22, LBB0_7
; %bb.9:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel %d [%s] unload timeout\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_nv84_fifo_context_detach
.subsections_via_symbols
