#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 *, char, char, char, char, char, char);
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  int value = 1;
  int size_log;
  if (argc != 8)
    return 1;
  size_log = 0;
  while (sizeof(long) * 8 != 1 << size_log)
    size_log++;
  puts("/*\n"
       " * Architecture specific parameters. This is a generated file, do not "
       "edit.\n"
       " */\n"
       "\n"
       "#ifndef _JOHN_ARCH_H\n"
       "#define _JOHN_ARCH_H\n");
  printf("#define ARCH_WORD\t\t\tlong\n"
         "#define ARCH_SIZE\t\t\t%d\n"
         "#define ARCH_BITS\t\t\t%d\n"
         "#define ARCH_BITS_LOG\t\t\t%d\n"
         "#define ARCH_BITS_STR\t\t\t\"%d\"\n"
         "#define ARCH_LITTLE_ENDIAN\t\t%d\n"
         "#define ARCH_INT_GT_32\t\t\t%d\n"
         "#define ARCH_ALLOWS_UNALIGNED\t\t1\n"
         "#define ARCH_INDEX(x)\t\t\t((unsigned int)(unsigned char)(x))\n"
         "\n",
         (int)sizeof(long), (int)(sizeof(long) * 8), size_log,
         (int)(sizeof(long) * 8), (int)(*(char *)&value),
         (sizeof(int) > 4) ? 1 : 0);
  puts("#define CPU_DETECT\t\t\t0\n\n"
       "#define DES_ASM\t\t\t\t0");
  switch (argv[1][0]) {
  case '1':
    puts("#define DES_128K\t\t\t0\n"
         "#define DES_X2\t\t\t\t0\n"
         "#define DES_MASK\t\t\t0\n"
         "#define DES_SCALE\t\t\t1\n"
         "#define DES_EXTB\t\t\t0");
    break;
  case '2':
    puts("#define DES_128K\t\t\t1\n"
         "#define DES_X2\t\t\t\t0\n"
         "#define DES_MASK\t\t\t1\n"
         "#define DES_SCALE\t\t\t1\n"
         "#define DES_EXTB\t\t\t1");
    break;
  case '3':
    puts("#define DES_128K\t\t\t0\n"
         "#define DES_X2\t\t\t\t0\n"
         "#define DES_MASK\t\t\t1\n"
         "#define DES_SCALE\t\t\t1\n"
         "#define DES_EXTB\t\t\t0");
    break;
  case '4':
    puts("#define DES_128K\t\t\t0\n"
         "#define DES_X2\t\t\t\t0\n"
         "#define DES_MASK\t\t\t1\n"
         "#define DES_SCALE\t\t\t1\n"
         "#define DES_EXTB\t\t\t1");
    break;
  case '5':
    if (sizeof(long) >= 8) {
      puts("#define DES_128K\t\t\t0\n"
           "#define DES_X2\t\t\t\t0\n"
           "#define DES_MASK\t\t\t1\n"
           "#define DES_SCALE\t\t\t0\n"
           "#define DES_EXTB\t\t\t0");
      break;
    }
  default:
    return 1;
  }
  printf("#define DES_COPY\t\t\t%c\n"
         "#define DES_BS_ASM\t\t\t0\n"
         "#define DES_BS\t\t\t\t%c\n"
         "#define DES_BS_VECTOR\t\t\t0\n"
         "#define DES_BS_EXPAND\t\t\t1\n"
         "\n"
         "#define MD5_ASM\t\t\t\t0\n"
         "#define MD5_X2\t\t\t\t%c\n"
         "#define MD5_IMM\t\t\t\t%c\n"
         "\n"
         "#define BF_ASM\t\t\t\t0\n"
         "#define BF_SCALE\t\t\t%c\n"
         "#define BF_X2\t\t\t\t%c\n"
         "\n"
         "#endif\n",
         argv[2][0], argv[3][0], argv[4][0], argv[5][0], argv[6][0],
         argv[7][0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x8,-0x8(%rbp)
je     1153 <main+0x33>
movl   $0x1,-0x4(%rbp)
jmp    12c1 <main+0x1a1>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0x40,%eax
cmp    %rcx,%rax
je     1183 <main+0x63>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115a <main+0x3a>
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
movsbl -0x18(%rbp),%ecx
movsbl -0x14(%rbp),%r9d
mov    %rsp,%rax
movl   $0x0,(%rax)
lea    0xeeb(%rip),%rdi
mov    $0x8,%esi
mov    $0x40,%r8d
mov    %r8d,%edx
call   1040 <printf@plt>
lea    0xfe9(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
add    $0xffffffcf,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x4,%eax
ja     124d <main+0x12d>
mov    -0x20(%rbp),%rax
lea    0xe11(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfd9(%rip),%rdi
call   1030 <puts@plt>
jmp    1259 <main+0x139>
lea    0x1031(%rip),%rdi
call   1030 <puts@plt>
jmp    1259 <main+0x139>
lea    0x1089(%rip),%rdi
call   1030 <puts@plt>
jmp    1259 <main+0x139>
lea    0x10e1(%rip),%rdi
call   1030 <puts@plt>
jmp    1259 <main+0x139>
lea    0x1139(%rip),%rdi
call   1030 <puts@plt>
jmp    1259 <main+0x139>
movl   $0x1,-0x4(%rbp)
jmp    12c1 <main+0x1a1>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    (%rax),%sil
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    (%rax),%dl
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rax
mov    (%rax),%r8b
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rax
mov    (%rax),%r9b
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rax
lea    0x1148(%rip),%rdi
movsbl %sil,%esi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl (%rax),%eax
mov    %eax,(%rsp)
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x8,%edi
jne    11e0 <main+0xc0>
mov    %rsi,%rbx
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,(%rsp)
lea    0xf31(%rip),%rdi
mov    $0x1,%ebp
mov    $0x8,%esi
mov    $0x40,%edx
mov    $0x6,%ecx
mov    $0x40,%r8d
mov    $0x1,%r9d
call   1040 <printf@plt>
lea    0x101d(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rbx),%rax
movsbq (%rax),%rax
add    $0xffffffffffffffcf,%rax
cmp    $0x4,%eax
ja     11e0 <main+0xc0>
lea    0x1339(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <puts@plt>
mov    0x10(%rbx),%rax
mov    0x18(%rbx),%rcx
movsbl (%rax),%esi
movsbl (%rcx),%edx
mov    0x20(%rbx),%rax
movsbl (%rax),%ecx
mov    0x28(%rbx),%rax
movsbl (%rax),%r8d
mov    0x30(%rbx),%rax
movsbl (%rax),%r9d
mov    0x38(%rbx),%rax
movsbl (%rax),%eax
mov    %eax,(%rsp)
lea    0x11f8(%rip),%rdi
call   1040 <printf@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [127 x i8] c"/*\0A * Architecture specific parameters. This is a generated file, do not edit.\0A */\0A\0A#ifndef _JOHN_ARCH_H\0A#define _JOHN_ARCH_H\0A\00"
@.str.1 = [280 x i8] c"#define ARCH_WORD\09\09\09long\0A#define ARCH_SIZE\09\09\09%d\0A#define ARCH_BITS\09\09\09%d\0A#define ARCH_BITS_LOG\09\09\09%d\0A#define ARCH_BITS_STR\09\09\09\22%d\22\0A#define ARCH_LITTLE_ENDIAN\09\09%d\0A#define ARCH_INT_GT_32\09\09\09%d\0A#define ARCH_ALLOWS_UNALIGNED\09\091\0A#define ARCH_INDEX(x)\09\09\09((unsigned int)(unsigned char)(x))\0A\0A\00"
@.str.2 = [45 x i8] c"#define CPU_DETECT\09\09\090\0A\0A#define DES_ASM\09\09\09\090\00"
@.str.3 = [105 x i8] c"#define DES_128K\09\09\090\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\090\0A#define DES_SCALE\09\09\091\0A#define DES_EXTB\09\09\090\00"
@.str.4 = [105 x i8] c"#define DES_128K\09\09\091\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\091\0A#define DES_SCALE\09\09\091\0A#define DES_EXTB\09\09\091\00"
@.str.5 = [105 x i8] c"#define DES_128K\09\09\090\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\091\0A#define DES_SCALE\09\09\091\0A#define DES_EXTB\09\09\090\00"
@.str.6 = [105 x i8] c"#define DES_128K\09\09\090\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\091\0A#define DES_SCALE\09\09\091\0A#define DES_EXTB\09\09\091\00"
@.str.7 = [105 x i8] c"#define DES_128K\09\09\090\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\091\0A#define DES_SCALE\09\09\090\0A#define DES_EXTB\09\09\090\00"
@.str.8 = [255 x i8] c"#define DES_COPY\09\09\09%c\0A#define DES_BS_ASM\09\09\090\0A#define DES_BS\09\09\09\09%c\0A#define DES_BS_VECTOR\09\09\090\0A#define DES_BS_EXPAND\09\09\091\0A\0A#define MD5_ASM\09\09\09\090\0A#define MD5_X2\09\09\09\09%c\0A#define MD5_IMM\09\09\09\09%c\0A\0A#define BF_ASM\09\09\09\090\0A#define BF_SCALE\09\09\09%c\0A#define BF_X2\09\09\09\09%c\0A\0A#endif\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 8
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %3
br label %79
11: ; preds = %2
store i32 0, i32* %7
br label %12
12: ; preds = %17, %11
%13 = load i32, i32* %7
%14 = shl i32 1, %13
%15 = sext i32 %14 to i64
%16 = icmp ne i64 64, %15
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = load i32, i32* %7
%19 = add nsw i32 %18, 1
store i32 %19, i32* %7
br label %12
20: ; preds = %12
%21 = call i32 @puts(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str, i64 0, i64 0))
%22 = load i32, i32* %7
%23 = trunc i32 %22 to i8
%24 = bitcast i32* %6 to i8*
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = trunc i32 %26 to i8
%28 = call i32 @printf(i8* getelementptr inbounds ([280 x i8], [280 x i8]* @.str.1, i64 0, i64 0), i8 signext 8, i8 signext 64, i8 signext %23, i8 signext 64, i8 signext %27, i8 signext 0)
%29 = call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = getelementptr inbounds i8, i8* %32, i64 0
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
switch i32 %35, label %46 [
i32 49, label %36
i32 50, label %38
i32 51, label %40
i32 52, label %42
i32 53, label %44
]
36: ; preds = %20
%37 = call i32 @puts(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.3, i64 0, i64 0))
br label %47
38: ; preds = %20
%39 = call i32 @puts(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.4, i64 0, i64 0))
br label %47
40: ; preds = %20
%41 = call i32 @puts(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.5, i64 0, i64 0))
br label %47
42: ; preds = %20
%43 = call i32 @puts(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.6, i64 0, i64 0))
br label %47
44: ; preds = %20
%45 = call i32 @puts(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.7, i64 0, i64 0))
br label %47
46: ; preds = %20
store i32 1, i32* %3
br label %79
47: ; preds = %44, %42, %40, %38, %36
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 2
%50 = load i8*, i8** %49
%51 = getelementptr inbounds i8, i8* %50, i64 0
%52 = load i8, i8* %51
%53 = load i8**, i8*** %5
%54 = getelementptr inbounds i8*, i8** %53, i64 3
%55 = load i8*, i8** %54
%56 = getelementptr inbounds i8, i8* %55, i64 0
%57 = load i8, i8* %56
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 4
%60 = load i8*, i8** %59
%61 = getelementptr inbounds i8, i8* %60, i64 0
%62 = load i8, i8* %61
%63 = load i8**, i8*** %5
%64 = getelementptr inbounds i8*, i8** %63, i64 5
%65 = load i8*, i8** %64
%66 = getelementptr inbounds i8, i8* %65, i64 0
%67 = load i8, i8* %66
%68 = load i8**, i8*** %5
%69 = getelementptr inbounds i8*, i8** %68, i64 6
%70 = load i8*, i8** %69
%71 = getelementptr inbounds i8, i8* %70, i64 0
%72 = load i8, i8* %71
%73 = load i8**, i8*** %5
%74 = getelementptr inbounds i8*, i8** %73, i64 7
%75 = load i8*, i8** %74
%76 = getelementptr inbounds i8, i8* %75, i64 0
%77 = load i8, i8* %76
%78 = call i32 @printf(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @.str.8, i64 0, i64 0), i8 signext %52, i8 signext %57, i8 signext %62, i8 signext %67, i8 signext %72, i8 signext %77)
store i32 0, i32* %3
br label %79
79: ; preds = %47, %46, %10
%80 = load i32, i32* %3
ret i32 %80
}

