#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*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *,
                           char *);
int print_usage(FILE *stream, char *argv0, int return_status) {
  fprintf(stream,
          "sphere simulation status checker. Usage:\n"
          " %s [simulation id]\n"
          " %s [-h,--help]\n"
          " %s [-l,--list]\n"
          "Arguments:\n"
          " simulation id\tShow detailed status of simulation.\n"
          " -h, --help\tShow this help message.\n"
          " -l, --list\tPrint a list of simulations found in the ./output/ "
          "folder.\n"
          "\t\tEach simulation ID will be appended by a string showing:\n"
          "\t([CURRENT SIMULATION TIME] s, [PERCENTAGE COMPLETED] %%, "
          "[LATEST OUTPUT FILE])\n",
          argv0, argv0, argv0);
  return return_status;
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %edx,%ebx
mov    %rsi,%rcx
lea    0xee3(%rip),%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
call   1030 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [402 x i8] c"sphere simulation status checker. Usage:\0A %s [simulation id]\0A %s [-h,--help]\0A %s [-l,--list]\0AArguments:\0A simulation id\09Show detailed status of simulation.\0A -h, --help\09Show this help message.\0A -l, --list\09Print a list of simulations found in the ./output/ folder.\0A\09\09Each simulation ID will be appended by a string showing:\0A\09([CURRENT SIMULATION TIME] s, [PERCENTAGE COMPLETED] %%, [LATEST OUTPUT FILE])\0A\00"
define i32 @print_usage(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %5
%11 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([402 x i8], [402 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i8* %10)
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
@.str = [402 x i8] c"sphere simulation status checker. Usage:\0A %s [simulation id]\0A %s [-h,--help]\0A %s [-l,--list]\0AArguments:\0A simulation id\09Show detailed status of simulation.\0A -h, --help\09Show this help message.\0A -l, --list\09Print a list of simulations found in the ./output/ folder.\0A\09\09Each simulation ID will be appended by a string showing:\0A\09([CURRENT SIMULATION TIME] s, [PERCENTAGE COMPLETED] %%, [LATEST OUTPUT FILE])\0A\00"
define i32 @print_usage(i32* nocapture %0, i8* %1, i32 returned %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([402 x i8], [402 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %1, i8* %1)
ret i32 %2
}