#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*/ printf(char *, char *, int, char *, char *, int, int, int,
                          int /*<<< orphan*/);
void usage(void) {
  printf(
      "libemq simple benchmark\n"
      "Usage: benchmark [options]\n"
      "-h <hostname> - server IP (default: %s)\n"
      "-p <port> - server port (default: %d)\n"
      "-u <unix socket> - server socket\n"
      "--name <name> - user name (default: %s)\n"
      "--password <password> - user password (default: %s)\n"
      "-c <clients> - number of parallel connections (default: %d)\n"
      "-m <messages> - number of messages for all connections (default: %d)\n"
      "-s <message size> - size of one message (default: %d)\n"
      "-e <expiration time> - time of message expiration (default: %d ms)\n"
      "--noack - enable noack mode\n"
      "-h or --help - show this message and exit\n",
      "localhost", 7851, "eagle", "eagle", 50, 100000, 1000, 0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee1(%rip),%rdi
lea    0x1119(%rip),%rsi
mov    $0x1eab,%edx
lea    0x1117(%rip),%r8
mov    $0x32,%r9d
xor    %eax,%eax
mov    %r8,%rcx
movl   $0x186a0,(%rsp)
movl   $0x3e8,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
sub    $0x8,%rsp
lea    0xee4(%rip),%rdi
lea    0x111c(%rip),%rsi
lea    0x111f(%rip),%rcx
mov    $0x1eab,%edx
mov    %rcx,%r8
mov    $0x32,%r9d
push   $0x0
push   $0x3e8
push   $0x186a0
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [575 x i8] c"libemq simple benchmark\0AUsage: benchmark [options]\0A-h <hostname> - server IP (default: %s)\0A-p <port> - server port (default: %d)\0A-u <unix socket> - server socket\0A--name <name> - user name (default: %s)\0A--password <password> - user password (default: %s)\0A-c <clients> - number of parallel connections (default: %d)\0A-m <messages> - number of messages for all connections (default: %d)\0A-s <message size> - size of one message (default: %d)\0A-e <expiration time> - time of message expiration (default: %d ms)\0A--noack - enable noack mode\0A-h or --help - show this message and exit\0A\00"
@.str.1 = [10 x i8] c"localhost\00"
@.str.2 = [6 x i8] c"eagle\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([575 x i8], [575 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 7851, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 50, i32 100000, i32 1000, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [575 x i8] c"libemq simple benchmark\0AUsage: benchmark [options]\0A-h <hostname> - server IP (default: %s)\0A-p <port> - server port (default: %d)\0A-u <unix socket> - server socket\0A--name <name> - user name (default: %s)\0A--password <password> - user password (default: %s)\0A-c <clients> - number of parallel connections (default: %d)\0A-m <messages> - number of messages for all connections (default: %d)\0A-s <message size> - size of one message (default: %d)\0A-e <expiration time> - time of message expiration (default: %d ms)\0A--noack - enable noack mode\0A-h or --help - show this message and exit\0A\00"
@.str.1 = [10 x i8] c"localhost\00"
@.str.2 = [6 x i8] c"eagle\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([575 x i8], [575 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 7851, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 50, i32 100000, i32 1000, i32 0)
ret void
}