int hull_compare(t1, t2)
int *t1, *t2;
{
  int i1, j1, k1, i2, j2, k2;
  trist_triangle((((*t1) << 3) + (0)), &i1, &j1, &k1);
  trist_triangle((((*t2) << 3) + (0)), &i2, &j2, &k2);
  (void)basic_isort3(&i1, &j1, &k1);
  (void)basic_isort3(&i2, &j2, &k2);
  if (i1 < i2)
    return (-1);
  else if (i1 == i2) {
    if (j1 < j2)
      return (-1);
    else if (j1 == j2) {
      if (k1 < k2)
        return (-1);
      else
        return (1);
    } else
      return (1);
  } else
    return (1);
}


x86 assembly (clang, -O0):
<hull_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
shl    $0x3,%edi
add    $0x0,%edi
lea    -0x1c(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%rcx
mov    $0x0,%al
call   1030 <trist_triangle@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
shl    $0x3,%edi
add    $0x0,%edi
lea    -0x28(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
lea    -0x30(%rbp),%rcx
mov    $0x0,%al
call   1030 <trist_triangle@plt>
lea    -0x1c(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x24(%rbp),%rdx
mov    $0x0,%al
call   1040 <basic_isort3@plt>
lea    -0x28(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x0,%al
call   1040 <basic_isort3@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    11ac <hull_compare+0x8c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1213 <hull_compare+0xf3>
mov    -0x1c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    120c <hull_compare+0xec>
mov    -0x20(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    11d0 <hull_compare+0xb0>
movl   $0xffffffff,-0x4(%rbp)
jmp    1213 <hull_compare+0xf3>
mov    -0x20(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jne    1200 <hull_compare+0xe0>
mov    -0x24(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    11f4 <hull_compare+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    1213 <hull_compare+0xf3>
movl   $0x1,-0x4(%rbp)
jmp    1213 <hull_compare+0xf3>
movl   $0x1,-0x4(%rbp)
jmp    1213 <hull_compare+0xf3>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hull_compare>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    (%rdi),%edi
shl    $0x3,%edi
lea    0x14(%rsp),%r14
lea    0x10(%rsp),%r15
lea    0xc(%rsp),%r12
mov    %r14,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1030 <trist_triangle@plt>
mov    (%rbx),%edi
shl    $0x3,%edi
lea    0x8(%rsp),%rbx
lea    0x4(%rsp),%r13
mov    %rsp,%rbp
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1030 <trist_triangle@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <basic_isort3@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <basic_isort3@plt>
mov    0x8(%rsp),%ecx
mov    $0xffffffff,%eax
cmp    %ecx,0x14(%rsp)
jl     11d2 <hull_compare+0xb2>
jne    11cd <hull_compare+0xad>
mov    0x4(%rsp),%ecx
cmp    %ecx,0x10(%rsp)
jl     11d2 <hull_compare+0xb2>
mov    $0x1,%eax
jne    11d2 <hull_compare+0xb2>
mov    0xc(%rsp),%eax
xor    %ecx,%ecx
cmp    (%rsp),%eax
setge  %cl
lea    (%rcx,%rcx,1),%eax
add    $0xffffffff,%eax
jmp    11d2 <hull_compare+0xb2>
mov    $0x1,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hull_compare(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = shl i32 %13, 3
%15 = add nsw i32 %14, 0
%16 = call i32 (i32, i32*, i32*, i32*, ...) bitcast (i32 (...)* @trist_triangle to i32 (i32, i32*, i32*, i32*, ...)*)(i32 %15, i32* %6, i32* %7, i32* %8)
%17 = load i32*, i32** %5
%18 = load i32, i32* %17
%19 = shl i32 %18, 3
%20 = add nsw i32 %19, 0
%21 = call i32 (i32, i32*, i32*, i32*, ...) bitcast (i32 (...)* @trist_triangle to i32 (i32, i32*, i32*, i32*, ...)*)(i32 %20, i32* %9, i32* %10, i32* %11)
%22 = call i32 (i32*, i32*, i32*, ...) bitcast (i32 (...)* @basic_isort3 to i32 (i32*, i32*, i32*, ...)*)(i32* %6, i32* %7, i32* %8)
%23 = call i32 (i32*, i32*, i32*, ...) bitcast (i32 (...)* @basic_isort3 to i32 (i32*, i32*, i32*, ...)*)(i32* %9, i32* %10, i32* %11)
%24 = load i32, i32* %6
%25 = load i32, i32* %9
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %28
27: ; preds = %2
store i32 -1, i32* %3
br label %49
28: ; preds = %2
%29 = load i32, i32* %6
%30 = load i32, i32* %9
%31 = icmp eq i32 %29, %30
br i1 %31, label %32, label %48
32: ; preds = %28
%33 = load i32, i32* %7
%34 = load i32, i32* %10
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %37
36: ; preds = %32
store i32 -1, i32* %3
br label %49
37: ; preds = %32
%38 = load i32, i32* %7
%39 = load i32, i32* %10
%40 = icmp eq i32 %38, %39
br i1 %40, label %41, label %47
41: ; preds = %37
%42 = load i32, i32* %8
%43 = load i32, i32* %11
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %46
45: ; preds = %41
store i32 -1, i32* %3
br label %49
46: ; preds = %41
store i32 1, i32* %3
br label %49
47: ; preds = %37
store i32 1, i32* %3
br label %49
48: ; preds = %28
store i32 1, i32* %3
br label %49
49: ; preds = %48, %47, %46, %45, %36, %27
%50 = load i32, i32* %3
ret i32 %50
}

LLVM IR (-O2):
define i32 @hull_compare(i32* nocapture %0, i32* nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
%11 = bitcast i32* %5 to i8*
%12 = bitcast i32* %6 to i8*
%13 = bitcast i32* %7 to i8*
%14 = bitcast i32* %8 to i8*
%15 = load i32, i32* %0
%16 = shl i32 %15, 3
%17 = call i32 (i32, i32*, i32*, i32*, ...) bitcast (i32 (...)* @trist_triangle to i32 (i32, i32*, i32*, i32*, ...)*)(i32 %16, i32* %3, i32* %4, i32* %5)
%18 = load i32, i32* %1
%19 = shl i32 %18, 3
%20 = call i32 (i32, i32*, i32*, i32*, ...) bitcast (i32 (...)* @trist_triangle to i32 (i32, i32*, i32*, i32*, ...)*)(i32 %19, i32* %6, i32* %7, i32* %8)
%21 = call i32 (i32*, i32*, i32*, ...) bitcast (i32 (...)* @basic_isort3 to i32 (i32*, i32*, i32*, ...)*)(i32* %3, i32* %4, i32* %5)
%22 = call i32 (i32*, i32*, i32*, ...) bitcast (i32 (...)* @basic_isort3 to i32 (i32*, i32*, i32*, ...)*)(i32* %6, i32* %7, i32* %8)
%23 = load i32, i32* %3
%24 = load i32, i32* %6
%25 = icmp slt i32 %23, %24
br i1 %25, label %39, label %26
26: ; preds = %2
%27 = icmp eq i32 %23, %24
br i1 %27, label %28, label %39
28: ; preds = %26
%29 = load i32, i32* %4
%30 = load i32, i32* %7
%31 = icmp slt i32 %29, %30
br i1 %31, label %39, label %32
32: ; preds = %28
%33 = icmp eq i32 %29, %30
br i1 %33, label %34, label %39
34: ; preds = %32
%35 = load i32, i32* %5
%36 = load i32, i32* %8
%37 = icmp slt i32 %35, %36
%38 = select i1 %37, i32 -1, i32 1
br label %39
39: ; preds = %26, %32, %34, %28, %2
%40 = phi i32 [ -1, %2 ], [ -1, %28 ], [ %38, %34 ], [ 1, %32 ], [ 1, %26 ]
ret i32 %40
}