	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orinoco_ioctl_getiwencode
_orinoco_ioctl_getiwencode:             ## @orinoco_ioctl_getiwencode
	.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, %r14
	movq	%rdx, %r15
	callq	_ndev_priv
	cmpl	$0, 28(%rax)
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	_IW_ENCODE_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	(%r15), %r13d
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_orinoco_lock
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_5:
	testl	%r13d, %r13d
	jle	LBB0_8
## %bb.6:
	movq	_ORINOCO_MAX_KEYS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jg	LBB0_8
## %bb.7:
	decl	%r13d
	jmp	LBB0_9
LBB0_8:
	movl	(%r12), %r13d
LBB0_9:
	movl	$0, (%r15)
	xorl	%ebx, %ebx
	cmpl	$0, 24(%r12)
	movl	$0, %ecx
	jne	LBB0_11
## %bb.10:
	movq	_IW_ENCODE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_11:
	leal	1(%r13), %eax
	orl	%ecx, %eax
	movl	%eax, (%r15)
	cmpq	$0, 16(%r12)
	jne	LBB0_12
## %bb.13:
	movq	_IW_ENCODE_OPEN@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_12:
	movq	_IW_ENCODE_RESTRICTED@GOTPCREL(%rip), %rcx
LBB0_14:
	orl	(%rcx), %eax
	movl	%eax, (%r15)
	movq	8(%r12), %rax
	movslq	%r13d, %rcx
	movl	4(%rax,%rcx,8), %edx
	movl	%edx, 4(%r15)
	movl	(%rax,%rcx,8), %esi
	movq	%r14, %rdi
	callq	_memcpy
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_orinoco_unlock
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IW_ENCODE_INDEX,4,2            ## @IW_ENCODE_INDEX
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ORINOCO_MAX_KEYS,4,2           ## @ORINOCO_MAX_KEYS
	.comm	_IW_ENCODE_DISABLED,4,2         ## @IW_ENCODE_DISABLED
	.comm	_IW_ENCODE_RESTRICTED,4,2       ## @IW_ENCODE_RESTRICTED
	.comm	_IW_ENCODE_OPEN,4,2             ## @IW_ENCODE_OPEN
	.no_dead_strip	_orinoco_ioctl_getiwencode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orinoco_ioctl_getiwencode
_orinoco_ioctl_getiwencode:             ; @orinoco_ioctl_getiwencode
	.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	x20, x3
	mov	x21, x2
	bl	_ndev_priv
	ldr	w8, [x0, #28]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w22, [x21]
Lloh0:
	adrp	x8, _IW_ENCODE_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IW_ENCODE_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	add	x1, sp, #8
	bl	_orinoco_lock
	cbz	x0, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	and	w8, w23, w22
Lloh7:
	adrp	x9, _ORINOCO_MAX_KEYS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ORINOCO_MAX_KEYS@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, #1
	ccmp	w8, w9, #0, ge
	b.le	LBB0_7
; %bb.6:
	ldr	w8, [x19]
	b	LBB0_8
LBB0_7:
	sub	w8, w8, #1
LBB0_8:
	str	wzr, [x21]
	ldr	w9, [x19, #24]
Lloh10:
	adrp	x10, _IW_ENCODE_DISABLED@GOTPAGE
Lloh11:
	ldr	x10, [x10, _IW_ENCODE_DISABLED@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	cmp	w9, #0
	csel	w9, w10, wzr, eq
	add	w10, w8, #1
	orr	w9, w9, w10
Lloh13:
	adrp	x10, _IW_ENCODE_OPEN@GOTPAGE
Lloh14:
	ldr	x10, [x10, _IW_ENCODE_OPEN@GOTPAGEOFF]
Lloh15:
	adrp	x11, _IW_ENCODE_RESTRICTED@GOTPAGE
Lloh16:
	ldr	x11, [x11, _IW_ENCODE_RESTRICTED@GOTPAGEOFF]
	str	w9, [x21]
	ldp	x13, x12, [x19, #8]
	cmp	x12, #0
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
	orr	w9, w10, w9
	add	x8, x13, w8, sxtw #3
	ldp	w1, w2, [x8]
	stp	w9, w2, [x21]
	mov	x0, x20
	bl	_memcpy
	add	x1, sp, #8
	mov	x0, x19
	bl	_orinoco_unlock
	mov	w0, #0
LBB0_9:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_IW_ENCODE_INDEX,4,2            ; @IW_ENCODE_INDEX
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ORINOCO_MAX_KEYS,4,2           ; @ORINOCO_MAX_KEYS
	.comm	_IW_ENCODE_DISABLED,4,2         ; @IW_ENCODE_DISABLED
	.comm	_IW_ENCODE_RESTRICTED,4,2       ; @IW_ENCODE_RESTRICTED
	.comm	_IW_ENCODE_OPEN,4,2             ; @IW_ENCODE_OPEN
	.no_dead_strip	_orinoco_ioctl_getiwencode
.subsections_via_symbols
