#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 */
double atan(double);
double const fabs(double const);
double pow(double const, double const);
double const tan(double const);
int exactI(const double m, const double x, const double y, double *bed,
           double *tauc, double *u, double *v) {
  const double L = 40e3;
  const double aspect = 0.05;
  const double h0 = aspect * L;
  const double theta = atan(0.001);
  const double rho = 910, g = 9.81;
  const double f = rho * g * h0 * tan(theta);
  const double W = pow(m + 1.0, 1.0 / m) * L;
  const double B = 3.7e8;
  const double s = fabs(y / L);
  double C0, C1, C2, C3, C4, z1, z2, z3, z4;
  *tauc = f * pow(s, m);
  *bed = -x * tan(theta);
  if (fabs(y) < W) {
    C0 = 2.0 * pow(f / (B * h0), 3.0) * pow(L, 4.0);
    C1 = pow(m + 1.0, 4.0 / m);
    C2 = (m + 1.0) * C1;
    C3 = (m + 1.0) * C2;
    C4 = (m + 1.0) * C3;
    z1 = (pow(s, 4.0) - C1) / 4.0;
    z2 = (pow(s, m + 4.0) - C2) / ((m + 1.0) * (m + 4.0));
    z3 = (pow(s, 2.0 * m + 4.0) - C3) /
         ((m + 1.0) * (m + 1.0) * (2.0 * m + 4.0));
    z4 = (pow(s, 3.0 * m + 4.0) - C4) / (pow((m + 1.0), 3.0) * (3.0 * m + 4.0));
    *u = -C0 * (z1 - 3.0 * z2 + 3.0 * z3 - z4);
  } else {
    *u = 0.0;
  }
  *v = 0.0;
  return 0;
}


