	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism2_ioctl_giwencode
_prism2_ioctl_giwencode:                ## @prism2_ioctl_giwencode
	.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	%rcx, %r15
	movq	%rdx, %r12
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	(%rax), %r13
	movq	_IW_ENCODE_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r12), %eax
	leal	-5(%rax), %ecx
	cmpl	$-5, %ecx
	ja	LBB0_2
## %bb.1:
	movl	8(%r13), %eax
	testl	%eax, %eax
	jns	LBB0_4
	jmp	LBB0_5
LBB0_2:
	decl	%eax
	testl	%eax, %eax
	js	LBB0_5
LBB0_4:
	movq	_WEP_KEYS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_5
## %bb.6:
	movq	16(%r13), %rcx
	movl	%eax, %edx
	movq	(%rcx,%rdx,8), %rbx
	incl	%eax
	movl	%eax, (%r12)
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.9:
	movl	8(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	$0, 4(%r12)
	movq	_IW_ENCODE_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	jmp	LBB0_20
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_8:
	movl	$0, 4(%r12)
	movq	_IW_ENCODE_DISABLED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r12)
LBB0_20:
	xorl	%ebx, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	8(%rbx), %rax
	movq	_WEP_KEY_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rbx), %ecx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	*(%rax)
	testl	%eax, %eax
	cmovlel	%ebx, %eax
	movl	%eax, 4(%r12)
	movq	(%r13), %rax
	movq	_HFA384X_RID_CNFWEPFLAGS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movl	$2, %ecx
	movl	$1, %r8d
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_12
## %bb.13:
	leaq	-44(%rbp), %rdi
	callq	_le16_to_cpus
	movl	-44(%rbp), %eax
	movq	_HFA384X_WEPFLAGS_PRIVACYINVOKED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	jne	LBB0_14
## %bb.15:
	movq	_IW_ENCODE_DISABLED@GOTPCREL(%rip), %rdx
	jmp	LBB0_16
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	callq	_printk
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_14:
	movq	_IW_ENCODE_ENABLED@GOTPCREL(%rip), %rdx
LBB0_16:
	movl	(%r12), %ecx
	orl	(%rdx), %ecx
	movl	%ecx, (%r12)
	movq	_HFA384X_WEPFLAGS_EXCLUDEUNENCRYPTED@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	jne	LBB0_17
## %bb.18:
	movq	_IW_ENCODE_OPEN@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movq	_IW_ENCODE_RESTRICTED@GOTPCREL(%rip), %rax
LBB0_19:
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_IW_ENCODE_INDEX,4,2            ## @IW_ENCODE_INDEX
	.comm	_WEP_KEYS,4,2                   ## @WEP_KEYS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IW_ENCODE_DISABLED,4,2         ## @IW_ENCODE_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WEP"

	.comm	_IW_ENCODE_ENABLED,4,2          ## @IW_ENCODE_ENABLED
	.comm	_WEP_KEY_LEN,4,2                ## @WEP_KEY_LEN
	.comm	_HFA384X_RID_CNFWEPFLAGS,4,2    ## @HFA384X_RID_CNFWEPFLAGS
L_.str.1:                               ## @.str.1
	.asciz	"CNFWEPFLAGS reading failed\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_HFA384X_WEPFLAGS_PRIVACYINVOKED,4,2 ## @HFA384X_WEPFLAGS_PRIVACYINVOKED
	.comm	_HFA384X_WEPFLAGS_EXCLUDEUNENCRYPTED,4,2 ## @HFA384X_WEPFLAGS_EXCLUDEUNENCRYPTED
	.comm	_IW_ENCODE_RESTRICTED,4,2       ## @IW_ENCODE_RESTRICTED
	.comm	_IW_ENCODE_OPEN,4,2             ## @IW_ENCODE_OPEN
	.no_dead_strip	_prism2_ioctl_giwencode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism2_ioctl_giwencode
_prism2_ioctl_giwencode:                ; @prism2_ioctl_giwencode
	.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	x21, x3
	mov	x19, x2
	mov	x20, x0
	bl	_netdev_priv
	ldr	x22, [x0]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _IW_ENCODE_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IW_ENCODE_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
	sub	w9, w8, #5
	cmn	w9, #5
	b.hi	LBB0_2
