	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_of_init
_ath9k_of_init:                         ## @ath9k_of_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r15
	movq	8(%rdi), %rax
	movq	(%rax), %r12
	movq	%r15, %rdi
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movq	8(%rax), %rax
	movl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_of_device_is_available
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_ath_dbg
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	%r13d, %edi
	callq	_ath_bus_type_to_string
	movl	%eax, %r13d
	movl	4(%r15), %edi
	callq	_dev_name
	leaq	L_.str.2(%rip), %rdx
	leaq	-160(%rbp), %rdi
	movl	$100, %esi
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_scnprintf
	movq	%rbx, %rdi
	leaq	-160(%rbp), %rsi
	callq	_ath9k_eeprom_request
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_AH_USE_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%r15), %eax
	movl	%eax, (%r15)
	movq	_AH_NO_EEP_SWAP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r15)
LBB0_4:
	movq	%r12, %rdi
	callq	_of_get_mac_address
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_ether_addr_copy
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG,4,2                     ## @CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"parsing configuration from OF node\n"

L_.str.1:                               ## @.str.1
	.asciz	"qca,no-eeprom"

L_.str.2:                               ## @.str.2
	.asciz	"ath9k-eeprom-%s-%s.bin"

	.comm	_AH_USE_EEPROM,4,2              ## @AH_USE_EEPROM
	.comm	_AH_NO_EEP_SWAP,4,2             ## @AH_NO_EEP_SWAP
	.no_dead_strip	_ath9k_of_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_of_init
_ath9k_of_init:                         ; @ath9k_of_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldp	x21, x8, [x0]
	ldr	x20, [x8]
	mov	x0, x21
	bl	_ath9k_hw_common
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w23, [x8]
	mov	x0, x20
	bl	_of_device_is_available
	cbz	w0, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _CONFIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ath_dbg
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_of_property_read_bool
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x23
	bl	_ath_bus_type_to_string
	mov	x23, x0
	ldr	w0, [x21, #4]
	bl	_dev_name
	mov	x4, x0
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #4
	mov	w1, #100
	mov	x3, x23
	bl	_scnprintf
	add	x1, sp, #4
	mov	x0, x22
	bl	_ath9k_eeprom_request
	cbnz	w0, LBB0_7
; %bb.3:
Lloh12:
	adrp	x8, _AH_USE_EEPROM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AH_USE_EEPROM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x21]
	bic	w8, w9, w8
	str	w8, [x21]
Lloh15:
	adrp	x9, _AH_NO_EEP_SWAP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _AH_NO_EEP_SWAP@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x21]
LBB0_4:
	mov	x0, x20
	bl	_of_get_mac_address
	mov	x20, x0
	bl	_IS_ERR
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_ether_addr_copy
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldur	x8, [x29, #-56]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG,4,2                     ; @CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"parsing configuration from OF node\n"

l_.str.1:                               ; @.str.1
	.asciz	"qca,no-eeprom"

l_.str.2:                               ; @.str.2
	.asciz	"ath9k-eeprom-%s-%s.bin"

	.comm	_AH_USE_EEPROM,4,2              ; @AH_USE_EEPROM
	.comm	_AH_NO_EEP_SWAP,4,2             ; @AH_NO_EEP_SWAP
	.no_dead_strip	_ath9k_of_init
.subsections_via_symbols
