	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath10k_htc_wait_target         ## -- Begin function ath10k_htc_wait_target
	.p2align	4, 0x90
_ath10k_htc_wait_target:                ## @ath10k_htc_wait_target
	.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, %r12
	movq	40(%rdi), %rbx
	leaq	32(%rdi), %r15
	movq	_ATH10K_HTC_WAIT_TIMEOUT_HZ@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_ath10k_warn
	movq	_CE_COUNT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r12), %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_ath10k_hif_send_complete_check
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_3
LBB0_4:
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_5
LBB0_7:
	movl	(%r12), %edx
	cmpl	$11, %edx
	ja	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ath10k_err
	jmp	LBB0_14
LBB0_9:
	movq	24(%r12), %r14
	movl	12(%r14), %edi
	callq	___le16_to_cpu
	movq	_ATH10K_HTC_MSG_READY_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_ath10k_err
	jmp	LBB0_14
LBB0_11:
	movl	8(%r14), %edi
	callq	___le16_to_cpu
	movq	%rax, 16(%r12)
	movl	4(%r14), %edi
	callq	___le16_to_cpu
	movq	%rax, 8(%r12)
	movq	_ATH10K_DBG_HTC@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	16(%r12), %ecx
	leaq	L_.str.4(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_ath10k_dbg
	cmpq	$0, 16(%r12)
	je	LBB0_13
## %bb.12:
	cmpq	$0, 8(%r12)
	je	LBB0_13
## %bb.15:
	xorl	%r15d, %r15d
	cmpl	$8, (%r12)
	jb	LBB0_17
## %bb.16:
	movq	_u8@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	movq	_HTC_HOST_MAX_MSG_PER_RX_BUNDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_min_t
	movl	%eax, 4(%r12)
	movl	(%r13), %esi
	leaq	L_.str.6(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_ath10k_dbg
	jmp	LBB0_17
LBB0_5:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	jle	LBB0_7
## %bb.6:
	negl	%r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_ath10k_err
	jmp	LBB0_17
LBB0_13:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_ath10k_err
LBB0_14:
	movq	_ECOMM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH10K_HTC_WAIT_TIMEOUT_HZ,4,2 ## @ATH10K_HTC_WAIT_TIMEOUT_HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to receive control response completion, polling..\n"

	.comm	_CE_COUNT,4,2                   ## @CE_COUNT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"ctl_resp never came in (%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid HTC ready msg len:%d\n"

	.comm	_ECOMM,4,2                      ## @ECOMM
	.comm	_ATH10K_HTC_MSG_READY_ID,8,3    ## @ATH10K_HTC_MSG_READY_ID
L_.str.3:                               ## @.str.3
	.asciz	"Invalid HTC ready msg: 0x%x\n"

	.comm	_ATH10K_DBG_HTC,4,2             ## @ATH10K_DBG_HTC
L_.str.4:                               ## @.str.4
	.asciz	"Target ready! transmit resources: %d size:%d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Invalid credit size received\n"

	.comm	_u8,4,2                         ## @u8
	.comm	_HTC_HOST_MAX_MSG_PER_RX_BUNDLE,4,2 ## @HTC_HOST_MAX_MSG_PER_RX_BUNDLE
L_.str.6:                               ## @.str.6
	.asciz	"Extended ready message. RX bundle size: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath10k_htc_wait_target         ; -- Begin function ath10k_htc_wait_target
	.p2align	2
_ath10k_htc_wait_target:                ; @ath10k_htc_wait_target
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x19, [x0, #40]
	add	x21, x0, #32
Lloh0:
	adrp	x23, _ATH10K_HTC_WAIT_TIMEOUT_HZ@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ATH10K_HTC_WAIT_TIMEOUT_HZ@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cbnz	x0, LBB0_5
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ath10k_warn
Lloh4:
	adrp	x24, _CE_COUNT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _CE_COUNT@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, #40]
	mov	x1, x22
	mov	w2, #1
	bl	_ath10k_hif_send_complete_check
	add	w22, w22, #1
	ldr	w8, [x24]
	cmp	w22, w8
	b.lt	LBB0_3
LBB0_4:
	ldr	w1, [x23]
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_14
LBB0_5:
	ldr	w8, [x20]
	cmp	w8, #11
	b.hi	LBB0_7
; %bb.6:
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_7:
	ldr	x21, [x20, #24]
	ldr	w0, [x21, #12]
	bl	___le16_to_cpu
Lloh8:
	adrp	x8, _ATH10K_HTC_MSG_READY_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATH10K_HTC_MSG_READY_ID@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
	str	x0, [sp]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_9:
	ldr	w0, [x21, #8]
	bl	___le16_to_cpu
	str	x0, [x20, #16]
	ldr	w0, [x21, #4]
	bl	___le16_to_cpu
	str	x0, [x20, #8]
Lloh13:
	adrp	x22, _ATH10K_DBG_HTC@GOTPAGE
Lloh14:
	ldr	x22, [x22, _ATH10K_DBG_HTC@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	w3, [x20, #16]
	str	x0, [sp]
Lloh15:
	adrp	x2, l_.str.4@PAGE
Lloh16:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_16
; %bb.10:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_16
; %bb.11:
	ldr	w8, [x20]
	cmp	w8, #8
	b.lo	LBB0_13
; %bb.12:
Lloh17:
	adrp	x8, _u8@GOTPAGE
Lloh18:
	ldr	x8, [x8, _u8@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w1, [x21]
Lloh20:
	adrp	x8, _HTC_HOST_MAX_MSG_PER_RX_BUNDLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HTC_HOST_MAX_MSG_PER_RX_BUNDLE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	bl	_min_t
	mov	x3, x0
	str	w0, [x20, #4]
	ldr	w1, [x22]
Lloh23:
	adrp	x2, l_.str.6@PAGE
Lloh24:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_ath10k_dbg
LBB0_13:
	mov	w20, #0
	b	LBB0_18
LBB0_14:
Lloh25:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.15:
	neg	w20, w8
	str	x20, [sp]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ath10k_err
	b	LBB0_18
LBB0_16:
Lloh30:
	adrp	x1, l_.str.5@PAGE
Lloh31:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_17:
	mov	x0, x19
	bl	_ath10k_err
Lloh32:
	adrp	x8, _ECOMM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ECOMM@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_18:
	mov	x0, x20
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH10K_HTC_WAIT_TIMEOUT_HZ,4,2 ; @ATH10K_HTC_WAIT_TIMEOUT_HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to receive control response completion, polling..\n"

	.comm	_CE_COUNT,4,2                   ; @CE_COUNT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"ctl_resp never came in (%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid HTC ready msg len:%d\n"

	.comm	_ECOMM,4,2                      ; @ECOMM
	.comm	_ATH10K_HTC_MSG_READY_ID,8,3    ; @ATH10K_HTC_MSG_READY_ID
l_.str.3:                               ; @.str.3
	.asciz	"Invalid HTC ready msg: 0x%x\n"

	.comm	_ATH10K_DBG_HTC,4,2             ; @ATH10K_DBG_HTC
l_.str.4:                               ; @.str.4
	.asciz	"Target ready! transmit resources: %d size:%d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Invalid credit size received\n"

	.comm	_u8,4,2                         ; @u8
	.comm	_HTC_HOST_MAX_MSG_PER_RX_BUNDLE,4,2 ; @HTC_HOST_MAX_MSG_PER_RX_BUNDLE
l_.str.6:                               ; @.str.6
	.asciz	"Extended ready message. RX bundle size: %d\n"

.subsections_via_symbols
