#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 /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void print_usage(char **argv) {
  printf("OpenCL serpent\nUsage: %s [-options]\n\n", argv[0]);
  printf("\t-h --help\t\t\t\t\t: Print this usage\n");
  printf("\t-v --verbose\t\t\t\t\t: Verbose version\n");
  printf("\t-d <file> --dump-binary-file <file>\t\t: Specify where to save the "
         "generated kernel binary code\n");
  printf("\t-w NUM --num-work-items NUM\t\t\t: Specify number of work-items "
         "(default: 2048)\n");
  printf("\t-g NUM --num-work-items-per-work-group NUM\t: Specify number of "
         "work-items that compose a work-group (default 64)\n");
  printf("\t-b NUM --num-blocks-for-work-item NUM\t\t: Specify number of "
         "blocks encrypted by each work-item (default: 20000)\n");
  printf("\t-u --unroll-main-work-cycle\t\t\t: Unroll 10 iterations of the "
         "main kernel cycle\n");
  printf("\t-s --do-not-unroll-subkey-operation\t\t: Do not unroll subkey "
         "operation\n");
  printf(
      "\t-r --ctr-mode\t\t\t\t\t: Enable Counter Mode (default: ECB mode)\n");
  printf("\t-c --csv-output\t\t\t\t\t: Print CSV-like output on stdout\n");
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1002(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1065(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10e1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1111(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    (%rdi),%rsi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
lea    0xee3(%rip),%rdi
call   1040 <puts@plt>
lea    0xefb(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4e(%rip),%rdi
call   1040 <puts@plt>
lea    0xf90(%rip),%rdi
call   1040 <puts@plt>
lea    0xff6(%rip),%rdi
call   1040 <puts@plt>
lea    0x105a(%rip),%rdi
call   1040 <puts@plt>
lea    0x109d(%rip),%rdi
call   1040 <puts@plt>
lea    0x10d8(%rip),%rdi
call   1040 <puts@plt>
lea    0x1109(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"OpenCL serpent\0AUsage: %s [-options]\0A\0A\00"
@.str.1 = [35 x i8] c"\09-h --help\09\09\09\09\09: Print this usage\0A\00"
@.str.2 = [37 x i8] c"\09-v --verbose\09\09\09\09\09: Verbose version\0A\00"
@.str.3 = [96 x i8] c"\09-d <file> --dump-binary-file <file>\09\09: Specify where to save the generated kernel binary code\0A\00"
@.str.4 = [79 x i8] c"\09-w NUM --num-work-items NUM\09\09\09: Specify number of work-items (default: 2048)\0A\00"
@.str.5 = [115 x i8] c"\09-g NUM --num-work-items-per-work-group NUM\09: Specify number of work-items that compose a work-group (default 64)\0A\00"
@.str.6 = [113 x i8] c"\09-b NUM --num-blocks-for-work-item NUM\09\09: Specify number of blocks encrypted by each work-item (default: 20000)\0A\00"
@.str.7 = [80 x i8] c"\09-u --unroll-main-work-cycle\09\09\09: Unroll 10 iterations of the main kernel cycle\0A\00"
@.str.8 = [72 x i8] c"\09-s --do-not-unroll-subkey-operation\09\09: Do not unroll subkey operation\0A\00"
@.str.9 = [62 x i8] c"\09-r --ctr-mode\09\09\09\09\09: Enable Counter Mode (default: ECB mode)\0A\00"
@.str.10 = [56 x i8] c"\09-c --csv-output\09\09\09\09\09: Print CSV-like output on stdout\0A\00"
@.str.11 = [2 x i8] c"\0A\00"
define void @print_usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.7, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.10, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [38 x i8] c"OpenCL serpent\0AUsage: %s [-options]\0A\0A\00"
@str = [34 x i8] c"\09-h --help\09\09\09\09\09: Print this usage\00"
@str.12 = [36 x i8] c"\09-v --verbose\09\09\09\09\09: Verbose version\00"
@str.13 = [95 x i8] c"\09-d <file> --dump-binary-file <file>\09\09: Specify where to save the generated kernel binary code\00"
@str.14 = [78 x i8] c"\09-w NUM --num-work-items NUM\09\09\09: Specify number of work-items (default: 2048)\00"
@str.15 = [114 x i8] c"\09-g NUM --num-work-items-per-work-group NUM\09: Specify number of work-items that compose a work-group (default 64)\00"
@str.16 = [112 x i8] c"\09-b NUM --num-blocks-for-work-item NUM\09\09: Specify number of blocks encrypted by each work-item (default: 20000)\00"
@str.17 = [79 x i8] c"\09-u --unroll-main-work-cycle\09\09\09: Unroll 10 iterations of the main kernel cycle\00"
@str.18 = [71 x i8] c"\09-s --do-not-unroll-subkey-operation\09\09: Do not unroll subkey operation\00"
@str.19 = [61 x i8] c"\09-r --ctr-mode\09\09\09\09\09: Enable Counter Mode (default: ECB mode)\00"
@str.20 = [55 x i8] c"\09-c --csv-output\09\09\09\09\09: Print CSV-like output on stdout\00"
define void @print_usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.12, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @str.13, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.14, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([114 x i8], [114 x i8]* @str.15, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([112 x i8], [112 x i8]* @str.16, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.17, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.18, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.19, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.20, i64 0, i64 0))
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 @exit(i32 0)
unreachable
}