#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 */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  scalar_t__ ss_size;
  scalar_t__ ss_sp;
  scalar_t__ ss_flags;
};
typedef TYPE_1__ stack_t;

/* Variables and functions */
int sascmp(stack_t *old, stack_t *new) {
  return old->ss_size != new->ss_size || old->ss_sp != new->ss_sp ||
         old->ss_flags != new->ss_flags;
}


x86 assembly (clang, -O0):
<sascmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rdx
mov    $0x1,%al
cmp    (%rdx),%rcx
mov    %al,-0x11(%rbp)
jne    1156 <sascmp+0x56>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x10(%rbp),%rdx
mov    $0x1,%al
cmp    0x8(%rdx),%rcx
mov    %al,-0x11(%rbp)
jne    1156 <sascmp+0x56>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    0x10(%rcx),%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sascmp>:
mov    (%rdi),%rcx
mov    $0x1,%eax
cmp    (%rsi),%rcx
jne    1124 <sascmp+0x24>
mov    0x8(%rdi),%rcx
cmp    0x8(%rsi),%rcx
jne    1124 <sascmp+0x24>
mov    0x10(%rdi),%rcx
xor    %eax,%eax
cmp    0x10(%rsi),%rcx
setne  %al
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i64, i64, i64 }
define i32 @sascmp(%struct.TYPE_4__* %0, %struct.TYPE_4__* %1) {
%3 = alloca %struct.TYPE_4__*
%4 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %3
store %struct.TYPE_4__* %1, %struct.TYPE_4__** %4
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = icmp ne i64 %7, %10
br i1 %11, label %28, label %12
12: ; preds = %2
%13 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%14 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %13, i32 0, i32 1
%15 = load i64, i64* %14
%16 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%17 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %16, i32 0, i32 1
%18 = load i64, i64* %17
%19 = icmp ne i64 %15, %18
br i1 %19, label %28, label %20
20: ; preds = %12
%21 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%22 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %21, i32 0, i32 2
%23 = load i64, i64* %22
%24 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%25 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %24, i32 0, i32 2
%26 = load i64, i64* %25
%27 = icmp ne i64 %23, %26
br label %28
28: ; preds = %20, %12, %2
%29 = phi i1 [ true, %12 ], [ true, %2 ], [ %27, %20 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i64, i64, i64 }
define i32 @sascmp(%struct.TYPE_4__* nocapture %0, %struct.TYPE_4__* nocapture %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
br i1 %7, label %8, label %21
8: ; preds = %2
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 1
%10 = load i64, i64* %9
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 1
%12 = load i64, i64* %11
%13 = icmp eq i64 %10, %12
br i1 %13, label %14, label %21
14: ; preds = %8
%15 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 2
%16 = load i64, i64* %15
%17 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 2
%18 = load i64, i64* %17
%19 = icmp ne i64 %16, %18
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %14, %8, %2
%22 = phi i32 [ 1, %8 ], [ 1, %2 ], [ %20, %14 ]
ret i32 %22
}