	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_init_firmware_version
_ath9k_init_firmware_version:           ## @ath9k_init_firmware_version
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	leaq	-24(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_WMI_GET_FW_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WMI_CMD
	movl	-20(%rbp), %edi
	callq	_be16_to_cpu
	movl	%eax, (%rbx)
	movl	-24(%rbp), %edi
	callq	_be16_to_cpu
	movl	%eax, 4(%rbx)
	movq	(%r14), %rcx
	movl	(%rcx), %edi
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	movl	%eax, %r8d
	callq	_snprintf
	movl	12(%rbx), %edi
	movl	(%rbx), %edx
	movl	4(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	movl	(%rbx), %eax
	movq	_MAJOR_VERSION_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	jne	LBB0_1
## %bb.2:
	movl	4(%rbx), %esi
	movq	_MINOR_VERSION_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %esi
	jl	LBB0_3
## %bb.4:
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.5:
	cmpl	$3, %esi
	jg	LBB0_7
## %bb.6:
	movq	_HTC_FWFLAG_NO_RMW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%rbx), %rsi
	callq	_set_bit
LBB0_7:
	movl	12(%rbx), %r14d
	movq	_HTC_FWFLAG_NO_RMW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_8
LBB0_1:
	movq	_MINOR_VERSION_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_3:
	movl	12(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WMI_GET_FW_VERSION,4,2         ## @WMI_GET_FW_VERSION
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d.%d"

L_.str.1:                               ## @.str.1
	.asciz	"ath9k_htc: FW Version: %d.%d\n"

	.comm	_MAJOR_VERSION_REQ,4,2          ## @MAJOR_VERSION_REQ
	.comm	_MINOR_VERSION_REQ,4,2          ## @MINOR_VERSION_REQ
L_.str.2:                               ## @.str.2
	.asciz	"ath9k_htc: Please upgrade to FW version %d.%d\n"

	.comm	_HTC_FWFLAG_NO_RMW,4,2          ## @HTC_FWFLAG_NO_RMW
L_.str.3:                               ## @.str.3
	.asciz	"FW RMW support: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"Off"

L_.str.5:                               ## @.str.5
	.asciz	"On"

	.no_dead_strip	_ath9k_init_firmware_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_init_firmware_version
_ath9k_init_firmware_version:           ; @ath9k_init_firmware_version
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	x20, [x0, #16]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x8, _WMI_GET_FW_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WMI_GET_FW_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_WMI_CMD
	ldr	w0, [sp, #28]
	bl	_be16_to_cpu
	str	w0, [x19]
	ldr	w0, [sp, #24]
	bl	_be16_to_cpu
	mov	x4, x0
	str	w4, [x19, #4]
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w3, [x19]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_snprintf
	ldr	w0, [x19, #12]
	ldp	w8, w9, [x19]
	stp	x8, x9, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	ldr	w8, [x19]
Lloh7:
	adrp	x9, _MAJOR_VERSION_REQ@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAJOR_VERSION_REQ@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x9]
	cmp	w8, w2
	b.ne	LBB0_6
; %bb.1:
	ldr	w9, [x19, #4]
Lloh10:
	adrp	x10, _MINOR_VERSION_REQ@GOTPAGE
Lloh11:
	ldr	x10, [x10, _MINOR_VERSION_REQ@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x10]
	cmp	w9, w3
	b.lt	LBB0_7
; %bb.2:
Lloh13:
	adrp	x21, _HTC_FWFLAG_NO_RMW@GOTPAGE
Lloh14:
	ldr	x21, [x21, _HTC_FWFLAG_NO_RMW@GOTPAGEOFF]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.3:
	cmp	w9, #3
	b.gt	LBB0_5
; %bb.4:
	ldr	w0, [x21]
	add	x1, x19, #8
	bl	_set_bit
LBB0_5:
	ldr	w20, [x19, #12]
	ldr	w0, [x21]
	add	x1, x19, #8
	bl	_test_bit
Lloh15:
	adrp	x8, l_.str.4@PAGE
Lloh16:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh17:
	adrp	x9, l_.str.5@PAGE
Lloh18:
	add	x9, x9, l_.str.5@PAGEOFF
	cmp	x0, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	mov	w0, #0
	b	LBB0_8
LBB0_6:
Lloh21:
	adrp	x8, _MINOR_VERSION_REQ@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MINOR_VERSION_REQ@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
LBB0_7:
	ldr	w0, [x19, #12]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_WMI_GET_FW_VERSION,4,2         ; @WMI_GET_FW_VERSION
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d.%d"

l_.str.1:                               ; @.str.1
	.asciz	"ath9k_htc: FW Version: %d.%d\n"

	.comm	_MAJOR_VERSION_REQ,4,2          ; @MAJOR_VERSION_REQ
	.comm	_MINOR_VERSION_REQ,4,2          ; @MINOR_VERSION_REQ
l_.str.2:                               ; @.str.2
	.asciz	"ath9k_htc: Please upgrade to FW version %d.%d\n"

	.comm	_HTC_FWFLAG_NO_RMW,4,2          ; @HTC_FWFLAG_NO_RMW
l_.str.3:                               ; @.str.3
	.asciz	"FW RMW support: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"Off"

l_.str.5:                               ; @.str.5
	.asciz	"On"

	.no_dead_strip	_ath9k_init_firmware_version
.subsections_via_symbols
