	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpas_p2p_invite                ## -- Begin function wpas_p2p_invite
	.p2align	4, 0x90
_wpas_p2p_invite:                       ## @wpas_p2p_invite
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rsp, -104(%rbp)                ## 8-byte Spill
	movl	40(%rbp), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -60(%rbp)
	movq	_P2P_MAX_PREF_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	32(%rbx), %rax
	movq	$0, 16(%rax)
	movl	80(%rbx), %edi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	movq	%r15, %r14
	movq	%r15, %rsi
	callq	_os_memcpy
	jmp	LBB0_3
LBB0_2:
	movq	%r15, %r14
	xorl	%esi, %esi
	callq	_os_memset
LBB0_3:
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, (%rbx)
	xorl	%eax, %eax
	cmpl	$0, 16(%rbp)
	setne	%al
	movl	%eax, 4(%rbx)
	xorl	%eax, %eax
	cmpl	$0, 24(%rbp)
	setne	%al
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	cmpl	$0, 48(%rbp)
	setne	%al
	movl	%eax, 12(%rbx)
	movl	32(%rbp), %eax
	movl	%eax, 16(%rbx)
	movl	%r13d, 20(%rbx)
	movq	(%r12), %rax
	movq	_WPAS_MODE_P2P_GO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.4:
	testq	%r14, %r14
	je	LBB0_5
## %bb.7:
	movq	%r14, %r15
	movq	_P2P_INVITE_ROLE_GO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_wpas_p2p_create_iface
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	_WPA_IF_P2P_GO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wpas_p2p_add_group_interface
	testq	%rax, %rax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	js	LBB0_9
