	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orinoco_ioctl_getpower
_orinoco_ioctl_getpower:                ## @orinoco_ioctl_getpower
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	callq	_ndev_priv
	movq	%rax, %r13
	leaq	-64(%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_11
LBB0_2:
	movq	_USER_BAP@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_HERMES_RID_CNFPMENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-52(%rbp), %rcx
	movq	%r13, %rdi
	callq	_hermes_read_wordrec
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movl	(%r12), %esi
	movq	_HERMES_RID_CNFMAXSLEEPDURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-68(%rbp), %r15
	movq	%r13, %rdi
	movq	%r15, %rcx
	callq	_hermes_read_wordrec
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movl	(%r12), %esi
	movq	_HERMES_RID_CNFPMHOLDOVERDURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	movq	%r13, %rdi
	callq	_hermes_read_wordrec
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movl	(%r12), %esi
	movq	_HERMES_RID_CNFMULTICASTRECEIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movq	%r13, %rdi
	callq	_hermes_read_wordrec
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	xorl	%eax, %eax
	cmpl	$0, -52(%rbp)
	sete	%al
	movl	%eax, (%r14)
	movq	_IW_POWER_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%r14), %eax
	movq	_IW_POWER_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	_IW_POWER_PERIOD@GOTPCREL(%rip), %rcx
	cmovnel	(%rcx), %eax
	leaq	-48(%rbp), %rcx
	cmoveq	%rcx, %r15
	imull	$1000, (%r15), %ecx             ## imm = 0x3E8
	movl	%ecx, 8(%r14)
	cmpl	$0, -44(%rbp)
	jne	LBB0_7
## %bb.8:
	movq	_IW_POWER_UNICAST_R@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_7:
	movq	_IW_POWER_ALL_R@GOTPCREL(%rip), %rcx
LBB0_9:
	orl	(%rcx), %eax
	movl	%eax, 4(%r14)
	xorl	%ebx, %ebx
LBB0_10:
	leaq	-64(%rbp), %rsi
	movq	%r13, %rdi
	callq	_orinoco_unlock
LBB0_11:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_USER_BAP,4,2                   ## @USER_BAP
	.comm	_HERMES_RID_CNFPMENABLED,4,2    ## @HERMES_RID_CNFPMENABLED
	.comm	_HERMES_RID_CNFMAXSLEEPDURATION,4,2 ## @HERMES_RID_CNFMAXSLEEPDURATION
	.comm	_HERMES_RID_CNFPMHOLDOVERDURATION,4,2 ## @HERMES_RID_CNFPMHOLDOVERDURATION
	.comm	_HERMES_RID_CNFMULTICASTRECEIVE,4,2 ## @HERMES_RID_CNFMULTICASTRECEIVE
	.comm	_IW_POWER_TYPE,4,2              ## @IW_POWER_TYPE
	.comm	_IW_POWER_TIMEOUT,4,2           ## @IW_POWER_TIMEOUT
	.comm	_IW_POWER_PERIOD,4,2            ## @IW_POWER_PERIOD
	.comm	_IW_POWER_ALL_R,4,2             ## @IW_POWER_ALL_R
	.comm	_IW_POWER_UNICAST_R,4,2         ## @IW_POWER_UNICAST_R
	.no_dead_strip	_orinoco_ioctl_getpower
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orinoco_ioctl_getpower
_orinoco_ioctl_getpower:                ; @orinoco_ioctl_getpower
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	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	w21, w8
	b	LBB0_8
LBB0_2:
Lloh3:
	adrp	x22, _USER_BAP@GOTPAGE
Lloh4:
	ldr	x22, [x22, _USER_BAP@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _HERMES_RID_CNFPMENABLED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HERMES_RID_CNFPMENABLED@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x3, sp, #28
	mov	x0, x19
	bl	_hermes_read_wordrec
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _HERMES_RID_CNFMAXSLEEPDURATION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HERMES_RID_CNFMAXSLEEPDURATION@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x3, sp, #24
	mov	x0, x19
	bl	_hermes_read_wordrec
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	w1, [x22]
Lloh11:
	adrp	x8, _HERMES_RID_CNFPMHOLDOVERDURATION@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HERMES_RID_CNFPMHOLDOVERDURATION@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x3, sp, #20
	mov	x0, x19
	bl	_hermes_read_wordrec
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.5:
	ldr	w1, [x22]
Lloh14:
	adrp	x8, _HERMES_RID_CNFMULTICASTRECEIVE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HERMES_RID_CNFMULTICASTRECEIVE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x3, sp, #16
	mov	x0, x19
	bl	_hermes_read_wordrec
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	w8, [sp, #28]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [x20]
	ldr	w8, [x20, #4]
Lloh17:
	adrp	x9, _IW_POWER_TYPE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IW_POWER_TYPE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _IW_POWER_TIMEOUT@GOTPAGE
Lloh21:
	ldr	x10, [x10, _IW_POWER_TIMEOUT@GOTPAGEOFF]
	and	w8, w9, w8
Lloh22:
	ldr	w9, [x10]
Lloh23:
	adrp	x10, _IW_POWER_PERIOD@GOTPAGE
Lloh24:
	ldr	x10, [x10, _IW_POWER_PERIOD@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	cmp	w8, w9
	csel	w8, w8, w10, eq
	add	x9, sp, #24
	add	x10, sp, #20
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	mov	w10, #1000
	mul	w9, w9, w10
	str	w9, [x20, #8]
	ldr	w9, [sp, #16]
Lloh26:
	adrp	x10, _IW_POWER_UNICAST_R@GOTPAGE
Lloh27:
	ldr	x10, [x10, _IW_POWER_UNICAST_R@GOTPAGEOFF]
	cmp	w9, #0
Lloh28:
	adrp	x9, _IW_POWER_ALL_R@GOTPAGE
Lloh29:
	ldr	x9, [x9, _IW_POWER_ALL_R@GOTPAGEOFF]
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20, #4]
LBB0_7:
	add	x1, sp, #8
	mov	x0, x19
	bl	_orinoco_unlock
LBB0_8:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_USER_BAP,4,2                   ; @USER_BAP
	.comm	_HERMES_RID_CNFPMENABLED,4,2    ; @HERMES_RID_CNFPMENABLED
	.comm	_HERMES_RID_CNFMAXSLEEPDURATION,4,2 ; @HERMES_RID_CNFMAXSLEEPDURATION
	.comm	_HERMES_RID_CNFPMHOLDOVERDURATION,4,2 ; @HERMES_RID_CNFPMHOLDOVERDURATION
	.comm	_HERMES_RID_CNFMULTICASTRECEIVE,4,2 ; @HERMES_RID_CNFMULTICASTRECEIVE
	.comm	_IW_POWER_TYPE,4,2              ; @IW_POWER_TYPE
	.comm	_IW_POWER_TIMEOUT,4,2           ; @IW_POWER_TIMEOUT
	.comm	_IW_POWER_PERIOD,4,2            ; @IW_POWER_PERIOD
	.comm	_IW_POWER_ALL_R,4,2             ; @IW_POWER_ALL_R
	.comm	_IW_POWER_UNICAST_R,4,2         ; @IW_POWER_UNICAST_R
	.no_dead_strip	_orinoco_ioctl_getpower
.subsections_via_symbols
