#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 stat {
  scalar_t__ st_dev;
  scalar_t__ st_ino;
  scalar_t__ st_mode;
  scalar_t__ st_nlink;
  scalar_t__ st_uid;
  scalar_t__ st_gid;
  scalar_t__ st_rdev;
  scalar_t__ st_size;
  scalar_t__ st_blksize;
  scalar_t__ st_blocks;
  scalar_t__ st_atime;
  scalar_t__ st_mtime;
  scalar_t__ st_ctime;
};

/* Variables and functions */
int StatCmp(struct stat *stat1, struct stat *stat2) {
  if ((stat1->st_dev != stat2->st_dev) || (stat1->st_ino != stat2->st_ino) ||
      (stat1->st_mode != stat2->st_mode) ||
      (stat1->st_nlink != stat2->st_nlink) ||
      (stat1->st_uid != stat2->st_uid) || (stat1->st_gid != stat2->st_gid) ||
      (stat1->st_rdev != stat2->st_rdev) ||
      (stat1->st_size != stat2->st_size) ||
      (stat1->st_blksize != stat2->st_blksize) ||
      (stat1->st_blocks != stat2->st_blocks) ||
      (stat1->st_atime != stat2->st_atime) ||
      (stat1->st_mtime != stat2->st_mtime) ||
      (stat1->st_ctime != stat2->st_ctime)) {
    return -1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<StatCmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x8(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x10(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x18(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x20(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x28(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x30(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x38(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x40(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x48(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x48(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x50(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x50(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x58(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x58(%rcx),%rax
jne    1228 <StatCmp+0x128>
mov    -0x10(%rbp),%rax
mov    0x60(%rax),%rax
mov    -0x18(%rbp),%rcx
cmp    0x60(%rcx),%rax
je     1234 <StatCmp+0x134>
movl   $0xffffffff,-0x4(%rbp)
jmp    123b <StatCmp+0x13b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StatCmp>:
mov    (%rdi),%rcx
mov    $0xffffffff,%eax
cmp    (%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x8(%rdi),%rcx
cmp    0x8(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x10(%rdi),%rcx
cmp    0x10(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x18(%rdi),%rcx
cmp    0x18(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x20(%rdi),%rcx
cmp    0x20(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x28(%rdi),%rcx
cmp    0x28(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x30(%rdi),%rcx
cmp    0x30(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x38(%rdi),%rcx
cmp    0x38(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x40(%rdi),%rcx
cmp    0x40(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x48(%rdi),%rcx
cmp    0x48(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x50(%rdi),%rcx
cmp    0x50(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x58(%rdi),%rcx
cmp    0x58(%rsi),%rcx
jne    118a <StatCmp+0x8a>
mov    0x60(%rdi),%rcx
xor    %eax,%eax
cmp    0x60(%rsi),%rcx
setne  %al
neg    %eax
ret

LLVM IR (-O0):
%struct.stat = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
define i32 @StatCmp(%struct.stat* %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
%5 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %4
store %struct.stat* %1, %struct.stat** %5
%6 = load %struct.stat*, %struct.stat** %4
%7 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%8 = load i64, i64* %7
%9 = load %struct.stat*, %struct.stat** %5
%10 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%11 = load i64, i64* %10
%12 = icmp ne i64 %8, %11
br i1 %12, label %109, label %13
13: ; preds = %2
%14 = load %struct.stat*, %struct.stat** %4
%15 = getelementptr inbounds %struct.stat, %struct.stat* %14, i32 0, i32 1
%16 = load i64, i64* %15
%17 = load %struct.stat*, %struct.stat** %5
%18 = getelementptr inbounds %struct.stat, %struct.stat* %17, i32 0, i32 1
%19 = load i64, i64* %18
%20 = icmp ne i64 %16, %19
br i1 %20, label %109, label %21
21: ; preds = %13
%22 = load %struct.stat*, %struct.stat** %4
%23 = getelementptr inbounds %struct.stat, %struct.stat* %22, i32 0, i32 2
%24 = load i64, i64* %23
%25 = load %struct.stat*, %struct.stat** %5
%26 = getelementptr inbounds %struct.stat, %struct.stat* %25, i32 0, i32 2
%27 = load i64, i64* %26
%28 = icmp ne i64 %24, %27
br i1 %28, label %109, label %29
29: ; preds = %21
%30 = load %struct.stat*, %struct.stat** %4
%31 = getelementptr inbounds %struct.stat, %struct.stat* %30, i32 0, i32 3
%32 = load i64, i64* %31
%33 = load %struct.stat*, %struct.stat** %5
%34 = getelementptr inbounds %struct.stat, %struct.stat* %33, i32 0, i32 3
%35 = load i64, i64* %34
%36 = icmp ne i64 %32, %35
br i1 %36, label %109, label %37
37: ; preds = %29
%38 = load %struct.stat*, %struct.stat** %4
%39 = getelementptr inbounds %struct.stat, %struct.stat* %38, i32 0, i32 4
%40 = load i64, i64* %39
%41 = load %struct.stat*, %struct.stat** %5
%42 = getelementptr inbounds %struct.stat, %struct.stat* %41, i32 0, i32 4
%43 = load i64, i64* %42
%44 = icmp ne i64 %40, %43
br i1 %44, label %109, label %45
45: ; preds = %37
%46 = load %struct.stat*, %struct.stat** %4
%47 = getelementptr inbounds %struct.stat, %struct.stat* %46, i32 0, i32 5
%48 = load i64, i64* %47
%49 = load %struct.stat*, %struct.stat** %5
%50 = getelementptr inbounds %struct.stat, %struct.stat* %49, i32 0, i32 5
%51 = load i64, i64* %50
%52 = icmp ne i64 %48, %51
br i1 %52, label %109, label %53
53: ; preds = %45
%54 = load %struct.stat*, %struct.stat** %4
%55 = getelementptr inbounds %struct.stat, %struct.stat* %54, i32 0, i32 6
%56 = load i64, i64* %55
%57 = load %struct.stat*, %struct.stat** %5
%58 = getelementptr inbounds %struct.stat, %struct.stat* %57, i32 0, i32 6
%59 = load i64, i64* %58
%60 = icmp ne i64 %56, %59
br i1 %60, label %109, label %61
61: ; preds = %53
%62 = load %struct.stat*, %struct.stat** %4
%63 = getelementptr inbounds %struct.stat, %struct.stat* %62, i32 0, i32 7
%64 = load i64, i64* %63
%65 = load %struct.stat*, %struct.stat** %5
%66 = getelementptr inbounds %struct.stat, %struct.stat* %65, i32 0, i32 7
%67 = load i64, i64* %66
%68 = icmp ne i64 %64, %67
br i1 %68, label %109, label %69
69: ; preds = %61
%70 = load %struct.stat*, %struct.stat** %4
%71 = getelementptr inbounds %struct.stat, %struct.stat* %70, i32 0, i32 8
%72 = load i64, i64* %71
%73 = load %struct.stat*, %struct.stat** %5
%74 = getelementptr inbounds %struct.stat, %struct.stat* %73, i32 0, i32 8
%75 = load i64, i64* %74
%76 = icmp ne i64 %72, %75
br i1 %76, label %109, label %77
77: ; preds = %69
%78 = load %struct.stat*, %struct.stat** %4
%79 = getelementptr inbounds %struct.stat, %struct.stat* %78, i32 0, i32 9
%80 = load i64, i64* %79
%81 = load %struct.stat*, %struct.stat** %5
%82 = getelementptr inbounds %struct.stat, %struct.stat* %81, i32 0, i32 9
%83 = load i64, i64* %82
%84 = icmp ne i64 %80, %83
br i1 %84, label %109, label %85
85: ; preds = %77
%86 = load %struct.stat*, %struct.stat** %4
%87 = getelementptr inbounds %struct.stat, %struct.stat* %86, i32 0, i32 10
%88 = load i64, i64* %87
%89 = load %struct.stat*, %struct.stat** %5
%90 = getelementptr inbounds %struct.stat, %struct.stat* %89, i32 0, i32 10
%91 = load i64, i64* %90
%92 = icmp ne i64 %88, %91
br i1 %92, label %109, label %93
93: ; preds = %85
%94 = load %struct.stat*, %struct.stat** %4
%95 = getelementptr inbounds %struct.stat, %struct.stat* %94, i32 0, i32 11
%96 = load i64, i64* %95
%97 = load %struct.stat*, %struct.stat** %5
%98 = getelementptr inbounds %struct.stat, %struct.stat* %97, i32 0, i32 11
%99 = load i64, i64* %98
%100 = icmp ne i64 %96, %99
br i1 %100, label %109, label %101
101: ; preds = %93
%102 = load %struct.stat*, %struct.stat** %4
%103 = getelementptr inbounds %struct.stat, %struct.stat* %102, i32 0, i32 12
%104 = load i64, i64* %103
%105 = load %struct.stat*, %struct.stat** %5
%106 = getelementptr inbounds %struct.stat, %struct.stat* %105, i32 0, i32 12
%107 = load i64, i64* %106
%108 = icmp ne i64 %104, %107
br i1 %108, label %109, label %110
109: ; preds = %101, %93, %85, %77, %69, %61, %53, %45, %37, %29, %21, %13, %2
store i32 -1, i32* %3
br label %111
110: ; preds = %101
store i32 0, i32* %3
br label %111
111: ; preds = %110, %109
%112 = load i32, i32* %3
ret i32 %112
}

LLVM IR (-O2):
%struct.stat = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
define i32 @StatCmp(%struct.stat* nocapture %0, %struct.stat* nocapture %1) {
%3 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
br i1 %7, label %8, label %81
8: ; preds = %2
%9 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 1
%10 = load i64, i64* %9
%11 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 1
%12 = load i64, i64* %11
%13 = icmp eq i64 %10, %12
br i1 %13, label %14, label %81
14: ; preds = %8
%15 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 2
%16 = load i64, i64* %15
%17 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 2
%18 = load i64, i64* %17
%19 = icmp eq i64 %16, %18
br i1 %19, label %20, label %81
20: ; preds = %14
%21 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 3
%22 = load i64, i64* %21
%23 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 3
%24 = load i64, i64* %23
%25 = icmp eq i64 %22, %24
br i1 %25, label %26, label %81
26: ; preds = %20
%27 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 4
%28 = load i64, i64* %27
%29 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 4
%30 = load i64, i64* %29
%31 = icmp eq i64 %28, %30
br i1 %31, label %32, label %81
32: ; preds = %26
%33 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 5
%34 = load i64, i64* %33
%35 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 5
%36 = load i64, i64* %35
%37 = icmp eq i64 %34, %36
br i1 %37, label %38, label %81
38: ; preds = %32
%39 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 6
%40 = load i64, i64* %39
%41 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 6
%42 = load i64, i64* %41
%43 = icmp eq i64 %40, %42
br i1 %43, label %44, label %81
44: ; preds = %38
%45 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 7
%46 = load i64, i64* %45
%47 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 7
%48 = load i64, i64* %47
%49 = icmp eq i64 %46, %48
br i1 %49, label %50, label %81
50: ; preds = %44
%51 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 8
%52 = load i64, i64* %51
%53 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 8
%54 = load i64, i64* %53
%55 = icmp eq i64 %52, %54
br i1 %55, label %56, label %81
56: ; preds = %50
%57 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 9
%58 = load i64, i64* %57
%59 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 9
%60 = load i64, i64* %59
%61 = icmp eq i64 %58, %60
br i1 %61, label %62, label %81
62: ; preds = %56
%63 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 10
%64 = load i64, i64* %63
%65 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 10
%66 = load i64, i64* %65
%67 = icmp eq i64 %64, %66
br i1 %67, label %68, label %81
68: ; preds = %62
%69 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 11
%70 = load i64, i64* %69
%71 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 11
%72 = load i64, i64* %71
%73 = icmp eq i64 %70, %72
br i1 %73, label %74, label %81
74: ; preds = %68
%75 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 12
%76 = load i64, i64* %75
%77 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 12
%78 = load i64, i64* %77
%79 = icmp ne i64 %76, %78
%80 = sext i1 %79 to i32
br label %81
81: ; preds = %74, %2, %8, %14, %20, %26, %32, %38, %44, %50, %56, %62, %68
%82 = phi i32 [ -1, %68 ], [ -1, %62 ], [ -1, %56 ], [ -1, %50 ], [ -1, %44 ], [ -1, %38 ], [ -1, %32 ], [ -1, %26 ], [ -1, %20 ], [ -1, %14 ], [ -1, %8 ], [ -1, %2 ], [ %80, %74 ]
ret i32 %82
}