	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cas_reset
_cas_reset:                             ## @cas_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_cas_mask_intr
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_cas_global_reset
	movq	%rbx, %rdi
	callq	_cas_mac_reset
	movq	%rbx, %rdi
	callq	_cas_entropy_reset
	movq	_REG_TX_CFG@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	movq	_TX_CFG_DMA_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r14), %rsi
	addq	16(%rbx), %rsi
	callq	_writel
	movq	_REG_RX_CFG@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	16(%rbx), %rdi
	callq	_readl
	movq	_RX_CFG_DMA_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r14), %rsi
	addq	16(%rbx), %rsi
	callq	_writel
	movq	_CAS_FLAG_TARGET_ABORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_CAS_HP_ALT_FIRMWARE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_cas_prog_null@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_3
LBB0_2:
	movq	_CAS_HP_FIRMWARE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
LBB0_3:
	movq	%rbx, %rdi
	callq	_cas_load_firmware
	movq	_N_TX_RINGS@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	shlq	$2, %rdi
	addq	8(%rbx), %rdi
	callq	_spin_lock
	movq	%rbx, %rdi
	callq	_cas_clear_mac_err
	movq	(%r14), %rdi
	shlq	$2, %rdi
	addq	8(%rbx), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_TX_CFG,8,3                 ## @REG_TX_CFG
	.comm	_TX_CFG_DMA_EN,4,2              ## @TX_CFG_DMA_EN
	.comm	_REG_RX_CFG,8,3                 ## @REG_RX_CFG
	.comm	_RX_CFG_DMA_EN,4,2              ## @RX_CFG_DMA_EN
	.comm	_CAS_FLAG_TARGET_ABORT,4,2      ## @CAS_FLAG_TARGET_ABORT
	.comm	_CAS_HP_ALT_FIRMWARE,8,3        ## @CAS_HP_ALT_FIRMWARE
	.comm	_cas_prog_null,8,3              ## @cas_prog_null
	.comm	_CAS_HP_FIRMWARE,8,3            ## @CAS_HP_FIRMWARE
	.comm	_N_TX_RINGS,8,3                 ## @N_TX_RINGS
	.no_dead_strip	_cas_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cas_reset
_cas_reset:                             ; @cas_reset
	.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	x20, x1
	mov	x19, x0
	bl	_cas_mask_intr
	mov	x0, x19
	mov	x1, x20
	bl	_cas_global_reset
	mov	x0, x19
	bl	_cas_mac_reset
	mov	x0, x19
	bl	_cas_entropy_reset
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x20, _REG_TX_CFG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _REG_TX_CFG@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _TX_CFG_DMA_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TX_CFG_DMA_EN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #16]
Lloh5:
	adrp	x20, _REG_RX_CFG@GOTPAGE
Lloh6:
	ldr	x20, [x20, _REG_RX_CFG@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh7:
	adrp	x8, _RX_CFG_DMA_EN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RX_CFG_DMA_EN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x19, #16]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _CAS_FLAG_TARGET_ABORT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CAS_FLAG_TARGET_ABORT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh13:
	adrp	x8, _CAS_HP_ALT_FIRMWARE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CAS_HP_ALT_FIRMWARE@GOTPAGEOFF]
Lloh15:
	ldr	x1, [x8]
Lloh16:
	adrp	x8, _cas_prog_null@GOTPAGE
Lloh17:
	ldr	x8, [x8, _cas_prog_null@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_3
LBB0_2:
Lloh19:
	adrp	x8, _CAS_HP_FIRMWARE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CAS_HP_FIRMWARE@GOTPAGEOFF]
Lloh21:
	ldr	x1, [x8]
LBB0_3:
	mov	x0, x19
	bl	_cas_load_firmware
	ldr	x8, [x19, #8]
Lloh22:
	adrp	x20, _N_TX_RINGS@GOTPAGE
Lloh23:
	ldr	x20, [x20, _N_TX_RINGS@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x8, x9, lsl #2
	bl	_spin_lock
	mov	x0, x19
	bl	_cas_clear_mac_err
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x8, x9, lsl #2
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_TX_CFG,8,3                 ; @REG_TX_CFG
	.comm	_TX_CFG_DMA_EN,4,2              ; @TX_CFG_DMA_EN
	.comm	_REG_RX_CFG,8,3                 ; @REG_RX_CFG
	.comm	_RX_CFG_DMA_EN,4,2              ; @RX_CFG_DMA_EN
	.comm	_CAS_FLAG_TARGET_ABORT,4,2      ; @CAS_FLAG_TARGET_ABORT
	.comm	_CAS_HP_ALT_FIRMWARE,8,3        ; @CAS_HP_ALT_FIRMWARE
	.comm	_cas_prog_null,8,3              ; @cas_prog_null
	.comm	_CAS_HP_FIRMWARE,8,3            ; @CAS_HP_FIRMWARE
	.comm	_N_TX_RINGS,8,3                 ; @N_TX_RINGS
	.no_dead_strip	_cas_reset
.subsections_via_symbols
