#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ CRYPTO_mem_leaks_fp(int /*<<< orphan*/);
int /*<<< orphan*/ ENGINE_cleanup();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ ERR_load_crypto_strings();
int /*<<< orphan*/ ERR_remove_thread_state(int /*<<< orphan*/ *);
int /*<<< orphan*/ char2_field_tests();
int /*<<< orphan*/ internal_curve_test();
int /*<<< orphan*/ nistp_tests();
int /*<<< orphan*/ prime_field_tests();
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  ERR_load_crypto_strings();
  prime_field_tests();
  puts("");
  char2_field_tests();
  nistp_tests();
  internal_curve_test();
  ENGINE_cleanup();
  CRYPTO_cleanup_all_ex_data();
  ERR_free_strings();
  ERR_remove_thread_state(NULL);
  CRYPTO_mem_leaks_fp(stderr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   10d0 <ERR_load_crypto_strings@plt>
mov    $0x0,%al
call   10b0 <prime_field_tests@plt>
lea    0xe25(%rip),%rdi
call   1060 <puts@plt>
mov    $0x0,%al
call   1040 <char2_field_tests@plt>
mov    $0x0,%al
call   1030 <nistp_tests@plt>
mov    $0x0,%al
call   1050 <internal_curve_test@plt>
mov    $0x0,%al
call   10a0 <ENGINE_cleanup@plt>
mov    $0x0,%al
call   1090 <CRYPTO_cleanup_all_ex_data@plt>
mov    $0x0,%al
call   10c0 <ERR_free_strings@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <ERR_remove_thread_state@plt>
mov    0x2dc6(%rip),%rax
mov    (%rax),%edi
call   1080 <CRYPTO_mem_leaks_fp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   10d0 <ERR_load_crypto_strings@plt>
xor    %eax,%eax
call   10b0 <prime_field_tests@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
call   1050 <char2_field_tests@plt>
xor    %eax,%eax
call   1030 <nistp_tests@plt>
xor    %eax,%eax
call   1060 <internal_curve_test@plt>
xor    %eax,%eax
call   10a0 <ENGINE_cleanup@plt>
xor    %eax,%eax
call   1090 <CRYPTO_cleanup_all_ex_data@plt>
xor    %eax,%eax
call   10c0 <ERR_free_strings@plt>
xor    %edi,%edi
call   1070 <ERR_remove_thread_state@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
call   1080 <CRYPTO_mem_leaks_fp@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@stderr = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @ERR_load_crypto_strings()
%7 = call i32 (...) @prime_field_tests()
%8 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @char2_field_tests()
%10 = call i32 (...) @nistp_tests()
%11 = call i32 (...) @internal_curve_test()
%12 = call i32 (...) @ENGINE_cleanup()
%13 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
%14 = call i32 (...) @ERR_free_strings()
%15 = call i32 @ERR_remove_thread_state(i32* null)
%16 = load i32, i32* @stderr
%17 = call i32 @CRYPTO_mem_leaks_fp(i32 %16)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ERR_load_crypto_strings()
%4 = tail call i32 (...) @prime_field_tests()
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 (...) @char2_field_tests()
%7 = tail call i32 (...) @nistp_tests()
%8 = tail call i32 (...) @internal_curve_test()
%9 = tail call i32 (...) @ENGINE_cleanup()
%10 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
%11 = tail call i32 (...) @ERR_free_strings()
%12 = tail call i32 @ERR_remove_thread_state(i32* null)
%13 = load i32, i32* @stderr
%14 = tail call i32 @CRYPTO_mem_leaks_fp(i32 %13)
ret i32 0
}