int are_not_same_size(file1, file2)
char *file1, *file2;
{
  int result = 0;
  long cols1 = 1, cols2 = 2, rows1 = 3, rows2 = 4;
  get_image_size(file1, &rows1, &cols1);
  get_image_size(file2, &rows2, &cols2);
  if (rows1 != rows2 || cols1 != cols2)
    result = 1;
  return (result);
}


x86 assembly (clang, -O0):
<are_not_same_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x1,-0x20(%rbp)
movq   $0x2,-0x28(%rbp)
movq   $0x3,-0x30(%rbp)
movq   $0x4,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <get_image_size@plt>
mov    -0x10(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x28(%rbp),%rdx
mov    $0x0,%al
call   1030 <get_image_size@plt>
mov    -0x30(%rbp),%rax
cmp    -0x38(%rbp),%rax
jne    1189 <are_not_same_size+0x79>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
je     1190 <are_not_same_size+0x80>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<are_not_same_size>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
movq   $0x1,0x20(%rsp)
movq   $0x2,0x18(%rsp)
movq   $0x3,0x10(%rsp)
movq   $0x4,0x8(%rsp)
xor    %ebx,%ebx
lea    0x10(%rsp),%rsi
lea    0x20(%rsp),%rdx
xor    %eax,%eax
call   1030 <get_image_size@plt>
lea    0x8(%rsp),%rsi
lea    0x18(%rsp),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <get_image_size@plt>
mov    0x10(%rsp),%rax
cmp    0x8(%rsp),%rax
jne    117d <are_not_same_size+0x6d>
mov    0x20(%rsp),%rax
cmp    0x18(%rsp),%rax
je     1182 <are_not_same_size+0x72>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @are_not_same_size(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
store i64 1, i64* %6
store i64 2, i64* %7
store i64 3, i64* %8
store i64 4, i64* %9
%10 = load i8*, i8** %3
%11 = call i32 (i8*, i64*, i64*, ...) bitcast (i32 (...)* @get_image_size to i32 (i8*, i64*, i64*, ...)*)(i8* %10, i64* %8, i64* %6)
%12 = load i8*, i8** %4
%13 = call i32 (i8*, i64*, i64*, ...) bitcast (i32 (...)* @get_image_size to i32 (i8*, i64*, i64*, ...)*)(i8* %12, i64* %9, i64* %7)
%14 = load i64, i64* %8
%15 = load i64, i64* %9
%16 = icmp ne i64 %14, %15
br i1 %16, label %21, label %17
17: ; preds = %2
%18 = load i64, i64* %6
%19 = load i64, i64* %7
%20 = icmp ne i64 %18, %19
br i1 %20, label %21, label %22
21: ; preds = %17, %2
store i32 1, i32* %5
br label %22
22: ; preds = %21, %17
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @are_not_same_size(i8* %0, i8* %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = bitcast i64* %3 to i8*
store i64 1, i64* %3
%8 = bitcast i64* %4 to i8*
store i64 2, i64* %4
%9 = bitcast i64* %5 to i8*
store i64 3, i64* %5
%10 = bitcast i64* %6 to i8*
store i64 4, i64* %6
%11 = call i32 (i8*, i64*, i64*, ...) bitcast (i32 (...)* @get_image_size to i32 (i8*, i64*, i64*, ...)*)(i8* %0, i64* %5, i64* %3)
%12 = call i32 (i8*, i64*, i64*, ...) bitcast (i32 (...)* @get_image_size to i32 (i8*, i64*, i64*, ...)*)(i8* %1, i64* %6, i64* %4)
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %2
%17 = load i64, i64* %3
%18 = load i64, i64* %4
%19 = icmp eq i64 %17, %18
br i1 %19, label %21, label %20
20: ; preds = %16, %2
br label %21
21: ; preds = %20, %16
%22 = phi i32 [ 1, %20 ], [ 0, %16 ]
ret i32 %22
}