#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 uint8_t;

/* Variables and functions */
int IPTOS_DSCP(int const);
#define IPTOS_DSCP_AF11 144
#define IPTOS_DSCP_AF12 143
#define IPTOS_DSCP_AF13 142
#define IPTOS_DSCP_AF21 141
#define IPTOS_DSCP_AF22 140
#define IPTOS_DSCP_AF23 139
#define IPTOS_DSCP_AF31 138
#define IPTOS_DSCP_AF32 137
#define IPTOS_DSCP_AF33 136
#define IPTOS_DSCP_AF41 135
#define IPTOS_DSCP_AF42 134
#define IPTOS_DSCP_AF43 133
#define IPTOS_DSCP_EF 132
int IPTOS_ECN(int const);
#define IPTOS_ECN_CE 131
#define IPTOS_ECN_ECT0 130
#define IPTOS_ECN_ECT1 129
#define IPTOS_ECN_NOT_ECT 128
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ ip4_print_dscp(int);
int /*<<< orphan*/ ip4_print_ecn(int);
int /*<<< orphan*/ stdout;
void ip4_print_tos(const uint8_t tos) {
  uint8_t dscp;
  uint8_t ecn;
  dscp = IPTOS_DSCP(tos);
  ip4_print_dscp(dscp);
  switch (dscp) {
  case IPTOS_DSCP_AF11:
    fprintf(stdout, "Assured forwarding class 1, low drop precedence\n");
    break;
  case IPTOS_DSCP_AF12:
    fprintf(stdout, "Assured forwarding class 1, medium drop precedence\n");
    break;
  case IPTOS_DSCP_AF13:
    fprintf(stdout, "Assured forwarding class 1, high drop precedence\n");
    break;
  case IPTOS_DSCP_AF21:
    fprintf(stdout, "Assured forwarding class 2, low drop precedence\n");
    break;
  case IPTOS_DSCP_AF22:
    fprintf(stdout, "Assured forwarding class 2, medium drop precedence\n");
    break;
  case IPTOS_DSCP_AF23:
    fprintf(stdout, "Assured forwarding class 2, high drop precedence\n");
    break;
  case IPTOS_DSCP_AF31:
    fprintf(stdout, "Assured forwarding class 3, low drop precedence\n");
    break;
  case IPTOS_DSCP_AF32:
    fprintf(stdout, "Assured forwarding class 3, medium drop precedence\n");
    break;
  case IPTOS_DSCP_AF33:
    fprintf(stdout, "Assured forwarding class 3, high drop precedence\n");
    break;
  case IPTOS_DSCP_AF41:
    fprintf(stdout, "Assured forwarding class 4, low drop precedence\n");
    break;
  case IPTOS_DSCP_AF42:
    fprintf(stdout, "Assured forwarding class 4, medium drop precedence\n");
    break;
  case IPTOS_DSCP_AF43:
    fprintf(stdout, "Assured forwarding class 4, high drop precedence\n");
    break;
  case IPTOS_DSCP_EF:
    fprintf(stdout, "Expedited forwarding\n");
    break;
  case 0:
    fprintf(stdout, "Default\n");
    break;
  default:
    fprintf(stdout, "Unknown (0x%x)\n", dscp);
    break;
  }
  ecn = IPTOS_ECN(tos);
  ip4_print_ecn(ecn);
  switch (ecn) {
  case IPTOS_ECN_NOT_ECT:
    fprintf(stdout, "Non-ECT, non ECN-capable transport\n");
    break;
  case IPTOS_ECN_ECT1:
    fprintf(stdout, "ECT(1): ECN-capable transport\n");
    break;
  case IPTOS_ECN_ECT0:
    fprintf(stdout, "ECT(0): ECN-capable transport\n");
    break;
  case IPTOS_ECN_CE:
    fprintf(stdout, "CE: congestion encountered\n");
    break;
  }
}


