	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il3945_setup_mac
_il3945_setup_mac:                      ## @il3945_setup_mac
	.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, %r14
	movq	8(%rdi), %rbx
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rbx)
	movabsq	$17179869188, %rax              ## imm = 0x400000004
	movq	%rax, 8(%rbx)
	movq	_SUPPORTS_DYNAMIC_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ieee80211_hw_set
	movq	_SUPPORTS_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ieee80211_hw_set
	movq	_SIGNAL_DBM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ieee80211_hw_set
	movq	_SPECTRUM_MGMT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ieee80211_hw_set
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r15d
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%r15d, %eax
	movq	24(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	_WIPHY_FLAG_IBSS_RSN@GOTPCREL(%rip), %rax
	movl	28(%rcx), %edx
	orl	(%rax), %edx
	movq	_REGULATORY_CUSTOM_REG@GOTPCREL(%rip), %rax
	movq	_REGULATORY_DISABLE_BEACON_HINTS@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rax), %esi
	orl	%esi, 4(%rcx)
	movq	_WIPHY_FLAG_PS_ON_BY_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%edx, %eax
	movl	%eax, 28(%rcx)
	movq	_PROBE_OPTION_MAX_3945@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rcx)
	movq	_IL3945_MAX_PROBE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-26, %eax
	movl	%eax, 8(%rcx)
	movl	$4, 16(%rbx)
	movq	16(%r14), %rax
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_2
## %bb.1:
	leaq	(%rax,%rcx,8), %rax
	movq	8(%r14), %rdx
	movq	24(%rdx), %rdx
	movq	16(%rdx), %rdx
	movq	%rax, (%rdx,%rcx,8)
	movq	16(%r14), %rax
LBB0_2:
	movq	_NL80211_BAND_5GHZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_4
## %bb.3:
	leaq	(%rax,%rcx,8), %rax
	movq	8(%r14), %rdx
	movq	24(%rdx), %rdx
	movq	16(%rdx), %rdx
	movq	%rax, (%rdx,%rcx,8)
LBB0_4:
	movq	%r14, %rdi
	callq	_il_leds_init
	movq	8(%r14), %rax
	movq	24(%rax), %rdi
	movq	_NL80211_EXT_FEATURE_CQM_RSSI_LIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_wiphy_ext_feature_set
	movq	8(%r14), %rdi
	callq	_ieee80211_register_hw
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_IL_ERR
	jmp	LBB0_7
LBB0_6:
	movl	$1, (%r14)
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iwl-3945-rs"

	.comm	_SUPPORTS_DYNAMIC_PS,4,2        ## @SUPPORTS_DYNAMIC_PS
	.comm	_SUPPORTS_PS,4,2                ## @SUPPORTS_PS
	.comm	_SIGNAL_DBM,4,2                 ## @SIGNAL_DBM
	.comm	_SPECTRUM_MGMT,4,2              ## @SPECTRUM_MGMT
	.comm	_NL80211_IFTYPE_STATION,4,2     ## @NL80211_IFTYPE_STATION
	.comm	_NL80211_IFTYPE_ADHOC,4,2       ## @NL80211_IFTYPE_ADHOC
	.comm	_WIPHY_FLAG_IBSS_RSN,4,2        ## @WIPHY_FLAG_IBSS_RSN
	.comm	_REGULATORY_CUSTOM_REG,4,2      ## @REGULATORY_CUSTOM_REG
	.comm	_REGULATORY_DISABLE_BEACON_HINTS,4,2 ## @REGULATORY_DISABLE_BEACON_HINTS
	.comm	_WIPHY_FLAG_PS_ON_BY_DEFAULT,4,2 ## @WIPHY_FLAG_PS_ON_BY_DEFAULT
	.comm	_PROBE_OPTION_MAX_3945,4,2      ## @PROBE_OPTION_MAX_3945
	.comm	_IL3945_MAX_PROBE_REQUEST,4,2   ## @IL3945_MAX_PROBE_REQUEST
	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.comm	_NL80211_BAND_5GHZ,8,3          ## @NL80211_BAND_5GHZ
	.comm	_NL80211_EXT_FEATURE_CQM_RSSI_LIST,4,2 ## @NL80211_EXT_FEATURE_CQM_RSSI_LIST
L_.str.1:                               ## @.str.1
	.asciz	"Failed to register hw (error %d)\n"

	.no_dead_strip	_il3945_setup_mac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il3945_setup_mac
