#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 help(char *msg) {
  printf("%s version %s by Julian Buss, julian@wh.fh-wedel.de.\n",
         "sCT - simple crypto tool", "0.1beta");
  printf("Encodes and decodes a file with a password.\n\n");
  printf("Based on cxio routines from Julian Buss and Holger Leskien.\n");
  printf("Support free OS/2 software - visit http://www.netlabs.org!\n\n");
  printf("%s\n", msg);
  printf("Usage: sct e|d [option 1] .. [option n]\n");
  printf("       e                encode\n");
  printf("       d                decode\n");
  printf("       -fin <file>      use this file for input ('stdin' ok)\n");
  printf("       -fout <file>     use this file for output ('stdout' ok)\n");
  printf("       -p <password>    use this password\n\n");
  printf("If no infile is given, read from stdin.\n");
  printf("If no outfile is given, write to stdout.\n");
  printf("If no password is given, ask (not possible when input comes from "
         "stdin).\n");
  printf("If no work mode or is given, terminate.\n");
  printf("\n");
  printf("Examples:\n");
  printf("  sct e -fin readme -fout readmy.crypt\n");
  printf("  sct d -fin readme\n");
  printf("  sct e -fin mypicture.jpg -fout crypted.jpg\n");
  printf(
      "       encodes picture, saves in other file and asks for password.\n");
  printf("  dir | sct e -p test\n");
  printf("       encodes output from dir command to stdout.\n\n");
  exit(1);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
