#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(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(void) {
  static char *msg[] = {" [ -d < displayname > ]  X server to contact",
                        " [ -g < geometry >    ]  size and location of window",
                        " [ -t x ]  test X11 connection", "", NULL};
  char **cpp;
  printf("usage: corner [-options ...]\n");
  printf("where options include:\n");
  for (cpp = msg; *cpp; cpp++) {
    printf("%s\n", *cpp);
  }
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xf52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x2ef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1183 <usage+0x63>
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xf4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    114f <usage+0x2f>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xf49(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5a(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb0(%rip),%rdi
call   1040 <puts@plt>
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
lea    0xefa(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@usage.msg = internal global [5 x i8*] [i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i32 0, i32 0), i8* null]
@.str = [45 x i8] c" [ -d < displayname > ] X server to contact\00"
@.str.1 = [53 x i8] c" [ -g < geometry > ] size and location of window\00"
@.str.2 = [31 x i8] c" [ -t x ] test X11 connection\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [30 x i8] c"usage: corner [-options ...]\0A\00"
@.str.5 = [24 x i8] c"where options include:\0A\00"
@.str.6 = [4 x i8] c"%s\0A\00"
define void @usage() {
%1 = alloca i8**
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
store i8** getelementptr inbounds ([5 x i8*], [5 x i8*]* @usage.msg, i64 0, i64 0), i8*** %1
br label %4
4: ; preds = %12, %0
%5 = load i8**, i8*** %1
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i8**, i8*** %1
%10 = load i8*, i8** %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8
%13 = load i8**, i8*** %1
%14 = getelementptr inbounds i8*, i8** %13, i32 1
store i8** %14, i8*** %1
br label %4
15: ; preds = %4
%16 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [45 x i8] c" [ -d < displayname > ] X server to contact\00"
@.str.1 = [53 x i8] c" [ -g < geometry > ] size and location of window\00"
@.str.2 = [31 x i8] c" [ -t x ] test X11 connection\00"
@str = [29 x i8] c"usage: corner [-options ...]\00"
@str.7 = [23 x i8] c"where options include:\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.7, i64 0, i64 0))
%3 = tail call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @exit(i32 1)
unreachable
}