#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ areas_reference(int);
int /*<<< orphan*/ asc_Ag_reference(int);
int /*<<< orphan*/ asc_B3g_reference(int);
int /*<<< orphan*/ asc_neq_B3g_reference(int);
int /*<<< orphan*/ check_unsigned_error(double, int /*<<< orphan*/, double);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ mep_reference(int);
int /*<<< orphan*/ *stderr;
int test_surface_functions(FILE *fp, int grid_size, double mep[grid_size],
                           double asc_Ag[grid_size], double asc_B3g[grid_size],
                           double asc_neq_B3g[grid_size],
                           double areas[grid_size]) {
  const int MEP_ERROR = 1;
  const int ASC_Ag_ERROR = 2;
  const int ASC_B3g_ERROR = 3;
  const int ASC_NEQ_B3g_ERROR = 4;
  const int AREAS_ERROR = 5;
  for (int i = 0; i < grid_size; i++) {
    if (!check_unsigned_error(mep[i], mep_reference(i), 1.0e-07)) {
      fprintf(stderr, "%s\n",
              "Error in MEP, please file an issue on: "
              "https://github.com/PCMSolver/pcmsolver");
      return MEP_ERROR;
    }
    if (!check_unsigned_error(asc_Ag[i], asc_Ag_reference(i), 1.0e-07)) {
      fprintf(stderr, "%s\n",
              "Error in ASC Ag, please file an issue on: "
              "https://github.com/PCMSolver/pcmsolver");
      return ASC_Ag_ERROR;
    }
    if (!check_unsigned_error(asc_B3g[i], asc_B3g_reference(i), 1.0e-07)) {
      fprintf(stderr, "%s\n",
              "Error in ASC B3g, please file an issue on: "
              "https://github.com/PCMSolver/pcmsolver");
      return ASC_B3g_ERROR;
    }
    if (!check_unsigned_error(asc_neq_B3g[i], asc_neq_B3g_reference(i),
                              1.0e-07)) {
      fprintf(stderr, "%s\n",
              "Error in nonequilibrium ASC B3g, please file an "
              "issue on: https://github.com/PCMSolver/pcmsolver");
      return ASC_NEQ_B3g_ERROR;
    }
    if (!check_unsigned_error(areas[i], areas_reference(i), 1.0e-07)) {
      fprintf(stderr, "%s\n",
              "Error in finite elements areas, please file an issue "
              "on: https://github.com/PCMSolver/pcmsolver");
      return AREAS_ERROR;
    }
  }
  fprintf(fp, "%s\n", "Test on MEP: PASSED");
  fprintf(fp, "%s\n", "Test on ASC Ag: PASSED");
  fprintf(fp, "%s\n", "Test on ASC B3g: PASSED");
  fprintf(fp, "%s\n", "Test on nonequilibrium ASC in B3g symmetry: PASSED");
  fprintf(fp, "%s\n", "Test on finite element areas: PASSED");
  return 0;
}


