#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*/ stdout;
void usage(void) {
  fprintf(stdout,
          "Icera archive downloader version %s\n\n"
          "Usage:\n"
          "downloader <options> ARCHIVE_FILE_LIST\n"
          "   -h              Display this help\n"
          "   -v level        Verbose level (default: -v %d)\n"
          "   -d name         Device name\n"
          "   -s baud_rate    Device baud rate (default: -s %d)\n"
          "   -b block_sz     Download block size (default: -b %d)\n"
          "   -f              Flash update\n"
          "   -p              Read device PCID\n",
          "11.10", 1, 115200, 16384);
  fprintf(stdout,
          "   -m mode         Specify the mode at the end (default: -m %d)\n"
          "   -w secs         Timeout to reopen the port after mode switching\n"
          "                   (default: -w %d)\n\n",
          0, 5);
  fprintf(
      stdout,
      "   ARCHIVE_FILE_LIST: path1/file1\n"
      "                  or: \"path1/file1[;path2/file2;...;pathN/fileN]\"\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0x1050(%rip),%rdx
mov    $0x1,%ecx
mov    $0x1c200,%r8d
mov    $0x4000,%r9d
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0x102e(%rip),%rsi
xor    %edx,%edx
mov    $0x5,%ecx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0x10b9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
lea    0x1053(%rip),%rdx
mov    $0x1,%ecx
mov    $0x1c200,%r8d
mov    $0x4000,%r9d
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1038(%rip),%rsi
xor    %edx,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10ca(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [379 x i8] c"Icera archive downloader version %s\0A\0AUsage:\0Adownloader <options> ARCHIVE_FILE_LIST\0A -h Display this help\0A -v level Verbose level (default: -v %d)\0A -d name Device name\0A -s baud_rate Device baud rate (default: -s %d)\0A -b block_sz Download block size (default: -b %d)\0A -f Flash update\0A -p Read device PCID\0A\00"
@.str.1 = [6 x i8] c"11.10\00"
@.str.2 = [169 x i8] c" -m mode Specify the mode at the end (default: -m %d)\0A -w secs Timeout to reopen the port after mode switching\0A (default: -w %d)\0A\0A\00"
@.str.3 = [101 x i8] c" ARCHIVE_FILE_LIST: path1/file1\0A or: \22path1/file1[;path2/file2;...;pathN/fileN]\22\0A\00"
define void @usage() {
%1 = load i32, i32* @stdout
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([379 x i8], [379 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 115200, i32 16384)
%3 = load i32, i32* @stdout
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 5)
%5 = load i32, i32* @stdout
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [379 x i8] c"Icera archive downloader version %s\0A\0AUsage:\0Adownloader <options> ARCHIVE_FILE_LIST\0A -h Display this help\0A -v level Verbose level (default: -v %d)\0A -d name Device name\0A -s baud_rate Device baud rate (default: -s %d)\0A -b block_sz Download block size (default: -b %d)\0A -f Flash update\0A -p Read device PCID\0A\00"
@.str.1 = [6 x i8] c"11.10\00"
@.str.2 = [169 x i8] c" -m mode Specify the mode at the end (default: -m %d)\0A -w secs Timeout to reopen the port after mode switching\0A (default: -w %d)\0A\0A\00"
@.str.3 = [101 x i8] c" ARCHIVE_FILE_LIST: path1/file1\0A or: \22path1/file1[;path2/file2;...;pathN/fileN]\22\0A\00"
define void @usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([379 x i8], [379 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 115200, i32 16384)
%3 = load i32, i32* @stdout
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 5)
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.3, i64 0, i64 0))
ret void
}