#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 */
struct stat {
  int st_size;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EVP_EncodeBlock(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(unsigned char *);
unsigned char *malloc(int);
scalar_t__ stat(char const *, struct stat *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ warnx(char *, ...);
char *read_passphrase_as_base64(const char *filename, bool verbose) {
  unsigned char *ret = NULL, *buf = NULL;
  int outlen, len;
  struct stat sb;
  FILE *fp;
  if (stat(filename, &sb) != 0) {
    do {
      if (verbose)
        warnx("stat on file '%s' failed: %s", filename, strerror(errno));
    } while (0);
    return NULL;
  }
  if (sb.st_size == 0) {
    do {
      if (verbose)
        warnx("File '%s' is empty", filename);
    } while (0);
    return NULL;
  }
  fp = fopen(filename, "r");
  if (fp == NULL) {
    do {
      if (verbose)
        warnx("Open of file '%s' failed: %s", filename, strerror(errno));
    } while (0);
    return NULL;
  }
  buf = malloc(sb.st_size);
  if (buf == NULL) {
    do {
      if (verbose)
        warnx("Malloc failed");
    } while (0);
    goto out;
  }
  if (fread(buf, sb.st_size, 1, fp) != 1) {
    do {
      if (verbose)
        warnx("Reading file '%s' failed: %s", filename, strerror(errno));
    } while (0);
    goto out;
  }
  outlen = (sb.st_size / 3) * 4;
  if (sb.st_size % 3 > 0)
    outlen += 4;
  ret = malloc(outlen + 1);
  if (ret == NULL) {
    do {
      if (verbose)
        warnx("Malloc failed");
    } while (0);
    goto out;
  }
  len = EVP_EncodeBlock(ret, buf, sb.st_size);
  if (len != outlen) {
    do {
      if (verbose)
        warnx("EVP_EncodeBlock failed");
    } while (0);
    free(ret);
    ret = NULL;
    goto out;
  }
  ret[outlen] = '\0';
out:
  free(buf);
  fclose(fp);
  return (char *)ret;
}


x86 assembly (clang, -O0):
<read_passphrase_as_base64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1070 <stat@plt>
cmp    $0x0,%rax
je     1211 <read_passphrase_as_base64+0x81>
jmp    11cb <read_passphrase_as_base64+0x3b>
cmpl   $0x0,-0x14(%rbp)
je     11ff <read_passphrase_as_base64+0x6f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    0x2dfc(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x48(%rbp),%rsi
mov    %eax,%edx
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1060 <warnx@plt>
jmp    1204 <read_passphrase_as_base64+0x74>
movq   $0x0,-0x8(%rbp)
jmp    1443 <read_passphrase_as_base64+0x2b3>
cmpl   $0x0,-0x38(%rbp)
jne    124e <read_passphrase_as_base64+0xbe>
jmp    1220 <read_passphrase_as_base64+0x90>
cmpl   $0x0,-0x14(%rbp)
je     123c <read_passphrase_as_base64+0xac>
mov    -0x10(%rbp),%rsi
lea    0xde8(%rip),%rdi
mov    $0x0,%al
call   1060 <warnx@plt>
jmp    1241 <read_passphrase_as_base64+0xb1>
movq   $0x0,-0x8(%rbp)
jmp    1443 <read_passphrase_as_base64+0x2b3>
mov    -0x10(%rbp),%rdi
lea    0xdd7(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    12b8 <read_passphrase_as_base64+0x128>
jmp    1272 <read_passphrase_as_base64+0xe2>
cmpl   $0x0,-0x14(%rbp)
je     12a6 <read_passphrase_as_base64+0x116>
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    0x2d55(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x50(%rbp),%rsi
mov    %eax,%edx
lea    0xd93(%rip),%rdi
mov    $0x0,%al
call   1060 <warnx@plt>
jmp    12ab <read_passphrase_as_base64+0x11b>
movq   $0x0,-0x8(%rbp)
jmp    1443 <read_passphrase_as_base64+0x2b3>
mov    -0x38(%rbp),%edi
call   1080 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    12f6 <read_passphrase_as_base64+0x166>
jmp    12d4 <read_passphrase_as_base64+0x144>
cmpl   $0x0,-0x14(%rbp)
je     12ec <read_passphrase_as_base64+0x15c>
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1060 <warnx@plt>
jmp    12f1 <read_passphrase_as_base64+0x161>
jmp    1429 <read_passphrase_as_base64+0x299>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x40(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fread@plt>
cmp    $0x1,%eax
je     1357 <read_passphrase_as_base64+0x1c7>
jmp    1319 <read_passphrase_as_base64+0x189>
cmpl   $0x0,-0x14(%rbp)
je     134d <read_passphrase_as_base64+0x1bd>
mov    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    0x2cae(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x58(%rbp),%rsi
mov    %eax,%edx
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1060 <warnx@plt>
jmp    1352 <read_passphrase_as_base64+0x1c2>
jmp    1429 <read_passphrase_as_base64+0x299>
mov    -0x38(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
shl    $0x2,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jle    1385 <read_passphrase_as_base64+0x1f5>
mov    -0x2c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
add    $0x1,%edi
call   1080 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    13c6 <read_passphrase_as_base64+0x236>
jmp    13a4 <read_passphrase_as_base64+0x214>
cmpl   $0x0,-0x14(%rbp)
je     13bc <read_passphrase_as_base64+0x22c>
lea    0xc9a(%rip),%rdi
mov    $0x0,%al
call   1060 <warnx@plt>
jmp    13c1 <read_passphrase_as_base64+0x231>
jmp    1429 <read_passphrase_as_base64+0x299>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x38(%rbp),%edx
call   10a0 <EVP_EncodeBlock@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     141d <read_passphrase_as_base64+0x28d>
jmp    13ea <read_passphrase_as_base64+0x25a>
cmpl   $0x0,-0x14(%rbp)
je     1402 <read_passphrase_as_base64+0x272>
lea    0xc7f(%rip),%rdi
mov    $0x0,%al
call   1060 <warnx@plt>
jmp    1407 <read_passphrase_as_base64+0x277>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x20(%rbp)
jmp    1429 <read_passphrase_as_base64+0x299>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_passphrase_as_base64>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rsp,%rsi
call   1070 <stat@plt>
test   %rax,%rax
je     11de <read_passphrase_as_base64+0x4e>
test   %ebp,%ebp
je     12d4 <read_passphrase_as_base64+0x144>
mov    0x2e24(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xe36(%rip),%rdi
xor    %r12d,%r12d
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <warnx@plt>
jmp    1347 <read_passphrase_as_base64+0x1b7>
cmpl   $0x0,(%rsp)
je     1299 <read_passphrase_as_base64+0x109>
lea    0xe41(%rip),%rsi
mov    %rbx,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     12b6 <read_passphrase_as_base64+0x126>
mov    %rax,%r15
mov    (%rsp),%r12d
mov    %r12d,%edi
call   1080 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     12d9 <read_passphrase_as_base64+0x149>
mov    %r14,%rdi
mov    %r12d,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
cmp    $0x1,%eax
jne    12f0 <read_passphrase_as_base64+0x160>
movslq (%rsp),%r13
imul   $0x55555556,%r13,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%ecx
lea    0x4(,%rax,4),%ebx
shl    $0x2,%eax
mov    %r13d,%edx
sub    %ecx,%edx
test   %edx,%edx
cmovle %eax,%ebx
lea    0x1(%rbx),%edi
call   1080 <malloc@plt>
test   %rax,%rax
je     12d9 <read_passphrase_as_base64+0x149>
mov    %rax,%r12
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
call   10a0 <EVP_EncodeBlock@plt>
cmp    %ebx,%eax
jne    131a <read_passphrase_as_base64+0x18a>
movslq %ebx,%rax
movb   $0x0,(%r12,%rax,1)
jmp    1337 <read_passphrase_as_base64+0x1a7>
test   %ebp,%ebp
je     12d4 <read_passphrase_as_base64+0x144>
lea    0xd79(%rip),%rdi
xor    %r12d,%r12d
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <warnx@plt>
jmp    1347 <read_passphrase_as_base64+0x1b7>
test   %ebp,%ebp
je     12d4 <read_passphrase_as_base64+0x144>
mov    0x2d1f(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xd63(%rip),%rdi
jmp    11ca <read_passphrase_as_base64+0x3a>
xor    %r12d,%r12d
jmp    1347 <read_passphrase_as_base64+0x1b7>
test   %ebp,%ebp
je     1334 <read_passphrase_as_base64+0x1a4>
lea    0xd6b(%rip),%rdi
xor    %r12d,%r12d
xor    %eax,%eax
call   1060 <warnx@plt>
jmp    1337 <read_passphrase_as_base64+0x1a7>
test   %ebp,%ebp
je     1334 <read_passphrase_as_base64+0x1a4>
mov    0x2ce5(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xd54(%rip),%rdi
xor    %r12d,%r12d
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <warnx@plt>
jmp    1337 <read_passphrase_as_base64+0x1a7>
test   %ebp,%ebp
je     132c <read_passphrase_as_base64+0x19c>
lea    0xd55(%rip),%rdi
xor    %eax,%eax
call   1060 <warnx@plt>
mov    %r12,%rdi
call   1030 <free@plt>
xor    %r12d,%r12d
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [29 x i8] c"stat on file '%s' failed: %s\00"
@errno = global i32 0
@.str.1 = [19 x i8] c"File '%s' is empty\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [29 x i8] c"Open of file '%s' failed: %s\00"
@.str.4 = [14 x i8] c"Malloc failed\00"
@.str.5 = [29 x i8] c"Reading file '%s' failed: %s\00"
@.str.6 = [23 x i8] c"EVP_EncodeBlock failed\00"
define i8* @read_passphrase_as_base64(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.stat
%11 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* null, i8** %6
store i8* null, i8** %7
%12 = load i8*, i8** %4
%13 = call i64 @stat(i8* %12, %struct.stat* %10)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %26
15: ; preds = %2
br label %16
16: ; preds = %15
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i8*, i8** %4
%21 = load i32, i32* @errno
%22 = call i32 @strerror(i32 %21)
%23 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %20, i32 %22)
br label %24
24: ; preds = %19, %16
br label %25
25: ; preds = %24
store i8* null, i8** %3
br label %143
26: ; preds = %2
%27 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%28 = load i32, i32* %27
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %39
30: ; preds = %26
br label %31
31: ; preds = %30
%32 = load i32, i32* %5
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load i8*, i8** %4
%36 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %35)
br label %37
37: ; preds = %34, %31
br label %38
38: ; preds = %37
store i8* null, i8** %3
br label %143
39: ; preds = %26
%40 = load i8*, i8** %4
%41 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %41, i32** %11
%42 = load i32*, i32** %11
%43 = icmp eq i32* %42, null
br i1 %43, label %44, label %55
44: ; preds = %39
br label %45
45: ; preds = %44
%46 = load i32, i32* %5
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %53
48: ; preds = %45
%49 = load i8*, i8** %4
%50 = load i32, i32* @errno
%51 = call i32 @strerror(i32 %50)
%52 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i8* %49, i32 %51)
br label %53
53: ; preds = %48, %45
br label %54
54: ; preds = %53
store i8* null, i8** %3
br label %143
55: ; preds = %39
%56 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%57 = load i32, i32* %56
%58 = call i8* @malloc(i32 %57)
store i8* %58, i8** %7
%59 = load i8*, i8** %7
%60 = icmp eq i8* %59, null
br i1 %60, label %61, label %69
61: ; preds = %55
br label %62
62: ; preds = %61
%63 = load i32, i32* %5
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %67
67: ; preds = %65, %62
br label %68
68: ; preds = %67
br label %137
69: ; preds = %55
%70 = load i8*, i8** %7
%71 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%72 = load i32, i32* %71
%73 = load i32*, i32** %11
%74 = call i32 @fread(i8* %70, i32 %72, i32 1, i32* %73)
%75 = icmp ne i32 %74, 1
br i1 %75, label %76, label %87
76: ; preds = %69
br label %77
77: ; preds = %76
%78 = load i32, i32* %5
%79 = icmp ne i32 %78, 0
br i1 %79, label %80, label %85
80: ; preds = %77
%81 = load i8*, i8** %4
%82 = load i32, i32* @errno
%83 = call i32 @strerror(i32 %82)
%84 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* %81, i32 %83)
br label %85
85: ; preds = %80, %77
br label %86
86: ; preds = %85
br label %137
87: ; preds = %69
%88 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%89 = load i32, i32* %88
%90 = sdiv i32 %89, 3
%91 = mul nsw i32 %90, 4
store i32 %91, i32* %8
%92 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%93 = load i32, i32* %92
%94 = srem i32 %93, 3
%95 = icmp sgt i32 %94, 0
br i1 %95, label %96, label %99
96: ; preds = %87
%97 = load i32, i32* %8
%98 = add nsw i32 %97, 4
store i32 %98, i32* %8
br label %99
99: ; preds = %96, %87
%100 = load i32, i32* %8
%101 = add nsw i32 %100, 1
%102 = call i8* @malloc(i32 %101)
store i8* %102, i8** %6
%103 = load i8*, i8** %6
%104 = icmp eq i8* %103, null
br i1 %104, label %105, label %113
105: ; preds = %99
br label %106
106: ; preds = %105
%107 = load i32, i32* %5
%108 = icmp ne i32 %107, 0
br i1 %108, label %109, label %111
109: ; preds = %106
%110 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %111
111: ; preds = %109, %106
br label %112
112: ; preds = %111
br label %137
113: ; preds = %99
%114 = load i8*, i8** %6
%115 = load i8*, i8** %7
%116 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 0
%117 = load i32, i32* %116
%118 = call i32 @EVP_EncodeBlock(i8* %114, i8* %115, i32 %117)
store i32 %118, i32* %9
%119 = load i32, i32* %9
%120 = load i32, i32* %8
%121 = icmp ne i32 %119, %120
br i1 %121, label %122, label %132
122: ; preds = %113
br label %123
123: ; preds = %122
%124 = load i32, i32* %5
%125 = icmp ne i32 %124, 0
br i1 %125, label %126, label %128
126: ; preds = %123
%127 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %128
128: ; preds = %126, %123
br label %129
129: ; preds = %128
%130 = load i8*, i8** %6
%131 = call i32 @free(i8* %130)
store i8* null, i8** %6
br label %137
132: ; preds = %113
%133 = load i8*, i8** %6
%134 = load i32, i32* %8
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i8, i8* %133, i64 %135
store i8 0, i8* %136
br label %137
137: ; preds = %132, %129, %112, %86, %68
%138 = load i8*, i8** %7
%139 = call i32 @free(i8* %138)
%140 = load i32*, i32** %11
%141 = call i32 @fclose(i32* %140)
%142 = load i8*, i8** %6
store i8* %142, i8** %3
br label %143
143: ; preds = %137, %54, %38, %25
%144 = load i8*, i8** %3
ret i8* %144
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [29 x i8] c"stat on file '%s' failed: %s\00"
@errno = global i32 0
@.str.1 = [19 x i8] c"File '%s' is empty\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [29 x i8] c"Open of file '%s' failed: %s\00"
@.str.4 = [14 x i8] c"Malloc failed\00"
@.str.5 = [29 x i8] c"Reading file '%s' failed: %s\00"
@.str.6 = [23 x i8] c"EVP_EncodeBlock failed\00"
define i8* @read_passphrase_as_base64(i8* %0, i32 %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = call i64 @stat(i8* %0, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = icmp eq i32 %1, 0
br i1 %8, label %78, label %9
9: ; preds = %7
%10 = load i32, i32* @errno
%11 = call i32 @strerror(i32 %10)
%12 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %11)
br label %78
13: ; preds = %2
%14 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %13
%18 = icmp eq i32 %1, 0
br i1 %18, label %78, label %19
19: ; preds = %17
%20 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %78
21: ; preds = %13
%22 = call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %30
24: ; preds = %21
%25 = icmp eq i32 %1, 0
br i1 %25, label %78, label %26
26: ; preds = %24
%27 = load i32, i32* @errno
%28 = call i32 @strerror(i32 %27)
%29 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i8* %0, i32 %28)
br label %78
30: ; preds = %21
%31 = load i32, i32* %14
%32 = call i8* @malloc(i32 %31)
%33 = icmp eq i8* %32, null
br i1 %33, label %34, label %38
34: ; preds = %30
%35 = icmp eq i32 %1, 0
br i1 %35, label %74, label %36
36: ; preds = %34
%37 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %74
38: ; preds = %30
%39 = call i32 @fread(i8* %32, i32 %31, i32 1, i32* %22)
%40 = icmp eq i32 %39, 1
br i1 %40, label %47, label %41
41: ; preds = %38
%42 = icmp eq i32 %1, 0
br i1 %42, label %74, label %43
43: ; preds = %41
%44 = load i32, i32* @errno
%45 = call i32 @strerror(i32 %44)
%46 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8* %0, i32 %45)
br label %74
47: ; preds = %38
%48 = load i32, i32* %14
%49 = sdiv i32 %48, 3
%50 = shl nsw i32 %49, 2
%51 = srem i32 %48, 3
%52 = icmp sgt i32 %51, 0
%53 = add nsw i32 %50, 4
%54 = select i1 %52, i32 %53, i32 %50
%55 = or i32 %54, 1
%56 = call i8* @malloc(i32 %55)
%57 = icmp eq i8* %56, null
br i1 %57, label %58, label %62
58: ; preds = %47
%59 = icmp eq i32 %1, 0
br i1 %59, label %74, label %60
60: ; preds = %58
%61 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %74
62: ; preds = %47
%63 = call i32 @EVP_EncodeBlock(i8* %56, i8* %32, i32 %48)
%64 = icmp eq i32 %63, %54
br i1 %64, label %71, label %65
65: ; preds = %62
%66 = icmp eq i32 %1, 0
br i1 %66, label %69, label %67
67: ; preds = %65
%68 = call i32 (i8*, ...) @warnx(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
br label %69
69: ; preds = %67, %65
%70 = call i32 @free(i8* %56)
br label %74
71: ; preds = %62
%72 = sext i32 %54 to i64
%73 = getelementptr inbounds i8, i8* %56, i64 %72
store i8 0, i8* %73
br label %74
74: ; preds = %58, %60, %41, %43, %34, %36, %71, %69
%75 = phi i8* [ null, %36 ], [ null, %34 ], [ null, %43 ], [ null, %41 ], [ null, %60 ], [ null, %58 ], [ null, %69 ], [ %56, %71 ]
%76 = call i32 @free(i8* %32)
%77 = call i32 @fclose(i32* %22)
br label %78
78: ; preds = %24, %26, %17, %19, %7, %9, %74
%79 = phi i8* [ %75, %74 ], [ null, %9 ], [ null, %7 ], [ null, %19 ], [ null, %17 ], [ null, %26 ], [ null, %24 ]
ret i8* %79
}