#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 *);
void cc2400_pktstatus(unsigned short v) {
  (void)(v);
  bits(15, 11, "-", "W0", "");
  bits(10, 10, "SYNC_WORD_RECEIVED", "RO", "");
  bits(9, 9, "CRC_OK", "RO", "");
  bits(8, 8, "-", "RO", "");
  bits(7, 0, "-", "RO", "");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0xf,%edi
mov    $0xb,%esi
lea    0xed0(%rip),%rdx
lea    0xecb(%rip),%rcx
lea    0xec3(%rip),%r8
call   1030 <bits@plt>
mov    $0xa,%esi
lea    0xeb6(%rip),%rdx
lea    0xec2(%rip),%rcx
lea    0xea4(%rip),%r8
mov    %esi,%edi
call   1030 <bits@plt>
mov    $0x9,%esi
lea    0xeab(%rip),%rdx
lea    0xea1(%rip),%rcx
lea    0xe83(%rip),%r8
mov    %esi,%edi
call   1030 <bits@plt>
mov    $0x8,%esi
lea    0xe6f(%rip),%rdx
lea    0xe80(%rip),%rcx
lea    0xe62(%rip),%r8
mov    %esi,%edi
call   1030 <bits@plt>
mov    $0x7,%edi
xor    %esi,%esi
lea    0xe4c(%rip),%rdx
lea    0xe5d(%rip),%rcx
lea    0xe3f(%rip),%r8
call   1030 <bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %r15
push   %r14
push   %rbx
lea    0xee4(%rip),%r14
lea    0xedf(%rip),%rcx
lea    0xed7(%rip),%r15
mov    $0xf,%edi
mov    $0xb,%esi
mov    %r14,%rdx
mov    %r15,%r8
call   1030 <bits@plt>
lea    0xebf(%rip),%rdx
lea    0xecb(%rip),%rbx
mov    $0xa,%edi
mov    $0xa,%esi
mov    %rbx,%rcx
mov    %r15,%r8
call   1030 <bits@plt>
lea    0xeb2(%rip),%rdx
mov    $0x9,%edi
mov    $0x9,%esi
mov    %rbx,%rcx
mov    %r15,%r8
call   1030 <bits@plt>
mov    $0x8,%edi
mov    $0x8,%esi
mov    %r14,%rdx
mov    %rbx,%rcx
mov    %r15,%r8
call   1030 <bits@plt>
mov    $0x7,%edi
xor    %esi,%esi
mov    %r14,%rdx
mov    %rbx,%rcx
mov    %r15,%r8
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <bits@plt>

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 = [19 x i8] c"SYNC_WORD_RECEIVED\00"
@.str.4 = [3 x i8] c"RO\00"
@.str.5 = [7 x i8] c"CRC_OK\00"
define void @cc2400_pktstatus(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @bits(i32 15, i32 11, 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 10, i32 10, i8* getelementptr inbounds ([19 x i8], [19 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 = call i32 @bits(i32 9, i32 9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, 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))
%7 = call i32 @bits(i32 8, i32 8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, 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))
%8 = call i32 @bits(i32 7, i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, 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))
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 = [19 x i8] c"SYNC_WORD_RECEIVED\00"
@.str.4 = [3 x i8] c"RO\00"
@.str.5 = [7 x i8] c"CRC_OK\00"
define void @cc2400_pktstatus(i16 zeroext %0) {
%2 = tail call i32 @bits(i32 15, i32 11, 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))
%3 = tail call i32 @bits(i32 10, i32 10, i8* getelementptr inbounds ([19 x i8], [19 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))
%4 = tail call i32 @bits(i32 9, i32 9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, 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))
%5 = tail call i32 @bits(i32 8, i32 8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, 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 = tail call i32 @bits(i32 7, i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, 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))
ret void
}