	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpp_parse_cred_legacy
_dpp_parse_cred_legacy:                 ## @dpp_parse_cred_legacy
	.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, %rbx
	movq	%rdi, %r14
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_json_get_member
	movq	%rax, %r12
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_json_get_member
	movq	%rax, %r15
	testq	%r12, %r12
	je	LBB0_4
## %bb.1:
	movq	(%r12), %rax
	movq	_JSON_STRING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movl	8(%r12), %edi
	callq	_os_strlen
	movslq	%eax, %rbx
	movl	(%r13), %edi
	movl	8(%r12), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rcx
	callq	_wpa_hexdump_ascii_key
	addl	$-64, %ebx
	movl	$-1, %eax
	cmpl	$-56, %ebx
	jb	LBB0_16
## %bb.3:
	movq	8(%r14), %rdi
	movl	8(%r12), %esi
	movl	$8, %edx
	callq	_os_strlcpy
	jmp	LBB0_12
LBB0_4:
	leaq	L_.str.7(%rip), %rbx
	testq	%r15, %r15
	je	LBB0_15
## %bb.5:
	movq	(%r15), %rax
	movq	_JSON_STRING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.6:
	movl	16(%r14), %edi
	callq	_dpp_akm_sae
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movl	16(%r14), %edi
	callq	_dpp_akm_psk
	testl	%eax, %eax
	je	LBB0_8
LBB0_9:
	movl	8(%r15), %edi
	callq	_os_strlen
	movq	_PMK_LEN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leal	(%rdx,%rdx), %ecx
	leaq	L_.str.5(%rip), %rbx
	cmpl	%ecx, %eax
	jne	LBB0_15
## %bb.10:
	movl	8(%r15), %edi
	movl	20(%r14), %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_hexstr2bin
	testq	%rax, %rax
	js	LBB0_15
## %bb.11:
	movl	(%r13), %edi
	movl	20(%r14), %edx
	movl	(%r12), %ecx
	leaq	L_.str.6(%rip), %rsi
	callq	_wpa_hexdump_key
	movl	$1, (%r14)
LBB0_12:
	movl	16(%r14), %edi
	callq	_dpp_akm_sae
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.13:
	movq	8(%r14), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_16
## %bb.14:
	leaq	L_.str.8(%rip), %rbx
	jmp	LBB0_15
LBB0_8:
	leaq	L_.str.4(%rip), %rbx
LBB0_15:
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_wpa_printf
	movl	$-1, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DPP: Legacy akm=psk credential"

L_.str.1:                               ## @.str.1
	.asciz	"pass"

L_.str.2:                               ## @.str.2
	.asciz	"psk_hex"

	.comm	_JSON_STRING,8,3                ## @JSON_STRING
L_.str.3:                               ## @.str.3
	.asciz	"DPP: Legacy passphrase"

L_.str.4:                               ## @.str.4
	.asciz	"DPP: Unexpected psk_hex with akm=sae"

	.comm	_PMK_LEN,4,2                    ## @PMK_LEN
L_.str.5:                               ## @.str.5
	.asciz	"DPP: Invalid psk_hex encoding"

L_.str.6:                               ## @.str.6
	.asciz	"DPP: Legacy PSK"

L_.str.7:                               ## @.str.7
	.asciz	"DPP: No pass or psk_hex strings found"

L_.str.8:                               ## @.str.8
	.asciz	"DPP: No pass for sae found"

	.no_dead_strip	_dpp_parse_cred_legacy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpp_parse_cred_legacy
_dpp_parse_cred_legacy:                 ; @dpp_parse_cred_legacy
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_json_get_member
	mov	x21, x0
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_json_get_member
	mov	x20, x0
Lloh8:
	adrp	x8, _JSON_STRING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _JSON_STRING@GOTPAGEOFF]
	cbz	x21, LBB0_4
; %bb.1:
	ldr	x9, [x21]
	ldr	x10, [x8]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.2:
	ldr	w0, [x21, #8]
	bl	_os_strlen
	mov	x20, x0
	sxtw	x3, w20
	ldr	w0, [x22]
	ldr	w2, [x21, #8]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_hexdump_ascii_key
	sub	w8, w20, #64
	cmn	w8, #56
	b.lo	LBB0_16
; %bb.3:
	ldr	x0, [x19, #8]
	ldr	w1, [x21, #8]
	mov	w2, #8
	bl	_os_strlcpy
	b	LBB0_11
LBB0_4:
	cbz	x20, LBB0_14
; %bb.5:
	ldr	x9, [x20]
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.6:
	ldr	w0, [x19, #16]
	bl	_dpp_akm_sae
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19, #16]
	bl	_dpp_akm_psk
	cbz	w0, LBB0_19
LBB0_8:
	ldr	w0, [x20, #8]
	bl	_os_strlen
Lloh12:
	adrp	x21, _PMK_LEN@GOTPAGE
Lloh13:
	ldr	x21, [x21, _PMK_LEN@GOTPAGEOFF]
	ldr	w2, [x21]
	cmp	w0, w2, lsl #1
	b.ne	LBB0_18
; %bb.9:
	ldr	w0, [x20, #8]
	ldr	w1, [x19, #20]
	bl	_hexstr2bin
	tbnz	x0, #63, LBB0_18
; %bb.10:
	ldr	w0, [x22]
	ldr	w2, [x19, #20]
	ldr	w3, [x21]
Lloh14:
	adrp	x1, l_.str.6@PAGE
Lloh15:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_wpa_hexdump_key
	mov	w8, #1
	str	w8, [x19]
LBB0_11:
	ldr	w0, [x19, #16]
	bl	_dpp_akm_sae
	cbz	x0, LBB0_17
; %bb.12:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_20
; %bb.13:
	mov	w0, #0
	b	LBB0_17
LBB0_14:
Lloh16:
	adrp	x1, l_.str.7@PAGE
Lloh17:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_15:
	ldr	w0, [x22]
	bl	_wpa_printf
LBB0_16:
	mov	w0, #-1
LBB0_17:
	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
LBB0_18:
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_15
LBB0_19:
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_20:
Lloh22:
	adrp	x1, l_.str.8@PAGE
Lloh23:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_15
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DPP: Legacy akm=psk credential"

l_.str.1:                               ; @.str.1
	.asciz	"pass"

l_.str.2:                               ; @.str.2
	.asciz	"psk_hex"

	.comm	_JSON_STRING,8,3                ; @JSON_STRING
l_.str.3:                               ; @.str.3
	.asciz	"DPP: Legacy passphrase"

l_.str.4:                               ; @.str.4
	.asciz	"DPP: Unexpected psk_hex with akm=sae"

	.comm	_PMK_LEN,4,2                    ; @PMK_LEN
l_.str.5:                               ; @.str.5
	.asciz	"DPP: Invalid psk_hex encoding"

l_.str.6:                               ; @.str.6
	.asciz	"DPP: Legacy PSK"

l_.str.7:                               ; @.str.7
	.asciz	"DPP: No pass or psk_hex strings found"

l_.str.8:                               ; @.str.8
	.asciz	"DPP: No pass for sae found"

	.no_dead_strip	_dpp_parse_cred_legacy
.subsections_via_symbols
