	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpp_keygen                     ## -- Begin function dpp_keygen
	.p2align	4, 0x90
_dpp_keygen:                            ## @dpp_keygen
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.1:
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_dpp_get_curve_name
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	testq	%r12, %r12
	je	LBB0_5
LBB0_3:
	leaq	16(%r15), %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_dpp_set_keypair
	jmp	LBB0_6
LBB0_4:
	movq	_dpp_curves@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r15)
	testq	%r12, %r12
	jne	LBB0_3
LBB0_5:
	movq	%rax, %rdi
	callq	_dpp_gen_keypair
LBB0_6:
	movl	%eax, 8(%r15)
	testl	%eax, %eax
	je	LBB0_17
## %bb.7:
	movl	$1, (%r15)
	movl	%eax, %edi
	callq	_dpp_bootstrap_key_der
	testq	%rax, %rax
	je	LBB0_17
## %bb.8:
	movq	%rax, %r14
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdx
	callq	_wpa_hexdump_buf
	movq	%r14, %rdi
	callq	_wpabuf_head
	movq	%rax, -48(%rbp)
	movq	%r14, %rdi
	callq	_wpabuf_len
	movq	%rax, -56(%rbp)
	movl	4(%r15), %ecx
	leaq	-48(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movl	$1, %edi
	callq	_sha256_vector
	movl	(%rbx), %edi
	testl	%eax, %eax
	js	LBB0_16
## %bb.9:
	movl	4(%r15), %edx
	movq	_SHA256_MAC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_hexdump
	movq	%r14, %rdi
	callq	_wpabuf_head
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_wpabuf_len
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_base64_encode
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_wpabuf_free
	testq	%r15, %r15
	je	LBB0_17
## %bb.10:
	movq	-56(%rbp), %r12
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_os_strchr
	testq	%rax, %rax
	je	LBB0_19
## %bb.11:
	movq	%rax, %rbx
	movq	%r15, %r14
	addq	%r12, %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	leaq	1(%rbx), %rsi
	movl	%r14d, %edx
	subl	%ebx, %edx
	movq	%rbx, %rdi
	callq	_os_memmove
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_os_strchr
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_19
LBB0_17:
	xorl	%r14d, %r14d
LBB0_18:
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_os_free
	movq	%r14, %rdi
	callq	_wpabuf_free
	jmp	LBB0_19
LBB0_14:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movq	%r15, %rax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_18
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_dpp_curves,8,3                 ## @dpp_curves
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DPP: Unsupported curve: %s"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"DPP: Compressed public key (DER)"

L_.str.2:                               ## @.str.2
	.asciz	"DPP: Failed to hash public key"

L_.str.3:                               ## @.str.3
	.asciz	"DPP: Public key hash"

	.comm	_SHA256_MAC_LEN,4,2             ## @SHA256_MAC_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpp_keygen                     ; -- Begin function dpp_keygen
	.p2align	2
_dpp_keygen:                            ; @dpp_keygen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x3
	mov	x21, x2
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cbz	x1, LBB0_4
; %bb.1:
	mov	x22, x1
	mov	x0, x1
	bl	_dpp_get_curve_name
	str	x0, [x19, #16]
	cbz	x0, LBB0_13
; %bb.2:
	cbz	x21, LBB0_5
LBB0_3:
	add	x0, x19, #16
	mov	x1, x21
	mov	x2, x20
	bl	_dpp_set_keypair
	str	w0, [x19, #8]
	cbnz	w0, LBB0_6
	b	LBB0_12
LBB0_4:
Lloh3:
	adrp	x8, _dpp_curves@GOTPAGE
Lloh4:
	ldr	x8, [x8, _dpp_curves@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x8]
	str	x0, [x19, #16]
	cbnz	x21, LBB0_3
LBB0_5:
	bl	_dpp_gen_keypair
	str	w0, [x19, #8]
	cbz	w0, LBB0_12
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
	bl	_dpp_bootstrap_key_der
	mov	x20, x0
	cbz	x0, LBB0_15
; %bb.7:
Lloh6:
	adrp	x21, _MSG_DEBUG@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump_buf
	mov	x0, x20
	bl	_wpabuf_head
	str	x0, [sp, #16]
	mov	x0, x20
	bl	_wpabuf_len
	str	x0, [sp, #8]
	ldr	w3, [x19, #4]
	add	x1, sp, #16
	add	x2, sp, #8
	mov	w0, #1
	bl	_sha256_vector
	mov	x8, x0
	ldr	w0, [x21]
	tbnz	w8, #31, LBB0_14
; %bb.8:
	ldr	w2, [x19, #4]
Lloh10:
	adrp	x8, _SHA256_MAC_LEN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SHA256_MAC_LEN@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_hexdump
	mov	x0, x20
	bl	_wpabuf_head
	mov	x19, x0
	mov	x0, x20
	bl	_wpabuf_len
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x19
	bl	_base64_encode
	mov	x19, x0
	mov	x0, x20
	bl	_wpabuf_free
	cbz	x19, LBB0_12
; %bb.9:
	ldr	x21, [sp, #8]
	mov	x0, x19
	mov	w1, #10
	bl	_os_strchr
	cbz	x0, LBB0_17
; %bb.10:
	mov	x20, x0
	add	x21, x19, x21
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x1, x20, #1
	sub	w2, w21, w20
	mov	x0, x20
	bl	_os_memmove
	mov	x0, x20
	mov	w1, #10
	bl	_os_strchr
	mov	x20, x0
	cbnz	x0, LBB0_11
	b	LBB0_17
LBB0_12:
	mov	x20, #0
	b	LBB0_15
LBB0_13:
Lloh15:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	str	x22, [sp]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_16
LBB0_14:
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
LBB0_15:
	mov	x0, #0
	bl	_os_free
	mov	x0, x20
	bl	_wpabuf_free
LBB0_16:
	mov	x19, #0
LBB0_17:
	ldr	x8, [sp, #24]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_dpp_curves,8,3                 ; @dpp_curves
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DPP: Unsupported curve: %s"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"DPP: Compressed public key (DER)"

l_.str.2:                               ; @.str.2
	.asciz	"DPP: Failed to hash public key"

l_.str.3:                               ; @.str.3
	.asciz	"DPP: Public key hash"

	.comm	_SHA256_MAC_LEN,4,2             ; @SHA256_MAC_LEN
.subsections_via_symbols
