	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wcn36xx_smd_send_and_wait
_wcn36xx_smd_send_and_wait:             ## @wcn36xx_smd_send_and_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	%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	%rsi, %r12
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movl	(%r15), %r14d
	movq	_WCN36XX_DBG_SMD_DUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_wcn36xx_dbg_dump
	movq	%rbx, %rdi
	callq	_init_completion
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	16(%rbx), %edi
	movq	8(%rbx), %rsi
	movq	%r12, %rdx
	callq	_rpmsg_send
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_5
LBB0_2:
	movq	_HAL_MSG_TIMEOUT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	jle	LBB0_3
## %bb.4:
	movq	_WCN36XX_DBG_SMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r15), %r15d
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	subq	%r13, %rdi
	callq	_jiffies_to_msecs
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	callq	_wcn36xx_dbg
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_3:
	movl	(%r12), %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	movq	_ETIME@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WCN36XX_DBG_SMD_DUMP,4,2       ## @WCN36XX_DBG_SMD_DUMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HAL >>> "

	.comm	_jiffies,8,3                    ## @jiffies
L_.str.1:                               ## @.str.1
	.asciz	"HAL TX failed for req %d\n"

	.comm	_HAL_MSG_TIMEOUT,4,2            ## @HAL_MSG_TIMEOUT
L_.str.2:                               ## @.str.2
	.asciz	"Timeout! No SMD response to req %d in %dms\n"

	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_WCN36XX_DBG_SMD,4,2            ## @WCN36XX_DBG_SMD
L_.str.3:                               ## @.str.3
	.asciz	"SMD command (req %d, rsp %d) completed in %dms\n"

	.no_dead_strip	_wcn36xx_smd_send_and_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wcn36xx_smd_send_and_wait
_wcn36xx_smd_send_and_wait:             ; @wcn36xx_smd_send_and_wait
	.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	x22, x1
	mov	x21, x0
	ldr	x20, [x0, #8]
	ldr	w19, [x20]
Lloh0:
	adrp	x8, _WCN36XX_DBG_SMD_DUMP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WCN36XX_DBG_SMD_DUMP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x22
	bl	_wcn36xx_dbg_dump
	mov	x0, x21
	bl	_init_completion
Lloh5:
	adrp	x23, _jiffies@GOTPAGE
Lloh6:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x24, [x23]
	ldr	w0, [x21, #16]
	ldr	x1, [x21, #8]
	mov	x2, x22
	bl	_rpmsg_send
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_wcn36xx_err
	b	LBB0_5
LBB0_2:
Lloh9:
	adrp	x22, _HAL_MSG_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x22, [x22, _HAL_MSG_TIMEOUT@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cmp	x0, #0
	b.le	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _WCN36XX_DBG_SMD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WCN36XX_DBG_SMD@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	ldr	w20, [x20]
	ldr	x8, [x23]
	sub	x0, x8, x24
	bl	_jiffies_to_msecs
	mov	x4, x0
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	mov	x3, x20
	bl	_wcn36xx_dbg
	mov	w22, #0
	b	LBB0_5
LBB0_4:
	ldr	w8, [x22]
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_wcn36xx_err
Lloh18:
	adrp	x8, _ETIME@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	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	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_WCN36XX_DBG_SMD_DUMP,4,2       ; @WCN36XX_DBG_SMD_DUMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HAL >>> "

	.comm	_jiffies,8,3                    ; @jiffies
l_.str.1:                               ; @.str.1
	.asciz	"HAL TX failed for req %d\n"

	.comm	_HAL_MSG_TIMEOUT,4,2            ; @HAL_MSG_TIMEOUT
l_.str.2:                               ; @.str.2
	.asciz	"Timeout! No SMD response to req %d in %dms\n"

	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_WCN36XX_DBG_SMD,4,2            ; @WCN36XX_DBG_SMD
l_.str.3:                               ; @.str.3
	.asciz	"SMD command (req %d, rsp %d) completed in %dms\n"

	.no_dead_strip	_wcn36xx_smd_send_and_wait
.subsections_via_symbols
