#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);
const char *group_name(struct NetFrame *frame, unsigned group_address) {
  switch (group_address) {
  case 0xeffffffa:
    return "SSDP";
    break;
  case 0xe00000fb:
    return "mDNS";
    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\n",
            (group_address >> 24) & 0xFF, (group_address >> 16) & 0xFF,
            (group_address >> 8) & 0xFF, (group_address >> 0) & 0xFF);
    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    $0xe00000fb,%eax
je     11a4 <group_name+0x94>
jmp    1135 <group_name+0x25>
mov    -0x18(%rbp),%eax
sub    $0xe0000116,%eax
je     11b4 <group_name+0xa4>
jmp    1148 <group_name+0x38>
mov    -0x18(%rbp),%eax
sub    $0xe0000123,%eax
je     11c4 <group_name+0xb4>
jmp    115b <group_name+0x4b>
mov    -0x18(%rbp),%eax
sub    $0xe4c8c8c9,%eax
je     11d4 <group_name+0xc4>
jmp    116e <group_name+0x5e>
mov    -0x18(%rbp),%eax
sub    $0xeffffffa,%eax
je     1194 <group_name+0x84>
jmp    1181 <group_name+0x71>
mov    -0x18(%rbp),%eax
sub    $0xeffffffd,%eax
je     11e4 <group_name+0xd4>
jmp    11f4 <group_name+0xe4>
lea    0xe65(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1245 <group_name+0x135>
lea    0xe5a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1245 <group_name+0x135>
lea    0xe4f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1245 <group_name+0x135>
lea    0xe4d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1245 <group_name+0x135>
lea    0xe4d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1245 <group_name+0x135>
lea    0xe47(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1245 <group_name+0x135>
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
lea    0xe10(%rip),%rsi
call   1030 <FRAMERR@plt>
lea    0xde7(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<group_name>:
mov    %esi,%eax
cmp    $0xe4c8c8c8,%esi
jg     1137 <group_name+0x27>
cmp    $0xe00000fb,%eax
je     1154 <group_name+0x44>
cmp    $0xe0000116,%eax
je     115c <group_name+0x4c>
cmp    $0xe0000123,%eax
jne    1174 <group_name+0x64>
lea    0xee2(%rip),%rax
ret
cmp    $0xe4c8c8c9,%eax
je     1164 <group_name+0x54>
cmp    $0xeffffffa,%eax
je     116c <group_name+0x5c>
cmp    $0xeffffffd,%eax
jne    1174 <group_name+0x64>
lea    0xedf(%rip),%rax
ret
lea    0xeaa(%rip),%rax
ret
lea    0xea7(%rip),%rax
ret
lea    0xebd(%rip),%rax
ret
lea    0xe8d(%rip),%rax
ret
push   %rbx
mov    %eax,%edx
shr    $0x18,%edx
mov    %eax,%ecx
shr    $0x10,%ecx
movzbl %cl,%ecx
movzbl %ah,%ebx
movzbl %al,%r9d
lea    0xeb5(%rip),%rsi
mov    %ebx,%r8d
call   1030 <FRAMERR@plt>
lea    0xe89(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.NetFrame = type { i32 }
@.str = [5 x i8] c"SSDP\00"
@.str.1 = [5 x i8] c"mDNS\00"
@.str.2 = [14 x i8] c"SLP (General)\00"
@.str.3 = [16 x i8] c"SLP (Discovery)\00"
@.str.4 = [10 x i8] c"(unknown)\00"
@.str.5 = [19 x i8] c"SLP (Admin Scoped)\00"
@.str.6 = [34 x i8] c"igmp: unknown group: %d.%d.%d.%d\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 %13 [
i32 -268435462, label %7
i32 -536870661, label %8
i32 -536870634, label %9
i32 -536870621, label %10
i32 -456603447, label %11
i32 -268435459, label %12
]
7: ; preds = %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %3
br label %28
8: ; preds = %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %28
9: ; preds = %2
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %28
10: ; preds = %2
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %28
11: ; preds = %2
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %28
12: ; preds = %2
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %28
13: ; preds = %2
%14 = load %struct.NetFrame*, %struct.NetFrame** %4
%15 = load i32, i32* %5
%16 = lshr i32 %15, 24
%17 = and i32 %16, 255
%18 = load i32, i32* %5
%19 = lshr i32 %18, 16
%20 = and i32 %19, 255
%21 = load i32, i32* %5
%22 = lshr i32 %21, 8
%23 = and i32 %22, 255
%24 = load i32, i32* %5
%25 = lshr i32 %24, 0
%26 = and i32 %25, 255
%27 = call i32 @FRAMERR(%struct.NetFrame* %14, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %17, i32 %20, i32 %23, i32 %26)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %28
28: ; preds = %13, %12, %11, %10, %9, %8, %7
%29 = load i8*, i8** %3
ret i8* %29
}

LLVM IR (-O2):
%struct.NetFrame = type { i32 }
@.str = [5 x i8] c"SSDP\00"
@.str.1 = [5 x i8] c"mDNS\00"
@.str.2 = [14 x i8] c"SLP (General)\00"
@.str.3 = [16 x i8] c"SLP (Discovery)\00"
@.str.4 = [10 x i8] c"(unknown)\00"
@.str.5 = [19 x i8] c"SLP (Admin Scoped)\00"
@.str.6 = [34 x i8] c"igmp: unknown group: %d.%d.%d.%d\0A\00"
define i8* @group_name(%struct.NetFrame* %0, i32 %1) {
switch i32 %1, label %8 [
i32 -268435462, label %16
i32 -536870661, label %3
i32 -536870634, label %4
i32 -536870621, label %5
i32 -456603447, label %6
i32 -268435459, label %7
]
3: ; preds = %2
br label %16
4: ; preds = %2
br label %16
5: ; preds = %2
br label %16
6: ; preds = %2
br label %16
7: ; preds = %2
br label %16
8: ; preds = %2
%9 = lshr i32 %1, 24
%10 = lshr i32 %1, 16
%11 = and i32 %10, 255
%12 = lshr i32 %1, 8
%13 = and i32 %12, 255
%14 = and i32 %1, 255
%15 = tail call i32 @FRAMERR(%struct.NetFrame* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32 %9, i32 %11, i32 %13, i32 %14)
br label %16
16: ; preds = %2, %8, %7, %6, %5, %4, %3
%17 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %8 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([5 x i8], [5 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* %17
}