	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sae_derive_k_ecc
_sae_derive_k_ecc:                      ## @sae_derive_k_ecc
	.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	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movl	4(%rax), %edi
	callq	_crypto_ec_point_init
	movq	%rax, %rbx
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	(%r12), %rax
	movl	4(%rax), %edi
	movq	16(%rax), %rsi
	movl	8(%r12), %edx
	movq	%rbx, %rcx
	callq	_crypto_ec_point_mul
	testq	%rax, %rax
	js	LBB0_6
## %bb.2:
	movq	(%r12), %rax
	movl	4(%rax), %edi
	movl	12(%rax), %edx
	movq	%rbx, %rsi
	movq	%rbx, %rcx
	callq	_crypto_ec_point_add
	testq	%rax, %rax
	js	LBB0_6
## %bb.3:
	movq	(%r12), %rax
	movl	4(%rax), %edi
	movl	8(%rax), %edx
	movq	%rbx, %rsi
	movq	%rbx, %rcx
	callq	_crypto_ec_point_mul
	testq	%rax, %rax
	js	LBB0_6
## %bb.4:
	movq	(%r12), %rax
	movl	4(%rax), %edi
	movq	%rbx, %rsi
	callq	_crypto_ec_point_is_at_infinity
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
LBB0_8:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_crypto_ec_point_deinit
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r12), %rax
	movl	4(%rax), %edi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_crypto_ec_point_to_bin
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	callq	_wpa_hexdump_key
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SAE: Failed to calculate K and k"

L_.str.1:                               ## @.str.1
	.asciz	"SAE: k"

	.no_dead_strip	_sae_derive_k_ecc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sae_derive_k_ecc
_sae_derive_k_ecc:                      ; @sae_derive_k_ecc
	.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	x21, x0
	ldr	x8, [x0]
	ldr	w0, [x8, #4]
	bl	_crypto_ec_point_init
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
	ldr	x1, [x8, #16]
	ldr	w2, [x21, #8]
	mov	x3, x19
	bl	_crypto_ec_point_mul
	tbnz	x0, #63, LBB0_5
; %bb.2:
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
	ldr	w2, [x8, #12]
	mov	x1, x19
	mov	x3, x19
	bl	_crypto_ec_point_add
	tbnz	x0, #63, LBB0_5
; %bb.3:
	ldr	x8, [x21]
	ldp	w0, w2, [x8, #4]
	mov	x1, x19
	mov	x3, x19
	bl	_crypto_ec_point_mul
	tbnz	x0, #63, LBB0_5
; %bb.4:
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
	mov	x1, x19
	bl	_crypto_ec_point_is_at_infinity
	cbz	x0, LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
LBB0_6:
	mov	w20, #-1
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	bl	_crypto_ec_point_deinit
	mov	x0, x20
	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_8:
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
	mov	x1, x19
	mov	x2, x20
	mov	x3, #0
	bl	_crypto_ec_point_to_bin
	tbnz	x0, #63, LBB0_5
; %bb.9:
Lloh5:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x8, [x21]
	ldr	w3, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump_key
	mov	w20, #0
	b	LBB0_7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SAE: Failed to calculate K and k"

l_.str.1:                               ; @.str.1
	.asciz	"SAE: k"

	.no_dead_strip	_sae_derive_k_ecc
.subsections_via_symbols
