	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlan_set_weptxkey              ## -- Begin function wlan_set_weptxkey
	.p2align	4, 0x90
_wlan_set_weptxkey:                     ## @wlan_set_weptxkey
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	$0, -16(%rbp)
	cmpl	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movl	(%rdi), %ecx
	movq	_IEEE80211_WEP_NKID@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpl	(%rdx), %ecx
	jge	LBB0_6
## %bb.3:
	subl	$1, %ecx
	jae	LBB0_5
## %bb.4:
	movq	_IEEE80211_KEYIX_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_5:
	movl	%ecx, -4(%rbp)
	movl	4(%rdi), %edi
	movq	_IEEE80211_IOC_WEPTXKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-4(%rbp), %rdx
	leaq	-16(%rbp), %r8
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_wlan_ioctl
	sarq	$63, %rax
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_WEP_NKID,4,2         ## @IEEE80211_WEP_NKID
	.comm	_IEEE80211_KEYIX_NONE,4,2       ## @IEEE80211_KEYIX_NONE
	.comm	_IEEE80211_IOC_WEPTXKEY,4,2     ## @IEEE80211_IOC_WEPTXKEY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlan_set_weptxkey              ; -- Begin function wlan_set_weptxkey
	.p2align	2
_wlan_set_weptxkey:                     ; @wlan_set_weptxkey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	str	xzr, [sp]
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _IEEE80211_WEP_NKID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_WEP_NKID@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.2:
	sub	w9, w8, #1
Lloh3:
	adrp	x10, _IEEE80211_KEYIX_NONE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IEEE80211_KEYIX_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, #0
	csel	w8, w10, w9, eq
	stur	w8, [x29, #-4]
	ldr	w0, [x0, #4]
Lloh6:
	adrp	x8, _IEEE80211_IOC_WEPTXKEY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_IOC_WEPTXKEY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	sub	x2, x29, #4
	mov	x4, sp
	mov	x3, #0
	mov	w5, #1
	bl	_wlan_ioctl
	asr	x0, x0, #63
	b	LBB0_5
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	mov	w0, #-1
LBB0_5:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_WEP_NKID,4,2         ; @IEEE80211_WEP_NKID
	.comm	_IEEE80211_KEYIX_NONE,4,2       ; @IEEE80211_KEYIX_NONE
	.comm	_IEEE80211_IOC_WEPTXKEY,4,2     ; @IEEE80211_IOC_WEPTXKEY
.subsections_via_symbols
