#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*/ bits(int, int, char *, char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, unsigned short);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void cc2400_lmtst(unsigned short v) {
  char description[64];
  bits(15, 14, "-", "W0", "");
  bits(13, 13, "RXMIX_HGM", "RW", "");
  sprintf(description, "%d uA", ((v >> 11) & 0x3) * 4 + 12);
  bits(12, 11, "RXMIX_TAIL", "RW", description);
  sprintf(description, "%d uA", ((v >> 9) & 0x3) * 4 + 82);
  bits(10, 9, "RXMIX_CVM", "RW", description);
  switch ((v >> 7) & 0x3) {
  case 0:
    strcpy(description, "360");
    break;
  case 1:
    strcpy(description, "720");
    break;
  case 2:
    strcpy(description, "900");
    break;
  case 3:
    strcpy(description, "1260");
    break;
  }
  strcat(description, " uA");
  bits(8, 7, "RXMIX_CURRENT", "RW", description);
  switch ((v >> 5) & 0x3) {
  case 0:
    strcpy(description, "OFF");
    break;
  case 1:
  case 2:
  case 3:
    sprintf(description, "0.%d pF", (v >> 5) & 0x3);
    break;
  }
  bits(6, 5, "LNA_CAP_ARRAY", "RW", description);
  bits(4, 4, "LNA_LOWGAIN", "RW", (v >> 4) & 1 ? "7 dB" : "19 dB");
  switch ((v >> 2) & 0x3) {
  case 0:
    strcpy(description, "OFF");
    break;
  case 1:
    strcpy(description, "100 uA");
    break;
  case 2:
    strcpy(description, "300 uA");
    break;
  case 3:
    strcpy(description, "1000 uA");
    break;
  }
  bits(3, 2, "LNA_GAIN", "RW", description);
  switch (v & 0x3) {
  case 0:
    strcpy(description, "240 uA");
    break;
  case 1:
    strcpy(description, "480 uA");
    break;
  case 2:
    strcpy(description, "640 uA");
    break;
  case 3:
    strcpy(description, "1280 uA");
    break;
  }
  bits(1, 0, "LNA_CURRENT", "RW", description);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    0xed7(%rip),%rdx
