#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 || sys == 0x20) &&
      !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 || sys == 0x20) &&
             (!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 (!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     11a9 <convcode+0x89>
cmpl   $0x1,-0xc(%rbp)
je     1173 <convcode+0x53>
cmpl   $0x10,-0xc(%rbp)
je     1173 <convcode+0x53>
cmpl   $0x2,-0xc(%rbp)
je     1173 <convcode+0x53>
cmpl   $0x20,-0xc(%rbp)
jne    11a9 <convcode+0x89>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xe86(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11a9 <convcode+0x89>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xe6c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14c8 <convcode+0x3a8>
movsd  -0x8(%rbp),%xmm0
movsd  0xe4a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1244 <convcode+0x124>
cmpl   $0x1,-0xc(%rbp)
je     11d4 <convcode+0xb4>
cmpl   $0x10,-0xc(%rbp)
jne    1244 <convcode+0x124>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xe2a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     122b <convcode+0x10b>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xe10(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     122b <convcode+0x10b>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xdf6(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1244 <convcode+0x124>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xddc(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14c3 <convcode+0x3a3>
movsd  -0x8(%rbp),%xmm0
movsd  0xdaf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12e9 <convcode+0x1c9>
cmpl   $0x1,-0xc(%rbp)
je     1279 <convcode+0x159>
cmpl   $0x10,-0xc(%rbp)
je     1279 <convcode+0x159>
cmpl   $0x20,-0xc(%rbp)
jne    12e9 <convcode+0x1c9>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xd90(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     12d0 <convcode+0x1b0>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xd76(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     12d0 <convcode+0x1b0>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xd5c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    12e9 <convcode+0x1c9>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xd2a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14be <convcode+0x39e>
movsd  -0x8(%rbp),%xmm0
movsd  0xd0a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1340 <convcode+0x220>
cmpl   $0x4,-0xc(%rbp)
jne    1340 <convcode+0x220>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xcef(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1340 <convcode+0x220>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xcd5(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14b9 <convcode+0x399>
movsd  -0x8(%rbp),%xmm0
movsd  0xcb3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1397 <convcode+0x277>
cmpl   $0x4,-0xc(%rbp)
jne    1397 <convcode+0x277>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xcb1(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1397 <convcode+0x277>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
lea    0xcbc(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14b4 <convcode+0x394>
mov    -0x18(%rbp),%rdi
lea    0xc82(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     13fb <convcode+0x2db>
mov    -0x18(%rbp),%rdi
lea    0xc6d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     13fb <convcode+0x2db>
mov    -0x18(%rbp),%rdi
lea    0xc58(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     13fb <convcode+0x2db>
mov    -0x18(%rbp),%rdi
lea    0xc43(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1410 <convcode+0x2f0>
mov    -0x18(%rbp),%rdi
lea    0xc2e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14af <convcode+0x38f>
mov    -0x18(%rbp),%rdi
lea    0xc1c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     148d <convcode+0x36d>
mov    -0x18(%rbp),%rdi
lea    0xc07(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     148d <convcode+0x36d>
mov    -0x18(%rbp),%rdi
lea    0xbf2(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     148d <convcode+0x36d>
mov    -0x18(%rbp),%rdi
lea    0xbdd(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     148d <convcode+0x36d>
mov    -0x18(%rbp),%rdi
lea    0xbc8(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    14a2 <convcode+0x382>
mov    -0x18(%rbp),%rdi
lea    0xbb3(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14aa <convcode+0x38a>
mov    -0x18(%rbp),%rax
movb   $0x0,0x2(%rax)
jmp    14af <convcode+0x38f>
jmp    14b4 <convcode+0x394>
jmp    14b9 <convcode+0x399>
jmp    14be <convcode+0x39e>
jmp    14c3 <convcode+0x3a3>
jmp    14c8 <convcode+0x3a8>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convcode>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
ucomisd 0xed0(%rip),%xmm0
jae    121b <convcode+0xfb>
lea    0xf67(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     120c <convcode+0xec>
lea    0xf54(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     120c <convcode+0xec>
lea    0xf41(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     120c <convcode+0xec>
lea    0xf2e(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     120c <convcode+0xec>
lea    0xf22(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1364 <convcode+0x244>
lea    0xf0f(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1364 <convcode+0x244>
lea    0xefc(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1364 <convcode+0x244>
lea    0xee9(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1364 <convcode+0x244>
lea    0xed6(%rip),%rsi
mov    %r14,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1364 <convcode+0x244>
movb   $0x0,0x2(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xea1(%rip),%rsi
mov    %r14,%rdi
jmp    138f <convcode+0x26f>
mov    %edi,%ebx
cmp    $0x20,%edi
ja     1136 <convcode+0x16>
mov    %ebx,%eax
movabs $0x100010006,%rcx
bt     %rax,%rcx
jae    1317 <convcode+0x1f7>
lea    0x1(%r14),%r15
lea    0xe41(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     135b <convcode+0x23b>
lea    -0x1(%rbx),%eax
cmp    $0x1f,%eax
ja     1136 <convcode+0x16>
lea    0xd9e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe13(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1370 <convcode+0x250>
lea    0xdff(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1370 <convcode+0x250>
lea    0xdeb(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1370 <convcode+0x250>
cmp    $0x10,%ebx
je     12cb <convcode+0x1ab>
cmp    $0x4,%ebx
je     1321 <convcode+0x201>
cmp    $0x1,%ebx
jne    1136 <convcode+0x16>
lea    0xdc6(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1385 <convcode+0x265>
lea    0xdb2(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1385 <convcode+0x265>
lea    0xd9e(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1385 <convcode+0x265>
cmp    $0x4,%ebx
jne    1136 <convcode+0x16>
jmp    1321 <convcode+0x201>
cmp    $0x4,%rax
jne    1136 <convcode+0x16>
lea    0x1(%r14),%rbx
lea    0xd5c(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1379 <convcode+0x259>
lea    0xd62(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    1136 <convcode+0x16>
lea    0xd73(%rip),%rsi
mov    %rbx,%rdi
jmp    138f <convcode+0x26f>
lea    0xd29(%rip),%rsi
jmp    138c <convcode+0x26c>
lea    0xd60(%rip),%rsi
mov    %r14,%rdi
jmp    138f <convcode+0x26f>
lea    0xd1f(%rip),%rsi
jmp    138c <convcode+0x26c>
lea    0xd0b(%rip),%rsi
mov    %rbx,%rdi
jmp    138f <convcode+0x26f>
lea    0xcfd(%rip),%rsi
mov    %r15,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strcpy@plt>

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