#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*/ buf;

/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ snprintf(char *, int, char *, int);
char const *strerror(int /*<<< orphan*/);
const char *ssh_err(int n) {
  switch (n) {
  case 0:
    return "success";
  case -1:
    return "unexpected internal error";
  case -2:
    return "memory allocation failed";
  case -3:
    return "incomplete message";
  case -4:
    return "invalid format";
  case -5:
    return "bignum is negative";
  case -6:
    return "string is too large";
  case -7:
    return "bignum is too large";
  case -8:
    return "elliptic curve point is too large";
  case -9:
    return "insufficient buffer space";
  case -10:
    return "invalid argument";
  case -11:
    return "key bits do not match";
  case -12:
    return "invalid elliptic curve";
  case -13:
    return "key type does not match";
  case -14:
    return "unknown or unsupported key type";
  case -15:
    return "elliptic curve does not match";
  case -16:
    return "plain key provided where certificate required";
  case -17:
    return "key lacks certificate data";
  case -18:
    return "unknown/unsupported certificate type";
  case -19:
    return "invalid certificate signing key";
  case -20:
    return "invalid elliptic curve value";
  case -21:
    return "incorrect signature";
  case -22:
    return "error in libcrypto";
  case -23:
    return "unexpected bytes remain after decoding";
  case -24:
    return strerror(errno);
  case -25:
    return "invalid certificate";
  case -26:
    return "communication with agent failed";
  case -27:
    return "agent refused operation";
  case -28:
    return "DH GEX group out of range";
  case -29:
    return "disconnected";
  case -30:
    return "message authentication code incorrect";
  case -31:
    return "no matching cipher found";
  case -32:
    return "no matching MAC found";
  case -33:
    return "no matching compression method found";
  case -34:
    return "no matching key exchange method found";
  case -35:
    return "no matching host key type found";
  case -37:
    return "protocol version mismatch";
  case -38:
    return "could not read protocol version";
  case -36:
    return "could not load host key";
  case -39:
    return "rekeying not supported by peer";
  case -40:
    return "passphrase is too short (minimum four characters)";
  case -41:
    return "file changed while reading";
  case -42:
    return "key encrypted using unsupported cipher";
  case -43:
    return "incorrect passphrase supplied to decrypt private key";
  case -44:
    return "bad permissions";
  case -45:
    return "certificate does not match key";
  case -46:
    return "key not found";
  case -47:
    return "agent not present";
  case -48:
    return "agent contains no identities";
  case -49:
    return "internal error: buffer is read-only";
  case -50:
    return "KRL file has invalid magic number";
  case -51:
    return "Key is revoked";
  case -52:
    return "Connection closed";
  case -53:
    return "Connection timed out";
  case -54:
    return "Connection corrupted";
  case -55:
    return "Protocol error";
  default: {
    static char buf[1024];
    snprintf(buf, sizeof(buf), "unknown error %d", n);
    return buf;
  }
  }
}


