	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_hwsq_fini                 ## -- Begin function nvkm_hwsq_fini
	.p2align	4, 0x90
_nvkm_hwsq_fini:                        ## @nvkm_hwsq_fini
	.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
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	16(%rbx), %r15
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movl	(%rbx), %edx
	leal	4(%rdx), %eax
	addl	$7, %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	movl	%edx, (%rbx)
	movq	(%rdi), %rax
	cmpl	(%rax), %edx
	jle	LBB0_3
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_nvkm_error
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_12
## %bb.7:
	negl	%eax
	movl	%eax, %r12d
	cmpl	$0, (%rbx)
	jg	LBB0_9
	jmp	LBB0_12
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_3:
	xorl	%r12d, %r12d
	testl	%esi, %esi
	je	LBB0_12
## %bb.4:
	movq	8(%rbx), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_12
## %bb.5:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_nvkm_error
	movl	%r13d, %r12d
	cmpl	$0, (%rbx)
	jle	LBB0_12
LBB0_9:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str.2(%rip), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movl	(%rax,%r14,4), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_nvkm_error
	incq	%r14
	movslq	(%rbx), %rax
	cmpq	%rax, %r14
	jl	LBB0_10
## %bb.11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_12:
	movq	$0, (%r14)
	movq	%rbx, %rdi
	callq	_kfree
LBB0_13:
	movl	%r12d, %eax
	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	"hwsq exec failed: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"hwsq ucode too large\n"

	.comm	_ENOSPC,4,2                     ## @ENOSPC
L_.str.2:                               ## @.str.2
	.asciz	"\t%08x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_hwsq_fini                 ; -- Begin function nvkm_hwsq_fini
	.p2align	2
_nvkm_hwsq_fini:                        ; @nvkm_hwsq_fini
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	x19, [x0]
	cbz	x19, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	x21, [x19, #16]
	ldr	x8, [x21]
	ldr	x0, [x8]
	ldr	w8, [x19]
	add	w9, w8, #4
	add	w8, w8, #7
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w2, w8, #2
	str	w2, [x19]
	ldr	x8, [x0]
	ldr	w9, [x8]
	cmp	w2, w9
	b.le	LBB0_5
; %bb.2:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_nvkm_error
Lloh2:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cbz	w8, LBB0_11
; %bb.3:
	neg	w22, w8
	b	LBB0_8
LBB0_4:
	mov	w22, #0
	b	LBB0_13
LBB0_5:
	cbz	w1, LBB0_11
; %bb.6:
	ldr	x8, [x8, #8]
	ldr	x1, [x19, #8]
	blr	x8
	mov	x22, x0
	cbz	w0, LBB0_12
; %bb.7:
	str	x22, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_nvkm_error
LBB0_8:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.9:
	mov	x24, #0
Lloh7:
	adrp	x23, l_.str.2@PAGE
Lloh8:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w8, [x8, x24, lsl #2]
	str	x8, [sp]
	mov	x0, x21
	mov	x1, x23
	bl	_nvkm_error
	add	x24, x24, #1
	ldrsw	x8, [x19]
	cmp	x24, x8
	b.lt	LBB0_10
	b	LBB0_12
LBB0_11:
	mov	w22, #0
LBB0_12:
	str	xzr, [x20]
	mov	x0, x19
	bl	_kfree
LBB0_13:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hwsq exec failed: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"hwsq ucode too large\n"

	.comm	_ENOSPC,4,2                     ; @ENOSPC
l_.str.2:                               ; @.str.2
	.asciz	"\t%08x\n"

.subsections_via_symbols
