	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwifiex_set_keyparamset_wep
_mwifiex_set_keyparamset_wep:           ## @mwifiex_set_keyparamset_wep
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_NUM_WEP_KEYS@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	xorl	%ebx, %ebx
	movq	_WLAN_KEY_LEN_WEP40@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_TLV_TYPE_KEY_MATERIAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, 40(%r12)
	movq	8(%r15), %rax
	movl	(%rax,%rbx,8), %edi
	addl	$8, %edi
	callq	_cpu_to_le16
	movq	%rax, 32(%r12)
	movq	_KEY_TYPE_ID_WEP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, 24(%r12)
	movq	_KEY_UNICAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_KEY_ENABLED@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_KEY_MCAST@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le16
	movq	%rax, 16(%r12)
	movq	8(%r15), %rax
	movl	(%rax,%rbx,8), %edi
	callq	_cpu_to_le16
	movq	%rax, 8(%r12)
	movq	(%r12), %rdi
	movq	%rbx, (%rdi)
	movq	_HostCmd_WEP_KEY_INDEX_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	(%r15), %rax
	xorl	%ecx, %ecx
	cmpq	%rax, %rbx
	sete	%cl
	movq	%rcx, 8(%rdi)
	addq	$16, %rdi
	movq	8(%r15), %rax
	movl	(%rax,%rbx,8), %edx
	movl	4(%rax,%rbx,8), %esi
	callq	_memmove
	movq	8(%r15), %rax
	movl	(%rax,%rbx,8), %ecx
	addl	$12, %ecx
	addl	%ecx, (%r14)
	movslq	%ecx, %rcx
	leaq	(%r12,%rcx,8), %r12
	movq	_NUM_WEP_KEYS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rcx, %rbx
	jae	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rbx,8), %r8d
	cmpl	(%r13), %r8d
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_WLAN_KEY_LEN_WEP104@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r8d
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r8d, %r8d
	je	LBB0_5
## %bb.8:
	movl	16(%r15), %edi
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	incq	%rbx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rcx
	callq	_mwifiex_dbg
	movl	$-1, %eax
	jmp	LBB0_9
LBB0_6:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_WEP_KEYS,8,3               ## @NUM_WEP_KEYS
	.comm	_WLAN_KEY_LEN_WEP40,4,2         ## @WLAN_KEY_LEN_WEP40
	.comm	_WLAN_KEY_LEN_WEP104,4,2        ## @WLAN_KEY_LEN_WEP104
	.comm	_TLV_TYPE_KEY_MATERIAL,4,2      ## @TLV_TYPE_KEY_MATERIAL
	.comm	_KEY_TYPE_ID_WEP,4,2            ## @KEY_TYPE_ID_WEP
	.comm	_KEY_ENABLED,4,2                ## @KEY_ENABLED
	.comm	_KEY_UNICAST,4,2                ## @KEY_UNICAST
	.comm	_KEY_MCAST,4,2                  ## @KEY_MCAST
	.comm	_HostCmd_WEP_KEY_INDEX_MASK,8,3 ## @HostCmd_WEP_KEY_INDEX_MASK
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"key%d Length = %d is incorrect\n"

	.comm	_KEYPARAMSET_WEP_FIXED_LEN,4,2  ## @KEYPARAMSET_WEP_FIXED_LEN
	.no_dead_strip	_mwifiex_set_keyparamset_wep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwifiex_set_keyparamset_wep
