	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv04_gr_set_ctx_val
_nv04_gr_set_ctx_val:                   ## @nv04_gr_set_ctx_val
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	leal	7340032(%r14), %esi
	callq	_nvkm_rd32
	movl	%eax, %r12d
	movzbl	%r12b, %r13d
	shrl	$15, %r12d
	andl	$7, %r12d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	addl	$7340044, %r14d                 ## imm = 0x70000C
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_nvkm_rd32
	notl	%ebx
	andl	%eax, %ebx
	orl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_nvkm_wr32
	movl	%ebx, %ecx
	shrl	$25, %ecx
	andl	$1, %ecx
	movl	%ebx, %eax
	shrl	$26, %eax
	andl	%ecx, %eax
	cmpl	$72, %r13d
	cmovel	%eax, %ecx
	cmpl	$31, %r13d
	cmovel	%eax, %ecx
	leal	-4(%r12), %eax
	cmpl	$2, %eax
	jb	LBB0_5
## %bb.1:
	cmpl	$2, %r12d
	je	LBB0_4
## %bb.2:
	cmpl	$1, %r12d
	jne	LBB0_7
## %bb.3:
	andl	$402653184, %ebx                ## imm = 0x18000000
	cmovel	%ebx, %ecx
	jmp	LBB0_7
LBB0_5:
	shrl	$30, %ebx
	jmp	LBB0_6
LBB0_4:
	shrl	$29, %ebx
LBB0_6:
	andl	%ebx, %ecx
LBB0_7:
	shll	$24, %ecx
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$16777216, %edx                 ## imm = 0x1000000
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nv04_gr_set_ctx1               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nv04_gr_set_ctx_val
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv04_gr_set_ctx_val
_nv04_gr_set_ctx_val:                   ; @nv04_gr_set_ctx_val
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	add	w1, w1, #1792, lsl #12          ; =7340032
	bl	_nvkm_rd32
	and	w24, w0, #0xff
	ubfx	w25, w0, #15, #3
	add	w8, w21, #1792, lsl #12         ; =7340032
	add	w23, w8, #12
	mov	x0, x22
	mov	x1, x23
	bl	_nvkm_rd32
	bic	w8, w0, w20
	orr	w19, w8, w19
	mov	x0, x22
	mov	x1, x23
	mov	x2, x19
	bl	_nvkm_wr32
	ubfx	w8, w19, #25, #1
	cmp	w24, #72
	ccmp	w24, #31, #4, ne
	and	w9, w19, #0x4000000
	ccmp	w9, #0, #0, eq
	csel	w8, wzr, w8, eq
	sub	w9, w25, #4
	and	w10, w8, w19, lsr #30
	and	w11, w8, w19, lsr #29
	tst	w19, #0x18000000
	csel	w12, wzr, w8, eq
	cmp	w25, #1
	csel	w8, w8, w12, ne
	cmp	w25, #2
	csel	w8, w11, w8, eq
	cmp	w9, #2
	csel	w8, w10, w8, lo
	lsl	w3, w8, #24
	mov	x0, x22
	mov	x1, x21
	mov	w2, #16777216
	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
	b	_nv04_gr_set_ctx1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nv04_gr_set_ctx_val
.subsections_via_symbols
