	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwlagn_mac_set_key
_iwlagn_mac_set_key:                    ## @iwlagn_mac_set_key
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	callq	_IWL_MAC80211_GET_DVM
	movq	%rax, %r12
	movq	8(%rbx), %r14
	movq	(%r14), %r13
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_IWL_DEBUG_MAC80211
	movq	_iwlwifi_mod_params@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_DEBUG_MAC80211
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_34
LBB0_2:
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	(%r15), %eax
	cmpl	$128, %eax
	movq	%r15, %r14
	je	LBB0_5
## %bb.3:
	cmpl	$129, %eax
	movq	%r12, %r15
	movl	%edx, %r13d
	movq	%rsi, %rdx
	jne	LBB0_7
## %bb.4:
	movl	4(%r14), %eax
	jmp	LBB0_6
LBB0_5:
	movq	_IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPCREL(%rip), %rcx
	movl	4(%r14), %eax
	orl	(%rcx), %eax
	movq	%r12, %r15
	movl	%edx, %r13d
	movq	%rsi, %rdx
LBB0_6:
	movq	_IEEE80211_KEY_FLAG_GENERATE_IV@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%r14)
LBB0_7:
	movq	(%rbx), %rax
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.8:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_9
LBB0_10:
	movq	%rdx, %rbx
	cmpl	$131, %r13d
	jne	LBB0_12
## %bb.11:
	movq	8(%r14), %rax
	movq	_WEP_INVALID_OFFSET@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	je	LBB0_34
LBB0_12:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	movl	$100, %esi
	callq	_iwl_scan_cancel_timeout
	movq	_WEP_INVALID_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_IWLAGN_HW_KEY_DEFAULT@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_BUILD_BUG_ON
	movl	(%r14), %ecx
	movq	_WLAN_CIPHER_SUITE_WEP40@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_13
## %bb.15:
	testq	%rbx, %rbx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_18
## %bb.16:
	xorl	%eax, %eax
	cmpl	$131, %r13d
	jne	LBB0_25
	jmp	LBB0_28
LBB0_13:
	xorl	%eax, %eax
	testq	%rbx, %rbx
	jne	LBB0_14
## %bb.17:
	movq	_WLAN_CIPHER_SUITE_WEP104@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_24
LBB0_18:
	cmpl	$130, %r13d
	jne	LBB0_23
## %bb.19:
	cmpl	$0, (%rsi)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_27
LBB0_20:
	movq	(%rax), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	callq	_iwl_set_dynamic_key
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movq	_WEP_INVALID_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
LBB0_22:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_IWL_DEBUG_MAC80211
	xorl	%r12d, %r12d
	jmp	LBB0_33
LBB0_9:
	movq	_WEP_INVALID_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	xorl	%r12d, %r12d
	jmp	LBB0_34
LBB0_23:
	movq	8(%r14), %rax
	cmpq	(%r12), %rax
	sete	%al
LBB0_24:
	cmpl	$131, %r13d
	je	LBB0_28
LBB0_25:
	cmpl	$130, %r13d
	jne	LBB0_32
## %bb.26:
	testb	%al, %al
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_20
LBB0_27:
	movq	(%rax), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_iwl_set_default_wep_key
	movl	%eax, %r12d
	jmp	LBB0_33
LBB0_32:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_33
LBB0_14:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	cmpl	$131, %r13d
	jne	LBB0_25
LBB0_28:
	movq	%r15, %rdi
	movq	%r14, %rdx
	testb	%al, %al
	je	LBB0_30
## %bb.29:
	callq	_iwl_remove_default_wep_key
	jmp	LBB0_31
LBB0_30:
	movq	%rbx, %rcx
	callq	_iwl_remove_dynamic_key
LBB0_31:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_IWL_DEBUG_MAC80211
LBB0_33:
	movq	%r15, %rdi
	callq	_mutex_unlock
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_IWL_DEBUG_MAC80211
LBB0_34:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enter\n"

	.comm	_iwlwifi_mod_params,8,3         ## @iwlwifi_mod_params
L_.str.1:                               ## @.str.1
	.asciz	"leave - hwcrypto disabled\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_GENERATE_MMIC,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_MMIC
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ## @NL80211_IFTYPE_ADHOC
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_WEP_INVALID_OFFSET,8,3         ## @WEP_INVALID_OFFSET
	.comm	_IWLAGN_HW_KEY_DEFAULT,8,3      ## @IWLAGN_HW_KEY_DEFAULT
	.comm	_WLAN_CIPHER_SUITE_WEP40,4,2    ## @WLAN_CIPHER_SUITE_WEP40
	.comm	_WLAN_CIPHER_SUITE_WEP104,4,2   ## @WLAN_CIPHER_SUITE_WEP104
L_.str.2:                               ## @.str.2
	.asciz	"enable hwcrypto key\n"

L_.str.3:                               ## @.str.3
	.asciz	"disable hwcrypto key\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"leave\n"

	.no_dead_strip	_iwlagn_mac_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwlagn_mac_set_key
