#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 dobldobl_Littlewood_Richardson_homotopies(int, int, int, int *, int, int,
                                              int, char *, int *, double *);
int /*<<< orphan*/ printf(char *, ...);
int quaddobl_Littlewood_Richardson_homotopies(int, int, int, int *, int, int,
                                              int, char *, int *, double *);
int /*<<< orphan*/ scanf(char *, char *);
int standard_Littlewood_Richardson_homotopies(int, int, int, int *, int, int,
                                              int, char *, int *, double *);
int strlen(char *);
int call_Littlewood_Richardson_homotopies(int n, int k, int c, int *brackets,
                                          int verbose, int verify, int size,
                                          int *r) {
  double flags[size];
  char ans, filename[80];
  int i, fail, nbname, prec;
  scanf("%c", &ans);
  printf("Give the name of the output file : ");
  scanf("%s", filename);
  nbname = strlen(filename);
  printf("Number of characters in %s is %d\n", filename, nbname);
  if (prec == 0)
    fail = standard_Littlewood_Richardson_homotopies(
        n, k, c, brackets, verbose, verify, nbname, filename, r, flags);
  if (prec == 1)
    fail = dobldobl_Littlewood_Richardson_homotopies(
        n, k, c, brackets, verbose, verify, nbname, filename, r, flags);
  if (prec == 2)
    fail = quaddobl_Littlewood_Richardson_homotopies(
        n, k, c, brackets, verbose, verify, nbname, filename, r, flags);
  printf("\nThe coefficients of the fixed flag :");
  for (i = 0; i < size; i++) {
    if (i % (2 * n) == 0)
      printf("\n");
    printf(" %+.1e", flags[i]);
  }
  printf("\n");
  return fail;
}


