	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks8842_reset_hw
_ks8842_reset_hw:                       ## @ks8842_reset_hw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_ks8842_reset
	movq	_REG_TXCR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$16, %esi
	movl	$14, %edx
	callq	_ks8842_write16
	movq	_REG_RXCR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$16, %esi
	movl	$1256, %edx                     ## imm = 0x4E8
	callq	_ks8842_write16
	movq	_REG_TXFDPR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$17, %esi
	movl	$16384, %edx                    ## imm = 0x4000
	callq	_ks8842_write16
	movq	_REG_RXFDPR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$17, %esi
	movl	$16384, %edx                    ## imm = 0x4000
	callq	_ks8842_write16
	movq	_REG_QRFCR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_ks8842_write16
	movq	_REG_SGCR1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$32, %esi
	movl	$256, %edx                      ## imm = 0x100
	callq	_ks8842_enable_bits
	movq	_REG_SGCR2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$32, %esi
	movl	$8, %edx
	callq	_ks8842_enable_bits
	movq	_REG_P1CR2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$48, %esi
	movl	$7687, %edx                     ## imm = 0x1E07
	callq	_ks8842_write16
	movq	_REG_P1CR4@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$49, %esi
	movl	$8192, %edx                     ## imm = 0x2000
	callq	_ks8842_enable_bits
	movq	%rbx, %rdi
	callq	_ks8842_enable_tx
	movq	%rbx, %rdi
	callq	_ks8842_enable_rx
	movq	_REG_ISR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$18, %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_ks8842_write16
	movq	%rbx, %rdi
	callq	_KS8842_USE_DMA
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENABLED_IRQS_DMA_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_REG_TIMB_IER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_iowrite16
	movq	_ENABLED_IRQS_DMA@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_MICREL_KS884X@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_4
## %bb.3:
	movq	_ENABLED_IRQS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_REG_TIMB_IER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_iowrite16
LBB0_4:
	movq	_ENABLED_IRQS@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edx
	movq	_REG_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$18, %esi
	callq	_ks8842_write16
	movq	_REG_SW_ID_AND_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$32, %esi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ks8842_write16                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_TXCR,4,2                   ## @REG_TXCR
	.comm	_REG_RXCR,4,2                   ## @REG_RXCR
	.comm	_REG_TXFDPR,4,2                 ## @REG_TXFDPR
	.comm	_REG_RXFDPR,4,2                 ## @REG_RXFDPR
	.comm	_REG_QRFCR,4,2                  ## @REG_QRFCR
	.comm	_REG_SGCR1,4,2                  ## @REG_SGCR1
	.comm	_REG_SGCR2,4,2                  ## @REG_SGCR2
	.comm	_REG_P1CR2,4,2                  ## @REG_P1CR2
	.comm	_REG_P1CR4,4,2                  ## @REG_P1CR4
	.comm	_REG_ISR,4,2                    ## @REG_ISR
	.comm	_ENABLED_IRQS_DMA_IP,4,2        ## @ENABLED_IRQS_DMA_IP
	.comm	_REG_TIMB_IER,8,3               ## @REG_TIMB_IER
	.comm	_ENABLED_IRQS_DMA,4,2           ## @ENABLED_IRQS_DMA
	.comm	_REG_IER,4,2                    ## @REG_IER
	.comm	_MICREL_KS884X,4,2              ## @MICREL_KS884X
	.comm	_ENABLED_IRQS,4,2               ## @ENABLED_IRQS
	.comm	_REG_SW_ID_AND_ENABLE,4,2       ## @REG_SW_ID_AND_ENABLE
	.no_dead_strip	_ks8842_reset_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks8842_reset_hw
_ks8842_reset_hw:                       ; @ks8842_reset_hw
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_ks8842_reset
Lloh0:
	adrp	x8, _REG_TXCR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_TXCR@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #16
	mov	w2, #14
	bl	_ks8842_write16
Lloh3:
	adrp	x8, _REG_RXCR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_RXCR@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #16
	mov	w2, #1256
	bl	_ks8842_write16
Lloh6:
	adrp	x8, _REG_TXFDPR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_TXFDPR@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #17
	mov	w2, #16384
	bl	_ks8842_write16
Lloh9:
	adrp	x8, _REG_RXFDPR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_RXFDPR@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #17
	mov	w2, #16384
	bl	_ks8842_write16
Lloh12:
	adrp	x8, _REG_QRFCR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_QRFCR@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4096
	bl	_ks8842_write16
