	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __ath9k_hw_init
___ath9k_hw_init:                       ## @__ath9k_hw_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_ath9k_hw_read_revisions
	testl	%eax, %eax
	je	LBB0_20
## %bb.1:
	movl	8(%r15), %edx
	leal	-128(%rdx), %eax
	cmpl	$17, %eax
	jae	LBB0_21
## %bb.2:
	movq	%r15, %rdi
	callq	_AR_SREV_9300_20_OR_LATER
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_AR_WA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	movl	%eax, (%r15)
	movq	_AR_WA_D3_L1_DISABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_AR_WA_ASPM_TIMER_BASED_DISABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r15)
LBB0_4:
	movq	_ATH9K_RESET_POWER_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ath9k_hw_set_reset_reg
	testl	%eax, %eax
	je	LBB0_25
## %bb.5:
	movq	%r15, %rdi
	callq	_AR_SREV_9565
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_AR_WA_BIT22@GOTPCREL(%rip), %rax
	movl	(%r15), %edx
	orl	(%rax), %edx
	movl	%edx, (%r15)
	movq	_AR_WA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_WRITE
LBB0_7:
	movq	%r15, %rdi
	callq	_ath9k_hw_init_defaults
	movq	%r15, %rdi
	callq	_ath9k_hw_init_config
	movq	%r15, %rdi
	callq	_ath9k_hw_attach_ops
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.8:
	movq	_ATH9K_PM_AWAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ath9k_hw_setpower
	testl	%eax, %eax
	je	LBB0_27
## %bb.9:
	movq	%r15, %rdi
	callq	_AR_SREV_9271
	testq	%rax, %rax
	jne	LBB0_14
## %bb.10:
	movq	%r15, %rdi
	callq	_AR_SREV_9100
	testq	%rax, %rax
	jne	LBB0_14
## %bb.11:
	movq	%r15, %rdi
	callq	_AR_SREV_9340
	testq	%rax, %rax
	jne	LBB0_14
## %bb.12:
	movq	%r15, %rdi
	callq	_AR_SREV_9330
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	callq	_AR_SREV_9550
	testq	%rax, %rax
	je	LBB0_15
LBB0_14:
	movl	$0, 4(%r15)
LBB0_15:
	movq	_AR_PHY_CHIP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	movq	%rax, 16(%r15)
	movq	%r15, %rdi
	callq	_ath9k_hw_init_cal_settings
	cmpl	$0, 4(%r15)
	jne	LBB0_17
## %bb.16:
	movq	%r15, %rdi
	callq	_ath9k_hw_disablepcie
LBB0_17:
	movq	%r15, %rdi
	callq	_ath9k_hw_post_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.18:
	movq	%r15, %rdi
	callq	_ath9k_hw_init_mode_gain_regs
	movq	%r15, %rdi
	callq	_ath9k_hw_fill_cap_info
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
## %bb.19:
	movq	%r15, %rdi
	callq	_ath9k_hw_init_macaddr
	movq	%r15, %rdi
	callq	_ath9k_hw_init_hang_checks
	movq	_ATH_HW_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_20:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ath_err
	jmp	LBB0_22
