	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coda_hw_reset                  ## -- Begin function coda_hw_reset
	.p2align	4, 0x90
_coda_hw_reset:                         ## @coda_hw_reset
	.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
	leaq	12(%rbx), %rdi
	callq	_lockdep_assert_held
	cmpl	$0, 8(%rbx)
	je	LBB0_1
## %bb.3:
	movq	_CODA_REG_BIT_RUN_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_coda_read
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_CODA_960@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.4:
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %r13
	movl	$100, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r15
	movq	_CODA9_GDI_BUS_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$17, %esi
	callq	_coda_write
	movq	_CODA9_GDI_BUS_STATUS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_coda_read
	cmpl	$119, %eax
	je	LBB0_9
## %bb.5:
	addq	%r13, %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	%r15, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_coda_read
	cmpl	$119, %eax
	jne	LBB0_6
LBB0_9:
	movl	8(%rbx), %edi
	callq	_reset_control_reset
	testl	%eax, %eax
	js	LBB0_13
## %bb.10:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_CODA_960@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movq	_CODA9_GDI_BUS_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_coda_write
LBB0_12:
	movq	_CODA_REG_BIT_BUSY_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CODA_REG_BIT_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_coda_write
	movq	_CODA_REG_RUN_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CODA_REG_BIT_CODE_RUN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_coda_write
	movq	%rbx, %rdi
	callq	_coda_wait_timeout
	movl	%eax, %r15d
	movq	_CODA_REG_BIT_RUN_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_coda_write
	movl	%r15d, %eax
	jmp	LBB0_13
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ETIME@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_CODA_REG_BIT_RUN_INDEX,4,2     ## @CODA_REG_BIT_RUN_INDEX
	.comm	_CODA_960,8,3                   ## @CODA_960
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_CODA9_GDI_BUS_CTRL,4,2         ## @CODA9_GDI_BUS_CTRL
	.comm	_CODA9_GDI_BUS_STATUS,4,2       ## @CODA9_GDI_BUS_STATUS
	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_CODA_REG_BIT_BUSY_FLAG,4,2     ## @CODA_REG_BIT_BUSY_FLAG
	.comm	_CODA_REG_BIT_BUSY,4,2          ## @CODA_REG_BIT_BUSY
	.comm	_CODA_REG_RUN_ENABLE,4,2        ## @CODA_REG_RUN_ENABLE
	.comm	_CODA_REG_BIT_CODE_RUN,4,2      ## @CODA_REG_BIT_CODE_RUN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coda_hw_reset                  ; -- Begin function coda_hw_reset
	.p2align	2
_coda_hw_reset:                         ; @coda_hw_reset
	.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
	ldr	x19, [x0]
	add	x0, x19, #12
	bl	_lockdep_assert_held
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_10
; %bb.1:
Lloh0:
	adrp	x22, _CODA_REG_BIT_RUN_INDEX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CODA_REG_BIT_RUN_INDEX@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_coda_read
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh2:
	adrp	x23, _CODA_960@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CODA_960@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
Lloh4:
	adrp	x24, _jiffies@GOTPAGE
Lloh5:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
	ldr	x26, [x24]
	mov	w0, #100
	bl	_msecs_to_jiffies
	mov	x21, x0
Lloh6:
	adrp	x8, _CODA9_GDI_BUS_CTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CODA9_GDI_BUS_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #17
	bl	_coda_write
Lloh9:
	adrp	x25, _CODA9_GDI_BUS_STATUS@GOTPAGE
Lloh10:
	ldr	x25, [x25, _CODA9_GDI_BUS_STATUS@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_coda_read
	cmp	w0, #119
	b.eq	LBB0_6
; %bb.3:
	add	x21, x21, x26
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	mov	x1, x21
	bl	_time_after
	cbnz	x0, LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_cpu_relax
	ldr	w1, [x25]
	mov	x0, x19
	bl	_coda_read
	cmp	w0, #119
	b.ne	LBB0_4
LBB0_6:
	ldr	w0, [x19, #8]
	bl	_reset_control_reset
	tbnz	w0, #31, LBB0_12
; %bb.7:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _CODA9_GDI_BUS_CTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CODA9_GDI_BUS_CTRL@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_coda_write
LBB0_9:
Lloh14:
	adrp	x8, _CODA_REG_BIT_BUSY_FLAG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CODA_REG_BIT_BUSY_FLAG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _CODA_REG_BIT_BUSY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CODA_REG_BIT_BUSY@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_coda_write
Lloh20:
	adrp	x8, _CODA_REG_RUN_ENABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CODA_REG_RUN_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _CODA_REG_BIT_CODE_RUN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CODA_REG_BIT_CODE_RUN@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_coda_write
	mov	x0, x19
	bl	_coda_wait_timeout
	mov	x21, x0
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_coda_write
	mov	x0, x21
	b	LBB0_12
LBB0_10:
Lloh26:
	adrp	x8, _ENOENT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	ret
LBB0_13:
Lloh28:
	adrp	x8, _ETIME@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_CODA_REG_BIT_RUN_INDEX,4,2     ; @CODA_REG_BIT_RUN_INDEX
	.comm	_CODA_960,8,3                   ; @CODA_960
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_CODA9_GDI_BUS_CTRL,4,2         ; @CODA9_GDI_BUS_CTRL
	.comm	_CODA9_GDI_BUS_STATUS,4,2       ; @CODA9_GDI_BUS_STATUS
	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_CODA_REG_BIT_BUSY_FLAG,4,2     ; @CODA_REG_BIT_BUSY_FLAG
	.comm	_CODA_REG_BIT_BUSY,4,2          ; @CODA_REG_BIT_BUSY
	.comm	_CODA_REG_RUN_ENABLE,4,2        ; @CODA_REG_RUN_ENABLE
	.comm	_CODA_REG_BIT_CODE_RUN,4,2      ; @CODA_REG_BIT_CODE_RUN
.subsections_via_symbols
