	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_copro_command
_do_copro_command:                      ## @do_copro_command
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_trace_fsi_master_acf_copro_command
	movq	_CMD_STAT_REG@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	(%r12), %rsi
	movl	%r14d, %edi
	callq	_iowrite32be
	movq	16(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	_CVIC_TRIG_REG@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movl	$2, %edi
	callq	_iowrite32
LBB0_2:
	movl	$-10000001, %ebx                ## imm = 0xFF67697F
	movq	_STAT_COMPLETE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rdi
	addq	(%r12), %rdi
	callq	_ioread8
	cmpl	$255, %eax
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ecx
	movl	(%r14), %edx
	cmpl	%edx, %eax
	jl	LBB0_3
## %bb.7:
	xorl	%eax, %eax
	cmpl	%edx, %ecx
	je	LBB0_16
## %bb.8:
	cmpl	$128, %ecx
	je	LBB0_13
## %bb.9:
	cmpl	$129, %ecx
	je	LBB0_12
## %bb.10:
	cmpl	$130, %ecx
	jne	LBB0_14
## %bb.11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_4:
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_15:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ESHUTDOWN@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_12:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
LBB0_14:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_STAT_REG,8,3               ## @CMD_STAT_REG
	.comm	_CVIC_TRIG_REG,8,3              ## @CVIC_TRIG_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout waiting for coprocessor completion\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_STAT_COMPLETE,4,2              ## @STAT_COMPLETE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ESHUTDOWN,4,2                  ## @ESHUTDOWN
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_do_copro_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_copro_command
_do_copro_command:                      ; @do_copro_command
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_trace_fsi_master_acf_copro_command
	ldr	x8, [x19]
Lloh0:
	adrp	x21, _CMD_STAT_REG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CMD_STAT_REG@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x20
	bl	_iowrite32be
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x9, _CVIC_TRIG_REG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CVIC_TRIG_REG@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #2
	bl	_iowrite32
LBB0_2:
	mov	w20, #27007
	movk	w20, #65383, lsl #16
Lloh5:
	adrp	x22, _STAT_COMPLETE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _STAT_COMPLETE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	adds	w20, w20, #1
	b.hs	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread8
	ldr	w8, [x22]
	cmp	w0, #255
	ccmp	w0, w8, #8, ne
	b.lt	LBB0_3
; %bb.5:
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	ldr	w0, [x19, #8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	cmp	w0, #128
	b.eq	LBB0_14
; %bb.11:
	cmp	w0, #129
	b.eq	LBB0_15
; %bb.12:
	cmp	w0, #130
	b.ne	LBB0_16
; %bb.13:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_14:
Lloh13:
	adrp	x8, _ESHUTDOWN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ESHUTDOWN@GOTPAGEOFF]
	b	LBB0_8
LBB0_15:
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_16:
Lloh17:
	adrp	x8, _ENXIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_STAT_REG,8,3               ; @CMD_STAT_REG
	.comm	_CVIC_TRIG_REG,8,3              ; @CVIC_TRIG_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout waiting for coprocessor completion\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_STAT_COMPLETE,4,2              ; @STAT_COMPLETE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ESHUTDOWN,4,2                  ; @ESHUTDOWN
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_do_copro_command
.subsections_via_symbols
