#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 */
typedef int /*<<< orphan*/ src3;
typedef int /*<<< orphan*/ src2;
typedef int /*<<< orphan*/ src1;

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int exit_status();
int /*<<< orphan*/ ok_at_loc(char *, int, int, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ tap_plan(int, int /*<<< orphan*/ *);
scalar_t__ validate(char const *, unsigned char const *, int);
int main(int argc, char *argv[]) {
  const unsigned char src1[] = {0x14, 0xfb, 0x9c, 0x03, 0xd9, 0x7e};
  const unsigned char src2[] = {0x14, 0xfb, 0x9c, 0x03, 0xd9};
  const unsigned char src3[] = {0x14, 0xfb, 0x9c, 0x03};
  const char dst1[] = "FPucA9l+";
  const char dst2[] = "FPucA9k=";
  const char dst3[] = "FPucAw==";
  tap_plan(3, NULL);
  ok_at_loc("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dun/munge/refs/heads/master/src/munged/"
            "base64_test.c",
            62, validate(dst1, src1, sizeof(src1)) == 0,
            "Input data 0x14fb9c03d97e", NULL);
  ok_at_loc("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dun/munge/refs/heads/master/src/munged/"
            "base64_test.c",
            65, validate(dst2, src2, sizeof(src2)) == 0,
            "Input data 0x14fb9c03d9", NULL);
  ok_at_loc("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/dun/munge/refs/heads/master/src/munged/"
            "base64_test.c",
            68, validate(dst3, src3, sizeof(src3)) == 0,
            "Input data 0x14fb9c03", NULL);
  return exit_status();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xea4(%rip),%eax
mov    %eax,-0x16(%rbp)
mov    0xe9e(%rip),%ax
mov    %ax,-0x12(%rbp)
mov    0xe96(%rip),%eax
mov    %eax,-0x1b(%rbp)
mov    0xe91(%rip),%al
mov    %al,-0x17(%rbp)
mov    0xe89(%rip),%eax
mov    %eax,-0x1f(%rbp)
mov    0xe83(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe81(%rip),%al
mov    %al,-0x20(%rbp)
mov    0xe78(%rip),%rax
mov    %rax,-0x31(%rbp)
mov    0xe76(%rip),%al
mov    %al,-0x29(%rbp)
mov    0xe6d(%rip),%rax
mov    %rax,-0x3a(%rbp)
mov    0xe6b(%rip),%al
mov    %al,-0x32(%rbp)
mov    $0x3,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <tap_plan@plt>
lea    -0x28(%rbp),%rdi
lea    -0x16(%rbp),%rsi
mov    $0x6,%edx
call   1060 <validate@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edx
lea    0xe36(%rip),%rdi
mov    $0x3e,%esi
lea    0xeb9(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <ok_at_loc@plt>
lea    -0x31(%rbp),%rdi
lea    -0x1b(%rbp),%rsi
mov    $0x5,%edx
call   1060 <validate@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edx
lea    0xdfb(%rip),%rdi
mov    $0x41,%esi
lea    0xe98(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <ok_at_loc@plt>
lea    -0x3a(%rbp),%rdi
lea    -0x1f(%rbp),%rsi
mov    $0x4,%edx
call   1060 <validate@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edx
lea    0xdc0(%rip),%rdi
mov    $0x44,%esi
lea    0xe75(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1040 <ok_at_loc@plt>
mov    $0x0,%al
call   1030 <exit_status@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
movw   $0x7ed9,0x1c(%rsp)
movl   $0x39cfb14,0x18(%rsp)
03
movb   $0xd9,0x10(%rsp)
movl   $0x39cfb14,0xc(%rsp)
03
movl   $0x39cfb14,0x14(%rsp)
03
movabs $0x2b6c394163755046,%rax
39 6c 2b
mov    %rax,0x40(%rsp)
movb   $0x0,0x48(%rsp)
movabs $0x3d6b394163755046,%rax
39 6b 3d
mov    %rax,0x30(%rsp)
movb   $0x0,0x38(%rsp)
movabs $0x3d3d774163755046,%rax
77 3d 3d
mov    %rax,0x20(%rsp)
movb   $0x0,0x28(%rsp)
mov    $0x3,%edi
xor    %esi,%esi
call   1050 <tap_plan@plt>
lea    0x40(%rsp),%rdi
lea    0x18(%rsp),%rsi
mov    $0x6,%edx
call   1060 <validate@plt>
xor    %edx,%edx
test   %rax,%rax
sete   %dl
lea    0xe52(%rip),%rbx
lea    0xeda(%rip),%rcx
mov    %rbx,%rdi
mov    $0x3e,%esi
xor    %r8d,%r8d
call   1040 <ok_at_loc@plt>
lea    0x30(%rsp),%rdi
lea    0xc(%rsp),%rsi
mov    $0x5,%edx
call   1060 <validate@plt>
xor    %edx,%edx
test   %rax,%rax
sete   %dl
lea    0xec1(%rip),%rcx
mov    %rbx,%rdi
mov    $0x41,%esi
xor    %r8d,%r8d
call   1040 <ok_at_loc@plt>
lea    0x20(%rsp),%rdi
lea    0x14(%rsp),%rsi
mov    $0x4,%edx
call   1060 <validate@plt>
xor    %edx,%edx
test   %rax,%rax
sete   %dl
lea    0xea6(%rip),%rcx
mov    %rbx,%rdi
mov    $0x44,%esi
xor    %r8d,%r8d
call   1040 <ok_at_loc@plt>
xor    %eax,%eax
call   1030 <exit_status@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.src1 = [6 x i8] c"\14\FB\9C\03\D9~"
@__const.main.src2 = [5 x i8] c"\14\FB\9C\03\D9"
@__const.main.src3 = [4 x i8] c"\14\FB\9C\03"
@__const.main.dst1 = [9 x i8] c"FPucA9l+\00"
@__const.main.dst2 = [9 x i8] c"FPucA9k=\00"
@__const.main.dst3 = [9 x i8] c"FPucAw==\00"
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dun/munge/refs/heads/master/src/munged/base64_test.c\00"
@.str.1 = [26 x i8] c"Input data 0x14fb9c03d97e\00"
@.str.2 = [24 x i8] c"Input data 0x14fb9c03d9\00"
@.str.3 = [22 x i8] c"Input data 0x14fb9c03\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x i8]
%7 = alloca [5 x i8]
%8 = alloca [4 x i8]
%9 = alloca [9 x i8]
%10 = alloca [9 x i8]
%11 = alloca [9 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = bitcast [6 x i8]* %6 to i8*
%13 = bitcast [5 x i8]* %7 to i8*
%14 = bitcast [4 x i8]* %8 to i8*
%15 = bitcast [9 x i8]* %9 to i8*
%16 = bitcast [9 x i8]* %10 to i8*
%17 = bitcast [9 x i8]* %11 to i8*
%18 = call i32 @tap_plan(i32 3, i32* null)
%19 = getelementptr inbounds [9 x i8], [9 x i8]* %9, i64 0, i64 0
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
%21 = call i64 @validate(i8* %19, i8* %20, i32 6)
%22 = icmp eq i64 %21, 0
%23 = zext i1 %22 to i32
%24 = call i32 @ok_at_loc(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 62, i32 %23, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32* null)
%25 = getelementptr inbounds [9 x i8], [9 x i8]* %10, i64 0, i64 0
%26 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%27 = call i64 @validate(i8* %25, i8* %26, i32 5)
%28 = icmp eq i64 %27, 0
%29 = zext i1 %28 to i32
%30 = call i32 @ok_at_loc(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 65, i32 %29, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32* null)
%31 = getelementptr inbounds [9 x i8], [9 x i8]* %11, i64 0, i64 0
%32 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 0
%33 = call i64 @validate(i8* %31, i8* %32, i32 4)
%34 = icmp eq i64 %33, 0
%35 = zext i1 %34 to i32
%36 = call i32 @ok_at_loc(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 68, i32 %35, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32* null)
%37 = call i32 (...) @exit_status()
ret i32 %37
}

LLVM IR (-O2):
@__const.main.src1 = [6 x i8] c"\14\FB\9C\03\D9~"
@__const.main.src2 = [5 x i8] c"\14\FB\9C\03\D9"
@__const.main.dst1 = [9 x i8] c"FPucA9l+\00"
@__const.main.dst2 = [9 x i8] c"FPucA9k=\00"
@__const.main.dst3 = [9 x i8] c"FPucAw==\00"
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dun/munge/refs/heads/master/src/munged/base64_test.c\00"
@.str.1 = [26 x i8] c"Input data 0x14fb9c03d97e\00"
@.str.2 = [24 x i8] c"Input data 0x14fb9c03d9\00"
@.str.3 = [22 x i8] c"Input data 0x14fb9c03\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = alloca [5 x i8]
%5 = alloca i32
%6 = alloca [9 x i8]
%7 = alloca [9 x i8]
%8 = alloca [9 x i8]
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%11 = bitcast i32* %5 to i8*
store i32 60619540, i32* %5
%12 = getelementptr inbounds [9 x i8], [9 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [9 x i8], [9 x i8]* %7, i64 0, i64 0
%14 = getelementptr inbounds [9 x i8], [9 x i8]* %8, i64 0, i64 0
%15 = tail call i32 @tap_plan(i32 3, i32* null)
%16 = call i64 @validate(i8* %12, i8* %9, i32 6)
%17 = icmp eq i64 %16, 0
%18 = zext i1 %17 to i32
%19 = call i32 @ok_at_loc(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 62, i32 %18, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32* null)
%20 = call i64 @validate(i8* %13, i8* %10, i32 5)
%21 = icmp eq i64 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @ok_at_loc(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 65, i32 %22, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32* null)
%24 = call i64 @validate(i8* %14, i8* %11, i32 4)
%25 = icmp eq i64 %24, 0
%26 = zext i1 %25 to i32
%27 = call i32 @ok_at_loc(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i32 68, i32 %26, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32* null)
%28 = call i32 (...) @exit_status()
ret i32 %28
}