	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_htc_pipe_wait_target
_ath6kl_htc_pipe_wait_target:           ## @ath6kl_htc_pipe_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_htc_wait_recv_ctrl_message
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movl	16(%rbx), %esi
	cmpl	$11, %esi
	ja	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_3:
	movq	24(%rbx), %r14
	movl	(%r14), %r15d
	movq	_HTC_MSG_READY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	cmpl	%eax, %r15d
	jne	LBB0_7
## %bb.4:
	movq	_ATH6KL_DBG_HTC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %ecx
	movl	8(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_ath6kl_dbg
	movl	8(%r14), %edi
	callq	_le16_to_cpu
	movq	%rax, (%rbx)
	movl	4(%r14), %edi
	callq	_le16_to_cpu
	movq	%rax, 8(%rbx)
	cmpq	$0, (%rbx)
	je	LBB0_9
## %bb.5:
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%rbx, %rdi
	callq	_htc_setup_target_buffer_assignments
	leaq	-40(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_htc_txctrl_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	_htc_rxctrl_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	_NUM_CONTROL_TX_BUFFERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_HTC_CTRL_RSVD_SVC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_ath6kl_htc_pipe_conn_service
	jmp	LBB0_10
LBB0_7:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	callq	_ath6kl_warn
LBB0_9:
	movq	_ECOMM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid htc pipe ready msg len: %d\n"

	.comm	_ECOMM,4,2                      ## @ECOMM
	.comm	_HTC_MSG_READY_ID,4,2           ## @HTC_MSG_READY_ID
L_.str.1:                               ## @.str.1
	.asciz	"invalid htc pipe ready msg: 0x%x\n"

	.comm	_ATH6KL_DBG_HTC,4,2             ## @ATH6KL_DBG_HTC
L_.str.2:                               ## @.str.2
	.asciz	"Target Ready! : transmit resources : %d size:%d\n"

	.comm	_htc_txctrl_complete,4,2        ## @htc_txctrl_complete
	.comm	_htc_rxctrl_complete,4,2        ## @htc_rxctrl_complete
	.comm	_NUM_CONTROL_TX_BUFFERS,4,2     ## @NUM_CONTROL_TX_BUFFERS
	.comm	_HTC_CTRL_RSVD_SVC,4,2          ## @HTC_CTRL_RSVD_SVC
	.no_dead_strip	_ath6kl_htc_pipe_wait_target
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_htc_pipe_wait_target
_ath6kl_htc_pipe_wait_target:           ; @ath6kl_htc_pipe_wait_target
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	bl	_htc_wait_recv_ctrl_message
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	w1, [x19, #16]
	cmp	w1, #11
	b.hi	LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_3:
	ldr	x20, [x19, #24]
	ldr	w21, [x20]
Lloh2:
	adrp	x8, _HTC_MSG_READY_ID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HTC_MSG_READY_ID@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	cmp	w21, w0
	b.ne	LBB0_7
; %bb.4:
Lloh5:
	adrp	x8, _ATH6KL_DBG_HTC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATH6KL_DBG_HTC@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	w3, w2, [x20, #4]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ath6kl_dbg
	ldr	w0, [x20, #8]
	bl	_le16_to_cpu
	str	x0, [x19]
	ldr	w0, [x20, #4]
	bl	_le16_to_cpu
	str	x0, [x19, #8]
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.5:
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_htc_setup_target_buffer_assignments
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh10:
	adrp	x8, _htc_txctrl_complete@GOTPAGE
Lloh11:
	ldr	x8, [x8, _htc_txctrl_complete@GOTPAGEOFF]
Lloh12:
	adrp	x9, _htc_rxctrl_complete@GOTPAGE
Lloh13:
	ldr	x9, [x9, _htc_rxctrl_complete@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #24]
Lloh16:
	adrp	x8, _NUM_CONTROL_TX_BUFFERS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NUM_CONTROL_TX_BUFFERS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _HTC_CTRL_RSVD_SVC@GOTPAGE
Lloh20:
	ldr	x9, [x9, _HTC_CTRL_RSVD_SVC@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #16]
	add	x1, sp, #16
	mov	x2, sp
	mov	x0, x19
	bl	_ath6kl_htc_pipe_conn_service
	b	LBB0_10
LBB0_7:
	ldr	w1, [x20]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_ath6kl_warn
LBB0_9:
Lloh24:
	adrp	x8, _ECOMM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ECOMM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid htc pipe ready msg len: %d\n"

	.comm	_ECOMM,4,2                      ; @ECOMM
	.comm	_HTC_MSG_READY_ID,4,2           ; @HTC_MSG_READY_ID
l_.str.1:                               ; @.str.1
	.asciz	"invalid htc pipe ready msg: 0x%x\n"

	.comm	_ATH6KL_DBG_HTC,4,2             ; @ATH6KL_DBG_HTC
l_.str.2:                               ; @.str.2
	.asciz	"Target Ready! : transmit resources : %d size:%d\n"

	.comm	_htc_txctrl_complete,4,2        ; @htc_txctrl_complete
	.comm	_htc_rxctrl_complete,4,2        ; @htc_rxctrl_complete
	.comm	_NUM_CONTROL_TX_BUFFERS,4,2     ; @NUM_CONTROL_TX_BUFFERS
	.comm	_HTC_CTRL_RSVD_SVC,4,2          ; @HTC_CTRL_RSVD_SVC
	.no_dead_strip	_ath6kl_htc_pipe_wait_target
.subsections_via_symbols
