	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libipw_wx_get_encode           ## -- Begin function libipw_wx_get_encode
	.p2align	4, 0x90
_libipw_wx_get_encode:                  ## @libipw_wx_get_encode
	.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	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_LIBIPW_DEBUG_WX
	movq	_IW_ENCODE_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	je	LBB0_4
## %bb.1:
	movq	_WEP_KEYS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_4:
	movl	8(%r14), %eax
	jmp	LBB0_5
LBB0_3:
	decl	%eax
LBB0_5:
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
	cmpl	$0, 32(%r14)
	je	LBB0_6
## %bb.7:
	cltq
	movq	16(%r14), %rcx
	movq	24(%r14), %rdx
	movl	(%rcx,%rax,4), %r12d
	movl	(%rdx,%rax,4), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_memcpy
	movl	%r12d, 4(%rbx)
	movq	_IW_ENCODE_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rbx), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	cmpq	$0, (%r14)
	jne	LBB0_8
## %bb.9:
	movq	_IW_ENCODE_RESTRICTED@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_6:
	movl	$0, 4(%rbx)
	movq	_IW_ENCODE_DISABLED@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
	jmp	LBB0_11
LBB0_8:
	movq	_IW_ENCODE_OPEN@GOTPCREL(%rip), %rcx
LBB0_10:
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GET_ENCODE\n"

	.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
	.comm	_IW_ENCODE_ENABLED,4,2          ## @IW_ENCODE_ENABLED
	.comm	_IW_ENCODE_OPEN,4,2             ## @IW_ENCODE_OPEN
	.comm	_IW_ENCODE_RESTRICTED,4,2       ## @IW_ENCODE_RESTRICTED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_libipw_wx_get_encode           ; -- Begin function libipw_wx_get_encode
	.p2align	2
_libipw_wx_get_encode:                  ; @libipw_wx_get_encode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x3
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LIBIPW_DEBUG_WX
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _IW_ENCODE_INDEX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IW_ENCODE_INDEX@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	ands	w8, w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh5:
	adrp	x9, _WEP_KEYS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WEP_KEYS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_3:
	ldr	w8, [x20, #8]
	b	LBB0_5
LBB0_4:
	sub	w8, w8, #1
LBB0_5:
	add	w9, w8, #1
	str	w9, [x19]
	ldr	w10, [x20, #32]
	cbz	w10, LBB0_7
; %bb.6:
	sbfiz	x8, x8, #2, #32
	ldp	x9, x10, [x20, #16]
	ldr	w22, [x9, x8]
	ldr	w1, [x10, x8]
	mov	x0, x21
	mov	x2, x22
	bl	_memcpy
	mov	w0, #0
Lloh11:
	adrp	x8, _IW_ENCODE_ENABLED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IW_ENCODE_ENABLED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	stp	w8, w22, [x19]
Lloh14:
	adrp	x9, _IW_ENCODE_RESTRICTED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IW_ENCODE_RESTRICTED@GOTPAGEOFF]
Lloh16:
	adrp	x10, _IW_ENCODE_OPEN@GOTPAGE
Lloh17:
	ldr	x10, [x10, _IW_ENCODE_OPEN@GOTPAGEOFF]
	ldr	x11, [x20]
	cmp	x11, #0
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
Lloh18:
	adrp	x8, _IW_ENCODE_DISABLED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IW_ENCODE_DISABLED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w8, w8, w9
	str	wzr, [x19, #4]
LBB0_8:
	str	w8, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GET_ENCODE\n"

	.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
	.comm	_IW_ENCODE_ENABLED,4,2          ; @IW_ENCODE_ENABLED
	.comm	_IW_ENCODE_OPEN,4,2             ; @IW_ENCODE_OPEN
	.comm	_IW_ENCODE_RESTRICTED,4,2       ; @IW_ENCODE_RESTRICTED
.subsections_via_symbols
