	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpa_config_parse_psk
_wpa_config_parse_psk:                  ## @wpa_config_parse_psk
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movq	%rsi, %r14
	cmpb	$34, (%rcx)
	jne	LBB0_13
## %bb.1:
	incq	%rbx
	movq	%rbx, %rdi
	movl	$34, %esi
	callq	_os_strrchr
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r12
	subq	%rbx, %r12
	jmp	LBB0_4
LBB0_13:
	movl	12(%r14), %esi
	movq	_PMK_LEN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:
	movslq	(%r12), %rax
	cmpb	$0, (%rbx,%rax,2)
	je	LBB0_16
LBB0_15:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %eax
	jmp	LBB0_17
LBB0_3:
	movq	%rbx, %rdi
	callq	_os_strlen
	movq	%rax, %r12
LBB0_4:
	leaq	-64(%r12), %rax
	cmpq	$-57, %rax
	ja	LBB0_6
## %bb.5:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	movq	%r12, %rcx
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %eax
	jmp	LBB0_17
LBB0_6:
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_wpa_hexdump_ascii_key
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_has_ctrl_char
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %eax
	jmp	LBB0_17
LBB0_8:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.9:
	callq	_os_strlen
	cmpq	%r12, %rax
	jne	LBB0_12
## %bb.10:
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_os_memcmp
	testq	%rax, %rax
	je	LBB0_11
LBB0_12:
	movl	$0, 8(%r14)
	movq	(%r14), %rdi
	callq	_str_clear_free
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_dup_binstr
	movq	%rax, %rcx
	movq	%rax, (%r14)
	xorl	%eax, %eax
	cmpq	$1, %rcx
	sbbl	%eax, %eax
	jmp	LBB0_17
LBB0_16:
	movq	(%r14), %rdi
	callq	_str_clear_free
	movq	$0, (%r14)
	movl	$1, 8(%r14)
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r14), %edx
	movl	(%r12), %ecx
	leaq	L_.str.4(%rip), %rsi
	callq	_wpa_hexdump_key
	xorl	%eax, %eax
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	$1, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Line %d: Invalid passphrase length %lu (expected: 8..63) '%s'."

	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
L_.str.1:                               ## @.str.1
	.asciz	"PSK (ASCII passphrase)"

L_.str.2:                               ## @.str.2
	.asciz	"Line %d: Invalid passphrase character"

	.comm	_PMK_LEN,4,2                    ## @PMK_LEN
L_.str.3:                               ## @.str.3
	.asciz	"Line %d: Invalid PSK '%s'."

L_.str.4:                               ## @.str.4
	.asciz	"PSK"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.no_dead_strip	_wpa_config_parse_psk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpa_config_parse_psk
_wpa_config_parse_psk:                  ; @wpa_config_parse_psk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	ldrb	w8, [x3]
	cmp	w8, #34
	b.ne	LBB0_3
; %bb.1:
	add	x21, x21, #1
	mov	x0, x21
	mov	w1, #34
	bl	_os_strrchr
	cbz	x0, LBB0_6
; %bb.2:
	sub	x22, x0, x21
	b	LBB0_7
LBB0_3:
	ldr	w1, [x19, #12]
Lloh0:
	adrp	x22, _PMK_LEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PMK_LEN@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_hexstr2bin
	cbnz	x0, LBB0_5
; %bb.4:
	ldrsw	x8, [x22]
	lsl	x8, x8, #1
	ldrb	w8, [x21, x8]
	cbz	w8, LBB0_17
LBB0_5:
Lloh2:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	str	x21, [sp]
Lloh5:
	adrp	x1, l_.str.3@PAGE
Lloh6:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_6:
	mov	x0, x21
	bl	_os_strlen
	mov	x22, x0
LBB0_7:
	sub	x8, x22, #64
	cmn	x8, #57
	b.hi	LBB0_9
; %bb.8:
Lloh7:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	stp	x22, x21, [sp]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh12:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	mov	x3, x22
	bl	_wpa_hexdump_ascii_key
	mov	x0, x21
	mov	x1, x22
	bl	_has_ctrl_char
	cbz	x0, LBB0_13
; %bb.10:
Lloh17:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_11:
	mov	x2, x20
	bl	_wpa_printf
	mov	w0, #-1
LBB0_12:
	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
	add	sp, sp, #64
	ret
LBB0_13:
	ldr	x0, [x19]
	cbz	x0, LBB0_16
; %bb.14:
	bl	_os_strlen
	cmp	x0, x22
	b.ne	LBB0_16
; %bb.15:
	ldr	x0, [x19]
	mov	x1, x21
	mov	x2, x22
	bl	_os_memcmp
	cbz	x0, LBB0_18
LBB0_16:
	str	wzr, [x19, #8]
	ldr	x0, [x19]
	bl	_str_clear_free
	mov	x0, x21
	mov	x1, x22
	bl	_dup_binstr
	str	x0, [x19]
	cmp	x0, #0
	csetm	w0, eq
	b	LBB0_12
LBB0_17:
	ldr	x0, [x19]
	bl	_str_clear_free
	str	xzr, [x19]
	mov	w8, #1
	str	w8, [x19, #8]
Lloh22:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	w2, [x19, #12]
	ldr	w3, [x22]
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_hexdump_key
	mov	w0, #0
	b	LBB0_12
LBB0_18:
	mov	w0, #1
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Line %d: Invalid passphrase length %lu (expected: 8..63) '%s'."

	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
l_.str.1:                               ; @.str.1
	.asciz	"PSK (ASCII passphrase)"

l_.str.2:                               ; @.str.2
	.asciz	"Line %d: Invalid passphrase character"

	.comm	_PMK_LEN,4,2                    ; @PMK_LEN
l_.str.3:                               ; @.str.3
	.asciz	"Line %d: Invalid PSK '%s'."

l_.str.4:                               ; @.str.4
	.asciz	"PSK"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.no_dead_strip	_wpa_config_parse_psk
.subsections_via_symbols
