	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carl9170_parse_eeprom
_carl9170_parse_eeprom:                 ## @carl9170_parse_eeprom
	.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
	movq	8(%rdi), %rbx
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_cpu_to_le16
	cmpq	%rax, %rbx
	jne	LBB0_3
## %bb.1:
	movq	_ENODATA@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movl	36(%r15), %edi
	callq	_hweight8
	movl	%eax, %r14d
	movl	32(%r15), %edi
	callq	_hweight8
	cmpl	%eax, %r14d
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	subl	$1, %ebx
	setb	%cl
	movq	_IEEE80211_HT_MCS_TX_MAX_STREAMS@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	seta	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	movq	_IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_carl9170_band_2GHz@GOTPCREL(%rip), %rax
	orl	%ebx, 8(%rax)
	movq	_carl9170_band_5GHz@GOTPCREL(%rip), %rax
	orl	%ebx, 8(%rax)
LBB0_5:
	movl	16(%r15), %eax
	movq	_AR9170_OPFLAG_2GHZ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.8:
	movq	40(%r15), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_carl9170_band_2GHz@GOTPCREL(%rip), %rsi
	movq	%rsi, (%rcx,%rdx,8)
	movl	(%rsi), %r14d
	movq	_AR9170_OPFLAG_5GHZ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_9
	jmp	LBB0_10
LBB0_6:
	movq	_AR9170_OPFLAG_5GHZ@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	testl	%eax, (%rcx)
	je	LBB0_7
LBB0_9:
	movq	40(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_carl9170_band_5GHz@GOTPCREL(%rip), %rdx
	movq	%rdx, (%rax,%rcx,8)
	addl	(%rdx), %r14d
LBB0_10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movl	%eax, 48(%r15)
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	%r14d, (%r15)
	movq	24(%r15), %rax
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, 52(%r15)
	movq	40(%r15), %rdi
	movl	20(%r15), %esi
	callq	_SET_IEEE80211_PERM_ADDR
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODATA,4,2                    ## @ENODATA
	.comm	_IEEE80211_HT_MCS_TX_RX_DIFF,4,2 ## @IEEE80211_HT_MCS_TX_RX_DIFF
	.comm	_IEEE80211_HT_MCS_TX_MAX_STREAMS,4,2 ## @IEEE80211_HT_MCS_TX_MAX_STREAMS
	.comm	_IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT,4,2 ## @IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT
	.comm	_carl9170_band_2GHz,16,3        ## @carl9170_band_2GHz
	.comm	_carl9170_band_5GHz,16,3        ## @carl9170_band_5GHz
	.comm	_AR9170_OPFLAG_2GHZ,4,2         ## @AR9170_OPFLAG_2GHZ
	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.comm	_AR9170_OPFLAG_5GHZ,4,2         ## @AR9170_OPFLAG_5GHZ
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_carl9170_parse_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carl9170_parse_eeprom
_carl9170_parse_eeprom:                 ; @carl9170_parse_eeprom
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x20, [x0, #8]
	mov	w0, #65535
	bl	_cpu_to_le16
	cmp	x20, x0
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENODATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
	b	LBB0_13
LBB0_2:
	ldr	w0, [x19, #36]
	bl	_hweight8
	mov	x21, x0
	ldr	w0, [x19, #32]
	bl	_hweight8
Lloh2:
	adrp	x23, _carl9170_band_2GHz@GOTPAGE
Lloh3:
	ldr	x23, [x23, _carl9170_band_2GHz@GOTPAGEOFF]
Lloh4:
	adrp	x22, _carl9170_band_5GHz@GOTPAGE
Lloh5:
	ldr	x22, [x22, _carl9170_band_5GHz@GOTPAGEOFF]
	cmp	w21, w0
	b.eq	LBB0_4
; %bb.3:
	mov	x20, x0
	cmp	w0, #0
Lloh6:
	adrp	x8, _IEEE80211_HT_MCS_TX_MAX_STREAMS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_HT_MCS_TX_MAX_STREAMS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ccmp	w0, w8, #2, ne
	cset	w0, hi
	bl	_WARN_ON
	sub	w8, w20, #1
Lloh9:
	adrp	x9, _IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [x23, #8]
	orr	w9, w9, w8
	str	w9, [x23, #8]
	ldr	w9, [x22, #8]
	orr	w8, w9, w8
	str	w8, [x22, #8]
LBB0_4:
	ldr	w8, [x19, #16]
Lloh12:
	adrp	x9, _AR9170_OPFLAG_2GHZ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AR9170_OPFLAG_2GHZ@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	x9, [x19, #40]
	ldr	x9, [x9]
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _NL80211_BAND_2GHZ@GOTPAGE
Lloh16:
	ldr	x10, [x10, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	str	x23, [x9, x10, lsl #3]
	ldr	w20, [x23]
Lloh18:
	adrp	x9, _AR9170_OPFLAG_5GHZ@GOTPAGE
Lloh19:
	ldr	x9, [x9, _AR9170_OPFLAG_5GHZ@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
	b	LBB0_9
LBB0_6:
Lloh21:
	adrp	x9, _AR9170_OPFLAG_5GHZ@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AR9170_OPFLAG_5GHZ@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.7:
	mov	w20, #0
LBB0_8:
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
Lloh24:
	adrp	x9, _NL80211_BAND_5GHZ@GOTPAGE
Lloh25:
	ldr	x9, [x9, _NL80211_BAND_5GHZ@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh26:
	ldr	x9, [x9]
	str	x22, [x8, x9, lsl #3]
	ldr	w8, [x22]
	add	w20, w20, w8
LBB0_9:
Lloh27:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #4
	bl	_kcalloc
	str	w0, [x19, #48]
	cbz	w0, LBB0_11
; %bb.10:
	str	w20, [x19]
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_le16_to_cpu
	str	w0, [x19, #52]
	ldr	x0, [x19, #40]
	ldr	w1, [x19, #20]
	bl	_SET_IEEE80211_PERM_ADDR
	mov	w0, #0
	b	LBB0_14
LBB0_11:
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh32:
	adrp	x8, _EINVAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODATA,4,2                    ; @ENODATA
	.comm	_IEEE80211_HT_MCS_TX_RX_DIFF,4,2 ; @IEEE80211_HT_MCS_TX_RX_DIFF
	.comm	_IEEE80211_HT_MCS_TX_MAX_STREAMS,4,2 ; @IEEE80211_HT_MCS_TX_MAX_STREAMS
	.comm	_IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT,4,2 ; @IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT
	.comm	_carl9170_band_2GHz,16,3        ; @carl9170_band_2GHz
	.comm	_carl9170_band_5GHz,16,3        ; @carl9170_band_5GHz
	.comm	_AR9170_OPFLAG_2GHZ,4,2         ; @AR9170_OPFLAG_2GHZ
	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.comm	_AR9170_OPFLAG_5GHZ,4,2         ; @AR9170_OPFLAG_5GHZ
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_carl9170_parse_eeprom
.subsections_via_symbols
