#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__ mir_ineq(int const, double *, double, double *, double *, double *);
int cmir_ineq(const int n, const double a[], const double b, const double u[],
              const char cset[], const double delta, double alpha[],
              double *beta, double *gamma) {
  int j;
  double *aa, bb;
  aa = alpha, bb = b;
  for (j = 1; j <= n; j++) {
    aa[j] = a[j] / delta;
    if (cset[j])
      aa[j] = -aa[j], bb -= a[j] * u[j];
  }
  bb /= delta;
  if (mir_ineq(n, aa, bb, alpha, beta, gamma))
    return 1;
  for (j = 1; j <= n; j++) {
    if (cset[j])
      alpha[j] = -alpha[j], *beta += alpha[j] * u[j];
  }
  *gamma /= delta;
  return 0;
}


x86 assembly (clang, -O0):
<cmir_ineq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     121a <cmir_ineq+0x10a>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x30(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1207 <cmir_ineq+0xf7>
mov    -0x50(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x50(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x58(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    120c <cmir_ineq+0xfc>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1156 <cmir_ineq+0x46>
movsd  -0x30(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x50(%rbp),%rsi
movsd  -0x58(%rbp),%xmm0
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    0x10(%rbp),%r8
call   1030 <mir_ineq@plt>
cmp    $0x0,%rax
je     1260 <cmir_ineq+0x150>
movl   $0x1,-0x4(%rbp)
jmp    1313 <cmir_ineq+0x203>
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     12f7 <cmir_ineq+0x1e7>
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     12e4 <cmir_ineq+0x1d4>
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    12e9 <cmir_ineq+0x1d9>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1267 <cmir_ineq+0x157>
movsd  -0x30(%rbp),%xmm1
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmir_ineq>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r15
mov    %r8,%rbx
mov    %edi,%ebp
mov    0x40(%rsp),%r8
test   %edi,%edi
movsd  %xmm1,(%rsp)
jle    1209 <cmir_ineq+0xf9>
mov    %rcx,%r12
mov    %rdx,%r13
lea    0x1(%rbp),%r14d
mov    $0x1,%eax
jmp    1159 <cmir_ineq+0x49>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    %rax,%r14
je     118d <cmir_ineq+0x7d>
movsd  (%rsi,%rax,8),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,(%rbx,%rax,8)
cmpb   $0x0,(%r12,%rax,1)
je     1150 <cmir_ineq+0x40>
xorpd  0xe8a(%rip),%xmm2
movlpd %xmm2,(%rbx,%rax,8)
movsd  (%rsi,%rax,8),%xmm2
mulsd  0x0(%r13,%rax,8),%xmm2
subsd  %xmm2,%xmm0
jmp    1150 <cmir_ineq+0x40>
divsd  %xmm1,%xmm0
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1030 <mir_ineq@plt>
movapd 0xe57(%rip),%xmm2
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    123e <cmir_ineq+0x12e>
test   %ebp,%ebp
jle    122a <cmir_ineq+0x11a>
mov    $0x1,%eax
jmp    11d9 <cmir_ineq+0xc9>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
cmp    %rax,%r14
je     122a <cmir_ineq+0x11a>
cmpb   $0x0,(%r12,%rax,1)
je     11d0 <cmir_ineq+0xc0>
movsd  (%rbx,%rax,8),%xmm0
movapd %xmm0,%xmm1
xorpd  %xmm2,%xmm1
movlpd %xmm1,(%rbx,%rax,8)
movsd  (%r15),%xmm1
mulsd  0x0(%r13,%rax,8),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
jmp    11d0 <cmir_ineq+0xc0>
divsd  %xmm1,%xmm0
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1030 <mir_ineq@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    123e <cmir_ineq+0x12e>
mov    0x40(%rsp),%rax
movsd  (%rax),%xmm0
divsd  (%rsp),%xmm0
movsd  %xmm0,(%rax)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @cmir_ineq(i32 %0, double* %1, double %2, double* %3, i8* %4, double %5, double* %6, double* %7, double* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double
%14 = alloca double*
%15 = alloca i8*
%16 = alloca double
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca i32
%21 = alloca double*
%22 = alloca double
store i32 %0, i32* %11
store double* %1, double** %12
store double %2, double* %13
store double* %3, double** %14
store i8* %4, i8** %15
store double %5, double* %16
store double* %6, double** %17
store double* %7, double** %18
store double* %8, double** %19
%23 = load double*, double** %17
store double* %23, double** %21
%24 = load double, double* %13
store double %24, double* %22
store i32 1, i32* %20
br label %25
25: ; preds = %72, %9
%26 = load i32, i32* %20
%27 = load i32, i32* %11
%28 = icmp sle i32 %26, %27
br i1 %28, label %29, label %75
29: ; preds = %25
%30 = load double*, double** %12
%31 = load i32, i32* %20
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %30, i64 %32
%34 = load double, double* %33
%35 = load double, double* %16
%36 = fdiv double %34, %35
%37 = load double*, double** %21
%38 = load i32, i32* %20
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %37, i64 %39
store double %36, double* %40
%41 = load i8*, i8** %15
%42 = load i32, i32* %20
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8, i8* %41, i64 %43
%45 = load i8, i8* %44
%46 = icmp ne i8 %45, 0
br i1 %46, label %47, label %71
47: ; preds = %29
%48 = load double*, double** %21
%49 = load i32, i32* %20
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %48, i64 %50
%52 = load double, double* %51
%53 = fneg double %52
%54 = load double*, double** %21
%55 = load i32, i32* %20
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %54, i64 %56
store double %53, double* %57
%58 = load double*, double** %12
%59 = load i32, i32* %20
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
%62 = load double, double* %61
%63 = load double*, double** %14
%64 = load i32, i32* %20
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
%67 = load double, double* %66
%68 = load double, double* %22
%69 = fneg double %62
%70 = call double @llvm.fmuladd.f64(double %69, double %67, double %68)
store double %70, double* %22
br label %71
71: ; preds = %47, %29
br label %72
72: ; preds = %71
%73 = load i32, i32* %20
%74 = add nsw i32 %73, 1
store i32 %74, i32* %20
br label %25
75: ; preds = %25
%76 = load double, double* %16
%77 = load double, double* %22
%78 = fdiv double %77, %76
store double %78, double* %22
%79 = load i32, i32* %11
%80 = load double*, double** %21
%81 = load double, double* %22
%82 = load double*, double** %17
%83 = load double*, double** %18
%84 = load double*, double** %19
%85 = call i64 @mir_ineq(i32 %79, double* %80, double %81, double* %82, double* %83, double* %84)
%86 = icmp ne i64 %85, 0
br i1 %86, label %87, label %88
87: ; preds = %75
store i32 1, i32* %10
br label %133
88: ; preds = %75
store i32 1, i32* %20
br label %89
89: ; preds = %125, %88
%90 = load i32, i32* %20
%91 = load i32, i32* %11
%92 = icmp sle i32 %90, %91
br i1 %92, label %93, label %128
93: ; preds = %89
%94 = load i8*, i8** %15
%95 = load i32, i32* %20
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i8, i8* %94, i64 %96
%98 = load i8, i8* %97
%99 = icmp ne i8 %98, 0
br i1 %99, label %100, label %124
100: ; preds = %93
%101 = load double*, double** %17
%102 = load i32, i32* %20
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
%105 = load double, double* %104
%106 = fneg double %105
%107 = load double*, double** %17
%108 = load i32, i32* %20
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds double, double* %107, i64 %109
store double %106, double* %110
%111 = load double*, double** %17
%112 = load i32, i32* %20
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds double, double* %111, i64 %113
%115 = load double, double* %114
%116 = load double*, double** %14
%117 = load i32, i32* %20
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %116, i64 %118
%120 = load double, double* %119
%121 = load double*, double** %18
%122 = load double, double* %121
%123 = call double @llvm.fmuladd.f64(double %115, double %120, double %122)
store double %123, double* %121
br label %124
124: ; preds = %100, %93
br label %125
125: ; preds = %124
%126 = load i32, i32* %20
%127 = add nsw i32 %126, 1
store i32 %127, i32* %20
br label %89
128: ; preds = %89
%129 = load double, double* %16
%130 = load double*, double** %19
%131 = load double, double* %130
%132 = fdiv double %131, %129
store double %132, double* %130
store i32 0, i32* %10
br label %133
133: ; preds = %128, %87
%134 = load i32, i32* %10
ret i32 %134
}

LLVM IR (-O2):
define i32 @cmir_ineq(i32 %0, double* nocapture %1, double %2, double* nocapture %3, i8* nocapture %4, double %5, double* %6, double* %7, double* %8) {
%10 = icmp slt i32 %0, 1
br i1 %10, label %39, label %11
11: ; preds = %9
%12 = add nuw i32 %0, 1
%13 = zext i32 %12 to i64
br label %14
14: ; preds = %11, %31
%15 = phi i64 [ 1, %11 ], [ %33, %31 ]
%16 = phi double [ %2, %11 ], [ %32, %31 ]
%17 = getelementptr inbounds double, double* %1, i64 %15
%18 = load double, double* %17
%19 = fdiv double %18, %5
%20 = getelementptr inbounds double, double* %6, i64 %15
store double %19, double* %20
%21 = getelementptr inbounds i8, i8* %4, i64 %15
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 0
br i1 %23, label %31, label %24
24: ; preds = %14
%25 = fneg double %19
store double %25, double* %20
%26 = load double, double* %17
%27 = getelementptr inbounds double, double* %3, i64 %15
%28 = load double, double* %27
%29 = fneg double %26
%30 = tail call double @llvm.fmuladd.f64(double %29, double %28, double %16)
br label %31
31: ; preds = %14, %24
%32 = phi double [ %30, %24 ], [ %16, %14 ]
%33 = add nuw nsw i64 %15, 1
%34 = icmp eq i64 %33, %13
br i1 %34, label %35, label %14
35: ; preds = %31
%36 = fdiv double %32, %5
%37 = tail call i64 @mir_ineq(i32 %0, double* %6, double %36, double* %6, double* %7, double* %8)
%38 = icmp eq i64 %37, 0
br i1 %38, label %43, label %66
39: ; preds = %9
%40 = fdiv double %2, %5
%41 = tail call i64 @mir_ineq(i32 %0, double* %6, double %40, double* %6, double* %7, double* %8)
%42 = icmp eq i64 %41, 0
br i1 %42, label %63, label %66
43: ; preds = %35
br i1 %10, label %63, label %44
44: ; preds = %43
%45 = add nuw i32 %0, 1
%46 = zext i32 %45 to i64
br label %47
47: ; preds = %44, %60
%48 = phi i64 [ 1, %44 ], [ %61, %60 ]
%49 = getelementptr inbounds i8, i8* %4, i64 %48
%50 = load i8, i8* %49
%51 = icmp eq i8 %50, 0
br i1 %51, label %60, label %52
52: ; preds = %47
%53 = getelementptr inbounds double, double* %6, i64 %48
%54 = load double, double* %53
%55 = fneg double %54
store double %55, double* %53
%56 = getelementptr inbounds double, double* %3, i64 %48
%57 = load double, double* %56
%58 = load double, double* %7
%59 = tail call double @llvm.fmuladd.f64(double %55, double %57, double %58)
store double %59, double* %7
br label %60
60: ; preds = %47, %52
%61 = add nuw nsw i64 %48, 1
%62 = icmp eq i64 %61, %46
br i1 %62, label %63, label %47
63: ; preds = %60, %39, %43
%64 = load double, double* %8
%65 = fdiv double %64, %5
store double %65, double* %8
br label %66
66: ; preds = %39, %35, %63
%67 = phi i32 [ 0, %63 ], [ 1, %35 ], [ 1, %39 ]
ret i32 %67
}