#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*/ printf(char *);
void print_i_info(int info) {
  int ntype = info & 03;
  switch (ntype) {
  case 0:
    (void)printf("reserved-ntype? ");
    break;
  case 01:
    (void)printf("l2rout ");
    break;
  case 02:
    (void)printf("l1rout ");
    break;
  case 03:
    (void)printf("endnode ");
    break;
  }
  if (info & 04)
    (void)printf("verif ");
  if (info & 040)
    (void)printf("nomcast ");
  if (info & 0100)
    (void)printf("blo ");
}


x86 assembly (clang, -O0):
<print_i_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x3,%rax
ja     1188 <print_i_info+0x78>
mov    -0x10(%rbp),%rax
lea    0xec0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
jmp    1188 <print_i_info+0x78>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
jmp    1188 <print_i_info+0x78>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
jmp    1188 <print_i_info+0x78>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     11a3 <print_i_info+0x93>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     11be <print_i_info+0xae>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     11d9 <print_i_info+0xc9>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_i_info>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0x3,%eax
lea    0xf21(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <printf@plt>
test   $0x4,%bl
jne    113c <print_i_info+0x2c>
test   $0x20,%bl
jne    114d <print_i_info+0x3d>
test   $0x40,%bl
jne    115e <print_i_info+0x4e>
pop    %rbx
ret
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
test   $0x20,%bl
je     1135 <print_i_info+0x25>
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
test   $0x40,%bl
je     113a <print_i_info+0x2a>
lea    0xed5(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"reserved-ntype? \00"
@.str.1 = [8 x i8] c"l2rout \00"
@.str.2 = [8 x i8] c"l1rout \00"
@.str.3 = [9 x i8] c"endnode \00"
@.str.4 = [7 x i8] c"verif \00"
@.str.5 = [9 x i8] c"nomcast \00"
@.str.6 = [5 x i8] c"blo \00"
define void @print_i_info(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 3
store i32 %5, i32* %3
%6 = load i32, i32* %3
switch i32 %6, label %15 [
i32 0, label %7
i32 1, label %9
i32 2, label %11
i32 3, label %13
]
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %15
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %15
11: ; preds = %1
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %15
13: ; preds = %1
%14 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %1, %13, %11, %9, %7
%16 = load i32, i32* %2
%17 = and i32 %16, 4
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %21
21: ; preds = %19, %15
%22 = load i32, i32* %2
%23 = and i32 %22, 32
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %27
27: ; preds = %25, %21
%28 = load i32, i32* %2
%29 = and i32 %28, 64
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %33
33: ; preds = %31, %27
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"reserved-ntype? \00"
@.str.1 = [8 x i8] c"l2rout \00"
@.str.2 = [8 x i8] c"l1rout \00"
@.str.3 = [9 x i8] c"endnode \00"
@.str.4 = [7 x i8] c"verif \00"
@.str.5 = [9 x i8] c"nomcast \00"
@.str.6 = [5 x i8] c"blo \00"
@reltable.print_i_info = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.print_i_info to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.print_i_info to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.print_i_info to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.print_i_info to i64)) to i32)]
define void @print_i_info(i32 %0) {
%2 = and i32 %0, 3
%3 = zext i32 %2 to i64
%4 = shl i64 %3, 2
%5 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.print_i_info to i8*), i64 %4)
%6 = tail call i32 @printf(i8* dereferenceable(1) %5)
%7 = and i32 %0, 4
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = and i32 %0, 32
%13 = icmp eq i32 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %16
16: ; preds = %14, %11
%17 = and i32 %0, 64
%18 = icmp eq i32 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %16
%20 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
ret void
}