	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orinoco_ioctl_setpower
_orinoco_ioctl_setpower:                ## @orinoco_ioctl_setpower
	.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	%rdx, %r15
	callq	_ndev_priv
	movq	%rax, %r14
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_orinoco_lock
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_2:
	cmpq	$0, 8(%r15)
	je	LBB0_4
## %bb.3:
	movl	$0, (%r14)
	jmp	LBB0_16
LBB0_4:
	movl	(%r15), %eax
	movq	_IW_POWER_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	cmpl	$128, %ecx
	je	LBB0_5
## %bb.6:
	cmpl	$129, %ecx
	je	LBB0_10
## %bb.7:
	cmpl	$130, %ecx
	jne	LBB0_15
## %bb.8:
	movl	$1, %ecx
	jmp	LBB0_9
LBB0_5:
	xorl	%ecx, %ecx
LBB0_9:
	movl	%ecx, 4(%r14)
	movl	$1, (%r14)
LBB0_10:
	movq	_IW_POWER_TIMEOUT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movl	$1, (%r14)
	movslq	4(%r15), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movl	%ecx, 8(%r14)
LBB0_12:
	movq	_IW_POWER_PERIOD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:
	movl	$1, (%r14)
	movslq	4(%r15), %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movl	%eax, 12(%r14)
	jmp	LBB0_16
LBB0_14:
	cmpl	$0, (%r14)
	jne	LBB0_16
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_16:
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_orinoco_unlock
LBB0_17:
	negl	%ebx
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IW_POWER_MODE,4,2              ## @IW_POWER_MODE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IW_POWER_TIMEOUT,4,2           ## @IW_POWER_TIMEOUT
	.comm	_IW_POWER_PERIOD,4,2            ## @IW_POWER_PERIOD
	.no_dead_strip	_orinoco_ioctl_setpower
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orinoco_ioctl_setpower
_orinoco_ioctl_setpower:                ; @orinoco_ioctl_setpower
	.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	x20, x2
	bl	_ndev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
Lloh2:
	ldr	w21, [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	w21, [x8]
	b	LBB0_17
LBB0_2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_4
; %bb.3:
	str	wzr, [x19]
	b	LBB0_16
LBB0_4:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _IW_POWER_MODE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IW_POWER_MODE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w8
	cmp	w9, #128
	b.eq	LBB0_8
; %bb.5:
	cmp	w9, #129
	b.eq	LBB0_10
; %bb.6:
	cmp	w9, #130
	b.ne	LBB0_15
; %bb.7:
	mov	w9, #1
	b	LBB0_9
LBB0_8:
	mov	w9, #0
LBB0_9:
	mov	w10, #1
	stp	w10, w9, [x19]
LBB0_10:
Lloh9:
	adrp	x9, _IW_POWER_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IW_POWER_TIMEOUT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	mov	w9, #1
	str	w9, [x19]
	ldrsw	x9, [x20, #4]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	str	w9, [x19, #8]
LBB0_12:
Lloh12:
	adrp	x9, _IW_POWER_PERIOD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IW_POWER_PERIOD@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	mov	w8, #1
	str	w8, [x19]
	ldrsw	x8, [x20, #4]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	w8, [x19, #12]
	b	LBB0_16
LBB0_14:
	ldr	w8, [x19]
Lloh15:
	adrp	x9, _EINVAL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w21, w9, w21, eq
	b	LBB0_16
LBB0_15:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
LBB0_16:
	add	x1, sp, #8
	mov	x0, x19
	bl	_orinoco_unlock
LBB0_17:
	neg	w0, w21
	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 AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IW_POWER_MODE,4,2              ; @IW_POWER_MODE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IW_POWER_TIMEOUT,4,2           ; @IW_POWER_TIMEOUT
	.comm	_IW_POWER_PERIOD,4,2            ; @IW_POWER_PERIOD
	.no_dead_strip	_orinoco_ioctl_setpower
.subsections_via_symbols
