	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wcn36xx_smd_start_scan         ## -- Begin function wcn36xx_smd_start_scan
	.p2align	4, 0x90
_wcn36xx_smd_start_scan:                ## @wcn36xx_smd_start_scan
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_mutex_lock
	movq	_WCN36XX_HAL_START_SCAN_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rbx
	shlq	$32, %rbx
	movq	%rbx, %rdi
	callq	_INIT_HAL_MSG
	movl	8(%r14), %edi
	movq	%rbx, %rsi
	callq	_PREPARE_HAL_BUF
	movq	_WCN36XX_DBG_HAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_wcn36xx_dbg
	movq	%r14, %rdi
	callq	_wcn36xx_smd_send_and_wait
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_5
LBB0_2:
	movl	4(%r14), %esi
	movl	8(%r14), %edi
	callq	_wcn36xx_smd_rsp_status_check
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WCN36XX_HAL_START_SCAN_REQ,4,2 ## @WCN36XX_HAL_START_SCAN_REQ
	.comm	_WCN36XX_DBG_HAL,4,2            ## @WCN36XX_DBG_HAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hal start scan channel %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Sending hal_start_scan failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"hal_start_scan response failed err=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wcn36xx_smd_start_scan         ; -- Begin function wcn36xx_smd_start_scan
	.p2align	2
_wcn36xx_smd_start_scan:                ; @wcn36xx_smd_start_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x8, _WCN36XX_HAL_START_SCAN_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WCN36XX_HAL_START_SCAN_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	lsl	x21, x20, #32
	mov	x0, x21
	bl	_INIT_HAL_MSG
	ldr	w0, [x19, #8]
	mov	x1, x21
	bl	_PREPARE_HAL_BUF
Lloh3:
	adrp	x8, _WCN36XX_DBG_HAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WCN36XX_DBG_HAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_wcn36xx_dbg
	mov	x0, x19
	bl	_wcn36xx_smd_send_and_wait
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldp	w1, w0, [x19, #4]
	bl	_wcn36xx_smd_rsp_status_check
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.3:
	str	x20, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_4:
	bl	_wcn36xx_err
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_WCN36XX_HAL_START_SCAN_REQ,4,2 ; @WCN36XX_HAL_START_SCAN_REQ
	.comm	_WCN36XX_DBG_HAL,4,2            ; @WCN36XX_DBG_HAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hal start scan channel %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Sending hal_start_scan failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"hal_start_scan response failed err=%d\n"

.subsections_via_symbols
