char *b64_message(int errcode) {
  char *msgs[6] = {"b64:000:Invalid Message Code.",
                   "b64:001:Syntax Error -- check help for usage.",
                   "b64:002:File Error Opening/Creating Files.",
                   "b64:003:File I/O Error -- Note: output file not removed.",
                   "b64:004:Error on output file close.",
                   "b64:004:linesize set to minimum."};
  char *msg = msgs[0];
  if (errcode > 0 && errcode < 6) {
    msg = msgs[errcode];
  }
  return (msg);
}


x86 assembly (clang, -O0):
<b64_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
lea    0xece(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xee1(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xf04(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xf24(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xf52(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xf6b(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1196 <b64_message+0x86>
cmpl   $0x6,-0x4(%rbp)
jge    1196 <b64_message+0x86>
movslq -0x4(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b64_message>:
lea    0xef9(%rip),%rax
mov    %rax,-0x38(%rsp)
lea    0xf0b(%rip),%rcx
mov    %rcx,-0x30(%rsp)
lea    0xf2d(%rip),%rcx
mov    %rcx,-0x28(%rsp)
lea    0xf4c(%rip),%rcx
mov    %rcx,-0x20(%rsp)
lea    0xf79(%rip),%rcx
mov    %rcx,-0x18(%rsp)
lea    0xf91(%rip),%rcx
mov    %rcx,-0x10(%rsp)
lea    -0x1(%rdi),%ecx
cmp    $0x4,%ecx
ja     1157 <b64_message+0x57>
mov    %edi,%eax
mov    -0x38(%rsp,%rax,8),%rax
ret

LLVM IR (-O0):
@.str = [30 x i8] c"b64:000:Invalid Message Code.\00"
@.str.1 = [46 x i8] c"b64:001:Syntax Error -- check help for usage.\00"
@.str.2 = [43 x i8] c"b64:002:File Error Opening/Creating Files.\00"
@.str.3 = [57 x i8] c"b64:003:File I/O Error -- Note: output file not removed.\00"
@.str.4 = [36 x i8] c"b64:004:Error on output file close.\00"
@.str.5 = [33 x i8] c"b64:004:linesize set to minimum.\00"
define i8* @b64_message(i32 %0) {
%2 = alloca i32
%3 = alloca [6 x i8*]
%4 = alloca i8*
store i32 %0, i32* %2
%5 = bitcast [6 x i8*]* %3 to i8*
%6 = bitcast i8* %5 to [6 x i8*]*
%7 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i32 0, i32 0
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i32 0, i32 0), i8** %7
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i32 0, i32 1
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i32 0, i32 2
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i32 0, i32 0), i8** %9
%10 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i32 0, i32 3
store i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i32 0, i32 0), i8** %10
%11 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i32 0, i32 4
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i32 0, i32 0), i8** %11
%12 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i32 0, i32 5
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i32 0, i32 0), i8** %12
%13 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 0
%14 = load i8*, i8** %13
store i8* %14, i8** %4
%15 = load i32, i32* %2
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %1
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 6
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %2
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 %22
%24 = load i8*, i8** %23
store i8* %24, i8** %4
br label %25
25: ; preds = %20, %17, %1
%26 = load i8*, i8** %4
ret i8* %26
}

LLVM IR (-O2):
@.str = [30 x i8] c"b64:000:Invalid Message Code.\00"
@.str.1 = [46 x i8] c"b64:001:Syntax Error -- check help for usage.\00"
@.str.2 = [43 x i8] c"b64:002:File Error Opening/Creating Files.\00"
@.str.3 = [57 x i8] c"b64:003:File I/O Error -- Note: output file not removed.\00"
@.str.4 = [36 x i8] c"b64:004:Error on output file close.\00"
@.str.5 = [33 x i8] c"b64:004:linesize set to minimum.\00"
define i8* @b64_message(i32 %0) {
%2 = alloca [6 x i8*]
%3 = bitcast [6 x i8*]* %2 to i8*
%4 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 2
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 3
store i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 4
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 5
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8** %9
%10 = add i32 %0, -1
%11 = icmp ult i32 %10, 5
br i1 %11, label %12, label %16
12: ; preds = %1
%13 = zext i32 %0 to i64
%14 = getelementptr inbounds [6 x i8*], [6 x i8*]* %2, i64 0, i64 %13
%15 = load i8*, i8** %14
br label %16
16: ; preds = %12, %1
%17 = phi i8* [ %15, %12 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %17
}