#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() {
  printf("Usage:\n");
  printf("  lock <key> <action> [-v|--verbose]\n");
  printf("    NOTE: <key> must be in the range 0..127\n");
  printf("\n");
  printf(
      "  lock <key> create [-x|expire] [-s|--semaphores <semaphore-size>]\n");
  printf("    <semaphore-size> values:\n");
  printf("       1: Binary Semaphore (Mutext).\n");
  printf("      >1: Counting Semaphore.\n");
  printf("\n");
  printf("  lock <key> on [-t|--timeout <timeout>]\n");
  printf("    <timeout> values:\n");
  printf("      -1: Non-Blocking (Immediate return).\n");
  printf("       0: Blocking (Default).\n");
  printf("      +N: Block for at most `N' seconds.\n");
  printf("\n");
  printf("  lock <key> off\n");
  printf("\n");
  printf("  lock <key> delete\n");
  printf("\n");
  printf("  lock <key> status\n");
  printf("\n");
  printf("  lock <key> summary\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
call   1030 <printf@plt>
lea    0x102e(%rip),%rdi
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
call   1030 <printf@plt>
lea    0xf48(%rip),%rdi
call   1030 <printf@plt>
lea    0xf5a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf74(%rip),%rdi
call   1030 <printf@plt>
lea    0xff2(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7b(%rip),%rdi
call   1030 <printf@plt>
lea    0xf99(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa4(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc4(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd7(%rip),%rdi
call   1030 <printf@plt>
lea    0xfaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf92(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe3(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7a(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe0(%rip),%rdi
call   1030 <printf@plt>
lea    0xf62(%rip),%rdi
call   1030 <printf@plt>
lea    0xfdd(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xed3(%rip),%rdi
call   1040 <puts@plt>
lea    0xeec(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf02(%rip),%rdi
call   1040 <puts@plt>
lea    0xf39(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf63(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf6b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf88(%rip),%rdi
call   1040 <puts@plt>
lea    0xf92(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb1(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc3(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfd6(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfd1(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfcf(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfcd(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [38 x i8] c" lock <key> <action> [-v|--verbose]\0A\00"
@.str.2 = [45 x i8] c" NOTE: <key> must be in the range 0..127\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [68 x i8] c" lock <key> create [-x|expire] [-s|--semaphores <semaphore-size>]\0A\00"
@.str.5 = [30 x i8] c" <semaphore-size> values:\0A\00"
@.str.6 = [38 x i8] c" 1: Binary Semaphore (Mutext).\0A\00"
@.str.7 = [31 x i8] c" >1: Counting Semaphore.\0A\00"
@.str.8 = [42 x i8] c" lock <key> on [-t|--timeout <timeout>]\0A\00"
@.str.9 = [23 x i8] c" <timeout> values:\0A\00"
@.str.10 = [44 x i8] c" -1: Non-Blocking (Immediate return).\0A\00"
@.str.11 = [31 x i8] c" 0: Blocking (Default).\0A\00"
@.str.12 = [42 x i8] c" +N: Block for at most `N' seconds.\0A\00"
@.str.13 = [18 x i8] c" lock <key> off\0A\00"
@.str.14 = [21 x i8] c" lock <key> delete\0A\00"
@.str.15 = [21 x i8] c" lock <key> status\0A\00"
@.str.16 = [22 x i8] c" lock <key> summary\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.10, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"Usage:\00"
@str.17 = [37 x i8] c" lock <key> <action> [-v|--verbose]\00"
@str.18 = [44 x i8] c" NOTE: <key> must be in the range 0..127\00"
@str.19 = [67 x i8] c" lock <key> create [-x|expire] [-s|--semaphores <semaphore-size>]\00"
@str.20 = [29 x i8] c" <semaphore-size> values:\00"
@str.21 = [37 x i8] c" 1: Binary Semaphore (Mutext).\00"
@str.22 = [30 x i8] c" >1: Counting Semaphore.\00"
@str.23 = [41 x i8] c" lock <key> on [-t|--timeout <timeout>]\00"
@str.24 = [22 x i8] c" <timeout> values:\00"
@str.25 = [43 x i8] c" -1: Non-Blocking (Immediate return).\00"
@str.26 = [30 x i8] c" 0: Blocking (Default).\00"
@str.27 = [41 x i8] c" +N: Block for at most `N' seconds.\00"
@str.28 = [17 x i8] c" lock <key> off\00"
@str.29 = [20 x i8] c" lock <key> delete\00"
@str.30 = [20 x i8] c" lock <key> status\00"
@str.31 = [21 x i8] c" lock <key> summary\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.17, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.18, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.19, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.20, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.21, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.22, i64 0, i64 0))
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.27, i64 0, i64 0))
%15 = tail call i32 @putchar(i32 10)
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.28, i64 0, i64 0))
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.29, i64 0, i64 0))
%19 = tail call i32 @putchar(i32 10)
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.30, i64 0, i64 0))
%21 = tail call i32 @putchar(i32 10)
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.31, i64 0, i64 0))
ret void
}