#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ feedback(int, int, int, int, int, int, int, int, char *,
                            char *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  int n, m, p, q, nb, level, nn, i, input;
  double *points, *planes;
  FILE *ifp, *ofp;
  if (argc != 3) {
    printf("\n%s\n\n", "Usage: ts_feedback input_file output_file");
    exit(1);
  }
  ifp = fopen(argv[1], "r");
  ofp = fopen(argv[2], "w");
  fscanf(ifp, "%d", &n);
  printf("The number of the internal states for the given plant (A, B, C) n = "
         "%d\n",
         n);
  fscanf(ifp, "%d", &m);
  printf("The system's input dimension m = %d.\n", m);
  fscanf(ifp, "%d", &p);
  printf("The system's output dimension p = %d.\n", p);
  fscanf(ifp, "%d", &q);
  printf("The number of the internal states for the dynamic compensators q = "
         "%d.\n",
         q);
  fscanf(ifp, "%d", &nb);
  printf("Give the number of maps wanted (<0 for all) : %d ", nb);
  fscanf(ifp, "%d", &level);
  printf("\nType 0, 1, 2, or 3 to select output level :\n");
  printf("  0. no intermediate output;\n");
  printf("  1. only final determinant validation;\n");
  printf("  2. + validation of all intermediate determinants;\n");
  printf("  3. + intermediate output of all path trackers.\n");
  printf("The amount of the intermediate output: %d\n", level);
  fscanf(ifp, "%d", &input);
  printf("Type 0, 1, 2 to select input :\n");
  printf("  0. interactive input of real numbers\n");
  printf("  1. interactive input of complex numbers\n");
  printf("  2. random input of complex numbers\n");
  printf("  3. random input of real numbers\n");
  printf("  4. interactive input of real numbers for matrices and complex "
         "numbers for poles\n");
  printf("The selected input is: %d\n", input);
  nn = m * p + q * (m + p);
  if (nn < (n + q)) {
    printf("\n%s\n", "Overdetermined, no feedback laws.");
    exit(1);
  }
  srand(time(NULL));
  feedback(n, m, p, q, nb, level, nn, input, argv[1], argv[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x78,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x3,-0x10(%rbp)
je     11b0 <main+0x40>
lea    0xe68(%rip),%rdi
lea    0xe67(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe71(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe5b(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x60(%rbp)
mov    -0x58(%rbp),%rdi
lea    0xe49(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rdi
lea    0xe24(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x20(%rbp),%esi
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rdi
lea    0xdff(%rip),%rsi
lea    -0x24(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x24(%rbp),%esi
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rdi
lea    0xdda(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x28(%rbp),%esi
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rdi
lea    0xdb5(%rip),%rsi
lea    -0x2c(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x2c(%rbp),%esi
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rdi
lea    0xd90(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <fscanf@plt>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%esi
lea    0xf25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rdi
lea    0xd25(%rip),%rsi
lea    -0x3c(%rbp),%rdx
call   1040 <fscanf@plt>
lea    0xf2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%esi
lea    0xfe6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    -0x28(%rbp),%ecx
mov    -0x20(%rbp),%edx
add    -0x24(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    -0x28(%rbp),%ecx
cmp    %ecx,%eax
jge    13c5 <main+0x255>
lea    0xfca(%rip),%rdi
lea    0xfc8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x34(%rbp),%ebx
mov    -0x3c(%rbp),%r11d
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%r10
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1080 <feedback@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
cmp    $0x3,%edi
jne    139f <main+0x21f>
mov    %rsi,%r14
mov    0x8(%rsi),%rdi
lea    0xe90(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%rbx
mov    0x10(%r14),%rdi
lea    0xe7f(%rip),%rsi
call   1080 <fopen@plt>
lea    0xe75(%rip),%r15
lea    0x30(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <fscanf@plt>
mov    0x30(%rsp),%esi
lea    0xe5d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x2c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <fscanf@plt>
mov    0x2c(%rsp),%esi
lea    0xe83(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x28(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <fscanf@plt>
mov    0x28(%rsp),%esi
lea    0xe87(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x24(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <fscanf@plt>
mov    0x24(%rsp),%esi
lea    0xe8c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x3c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <fscanf@plt>
mov    0x3c(%rsp),%esi
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x38(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <fscanf@plt>
lea    0xf33(%rip),%rdi
call   1030 <puts@plt>
lea    0xf54(%rip),%rdi
call   1030 <puts@plt>
lea    0xf65(%rip),%rdi
call   1030 <puts@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa9(%rip),%rdi
call   1030 <puts@plt>
mov    0x38(%rsp),%esi
lea    0xe86(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x34(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <fscanf@plt>
lea    0xfac(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbf(%rip),%rdi
call   1030 <puts@plt>
lea    0xfda(%rip),%rdi
call   1030 <puts@plt>
lea    0xff8(%rip),%rdi
call   1030 <puts@plt>
lea    0x1011(%rip),%rdi
call   1030 <puts@plt>
lea    0x1027(%rip),%rdi
call   1030 <puts@plt>
mov    0x34(%rsp),%esi
lea    0xe47(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c(%rsp),%eax
mov    0x28(%rsp),%ebx
mov    %ebx,%ecx
imul   %eax,%ecx
mov    0x24(%rsp),%edx
add    %eax,%ebx
imul   %edx,%ebx
add    %ecx,%ebx
add    0x30(%rsp),%edx
cmp    %edx,%ebx
jl     13af <main+0x22f>
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    0x30(%rsp),%edi
mov    0x2c(%rsp),%esi
mov    0x28(%rsp),%edx
mov    0x24(%rsp),%ecx
mov    0x3c(%rsp),%r8d
mov    0x38(%rsp),%r9d
mov    0x34(%rsp),%eax
movups 0x8(%r14),%xmm0
movups %xmm0,0x10(%rsp)
mov    %eax,0x8(%rsp)
mov    %ebx,(%rsp)
call   1090 <feedback@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xc5a(%rip),%rdi
lea    0xc59(%rip),%rsi
jmp    13bd <main+0x23d>
lea    0xdd6(%rip),%rdi
lea    0xdd4(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\0A%s\0A\0A\00"
@.str.1 = [42 x i8] c"Usage: ts_feedback input_file output_file\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [72 x i8] c"The number of the internal states for the given plant (A, B, C) n = %d\0A\00"
@.str.6 = [38 x i8] c"The system's input dimension m = %d.\0A\00"
@.str.7 = [39 x i8] c"The system's output dimension p = %d.\0A\00"
@.str.8 = [72 x i8] c"The number of the internal states for the dynamic compensators q = %d.\0A\00"
@.str.9 = [50 x i8] c"Give the number of maps wanted (<0 for all) : %d \00"
@.str.10 = [46 x i8] c"\0AType 0, 1, 2, or 3 to select output level :\0A\00"
@.str.11 = [30 x i8] c" 0. no intermediate output;\0A\00"
@.str.12 = [41 x i8] c" 1. only final determinant validation;\0A\00"
@.str.13 = [53 x i8] c" 2. + validation of all intermediate determinants;\0A\00"
@.str.14 = [50 x i8] c" 3. + intermediate output of all path trackers.\0A\00"
@.str.15 = [43 x i8] c"The amount of the intermediate output: %d\0A\00"
@.str.16 = [32 x i8] c"Type 0, 1, 2 to select input :\0A\00"
@.str.17 = [40 x i8] c" 0. interactive input of real numbers\0A\00"
@.str.18 = [43 x i8] c" 1. interactive input of complex numbers\0A\00"
@.str.19 = [38 x i8] c" 2. random input of complex numbers\0A\00"
@.str.20 = [35 x i8] c" 3. random input of real numbers\0A\00"
@.str.21 = [83 x i8] c" 4. interactive input of real numbers for matrices and complex numbers for poles\0A\00"
@.str.22 = [27 x i8] c"The selected input is: %d\0A\00"
@.str.23 = [5 x i8] c"\0A%s\0A\00"
@.str.24 = [34 x i8] c"Overdetermined, no feedback laws.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double*
%16 = alloca double*
%17 = alloca i32*
%18 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 3
br i1 %20, label %21, label %24
21: ; preds = %2
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%23 = call i32 @exit(i32 1)
unreachable
24: ; preds = %2
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32* @fopen(i8* %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %28, i32** %17
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 2
%31 = load i8*, i8** %30
%32 = call i32* @fopen(i8* %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %32, i32** %18
%33 = load i32*, i32** %17
%34 = call i32 @fscanf(i32* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %6)
%35 = load i32, i32* %6
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.5, i64 0, i64 0), i32 %35)
%37 = load i32*, i32** %17
%38 = call i32 @fscanf(i32* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %7)
%39 = load i32, i32* %7
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 %39)
%41 = load i32*, i32** %17
%42 = call i32 @fscanf(i32* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %8)
%43 = load i32, i32* %8
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i32 %43)
%45 = load i32*, i32** %17
%46 = call i32 @fscanf(i32* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %9)
%47 = load i32, i32* %9
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0), i32 %47)
%49 = load i32*, i32** %17
%50 = call i32 @fscanf(i32* %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %10)
%51 = load i32, i32* %10
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i32 %51)
%53 = load i32*, i32** %17
%54 = call i32 @fscanf(i32* %53, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %11)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0))
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0))
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.13, i64 0, i64 0))
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0))
%60 = load i32, i32* %11
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.15, i64 0, i64 0), i32 %60)
%62 = load i32*, i32** %17
%63 = call i32 @fscanf(i32* %62, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %14)
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0))
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.17, i64 0, i64 0))
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.18, i64 0, i64 0))
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.19, i64 0, i64 0))
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.20, i64 0, i64 0))
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.21, i64 0, i64 0))
%70 = load i32, i32* %14
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.22, i64 0, i64 0), i32 %70)
%72 = load i32, i32* %7
%73 = load i32, i32* %8
%74 = mul nsw i32 %72, %73
%75 = load i32, i32* %9
%76 = load i32, i32* %7
%77 = load i32, i32* %8
%78 = add nsw i32 %76, %77
%79 = mul nsw i32 %75, %78
%80 = add nsw i32 %74, %79
store i32 %80, i32* %12
%81 = load i32, i32* %12
%82 = load i32, i32* %6
%83 = load i32, i32* %9
%84 = add nsw i32 %82, %83
%85 = icmp slt i32 %81, %84
br i1 %85, label %86, label %89
86: ; preds = %24
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.24, i64 0, i64 0))
%88 = call i32 @exit(i32 1)
unreachable
89: ; preds = %24
%90 = call i32 @time(i32* null)
%91 = call i32 @srand(i32 %90)
%92 = load i32, i32* %6
%93 = load i32, i32* %7
%94 = load i32, i32* %8
%95 = load i32, i32* %9
%96 = load i32, i32* %10
%97 = load i32, i32* %11
%98 = load i32, i32* %12
%99 = load i32, i32* %14
%100 = load i8**, i8*** %5
%101 = getelementptr inbounds i8*, i8** %100, i64 1
%102 = load i8*, i8** %101
%103 = load i8**, i8*** %5
%104 = getelementptr inbounds i8*, i8** %103, i64 2
%105 = load i8*, i8** %104
%106 = call i32 @feedback(i32 %92, i32 %93, i32 %94, i32 %95, i32 %96, i32 %97, i32 %98, i32 %99, i8* %102, i8* %105)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0A%s\0A\0A\00"
@.str.1 = [42 x i8] c"Usage: ts_feedback input_file output_file\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [72 x i8] c"The number of the internal states for the given plant (A, B, C) n = %d\0A\00"
@.str.6 = [38 x i8] c"The system's input dimension m = %d.\0A\00"
@.str.7 = [39 x i8] c"The system's output dimension p = %d.\0A\00"
@.str.8 = [72 x i8] c"The number of the internal states for the dynamic compensators q = %d.\0A\00"
@.str.9 = [50 x i8] c"Give the number of maps wanted (<0 for all) : %d \00"
@.str.15 = [43 x i8] c"The amount of the intermediate output: %d\0A\00"
@.str.22 = [27 x i8] c"The selected input is: %d\0A\00"
@.str.23 = [5 x i8] c"\0A%s\0A\00"
@.str.24 = [34 x i8] c"Overdetermined, no feedback laws.\00"
@str = [45 x i8] c"\0AType 0, 1, 2, or 3 to select output level :\00"
@str.25 = [29 x i8] c" 0. no intermediate output;\00"
@str.26 = [40 x i8] c" 1. only final determinant validation;\00"
@str.27 = [52 x i8] c" 2. + validation of all intermediate determinants;\00"
@str.28 = [49 x i8] c" 3. + intermediate output of all path trackers.\00"
@str.29 = [31 x i8] c"Type 0, 1, 2 to select input :\00"
@str.30 = [39 x i8] c" 0. interactive input of real numbers\00"
@str.31 = [42 x i8] c" 1. interactive input of complex numbers\00"
@str.32 = [37 x i8] c" 2. random input of complex numbers\00"
@str.33 = [34 x i8] c" 3. random input of real numbers\00"
@str.34 = [82 x i8] c" 4. interactive input of real numbers for matrices and complex numbers for poles\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = bitcast i32* %8 to i8*
%16 = bitcast i32* %9 to i8*
%17 = icmp eq i32 %0, 3
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%20 = tail call i32 @exit(i32 1)
unreachable
21: ; preds = %2
%22 = getelementptr inbounds i8*, i8** %1, i64 1
%23 = load i8*, i8** %22
%24 = tail call i32* @fopen(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%25 = getelementptr inbounds i8*, i8** %1, i64 2
%26 = load i8*, i8** %25
%27 = tail call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%28 = call i32 @fscanf(i32* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %3)
%29 = load i32, i32* %3
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.5, i64 0, i64 0), i32 %29)
%31 = call i32 @fscanf(i32* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %4)
%32 = load i32, i32* %4
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 %32)
%34 = call i32 @fscanf(i32* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %5)
%35 = load i32, i32* %5
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i32 %35)
%37 = call i32 @fscanf(i32* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %6)
%38 = load i32, i32* %6
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0), i32 %38)
%40 = call i32 @fscanf(i32* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %7)
%41 = load i32, i32* %7
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i32 %41)
%43 = call i32 @fscanf(i32* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %8)
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.25, i64 0, i64 0))
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.26, i64 0, i64 0))
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.27, i64 0, i64 0))
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.28, i64 0, i64 0))
%49 = load i32, i32* %8
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.15, i64 0, i64 0), i32 %49)
%51 = call i32 @fscanf(i32* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %9)
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.29, i64 0, i64 0))
%53 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.30, i64 0, i64 0))
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.31, i64 0, i64 0))
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.32, i64 0, i64 0))
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.33, i64 0, i64 0))
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.34, i64 0, i64 0))
%58 = load i32, i32* %9
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.22, i64 0, i64 0), i32 %58)
%60 = load i32, i32* %4
%61 = load i32, i32* %5
%62 = mul nsw i32 %61, %60
%63 = load i32, i32* %6
%64 = add nsw i32 %61, %60
%65 = mul nsw i32 %63, %64
%66 = add nsw i32 %65, %62
%67 = load i32, i32* %3
%68 = add nsw i32 %67, %63
%69 = icmp slt i32 %66, %68
br i1 %69, label %70, label %73
70: ; preds = %21
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.24, i64 0, i64 0))
%72 = call i32 @exit(i32 1)
unreachable
73: ; preds = %21
%74 = call i32 @time(i32* null)
%75 = call i32 @srand(i32 %74)
%76 = load i32, i32* %3
%77 = load i32, i32* %4
%78 = load i32, i32* %5
%79 = load i32, i32* %6
%80 = load i32, i32* %7
%81 = load i32, i32* %8
%82 = load i32, i32* %9
%83 = load i8*, i8** %22
%84 = load i8*, i8** %25
%85 = call i32 @feedback(i32 %76, i32 %77, i32 %78, i32 %79, i32 %80, i32 %81, i32 %66, i32 %82, i8* %83, i8* %84)
ret i32 0
}