	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_hw_set_power_mode
_ath5k_hw_set_power_mode:               ## @ath5k_hw_set_power_mode
	.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
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	_AR5K_STA_ID1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ath5k_hw_reg_read
	addl	$-128, %ebx
	cmpl	$3, %ebx
	ja	LBB0_17
## %bb.1:
	movl	%eax, %r14d
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_6:
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.7:
	movq	_AR5K_SLEEP_CTL_SLE_SLP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR5K_SLEEP_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_write
LBB0_8:
	movq	_AR5K_STA_ID1_PWR_SV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, %r14d
	jmp	LBB0_9
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_11:
	movq	_AR5K_STA_ID1_PWR_SV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.12:
	movq	_AR5K_SLEEP_CTL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_read
	movq	_AR5K_SLEEP_CTL_SLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	xorl	%ebx, %ebx
	cmpl	$4194304, %eax                  ## imm = 0x400000
	cmovbl	%ecx, %ebx
	movq	_AR5K_SLEEP_CTL_SLE_WAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%ebx, %esi
	movl	(%r15), %edx
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_write
	movl	$15, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	$-200, %r15d
	movq	_AR5K_PCICFG_SPWR_DN@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	_AR5K_PCICFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_read
	testl	%eax, (%r12)
	je	LBB0_9
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	$50, %edi
	movl	$75, %esi
	callq	_usleep_range
	movq	_AR5K_SLEEP_CTL_SLE_WAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%ebx, %esi
	movq	_AR5K_SLEEP_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_ath5k_hw_reg_write
	incl	%r15d
	jne	LBB0_13
## %bb.15:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_2:
	movq	_AR5K_STA_ID1_DEFAULT_ANTENNA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
LBB0_3:
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.4:
	movq	_AR5K_SLEEP_CTL_SLE_ALLOW@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	_AR5K_SLEEP_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_ath5k_hw_reg_write
LBB0_5:
	movq	_AR5K_STA_ID1_PWR_SV@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
LBB0_9:
	movq	_AR5K_STA_ID1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_ath5k_hw_reg_write
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_11
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_AR5K_STA_ID1,4,2               ## @AR5K_STA_ID1
	.comm	_AR5K_STA_ID1_DEFAULT_ANTENNA,4,2 ## @AR5K_STA_ID1_DEFAULT_ANTENNA
	.comm	_AR5K_SLEEP_CTL_SLE_ALLOW,4,2   ## @AR5K_SLEEP_CTL_SLE_ALLOW
	.comm	_AR5K_SLEEP_CTL,4,2             ## @AR5K_SLEEP_CTL
	.comm	_AR5K_STA_ID1_PWR_SV,4,2        ## @AR5K_STA_ID1_PWR_SV
	.comm	_AR5K_SLEEP_CTL_SLE_SLP,4,2     ## @AR5K_SLEEP_CTL_SLE_SLP
	.comm	_AR5K_SLEEP_CTL_SLE,4,2         ## @AR5K_SLEEP_CTL_SLE
	.comm	_AR5K_SLEEP_CTL_SLE_WAKE,4,2    ## @AR5K_SLEEP_CTL_SLE_WAKE
	.comm	_AR5K_PCICFG,4,2                ## @AR5K_PCICFG
	.comm	_AR5K_PCICFG_SPWR_DN,4,2        ## @AR5K_PCICFG_SPWR_DN
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ath5k_hw_set_power_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_hw_set_power_mode
_ath5k_hw_set_power_mode:               ; @ath5k_hw_set_power_mode
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _AR5K_STA_ID1@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AR5K_STA_ID1@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_ath5k_hw_reg_read
	sub	w8, w23, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	cbz	w21, LBB0_15
; %bb.3:
Lloh4:
	adrp	x8, _AR5K_SLEEP_CTL_SLE_SLP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AR5K_SLEEP_CTL_SLE_SLP@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	b	LBB0_14
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
Lloh9:
	adrp	x8, _AR5K_STA_ID1_PWR_SV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR5K_STA_ID1_PWR_SV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w20, w20, w8
	cbz	w21, LBB0_16
