	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orinoco_ioctl_get_encodeext
_orinoco_ioctl_get_encodeext:           ## @orinoco_ioctl_get_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	%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, %r12
	movq	%rdx, %r14
	callq	_ndev_priv
	movq	%rax, %r15
	leaq	-56(%rbp), %rsi
	movq	%rax, %rdi
	callq	_orinoco_lock
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	(%r14), %r13d
	addl	$-16, %r13d
	js	LBB0_15
## %bb.3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	_IW_ENCODE_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	4(%r14), %r12d
	je	LBB0_6
## %bb.4:
	leal	-5(%r12), %eax
	cmpl	$-4, %eax
	jb	LBB0_15
## %bb.5:
	decl	%r12d
	jmp	LBB0_7
LBB0_6:
	movl	(%r15), %r12d
LBB0_7:
	leal	1(%r12), %eax
	movl	%eax, 4(%r14)
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	4(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_11
## %bb.8:
	cmpl	$129, %eax
	je	LBB0_12
## %bb.9:
	cmpl	$130, %eax
	jne	LBB0_15
## %bb.10:
	movq	_IW_ENCODE_ALG_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 12(%rcx)
	movq	$0, (%rcx)
	movq	_IW_ENCODE_DISABLED@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	movq	_IW_ENCODE_ALG_WEP@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_IW_ENCODE_ALG_TKIP@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 12(%rcx)
	movq	8(%r15), %rax
	movslq	%r12d, %r12
	movl	4(%rax,%r12,8), %edi
	movl	%r13d, %esi
	callq	_min
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	8(%rcx), %edi
	movq	8(%r15), %rcx
	movl	(%rcx,%r12,8), %esi
	movq	%rax, %rdx
	callq	_memcpy
	movq	_IW_ENCODE_ENABLED@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	orl	%eax, 4(%r14)
LBB0_15:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_orinoco_unlock
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IW_ENCODE_INDEX,4,2            ## @IW_ENCODE_INDEX
	.comm	_IW_ENCODE_ALG_NONE,4,2         ## @IW_ENCODE_ALG_NONE
	.comm	_IW_ENCODE_DISABLED,4,2         ## @IW_ENCODE_DISABLED
	.comm	_IW_ENCODE_ALG_WEP,4,2          ## @IW_ENCODE_ALG_WEP
	.comm	_IW_ENCODE_ENABLED,4,2          ## @IW_ENCODE_ENABLED
	.comm	_IW_ENCODE_ALG_TKIP,4,2         ## @IW_ENCODE_ALG_TKIP
	.no_dead_strip	_orinoco_ioctl_get_encodeext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orinoco_ioctl_get_encodeext
_orinoco_ioctl_get_encodeext:           ; @orinoco_ioctl_get_encodeext
	.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	x20, x2
	bl	_ndev_priv
	mov	x19, x0
	add	x1, sp, #8
	bl	_orinoco_lock
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_16
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
	ldr	w8, [x20]
	subs	w22, w8, #16
	b.mi	LBB0_15
; %bb.3:
	ldr	w8, [x20, #4]
Lloh6:
	adrp	x9, _IW_ENCODE_INDEX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IW_ENCODE_INDEX@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ands	w8, w9, w8
	b.eq	LBB0_6
; %bb.4:
	sub	w9, w8, #5
	cmn	w9, #4
	b.lo	LBB0_15
; %bb.5:
	sub	w23, w8, #1
	b	LBB0_7
LBB0_6:
	ldr	w23, [x19]
LBB0_7:
	add	w8, w23, #1
	str	w8, [x20, #4]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w8, [x19, #4]
	cmp	w8, #128
	b.eq	LBB0_11
; %bb.8:
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.9:
	mov	w23, #0
	cmp	w8, #130
	b.ne	LBB0_15
; %bb.10:
Lloh9:
	adrp	x8, _IW_ENCODE_ALG_NONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IW_ENCODE_ALG_NONE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x21, #12]
	str	xzr, [x21]
Lloh12:
	adrp	x8, _IW_ENCODE_DISABLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IW_ENCODE_DISABLED@GOTPAGEOFF]
	b	LBB0_14
LBB0_11:
Lloh14:
	adrp	x8, _IW_ENCODE_ALG_WEP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IW_ENCODE_ALG_WEP@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x21, #12]
	ldr	x8, [x19, #8]
	b	LBB0_13
LBB0_12:
Lloh17:
	adrp	x8, _IW_ENCODE_ALG_TKIP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IW_ENCODE_ALG_TKIP@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x21, #12]
	ldr	x8, [x19, #8]
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
LBB0_13:
	sbfiz	x23, x23, #3, #32
	add	x8, x8, x23
	ldr	w0, [x8, #4]
	mov	x1, x22
	bl	_min
	mov	x2, x0
	str	x0, [x21]
	ldr	w0, [x21, #8]
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x23]
	bl	_memcpy
Lloh20:
	adrp	x8, _IW_ENCODE_ENABLED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IW_ENCODE_ENABLED@GOTPAGEOFF]
LBB0_14:
	mov	w23, #0
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
LBB0_15:
	add	x1, sp, #8
	mov	x0, x19
	bl	_orinoco_unlock
LBB0_16:
	mov	x0, x23
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IW_ENCODE_INDEX,4,2            ; @IW_ENCODE_INDEX
	.comm	_IW_ENCODE_ALG_NONE,4,2         ; @IW_ENCODE_ALG_NONE
	.comm	_IW_ENCODE_DISABLED,4,2         ; @IW_ENCODE_DISABLED
	.comm	_IW_ENCODE_ALG_WEP,4,2          ; @IW_ENCODE_ALG_WEP
	.comm	_IW_ENCODE_ENABLED,4,2          ; @IW_ENCODE_ENABLED
	.comm	_IW_ENCODE_ALG_TKIP,4,2         ; @IW_ENCODE_ALG_TKIP
	.no_dead_strip	_orinoco_ioctl_get_encodeext
.subsections_via_symbols
