#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 */
scalar_t__ Toeplitz_check_all(int, double, int, int, double, int, double);
scalar_t__ check_3_all(int, int, double, int, double);
scalar_t__ check_3_all_(int, int, double, int, double);
scalar_t__ check_cg_pc(int, int, double, int, double);
scalar_t__ check_gmres_m_pc(int, int, int, double, int, double);
scalar_t__ check_gpb_pc(int, int, double, int, double);
scalar_t__ check_otmk_pc(int, int, int, double, int, double);
scalar_t__ check_sta2_pc(int, int, double, int, double);
scalar_t__ check_sta_pc(int, int, double, int, double);
scalar_t__ check_symmetric_all(int, int, int, double, int, double);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int check = 0;
  check += check_3_all(2000, 20, 1.0e-12, 1, 1.0e-12);
  check += check_3_all_(2000, 20, 1.0e-12, 1, 3.2e-12);
  check += check_symmetric_all(500, 10000, 20, 1.0e-12, 1, 6.7e-9);
  check += Toeplitz_check_all(1000, 1.5, 10000, 20, 1.0e-7, 1, 3.5e-6);
  int n = 2000;
  check += check_cg_pc(n, 1000, 1.0e-12, 1, 3.0e-10);
  check += check_gmres_m_pc(n, 1000, 20, 1.0e-12, 1, 7.0e-10);
  check += check_otmk_pc(n, 1000, 20, 1.0e-12, 1, 5.5e-9);
  check += check_sta_pc(n, 1000, 1.0e-12, 1, 1.0e-8);
  check += check_sta2_pc(n, 1000, 1.0e-12, 1, 8.0e-9);
  check += check_gpb_pc(n, 1000, 1.0e-12, 1, 1.1e-8);
  fprintf(stdout,
          "==================================================\n"
          "TOTAL ERRORS : %d\n",
          check);
  if (check == 0) {
    fprintf(stdout, "Conglaturation!! ALL TESTS PASSED\n");
  } else {
    fprintf(stdout, "sorry. some test(s) FAILED\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    $0x7d0,%edi
mov    $0x14,%esi
movsd  0xe21(%rip),%xmm1
mov    $0x1,%edx
movaps %xmm1,%xmm0
call   1050 <check_3_all@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x7d0,%edi
mov    $0x14,%esi
movsd  0xdf5(%rip),%xmm0
mov    $0x1,%edx
movsd  0xe40(%rip),%xmm1
call   1030 <check_3_all_@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x1f4,%edi
mov    $0x2710,%esi
mov    $0x14,%edx
movsd  0xdbf(%rip),%xmm0
mov    $0x1,%ecx
movsd  0xe02(%rip),%xmm1
call   10d0 <check_symmetric_all@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x3e8,%edi
movsd  0xdcb(%rip),%xmm0
mov    $0x2710,%esi
mov    $0x14,%edx
movsd  0xdc1(%rip),%xmm1
mov    $0x1,%ecx
movsd  0xdbc(%rip),%xmm2
call   1070 <Toeplitz_check_all@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
movl   $0x7d0,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x3e8,%esi
movsd  0xd4b(%rip),%xmm0
mov    $0x1,%edx
movsd  0xd6e(%rip),%xmm1
call   10b0 <check_cg_pc@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x3e8,%esi
mov    $0x14,%edx
movsd  0xd17(%rip),%xmm0
mov    $0x1,%ecx
movsd  0xd32(%rip),%xmm1
call   1060 <check_gmres_m_pc@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x3e8,%esi
mov    $0x14,%edx
movsd  0xce3(%rip),%xmm0
mov    $0x1,%ecx
movsd  0xcf6(%rip),%xmm1
call   10a0 <check_otmk_pc@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x3e8,%esi
movsd  0xcb4(%rip),%xmm0
mov    $0x1,%edx
movsd  0xcbf(%rip),%xmm1
call   10c0 <check_sta_pc@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x3e8,%esi
movsd  0xc85(%rip),%xmm0
mov    $0x1,%edx
movsd  0xc88(%rip),%xmm1
call   1040 <check_sta2_pc@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x3e8,%esi
movsd  0xc56(%rip),%xmm0
mov    $0x1,%edx
movsd  0xc51(%rip),%xmm1
call   1080 <check_gpb_pc@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    0x2c10(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xc84(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
cmpl   $0x0,-0x14(%rbp)
jne    1409 <main+0x259>
mov    0x2bec(%rip),%rax
mov    (%rax),%edi
lea    0xca9(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1420 <main+0x270>
mov    0x2bd0(%rip),%rax
mov    (%rax),%edi
lea    0xcb0(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
movsd  0xe43(%rip),%xmm0
mov    $0x7d0,%edi
mov    $0x14,%esi
mov    $0x1,%edx
movaps %xmm0,%xmm1
call   1050 <check_3_all@plt>
mov    %rax,%rbx
movsd  0xe29(%rip),%xmm1
mov    $0x7d0,%edi
mov    $0x14,%esi
movsd  0xe0f(%rip),%xmm0
mov    $0x1,%edx
call   1030 <check_3_all_@plt>
add    %eax,%ebx
movsd  0xe0b(%rip),%xmm1
mov    $0x1f4,%edi
mov    $0x2710,%esi
mov    $0x14,%edx
movsd  0xde4(%rip),%xmm0
mov    $0x1,%ecx
call   10d0 <check_symmetric_all@plt>
add    %eax,%ebx
movsd  0xde8(%rip),%xmm0
movsd  0xde8(%rip),%xmm1
movsd  0xde8(%rip),%xmm2
mov    $0x3e8,%edi
mov    $0x2710,%esi
mov    $0x14,%edx
mov    $0x1,%ecx
call   1070 <Toeplitz_check_all@plt>
add    %eax,%ebx
movsd  0xdcd(%rip),%xmm1
mov    $0x7d0,%edi
mov    $0x3e8,%esi
movsd  0xd8b(%rip),%xmm0
mov    $0x1,%edx
call   10b0 <check_cg_pc@plt>
add    %eax,%ebx
movsd  0xdaf(%rip),%xmm1
mov    $0x7d0,%edi
mov    $0x3e8,%esi
mov    $0x14,%edx
movsd  0xd60(%rip),%xmm0
mov    $0x1,%ecx
call   1060 <check_gmres_m_pc@plt>
add    %eax,%ebx
movsd  0xd8c(%rip),%xmm1
mov    $0x7d0,%edi
mov    $0x3e8,%esi
mov    $0x14,%edx
movsd  0xd35(%rip),%xmm0
mov    $0x1,%ecx
call   10a0 <check_otmk_pc@plt>
add    %eax,%ebx
movsd  0xd69(%rip),%xmm1
mov    $0x7d0,%edi
mov    $0x3e8,%esi
movsd  0xd0f(%rip),%xmm0
mov    $0x1,%edx
call   10c0 <check_sta_pc@plt>
add    %eax,%ebx
movsd  0xd4b(%rip),%xmm1
mov    $0x7d0,%edi
mov    $0x3e8,%esi
movsd  0xce9(%rip),%xmm0
mov    $0x1,%edx
call   1040 <check_sta2_pc@plt>
add    %eax,%ebx
movsd  0xd2d(%rip),%xmm1
mov    $0x7d0,%edi
mov    $0x3e8,%esi
movsd  0xcc3(%rip),%xmm0
mov    $0x1,%edx
call   1080 <check_gpb_pc@plt>
mov    0x2c92(%rip),%r15
mov    (%r15),%edi
lea    0xd08(%rip),%rsi
add    %eax,%ebx
lea    0xd45(%rip),%rax
lea    0xd61(%rip),%r14
cmove  %rax,%r14
mov    %ebx,%edx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    (%r15),%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [70 x i8] c"==================================================\0ATOTAL ERRORS : %d\0A\00"
@.str.1 = [35 x i8] c"Conglaturation!! ALL TESTS PASSED\0A\00"
@.str.2 = [28 x i8] c"sorry. some test(s) FAILED\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%8 = call i64 @check_3_all(i32 2000, i32 20, double 0x3D719799812DEA11, i32 1, double 0x3D719799812DEA11)
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = add nsw i64 %10, %8
%12 = trunc i64 %11 to i32
store i32 %12, i32* %6
%13 = call i64 @check_3_all_(i32 2000, i32 20, double 0x3D719799812DEA11, i32 1, double 3.200000e-12)
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = add nsw i64 %15, %13
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
%18 = call i64 @check_symmetric_all(i32 500, i32 10000, i32 20, double 0x3D719799812DEA11, i32 1, double 6.700000e-09)
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = add nsw i64 %20, %18
%22 = trunc i64 %21 to i32
store i32 %22, i32* %6
%23 = call i64 @Toeplitz_check_all(i32 1000, double 1.500000e+00, i32 10000, i32 20, double 0x3E7AD7F29ABCAF48, i32 1, double 3.500000e-06)
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = add nsw i64 %25, %23
%27 = trunc i64 %26 to i32
store i32 %27, i32* %6
store i32 2000, i32* %7
%28 = load i32, i32* %7
%29 = call i64 @check_cg_pc(i32 %28, i32 1000, double 0x3D719799812DEA11, i32 1, double 3.000000e-10)
%30 = load i32, i32* %6
%31 = sext i32 %30 to i64
%32 = add nsw i64 %31, %29
%33 = trunc i64 %32 to i32
store i32 %33, i32* %6
%34 = load i32, i32* %7
%35 = call i64 @check_gmres_m_pc(i32 %34, i32 1000, i32 20, double 0x3D719799812DEA11, i32 1, double 0x3E080D43DE9CC603)
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = add nsw i64 %37, %35
%39 = trunc i64 %38 to i32
store i32 %39, i32* %6
%40 = load i32, i32* %7
%41 = call i64 @check_otmk_pc(i32 %40, i32 1000, i32 20, double 0x3D719799812DEA11, i32 1, double 5.500000e-09)
%42 = load i32, i32* %6
%43 = sext i32 %42 to i64
%44 = add nsw i64 %43, %41
%45 = trunc i64 %44 to i32
store i32 %45, i32* %6
%46 = load i32, i32* %7
%47 = call i64 @check_sta_pc(i32 %46, i32 1000, double 0x3D719799812DEA11, i32 1, double 1.000000e-08)
%48 = load i32, i32* %6
%49 = sext i32 %48 to i64
%50 = add nsw i64 %49, %47
%51 = trunc i64 %50 to i32
store i32 %51, i32* %6
%52 = load i32, i32* %7
%53 = call i64 @check_sta2_pc(i32 %52, i32 1000, double 0x3D719799812DEA11, i32 1, double 8.000000e-09)
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = add nsw i64 %55, %53
%57 = trunc i64 %56 to i32
store i32 %57, i32* %6
%58 = load i32, i32* %7
%59 = call i64 @check_gpb_pc(i32 %58, i32 1000, double 0x3D719799812DEA11, i32 1, double 1.100000e-08)
%60 = load i32, i32* %6
%61 = sext i32 %60 to i64
%62 = add nsw i64 %61, %59
%63 = trunc i64 %62 to i32
store i32 %63, i32* %6
%64 = load i32, i32* @stdout
%65 = load i32, i32* %6
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %65)
%67 = load i32, i32* %6
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %72
69: ; preds = %2
%70 = load i32, i32* @stdout
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %70, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %75
72: ; preds = %2
%73 = load i32, i32* @stdout
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %75
75: ; preds = %72, %69
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [70 x i8] c"==================================================\0ATOTAL ERRORS : %d\0A\00"
@.str.1 = [35 x i8] c"Conglaturation!! ALL TESTS PASSED\0A\00"
@.str.2 = [28 x i8] c"sorry. some test(s) FAILED\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @check_3_all(i32 2000, i32 20, double 0x3D719799812DEA11, i32 1, double 0x3D719799812DEA11)
%4 = tail call i64 @check_3_all_(i32 2000, i32 20, double 0x3D719799812DEA11, i32 1, double 3.200000e-12)
%5 = add i64 %4, %3
%6 = tail call i64 @check_symmetric_all(i32 500, i32 10000, i32 20, double 0x3D719799812DEA11, i32 1, double 6.700000e-09)
%7 = add i64 %5, %6
%8 = tail call i64 @Toeplitz_check_all(i32 1000, double 1.500000e+00, i32 10000, i32 20, double 0x3E7AD7F29ABCAF48, i32 1, double 3.500000e-06)
%9 = add i64 %7, %8
%10 = tail call i64 @check_cg_pc(i32 2000, i32 1000, double 0x3D719799812DEA11, i32 1, double 3.000000e-10)
%11 = add i64 %9, %10
%12 = tail call i64 @check_gmres_m_pc(i32 2000, i32 1000, i32 20, double 0x3D719799812DEA11, i32 1, double 0x3E080D43DE9CC603)
%13 = add i64 %11, %12
%14 = tail call i64 @check_otmk_pc(i32 2000, i32 1000, i32 20, double 0x3D719799812DEA11, i32 1, double 5.500000e-09)
%15 = add i64 %13, %14
%16 = tail call i64 @check_sta_pc(i32 2000, i32 1000, double 0x3D719799812DEA11, i32 1, double 1.000000e-08)
%17 = add i64 %15, %16
%18 = tail call i64 @check_sta2_pc(i32 2000, i32 1000, double 0x3D719799812DEA11, i32 1, double 8.000000e-09)
%19 = add i64 %17, %18
%20 = tail call i64 @check_gpb_pc(i32 2000, i32 1000, double 0x3D719799812DEA11, i32 1, double 1.100000e-08)
%21 = add i64 %19, %20
%22 = trunc i64 %21 to i32
%23 = load i32, i32* @stdout
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %22)
%25 = icmp eq i32 %22, 0
%26 = load i32, i32* @stdout
%27 = select i1 %25, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0)
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* %27)
ret i32 0
}