#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 */
struct NetFrame {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ FRAMERR(struct NetFrame *, char *, unsigned int,
                           unsigned int, unsigned int, unsigned int,
                           unsigned int);
const char *group_name(struct NetFrame *frame, unsigned group_address) {
  switch (group_address) {
  case 0xeffffffa:
    return "SSDP";
    break;
  case 0xe0000001:
    return "all local hosts";
    break;
  case 0xe0000002:
    return "all local routers";
    break;
  case 0xe0000005:
    return "ospf";
    break;
  case 0xe0000009:
    return "RIPv2";
    break;
  case 0xe000000d:
    return "pim";
    break;
  case 0xe0000016:
    return "igmp";
    break;
  case 0xe00000fb:
    return "mDNS";
    break;
  case 0xe00000fc:
    return "mDNS Local Name Resolution";
    break;
  case 0xe0000116:
    return "SLP (General)";
    break;
  case 0xe0000123:
    return "SLP (Discovery)";
    break;
  case 0xe4c8c8c9:
    return "(unknown)";
    break;
  case 0xeffffffd:
    return "SLP (Admin Scoped)";
    break;
  default:
    FRAMERR(frame, "igmp: unknown group: %d.%d.%d.%d (0x%08x)\n",
            (group_address >> 24) & 0xFF, (group_address >> 16) & 0xFF,
            (group_address >> 8) & 0xFF, (group_address >> 0) & 0xFF,
            group_address);
    return "(unknown)";
  }
}


x86 assembly (clang, -O0):
<group_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
sub    $0xe0000001,%eax
je     1229 <group_name+0x119>
jmp    1135 <group_name+0x25>
mov    -0x18(%rbp),%eax
sub    $0xe0000002,%eax
je     1239 <group_name+0x129>
jmp    1148 <group_name+0x38>
mov    -0x18(%rbp),%eax
sub    $0xe0000005,%eax
je     1249 <group_name+0x139>
jmp    115b <group_name+0x4b>
mov    -0x18(%rbp),%eax
sub    $0xe0000009,%eax
je     1259 <group_name+0x149>
jmp    116e <group_name+0x5e>
mov    -0x18(%rbp),%eax
sub    $0xe000000d,%eax
je     1269 <group_name+0x159>
jmp    1181 <group_name+0x71>
mov    -0x18(%rbp),%eax
sub    $0xe0000016,%eax
je     1279 <group_name+0x169>
jmp    1194 <group_name+0x84>
mov    -0x18(%rbp),%eax
sub    $0xe00000fb,%eax
je     1289 <group_name+0x179>
jmp    11a7 <group_name+0x97>
mov    -0x18(%rbp),%eax
sub    $0xe00000fc,%eax
je     1299 <group_name+0x189>
jmp    11ba <group_name+0xaa>
mov    -0x18(%rbp),%eax
sub    $0xe0000116,%eax
je     12a9 <group_name+0x199>
jmp    11cd <group_name+0xbd>
mov    -0x18(%rbp),%eax
sub    $0xe0000123,%eax
je     12b9 <group_name+0x1a9>
jmp    11e0 <group_name+0xd0>
mov    -0x18(%rbp),%eax
sub    $0xe4c8c8c9,%eax
je     12c9 <group_name+0x1b9>
jmp    11f3 <group_name+0xe3>
mov    -0x18(%rbp),%eax
sub    $0xeffffffa,%eax
je     1219 <group_name+0x109>
jmp    1206 <group_name+0xf6>
mov    -0x18(%rbp),%eax
sub    $0xeffffffd,%eax
je     12d9 <group_name+0x1c9>
jmp    12e9 <group_name+0x1d9>
lea    0xde0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xdd5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xdd5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xdd7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xdcc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xdc2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xdb6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xdab(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xda0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xdab(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xda9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xda9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
lea    0xda3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1340 <group_name+0x230>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
shr    $0x18,%edx
and    $0xff,%edx
mov    -0x14(%rbp),%ecx
shr    $0x10,%ecx
and    $0xff,%ecx
mov    -0x14(%rbp),%r8d
shr    $0x8,%r8d
and    $0xff,%r8d
mov    -0x14(%rbp),%r9d
shr    $0x0,%r9d
and    $0xff,%r9d
mov    -0x14(%rbp),%eax
lea    0xd69(%rip),%rsi
mov    %eax,(%rsp)
call   1030 <FRAMERR@plt>
lea    0xd3d(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<group_name>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%eax
cmp    $0xe00000fb,%esi
jg     1146 <group_name+0x36>
lea    0x1fffffff(%rax),%ecx
cmp    $0x15,%ecx
ja     119b <group_name+0x8b>
lea    0xecf(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xf1c(%rip),%rax
jmp    1220 <group_name+0x110>
cmp    $0xe4c8c8c8,%eax
jg     1176 <group_name+0x66>
cmp    $0xe00000fc,%eax
je     1207 <group_name+0xf7>
cmp    $0xe0000116,%eax
je     1210 <group_name+0x100>
cmp    $0xe0000123,%eax
jne    11ab <group_name+0x9b>
lea    0xf50(%rip),%rax
jmp    1220 <group_name+0x110>
cmp    $0xe4c8c8c9,%eax
je     11d1 <group_name+0xc1>
cmp    $0xeffffffa,%eax
je     1219 <group_name+0x109>
cmp    $0xeffffffd,%eax
jne    11ab <group_name+0x9b>
lea    0xf45(%rip),%rax
jmp    1220 <group_name+0x110>
cmp    $0xe00000fb,%eax
jne    11ab <group_name+0x9b>
lea    0xeea(%rip),%rax
jmp    1220 <group_name+0x110>
mov    %eax,%edx
shr    $0x18,%edx
mov    %eax,%ecx
shr    $0x10,%ecx
movzbl %cl,%ecx
movzbl %ah,%ebx
movzbl %al,%r9d
mov    %eax,(%rsp)
lea    0xf25(%rip),%rsi
mov    %ebx,%r8d
call   1030 <FRAMERR@plt>
lea    0xef9(%rip),%rax
jmp    1220 <group_name+0x110>
lea    0xe8c(%rip),%rax
jmp    1220 <group_name+0x110>
lea    0xe95(%rip),%rax
jmp    1220 <group_name+0x110>
lea    0xe91(%rip),%rax
jmp    1220 <group_name+0x110>
lea    0xe8e(%rip),%rax
jmp    1220 <group_name+0x110>
lea    0xe89(%rip),%rax
jmp    1220 <group_name+0x110>
lea    0xe8a(%rip),%rax
jmp    1220 <group_name+0x110>
lea    0xe9c(%rip),%rax
jmp    1220 <group_name+0x110>
lea    0xe38(%rip),%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.NetFrame = type { i32 }
@.str = [5 x i8] c"SSDP\00"
@.str.1 = [16 x i8] c"all local hosts\00"
@.str.2 = [18 x i8] c"all local routers\00"
@.str.3 = [5 x i8] c"ospf\00"
@.str.4 = [6 x i8] c"RIPv2\00"
@.str.5 = [4 x i8] c"pim\00"
@.str.6 = [5 x i8] c"igmp\00"
@.str.7 = [5 x i8] c"mDNS\00"
@.str.8 = [27 x i8] c"mDNS Local Name Resolution\00"
@.str.9 = [14 x i8] c"SLP (General)\00"
@.str.10 = [16 x i8] c"SLP (Discovery)\00"
@.str.11 = [10 x i8] c"(unknown)\00"
@.str.12 = [19 x i8] c"SLP (Admin Scoped)\00"
@.str.13 = [43 x i8] c"igmp: unknown group: %d.%d.%d.%d (0x%08x)\0A\00"
define i8* @group_name(%struct.NetFrame* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca %struct.NetFrame*
%5 = alloca i32
store %struct.NetFrame* %0, %struct.NetFrame** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
switch i32 %6, label %20 [
i32 -268435462, label %7
i32 -536870911, label %8
i32 -536870910, label %9
i32 -536870907, label %10
i32 -536870903, label %11
i32 -536870899, label %12
i32 -536870890, label %13
i32 -536870661, label %14
i32 -536870660, label %15
i32 -536870634, label %16
i32 -536870621, label %17
i32 -456603447, label %18
i32 -268435459, label %19
]
7: ; preds = %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %3
br label %36
8: ; preds = %2
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %36
9: ; preds = %2
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %36
10: ; preds = %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %36
11: ; preds = %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %36
12: ; preds = %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %36
13: ; preds = %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %36
14: ; preds = %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %36
15: ; preds = %2
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %36
16: ; preds = %2
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %36
17: ; preds = %2
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %36
18: ; preds = %2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %36
19: ; preds = %2
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %36
20: ; preds = %2
%21 = load %struct.NetFrame*, %struct.NetFrame** %4
%22 = load i32, i32* %5
%23 = lshr i32 %22, 24
%24 = and i32 %23, 255
%25 = load i32, i32* %5
%26 = lshr i32 %25, 16
%27 = and i32 %26, 255
%28 = load i32, i32* %5
%29 = lshr i32 %28, 8
%30 = and i32 %29, 255
%31 = load i32, i32* %5
%32 = lshr i32 %31, 0
%33 = and i32 %32, 255
%34 = load i32, i32* %5
%35 = call i32 @FRAMERR(%struct.NetFrame* %21, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.13, i64 0, i64 0), i32 %24, i32 %27, i32 %30, i32 %33, i32 %34)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %36
36: ; preds = %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7
%37 = load i8*, i8** %3
ret i8* %37
}

LLVM IR (-O2):
%struct.NetFrame = type { i32 }
@.str = [5 x i8] c"SSDP\00"
@.str.1 = [16 x i8] c"all local hosts\00"
@.str.2 = [18 x i8] c"all local routers\00"
@.str.3 = [5 x i8] c"ospf\00"
@.str.4 = [6 x i8] c"RIPv2\00"
@.str.5 = [4 x i8] c"pim\00"
@.str.6 = [5 x i8] c"igmp\00"
@.str.7 = [5 x i8] c"mDNS\00"
@.str.8 = [27 x i8] c"mDNS Local Name Resolution\00"
@.str.9 = [14 x i8] c"SLP (General)\00"
@.str.10 = [16 x i8] c"SLP (Discovery)\00"
@.str.11 = [10 x i8] c"(unknown)\00"
@.str.12 = [19 x i8] c"SLP (Admin Scoped)\00"
@.str.13 = [43 x i8] c"igmp: unknown group: %d.%d.%d.%d (0x%08x)\0A\00"
define i8* @group_name(%struct.NetFrame* %0, i32 %1) {
switch i32 %1, label %15 [
i32 -268435462, label %23
i32 -536870911, label %3
i32 -536870910, label %4
i32 -536870907, label %5
i32 -536870903, label %6
i32 -536870899, label %7
i32 -536870890, label %8
i32 -536870661, label %9
i32 -536870660, label %10
i32 -536870634, label %11
i32 -536870621, label %12
i32 -456603447, label %13
i32 -268435459, label %14
]
3: ; preds = %2
br label %23
4: ; preds = %2
br label %23
5: ; preds = %2
br label %23
6: ; preds = %2
br label %23
7: ; preds = %2
br label %23
8: ; preds = %2
br label %23
9: ; preds = %2
br label %23
10: ; preds = %2
br label %23
11: ; preds = %2
br label %23
12: ; preds = %2
br label %23
13: ; preds = %2
br label %23
14: ; preds = %2
br label %23
15: ; preds = %2
%16 = lshr i32 %1, 24
%17 = lshr i32 %1, 16
%18 = and i32 %17, 255
%19 = lshr i32 %1, 8
%20 = and i32 %19, 255
%21 = and i32 %1, 255
%22 = tail call i32 @FRAMERR(%struct.NetFrame* %0, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.13, i64 0, i64 0), i32 %16, i32 %18, i32 %20, i32 %21, i32 %1)
br label %23
23: ; preds = %2, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3
%24 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), %15 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), %14 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), %13 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), %12 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), %11 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), %10 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), %8 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %2 ]
ret i8* %24
}