	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar5008_hw_override_ini
_ar5008_hw_override_ini:                ## @ar5008_hw_override_ini
	.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, %r14
	movq	_AR_DIAG_SW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_DIAG_RX_DIS@GOTPCREL(%rip), %rax
	movq	_AR_DIAG_RX_ABORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_REG_SET_BIT
	movq	%r14, %rdi
	callq	_AR_SREV_9280_20_OR_LATER
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_AR_PCU_MISC_MODE2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_REG_READ
	movq	_AR_ADHOC_MCAST_KEYID_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	notl	%r12d
	andl	%eax, %r12d
	movq	%r14, %rdi
	callq	_AR_SREV_9271
	movq	_AR_PCU_MISC_MODE2_HWWAR1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	xorl	%ebx, %ebx
	negl	%eax
	movl	$0, %r13d
	sbbl	%r13d, %r13d
	orl	%ecx, %r13d
	andl	%r12d, %r13d
	movq	%r14, %rdi
	callq	_AR_SREV_9287_11_OR_LATER
	movq	_AR_PCU_MISC_MODE2_HWWAR2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	cmpq	$1, %rax
	sbbl	%ebx, %ebx
	orl	%ecx, %ebx
	andl	%r13d, %ebx
	movq	_AR_PCU_MISC_MODE2_CFP_IGNORE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_REG_WRITE
LBB0_2:
	movq	%r14, %rdi
	callq	_AR_SREV_9280_20_OR_LATER
	testq	%rax, %rax
	je	LBB0_3
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	movl	$41516, %esi                    ## imm = 0xA22C
	movl	$17, %edx
	callq	_REG_WRITE
	movq	%r14, %rdi
	callq	_AR_SREV_9100
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_AR_SREV_9160
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	movq	_AR_PHY_HEAVY_CLIP_FACTOR_RIFS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_REG_READ
	movq	_AR_PHY_RIFS_INIT_DELAY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_WRITE                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_DIAG_SW,4,2                 ## @AR_DIAG_SW
	.comm	_AR_DIAG_RX_DIS,4,2             ## @AR_DIAG_RX_DIS
	.comm	_AR_DIAG_RX_ABORT,4,2           ## @AR_DIAG_RX_ABORT
	.comm	_AR_PCU_MISC_MODE2,4,2          ## @AR_PCU_MISC_MODE2
	.comm	_AR_ADHOC_MCAST_KEYID_ENABLE,4,2 ## @AR_ADHOC_MCAST_KEYID_ENABLE
	.comm	_AR_PCU_MISC_MODE2_HWWAR1,4,2   ## @AR_PCU_MISC_MODE2_HWWAR1
	.comm	_AR_PCU_MISC_MODE2_HWWAR2,4,2   ## @AR_PCU_MISC_MODE2_HWWAR2
	.comm	_AR_PCU_MISC_MODE2_CFP_IGNORE,4,2 ## @AR_PCU_MISC_MODE2_CFP_IGNORE
	.comm	_AR_PHY_HEAVY_CLIP_FACTOR_RIFS,4,2 ## @AR_PHY_HEAVY_CLIP_FACTOR_RIFS
	.comm	_AR_PHY_RIFS_INIT_DELAY,4,2     ## @AR_PHY_RIFS_INIT_DELAY
	.no_dead_strip	_ar5008_hw_override_ini
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar5008_hw_override_ini
_ar5008_hw_override_ini:                ; @ar5008_hw_override_ini
	.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, _AR_DIAG_SW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_DIAG_SW@GOTPAGEOFF]
Lloh2:
	adrp	x9, _AR_DIAG_RX_DIS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AR_DIAG_RX_DIS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _AR_DIAG_RX_ABORT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AR_DIAG_RX_ABORT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_REG_SET_BIT
	mov	x0, x19
	bl	_AR_SREV_9280_20_OR_LATER
	cbz	x0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x20, _AR_PCU_MISC_MODE2@GOTPAGE
Lloh10:
	ldr	x20, [x20, _AR_PCU_MISC_MODE2@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_REG_READ
Lloh11:
	adrp	x8, _AR_ADHOC_MCAST_KEYID_ENABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR_ADHOC_MCAST_KEYID_ENABLE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	bic	w21, w0, w8
	mov	x0, x19
	bl	_AR_SREV_9271
Lloh14:
	adrp	x8, _AR_PCU_MISC_MODE2_HWWAR1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR_PCU_MISC_MODE2_HWWAR1@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w0, #0
	mov	w22, #-1
	csinv	w8, w22, w8, ne
	and	w21, w21, w8
	mov	x0, x19
	bl	_AR_SREV_9287_11_OR_LATER
Lloh17:
	adrp	x8, _AR_PCU_MISC_MODE2_HWWAR2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AR_PCU_MISC_MODE2_HWWAR2@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	x0, #0
	csinv	w8, w22, w8, eq
	and	w8, w21, w8
Lloh20:
	adrp	x9, _AR_PCU_MISC_MODE2_CFP_IGNORE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AR_PCU_MISC_MODE2_CFP_IGNORE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_REG_WRITE
LBB0_2:
	mov	x0, x19
	bl	_AR_SREV_9280_20_OR_LATER
	cbz	x0, LBB0_4
LBB0_3:
	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
	ret
LBB0_4:
	mov	x0, x19
	mov	w1, #41516
	mov	w2, #17
	bl	_REG_WRITE
	mov	x0, x19
	bl	_AR_SREV_9100
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_AR_SREV_9160
	cbz	x0, LBB0_3
LBB0_6:
Lloh23:
	adrp	x20, _AR_PHY_HEAVY_CLIP_FACTOR_RIFS@GOTPAGE
Lloh24:
	ldr	x20, [x20, _AR_PHY_HEAVY_CLIP_FACTOR_RIFS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_REG_READ
Lloh25:
	adrp	x8, _AR_PHY_RIFS_INIT_DELAY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AR_PHY_RIFS_INIT_DELAY@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x20]
	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	_REG_WRITE
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_DIAG_SW,4,2                 ; @AR_DIAG_SW
	.comm	_AR_DIAG_RX_DIS,4,2             ; @AR_DIAG_RX_DIS
	.comm	_AR_DIAG_RX_ABORT,4,2           ; @AR_DIAG_RX_ABORT
	.comm	_AR_PCU_MISC_MODE2,4,2          ; @AR_PCU_MISC_MODE2
	.comm	_AR_ADHOC_MCAST_KEYID_ENABLE,4,2 ; @AR_ADHOC_MCAST_KEYID_ENABLE
	.comm	_AR_PCU_MISC_MODE2_HWWAR1,4,2   ; @AR_PCU_MISC_MODE2_HWWAR1
	.comm	_AR_PCU_MISC_MODE2_HWWAR2,4,2   ; @AR_PCU_MISC_MODE2_HWWAR2
	.comm	_AR_PCU_MISC_MODE2_CFP_IGNORE,4,2 ; @AR_PCU_MISC_MODE2_CFP_IGNORE
	.comm	_AR_PHY_HEAVY_CLIP_FACTOR_RIFS,4,2 ; @AR_PHY_HEAVY_CLIP_FACTOR_RIFS
	.comm	_AR_PHY_RIFS_INIT_DELAY,4,2     ; @AR_PHY_RIFS_INIT_DELAY
	.no_dead_strip	_ar5008_hw_override_ini
.subsections_via_symbols
