#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 /*<<< orphan*/ printf(char *, char *);
void usage_exit(int ret_code, char *progname) {
  printf(
      "Usage: %s [OPTION]...\n"
      "Quick and dirty tool to monitor dry contacts connected on serial "
      "port\n\n"
      "  -f, --foreground\t\tDo not daemonise, default is to daemonise\n"
      "  -d, --device=DEVICE\t\tDevice to use, default to /dev/ttyS0\n"
      "  -b, --bind=IP\t\t\tListen to the specified IP address\n"
      "  -p, --baseport=PORT\t\tBase port, will listen from BASEPORT to "
      "BASEPORT+3, default to 13000\n"
      "  -l, --logfile=LOGFILE\t\tPath to logfile, default is to log on "
      "stdout\n"
      "  -i, --interval=SECONDS\tDelay between each probe, default to 1s\n"
      "      --namects=NAME\t\tSet the name of the CTS(Clear To Send) input\n"
      "      --namecd=NAME\t\tSet the name of the CD(Carrier Detected) input\n"
      "      --nameri=NAME\t\tSet the name of the RI(Ring Indicator) input\n"
      "      --namedsr=NAME\t\tSet the name of the DSR(Data Set Ready) input\n"
      "  -h, --help\t\t\tDisplay this help and exit\n"
      "  -v, --version\t\t\tOutput version information and exit\n",
      progname);
  exit(ret_code);
}


x86 assembly (clang, -O0):
<usage_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage_exit>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [861 x i8] c"Usage: %s [OPTION]...\0AQuick and dirty tool to monitor dry contacts connected on serial port\0A\0A -f, --foreground\09\09Do not daemonise, default is to daemonise\0A -d, --device=DEVICE\09\09Device to use, default to /dev/ttyS0\0A -b, --bind=IP\09\09\09Listen to the specified IP address\0A -p, --baseport=PORT\09\09Base port, will listen from BASEPORT to BASEPORT+3, default to 13000\0A -l, --logfile=LOGFILE\09\09Path to logfile, default is to log on stdout\0A -i, --interval=SECONDS\09Delay between each probe, default to 1s\0A --namects=NAME\09\09Set the name of the CTS(Clear To Send) input\0A --namecd=NAME\09\09Set the name of the CD(Carrier Detected) input\0A --nameri=NAME\09\09Set the name of the RI(Ring Indicator) input\0A --namedsr=NAME\09\09Set the name of the DSR(Data Set Ready) input\0A -h, --help\09\09\09Display this help and exit\0A -v, --version\09\09\09Output version information and exit\0A\00"
define void @usage_exit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([861 x i8], [861 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %3
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [861 x i8] c"Usage: %s [OPTION]...\0AQuick and dirty tool to monitor dry contacts connected on serial port\0A\0A -f, --foreground\09\09Do not daemonise, default is to daemonise\0A -d, --device=DEVICE\09\09Device to use, default to /dev/ttyS0\0A -b, --bind=IP\09\09\09Listen to the specified IP address\0A -p, --baseport=PORT\09\09Base port, will listen from BASEPORT to BASEPORT+3, default to 13000\0A -l, --logfile=LOGFILE\09\09Path to logfile, default is to log on stdout\0A -i, --interval=SECONDS\09Delay between each probe, default to 1s\0A --namects=NAME\09\09Set the name of the CTS(Clear To Send) input\0A --namecd=NAME\09\09Set the name of the CD(Carrier Detected) input\0A --nameri=NAME\09\09Set the name of the RI(Ring Indicator) input\0A --namedsr=NAME\09\09Set the name of the DSR(Data Set Ready) input\0A -h, --help\09\09\09Display this help and exit\0A -v, --version\09\09\09Output version information and exit\0A\00"
define void @usage_exit(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([861 x i8], [861 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @exit(i32 %0)
unreachable
}