#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 *name) {
  printf("%s <event> \n", name);
  printf("  event: list or set.\n");
  printf("    * list: Prints all drm cards with information\n");
  printf("    * set: in order to set the value of a property, \n");
  printf("      %s set <card> <connector id> <property> <value>\n", name);
  printf("        card: card file '/dev/dri/'\n");
  printf("        connector id: the id of the connector (use 'list' in order "
         "to get this info)\n");
  printf("        property: property name\n");
  printf("        value: \n");
  printf("\n");
  printf("Example:\n");
  printf("  %s set /dev/dri/card0 19 audio 2\n", name);
  printf("    Note: In order to enable audio output, Xorg uses the value '2', "
         "i really dont know why\n");
  return 0;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf1c(%rip),%rdi
call   1040 <puts@plt>
lea    0xf26(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf64(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7c(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc5(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd9(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfd3(%rip),%rdi
call   1040 <puts@plt>
lea    0xe7d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfbf(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%s <event> \0A\00"
@.str.1 = [23 x i8] c" event: list or set.\0A\00"
@.str.2 = [51 x i8] c" * list: Prints all drm cards with information\0A\00"
@.str.3 = [54 x i8] c" * set: in order to set the value of a property, \0A\00"
@.str.4 = [55 x i8] c" %s set <card> <connector id> <property> <value>\0A\00"
@.str.5 = [37 x i8] c" card: card file '/dev/dri/'\0A\00"
@.str.6 = [86 x i8] c" connector id: the id of the connector (use 'list' in order to get this info)\0A\00"
@.str.7 = [33 x i8] c" property: property name\0A\00"
@.str.8 = [17 x i8] c" value: \0A\00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [10 x i8] c"Example:\0A\00"
@.str.11 = [36 x i8] c" %s set /dev/dri/card0 19 audio 2\0A\00"
@.str.12 = [92 x i8] c" Note: In order to enable audio output, Xorg uses the value '2', i really dont know why\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0))
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%16 = load i8*, i8** %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i8* %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.12, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s <event> \0A\00"
@.str.4 = [55 x i8] c" %s set <card> <connector id> <property> <value>\0A\00"
@.str.11 = [36 x i8] c" %s set /dev/dri/card0 19 audio 2\0A\00"
@str = [22 x i8] c" event: list or set.\00"
@str.13 = [50 x i8] c" * list: Prints all drm cards with information\00"
@str.14 = [53 x i8] c" * set: in order to set the value of a property, \00"
@str.15 = [36 x i8] c" card: card file '/dev/dri/'\00"
@str.16 = [85 x i8] c" connector id: the id of the connector (use 'list' in order to get this info)\00"
@str.17 = [32 x i8] c" property: property name\00"
@str.18 = [16 x i8] c" value: \00"
@str.19 = [9 x i8] c"Example:\00"
@str.20 = [91 x i8] c" Note: In order to enable audio output, Xorg uses the value '2', i really dont know why\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.13, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.15, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str.16, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.17, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.18, i64 0, i64 0))
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.19, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i8* %0)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @str.20, i64 0, i64 0))
ret i32 0
}