	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1251_init_ieee80211          ## -- Begin function wl1251_init_ieee80211
	.p2align	4, 0x90
_wl1251_init_ieee80211:                 ## @wl1251_init_ieee80211
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_WL1251_TKIP_IV_SPACE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$4, %rax
	movq	24(%rdi), %rdi
	movq	%rax, 16(%rdi)
	movq	_SIGNAL_DBM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ieee80211_hw_set
	movq	24(%r14), %rdi
	movq	_SUPPORTS_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ieee80211_hw_set
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%ebx, %eax
	movq	24(%r14), %rcx
	movq	8(%rcx), %rcx
	movl	%eax, (%rcx)
	movl	$1, 4(%rcx)
	movq	8(%rcx), %rax
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_wl1251_band_2ghz@GOTPCREL(%rip), %rdx
	movq	%rdx, (%rax,%rcx,8)
	movq	24(%r14), %rax
	movl	$4, (%rax)
	cmpq	$0, 16(%r14)
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 8(%r14)
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_wl1251_fetch_nvs
	testl	%eax, %eax
	js	LBB0_15
LBB0_3:
	cmpq	$0, 8(%r14)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_wl1251_read_eeprom_mac
	testl	%eax, %eax
	je	LBB0_7
LBB0_9:
	testl	%eax, %eax
	jns	LBB0_13
LBB0_10:
	movq	(%r14), %rdi
	leaq	_wl1251_init_ieee80211.nokia_oui(%rip), %rsi
	movl	$3, %edx
	callq	_memcpy
	movq	(%r14), %rdi
	addq	$3, %rdi
	movl	$3, %esi
	callq	_get_random_bytes
	cmpq	$0, 8(%r14)
	jne	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_wl1251_write_nvs_mac
LBB0_12:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_wl1251_warning
	movq	(%r14), %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_wl1251_warning
	jmp	LBB0_13
LBB0_5:
	movq	%r14, %rdi
	callq	_wl1251_read_nvs_mac
	testl	%eax, %eax
	jne	LBB0_9
LBB0_7:
	movq	(%r14), %rdi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%eax, %eax
	js	LBB0_10
LBB0_13:
	movq	%r14, %rdi
	callq	_wl1251_register_hw
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_wl1251_debugfs_init
	leaq	L_.str.2(%rip), %rdi
	callq	_wl1251_notice
	xorl	%eax, %eax
LBB0_15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WL1251_TKIP_IV_SPACE,8,3       ## @WL1251_TKIP_IV_SPACE
	.comm	_SIGNAL_DBM,4,2                 ## @SIGNAL_DBM
	.comm	_SUPPORTS_PS,4,2                ## @SUPPORTS_PS
	.comm	_NL80211_IFTYPE_STATION,4,2     ## @NL80211_IFTYPE_STATION
	.comm	_NL80211_IFTYPE_ADHOC,4,2       ## @NL80211_IFTYPE_ADHOC
	.comm	_wl1251_band_2ghz,4,2           ## @wl1251_band_2ghz
	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__const
	.p2align	2                               ## @wl1251_init_ieee80211.nokia_oui
_wl1251_init_ieee80211.nokia_oui:
	.long	0                               ## 0x0
	.long	31                              ## 0x1f
	.long	223                             ## 0xdf

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAC address in eeprom or nvs data is not valid"

L_.str.1:                               ## @.str.1
	.asciz	"Setting random MAC address: %pM"

L_.str.2:                               ## @.str.2
	.asciz	"initialized"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1251_init_ieee80211          ; -- Begin function wl1251_init_ieee80211
	.p2align	2
_wl1251_init_ieee80211:                 ; @wl1251_init_ieee80211
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _WL1251_TKIP_IV_SPACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WL1251_TKIP_IV_SPACE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x8, x8, #4
	ldr	x0, [x0, #24]
	str	x8, [x0, #16]
Lloh3:
	adrp	x8, _SIGNAL_DBM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIGNAL_DBM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ieee80211_hw_set
	ldr	x0, [x19, #24]
Lloh6:
	adrp	x8, _SUPPORTS_PS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SUPPORTS_PS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_ieee80211_hw_set
Lloh9:
	adrp	x8, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_BIT
	mov	x20, x0
Lloh12:
	adrp	x8, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_BIT
	orr	w8, w0, w20
	ldr	x9, [x19, #24]
	ldr	x9, [x9, #8]
	mov	w10, #1
	stp	w8, w10, [x9]
	ldr	x8, [x9, #8]
Lloh15:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
Lloh18:
	adrp	x10, _wl1251_band_2ghz@GOTPAGE
Lloh19:
	ldr	x10, [x10, _wl1251_band_2ghz@GOTPAGEOFF]
	str	x10, [x8, x9, lsl #3]
	mov	w8, #4
	ldp	x10, x9, [x19, #16]
	str	w8, [x9]
	cbnz	x10, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_wl1251_fetch_nvs
	tbnz	w0, #31, LBB0_14
LBB0_3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_wl1251_read_eeprom_mac
	cbz	w0, LBB0_10
LBB0_5:
	tbz	w0, #31, LBB0_12
LBB0_6:
	ldr	x0, [x19]
Lloh20:
	adrp	x1, _wl1251_init_ieee80211.nokia_oui@PAGE
Lloh21:
	add	x1, x1, _wl1251_init_ieee80211.nokia_oui@PAGEOFF
	mov	w2, #3
	bl	_memcpy
	ldr	x8, [x19]
	add	x0, x8, #3
	mov	w1, #3
	bl	_get_random_bytes
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_wl1251_write_nvs_mac
LBB0_8:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_wl1251_warning
	ldr	x8, [x19]
	str	x8, [sp]
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_wl1251_warning
	b	LBB0_12
LBB0_9:
	mov	x0, x19
	bl	_wl1251_read_nvs_mac
	cbnz	w0, LBB0_5
LBB0_10:
	ldr	x0, [x19]
	bl	_is_valid_ether_addr
	cbnz	w0, LBB0_12
; %bb.11:
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
	tbnz	w0, #31, LBB0_6
LBB0_12:
	mov	x0, x19
	bl	_wl1251_register_hw
	cbnz	w0, LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_wl1251_debugfs_init
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_wl1251_notice
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_WL1251_TKIP_IV_SPACE,8,3       ; @WL1251_TKIP_IV_SPACE
	.comm	_SIGNAL_DBM,4,2                 ; @SIGNAL_DBM
	.comm	_SUPPORTS_PS,4,2                ; @SUPPORTS_PS
	.comm	_NL80211_IFTYPE_STATION,4,2     ; @NL80211_IFTYPE_STATION
	.comm	_NL80211_IFTYPE_ADHOC,4,2       ; @NL80211_IFTYPE_ADHOC
	.comm	_wl1251_band_2ghz,4,2           ; @wl1251_band_2ghz
	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__const
	.p2align	2                               ; @wl1251_init_ieee80211.nokia_oui
_wl1251_init_ieee80211.nokia_oui:
	.long	0                               ; 0x0
	.long	31                              ; 0x1f
	.long	223                             ; 0xdf

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAC address in eeprom or nvs data is not valid"

l_.str.1:                               ; @.str.1
	.asciz	"Setting random MAC address: %pM"

l_.str.2:                               ; @.str.2
	.asciz	"initialized"

.subsections_via_symbols
