#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 atoi(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, ...);
char *strtok(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ toc_msg_printf(int, char *);
void translate_toc_error_code(char *c) {
  int no = atoi(c);
  char *w = strtok(NULL, ":");
  char buf[256];
  switch (no) {
  case 901:
    snprintf(buf, sizeof(buf), "%s not currently logged in.", w);
    break;
  case 902:
    snprintf(buf, sizeof(buf), "Warning of %s not allowed.", w);
    break;
  case 903:
    snprintf(buf, sizeof(buf),
             "A message has been dropped, you are exceeding the server speed "
             "limit.");
    break;
  case 950:
    snprintf(buf, sizeof(buf), "Chat in %s is not available.", w);
    break;
  case 960:
    snprintf(buf, sizeof(buf), "You are sending messages too fast to %s.", w);
    break;
  case 961:
    snprintf(buf, sizeof(buf),
             "You missed an IM from %s because it was too big.", w);
    break;
  case 962:
    snprintf(buf, sizeof(buf),
             "You missed an IM from %s because it was sent too fast.", w);
    break;
  case 970:
    snprintf(buf, sizeof(buf), "Failure.");
    break;
  case 971:
    snprintf(buf, sizeof(buf), "Too many matches.");
    break;
  case 972:
    snprintf(buf, sizeof(buf), "Need more qualifiers.");
    break;
  case 973:
    snprintf(buf, sizeof(buf), "Dir service temporarily unavailable.");
    break;
  case 974:
    snprintf(buf, sizeof(buf), "Email lookup restricted.");
    break;
  case 975:
    snprintf(buf, sizeof(buf), "Keyword ignored.");
    break;
  case 976:
    snprintf(buf, sizeof(buf), "No keywords.");
    break;
  case 977:
    snprintf(buf, sizeof(buf), "User has no directory information.");
    break;
  case 978:
    snprintf(buf, sizeof(buf), "Country not supported.");
    break;
  case 979:
    snprintf(buf, sizeof(buf), "Failure unknown: %s.", w);
    break;
  case 980:
    snprintf(buf, sizeof(buf), "Incorrect nickname or password.");
    break;
  case 981:
    snprintf(buf, sizeof(buf), "The service is temporarily unavailable.");
    break;
  case 982:
    snprintf(buf, sizeof(buf),
             "Your warning level is currently too high to log in.");
    break;
  case 983:
    snprintf(buf, sizeof(buf),
             "You have been connecting and disconnecting too frequently.  Wait "
             "ten minutes and try again.  If you continue to try, you will "
             "need to wait even longer.");
    break;
  case 989:
    snprintf(buf, sizeof(buf), "An unknown signon error has occurred: %s.", w);
    break;
  default:
    snprintf(buf, sizeof(buf), "An unknown error, %d, has occured.  Info: %s",
             no, w);
  }
  toc_msg_printf(25, buf);
  return;
}


x86 assembly (clang, -O0):
<translate_toc_error_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0xc(%rbp)
lea    0x1002(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1050 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0xfffffc7b,%eax
mov    %eax,%ecx
mov    %rcx,-0x128(%rbp)
sub    $0x58,%eax
ja     146a <translate_toc_error_code+0x32a>
mov    -0x128(%rbp),%rax
lea    0xe69(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0xfaf(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0xfa8(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfa4(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0xfc7(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0xfc1(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0xfc7(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0xfd5(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfed(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfd7(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfca(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfc1(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfc7(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfc1(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfb3(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfa1(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfa5(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0xf99(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xf8f(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xf90(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xf99(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    $0x100,%esi
lea    0xfae(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x100,%esi
lea    0x1023(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    148b <translate_toc_error_code+0x34b>
lea    -0x120(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    $0x100,%esi
lea    0x1027(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
lea    -0x120(%rbp),%rsi
mov    $0x19,%edi
call   1040 <toc_msg_printf@plt>
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate_toc_error_code>:
push   %rbx
sub    $0x100,%rsp
call   1060 <atoi@plt>
mov    %eax,%ebx
lea    0x100e(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
lea    -0x385(%rbx),%ecx
cmp    $0x58,%ecx
ja     119c <translate_toc_error_code+0x5c>
lea    0xe91(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xfe7(%rip),%rdx
jmp    1280 <translate_toc_error_code+0x140>
lea    0xff7(%rip),%rdx
jmp    1280 <translate_toc_error_code+0x140>
lea    0x1006(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x1308(%rip),%rdx
mov    %rsp,%rdi
mov    $0x100,%esi
mov    %ebx,%ecx
mov    %rax,%r8
xor    %eax,%eax
call   1030 <snprintf@plt>
jmp    1292 <translate_toc_error_code+0x152>
lea    0x1020(%rip),%rdx
jmp    1280 <translate_toc_error_code+0x140>
lea    0x1031(%rip),%rdx
jmp    1280 <translate_toc_error_code+0x140>
lea    0x104e(%rip),%rdx
jmp    1280 <translate_toc_error_code+0x140>
lea    0x1073(%rip),%rdx
jmp    1280 <translate_toc_error_code+0x140>
lea    0x109e(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x109e(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x10a7(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x10b4(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x10d0(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x10e0(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x10e8(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x10ec(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x1106(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x1114(%rip),%rdx
jmp    1280 <translate_toc_error_code+0x140>
lea    0x1120(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x1137(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x1156(%rip),%rdx
jmp    1268 <translate_toc_error_code+0x128>
lea    0x1181(%rip),%rdx
mov    %rsp,%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1030 <snprintf@plt>
jmp    1292 <translate_toc_error_code+0x152>
lea    0x1201(%rip),%rdx
mov    %rsp,%rdi
mov    $0x100,%esi
mov    %rax,%rcx
xor    %eax,%eax
call   1030 <snprintf@plt>
mov    %rsp,%rsi
mov    $0x19,%edi
call   1040 <toc_msg_printf@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c":\00"
@.str.1 = [28 x i8] c"%s not currently logged in.\00"
@.str.2 = [27 x i8] c"Warning of %s not allowed.\00"
@.str.3 = [70 x i8] c"A message has been dropped, you are exceeding the server speed limit.\00"
@.str.4 = [29 x i8] c"Chat in %s is not available.\00"
@.str.5 = [41 x i8] c"You are sending messages too fast to %s.\00"
@.str.6 = [49 x i8] c"You missed an IM from %s because it was too big.\00"
@.str.7 = [55 x i8] c"You missed an IM from %s because it was sent too fast.\00"
@.str.8 = [9 x i8] c"Failure.\00"
@.str.9 = [18 x i8] c"Too many matches.\00"
@.str.10 = [22 x i8] c"Need more qualifiers.\00"
@.str.11 = [37 x i8] c"Dir service temporarily unavailable.\00"
@.str.12 = [25 x i8] c"Email lookup restricted.\00"
@.str.13 = [17 x i8] c"Keyword ignored.\00"
@.str.14 = [13 x i8] c"No keywords.\00"
@.str.15 = [35 x i8] c"User has no directory information.\00"
@.str.16 = [23 x i8] c"Country not supported.\00"
@.str.17 = [21 x i8] c"Failure unknown: %s.\00"
@.str.18 = [32 x i8] c"Incorrect nickname or password.\00"
@.str.19 = [40 x i8] c"The service is temporarily unavailable.\00"
@.str.20 = [52 x i8] c"Your warning level is currently too high to log in.\00"
@.str.21 = [152 x i8] c"You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer.\00"
@.str.22 = [42 x i8] c"An unknown signon error has occurred: %s.\00"
@.str.23 = [45 x i8] c"An unknown error, %d, has occured. Info: %s\00"
define void @translate_toc_error_code(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [256 x i8]
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @atoi(i8* %6)
store i32 %7, i32* %3
%8 = call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %4
%9 = load i32, i32* %3
switch i32 %9, label %84 [
i32 901, label %10
i32 902, label %14
i32 903, label %18
i32 950, label %21
i32 960, label %25
i32 961, label %29
i32 962, label %33
i32 970, label %37
i32 971, label %40
i32 972, label %43
i32 973, label %46
i32 974, label %49
i32 975, label %52
i32 976, label %55
i32 977, label %58
i32 978, label %61
i32 979, label %64
i32 980, label %68
i32 981, label %71
i32 982, label %74
i32 983, label %77
i32 989, label %80
]
10: ; preds = %1
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%12 = load i8*, i8** %4
%13 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %11, i32 256, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %12)
br label %89
14: ; preds = %1
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%16 = load i8*, i8** %4
%17 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %15, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %16)
br label %89
18: ; preds = %1
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%20 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %19, i32 256, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.3, i64 0, i64 0))
br label %89
21: ; preds = %1
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%23 = load i8*, i8** %4
%24 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %22, i32 256, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %23)
br label %89
25: ; preds = %1
%26 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%27 = load i8*, i8** %4
%28 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %26, i32 256, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8* %27)
br label %89
29: ; preds = %1
%30 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%31 = load i8*, i8** %4
%32 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %30, i32 256, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i8* %31)
br label %89
33: ; preds = %1
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%35 = load i8*, i8** %4
%36 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %34, i32 256, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0), i8* %35)
br label %89
37: ; preds = %1
%38 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%39 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %38, i32 256, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
br label %89
40: ; preds = %1
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%42 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %41, i32 256, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %89
43: ; preds = %1
%44 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%45 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %44, i32 256, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
br label %89
46: ; preds = %1
%47 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%48 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %47, i32 256, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
br label %89
49: ; preds = %1
%50 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%51 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %50, i32 256, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0))
br label %89
52: ; preds = %1
%53 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%54 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %53, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
br label %89
55: ; preds = %1
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%57 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %56, i32 256, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
br label %89
58: ; preds = %1
%59 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%60 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %59, i32 256, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
br label %89
61: ; preds = %1
%62 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%63 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %62, i32 256, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
br label %89
64: ; preds = %1
%65 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%66 = load i8*, i8** %4
%67 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %65, i32 256, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0), i8* %66)
br label %89
68: ; preds = %1
%69 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%70 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %69, i32 256, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0))
br label %89
71: ; preds = %1
%72 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%73 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %72, i32 256, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
br label %89
74: ; preds = %1
%75 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%76 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %75, i32 256, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.20, i64 0, i64 0))
br label %89
77: ; preds = %1
%78 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%79 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %78, i32 256, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.21, i64 0, i64 0))
br label %89
80: ; preds = %1
%81 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%82 = load i8*, i8** %4
%83 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %81, i32 256, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.22, i64 0, i64 0), i8* %82)
br label %89
84: ; preds = %1
%85 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%86 = load i32, i32* %3
%87 = load i8*, i8** %4
%88 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %85, i32 256, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0), i32 %86, i8* %87)
br label %89
89: ; preds = %84, %80, %77, %74, %71, %68, %64, %61, %58, %55, %52, %49, %46, %43, %40, %37, %33, %29, %25, %21, %18, %14, %10
%90 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%91 = call i32 @toc_msg_printf(i32 25, i8* %90)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
@.str.1 = [28 x i8] c"%s not currently logged in.\00"
@.str.2 = [27 x i8] c"Warning of %s not allowed.\00"
@.str.3 = [70 x i8] c"A message has been dropped, you are exceeding the server speed limit.\00"
@.str.4 = [29 x i8] c"Chat in %s is not available.\00"
@.str.5 = [41 x i8] c"You are sending messages too fast to %s.\00"
@.str.6 = [49 x i8] c"You missed an IM from %s because it was too big.\00"
@.str.7 = [55 x i8] c"You missed an IM from %s because it was sent too fast.\00"
@.str.8 = [9 x i8] c"Failure.\00"
@.str.9 = [18 x i8] c"Too many matches.\00"
@.str.10 = [22 x i8] c"Need more qualifiers.\00"
@.str.11 = [37 x i8] c"Dir service temporarily unavailable.\00"
@.str.12 = [25 x i8] c"Email lookup restricted.\00"
@.str.13 = [17 x i8] c"Keyword ignored.\00"
@.str.14 = [13 x i8] c"No keywords.\00"
@.str.15 = [35 x i8] c"User has no directory information.\00"
@.str.16 = [23 x i8] c"Country not supported.\00"
@.str.17 = [21 x i8] c"Failure unknown: %s.\00"
@.str.18 = [32 x i8] c"Incorrect nickname or password.\00"
@.str.19 = [40 x i8] c"The service is temporarily unavailable.\00"
@.str.20 = [52 x i8] c"Your warning level is currently too high to log in.\00"
@.str.21 = [152 x i8] c"You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer.\00"
@.str.22 = [42 x i8] c"An unknown signon error has occurred: %s.\00"
@.str.23 = [45 x i8] c"An unknown error, %d, has occured. Info: %s\00"
define void @translate_toc_error_code(i8* nocapture %0) {
%2 = alloca [256 x i8]
%3 = tail call i32 @atoi(i8* %0)
%4 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
switch i32 %3, label %50 [
i32 901, label %6
i32 902, label %8
i32 903, label %10
i32 950, label %12
i32 960, label %14
i32 961, label %16
i32 962, label %18
i32 970, label %20
i32 971, label %22
i32 972, label %24
i32 973, label %26
i32 974, label %28
i32 975, label %30
i32 976, label %32
i32 977, label %34
i32 978, label %36
i32 979, label %38
i32 980, label %40
i32 981, label %42
i32 982, label %44
i32 983, label %46
i32 989, label %48
]
6: ; preds = %1
%7 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %4)
br label %52
8: ; preds = %1
%9 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %52
10: ; preds = %1
%11 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.3, i64 0, i64 0))
br label %52
12: ; preds = %1
%13 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %4)
br label %52
14: ; preds = %1
%15 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8* %4)
br label %52
16: ; preds = %1
%17 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i8* %4)
br label %52
18: ; preds = %1
%19 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0), i8* %4)
br label %52
20: ; preds = %1
%21 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
br label %52
22: ; preds = %1
%23 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
br label %52
24: ; preds = %1
%25 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
br label %52
26: ; preds = %1
%27 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
br label %52
28: ; preds = %1
%29 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0))
br label %52
30: ; preds = %1
%31 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
br label %52
32: ; preds = %1
%33 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
br label %52
34: ; preds = %1
%35 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
br label %52
36: ; preds = %1
%37 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
br label %52
38: ; preds = %1
%39 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i64 0, i64 0), i8* %4)
br label %52
40: ; preds = %1
%41 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.18, i64 0, i64 0))
br label %52
42: ; preds = %1
%43 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
br label %52
44: ; preds = %1
%45 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.20, i64 0, i64 0))
br label %52
46: ; preds = %1
%47 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.21, i64 0, i64 0))
br label %52
48: ; preds = %1
%49 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.22, i64 0, i64 0), i8* %4)
br label %52
50: ; preds = %1
%51 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %5, i32 256, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.23, i64 0, i64 0), i32 %3, i8* %4)
br label %52
52: ; preds = %50, %48, %46, %44, %42, %40, %38, %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6
%53 = call i32 @toc_msg_printf(i32 25, i8* %5)
ret void
}