#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*/ fail_test(int);
int /*<<< orphan*/ run(char *);
void test_rel_types() {
  do {
    if (!run("test/progs/"
             "rel_type_same_attr_err.b"))
      fail_test(57);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "rel_type_same_type_err.b"))
      fail_test(58);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "rel_type_max_attrs_1_err.b"))
      fail_test(59);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "rel_type_max_attrs_2_err.b"))
      fail_test(60);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "rel_type_max_attrs_3_err.b"))
      fail_test(61);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "rel_type_max_decl_err.b"))
      fail_test(62);
    ;
  } while (0);
}


x86 assembly (clang, -O0):
<test_rel_types>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <test_rel_types+0x9>
lea    0xed0(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%eax
jne    1148 <test_rel_types+0x28>
mov    $0x39,%edi
call   1030 <fail_test@plt>
jmp    114d <test_rel_types+0x2d>
jmp    1152 <test_rel_types+0x32>
lea    0xecb(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%eax
jne    1171 <test_rel_types+0x51>
mov    $0x3a,%edi
call   1030 <fail_test@plt>
jmp    1176 <test_rel_types+0x56>
jmp    117b <test_rel_types+0x5b>
lea    0xec6(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%eax
jne    119a <test_rel_types+0x7a>
mov    $0x3b,%edi
call   1030 <fail_test@plt>
jmp    119f <test_rel_types+0x7f>
jmp    11a4 <test_rel_types+0x84>
lea    0xec3(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%eax
jne    11c3 <test_rel_types+0xa3>
mov    $0x3c,%edi
call   1030 <fail_test@plt>
jmp    11c8 <test_rel_types+0xa8>
jmp    11cd <test_rel_types+0xad>
lea    0xec0(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%eax
jne    11ec <test_rel_types+0xcc>
mov    $0x3d,%edi
call   1030 <fail_test@plt>
jmp    11f1 <test_rel_types+0xd1>
jmp    11f6 <test_rel_types+0xd6>
lea    0xebd(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%eax
jne    1215 <test_rel_types+0xf5>
mov    $0x3e,%edi
call   1030 <fail_test@plt>
jmp    121a <test_rel_types+0xfa>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rel_types>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <run@plt>
test   %eax,%eax
jne    113b <test_rel_types+0x1b>
mov    $0x39,%edi
call   1030 <fail_test@plt>
lea    0xee2(%rip),%rdi
call   1040 <run@plt>
test   %eax,%eax
jne    1155 <test_rel_types+0x35>
mov    $0x3a,%edi
call   1030 <fail_test@plt>
lea    0xeec(%rip),%rdi
call   1040 <run@plt>
test   %eax,%eax
jne    116f <test_rel_types+0x4f>
mov    $0x3b,%edi
call   1030 <fail_test@plt>
lea    0xef8(%rip),%rdi
call   1040 <run@plt>
test   %eax,%eax
jne    1189 <test_rel_types+0x69>
mov    $0x3c,%edi
call   1030 <fail_test@plt>
lea    0xf04(%rip),%rdi
call   1040 <run@plt>
test   %eax,%eax
jne    11a3 <test_rel_types+0x83>
mov    $0x3d,%edi
call   1030 <fail_test@plt>
lea    0xf10(%rip),%rdi
call   1040 <run@plt>
test   %eax,%eax
je     11b5 <test_rel_types+0x95>
pop    %rax
ret
mov    $0x3e,%edi
pop    %rax
jmp    1030 <fail_test@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"test/progs/rel_type_same_attr_err.b\00"
@.str.1 = [36 x i8] c"test/progs/rel_type_same_type_err.b\00"
@.str.2 = [38 x i8] c"test/progs/rel_type_max_attrs_1_err.b\00"
@.str.3 = [38 x i8] c"test/progs/rel_type_max_attrs_2_err.b\00"
@.str.4 = [38 x i8] c"test/progs/rel_type_max_attrs_3_err.b\00"
@.str.5 = [35 x i8] c"test/progs/rel_type_max_decl_err.b\00"
define void @test_rel_types() {
br label %1
1: ; preds = %0
%2 = call i32 @run(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = call i32 @fail_test(i32 57)
br label %6
6: ; preds = %4, %1
br label %7
7: ; preds = %6
br label %8
8: ; preds = %7
%9 = call i32 @run(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp ne i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %8
%12 = call i32 @fail_test(i32 58)
br label %13
13: ; preds = %11, %8
br label %14
14: ; preds = %13
br label %15
15: ; preds = %14
%16 = call i32 @run(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%17 = icmp ne i32 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = call i32 @fail_test(i32 59)
br label %20
20: ; preds = %18, %15
br label %21
21: ; preds = %20
br label %22
22: ; preds = %21
%23 = call i32 @run(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %22
%26 = call i32 @fail_test(i32 60)
br label %27
27: ; preds = %25, %22
br label %28
28: ; preds = %27
br label %29
29: ; preds = %28
%30 = call i32 @run(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %34, label %32
32: ; preds = %29
%33 = call i32 @fail_test(i32 61)
br label %34
34: ; preds = %32, %29
br label %35
35: ; preds = %34
br label %36
36: ; preds = %35
%37 = call i32 @run(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%38 = icmp ne i32 %37, 0
br i1 %38, label %41, label %39
39: ; preds = %36
%40 = call i32 @fail_test(i32 62)
br label %41
41: ; preds = %39, %36
br label %42
42: ; preds = %41
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"test/progs/rel_type_same_attr_err.b\00"
@.str.1 = [36 x i8] c"test/progs/rel_type_same_type_err.b\00"
@.str.2 = [38 x i8] c"test/progs/rel_type_max_attrs_1_err.b\00"
@.str.3 = [38 x i8] c"test/progs/rel_type_max_attrs_2_err.b\00"
@.str.4 = [38 x i8] c"test/progs/rel_type_max_attrs_3_err.b\00"
@.str.5 = [35 x i8] c"test/progs/rel_type_max_decl_err.b\00"
define void @test_rel_types() {
%1 = tail call i32 @run(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @fail_test(i32 57)
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @run(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @fail_test(i32 58)
br label %10
10: ; preds = %8, %5
%11 = tail call i32 @run(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 @fail_test(i32 59)
br label %15
15: ; preds = %13, %10
%16 = tail call i32 @run(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = tail call i32 @fail_test(i32 60)
br label %20
20: ; preds = %18, %15
%21 = tail call i32 @run(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = tail call i32 @fail_test(i32 61)
br label %25
25: ; preds = %23, %20
%26 = tail call i32 @run(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = tail call i32 @fail_test(i32 62)
br label %30
30: ; preds = %25, %28
ret void
}