	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_p2p_ifchange             ## -- Begin function brcmf_p2p_ifchange
	.p2align	4, 0x90
_brcmf_p2p_ifchange:                    ## @brcmf_p2p_ifchange
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	(%rdi), %r14
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcmf_dbg
	movq	16(%r12), %rax
	movq	_P2PAPI_BSSCFG_PRIMARY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_brcmf_notify_escan_complete
	movq	16(%r12), %rax
	movq	_P2PAPI_BSSCFG_CONNECTION@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r15
	testq	%r15, %r15
	je	LBB0_5
## %bb.2:
	leaq	8(%r12), %rbx
	movl	(%r15), %edi
	xorl	%esi, %esi
	callq	_brcmf_set_mpc
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_brcmf_p2p_get_current_chanspec
	movl	%r13d, %edi
	callq	_cpu_to_le16
	movq	%rax, -56(%rbp)
	movl	-44(%rbp), %edi
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
	movl	8(%r12), %esi
	movl	$4, %edx
	callq	_memcpy
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_brcmf_cfg80211_arm_vif_event
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	leaq	-72(%rbp), %rdx
	movl	$24, %ecx
	callq	_brcmf_fil_iovar_data_set
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_bphy_err
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_brcmf_cfg80211_arm_vif_event
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_bphy_err
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_BRCMF_E_IF_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BRCMF_VIF_EVENT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_brcmf_cfg80211_wait_vif_event
	movl	%eax, %r13d
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_brcmf_cfg80211_arm_vif_event
	testl	%r13d, %r13d
	je	LBB0_11
## %bb.10:
	movl	(%r15), %edi
	movq	_BRCMF_C_SET_SCB_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BRCMF_SCB_TIMEOUT_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_brcmf_fil_cmd_int_set
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_11:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_bphy_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_TRACE,4,2                      ## @TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter\n"

	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ## @P2PAPI_BSSCFG_PRIMARY
L_.str.1:                               ## @.str.1
	.asciz	"vif for P2PAPI_BSSCFG_PRIMARY does not exist\n"

	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_P2PAPI_BSSCFG_CONNECTION,8,3   ## @P2PAPI_BSSCFG_CONNECTION
L_.str.2:                               ## @.str.2
	.asciz	"vif for P2PAPI_BSSCFG_CONNECTION does not exist\n"

L_.str.3:                               ## @.str.3
	.asciz	"p2p_ifupd"

L_.str.4:                               ## @.str.4
	.asciz	"p2p_ifupd FAILED, err=%d\n"

	.comm	_BRCMF_E_IF_CHANGE,4,2          ## @BRCMF_E_IF_CHANGE
	.comm	_BRCMF_VIF_EVENT_TIMEOUT,4,2    ## @BRCMF_VIF_EVENT_TIMEOUT
L_.str.5:                               ## @.str.5
	.asciz	"No BRCMF_E_IF_CHANGE event received\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_BRCMF_C_SET_SCB_TIMEOUT,4,2    ## @BRCMF_C_SET_SCB_TIMEOUT
	.comm	_BRCMF_SCB_TIMEOUT_VALUE,4,2    ## @BRCMF_SCB_TIMEOUT_VALUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_brcmf_p2p_ifchange             ; -- Begin function brcmf_p2p_ifchange
	.p2align	2
_brcmf_p2p_ifchange:                    ; @brcmf_p2p_ifchange
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x1
	mov	x20, x0
	ldr	x19, [x0]
