#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 */
int _ada_use_c2phc(int, int *, int *, double *);
int standard_Littlewood_Richardson_homotopies(int n, int k, int c,
                                              int *brackets, int verbose,
                                              int verify, int nbchar,
                                              char *filename, int *r,
                                              double *flags) {
  int fail, i;
  int size = 2 * (c - 2) * n * n + 1;
  double rc[size];
  int dim[6];
  dim[0] = n;
  dim[1] = k;
  dim[2] = c;
  dim[3] = verbose;
  dim[4] = verify;
  dim[5] = nbchar;
  for (i = 0; i < nbchar; i++)
    rc[i] = (double)filename[i];
  fail = _ada_use_c2phc(229, dim, brackets, rc);
  (*r) = (int)rc[0];
  for (i = 1; i < size; i++)
    flags[i - 1] = rc[i];
  return fail;
}


x86 assembly (clang, -O0):
<standard_Littlewood_Richardson_homotopies>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0xc(%rbp),%ecx
add    $0xfffffffe,%ecx
mov    -0x4(%rbp),%eax
imul   %eax,%ecx
imul   %eax,%ecx
mov    %ecx,%eax
lea    0x1(%rax,%rax,1),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x38(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    0x10(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    11dd <standard_Littlewood_Richardson_homotopies+0xcd>
mov    -0x68(%rbp),%rax
mov    0x18(%rbp),%rcx
movslq -0x28(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cvtsi2sd %ecx,%xmm0
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11a6 <standard_Littlewood_Richardson_homotopies+0x96>
mov    -0x68(%rbp),%rcx
lea    -0x60(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0xe5,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%rax
mov    %ecx,-0x24(%rbp)
cvttsd2si (%rax),%ecx
mov    0x20(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1246 <standard_Littlewood_Richardson_homotopies+0x136>
mov    -0x68(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    120d <standard_Littlewood_Richardson_homotopies+0xfd>
mov    -0x24(%rbp),%eax
mov    -0x38(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard_Littlewood_Richardson_homotopies>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x20(%rbp),%r12
mov    0x10(%rbp),%r10d
lea    (%rdx,%rdx,1),%eax
add    $0xfffffffc,%eax
mov    %edi,%r15d
imul   %r15d,%r15d
imul   %eax,%r15d
lea    0x1(%r15),%r13d
lea    0xf(,%r13,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %edi,-0x40(%rbp)
mov    %esi,-0x3c(%rbp)
mov    %edx,-0x38(%rbp)
mov    %r8d,-0x34(%rbp)
mov    %r9d,-0x30(%rbp)
mov    %r10d,-0x2c(%rbp)
test   %r10d,%r10d
jle    12ba <standard_Littlewood_Richardson_homotopies+0x19a>
mov    0x18(%rbp),%r11
mov    %r10d,%r9d
cmp    $0x4,%r10d
jae    1195 <standard_Littlewood_Richardson_homotopies+0x75>
xor    %esi,%esi
jmp    12a0 <standard_Littlewood_Richardson_homotopies+0x180>
mov    %r9d,%esi
and    $0xfffffffc,%esi
lea    -0x4(%rsi),%rdx
mov    %rdx,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rdx,%rdx
je     1308 <standard_Littlewood_Richardson_homotopies+0x1e8>
mov    %r8,%rdx
and    $0xfffffffffffffffe,%rdx
xor    %edi,%edi
nopl   0x0(%rax)
movzwl (%r11,%rdi,1),%eax
movd   %eax,%xmm0
punpcklbw %xmm0,%xmm0
movzwl 0x2(%r11,%rdi,1),%eax
movd   %eax,%xmm1
punpcklbw %xmm1,%xmm1
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x18,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x60,%xmm1,%xmm1
psrad  $0x18,%xmm1
cvtdq2pd %xmm1,%xmm1
movaps %xmm0,(%rbx,%rdi,8)
movaps %xmm1,0x10(%rbx,%rdi,8)
movzwl 0x4(%r11,%rdi,1),%eax
movd   %eax,%xmm0
punpcklbw %xmm0,%xmm0
movzwl 0x6(%r11,%rdi,1),%eax
movd   %eax,%xmm1
punpcklbw %xmm1,%xmm1
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x18,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x60,%xmm1,%xmm1
psrad  $0x18,%xmm1
cvtdq2pd %xmm1,%xmm1
movapd %xmm0,0x20(%rbx,%rdi,8)
movaps %xmm1,0x30(%rbx,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rdx
jne    11c0 <standard_Littlewood_Richardson_homotopies+0xa0>
test   $0x1,%r8b
je     1298 <standard_Littlewood_Richardson_homotopies+0x178>
movzwl (%r11,%rdi,1),%eax
movd   %eax,%xmm0
movzwl 0x2(%r11,%rdi,1),%eax
punpcklbw %xmm0,%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x18,%xmm0
cvtdq2pd %xmm0,%xmm0
movd   %eax,%xmm1
punpcklbw %xmm1,%xmm1
pshuflw $0x60,%xmm1,%xmm1
psrad  $0x18,%xmm1
cvtdq2pd %xmm1,%xmm1
movapd %xmm0,(%rbx,%rdi,8)
movaps %xmm1,0x10(%rbx,%rdi,8)
cmp    %r9,%rsi
je     12ba <standard_Littlewood_Richardson_homotopies+0x19a>
nopl   (%rax)
movsbl (%r11,%rsi,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rbx,%rsi,8)
add    $0x1,%rsi
cmp    %rsi,%r9
jne    12a0 <standard_Littlewood_Richardson_homotopies+0x180>
lea    -0x40(%rbp),%rsi
mov    $0xe5,%edi
mov    %rcx,%rdx
mov    %rbx,%rcx
call   1040 <_ada_use_c2phc@plt>
cvttsd2si (%rbx),%ecx
mov    %eax,%r14d
mov    %ecx,(%r12)
cmp    $0x2,%r13d
jl     12f6 <standard_Littlewood_Richardson_homotopies+0x1d6>
mov    0x28(%rbp),%rdi
add    $0x8,%rbx
mov    %r15d,%edx
shl    $0x3,%rdx
mov    %rbx,%rsi
call   1030 <memcpy@plt>
mov    %r14d,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
test   $0x1,%r8b
jne    1257 <standard_Littlewood_Richardson_homotopies+0x137>
jmp    1298 <standard_Littlewood_Richardson_homotopies+0x178>

LLVM IR (-O0):
define i32 @standard_Littlewood_Richardson_homotopies(i32 %0, i32 %1, i32 %2, i32* %3, i32 %4, i32 %5, i32 %6, i8* %7, i32* %8, double* %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i8*
%19 = alloca i32*
%20 = alloca double*
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i8*
%25 = alloca i64
%26 = alloca [6 x i32]
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32* %3, i32** %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i8* %7, i8** %18
store i32* %8, i32** %19
store double* %9, double** %20
%27 = load i32, i32* %13
%28 = sub nsw i32 %27, 2
%29 = mul nsw i32 2, %28
%30 = load i32, i32* %11
%31 = mul nsw i32 %29, %30
%32 = load i32, i32* %11
%33 = mul nsw i32 %31, %32
%34 = add nsw i32 %33, 1
store i32 %34, i32* %23
%35 = load i32, i32* %23
%36 = zext i32 %35 to i64
%37 = call i8* @llvm.stacksave()
store i8* %37, i8** %24
%38 = alloca double, i64 %36
store i64 %36, i64* %25
%39 = load i32, i32* %11
%40 = getelementptr inbounds [6 x i32], [6 x i32]* %26, i64 0, i64 0
store i32 %39, i32* %40
%41 = load i32, i32* %12
%42 = getelementptr inbounds [6 x i32], [6 x i32]* %26, i64 0, i64 1
store i32 %41, i32* %42
%43 = load i32, i32* %13
%44 = getelementptr inbounds [6 x i32], [6 x i32]* %26, i64 0, i64 2
store i32 %43, i32* %44
%45 = load i32, i32* %15
%46 = getelementptr inbounds [6 x i32], [6 x i32]* %26, i64 0, i64 3
store i32 %45, i32* %46
%47 = load i32, i32* %16
%48 = getelementptr inbounds [6 x i32], [6 x i32]* %26, i64 0, i64 4
store i32 %47, i32* %48
%49 = load i32, i32* %17
%50 = getelementptr inbounds [6 x i32], [6 x i32]* %26, i64 0, i64 5
store i32 %49, i32* %50
store i32 0, i32* %22
br label %51
51: ; preds = %65, %10
%52 = load i32, i32* %22
%53 = load i32, i32* %17
%54 = icmp slt i32 %52, %53
br i1 %54, label %55, label %68
55: ; preds = %51
%56 = load i8*, i8** %18
%57 = load i32, i32* %22
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %56, i64 %58
%60 = load i8, i8* %59
%61 = sitofp i8 %60 to double
%62 = load i32, i32* %22
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %38, i64 %63
store double %61, double* %64
br label %65
65: ; preds = %55
%66 = load i32, i32* %22
%67 = add nsw i32 %66, 1
store i32 %67, i32* %22
br label %51
68: ; preds = %51
%69 = getelementptr inbounds [6 x i32], [6 x i32]* %26, i64 0, i64 0
%70 = load i32*, i32** %14
%71 = call i32 @_ada_use_c2phc(i32 229, i32* %69, i32* %70, double* %38)
store i32 %71, i32* %21
%72 = getelementptr inbounds double, double* %38, i64 0
%73 = load double, double* %72
%74 = fptosi double %73 to i32
%75 = load i32*, i32** %19
store i32 %74, i32* %75
store i32 1, i32* %22
br label %76
76: ; preds = %90, %68
%77 = load i32, i32* %22
%78 = load i32, i32* %23
%79 = icmp slt i32 %77, %78
br i1 %79, label %80, label %93
80: ; preds = %76
%81 = load i32, i32* %22
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds double, double* %38, i64 %82
%84 = load double, double* %83
%85 = load double*, double** %20
%86 = load i32, i32* %22
%87 = sub nsw i32 %86, 1
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %85, i64 %88
store double %84, double* %89
br label %90
90: ; preds = %80
%91 = load i32, i32* %22
%92 = add nsw i32 %91, 1
store i32 %92, i32* %22
br label %76
93: ; preds = %76
%94 = load i32, i32* %21
%95 = load i8*, i8** %24
ret i32 %94
}

LLVM IR (-O2):
define i32 @standard_Littlewood_Richardson_homotopies(i32 %0, i32 %1, i32 %2, i32* %3, i32 %4, i32 %5, i32 %6, i8* nocapture %7, i32* nocapture writeonly %8, double* nocapture writeonly %9) {
%11 = bitcast double* %9 to i8*
%12 = alloca [6 x i32]
%13 = shl i32 %2, 1
%14 = add i32 %13, -4
%15 = mul i32 %0, %0
%16 = mul i32 %15, %14
%17 = or i32 %16, 1
%18 = zext i32 %17 to i64
%19 = alloca double, i64 %18
%20 = bitcast [6 x i32]* %12 to i8*
%21 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 0
store i32 %0, i32* %21
%22 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 1
store i32 %1, i32* %22
%23 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 2
store i32 %2, i32* %23
%24 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 3
store i32 %4, i32* %24
%25 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 4
store i32 %5, i32* %25
%26 = getelementptr inbounds [6 x i32], [6 x i32]* %12, i64 0, i64 5
store i32 %6, i32* %26
%27 = icmp sgt i32 %6, 0
br i1 %27, label %28, label %99
28: ; preds = %10
%29 = zext i32 %6 to i64
%30 = icmp ult i32 %6, 4
br i1 %30, label %89, label %31
31: ; preds = %28
%32 = and i64 %29, 4294967292
%33 = add nsw i64 %32, -4
%34 = lshr exact i64 %33, 2
%35 = add nuw nsw i64 %34, 1
%36 = and i64 %35, 1
%37 = icmp eq i64 %33, 0
br i1 %37, label %71, label %38
38: ; preds = %31
%39 = and i64 %35, 9223372036854775806
br label %40
40: ; preds = %40, %38
%41 = phi i64 [ 0, %38 ], [ %68, %40 ]
%42 = phi i64 [ 0, %38 ], [ %69, %40 ]
%43 = getelementptr inbounds i8, i8* %7, i64 %41
%44 = bitcast i8* %43 to <2 x i8>*
%45 = load <2 x i8>, <2 x i8>* %44
%46 = getelementptr inbounds i8, i8* %43, i64 2
%47 = bitcast i8* %46 to <2 x i8>*
%48 = load <2 x i8>, <2 x i8>* %47
%49 = sitofp <2 x i8> %45 to <2 x double>
%50 = sitofp <2 x i8> %48 to <2 x double>
%51 = getelementptr inbounds double, double* %19, i64 %41
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> %49, <2 x double>* %52
%53 = getelementptr inbounds double, double* %51, i64 2
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> %50, <2 x double>* %54
%55 = or i64 %41, 4
%56 = getelementptr inbounds i8, i8* %7, i64 %55
%57 = bitcast i8* %56 to <2 x i8>*
%58 = load <2 x i8>, <2 x i8>* %57
%59 = getelementptr inbounds i8, i8* %56, i64 2
%60 = bitcast i8* %59 to <2 x i8>*
%61 = load <2 x i8>, <2 x i8>* %60
%62 = sitofp <2 x i8> %58 to <2 x double>
%63 = sitofp <2 x i8> %61 to <2 x double>
%64 = getelementptr inbounds double, double* %19, i64 %55
%65 = bitcast double* %64 to <2 x double>*
store <2 x double> %62, <2 x double>* %65
%66 = getelementptr inbounds double, double* %64, i64 2
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> %63, <2 x double>* %67
%68 = add nuw i64 %41, 8
%69 = add i64 %42, 2
%70 = icmp eq i64 %69, %39
br i1 %70, label %71, label %40
71: ; preds = %40, %31
%72 = phi i64 [ 0, %31 ], [ %68, %40 ]
%73 = icmp eq i64 %36, 0
br i1 %73, label %87, label %74
74: ; preds = %71
%75 = getelementptr inbounds i8, i8* %7, i64 %72
%76 = bitcast i8* %75 to <2 x i8>*
%77 = load <2 x i8>, <2 x i8>* %76
%78 = getelementptr inbounds i8, i8* %75, i64 2
%79 = bitcast i8* %78 to <2 x i8>*
%80 = load <2 x i8>, <2 x i8>* %79
%81 = sitofp <2 x i8> %77 to <2 x double>
%82 = sitofp <2 x i8> %80 to <2 x double>
%83 = getelementptr inbounds double, double* %19, i64 %72
%84 = bitcast double* %83 to <2 x double>*
store <2 x double> %81, <2 x double>* %84
%85 = getelementptr inbounds double, double* %83, i64 2
%86 = bitcast double* %85 to <2 x double>*
store <2 x double> %82, <2 x double>* %86
br label %87
87: ; preds = %71, %74
%88 = icmp eq i64 %32, %29
br i1 %88, label %99, label %89
89: ; preds = %28, %87
%90 = phi i64 [ 0, %28 ], [ %32, %87 ]
br label %91
91: ; preds = %89, %91
%92 = phi i64 [ %97, %91 ], [ %90, %89 ]
%93 = getelementptr inbounds i8, i8* %7, i64 %92
%94 = load i8, i8* %93
%95 = sitofp i8 %94 to double
%96 = getelementptr inbounds double, double* %19, i64 %92
store double %95, double* %96
%97 = add nuw nsw i64 %92, 1
%98 = icmp eq i64 %97, %29
br i1 %98, label %99, label %91
99: ; preds = %91, %87, %10
%100 = call i32 @_ada_use_c2phc(i32 229, i32* %21, i32* %3, double* %19)
%101 = load double, double* %19
%102 = fptosi double %101 to i32
store i32 %102, i32* %8
%103 = icmp sgt i32 %17, 1
br i1 %103, label %104, label %109
104: ; preds = %99
%105 = getelementptr inbounds double, double* %19, i64 1
%106 = bitcast double* %105 to i8*
%107 = zext i32 %16 to i64
%108 = shl nuw nsw i64 %107, 3
br label %109
109: ; preds = %104, %99
ret i32 %100
}