	.file	"extr_htc_mbox.c_htc_wait_for_ctrl_msg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"htc rx wait ctrl look_ahead 0x%X\n"
	.align 8
.LC1:
	.string	"htc_wait_for_ctrl_msg, ath6kl_htc_rx_process_hdr failed (status = %d)\n"
	.text
	.p2align 4
	.type	htc_wait_for_ctrl_msg, @function
htc_wait_for_ctrl_msg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	edx, DWORD PTR HTC_TARGET_RESPONSE_TIMEOUT[rip]
	mov	edi, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rsi, rsp
	call	ath6kl_hif_poll_mboxmsg_rx@PLT
	test	rax, rax
	jne	.L16
	mov	rdx, QWORD PTR [rsp]
	mov	edi, DWORD PTR ATH6KL_DBG_HTC[rip]
	lea	rsi, .LC0[rip]
	call	ath6kl_dbg@PLT
	mov	rax, QWORD PTR ENDPOINT_0[rip]
	cmp	QWORD PTR [rsp], rax
	jne	.L16
	xor	esi, esi
	mov	rdi, rbp
	call	htc_get_control_buf@PLT
	mov	r12, rax
	test	rax, rax
	je	.L16
	mov	QWORD PTR 48[rax], 0
	mov	rax, QWORD PTR [rsp]
	mov	edi, DWORD PTR 8[rsp]
	mov	QWORD PTR 40[r12], rax
	call	le16_to_cpu@PLT
	add	rax, QWORD PTR HTC_HDR_LENGTH[rip]
	mov	QWORD PTR [r12], rax
	mov	rdx, rax
	cmp	rax, QWORD PTR 8[r12]
	jg	.L6
	mov	QWORD PTR 32[r12], 0
	mov	rsi, r12
	mov	rdi, rbp
	call	ath6kl_htc_rx_packet@PLT
	test	rax, rax
	jne	.L6
	mov	edx, DWORD PTR 24[r12]
	mov	esi, DWORD PTR 28[r12]
	mov	rdi, QWORD PTR 16[r12]
	mov	rcx, QWORD PTR [r12]
	call	trace_ath6kl_htc_rx@PLT
	xor	ecx, ecx
	xor	edx, edx
	mov	rsi, r12
	mov	rdi, rbp
	call	ath6kl_htc_rx_process_hdr@PLT
	mov	QWORD PTR 16[r12], rax
	test	rax, rax
	je	.L1
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	call	ath6kl_err@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, r12
	call	htc_rxpkt_reset@PLT
	mov	rsi, r12
	mov	rdi, rbp
	call	reclaim_rx_ctrl_buf@PLT
.L16:
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	htc_wait_for_ctrl_msg, .-htc_wait_for_ctrl_msg
	.comm	HTC_TARGET_RESPONSE_TIMEOUT,4,4
	.comm	HTC_HDR_LENGTH,8,8
	.comm	ENDPOINT_0,8,8
	.comm	ATH6KL_DBG_HTC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_htc_mbox.c_htc_wait_for_ctrl_msg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"htc rx wait ctrl look_ahead 0x%X\012\000"
	.align	2
.LC1:
	.ascii	"htc_wait_for_ctrl_msg, ath6kl_htc_rx_process_hdr fa"
	.ascii	"iled (status = %d)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	htc_wait_for_ctrl_msg, %function
htc_wait_for_ctrl_msg:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L19
	sub	sp, sp, #8
	ldr	r2, [r3]
	ldr	r3, .L19+4
	mov	r5, r0
	mov	r1, sp
	ldr	r0, [r0]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	ath6kl_hif_poll_mboxmsg_rx
	subs	r6, r0, #0
	bne	.L16
	ldr	r3, .L19+8
	ldr	r2, [sp]
	ldr	r0, [r3]
	ldr	r1, .L19+12
	bl	ath6kl_dbg
	ldr	r3, .L19+16
	ldr	r2, [sp]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L16
	mov	r1, r6
	mov	r0, r5
	bl	htc_get_control_buf
	subs	r4, r0, #0
	beq	.L16
	ldr	r3, [sp]
	ldr	r0, [sp, #4]
	str	r3, [r4, #24]
	str	r6, [r4, #28]
	bl	le16_to_cpu
	ldr	r2, .L19+20
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	add	r2, r0, r2
	cmp	r2, r3
	str	r2, [r4]
	bgt	.L6
	str	r6, [r4, #20]
	mov	r1, r4
	mov	r0, r5
	bl	ath6kl_htc_rx_packet
	subs	r6, r0, #0
	bne	.L6
	ldr	r3, [r4]
	ldr	r2, [r4, #12]
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #8]
	bl	trace_ath6kl_htc_rx
	mov	r3, r6
	mov	r2, r6
	mov	r1, r4
	mov	r0, r5
	bl	ath6kl_htc_rx_process_hdr
	cmp	r0, #0
	str	r0, [r4, #8]
	beq	.L1
	mov	r1, r0
	ldr	r0, .L19+24
	bl	ath6kl_err
.L6:
	mov	r0, r4
	bl	htc_rxpkt_reset
	mov	r1, r4
	mov	r0, r5
	bl	reclaim_rx_ctrl_buf
.L16:
	mov	r4, #0
.L1:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	HTC_TARGET_RESPONSE_TIMEOUT
	.word	.LC2
	.word	ATH6KL_DBG_HTC
	.word	.LC0
	.word	ENDPOINT_0
	.word	HTC_HDR_LENGTH
	.word	.LC1
	.size	htc_wait_for_ctrl_msg, .-htc_wait_for_ctrl_msg
	.comm	HTC_TARGET_RESPONSE_TIMEOUT,4,4
	.comm	HTC_HDR_LENGTH,4,4
	.comm	ENDPOINT_0,4,4
	.comm	ATH6KL_DBG_HTC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
