	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_pci_wake_wait
_ath10k_pci_wake_wait:                  ## @ath10k_pci_wake_wait
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PCIE_WAKE_TIMEOUT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.1:
	movq	%rdi, %r15
	xorl	%r12d, %r12d
	movl	$5, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_ath10k_pci_is_awake
	testq	%rax, %rax
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_udelay
	addl	%ebx, %r12d
	leal	5(%rbx), %eax
	cmpl	$50, %ebx
	cmovgel	%ebx, %eax
	movl	%eax, %ebx
	cmpl	(%r14), %r12d
	jl	LBB0_2
LBB0_6:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_7
LBB0_3:
	movq	_PCIE_WAKE_LATE_US@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	(%rax), %r12d
	jle	LBB0_7
## %bb.4:
	movslq	%r12d, %rax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$38, %rdx
	addl	%eax, %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_ath10k_warn
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIE_WAKE_TIMEOUT,4,2          ## @PCIE_WAKE_TIMEOUT
	.comm	_PCIE_WAKE_LATE_US,4,2          ## @PCIE_WAKE_LATE_US
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device wakeup took %d ms which is unusually long, otherwise it works normally.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_ath10k_pci_wake_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_pci_wake_wait
_ath10k_pci_wake_wait:                  ; @ath10k_pci_wake_wait
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x22, _PCIE_WAKE_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PCIE_WAKE_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	w21, #0
	mov	w20, #5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_ath10k_pci_is_awake
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_udelay
	ldr	w8, [x22]
	add	w21, w20, w21
	add	w9, w20, #5
	cmp	w20, #50
	csel	w20, w9, w20, lt
	cmp	w21, w8
	b.lt	LBB0_2
LBB0_4:
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_5:
Lloh5:
	adrp	x8, _PCIE_WAKE_LATE_US@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCIE_WAKE_LATE_US@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w21, w8
	b.le	LBB0_7
; %bb.6:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w21, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w2, w8, w9
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ath10k_warn
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIE_WAKE_TIMEOUT,4,2          ; @PCIE_WAKE_TIMEOUT
	.comm	_PCIE_WAKE_LATE_US,4,2          ; @PCIE_WAKE_LATE_US
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device wakeup took %d ms which is unusually long, otherwise it works normally.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_ath10k_pci_wake_wait
.subsections_via_symbols
