#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) {
  int nb = 0;
  if (var1 == *varssigns) {
    if ((*(varssigns + 1) != 1 - sign1) || (var2 != *(varssigns + 2)) ||
        (*(varssigns + 3) != 1 - sign2)) {
      printf("c problem..\n");
      exit(30);
      return 0;
    }
  } else {
    if ((var2 != *varssigns) || (*(varssigns + 1) != 1 - sign2) ||
        (var1 != *(varssigns + 2)) || (*(varssigns + 3) != 1 - sign1)) {
      printf("c problem..\n");
      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)
movl   $0x0,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jne    11a8 <verify_binary_clauses+0x88>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0x1,%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jne    118d <verify_binary_clauses+0x6d>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x8(%rcx),%eax
jne    118d <verify_binary_clauses+0x6d>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    $0x1,%ecx
sub    -0x18(%rbp),%ecx
cmp    %ecx,%eax
je     11a3 <verify_binary_clauses+0x83>
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1e,%edi
call   1040 <exit@plt>
jmp    1210 <verify_binary_clauses+0xf0>
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jne    11f5 <verify_binary_clauses+0xd5>
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0x1,%ecx
sub    -0x18(%rbp),%ecx
cmp    %ecx,%eax
jne    11f5 <verify_binary_clauses+0xd5>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0x8(%rcx),%eax
jne    11f5 <verify_binary_clauses+0xd5>
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    $0x1,%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
je     120b <verify_binary_clauses+0xeb>
lea    0xe04(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1e,%edi
call   1040 <exit@plt>
jmp    1210 <verify_binary_clauses+0xf0>
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 <puts@plt>
mov    $0x1e,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@str.1 = [12 x i8] c"c 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 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.1, 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 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.1, i64 0, i64 0))
%43 = tail call i32 @exit(i32 30)
unreachable
44: ; preds = %36, %17
ret i32 1
}