	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nl80211_start_p2p_device
_nl80211_start_p2p_device:              ## @nl80211_start_p2p_device
	.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	(%rsi), %rax
	movq	(%rax), %r12
	movq	24(%r12), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	8(%rax), %r14
	movq	(%r14), %rax
	movq	_NL80211_IFTYPE_P2P_DEVICE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	xorl	%ebx, %ebx
	cmpl	$0, 8(%r14)
	jne	LBB0_7
## %bb.4:
	leaq	12(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_cfg80211_can_add_interface
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.5:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_rdev_start_p2p_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	$1, 8(%r14)
	movq	%r15, %rdi
	callq	_mutex_lock
	incl	16(%r12)
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_NL80211_IFTYPE_P2P_DEVICE,8,3  ## @NL80211_IFTYPE_P2P_DEVICE
	.no_dead_strip	_nl80211_start_p2p_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nl80211_start_p2p_device
_nl80211_start_p2p_device:              ; @nl80211_start_p2p_device
	.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
	ldr	x8, [x1]
	ldr	x19, [x8]
	ldr	x9, [x19, #24]
	ldr	w9, [x9]
	cbz	w9, LBB0_4
; %bb.1:
	ldr	x20, [x8, #8]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _NL80211_IFTYPE_P2P_DEVICE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_IFTYPE_P2P_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_6
; %bb.3:
	mov	w22, #0
	b	LBB0_5
LBB0_4:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	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
LBB0_6:
	add	x21, x19, #12
	mov	x0, x21
	bl	_mutex_lock
	ldr	x1, [x20]
	mov	x0, x19
	bl	_cfg80211_can_add_interface
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	cbnz	w22, LBB0_5
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_rdev_start_p2p_device
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.8:
	mov	w8, #1
	str	w8, [x20, #8]
	mov	x0, x21
	bl	_mutex_lock
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_NL80211_IFTYPE_P2P_DEVICE,8,3  ; @NL80211_IFTYPE_P2P_DEVICE
	.no_dead_strip	_nl80211_start_p2p_device
.subsections_via_symbols
