	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_random_shared_secret
_test_random_shared_secret:             ## @test_random_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	%rbx
	subq	$2056, %rsp                     ## imm = 0x808
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$1024, %edi                     ## imm = 0x400
	callq	_ff_dh_init
	movq	%rax, %r15
	movl	$1024, %edi                     ## imm = 0x400
	callq	_ff_dh_init
	movq	%rax, %r14
	testq	%r15, %r15
	je	LBB0_10
## %bb.1:
	testq	%r14, %r14
	je	LBB0_10
## %bb.2:
	movq	%r15, %rdi
	callq	_ff_dh_generate_public_key
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	movq	%r14, %rdi
	callq	_ff_dh_generate_public_key
	testl	%eax, %eax
	js	LBB0_11
## %bb.4:
	leaq	-544(%rbp), %rsi
	movq	%r15, %rdi
	movl	$512, %edx                      ## imm = 0x200
	callq	_ff_dh_write_public_key
	testl	%eax, %eax
	js	LBB0_11
## %bb.5:
	leaq	-1056(%rbp), %rsi
	movq	%r14, %rdi
	movl	$512, %edx                      ## imm = 0x200
	callq	_ff_dh_write_public_key
	testl	%eax, %eax
	js	LBB0_11
## %bb.6:
	leaq	-1056(%rbp), %rsi
	leaq	-1568(%rbp), %rcx
	movq	%r15, %rdi
	movl	$512, %edx                      ## imm = 0x200
	movl	$512, %r8d                      ## imm = 0x200
	callq	_ff_dh_compute_shared_secret_key
	testl	%eax, %eax
	js	LBB0_11
## %bb.7:
	leaq	-544(%rbp), %rsi
	leaq	-2080(%rbp), %rcx
	movq	%r14, %rdi
	movl	$512, %edx                      ## imm = 0x200
	movl	$512, %r8d                      ## imm = 0x200
	callq	_ff_dh_compute_shared_secret_key
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_17
## %bb.8:
	leaq	-1568(%rbp), %rdi
	leaq	-2080(%rbp), %rsi
	movl	$512, %edx                      ## imm = 0x200
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_16
## %bb.9:
	leaq	L_str.2(%rip), %rdi
	callq	_puts
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_11:
	movl	%eax, %ebx
LBB0_17:
	movq	%r15, %rdi
	callq	_ff_dh_free
	movq	%r14, %rdi
	callq	_ff_dh_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movl	%ebx, %eax
	addq	$2056, %rsp                     ## imm = 0x808
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_17
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"Generated shared key ok"

L_str.2:                                ## @str.2
	.asciz	"Mismatched generated shared key"

	.no_dead_strip	_test_random_shared_secret
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_random_shared_secret
_test_random_shared_secret:             ; @test_random_shared_secret
	.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
	sub	sp, sp, #2064
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	w0, #1024
	bl	_ff_dh_init
	mov	x19, x0
	mov	w0, #1024
	bl	_ff_dh_init
	mov	x20, x0
	cbz	x19, LBB0_10
; %bb.1:
	cbz	x20, LBB0_10
; %bb.2:
	mov	x0, x19
	bl	_ff_dh_generate_public_key
	tbnz	w0, #31, LBB0_11
; %bb.3:
	mov	x0, x20
	bl	_ff_dh_generate_public_key
	tbnz	w0, #31, LBB0_11
; %bb.4:
	add	x1, sp, #1544
	mov	x0, x19
	mov	w2, #512
	bl	_ff_dh_write_public_key
	tbnz	w0, #31, LBB0_11
; %bb.5:
	add	x1, sp, #1032
	mov	x0, x20
	mov	w2, #512
	bl	_ff_dh_write_public_key
	tbnz	w0, #31, LBB0_11
; %bb.6:
	add	x1, sp, #1032
	add	x3, sp, #520
	mov	x0, x19
	mov	w2, #512
	mov	w4, #512
	bl	_ff_dh_compute_shared_secret_key
	tbnz	w0, #31, LBB0_11
; %bb.7:
	add	x1, sp, #1544
	add	x3, sp, #8
	mov	x0, x20
	mov	w2, #512
	mov	w4, #512
	bl	_ff_dh_compute_shared_secret_key
	mov	x21, x0
	tbnz	w0, #31, LBB0_12
; %bb.8:
	add	x0, sp, #520
	add	x1, sp, #8
	mov	w2, #512
	bl	_memcmp
	cbz	x0, LBB0_14
; %bb.9:
Lloh3:
	adrp	x0, l_str.2@PAGE
Lloh4:
	add	x0, x0, l_str.2@PAGEOFF
	bl	_puts
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	b	LBB0_12
LBB0_10:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_11:
	mov	x21, x0
LBB0_12:
	mov	x0, x19
	bl	_ff_dh_free
	mov	x0, x20
	bl	_ff_dh_free
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.13:
	mov	x0, x21
	add	sp, sp, #2064
	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_14:
Lloh14:
	adrp	x0, l_str@PAGE
Lloh15:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_12
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"Generated shared key ok"

l_str.2:                                ; @str.2
	.asciz	"Mismatched generated shared key"

	.no_dead_strip	_test_random_shared_secret
.subsections_via_symbols