x86 assembly (clang, -O0):
<ssh_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x37,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x37,%eax
ja     14db <ssh_err+0x3bb>
mov    -0x18(%rbp),%rax
lea    0xeb5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf85(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xf7d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xf87(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xf90(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xf93(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xf92(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xf95(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xf99(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xf9d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xfaf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xfb9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xfba(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xfc0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xfc7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xfcf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xfdf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0xfed(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x100b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1016(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x102b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x103b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1048(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x104c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x104f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
mov    0x2d05(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x104f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1053(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1063(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x106b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1075(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1072(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1088(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1091(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1097(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x10ac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x10c2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x10d2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x10dc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x10ec(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x10f4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1103(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1125(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1130(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1147(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x116c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x116c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x117b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1179(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x117b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x1188(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x119c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x11ae(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x11ad(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x11af(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x11b4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
lea    0x11b9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1501 <ssh_err+0x3e1>
mov    -0xc(%rbp),%ecx
lea    0x2b6b(%rip),%rdi
mov    $0x400,%esi
lea    0x11a9(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2b53(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssh_err>:
push   %rbx
mov    %edi,%ecx
lea    0x37(%rcx),%eax
cmp    $0x37,%eax
ja     114e <ssh_err+0x2e>
lea    0xfae(%rip),%rbx
lea    0xec7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1542(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x2efb(%rip),%rbx
lea    0x153e(%rip),%rdx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1030 <snprintf@plt>
jmp    13ca <ssh_err+0x2aa>
lea    0x1501(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x14e0(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x14c2(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x14a7(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1479(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1449(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1420(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1402(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x13e8(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x13bd(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x13a1(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1360(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x132d(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1306(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x12c8(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x129d(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1259(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1233(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1261(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x11fb(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x11c9(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1198(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1176(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1151(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x111f(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1106(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x10e0(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x10bc(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1090(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x1070(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
mov    0x2d03(%rip),%rax
mov    (%rax),%edi
pop    %rbx
jmp    1040 <strerror@plt>
lea    0x102e(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0x100f(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xfef(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xfc6(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xf9a(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xf69(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xf42(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xf08(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xede(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xeb5(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xe94(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xe74(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xe55(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xe3b(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xe18(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xded(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xdd0(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xdb3(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xd97(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xd7f(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xd63(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xd41(%rip),%rbx
jmp    13ca <ssh_err+0x2aa>
lea    0xd1e(%rip),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"success\00"
@.str.1 = [26 x i8] c"unexpected internal error\00"
@.str.2 = [25 x i8] c"memory allocation failed\00"
@.str.3 = [19 x i8] c"incomplete message\00"
@.str.4 = [15 x i8] c"invalid format\00"
@.str.5 = [19 x i8] c"bignum is negative\00"
@.str.6 = [20 x i8] c"string is too large\00"
@.str.7 = [20 x i8] c"bignum is too large\00"
@.str.8 = [34 x i8] c"elliptic curve point is too large\00"
@.str.9 = [26 x i8] c"insufficient buffer space\00"
@.str.10 = [17 x i8] c"invalid argument\00"
@.str.11 = [22 x i8] c"key bits do not match\00"
@.str.12 = [23 x i8] c"invalid elliptic curve\00"
@.str.13 = [24 x i8] c"key type does not match\00"
@.str.14 = [32 x i8] c"unknown or unsupported key type\00"
@.str.15 = [30 x i8] c"elliptic curve does not match\00"
@.str.16 = [46 x i8] c"plain key provided where certificate required\00"
@.str.17 = [27 x i8] c"key lacks certificate data\00"
@.str.18 = [37 x i8] c"unknown/unsupported certificate type\00"
@.str.19 = [32 x i8] c"invalid certificate signing key\00"
@.str.20 = [29 x i8] c"invalid elliptic curve value\00"
@.str.21 = [20 x i8] c"incorrect signature\00"
@.str.22 = [19 x i8] c"error in libcrypto\00"
@.str.23 = [39 x i8] c"unexpected bytes remain after decoding\00"
@errno = global i32 0
@.str.24 = [20 x i8] c"invalid certificate\00"
@.str.25 = [32 x i8] c"communication with agent failed\00"
@.str.26 = [24 x i8] c"agent refused operation\00"
@.str.27 = [26 x i8] c"DH GEX group out of range\00"
@.str.28 = [13 x i8] c"disconnected\00"
@.str.29 = [38 x i8] c"message authentication code incorrect\00"
@.str.30 = [25 x i8] c"no matching cipher found\00"
@.str.31 = [22 x i8] c"no matching MAC found\00"
@.str.32 = [37 x i8] c"no matching compression method found\00"
@.str.33 = [38 x i8] c"no matching key exchange method found\00"
@.str.34 = [32 x i8] c"no matching host key type found\00"
@.str.35 = [26 x i8] c"protocol version mismatch\00"
@.str.36 = [32 x i8] c"could not read protocol version\00"
@.str.37 = [24 x i8] c"could not load host key\00"
@.str.38 = [31 x i8] c"rekeying not supported by peer\00"
@.str.39 = [50 x i8] c"passphrase is too short (minimum four characters)\00"
@.str.40 = [27 x i8] c"file changed while reading\00"
@.str.41 = [39 x i8] c"key encrypted using unsupported cipher\00"
@.str.42 = [53 x i8] c"incorrect passphrase supplied to decrypt private key\00"
@.str.43 = [16 x i8] c"bad permissions\00"
@.str.44 = [31 x i8] c"certificate does not match key\00"
@.str.45 = [14 x i8] c"key not found\00"
@.str.46 = [18 x i8] c"agent not present\00"
@.str.47 = [29 x i8] c"agent contains no identities\00"
@.str.48 = [36 x i8] c"internal error: buffer is read-only\00"
@.str.49 = [34 x i8] c"KRL file has invalid magic number\00"
@.str.50 = [15 x i8] c"Key is revoked\00"
@.str.51 = [18 x i8] c"Connection closed\00"
@.str.52 = [21 x i8] c"Connection timed out\00"
@.str.53 = [21 x i8] c"Connection corrupted\00"
@.str.54 = [15 x i8] c"Protocol error\00"
@ssh_err.buf = internal global [1024 x i8] zeroinitializer
@.str.55 = [17 x i8] c"unknown error %d\00"
define i8* @ssh_err(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %63 [
i32 0, label %5
i32 -1, label %6
i32 -2, label %7
i32 -3, label %8
i32 -4, label %9
i32 -5, label %10
i32 -6, label %11
i32 -7, label %12
i32 -8, label %13
i32 -9, label %14
i32 -10, label %15
i32 -11, label %16
i32 -12, label %17
i32 -13, label %18
i32 -14, label %19
i32 -15, label %20
i32 -16, label %21
i32 -17, label %22
i32 -18, label %23
i32 -19, label %24
i32 -20, label %25
i32 -21, label %26
i32 -22, label %27
i32 -23, label %28
i32 -24, label %29
i32 -25, label %32
i32 -26, label %33
i32 -27, label %34
i32 -28, label %35
i32 -29, label %36
i32 -30, label %37
i32 -31, label %38
i32 -32, label %39
i32 -33, label %40
i32 -34, label %41
i32 -35, label %42
i32 -37, label %43
i32 -38, label %44
i32 -36, label %45
i32 -39, label %46
i32 -40, label %47
i32 -41, label %48
i32 -42, label %49
i32 -43, label %50
i32 -44, label %51
i32 -45, label %52
i32 -46, label %53
i32 -47, label %54
i32 -48, label %55
i32 -49, label %56
i32 -50, label %57
i32 -51, label %58
i32 -52, label %59
i32 -53, label %60
i32 -54, label %61
i32 -55, label %62
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %66
6: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %66
7: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %66
8: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %66
9: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %66
10: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %66
11: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %66
12: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %66
13: ; preds = %1
store i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %66
14: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %66
15: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %66
16: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %66
17: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %66
18: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %66
19: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %66
20: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %66
21: ; preds = %1
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %66
22: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %66
23: ; preds = %1
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %66
24: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %66
25: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %66
26: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %66
27: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %66
28: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %66
29: ; preds = %1
%30 = load i32, i32* @errno
%31 = call i8* @strerror(i32 %30)
store i8* %31, i8** %2
br label %66
32: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.24, i64 0, i64 0), i8** %2
br label %66
33: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.25, i64 0, i64 0), i8** %2
br label %66
34: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.26, i64 0, i64 0), i8** %2
br label %66
35: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0), i8** %2
br label %66
36: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.28, i64 0, i64 0), i8** %2
br label %66
37: ; preds = %1
store i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.29, i64 0, i64 0), i8** %2
br label %66
38: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0), i8** %2
br label %66
39: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.31, i64 0, i64 0), i8** %2
br label %66
40: ; preds = %1
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.32, i64 0, i64 0), i8** %2
br label %66
41: ; preds = %1
store i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.33, i64 0, i64 0), i8** %2
br label %66
42: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.34, i64 0, i64 0), i8** %2
br label %66
43: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.35, i64 0, i64 0), i8** %2
br label %66
44: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.36, i64 0, i64 0), i8** %2
br label %66
45: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.37, i64 0, i64 0), i8** %2
br label %66
46: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.38, i64 0, i64 0), i8** %2
br label %66
47: ; preds = %1
store i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.39, i64 0, i64 0), i8** %2
br label %66
48: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.40, i64 0, i64 0), i8** %2
br label %66
49: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.41, i64 0, i64 0), i8** %2
br label %66
50: ; preds = %1
store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.42, i64 0, i64 0), i8** %2
br label %66
51: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.43, i64 0, i64 0), i8** %2
br label %66
52: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.44, i64 0, i64 0), i8** %2
br label %66
53: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.45, i64 0, i64 0), i8** %2
br label %66
54: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.46, i64 0, i64 0), i8** %2
br label %66
55: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.47, i64 0, i64 0), i8** %2
br label %66
56: ; preds = %1
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.48, i64 0, i64 0), i8** %2
br label %66
57: ; preds = %1
store i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.49, i64 0, i64 0), i8** %2
br label %66
58: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.50, i64 0, i64 0), i8** %2
br label %66
59: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.51, i64 0, i64 0), i8** %2
br label %66
60: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.52, i64 0, i64 0), i8** %2
br label %66
61: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.53, i64 0, i64 0), i8** %2
br label %66
62: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.54, i64 0, i64 0), i8** %2
br label %66
63: ; preds = %1
%64 = load i32, i32* %3
%65 = call i32 @snprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @ssh_err.buf, i64 0, i64 0), i32 1024, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.55, i64 0, i64 0), i32 %64)
store i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @ssh_err.buf, i64 0, i64 0), i8** %2
br label %66
66: ; preds = %63, %62, %61, %60, %59, %58, %57, %56, %55, %54, %53, %52, %51, %50, %49, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%67 = load i8*, i8** %2
ret i8* %67
}

LLVM IR (-O2):
@.str = [8 x i8] c"success\00"
@.str.1 = [26 x i8] c"unexpected internal error\00"
@.str.2 = [25 x i8] c"memory allocation failed\00"
@.str.3 = [19 x i8] c"incomplete message\00"
@.str.4 = [15 x i8] c"invalid format\00"
@.str.5 = [19 x i8] c"bignum is negative\00"
@.str.6 = [20 x i8] c"string is too large\00"
@.str.7 = [20 x i8] c"bignum is too large\00"
@.str.8 = [34 x i8] c"elliptic curve point is too large\00"
@.str.9 = [26 x i8] c"insufficient buffer space\00"
@.str.10 = [17 x i8] c"invalid argument\00"
@.str.11 = [22 x i8] c"key bits do not match\00"
@.str.12 = [23 x i8] c"invalid elliptic curve\00"
@.str.13 = [24 x i8] c"key type does not match\00"
@.str.14 = [32 x i8] c"unknown or unsupported key type\00"
@.str.15 = [30 x i8] c"elliptic curve does not match\00"
@.str.16 = [46 x i8] c"plain key provided where certificate required\00"
@.str.17 = [27 x i8] c"key lacks certificate data\00"
@.str.18 = [37 x i8] c"unknown/unsupported certificate type\00"
@.str.19 = [32 x i8] c"invalid certificate signing key\00"
@.str.20 = [29 x i8] c"invalid elliptic curve value\00"
@.str.21 = [20 x i8] c"incorrect signature\00"
@.str.22 = [19 x i8] c"error in libcrypto\00"
@.str.23 = [39 x i8] c"unexpected bytes remain after decoding\00"
@errno = global i32 0
@.str.24 = [20 x i8] c"invalid certificate\00"
@.str.25 = [32 x i8] c"communication with agent failed\00"
@.str.26 = [24 x i8] c"agent refused operation\00"
@.str.27 = [26 x i8] c"DH GEX group out of range\00"
@.str.28 = [13 x i8] c"disconnected\00"
@.str.29 = [38 x i8] c"message authentication code incorrect\00"
@.str.30 = [25 x i8] c"no matching cipher found\00"
@.str.31 = [22 x i8] c"no matching MAC found\00"
@.str.32 = [37 x i8] c"no matching compression method found\00"
@.str.33 = [38 x i8] c"no matching key exchange method found\00"
@.str.34 = [32 x i8] c"no matching host key type found\00"
@.str.35 = [26 x i8] c"protocol version mismatch\00"
@.str.36 = [32 x i8] c"could not read protocol version\00"
@.str.37 = [24 x i8] c"could not load host key\00"
@.str.38 = [31 x i8] c"rekeying not supported by peer\00"
@.str.39 = [50 x i8] c"passphrase is too short (minimum four characters)\00"
@.str.40 = [27 x i8] c"file changed while reading\00"
@.str.41 = [39 x i8] c"key encrypted using unsupported cipher\00"
@.str.42 = [53 x i8] c"incorrect passphrase supplied to decrypt private key\00"
@.str.43 = [16 x i8] c"bad permissions\00"
@.str.44 = [31 x i8] c"certificate does not match key\00"
@.str.45 = [14 x i8] c"key not found\00"
@.str.46 = [18 x i8] c"agent not present\00"
@.str.47 = [29 x i8] c"agent contains no identities\00"
@.str.48 = [36 x i8] c"internal error: buffer is read-only\00"
@.str.49 = [34 x i8] c"KRL file has invalid magic number\00"
@.str.50 = [15 x i8] c"Key is revoked\00"
@.str.51 = [18 x i8] c"Connection closed\00"
@.str.52 = [21 x i8] c"Connection timed out\00"
@.str.53 = [21 x i8] c"Connection corrupted\00"
@.str.54 = [15 x i8] c"Protocol error\00"
@ssh_err.buf = internal global [1024 x i8] zeroinitializer
@.str.55 = [17 x i8] c"unknown error %d\00"
define i8* @ssh_err(i32 %0) {
switch i32 %0, label %59 [
i32 0, label %61
i32 -1, label %2
i32 -2, label %3
i32 -3, label %4
i32 -4, label %5
i32 -5, label %6
i32 -6, label %7
i32 -7, label %8
i32 -8, label %9
i32 -9, label %10
i32 -10, label %11
i32 -11, label %12
i32 -12, label %13
i32 -13, label %14
i32 -14, label %15
i32 -15, label %16
i32 -16, label %17
i32 -17, label %18
i32 -18, label %19
i32 -19, label %20
i32 -20, label %21
i32 -21, label %22
i32 -22, label %23
i32 -23, label %24
i32 -24, label %25
i32 -25, label %28
i32 -26, label %29
i32 -27, label %30
i32 -28, label %31
i32 -29, label %32
i32 -30, label %33
i32 -31, label %34
i32 -32, label %35
i32 -33, label %36
i32 -34, label %37
i32 -35, label %38
i32 -37, label %39
i32 -38, label %40
i32 -36, label %41
i32 -39, label %42
i32 -40, label %43
i32 -41, label %44
i32 -42, label %45
i32 -43, label %46
i32 -44, label %47
i32 -45, label %48
i32 -46, label %49
i32 -47, label %50
i32 -48, label %51
i32 -49, label %52
i32 -50, label %53
i32 -51, label %54
i32 -52, label %55
i32 -53, label %56
i32 -54, label %57
i32 -55, label %58
]
2: ; preds = %1
br label %61
3: ; preds = %1
br label %61
4: ; preds = %1
br label %61
5: ; preds = %1
br label %61
6: ; preds = %1
br label %61
7: ; preds = %1
br label %61
8: ; preds = %1
br label %61
9: ; preds = %1
br label %61
10: ; preds = %1
br label %61
11: ; preds = %1
br label %61
12: ; preds = %1
br label %61
13: ; preds = %1
br label %61
14: ; preds = %1
br label %61
15: ; preds = %1
br label %61
16: ; preds = %1
br label %61
17: ; preds = %1
br label %61
18: ; preds = %1
br label %61
19: ; preds = %1
br label %61
20: ; preds = %1
br label %61
21: ; preds = %1
br label %61
22: ; preds = %1
br label %61
23: ; preds = %1
br label %61
24: ; preds = %1
br label %61
25: ; preds = %1
%26 = load i32, i32* @errno
%27 = tail call i8* @strerror(i32 %26)
br label %61
28: ; preds = %1
br label %61
29: ; preds = %1
br label %61
30: ; preds = %1
br label %61
31: ; preds = %1
br label %61
32: ; preds = %1
br label %61
33: ; preds = %1
br label %61
34: ; preds = %1
br label %61
35: ; preds = %1
br label %61
36: ; preds = %1
br label %61
37: ; preds = %1
br label %61
38: ; preds = %1
br label %61
39: ; preds = %1
br label %61
40: ; preds = %1
br label %61
41: ; preds = %1
br label %61
42: ; preds = %1
br label %61
43: ; preds = %1
br label %61
44: ; preds = %1
br label %61
45: ; preds = %1
br label %61
46: ; preds = %1
br label %61
47: ; preds = %1
br label %61
48: ; preds = %1
br label %61
49: ; preds = %1
br label %61
50: ; preds = %1
br label %61
51: ; preds = %1
br label %61
52: ; preds = %1
br label %61
53: ; preds = %1
br label %61
54: ; preds = %1
br label %61
55: ; preds = %1
br label %61
56: ; preds = %1
br label %61
57: ; preds = %1
br label %61
58: ; preds = %1
br label %61
59: ; preds = %1
%60 = tail call i32 @snprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @ssh_err.buf, i64 0, i64 0), i32 1024, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.55, i64 0, i64 0), i32 %0)
br label %61
61: ; preds = %1, %59, %58, %57, %56, %55, %54, %53, %52, %51, %50, %49, %48, %47, %46, %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%62 = phi i8* [ getelementptr inbounds ([1024 x i8], [1024 x i8]* @ssh_err.buf, i64 0, i64 0), %59 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.54, i64 0, i64 0), %58 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.53, i64 0, i64 0), %57 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.52, i64 0, i64 0), %56 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.51, i64 0, i64 0), %55 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.50, i64 0, i64 0), %54 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.49, i64 0, i64 0), %53 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.48, i64 0, i64 0), %52 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.47, i64 0, i64 0), %51 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.46, i64 0, i64 0), %50 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.45, i64 0, i64 0), %49 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.44, i64 0, i64 0), %48 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.43, i64 0, i64 0), %47 ], [ getelementptr inbounds ([53 x i8], [53 x i8]* @.str.42, i64 0, i64 0), %46 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.41, i64 0, i64 0), %45 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.40, i64 0, i64 0), %44 ], [ getelementptr inbounds ([50 x i8], [50 x i8]* @.str.39, i64 0, i64 0), %43 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.38, i64 0, i64 0), %42 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.37, i64 0, i64 0), %41 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.36, i64 0, i64 0), %40 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.35, i64 0, i64 0), %39 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.34, i64 0, i64 0), %38 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.33, i64 0, i64 0), %37 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.32, i64 0, i64 0), %36 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.31, i64 0, i64 0), %35 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.30, i64 0, i64 0), %34 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.29, i64 0, i64 0), %33 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.28, i64 0, i64 0), %32 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0), %31 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.26, i64 0, i64 0), %30 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.25, i64 0, i64 0), %29 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.24, i64 0, i64 0), %28 ], [ %27, %25 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.23, i64 0, i64 0), %24 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([46 x i8], [46 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %62
}