	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sae_derive_commit
_sae_derive_commit:                     ## @sae_derive_commit
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_crypto_bignum_init
	movq	%rax, %r14
	movq	(%rbx), %rcx
	cmpq	$0, 24(%rcx)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_crypto_bignum_init
	movq	(%rbx), %rcx
	movq	%rax, 24(%rcx)
LBB0_2:
	movq	16(%rcx), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_crypto_bignum_init
	movq	(%rbx), %rcx
	movq	%rax, 16(%rcx)
LBB0_4:
	movl	$-1, %r15d
	testq	%r14, %r14
	je	LBB0_14
## %bb.5:
	movq	24(%rcx), %rsi
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.6:
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movl	32(%rcx), %edi
	movq	%r14, %rdx
	movq	%rax, %rcx
	callq	_dragonfly_generate_scalar
	testq	%rax, %rax
	js	LBB0_14
## %bb.8:
	movq	(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sae_derive_commit_element_ecc
	testq	%rax, %rax
	js	LBB0_14
## %bb.10:
	movq	(%rbx), %rax
LBB0_11:
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.13:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sae_derive_commit_element_ffc
	movq	%rax, %r15
	sarq	$63, %r15
	jmp	LBB0_14
LBB0_12:
	xorl	%r15d, %r15d
LBB0_14:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_crypto_bignum_deinit
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_sae_derive_commit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sae_derive_commit
_sae_derive_commit:                     ; @sae_derive_commit
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_crypto_bignum_init
	mov	x19, x0
	ldr	x8, [x20]
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_3
; %bb.1:
	ldr	x3, [x8, #16]
	cbz	x3, LBB0_4
LBB0_2:
	cbnz	x19, LBB0_5
	b	LBB0_12
LBB0_3:
	bl	_crypto_bignum_init
	ldr	x8, [x20]
	str	x0, [x8, #24]
	ldr	x3, [x8, #16]
	cbnz	x3, LBB0_2
LBB0_4:
	bl	_crypto_bignum_init
	mov	x3, x0
	ldr	x8, [x20]
	str	x0, [x8, #16]
	cbz	x19, LBB0_12
LBB0_5:
	ldr	x1, [x8, #24]
	cmp	x1, #0
	ccmp	x3, #0, #4, ne
	b.eq	LBB0_12
; %bb.6:
	ldr	w0, [x8, #32]
	mov	x2, x19
	bl	_dragonfly_generate_scalar
	tbnz	x0, #63, LBB0_12
; %bb.7:
	ldr	x8, [x20]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_10
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	bl	_sae_derive_commit_element_ecc
	tbnz	x0, #63, LBB0_12
; %bb.9:
	ldr	x8, [x20]
LBB0_10:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.11:
	mov	x0, x20
	mov	x1, x19
	bl	_sae_derive_commit_element_ffc
	asr	x20, x0, #63
	b	LBB0_13
LBB0_12:
	mov	w20, #-1
LBB0_13:
	mov	x0, x19
	mov	w1, #1
	bl	_crypto_bignum_deinit
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w20, #0
	b	LBB0_13
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_sae_derive_commit
.subsections_via_symbols
