#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 */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void do_show_info_header(uint32_t mode) {
  uint32_t i;
  printf("%4s %8s", "Idx", "Hits");
  for (i = 0x40; i <= 0x8000; i <<= 1) {
    switch (mode & i) {
    case 0x40:
      printf(" FCoE");
      break;
    case 0x80:
      printf(" Port");
      break;
    case 0x100:
      printf("      vld:VNIC");
      break;
    case 0x200:
      printf("      vld:VLAN");
      break;
    case 0x400:
      printf("   TOS");
      break;
    case 0x800:
      printf("  Prot");
      break;
    case 0x1000:
      printf("   EthType");
      break;
    case 0x2000:
      printf("  MACIdx");
      break;
    case 0x4000:
      printf(" MPS");
      break;
    case 0x8000:
      printf(" Frag");
      break;
    default:
      break;
    }
  }
  printf(" %20s %20s %9s %9s %s\n", "DIP", "SIP", "DPORT", "SPORT", "Action");
}


x86 assembly (clang, -O0):
<do_show_info_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    0xf2c(%rip),%rsi
lea    0xed8(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x40,-0x8(%rbp)
cmpl   $0x8000,-0x8(%rbp)
jg     12e5 <do_show_info_header+0x1d5>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
and    %ecx,%eax
mov    %eax,-0xc(%rbp)
sub    $0x40,%eax
je     120f <do_show_info_header+0xff>
jmp    1164 <do_show_info_header+0x54>
mov    -0xc(%rbp),%eax
sub    $0x80,%eax
je     1222 <do_show_info_header+0x112>
jmp    1177 <do_show_info_header+0x67>
mov    -0xc(%rbp),%eax
sub    $0x100,%eax
je     1235 <do_show_info_header+0x125>
jmp    118a <do_show_info_header+0x7a>
mov    -0xc(%rbp),%eax
sub    $0x200,%eax
je     1248 <do_show_info_header+0x138>
jmp    119d <do_show_info_header+0x8d>
mov    -0xc(%rbp),%eax
sub    $0x400,%eax
je     125b <do_show_info_header+0x14b>
jmp    11b0 <do_show_info_header+0xa0>
mov    -0xc(%rbp),%eax
sub    $0x800,%eax
je     126e <do_show_info_header+0x15e>
jmp    11c3 <do_show_info_header+0xb3>
mov    -0xc(%rbp),%eax
sub    $0x1000,%eax
je     1281 <do_show_info_header+0x171>
jmp    11d6 <do_show_info_header+0xc6>
mov    -0xc(%rbp),%eax
sub    $0x2000,%eax
je     1294 <do_show_info_header+0x184>
jmp    11e9 <do_show_info_header+0xd9>
mov    -0xc(%rbp),%eax
sub    $0x4000,%eax
je     12a7 <do_show_info_header+0x197>
jmp    11fc <do_show_info_header+0xec>
mov    -0xc(%rbp),%eax
sub    $0x8000,%eax
je     12ba <do_show_info_header+0x1aa>
jmp    12cd <do_show_info_header+0x1bd>
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
lea    0xdb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
lea    0xdab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d2 <do_show_info_header+0x1c2>
jmp    12d2 <do_show_info_header+0x1c2>
jmp    12d7 <do_show_info_header+0x1c7>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113e <do_show_info_header+0x2e>
lea    0xd78(%rip),%rdi
lea    0xd88(%rip),%rsi
lea    0xd85(%rip),%rdx
lea    0xd82(%rip),%rcx
lea    0xd81(%rip),%r8
lea    0xd80(%rip),%r9
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_show_info_header>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xedc(%rip),%rdi
lea    0xf2a(%rip),%rsi
lea    0xed6(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x40,%ebp
lea    0xec8(%rip),%r14
lea    0xf04(%rip),%r15
lea    0xf06(%rip),%r12
lea    0xf04(%rip),%r13
nopw   0x0(%rax,%rax,1)
mov    %ebp,%eax
and    %ebx,%eax
cmp    $0x7ff,%eax
jg     11a0 <do_show_info_header+0x90>
cmp    $0xff,%eax
jle    11d0 <do_show_info_header+0xc0>
cmp    $0x100,%eax
je     1207 <do_show_info_header+0xf7>
cmp    $0x200,%eax
je     1210 <do_show_info_header+0x100>
cmp    $0x400,%eax
jne    1237 <do_show_info_header+0x127>
lea    0xe9d(%rip),%rdi
jmp    1230 <do_show_info_header+0x120>
nop
cmp    $0x1fff,%eax
jle    11f0 <do_show_info_header+0xe0>
cmp    $0x2000,%eax
je     1219 <do_show_info_header+0x109>
cmp    $0x4000,%eax
je     121e <do_show_info_header+0x10e>
cmp    $0x8000,%eax
jne    1237 <do_show_info_header+0x127>
mov    %r13,%rdi
jmp    1230 <do_show_info_header+0x120>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
cmp    $0x40,%eax
je     1230 <do_show_info_header+0x120>
cmp    $0x80,%eax
jne    1237 <do_show_info_header+0x127>
lea    0xe2d(%rip),%rdi
jmp    1230 <do_show_info_header+0x120>
nopl   0x0(%rax,%rax,1)
cmp    $0x800,%eax
je     1223 <do_show_info_header+0x113>
cmp    $0x1000,%eax
jne    1237 <do_show_info_header+0x127>
lea    0xe40(%rip),%rdi
jmp    1230 <do_show_info_header+0x120>
lea    0xe0b(%rip),%rdi
jmp    1230 <do_show_info_header+0x120>
lea    0xe11(%rip),%rdi
jmp    1230 <do_show_info_header+0x120>
mov    %r15,%rdi
jmp    1230 <do_show_info_header+0x120>
mov    %r12,%rdi
jmp    1230 <do_show_info_header+0x120>
lea    0xe14(%rip),%rdi
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <printf@plt>
add    %ebp,%ebp
cmp    $0x8001,%ebp
jl     1160 <do_show_info_header+0x50>
lea    0xe18(%rip),%rdi
lea    0xe28(%rip),%rsi
lea    0xe25(%rip),%rdx
lea    0xe22(%rip),%rcx
lea    0xe21(%rip),%r8
lea    0xe20(%rip),%r9
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%4s %8s\00"
@.str.1 = [4 x i8] c"Idx\00"
@.str.2 = [5 x i8] c"Hits\00"
@.str.3 = [6 x i8] c" FCoE\00"
@.str.4 = [6 x i8] c" Port\00"
@.str.5 = [15 x i8] c" vld:VNIC\00"
@.str.6 = [15 x i8] c" vld:VLAN\00"
@.str.7 = [7 x i8] c" TOS\00"
@.str.8 = [7 x i8] c" Prot\00"
@.str.9 = [11 x i8] c" EthType\00"
@.str.10 = [9 x i8] c" MACIdx\00"
@.str.11 = [5 x i8] c" MPS\00"
@.str.12 = [6 x i8] c" Frag\00"
@.str.13 = [23 x i8] c" %20s %20s %9s %9s %s\0A\00"
@.str.14 = [4 x i8] c"DIP\00"
@.str.15 = [4 x i8] c"SIP\00"
@.str.16 = [6 x i8] c"DPORT\00"
@.str.17 = [6 x i8] c"SPORT\00"
@.str.18 = [7 x i8] c"Action\00"
define void @do_show_info_header(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 64, i32* %3
br label %5
5: ; preds = %34, %1
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 32768
br i1 %7, label %8, label %37
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = and i32 %9, %10
switch i32 %11, label %32 [
i32 64, label %12
i32 128, label %14
i32 256, label %16
i32 512, label %18
i32 1024, label %20
i32 2048, label %22
i32 4096, label %24
i32 8192, label %26
i32 16384, label %28
i32 32768, label %30
]
12: ; preds = %8
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %33
14: ; preds = %8
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %33
16: ; preds = %8
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %33
18: ; preds = %8
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %33
20: ; preds = %8
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %33
22: ; preds = %8
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %33
24: ; preds = %8
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
br label %33
26: ; preds = %8
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
br label %33
28: ; preds = %8
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
br label %33
30: ; preds = %8
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
br label %33
32: ; preds = %8
br label %33
33: ; preds = %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12
br label %34
34: ; preds = %33
%35 = load i32, i32* %3
%36 = shl i32 %35, 1
store i32 %36, i32* %3
br label %5
37: ; preds = %5
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%4s %8s\00"
@.str.1 = [4 x i8] c"Idx\00"
@.str.2 = [5 x i8] c"Hits\00"
@.str.3 = [6 x i8] c" FCoE\00"
@.str.4 = [6 x i8] c" Port\00"
@.str.5 = [15 x i8] c" vld:VNIC\00"
@.str.6 = [15 x i8] c" vld:VLAN\00"
@.str.7 = [7 x i8] c" TOS\00"
@.str.8 = [7 x i8] c" Prot\00"
@.str.9 = [11 x i8] c" EthType\00"
@.str.10 = [9 x i8] c" MACIdx\00"
@.str.11 = [5 x i8] c" MPS\00"
@.str.12 = [6 x i8] c" Frag\00"
@.str.13 = [23 x i8] c" %20s %20s %9s %9s %s\0A\00"
@.str.14 = [4 x i8] c"DIP\00"
@.str.15 = [4 x i8] c"SIP\00"
@.str.16 = [6 x i8] c"DPORT\00"
@.str.17 = [6 x i8] c"SPORT\00"
@.str.18 = [7 x i8] c"Action\00"
define void @do_show_info_header(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %3
3: ; preds = %1, %18
%4 = phi i32 [ 64, %1 ], [ %19, %18 ]
%5 = and i32 %4, %0
switch i32 %5, label %18 [
i32 64, label %15
i32 128, label %6
i32 256, label %7
i32 512, label %8
i32 1024, label %9
i32 2048, label %10
i32 4096, label %11
i32 8192, label %12
i32 16384, label %13
i32 32768, label %14
]
6: ; preds = %3
br label %15
7: ; preds = %3
br label %15
8: ; preds = %3
br label %15
9: ; preds = %3
br label %15
10: ; preds = %3
br label %15
11: ; preds = %3
br label %15
12: ; preds = %3
br label %15
13: ; preds = %3
br label %15
14: ; preds = %3
br label %15
15: ; preds = %3, %14, %13, %12, %11, %10, %9, %8, %7, %6
%16 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), %8 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), %9 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), %10 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), %11 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), %12 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), %13 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), %14 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %3 ]
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %16)
br label %18
18: ; preds = %15, %3
%19 = shl i32 %4, 1
%20 = icmp slt i32 %19, 32769
br i1 %20, label %3, label %21
21: ; preds = %18
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i64 0, i64 0))
ret void
}