	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism2_ioctl_giwencodeext
_prism2_ioctl_giwencodeext:             ## @prism2_ioctl_giwencodeext
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r13
	callq	_netdev_priv
	movl	(%r13), %r12d
	addl	$-40, %r12d
	js	LBB0_1
## %bb.2:
	movq	(%rax), %r14
	movq	_IW_ENCODE_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	4(%r13), %r15d
	jle	LBB0_4
## %bb.3:
	movq	_WEP_KEYS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jg	LBB0_4
## %bb.5:
	decl	%r15d
	jmp	LBB0_6
LBB0_4:
	movl	8(%r14), %r15d
LBB0_6:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	32(%rbx), %rbx
	movq	%rbx, %rdi
	callq	_is_broadcast_ether_addr
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movslq	%r15d, %rax
	shlq	$3, %rax
	addq	16(%r14), %rax
	movq	%rax, -48(%rbp)
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_8:
	movl	(%r14), %edi
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rcx
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_ap_crypt_get_ptrs
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_1
LBB0_9:
	incl	%r15d
	movl	%r15d, 4(%r13)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movl	8(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	8(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	8(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_17
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_25
LBB0_11:
	movq	_IW_ENCODE_ALG_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	$0, 16(%rbx)
	movq	_IW_ENCODE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r13)
LBB0_23:
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_25
## %bb.24:
	movq	%r14, %rdi
	callq	_hostap_handle_sta_release
LBB0_25:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_IW_ENCODE_ALG_WEP@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_15:
	movq	_IW_ENCODE_ALG_TKIP@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_17:
	movq	_IW_ENCODE_ALG_CCMP@GOTPCREL(%rip), %rax
LBB0_18:
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	-48(%rbp), %rax
	movq	(%rax), %rcx
	movq	8(%rcx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_23
## %bb.19:
	movl	24(%rbx), %edx
	movl	28(%rbx), %edi
	movl	(%rcx), %ecx
	movl	%r12d, %esi
	callq	*%rax
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_23
## %bb.20:
	movq	(%rbx), %rax
	movq	_IW_ENCODE_ALG_TKIP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_22
## %bb.21:
	movq	_IW_ENCODE_ALG_CCMP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
LBB0_22:
	movq	_IW_ENCODE_EXT_TX_SEQ_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IW_ENCODE_INDEX,4,2            ## @IW_ENCODE_INDEX
	.comm	_WEP_KEYS,4,2                   ## @WEP_KEYS
	.comm	_IW_ENCODE_ALG_NONE,8,3         ## @IW_ENCODE_ALG_NONE
	.comm	_IW_ENCODE_DISABLED,4,2         ## @IW_ENCODE_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WEP"

	.comm	_IW_ENCODE_ALG_WEP,8,3          ## @IW_ENCODE_ALG_WEP
L_.str.1:                               ## @.str.1
	.asciz	"TKIP"

	.comm	_IW_ENCODE_ALG_TKIP,8,3         ## @IW_ENCODE_ALG_TKIP
L_.str.2:                               ## @.str.2
	.asciz	"CCMP"

	.comm	_IW_ENCODE_ALG_CCMP,8,3         ## @IW_ENCODE_ALG_CCMP
	.comm	_IW_ENCODE_EXT_TX_SEQ_VALID,4,2 ## @IW_ENCODE_EXT_TX_SEQ_VALID
	.no_dead_strip	_prism2_ioctl_giwencodeext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism2_ioctl_giwencodeext
_prism2_ioctl_giwencodeext:             ; @prism2_ioctl_giwencodeext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x22, x2
	bl	_netdev_priv
	ldr	w8, [x22]
	subs	w20, w8, #40
	b.mi	LBB0_12
; %bb.1:
	ldr	x24, [x0]
	ldr	w8, [x22, #4]
Lloh0:
	adrp	x9, _IW_ENCODE_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IW_ENCODE_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x9, _WEP_KEYS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WEP_KEYS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	subs	w23, w8, #1
	ccmp	w8, w9, #0, ge
	b.le	LBB0_3
; %bb.2:
	ldr	w23, [x24, #8]
LBB0_3:
	ldr	x21, [x19, #32]
	mov	x0, x21
	bl	_is_broadcast_ether_addr
	cbz	x0, LBB0_5
; %bb.4:
	mov	x21, #0
	ldr	x8, [x24, #16]
	add	x8, x8, w23, sxtw #3
	str	x8, [sp, #8]
	b	LBB0_7
LBB0_5:
	ldr	w0, [x24]
	add	x3, sp, #8
	mov	x1, x21
	mov	w2, #0
	bl	_ap_crypt_get_ptrs
	cbz	x0, LBB0_12
; %bb.6:
	mov	x21, x0
	mov	w23, #0
LBB0_7:
	add	w8, w23, #1
	str	w8, [x22, #4]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.8:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_13
; %bb.9:
	ldr	w0, [x8, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_18
; %bb.10:
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	w0, [x8, #8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_19
; %bb.11:
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	w0, [x8, #8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_20
LBB0_12:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_13:
Lloh15:
	adrp	x8, _IW_ENCODE_ALG_NONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IW_ENCODE_ALG_NONE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x19]
	str	xzr, [x19, #16]
Lloh18:
	adrp	x8, _IW_ENCODE_DISABLED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IW_ENCODE_DISABLED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x22, #4]
	orr	w8, w9, w8
	str	w8, [x22, #4]
LBB0_14:
	cbz	x21, LBB0_16
; %bb.15:
	mov	x0, x21
	bl	_hostap_handle_sta_release
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	add	sp, sp, #80
	ret
LBB0_18:
Lloh21:
	adrp	x8, _IW_ENCODE_ALG_WEP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IW_ENCODE_ALG_WEP@GOTPAGEOFF]
	b	LBB0_21
LBB0_19:
Lloh23:
	adrp	x8, _IW_ENCODE_ALG_TKIP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IW_ENCODE_ALG_TKIP@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh25:
	adrp	x8, _IW_ENCODE_ALG_CCMP@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IW_ENCODE_ALG_CCMP@GOTPAGEOFF]
LBB0_21:
	ldr	x8, [x8]
	str	x8, [x19]
	ldr	x8, [sp, #8]
	ldr	x9, [x8]
	ldr	x8, [x9, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.22:
	ldp	w2, w0, [x19, #24]
	ldr	w3, [x9]
	mov	x1, x20
	blr	x8
	str	x0, [x19, #16]
	cbz	x0, LBB0_14
; %bb.23:
	ldr	x8, [x19]
Lloh27:
	adrp	x9, _IW_ENCODE_ALG_TKIP@GOTPAGE
Lloh28:
	ldr	x9, [x9, _IW_ENCODE_ALG_TKIP@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_25
; %bb.24:
Lloh30:
	adrp	x9, _IW_ENCODE_ALG_CCMP@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IW_ENCODE_ALG_CCMP@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
LBB0_25:
Lloh33:
	adrp	x8, _IW_ENCODE_EXT_TX_SEQ_VALID@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IW_ENCODE_EXT_TX_SEQ_VALID@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IW_ENCODE_INDEX,4,2            ; @IW_ENCODE_INDEX
	.comm	_WEP_KEYS,4,2                   ; @WEP_KEYS
	.comm	_IW_ENCODE_ALG_NONE,8,3         ; @IW_ENCODE_ALG_NONE
	.comm	_IW_ENCODE_DISABLED,4,2         ; @IW_ENCODE_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WEP"

	.comm	_IW_ENCODE_ALG_WEP,8,3          ; @IW_ENCODE_ALG_WEP
l_.str.1:                               ; @.str.1
	.asciz	"TKIP"

	.comm	_IW_ENCODE_ALG_TKIP,8,3         ; @IW_ENCODE_ALG_TKIP
l_.str.2:                               ; @.str.2
	.asciz	"CCMP"

	.comm	_IW_ENCODE_ALG_CCMP,8,3         ; @IW_ENCODE_ALG_CCMP
	.comm	_IW_ENCODE_EXT_TX_SEQ_VALID,4,2 ; @IW_ENCODE_EXT_TX_SEQ_VALID
	.no_dead_strip	_prism2_ioctl_giwencodeext
.subsections_via_symbols
