	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prog_hwsq
_prog_hwsq:                             ## @prog_hwsq
	.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	%rsi, %r13
	movq	%rdi, %rbx
	callq	_nouveau_dev
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_nouveau_drm
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_nv_device
	xorl	%r12d, %r12d
	cmpl	$148, (%rax)
	setl	%r12b
	movl	$5120, %eax                     ## imm = 0x1400
	movl	$524288, %r15d                  ## imm = 0x80000
	cmovlq	%rax, %r15
	movq	%r14, %rdi
	movl	$4248, %esi                     ## imm = 0x1098
	movl	$8, %edx
	xorl	%ecx, %ecx
	callq	_nv_mask
	movq	%r14, %rdi
	movl	$4868, %esi                     ## imm = 0x1304
	xorl	%edx, %edx
	callq	_nv_wr32
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_nv_device
	cmpl	$146, (%rax)
	jl	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$4888, %esi                     ## imm = 0x1318
	xorl	%edx, %edx
	callq	_nv_wr32
LBB0_2:
	addl	%r12d, %r12d
	incl	%r12d
	cmpl	$4, (%r13)
	jl	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_nv_wr32
	incq	%rbx
	movl	(%r13), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movslq	%ecx, %rax
	addl	$4, %r15d
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	movq	%r14, %rdi
	movl	$4248, %esi                     ## imm = 0x1098
	movl	$24, %edx
	movl	$24, %ecx
	callq	_nv_mask
	movq	%r14, %rdi
	movl	$4876, %esi                     ## imm = 0x130C
	movl	%r12d, %edx
	callq	_nv_wr32
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$4872, %esi                     ## imm = 0x1308
	movl	$256, %edx                      ## imm = 0x100
	xorl	%ecx, %ecx
	callq	_nv_wait
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_NV_ERROR
	movq	%r14, %rdi
	movl	$4872, %esi                     ## imm = 0x1308
	callq	_nv_rd32
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_NV_ERROR
	cmpl	$4, (%r13)
	jl	LBB0_9
## %bb.7:
	movl	$5120, %ebx                     ## imm = 0x1400
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_nv_rd32
	movq	%r12, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_NV_ERROR
	incl	%r15d
	movl	(%r13), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	addl	$4, %ebx
	cmpl	%ecx, %r15d
	jl	LBB0_8
LBB0_9:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %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 ucode exec timed out\n"

L_.str.1:                               ## @.str.1
	.asciz	"0x001308: 0x%08x\n"

L_.str.2:                               ## @.str.2
	.asciz	"0x%06x: 0x%08x\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_prog_hwsq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prog_hwsq
_prog_hwsq:                             ; @prog_hwsq
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_nouveau_dev
	mov	x20, x0
	mov	x0, x21
	bl	_nouveau_drm
	mov	x21, x0
	ldr	w0, [x0]
	bl	_nv_device
	ldr	w8, [x0]
	cmp	w8, #148
	mov	w8, #524288
	mov	w9, #5120
	csel	x23, x9, x8, lt
	mov	w8, #3
	csinc	w22, w8, wzr, lt
	mov	x0, x20
	mov	w1, #4248
	mov	w2, #8
	mov	w3, #0
	bl	_nv_mask
	mov	x0, x20
	mov	w1, #4868
	mov	w2, #0
	bl	_nv_wr32
	ldr	w0, [x21]
	bl	_nv_device
	ldr	w8, [x0]
	cmp	w8, #146
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #4888
	mov	w2, #0
	bl	_nv_wr32
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #4
	b.lt	LBB0_5
; %bb.3:
	mov	x24, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x24, lsl #2]
	mov	x0, x20
	mov	x1, x23
	bl	_nv_wr32
	add	x24, x24, #1
	ldr	w8, [x19]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	add	w23, w23, #4
	cmp	x24, w8, sxtw
	b.lt	LBB0_4
LBB0_5:
	mov	x0, x20
	mov	w1, #4248
	mov	w2, #24
	mov	w3, #24
	bl	_nv_mask
	mov	x0, x20
	mov	w1, #4876
	mov	x2, x22
	bl	_nv_wr32
	mov	x0, x20
	mov	w1, #4872
	mov	w2, #256
	mov	w3, #0
	bl	_nv_wait
	mov	x8, x0
	mov	w0, #0
	cbnz	w8, LBB0_10
; %bb.6:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_NV_ERROR
	mov	x0, x20
	mov	w1, #4872
	bl	_nv_rd32
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_NV_ERROR
	ldr	w8, [x19]
	cmp	w8, #4
	b.lt	LBB0_9
; %bb.7:
	mov	w24, #0
	mov	w22, #5120
Lloh4:
	adrp	x23, l_.str.2@PAGE
Lloh5:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_nv_rd32
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
	mov	x0, x21
	mov	x1, x23
	bl	_NV_ERROR
	add	w24, w24, #1
	ldr	w8, [x19]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	add	w22, w22, #4
	cmp	w24, w8, asr #2
	b.lt	LBB0_8
LBB0_9:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hwsq ucode exec timed out\n"

l_.str.1:                               ; @.str.1
	.asciz	"0x001308: 0x%08x\n"

l_.str.2:                               ; @.str.2
	.asciz	"0x%06x: 0x%08x\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_prog_hwsq
.subsections_via_symbols
