#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 fabs(double);
int d7test(double g[7]) {
  int retval = 0;
  if (fabs(g[0] + g[1] + g[2] + g[3] - g[4] - g[5] - g[6]) > 1.e-5)
    retval |= 0x1;
  if (g[0] + g[3] < g[4] + 1.e-5)
    retval |= 0x2;
  if (g[1] + g[3] < g[5] + 1.e-5)
    retval |= 0x4;
  if (g[2] + g[3] < g[6] + 1.e-5)
    retval |= 0x8;
  if (g[1] + g[2] < g[4] + 1.e-5)
    retval |= 0x10;
  if (g[0] + g[2] < g[5] + 1.e-5)
    retval |= 0x20;
  if (g[0] + g[1] < g[6] + 1.e-5)
    retval |= 0x40;
  if (g[0] < -1.e-5)
    retval |= 0x80;
  if (g[1] < -1.e-5)
    retval |= 0x100;
  if (g[2] < -1.e-5)
    retval |= 0x200;
  if (g[3] < -1.e-5)
    retval |= 0x400;
  if (g[4] < -1.e-5)
    retval |= 0x800;
  if (g[5] < -1.e-5)
    retval |= 0x1000;
  if (g[6] < -1.e-5)
    retval |= 0x2000;
  return retval;
}


