int *compareTheTriplets(int a0, int a1, int a2, int b0, int b1, int b2,
                        int *result_size) {
  *result_size = 2;
  static int result[] = {0, 0};
  if (a0 > b0)
    result[0]++;
  if (a0 < b0)
    result[1]++;
  if (a1 > b1)
    result[0]++;
  if (a1 < b1)
    result[1]++;
  if (a2 > b2)
    result[0]++;
  if (a2 < b2)
    result[1]++;
  return result;
}


x86 assembly (clang, -O0):
<compareTheTriplets>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1141 <compareTheTriplets+0x41>
mov    0x2eec(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ee3(%rip)
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    115c <compareTheTriplets+0x5c>
mov    0x2ed5(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ecc(%rip)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1177 <compareTheTriplets+0x77>
mov    0x2eb6(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ead(%rip)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1192 <compareTheTriplets+0x92>
mov    0x2e9f(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2e96(%rip)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    11ad <compareTheTriplets+0xad>
mov    0x2e80(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2e77(%rip)
mov    -0xc(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11c8 <compareTheTriplets+0xc8>
mov    0x2e69(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2e60(%rip)
lea    0x2e55(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareTheTriplets>:
mov    0x8(%rsp),%rax
movl   $0x2,(%rax)
cmp    %ecx,%edi
jg     112f <compareTheTriplets+0x2f>
cmp    %ecx,%edi
jl     113a <compareTheTriplets+0x3a>
cmp    %r8d,%esi
jg     1146 <compareTheTriplets+0x46>
cmp    %r8d,%esi
jl     1152 <compareTheTriplets+0x52>
cmp    %r9d,%edx
jg     115e <compareTheTriplets+0x5e>
cmp    %r9d,%edx
jl     116a <compareTheTriplets+0x6a>
lea    0x2ef6(%rip),%rax
ret
addl   $0x1,0x2eee(%rip)
cmp    %ecx,%edi
jge    1113 <compareTheTriplets+0x13>
addl   $0x1,0x2ee7(%rip)
cmp    %r8d,%esi
jle    1118 <compareTheTriplets+0x18>
addl   $0x1,0x2ed7(%rip)
cmp    %r8d,%esi
jge    111d <compareTheTriplets+0x1d>
addl   $0x1,0x2ecf(%rip)
cmp    %r9d,%edx
jle    1122 <compareTheTriplets+0x22>
addl   $0x1,0x2ebf(%rip)
cmp    %r9d,%edx
jge    1127 <compareTheTriplets+0x27>
addl   $0x1,0x2eb7(%rip)
lea    0x2eac(%rip),%rax
ret

LLVM IR (-O0):
@compareTheTriplets.result = internal global [2 x i32] zeroinitializer
define i32* @compareTheTriplets(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32* %6, i32** %14
%15 = load i32*, i32** %14
store i32 2, i32* %15
%16 = load i32, i32* %8
%17 = load i32, i32* %11
%18 = icmp sgt i32 %16, %17
br i1 %18, label %19, label %22
19: ; preds = %7
%20 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
%21 = add nsw i32 %20, 1
store i32 %21, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
br label %22
22: ; preds = %19, %7
%23 = load i32, i32* %8
%24 = load i32, i32* %11
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
%28 = add nsw i32 %27, 1
store i32 %28, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
br label %29
29: ; preds = %26, %22
%30 = load i32, i32* %9
%31 = load i32, i32* %12
%32 = icmp sgt i32 %30, %31
br i1 %32, label %33, label %36
33: ; preds = %29
%34 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
%35 = add nsw i32 %34, 1
store i32 %35, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
br label %36
36: ; preds = %33, %29
%37 = load i32, i32* %9
%38 = load i32, i32* %12
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %43
40: ; preds = %36
%41 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
%42 = add nsw i32 %41, 1
store i32 %42, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
br label %43
43: ; preds = %40, %36
%44 = load i32, i32* %10
%45 = load i32, i32* %13
%46 = icmp sgt i32 %44, %45
br i1 %46, label %47, label %50
47: ; preds = %43
%48 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
%49 = add nsw i32 %48, 1
store i32 %49, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
br label %50
50: ; preds = %47, %43
%51 = load i32, i32* %10
%52 = load i32, i32* %13
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %57
54: ; preds = %50
%55 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
%56 = add nsw i32 %55, 1
store i32 %56, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
br label %57
57: ; preds = %54, %50
ret i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
}

LLVM IR (-O2):
@compareTheTriplets.result = internal global [2 x i32] zeroinitializer
define i32* @compareTheTriplets(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32* nocapture writeonly %6) {
store i32 2, i32* %6
%8 = icmp sgt i32 %0, %3
br i1 %8, label %9, label %12
9: ; preds = %7
%10 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
%11 = add nsw i32 %10, 1
store i32 %11, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
br label %12
12: ; preds = %9, %7
%13 = icmp slt i32 %0, %3
br i1 %13, label %14, label %17
14: ; preds = %12
%15 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
%16 = add nsw i32 %15, 1
store i32 %16, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
br label %17
17: ; preds = %14, %12
%18 = icmp sgt i32 %1, %4
br i1 %18, label %19, label %22
19: ; preds = %17
%20 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
%21 = add nsw i32 %20, 1
store i32 %21, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
br label %22
22: ; preds = %19, %17
%23 = icmp slt i32 %1, %4
br i1 %23, label %24, label %27
24: ; preds = %22
%25 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
%26 = add nsw i32 %25, 1
store i32 %26, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
br label %27
27: ; preds = %24, %22
%28 = icmp sgt i32 %2, %5
br i1 %28, label %29, label %32
29: ; preds = %27
%30 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
%31 = add nsw i32 %30, 1
store i32 %31, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
br label %32
32: ; preds = %29, %27
%33 = icmp slt i32 %2, %5
br i1 %33, label %34, label %37
34: ; preds = %32
%35 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
%36 = add nsw i32 %35, 1
store i32 %36, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 1)
br label %37
37: ; preds = %34, %32
ret i32* getelementptr inbounds ([2 x i32], [2 x i32]* @compareTheTriplets.result, i64 0, i64 0)
}