	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1251_ps_elp_wakeup           ## -- Begin function wl1251_ps_elp_wakeup
	.p2align	4, 0x90
_wl1251_ps_elp_wakeup:                  ## @wl1251_ps_elp_wakeup
	.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
	movq	%rdi, %rbx
	addq	$4, %rdi
	callq	_cancel_delayed_work
	cmpl	$0, (%rbx)
	je	LBB0_7
## %bb.1:
	movq	_DEBUG_PSM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1251_debug
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_WL1251_WAKEUP_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r15
	movq	_HW_ACCESS_ELP_CTRL_REG_ADDR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_ELPCTRL_WAKE_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_wl1251_write_elp
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_wl1251_read_elp
	movq	_ELPCTRL_WLAN_READY@GOTPCREL(%rip), %r14
	testl	%eax, (%r14)
	jne	LBB0_6
## %bb.2:
	addq	-48(%rbp), %r15                 ## 8-byte Folded Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	%r15, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_wl1251_read_elp
	testl	%eax, (%r14)
	je	LBB0_3
LBB0_6:
	movq	_DEBUG_PSM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	(%r12), %rdi
	subq	-48(%rbp), %rdi                 ## 8-byte Folded Reload
	callq	_jiffies_to_msecs
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_wl1251_debug
	movl	$0, (%rbx)
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_wl1251_error
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_PSM,4,2                  ## @DEBUG_PSM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waking up chip from elp"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_WL1251_WAKEUP_TIMEOUT,4,2      ## @WL1251_WAKEUP_TIMEOUT
	.comm	_HW_ACCESS_ELP_CTRL_REG_ADDR,4,2 ## @HW_ACCESS_ELP_CTRL_REG_ADDR
	.comm	_ELPCTRL_WAKE_UP,4,2            ## @ELPCTRL_WAKE_UP
	.comm	_ELPCTRL_WLAN_READY,4,2         ## @ELPCTRL_WLAN_READY
L_.str.1:                               ## @.str.1
	.asciz	"elp wakeup timeout"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.2:                               ## @.str.2
	.asciz	"wakeup time: %u ms"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl1251_ps_elp_wakeup           ; -- Begin function wl1251_ps_elp_wakeup
	.p2align	2
_wl1251_ps_elp_wakeup:                  ; @wl1251_ps_elp_wakeup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	add	x0, x0, #4
	bl	_cancel_delayed_work
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.1:
Lloh0:
	adrp	x21, _DEBUG_PSM@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DEBUG_PSM@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1251_debug
Lloh4:
	adrp	x22, _jiffies@GOTPAGE
Lloh5:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x23, [x22]
Lloh6:
	adrp	x8, _WL1251_WAKEUP_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WL1251_WAKEUP_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x20, x0
Lloh9:
	adrp	x24, _HW_ACCESS_ELP_CTRL_REG_ADDR@GOTPAGE
Lloh10:
	ldr	x24, [x24, _HW_ACCESS_ELP_CTRL_REG_ADDR@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh11:
	adrp	x8, _ELPCTRL_WAKE_UP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ELPCTRL_WAKE_UP@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_wl1251_write_elp
	ldr	w1, [x24]
	mov	x0, x19
	bl	_wl1251_read_elp
Lloh14:
	adrp	x25, _ELPCTRL_WLAN_READY@GOTPAGE
Lloh15:
	ldr	x25, [x25, _ELPCTRL_WLAN_READY@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.2:
	add	x20, x20, x23
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x24]
	mov	x0, x19
	bl	_wl1251_read_elp
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_3
LBB0_5:
	ldr	w20, [x21]
	ldr	x8, [x22]
	sub	x0, x8, x23
	bl	_jiffies_to_msecs
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_wl1251_debug
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_8
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_wl1251_error
Lloh20:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_PSM,4,2                  ; @DEBUG_PSM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waking up chip from elp"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_WL1251_WAKEUP_TIMEOUT,4,2      ; @WL1251_WAKEUP_TIMEOUT
	.comm	_HW_ACCESS_ELP_CTRL_REG_ADDR,4,2 ; @HW_ACCESS_ELP_CTRL_REG_ADDR
	.comm	_ELPCTRL_WAKE_UP,4,2            ; @ELPCTRL_WAKE_UP
	.comm	_ELPCTRL_WLAN_READY,4,2         ; @ELPCTRL_WLAN_READY
l_.str.1:                               ; @.str.1
	.asciz	"elp wakeup timeout"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.2:                               ; @.str.2
	.asciz	"wakeup time: %u ms"

.subsections_via_symbols