x86 assembly (clang, -O0):
<call_Littlewood_Richardson_homotopies>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xa8,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    0x10(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xa8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
lea    0xe47(%rip),%rdi
lea    -0x39(%rbp),%rsi
call   1080 <scanf@plt>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rsi
lea    0xe49(%rip),%rdi
call   1080 <scanf@plt>
lea    -0x90(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x9c(%rbp)
lea    -0x90(%rbp),%rsi
mov    -0x9c(%rbp),%edx
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0xa0(%rbp)
jne    126f <call_Littlewood_Richardson_homotopies+0x10f>
mov    -0xa8(%rbp),%rax
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    -0x9c(%rbp),%ebx
lea    -0x90(%rbp),%r11
mov    0x18(%rbp),%r10
sub    $0x20,%rsp
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1060 <standard_Littlewood_Richardson_homotopies@plt>
add    $0x20,%rsp
mov    %eax,-0x98(%rbp)
cmpl   $0x1,-0xa0(%rbp)
jne    12ce <call_Littlewood_Richardson_homotopies+0x16e>
mov    -0xa8(%rbp),%rax
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    -0x9c(%rbp),%ebx
lea    -0x90(%rbp),%r11
mov    0x18(%rbp),%r10
sub    $0x20,%rsp
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <dobldobl_Littlewood_Richardson_homotopies@plt>
add    $0x20,%rsp
mov    %eax,-0x98(%rbp)
cmpl   $0x2,-0xa0(%rbp)
jne    132d <call_Littlewood_Richardson_homotopies+0x1cd>
mov    -0xa8(%rbp),%rax
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    -0x9c(%rbp),%ebx
lea    -0x90(%rbp),%r11
mov    0x18(%rbp),%r10
sub    $0x20,%rsp
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1070 <quaddobl_Littlewood_Richardson_homotopies@plt>
add    $0x20,%rsp
mov    %eax,-0x98(%rbp)
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x94(%rbp)
mov    -0x94(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    13af <call_Littlewood_Richardson_homotopies+0x24f>
mov    -0x94(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    137a <call_Littlewood_Richardson_homotopies+0x21a>
lea    0xcd7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xa8(%rbp),%rax
movslq -0x94(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xcde(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1345 <call_Littlewood_Richardson_homotopies+0x1e5>
lea    0xc94(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x98(%rbp),%eax
mov    -0x30(%rbp),%rcx
mov    %rcx,%rsp
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_Littlewood_Richardson_homotopies>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %edi,%r14d
mov    0x10(%rbp),%r12d
mov    %rsp,%r13
lea    0xf(,%r12,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
lea    0xe8c(%rip),%rdi
lea    -0x29(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xe7f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe95(%rip),%rdi
lea    -0x80(%rbp),%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xe7d(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe8c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
jle    1210 <call_Littlewood_Richardson_homotopies+0xd0>
add    %r14d,%r14d
xor    %ebx,%ebx
lea    0xe9a(%rip),%r15
jmp    11fa <call_Littlewood_Richardson_homotopies+0xba>
nopw   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbx,8),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
je     1210 <call_Littlewood_Richardson_homotopies+0xd0>
mov    %ebx,%eax
cltd
idiv   %r14d
test   %edx,%edx
jne    11e0 <call_Littlewood_Richardson_homotopies+0xa0>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11e0 <call_Littlewood_Richardson_homotopies+0xa0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [36 x i8] c"Give the name of the output file : \00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [34 x i8] c"Number of characters in %s is %d\0A\00"
@.str.4 = [38 x i8] c"\0AThe coefficients of the fixed flag :\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [7 x i8] c" %+.1e\00"
define i32 @call_Littlewood_Richardson_homotopies(i32 %0, i32 %1, i32 %2, i32* %3, i32 %4, i32 %5, i32 %6, i32* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32*
%17 = alloca i8*
%18 = alloca i64
%19 = alloca i8
%20 = alloca [80 x i8]
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32* %3, i32** %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32* %7, i32** %16
%25 = load i32, i32* %15
%26 = zext i32 %25 to i64
%27 = call i8* @llvm.stacksave()
store i8* %27, i8** %17
%28 = alloca double, i64 %26
store i64 %26, i64* %18
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %19)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%31 = getelementptr inbounds [80 x i8], [80 x i8]* %20, i64 0, i64 0
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %31)
%33 = getelementptr inbounds [80 x i8], [80 x i8]* %20, i64 0, i64 0
%34 = call i32 @strlen(i8* %33)
store i32 %34, i32* %23
%35 = getelementptr inbounds [80 x i8], [80 x i8]* %20, i64 0, i64 0
%36 = load i32, i32* %23
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %35, i32 %36)
%38 = load i32, i32* %24
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %51
40: ; preds = %8
%41 = load i32, i32* %9
%42 = load i32, i32* %10
%43 = load i32, i32* %11
%44 = load i32*, i32** %12
%45 = load i32, i32* %13
%46 = load i32, i32* %14
%47 = load i32, i32* %23
%48 = getelementptr inbounds [80 x i8], [80 x i8]* %20, i64 0, i64 0
%49 = load i32*, i32** %16
%50 = call i32 @standard_Littlewood_Richardson_homotopies(i32 %41, i32 %42, i32 %43, i32* %44, i32 %45, i32 %46, i32 %47, i8* %48, i32* %49, double* %28)
store i32 %50, i32* %22
br label %51
51: ; preds = %40, %8
%52 = load i32, i32* %24
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %65
54: ; preds = %51
%55 = load i32, i32* %9
%56 = load i32, i32* %10
%57 = load i32, i32* %11
%58 = load i32*, i32** %12
%59 = load i32, i32* %13
%60 = load i32, i32* %14
%61 = load i32, i32* %23
%62 = getelementptr inbounds [80 x i8], [80 x i8]* %20, i64 0, i64 0
%63 = load i32*, i32** %16
%64 = call i32 @dobldobl_Littlewood_Richardson_homotopies(i32 %55, i32 %56, i32 %57, i32* %58, i32 %59, i32 %60, i32 %61, i8* %62, i32* %63, double* %28)
store i32 %64, i32* %22
br label %65
65: ; preds = %54, %51
%66 = load i32, i32* %24
%67 = icmp eq i32 %66, 2
br i1 %67, label %68, label %79
68: ; preds = %65
%69 = load i32, i32* %9
%70 = load i32, i32* %10
%71 = load i32, i32* %11
%72 = load i32*, i32** %12
%73 = load i32, i32* %13
%74 = load i32, i32* %14
%75 = load i32, i32* %23
%76 = getelementptr inbounds [80 x i8], [80 x i8]* %20, i64 0, i64 0
%77 = load i32*, i32** %16
%78 = call i32 @quaddobl_Littlewood_Richardson_homotopies(i32 %69, i32 %70, i32 %71, i32* %72, i32 %73, i32 %74, i32 %75, i8* %76, i32* %77, double* %28)
store i32 %78, i32* %22
br label %79
79: ; preds = %68, %65
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %21
br label %81
81: ; preds = %99, %79
%82 = load i32, i32* %21
%83 = load i32, i32* %15
%84 = icmp slt i32 %82, %83
br i1 %84, label %85, label %102
85: ; preds = %81
%86 = load i32, i32* %21
%87 = load i32, i32* %9
%88 = mul nsw i32 2, %87
%89 = srem i32 %86, %88
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %93
91: ; preds = %85
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %93
93: ; preds = %91, %85
%94 = load i32, i32* %21
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %28, i64 %95
%97 = load double, double* %96
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %97)
br label %99
99: ; preds = %93
%100 = load i32, i32* %21
%101 = add nsw i32 %100, 1
store i32 %101, i32* %21
br label %81
102: ; preds = %81
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%104 = load i32, i32* %22
%105 = load i8*, i8** %17
ret i32 %104
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [36 x i8] c"Give the name of the output file : \00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [34 x i8] c"Number of characters in %s is %d\0A\00"
@.str.4 = [38 x i8] c"\0AThe coefficients of the fixed flag :\00"
@.str.6 = [7 x i8] c" %+.1e\00"
define i32 @call_Littlewood_Richardson_homotopies(i32 %0, i32 %1, i32 %2, i32* nocapture readnone %3, i32 %4, i32 %5, i32 %6, i32* nocapture readnone %7) {
%9 = alloca i8
%10 = alloca [80 x i8]
%11 = zext i32 %6 to i64
%12 = alloca double, i64 %11
%13 = getelementptr inbounds [80 x i8], [80 x i8]* %10, i64 0, i64 0
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%17 = call i32 @strlen(i8* %13)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %13, i32 %17)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp sgt i32 %6, 0
br i1 %20, label %21, label %36
21: ; preds = %8
%22 = shl nsw i32 %0, 1
br label %23
23: ; preds = %21, %30
%24 = phi i64 [ 0, %21 ], [ %34, %30 ]
%25 = trunc i64 %24 to i32
%26 = srem i32 %25, %22
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = call i32 @putchar(i32 10)
br label %30
30: ; preds = %28, %23
%31 = getelementptr inbounds double, double* %12, i64 %24
%32 = load double, double* %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %32)
%34 = add nuw nsw i64 %24, 1
%35 = icmp eq i64 %34, %11
br i1 %35, label %36, label %23
36: ; preds = %30, %8
%37 = call i32 @putchar(i32 10)
ret i32 undef
}