	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_set_encodeext
_atmel_set_encodeext:                   ## @atmel_set_encodeext
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movl	(%r15), %ecx
	movl	(%rbx), %edx
	movq	_IW_ENCODE_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edx, %eax
	je	LBB0_4
## %bb.1:
	leal	-5(%rax), %esi
	cmpl	$-4, %esi
	jae	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_4:
	movl	(%r14), %eax
	jmp	LBB0_5
LBB0_3:
	decl	%eax
LBB0_5:
	movq	_IW_ENCODE_DISABLED@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	movl	$129, %edx
	cmovel	%ecx, %edx
	movq	_IW_ENCODE_EXT_SET_TX_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%r15)
	je	LBB0_7
## %bb.6:
	movl	%eax, (%r14)
	cmpq	$0, 8(%r15)
	jle	LBB0_15
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpl	$128, %edx
	je	LBB0_10
## %bb.8:
	cmpl	$129, %edx
	jne	LBB0_16
## %bb.9:
	movq	$0, 4(%r14)
	movq	_CIPHER_SUITE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	jmp	LBB0_15
LBB0_10:
	movq	8(%r15), %rdx
	cmpq	$6, %rdx
	jl	LBB0_12
## %bb.11:
	movq	16(%r14), %rcx
	movslq	%eax, %rbx
	movl	$13, (%rcx,%rbx,4)
	movl	$2, %eax
	movq	_CIPHER_SUITE_WEP_128@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_12:
	testq	%rdx, %rdx
	jle	LBB0_16
## %bb.13:
	movq	16(%r14), %rcx
	movslq	%eax, %rbx
	movl	$5, (%rcx,%rbx,4)
	movl	$1, %eax
	movq	_CIPHER_SUITE_WEP_64@GOTPCREL(%rip), %rcx
LBB0_14:
	movl	(%rcx), %ecx
	movl	%ecx, 32(%r14)
	movl	%eax, 8(%r14)
	movl	$1, 4(%r14)
	movq	24(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	xorl	%esi, %esi
	movl	$13, %edx
	callq	_memset
	movl	8(%r15), %edi
	movq	16(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_min
	movq	24(%r14), %rcx
	movl	(%rcx,%rbx,4), %edi
	movl	16(%r15), %esi
	movl	%eax, %edx
	callq	_memcpy
LBB0_15:
	movq	_EINPROGRESS@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IW_ENCODE_INDEX,4,2            ## @IW_ENCODE_INDEX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IW_ENCODE_DISABLED,4,2         ## @IW_ENCODE_DISABLED
	.comm	_IW_ENCODE_EXT_SET_TX_KEY,4,2   ## @IW_ENCODE_EXT_SET_TX_KEY
	.comm	_CIPHER_SUITE_NONE,4,2          ## @CIPHER_SUITE_NONE
	.comm	_CIPHER_SUITE_WEP_128,4,2       ## @CIPHER_SUITE_WEP_128
	.comm	_CIPHER_SUITE_WEP_64,4,2        ## @CIPHER_SUITE_WEP_64
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.no_dead_strip	_atmel_set_encodeext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_set_encodeext
_atmel_set_encodeext:                   ; @atmel_set_encodeext
	.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	x20, x3
	mov	x21, x2
	bl	_netdev_priv
	mov	x19, x0
	ldr	w9, [x20]
	ldr	w10, [x21]
Lloh0:
	adrp	x8, _IW_ENCODE_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IW_ENCODE_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ands	w8, w8, w10
	b.eq	LBB0_3
; %bb.1:
	sub	w11, w8, #5
	cmn	w11, #4
	b.lo	LBB0_15
; %bb.2:
	sub	w8, w8, #1
	b	LBB0_4
LBB0_3:
	ldr	w8, [x19]
LBB0_4:
Lloh3:
	adrp	x11, _IW_ENCODE_DISABLED@GOTPAGE
Lloh4:
	ldr	x11, [x11, _IW_ENCODE_DISABLED@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	mov	w10, #129
	csel	w9, w9, w10, eq
	ldr	w10, [x20, #4]
Lloh6:
	adrp	x11, _IW_ENCODE_EXT_SET_TX_KEY@GOTPAGE
Lloh7:
	ldr	x11, [x11, _IW_ENCODE_EXT_SET_TX_KEY@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_6
; %bb.5:
	str	w8, [x19]
	ldr	x10, [x20, #8]
	cmp	x10, #1
	b.lt	LBB0_14
LBB0_6:
	cmp	w9, #128
	b.eq	LBB0_9
; %bb.7:
	cmp	w9, #129
	b.ne	LBB0_15
; %bb.8:
	stp	wzr, wzr, [x19, #4]
Lloh9:
	adrp	x8, _CIPHER_SUITE_NONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CIPHER_SUITE_NONE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	b	LBB0_14
LBB0_9:
	ldr	x9, [x20, #8]
	cmp	x9, #6
	b.lt	LBB0_11
; %bb.10:
	ldr	x10, [x19, #16]
	sxtw	x9, w8
	mov	w11, #13
	str	w11, [x10, w8, sxtw #2]
	mov	w8, #2
Lloh12:
	adrp	x10, _CIPHER_SUITE_WEP_128@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CIPHER_SUITE_WEP_128@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	cmp	x9, #1
	b.lt	LBB0_15
; %bb.12:
	ldr	x10, [x19, #16]
	mov	x9, x8
	sxtw	x9, w9
	mov	w11, #5
	str	w11, [x10, w8, sxtw #2]
	mov	w8, #1
Lloh14:
	adrp	x10, _CIPHER_SUITE_WEP_64@GOTPAGE
Lloh15:
	ldr	x10, [x10, _CIPHER_SUITE_WEP_64@GOTPAGEOFF]
LBB0_13:
	ldr	w10, [x10]
	str	w10, [x19, #32]
	mov	w10, #1
	stp	w10, w8, [x19, #4]
	ldr	x8, [x19, #24]
	lsl	x21, x9, #2
	ldr	w0, [x8, x21]
	mov	w1, #0
	mov	w2, #13
	bl	_memset
	ldr	w0, [x20, #8]
	ldr	x8, [x19, #16]
	ldr	w1, [x8, x21]
	bl	_min
	mov	x2, x0
	ldr	x8, [x19, #24]
	ldr	w0, [x8, x21]
	ldr	w1, [x20, #16]
	bl	_memcpy
LBB0_14:
Lloh16:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IW_ENCODE_INDEX,4,2            ; @IW_ENCODE_INDEX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IW_ENCODE_DISABLED,4,2         ; @IW_ENCODE_DISABLED
	.comm	_IW_ENCODE_EXT_SET_TX_KEY,4,2   ; @IW_ENCODE_EXT_SET_TX_KEY
	.comm	_CIPHER_SUITE_NONE,4,2          ; @CIPHER_SUITE_NONE
	.comm	_CIPHER_SUITE_WEP_128,4,2       ; @CIPHER_SUITE_WEP_128
	.comm	_CIPHER_SUITE_WEP_64,4,2        ; @CIPHER_SUITE_WEP_64
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.no_dead_strip	_atmel_set_encodeext
.subsections_via_symbols
