	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mwifiex_change_vif_to_sta_adhoc
_mwifiex_change_vif_to_sta_adhoc:       ## @mwifiex_change_vif_to_sta_adhoc
	.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
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_mwifiex_netdev_get_priv
	movl	$-1, %r13d
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%rax, %r14
	movq	%r12, %rax
	movq	(%r14), %r12
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $eax killed $eax killed $rax
	andl	$-2, %eax
	cmpl	$128, %eax
	je	LBB0_4
## %bb.2:
	movq	(%r12), %rax
	cmpq	16(%r12), %rax
	jne	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mwifiex_dbg
	jmp	LBB0_15
LBB0_4:
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rax
	movl	%ebx, %r13d
	cmpl	%ebx, (%rax)
	movq	_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %ecx
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mwifiex_dbg
	movq	%r14, %rdi
	callq	_mwifiex_deinit_priv_params
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_mwifiex_init_new_priv_params
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:
	movl	$-1, %r13d
LBB0_15:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_HostCmd_CMD_SET_BSS_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HostCmd_ACT_GEN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_mwifiex_send_cmd
	testq	%rax, %rax
	movl	$-1, %r13d
	jne	LBB0_15
## %bb.9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_mwifiex_sta_init_cmd
	testq	%rax, %rax
	jne	LBB0_15
## %bb.10:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leal	-128(%rcx), %eax
	cmpl	$2, %eax
	jae	LBB0_12
## %bb.11:
	decl	12(%r12)
	jmp	LBB0_14
LBB0_12:
	cmpl	$130, %ecx
	jne	LBB0_14
## %bb.13:
	decl	8(%r12)
LBB0_14:
	incq	(%r12)
	movq	(%r15), %rax
	movl	%ebx, (%rax)
	xorl	%r13d, %r13d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot create multiple station/adhoc ifaces\n"

	.comm	_NL80211_IFTYPE_STATION,4,2     ## @NL80211_IFTYPE_STATION
	.comm	_INFO,4,2                       ## @INFO
L_.str.1:                               ## @.str.1
	.asciz	"%s: changing role to station\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: changing role to adhoc\n"

	.comm	_HostCmd_CMD_SET_BSS_MODE,4,2   ## @HostCmd_CMD_SET_BSS_MODE
	.comm	_HostCmd_ACT_GEN_SET,4,2        ## @HostCmd_ACT_GEN_SET
	.no_dead_strip	_mwifiex_change_vif_to_sta_adhoc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mwifiex_change_vif_to_sta_adhoc
_mwifiex_change_vif_to_sta_adhoc:       ; @mwifiex_change_vif_to_sta_adhoc
	.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	x19, x2
	mov	x22, x1
	mov	x20, x0
	bl	_mwifiex_netdev_get_priv
	cbz	x0, LBB0_8
; %bb.1:
	mov	x23, x0
	ldr	x21, [x0]
	and	w8, w22, #0xfffffffe
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x21]
	ldr	x9, [x21, #16]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_mwifiex_dbg
	mov	w0, #-1
	b	LBB0_9
LBB0_4:
Lloh5:
	adrp	x8, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _INFO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INFO@GOTPAGEOFF]
Lloh10:
	adrp	x10, l_.str.2@PAGE
Lloh11:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh12:
	ldr	w1, [x9]
Lloh13:
	adrp	x9, l_.str.1@PAGE
Lloh14:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w8, w19
	csel	x2, x9, x10, eq
	ldr	w8, [x20, #8]
	str	x8, [sp]
	mov	x0, x21
	bl	_mwifiex_dbg
	mov	x0, x23
	bl	_mwifiex_deinit_priv_params
	cbnz	x0, LBB0_8
; %bb.5:
	mov	x0, x23
	mov	x1, x20
	mov	x2, x19
	bl	_mwifiex_init_new_priv_params
	cbnz	x0, LBB0_8
; %bb.6:
Lloh15:
	adrp	x8, _HostCmd_CMD_SET_BSS_MODE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HostCmd_CMD_SET_BSS_MODE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _HostCmd_ACT_GEN_SET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HostCmd_ACT_GEN_SET@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x23
	mov	w3, #0
	mov	x4, #0
	mov	w5, #1
	bl	_mwifiex_send_cmd
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x23
	mov	w1, #0
	mov	w2, #0
	bl	_mwifiex_sta_init_cmd
	cbz	x0, LBB0_10
LBB0_8:
	mov	w0, #-1
LBB0_9:
	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
LBB0_10:
	sub	w8, w22, #128
	cmp	w8, #2
	b.hs	LBB0_12
; %bb.11:
	ldr	w8, [x21, #12]
	sub	w8, w8, #1
	str	w8, [x21, #12]
	b	LBB0_14
LBB0_12:
	cmp	w22, #130
	b.ne	LBB0_14
; %bb.13:
	ldr	w8, [x21, #8]
	sub	w8, w8, #1
	str	w8, [x21, #8]
LBB0_14:
	mov	w0, #0
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	ldr	x8, [x20]
	str	w19, [x8]
	b	LBB0_9
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot create multiple station/adhoc ifaces\n"

	.comm	_NL80211_IFTYPE_STATION,4,2     ; @NL80211_IFTYPE_STATION
	.comm	_INFO,4,2                       ; @INFO
l_.str.1:                               ; @.str.1
	.asciz	"%s: changing role to station\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: changing role to adhoc\n"

	.comm	_HostCmd_CMD_SET_BSS_MODE,4,2   ; @HostCmd_CMD_SET_BSS_MODE
	.comm	_HostCmd_ACT_GEN_SET,4,2        ; @HostCmd_ACT_GEN_SET
	.no_dead_strip	_mwifiex_change_vif_to_sta_adhoc
.subsections_via_symbols
