#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(void) {
  printf("usage: xdemo [-l] [-r] [-s] [-f <string>] [-i <image file>] [-g "
         "<WxH>] [-c <count>] [-o <scroll type>] [-d <delay>] -z\n");
  printf("         -l                        draw lines\n");
  printf("         -r                        draw fill rectangles\n");
  printf("         -s                        draw stipple rectangles\n");
  printf("         -f <string>               draw string using fonts\n");
  printf("         -i <image file>           draw image\n");
  printf("         -g <WxH>                  geometry, default is 640x480\n");
  printf(
      "         -c <count>                iteration count, default is 5000\n");
  printf("         -d <delay>                loop delay in micro seconds, "
         "default 1000\n");
  printf("         -o <jump|smooth1|smooth2| define scrolling method\n");
  printf("             smooth3|smooth4>\n");
  printf("         -z <proxy_app>            zero proxy counters for specified "
         "application\n");
  printf("         -j                        offscreen to offscreen test\n\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf51(%rip),%rdi
call   1030 <printf@plt>
lea    0xf74(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa1(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd1(%rip),%rdi
call   1030 <printf@plt>
lea    0x1001(%rip),%rdi
call   1030 <printf@plt>
lea    0x1024(%rip),%rdi
call   1030 <printf@plt>
lea    0x1059(%rip),%rdi
call   1030 <printf@plt>
lea    0x1092(%rip),%rdi
call   1030 <printf@plt>
lea    0x10d4(%rip),%rdi
call   1030 <printf@plt>
lea    0x1104(%rip),%rdi
call   1030 <printf@plt>
lea    0x1117(%rip),%rdi
call   1030 <printf@plt>
lea    0x115d(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf53(%rip),%rdi
call   1030 <puts@plt>
lea    0xf75(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa1(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd0(%rip),%rdi
call   1030 <puts@plt>
lea    0xfff(%rip),%rdi
call   1030 <puts@plt>
lea    0x1021(%rip),%rdi
call   1030 <puts@plt>
lea    0x1055(%rip),%rdi
call   1030 <puts@plt>
lea    0x108d(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ce(%rip),%rdi
call   1030 <puts@plt>
lea    0x10fd(%rip),%rdi
call   1030 <puts@plt>
lea    0x110f(%rip),%rdi
call   1030 <puts@plt>
lea    0x1154(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [120 x i8] c"usage: xdemo [-l] [-r] [-s] [-f <string>] [-i <image file>] [-g <WxH>] [-c <count>] [-o <scroll type>] [-d <delay>] -z\0A\00"
@.str.1 = [47 x i8] c" -l draw lines\0A\00"
@.str.2 = [57 x i8] c" -r draw fill rectangles\0A\00"
@.str.3 = [60 x i8] c" -s draw stipple rectangles\0A\00"
@.str.4 = [60 x i8] c" -f <string> draw string using fonts\0A\00"
@.str.5 = [47 x i8] c" -i <image file> draw image\0A\00"
@.str.6 = [65 x i8] c" -g <WxH> geometry, default is 640x480\0A\00"
@.str.7 = [69 x i8] c" -c <count> iteration count, default is 5000\0A\00"
@.str.8 = [78 x i8] c" -d <delay> loop delay in micro seconds, default 1000\0A\00"
@.str.9 = [60 x i8] c" -o <jump|smooth1|smooth2| define scrolling method\0A\00"
@.str.10 = [31 x i8] c" smooth3|smooth4>\0A\00"
@.str.11 = [82 x i8] c" -z <proxy_app> zero proxy counters for specified application\0A\00"
@.str.12 = [65 x i8] c" -j offscreen to offscreen test\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.12, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [119 x i8] c"usage: xdemo [-l] [-r] [-s] [-f <string>] [-i <image file>] [-g <WxH>] [-c <count>] [-o <scroll type>] [-d <delay>] -z\00"
@str.13 = [46 x i8] c" -l draw lines\00"
@str.14 = [56 x i8] c" -r draw fill rectangles\00"
@str.15 = [59 x i8] c" -s draw stipple rectangles\00"
@str.16 = [59 x i8] c" -f <string> draw string using fonts\00"
@str.17 = [46 x i8] c" -i <image file> draw image\00"
@str.18 = [64 x i8] c" -g <WxH> geometry, default is 640x480\00"
@str.19 = [68 x i8] c" -c <count> iteration count, default is 5000\00"
@str.20 = [77 x i8] c" -d <delay> loop delay in micro seconds, default 1000\00"
@str.21 = [59 x i8] c" -o <jump|smooth1|smooth2| define scrolling method\00"
@str.22 = [30 x i8] c" smooth3|smooth4>\00"
@str.23 = [81 x i8] c" -z <proxy_app> zero proxy counters for specified application\00"
@str.24 = [64 x i8] c" -j offscreen to offscreen test\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([119 x i8], [119 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.13, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.14, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.15, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.16, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.17, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.18, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.19, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.21, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.22, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.23, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.24, i64 0, i64 0))
ret void
}