	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl12xx_start_dev               ## -- Begin function wl12xx_start_dev
	.p2align	4, 0x90
_wl12xx_start_dev:                      ## @wl12xx_start_dev
	.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, %r13
	movq	(%rsi), %rax
	movq	_BSS_TYPE_STA_BSS@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	setne	%bl
	movq	_BSS_TYPE_IBSS@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	%rdi, %r14
	setne	%al
	andb	%bl, %al
	movzbl	%al, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r13, %rdi
	callq	_wlcore_is_p2p_mgmt
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	%r13, %rdi
	callq	_wl12xx_wlvif_to_vif
	movl	(%rax), %esi
	movq	_WL1271_ROLE_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	8(%r13), %rcx
	movq	%r14, %rdi
	callq	_wl12xx_cmd_role_enable
	testl	%eax, %eax
	js	LBB0_4
LBB0_5:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_wl12xx_cmd_role_start_dev
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	8(%r13), %edx
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	callq	_wl12xx_roc
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.8:
	movl	%eax, %r15d
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_wl12xx_cmd_role_stop_dev
	movl	%r15d, %ebx
	jmp	LBB0_9
LBB0_6:
	movl	%eax, %ebx
LBB0_9:
	movq	%r13, %rdi
	callq	_wlcore_is_p2p_mgmt
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	addq	$8, %r13
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_wl12xx_cmd_role_disable
	jmp	LBB0_11
LBB0_4:
	movl	%eax, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_BSS_TYPE_STA_BSS,8,3           ## @BSS_TYPE_STA_BSS
	.comm	_BSS_TYPE_IBSS,8,3              ## @BSS_TYPE_IBSS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WL1271_ROLE_DEVICE,4,2         ## @WL1271_ROLE_DEVICE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl12xx_start_dev               ; -- Begin function wl12xx_start_dev
	.p2align	2
_wl12xx_start_dev:                      ; @wl12xx_start_dev
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _BSS_TYPE_STA_BSS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BSS_TYPE_STA_BSS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x9, _BSS_TYPE_IBSS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BSS_TYPE_IBSS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, ne
	bl	_WARN_ON
	cbz	x0, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_2:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x20
	bl	_wlcore_is_p2p_mgmt
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_wl12xx_wlvif_to_vif
	ldr	w1, [x0]
Lloh9:
	adrp	x8, _WL1271_ROLE_DEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WL1271_ROLE_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x3, x20, #8
	mov	x0, x19
	bl	_wl12xx_cmd_role_enable
	tbnz	w0, #31, LBB0_12
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	_wl12xx_cmd_role_start_dev
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldr	w2, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x22
	mov	x4, x21
	bl	_wl12xx_roc
	tbnz	w0, #31, LBB0_9
; %bb.7:
	mov	w23, #0
	b	LBB0_2
LBB0_8:
	mov	x23, x0
	b	LBB0_10
LBB0_9:
	mov	x23, x0
	mov	x0, x19
	mov	x1, x20
	bl	_wl12xx_cmd_role_stop_dev
LBB0_10:
	mov	x0, x20
	bl	_wlcore_is_p2p_mgmt
	cbnz	w0, LBB0_2
; %bb.11:
	add	x1, x20, #8
	mov	x0, x19
	bl	_wl12xx_cmd_role_disable
	b	LBB0_2
LBB0_12:
	mov	x23, x0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BSS_TYPE_STA_BSS,8,3           ; @BSS_TYPE_STA_BSS
	.comm	_BSS_TYPE_IBSS,8,3              ; @BSS_TYPE_IBSS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WL1271_ROLE_DEVICE,4,2         ; @WL1271_ROLE_DEVICE
.subsections_via_symbols
