	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpas_start_p2p_client
_wpas_start_p2p_client:                 ## @wpas_start_p2p_client
	.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
	movl	%r8d, %r15d
	movl	%ecx, %r14d
	movq	%rsi, %r13
	movl	%edx, %esi
	xorl	%edx, %edx
	callq	_wpas_p2p_get_group_iface
	movl	$-1, %r12d
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%rax, %rbx
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	addq	$48, %rdi
	callq	_os_get_reltime
LBB0_3:
	movq	$0, 40(%rbx)
	movq	%rbx, %rdi
	callq	_wpa_supplicant_ap_deinit
	movl	32(%rbx), %edi
	callq	_wpa_config_add_network
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movq	%rax, %r15
	movl	36(%rbx), %edi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_os_memset
	movq	%r15, %rdi
	callq	_wpa_config_set_network_defaults
	movl	$1, (%r15)
	movq	_WPA_PROTO_RSN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%r15)
	movq	56(%r13), %rax
	movq	%rax, 56(%r15)
	cmpq	$0, 56(%r13)
	jne	LBB0_5
## %bb.6:
	movq	_WPA_CIPHER_CCMP@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_WPA_CIPHER_GCMP@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %rax
	movq	%rax, 72(%r15)
	movq	%rax, 64(%r15)
	movq	_WPA_KEY_MGMT_PSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r15)
	movl	4(%r13), %edi
	callq	_os_malloc
	movq	%rax, 40(%r15)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	40(%r13), %rsi
	movl	4(%r13), %edx
	movq	%rax, %rdi
	callq	_os_memcpy
	movl	4(%r13), %eax
	movl	%eax, 4(%r15)
	movabsq	$4294967297, %r12               ## imm = 0x100000001
	movq	%r12, 8(%r15)
	cmpl	$0, 16(%r13)
	je	LBB0_11
## %bb.10:
	movq	32(%r15), %rdi
	movq	32(%r13), %rsi
	movl	$32, %edx
	callq	_os_memcpy
	movl	$1, 16(%r15)