## %bb.10:
	movq	72(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_15
LBB0_14:
	movq	_P2P_INVITE_ROLE_CLIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	24(%r12), %r15
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r14                 ## 8-byte Reload
LBB0_15:
	movl	16(%r12), %eax
	movl	%eax, 48(%rbx)
	movq	_P2P_MAX_PREF_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_P2P_INVITE_ROLE_GO@GOTPCREL(%rip), %rax
	xorl	%r8d, %r8d
	cmpl	(%rax), %r13d
	sete	%r8b
	subq	$8, %rsp
	leaq	-56(%rbp), %rax
	leaq	-60(%rbp), %rdx
	leaq	40(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r14, %r9
	pushq	%rax
	callq	_wpas_p2p_setup_freqs
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_25
## %bb.16:
	movq	32(%rbx), %rcx
	movl	$-1, %eax
	cmpq	$0, 8(%rcx)
	jne	LBB0_25
## %bb.17:
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.18:
	movl	-56(%rbp), %edx
	movq	%r14, %rsi
	callq	_p2p_set_own_pref_freq_list
	cmpl	$0, -84(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_24
## %bb.19:
	movq	40(%rbx), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_24
## %bb.20:
	cmpl	$0, 40(%rbp)
	jle	LBB0_24
## %bb.21:
	cmpl	$2, 24(%rbx)
	jl	LBB0_24
## %bb.22:
	movq	%rbx, %rdi
	callq	_wpas_p2p_num_unused_channels
	testq	%rax, %rax
	jle	LBB0_24
## %bb.23:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	40(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$0, 40(%rbp)
LBB0_24:
	movq	%rbx, %rdi
	callq	_wpas_p2p_stop_find_oper
	movq	32(%rbx), %rax
	movq	(%rax), %rdi
	movl	8(%r12), %r9d
	movl	12(%r12), %r8d
	movl	-60(%rbp), %eax
	movl	40(%rbp), %ebx
	subq	$8, %rsp
	movq	%r15, %rsi
	movl	%r13d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	pushq	$-1
	pushq	%rbx
	pushq	$1
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	callq	_p2p_invite
	addq	$48, %rsp
	jmp	LBB0_25
LBB0_5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_11:
	cmpq	$0, 64(%rbx)
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_13
## %bb.12:
	movq	40(%rbx), %rax
	movq	8(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_15
LBB0_9:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %eax
LBB0_25:
	movq	-104(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_27
## %bb.26:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	56(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_15
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_P2P_MAX_PREF_CHANNELS,4,2      ## @P2P_MAX_PREF_CHANNELS
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WPAS_MODE_P2P_GO,8,3           ## @WPAS_MODE_P2P_GO
	.comm	_P2P_INVITE_ROLE_GO,4,2         ## @P2P_INVITE_ROLE_GO
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"P2P: Missing peer address in invitation command"

	.comm	_WPA_IF_P2P_GO,4,2              ## @WPA_IF_P2P_GO
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"P2P: Failed to allocate a new interface for the group"

	.comm	_P2P_INVITE_ROLE_CLIENT,4,2     ## @P2P_INVITE_ROLE_CLIENT
L_.str.2:                               ## @.str.2
	.asciz	"P2P: Ignore own channel preference %d MHz for invitation due to p2p_ignore_shared_freq=1 configuration"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpas_p2p_invite                ; -- Begin function wpas_p2p_invite
	.p2align	2
_wpas_p2p_invite:                       ; @wpas_p2p_invite
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #48
	mov	x26, x7
	mov	x27, x6
	mov	x23, x5
	mov	x24, x4
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	mov	x8, sp
	stp	x3, x8, [x29, #-112]            ; 16-byte Folded Spill
	ldp	w8, w19, [x29, #20]
	stur	w8, [x29, #-116]                ; 4-byte Folded Spill
	ldr	w28, [x29, #16]
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	stur	wzr, [x29, #-92]
Lloh3:
	adrp	x8, _P2P_MAX_PREF_CHANNELS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _P2P_MAX_PREF_CHANNELS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x25, x9, x8
	mov	sp, x25
	ldr	x8, [x0, #32]
	str	xzr, [x8, #16]
	ldr	w0, [x0, #80]
Lloh8:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x1, x20
	bl	_os_memcpy
	b	LBB0_3
LBB0_2:
	bl	_os_memset
LBB0_3:
	cmp	w27, #0
	cset	w8, ne
	stp	w24, w8, [x22]
	cmp	w26, #0
	cset	w8, ne
	cmp	w19, #0
	cset	w9, ne
	stp	w8, w9, [x22, #8]
	stp	w28, w23, [x22, #16]
	ldr	x8, [x21]
Lloh11:
	adrp	x9, _WPAS_MODE_P2P_GO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WPAS_MODE_P2P_GO@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
Lloh14:
	adrp	x27, _P2P_INVITE_ROLE_GO@GOTPAGE
Lloh15:
	ldr	x27, [x27, _P2P_INVITE_ROLE_GO@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	cbz	x20, LBB0_19
; %bb.5:
	ldr	w23, [x27]
	mov	x0, x22
	bl	_wpas_p2p_create_iface
	cbz	x0, LBB0_20
; %bb.6:
Lloh16:
	adrp	x8, _WPA_IF_P2P_GO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WPA_IF_P2P_GO@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_wpas_p2p_add_group_interface
	tbnz	x0, #63, LBB0_22
; %bb.7:
	ldr	x26, [x22, #72]
	b	LBB0_9
LBB0_8:
	mov	x26, #0
Lloh19:
	adrp	x8, _P2P_INVITE_ROLE_CLIENT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _P2P_INVITE_ROLE_CLIENT@GOTPAGEOFF]
Lloh21:
	ldr	w23, [x8]
	ldr	x20, [x21, #24]
LBB0_9:
	ldr	w8, [x21, #16]
	str	w8, [x22, #48]
Lloh22:
	adrp	x8, _P2P_MAX_PREF_CHANNELS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _P2P_MAX_PREF_CHANNELS@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	stur	w8, [x29, #-96]
	ldr	w8, [x27]
	cmp	w23, w8
	cset	w4, eq
	sub	x2, x29, #92
	add	x3, x29, #20
	sub	x6, x29, #96
	mov	x0, x22
	mov	x1, x24
	mov	x5, x25
	bl	_wpas_p2p_setup_freqs
	cbnz	w0, LBB0_25
; %bb.10:
	ldr	x8, [x22, #32]
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_24
; %bb.11:
	ldr	x0, [x8]
	cbz	x0, LBB0_24
; %bb.12:
	ldur	w2, [x29, #-96]
	mov	x1, x25
	bl	_p2p_set_own_pref_freq_list
	ldur	w8, [x29, #-116]                ; 4-byte Folded Reload
	cbnz	w8, LBB0_18
; %bb.13:
	ldr	x8, [x22, #40]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.14:
	ldr	w8, [x29, #20]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.15:
	ldr	w8, [x22, #24]
	cmp	w8, #2
	b.lt	LBB0_18
; %bb.16:
	mov	x0, x22
	bl	_wpas_p2p_num_unused_channels
	cmp	x0, #1
	b.lt	LBB0_18
; %bb.17:
Lloh25:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldr	w8, [x29, #20]
	str	x8, [sp, #-16]!
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	add	sp, sp, #16
	str	wzr, [x29, #20]
LBB0_18:
	mov	x0, x22
	bl	_wpas_p2p_stop_find_oper
	ldr	x8, [x22, #32]
	ldr	x0, [x8]
	ldp	w5, w4, [x21, #8]
	ldur	w6, [x29, #-92]
	ldr	w8, [x29, #20]
	sub	sp, sp, #16
	mov	w9, #-1
	stp	w8, w9, [sp, #4]
	mov	w9, #1
	str	w9, [sp]
	mov	x1, x20
	mov	x2, x23
	mov	x3, x26
	ldur	x7, [x29, #-112]                ; 8-byte Folded Reload
	bl	_p2p_invite
	add	sp, sp, #16
	b	LBB0_25
LBB0_19:
Lloh30:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_23
LBB0_20:
	ldr	x8, [x22, #64]
	cbz	x8, LBB0_27
; %bb.21:
	ldr	x8, [x22, #40]
	ldr	x26, [x8, #8]
	b	LBB0_9
LBB0_22:
Lloh35:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
Lloh38:
	adrp	x1, l_.str.1@PAGE
Lloh39:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_23:
	bl	_wpa_printf
LBB0_24:
	mov	w0, #-1
LBB0_25:
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	mov	sp, x8
	ldur	x8, [x29, #-88]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.26:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_27:
	ldr	x26, [x22, #56]
	b	LBB0_9
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_P2P_MAX_PREF_CHANNELS,4,2      ; @P2P_MAX_PREF_CHANNELS
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WPAS_MODE_P2P_GO,8,3           ; @WPAS_MODE_P2P_GO
	.comm	_P2P_INVITE_ROLE_GO,4,2         ; @P2P_INVITE_ROLE_GO
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P2P: Missing peer address in invitation command"

	.comm	_WPA_IF_P2P_GO,4,2              ; @WPA_IF_P2P_GO
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"P2P: Failed to allocate a new interface for the group"

	.comm	_P2P_INVITE_ROLE_CLIENT,4,2     ; @P2P_INVITE_ROLE_CLIENT
l_.str.2:                               ; @.str.2
	.asciz	"P2P: Ignore own channel preference %d MHz for invitation due to p2p_ignore_shared_freq=1 configuration"

.subsections_via_symbols