x86 assembly (clang, -O0):
<test_surface_functions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
movl   $0x2,-0x40(%rbp)
movl   $0x3,-0x44(%rbp)
movl   $0x4,-0x48(%rbp)
movl   $0x5,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13bf <test_surface_functions+0x24f>
mov    -0x20(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x50(%rbp),%edi
call   1030 <mep_reference@plt>
movsd  -0x58(%rbp),%xmm0
mov    %eax,%edi
movsd  0xe0b(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
cmp    $0x0,%eax
jne    122c <test_surface_functions+0xbc>
mov    0x2dd6(%rip),%rax
mov    (%rax),%rdi
lea    0xdf4(%rip),%rsi
lea    0xdf1(%rip),%rdx
call   1070 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1439 <test_surface_functions+0x2c9>
mov    -0x28(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x50(%rbp),%edi
call   1060 <asc_Ag_reference@plt>
movsd  -0x60(%rbp),%xmm0
mov    %eax,%edi
movsd  0xdab(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
cmp    $0x0,%eax
jne    128c <test_surface_functions+0x11c>
mov    0x2d76(%rip),%rax
mov    (%rax),%rdi
lea    0xd94(%rip),%rsi
lea    0xddf(%rip),%rdx
call   1070 <fprintf@plt>
movl   $0x2,-0x4(%rbp)
jmp    1439 <test_surface_functions+0x2c9>
mov    -0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x50(%rbp),%edi
call   1040 <asc_B3g_reference@plt>
movsd  -0x68(%rbp),%xmm0
mov    %eax,%edi
movsd  0xd4b(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
cmp    $0x0,%eax
jne    12ec <test_surface_functions+0x17c>
mov    0x2d16(%rip),%rax
mov    (%rax),%rdi
lea    0xd34(%rip),%rsi
lea    0xdd0(%rip),%rdx
call   1070 <fprintf@plt>
movl   $0x3,-0x4(%rbp)
jmp    1439 <test_surface_functions+0x2c9>
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x50(%rbp),%edi
call   1050 <asc_neq_B3g_reference@plt>
movsd  -0x70(%rbp),%xmm0
mov    %eax,%edi
movsd  0xceb(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
cmp    $0x0,%eax
jne    134c <test_surface_functions+0x1dc>
mov    0x2cb6(%rip),%rax
mov    (%rax),%rdi
lea    0xcd4(%rip),%rsi
lea    0xdc2(%rip),%rdx
call   1070 <fprintf@plt>
movl   $0x4,-0x4(%rbp)
jmp    1439 <test_surface_functions+0x2c9>
mov    0x10(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x50(%rbp),%edi
call   1080 <areas_reference@plt>
movsd  -0x78(%rbp),%xmm0
mov    %eax,%edi
movsd  0xc8b(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
cmp    $0x0,%eax
jne    13ac <test_surface_functions+0x23c>
mov    0x2c56(%rip),%rax
mov    (%rax),%rdi
lea    0xc74(%rip),%rsi
lea    0xdc3(%rip),%rdx
call   1070 <fprintf@plt>
movl   $0x5,-0x4(%rbp)
jmp    1439 <test_surface_functions+0x2c9>
jmp    13b1 <test_surface_functions+0x241>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11c0 <test_surface_functions+0x50>
mov    -0x10(%rbp),%rdi
lea    0xc3e(%rip),%rsi
lea    0xded(%rip),%rdx
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xc27(%rip),%rsi
lea    0xdea(%rip),%rdx
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xc10(%rip),%rsi
lea    0xdea(%rip),%rdx
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xbf9(%rip),%rsi
lea    0xdeb(%rip),%rdx
call   1070 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xbe2(%rip),%rsi
lea    0xe07(%rip),%rdx
call   1070 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_surface_functions>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
test   %esi,%esi
jle    12a1 <test_surface_functions+0x131>
mov    %r9,%r15
mov    %r8,%r12
mov    %rcx,%r13
mov    %rdx,%rbx
mov    %esi,%r14d
xor    %ebp,%ebp
nopl   0x0(%rax)
movsd  (%rbx,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebp,%edi
call   1030 <mep_reference@plt>
movsd  0x8(%rsp),%xmm0
mov    %eax,%edi
movsd  0xe3e(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
test   %eax,%eax
je     130e <test_surface_functions+0x19e>
movsd  0x0(%r13,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebp,%edi
call   1060 <asc_Ag_reference@plt>
movsd  0x8(%rsp),%xmm0
mov    %eax,%edi
movsd  0xe0d(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
test   %eax,%eax
je     1335 <test_surface_functions+0x1c5>
movsd  (%r12,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebp,%edi
call   1040 <asc_B3g_reference@plt>
movsd  0x8(%rsp),%xmm0
mov    %eax,%edi
movsd  0xddd(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
test   %eax,%eax
je     1359 <test_surface_functions+0x1e9>
movsd  (%r15,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebp,%edi
call   1050 <asc_neq_B3g_reference@plt>
movsd  0x8(%rsp),%xmm0
mov    %eax,%edi
movsd  0xdad(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
test   %eax,%eax
je     137d <test_surface_functions+0x20d>
mov    0x50(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebp,%edi
call   1080 <areas_reference@plt>
movsd  0x8(%rsp),%xmm0
mov    %eax,%edi
movsd  0xd79(%rip),%xmm1
call   1090 <check_unsigned_error@plt>
test   %eax,%eax
je     13a1 <test_surface_functions+0x231>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    11a0 <test_surface_functions+0x30>
lea    0xd60(%rip),%rbx
lea    0xf0f(%rip),%rdx
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1070 <fprintf@plt>
lea    0xf0c(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1070 <fprintf@plt>
lea    0xf11(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1070 <fprintf@plt>
lea    0xf17(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1070 <fprintf@plt>
lea    0xf38(%rip),%rdx
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1070 <fprintf@plt>
xor    %eax,%eax
jmp    13c3 <test_surface_functions+0x253>
mov    0x2ccb(%rip),%rax
mov    (%rax),%rdi
lea    0xce9(%rip),%rsi
lea    0xce6(%rip),%rdx
call   1070 <fprintf@plt>
mov    $0x1,%eax
jmp    13c3 <test_surface_functions+0x253>
mov    0x2ca4(%rip),%rax
mov    (%rax),%rdi
lea    0xcc2(%rip),%rsi
lea    0xd0d(%rip),%rdx
call   1070 <fprintf@plt>
mov    $0x2,%eax
jmp    13c3 <test_surface_functions+0x253>
mov    0x2c80(%rip),%rax
mov    (%rax),%rdi
lea    0xc9e(%rip),%rsi
lea    0xd3a(%rip),%rdx
call   1070 <fprintf@plt>
mov    $0x3,%eax
jmp    13c3 <test_surface_functions+0x253>
mov    0x2c5c(%rip),%rax
mov    (%rax),%rdi
lea    0xc7a(%rip),%rsi
lea    0xd68(%rip),%rdx
call   1070 <fprintf@plt>
mov    $0x4,%eax
jmp    13c3 <test_surface_functions+0x253>
mov    0x2c38(%rip),%rax
mov    (%rax),%rdi
lea    0xc56(%rip),%rsi
lea    0xda5(%rip),%rdx
call   1070 <fprintf@plt>
mov    $0x5,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32* null
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [78 x i8] c"Error in MEP, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.2 = [81 x i8] c"Error in ASC Ag, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.3 = [82 x i8] c"Error in ASC B3g, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.4 = [97 x i8] c"Error in nonequilibrium ASC B3g, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.5 = [96 x i8] c"Error in finite elements areas, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.6 = [20 x i8] c"Test on MEP: PASSED\00"
@.str.7 = [23 x i8] c"Test on ASC Ag: PASSED\00"
@.str.8 = [24 x i8] c"Test on ASC B3g: PASSED\00"
@.str.9 = [51 x i8] c"Test on nonequilibrium ASC in B3g symmetry: PASSED\00"
@.str.10 = [37 x i8] c"Test on finite element areas: PASSED\00"
define i32 @test_surface_functions(i32* %0, i32 %1, double* %2, double* %3, double* %4, double* %5, double* %6) {
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
store i32* %0, i32** %9
store i32 %1, i32* %10
store double* %2, double** %11
store double* %3, double** %12
store double* %4, double** %13
store double* %5, double** %14
store double* %6, double** %15
%22 = load i32, i32* %10
%23 = zext i32 %22 to i64
%24 = load i32, i32* %10
%25 = zext i32 %24 to i64
%26 = load i32, i32* %10
%27 = zext i32 %26 to i64
%28 = load i32, i32* %10
%29 = zext i32 %28 to i64
%30 = load i32, i32* %10
%31 = zext i32 %30 to i64
store i32 1, i32* %16
store i32 2, i32* %17
store i32 3, i32* %18
store i32 4, i32* %19
store i32 5, i32* %20
store i32 0, i32* %21
br label %32
32: ; preds = %102, %7
%33 = load i32, i32* %21
%34 = load i32, i32* %10
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %105
36: ; preds = %32
%37 = load double*, double** %11
%38 = load i32, i32* %21
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %37, i64 %39
%41 = load double, double* %40
%42 = load i32, i32* %21
%43 = call i32 @mep_reference(i32 %42)
%44 = call i32 @check_unsigned_error(double %41, i32 %43, double 0x3E7AD7F29ABCAF48)
%45 = icmp ne i32 %44, 0
br i1 %45, label %49, label %46
46: ; preds = %36
%47 = load i32*, i32** @stderr
%48 = call i32 @fprintf(i32* %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %8
br label %116
49: ; preds = %36
%50 = load double*, double** %12
%51 = load i32, i32* %21
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
%54 = load double, double* %53
%55 = load i32, i32* %21
%56 = call i32 @asc_Ag_reference(i32 %55)
%57 = call i32 @check_unsigned_error(double %54, i32 %56, double 0x3E7AD7F29ABCAF48)
%58 = icmp ne i32 %57, 0
br i1 %58, label %62, label %59
59: ; preds = %49
%60 = load i32*, i32** @stderr
%61 = call i32 @fprintf(i32* %60, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
store i32 2, i32* %8
br label %116
62: ; preds = %49
%63 = load double*, double** %13
%64 = load i32, i32* %21
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
%67 = load double, double* %66
%68 = load i32, i32* %21
%69 = call i32 @asc_B3g_reference(i32 %68)
%70 = call i32 @check_unsigned_error(double %67, i32 %69, double 0x3E7AD7F29ABCAF48)
%71 = icmp ne i32 %70, 0
br i1 %71, label %75, label %72
72: ; preds = %62
%73 = load i32*, i32** @stderr
%74 = call i32 @fprintf(i32* %73, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.3, i64 0, i64 0))
store i32 3, i32* %8
br label %116
75: ; preds = %62
%76 = load double*, double** %14
%77 = load i32, i32* %21
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
%80 = load double, double* %79
%81 = load i32, i32* %21
%82 = call i32 @asc_neq_B3g_reference(i32 %81)
%83 = call i32 @check_unsigned_error(double %80, i32 %82, double 0x3E7AD7F29ABCAF48)
%84 = icmp ne i32 %83, 0
br i1 %84, label %88, label %85
85: ; preds = %75
%86 = load i32*, i32** @stderr
%87 = call i32 @fprintf(i32* %86, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.4, i64 0, i64 0))
store i32 4, i32* %8
br label %116
88: ; preds = %75
%89 = load double*, double** %15
%90 = load i32, i32* %21
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds double, double* %89, i64 %91
%93 = load double, double* %92
%94 = load i32, i32* %21
%95 = call i32 @areas_reference(i32 %94)
%96 = call i32 @check_unsigned_error(double %93, i32 %95, double 0x3E7AD7F29ABCAF48)
%97 = icmp ne i32 %96, 0
br i1 %97, label %101, label %98
98: ; preds = %88
%99 = load i32*, i32** @stderr
%100 = call i32 @fprintf(i32* %99, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.5, i64 0, i64 0))
store i32 5, i32* %8
br label %116
101: ; preds = %88
br label %102
102: ; preds = %101
%103 = load i32, i32* %21
%104 = add nsw i32 %103, 1
store i32 %104, i32* %21
br label %32
105: ; preds = %32
%106 = load i32*, i32** %9
%107 = call i32 @fprintf(i32* %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%108 = load i32*, i32** %9
%109 = call i32 @fprintf(i32* %108, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%110 = load i32*, i32** %9
%111 = call i32 @fprintf(i32* %110, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%112 = load i32*, i32** %9
%113 = call i32 @fprintf(i32* %112, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0))
%114 = load i32*, i32** %9
%115 = call i32 @fprintf(i32* %114, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %8
br label %116
116: ; preds = %105, %98, %85, %72, %59, %46
%117 = load i32, i32* %8
ret i32 %117
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [78 x i8] c"Error in MEP, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.2 = [81 x i8] c"Error in ASC Ag, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.3 = [82 x i8] c"Error in ASC B3g, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.4 = [97 x i8] c"Error in nonequilibrium ASC B3g, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.5 = [96 x i8] c"Error in finite elements areas, please file an issue on: https://github.com/PCMSolver/pcmsolver\00"
@.str.6 = [20 x i8] c"Test on MEP: PASSED\00"
@.str.7 = [23 x i8] c"Test on ASC Ag: PASSED\00"
@.str.8 = [24 x i8] c"Test on ASC B3g: PASSED\00"
@.str.9 = [51 x i8] c"Test on nonequilibrium ASC in B3g symmetry: PASSED\00"
@.str.10 = [37 x i8] c"Test on finite element areas: PASSED\00"
define i32 @test_surface_functions(i32* nocapture %0, i32 %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture %6) {
%8 = icmp sgt i32 %1, 0
br i1 %8, label %9, label %61
9: ; preds = %7
%10 = zext i32 %1 to i64
br label %13
11: ; preds = %51
%12 = icmp eq i64 %57, %10
br i1 %12, label %61, label %13
13: ; preds = %9, %11
%14 = phi i64 [ 0, %9 ], [ %57, %11 ]
%15 = getelementptr inbounds double, double* %2, i64 %14
%16 = load double, double* %15
%17 = trunc i64 %14 to i32
%18 = tail call i32 @mep_reference(i32 %17)
%19 = tail call i32 @check_unsigned_error(double %16, i32 %18, double 0x3E7AD7F29ABCAF48)
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %13
%22 = load i32*, i32** @stderr
%23 = tail call i32 @fprintf(i32* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.1, i64 0, i64 0))
br label %67
24: ; preds = %13
%25 = getelementptr inbounds double, double* %3, i64 %14
%26 = load double, double* %25
%27 = tail call i32 @asc_Ag_reference(i32 %17)
%28 = tail call i32 @check_unsigned_error(double %26, i32 %27, double 0x3E7AD7F29ABCAF48)
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %24
%31 = load i32*, i32** @stderr
%32 = tail call i32 @fprintf(i32* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
br label %67
33: ; preds = %24
%34 = getelementptr inbounds double, double* %4, i64 %14
%35 = load double, double* %34
%36 = tail call i32 @asc_B3g_reference(i32 %17)
%37 = tail call i32 @check_unsigned_error(double %35, i32 %36, double 0x3E7AD7F29ABCAF48)
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %33
%40 = load i32*, i32** @stderr
%41 = tail call i32 @fprintf(i32* %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.3, i64 0, i64 0))
br label %67
42: ; preds = %33
%43 = getelementptr inbounds double, double* %5, i64 %14
%44 = load double, double* %43
%45 = tail call i32 @asc_neq_B3g_reference(i32 %17)
%46 = tail call i32 @check_unsigned_error(double %44, i32 %45, double 0x3E7AD7F29ABCAF48)
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %42
%49 = load i32*, i32** @stderr
%50 = tail call i32 @fprintf(i32* %49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.4, i64 0, i64 0))
br label %67
51: ; preds = %42
%52 = getelementptr inbounds double, double* %6, i64 %14
%53 = load double, double* %52
%54 = tail call i32 @areas_reference(i32 %17)
%55 = tail call i32 @check_unsigned_error(double %53, i32 %54, double 0x3E7AD7F29ABCAF48)
%56 = icmp eq i32 %55, 0
%57 = add nuw nsw i64 %14, 1
br i1 %56, label %58, label %11
58: ; preds = %51
%59 = load i32*, i32** @stderr
%60 = tail call i32 @fprintf(i32* %59, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.5, i64 0, i64 0))
br label %67
61: ; preds = %11, %7
%62 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%63 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%64 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%65 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0))
%66 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
br label %67
67: ; preds = %21, %30, %39, %48, %58, %61
%68 = phi i32 [ 0, %61 ], [ 1, %21 ], [ 2, %30 ], [ 3, %39 ], [ 4, %48 ], [ 5, %58 ]
ret i32 %68
}