LBB0_11:
	movq	24(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_os_strdup
	movq	%rax, 24(%r15)
LBB0_13:
	movq	%r12, (%rbx)
	movl	%r14d, 8(%rbx)
	movq	$0, 24(%rbx)
	movq	16(%rbx), %rax
	movq	%rbx, (%rax)
	movq	_wpas_p2p_group_formation_timeout@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	12(%rbx), %esi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	callq	_eloop_cancel_timeout
	movq	_P2P_MAX_INITIAL_CONN_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	movl	12(%rbx), %ecx
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_eloop_register_timeout
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_wpa_supplicant_select_network
	jmp	LBB0_14
LBB0_8:
	movl	32(%rbx), %edi
	movl	48(%r15), %esi
	callq	_wpa_config_remove_network
LBB0_14:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WPA_PROTO_RSN,4,2              ## @WPA_PROTO_RSN
	.comm	_WPA_CIPHER_GCMP,8,3            ## @WPA_CIPHER_GCMP
	.comm	_WPA_CIPHER_CCMP,8,3            ## @WPA_CIPHER_CCMP
	.comm	_WPA_KEY_MGMT_PSK,4,2           ## @WPA_KEY_MGMT_PSK
	.comm	_wpas_p2p_group_formation_timeout,4,2 ## @wpas_p2p_group_formation_timeout
	.comm	_P2P_MAX_INITIAL_CONN_WAIT,4,2  ## @P2P_MAX_INITIAL_CONN_WAIT
	.no_dead_strip	_wpas_start_p2p_client
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpas_start_p2p_client
_wpas_start_p2p_client:                 ; @wpas_start_p2p_client
	.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, x4
	mov	x20, x3
	mov	x22, x1
	mov	x1, x2
	mov	w2, #0
	bl	_wpas_p2p_get_group_iface
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	cbz	w21, LBB0_3
; %bb.2:
	add	x0, x19, #48
	bl	_os_get_reltime
LBB0_3:
	str	xzr, [x19, #40]
	mov	x0, x19
	bl	_wpa_supplicant_ap_deinit
	ldr	w0, [x19, #32]
	bl	_wpa_config_add_network
	cbz	x0, LBB0_11
; %bb.4:
	mov	x21, x0
	ldr	w0, [x19, #36]
Lloh0:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_os_memset
	mov	x0, x21
	bl	_wpa_config_set_network_defaults
	mov	w8, #1
	str	w8, [x21]
Lloh3:
	adrp	x8, _WPA_PROTO_RSN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WPA_PROTO_RSN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x21, #80]
	ldr	x8, [x22, #56]
	str	x8, [x21, #56]
	ldr	x8, [x22, #56]
Lloh6:
	adrp	x9, _WPA_CIPHER_GCMP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WPA_CIPHER_GCMP@GOTPAGEOFF]
Lloh8:
	adrp	x10, _WPA_CIPHER_CCMP@GOTPAGE
Lloh9:
	ldr	x10, [x10, _WPA_CIPHER_CCMP@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	x8, [x8]
	stp	x8, x8, [x21, #64]
Lloh10:
	adrp	x8, _WPA_KEY_MGMT_PSK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WPA_KEY_MGMT_PSK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x21, #52]
	ldr	w0, [x22, #4]
	bl	_os_malloc
	str	x0, [x21, #40]
	cbz	x0, LBB0_10
; %bb.5:
	ldr	x1, [x22, #40]
	ldr	w2, [x22, #4]
	bl	_os_memcpy
	ldr	w8, [x22, #4]
	str	w8, [x21, #4]
	movi.2s	v0, #1
	str	d0, [x21, #8]
	ldr	w8, [x22, #16]
	cbz	w8, LBB0_7
; %bb.6:
	ldr	x0, [x21, #32]
	ldr	x1, [x22, #32]
	mov	w2, #32
	bl	_os_memcpy
	mov	w8, #1
	str	w8, [x21, #16]
LBB0_7:
	ldr	x0, [x22, #24]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_os_strdup
	str	x0, [x21, #24]
LBB0_9:
	movi.2s	v0, #1
	str	d0, [x19]
	str	w20, [x19, #8]
	str	xzr, [x19, #24]
	ldr	x8, [x19, #16]
	str	x19, [x8]
Lloh13:
	adrp	x20, _wpas_p2p_group_formation_timeout@GOTPAGE
Lloh14:
	ldr	x20, [x20, _wpas_p2p_group_formation_timeout@GOTPAGEOFF]
	ldr	w0, [x20]
	ldr	w1, [x19, #12]
	mov	x2, #0
	bl	_eloop_cancel_timeout
Lloh15:
	adrp	x8, _P2P_MAX_INITIAL_CONN_WAIT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _P2P_MAX_INITIAL_CONN_WAIT@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w2, [x20]
	ldr	w3, [x19, #12]
	mov	w1, #0
	mov	x4, #0
	bl	_eloop_register_timeout
	mov	x0, x19
	mov	x1, x21
	bl	_wpa_supplicant_select_network
	mov	w0, #0
	b	LBB0_12
LBB0_10:
	ldr	w0, [x19, #32]
	ldr	w1, [x21, #48]
	bl	_wpa_config_remove_network
LBB0_11:
	mov	w0, #-1
LBB0_12:
	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	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WPA_PROTO_RSN,4,2              ; @WPA_PROTO_RSN
	.comm	_WPA_CIPHER_GCMP,8,3            ; @WPA_CIPHER_GCMP
	.comm	_WPA_CIPHER_CCMP,8,3            ; @WPA_CIPHER_CCMP
	.comm	_WPA_KEY_MGMT_PSK,4,2           ; @WPA_KEY_MGMT_PSK
	.comm	_wpas_p2p_group_formation_timeout,4,2 ; @wpas_p2p_group_formation_timeout
	.comm	_P2P_MAX_INITIAL_CONN_WAIT,4,2  ; @P2P_MAX_INITIAL_CONN_WAIT
	.no_dead_strip	_wpas_start_p2p_client
.subsections_via_symbols
