	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_set_default_wep_key     ## -- Begin function il4965_set_default_wep_key
	.p2align	4, 0x90
_il4965_set_default_wep_key:            ## @il4965_set_default_wep_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	(%rsi), %r12d
	movslq	4(%rsi), %r14
	addq	$16, %rdi
	callq	_lockdep_assert_held
	movq	_WEP_KEY_LEN_128@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_3
## %bb.1:
	movq	_WEP_KEY_LEN_64@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_3
## %bb.2:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_D_WEP
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_3:
	movq	_IEEE80211_KEY_FLAG_GENERATE_IV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 20(%rbx)
	movq	_HW_KEY_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	12(%rbx), %eax
	movq	8(%r15), %rcx
	movq	_IL_AP_ID@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movq	(%r15), %rax
	movl	%r12d, (%rax,%r14,8)
	leaq	(%rax,%r14,8), %rdi
	addq	$4, %rdi
	addq	$8, %rbx
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_il4965_static_wepkey_cmd
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_D_WEP
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WEP_KEY_LEN_128,4,2            ## @WEP_KEY_LEN_128
	.comm	_WEP_KEY_LEN_64,4,2             ## @WEP_KEY_LEN_64
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad WEP key length %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_HW_KEY_DEFAULT,4,2             ## @HW_KEY_DEFAULT
	.comm	_IL_AP_ID,8,3                   ## @IL_AP_ID
L_.str.1:                               ## @.str.1
	.asciz	"Set default WEP key: len=%d idx=%d ret=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_set_default_wep_key     ; -- Begin function il4965_set_default_wep_key
	.p2align	2
_il4965_set_default_wep_key:            ; @il4965_set_default_wep_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
	ldp	w19, w22, [x1]
                                        ; kill: def $w22 killed $w22 def $x22
	sxtw	x22, w22
	add	x0, x0, #16
	bl	_lockdep_assert_held
Lloh0:
	adrp	x8, _WEP_KEY_LEN_128@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WEP_KEY_LEN_128@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _WEP_KEY_LEN_64@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WEP_KEY_LEN_64@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w19, w8
	ccmp	w19, w9, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGEOFF]
Lloh8:
	adrp	x9, _HW_KEY_DEFAULT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HW_KEY_DEFAULT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	ldr	w9, [x9]
	ldr	w10, [x21, #12]
Lloh12:
	adrp	x11, _IL_AP_ID@GOTPAGE
Lloh13:
	ldr	x11, [x11, _IL_AP_ID@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	ldp	x13, x12, [x20]
	str	w10, [x12, x11, lsl #2]
	ldr	w10, [x21, #20]
	bic	w8, w10, w8
	stp	w9, w8, [x21, #16]
	add	x0, x13, x22, lsl #3
	str	w19, [x0], #4
	add	x1, x21, #8
	mov	x2, x19
	bl	_memcpy
	mov	x0, x20
	mov	w1, #0
	bl	_il4965_static_wepkey_cmd
	mov	x20, x0
	stp	x22, x20, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_D_WEP
	b	LBB0_3
LBB0_2:
	ldr	w1, [x21]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_WEP
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_WEP_KEY_LEN_128,4,2            ; @WEP_KEY_LEN_128
	.comm	_WEP_KEY_LEN_64,4,2             ; @WEP_KEY_LEN_64
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad WEP key length %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_HW_KEY_DEFAULT,4,2             ; @HW_KEY_DEFAULT
	.comm	_IL_AP_ID,8,3                   ; @IL_AP_ID
l_.str.1:                               ; @.str.1
	.asciz	"Set default WEP key: len=%d idx=%d ret=%d\n"

.subsections_via_symbols
