#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);
void cc2400_grmdm(unsigned short v) {
  char *pinmode[] = {"Unbuffered", "Buffered", "HSSD test", "Unused"};
  char *prebytes[] = {"0", "1", "2", "4", "8", "16", "32", "Infinitely On"};
  char *syncwordsize[] = {"8", "16", "24", "32"};
  char *dataformat[] = {"NRZ", "Manchester", "8/10", "Reserved"};
  char description[64];
  bits(15, 15, "-", "W0", "");
  sprintf(description, "%d", (v >> 13) & 3);
  bits(14, 13, "SYNC_ERRBITS_ALLOWED", "RW", description);
  bits(12, 11, "PIN_MODE", "RW", pinmode[(v >> 11) & 3]);
  bits(10, 10, "PACKET_MODE", "RW", "");
  bits(9, 7, "PRE_BYTES", "RW", prebytes[(v >> 7) & 7]);
  bits(6, 5, "SYNC_WORD_SIZE", "RW", syncwordsize[(v >> 5) & 3]);
  bits(4, 4, "CRC_ON", "RW", "");
  bits(3, 2, "DATA_FORMAT", "RW", dataformat[(v >> 2) & 3]);
  bits(1, 1, "MODULATION_FORMAT", "RW",
       ((v >> 1) & 1) ? "Reserved" : "FSK/GFSK");
  bits(0, 0, "TX_GAUSSIAN_FILTER", "RW", "");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    0x2c37(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c34(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2c31(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2c2e(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x70(%rbp),%rdi
lea    0x2c27(%rip),%rsi
mov    $0x40,%edx
call   1030 <memcpy@plt>
mov    0x2c56(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0x2c50(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0x2c4a(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0x2c47(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0x2c44(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0x2c3e(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0x2c38(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2c32(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    $0xf,%esi
lea    0xe64(%rip),%rdx
lea    0xe5f(%rip),%rcx
lea    0xe57(%rip),%r8
mov    %esi,%edi
call   1040 <bits@plt>
lea    -0xf0(%rbp),%rdi
movzwl -0x2(%rbp),%eax
sar    $0xd,%eax
and    $0x3,%eax
lea    0xe3c(%rip),%rsi
movzwl %ax,%edx
call   1050 <sprintf@plt>
lea    -0xf0(%rbp),%r8
mov    $0xe,%edi
mov    $0xd,%esi
lea    0xe1f(%rip),%rdx
lea    0xe2d(%rip),%rcx
call   1040 <bits@plt>
movzwl -0x2(%rbp),%eax
sar    $0xb,%eax
and    $0x3,%eax
cltq
mov    -0x30(%rbp,%rax,8),%r8
mov    $0xc,%edi
mov    $0xb,%esi
lea    0xe09(%rip),%rdx
lea    0xdff(%rip),%rcx
call   1040 <bits@plt>
mov    $0xa,%esi
lea    0xdfa(%rip),%rdx
lea    0xde7(%rip),%rcx
lea    0xdc4(%rip),%r8
mov    %esi,%edi
call   1040 <bits@plt>
movzwl -0x2(%rbp),%eax
sar    $0x7,%eax
and    $0x7,%eax
cltq
mov    -0x70(%rbp,%rax,8),%r8
mov    $0x9,%edi
mov    $0x7,%esi
lea    0xdcf(%rip),%rdx
lea    0xdb0(%rip),%rcx
call   1040 <bits@plt>
movzwl -0x2(%rbp),%eax
sar    $0x5,%eax
and    $0x3,%eax
cltq
mov    -0x90(%rbp,%rax,8),%r8
ff
mov    $0x6,%edi
mov    $0x5,%esi
lea    0xda8(%rip),%rdx
lea    0xd7f(%rip),%rcx
call   1040 <bits@plt>
mov    $0x4,%esi
lea    0xd9f(%rip),%rdx
lea    0xd67(%rip),%rcx
lea    0xd44(%rip),%r8
mov    %esi,%edi
call   1040 <bits@plt>
movzwl -0x2(%rbp),%eax
sar    $0x2,%eax
and    $0x3,%eax
cltq
mov    -0xb0(%rbp,%rax,8),%r8
ff
mov    $0x3,%edi
mov    $0x2,%esi
lea    0xd6c(%rip),%rdx
lea    0xd2d(%rip),%rcx
call   1040 <bits@plt>
movzwl -0x2(%rbp),%ecx
sar    $0x1,%ecx
and    $0x1,%ecx
lea    0xd6d(%rip),%r8
lea    0xcea(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%r8
mov    $0x1,%esi
lea    0xd41(%rip),%rdx
lea    0xcf6(%rip),%rcx
mov    %esi,%edi
call   1040 <bits@plt>
xor    %esi,%esi
lea    0xd45(%rip),%rdx
lea    0xcdf(%rip),%rcx
lea    0xcbc(%rip),%r8
mov    %esi,%edi
call   1040 <bits@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %edi,%ebp
lea    0xf2a(%rip),%rdx
lea    0xf25(%rip),%rcx
lea    0xf1d(%rip),%r14
mov    $0xf,%edi
mov    $0xf,%esi
mov    %r14,%r8
call   1030 <bits@plt>
mov    %ebp,%edx
shr    $0xd,%edx
and    $0x3,%edx
lea    0xf00(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0xef1(%rip),%rdx
lea    0xeff(%rip),%r15
mov    $0xe,%edi
mov    $0xd,%esi
mov    %r15,%rcx
mov    %rbx,%r8
call   1030 <bits@plt>
mov    %ebp,%eax
shr    $0xb,%eax
and    $0x3,%eax
lea    0xf4d(%rip),%rcx
movslq (%rcx,%rax,4),%r8
add    %rcx,%r8
lea    0xed0(%rip),%rdx
mov    $0xc,%edi
mov    $0xb,%esi
mov    %r15,%rcx
call   1030 <bits@plt>
lea    0xec0(%rip),%rdx
mov    $0xa,%edi
mov    $0xa,%esi
mov    %r15,%rcx
mov    %r14,%r8
call   1030 <bits@plt>
mov    %ebp,%eax
shr    $0x7,%eax
and    $0x7,%eax
lea    0xf12(%rip),%rcx
movslq (%rcx,%rax,4),%r8
add    %rcx,%r8
lea    0xe9a(%rip),%rdx
mov    $0x9,%edi
mov    $0x7,%esi
mov    %r15,%rcx
call   1030 <bits@plt>
mov    %ebp,%eax
shr    $0x5,%eax
and    $0x3,%eax
lea    0xf03(%rip),%rcx
movslq (%rcx,%rax,4),%r8
add    %rcx,%r8
lea    0xe75(%rip),%rdx
mov    $0x6,%edi
mov    $0x5,%esi
mov    %r15,%rcx
call   1030 <bits@plt>
lea    0xe6b(%rip),%rdx
mov    $0x4,%edi
mov    $0x4,%esi
mov    %r15,%rcx
mov    %r14,%r8
call   1030 <bits@plt>
mov    %ebp,%eax
shr    $0x2,%eax
and    $0x3,%eax
lea    0xec8(%rip),%rcx
movslq (%rcx,%rax,4),%r8
add    %rcx,%r8
lea    0xe40(%rip),%rdx
mov    $0x3,%edi
mov    $0x2,%esi
mov    %r15,%rcx
call   1030 <bits@plt>
test   $0x2,%bpl
lea    0xe41(%rip),%rax
lea    0xdbe(%rip),%r8
cmove  %rax,%r8
lea    0xe1d(%rip),%rdx
mov    $0x1,%edi
mov    $0x1,%esi
mov    %r15,%rcx
call   1030 <bits@plt>
lea    0xe1f(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
mov    %r15,%rcx
mov    %r14,%r8
call   1030 <bits@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Unbuffered\00"
@.str.1 = [9 x i8] c"Buffered\00"
@.str.2 = [10 x i8] c"HSSD test\00"
@.str.3 = [7 x i8] c"Unused\00"
@__const.cc2400_grmdm.pinmode = [4 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [2 x i8] c"0\00"
@.str.5 = [2 x i8] c"1\00"
@.str.6 = [2 x i8] c"2\00"
@.str.7 = [2 x i8] c"4\00"
@.str.8 = [2 x i8] c"8\00"
@.str.9 = [3 x i8] c"16\00"
@.str.10 = [3 x i8] c"32\00"
@.str.11 = [14 x i8] c"Infinitely On\00"
@__const.cc2400_grmdm.prebytes = [8 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i32 0, i32 0)]
@.str.12 = [3 x i8] c"24\00"
@__const.cc2400_grmdm.syncwordsize = [4 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i32 0, i32 0)]
@.str.13 = [4 x i8] c"NRZ\00"
@.str.14 = [11 x i8] c"Manchester\00"
@.str.15 = [5 x i8] c"8/10\00"
@.str.16 = [9 x i8] c"Reserved\00"
@__const.cc2400_grmdm.dataformat = [4 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i32 0, i32 0)]
@.str.17 = [2 x i8] c"-\00"
@.str.18 = [3 x i8] c"W0\00"
@.str.19 = [1 x i8] zeroinitializer
@.str.20 = [3 x i8] c"%d\00"
@.str.21 = [21 x i8] c"SYNC_ERRBITS_ALLOWED\00"
@.str.22 = [3 x i8] c"RW\00"
@.str.23 = [9 x i8] c"PIN_MODE\00"
@.str.24 = [12 x i8] c"PACKET_MODE\00"
@.str.25 = [10 x i8] c"PRE_BYTES\00"
@.str.26 = [15 x i8] c"SYNC_WORD_SIZE\00"
@.str.27 = [7 x i8] c"CRC_ON\00"
@.str.28 = [12 x i8] c"DATA_FORMAT\00"
@.str.29 = [18 x i8] c"MODULATION_FORMAT\00"
@.str.30 = [9 x i8] c"FSK/GFSK\00"
@.str.31 = [19 x i8] c"TX_GAUSSIAN_FILTER\00"
define void @cc2400_grmdm(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca [4 x i8*]
%4 = alloca [8 x i8*]
%5 = alloca [4 x i8*]
%6 = alloca [4 x i8*]
%7 = alloca [64 x i8]
store i16 %0, i16* %2
%8 = bitcast [4 x i8*]* %3 to i8*
%9 = bitcast [8 x i8*]* %4 to i8*
%10 = bitcast [4 x i8*]* %5 to i8*
%11 = bitcast [4 x i8*]* %6 to i8*
%12 = call i32 @bits(i32 15, i32 15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%13 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%14 = load i16, i16* %2
%15 = zext i16 %14 to i32
%16 = ashr i32 %15, 13
%17 = and i32 %16, 3
%18 = trunc i32 %17 to i16
%19 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i16 zeroext %18)
%20 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%21 = call i32 @bits(i32 14, i32 13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* %20)
%22 = load i16, i16* %2
%23 = zext i16 %22 to i32
%24 = ashr i32 %23, 11
%25 = and i32 %24, 3
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 %26
%28 = load i8*, i8** %27
%29 = call i32 @bits(i32 12, i32 11, 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.22, i64 0, i64 0), i8* %28)
%30 = call i32 @bits(i32 10, i32 10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%31 = load i16, i16* %2
%32 = zext i16 %31 to i32
%33 = ashr i32 %32, 7
%34 = and i32 %33, 7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [8 x i8*], [8 x i8*]* %4, i64 0, i64 %35
%37 = load i8*, i8** %36
%38 = call i32 @bits(i32 9, i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* %37)
%39 = load i16, i16* %2
%40 = zext i16 %39 to i32
%41 = ashr i32 %40, 5
%42 = and i32 %41, 3
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [4 x i8*], [4 x i8*]* %5, i64 0, i64 %43
%45 = load i8*, i8** %44
%46 = call i32 @bits(i32 6, i32 5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* %45)
%47 = call i32 @bits(i32 4, i32 4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%48 = load i16, i16* %2
%49 = zext i16 %48 to i32
%50 = ashr i32 %49, 2
%51 = and i32 %50, 3
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [4 x i8*], [4 x i8*]* %6, i64 0, i64 %52
%54 = load i8*, i8** %53
%55 = call i32 @bits(i32 3, i32 2, 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.22, i64 0, i64 0), i8* %54)
%56 = load i16, i16* %2
%57 = zext i16 %56 to i32
%58 = ashr i32 %57, 1
%59 = and i32 %58, 1
%60 = icmp ne i32 %59, 0
%61 = zext i1 %60 to i64
%62 = select i1 %60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0)
%63 = call i32 @bits(i32 1, i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* %62)
%64 = call i32 @bits(i32 0, i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Unbuffered\00"
@.str.1 = [9 x i8] c"Buffered\00"
@.str.2 = [10 x i8] c"HSSD test\00"
@.str.3 = [7 x i8] c"Unused\00"
@reltable.cc2400_grmdm = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm to i64)) to i32)]
@.str.4 = [2 x i8] c"0\00"
@.str.5 = [2 x i8] c"1\00"
@.str.6 = [2 x i8] c"2\00"
@.str.7 = [2 x i8] c"4\00"
@.str.8 = [2 x i8] c"8\00"
@.str.9 = [3 x i8] c"16\00"
@.str.10 = [3 x i8] c"32\00"
@.str.11 = [14 x i8] c"Infinitely On\00"
@reltable.cc2400_grmdm.32 = [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.4 to i64), i64 ptrtoint ([8 x i32]* @reltable.cc2400_grmdm.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.5 to i64), i64 ptrtoint ([8 x i32]* @reltable.cc2400_grmdm.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.6 to i64), i64 ptrtoint ([8 x i32]* @reltable.cc2400_grmdm.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.7 to i64), i64 ptrtoint ([8 x i32]* @reltable.cc2400_grmdm.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.8 to i64), i64 ptrtoint ([8 x i32]* @reltable.cc2400_grmdm.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.9 to i64), i64 ptrtoint ([8 x i32]* @reltable.cc2400_grmdm.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.10 to i64), i64 ptrtoint ([8 x i32]* @reltable.cc2400_grmdm.32 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.11 to i64), i64 ptrtoint ([8 x i32]* @reltable.cc2400_grmdm.32 to i64)) to i32)]
@.str.12 = [3 x i8] c"24\00"
@reltable.cc2400_grmdm.33 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.8 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm.33 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.9 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm.33 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.12 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm.33 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.10 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm.33 to i64)) to i32)]
@.str.13 = [4 x i8] c"NRZ\00"
@.str.14 = [11 x i8] c"Manchester\00"
@.str.15 = [5 x i8] c"8/10\00"
@.str.16 = [9 x i8] c"Reserved\00"
@reltable.cc2400_grmdm.34 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.13 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm.34 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.14 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm.34 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.15 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm.34 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.16 to i64), i64 ptrtoint ([4 x i32]* @reltable.cc2400_grmdm.34 to i64)) to i32)]
@.str.17 = [2 x i8] c"-\00"
@.str.18 = [3 x i8] c"W0\00"
@.str.19 = [1 x i8] zeroinitializer
@.str.20 = [3 x i8] c"%d\00"
@.str.21 = [21 x i8] c"SYNC_ERRBITS_ALLOWED\00"
@.str.22 = [3 x i8] c"RW\00"
@.str.23 = [9 x i8] c"PIN_MODE\00"
@.str.24 = [12 x i8] c"PACKET_MODE\00"
@.str.25 = [10 x i8] c"PRE_BYTES\00"
@.str.26 = [15 x i8] c"SYNC_WORD_SIZE\00"
@.str.27 = [7 x i8] c"CRC_ON\00"
@.str.28 = [12 x i8] c"DATA_FORMAT\00"
@.str.29 = [18 x i8] c"MODULATION_FORMAT\00"
@.str.30 = [9 x i8] c"FSK/GFSK\00"
@.str.31 = [19 x i8] c"TX_GAUSSIAN_FILTER\00"
define void @cc2400_grmdm(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 15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%5 = zext i16 %0 to i32
%6 = lshr i16 %0, 13
%7 = and i16 %6, 3
%8 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0), i16 zeroext %7)
%9 = call i32 @bits(i32 14, i32 13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* %3)
%10 = lshr i32 %5, 11
%11 = and i32 %10, 3
%12 = zext i32 %11 to i64
%13 = shl i64 %12, 2
%14 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.cc2400_grmdm to i8*), i64 %13)
%15 = call i32 @bits(i32 12, i32 11, 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.22, i64 0, i64 0), i8* %14)
%16 = call i32 @bits(i32 10, i32 10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%17 = lshr i32 %5, 7
%18 = and i32 %17, 7
%19 = zext i32 %18 to i64
%20 = shl i64 %19, 2
%21 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.cc2400_grmdm.32 to i8*), i64 %20)
%22 = call i32 @bits(i32 9, i32 7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* %21)
%23 = lshr i32 %5, 5
%24 = and i32 %23, 3
%25 = zext i32 %24 to i64
%26 = shl i64 %25, 2
%27 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.cc2400_grmdm.33 to i8*), i64 %26)
%28 = call i32 @bits(i32 6, i32 5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* %27)
%29 = call i32 @bits(i32 4, i32 4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%30 = lshr i32 %5, 2
%31 = and i32 %30, 3
%32 = zext i32 %31 to i64
%33 = shl i64 %32, 2
%34 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.cc2400_grmdm.34 to i8*), i64 %33)
%35 = call i32 @bits(i32 3, i32 2, 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.22, i64 0, i64 0), i8* %34)
%36 = and i32 %5, 2
%37 = icmp eq i32 %36, 0
%38 = select i1 %37, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0)
%39 = call i32 @bits(i32 1, i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* %38)
%40 = call i32 @bits(i32 0, i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.31, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
ret void
}