#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 *, ...);
void usage(char *exe) {
  if (!exe) {
    return;
  }
  printf("usage : %s [-c <USER_CONFIG_FILE_PATH>] [-d | -l]\n", exe);
  printf(" -c\tis used to specify an alternate config file\n");
  printf(" -d\tis used to run the agent as a daemon; in this case stdout and "
         "stderr are redirected to a log file\n");
  printf(" -l\tis used to redirect stdout and stderr to a log file when the "
         "agent is run on the foreground\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <usage+0x1c>
jmp    1168 <usage+0x58>
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
test   %rdi,%rdi
je     115c <usage+0x3c>
push   %rax
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
lea    0xf73(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [51 x i8] c"usage : %s [-c <USER_CONFIG_FILE_PATH>] [-d | -l]\0A\00"
@.str.1 = [49 x i8] c" -c\09is used to specify an alternate config file\0A\00"
@.str.2 = [103 x i8] c" -d\09is used to run the agent as a daemon; in this case stdout and stderr are redirected to a log file\0A\00"
@.str.3 = [97 x i8] c" -l\09is used to redirect stdout and stderr to a log file when the agent is run on the foreground\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %12
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"usage : %s [-c <USER_CONFIG_FILE_PATH>] [-d | -l]\0A\00"
@str = [48 x i8] c" -c\09is used to specify an alternate config file\00"
@str.4 = [102 x i8] c" -d\09is used to run the agent as a daemon; in this case stdout and stderr are redirected to a log file\00"
@str.5 = [96 x i8] c" -l\09is used to redirect stdout and stderr to a log file when the agent is run on the foreground\00"
define void @usage(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @str.4, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str.5, i64 0, i64 0))
br label %8
8: ; preds = %1, %3
ret void
}