LBB0_21:
	movl	24(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_ath_err
LBB0_22:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_23:
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	leaq	L_.str.2(%rip), %rsi
LBB0_26:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_ath_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_27:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not read hardware revisions"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
L_.str.1:                               ## @.str.1
	.asciz	"Mac Chip Rev 0x%02x.%x is not supported by this driver\n"

	.comm	_AR_WA,4,2                      ## @AR_WA
	.comm	_AR_WA_D3_L1_DISABLE,4,2        ## @AR_WA_D3_L1_DISABLE
	.comm	_AR_WA_ASPM_TIMER_BASED_DISABLE,4,2 ## @AR_WA_ASPM_TIMER_BASED_DISABLE
	.comm	_ATH9K_RESET_POWER_ON,4,2       ## @ATH9K_RESET_POWER_ON
L_.str.2:                               ## @.str.2
	.asciz	"Couldn't reset chip\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_AR_WA_BIT22,4,2                ## @AR_WA_BIT22
	.comm	_ATH9K_PM_AWAKE,4,2             ## @ATH9K_PM_AWAKE
L_.str.3:                               ## @.str.3
	.asciz	"Couldn't wakeup chip\n"

	.comm	_AR_PHY_CHIP_ID,4,2             ## @AR_PHY_CHIP_ID
	.comm	_ATH_HW_INITIALIZED,4,2         ## @ATH_HW_INITIALIZED
	.no_dead_strip	___ath9k_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __ath9k_hw_init
___ath9k_hw_init:                       ; @__ath9k_hw_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	bl	_ath9k_hw_common
	mov	x19, x0
	mov	x0, x20
	bl	_ath9k_hw_read_revisions
	cbz	w0, LBB0_20
; %bb.1:
	ldr	w8, [x20, #8]
	sub	w9, w8, #128
	cmp	w9, #17
	b.hs	LBB0_21
; %bb.2:
	mov	x0, x20
	bl	_AR_SREV_9300_20_OR_LATER
Lloh0:
	adrp	x21, _AR_WA@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AR_WA@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_REG_READ
	str	w0, [x20]
Lloh2:
	adrp	x8, _AR_WA_D3_L1_DISABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AR_WA_D3_L1_DISABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _AR_WA_ASPM_TIMER_BASED_DISABLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AR_WA_ASPM_TIMER_BASED_DISABLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w8, w8, w9
	str	w8, [x20]
LBB0_4:
Lloh8:
	adrp	x8, _ATH9K_RESET_POWER_ON@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATH9K_RESET_POWER_ON@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ath9k_hw_set_reset_reg
	cbz	w0, LBB0_25
; %bb.5:
	mov	x0, x20
	bl	_AR_SREV_9565
	cbz	x0, LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _AR_WA_BIT22@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR_WA_BIT22@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w2, w9, w8
	str	w2, [x20]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_REG_WRITE
LBB0_7:
	mov	x0, x20
	bl	_ath9k_hw_init_defaults
	mov	x0, x20
	bl	_ath9k_hw_init_config
	mov	x0, x20
	bl	_ath9k_hw_attach_ops
	cbnz	w0, LBB0_24
; %bb.8:
Lloh14:
	adrp	x8, _ATH9K_PM_AWAKE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATH9K_PM_AWAKE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ath9k_hw_setpower
	cbz	w0, LBB0_27
; %bb.9:
	mov	x0, x20
	bl	_AR_SREV_9271
	cbnz	x0, LBB0_14
; %bb.10:
	mov	x0, x20
	bl	_AR_SREV_9100
	cbnz	x0, LBB0_14
; %bb.11:
	mov	x0, x20
	bl	_AR_SREV_9340
	cbnz	x0, LBB0_14
; %bb.12:
	mov	x0, x20
	bl	_AR_SREV_9330
	cbnz	x0, LBB0_14
; %bb.13:
	mov	x0, x20
	bl	_AR_SREV_9550
	cbz	x0, LBB0_15
LBB0_14:
	str	wzr, [x20, #4]
LBB0_15:
Lloh17:
	adrp	x8, _AR_PHY_CHIP_ID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AR_PHY_CHIP_ID@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_REG_READ
	str	x0, [x20, #16]
	mov	x0, x20
	bl	_ath9k_hw_init_cal_settings
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_ath9k_hw_disablepcie
LBB0_17:
	mov	x0, x20
	bl	_ath9k_hw_post_init
	cbnz	w0, LBB0_24
; %bb.18:
	mov	x0, x20
	bl	_ath9k_hw_init_mode_gain_regs
	mov	x0, x20
	bl	_ath9k_hw_fill_cap_info
	cbnz	w0, LBB0_24
; %bb.19:
	mov	x0, x20
	bl	_ath9k_hw_init_macaddr
	mov	x0, x20
	bl	_ath9k_hw_init_hang_checks
	mov	w0, #0
Lloh20:
	adrp	x8, _ATH_HW_INITIALIZED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATH_HW_INITIALIZED@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_24
LBB0_20:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_22
LBB0_21:
	ldr	w9, [x20, #24]
	stp	x8, x9, [sp]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_22:
	mov	x0, x19
	bl	_ath_err
Lloh27:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_24:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_25:
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_26:
	mov	x0, x19
	bl	_ath_err
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_23
LBB0_27:
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_26
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not read hardware revisions"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
l_.str.1:                               ; @.str.1
	.asciz	"Mac Chip Rev 0x%02x.%x is not supported by this driver\n"

	.comm	_AR_WA,4,2                      ; @AR_WA
	.comm	_AR_WA_D3_L1_DISABLE,4,2        ; @AR_WA_D3_L1_DISABLE
	.comm	_AR_WA_ASPM_TIMER_BASED_DISABLE,4,2 ; @AR_WA_ASPM_TIMER_BASED_DISABLE
	.comm	_ATH9K_RESET_POWER_ON,4,2       ; @ATH9K_RESET_POWER_ON
l_.str.2:                               ; @.str.2
	.asciz	"Couldn't reset chip\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_AR_WA_BIT22,4,2                ; @AR_WA_BIT22
	.comm	_ATH9K_PM_AWAKE,4,2             ; @ATH9K_PM_AWAKE
l_.str.3:                               ; @.str.3
	.asciz	"Couldn't wakeup chip\n"

	.comm	_AR_PHY_CHIP_ID,4,2             ; @AR_PHY_CHIP_ID
	.comm	_ATH_HW_INITIALIZED,4,2         ; @ATH_HW_INITIALIZED
	.no_dead_strip	___ath9k_hw_init
.subsections_via_symbols