; %bb.6:
Lloh12:
	adrp	x21, _AR5K_SLEEP_CTL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _AR5K_SLEEP_CTL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ath5k_hw_reg_read
Lloh14:
	adrp	x8, _AR5K_SLEEP_CTL_SLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR5K_SLEEP_CTL_SLE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bic	w8, w0, w8
	cmp	w0, #1024, lsl #12              ; =4194304
	csel	w22, w8, wzr, lo
Lloh17:
	adrp	x23, _AR5K_SLEEP_CTL_SLE_WAKE@GOTPAGE
Lloh18:
	ldr	x23, [x23, _AR5K_SLEEP_CTL_SLE_WAKE@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w1, w22, w8
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
	mov	w0, #15
	mov	w1, #20
	bl	_usleep_range
	mov	w25, #-200
Lloh19:
	adrp	x26, _AR5K_PCICFG@GOTPAGE
Lloh20:
	ldr	x26, [x26, _AR5K_PCICFG@GOTPAGEOFF]
Lloh21:
	adrp	x27, _AR5K_PCICFG_SPWR_DN@GOTPAGE
Lloh22:
	ldr	x27, [x27, _AR5K_PCICFG_SPWR_DN@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_ath5k_hw_reg_read
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #50
	mov	w1, #75
	bl	_usleep_range
	ldr	w8, [x23]
	orr	w1, w8, w22
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
	adds	w25, w25, #1
	b.lo	LBB0_7
; %bb.9:
Lloh23:
	adrp	x8, _EIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_11:
Lloh25:
	adrp	x8, _AR5K_STA_ID1_DEFAULT_ANTENNA@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AR5K_STA_ID1_DEFAULT_ANTENNA@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	bic	w20, w20, w8
LBB0_12:
	cbz	w21, LBB0_15
; %bb.13:
Lloh28:
	adrp	x8, _AR5K_SLEEP_CTL_SLE_ALLOW@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AR5K_SLEEP_CTL_SLE_ALLOW@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	orr	w1, w8, w22
LBB0_14:
Lloh31:
	adrp	x8, _AR5K_SLEEP_CTL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AR5K_SLEEP_CTL@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
LBB0_15:
Lloh34:
	adrp	x8, _AR5K_STA_ID1_PWR_SV@GOTPAGE
Lloh35:
	ldr	x8, [x8, _AR5K_STA_ID1_PWR_SV@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_16:
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_reg_write
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.comm	_AR5K_STA_ID1,4,2               ; @AR5K_STA_ID1
	.comm	_AR5K_STA_ID1_DEFAULT_ANTENNA,4,2 ; @AR5K_STA_ID1_DEFAULT_ANTENNA
	.comm	_AR5K_SLEEP_CTL_SLE_ALLOW,4,2   ; @AR5K_SLEEP_CTL_SLE_ALLOW
	.comm	_AR5K_SLEEP_CTL,4,2             ; @AR5K_SLEEP_CTL
	.comm	_AR5K_STA_ID1_PWR_SV,4,2        ; @AR5K_STA_ID1_PWR_SV
	.comm	_AR5K_SLEEP_CTL_SLE_SLP,4,2     ; @AR5K_SLEEP_CTL_SLE_SLP
	.comm	_AR5K_SLEEP_CTL_SLE,4,2         ; @AR5K_SLEEP_CTL_SLE
	.comm	_AR5K_SLEEP_CTL_SLE_WAKE,4,2    ; @AR5K_SLEEP_CTL_SLE_WAKE
	.comm	_AR5K_PCICFG,4,2                ; @AR5K_PCICFG
	.comm	_AR5K_PCICFG_SPWR_DN,4,2        ; @AR5K_PCICFG_SPWR_DN
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ath5k_hw_set_power_mode
.subsections_via_symbols
