#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 *, ...);
void usage(FILE *stream, const char *prgm) {
  fprintf(stream, "\nUSAGE: %s [OPTIONS...] COMMAND [ARGS]\n\n", prgm);
  fprintf(stream, "OPTIONS:\n");
  fprintf(stream, "\t-s       Make output more compliant with the system's"
                  " strace\n");
  fprintf(stream, "\t-p PID   Trace program with id = PID instead of launching"
                  " COMMAND\n");
  fprintf(stream, "\t-a ALIGN Align output on column ALIGN (default=40)\n");
  fprintf(stream, "\t-f FILE  Write strace output to FILE (default=stderr)\n");
  fprintf(stream, "\t-t       Print a timestamp before every output. If twice"
                  ", include milliseconds in timestamp.\n");
  fprintf(stream, "\tCOMMAND  Program to execute & trace\n");
  fprintf(stream, "\tARGS     Arguments given to the executed program\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf0d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf3f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf62(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf88(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfd5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfe9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xed2(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xeed(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xede(%rip),%rdi
mov    $0x3e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf04(%rip),%rdi
mov    $0x43,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf2f(%rip),%rdi
mov    $0x34,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf4b(%rip),%rdi
mov    $0x37,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf6a(%rip),%rdi
mov    $0x5e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xfb0(%rip),%rdi
mov    $0x25,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xfbd(%rip),%rdi
mov    $0x32,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"\0AUSAGE: %s [OPTIONS...] COMMAND [ARGS]\0A\0A\00"
@.str.1 = [10 x i8] c"OPTIONS:\0A\00"
@.str.2 = [63 x i8] c"\09-s Make output more compliant with the system's strace\0A\00"
@.str.3 = [68 x i8] c"\09-p PID Trace program with id = PID instead of launching COMMAND\0A\00"
@.str.4 = [53 x i8] c"\09-a ALIGN Align output on column ALIGN (default=40)\0A\00"
@.str.5 = [56 x i8] c"\09-f FILE Write strace output to FILE (default=stderr)\0A\00"
@.str.6 = [95 x i8] c"\09-t Print a timestamp before every output. If twice, include milliseconds in timestamp.\0A\00"
@.str.7 = [38 x i8] c"\09COMMAND Program to execute & trace\0A\00"
@.str.8 = [51 x i8] c"\09ARGS Arguments given to the executed program\0A\00"
define void @usage(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32*, i32** %3
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32*, i32** %3
%13 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32*, i32** %3
%15 = call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32*, i32** %3
%17 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%18 = load i32*, i32** %3
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.6, i64 0, i64 0))
%20 = load i32*, i32** %3
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%22 = load i32*, i32** %3
%23 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"\0AUSAGE: %s [OPTIONS...] COMMAND [ARGS]\0A\0A\00"
@.str.1 = [10 x i8] c"OPTIONS:\0A\00"
@.str.2 = [63 x i8] c"\09-s Make output more compliant with the system's strace\0A\00"
@.str.3 = [68 x i8] c"\09-p PID Trace program with id = PID instead of launching COMMAND\0A\00"
@.str.4 = [53 x i8] c"\09-a ALIGN Align output on column ALIGN (default=40)\0A\00"
@.str.5 = [56 x i8] c"\09-f FILE Write strace output to FILE (default=stderr)\0A\00"
@.str.6 = [95 x i8] c"\09-t Print a timestamp before every output. If twice, include milliseconds in timestamp.\0A\00"
@.str.7 = [38 x i8] c"\09COMMAND Program to execute & trace\0A\00"
@.str.8 = [51 x i8] c"\09ARGS Arguments given to the executed program\0A\00"
define void @usage(i32* nocapture %0, i8* %1) {
%3 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 9, i64 1, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), i64 62, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), i64 67, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0), i64 52, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0), i64 55, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.6, i64 0, i64 0), i64 94, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0), i64 37, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.8, i64 0, i64 0), i64 50, i64 1, i32* %0)
ret void
}