Lloh0:
	adrp	x8, _TRACE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRACE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	ldr	x8, [x20, #16]
Lloh5:
	adrp	x9, _P2PAPI_BSSCFG_PRIMARY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _P2PAPI_BSSCFG_PRIMARY@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	mov	w3, #1
	bl	_brcmf_notify_escan_complete
	ldr	x8, [x20, #16]
Lloh8:
	adrp	x9, _P2PAPI_BSSCFG_CONNECTION@GOTPAGE
Lloh9:
	ldr	x9, [x9, _P2PAPI_BSSCFG_CONNECTION@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	x21, [x8, x9, lsl #3]
	cbz	x21, LBB0_5
; %bb.2:
	add	x23, x20, #8
	ldr	w0, [x21]
	mov	w1, #0
	bl	_brcmf_set_mpc
	add	x1, sp, #20
	mov	x0, x23
	bl	_brcmf_p2p_get_current_chanspec
	mov	x0, x22
	bl	_cpu_to_le16
	str	x0, [sp, #40]
	ldr	w0, [sp, #20]
	bl	_cpu_to_le16
	str	x0, [sp, #32]
	ldr	w1, [x20, #8]
	mov	w2, #4
	bl	_memcpy
	mov	x0, x20
	mov	x1, x21
	bl	_brcmf_cfg80211_arm_vif_event
	ldr	w0, [x21]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #24
	mov	w3, #24
	bl	_brcmf_fil_iovar_data_set
	cbz	w0, LBB0_9
; %bb.3:
	mov	x22, x0
	str	x22, [sp]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_bphy_err
	mov	x0, x20
	mov	x1, #0
	bl	_brcmf_cfg80211_arm_vif_event
	b	LBB0_8
LBB0_4:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_bphy_err
Lloh19:
	adrp	x8, _EPERM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
Lloh21:
	adrp	x8, _BRCMF_E_IF_CHANGE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BRCMF_E_IF_CHANGE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _BRCMF_VIF_EVENT_TIMEOUT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BRCMF_VIF_EVENT_TIMEOUT@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_brcmf_cfg80211_wait_vif_event
	mov	x22, x0
	mov	x0, x20
	mov	x1, #0
	bl	_brcmf_cfg80211_arm_vif_event
	cbz	w22, LBB0_11
; %bb.10:
	ldr	w0, [x21]
Lloh27:
	adrp	x8, _BRCMF_C_SET_SCB_TIMEOUT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _BRCMF_C_SET_SCB_TIMEOUT@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _BRCMF_SCB_TIMEOUT_VALUE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _BRCMF_SCB_TIMEOUT_VALUE@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	bl	_brcmf_fil_cmd_int_set
	mov	x22, x0
	b	LBB0_8
LBB0_11:
Lloh33:
	adrp	x1, l_.str.5@PAGE
Lloh34:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_bphy_err
Lloh35:
	adrp	x8, _EIO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_TRACE,4,2                      ; @TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter\n"

	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ; @P2PAPI_BSSCFG_PRIMARY
l_.str.1:                               ; @.str.1
	.asciz	"vif for P2PAPI_BSSCFG_PRIMARY does not exist\n"

	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_P2PAPI_BSSCFG_CONNECTION,8,3   ; @P2PAPI_BSSCFG_CONNECTION
l_.str.2:                               ; @.str.2
	.asciz	"vif for P2PAPI_BSSCFG_CONNECTION does not exist\n"

l_.str.3:                               ; @.str.3
	.asciz	"p2p_ifupd"

l_.str.4:                               ; @.str.4
	.asciz	"p2p_ifupd FAILED, err=%d\n"

	.comm	_BRCMF_E_IF_CHANGE,4,2          ; @BRCMF_E_IF_CHANGE
	.comm	_BRCMF_VIF_EVENT_TIMEOUT,4,2    ; @BRCMF_VIF_EVENT_TIMEOUT
l_.str.5:                               ; @.str.5
	.asciz	"No BRCMF_E_IF_CHANGE event received\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_BRCMF_C_SET_SCB_TIMEOUT,4,2    ; @BRCMF_C_SET_SCB_TIMEOUT
	.comm	_BRCMF_SCB_TIMEOUT_VALUE,4,2    ; @BRCMF_SCB_TIMEOUT_VALUE
.subsections_via_symbols
