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

/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void convcode(double ver, int sys, char *type) {
  if (ver >= 2.12 && (sys == 0x01 || sys == 0x10 || sys == 0x02) &&
      !strcmp(type + 1, "1C")) {
    strcpy(type + 1, "A");
  } else if (ver >= 2.12 && (sys == 0x01 || sys == 0x10) &&
             (!strcmp(type + 1, "1S") || !strcmp(type + 1, "1L") ||
              !strcmp(type + 1, "1X"))) {
    strcpy(type + 1, "B");
  } else if (ver >= 2.12 && (sys == 0x01 || sys == 0x10) &&
             (!strcmp(type + 1, "2S") || !strcmp(type + 1, "2L") ||
              !strcmp(type + 1, "2X"))) {
    strcpy(type + 1, "C");
  } else if (ver >= 2.12 && sys == 0x04 && !strcmp(type + 1, "1C")) {
    strcpy(type + 1, "A");
  } else if (ver >= 2.12 && sys == 0x04 && !strcmp(type + 1, "2C")) {
    strcpy(type + 1, "D");
  } else if (sys == 0x20 &&
             (!strcmp(type + 1, "1I") || !strcmp(type + 1, "1Q") ||
              !strcmp(type + 1, "1X"))) {
    strcpy(type + 1, "2");
  } else if (!strcmp(type, "C1P") || !strcmp(type, "C1W") ||
             !strcmp(type, "C1Y") || !strcmp(type, "C1N")) {
    strcpy(type, "P1");
  } else if (!strcmp(type, "C2P") || !strcmp(type, "C2W") ||
             !strcmp(type, "C2Y") || !strcmp(type, "C2N") ||
             !strcmp(type, "C2D")) {
    strcpy(type, "P2");
  } else {
    type[2] = '\0';
  }
}


