#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 *, ...);
int usage(const char *cmd, int e) {
  printf("Usage:\n");
  printf("    %s -S|--start  <channel> -- <command> <arguments>\n", cmd);
  printf("    %s -K|--stop   <channel>\n", cmd);
  printf("    %s -s|--status <channel>\n", cmd);
  printf("\n");
  printf("Note:\n");
  printf("    Any signal sent to the daemon that can be caught is passed "
         "through to the\n");
  printf("    encapsulated process, so to kill the daemon itself, send it "
         "USR1, or USR2.\n");
  printf("\n");
  printf("    While SIGUSR1 does a complete die (killing the encapsulated "
         "processes, and then\n");
  printf("    the daemon wrapper, SIGUSR2 only kills the daemon process, and "
         "leaves the child\n");
  printf("    to be adopted by init.\n");
  return e;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xf34(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xedb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xef2(%rip),%rdi
call   1040 <puts@plt>
lea    0xeec(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf67(%rip),%rdi
call   1040 <puts@plt>
lea    0xfaf(%rip),%rdi
call   1040 <puts@plt>
lea    0xff7(%rip),%rdi
call   1040 <puts@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [55 x i8] c" %s -S|--start <channel> -- <command> <arguments>\0A\00"
@.str.2 = [30 x i8] c" %s -K|--stop <channel>\0A\00"
@.str.3 = [30 x i8] c" %s -s|--status <channel>\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [7 x i8] c"Note:\0A\00"
@.str.6 = [79 x i8] c" Any signal sent to the daemon that can be caught is passed through to the\0A\00"
@.str.7 = [80 x i8] c" encapsulated process, so to kill the daemon itself, send it USR1, or USR2.\0A\00"
@.str.8 = [85 x i8] c" While SIGUSR1 does a complete die (killing the encapsulated processes, and then\0A\00"
@.str.9 = [85 x i8] c" the daemon wrapper, SIGUSR2 only kills the daemon process, and leaves the child\0A\00"
@.str.10 = [28 x i8] c" to be adopted by init.\0A\00"
define i32 @usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.8, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.9, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0))
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
@.str.1 = [55 x i8] c" %s -S|--start <channel> -- <command> <arguments>\0A\00"
@.str.2 = [30 x i8] c" %s -K|--stop <channel>\0A\00"
@.str.3 = [30 x i8] c" %s -s|--status <channel>\0A\00"
@str = [7 x i8] c"Usage:\00"
@str.11 = [6 x i8] c"Note:\00"
@str.12 = [78 x i8] c" Any signal sent to the daemon that can be caught is passed through to the\00"
@str.13 = [79 x i8] c" encapsulated process, so to kill the daemon itself, send it USR1, or USR2.\00"
@str.14 = [84 x i8] c" While SIGUSR1 does a complete die (killing the encapsulated processes, and then\00"
@str.15 = [84 x i8] c" the daemon wrapper, SIGUSR2 only kills the daemon process, and leaves the child\00"
@str.16 = [27 x i8] c" to be adopted by init.\00"
define i32 @usage(i8* %0, i32 returned %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%7 = tail call i32 @putchar(i32 10)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.11, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.12, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.13, i64 0, i64 0))
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.14, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.15, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.16, i64 0, i64 0))
ret i32 %1
}