_il3945_setup_mac:                      ; @il3945_setup_mac
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x20]
	movi.2s	v0, #4
	str	d0, [x20, #8]
Lloh2:
	adrp	x8, _SUPPORTS_DYNAMIC_PS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SUPPORTS_DYNAMIC_PS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ieee80211_hw_set
Lloh5:
	adrp	x8, _SUPPORTS_PS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SUPPORTS_PS@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ieee80211_hw_set
Lloh8:
	adrp	x8, _SIGNAL_DBM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SIGNAL_DBM@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ieee80211_hw_set
Lloh11:
	adrp	x8, _SPECTRUM_MGMT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SPECTRUM_MGMT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ieee80211_hw_set
Lloh14:
	adrp	x8, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_BIT
	mov	x21, x0
Lloh17:
	adrp	x8, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_BIT
	orr	w8, w0, w21
	ldr	x9, [x20, #24]
Lloh20:
	adrp	x10, _WIPHY_FLAG_IBSS_RSN@GOTPAGE
Lloh21:
	ldr	x10, [x10, _WIPHY_FLAG_IBSS_RSN@GOTPAGEOFF]
	str	w8, [x9]
Lloh22:
	ldr	w8, [x10]
	ldr	w10, [x9, #28]
	orr	w8, w10, w8
Lloh23:
	adrp	x10, _REGULATORY_CUSTOM_REG@GOTPAGE
Lloh24:
	ldr	x10, [x10, _REGULATORY_CUSTOM_REG@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
Lloh26:
	adrp	x11, _REGULATORY_DISABLE_BEACON_HINTS@GOTPAGE
Lloh27:
	ldr	x11, [x11, _REGULATORY_DISABLE_BEACON_HINTS@GOTPAGEOFF]
Lloh28:
	ldr	w11, [x11]
	orr	w10, w11, w10
	ldr	w11, [x9, #4]
	orr	w10, w10, w11
Lloh29:
	adrp	x11, _WIPHY_FLAG_PS_ON_BY_DEFAULT@GOTPAGE
Lloh30:
	ldr	x11, [x11, _WIPHY_FLAG_PS_ON_BY_DEFAULT@GOTPAGEOFF]
Lloh31:
	ldr	w11, [x11]
Lloh32:
	adrp	x12, _PROBE_OPTION_MAX_3945@GOTPAGE
Lloh33:
	ldr	x12, [x12, _PROBE_OPTION_MAX_3945@GOTPAGEOFF]
	bic	w8, w8, w11
Lloh34:
	ldr	w11, [x12]
	stp	w11, w8, [x9, #24]
Lloh35:
	adrp	x8, _IL3945_MAX_PROBE_REQUEST@GOTPAGE
Lloh36:
	ldr	x8, [x8, _IL3945_MAX_PROBE_REQUEST@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	sub	w8, w8, #26
	stp	w10, w8, [x9, #4]
	mov	w8, #4
	str	w8, [x20, #16]
	ldr	x8, [x19, #16]
Lloh38:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh39:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	add	x10, x8, x9, lsl #3
	ldr	x11, [x10]
	cbz	x11, LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #24]
	ldr	x8, [x8, #16]
	str	x10, [x8, x9, lsl #3]
	ldr	x8, [x19, #16]
LBB0_2:
Lloh41:
	adrp	x9, _NL80211_BAND_5GHZ@GOTPAGE
Lloh42:
	ldr	x9, [x9, _NL80211_BAND_5GHZ@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #3
	ldr	x10, [x8]
	cbz	x10, LBB0_4
; %bb.3:
	ldr	x10, [x19, #8]
	ldr	x10, [x10, #24]
	ldr	x10, [x10, #16]
	str	x8, [x10, x9, lsl #3]
LBB0_4:
	mov	x0, x19
	bl	_il_leds_init
	ldr	x8, [x19, #8]
	ldr	x0, [x8, #24]
Lloh44:
	adrp	x8, _NL80211_EXT_FEATURE_CQM_RSSI_LIST@GOTPAGE
Lloh45:
	ldr	x8, [x8, _NL80211_EXT_FEATURE_CQM_RSSI_LIST@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	bl	_wiphy_ext_feature_set
	ldr	x0, [x19, #8]
	bl	_ieee80211_register_hw
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.5:
Lloh47:
	adrp	x0, l_.str.1@PAGE
Lloh48:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_IL_ERR
	b	LBB0_7
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iwl-3945-rs"

	.comm	_SUPPORTS_DYNAMIC_PS,4,2        ; @SUPPORTS_DYNAMIC_PS
	.comm	_SUPPORTS_PS,4,2                ; @SUPPORTS_PS
	.comm	_SIGNAL_DBM,4,2                 ; @SIGNAL_DBM
	.comm	_SPECTRUM_MGMT,4,2              ; @SPECTRUM_MGMT
	.comm	_NL80211_IFTYPE_STATION,4,2     ; @NL80211_IFTYPE_STATION
	.comm	_NL80211_IFTYPE_ADHOC,4,2       ; @NL80211_IFTYPE_ADHOC
	.comm	_WIPHY_FLAG_IBSS_RSN,4,2        ; @WIPHY_FLAG_IBSS_RSN
	.comm	_REGULATORY_CUSTOM_REG,4,2      ; @REGULATORY_CUSTOM_REG
	.comm	_REGULATORY_DISABLE_BEACON_HINTS,4,2 ; @REGULATORY_DISABLE_BEACON_HINTS
	.comm	_WIPHY_FLAG_PS_ON_BY_DEFAULT,4,2 ; @WIPHY_FLAG_PS_ON_BY_DEFAULT
	.comm	_PROBE_OPTION_MAX_3945,4,2      ; @PROBE_OPTION_MAX_3945
	.comm	_IL3945_MAX_PROBE_REQUEST,4,2   ; @IL3945_MAX_PROBE_REQUEST
	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.comm	_NL80211_BAND_5GHZ,8,3          ; @NL80211_BAND_5GHZ
	.comm	_NL80211_EXT_FEATURE_CQM_RSSI_LIST,4,2 ; @NL80211_EXT_FEATURE_CQM_RSSI_LIST
l_.str.1:                               ; @.str.1
	.asciz	"Failed to register hw (error %d)\n"

	.no_dead_strip	_il3945_setup_mac
.subsections_via_symbols
