	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_p2p_attach               ## -- Begin function brcmf_p2p_attach
	.p2align	4, 0x90
_brcmf_p2p_attach:                      ## @brcmf_p2p_attach
	.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
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	leaq	8(%rdi), %r15
	movq	%rdi, 24(%rdi)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_brcmf_get_ifp
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	movq	_P2PAPI_BSSCFG_PRIMARY@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_brcmf_p2p_create_p2pdev
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_bphy_err
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movl	$1, (%r15)
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ## @P2PAPI_BSSCFG_PRIMARY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"P2P device creation failed.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_p2p_attach               ; -- Begin function brcmf_p2p_attach
	.p2align	2
_brcmf_p2p_attach:                      ; @brcmf_p2p_attach
	.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	x21, x1
	mov	x22, x0
	ldr	x19, [x0]
	add	x20, x0, #8
	str	x0, [x0, #24]
	mov	x0, x19
	mov	w1, #0
	bl	_brcmf_get_ifp
	ldr	w8, [x0]
	ldr	x9, [x22, #16]
Lloh0:
	adrp	x10, _P2PAPI_BSSCFG_PRIMARY@GOTPAGE
Lloh1:
	ldr	x10, [x10, _P2PAPI_BSSCFG_PRIMARY@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
	cbz	w21, LBB0_3
; %bb.1:
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	bl	_brcmf_p2p_create_p2pdev
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_bphy_err
	mov	x0, x20
	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
	b	_PTR_ERR
LBB0_3:
	mov	w8, #1
	str	w8, [x20]
LBB0_4:
	mov	w0, #0
	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 AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ; @P2PAPI_BSSCFG_PRIMARY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P2P device creation failed.\n"

.subsections_via_symbols
