	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpas_dpp_add_network
_wpas_dpp_add_network:                  ## @wpas_dpp_add_network
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	callq	_wpa_config_add_network
	testq	%rax, %rax
	je	LBB0_24
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_wpas_notify_network_added
	movq	%rbx, %rdi
	callq	_wpa_config_set_network_defaults
	movl	$1, (%rbx)
	movq	8(%r15), %rdi
	callq	_os_malloc
	movq	%rax, 96(%rbx)
	testq	%rax, %rax
	je	LBB0_23
## %bb.2:
	movl	64(%r15), %esi
	movq	8(%r15), %rdx
	movq	%rax, %rdi
	callq	_os_memcpy
	movq	8(%r15), %rax
	movq	%rax, 8(%rbx)
	movq	32(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	movq	_WPA_KEY_MGMT_DPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_MGMT_FRAME_PROTECTION_REQUIRED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	callq	_os_strdup
	movl	%eax, 88(%rbx)
	testl	%eax, %eax
	je	LBB0_23
LBB0_4:
	movq	56(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.5:
	callq	_wpabuf_len
	movq	%rax, %rdi
	callq	_os_malloc
	movq	%rax, 80(%rbx)
	testq	%rax, %rax
	je	LBB0_23
## %bb.6:
	movq	%rax, %r12
	movq	56(%r15), %rdi
	callq	_wpabuf_head
	movl	%eax, %r13d
	movq	56(%r15), %rdi
	callq	_wpabuf_len
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	callq	_os_memcpy
	movq	56(%r15), %rdi
	callq	_wpabuf_len
	movq	%rax, 72(%rbx)
LBB0_7:
	movq	48(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	callq	_wpabuf_len
	movq	%rax, %rdi
	callq	_os_malloc
	movq	%rax, 64(%rbx)
	testq	%rax, %rax
	je	LBB0_23
## %bb.9:
	movq	%rax, %r12
	movq	48(%r15), %rdi
	callq	_wpabuf_head
	movl	%eax, %r13d
	movq	48(%r15), %rdi
	callq	_wpabuf_len
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	callq	_os_memcpy
	movq	48(%r15), %rdi
	callq	_wpabuf_len
	movq	%rax, 56(%rbx)
	movl	40(%r15), %eax
	movl	%eax, 48(%rbx)
LBB0_10:
	cmpq	$0, 32(%r15)
	je	LBB0_14
## %bb.11:
	movq	(%r15), %rdi
	callq	_dpp_akm_psk
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	(%r15), %rdi
	callq	_dpp_akm_sae
	testq	%rax, %rax
	je	LBB0_25
LBB0_13:
	cmpq	$0, 32(%r15)
	jne	LBB0_15
LBB0_14:
	movl	$0, 16(%rbx)
LBB0_15:
	movq	(%r15), %rdi
	callq	_dpp_akm_psk
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_WPA_KEY_MGMT_PSK@GOTPCREL(%rip), %rax
	movq	_WPA_KEY_MGMT_PSK_SHA256@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_WPA_KEY_MGMT_FT_PSK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, 16(%rbx)
LBB0_17:
	movq	(%r15), %rdi
	callq	_dpp_akm_sae
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	_WPA_KEY_MGMT_SAE@GOTPCREL(%rip), %rax
	movq	_WPA_KEY_MGMT_FT_SAE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, 16(%rbx)
LBB0_19:
	movq	_MGMT_FRAME_PROTECTION_OPTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	24(%r15), %rdx
	cmpq	$0, (%rdx)
	je	LBB0_22
## %bb.20:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_wpa_config_set_quoted
	testq	%rax, %rax
	js	LBB0_23
## %bb.21:
	movq	%rbx, %rdi
	callq	_wpa_config_update_psk
	movl	$1, 20(%rbx)
	jmp	LBB0_25
LBB0_23:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wpas_notify_network_removed
	movl	4(%r14), %edi
	movl	24(%rbx), %esi
	callq	_wpa_config_remove_network
LBB0_24:
	xorl	%ebx, %ebx
LBB0_25:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movl	20(%r15), %eax
	movl	%eax, 40(%rbx)
	movq	32(%rbx), %rdi
	movl	16(%r15), %esi
	movq	_PMK_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	callq	_os_memcpy
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_WPA_KEY_MGMT_DPP,4,2           ## @WPA_KEY_MGMT_DPP
	.comm	_MGMT_FRAME_PROTECTION_REQUIRED,4,2 ## @MGMT_FRAME_PROTECTION_REQUIRED
	.comm	_WPA_KEY_MGMT_PSK,4,2           ## @WPA_KEY_MGMT_PSK
	.comm	_WPA_KEY_MGMT_PSK_SHA256,4,2    ## @WPA_KEY_MGMT_PSK_SHA256
	.comm	_WPA_KEY_MGMT_FT_PSK,4,2        ## @WPA_KEY_MGMT_FT_PSK
	.comm	_WPA_KEY_MGMT_SAE,4,2           ## @WPA_KEY_MGMT_SAE
	.comm	_WPA_KEY_MGMT_FT_SAE,4,2        ## @WPA_KEY_MGMT_FT_SAE
	.comm	_MGMT_FRAME_PROTECTION_OPTIONAL,4,2 ## @MGMT_FRAME_PROTECTION_OPTIONAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"psk"

	.comm	_PMK_LEN,8,3                    ## @PMK_LEN
	.comm	_DPP_AKM_SAE,8,3                ## @DPP_AKM_SAE
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.comm	_WPA_DRIVER_CAPA_KEY_MGMT_SAE,4,2 ## @WPA_DRIVER_CAPA_KEY_MGMT_SAE
	.comm	_WPA_DRIVER_FLAGS_SAE,4,2       ## @WPA_DRIVER_FLAGS_SAE
	.no_dead_strip	_wpas_dpp_add_network
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpas_dpp_add_network
_wpas_dpp_add_network:                  ; @wpas_dpp_add_network
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_wpa_config_add_network
	mov	x19, x0
	cbz	x0, LBB0_23
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_wpas_notify_network_added
	mov	x0, x19
	bl	_wpa_config_set_network_defaults
	mov	w8, #1
	str	w8, [x19]
	ldr	x0, [x21, #8]
	bl	_os_malloc
	str	x0, [x19, #96]
	cbz	x0, LBB0_22
; %bb.2:
	ldr	w1, [x21, #64]
	ldr	x2, [x21, #8]
	bl	_os_memcpy
	ldr	x8, [x21, #8]
	str	x8, [x19, #8]
	ldr	x0, [x21, #32]
	cbz	x0, LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _WPA_KEY_MGMT_DPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WPA_KEY_MGMT_DPP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #16]
Lloh3:
	adrp	x8, _MGMT_FRAME_PROTECTION_REQUIRED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MGMT_FRAME_PROTECTION_REQUIRED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #44]
	bl	_os_strdup
	str	w0, [x19, #88]
	cbz	w0, LBB0_22
LBB0_4:
	ldr	x0, [x21, #56]
	cbz	x0, LBB0_7
; %bb.5:
	bl	_wpabuf_len
	bl	_os_malloc
	str	x0, [x19, #80]
	cbz	x0, LBB0_22
; %bb.6:
	mov	x22, x0
	ldr	x0, [x21, #56]
	bl	_wpabuf_head
	mov	x23, x0
	ldr	x0, [x21, #56]
	bl	_wpabuf_len
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_os_memcpy
	ldr	x0, [x21, #56]
	bl	_wpabuf_len
	str	x0, [x19, #72]
LBB0_7:
	ldr	x0, [x21, #48]
	cbz	x0, LBB0_10
; %bb.8:
	bl	_wpabuf_len
	bl	_os_malloc
	str	x0, [x19, #64]
	cbz	x0, LBB0_22
; %bb.9:
	mov	x22, x0
	ldr	x0, [x21, #48]
	bl	_wpabuf_head
	mov	x23, x0
	ldr	x0, [x21, #48]
	bl	_wpabuf_len
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_os_memcpy
	ldr	x0, [x21, #48]
	bl	_wpabuf_len
	str	x0, [x19, #56]
	ldr	w8, [x21, #40]
	str	w8, [x19, #48]
LBB0_10:
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_14
; %bb.11:
	ldr	x0, [x21]
	bl	_dpp_akm_psk
	cbnz	x0, LBB0_13
; %bb.12:
	ldr	x0, [x21]
	bl	_dpp_akm_sae
	cbz	x0, LBB0_23
LBB0_13:
	ldr	x8, [x21, #32]
	cbnz	x8, LBB0_15
LBB0_14:
	str	wzr, [x19, #16]
LBB0_15:
	ldr	x0, [x21]
	bl	_dpp_akm_psk
	cbz	x0, LBB0_17
; %bb.16:
Lloh6:
	adrp	x8, _WPA_KEY_MGMT_PSK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WPA_KEY_MGMT_PSK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _WPA_KEY_MGMT_PSK_SHA256@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WPA_KEY_MGMT_PSK_SHA256@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _WPA_KEY_MGMT_FT_PSK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _WPA_KEY_MGMT_FT_PSK@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh14:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [x19, #16]
	orr	w8, w8, w9
	str	w8, [x19, #16]
LBB0_17:
	ldr	x0, [x21]
	bl	_dpp_akm_sae
	cbz	x0, LBB0_19
; %bb.18:
Lloh15:
	adrp	x8, _WPA_KEY_MGMT_SAE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WPA_KEY_MGMT_SAE@GOTPAGEOFF]
Lloh17:
	adrp	x9, _WPA_KEY_MGMT_FT_SAE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WPA_KEY_MGMT_FT_SAE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19, #16]
	orr	w8, w8, w9
	str	w8, [x19, #16]
LBB0_19:
Lloh21:
	adrp	x8, _MGMT_FRAME_PROTECTION_OPTIONAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MGMT_FRAME_PROTECTION_OPTIONAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x19, #44]
	ldr	x2, [x21, #24]
	ldr	x8, [x2]
	cbz	x8, LBB0_24
; %bb.20:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_wpa_config_set_quoted
	tbnz	x0, #63, LBB0_22
; %bb.21:
	mov	x0, x19
	bl	_wpa_config_update_psk
	mov	w8, #1
	str	w8, [x19, #20]
	b	LBB0_23
LBB0_22:
	mov	x0, x20
	mov	x1, x19
	bl	_wpas_notify_network_removed
	ldr	w0, [x20, #4]
	ldr	w1, [x19, #24]
	bl	_wpa_config_remove_network
	mov	x19, #0
LBB0_23:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_24:
	ldp	w1, w8, [x21, #16]
	str	w8, [x19, #40]
	ldr	x0, [x19, #32]
Lloh26:
	adrp	x8, _PMK_LEN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PMK_LEN@GOTPAGEOFF]
Lloh28:
	ldr	x2, [x8]
	bl	_os_memcpy
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_WPA_KEY_MGMT_DPP,4,2           ; @WPA_KEY_MGMT_DPP
	.comm	_MGMT_FRAME_PROTECTION_REQUIRED,4,2 ; @MGMT_FRAME_PROTECTION_REQUIRED
	.comm	_WPA_KEY_MGMT_PSK,4,2           ; @WPA_KEY_MGMT_PSK
	.comm	_WPA_KEY_MGMT_PSK_SHA256,4,2    ; @WPA_KEY_MGMT_PSK_SHA256
	.comm	_WPA_KEY_MGMT_FT_PSK,4,2        ; @WPA_KEY_MGMT_FT_PSK
	.comm	_WPA_KEY_MGMT_SAE,4,2           ; @WPA_KEY_MGMT_SAE
	.comm	_WPA_KEY_MGMT_FT_SAE,4,2        ; @WPA_KEY_MGMT_FT_SAE
	.comm	_MGMT_FRAME_PROTECTION_OPTIONAL,4,2 ; @MGMT_FRAME_PROTECTION_OPTIONAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"psk"

	.comm	_PMK_LEN,8,3                    ; @PMK_LEN
	.comm	_DPP_AKM_SAE,8,3                ; @DPP_AKM_SAE
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.comm	_WPA_DRIVER_CAPA_KEY_MGMT_SAE,4,2 ; @WPA_DRIVER_CAPA_KEY_MGMT_SAE
	.comm	_WPA_DRIVER_FLAGS_SAE,4,2       ; @WPA_DRIVER_FLAGS_SAE
	.no_dead_strip	_wpas_dpp_add_network
.subsections_via_symbols