LLVM IR (-O2):
@.str = [127 x i8] c"/*\0A * Architecture specific parameters. This is a generated file, do not edit.\0A */\0A\0A#ifndef _JOHN_ARCH_H\0A#define _JOHN_ARCH_H\0A\00"
@.str.1 = [280 x i8] c"#define ARCH_WORD\09\09\09long\0A#define ARCH_SIZE\09\09\09%d\0A#define ARCH_BITS\09\09\09%d\0A#define ARCH_BITS_LOG\09\09\09%d\0A#define ARCH_BITS_STR\09\09\09\22%d\22\0A#define ARCH_LITTLE_ENDIAN\09\09%d\0A#define ARCH_INT_GT_32\09\09\09%d\0A#define ARCH_ALLOWS_UNALIGNED\09\091\0A#define ARCH_INDEX(x)\09\09\09((unsigned int)(unsigned char)(x))\0A\0A\00"
@.str.2 = [45 x i8] c"#define CPU_DETECT\09\09\090\0A\0A#define DES_ASM\09\09\09\090\00"
@.str.3 = [105 x i8] c"#define DES_128K\09\09\090\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\090\0A#define DES_SCALE\09\09\091\0A#define DES_EXTB\09\09\090\00"
@.str.4 = [105 x i8] c"#define DES_128K\09\09\091\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\091\0A#define DES_SCALE\09\09\091\0A#define DES_EXTB\09\09\091\00"
@.str.5 = [105 x i8] c"#define DES_128K\09\09\090\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\091\0A#define DES_SCALE\09\09\091\0A#define DES_EXTB\09\09\090\00"
@.str.6 = [105 x i8] c"#define DES_128K\09\09\090\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\091\0A#define DES_SCALE\09\09\091\0A#define DES_EXTB\09\09\091\00"
@.str.7 = [105 x i8] c"#define DES_128K\09\09\090\0A#define DES_X2\09\09\09\090\0A#define DES_MASK\09\09\091\0A#define DES_SCALE\09\09\090\0A#define DES_EXTB\09\09\090\00"
@.str.8 = [255 x i8] c"#define DES_COPY\09\09\09%c\0A#define DES_BS_ASM\09\09\090\0A#define DES_BS\09\09\09\09%c\0A#define DES_BS_VECTOR\09\09\090\0A#define DES_BS_EXPAND\09\09\091\0A\0A#define MD5_ASM\09\09\09\090\0A#define MD5_X2\09\09\09\09%c\0A#define MD5_IMM\09\09\09\09%c\0A\0A#define BF_ASM\09\09\09\090\0A#define BF_SCALE\09\09\09%c\0A#define BF_X2\09\09\09\09%c\0A\0A#endif\0A\00"
@reltable.main = [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([105 x i8]* @.str.3 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([105 x i8]* @.str.4 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([105 x i8]* @.str.5 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([105 x i8]* @.str.6 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([105 x i8]* @.str.7 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32)]
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 8
br i1 %3, label %4, label %38
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([127 x i8], [127 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([280 x i8], [280 x i8]* @.str.1, i64 0, i64 0), i8 signext 8, i8 signext 64, i8 signext 6, i8 signext 64, i8 signext 1, i8 signext 0)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = add nsw i32 %11, -49
%13 = icmp ult i32 %12, 5
br i1 %13, label %14, label %38
14: ; preds = %4
%15 = sext i32 %12 to i64
%16 = shl i64 %15, 2
%17 = call i8* @llvm.load.relative.i64(i8* bitcast ([5 x i32]* @reltable.main to i8*), i64 %16)
%18 = tail call i32 @puts(i8* dereferenceable(1) %17)
%19 = getelementptr inbounds i8*, i8** %1, i64 2
%20 = load i8*, i8** %19
%21 = load i8, i8* %20
%22 = getelementptr inbounds i8*, i8** %1, i64 3
%23 = load i8*, i8** %22
%24 = load i8, i8* %23
%25 = getelementptr inbounds i8*, i8** %1, i64 4
%26 = load i8*, i8** %25
%27 = load i8, i8* %26
%28 = getelementptr inbounds i8*, i8** %1, i64 5
%29 = load i8*, i8** %28
%30 = load i8, i8* %29
%31 = getelementptr inbounds i8*, i8** %1, i64 6
%32 = load i8*, i8** %31
%33 = load i8, i8* %32
%34 = getelementptr inbounds i8*, i8** %1, i64 7
%35 = load i8*, i8** %34
%36 = load i8, i8* %35
%37 = tail call i32 @printf(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @.str.8, i64 0, i64 0), i8 signext %21, i8 signext %24, i8 signext %27, i8 signext %30, i8 signext %33, i8 signext %36)
br label %38
38: ; preds = %4, %2, %14
%39 = phi i32 [ 0, %14 ], [ 1, %2 ], [ 1, %4 ]
ret i32 %39
}