#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 print_usage(FILE *stream) {
  fprintf(stream, "USAGE\n");
  fprintf(stream,
          "\t./nsa {-i <interface> | -o <file>} [-f <filter>] -v <1..3>\n");
  fprintf(stream, "\n");
  fprintf(stream, "OPTIONS\n");
  fprintf(stream,
          "\t-i | --interface <interface> : interface for live analysis\n");
  fprintf(stream, "\t-o | --offline <file> : offline analysis on given file\n");
  fprintf(stream, "\t-f | --filter <filter> : BPF filter (optional)\n");
  fprintf(stream, "\t-v | --verbose <1..3> : verbosity level (1=succinct ; "
                  "2=synthetic ; 3=complete)\n");
  fprintf(stream, "\t-r | --raw : print raw output (optional)\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xffd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeed(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee6(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf13(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf3c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf5d(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf9f(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xec3(%rip),%rdi
mov    $0x3c,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xeda(%rip),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xeca(%rip),%rdi
mov    $0x3c,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xeee(%rip),%rdi
mov    $0x38,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf0e(%rip),%rdi
mov    $0x30,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf26(%rip),%rdi
mov    $0x51,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf5f(%rip),%rdi
mov    $0x2a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"USAGE\0A\00"
@.str.1 = [61 x i8] c"\09./nsa {-i <interface> | -o <file>} [-f <filter>] -v <1..3>\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [9 x i8] c"OPTIONS\0A\00"
@.str.4 = [61 x i8] c"\09-i | --interface <interface> : interface for live analysis\0A\00"
@.str.5 = [57 x i8] c"\09-o | --offline <file> : offline analysis on given file\0A\00"
@.str.6 = [49 x i8] c"\09-f | --filter <filter> : BPF filter (optional)\0A\00"
@.str.7 = [82 x i8] c"\09-v | --verbose <1..3> : verbosity level (1=succinct ; 2=synthetic ; 3=complete)\0A\00"
@.str.8 = [43 x i8] c"\09-r | --raw : print raw output (optional)\0A\00"
define void @print_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32*, i32** %2
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32*, i32** %2
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32*, i32** %2
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32*, i32** %2
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.7, i64 0, i64 0))
%19 = load i32*, i32** %2
%20 = call i32 @fprintf(i32* %19, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"USAGE\0A\00"
@.str.1 = [61 x i8] c"\09./nsa {-i <interface> | -o <file>} [-f <filter>] -v <1..3>\0A\00"
@.str.3 = [9 x i8] c"OPTIONS\0A\00"
@.str.4 = [61 x i8] c"\09-i | --interface <interface> : interface for live analysis\0A\00"
@.str.5 = [57 x i8] c"\09-o | --offline <file> : offline analysis on given file\0A\00"
@.str.6 = [49 x i8] c"\09-f | --filter <filter> : BPF filter (optional)\0A\00"
@.str.7 = [82 x i8] c"\09-v | --verbose <1..3> : verbosity level (1=succinct ; 2=synthetic ; 3=complete)\0A\00"
@.str.8 = [43 x i8] c"\09-r | --raw : print raw output (optional)\0A\00"
define void @print_usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 6, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0), i64 60, i64 1, i32* %0)
%4 = tail call i32 @fputc(i32 10, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i64 8, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0), i64 60, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0), i64 56, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i64 48, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.7, i64 0, i64 0), i64 81, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i64 42, i64 1, i32* %0)
ret void
}