#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void usage(int argc, char *argv[], FILE *fd) {
  if (argc >= 1) {
    fprintf(fd, "Usage: %s -nh -t[period] -D[device]\n", argv[0]);
    fprintf(fd, "  Options:\n");
    fprintf(fd, "        -n\tDo not daemonize\n");
    fprintf(fd, "        -t\tTime between tests in seconds\n");
    fprintf(fd, "        -D\tName of device on which to send requests\n");
    fprintf(fd, "        -h\tShow this message\n");
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     11a0 <usage+0x90>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xef1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xf14(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
test   %edi,%edi
jle    11be <usage+0x9e>
push   %rbx
mov    %rdx,%rbx
mov    (%rsi),%rdx
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xede(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xed1(%rip),%rdi
mov    $0x1c,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xed5(%rip),%rdi
mov    $0x29,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xee6(%rip),%rdi
mov    $0x34,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf02(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Usage: %s -nh -t[period] -D[device]\0A\00"
@.str.1 = [12 x i8] c" Options:\0A\00"
@.str.2 = [29 x i8] c" -n\09Do not daemonize\0A\00"
@.str.3 = [42 x i8] c" -t\09Time between tests in seconds\0A\00"
@.str.4 = [53 x i8] c" -D\09Name of device on which to send requests\0A\00"
@.str.5 = [30 x i8] c" -h\09Show this message\0A\00"
define void @usage(i32 %0, i8** %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 1
br i1 %8, label %9, label %25
9: ; preds = %3
%10 = load i32*, i32** %6
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = load i32*, i32** %6
%16 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32*, i32** %6
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%19 = load i32*, i32** %6
%20 = call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%21 = load i32*, i32** %6
%22 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0))
%23 = load i32*, i32** %6
%24 = call i32 (i32*, i8*, ...) @fprintf(i32* %23, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
br label %25
25: ; preds = %9, %3
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Usage: %s -nh -t[period] -D[device]\0A\00"
@.str.1 = [12 x i8] c" Options:\0A\00"
@.str.2 = [29 x i8] c" -n\09Do not daemonize\0A\00"
@.str.3 = [42 x i8] c" -t\09Time between tests in seconds\0A\00"
@.str.4 = [53 x i8] c" -D\09Name of device on which to send requests\0A\00"
@.str.5 = [30 x i8] c" -h\09Show this message\0A\00"
define void @usage(i32 %0, i8** nocapture %1, i32* nocapture %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %13
5: ; preds = %3
%6 = load i8*, i8** %1
%7 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i64 11, i64 1, i32* %2)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i64 28, i64 1, i32* %2)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i64 41, i64 1, i32* %2)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0), i64 52, i64 1, i32* %2)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i64 29, i64 1, i32* %2)
br label %13
13: ; preds = %5, %3
ret void
}