x86 assembly (clang, -O0):
<exactI>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
movsd  0xe8e(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe97(%rip),%xmm0
call   1040 <atan@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  0xe7d(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe68(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1050 <tan@plt>
movaps %xmm0,%xmm1
movsd  0xe46(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe2d(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xe20(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
call   1060 <pow@plt>
movsd  0xdfe(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xdf5(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xddb(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <fabs@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x8(%rbp),%xmm1
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
call   1050 <tan@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1592 <exactI+0x452>
movsd  -0x70(%rbp),%xmm0
movsd  0xd8e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd62(%rip),%xmm1
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xd6a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xcf6(%rip),%xmm0
movsd  0xd46(%rip),%xmm1
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xcda(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xd15(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
call   1060 <pow@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xcb3(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xc96(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xc79(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xc9c(%rip),%xmm1
call   1060 <pow@plt>
subsd  -0x98(%rbp),%xmm0
ff
movsd  0xc87(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xc6b(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
call   1060 <pow@plt>
subsd  -0xa0(%rbp),%xmm0
ff
movsd  0xc09(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
movsd  0xc44(%rip),%xmm2
addsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xc16(%rip),%xmm2
addsd  %xmm2,%xmm1
call   1060 <pow@plt>
subsd  -0xa8(%rbp),%xmm0
ff
movsd  0xbb5(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
movsd  0xba8(%rip),%xmm2
addsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  -0x8(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xbd6(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x8(%rbp),%xmm1
movsd  0xb9d(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xba1(%rip),%xmm2
addsd  %xmm2,%xmm1
call   1060 <pow@plt>
subsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xb38(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  0xb63(%rip),%xmm1
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0x8(%rbp),%xmm2
movsd  0xb46(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xb4a(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm2
ff
movsd  0xaf7(%rip),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0xc8(%rbp),%xmm1
ff
movsd  0xad7(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
subsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    159d <exactI+0x45d>
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exactI>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r12
movaps %xmm2,0x30(%rsp)
movsd  %xmm1,0x28(%rsp)
movsd  %xmm0,(%rsp)
movsd  0xeb1(%rip),%xmm0
call   1030 <atan@plt>
movsd  0xeac(%rip),%xmm1
movsd  (%rsp),%xmm2
movapd %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  %xmm2,%xmm1
movsd  %xmm0,0x10(%rsp)
call   1040 <pow@plt>
movsd  0xe90(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movapd 0x30(%rsp),%xmm0
divsd  %xmm1,%xmm0
andpd  0xeb4(%rip),%xmm0
movapd %xmm0,0x40(%rsp)
movsd  (%rsp),%xmm1
call   1040 <pow@plt>
mulsd  0xe64(%rip),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x28(%rsp),%xmm0
mulsd  0xe5a(%rip),%xmm0
movsd  %xmm0,(%r12)
movapd 0x30(%rsp),%xmm1
andpd  0xe76(%rip),%xmm1
xorpd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm2
ucomisd %xmm1,%xmm2
jbe    1368 <exactI+0x248>
movsd  0xe32(%rip),%xmm1
divsd  (%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm3
movapd %xmm3,%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
movapd %xmm3,%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x20(%rsp)
movapd %xmm3,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rsp)
movapd 0x40(%rsp),%xmm0
movsd  0xdde(%rip),%xmm1
call   1040 <pow@plt>
subsd  0x30(%rsp),%xmm0
mulsd  0xdd3(%rip),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  (%rsp),%xmm1
addsd  0xdb8(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
movapd 0x40(%rsp),%xmm0
call   1040 <pow@plt>
subsd  0x8(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm1
addsd  %xmm1,%xmm1
addsd  0xd7a(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
movapd 0x40(%rsp),%xmm0
call   1040 <pow@plt>
subsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  0x18(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm1
mulsd  0xd4c(%rip),%xmm1
addsd  0xd34(%rip),%xmm1
movsd  %xmm1,(%rsp)
movapd 0x40(%rsp),%xmm0
call   1040 <pow@plt>
subsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x10(%rsp),%xmm0
movsd  0xd1a(%rip),%xmm1
call   1040 <pow@plt>
mulsd  (%rsp),%xmm0
movsd  0x40(%rsp),%xmm2
divsd  %xmm0,%xmm2
movsd  0x8(%rsp),%xmm0
mulsd  0xd00(%rip),%xmm0
addsd  0x30(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  0xce4(%rip),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
mulsd  0xce0(%rip),%xmm0
movsd  %xmm0,(%r15)
movq   $0x0,(%r14)
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @exactI(double %0, double %1, double %2, double* %3, double* %4, double* %5, double* %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
store double 4.000000e+04, double* %15
store double 5.000000e-02, double* %16
store double 2.000000e+03, double* %17
%34 = call double @atan(double 1.000000e-03)
store double %34, double* %18
store double 9.100000e+02, double* %19
store double 9.810000e+00, double* %20
%35 = load double, double* %18
%36 = call double @tan(double %35)
%37 = fmul double 1.785420e+07, %36
store double %37, double* %21
%38 = load double, double* %8
%39 = fadd double %38, 1.000000e+00
%40 = load double, double* %8
%41 = fdiv double 1.000000e+00, %40
%42 = call double @pow(double %39, double %41)
%43 = fmul double %42, 4.000000e+04
store double %43, double* %22
store double 3.700000e+08, double* %23
%44 = load double, double* %10
%45 = fdiv double %44, 4.000000e+04
%46 = call double @fabs(double %45)
store double %46, double* %24
%47 = load double, double* %21
%48 = load double, double* %24
%49 = load double, double* %8
%50 = call double @pow(double %48, double %49)
%51 = fmul double %47, %50
%52 = load double*, double** %12
store double %51, double* %52
%53 = load double, double* %9
%54 = fneg double %53
%55 = load double, double* %18
%56 = call double @tan(double %55)
%57 = fmul double %54, %56
%58 = load double*, double** %11
store double %57, double* %58
%59 = load double, double* %10
%60 = call double @fabs(double %59)
%61 = load double, double* %22
%62 = fcmp olt double %60, %61
br i1 %62, label %63, label %143
63: ; preds = %7
%64 = load double, double* %21
%65 = fdiv double %64, 7.400000e+11
%66 = call double @pow(double %65, double 3.000000e+00)
%67 = fmul double 2.000000e+00, %66
%68 = call double @pow(double 4.000000e+04, double 4.000000e+00)
%69 = fmul double %67, %68
store double %69, double* %25
%70 = load double, double* %8
%71 = fadd double %70, 1.000000e+00
%72 = load double, double* %8
%73 = fdiv double 4.000000e+00, %72
%74 = call double @pow(double %71, double %73)
store double %74, double* %26
%75 = load double, double* %8
%76 = fadd double %75, 1.000000e+00
%77 = load double, double* %26
%78 = fmul double %76, %77
store double %78, double* %27
%79 = load double, double* %8
%80 = fadd double %79, 1.000000e+00
%81 = load double, double* %27
%82 = fmul double %80, %81
store double %82, double* %28
%83 = load double, double* %8
%84 = fadd double %83, 1.000000e+00
%85 = load double, double* %28
%86 = fmul double %84, %85
store double %86, double* %29
%87 = load double, double* %24
%88 = call double @pow(double %87, double 4.000000e+00)
%89 = load double, double* %26
%90 = fsub double %88, %89
%91 = fdiv double %90, 4.000000e+00
store double %91, double* %30
%92 = load double, double* %24
%93 = load double, double* %8
%94 = fadd double %93, 4.000000e+00
%95 = call double @pow(double %92, double %94)
%96 = load double, double* %27
%97 = fsub double %95, %96
%98 = load double, double* %8
%99 = fadd double %98, 1.000000e+00
%100 = load double, double* %8
%101 = fadd double %100, 4.000000e+00
%102 = fmul double %99, %101
%103 = fdiv double %97, %102
store double %103, double* %31
%104 = load double, double* %24
%105 = load double, double* %8
%106 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %105, double 4.000000e+00)
%107 = call double @pow(double %104, double %106)
%108 = load double, double* %28
%109 = fsub double %107, %108
%110 = load double, double* %8
%111 = fadd double %110, 1.000000e+00
%112 = load double, double* %8
%113 = fadd double %112, 1.000000e+00
%114 = fmul double %111, %113
%115 = load double, double* %8
%116 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %115, double 4.000000e+00)
%117 = fmul double %114, %116
%118 = fdiv double %109, %117
store double %118, double* %32
%119 = load double, double* %24
%120 = load double, double* %8
%121 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %120, double 4.000000e+00)
%122 = call double @pow(double %119, double %121)
%123 = load double, double* %29
%124 = fsub double %122, %123
%125 = load double, double* %8
%126 = fadd double %125, 1.000000e+00
%127 = call double @pow(double %126, double 3.000000e+00)
%128 = load double, double* %8
%129 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %128, double 4.000000e+00)
%130 = fmul double %127, %129
%131 = fdiv double %124, %130
store double %131, double* %33
%132 = load double, double* %25
%133 = fneg double %132
%134 = load double, double* %30
%135 = load double, double* %31
%136 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %135, double %134)
%137 = load double, double* %32
%138 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %137, double %136)
%139 = load double, double* %33
%140 = fsub double %138, %139
%141 = fmul double %133, %140
%142 = load double*, double** %13
store double %141, double* %142
br label %145
143: ; preds = %7
%144 = load double*, double** %13
store double 0.000000e+00, double* %144
br label %145
145: ; preds = %143, %63
%146 = load double*, double** %14
store double 0.000000e+00, double* %146
ret i32 0
}

LLVM IR (-O2):
define i32 @exactI(double %0, double %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4, double* nocapture writeonly %5, double* nocapture writeonly %6) {
%8 = tail call double @atan(double 1.000000e-03)
%9 = fadd double %0, 1.000000e+00
%10 = fdiv double 1.000000e+00, %0
%11 = tail call double @pow(double %9, double %10)
%12 = fmul double %11, 4.000000e+04
%13 = fdiv double %2, 4.000000e+04
%14 = tail call double @llvm.fabs.f64(double %13)
%15 = tail call double @pow(double %14, double %0)
%16 = fmul double %15, 1.785420e+04
store double %16, double* %4
%17 = fmul double %1, -1.000000e-03
store double %17, double* %3
%18 = tail call double @llvm.fabs.f64(double %2)
%19 = fcmp olt double %18, %12
br i1 %19, label %20, label %50
20: ; preds = %7
%21 = fdiv double 4.000000e+00, %0
%22 = tail call double @pow(double %9, double %21)
%23 = fmul double %9, %22
%24 = fmul double %9, %23
%25 = fmul double %9, %24
%26 = tail call double @pow(double %14, double 4.000000e+00)
%27 = fsub double %26, %22
%28 = fmul double %27, 2.500000e-01
%29 = fadd double %0, 4.000000e+00
%30 = tail call double @pow(double %14, double %29)
%31 = fsub double %30, %23
%32 = fmul double %9, %29
%33 = fdiv double %31, %32
%34 = tail call double @llvm.fmuladd.f64(double %0, double 2.000000e+00, double 4.000000e+00)
%35 = tail call double @pow(double %14, double %34)
%36 = fsub double %35, %24
%37 = fmul double %9, %9
%38 = fmul double %34, %37
%39 = fdiv double %36, %38
%40 = tail call double @llvm.fmuladd.f64(double %0, double 3.000000e+00, double 4.000000e+00)
%41 = tail call double @pow(double %14, double %40)
%42 = fsub double %41, %25
%43 = tail call double @pow(double %9, double 3.000000e+00)
%44 = fmul double %40, %43
%45 = fdiv double %42, %44
%46 = tail call double @llvm.fmuladd.f64(double %33, double -3.000000e+00, double %28)
%47 = tail call double @llvm.fmuladd.f64(double %39, double 3.000000e+00, double %46)
%48 = fsub double %47, %45
%49 = fmul double %48, 0xBF12D9DF731CC014
br label %50
50: ; preds = %7, %20
%51 = phi double [ %49, %20 ], [ 0.000000e+00, %7 ]
store double %51, double* %5
store double 0.000000e+00, double* %6
ret i32 0
}