#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 myovlList {
  int dummy;
};

/* Variables and functions */
char isSpur(struct myovlList *, int);
char isBridge(struct myovlList *G, int r1pathID, int r2pathID) {
  char r1side = isSpur(G, r1pathID);
  char r2side = isSpur(G, r2pathID);
  if (r1side != 3 && r2side != 3) {
    return (r1side << 2) | r2side;
  }
  return -1;
}


x86 assembly (clang, -O0):
<isBridge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <isSpur@plt>
mov    %al,-0x19(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1030 <isSpur@plt>
mov    %al,-0x1a(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x3,%eax
je     116f <isBridge+0x5f>
movsbl -0x1a(%rbp),%eax
cmp    $0x3,%eax
je     116f <isBridge+0x5f>
movsbl -0x19(%rbp),%eax
shl    $0x2,%eax
movsbl -0x1a(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0x1(%rbp)
jmp    1173 <isBridge+0x63>
movb   $0xff,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBridge>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rdi,%rbx
call   1030 <isSpur@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <isSpur@plt>
lea    0x0(,%rbp,4),%ecx
or     %al,%cl
cmp    $0x3,%al
movzbl %cl,%eax
mov    $0xff,%ecx
cmove  %ecx,%eax
cmp    $0x3,%bpl
cmove  %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.myovlList = type { i32 }
define signext i8 @isBridge(%struct.myovlList* %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca %struct.myovlList*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
store %struct.myovlList* %0, %struct.myovlList** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%10 = load %struct.myovlList*, %struct.myovlList** %5
%11 = load i32, i32* %6
%12 = call signext i8 @isSpur(%struct.myovlList* %10, i32 %11)
store i8 %12, i8* %8
%13 = load %struct.myovlList*, %struct.myovlList** %5
%14 = load i32, i32* %7
%15 = call signext i8 @isSpur(%struct.myovlList* %13, i32 %14)
store i8 %15, i8* %9
%16 = load i8, i8* %8
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 3
br i1 %18, label %19, label %31
19: ; preds = %3
%20 = load i8, i8* %9
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 3
br i1 %22, label %23, label %31
23: ; preds = %19
%24 = load i8, i8* %8
%25 = sext i8 %24 to i32
%26 = shl i32 %25, 2
%27 = load i8, i8* %9
%28 = sext i8 %27 to i32
%29 = or i32 %26, %28
%30 = trunc i32 %29 to i8
store i8 %30, i8* %4
br label %32
31: ; preds = %19, %3
store i8 -1, i8* %4
br label %32
32: ; preds = %31, %23
%33 = load i8, i8* %4
ret i8 %33
}

LLVM IR (-O2):
%struct.myovlList = type { i32 }
define signext i8 @isBridge(%struct.myovlList* %0, i32 %1, i32 %2) {
%4 = tail call signext i8 @isSpur(%struct.myovlList* %0, i32 %1)
%5 = tail call signext i8 @isSpur(%struct.myovlList* %0, i32 %2)
%6 = icmp ne i8 %4, 3
%7 = icmp ne i8 %5, 3
%8 = select i1 %6, i1 %7, i1 false
%9 = shl i8 %4, 2
%10 = or i8 %9, %5
%11 = select i1 %8, i8 %10, i8 -1
ret i8 %11
}