#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*/ exit(int);
int get_cores();
int /*<<< orphan*/ printf(char *, ...);
void do_usage(int exitcode) {
  printf("Usage: relay [-vdst] -f <config> [-p <port>] [-w <workers>] [-b "
         "<size>] [-q <size>]\n");
  printf("\n");
  printf("Options:\n");
  printf("  -v  print version and exit\n");
  printf("  -f  read <config> for clusters and routes\n");
  printf("  -p  listen on <port> for connections, defaults to 2003\n");
  printf("  -i  listen on <interface> for connections, defaults to all\n");
  printf("  -l  write output to <file>, defaults to stdout/stderr\n");
  printf("  -w  use <workers> worker threads, defaults to %d\n", get_cores());
  printf("  -b  server send batch size, defaults to 2500\n");
  printf("  -q  server queue size, defaults to 25000\n");
  printf("  -S  statistics sending interval in seconds, defaults to 60\n");
  printf("  -c  characters to allow next to [A-Za-z0-9], defaults to -_:#\n");
  printf("  -d  debug mode: currently writes statistics to log, prints hash\n"
         "      ring contents and matching position in test mode (-t)\n");
  printf("  -s  submission mode: write info about errors to log\n");
  printf("  -t  config test mode: prints rule matches from input on stdin\n");
  printf("  -H  hostname: override hostname (used in statistics)\n");
  exit(exitcode);
}


x86 assembly (clang, -O0):
<do_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1118(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <get_cores@plt>
mov    %eax,%esi
lea    0xfa0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1006(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1036(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1069(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10da(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1103(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1136(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<do_usage>:
push   %rbx
mov    %edi,%ebx
lea    0xeda(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf18(%rip),%rdi
call   1040 <puts@plt>
lea    0xf15(%rip),%rdi
call   1040 <puts@plt>
lea    0xf26(%rip),%rdi
call   1040 <puts@plt>
lea    0xf46(%rip),%rdi
call   1040 <puts@plt>
lea    0xf73(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa4(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1060 <get_cores@plt>
lea    0xe41(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfb9(%rip),%rdi
call   1040 <puts@plt>
lea    0xfdc(%rip),%rdi
call   1040 <puts@plt>
lea    0xffb(%rip),%rdi
call   1040 <puts@plt>
lea    0x102c(%rip),%rdi
call   1040 <puts@plt>
lea    0x1060(%rip),%rdi
call   1040 <puts@plt>
lea    0x10d2(%rip),%rdi
call   1040 <puts@plt>
lea    0x10fc(%rip),%rdi
call   1040 <puts@plt>
lea    0x1130(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [85 x i8] c"Usage: relay [-vdst] -f <config> [-p <port>] [-w <workers>] [-b <size>] [-q <size>]\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [10 x i8] c"Options:\0A\00"
@.str.3 = [30 x i8] c" -v print version and exit\0A\00"
@.str.4 = [45 x i8] c" -f read <config> for clusters and routes\0A\00"
@.str.5 = [58 x i8] c" -p listen on <port> for connections, defaults to 2003\0A\00"
@.str.6 = [62 x i8] c" -i listen on <interface> for connections, defaults to all\0A\00"
@.str.7 = [57 x i8] c" -l write output to <file>, defaults to stdout/stderr\0A\00"
@.str.8 = [52 x i8] c" -w use <workers> worker threads, defaults to %d\0A\00"
@.str.9 = [48 x i8] c" -b server send batch size, defaults to 2500\0A\00"
@.str.10 = [44 x i8] c" -q server queue size, defaults to 25000\0A\00"
@.str.11 = [62 x i8] c" -S statistics sending interval in seconds, defaults to 60\0A\00"
@.str.12 = [65 x i8] c" -c characters to allow next to [A-Za-z0-9], defaults to -_:#\0A\00"
@.str.13 = [127 x i8] c" -d debug mode: currently writes statistics to log, prints hash\0A ring contents and matching position in test mode (-t)\0A\00"
@.str.14 = [55 x i8] c" -s submission mode: write info about errors to log\0A\00"
@.str.15 = [65 x i8] c" -t config test mode: prints rule matches from input on stdin\0A\00"
@.str.16 = [56 x i8] c" -H hostname: override hostname (used in statistics)\0A\00"
define void @do_usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 (...) @get_cores()
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0), i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.16, i64 0, i64 0))
%21 = load i32, i32* %2
%22 = call i32 @exit(i32 %21)
unreachable
}

LLVM IR (-O2):
@.str.8 = [52 x i8] c" -w use <workers> worker threads, defaults to %d\0A\00"
@str = [84 x i8] c"Usage: relay [-vdst] -f <config> [-p <port>] [-w <workers>] [-b <size>] [-q <size>]\00"
@str.17 = [9 x i8] c"Options:\00"
@str.18 = [29 x i8] c" -v print version and exit\00"
@str.19 = [44 x i8] c" -f read <config> for clusters and routes\00"
@str.20 = [57 x i8] c" -p listen on <port> for connections, defaults to 2003\00"
@str.21 = [61 x i8] c" -i listen on <interface> for connections, defaults to all\00"
@str.22 = [56 x i8] c" -l write output to <file>, defaults to stdout/stderr\00"
@str.23 = [47 x i8] c" -b server send batch size, defaults to 2500\00"
@str.24 = [43 x i8] c" -q server queue size, defaults to 25000\00"
@str.25 = [61 x i8] c" -S statistics sending interval in seconds, defaults to 60\00"
@str.26 = [64 x i8] c" -c characters to allow next to [A-Za-z0-9], defaults to -_:#\00"
@str.27 = [126 x i8] c" -d debug mode: currently writes statistics to log, prints hash\0A ring contents and matching position in test mode (-t)\00"
@str.28 = [54 x i8] c" -s submission mode: write info about errors to log\00"
@str.29 = [64 x i8] c" -t config test mode: prints rule matches from input on stdin\00"
@str.30 = [55 x i8] c" -H hostname: override hostname (used in statistics)\00"
define void @do_usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 (...) @get_cores()
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0), i32 %10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.23, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.24, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.25, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.26, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @str.27, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.28, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.29, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.30, i64 0, i64 0))
%20 = tail call i32 @exit(i32 %0)
unreachable
}