#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 celcon_dimension_of_points(int *);
int celcon_number_of_cells(int *);
int celcon_read_mixed_cell_configuration();
int define_output_file();
int /*<<< orphan*/ printf(char *, ...);
int prompt_for_precision();
int read_standard_target_system();
int show_mixture(int, int *);
int /*<<< orphan*/ solve_dobldobl_start_system(int);
int /*<<< orphan*/ solve_quaddobl_start_system(int);
int /*<<< orphan*/ solve_standard_start_system(int);
void read_cells_and_solve_start_system(void) {
  int fail, dim, r, len, prcs;
  fail = celcon_read_mixed_cell_configuration();
  printf("\nReading a system to initialize the symbol table...");
  fail = read_standard_target_system();
  fail = define_output_file();
  fail = celcon_dimension_of_points(&dim);
  printf("dimension of the lifted points : %d\n", dim);
  fail = show_mixture(dim, &r);
  fail = celcon_number_of_cells(&len);
  printf("number of cells in the configuration : %d\n", len);
  prcs = prompt_for_precision();
  if (prcs == 0)
    solve_standard_start_system(len);
  else if (prcs == 1)
    solve_dobldobl_start_system(len);
  else if (prcs == 2)
    solve_quaddobl_start_system(len);
  else
    printf("invalid precision level\n");
}


x86 assembly (clang, -O0):
<read_cells_and_solve_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   10b0 <celcon_read_mixed_cell_configuration@plt>
mov    %eax,-0x4(%rbp)
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1030 <read_standard_target_system@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1080 <define_output_file@plt>
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   10d0 <celcon_dimension_of_points@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
call   1040 <show_mixture@plt>
mov    %eax,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
call   1050 <celcon_number_of_cells@plt>
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <prompt_for_precision@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    124e <read_cells_and_solve_start_system+0x9e>
mov    -0x10(%rbp),%edi
call   1070 <solve_standard_start_system@plt>
jmp    1294 <read_cells_and_solve_start_system+0xe4>
cmpl   $0x1,-0x14(%rbp)
jne    1265 <read_cells_and_solve_start_system+0xb5>
mov    -0x10(%rbp),%edi
call   10a0 <solve_dobldobl_start_system@plt>
jmp    128f <read_cells_and_solve_start_system+0xdf>
cmpl   $0x2,-0x14(%rbp)
jne    127c <read_cells_and_solve_start_system+0xcc>
mov    -0x10(%rbp),%edi
call   10c0 <solve_quaddobl_start_system@plt>
jmp    128a <read_cells_and_solve_start_system+0xda>
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    128f <read_cells_and_solve_start_system+0xdf>
jmp    1294 <read_cells_and_solve_start_system+0xe4>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_cells_and_solve_start_system>:
sub    $0x18,%rsp
xor    %eax,%eax
call   10c0 <celcon_read_mixed_cell_configuration@plt>
lea    0xe2e(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1030 <read_standard_target_system@plt>
xor    %eax,%eax
call   1090 <define_output_file@plt>
lea    0x10(%rsp),%rdi
call   10e0 <celcon_dimension_of_points@plt>
mov    0x10(%rsp),%esi
lea    0xe38(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x10(%rsp),%edi
lea    0x14(%rsp),%rsi
call   1040 <show_mixture@plt>
lea    0xc(%rsp),%rdi
call   1060 <celcon_number_of_cells@plt>
mov    0xc(%rsp),%esi
lea    0xe33(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   10a0 <prompt_for_precision@plt>
cmp    $0x2,%eax
je     1250 <read_cells_and_solve_start_system+0x90>
cmp    $0x1,%eax
je     125e <read_cells_and_solve_start_system+0x9e>
test   %eax,%eax
jne    126c <read_cells_and_solve_start_system+0xac>
mov    0xc(%rsp),%edi
call   1080 <solve_standard_start_system@plt>
add    $0x18,%rsp
ret
mov    0xc(%rsp),%edi
call   10d0 <solve_quaddobl_start_system@plt>
add    $0x18,%rsp
ret
mov    0xc(%rsp),%edi
call   10b0 <solve_dobldobl_start_system@plt>
add    $0x18,%rsp
ret
lea    0xe11(%rip),%rdi
call   1050 <puts@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [52 x i8] c"\0AReading a system to initialize the symbol table...\00"
@.str.1 = [37 x i8] c"dimension of the lifted points : %d\0A\00"
@.str.2 = [43 x i8] c"number of cells in the configuration : %d\0A\00"
@.str.3 = [25 x i8] c"invalid precision level\0A\00"
define void @read_cells_and_solve_start_system() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i32 (...) @celcon_read_mixed_cell_configuration()
store i32 %6, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @read_standard_target_system()
store i32 %8, i32* %1
%9 = call i32 (...) @define_output_file()
store i32 %9, i32* %1
%10 = call i32 @celcon_dimension_of_points(i32* %2)
store i32 %10, i32* %1
%11 = load i32, i32* %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %2
%14 = call i32 @show_mixture(i32 %13, i32* %3)
store i32 %14, i32* %1
%15 = call i32 @celcon_number_of_cells(i32* %4)
store i32 %15, i32* %1
%16 = load i32, i32* %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = call i32 (...) @prompt_for_precision()
store i32 %18, i32* %5
%19 = load i32, i32* %5
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %0
%22 = load i32, i32* %4
%23 = call i32 @solve_standard_start_system(i32 %22)
br label %40
24: ; preds = %0
%25 = load i32, i32* %5
%26 = icmp eq i32 %25, 1
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %4
%29 = call i32 @solve_dobldobl_start_system(i32 %28)
br label %39
30: ; preds = %24
%31 = load i32, i32* %5
%32 = icmp eq i32 %31, 2
br i1 %32, label %33, label %36
33: ; preds = %30
%34 = load i32, i32* %4
%35 = call i32 @solve_quaddobl_start_system(i32 %34)
br label %38
36: ; preds = %30
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %38
38: ; preds = %36, %33
br label %39
39: ; preds = %38, %27
br label %40
40: ; preds = %39, %21
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"\0AReading a system to initialize the symbol table...\00"
@.str.1 = [37 x i8] c"dimension of the lifted points : %d\0A\00"
@.str.2 = [43 x i8] c"number of cells in the configuration : %d\0A\00"
@str = [24 x i8] c"invalid precision level\00"
define void @read_cells_and_solve_start_system() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (...) @celcon_read_mixed_cell_configuration()
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (...) @read_standard_target_system()
%10 = tail call i32 (...) @define_output_file()
%11 = call i32 @celcon_dimension_of_points(i32* %1)
%12 = load i32, i32* %1
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %1
%15 = call i32 @show_mixture(i32 %14, i32* %2)
%16 = call i32 @celcon_number_of_cells(i32* %3)
%17 = load i32, i32* %3
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = call i32 (...) @prompt_for_precision()
switch i32 %19, label %29 [
i32 0, label %20
i32 1, label %23
i32 2, label %26
]
20: ; preds = %0
%21 = load i32, i32* %3
%22 = call i32 @solve_standard_start_system(i32 %21)
br label %31
23: ; preds = %0
%24 = load i32, i32* %3
%25 = call i32 @solve_dobldobl_start_system(i32 %24)
br label %31
26: ; preds = %0
%27 = load i32, i32* %3
%28 = call i32 @solve_quaddobl_start_system(i32 %27)
br label %31
29: ; preds = %0
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %31
31: ; preds = %23, %29, %26, %20
ret void
}