#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 const *, char *, int, int, int, int,
                          int);
void usage(const char *argv0, char *host_default, short port_default,
           int r_default, int w_default, int n_default, int c_default) {
  printf("Usage: %s [options]\n"
         "Options are:\n"
         "\t-h host\t\t(default = \"%s\")\n"
         "\t-p port\t\t(default = %d)\n"
         "\t-r readers\t(default = %d)\n"
         "\t-w writers\t(default = %d)\n"
         "\t-c channels\t(default = %d)\n"
         "\t-n messages\t(number of messages to read in total, default = %d)\n",
         argv0, host_default, (int)port_default, r_default, w_default,
         c_default, n_default);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dx,%ax
mov    0x10(%rbp),%edx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
movswl -0x12(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    0x10(%rbp),%r10d
mov    -0x20(%rbp),%eax
lea    0xea9(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %r9d,%eax
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x10(%rsp),%r10d
lea    0xed2(%rip),%rdi
push   %rax
push   %r10
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [233 x i8] c"Usage: %s [options]\0AOptions are:\0A\09-h host\09\09(default = \22%s\22)\0A\09-p port\09\09(default = %d)\0A\09-r readers\09(default = %d)\0A\09-w writers\09(default = %d)\0A\09-c channels\09(default = %d)\0A\09-n messages\09(number of messages to read in total, default = %d)\0A\00"
define void @usage(i8* %0, i8* %1, i16 signext %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i16
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i16 %2, i16* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i8*, i8** %8
%16 = load i8*, i8** %9
%17 = load i16, i16* %10
%18 = sext i16 %17 to i32
%19 = load i32, i32* %11
%20 = load i32, i32* %12
%21 = load i32, i32* %14
%22 = load i32, i32* %13
%23 = call i32 @printf(i8* getelementptr inbounds ([233 x i8], [233 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %16, i32 %18, i32 %19, i32 %20, i32 %21, i32 %22)
ret void
}

LLVM IR (-O2):
@.str = [233 x i8] c"Usage: %s [options]\0AOptions are:\0A\09-h host\09\09(default = \22%s\22)\0A\09-p port\09\09(default = %d)\0A\09-r readers\09(default = %d)\0A\09-w writers\09(default = %d)\0A\09-c channels\09(default = %d)\0A\09-n messages\09(number of messages to read in total, default = %d)\0A\00"
define void @usage(i8* %0, i8* %1, i16 signext %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = sext i16 %2 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([233 x i8], [233 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %8, i32 %3, i32 %4, i32 %6, i32 %5)
ret void
}