#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 *, char const *);
int /*<<< orphan*/ puts(char *);
void print_usage(const char *prog) {
  printf("Usage: %s [-dvlps]\n", prog);
  puts("  -d --daemon     Run as daemon process (default behavior)");
  puts("  -v --view       Run as data view UI (requires running daemon)");
  puts("  -c --check      Check daemon is running");
  puts("  -f --foreground Run daemon code in foreground (for debug purposes)");
  puts("  -r --reload     Reload daemon settings");
  puts("  -l --log        Logger output file name (only as daemon, default: "
       "/var/log/carprotect"
       "/carprotect.log"
       ")");
  puts("  -p --pidfile    PID output file name (only as daemon, default: "
       "/var/run/carprotect"
       "/carprotect.pid"
       ")");
  puts("  -s --socket     Unix socket file name (default: "
       "/var/run/carprotect"
       "/carprotect.uds"
       ")");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
lea    0xf42(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf98(%rip),%rdi
call   1030 <puts@plt>
lea    0xff4(%rip),%rdi
call   1030 <puts@plt>
lea    0x104d(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xf30(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf87(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa4(%rip),%rdi
call   1030 <puts@plt>
lea    0x1000(%rip),%rdi
call   1030 <puts@plt>
lea    0x1059(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Usage: %s [-dvlps]\0A\00"
@.str.1 = [59 x i8] c" -d --daemon Run as daemon process (default behavior)\00"
@.str.2 = [64 x i8] c" -v --view Run as data view UI (requires running daemon)\00"
@.str.3 = [42 x i8] c" -c --check Check daemon is running\00"
@.str.4 = [69 x i8] c" -f --foreground Run daemon code in foreground (for debug purposes)\00"
@.str.5 = [41 x i8] c" -r --reload Reload daemon settings\00"
@.str.6 = [104 x i8] c" -l --log Logger output file name (only as daemon, default: /var/log/carprotect/carprotect.log)\00"
@.str.7 = [101 x i8] c" -p --pidfile PID output file name (only as daemon, default: /var/run/carprotect/carprotect.pid)\00"
@.str.8 = [86 x i8] c" -s --socket Unix socket file name (default: /var/run/carprotect/carprotect.uds)\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.8, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"Usage: %s [-dvlps]\0A\00"
@.str.1 = [59 x i8] c" -d --daemon Run as daemon process (default behavior)\00"
@.str.2 = [64 x i8] c" -v --view Run as data view UI (requires running daemon)\00"
@.str.3 = [42 x i8] c" -c --check Check daemon is running\00"
@.str.4 = [69 x i8] c" -f --foreground Run daemon code in foreground (for debug purposes)\00"
@.str.5 = [41 x i8] c" -r --reload Reload daemon settings\00"
@.str.6 = [104 x i8] c" -l --log Logger output file name (only as daemon, default: /var/log/carprotect/carprotect.log)\00"
@.str.7 = [101 x i8] c" -p --pidfile PID output file name (only as daemon, default: /var/run/carprotect/carprotect.pid)\00"
@.str.8 = [86 x i8] c" -s --socket Unix socket file name (default: /var/run/carprotect/carprotect.uds)\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([104 x i8], [104 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([101 x i8], [101 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @.str.8, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = tail call i32 @exit(i32 %11)
unreachable
}