x86 assembly (clang, -O0):
<ip4_print_tos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1070 <IPTOS_DSCP@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <ip4_print_dscp@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     13e4 <ip4_print_tos+0x294>
jmp    1181 <ip4_print_tos+0x31>
mov    -0x10(%rbp),%eax
sub    $0x84,%eax
je     13c8 <ip4_print_tos+0x278>
jmp    1194 <ip4_print_tos+0x44>
mov    -0x10(%rbp),%eax
sub    $0x85,%eax
je     13ac <ip4_print_tos+0x25c>
jmp    11a7 <ip4_print_tos+0x57>
mov    -0x10(%rbp),%eax
sub    $0x86,%eax
je     1390 <ip4_print_tos+0x240>
jmp    11ba <ip4_print_tos+0x6a>
mov    -0x10(%rbp),%eax
sub    $0x87,%eax
je     1374 <ip4_print_tos+0x224>
jmp    11cd <ip4_print_tos+0x7d>
mov    -0x10(%rbp),%eax
sub    $0x88,%eax
je     1358 <ip4_print_tos+0x208>
jmp    11e0 <ip4_print_tos+0x90>
mov    -0x10(%rbp),%eax
sub    $0x89,%eax
je     133c <ip4_print_tos+0x1ec>
jmp    11f3 <ip4_print_tos+0xa3>
mov    -0x10(%rbp),%eax
sub    $0x8a,%eax
je     1320 <ip4_print_tos+0x1d0>
jmp    1206 <ip4_print_tos+0xb6>
mov    -0x10(%rbp),%eax
sub    $0x8b,%eax
je     1304 <ip4_print_tos+0x1b4>
jmp    1219 <ip4_print_tos+0xc9>
mov    -0x10(%rbp),%eax
sub    $0x8c,%eax
je     12e8 <ip4_print_tos+0x198>
jmp    122c <ip4_print_tos+0xdc>
mov    -0x10(%rbp),%eax
sub    $0x8d,%eax
je     12cc <ip4_print_tos+0x17c>
jmp    123f <ip4_print_tos+0xef>
mov    -0x10(%rbp),%eax
sub    $0x8e,%eax
je     12b0 <ip4_print_tos+0x160>
jmp    1252 <ip4_print_tos+0x102>
mov    -0x10(%rbp),%eax
sub    $0x8f,%eax
je     1294 <ip4_print_tos+0x144>
jmp    1265 <ip4_print_tos+0x115>
mov    -0x10(%rbp),%eax
sub    $0x90,%eax
jne    1400 <ip4_print_tos+0x2b0>
jmp    1278 <ip4_print_tos+0x128>
mov    0x2d61(%rip),%rax
mov    (%rax),%edi
lea    0xd88(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2d45(%rip),%rax
mov    (%rax),%edi
lea    0xd9d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2d29(%rip),%rax
mov    (%rax),%edi
lea    0xdb5(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2d0d(%rip),%rax
mov    (%rax),%edi
lea    0xdcb(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2cf1(%rip),%rax
mov    (%rax),%edi
lea    0xde0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2cd5(%rip),%rax
mov    (%rax),%edi
lea    0xdf8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2cb9(%rip),%rax
mov    (%rax),%edi
lea    0xe0e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2c9d(%rip),%rax
mov    (%rax),%edi
lea    0xe23(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2c81(%rip),%rax
mov    (%rax),%edi
lea    0xe3b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2c65(%rip),%rax
mov    (%rax),%edi
lea    0xe51(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2c49(%rip),%rax
mov    (%rax),%edi
lea    0xe66(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
lea    0xe7e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2c11(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2bf5(%rip),%rax
mov    (%rax),%edi
lea    0xe8e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    141a <ip4_print_tos+0x2ca>
mov    0x2bd9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
lea    0xe78(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1060 <IPTOS_ECN@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <ip4_print_ecn@plt>
mov    -0xc(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3,%eax
ja     14c1 <ip4_print_tos+0x371>
mov    -0x18(%rbp),%rax
lea    0xbb3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2b83(%rip),%rax
mov    (%rax),%edi
lea    0xe35(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    14c1 <ip4_print_tos+0x371>
mov    0x2b67(%rip),%rax
mov    (%rax),%edi
lea    0xe3d(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    14c1 <ip4_print_tos+0x371>
mov    0x2b4b(%rip),%rax
mov    (%rax),%edi
lea    0xe40(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    14c1 <ip4_print_tos+0x371>
mov    0x2b2f(%rip),%rax
mov    (%rax),%edi
lea    0xe43(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip4_print_tos>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1070 <IPTOS_DSCP@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <ip4_print_dscp@plt>
lea    -0x84(%rbx),%eax
cmp    $0xc,%eax
ja     1193 <ip4_print_tos+0x43>
lea    0xe8b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
lea    0x1112(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2e46(%rip),%rax
test   %ebx,%ebx
jne    12df <ip4_print_tos+0x18f>
mov    (%rax),%edi
lea    0x110b(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
lea    0x10ae(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
lea    0x1065(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2dff(%rip),%rax
mov    (%rax),%edi
lea    0x101f(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2dea(%rip),%rax
mov    (%rax),%edi
lea    0xfd8(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2dd5(%rip),%rax
mov    (%rax),%edi
lea    0xf8f(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
lea    0xf4c(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
lea    0xf08(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
lea    0xe7f(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2d7b(%rip),%rax
mov    (%rax),%edi
lea    0xe3b(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2d69(%rip),%rax
mov    (%rax),%edi
lea    0xdf5(%rip),%rsi
jmp    1292 <ip4_print_tos+0x142>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
lea    0xdb2(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %ebp,%edi
call   1060 <IPTOS_ECN@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <ip4_print_ecn@plt>
add    $0xffffff80,%ebx
cmp    $0x3,%ebx
ja     12d8 <ip4_print_tos+0x188>
movslq %ebx,%rax
lea    0xd79(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    (%rax),%edi
lea    0xfd7(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1299 <ip4_print_tos+0x149>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [49 x i8] c"Assured forwarding class 1, low drop precedence\0A\00"
@.str.1 = [52 x i8] c"Assured forwarding class 1, medium drop precedence\0A\00"
@.str.2 = [50 x i8] c"Assured forwarding class 1, high drop precedence\0A\00"
@.str.3 = [49 x i8] c"Assured forwarding class 2, low drop precedence\0A\00"
@.str.4 = [52 x i8] c"Assured forwarding class 2, medium drop precedence\0A\00"
@.str.5 = [50 x i8] c"Assured forwarding class 2, high drop precedence\0A\00"
@.str.6 = [49 x i8] c"Assured forwarding class 3, low drop precedence\0A\00"
@.str.7 = [52 x i8] c"Assured forwarding class 3, medium drop precedence\0A\00"
@.str.8 = [50 x i8] c"Assured forwarding class 3, high drop precedence\0A\00"
@.str.9 = [49 x i8] c"Assured forwarding class 4, low drop precedence\0A\00"
@.str.10 = [52 x i8] c"Assured forwarding class 4, medium drop precedence\0A\00"
@.str.11 = [50 x i8] c"Assured forwarding class 4, high drop precedence\0A\00"
@.str.12 = [22 x i8] c"Expedited forwarding\0A\00"
@.str.13 = [9 x i8] c"Default\0A\00"
@.str.14 = [16 x i8] c"Unknown (0x%x)\0A\00"
@.str.15 = [36 x i8] c"Non-ECT, non ECN-capable transport\0A\00"
@.str.16 = [31 x i8] c"ECT(1): ECN-capable transport\0A\00"
@.str.17 = [31 x i8] c"ECT(0): ECN-capable transport\0A\00"
@.str.18 = [28 x i8] c"CE: congestion encountered\0A\00"
define void @ip4_print_tos(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @IPTOS_DSCP(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @ip4_print_dscp(i32 %7)
%9 = load i32, i32* %3
switch i32 %9, label %52 [
i32 144, label %10
i32 143, label %13
i32 142, label %16
i32 141, label %19
i32 140, label %22
i32 139, label %25
i32 138, label %28
i32 137, label %31
i32 136, label %34
i32 135, label %37
i32 134, label %40
i32 133, label %43
i32 132, label %46
i32 0, label %49
]
10: ; preds = %1
%11 = load i32, i32* @stdout
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %56
13: ; preds = %1
%14 = load i32, i32* @stdout
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
br label %56
16: ; preds = %1
%17 = load i32, i32* @stdout
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
br label %56
19: ; preds = %1
%20 = load i32, i32* @stdout
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
br label %56
22: ; preds = %1
%23 = load i32, i32* @stdout
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
br label %56
25: ; preds = %1
%26 = load i32, i32* @stdout
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
br label %56
28: ; preds = %1
%29 = load i32, i32* @stdout
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
br label %56
31: ; preds = %1
%32 = load i32, i32* @stdout
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0))
br label %56
34: ; preds = %1
%35 = load i32, i32* @stdout
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0))
br label %56
37: ; preds = %1
%38 = load i32, i32* @stdout
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0))
br label %56
40: ; preds = %1
%41 = load i32, i32* @stdout
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0))
br label %56
43: ; preds = %1
%44 = load i32, i32* @stdout
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0))
br label %56
46: ; preds = %1
%47 = load i32, i32* @stdout
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
br label %56
49: ; preds = %1
%50 = load i32, i32* @stdout
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
br label %56
52: ; preds = %1
%53 = load i32, i32* @stdout
%54 = load i32, i32* %3
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), i32 %54)
br label %56
56: ; preds = %52, %49, %46, %43, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10
%57 = load i32, i32* %2
%58 = call i32 @IPTOS_ECN(i32 %57)
store i32 %58, i32* %4
%59 = load i32, i32* %4
%60 = call i32 @ip4_print_ecn(i32 %59)
%61 = load i32, i32* %4
switch i32 %61, label %74 [
i32 128, label %62
i32 129, label %65
i32 130, label %68
i32 131, label %71
]
62: ; preds = %56
%63 = load i32, i32* @stdout
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0))
br label %74
65: ; preds = %56
%66 = load i32, i32* @stdout
%67 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i64 0, i64 0))
br label %74
68: ; preds = %56
%69 = load i32, i32* @stdout
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.17, i64 0, i64 0))
br label %74
71: ; preds = %56
%72 = load i32, i32* @stdout
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.18, i64 0, i64 0))
br label %74
74: ; preds = %56, %71, %68, %65, %62
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [49 x i8] c"Assured forwarding class 1, low drop precedence\0A\00"
@.str.1 = [52 x i8] c"Assured forwarding class 1, medium drop precedence\0A\00"
@.str.2 = [50 x i8] c"Assured forwarding class 1, high drop precedence\0A\00"
@.str.3 = [49 x i8] c"Assured forwarding class 2, low drop precedence\0A\00"
@.str.4 = [52 x i8] c"Assured forwarding class 2, medium drop precedence\0A\00"
@.str.5 = [50 x i8] c"Assured forwarding class 2, high drop precedence\0A\00"
@.str.6 = [49 x i8] c"Assured forwarding class 3, low drop precedence\0A\00"
@.str.7 = [52 x i8] c"Assured forwarding class 3, medium drop precedence\0A\00"
@.str.8 = [50 x i8] c"Assured forwarding class 3, high drop precedence\0A\00"
@.str.9 = [49 x i8] c"Assured forwarding class 4, low drop precedence\0A\00"
@.str.10 = [52 x i8] c"Assured forwarding class 4, medium drop precedence\0A\00"
@.str.11 = [50 x i8] c"Assured forwarding class 4, high drop precedence\0A\00"
@.str.12 = [22 x i8] c"Expedited forwarding\0A\00"
@.str.13 = [9 x i8] c"Default\0A\00"
@.str.14 = [16 x i8] c"Unknown (0x%x)\0A\00"
@.str.15 = [36 x i8] c"Non-ECT, non ECN-capable transport\0A\00"
@.str.16 = [31 x i8] c"ECT(1): ECN-capable transport\0A\00"
@.str.17 = [31 x i8] c"ECT(0): ECN-capable transport\0A\00"
@.str.18 = [28 x i8] c"CE: congestion encountered\0A\00"
@reltable.ip4_print_tos = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @.str.15 to i64), i64 ptrtoint ([4 x i32]* @reltable.ip4_print_tos to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.16 to i64), i64 ptrtoint ([4 x i32]* @reltable.ip4_print_tos to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([31 x i8]* @.str.17 to i64), i64 ptrtoint ([4 x i32]* @reltable.ip4_print_tos to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.18 to i64), i64 ptrtoint ([4 x i32]* @reltable.ip4_print_tos to i64)) to i32)]
define void @ip4_print_tos(i32 %0) {
%2 = tail call i32 @IPTOS_DSCP(i32 %0)
%3 = tail call i32 @ip4_print_dscp(i32 %2)
switch i32 %2, label %46 [
i32 144, label %4
i32 143, label %7
i32 142, label %10
i32 141, label %13
i32 140, label %16
i32 139, label %19
i32 138, label %22
i32 137, label %25
i32 136, label %28
i32 135, label %31
i32 134, label %34
i32 133, label %37
i32 132, label %40
i32 0, label %43
]
4: ; preds = %1
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %49
7: ; preds = %1
%8 = load i32, i32* @stdout
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
br label %49
10: ; preds = %1
%11 = load i32, i32* @stdout
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
br label %49
13: ; preds = %1
%14 = load i32, i32* @stdout
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0))
br label %49
16: ; preds = %1
%17 = load i32, i32* @stdout
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
br label %49
19: ; preds = %1
%20 = load i32, i32* @stdout
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
br label %49
22: ; preds = %1
%23 = load i32, i32* @stdout
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
br label %49
25: ; preds = %1
%26 = load i32, i32* @stdout
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.7, i64 0, i64 0))
br label %49
28: ; preds = %1
%29 = load i32, i32* @stdout
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0))
br label %49
31: ; preds = %1
%32 = load i32, i32* @stdout
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0))
br label %49
34: ; preds = %1
%35 = load i32, i32* @stdout
%36 = tail call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.10, i64 0, i64 0))
br label %49
37: ; preds = %1
%38 = load i32, i32* @stdout
%39 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0))
br label %49
40: ; preds = %1
%41 = load i32, i32* @stdout
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
br label %49
43: ; preds = %1
%44 = load i32, i32* @stdout
%45 = tail call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0))
br label %49
46: ; preds = %1
%47 = load i32, i32* @stdout
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0), i32 %2)
br label %49
49: ; preds = %46, %43, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %7, %4
%50 = tail call i32 @IPTOS_ECN(i32 %0)
%51 = tail call i32 @ip4_print_ecn(i32 %50)
%52 = add i32 %50, -128
%53 = icmp ult i32 %52, 4
br i1 %53, label %54, label %60
54: ; preds = %49
%55 = sext i32 %52 to i64
%56 = shl i64 %55, 2
%57 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.ip4_print_tos to i8*), i64 %56)
%58 = load i32, i32* @stdout
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* %57)
br label %60
60: ; preds = %49, %54
ret void
}