	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_stop_bg_scan           ## -- Begin function mwifiex_stop_bg_scan
	.p2align	4, 0x90
_mwifiex_stop_bg_scan:                  ## @mwifiex_stop_bg_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	_MWIFIEX_BSS_MODE_INFRA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_MWIFIEX_BGSCAN_ACT_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	$0, (%rbx)
	movq	_HostCmd_CMD_802_11_BG_SCAN_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HostCmd_ACT_GEN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	movl	$1, %r9d
	callq	_mwifiex_send_cmd
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_kfree
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_1:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_6:
	movl	$0, (%r14)
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bgscan already stopped!\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MWIFIEX_BSS_MODE_INFRA,4,2     ## @MWIFIEX_BSS_MODE_INFRA
	.comm	_MWIFIEX_BGSCAN_ACT_SET,4,2     ## @MWIFIEX_BGSCAN_ACT_SET
	.comm	_HostCmd_CMD_802_11_BG_SCAN_CONFIG,4,2 ## @HostCmd_CMD_802_11_BG_SCAN_CONFIG
	.comm	_HostCmd_ACT_GEN_SET,4,2        ## @HostCmd_ACT_GEN_SET
	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_stop_bg_scan           ; -- Begin function mwifiex_stop_bg_scan
	.p2align	2
_mwifiex_stop_bg_scan:                  ; @mwifiex_stop_bg_scan
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
Lloh3:
	adrp	x8, _MWIFIEX_BSS_MODE_INFRA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MWIFIEX_BSS_MODE_INFRA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #8]
Lloh6:
	adrp	x8, _MWIFIEX_BGSCAN_ACT_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MWIFIEX_BGSCAN_ACT_SET@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	wzr, w8, [x0]
Lloh9:
	adrp	x8, _HostCmd_CMD_802_11_BG_SCAN_CONFIG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HostCmd_CMD_802_11_BG_SCAN_CONFIG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _HostCmd_ACT_GEN_SET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HostCmd_ACT_GEN_SET@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	x4, x20
	mov	w5, #1
	bl	_mwifiex_send_cmd
	mov	x21, x0
	mov	x0, x20
	bl	_kfree
	cbz	x21, LBB0_7
; %bb.3:
Lloh15:
	adrp	x8, _EFAULT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
	str	wzr, [x19]
LBB0_8:
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bgscan already stopped!\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MWIFIEX_BSS_MODE_INFRA,4,2     ; @MWIFIEX_BSS_MODE_INFRA
	.comm	_MWIFIEX_BGSCAN_ACT_SET,4,2     ; @MWIFIEX_BGSCAN_ACT_SET
	.comm	_HostCmd_CMD_802_11_BG_SCAN_CONFIG,4,2 ; @HostCmd_CMD_802_11_BG_SCAN_CONFIG
	.comm	_HostCmd_ACT_GEN_SET,4,2        ; @HostCmd_ACT_GEN_SET
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
