#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 **create_double_int(int, int *);
char ***create_triple_char(int, int *, int);
int /*<<< orphan*/ free_simu_var(int *, int **, char ***, char ***);
int /*<<< orphan*/ print_c_simu_variables(int *, char ***, char ***, int **,
                                          char *, char *);
int *read_nb_var_simu(char *);
int /*<<< orphan*/ read_simu_variables(char *, int *, char ***, char ***,
                                       int **);
void generate_user_sf_IO() {
  char *fileName, *fileoutC, *fileoutH;
  int *nb_var_simu, **varSizeTab;
  char ***varNameTab, ***typeTab;
  fileName = "/home/hdallali/CoManRobotranSimulator/Standalone"
             "/src/project/varState/simu_variables.txt";
  fileoutC = "/home/hdallali/CoManRobotranSimulator/Standalone"
             "/src/project/user_files/user_sf_IO.c";
  fileoutH = "/home/hdallali/CoManRobotranSimulator/Standalone"
             "/src/project/user_files/user_sf_IO.h";
  nb_var_simu = read_nb_var_simu(fileName);
  varNameTab = create_triple_char(4, nb_var_simu, 100);
  typeTab = create_triple_char(4, nb_var_simu, 100);
  varSizeTab = create_double_int(4, nb_var_simu);
  read_simu_variables(fileName, nb_var_simu, varNameTab, typeTab, varSizeTab);
  print_c_simu_variables(nb_var_simu, varNameTab, typeTab, varSizeTab, fileoutC,
                         fileoutH);
  free_simu_var(nb_var_simu, varSizeTab, varNameTab, typeTab);
}


x86 assembly (clang, -O0):
<generate_user_sf_IO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xe91(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xedf(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xf29(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <read_nb_var_simu@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
mov    $0x4,%edi
mov    $0x64,%edx
call   1080 <create_triple_char@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rsi
mov    $0x4,%edi
mov    $0x64,%edx
call   1080 <create_triple_char@plt>
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rsi
mov    $0x4,%edi
call   1060 <create_double_int@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <read_simu_variables@plt>
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
call   1070 <print_c_simu_variables@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
call   1040 <free_simu_var@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_user_sf_IO>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xe90(%rip),%r15
mov    %r15,%rdi
call   1050 <read_nb_var_simu@plt>
mov    %rax,%rbx
mov    $0x4,%edi
mov    %rax,%rsi
mov    $0x64,%edx
call   1080 <create_triple_char@plt>
mov    %rax,%r14
mov    $0x4,%edi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1080 <create_triple_char@plt>
mov    %rax,%r12
mov    $0x4,%edi
mov    %rbx,%rsi
call   1060 <create_double_int@plt>
mov    %rax,%r13
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r12,%rcx
mov    %rax,%r8
call   1030 <read_simu_variables@plt>
lea    0xe89(%rip),%r8
lea    0xed7(%rip),%r9
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
call   1070 <print_c_simu_variables@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r14,%rdx
mov    %r12,%rcx
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1040 <free_simu_var@plt>

LLVM IR (-O0):
@.str = [89 x i8] c"/home/hdallali/CoManRobotranSimulator/Standalone/src/project/varState/simu_variables.txt\00"
@.str.1 = [85 x i8] c"/home/hdallali/CoManRobotranSimulator/Standalone/src/project/user_files/user_sf_IO.c\00"
@.str.2 = [85 x i8] c"/home/hdallali/CoManRobotranSimulator/Standalone/src/project/user_files/user_sf_IO.h\00"
define void @generate_user_sf_IO() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32**
%6 = alloca i8***
%7 = alloca i8***
store i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.2, i64 0, i64 0), i8** %3
%8 = load i8*, i8** %1
%9 = call i32* @read_nb_var_simu(i8* %8)
store i32* %9, i32** %4
%10 = load i32*, i32** %4
%11 = call i8*** @create_triple_char(i32 4, i32* %10, i32 100)
store i8*** %11, i8**** %6
%12 = load i32*, i32** %4
%13 = call i8*** @create_triple_char(i32 4, i32* %12, i32 100)
store i8*** %13, i8**** %7
%14 = load i32*, i32** %4
%15 = call i32** @create_double_int(i32 4, i32* %14)
store i32** %15, i32*** %5
%16 = load i8*, i8** %1
%17 = load i32*, i32** %4
%18 = load i8***, i8**** %6
%19 = load i8***, i8**** %7
%20 = load i32**, i32*** %5
%21 = call i32 @read_simu_variables(i8* %16, i32* %17, i8*** %18, i8*** %19, i32** %20)
%22 = load i32*, i32** %4
%23 = load i8***, i8**** %6
%24 = load i8***, i8**** %7
%25 = load i32**, i32*** %5
%26 = load i8*, i8** %2
%27 = load i8*, i8** %3
%28 = call i32 @print_c_simu_variables(i32* %22, i8*** %23, i8*** %24, i32** %25, i8* %26, i8* %27)
%29 = load i32*, i32** %4
%30 = load i32**, i32*** %5
%31 = load i8***, i8**** %6
%32 = load i8***, i8**** %7
%33 = call i32 @free_simu_var(i32* %29, i32** %30, i8*** %31, i8*** %32)
ret void
}

LLVM IR (-O2):
@.str = [89 x i8] c"/home/hdallali/CoManRobotranSimulator/Standalone/src/project/varState/simu_variables.txt\00"
@.str.1 = [85 x i8] c"/home/hdallali/CoManRobotranSimulator/Standalone/src/project/user_files/user_sf_IO.c\00"
@.str.2 = [85 x i8] c"/home/hdallali/CoManRobotranSimulator/Standalone/src/project/user_files/user_sf_IO.h\00"
define void @generate_user_sf_IO() {
%1 = tail call i32* @read_nb_var_simu(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8*** @create_triple_char(i32 4, i32* %1, i32 100)
%3 = tail call i8*** @create_triple_char(i32 4, i32* %1, i32 100)
%4 = tail call i32** @create_double_int(i32 4, i32* %1)
%5 = tail call i32 @read_simu_variables(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0), i32* %1, i8*** %2, i8*** %3, i32** %4)
%6 = tail call i32 @print_c_simu_variables(i32* %1, i8*** %2, i8*** %3, i32** %4, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @free_simu_var(i32* %1, i32** %4, i8*** %2, i8*** %3)
ret void
}