#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 */

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int verify_binary_clauses(int *varssigns, int var1, int sign1, int var2,
                          int sign2) {
  if (var1 == *varssigns) {
    if ((*(varssigns + 1) != 1 - sign1) || (var2 != *(varssigns + 2)) ||
        (*(varssigns + 3) != 1 - sign2)) {
      printf("VBC problem..");
      exit(30);
      return 0;
    }
  } else {
    if ((var2 != *varssigns) || (*(varssigns + 1) != 1 - sign2) ||
        (var1 != *(varssigns + 2)) || (*(varssigns + 3) != 1 - sign1)) {
      printf("VBC problem..");
      exit(30);
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<verify_binary_clauses>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jne    11a1 <verify_binary_clauses+0x81>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0x1,%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jne    1186 <verify_binary_clauses+0x66>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x8(%rcx),%eax
jne    1186 <verify_binary_clauses+0x66>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    $0x1,%ecx
sub    -0x18(%rbp),%ecx
cmp    %ecx,%eax
je     119c <verify_binary_clauses+0x7c>
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1e,%edi
call   1040 <exit@plt>
jmp    1209 <verify_binary_clauses+0xe9>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jne    11ee <verify_binary_clauses+0xce>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0x1,%ecx
sub    -0x18(%rbp),%ecx
cmp    %ecx,%eax
jne    11ee <verify_binary_clauses+0xce>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x8(%rcx),%eax
jne    11ee <verify_binary_clauses+0xce>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    $0x1,%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
je     1204 <verify_binary_clauses+0xe4>
lea    0xe0b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1e,%edi
call   1040 <exit@plt>
jmp    1209 <verify_binary_clauses+0xe9>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_binary_clauses>:
push   %rax
mov    (%rdi),%eax
cmp    %esi,%eax
jne    1142 <verify_binary_clauses+0x22>
mov    $0x1,%eax
sub    %edx,%eax
cmp    %eax,0x4(%rdi)
jne    116b <verify_binary_clauses+0x4b>
cmp    %ecx,0x8(%rdi)
jne    116b <verify_binary_clauses+0x4b>
mov    $0x1,%eax
sub    %r8d,%eax
jmp    115f <verify_binary_clauses+0x3f>
cmp    %ecx,%eax
jne    116b <verify_binary_clauses+0x4b>
mov    $0x1,%eax
sub    %r8d,%eax
cmp    %eax,0x4(%rdi)
jne    116b <verify_binary_clauses+0x4b>
cmp    %esi,0x8(%rdi)
jne    116b <verify_binary_clauses+0x4b>
mov    $0x1,%eax
sub    %edx,%eax
cmp    %eax,0xc(%rdi)
jne    116b <verify_binary_clauses+0x4b>
mov    $0x1,%eax
pop    %rcx
ret
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1e,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"VBC problem..\00"
define i32 @verify_binary_clauses(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %7
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = icmp eq i32 %11, %13
br i1 %14, label %15, label %39
15: ; preds = %5
%16 = load i32*, i32** %6
%17 = getelementptr inbounds i32, i32* %16, i64 1
%18 = load i32, i32* %17
%19 = load i32, i32* %8
%20 = sub nsw i32 1, %19
%21 = icmp ne i32 %18, %20
br i1 %21, label %35, label %22
22: ; preds = %15
%23 = load i32, i32* %9
%24 = load i32*, i32** %6
%25 = getelementptr inbounds i32, i32* %24, i64 2
%26 = load i32, i32* %25
%27 = icmp ne i32 %23, %26
br i1 %27, label %35, label %28
28: ; preds = %22
%29 = load i32*, i32** %6
%30 = getelementptr inbounds i32, i32* %29, i64 3
%31 = load i32, i32* %30
%32 = load i32, i32* %10
%33 = sub nsw i32 1, %32
%34 = icmp ne i32 %31, %33
br i1 %34, label %35, label %38
35: ; preds = %28, %22, %15
%36 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%37 = call i32 @exit(i32 30)
unreachable
38: ; preds = %28
br label %68
39: ; preds = %5
%40 = load i32, i32* %9
%41 = load i32*, i32** %6
%42 = load i32, i32* %41
%43 = icmp ne i32 %40, %42
br i1 %43, label %64, label %44
44: ; preds = %39
%45 = load i32*, i32** %6
%46 = getelementptr inbounds i32, i32* %45, i64 1
%47 = load i32, i32* %46
%48 = load i32, i32* %10
%49 = sub nsw i32 1, %48
%50 = icmp ne i32 %47, %49
br i1 %50, label %64, label %51
51: ; preds = %44
%52 = load i32, i32* %7
%53 = load i32*, i32** %6
%54 = getelementptr inbounds i32, i32* %53, i64 2
%55 = load i32, i32* %54
%56 = icmp ne i32 %52, %55
br i1 %56, label %64, label %57
57: ; preds = %51
%58 = load i32*, i32** %6
%59 = getelementptr inbounds i32, i32* %58, i64 3
%60 = load i32, i32* %59
%61 = load i32, i32* %8
%62 = sub nsw i32 1, %61
%63 = icmp ne i32 %60, %62
br i1 %63, label %64, label %67
64: ; preds = %57, %51, %44, %39
%65 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%66 = call i32 @exit(i32 30)
unreachable
67: ; preds = %57
br label %68
68: ; preds = %67, %38
ret i32 1
}

LLVM IR (-O2):
@.str = [14 x i8] c"VBC problem..\00"
define i32 @verify_binary_clauses(i32* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = load i32, i32* %0
%7 = icmp eq i32 %6, %1
br i1 %7, label %8, label %25
8: ; preds = %5
%9 = getelementptr inbounds i32, i32* %0, i64 1
%10 = load i32, i32* %9
%11 = sub nsw i32 1, %2
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %22
13: ; preds = %8
%14 = getelementptr inbounds i32, i32* %0, i64 2
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, %3
br i1 %16, label %17, label %22
17: ; preds = %13
%18 = getelementptr inbounds i32, i32* %0, i64 3
%19 = load i32, i32* %18
%20 = sub nsw i32 1, %4
%21 = icmp eq i32 %19, %20
br i1 %21, label %44, label %22
22: ; preds = %17, %13, %8
%23 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%24 = tail call i32 @exit(i32 30)
unreachable
25: ; preds = %5
%26 = icmp eq i32 %6, %3
br i1 %26, label %27, label %41
27: ; preds = %25
%28 = getelementptr inbounds i32, i32* %0, i64 1
%29 = load i32, i32* %28
%30 = sub nsw i32 1, %4
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %41
32: ; preds = %27
%33 = getelementptr inbounds i32, i32* %0, i64 2
%34 = load i32, i32* %33
%35 = icmp eq i32 %34, %1
br i1 %35, label %36, label %41
36: ; preds = %32
%37 = getelementptr inbounds i32, i32* %0, i64 3
%38 = load i32, i32* %37
%39 = sub nsw i32 1, %2
%40 = icmp eq i32 %38, %39
br i1 %40, label %44, label %41
41: ; preds = %36, %32, %27, %25
%42 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%43 = tail call i32 @exit(i32 30)
unreachable
44: ; preds = %36, %17
ret i32 1
}