#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(
      stderr,
      "Usage: ./main\n"
      "\t-step <nb>:\n\t\t0 sequential computations\n\t\t1 parallel "
      "computation\n\t\t2 parallel computations, walls\n\t\t3 parallel "
      "computations, sensors\n\t\t4 parallel computations, local speeds\n"
      "\t-i <input file>: path to the input file describing the environment\n"
      "\t-iteration <iteration number>: number of iterations to compute\n"
      "\t-dt <dt number>: value for dt, the size of a time-step\n"
      "\t-grid <p> <q>: dimensions of the processor gird\n\n"
      "Optional arguments:\n"
      "\t-lastdump <output path>: in that case, the matrix of values at the "
      "last step is written into <output path>\n"
      "\t-alldump <output path>: in that case, the matrix of values is dumped "
      "at each step in a format given by <output path>\n"
      "\t-sensor <output path>: in that case, sensors values are exported to "
      "<output path>\n"
      "\t-frequency n: store only 1/n element in alldump\n"
      "Example:\n"
      "mpirun -np 32 ./main -step 3 -i toolbox/sample_type1.in -iterations "
      "1000 -dt 0.1 -grid 4 8 -alldump output_%%03d.dump -sensor "
      "output_sensor.log\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [958 x i8] c"Usage: ./main\0A\09-step <nb>:\0A\09\090 sequential computations\0A\09\091 parallel computation\0A\09\092 parallel computations, walls\0A\09\093 parallel computations, sensors\0A\09\094 parallel computations, local speeds\0A\09-i <input file>: path to the input file describing the environment\0A\09-iteration <iteration number>: number of iterations to compute\0A\09-dt <dt number>: value for dt, the size of a time-step\0A\09-grid <p> <q>: dimensions of the processor gird\0A\0AOptional arguments:\0A\09-lastdump <output path>: in that case, the matrix of values at the last step is written into <output path>\0A\09-alldump <output path>: in that case, the matrix of values is dumped at each step in a format given by <output path>\0A\09-sensor <output path>: in that case, sensors values are exported to <output path>\0A\09-frequency n: store only 1/n element in alldump\0AExample:\0Ampirun -np 32 ./main -step 3 -i toolbox/sample_type1.in -iterations 1000 -dt 0.1 -grid 4 8 -alldump output_%%03d.dump -sensor output_sensor.log\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([958 x i8], [958 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [958 x i8] c"Usage: ./main\0A\09-step <nb>:\0A\09\090 sequential computations\0A\09\091 parallel computation\0A\09\092 parallel computations, walls\0A\09\093 parallel computations, sensors\0A\09\094 parallel computations, local speeds\0A\09-i <input file>: path to the input file describing the environment\0A\09-iteration <iteration number>: number of iterations to compute\0A\09-dt <dt number>: value for dt, the size of a time-step\0A\09-grid <p> <q>: dimensions of the processor gird\0A\0AOptional arguments:\0A\09-lastdump <output path>: in that case, the matrix of values at the last step is written into <output path>\0A\09-alldump <output path>: in that case, the matrix of values is dumped at each step in a format given by <output path>\0A\09-sensor <output path>: in that case, sensors values are exported to <output path>\0A\09-frequency n: store only 1/n element in alldump\0AExample:\0Ampirun -np 32 ./main -step 3 -i toolbox/sample_type1.in -iterations 1000 -dt 0.1 -grid 4 8 -alldump output_%%03d.dump -sensor output_sensor.log\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([958 x i8], [958 x i8]* @.str, i64 0, i64 0))
ret void
}