#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_comma(struct jslex *);
scalar_t__ my_root_member(struct my_struct *, struct jslex *);
int my_root_members(struct my_struct *dest, struct jslex *lexer) {
  return my_root_member(dest, lexer) &&
         (my_comma(lexer) ? my_root_members(dest, lexer) : 1);
}


x86 assembly (clang, -O0):
<my_root_members>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <my_root_member@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     11a0 <my_root_members+0x70>
mov    -0x10(%rbp),%rdi
call   1050 <my_comma@plt>
cmp    $0x0,%rax
je     1187 <my_root_members+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <my_root_members@plt>
mov    %eax,-0x18(%rbp)
jmp    1194 <my_root_members+0x64>
mov    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1194 <my_root_members+0x64>
mov    -0x18(%rbp),%eax
cmp    $0x0,%eax
setne  %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_members>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <my_root_member@plt>
test   %rax,%rax
je     1167 <my_root_members+0x37>
mov    %rbx,%rdi
call   1050 <my_comma@plt>
test   %rax,%rax
je     116b <my_root_members+0x3b>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <my_root_members@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
jmp    1170 <my_root_members+0x40>
xor    %eax,%eax
jmp    1170 <my_root_members+0x40>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.my_struct = type { i32 }
%struct.jslex = type { i32 }
define i32 @my_root_members(%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.my_struct*, %struct.my_struct** %3
%6 = load %struct.jslex*, %struct.jslex** %4
%7 = call i64 @my_root_member(%struct.my_struct* %5, %struct.jslex* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %21
9: ; preds = %2
%10 = load %struct.jslex*, %struct.jslex** %4
%11 = call i64 @my_comma(%struct.jslex* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load %struct.my_struct*, %struct.my_struct** %3
%15 = load %struct.jslex*, %struct.jslex** %4
%16 = call i32 @my_root_members(%struct.my_struct* %14, %struct.jslex* %15)
br label %18
17: ; preds = %9
br label %18
18: ; preds = %17, %13
%19 = phi i32 [ %16, %13 ], [ 1, %17 ]
%20 = icmp ne i32 %19, 0
br label %21
21: ; preds = %18, %2
%22 = phi i1 [ false, %2 ], [ %20, %18 ]
%23 = zext i1 %22 to i32
ret i32 %23
}

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