	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks8695_reset
_ks8695_reset:                          ## @ks8695_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_watchdog@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_KS8695_DTXC@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_DTXC_TRST@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_ks8695_writereg
	testl	%ebx, %ebx
	je	LBB0_4
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_ks8695_readreg
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	callq	_msleep
	decl	%ebx
	jne	LBB0_1
	jmp	LBB0_4
LBB0_3:
	testl	%ebx, %ebx
	jg	LBB0_5
LBB0_4:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_crit
LBB0_5:
	movl	$10, %edi
	callq	_msleep
	movq	_KS8695_DRXC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DRXC_RU@GOTPCREL(%rip), %rax
	movq	_DRXC_RB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_ks8695_writereg
	movl	(%r14), %esi
	movq	_DTXC_TEP@GOTPCREL(%rip), %rax
	movq	_DTXC_TAC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ks8695_writereg                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_watchdog,4,2                   ## @watchdog
	.comm	_KS8695_DTXC,4,2                ## @KS8695_DTXC
	.comm	_DTXC_TRST,4,2                  ## @DTXC_TRST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout waiting for DMA engines to reset\n"

	.comm	_KS8695_DRXC,4,2                ## @KS8695_DRXC
	.comm	_DRXC_RU,4,2                    ## @DRXC_RU
	.comm	_DRXC_RB,4,2                    ## @DRXC_RB
	.comm	_DTXC_TEP,4,2                   ## @DTXC_TEP
	.comm	_DTXC_TAC,4,2                   ## @DTXC_TAC
	.no_dead_strip	_ks8695_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks8695_reset
_ks8695_reset:                          ; @ks8695_reset
	.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	x19, x0
Lloh0:
	adrp	x8, _watchdog@GOTPAGE
Lloh1:
	ldr	x8, [x8, _watchdog@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x20, _KS8695_DTXC@GOTPAGE
Lloh4:
	ldr	x20, [x20, _KS8695_DTXC@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh5:
	adrp	x22, _DTXC_TRST@GOTPAGE
Lloh6:
	ldr	x22, [x22, _DTXC_TRST@GOTPAGEOFF]
	ldr	w2, [x22]
	bl	_ks8695_writereg
	cbz	w21, LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ks8695_readreg
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	w21, w21, #1
	mov	w0, #1
	bl	_msleep
	cbnz	w21, LBB0_1
	b	LBB0_4
LBB0_3:
	cmp	w21, #0
	b.gt	LBB0_5
LBB0_4:
	ldr	w0, [x19]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_crit
LBB0_5:
	mov	w0, #10
	bl	_msleep
Lloh9:
	adrp	x8, _KS8695_DRXC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KS8695_DRXC@GOTPAGEOFF]
Lloh11:
	adrp	x9, _DRXC_RU@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DRXC_RU@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	ldr	w8, [x9]
Lloh15:
	adrp	x9, _DRXC_RB@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DRXC_RB@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_ks8695_writereg
	ldr	w1, [x20]
Lloh18:
	adrp	x8, _DTXC_TEP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DTXC_TEP@GOTPAGEOFF]
Lloh20:
	adrp	x9, _DTXC_TAC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DTXC_TAC@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	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
	b	_ks8695_writereg
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_watchdog,4,2                   ; @watchdog
	.comm	_KS8695_DTXC,4,2                ; @KS8695_DTXC
	.comm	_DTXC_TRST,4,2                  ; @DTXC_TRST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout waiting for DMA engines to reset\n"

	.comm	_KS8695_DRXC,4,2                ; @KS8695_DRXC
	.comm	_DRXC_RU,4,2                    ; @DRXC_RU
	.comm	_DRXC_RB,4,2                    ; @DRXC_RB
	.comm	_DTXC_TEP,4,2                   ; @DTXC_TEP
	.comm	_DTXC_TAC,4,2                   ; @DTXC_TAC
	.no_dead_strip	_ks8695_reset
.subsections_via_symbols