_iwlagn_mac_set_key:                    ; @iwlagn_mac_set_key
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x21, x3
	mov	x24, x2
	mov	x23, x1
	bl	_IWL_MAC80211_GET_DVM
	mov	x19, x0
	ldr	x25, [x24, #8]
	ldr	x22, [x25]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_IWL_DEBUG_MAC80211
Lloh2:
	adrp	x8, _iwlwifi_mod_params@GOTPAGE
Lloh3:
	ldr	x8, [x8, _iwlwifi_mod_params@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_MAC80211
Lloh7:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_34
LBB0_2:
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.4:
	ldr	w8, [x20, #4]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IEEE80211_KEY_FLAG_GENERATE_MMIC@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
LBB0_6:
Lloh13:
	adrp	x9, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20, #4]
LBB0_7:
	ldr	x8, [x24]
Lloh16:
	adrp	x9, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh17:
	ldr	x9, [x9, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	ldr	w8, [x20, #4]
Lloh19:
	adrp	x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_22
LBB0_9:
Lloh22:
	adrp	x24, _WEP_INVALID_OFFSET@GOTPAGE
Lloh23:
	ldr	x24, [x24, _WEP_INVALID_OFFSET@GOTPAGEOFF]
	cmp	w23, #131
	b.ne	LBB0_12
; %bb.10:
	ldr	x8, [x20, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	mov	w21, #0
	b	LBB0_34
LBB0_12:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	w1, #100
	bl	_iwl_scan_cancel_timeout
	ldr	x8, [x24]
Lloh24:
	adrp	x26, _IWLAGN_HW_KEY_DEFAULT@GOTPAGE
Lloh25:
	ldr	x26, [x26, _IWLAGN_HW_KEY_DEFAULT@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	cset	w0, eq
	bl	_BUILD_BUG_ON
	ldr	w9, [x20]
Lloh26:
	adrp	x8, _WLAN_CIPHER_SUITE_WEP40@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WLAN_CIPHER_SUITE_WEP40@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w9, w8
	b.ne	LBB0_15
; %bb.13:
	cbz	x21, LBB0_17
; %bb.14:
	mov	w8, #0
	b	LBB0_24
LBB0_15:
	mov	w8, #0
	cbnz	x21, LBB0_24
; %bb.16:
Lloh29:
	adrp	x10, _WLAN_CIPHER_SUITE_WEP104@GOTPAGE
Lloh30:
	ldr	x10, [x10, _WLAN_CIPHER_SUITE_WEP104@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_24
LBB0_17:
	cmp	w23, #130
	b.ne	LBB0_23
; %bb.18:
	ldr	w8, [x22]
	cbz	w8, LBB0_27
LBB0_19:
	ldr	x1, [x25]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_iwl_set_dynamic_key
	cbz	w0, LBB0_21
; %bb.20:
	ldr	x8, [x24]
	str	x8, [x20, #8]
LBB0_21:
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_MAC80211
	mov	w21, #0
	b	LBB0_33
LBB0_22:
	mov	w21, #0
Lloh34:
	adrp	x8, _WEP_INVALID_OFFSET@GOTPAGE
Lloh35:
	ldr	x8, [x8, _WEP_INVALID_OFFSET@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	str	x8, [x20, #8]
	b	LBB0_34
LBB0_23:
	ldr	x8, [x20, #8]
	ldr	x9, [x26]
	cmp	x8, x9
	cset	w8, eq
LBB0_24:
	cmp	w23, #131
	b.eq	LBB0_28
; %bb.25:
	cmp	w23, #130
	b.ne	LBB0_30
; %bb.26:
	cbz	w8, LBB0_19
LBB0_27:
	ldr	x1, [x25]
	mov	x0, x19
	mov	x2, x20
	bl	_iwl_set_default_wep_key
	mov	x21, x0
	b	LBB0_33
LBB0_28:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	cbz	w8, LBB0_31
; %bb.29:
	bl	_iwl_remove_default_wep_key
	b	LBB0_32
LBB0_30:
Lloh37:
	adrp	x8, _EINVAL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_33
LBB0_31:
	mov	x3, x21
	bl	_iwl_remove_dynamic_key
LBB0_32:
	mov	x21, x0
Lloh40:
	adrp	x1, l_.str.3@PAGE
Lloh41:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_MAC80211
LBB0_33:
	mov	x0, x19
	bl	_mutex_unlock
Lloh42:
	adrp	x1, l_.str.4@PAGE
Lloh43:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_MAC80211
LBB0_34:
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enter\n"

	.comm	_iwlwifi_mod_params,8,3         ; @iwlwifi_mod_params
l_.str.1:                               ; @.str.1
	.asciz	"leave - hwcrypto disabled\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_GENERATE_MMIC,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_MMIC
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ; @NL80211_IFTYPE_ADHOC
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_WEP_INVALID_OFFSET,8,3         ; @WEP_INVALID_OFFSET
	.comm	_IWLAGN_HW_KEY_DEFAULT,8,3      ; @IWLAGN_HW_KEY_DEFAULT
	.comm	_WLAN_CIPHER_SUITE_WEP40,4,2    ; @WLAN_CIPHER_SUITE_WEP40
	.comm	_WLAN_CIPHER_SUITE_WEP104,4,2   ; @WLAN_CIPHER_SUITE_WEP104
l_.str.2:                               ; @.str.2
	.asciz	"enable hwcrypto key\n"

l_.str.3:                               ; @.str.3
	.asciz	"disable hwcrypto key\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"leave\n"

	.no_dead_strip	_iwlagn_mac_set_key
.subsections_via_symbols
