#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 my_struct {
  int dummy;
};
struct jslex {
  int dummy;
};

/* Variables and functions */
scalar_t__ my_lbrace(struct jslex *);
scalar_t__ my_rbrace(struct jslex *);
scalar_t__ my_root_members(struct my_struct *, struct jslex *);
int my_root_object(struct my_struct *dest, struct jslex *lexer) {
  return my_lbrace(lexer) &&
         (my_rbrace(lexer) ||
          (my_root_members(dest, lexer) && my_rbrace(lexer)));
}


x86 assembly (clang, -O0):
<my_root_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <my_lbrace@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     11b4 <my_root_object+0x84>
mov    -0x10(%rbp),%rdi
call   1050 <my_rbrace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x12(%rbp)
jne    11ae <my_root_object+0x7e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <my_root_members@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x13(%rbp)
je     11a8 <my_root_object+0x78>
mov    -0x10(%rbp),%rdi
call   1050 <my_rbrace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x13(%rbp)
mov    -0x13(%rbp),%al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_root_object>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <my_lbrace@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     118c <my_root_object+0x5c>
mov    %rbx,%rdi
call   1050 <my_rbrace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    118c <my_root_object+0x5c>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <my_root_members@plt>
mov    %rax,%rcx
mov    $0x0,%eax
test   %rcx,%rcx
je     118c <my_root_object+0x5c>
mov    %rbx,%rdi
call   1050 <my_rbrace@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.my_struct = type { i32 }
%struct.jslex = type { i32 }
define i32 @my_root_object(%struct.my_struct* %0, %struct.jslex* %1) {
%3 = alloca %struct.my_struct*
%4 = alloca %struct.jslex*
store %struct.my_struct* %0, %struct.my_struct** %3
store %struct.jslex* %1, %struct.jslex** %4
%5 = load %struct.jslex*, %struct.jslex** %4
%6 = call i64 @my_lbrace(%struct.jslex* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %25
8: ; preds = %2
%9 = load %struct.jslex*, %struct.jslex** %4
%10 = call i64 @my_rbrace(%struct.jslex* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %23, label %12
12: ; preds = %8
%13 = load %struct.my_struct*, %struct.my_struct** %3
%14 = load %struct.jslex*, %struct.jslex** %4
%15 = call i64 @my_root_members(%struct.my_struct* %13, %struct.jslex* %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %12
%18 = load %struct.jslex*, %struct.jslex** %4
%19 = call i64 @my_rbrace(%struct.jslex* %18)
%20 = icmp ne i64 %19, 0
br label %21
21: ; preds = %17, %12
%22 = phi i1 [ false, %12 ], [ %20, %17 ]
br label %23
23: ; preds = %21, %8
%24 = phi i1 [ true, %8 ], [ %22, %21 ]
br label %25
25: ; preds = %23, %2
%26 = phi i1 [ false, %2 ], [ %24, %23 ]
%27 = zext i1 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
%struct.my_struct = type { i32 }
%struct.jslex = type { i32 }
define i32 @my_root_object(%struct.my_struct* %0, %struct.jslex* %1) {
%3 = tail call i64 @my_lbrace(%struct.jslex* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2
%6 = tail call i64 @my_rbrace(%struct.jslex* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = tail call i64 @my_root_members(%struct.my_struct* %0, %struct.jslex* %1)
%10 = icmp eq i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = tail call i64 @my_rbrace(%struct.jslex* %1)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %5, %11, %8, %2
%16 = phi i32 [ 0, %2 ], [ 1, %5 ], [ 0, %8 ], [ %14, %11 ]
ret i32 %16
}