#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);
scalar_t__ run(char *);
void test_assign() {
  do {
    if (run("test/progs/"
            "assign_basic.b"))
      fail_test(175);
    ;
  } while (0);
  do {
    if (run("test/progs/"
            "assign_union.b"))
      fail_test(176);
    ;
  } while (0);
  do {
    if (run("test/progs/"
            "assign_diff.b"))
      fail_test(177);
    ;
  } while (0);
  do {
    if (run("test/progs/"
            "assign_semidiff.b"))
      fail_test(178);
    ;
  } while (0);
  do {
    if (run("test/progs/"
            "assign_join.b"))
      fail_test(179);
    ;
  } while (0);
  do {
    if (run("test/progs/"
            "assign_semijoin.b"))
      fail_test(180);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "assign_bad_wvar_err.b"))
      fail_test(181);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "assign_bad_types_err.b"))
      fail_test(182);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "assign_union_bad_types_err.b"))
      fail_test(183);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "assign_diff_bad_types_err.b"))
      fail_test(184);
    ;
  } while (0);
  do {
    if (!run("test/progs/"
             "assign_join_bad_types_err.b"))
      fail_test(185);
    ;
  } while (0);
}


x86 assembly (clang, -O0):
<test_assign>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <test_assign+0x9>
lea    0xed0(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
je     1149 <test_assign+0x29>
mov    $0xaf,%edi
call   1030 <fail_test@plt>
jmp    114e <test_assign+0x2e>
jmp    1153 <test_assign+0x33>
lea    0xec0(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
je     1173 <test_assign+0x53>
mov    $0xb0,%edi
call   1030 <fail_test@plt>
jmp    1178 <test_assign+0x58>
jmp    117d <test_assign+0x5d>
lea    0xeb0(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
je     119d <test_assign+0x7d>
mov    $0xb1,%edi
call   1030 <fail_test@plt>
jmp    11a2 <test_assign+0x82>
jmp    11a7 <test_assign+0x87>
lea    0xe9f(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
je     11c7 <test_assign+0xa7>
mov    $0xb2,%edi
call   1030 <fail_test@plt>
jmp    11cc <test_assign+0xac>
jmp    11d1 <test_assign+0xb1>
lea    0xe92(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
je     11f1 <test_assign+0xd1>
mov    $0xb3,%edi
call   1030 <fail_test@plt>
jmp    11f6 <test_assign+0xd6>
jmp    11fb <test_assign+0xdb>
lea    0xe81(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
je     121b <test_assign+0xfb>
mov    $0xb4,%edi
call   1030 <fail_test@plt>
jmp    1220 <test_assign+0x100>
jmp    1225 <test_assign+0x105>
lea    0xe74(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
jne    1245 <test_assign+0x125>
mov    $0xb5,%edi
call   1030 <fail_test@plt>
jmp    124a <test_assign+0x12a>
jmp    124f <test_assign+0x12f>
lea    0xe6b(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
jne    126f <test_assign+0x14f>
mov    $0xb6,%edi
call   1030 <fail_test@plt>
jmp    1274 <test_assign+0x154>
jmp    1279 <test_assign+0x159>
lea    0xe63(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
jne    1299 <test_assign+0x179>
mov    $0xb7,%edi
call   1030 <fail_test@plt>
jmp    129e <test_assign+0x17e>
jmp    12a3 <test_assign+0x183>
lea    0xe61(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
jne    12c3 <test_assign+0x1a3>
mov    $0xb8,%edi
call   1030 <fail_test@plt>
jmp    12c8 <test_assign+0x1a8>
jmp    12cd <test_assign+0x1ad>
lea    0xe5e(%rip),%rdi
call   1040 <run@plt>
cmp    $0x0,%rax
jne    12ed <test_assign+0x1cd>
mov    $0xb9,%edi
call   1030 <fail_test@plt>
jmp    12f2 <test_assign+0x1d2>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_assign>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
je     113c <test_assign+0x1c>
mov    $0xaf,%edi
call   1030 <fail_test@plt>
lea    0xed7(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
je     1157 <test_assign+0x37>
mov    $0xb0,%edi
call   1030 <fail_test@plt>
lea    0xed6(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
je     1172 <test_assign+0x52>
mov    $0xb1,%edi
call   1030 <fail_test@plt>
lea    0xed4(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
je     118d <test_assign+0x6d>
mov    $0xb2,%edi
call   1030 <fail_test@plt>
lea    0xed6(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
je     11a8 <test_assign+0x88>
mov    $0xb3,%edi
call   1030 <fail_test@plt>
lea    0xed4(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
je     11c3 <test_assign+0xa3>
mov    $0xb4,%edi
call   1030 <fail_test@plt>
lea    0xed6(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
jne    11de <test_assign+0xbe>
mov    $0xb5,%edi
call   1030 <fail_test@plt>
lea    0xedc(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
jne    11f9 <test_assign+0xd9>
mov    $0xb6,%edi
call   1030 <fail_test@plt>
lea    0xee3(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
jne    1214 <test_assign+0xf4>
mov    $0xb7,%edi
call   1030 <fail_test@plt>
lea    0xef0(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
jne    122f <test_assign+0x10f>
mov    $0xb8,%edi
call   1030 <fail_test@plt>
lea    0xefc(%rip),%rdi
call   1040 <run@plt>
test   %rax,%rax
je     1242 <test_assign+0x122>
pop    %rax
ret
mov    $0xb9,%edi
pop    %rax
jmp    1030 <fail_test@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"test/progs/assign_basic.b\00"
@.str.1 = [26 x i8] c"test/progs/assign_union.b\00"
@.str.2 = [25 x i8] c"test/progs/assign_diff.b\00"
@.str.3 = [29 x i8] c"test/progs/assign_semidiff.b\00"
@.str.4 = [25 x i8] c"test/progs/assign_join.b\00"
@.str.5 = [29 x i8] c"test/progs/assign_semijoin.b\00"
@.str.6 = [33 x i8] c"test/progs/assign_bad_wvar_err.b\00"
@.str.7 = [34 x i8] c"test/progs/assign_bad_types_err.b\00"
@.str.8 = [40 x i8] c"test/progs/assign_union_bad_types_err.b\00"
@.str.9 = [39 x i8] c"test/progs/assign_diff_bad_types_err.b\00"
@.str.10 = [39 x i8] c"test/progs/assign_join_bad_types_err.b\00"
define void @test_assign() {
br label %1
1: ; preds = %0
%2 = call i64 @run(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = call i32 @fail_test(i32 175)
br label %6
6: ; preds = %4, %1
br label %7
7: ; preds = %6
br label %8
8: ; preds = %7
%9 = call i64 @run(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @fail_test(i32 176)
br label %13
13: ; preds = %11, %8
br label %14
14: ; preds = %13
br label %15
15: ; preds = %14
%16 = call i64 @run(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 @fail_test(i32 177)
br label %20
20: ; preds = %18, %15
br label %21
21: ; preds = %20
br label %22
22: ; preds = %21
%23 = call i64 @run(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 @fail_test(i32 178)
br label %27
27: ; preds = %25, %22
br label %28
28: ; preds = %27
br label %29
29: ; preds = %28
%30 = call i64 @run(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 @fail_test(i32 179)
br label %34
34: ; preds = %32, %29
br label %35
35: ; preds = %34
br label %36
36: ; preds = %35
%37 = call i64 @run(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @fail_test(i32 180)
br label %41
41: ; preds = %39, %36
br label %42
42: ; preds = %41
br label %43
43: ; preds = %42
%44 = call i64 @run(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%45 = icmp ne i64 %44, 0
br i1 %45, label %48, label %46
46: ; preds = %43
%47 = call i32 @fail_test(i32 181)
br label %48
48: ; preds = %46, %43
br label %49
49: ; preds = %48
br label %50
50: ; preds = %49
%51 = call i64 @run(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%52 = icmp ne i64 %51, 0
br i1 %52, label %55, label %53
53: ; preds = %50
%54 = call i32 @fail_test(i32 182)
br label %55
55: ; preds = %53, %50
br label %56
56: ; preds = %55
br label %57
57: ; preds = %56
%58 = call i64 @run(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%59 = icmp ne i64 %58, 0
br i1 %59, label %62, label %60
60: ; preds = %57
%61 = call i32 @fail_test(i32 183)
br label %62
62: ; preds = %60, %57
br label %63
63: ; preds = %62
br label %64
64: ; preds = %63
%65 = call i64 @run(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0))
%66 = icmp ne i64 %65, 0
br i1 %66, label %69, label %67
67: ; preds = %64
%68 = call i32 @fail_test(i32 184)
br label %69
69: ; preds = %67, %64
br label %70
70: ; preds = %69
br label %71
71: ; preds = %70
%72 = call i64 @run(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
%73 = icmp ne i64 %72, 0
br i1 %73, label %76, label %74
74: ; preds = %71
%75 = call i32 @fail_test(i32 185)
br label %76
76: ; preds = %74, %71
br label %77
77: ; preds = %76
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"test/progs/assign_basic.b\00"
@.str.1 = [26 x i8] c"test/progs/assign_union.b\00"
@.str.2 = [25 x i8] c"test/progs/assign_diff.b\00"
@.str.3 = [29 x i8] c"test/progs/assign_semidiff.b\00"
@.str.4 = [25 x i8] c"test/progs/assign_join.b\00"
@.str.5 = [29 x i8] c"test/progs/assign_semijoin.b\00"
@.str.6 = [33 x i8] c"test/progs/assign_bad_wvar_err.b\00"
@.str.7 = [34 x i8] c"test/progs/assign_bad_types_err.b\00"
@.str.8 = [40 x i8] c"test/progs/assign_union_bad_types_err.b\00"
@.str.9 = [39 x i8] c"test/progs/assign_diff_bad_types_err.b\00"
@.str.10 = [39 x i8] c"test/progs/assign_join_bad_types_err.b\00"
define void @test_assign() {
%1 = tail call i64 @run(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @fail_test(i32 175)
br label %5
5: ; preds = %3, %0
%6 = tail call i64 @run(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @fail_test(i32 176)
br label %10
10: ; preds = %8, %5
%11 = tail call i64 @run(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @fail_test(i32 177)
br label %15
15: ; preds = %13, %10
%16 = tail call i64 @run(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 @fail_test(i32 178)
br label %20
20: ; preds = %18, %15
%21 = tail call i64 @run(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 @fail_test(i32 179)
br label %25
25: ; preds = %23, %20
%26 = tail call i64 @run(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 @fail_test(i32 180)
br label %30
30: ; preds = %28, %25
%31 = tail call i64 @run(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = tail call i32 @fail_test(i32 181)
br label %35
35: ; preds = %33, %30
%36 = tail call i64 @run(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = tail call i32 @fail_test(i32 182)
br label %40
40: ; preds = %38, %35
%41 = tail call i64 @run(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = tail call i32 @fail_test(i32 183)
br label %45
45: ; preds = %43, %40
%46 = tail call i64 @run(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = tail call i32 @fail_test(i32 184)
br label %50
50: ; preds = %48, %45
%51 = tail call i64 @run(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = tail call i32 @fail_test(i32 185)
br label %55
55: ; preds = %50, %53
ret void
}