	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_nv17_hwsq_ucode_entry
_load_nv17_hwsq_ucode_entry:            ## @load_nv17_hwsq_ucode_entry
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movq	%rsi, %r15
	callq	_nouveau_drm
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_nv_device
	movq	%rax, %r14
	movq	(%r15), %rax
	cmpl	%r13d, (%rax,%r12,4)
	jle	LBB0_1
## %bb.3:
	cmpl	$36, 4(%rax,%r12,4)
	jne	LBB0_4
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_NV_INFO
	shll	$2, %r13d
	leal	(%r13,%r13,8), %eax
	cltq
	addq	%rax, %r12
	movq	(%r15), %rax
	movl	8(%rax,%r12,4), %edi
	callq	_ROM32
	movq	%r14, %rdi
	movl	$4868, %esi                     ## imm = 0x1304
	movl	%eax, %edx
	callq	_nv_wr32
	movq	(%r15), %rax
	movl	24(%rax,%r12,4), %edi
	callq	_ROM32
	movq	%r14, %rdi
	movl	$5120, %esi                     ## imm = 0x1400
	movl	%eax, %edx
	callq	_nv_wr32
	movq	(%r15), %rax
	movl	40(%rax,%r12,4), %edi
	callq	_ROM32
	movq	%r14, %rdi
	movl	$5124, %esi                     ## imm = 0x1404
	movl	%eax, %edx
	callq	_nv_wr32
	movq	(%r15), %rax
	movl	56(%rax,%r12,4), %edi
	callq	_ROM32
	movq	%r14, %rdi
	movl	$5128, %esi                     ## imm = 0x1408
	movl	%eax, %edx
	callq	_nv_wr32
	movq	(%r15), %rax
	movl	72(%rax,%r12,4), %edi
	callq	_ROM32
	movq	%r14, %rdi
	movl	$5132, %esi                     ## imm = 0x140C
	movl	%eax, %edx
	callq	_nv_wr32
	movq	(%r15), %rax
	movl	88(%rax,%r12,4), %edi
	callq	_ROM32
	movq	%r14, %rdi
	movl	$5136, %esi                     ## imm = 0x1410
	movl	%eax, %edx
	callq	_nv_wr32
	movq	(%r15), %rax
	movl	104(%rax,%r12,4), %edi
	callq	_ROM32
	movq	%r14, %rdi
	movl	$5140, %esi                     ## imm = 0x1414
	movl	%eax, %edx
	callq	_nv_wr32
	movq	(%r15), %rax
	movl	120(%rax,%r12,4), %edi
	callq	_ROM32
	movq	%r14, %rdi
	movl	$5144, %esi                     ## imm = 0x1418
	movl	%eax, %edx
	callq	_nv_wr32
	movq	(%r15), %rax
	movl	136(%rax,%r12,4), %edi
	callq	_ROM32
	movq	%r14, %rdi
	movl	$5148, %esi                     ## imm = 0x141C
	movl	%eax, %edx
	callq	_nv_wr32
	movq	_NV_PBUS_DEBUG_4@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_nv_rd32
	orl	$24, %eax
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_nv_wr32
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_NV_ERROR
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_NV_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too few entries in HW sequencer table for requested entry\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.1:                               ## @.str.1
	.asciz	"Unknown HW sequencer entry size\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Loading NV17 power sequencing microcode\n"

	.comm	_NV_PBUS_DEBUG_4,4,2            ## @NV_PBUS_DEBUG_4
	.no_dead_strip	_load_nv17_hwsq_ucode_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_nv17_hwsq_ucode_entry
_load_nv17_hwsq_ucode_entry:            ; @load_nv17_hwsq_ucode_entry
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	bl	_nouveau_drm
	mov	x23, x0
	ldr	w0, [x0]
	bl	_nv_device
	ldr	x8, [x20]
	ldr	w9, [x8, x21, lsl #2]
	cmp	w9, w22
	b.le	LBB0_3
; %bb.1:
	add	x8, x8, x21, lsl #2
	ldr	w8, [x8, #4]
	cmp	w8, #36
	b.ne	LBB0_4
; %bb.2:
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_NV_INFO
	add	w8, w22, w22, lsl #3
	lsl	w8, w8, #2
	add	x8, x21, w8, sxtw
	lsl	x8, x8, #2
	ldr	x9, [x20]
	add	x21, x8, #8
	ldr	w0, [x9, x21]
	bl	_ROM32
	mov	x2, x0
	mov	x0, x19
	mov	w1, #4868
	bl	_nv_wr32
	ldr	x8, [x20]
	add	x8, x21, x8
	ldr	w0, [x8, #16]
	bl	_ROM32
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5120
	bl	_nv_wr32
	ldr	x8, [x20]
	add	x8, x21, x8
	ldr	w0, [x8, #32]
	bl	_ROM32
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5124
	bl	_nv_wr32
	ldr	x8, [x20]
	add	x8, x21, x8
	ldr	w0, [x8, #48]
	bl	_ROM32
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5128
	bl	_nv_wr32
	ldr	x8, [x20]
	add	x8, x21, x8
	ldr	w0, [x8, #64]
	bl	_ROM32
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5132
	bl	_nv_wr32
	ldr	x8, [x20]
	add	x8, x21, x8
	ldr	w0, [x8, #80]
	bl	_ROM32
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5136
	bl	_nv_wr32
	ldr	x8, [x20]
	add	x8, x21, x8
	ldr	w0, [x8, #96]
	bl	_ROM32
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5140
	bl	_nv_wr32
	ldr	x8, [x20]
	add	x8, x21, x8
	ldr	w0, [x8, #112]
	bl	_ROM32
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5144
	bl	_nv_wr32
	ldr	x8, [x20]
	add	x8, x21, x8
	ldr	w0, [x8, #128]
	bl	_ROM32
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5148
	bl	_nv_wr32
Lloh2:
	adrp	x8, _NV_PBUS_DEBUG_4@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NV_PBUS_DEBUG_4@GOTPAGEOFF]
Lloh4:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_nv_rd32
	orr	w2, w0, #0x18
	mov	x0, x19
	mov	x1, x20
	bl	_nv_wr32
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_NV_ERROR
Lloh7:
	adrp	x8, _ENOENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_NV_ERROR
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too few entries in HW sequencer table for requested entry\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.1:                               ; @.str.1
	.asciz	"Unknown HW sequencer entry size\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Loading NV17 power sequencing microcode\n"

	.comm	_NV_PBUS_DEBUG_4,4,2            ; @NV_PBUS_DEBUG_4
	.no_dead_strip	_load_nv17_hwsq_ucode_entry
.subsections_via_symbols
