#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 */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Absyn_and_exp(struct Cyc_Absyn_Exp *,
                                        struct Cyc_Absyn_Exp *, unsigned int);
struct Cyc_Absyn_Exp *Cyc_Parse_join_assn(struct Cyc_Absyn_Exp *e1,
                                          struct Cyc_Absyn_Exp *e2) {
  struct Cyc_Absyn_Exp *_T0;
  struct Cyc_Absyn_Exp *_T1;
  struct Cyc_Absyn_Exp *_T2;
  if (e1 == 0)
    goto _TL192;
  if (e2 == 0)
    goto _TL192;
  _T0 = Cyc_Absyn_and_exp(e1, e2, 0U);
  return _T0;
_TL192:
  if (e1 == 0)
    goto _TL194;
  _T1 = e1;
  return _T1;
_TL194:
  _T2 = e2;
  return _T2;
}


x86 assembly (clang, -O0):
<Cyc_Parse_join_assn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1130 <Cyc_Parse_join_assn+0x20>
jmp    1160 <Cyc_Parse_join_assn+0x50>
cmpq   $0x0,-0x18(%rbp)
jne    1140 <Cyc_Parse_join_assn+0x30>
jmp    1160 <Cyc_Parse_join_assn+0x50>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1030 <Cyc_Absyn_and_exp@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1195 <Cyc_Parse_join_assn+0x85>
cmpq   $0x0,-0x10(%rbp)
jne    1170 <Cyc_Parse_join_assn+0x60>
jmp    1185 <Cyc_Parse_join_assn+0x75>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1195 <Cyc_Parse_join_assn+0x85>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Parse_join_assn>:
test   %rdi,%rdi
je     1121 <Cyc_Parse_join_assn+0x11>
test   %rsi,%rsi
je     1121 <Cyc_Parse_join_assn+0x11>
xor    %edx,%edx
jmp    1030 <Cyc_Absyn_and_exp@plt>
test   %rdi,%rdi
cmovne %rdi,%rsi
mov    %rsi,%rax
ret

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Parse_join_assn(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1) {
%3 = alloca %struct.Cyc_Absyn_Exp*
%4 = alloca %struct.Cyc_Absyn_Exp*
%5 = alloca %struct.Cyc_Absyn_Exp*
%6 = alloca %struct.Cyc_Absyn_Exp*
%7 = alloca %struct.Cyc_Absyn_Exp*
%8 = alloca %struct.Cyc_Absyn_Exp*
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %4
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %5
%9 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%10 = icmp eq %struct.Cyc_Absyn_Exp* %9, null
br i1 %10, label %11, label %12
11: ; preds = %2
br label %21
12: ; preds = %2
%13 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
%14 = icmp eq %struct.Cyc_Absyn_Exp* %13, null
br i1 %14, label %15, label %16
15: ; preds = %12
br label %21
16: ; preds = %12
%17 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%18 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
%19 = call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_and_exp(%struct.Cyc_Absyn_Exp* %17, %struct.Cyc_Absyn_Exp* %18, i32 0)
store %struct.Cyc_Absyn_Exp* %19, %struct.Cyc_Absyn_Exp** %6
%20 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %6
store %struct.Cyc_Absyn_Exp* %20, %struct.Cyc_Absyn_Exp** %3
br label %31
21: ; preds = %15, %11
%22 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%23 = icmp eq %struct.Cyc_Absyn_Exp* %22, null
br i1 %23, label %24, label %25
24: ; preds = %21
br label %28
25: ; preds = %21
%26 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
store %struct.Cyc_Absyn_Exp* %26, %struct.Cyc_Absyn_Exp** %7
%27 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %7
store %struct.Cyc_Absyn_Exp* %27, %struct.Cyc_Absyn_Exp** %3
br label %31
28: ; preds = %24
%29 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
store %struct.Cyc_Absyn_Exp* %29, %struct.Cyc_Absyn_Exp** %8
%30 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %8
store %struct.Cyc_Absyn_Exp* %30, %struct.Cyc_Absyn_Exp** %3
br label %31
31: ; preds = %28, %25, %16
%32 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %3
ret %struct.Cyc_Absyn_Exp* %32
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Parse_join_assn(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1) {
%3 = icmp eq %struct.Cyc_Absyn_Exp* %0, null
%4 = icmp eq %struct.Cyc_Absyn_Exp* %1, null
%5 = or i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_and_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 0)
br label %10
8: ; preds = %2
%9 = select i1 %3, %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp* %0
br label %10
10: ; preds = %8, %6
%11 = phi %struct.Cyc_Absyn_Exp* [ %7, %6 ], [ %9, %8 ]
ret %struct.Cyc_Absyn_Exp* %11
}