#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;
};

/* Variables and functions */
struct Cyc_List_List *Cyc_List_rrevappend(struct _RegionHandle *,
                                          struct Cyc_List_List *,
                                          int /*<<< orphan*/);
struct Cyc_List_List *Cyc_List_rrev(struct _RegionHandle *r2,
                                    struct Cyc_List_List *x) {
  struct Cyc_List_List *_T0;
  if (x != 0)
    goto _TL79;
  _T0 = 0;
  goto _TL7A;
_TL79:
  _T0 = Cyc_List_rrevappend(r2, x, 0);
_TL7A:
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_List_rrev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1130 <Cyc_List_rrev+0x20>
jmp    113d <Cyc_List_rrev+0x2d>
movq   $0x0,-0x18(%rbp)
jmp    1150 <Cyc_List_rrev+0x40>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <Cyc_List_rrevappend@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_List_rrev>:
test   %rsi,%rsi
je     111c <Cyc_List_rrev+0xc>
xor    %edx,%edx
jmp    1030 <Cyc_List_rrevappend@plt>
xor    %eax,%eax
ret

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

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