	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_ani_save_and_clear_phy_errors
_ath5k_ani_save_and_clear_phy_errors:   ## @ath5k_ani_save_and_clear_phy_errors
	.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
	xorl	%r15d, %r15d
	cmpl	$0, (%rdi)
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	_AR5K_PHYERR_CNT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ath5k_hw_reg_read
	movl	%eax, %r12d
	movq	_AR5K_PHYERR_CNT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath5k_hw_reg_read
	movl	%eax, %r13d
	movq	_ATH5K_PHYERR_CNT_MAX@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_ATH5K_ANI_OFDM_TRIG_HIGH@GOTPCREL(%rip), %rax
	subl	(%rax), %esi
	movq	_AR5K_PHYERR_CNT1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ath5k_hw_reg_write
	movl	(%r14), %esi
	movq	_ATH5K_ANI_CCK_TRIG_HIGH@GOTPCREL(%rip), %rax
	subl	(%rax), %esi
	movq	_AR5K_PHYERR_CNT2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ath5k_hw_reg_write
	movl	(%r14), %eax
	subl	%eax, %r12d
	movq	_ATH5K_ANI_OFDM_TRIG_HIGH@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r12d
	subl	%eax, %r13d
	movq	_ATH5K_ANI_CCK_TRIG_HIGH@GOTPCREL(%rip), %rax
	addl	(%rax), %r13d
	movl	%r12d, %eax
	orl	%r13d, %eax
	je	LBB0_6
## %bb.2:
	testl	%r12d, %r12d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_4
## %bb.3:
	addl	%r12d, (%rax)
	addl	%r12d, 4(%rax)
LBB0_4:
	movl	$1, %r15d
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.5:
	addl	%r13d, 8(%rax)
	addl	%r13d, 12(%rax)
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_PHYERR_CNT1,4,2           ## @AR5K_PHYERR_CNT1
	.comm	_AR5K_PHYERR_CNT2,4,2           ## @AR5K_PHYERR_CNT2
	.comm	_ATH5K_PHYERR_CNT_MAX,4,2       ## @ATH5K_PHYERR_CNT_MAX
	.comm	_ATH5K_ANI_OFDM_TRIG_HIGH,4,2   ## @ATH5K_ANI_OFDM_TRIG_HIGH
	.comm	_ATH5K_ANI_CCK_TRIG_HIGH,4,2    ## @ATH5K_ANI_CCK_TRIG_HIGH
	.no_dead_strip	_ath5k_ani_save_and_clear_phy_errors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_ani_save_and_clear_phy_errors
_ath5k_ani_save_and_clear_phy_errors:   ; @ath5k_ani_save_and_clear_phy_errors
	.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	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _AR5K_PHYERR_CNT1@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AR5K_PHYERR_CNT1@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_ath5k_hw_reg_read
	mov	x21, x0
Lloh2:
	adrp	x24, _AR5K_PHYERR_CNT2@GOTPAGE
Lloh3:
	ldr	x24, [x24, _AR5K_PHYERR_CNT2@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_ath5k_hw_reg_read
	mov	x22, x0
Lloh4:
	adrp	x25, _ATH5K_PHYERR_CNT_MAX@GOTPAGE
Lloh5:
	ldr	x25, [x25, _ATH5K_PHYERR_CNT_MAX@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh6:
	adrp	x26, _ATH5K_ANI_OFDM_TRIG_HIGH@GOTPAGE
Lloh7:
	ldr	x26, [x26, _ATH5K_ANI_OFDM_TRIG_HIGH@GOTPAGEOFF]
	ldr	w9, [x26]
	sub	w1, w8, w9
	ldr	w2, [x23]
	mov	x0, x20
	bl	_ath5k_hw_reg_write
	ldr	w8, [x25]
Lloh8:
	adrp	x23, _ATH5K_ANI_CCK_TRIG_HIGH@GOTPAGE
Lloh9:
	ldr	x23, [x23, _ATH5K_ANI_CCK_TRIG_HIGH@GOTPAGEOFF]
	ldr	w9, [x23]
	sub	w1, w8, w9
	ldr	w2, [x24]
	mov	x0, x20
	bl	_ath5k_hw_reg_write
	ldr	w8, [x26]
	ldr	w10, [x25]
	sub	w9, w21, w10
	add	w9, w9, w8
	ldr	w8, [x23]
	sub	w10, w22, w10
	add	w8, w10, w8
	orr	w10, w9, w8
	cbnz	w10, LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_8
LBB0_3:
	cbz	w9, LBB0_5
; %bb.4:
	ldr	d0, [x19]
	dup.2s	v1, w9
	add.2s	v0, v0, v1
	str	d0, [x19]
LBB0_5:
	cbz	w8, LBB0_7
; %bb.6:
	ldr	d0, [x19, #8]
	dup.2s	v1, w8
	add.2s	v0, v0, v1
	str	d0, [x19, #8]
LBB0_7:
	mov	w0, #1
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_PHYERR_CNT1,4,2           ; @AR5K_PHYERR_CNT1
	.comm	_AR5K_PHYERR_CNT2,4,2           ; @AR5K_PHYERR_CNT2
	.comm	_ATH5K_PHYERR_CNT_MAX,4,2       ; @ATH5K_PHYERR_CNT_MAX
	.comm	_ATH5K_ANI_OFDM_TRIG_HIGH,4,2   ; @ATH5K_ANI_OFDM_TRIG_HIGH
	.comm	_ATH5K_ANI_CCK_TRIG_HIGH,4,2    ; @ATH5K_ANI_CCK_TRIG_HIGH
	.no_dead_strip	_ath5k_ani_save_and_clear_phy_errors
.subsections_via_symbols