; %bb.1:
	ldr	w8, [x22, #8]
	tbz	w8, #31, LBB0_3
	b	LBB0_8
LBB0_2:
	sub	w8, w8, #1
	tbnz	w8, #31, LBB0_8
LBB0_3:
Lloh3:
	adrp	x9, _WEP_KEYS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WEP_KEYS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_8
; %bb.4:
	ldr	x9, [x22, #16]
	ldr	x23, [x9, w8, uxtw #3]
	add	w8, w8, #1
	str	w8, [x19]
	cbz	x23, LBB0_10
; %bb.5:
	ldr	x9, [x23, #8]
	cbz	x9, LBB0_10
; %bb.6:
	ldr	w0, [x9, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_14
; %bb.7:
	mov	w0, #0
Lloh8:
	adrp	x8, _IW_ENCODE_ENABLED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IW_ENCODE_ENABLED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x19]
	b	LBB0_11
LBB0_8:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_10:
	mov	w0, #0
Lloh13:
	adrp	x9, _IW_ENCODE_DISABLED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IW_ENCODE_DISABLED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
LBB0_11:
	orr	w8, w9, w8
	str	wzr, [x19, #4]
LBB0_12:
	str	w8, [x19]
LBB0_13:
	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_14:
	ldr	x8, [x23, #8]
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _WEP_KEY_LEN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _WEP_KEY_LEN@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x9]
	ldr	w3, [x23]
	mov	x0, x21
	mov	x2, #0
	blr	x8
	cmp	w0, #0
	csel	w8, w0, wzr, gt
	str	w8, [x19, #4]
	ldr	x8, [x22]
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _HFA384X_RID_CNFWEPFLAGS@GOTPAGE
Lloh20:
	ldr	x9, [x9, _HFA384X_RID_CNFWEPFLAGS@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x9]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #2
	mov	w4, #1
	blr	x8
	tbnz	x0, #63, LBB0_16
; %bb.15:
	add	x0, sp, #12
	bl	_le16_to_cpus
	mov	w0, #0
Lloh22:
	adrp	x8, _HFA384X_WEPFLAGS_PRIVACYINVOKED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _HFA384X_WEPFLAGS_PRIVACYINVOKED@GOTPAGEOFF]
	ldr	w9, [sp, #12]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x10, _IW_ENCODE_DISABLED@GOTPAGE
Lloh26:
	ldr	x10, [x10, _IW_ENCODE_DISABLED@GOTPAGEOFF]
Lloh27:
	adrp	x11, _IW_ENCODE_ENABLED@GOTPAGE
Lloh28:
	ldr	x11, [x11, _IW_ENCODE_ENABLED@GOTPAGEOFF]
	tst	w8, w9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	ldr	w10, [x19]
	orr	w8, w10, w8
	str	w8, [x19]
Lloh29:
	adrp	x10, _HFA384X_WEPFLAGS_EXCLUDEUNENCRYPTED@GOTPAGE
Lloh30:
	ldr	x10, [x10, _HFA384X_WEPFLAGS_EXCLUDEUNENCRYPTED@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
Lloh32:
	adrp	x11, _IW_ENCODE_OPEN@GOTPAGE
Lloh33:
	ldr	x11, [x11, _IW_ENCODE_OPEN@GOTPAGEOFF]
	tst	w10, w9
Lloh34:
	adrp	x9, _IW_ENCODE_RESTRICTED@GOTPAGE
Lloh35:
	ldr	x9, [x9, _IW_ENCODE_RESTRICTED@GOTPAGEOFF]
	csel	x9, x11, x9, eq
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_12
LBB0_16:
Lloh36:
	adrp	x0, l_.str.1@PAGE
Lloh37:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
Lloh38:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_IW_ENCODE_INDEX,4,2            ; @IW_ENCODE_INDEX
	.comm	_WEP_KEYS,4,2                   ; @WEP_KEYS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IW_ENCODE_DISABLED,4,2         ; @IW_ENCODE_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WEP"

	.comm	_IW_ENCODE_ENABLED,4,2          ; @IW_ENCODE_ENABLED
	.comm	_WEP_KEY_LEN,4,2                ; @WEP_KEY_LEN
	.comm	_HFA384X_RID_CNFWEPFLAGS,4,2    ; @HFA384X_RID_CNFWEPFLAGS
l_.str.1:                               ; @.str.1
	.asciz	"CNFWEPFLAGS reading failed\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_HFA384X_WEPFLAGS_PRIVACYINVOKED,4,2 ; @HFA384X_WEPFLAGS_PRIVACYINVOKED
	.comm	_HFA384X_WEPFLAGS_EXCLUDEUNENCRYPTED,4,2 ; @HFA384X_WEPFLAGS_EXCLUDEUNENCRYPTED
	.comm	_IW_ENCODE_RESTRICTED,4,2       ; @IW_ENCODE_RESTRICTED
	.comm	_IW_ENCODE_OPEN,4,2             ; @IW_ENCODE_OPEN
	.no_dead_strip	_prism2_ioctl_giwencode
.subsections_via_symbols
