	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zd1201_set_power
_zd1201_set_power:                      ## @zd1201_set_power
	.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, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	xorl	%r15d, %r15d
	cmpq	$0, 8(%rbx)
	sete	%r12b
	je	LBB0_1
LBB0_4:
	movb	%r12b, %r15b
	movq	_ZD1201_RID_CNFPMENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%r15w, %edx
	movq	%r14, %rdi
	callq	_zd1201_setconfig16
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%rbx), %eax
	movq	_IW_POWER_PERIOD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.2:
	movswl	4(%rbx), %edx
	movw	%dx, -34(%rbp)
	movq	_ZD1201_RID_CNFMAXSLEEPDURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_3:
	movq	%r14, %rdi
	callq	_zd1201_setconfig16
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_4
LBB0_5:
	movq	_IW_POWER_TIMEOUT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.6:
	movq	_ZD1201_RID_CNFMAXSLEEPDURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-34(%rbp), %rdx
	movq	%r14, %rdi
	callq	_zd1201_getconfig16
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movswl	4(%rbx), %eax
	shll	$2, %eax
	movswl	-34(%rbp), %ecx
	cltd
	idivl	%ecx
	xorl	%ecx, %ecx
	testw	%ax, %ax
	cmovgl	%eax, %ecx
	cmpw	$4, %cx
	movl	$4, %eax
	cmovll	%ecx, %eax
	movq	_ZD1201_RID_CNFPMEPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movzwl	%ax, %edx
	jmp	LBB0_3
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_IW_POWER_PERIOD,4,2            ## @IW_POWER_PERIOD
	.comm	_ZD1201_RID_CNFMAXSLEEPDURATION,4,2 ## @ZD1201_RID_CNFMAXSLEEPDURATION
	.comm	_IW_POWER_TIMEOUT,4,2           ## @IW_POWER_TIMEOUT
	.comm	_ZD1201_RID_CNFPMEPS,4,2        ## @ZD1201_RID_CNFPMEPS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ZD1201_RID_CNFPMENABLED,4,2    ## @ZD1201_RID_CNFPMENABLED
	.no_dead_strip	_zd1201_set_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zd1201_set_power
_zd1201_set_power:                      ; @zd1201_set_power
	.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	_netdev_priv
	mov	x19, x0
	ldr	x8, [x21, #8]
	cmp	x8, #0
	cset	w20, eq
	cbz	x8, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _ZD1201_RID_CNFPMENABLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ZD1201_RID_CNFPMENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_zd1201_setconfig16
LBB0_2:
	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
LBB0_3:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _IW_POWER_PERIOD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IW_POWER_PERIOD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	ldrsh	w2, [x21, #4]
	strh	w2, [sp, #14]
Lloh6:
	adrp	x8, _ZD1201_RID_CNFMAXSLEEPDURATION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ZD1201_RID_CNFMAXSLEEPDURATION@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
LBB0_5:
	mov	x0, x19
	bl	_zd1201_setconfig16
	cbnz	w0, LBB0_2
	b	LBB0_1
LBB0_6:
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_9
; %bb.7:
Lloh12:
	adrp	x8, _ZD1201_RID_CNFMAXSLEEPDURATION@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ZD1201_RID_CNFMAXSLEEPDURATION@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #14
	mov	x0, x19
	bl	_zd1201_getconfig16
	cbnz	w0, LBB0_2
; %bb.8:
	ldrsh	w8, [x21, #4]
	lsl	w8, w8, #2
	ldrsh	w9, [sp, #14]
	sdiv	w8, w8, w9
	sxth	w9, w8
	lsl	w8, w8, #16
	cmp	w9, #0
	csel	w9, w9, wzr, gt
	mov	w10, #4
	cmp	w8, #64, lsl #12                ; =262144
	csel	w8, w10, w9, gt
Lloh15:
	adrp	x9, _ZD1201_RID_CNFPMEPS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ZD1201_RID_CNFPMEPS@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x9]
	and	w2, w8, #0xffff
	b	LBB0_5
LBB0_9:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_2
	.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	_IW_POWER_PERIOD,4,2            ; @IW_POWER_PERIOD
	.comm	_ZD1201_RID_CNFMAXSLEEPDURATION,4,2 ; @ZD1201_RID_CNFMAXSLEEPDURATION
	.comm	_IW_POWER_TIMEOUT,4,2           ; @IW_POWER_TIMEOUT
	.comm	_ZD1201_RID_CNFPMEPS,4,2        ; @ZD1201_RID_CNFPMEPS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ZD1201_RID_CNFPMENABLED,4,2    ; @ZD1201_RID_CNFPMENABLED
	.no_dead_strip	_zd1201_set_power
.subsections_via_symbols
