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

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Tcutil_rsubsexp(struct _RegionHandle *,
                                          struct Cyc_List_List *,
                                          struct Cyc_Absyn_Exp *);
struct Cyc_Absyn_Exp *Cyc_Tcutil_rsubs_exp_opt(struct _RegionHandle *r,
                                               struct Cyc_List_List *inst,
                                               struct Cyc_Absyn_Exp *e) {
  struct Cyc_Absyn_Exp *_T0;
  if (e != 0)
    goto _TL477;
  _T0 = 0;
  goto _TL478;
_TL477:
  _T0 = Cyc_Tcutil_rsubsexp(r, inst, e);
_TL478:
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Tcutil_rsubs_exp_opt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1134 <Cyc_Tcutil_rsubs_exp_opt+0x24>
jmp    1141 <Cyc_Tcutil_rsubs_exp_opt+0x31>
movq   $0x0,-0x20(%rbp)
jmp    1156 <Cyc_Tcutil_rsubs_exp_opt+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <Cyc_Tcutil_rsubsexp@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcutil_rsubs_exp_opt>:
test   %rdx,%rdx
je     111a <Cyc_Tcutil_rsubs_exp_opt+0xa>
jmp    1030 <Cyc_Tcutil_rsubsexp@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct._RegionHandle = type { i32 }
%struct.Cyc_List_List = type { i32 }
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_rsubs_exp_opt(%struct._RegionHandle* %0, %struct.Cyc_List_List* %1, %struct.Cyc_Absyn_Exp* %2) {
%4 = alloca %struct._RegionHandle*
%5 = alloca %struct.Cyc_List_List*
%6 = alloca %struct.Cyc_Absyn_Exp*
%7 = alloca %struct.Cyc_Absyn_Exp*
store %struct._RegionHandle* %0, %struct._RegionHandle** %4
store %struct.Cyc_List_List* %1, %struct.Cyc_List_List** %5
store %struct.Cyc_Absyn_Exp* %2, %struct.Cyc_Absyn_Exp** %6
%8 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %6
%9 = icmp ne %struct.Cyc_Absyn_Exp* %8, null
br i1 %9, label %10, label %11
10: ; preds = %3
br label %12
11: ; preds = %3
store %struct.Cyc_Absyn_Exp* null, %struct.Cyc_Absyn_Exp** %7
br label %17
12: ; preds = %10
%13 = load %struct._RegionHandle*, %struct._RegionHandle** %4
%14 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %5
%15 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %6
%16 = call %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_rsubsexp(%struct._RegionHandle* %13, %struct.Cyc_List_List* %14, %struct.Cyc_Absyn_Exp* %15)
store %struct.Cyc_Absyn_Exp* %16, %struct.Cyc_Absyn_Exp** %7
br label %17
17: ; preds = %12, %11
%18 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %7
ret %struct.Cyc_Absyn_Exp* %18
}

LLVM IR (-O2):
%struct._RegionHandle = type { i32 }
%struct.Cyc_List_List = type { i32 }
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_rsubs_exp_opt(%struct._RegionHandle* %0, %struct.Cyc_List_List* %1, %struct.Cyc_Absyn_Exp* %2) {
%4 = icmp eq %struct.Cyc_Absyn_Exp* %2, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Tcutil_rsubsexp(%struct._RegionHandle* %0, %struct.Cyc_List_List* %1, %struct.Cyc_Absyn_Exp* %2)
br label %7
7: ; preds = %3, %5
%8 = phi %struct.Cyc_Absyn_Exp* [ %6, %5 ], [ null, %3 ]
ret %struct.Cyc_Absyn_Exp* %8
}