lea    0xefc(%rip),%rsi
lea    0xf0e(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1019(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1037(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1052(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x106e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10aa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10b7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10b4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10ce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10d5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10f5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x112b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1134(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
lea    0xee4(%rip),%rsi
lea    0xef6(%rip),%rdx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xef0(%rip),%rdi
call   1040 <puts@plt>
lea    0xf11(%rip),%rdi
call   1040 <puts@plt>
lea    0xf41(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xf69(%rip),%rdi
call   1040 <puts@plt>
lea    0xf85(%rip),%rdi
call   1040 <puts@plt>
lea    0xf98(%rip),%rdi
call   1040 <puts@plt>
lea    0xfab(%rip),%rdi
call   1040 <puts@plt>
lea    0xfdc(%rip),%rdi
call   1040 <puts@plt>
lea    0x100f(%rip),%rdi
call   1040 <puts@plt>
lea    0x102e(%rip),%rdi
call   1040 <puts@plt>
lea    0x104a(%rip),%rdi
call   1040 <puts@plt>
lea    0x1067(%rip),%rdi
call   1040 <puts@plt>
lea    0x10a4(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10b6(%rip),%rdi
call   1040 <puts@plt>
lea    0x10b4(%rip),%rdi
call   1040 <puts@plt>
lea    0x10cf(%rip),%rdi
call   1040 <puts@plt>
lea    0x10d7(%rip),%rdi
call   1040 <puts@plt>
lea    0x10f8(%rip),%rdi
call   1040 <puts@plt>
lea    0x112f(%rip),%rdi
call   1040 <puts@plt>
lea    0x1139(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"%s version %s by Julian Buss, julian@wh.fh-wedel.de.\0A\00"
@.str.1 = [25 x i8] c"sCT - simple crypto tool\00"
@.str.2 = [8 x i8] c"0.1beta\00"
@.str.3 = [46 x i8] c"Encodes and decodes a file with a password.\0A\0A\00"
@.str.4 = [61 x i8] c"Based on cxio routines from Julian Buss and Holger Leskien.\0A\00"
@.str.5 = [61 x i8] c"Support free OS/2 software - visit http://www.netlabs.org!\0A\0A\00"
@.str.6 = [4 x i8] c"%s\0A\00"
@.str.7 = [41 x i8] c"Usage: sct e|d [option 1] .. [option n]\0A\00"
@.str.8 = [32 x i8] c" e encode\0A\00"
@.str.9 = [32 x i8] c" d decode\0A\00"
@.str.10 = [62 x i8] c" -fin <file> use this file for input ('stdin' ok)\0A\00"
@.str.11 = [64 x i8] c" -fout <file> use this file for output ('stdout' ok)\0A\00"
@.str.12 = [44 x i8] c" -p <password> use this password\0A\0A\00"
@.str.13 = [41 x i8] c"If no infile is given, read from stdin.\0A\00"
@.str.14 = [42 x i8] c"If no outfile is given, write to stdout.\0A\00"
@.str.15 = [74 x i8] c"If no password is given, ask (not possible when input comes from stdin).\0A\00"
@.str.16 = [41 x i8] c"If no work mode or is given, terminate.\0A\00"
@.str.17 = [2 x i8] c"\0A\00"
@.str.18 = [11 x i8] c"Examples:\0A\00"
@.str.19 = [40 x i8] c" sct e -fin readme -fout readmy.crypt\0A\00"
@.str.20 = [21 x i8] c" sct d -fin readme\0A\00"
@.str.21 = [46 x i8] c" sct e -fin mypicture.jpg -fout crypted.jpg\0A\00"
@.str.22 = [68 x i8] c" encodes picture, saves in other file and asks for password.\0A\00"
@.str.23 = [23 x i8] c" dir | sct e -p test\0A\00"
@.str.24 = [52 x i8] c" encodes output from dir command to stdout.\0A\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.10, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.11, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.12, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.15, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.16, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.21, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.22, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.23, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.24, i64 0, i64 0))
%27 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [54 x i8] c"%s version %s by Julian Buss, julian@wh.fh-wedel.de.\0A\00"
@.str.1 = [25 x i8] c"sCT - simple crypto tool\00"
@.str.2 = [8 x i8] c"0.1beta\00"
@str = [45 x i8] c"Encodes and decodes a file with a password.\0A\00"
@str.25 = [60 x i8] c"Based on cxio routines from Julian Buss and Holger Leskien.\00"
@str.26 = [60 x i8] c"Support free OS/2 software - visit http://www.netlabs.org!\0A\00"
@str.27 = [40 x i8] c"Usage: sct e|d [option 1] .. [option n]\00"
@str.28 = [31 x i8] c" e encode\00"
@str.29 = [31 x i8] c" d decode\00"
@str.30 = [61 x i8] c" -fin <file> use this file for input ('stdin' ok)\00"
@str.31 = [63 x i8] c" -fout <file> use this file for output ('stdout' ok)\00"
@str.32 = [43 x i8] c" -p <password> use this password\0A\00"
@str.33 = [40 x i8] c"If no infile is given, read from stdin.\00"
@str.34 = [41 x i8] c"If no outfile is given, write to stdout.\00"
@str.35 = [73 x i8] c"If no password is given, ask (not possible when input comes from stdin).\00"
@str.36 = [40 x i8] c"If no work mode or is given, terminate.\00"
@str.37 = [10 x i8] c"Examples:\00"
@str.38 = [39 x i8] c" sct e -fin readme -fout readmy.crypt\00"
@str.39 = [20 x i8] c" sct d -fin readme\00"
@str.40 = [45 x i8] c" sct e -fin mypicture.jpg -fout crypted.jpg\00"
@str.41 = [67 x i8] c" encodes picture, saves in other file and asks for password.\00"
@str.42 = [22 x i8] c" dir | sct e -p test\00"
@str.43 = [51 x i8] c" encodes output from dir command to stdout.\0A\00"
define void @help(i8* nocapture %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.25, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.26, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) %0)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.27, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.28, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.29, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.30, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.31, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.32, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.33, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.34, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.35, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.36, i64 0, i64 0))
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.37, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.38, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.39, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.40, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.41, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.42, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.43, i64 0, i64 0))
%25 = tail call i32 @exit(i32 1)
unreachable
}