#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 ipbus_transaction_payload_size(int, int, int);
char *test_ipbus_transaction_payload_size(void) {
  do {
    if (!(ipbus_transaction_payload_size(5, 0x0, 0xf) == 1))
      return "payload read req";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(5, 0x0, 0x0) == 5))
      return "payload read resp";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(5, 0x2, 0xf) == 1))
      return "payload niread req";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(5, 0x2, 0x0) == 5))
      return "payload niread resp";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(5, 0x1, 0xf) == 6))
      return "payload write req";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(5, 0x1, 0x0) == 0))
      return "payload write resp";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(5, 0x3, 0xf) == 6))
      return "payload niwrite req";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(5, 0x3, 0x0) == 0))
      return "payload niwrite resp";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(9, 0x4, 0xf) == 3))
      return "payload rwm req";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(7, 0x4, 0x0) == 1))
      return "payload rwm resp";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(9, 0x5, 0xf) == 2))
      return "payload rwm req";
  } while (0);
  do {
    if (!(ipbus_transaction_payload_size(7, 0x5, 0x0) == 1))
      return "payload rwm resp";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_ipbus_transaction_payload_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
xor    %esi,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x1,%eax
je     1142 <test_ipbus_transaction_payload_size+0x32>
lea    0xec7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    1147 <test_ipbus_transaction_payload_size+0x37>
jmp    114c <test_ipbus_transaction_payload_size+0x3c>
mov    $0x5,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x5,%eax
je     1173 <test_ipbus_transaction_payload_size+0x63>
lea    0xea7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    1178 <test_ipbus_transaction_payload_size+0x68>
jmp    117d <test_ipbus_transaction_payload_size+0x6d>
mov    $0x5,%edi
mov    $0x2,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x1,%eax
je     11aa <test_ipbus_transaction_payload_size+0x9a>
lea    0xe82(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    11af <test_ipbus_transaction_payload_size+0x9f>
jmp    11b4 <test_ipbus_transaction_payload_size+0xa4>
mov    $0x5,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x5,%eax
je     11de <test_ipbus_transaction_payload_size+0xce>
lea    0xe61(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    11e3 <test_ipbus_transaction_payload_size+0xd3>
jmp    11e8 <test_ipbus_transaction_payload_size+0xd8>
mov    $0x5,%edi
mov    $0x1,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x6,%eax
je     1215 <test_ipbus_transaction_payload_size+0x105>
lea    0xe3e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    121a <test_ipbus_transaction_payload_size+0x10a>
jmp    121f <test_ipbus_transaction_payload_size+0x10f>
mov    $0x5,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x0,%eax
je     1249 <test_ipbus_transaction_payload_size+0x139>
lea    0xe1c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    124e <test_ipbus_transaction_payload_size+0x13e>
jmp    1253 <test_ipbus_transaction_payload_size+0x143>
mov    $0x5,%edi
mov    $0x3,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x6,%eax
je     1280 <test_ipbus_transaction_payload_size+0x170>
lea    0xdf8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    1285 <test_ipbus_transaction_payload_size+0x175>
jmp    128a <test_ipbus_transaction_payload_size+0x17a>
mov    $0x5,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x0,%eax
je     12b4 <test_ipbus_transaction_payload_size+0x1a4>
lea    0xdd8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    12b9 <test_ipbus_transaction_payload_size+0x1a9>
jmp    12be <test_ipbus_transaction_payload_size+0x1ae>
mov    $0x9,%edi
mov    $0x4,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x3,%eax
je     12eb <test_ipbus_transaction_payload_size+0x1db>
lea    0xdb6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    12f0 <test_ipbus_transaction_payload_size+0x1e0>
jmp    12f5 <test_ipbus_transaction_payload_size+0x1e5>
mov    $0x7,%edi
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x1,%eax
je     131f <test_ipbus_transaction_payload_size+0x20f>
lea    0xd92(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    1324 <test_ipbus_transaction_payload_size+0x214>
jmp    1329 <test_ipbus_transaction_payload_size+0x219>
mov    $0x9,%edi
mov    $0x5,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x2,%eax
je     1356 <test_ipbus_transaction_payload_size+0x246>
lea    0xd4b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    135b <test_ipbus_transaction_payload_size+0x24b>
jmp    1360 <test_ipbus_transaction_payload_size+0x250>
mov    $0x7,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x1,%eax
je     138a <test_ipbus_transaction_payload_size+0x27a>
lea    0xd27(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1397 <test_ipbus_transaction_payload_size+0x287>
jmp    138f <test_ipbus_transaction_payload_size+0x27f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ipbus_transaction_payload_size>:
push   %rbx
mov    $0x5,%edi
xor    %esi,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x1,%eax
jne    11a0 <test_ipbus_transaction_payload_size+0x90>
mov    $0x5,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x5,%eax
jne    11a9 <test_ipbus_transaction_payload_size+0x99>
mov    $0x5,%edi
mov    $0x2,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x1,%eax
jne    11b2 <test_ipbus_transaction_payload_size+0xa2>
mov    $0x5,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x5,%eax
jne    11bb <test_ipbus_transaction_payload_size+0xab>
mov    $0x5,%edi
mov    $0x1,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x6,%eax
jne    11c4 <test_ipbus_transaction_payload_size+0xb4>
mov    $0x5,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
test   %eax,%eax
je     11d0 <test_ipbus_transaction_payload_size+0xc0>
lea    0xebe(%rip),%rbx
jmp    11cb <test_ipbus_transaction_payload_size+0xbb>
lea    0xe59(%rip),%rbx
jmp    11cb <test_ipbus_transaction_payload_size+0xbb>
lea    0xe61(%rip),%rbx
jmp    11cb <test_ipbus_transaction_payload_size+0xbb>
lea    0xe6a(%rip),%rbx
jmp    11cb <test_ipbus_transaction_payload_size+0xbb>
lea    0xe74(%rip),%rbx
jmp    11cb <test_ipbus_transaction_payload_size+0xbb>
lea    0xe7f(%rip),%rbx
mov    %rbx,%rax
pop    %rbx
ret
mov    $0x5,%edi
mov    $0x3,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x6,%eax
jne    1207 <test_ipbus_transaction_payload_size+0xf7>
mov    $0x5,%edi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
test   %eax,%eax
je     1210 <test_ipbus_transaction_payload_size+0x100>
lea    0xe7e(%rip),%rbx
jmp    11cb <test_ipbus_transaction_payload_size+0xbb>
lea    0xe61(%rip),%rbx
jmp    11cb <test_ipbus_transaction_payload_size+0xbb>
mov    $0x9,%edi
mov    $0x4,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
lea    0xe6d(%rip),%rbx
cmp    $0x3,%eax
jne    11cb <test_ipbus_transaction_payload_size+0xbb>
mov    $0x7,%edi
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x1,%eax
jne    1289 <test_ipbus_transaction_payload_size+0x179>
mov    $0x9,%edi
mov    $0x5,%esi
mov    $0xf,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x2,%eax
jne    11cb <test_ipbus_transaction_payload_size+0xbb>
xor    %ebx,%ebx
mov    $0x7,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1030 <ipbus_transaction_payload_size@plt>
cmp    $0x1,%eax
lea    0xe28(%rip),%rax
cmovne %rax,%rbx
jmp    11cb <test_ipbus_transaction_payload_size+0xbb>
lea    0xe18(%rip),%rbx
jmp    11cb <test_ipbus_transaction_payload_size+0xbb>

LLVM IR (-O0):
@.str = [17 x i8] c"payload read req\00"
@.str.1 = [18 x i8] c"payload read resp\00"
@.str.2 = [19 x i8] c"payload niread req\00"
@.str.3 = [20 x i8] c"payload niread resp\00"
@.str.4 = [18 x i8] c"payload write req\00"
@.str.5 = [19 x i8] c"payload write resp\00"
@.str.6 = [20 x i8] c"payload niwrite req\00"
@.str.7 = [21 x i8] c"payload niwrite resp\00"
@.str.8 = [16 x i8] c"payload rwm req\00"
@.str.9 = [17 x i8] c"payload rwm resp\00"
define i8* @test_ipbus_transaction_payload_size() {
%1 = alloca i8*
br label %2
2: ; preds = %0
%3 = call i32 @ipbus_transaction_payload_size(i32 5, i32 0, i32 15)
%4 = icmp eq i32 %3, 1
br i1 %4, label %6, label %5
5: ; preds = %2
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %1
br label %74
6: ; preds = %2
br label %7
7: ; preds = %6
br label %8
8: ; preds = %7
%9 = call i32 @ipbus_transaction_payload_size(i32 5, i32 0, i32 0)
%10 = icmp eq i32 %9, 5
br i1 %10, label %12, label %11
11: ; preds = %8
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %74
12: ; preds = %8
br label %13
13: ; preds = %12
br label %14
14: ; preds = %13
%15 = call i32 @ipbus_transaction_payload_size(i32 5, i32 2, i32 15)
%16 = icmp eq i32 %15, 1
br i1 %16, label %18, label %17
17: ; preds = %14
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8** %1
br label %74
18: ; preds = %14
br label %19
19: ; preds = %18
br label %20
20: ; preds = %19
%21 = call i32 @ipbus_transaction_payload_size(i32 5, i32 2, i32 0)
%22 = icmp eq i32 %21, 5
br i1 %22, label %24, label %23
23: ; preds = %20
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8** %1
br label %74
24: ; preds = %20
br label %25
25: ; preds = %24
br label %26
26: ; preds = %25
%27 = call i32 @ipbus_transaction_payload_size(i32 5, i32 1, i32 15)
%28 = icmp eq i32 %27, 6
br i1 %28, label %30, label %29
29: ; preds = %26
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8** %1
br label %74
30: ; preds = %26
br label %31
31: ; preds = %30
br label %32
32: ; preds = %31
%33 = call i32 @ipbus_transaction_payload_size(i32 5, i32 1, i32 0)
%34 = icmp eq i32 %33, 0
br i1 %34, label %36, label %35
35: ; preds = %32
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i8** %1
br label %74
36: ; preds = %32
br label %37
37: ; preds = %36
br label %38
38: ; preds = %37
%39 = call i32 @ipbus_transaction_payload_size(i32 5, i32 3, i32 15)
%40 = icmp eq i32 %39, 6
br i1 %40, label %42, label %41
41: ; preds = %38
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8** %1
br label %74
42: ; preds = %38
br label %43
43: ; preds = %42
br label %44
44: ; preds = %43
%45 = call i32 @ipbus_transaction_payload_size(i32 5, i32 3, i32 0)
%46 = icmp eq i32 %45, 0
br i1 %46, label %48, label %47
47: ; preds = %44
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8** %1
br label %74
48: ; preds = %44
br label %49
49: ; preds = %48
br label %50
50: ; preds = %49
%51 = call i32 @ipbus_transaction_payload_size(i32 9, i32 4, i32 15)
%52 = icmp eq i32 %51, 3
br i1 %52, label %54, label %53
53: ; preds = %50
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8** %1
br label %74
54: ; preds = %50
br label %55
55: ; preds = %54
br label %56
56: ; preds = %55
%57 = call i32 @ipbus_transaction_payload_size(i32 7, i32 4, i32 0)
%58 = icmp eq i32 %57, 1
br i1 %58, label %60, label %59
59: ; preds = %56
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8** %1
br label %74
60: ; preds = %56
br label %61
61: ; preds = %60
br label %62
62: ; preds = %61
%63 = call i32 @ipbus_transaction_payload_size(i32 9, i32 5, i32 15)
%64 = icmp eq i32 %63, 2
br i1 %64, label %66, label %65
65: ; preds = %62
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8** %1
br label %74
66: ; preds = %62
br label %67
67: ; preds = %66
br label %68
68: ; preds = %67
%69 = call i32 @ipbus_transaction_payload_size(i32 7, i32 5, i32 0)
%70 = icmp eq i32 %69, 1
br i1 %70, label %72, label %71
71: ; preds = %68
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8** %1
br label %74
72: ; preds = %68
br label %73
73: ; preds = %72
store i8* null, i8** %1
br label %74
74: ; preds = %73, %71, %65, %59, %53, %47, %41, %35, %29, %23, %17, %11, %5
%75 = load i8*, i8** %1
ret i8* %75
}

LLVM IR (-O2):
@.str = [17 x i8] c"payload read req\00"
@.str.1 = [18 x i8] c"payload read resp\00"
@.str.2 = [19 x i8] c"payload niread req\00"
@.str.3 = [20 x i8] c"payload niread resp\00"
@.str.4 = [18 x i8] c"payload write req\00"
@.str.5 = [19 x i8] c"payload write resp\00"
@.str.6 = [20 x i8] c"payload niwrite req\00"
@.str.7 = [21 x i8] c"payload niwrite resp\00"
@.str.8 = [16 x i8] c"payload rwm req\00"
@.str.9 = [17 x i8] c"payload rwm resp\00"
define i8* @test_ipbus_transaction_payload_size() {
%1 = tail call i32 @ipbus_transaction_payload_size(i32 5, i32 0, i32 15)
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %37
3: ; preds = %0
%4 = tail call i32 @ipbus_transaction_payload_size(i32 5, i32 0, i32 0)
%5 = icmp eq i32 %4, 5
br i1 %5, label %6, label %37
6: ; preds = %3
%7 = tail call i32 @ipbus_transaction_payload_size(i32 5, i32 2, i32 15)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %37
9: ; preds = %6
%10 = tail call i32 @ipbus_transaction_payload_size(i32 5, i32 2, i32 0)
%11 = icmp eq i32 %10, 5
br i1 %11, label %12, label %37
12: ; preds = %9
%13 = tail call i32 @ipbus_transaction_payload_size(i32 5, i32 1, i32 15)
%14 = icmp eq i32 %13, 6
br i1 %14, label %15, label %37
15: ; preds = %12
%16 = tail call i32 @ipbus_transaction_payload_size(i32 5, i32 1, i32 0)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %37
18: ; preds = %15
%19 = tail call i32 @ipbus_transaction_payload_size(i32 5, i32 3, i32 15)
%20 = icmp eq i32 %19, 6
br i1 %20, label %21, label %37
21: ; preds = %18
%22 = tail call i32 @ipbus_transaction_payload_size(i32 5, i32 3, i32 0)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %37
24: ; preds = %21
%25 = tail call i32 @ipbus_transaction_payload_size(i32 9, i32 4, i32 15)
%26 = icmp eq i32 %25, 3
br i1 %26, label %27, label %37
27: ; preds = %24
%28 = tail call i32 @ipbus_transaction_payload_size(i32 7, i32 4, i32 0)
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %37
30: ; preds = %27
%31 = tail call i32 @ipbus_transaction_payload_size(i32 9, i32 5, i32 15)
%32 = icmp eq i32 %31, 2
br i1 %32, label %33, label %37
33: ; preds = %30
%34 = tail call i32 @ipbus_transaction_payload_size(i32 7, i32 5, i32 0)
%35 = icmp eq i32 %34, 1
%36 = select i1 %35, i8* null, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0)
br label %37
37: ; preds = %33, %30, %27, %24, %21, %18, %15, %12, %9, %6, %3, %0
%38 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), %0 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), %6 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), %9 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), %12 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), %15 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), %18 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), %21 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), %24 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), %27 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), %30 ], [ %36, %33 ]
ret i8* %38
}