_mwifiex_set_keyparamset_wep:           ; @mwifiex_set_keyparamset_wep
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x23, _NUM_WEP_KEYS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NUM_WEP_KEYS@GOTPAGEOFF]
	ldr	x9, [x23]
	cbz	x9, LBB0_7
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	mov	x24, #0
	ldr	x8, [x0, #8]
	mov	w22, #1
Lloh2:
	adrp	x25, _WLAN_KEY_LEN_WEP40@GOTPAGE
Lloh3:
	ldr	x25, [x25, _WLAN_KEY_LEN_WEP40@GOTPAGEOFF]
Lloh4:
	adrp	x26, _WLAN_KEY_LEN_WEP104@GOTPAGE
Lloh5:
	ldr	x26, [x26, _WLAN_KEY_LEN_WEP104@GOTPAGEOFF]
Lloh6:
	adrp	x28, _HostCmd_WEP_KEY_INDEX_MASK@GOTPAGE
Lloh7:
	ldr	x28, [x28, _HostCmd_WEP_KEY_INDEX_MASK@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x27, x22, #1
Lloh8:
	adrp	x8, _TLV_TYPE_KEY_MATERIAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TLV_TYPE_KEY_MATERIAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [x21, #40]
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x24]
	add	w0, w8, #8
	bl	_cpu_to_le16
	str	x0, [x21, #32]
Lloh11:
	adrp	x8, _KEY_TYPE_ID_WEP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KEY_TYPE_ID_WEP@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	str	x0, [x21, #24]
Lloh14:
	adrp	x8, _KEY_ENABLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KEY_ENABLED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _KEY_UNICAST@GOTPAGE
Lloh18:
	ldr	x9, [x9, _KEY_UNICAST@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _KEY_MCAST@GOTPAGE
Lloh21:
	ldr	x9, [x9, _KEY_MCAST@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_cpu_to_le16
	str	x0, [x21, #16]
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x24]
	bl	_cpu_to_le16
	str	x0, [x21, #8]
	ldr	x8, [x21]
	str	x27, [x8]
	ldr	x9, [x20]
	ldr	x10, [x28]
	and	x9, x10, x9
	cmp	x27, x9
	cset	w9, eq
	str	x9, [x8, #8]
	add	x0, x8, #16
	ldr	x8, [x20, #8]
	add	x8, x8, x24
	ldp	w2, w1, [x8]
	bl	_memmove
	ldr	x8, [x20, #8]
	ldr	w9, [x8, x24]
	add	w9, w9, #12
	ldr	w10, [x19]
	add	w10, w10, w9
	str	w10, [x19]
	add	x21, x21, w9, sxtw #3
	ldr	x9, [x23]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x22, #1
	add	x24, x24, #8
	cmp	x22, x9
	mov	x22, x10
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w4, [x8, x24]
	ldr	w10, [x25]
	ldr	w11, [x26]
	cmp	w4, w10
	ccmp	w4, w11, #4, ne
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w4, LBB0_3
; %bb.6:
	ldr	w0, [x20, #16]
Lloh23:
	adrp	x8, _ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x2, l_.str@PAGE
Lloh27:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x22
	bl	_mwifiex_dbg
	mov	w0, #-1
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.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 AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_WEP_KEYS,8,3               ; @NUM_WEP_KEYS
	.comm	_WLAN_KEY_LEN_WEP40,4,2         ; @WLAN_KEY_LEN_WEP40
	.comm	_WLAN_KEY_LEN_WEP104,4,2        ; @WLAN_KEY_LEN_WEP104
	.comm	_TLV_TYPE_KEY_MATERIAL,4,2      ; @TLV_TYPE_KEY_MATERIAL
	.comm	_KEY_TYPE_ID_WEP,4,2            ; @KEY_TYPE_ID_WEP
	.comm	_KEY_ENABLED,4,2                ; @KEY_ENABLED
	.comm	_KEY_UNICAST,4,2                ; @KEY_UNICAST
	.comm	_KEY_MCAST,4,2                  ; @KEY_MCAST
	.comm	_HostCmd_WEP_KEY_INDEX_MASK,8,3 ; @HostCmd_WEP_KEY_INDEX_MASK
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"key%d Length = %d is incorrect\n"

	.comm	_KEYPARAMSET_WEP_FIXED_LEN,4,2  ; @KEYPARAMSET_WEP_FIXED_LEN
	.no_dead_strip	_mwifiex_set_keyparamset_wep
.subsections_via_symbols
