	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_fifo_context_attach
_nv50_fifo_context_attach:              ## @nv50_fifo_context_attach
	.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	%rsi, %r14
	movq	%rdi, %rbx
	callq	_nouveau_bar
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %r15
	movq	(%r14), %r12
	movq	8(%r14), %rbx
	movl	%r12d, %edi
	callq	_nv_engidx
	xorl	%r13d, %r13d
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_6
## %bb.3:
	movl	$96, %r13d
LBB0_4:
	leaq	(%r12,%rbx), %rax
	decq	%rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_nv_gpuobj
	movl	(%rax), %ebx
	sarl	$12, %ebx
	movq	%r14, %rdi
	callq	_nv_engctx
	movl	%ebx, (%rax)
	movl	(%r15), %edi
	movl	%r13d, %esi
	movl	$1638400, %edx                  ## imm = 0x190000
	callq	_nv_wo32
	movl	(%r15), %r14d
	movl	%r13d, %ebx
	orl	$4, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_lower_32_bits
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_nv_wo32
	movl	(%r15), %r14d
	movl	%r13d, %ebx
	orl	$8, %ebx
	movq	%r12, %rdi
	callq	_lower_32_bits
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_nv_wo32
	movl	(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %ebx
	orl	$12, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_upper_32_bits
	movl	%eax, %r14d
	shll	$24, %r14d
	movq	%r12, %rdi
	callq	_upper_32_bits
	orl	%eax, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	movl	%r13d, %esi
	orl	$16, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	orl	$20, %r13d
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	*(%rdi)
	xorl	%r13d, %r13d
	jmp	LBB0_5
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nv50_fifo_context_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv50_fifo_context_attach
_nv50_fifo_context_attach:              ; @nv50_fifo_context_attach
	.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	x23, x1
	mov	x20, x0
	bl	_nouveau_bar
	mov	x19, x0
	ldr	x20, [x20, #8]
	ldp	x22, x24, [x23]
	mov	x0, x22
	bl	_nv_engidx
	mov	w21, #0
	cmp	w0, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w0, #130
	b.eq	LBB0_4
; %bb.2:
	cmp	w0, #129
	b.ne	LBB0_5
; %bb.3:
	mov	w21, #96
LBB0_4:
	add	x8, x22, x24
	sub	x24, x8, #1
	mov	x0, x20
	bl	_nv_gpuobj
	ldr	w8, [x0]
	asr	w25, w8, #12
	mov	x0, x23
	bl	_nv_engctx
	str	w25, [x0]
	ldr	w0, [x20]
	mov	x1, x21
	mov	w2, #1638400
	bl	_nv_wo32
	ldr	w23, [x20]
	orr	w25, w21, #0x4
	mov	x0, x24
	bl	_lower_32_bits
	mov	x2, x0
	mov	x0, x23
	mov	x1, x25
	bl	_nv_wo32
	ldr	w23, [x20]
	orr	w25, w21, #0x8
	mov	x0, x22
	bl	_lower_32_bits
	mov	x2, x0
	mov	x0, x23
	mov	x1, x25
	bl	_nv_wo32
	ldr	w23, [x20]
	orr	w25, w21, #0xc
	mov	x0, x24
	bl	_upper_32_bits
	mov	x24, x0
	mov	x0, x22
	bl	_upper_32_bits
	orr	w2, w0, w24, lsl #24
	mov	x0, x23
	mov	x1, x25
	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	w21, #0
	b	LBB0_6
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nv50_fifo_context_attach
.subsections_via_symbols
