#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_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("MQTT stdin publisher\n");
  printf("Usage: stdinpub topicname <options>, where options are:\n");
  printf("  --host <hostname> (default is localhost)\n");
  printf("  --port <port> (default is 1883)\n");
  printf("  --qos <qos> (default is 0)\n");
  printf("  --retained (default is off)\n");
  printf("  --delimiter <delim> (default is \\n)");
  printf("  --clientid <clientid> (default is hostname+timestamp)");
  printf("  --maxdatalen 100\n");
  printf("  --username none\n");
  printf("  --password none\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf43(%rip),%rdi
call   1030 <printf@plt>
lea    0xf55(%rip),%rdi
call   1030 <printf@plt>
lea    0xf68(%rip),%rdi
call   1030 <printf@plt>
lea    0xf82(%rip),%rdi
call   1030 <printf@plt>
lea    0xfae(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb6(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e31(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xf26(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf90(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa1(%rip),%rdi
call   1030 <puts@plt>
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
lea    0xf9b(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa2(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"MQTT stdin publisher\0A\00"
@.str.1 = [57 x i8] c"Usage: stdinpub topicname <options>, where options are:\0A\00"
@.str.2 = [44 x i8] c" --host <hostname> (default is localhost)\0A\00"
@.str.3 = [35 x i8] c" --port <port> (default is 1883)\0A\00"
@.str.4 = [30 x i8] c" --qos <qos> (default is 0)\0A\00"
@.str.5 = [31 x i8] c" --retained (default is off)\0A\00"
@.str.6 = [38 x i8] c" --delimiter <delim> (default is \\n)\00"
@.str.7 = [56 x i8] c" --clientid <clientid> (default is hostname+timestamp)\00"
@.str.8 = [20 x i8] c" --maxdatalen 100\0A\00"
@.str.9 = [19 x i8] c" --username none\0A\00"
@.str.10 = [19 x i8] c" --password none\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@.str.6 = [38 x i8] c" --delimiter <delim> (default is \\n)\00"
@.str.7 = [56 x i8] c" --clientid <clientid> (default is hostname+timestamp)\00"
@EXIT_FAILURE = global i32 0
@str = [21 x i8] c"MQTT stdin publisher\00"
@str.11 = [56 x i8] c"Usage: stdinpub topicname <options>, where options are:\00"
@str.12 = [43 x i8] c" --host <hostname> (default is localhost)\00"
@str.13 = [34 x i8] c" --port <port> (default is 1883)\00"
@str.14 = [29 x i8] c" --qos <qos> (default is 0)\00"
@str.15 = [30 x i8] c" --retained (default is off)\00"
@str.16 = [19 x i8] c" --maxdatalen 100\00"
@str.17 = [18 x i8] c" --username none\00"
@str.18 = [18 x i8] c" --password none\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.11, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.12, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.16, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.17, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%12 = load i32, i32* @EXIT_FAILURE
%13 = tail call i32 @exit(i32 %12)
unreachable
}