lea    0xed2(%rip),%rcx
lea    0xeca(%rip),%r8
mov    %r8,-0x78(%rbp)
mov    $0xf,%edi
mov    $0xe,%esi
call   1040 <bits@plt>
mov    -0x78(%rbp),%r8
lea    0xeb0(%rip),%rdx
lea    0xeb3(%rip),%rcx
mov    %rcx,-0x68(%rbp)
mov    $0xd,%esi
mov    %esi,%edi
call   1040 <bits@plt>
movzwl -0x2(%rbp),%edx
shr    $0x9,%edx
and    $0xc,%edx
add    $0xc,%edx
lea    0xe92(%rip),%rsi
mov    %rsi,-0x70(%rbp)
lea    -0x50(%rbp),%rdi
mov    %rdi,-0x60(%rbp)
call   1060 <sprintf@plt>
mov    -0x68(%rbp),%rcx
mov    -0x60(%rbp),%r8
lea    0xe78(%rip),%rdx
mov    $0xc,%edi
mov    $0xb,%esi
call   1040 <bits@plt>
mov    -0x70(%rbp),%rsi
mov    -0x60(%rbp),%rdi
movzwl -0x2(%rbp),%edx
shr    $0x7,%edx
and    $0xc,%edx
or     $0x52,%edx
call   1060 <sprintf@plt>
mov    -0x68(%rbp),%rcx
mov    -0x60(%rbp),%r8
lea    0xe4b(%rip),%rdx
mov    $0xa,%edi
mov    $0x9,%esi
call   1040 <bits@plt>
movzwl -0x2(%rbp),%eax
shr    $0x7,%eax
and    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0x3,%eax
ja     1293 <cc2400_lmtst+0x153>
mov    -0x58(%rbp),%rax
lea    0xdc5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x50(%rbp),%rdi
lea    0xe0e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1293 <cc2400_lmtst+0x153>
lea    -0x50(%rbp),%rdi
lea    0xdfd(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1293 <cc2400_lmtst+0x153>
lea    -0x50(%rbp),%rdi
lea    0xdec(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1293 <cc2400_lmtst+0x153>
lea    -0x50(%rbp),%rdi
lea    0xddb(%rip),%rsi
call   1030 <strcpy@plt>
lea    0xe25(%rip),%rsi
lea    -0x50(%rbp),%rdi
mov    %rdi,-0x88(%rbp)
call   1050 <strcat@plt>
mov    -0x88(%rbp),%r8
lea    0xdb6(%rip),%rdx
lea    0xd80(%rip),%rcx
mov    $0x8,%edi
mov    $0x7,%esi
call   1040 <bits@plt>
movzwl -0x2(%rbp),%eax
shr    $0x5,%eax
and    $0x3,%eax
mov    %eax,-0x7c(%rbp)
je     12fa <cc2400_lmtst+0x1ba>
jmp    12e6 <cc2400_lmtst+0x1a6>
mov    -0x7c(%rbp),%eax
add    $0xffffffff,%eax
sub    $0x3,%eax
jb     130f <cc2400_lmtst+0x1cf>
jmp    132c <cc2400_lmtst+0x1ec>
lea    -0x50(%rbp),%rdi
lea    0xd77(%rip),%rsi
call   1030 <strcpy@plt>
jmp    132c <cc2400_lmtst+0x1ec>
lea    -0x50(%rbp),%rdi
movzwl -0x2(%rbp),%eax
sar    $0x5,%eax
and    $0x3,%eax
lea    0xd5c(%rip),%rsi
movzwl %ax,%edx
call   1060 <sprintf@plt>
lea    0xd55(%rip),%rdx
lea    0xd05(%rip),%rcx
mov    %rcx,-0x98(%rbp)
mov    $0x6,%edi
mov    $0x5,%esi
lea    -0x50(%rbp),%r8
call   1040 <bits@plt>
mov    -0x98(%rbp),%rcx
lea    0xd40(%rip),%rax
lea    0xd3e(%rip),%r8
movzbl -0x2(%rbp),%edx
bt     $0x4,%edx
cmovb  %rax,%r8
lea    0xd1a(%rip),%rdx
mov    $0x4,%esi
mov    %esi,%edi
call   1040 <bits@plt>
movzwl -0x2(%rbp),%eax
shr    $0x2,%eax
and    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0x90(%rbp)
sub    $0x3,%eax
ja     140a <cc2400_lmtst+0x2ca>
mov    -0x90(%rbp),%rax
lea    0xc5e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x50(%rbp),%rdi
lea    0xcb6(%rip),%rsi
call   1030 <strcpy@plt>
jmp    140a <cc2400_lmtst+0x2ca>
lea    -0x50(%rbp),%rdi
lea    0xcd2(%rip),%rsi
call   1030 <strcpy@plt>
jmp    140a <cc2400_lmtst+0x2ca>
lea    -0x50(%rbp),%rdi
lea    0xcc4(%rip),%rsi
call   1030 <strcpy@plt>
jmp    140a <cc2400_lmtst+0x2ca>
lea    -0x50(%rbp),%rdi
lea    0xcb6(%rip),%rsi
call   1030 <strcpy@plt>
lea    0xcb2(%rip),%rdx
lea    0xc27(%rip),%rcx
mov    $0x3,%edi
mov    $0x2,%esi
lea    -0x50(%rbp),%r8
call   1040 <bits@plt>
movzwl -0x2(%rbp),%eax
and    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0xa0(%rbp)
sub    $0x3,%eax
ja     14aa <cc2400_lmtst+0x36a>
mov    -0xa0(%rbp),%rax
lea    0xbce(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x50(%rbp),%rdi
lea    0xc66(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14aa <cc2400_lmtst+0x36a>
lea    -0x50(%rbp),%rdi
lea    0xc58(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14aa <cc2400_lmtst+0x36a>
lea    -0x50(%rbp),%rdi
lea    0xc4a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    14aa <cc2400_lmtst+0x36a>
lea    -0x50(%rbp),%rdi
lea    0xc3c(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x50(%rbp),%r8
mov    $0x1,%edi
xor    %esi,%esi
lea    0xc2d(%rip),%rdx
lea    0xb7c(%rip),%rcx
call   1040 <bits@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %edi,%r12d
lea    0xea9(%rip),%rdx
lea    0xea4(%rip),%rcx
lea    0xe9c(%rip),%rbx
mov    $0xf,%edi
mov    $0xe,%esi
mov    %rbx,%r8
call   1040 <bits@plt>
lea    0xe87(%rip),%rdx
lea    0xe8a(%rip),%r14
mov    $0xd,%edi
mov    $0xd,%esi
mov    %r14,%rcx
mov    %rbx,%r8
call   1040 <bits@plt>
mov    %r12d,%edx
shr    $0x9,%edx
and    $0xc,%edx
add    $0xc,%edx
lea    0xe65(%rip),%r15
mov    %rsp,%r13
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sprintf@plt>
lea    0xe56(%rip),%rdx
mov    $0xc,%edi
mov    $0xb,%esi
mov    %r14,%rcx
mov    %r13,%r8
call   1040 <bits@plt>
mov    %r12d,%ebx
shr    $0x7,%ebx
mov    %ebx,%edx
and    $0xc,%edx
or     $0x52,%edx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sprintf@plt>
lea    0xe2c(%rip),%rdx
mov    $0xa,%edi
mov    $0x9,%esi
mov    %r14,%rcx
mov    %r13,%r8
call   1040 <bits@plt>
and    $0x3,%ebx
lea    0xeb2(%rip),%rax
movslq (%rax,%rbx,4),%rsi
add    %rax,%rsi
mov    %r13,%rdi
call   1030 <strcpy@plt>
lea    0xe63(%rip),%rsi
mov    %r13,%rdi
call   1050 <strcat@plt>
lea    0xe03(%rip),%rdx
mov    $0x8,%edi
mov    $0x7,%esi
mov    %r14,%rcx
mov    %r13,%r8
call   1040 <bits@plt>
mov    %r12d,%eax
shr    $0x5,%eax
and    $0x3,%eax
je     126f <cc2400_lmtst+0x12f>
movzwl %ax,%edx
lea    0xdeb(%rip),%rsi
mov    %rsp,%rdi
call   1060 <sprintf@plt>
jmp    127e <cc2400_lmtst+0x13e>
lea    0xdd6(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
lea    0xdd3(%rip),%rdx
lea    0xd83(%rip),%r14
mov    %rsp,%r15
mov    $0x6,%edi
mov    $0x5,%esi
mov    %r14,%rcx
mov    %r15,%r8
call   1040 <bits@plt>
test   $0x10,%r12b
lea    0xdc8(%rip),%rax
lea    0xdbc(%rip),%r8
cmove  %rax,%r8
lea    0xda5(%rip),%rdx
mov    $0x4,%edi
mov    $0x4,%esi
mov    %r14,%rcx
call   1040 <bits@plt>
mov    %r12d,%eax
shr    $0x2,%eax
and    $0x3,%eax
lea    0xdf5(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
mov    %r15,%rdi
call   1030 <strcpy@plt>
lea    0xd9a(%rip),%rdx
mov    $0x3,%edi
mov    $0x2,%esi
mov    %r14,%rcx
mov    %r15,%r8
call   1040 <bits@plt>
and    $0x3,%r12d
lea    0xdcf(%rip),%rax
movslq (%rax,%r12,4),%rsi
add    %rax,%rsi
mov    %r15,%rdi
call   1030 <strcpy@plt>
lea    0xd8a(%rip),%rdx
mov    $0x1,%edi
xor    %esi,%esi
mov    %r14,%rcx
mov    %r15,%r8
call   1040 <bits@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"-\00"
@.str.1 = [3 x i8] c"W0\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"RXMIX_HGM\00"
@.str.4 = [3 x i8] c"RW\00"
@.str.5 = [6 x i8] c"%d uA\00"
@.str.6 = [11 x i8] c"RXMIX_TAIL\00"
@.str.7 = [10 x i8] c"RXMIX_CVM\00"
@.str.8 = [4 x i8] c"360\00"
@.str.9 = [4 x i8] c"720\00"
@.str.10 = [4 x i8] c"900\00"
@.str.11 = [5 x i8] c"1260\00"
@.str.12 = [4 x i8] c" uA\00"
@.str.13 = [14 x i8] c"RXMIX_CURRENT\00"
@.str.14 = [4 x i8] c"OFF\00"
@.str.15 = [8 x i8] c"0.%d pF\00"
@.str.16 = [14 x i8] c"LNA_CAP_ARRAY\00"
@.str.17 = [12 x i8] c"LNA_LOWGAIN\00"
@.str.18 = [5 x i8] c"7 dB\00"
@.str.19 = [6 x i8] c"19 dB\00"
@.str.20 = [7 x i8] c"100 uA\00"
@.str.21 = [7 x i8] c"300 uA\00"
@.str.22 = [8 x i8] c"1000 uA\00"
@.str.23 = [9 x i8] c"LNA_GAIN\00"
@.str.24 = [7 x i8] c"240 uA\00"
@.str.25 = [7 x i8] c"480 uA\00"
@.str.26 = [7 x i8] c"640 uA\00"
@.str.27 = [8 x i8] c"1280 uA\00"
@.str.28 = [12 x i8] c"LNA_CURRENT\00"
define void @cc2400_lmtst(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca [64 x i8]
store i16 %0, i16* %2
%4 = call i32 @bits(i32 15, i32 14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @bits(i32 13, i32 13, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = ashr i32 %8, 11
%10 = and i32 %9, 3
%11 = mul nsw i32 %10, 4
%12 = add nsw i32 %11, 12
%13 = trunc i32 %12 to i16
%14 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i16 zeroext %13)
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%16 = call i32 @bits(i32 12, i32 11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%18 = load i16, i16* %2
%19 = zext i16 %18 to i32
%20 = ashr i32 %19, 9
%21 = and i32 %20, 3
%22 = mul nsw i32 %21, 4
%23 = add nsw i32 %22, 82
%24 = trunc i32 %23 to i16
%25 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i16 zeroext %24)
%26 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%27 = call i32 @bits(i32 10, i32 9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %26)
%28 = load i16, i16* %2
%29 = zext i16 %28 to i32
%30 = ashr i32 %29, 7
%31 = and i32 %30, 3
switch i32 %31, label %44 [
i32 0, label %32
i32 1, label %35
i32 2, label %38
i32 3, label %41
]
32: ; preds = %1
%33 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%34 = call i32 @strcpy(i8* %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
br label %44
35: ; preds = %1
%36 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%37 = call i32 @strcpy(i8* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
br label %44
38: ; preds = %1
%39 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%40 = call i32 @strcpy(i8* %39, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
br label %44
41: ; preds = %1
%42 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%43 = call i32 @strcpy(i8* %42, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
br label %44
44: ; preds = %1, %41, %38, %35, %32
%45 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%46 = call i32 @strcat(i8* %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%47 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%48 = call i32 @bits(i32 8, i32 7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %47)
%49 = load i16, i16* %2
%50 = zext i16 %49 to i32
%51 = ashr i32 %50, 5
%52 = and i32 %51, 3
switch i32 %52, label %64 [
i32 0, label %53
i32 1, label %56
i32 2, label %56
i32 3, label %56
]
53: ; preds = %44
%54 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%55 = call i32 @strcpy(i8* %54, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
br label %64
56: ; preds = %44, %44, %44
%57 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%58 = load i16, i16* %2
%59 = zext i16 %58 to i32
%60 = ashr i32 %59, 5
%61 = and i32 %60, 3
%62 = trunc i32 %61 to i16
%63 = call i32 @sprintf(i8* %57, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i16 zeroext %62)
br label %64
64: ; preds = %44, %56, %53
%65 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%66 = call i32 @bits(i32 6, i32 5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %65)
%67 = load i16, i16* %2
%68 = zext i16 %67 to i32
%69 = ashr i32 %68, 4
%70 = and i32 %69, 1
%71 = icmp ne i32 %70, 0
%72 = zext i1 %71 to i64
%73 = select i1 %71, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0)
%74 = call i32 @bits(i32 4, i32 4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %73)
%75 = load i16, i16* %2
%76 = zext i16 %75 to i32
%77 = ashr i32 %76, 2
%78 = and i32 %77, 3
switch i32 %78, label %91 [
i32 0, label %79
i32 1, label %82
i32 2, label %85
i32 3, label %88
]
79: ; preds = %64
%80 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%81 = call i32 @strcpy(i8* %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
br label %91
82: ; preds = %64
%83 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%84 = call i32 @strcpy(i8* %83, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0))
br label %91
85: ; preds = %64
%86 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%87 = call i32 @strcpy(i8* %86, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.21, i64 0, i64 0))
br label %91
88: ; preds = %64
%89 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%90 = call i32 @strcpy(i8* %89, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.22, i64 0, i64 0))
br label %91
91: ; preds = %64, %88, %85, %82, %79
%92 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%93 = call i32 @bits(i32 3, i32 2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %92)
%94 = load i16, i16* %2
%95 = zext i16 %94 to i32
%96 = and i32 %95, 3
switch i32 %96, label %109 [
i32 0, label %97
i32 1, label %100
i32 2, label %103
i32 3, label %106
]
97: ; preds = %91
%98 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%99 = call i32 @strcpy(i8* %98, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0))
br label %109
100: ; preds = %91
%101 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%102 = call i32 @strcpy(i8* %101, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i64 0, i64 0))
br label %109
103: ; preds = %91
%104 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%105 = call i32 @strcpy(i8* %104, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.26, i64 0, i64 0))
br label %109
106: ; preds = %91
%107 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%108 = call i32 @strcpy(i8* %107, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.27, i64 0, i64 0))
br label %109
109: ; preds = %91, %106, %103, %100, %97
%110 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%111 = call i32 @bits(i32 1, i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %110)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
@.str.1 = [3 x i8] c"W0\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"RXMIX_HGM\00"
@.str.4 = [3 x i8] c"RW\00"
@.str.5 = [6 x i8] c"%d uA\00"
@.str.6 = [11 x i8] c"RXMIX_TAIL\00"
@.str.7 = [10 x i8] c"RXMIX_CVM\00"
@.str.8 = [4 x i8] c"360\00"
@.str.9 = [4 x i8] c"720\00"
@.str.10 = [4 x i8] c"900\00"
@.str.11 = [5 x i8] c"1260\00"
@.str.12 = [4 x i8] c" uA\00"
@.str.13 = [14 x i8] c"RXMIX_CURRENT\00"
@.str.14 = [4 x i8] c"OFF\00"
@.str.15 = [8 x i8] c"0.%d pF\00"
@.str.16 = [14 x i8] c"LNA_CAP_ARRAY\00"
@.str.17 = [12 x i8] c"LNA_LOWGAIN\00"
@.str.18 = [5 x i8] c"7 dB\00"
@.str.19 = [6 x i8] c"19 dB\00"
@.str.20 = [7 x i8] c"100 uA\00"
@.str.21 = [7 x i8] c"300 uA\00"
@.str.22 = [8 x i8] c"1000 uA\00"
@.str.23 = [9 x i8] c"LNA_GAIN\00"
@.str.24 = [7 x i8] c"240 uA\00"
@.str.25 = [7 x i8] c"480 uA\00"
@.str.26 = [7 x i8] c"640 uA\00"
@.str.27 = [8 x i8] c"1280 uA\00"
@.str.28 = [12 x i8] c"LNA_CURRENT\00"
@reltable.cc2400_lmtst = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.8 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.9 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.10 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.11 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst to i64)) to i32)]
@reltable.cc2400_lmtst.31 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.14 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst.31 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.20 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst.31 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.21 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst.31 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.22 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst.31 to i64)) to i32)]
@reltable.cc2400_lmtst.32 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.24 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.25 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.26 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.27 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_lmtst.32 to i64)) to i32)]
define void @cc2400_lmtst(i16 zeroext %0) {
%2 = alloca [64 x i8]
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @bits(i32 15, i32 14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @bits(i32 13, i32 13, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%6 = zext i16 %0 to i32
%7 = lshr i16 %0, 9
%8 = and i16 %7, 12
%9 = add nuw nsw i16 %8, 12
%10 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i16 zeroext %9)
%11 = call i32 @bits(i32 12, i32 11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %3)
%12 = lshr i16 %0, 7
%13 = and i16 %12, 12
%14 = or i16 %13, 82
%15 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i16 zeroext %14)
%16 = call i32 @bits(i32 10, i32 9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %3)
%17 = lshr i32 %6, 7
%18 = and i32 %17, 3
%19 = zext i32 %18 to i64
%20 = shl i64 %19, 2
%21 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.cc2400_lmtst to i8*), i64 %20)
%22 = call i32 @strcpy(i8* %3, i8* %21)
%23 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%24 = call i32 @bits(i32 8, i32 7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %3)
%25 = lshr i32 %6, 5
%26 = and i32 %25, 3
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %1
%29 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
br label %33
30: ; preds = %1
%31 = trunc i32 %26 to i16
%32 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i16 zeroext %31)
br label %33
33: ; preds = %30, %28
%34 = call i32 @bits(i32 6, i32 5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %3)
%35 = and i32 %6, 16
%36 = icmp eq i32 %35, 0
%37 = select i1 %36, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0)
%38 = call i32 @bits(i32 4, i32 4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %37)
%39 = lshr i32 %6, 2
%40 = and i32 %39, 3
%41 = zext i32 %40 to i64
%42 = shl i64 %41, 2
%43 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.cc2400_lmtst.31 to i8*), i64 %42)
%44 = call i32 @strcpy(i8* %3, i8* %43)
%45 = call i32 @bits(i32 3, i32 2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %3)
%46 = and i32 %6, 3
%47 = zext i32 %46 to i64
%48 = shl i64 %47, 2
%49 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.cc2400_lmtst.32 to i8*), i64 %48)
%50 = call i32 @strcpy(i8* %3, i8* %49)
%51 = call i32 @bits(i32 1, i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.28, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %3)
ret void
}