Lloh15:
	adrp	x8, _REG_SGCR1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REG_SGCR1@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #32
	mov	w2, #256
	bl	_ks8842_enable_bits
Lloh18:
	adrp	x8, _REG_SGCR2@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REG_SGCR2@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #32
	mov	w2, #8
	bl	_ks8842_enable_bits
Lloh21:
	adrp	x8, _REG_P1CR2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _REG_P1CR2@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #48
	mov	w2, #7687
	bl	_ks8842_write16
Lloh24:
	adrp	x8, _REG_P1CR4@GOTPAGE
Lloh25:
	ldr	x8, [x8, _REG_P1CR4@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #49
	mov	w2, #8192
	bl	_ks8842_enable_bits
	mov	x0, x19
	bl	_ks8842_enable_tx
	mov	x0, x19
	bl	_ks8842_enable_rx
Lloh27:
	adrp	x8, _REG_ISR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _REG_ISR@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #18
	mov	w2, #65535
	bl	_ks8842_write16
	mov	x0, x19
	bl	_KS8842_USE_DMA
	cbz	x0, LBB0_2
; %bb.1:
Lloh30:
	adrp	x8, _ENABLED_IRQS_DMA_IP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENABLED_IRQS_DMA_IP@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh33:
	adrp	x9, _REG_TIMB_IER@GOTPAGE
Lloh34:
	ldr	x9, [x9, _REG_TIMB_IER@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite16
Lloh36:
	adrp	x8, _ENABLED_IRQS_DMA@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENABLED_IRQS_DMA@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	b	LBB0_5
LBB0_2:
	ldr	w8, [x19]
Lloh39:
	adrp	x9, _MICREL_KS884X@GOTPAGE
Lloh40:
	ldr	x9, [x9, _MICREL_KS884X@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
Lloh42:
	adrp	x20, _ENABLED_IRQS@GOTPAGE
Lloh43:
	ldr	x20, [x20, _ENABLED_IRQS@GOTPAGEOFF]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x20]
	ldr	x8, [x19, #8]
Lloh44:
	adrp	x9, _REG_TIMB_IER@GOTPAGE
Lloh45:
	ldr	x9, [x9, _REG_TIMB_IER@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite16
LBB0_4:
	ldr	w2, [x20]
LBB0_5:
Lloh47:
	adrp	x8, _REG_IER@GOTPAGE
Lloh48:
	ldr	x8, [x8, _REG_IER@GOTPAGEOFF]
Lloh49:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #18
	bl	_ks8842_write16
Lloh50:
	adrp	x8, _REG_SW_ID_AND_ENABLE@GOTPAGE
Lloh51:
	ldr	x8, [x8, _REG_SW_ID_AND_ENABLE@GOTPAGEOFF]
Lloh52:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #32
	mov	w2, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ks8842_write16
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_TXCR,4,2                   ; @REG_TXCR
	.comm	_REG_RXCR,4,2                   ; @REG_RXCR
	.comm	_REG_TXFDPR,4,2                 ; @REG_TXFDPR
	.comm	_REG_RXFDPR,4,2                 ; @REG_RXFDPR
	.comm	_REG_QRFCR,4,2                  ; @REG_QRFCR
	.comm	_REG_SGCR1,4,2                  ; @REG_SGCR1
	.comm	_REG_SGCR2,4,2                  ; @REG_SGCR2
	.comm	_REG_P1CR2,4,2                  ; @REG_P1CR2
	.comm	_REG_P1CR4,4,2                  ; @REG_P1CR4
	.comm	_REG_ISR,4,2                    ; @REG_ISR
	.comm	_ENABLED_IRQS_DMA_IP,4,2        ; @ENABLED_IRQS_DMA_IP
	.comm	_REG_TIMB_IER,8,3               ; @REG_TIMB_IER
	.comm	_ENABLED_IRQS_DMA,4,2           ; @ENABLED_IRQS_DMA
	.comm	_REG_IER,4,2                    ; @REG_IER
	.comm	_MICREL_KS884X,4,2              ; @MICREL_KS884X
	.comm	_ENABLED_IRQS,4,2               ; @ENABLED_IRQS
	.comm	_REG_SW_ID_AND_ENABLE,4,2       ; @REG_SW_ID_AND_ENABLE
	.no_dead_strip	_ks8842_reset_hw
.subsections_via_symbols
