	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function htc_wait_recv_ctrl_message
_htc_wait_recv_ctrl_message:            ## @htc_wait_recv_ctrl_message
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_HTC_TARGET_RESPONSE_POLL_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	incl	%ebx
	movq	_HTC_TARGET_RESPONSE_POLL_WAIT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_spin_lock_bh
	cmpl	$0, 4(%r14)
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movl	(%r15), %edi
	callq	_msleep_interruptible
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_2
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_ath6kl_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_6:
	movl	$0, 4(%r14)
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HTC_TARGET_RESPONSE_POLL_COUNT,4,2 ## @HTC_TARGET_RESPONSE_POLL_COUNT
	.comm	_HTC_TARGET_RESPONSE_POLL_WAIT,4,2 ## @HTC_TARGET_RESPONSE_POLL_WAIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"htc pipe control receive timeout!\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function htc_wait_recv_ctrl_message
_htc_wait_recv_ctrl_message:            ; @htc_wait_recv_ctrl_message
	.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	x8, _HTC_TARGET_RESPONSE_POLL_COUNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HTC_TARGET_RESPONSE_POLL_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
	add	w20, w8, #1
Lloh3:
	adrp	x21, _HTC_TARGET_RESPONSE_POLL_WAIT@GOTPAGE
Lloh4:
	ldr	x21, [x21, _HTC_TARGET_RESPONSE_POLL_WAIT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_spin_lock_bh
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_spin_unlock_bh
	ldr	w0, [x21]
	bl	_msleep_interruptible
	sub	w20, w20, #1
	cmp	w20, #1
	b.gt	LBB0_2
LBB0_4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_warn
Lloh7:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	str	wzr, [x19, #4]
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	w0, #0
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_HTC_TARGET_RESPONSE_POLL_COUNT,4,2 ; @HTC_TARGET_RESPONSE_POLL_COUNT
	.comm	_HTC_TARGET_RESPONSE_POLL_WAIT,4,2 ; @HTC_TARGET_RESPONSE_POLL_WAIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"htc pipe control receive timeout!\n"

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