	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uECC_shared_secret             ## -- Begin function uECC_shared_secret
	.p2align	4, 0x90
_uECC_shared_secret:                    ## @uECC_shared_secret
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_uECC_MAX_WORDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leal	(%rbx,%rbx), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	shlq	$3, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	%r13, -64(%rbp)
	movq	%rax, -56(%rbp)
	movq	%r12, %rax
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movslq	(%r12), %r12
	movslq	4(%rax), %rbx
	movq	8(%rax), %rdi
	callq	_BITS_TO_BYTES
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_uECC_vli_bytesToNative
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_uECC_vli_bytesToNative
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r12,8), %rdi
	leaq	(%r15,%rbx,4), %rsi
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edx
	callq	_uECC_vli_bytesToNative
	movq	%r13, %rdi
	movq	%r13, %rsi
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movq	%r15, %rcx
	callq	_regularize_k
	movq	%rax, %r13
	movq	_g_rng_function@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	-64(%rbp,%r13,8), %r14
	movl	16(%r15), %esi
	movq	%r14, %rdi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_uECC_generate_random_int
	testl	%eax, %eax
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	xorl	%eax, %eax
	testq	%r13, %r13
	sete	%al
	movq	-64(%rbp,%rax,8), %rdx
	movq	8(%r15), %r8
	incq	%r8
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rcx
	movq	%r15, %r9
	callq	_EccPoint_mult
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rbx, %rdx
	callq	_uECC_vli_nativeToBytes
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_EccPoint_isZero
	xorl	%ebx, %ebx
	testl	%eax, %eax
	sete	%bl
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_uECC_MAX_WORDS,4,2             ## @uECC_MAX_WORDS
	.comm	_g_rng_function,8,3             ## @g_rng_function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uECC_shared_secret             ; -- Begin function uECC_shared_secret
	.p2align	2
_uECC_shared_secret:                    ; @uECC_shared_secret
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x19, x3
	mov	x20, x2
	mov	x24, x1
	mov	x25, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _uECC_MAX_WORDS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _uECC_MAX_WORDS@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	w8, w12, #1
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
	lsl	x8, x12, #3
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0xffffffff0
	sub	x26, x9, x12
	mov	sp, x26
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x27, x8, x12
	mov	sp, x27
	stp	x26, x27, [x29, #-104]
	ldpsw	x23, x22, [x3]
	ldr	x0, [x3, #8]
	bl	_BITS_TO_BYTES
	mov	x2, x0
	mov	x0, x26
	mov	x1, x24
	bl	_uECC_vli_bytesToNative
	mov	x0, x21
	mov	x1, x25
	mov	x2, x22
	bl	_uECC_vli_bytesToNative
	add	x0, x21, x23, lsl #3
	add	x1, x25, x22, lsl #2
	mov	x2, x22
	bl	_uECC_vli_bytesToNative
	mov	x0, x26
	mov	x1, x26
	mov	x2, x27
	mov	x3, x19
	bl	_regularize_k
	mov	x24, x0
Lloh12:
	adrp	x8, _g_rng_function@GOTPAGE
Lloh13:
	ldr	x8, [x8, _g_rng_function@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	sub	x8, x29, #104
	ldr	x25, [x8, x24, lsl #3]
	ldr	w1, [x19, #16]
	mov	x0, x25
	mov	x2, x23
	bl	_uECC_generate_random_int
	cbnz	w0, LBB0_3
	b	LBB0_4
LBB0_2:
	mov	x25, #0
LBB0_3:
	cmp	x24, #0
	cset	w8, eq
	sub	x9, x29, #104
	ldr	x2, [x9, w8, uxtw #3]
	ldr	x8, [x19, #8]
	add	x4, x8, #1
	mov	x0, x21
	mov	x1, x21
	mov	x3, x25
	mov	x5, x19
	bl	_EccPoint_mult
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_uECC_vli_nativeToBytes
	mov	x0, x21
	mov	x1, x19
	bl	_EccPoint_isZero
	cmp	w0, #0
	cset	w0, eq
LBB0_4:
	ldur	x8, [x29, #-88]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_uECC_MAX_WORDS,4,2             ; @uECC_MAX_WORDS
	.comm	_g_rng_function,8,3             ; @g_rng_function
.subsections_via_symbols