x86 assembly (clang, -O0):
<convcode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     119f <convcode+0x7f>
cmpl   $0x1,-0xc(%rbp)
je     1169 <convcode+0x49>
cmpl   $0x10,-0xc(%rbp)
je     1169 <convcode+0x49>
cmpl   $0x2,-0xc(%rbp)
jne    119f <convcode+0x7f>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xe90(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    119f <convcode+0x7f>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xe76(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1533 <convcode+0x413>
movsd  -0x8(%rbp),%xmm0
movsd  0xe54(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     123a <convcode+0x11a>
cmpl   $0x1,-0xc(%rbp)
je     11ca <convcode+0xaa>
cmpl   $0x10,-0xc(%rbp)
jne    123a <convcode+0x11a>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xe34(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1221 <convcode+0x101>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xe1a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1221 <convcode+0x101>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xe00(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    123a <convcode+0x11a>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xde6(%rip),%rsi
call   1030 <strcpy@plt>
jmp    152e <convcode+0x40e>
movsd  -0x8(%rbp),%xmm0
movsd  0xdb9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12d5 <convcode+0x1b5>
cmpl   $0x1,-0xc(%rbp)
je     1265 <convcode+0x145>
cmpl   $0x10,-0xc(%rbp)
jne    12d5 <convcode+0x1b5>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xda4(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     12bc <convcode+0x19c>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xd8a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     12bc <convcode+0x19c>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xd70(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    12d5 <convcode+0x1b5>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xd3e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1529 <convcode+0x409>
movsd  -0x8(%rbp),%xmm0
movsd  0xd1e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     132c <convcode+0x20c>
cmpl   $0x4,-0xc(%rbp)
jne    132c <convcode+0x20c>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xd03(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    132c <convcode+0x20c>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xce9(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1524 <convcode+0x404>
movsd  -0x8(%rbp),%xmm0
movsd  0xcc7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1383 <convcode+0x263>
cmpl   $0x4,-0xc(%rbp)
jne    1383 <convcode+0x263>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xcc5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1383 <convcode+0x263>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xcd6(%rip),%rsi
call   1030 <strcpy@plt>
jmp    151f <convcode+0x3ff>
cmpl   $0x20,-0xc(%rbp)
jne    13fd <convcode+0x2dd>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xc88(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     13e4 <convcode+0x2c4>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xc6e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     13e4 <convcode+0x2c4>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xc3d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    13fd <convcode+0x2dd>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xc5f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    151a <convcode+0x3fa>
mov    -0x18(%rbp),%rdi
lea    0xc22(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1461 <convcode+0x341>
mov    -0x18(%rbp),%rdi
lea    0xc0d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1461 <convcode+0x341>
mov    -0x18(%rbp),%rdi
lea    0xbf8(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1461 <convcode+0x341>
mov    -0x18(%rbp),%rdi
lea    0xbe3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1476 <convcode+0x356>
mov    -0x18(%rbp),%rdi
lea    0xbce(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1515 <convcode+0x3f5>
mov    -0x18(%rbp),%rdi
lea    0xbbc(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     14f3 <convcode+0x3d3>
mov    -0x18(%rbp),%rdi
lea    0xba7(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     14f3 <convcode+0x3d3>
mov    -0x18(%rbp),%rdi
lea    0xb92(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     14f3 <convcode+0x3d3>
mov    -0x18(%rbp),%rdi
lea    0xb7d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     14f3 <convcode+0x3d3>
mov    -0x18(%rbp),%rdi
lea    0xb68(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1508 <convcode+0x3e8>
mov    -0x18(%rbp),%rdi
lea    0xb53(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1510 <convcode+0x3f0>
mov    -0x18(%rbp),%rax
movb   $0x0,0x2(%rax)
jmp    1515 <convcode+0x3f5>
jmp    151a <convcode+0x3fa>
jmp    151f <convcode+0x3ff>
jmp    1524 <convcode+0x404>
jmp    1529 <convcode+0x409>
jmp    152e <convcode+0x40e>
jmp    1533 <convcode+0x413>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convcode>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%r12d
ucomisd 0xeca(%rip),%xmm0
jae    1147 <convcode+0x27>
cmp    $0x20,%r12d
jne    12cf <convcode+0x1af>
jmp    1286 <convcode+0x166>
lea    -0x1(%r12),%ebx
cmp    $0x1f,%ebx
ja     12cf <convcode+0x1af>
lea    0xeac(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0x1(%r14),%r15
lea    0x1018(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13af <convcode+0x28f>
cmp    $0x1f,%ebx
ja     12cf <convcode+0x1af>
lea    0xef8(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xfed(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13c4 <convcode+0x2a4>
lea    0xfd9(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13c4 <convcode+0x2a4>
lea    0xfc5(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13c4 <convcode+0x2a4>
cmp    $0x1f,%ebx
ja     12cf <convcode+0x1af>
lea    0xf1a(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xf9a(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13e7 <convcode+0x2c7>
lea    0xf86(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13e7 <convcode+0x2c7>
lea    0xf72(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13e7 <convcode+0x2c7>
cmp    $0x20,%r12d
je     1286 <convcode+0x166>
cmp    $0x4,%r12d
jne    12cf <convcode+0x1af>
lea    0x1(%r14),%rbx
lea    0xf31(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13de <convcode+0x2be>
lea    0xf33(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    12cf <convcode+0x1af>
lea    0xf4e(%rip),%rsi
jmp    13aa <convcode+0x28a>
lea    0x1(%r14),%rbx
lea    0xf13(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13a3 <convcode+0x283>
lea    0xeff(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13a3 <convcode+0x283>
lea    0xed4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13a3 <convcode+0x283>
lea    0xed4(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1397 <convcode+0x277>
lea    0xec1(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1397 <convcode+0x277>
lea    0xeae(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1397 <convcode+0x277>
lea    0xe9b(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1397 <convcode+0x277>
lea    0xe8f(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13b8 <convcode+0x298>
lea    0xe80(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13b8 <convcode+0x298>
lea    0xe71(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13b8 <convcode+0x298>
lea    0xe62(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13b8 <convcode+0x298>
lea    0xe53(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     13b8 <convcode+0x298>
movb   $0x0,0x2(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
lea    0xe1c(%rip),%rsi
mov    %r14,%rdi
jmp    13ce <convcode+0x2ae>
lea    0xe28(%rip),%rsi
mov    %rbx,%rdi
jmp    13ce <convcode+0x2ae>
lea    0xdd5(%rip),%rsi
jmp    13cb <convcode+0x2ab>
lea    0xe12(%rip),%rsi
mov    %r14,%rdi
jmp    13ce <convcode+0x2ae>
lea    0xdcb(%rip),%rsi
mov    %r15,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <strcpy@plt>
lea    0xda6(%rip),%rsi
jmp    13aa <convcode+0x28a>
lea    0xd9b(%rip),%rsi
jmp    13cb <convcode+0x2ab>

LLVM IR (-O0):
@.str = [3 x i8] c"1C\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [3 x i8] c"1S\00"
@.str.3 = [3 x i8] c"1L\00"
@.str.4 = [3 x i8] c"1X\00"
@.str.5 = [2 x i8] c"B\00"
@.str.6 = [3 x i8] c"2S\00"
@.str.7 = [3 x i8] c"2L\00"
@.str.8 = [3 x i8] c"2X\00"
@.str.9 = [2 x i8] c"C\00"
@.str.10 = [3 x i8] c"2C\00"
@.str.11 = [2 x i8] c"D\00"
@.str.12 = [3 x i8] c"1I\00"
@.str.13 = [3 x i8] c"1Q\00"
@.str.14 = [2 x i8] c"2\00"
@.str.15 = [4 x i8] c"C1P\00"
@.str.16 = [4 x i8] c"C1W\00"
@.str.17 = [4 x i8] c"C1Y\00"
@.str.18 = [4 x i8] c"C1N\00"
@.str.19 = [3 x i8] c"P1\00"
@.str.20 = [4 x i8] c"C2P\00"
@.str.21 = [4 x i8] c"C2W\00"
@.str.22 = [4 x i8] c"C2Y\00"
@.str.23 = [4 x i8] c"C2N\00"
@.str.24 = [4 x i8] c"C2D\00"
@.str.25 = [3 x i8] c"P2\00"
define void @convcode(double %0, i32 %1, i8* %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i8*
store double %0, double* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load double, double* %4
%8 = fcmp oge double %7, 2.120000e+00
br i1 %8, label %9, label %27
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 1
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, 16
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %27
18: ; preds = %15, %12, %9
%19 = load i8*, i8** %6
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = call i32 @strcmp(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%22 = icmp ne i32 %21, 0
br i1 %22, label %27, label %23
23: ; preds = %18
%24 = load i8*, i8** %6
%25 = getelementptr inbounds i8, i8* %24, i64 1
%26 = call i32 @strcpy(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %187
27: ; preds = %18, %15, %3
%28 = load double, double* %4
%29 = fcmp oge double %28, 2.120000e+00
br i1 %29, label %30, label %55
30: ; preds = %27
%31 = load i32, i32* %5
%32 = icmp eq i32 %31, 1
br i1 %32, label %36, label %33
33: ; preds = %30
%34 = load i32, i32* %5
%35 = icmp eq i32 %34, 16
br i1 %35, label %36, label %55
36: ; preds = %33, %30
%37 = load i8*, i8** %6
%38 = getelementptr inbounds i8, i8* %37, i64 1
%39 = call i32 @strcmp(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %51
41: ; preds = %36
%42 = load i8*, i8** %6
%43 = getelementptr inbounds i8, i8* %42, i64 1
%44 = call i32 @strcmp(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %51
46: ; preds = %41
%47 = load i8*, i8** %6
%48 = getelementptr inbounds i8, i8* %47, i64 1
%49 = call i32 @strcmp(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%50 = icmp ne i32 %49, 0
br i1 %50, label %55, label %51
51: ; preds = %46, %41, %36
%52 = load i8*, i8** %6
%53 = getelementptr inbounds i8, i8* %52, i64 1
%54 = call i32 @strcpy(i8* %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %186
55: ; preds = %46, %33, %27
%56 = load double, double* %4
%57 = fcmp oge double %56, 2.120000e+00
br i1 %57, label %58, label %83
58: ; preds = %55
%59 = load i32, i32* %5
%60 = icmp eq i32 %59, 1
br i1 %60, label %64, label %61
61: ; preds = %58
%62 = load i32, i32* %5
%63 = icmp eq i32 %62, 16
br i1 %63, label %64, label %83
64: ; preds = %61, %58
%65 = load i8*, i8** %6
%66 = getelementptr inbounds i8, i8* %65, i64 1
%67 = call i32 @strcmp(i8* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%68 = icmp ne i32 %67, 0
br i1 %68, label %69, label %79
69: ; preds = %64
%70 = load i8*, i8** %6
%71 = getelementptr inbounds i8, i8* %70, i64 1
%72 = call i32 @strcmp(i8* %71, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %79
74: ; preds = %69
%75 = load i8*, i8** %6
%76 = getelementptr inbounds i8, i8* %75, i64 1
%77 = call i32 @strcmp(i8* %76, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
br i1 %78, label %83, label %79
79: ; preds = %74, %69, %64
%80 = load i8*, i8** %6
%81 = getelementptr inbounds i8, i8* %80, i64 1
%82 = call i32 @strcpy(i8* %81, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %185
83: ; preds = %74, %61, %55
%84 = load double, double* %4
%85 = fcmp oge double %84, 2.120000e+00
br i1 %85, label %86, label %98
86: ; preds = %83
%87 = load i32, i32* %5
%88 = icmp eq i32 %87, 4
br i1 %88, label %89, label %98
89: ; preds = %86
%90 = load i8*, i8** %6
%91 = getelementptr inbounds i8, i8* %90, i64 1
%92 = call i32 @strcmp(i8* %91, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%93 = icmp ne i32 %92, 0
br i1 %93, label %98, label %94
94: ; preds = %89
%95 = load i8*, i8** %6
%96 = getelementptr inbounds i8, i8* %95, i64 1
%97 = call i32 @strcpy(i8* %96, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %184
98: ; preds = %89, %86, %83
%99 = load double, double* %4
%100 = fcmp oge double %99, 2.120000e+00
br i1 %100, label %101, label %113
101: ; preds = %98
%102 = load i32, i32* %5
%103 = icmp eq i32 %102, 4
br i1 %103, label %104, label %113
104: ; preds = %101
%105 = load i8*, i8** %6
%106 = getelementptr inbounds i8, i8* %105, i64 1
%107 = call i32 @strcmp(i8* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%108 = icmp ne i32 %107, 0
br i1 %108, label %113, label %109
109: ; preds = %104
%110 = load i8*, i8** %6
%111 = getelementptr inbounds i8, i8* %110, i64 1
%112 = call i32 @strcpy(i8* %111, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %183
113: ; preds = %104, %101, %98
%114 = load i32, i32* %5
%115 = icmp eq i32 %114, 32
br i1 %115, label %116, label %135
116: ; preds = %113
%117 = load i8*, i8** %6
%118 = getelementptr inbounds i8, i8* %117, i64 1
%119 = call i32 @strcmp(i8* %118, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%120 = icmp ne i32 %119, 0
br i1 %120, label %121, label %131
121: ; preds = %116
%122 = load i8*, i8** %6
%123 = getelementptr inbounds i8, i8* %122, i64 1
%124 = call i32 @strcmp(i8* %123, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%125 = icmp ne i32 %124, 0
br i1 %125, label %126, label %131
126: ; preds = %121
%127 = load i8*, i8** %6
%128 = getelementptr inbounds i8, i8* %127, i64 1
%129 = call i32 @strcmp(i8* %128, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%130 = icmp ne i32 %129, 0
br i1 %130, label %135, label %131
131: ; preds = %126, %121, %116
%132 = load i8*, i8** %6
%133 = getelementptr inbounds i8, i8* %132, i64 1
%134 = call i32 @strcpy(i8* %133, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %182
135: ; preds = %126, %113
%136 = load i8*, i8** %6
%137 = call i32 @strcmp(i8* %136, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
%138 = icmp ne i32 %137, 0
br i1 %138, label %139, label %151
139: ; preds = %135
%140 = load i8*, i8** %6
%141 = call i32 @strcmp(i8* %140, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%142 = icmp ne i32 %141, 0
br i1 %142, label %143, label %151
143: ; preds = %139
%144 = load i8*, i8** %6
%145 = call i32 @strcmp(i8* %144, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0))
%146 = icmp ne i32 %145, 0
br i1 %146, label %147, label %151
147: ; preds = %143
%148 = load i8*, i8** %6
%149 = call i32 @strcmp(i8* %148, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%150 = icmp ne i32 %149, 0
br i1 %150, label %154, label %151
151: ; preds = %147, %143, %139, %135
%152 = load i8*, i8** %6
%153 = call i32 @strcpy(i8* %152, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
br label %181
154: ; preds = %147
%155 = load i8*, i8** %6
%156 = call i32 @strcmp(i8* %155, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
%157 = icmp ne i32 %156, 0
br i1 %157, label %158, label %174
158: ; preds = %154
%159 = load i8*, i8** %6
%160 = call i32 @strcmp(i8* %159, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0))
%161 = icmp ne i32 %160, 0
br i1 %161, label %162, label %174
162: ; preds = %158
%163 = load i8*, i8** %6
%164 = call i32 @strcmp(i8* %163, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0))
%165 = icmp ne i32 %164, 0
br i1 %165, label %166, label %174
166: ; preds = %162
%167 = load i8*, i8** %6
%168 = call i32 @strcmp(i8* %167, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0))
%169 = icmp ne i32 %168, 0
br i1 %169, label %170, label %174
170: ; preds = %166
%171 = load i8*, i8** %6
%172 = call i32 @strcmp(i8* %171, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
%173 = icmp ne i32 %172, 0
br i1 %173, label %177, label %174
174: ; preds = %170, %166, %162, %158, %154
%175 = load i8*, i8** %6
%176 = call i32 @strcpy(i8* %175, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0))
br label %180
177: ; preds = %170
%178 = load i8*, i8** %6
%179 = getelementptr inbounds i8, i8* %178, i64 2
store i8 0, i8* %179
br label %180
180: ; preds = %177, %174
br label %181
181: ; preds = %180, %151
br label %182
182: ; preds = %181, %131
br label %183
183: ; preds = %182, %109
br label %184
184: ; preds = %183, %94
br label %185
185: ; preds = %184, %79
br label %186
186: ; preds = %185, %51
br label %187
187: ; preds = %186, %23
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"1C\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [3 x i8] c"1S\00"
@.str.3 = [3 x i8] c"1L\00"
@.str.4 = [3 x i8] c"1X\00"
@.str.5 = [2 x i8] c"B\00"
@.str.6 = [3 x i8] c"2S\00"
@.str.7 = [3 x i8] c"2L\00"
@.str.8 = [3 x i8] c"2X\00"
@.str.9 = [2 x i8] c"C\00"
@.str.10 = [3 x i8] c"2C\00"
@.str.11 = [2 x i8] c"D\00"
@.str.12 = [3 x i8] c"1I\00"
@.str.13 = [3 x i8] c"1Q\00"
@.str.14 = [2 x i8] c"2\00"
@.str.15 = [4 x i8] c"C1P\00"
@.str.16 = [4 x i8] c"C1W\00"
@.str.17 = [4 x i8] c"C1Y\00"
@.str.18 = [4 x i8] c"C1N\00"
@.str.19 = [3 x i8] c"P1\00"
@.str.20 = [4 x i8] c"C2P\00"
@.str.21 = [4 x i8] c"C2W\00"
@.str.22 = [4 x i8] c"C2Y\00"
@.str.23 = [4 x i8] c"C2N\00"
@.str.24 = [4 x i8] c"C2D\00"
@.str.25 = [3 x i8] c"P2\00"
define void @convcode(double %0, i32 %1, i8* %2) {
%4 = fcmp ult double %0, 2.120000e+00
br i1 %4, label %48, label %5
5: ; preds = %3
switch i32 %1, label %62 [
i32 16, label %6
i32 2, label %6
i32 1, label %6
i32 4, label %37
i32 32, label %50
]
6: ; preds = %5, %5, %5
%7 = getelementptr inbounds i8, i8* %2, i64 1
%8 = tail call i32 @strcmp(i8* %7, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = tail call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %95
12: ; preds = %6
switch i32 %1, label %62 [
i32 16, label %13
i32 1, label %13
i32 4, label %37
i32 32, label %50
]
13: ; preds = %12, %12
%14 = tail call i32 @strcmp(i8* %7, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %22, label %16
16: ; preds = %13
%17 = tail call i32 @strcmp(i8* %7, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = tail call i32 @strcmp(i8* %7, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %19, %16, %13
%23 = tail call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %95
24: ; preds = %19
switch i32 %1, label %62 [
i32 16, label %25
i32 1, label %25
i32 4, label %37
i32 32, label %50
]
25: ; preds = %24, %24
%26 = tail call i32 @strcmp(i8* %7, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %34, label %28
28: ; preds = %25
%29 = tail call i32 @strcmp(i8* %7, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %34, label %31
31: ; preds = %28
%32 = tail call i32 @strcmp(i8* %7, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31, %28, %25
%35 = tail call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %95
36: ; preds = %31
switch i32 %1, label %62 [
i32 4, label %37
i32 32, label %50
]
37: ; preds = %5, %12, %24, %36
%38 = getelementptr inbounds i8, i8* %2, i64 1
%39 = tail call i32 @strcmp(i8* %38, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = tail call i32 @strcpy(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %95
43: ; preds = %37
%44 = tail call i32 @strcmp(i8* %38, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %62
46: ; preds = %43
%47 = tail call i32 @strcpy(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %95
48: ; preds = %3
%49 = icmp eq i32 %1, 32
br i1 %49, label %50, label %62
50: ; preds = %5, %12, %24, %36, %48
%51 = getelementptr inbounds i8, i8* %2, i64 1
%52 = tail call i32 @strcmp(i8* %51, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
br i1 %53, label %60, label %54
54: ; preds = %50
%55 = tail call i32 @strcmp(i8* %51, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%56 = icmp eq i32 %55, 0
br i1 %56, label %60, label %57
57: ; preds = %54
%58 = tail call i32 @strcmp(i8* %51, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %57, %54, %50
%61 = tail call i32 @strcpy(i8* %51, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
br label %95
62: ; preds = %5, %12, %24, %36, %43, %57, %48
%63 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
%64 = icmp eq i32 %63, 0
br i1 %64, label %74, label %65
65: ; preds = %62
%66 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%67 = icmp eq i32 %66, 0
br i1 %67, label %74, label %68
68: ; preds = %65
%69 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0))
%70 = icmp eq i32 %69, 0
br i1 %70, label %74, label %71
71: ; preds = %68
%72 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0))
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %76
74: ; preds = %71, %68, %65, %62
%75 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0))
br label %95
76: ; preds = %71
%77 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
%78 = icmp eq i32 %77, 0
br i1 %78, label %91, label %79
79: ; preds = %76
%80 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0))
%81 = icmp eq i32 %80, 0
br i1 %81, label %91, label %82
82: ; preds = %79
%83 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0))
%84 = icmp eq i32 %83, 0
br i1 %84, label %91, label %85
85: ; preds = %82
%86 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0))
%87 = icmp eq i32 %86, 0
br i1 %87, label %91, label %88
88: ; preds = %85
%89 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i64 0, i64 0))
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %93
91: ; preds = %88, %85, %82, %79, %76
%92 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0))
br label %95
93: ; preds = %88
%94 = getelementptr inbounds i8, i8* %2, i64 2
store i8 0, i8* %94
br label %95
95: ; preds = %22, %41, %60, %91, %93, %74, %46, %34, %10
ret void
}