	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orinoco_ioctl_set_auth
_orinoco_ioctl_set_auth:                ## @orinoco_ioctl_set_auth
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	callq	_ndev_priv
	movq	%rax, %r14
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_orinoco_lock
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %r12d
	jmp	LBB0_20
LBB0_2:
	movq	_IW_AUTH_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	(%r15), %rax
	addq	$-128, %rax
	cmpq	$10, %rax
	ja	LBB0_17
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_14:
	cmpl	$0, 16(%r14)
	movl	8(%r15), %eax
	je	LBB0_16
## %bb.15:
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	movl	%ecx, 12(%r14)
	jmp	LBB0_19
LBB0_17:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_7:
	movq	%r14, %rdi
	addq	$20, %rdi
	cmpl	$0, 8(%r15)
	je	LBB0_9
## %bb.8:
	movl	$1, 4(%r14)
	xorl	%esi, %esi
	callq	_hermes_disable_port
	movl	%eax, %r12d
	jmp	LBB0_19
LBB0_4:
	movl	8(%r15), %eax
	movq	_IW_AUTH_MFP_REQUIRED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
	jmp	LBB0_19
LBB0_6:
	movl	8(%r15), %eax
	movl	%eax, (%r14)
	jmp	LBB0_19
LBB0_10:
	movl	8(%r15), %eax
	movq	_IW_AUTH_ALG_SHARED_KEY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movl	$1, 8(%r14)
	jmp	LBB0_19
LBB0_16:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subl	(%rcx), %edx
	testl	%eax, %eax
	cmovnel	%edx, %r12d
	movl	$0, 12(%r14)
	jmp	LBB0_19
LBB0_9:
	movl	$0, 4(%r14)
	xorl	%esi, %esi
	callq	_hermes_enable_port
	movl	%eax, %r12d
	jmp	LBB0_19
LBB0_12:
	movq	_IW_AUTH_ALG_OPEN_SYSTEM@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.13:
	movl	$0, 8(%r14)
	jmp	LBB0_19
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_18:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_19:
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_orinoco_unlock
LBB0_20:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_19
	.long	L0_0_set_14
	.long	L0_0_set_7
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_19
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IW_AUTH_INDEX,8,3              ## @IW_AUTH_INDEX
	.comm	_IW_AUTH_MFP_REQUIRED,4,2       ## @IW_AUTH_MFP_REQUIRED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IW_AUTH_ALG_SHARED_KEY,4,2     ## @IW_AUTH_ALG_SHARED_KEY
	.comm	_IW_AUTH_ALG_OPEN_SYSTEM,4,2    ## @IW_AUTH_ALG_OPEN_SYSTEM
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_orinoco_ioctl_set_auth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orinoco_ioctl_set_auth
_orinoco_ioctl_set_auth:                ; @orinoco_ioctl_set_auth
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	bl	_ndev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	add	x1, sp, #8
	bl	_orinoco_lock
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_20
LBB0_2:
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _IW_AUTH_INDEX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IW_AUTH_INDEX@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	and	x8, x9, x8
	sub	x8, x8, #128
	cmp	x8, #10
	b.hi	LBB0_6
; %bb.3:
	neg	w20, w20
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
	ldr	w9, [x19, #16]
	ldr	w8, [x21, #8]
	cbz	w9, LBB0_13
; %bb.5:
	cmp	w8, #0
	cset	w8, ne
	str	w8, [x19, #12]
	b	LBB0_19
LBB0_6:
Lloh11:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_18
LBB0_7:
	add	x0, x19, #20
	ldr	w8, [x21, #8]
	cbz	w8, LBB0_14
; %bb.8:
	mov	w8, #1
	str	w8, [x19, #4]
	mov	w1, #0
	bl	_hermes_disable_port
	mov	x20, x0
	b	LBB0_19
LBB0_9:
	ldr	w8, [x21, #8]
Lloh13:
	adrp	x9, _IW_AUTH_MFP_REQUIRED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IW_AUTH_MFP_REQUIRED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_17
	b	LBB0_19
LBB0_10:
	ldr	w8, [x21, #8]
	str	w8, [x19]
	b	LBB0_19
LBB0_11:
	ldr	w8, [x21, #8]
Lloh16:
	adrp	x9, _IW_AUTH_ALG_SHARED_KEY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IW_AUTH_ALG_SHARED_KEY@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.12:
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_19
LBB0_13:
Lloh19:
	adrp	x9, _EOPNOTSUPP@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EOPNOTSUPP@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w8, #0
	csneg	w20, w20, w9, eq
	str	wzr, [x19, #12]
	b	LBB0_19
LBB0_14:
	str	wzr, [x19, #4]
	mov	w1, #0
	bl	_hermes_enable_port
	mov	x20, x0
	b	LBB0_19
LBB0_15:
Lloh22:
	adrp	x9, _IW_AUTH_ALG_OPEN_SYSTEM@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IW_AUTH_ALG_OPEN_SYSTEM@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
	str	wzr, [x19, #8]
	b	LBB0_19
LBB0_17:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_19:
	add	x1, sp, #8
	mov	x0, x19
	bl	_orinoco_unlock
LBB0_20:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_10-LBB0_4)>>2
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
                                        ; -- End function
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IW_AUTH_INDEX,8,3              ; @IW_AUTH_INDEX
	.comm	_IW_AUTH_MFP_REQUIRED,4,2       ; @IW_AUTH_MFP_REQUIRED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IW_AUTH_ALG_SHARED_KEY,4,2     ; @IW_AUTH_ALG_SHARED_KEY
	.comm	_IW_AUTH_ALG_OPEN_SYSTEM,4,2    ; @IW_AUTH_ALG_OPEN_SYSTEM
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_orinoco_ioctl_set_auth
.subsections_via_symbols
