	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_enable_hs              ## -- Begin function mwifiex_enable_hs
	.p2align	4, 0x90
_mwifiex_enable_hs:                     ## @mwifiex_enable_hs
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_disconnect_on_suspend@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.1:
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%esi, %esi
	callq	_mwifiex_deauthenticate
	movl	(%r12), %eax
	jmp	LBB0_5
LBB0_6:
	movq	_MWIFIEX_BSS_ROLE_STA@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_mwifiex_get_priv
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	%rax, %r14
	cmpq	$0, 8(%rax)
	je	LBB0_9
## %bb.8:
	movq	_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_mwifiex_dbg
	movq	%r14, %rdi
	callq	_mwifiex_stop_bg_scan
	movq	(%r14), %rdi
	xorl	%esi, %esi
	callq	_cfg80211_sched_scan_stopped
LBB0_9:
	cmpq	$0, 16(%r12)
	je	LBB0_11
## %bb.10:
	movq	_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_mwifiex_dbg
	movl	$1, %eax
	jmp	LBB0_16
LBB0_11:
	movl	$0, 4(%r12)
	leaq	-40(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	$1, -40(%rbp)
	movq	_MWIFIEX_IS_HS_ENABLING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r12), %rsi
	callq	_set_bit
	movq	%r12, %rdi
	callq	_mwifiex_cancel_all_pending_cmd
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_mwifiex_get_priv
	movq	_HostCmd_ACT_GEN_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_MWIFIEX_SYNC_CMD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movq	%r14, %rcx
	callq	_mwifiex_set_hs_params
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_15:
	movq	%r12, %rdi
	callq	_mwifiex_dbg
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_13:
	movl	4(%r12), %esi
	movl	8(%r12), %edi
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %edx
	callq	_wait_event_interruptible_timeout
	movq	%rax, %rcx
	movl	$1, %eax
	testq	%rcx, %rcx
	jle	LBB0_14
LBB0_16:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_disconnect_on_suspend,8,3      ## @disconnect_on_suspend
	.comm	_MWIFIEX_BSS_ROLE_STA,4,2       ## @MWIFIEX_BSS_ROLE_STA
	.comm	_CMD,4,2                        ## @CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aborting bgscan!\n"

L_.str.1:                               ## @.str.1
	.asciz	"cmd: HS Already activated\n"

	.comm	_MWIFIEX_IS_HS_ENABLING,4,2     ## @MWIFIEX_IS_HS_ENABLING
	.comm	_HostCmd_ACT_GEN_SET,4,2        ## @HostCmd_ACT_GEN_SET
	.comm	_MWIFIEX_SYNC_CMD,4,2           ## @MWIFIEX_SYNC_CMD
	.comm	_ERROR,4,2                      ## @ERROR
L_.str.2:                               ## @.str.2
	.asciz	"IOCTL request HS enable failed\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.3:                               ## @.str.3
	.asciz	"hs_activate_wait_q terminated\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_enable_hs              ; -- Begin function mwifiex_enable_hs
	.p2align	2
_mwifiex_enable_hs:                     ; @mwifiex_enable_hs
	.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	x19, x0
Lloh0:
	adrp	x8, _disconnect_on_suspend@GOTPAGE
Lloh1:
	ldr	x8, [x8, _disconnect_on_suspend@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x20, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #24]
	ldr	x0, [x9, x20, lsl #3]
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, #0
	bl	_mwifiex_deauthenticate
	ldr	w8, [x19]
	b	LBB0_3
LBB0_6:
Lloh3:
	adrp	x21, _MWIFIEX_BSS_ROLE_STA@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MWIFIEX_BSS_ROLE_STA@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mwifiex_get_priv
Lloh5:
	adrp	x22, _CMD@GOTPAGE
Lloh6:
	ldr	x22, [x22, _CMD@GOTPAGEOFF]
	cbz	x0, LBB0_9
; %bb.7:
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w1, [x22]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mwifiex_dbg
	mov	x0, x20
	bl	_mwifiex_stop_bg_scan
	ldr	x0, [x20]
	mov	w1, #0
	bl	_cfg80211_sched_scan_stopped
LBB0_9:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.10:
	ldr	w1, [x22]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mwifiex_dbg
LBB0_11:
	mov	w0, #1
	b	LBB0_15
LBB0_12:
	str	wzr, [x19, #4]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	w8, #1
	str	w8, [sp, #8]
Lloh11:
	adrp	x8, _MWIFIEX_IS_HS_ENABLING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MWIFIEX_IS_HS_ENABLING@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_set_bit
	mov	x0, x19
	bl	_mwifiex_cancel_all_pending_cmd
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mwifiex_get_priv
Lloh14:
	adrp	x8, _HostCmd_ACT_GEN_SET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HostCmd_ACT_GEN_SET@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _MWIFIEX_SYNC_CMD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MWIFIEX_SYNC_CMD@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	add	x3, sp, #8
	bl	_mwifiex_set_hs_params
	cbz	x0, LBB0_16
; %bb.13:
Lloh20:
	adrp	x8, _ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str.2@PAGE
Lloh24:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_mwifiex_dbg
	mov	w0, #0
LBB0_15:
	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
LBB0_16:
	ldp	w1, w0, [x19, #4]
Lloh25:
	adrp	x8, _HZ@GOTPAGE
Lloh26:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #2
	lsl	w2, w8, #1
	bl	_wait_event_interruptible_timeout
	cmp	x0, #0
	b.gt	LBB0_11
; %bb.17:
Lloh28:
	adrp	x8, _ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x2, l_.str.3@PAGE
Lloh32:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_disconnect_on_suspend,8,3      ; @disconnect_on_suspend
	.comm	_MWIFIEX_BSS_ROLE_STA,4,2       ; @MWIFIEX_BSS_ROLE_STA
	.comm	_CMD,4,2                        ; @CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aborting bgscan!\n"

l_.str.1:                               ; @.str.1
	.asciz	"cmd: HS Already activated\n"

	.comm	_MWIFIEX_IS_HS_ENABLING,4,2     ; @MWIFIEX_IS_HS_ENABLING
	.comm	_HostCmd_ACT_GEN_SET,4,2        ; @HostCmd_ACT_GEN_SET
	.comm	_MWIFIEX_SYNC_CMD,4,2           ; @MWIFIEX_SYNC_CMD
	.comm	_ERROR,4,2                      ; @ERROR
l_.str.2:                               ; @.str.2
	.asciz	"IOCTL request HS enable failed\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.3:                               ; @.str.3
	.asciz	"hs_activate_wait_q terminated\n"

.subsections_via_symbols
