#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 *, ...);
int main() {
  char b64[] =
      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  int i;
  printf("#define PAT_BASE64_2 \"");
  for (i = 0; i != 64; ++i)
    if ((i & 0x30) == i)
      printf("%c", b64[i]);
  printf("\"\n");
  printf("#define PAT_BASE64_1 \"");
  for (i = 0; i != 64; ++i)
    if ((i & 0x3C) == i)
      printf("%c", b64[i]);
  printf("\"\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x41,%edx
call   1040 <memcpy@plt>
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x54(%rbp)
cmpl   $0x40,-0x54(%rbp)
je     119c <main+0x7c>
mov    -0x54(%rbp),%eax
and    $0x30,%eax
cmp    -0x54(%rbp),%eax
jne    1189 <main+0x69>
movslq -0x54(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%esi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    118e <main+0x6e>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1159 <main+0x39>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x54(%rbp)
cmpl   $0x40,-0x54(%rbp)
je     1202 <main+0xe2>
mov    -0x54(%rbp),%eax
and    $0x3c,%eax
cmp    -0x54(%rbp),%eax
jne    11ef <main+0xcf>
movslq -0x54(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%esi
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f4 <main+0xd4>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11bf <main+0x9f>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xf06(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb5(%rip),%r14
jmp    115a <main+0x2a>
nopl   (%rax)
add    $0x1,%rbx
cmp    $0x40,%rbx
je     116f <main+0x3f>
test   $0xffffffffffffffcf,%rbx
jne    1150 <main+0x20>
movsbl (%rbx,%r14,1),%edi
call   1030 <putchar@plt>
jmp    1150 <main+0x20>
lea    0xef7(%rip),%rdi
call   1040 <puts@plt>
lea    0xed6(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    119a <main+0x6a>
nopl   (%rax)
add    $0x1,%rbx
cmp    $0x40,%rbx
je     11af <main+0x7f>
test   $0xffffffffffffffc3,%rbx
jne    1190 <main+0x60>
movsbl (%rbx,%r14,1),%edi
call   1030 <putchar@plt>
jmp    1190 <main+0x60>
lea    0xeb7(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.b64 = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
@.str = [23 x i8] c"#define PAT_BASE64_2 \22\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [3 x i8] c"\22\0A\00"
@.str.3 = [23 x i8] c"#define PAT_BASE64_1 \22\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [65 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [65 x i8]* %2 to i8*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %6
6: ; preds = %22, %0
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 64
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = load i32, i32* %3
%11 = and i32 %10, 48
%12 = load i32, i32* %3
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %21
14: ; preds = %9
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [65 x i8], [65 x i8]* %2, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %14, %9
br label %22
22: ; preds = %21
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %6
25: ; preds = %6
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %28
28: ; preds = %44, %25
%29 = load i32, i32* %3
%30 = icmp ne i32 %29, 64
br i1 %30, label %31, label %47
31: ; preds = %28
%32 = load i32, i32* %3
%33 = and i32 %32, 60
%34 = load i32, i32* %3
%35 = icmp eq i32 %33, %34
br i1 %35, label %36, label %43
36: ; preds = %31
%37 = load i32, i32* %3
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [65 x i8], [65 x i8]* %2, i64 0, i64 %38
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %36, %31
br label %44
44: ; preds = %43
%45 = load i32, i32* %3
%46 = add nsw i32 %45, 1
store i32 %46, i32* %3
br label %28
47: ; preds = %28
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%49 = load i32, i32* %1
ret i32 %49
}

LLVM IR (-O2):
@__const.main.b64 = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
@.str = [23 x i8] c"#define PAT_BASE64_2 \22\00"
@.str.3 = [23 x i8] c"#define PAT_BASE64_1 \22\00"
@str.4 = [2 x i8] c"\22\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %11
%3 = phi i64 [ 0, %0 ], [ %12, %11 ]
%4 = and i64 %3, 48
%5 = icmp eq i64 %4, %3
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.main.b64, i64 0, i64 %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = tail call i32 @putchar(i32 %9)
br label %11
11: ; preds = %2, %6
%12 = add nuw nsw i64 %3, 1
%13 = icmp eq i64 %12, 64
br i1 %13, label %14, label %2
14: ; preds = %11
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
br label %17
17: ; preds = %14, %26
%18 = phi i64 [ 0, %14 ], [ %27, %26 ]
%19 = and i64 %18, 60
%20 = icmp eq i64 %19, %18
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.main.b64, i64 0, i64 %18
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = tail call i32 @putchar(i32 %24)
br label %26
26: ; preds = %17, %21
%27 = add nuw nsw i64 %18, 1
%28 = icmp eq i64 %27, 64
br i1 %28, label %29, label %17
29: ; preds = %26
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}