x86 assembly (clang, -O0):
<d7test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x30(%rax),%xmm0
movaps 0xebc(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1173 <d7test+0x73>
mov    -0xc(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0xe70(%rip),%xmm0
addsd  0x20(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    11a8 <d7test+0xa8>
mov    -0xc(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0xe3a(%rip),%xmm0
addsd  0x28(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    11de <d7test+0xde>
mov    -0xc(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0xe04(%rip),%xmm0
addsd  0x30(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1214 <d7test+0x114>
mov    -0xc(%rbp),%eax
or     $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
addsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0xdce(%rip),%xmm0
addsd  0x20(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    124a <d7test+0x14a>
mov    -0xc(%rbp),%eax
or     $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
addsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0xd99(%rip),%xmm0
addsd  0x28(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    127f <d7test+0x17f>
mov    -0xc(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0xd64(%rip),%xmm0
addsd  0x30(%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    12b4 <d7test+0x1b4>
mov    -0xc(%rbp),%eax
or     $0x40,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xd48(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    12d5 <d7test+0x1d5>
mov    -0xc(%rbp),%eax
or     $0x80,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xd27(%rip),%xmm0
ucomisd 0x8(%rax),%xmm0
jbe    12f7 <d7test+0x1f7>
mov    -0xc(%rbp),%eax
or     $0x100,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xd05(%rip),%xmm0
ucomisd 0x10(%rax),%xmm0
jbe    1319 <d7test+0x219>
mov    -0xc(%rbp),%eax
or     $0x200,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xce3(%rip),%xmm0
ucomisd 0x18(%rax),%xmm0
jbe    133b <d7test+0x23b>
mov    -0xc(%rbp),%eax
or     $0x400,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xcc1(%rip),%xmm0
ucomisd 0x20(%rax),%xmm0
jbe    135d <d7test+0x25d>
mov    -0xc(%rbp),%eax
or     $0x800,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xc9f(%rip),%xmm0
ucomisd 0x28(%rax),%xmm0
jbe    137f <d7test+0x27f>
mov    -0xc(%rbp),%eax
or     $0x1000,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xc7d(%rip),%xmm0
ucomisd 0x30(%rax),%xmm0
jbe    13a1 <d7test+0x2a1>
mov    -0xc(%rbp),%eax
or     $0x2000,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d7test>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm11
movapd %xmm1,%xmm6
addsd  %xmm11,%xmm6
movsd  0x10(%rdi),%xmm4
movapd %xmm6,%xmm7
addsd  %xmm4,%xmm7
movsd  0x18(%rdi),%xmm3
addsd  %xmm3,%xmm7
movsd  0x20(%rdi),%xmm10
subsd  %xmm10,%xmm7
movsd  0x28(%rdi),%xmm9
subsd  %xmm9,%xmm7
movsd  0x30(%rdi),%xmm8
subsd  %xmm8,%xmm7
andpd  0xeae(%rip),%xmm7
movsd  0xeb6(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm0,%xmm7
seta   %al
movapd %xmm1,%xmm7
addsd  %xmm3,%xmm7
movapd %xmm10,%xmm2
addsd  %xmm0,%xmm2
ucomisd %xmm7,%xmm2
lea    0x2(%rax),%ecx
cmovbe %eax,%ecx
movapd %xmm11,%xmm7
addsd  %xmm3,%xmm7
movapd %xmm9,%xmm5
addsd  %xmm0,%xmm5
ucomisd %xmm7,%xmm5
lea    0x4(%rcx),%eax
cmovbe %ecx,%eax
movapd %xmm4,%xmm7
addsd  %xmm3,%xmm7
addsd  %xmm8,%xmm0
ucomisd %xmm7,%xmm0
lea    0x8(%rax),%ecx
cmovbe %eax,%ecx
movapd %xmm11,%xmm7
addsd  %xmm4,%xmm7
mov    %ecx,%eax
or     $0x10,%eax
ucomisd %xmm7,%xmm2
cmovbe %ecx,%eax
movapd %xmm1,%xmm2
addsd  %xmm4,%xmm2
mov    %eax,%ecx
or     $0x20,%ecx
ucomisd %xmm2,%xmm5
cmovbe %eax,%ecx
mov    %ecx,%eax
or     $0x40,%eax
ucomisd %xmm6,%xmm0
cmovbe %ecx,%eax
mov    %eax,%ecx
or     $0x80,%ecx
movsd  0xe22(%rip),%xmm0
ucomisd %xmm1,%xmm0
cmovbe %eax,%ecx
mov    %ecx,%eax
or     $0x100,%eax
ucomisd %xmm11,%xmm0
cmovbe %ecx,%eax
mov    %eax,%ecx
or     $0x200,%ecx
ucomisd %xmm4,%xmm0
cmovbe %eax,%ecx
mov    %ecx,%eax
or     $0x400,%eax
ucomisd %xmm3,%xmm0
cmovbe %ecx,%eax
mov    %eax,%ecx
or     $0x800,%ecx
ucomisd %xmm10,%xmm0
cmovbe %eax,%ecx
mov    %ecx,%edx
or     $0x1000,%edx
ucomisd %xmm9,%xmm0
cmovbe %ecx,%edx
mov    %edx,%eax
or     $0x2000,%eax
ucomisd %xmm8,%xmm0
cmovbe %edx,%eax
ret

LLVM IR (-O0):
define i32 @d7test(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
store i32 0, i32* %3
%4 = load double*, double** %2
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 1
%9 = load double, double* %8
%10 = fadd double %6, %9
%11 = load double*, double** %2
%12 = getelementptr inbounds double, double* %11, i64 2
%13 = load double, double* %12
%14 = fadd double %10, %13
%15 = load double*, double** %2
%16 = getelementptr inbounds double, double* %15, i64 3
%17 = load double, double* %16
%18 = fadd double %14, %17
%19 = load double*, double** %2
%20 = getelementptr inbounds double, double* %19, i64 4
%21 = load double, double* %20
%22 = fsub double %18, %21
%23 = load double*, double** %2
%24 = getelementptr inbounds double, double* %23, i64 5
%25 = load double, double* %24
%26 = fsub double %22, %25
%27 = load double*, double** %2
%28 = getelementptr inbounds double, double* %27, i64 6
%29 = load double, double* %28
%30 = fsub double %26, %29
%31 = call double @llvm.fabs.f64(double %30)
%32 = fcmp ogt double %31, 1.000000e-05
br i1 %32, label %33, label %36
33: ; preds = %1
%34 = load i32, i32* %3
%35 = or i32 %34, 1
store i32 %35, i32* %3
br label %36
36: ; preds = %33, %1
%37 = load double*, double** %2
%38 = getelementptr inbounds double, double* %37, i64 0
%39 = load double, double* %38
%40 = load double*, double** %2
%41 = getelementptr inbounds double, double* %40, i64 3
%42 = load double, double* %41
%43 = fadd double %39, %42
%44 = load double*, double** %2
%45 = getelementptr inbounds double, double* %44, i64 4
%46 = load double, double* %45
%47 = fadd double %46, 1.000000e-05
%48 = fcmp olt double %43, %47
br i1 %48, label %49, label %52
49: ; preds = %36
%50 = load i32, i32* %3
%51 = or i32 %50, 2
store i32 %51, i32* %3
br label %52
52: ; preds = %49, %36
%53 = load double*, double** %2
%54 = getelementptr inbounds double, double* %53, i64 1
%55 = load double, double* %54
%56 = load double*, double** %2
%57 = getelementptr inbounds double, double* %56, i64 3
%58 = load double, double* %57
%59 = fadd double %55, %58
%60 = load double*, double** %2
%61 = getelementptr inbounds double, double* %60, i64 5
%62 = load double, double* %61
%63 = fadd double %62, 1.000000e-05
%64 = fcmp olt double %59, %63
br i1 %64, label %65, label %68
65: ; preds = %52
%66 = load i32, i32* %3
%67 = or i32 %66, 4
store i32 %67, i32* %3
br label %68
68: ; preds = %65, %52
%69 = load double*, double** %2
%70 = getelementptr inbounds double, double* %69, i64 2
%71 = load double, double* %70
%72 = load double*, double** %2
%73 = getelementptr inbounds double, double* %72, i64 3
%74 = load double, double* %73
%75 = fadd double %71, %74
%76 = load double*, double** %2
%77 = getelementptr inbounds double, double* %76, i64 6
%78 = load double, double* %77
%79 = fadd double %78, 1.000000e-05
%80 = fcmp olt double %75, %79
br i1 %80, label %81, label %84
81: ; preds = %68
%82 = load i32, i32* %3
%83 = or i32 %82, 8
store i32 %83, i32* %3
br label %84
84: ; preds = %81, %68
%85 = load double*, double** %2
%86 = getelementptr inbounds double, double* %85, i64 1
%87 = load double, double* %86
%88 = load double*, double** %2
%89 = getelementptr inbounds double, double* %88, i64 2
%90 = load double, double* %89
%91 = fadd double %87, %90
%92 = load double*, double** %2
%93 = getelementptr inbounds double, double* %92, i64 4
%94 = load double, double* %93
%95 = fadd double %94, 1.000000e-05
%96 = fcmp olt double %91, %95
br i1 %96, label %97, label %100
97: ; preds = %84
%98 = load i32, i32* %3
%99 = or i32 %98, 16
store i32 %99, i32* %3
br label %100
100: ; preds = %97, %84
%101 = load double*, double** %2
%102 = getelementptr inbounds double, double* %101, i64 0
%103 = load double, double* %102
%104 = load double*, double** %2
%105 = getelementptr inbounds double, double* %104, i64 2
%106 = load double, double* %105
%107 = fadd double %103, %106
%108 = load double*, double** %2
%109 = getelementptr inbounds double, double* %108, i64 5
%110 = load double, double* %109
%111 = fadd double %110, 1.000000e-05
%112 = fcmp olt double %107, %111
br i1 %112, label %113, label %116
113: ; preds = %100
%114 = load i32, i32* %3
%115 = or i32 %114, 32
store i32 %115, i32* %3
br label %116
116: ; preds = %113, %100
%117 = load double*, double** %2
%118 = getelementptr inbounds double, double* %117, i64 0
%119 = load double, double* %118
%120 = load double*, double** %2
%121 = getelementptr inbounds double, double* %120, i64 1
%122 = load double, double* %121
%123 = fadd double %119, %122
%124 = load double*, double** %2
%125 = getelementptr inbounds double, double* %124, i64 6
%126 = load double, double* %125
%127 = fadd double %126, 1.000000e-05
%128 = fcmp olt double %123, %127
br i1 %128, label %129, label %132
129: ; preds = %116
%130 = load i32, i32* %3
%131 = or i32 %130, 64
store i32 %131, i32* %3
br label %132
132: ; preds = %129, %116
%133 = load double*, double** %2
%134 = getelementptr inbounds double, double* %133, i64 0
%135 = load double, double* %134
%136 = fcmp olt double %135, -1.000000e-05
br i1 %136, label %137, label %140
137: ; preds = %132
%138 = load i32, i32* %3
%139 = or i32 %138, 128
store i32 %139, i32* %3
br label %140
140: ; preds = %137, %132
%141 = load double*, double** %2
%142 = getelementptr inbounds double, double* %141, i64 1
%143 = load double, double* %142
%144 = fcmp olt double %143, -1.000000e-05
br i1 %144, label %145, label %148
145: ; preds = %140
%146 = load i32, i32* %3
%147 = or i32 %146, 256
store i32 %147, i32* %3
br label %148
148: ; preds = %145, %140
%149 = load double*, double** %2
%150 = getelementptr inbounds double, double* %149, i64 2
%151 = load double, double* %150
%152 = fcmp olt double %151, -1.000000e-05
br i1 %152, label %153, label %156
153: ; preds = %148
%154 = load i32, i32* %3
%155 = or i32 %154, 512
store i32 %155, i32* %3
br label %156
156: ; preds = %153, %148
%157 = load double*, double** %2
%158 = getelementptr inbounds double, double* %157, i64 3
%159 = load double, double* %158
%160 = fcmp olt double %159, -1.000000e-05
br i1 %160, label %161, label %164
161: ; preds = %156
%162 = load i32, i32* %3
%163 = or i32 %162, 1024
store i32 %163, i32* %3
br label %164
164: ; preds = %161, %156
%165 = load double*, double** %2
%166 = getelementptr inbounds double, double* %165, i64 4
%167 = load double, double* %166
%168 = fcmp olt double %167, -1.000000e-05
br i1 %168, label %169, label %172
169: ; preds = %164
%170 = load i32, i32* %3
%171 = or i32 %170, 2048
store i32 %171, i32* %3
br label %172
172: ; preds = %169, %164
%173 = load double*, double** %2
%174 = getelementptr inbounds double, double* %173, i64 5
%175 = load double, double* %174
%176 = fcmp olt double %175, -1.000000e-05
br i1 %176, label %177, label %180
177: ; preds = %172
%178 = load i32, i32* %3
%179 = or i32 %178, 4096
store i32 %179, i32* %3
br label %180
180: ; preds = %177, %172
%181 = load double*, double** %2
%182 = getelementptr inbounds double, double* %181, i64 6
%183 = load double, double* %182
%184 = fcmp olt double %183, -1.000000e-05
br i1 %184, label %185, label %188
185: ; preds = %180
%186 = load i32, i32* %3
%187 = or i32 %186, 8192
store i32 %187, i32* %3
br label %188
188: ; preds = %185, %180
%189 = load i32, i32* %3
ret i32 %189
}

LLVM IR (-O2):
define i32 @d7test(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fadd double %2, %4
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = load double, double* %6
%8 = fadd double %5, %7
%9 = getelementptr inbounds double, double* %0, i64 3
%10 = load double, double* %9
%11 = fadd double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 4
%13 = load double, double* %12
%14 = fsub double %11, %13
%15 = getelementptr inbounds double, double* %0, i64 5
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = getelementptr inbounds double, double* %0, i64 6
%19 = load double, double* %18
%20 = fsub double %17, %19
%21 = tail call double @llvm.fabs.f64(double %20)
%22 = fcmp ogt double %21, 1.000000e-05
%23 = zext i1 %22 to i32
%24 = fadd double %2, %10
%25 = fadd double %13, 1.000000e-05
%26 = fcmp olt double %24, %25
%27 = or i32 %23, 2
%28 = select i1 %26, i32 %27, i32 %23
%29 = fadd double %4, %10
%30 = fadd double %16, 1.000000e-05
%31 = fcmp olt double %29, %30
%32 = or i32 %28, 4
%33 = select i1 %31, i32 %32, i32 %28
%34 = fadd double %7, %10
%35 = fadd double %19, 1.000000e-05
%36 = fcmp olt double %34, %35
%37 = or i32 %33, 8
%38 = select i1 %36, i32 %37, i32 %33
%39 = fadd double %4, %7
%40 = fcmp olt double %39, %25
%41 = or i32 %38, 16
%42 = select i1 %40, i32 %41, i32 %38
%43 = fadd double %2, %7
%44 = fcmp olt double %43, %30
%45 = or i32 %42, 32
%46 = select i1 %44, i32 %45, i32 %42
%47 = fcmp olt double %5, %35
%48 = or i32 %46, 64
%49 = select i1 %47, i32 %48, i32 %46
%50 = fcmp olt double %2, -1.000000e-05
%51 = or i32 %49, 128
%52 = select i1 %50, i32 %51, i32 %49
%53 = fcmp olt double %4, -1.000000e-05
%54 = or i32 %52, 256
%55 = select i1 %53, i32 %54, i32 %52
%56 = fcmp olt double %7, -1.000000e-05
%57 = or i32 %55, 512
%58 = select i1 %56, i32 %57, i32 %55
%59 = fcmp olt double %10, -1.000000e-05
%60 = or i32 %58, 1024
%61 = select i1 %59, i32 %60, i32 %58
%62 = fcmp olt double %13, -1.000000e-05
%63 = or i32 %61, 2048
%64 = select i1 %62, i32 %63, i32 %61
%65 = fcmp olt double %16, -1.000000e-05
%66 = or i32 %64, 4096
%67 = select i1 %65, i32 %66, i32 %64
%68 = fcmp olt double %19, -1.000000e-05
%69 = or i32 %67, 8192
%70 = select i1 %68, i32 %69, i32 %67
ret i32 %70
}