#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 */

/* Variables and functions */
int /*<<< orphan*/ cmpswp(int *, int *);
void fsort9(int *data) {
  cmpswp(data + 0, data + 1);
  cmpswp(data + 3, data + 4);
  cmpswp(data + 6, data + 7);
  cmpswp(data + 1, data + 2);
  cmpswp(data + 4, data + 5);
  cmpswp(data + 7, data + 8);
  cmpswp(data + 0, data + 1);
  cmpswp(data + 3, data + 4);
  cmpswp(data + 6, data + 7);
  cmpswp(data + 2, data + 5);
  cmpswp(data + 0, data + 3);
  cmpswp(data + 1, data + 4);
  cmpswp(data + 5, data + 8);
  cmpswp(data + 3, data + 6);
  cmpswp(data + 4, data + 7);
  cmpswp(data + 2, data + 5);
  cmpswp(data + 0, data + 3);
  cmpswp(data + 1, data + 4);
  cmpswp(data + 5, data + 7);
  cmpswp(data + 2, data + 6);
  cmpswp(data + 1, data + 3);
  cmpswp(data + 4, data + 6);
  cmpswp(data + 2, data + 4);
  cmpswp(data + 5, data + 6);
  cmpswp(data + 2, data + 3);
}


x86 assembly (clang, -O0):
<fsort9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x4,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0xc,%rdi
mov    -0x8(%rbp),%rsi
add    $0x10,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
mov    -0x8(%rbp),%rsi
add    $0x1c,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0x8(%rbp),%rsi
add    $0x8,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%rsi
add    $0x14,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x1c,%rdi
mov    -0x8(%rbp),%rsi
add    $0x20,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x4,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0xc,%rdi
mov    -0x8(%rbp),%rsi
add    $0x10,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
mov    -0x8(%rbp),%rsi
add    $0x1c,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rsi
add    $0x14,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0xc,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0x8(%rbp),%rsi
add    $0x10,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x14,%rdi
mov    -0x8(%rbp),%rsi
add    $0x20,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0xc,%rdi
mov    -0x8(%rbp),%rsi
add    $0x18,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%rsi
add    $0x1c,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rsi
add    $0x14,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0xc,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0x8(%rbp),%rsi
add    $0x10,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x14,%rdi
mov    -0x8(%rbp),%rsi
add    $0x1c,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rsi
add    $0x18,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0x8(%rbp),%rsi
add    $0xc,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%rsi
add    $0x18,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rsi
add    $0x10,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x14,%rdi
mov    -0x8(%rbp),%rsi
add    $0x18,%rsi
call   1030 <cmpswp@plt>
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rsi
add    $0xc,%rsi
call   1030 <cmpswp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsort9>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%r15
lea    0x4(%rdi),%r13
mov    %r13,%rsi
call   1030 <cmpswp@plt>
lea    0xc(%r15),%r12
lea    0x10(%r15),%r14
mov    %r12,%rdi
mov    %r14,%rsi
call   1030 <cmpswp@plt>
lea    0x18(%r15),%rdi
mov    %rdi,(%rsp)
lea    0x1c(%r15),%rbp
mov    %rbp,%rsi
call   1030 <cmpswp@plt>
lea    0x8(%r15),%rsi
mov    %rsi,0x28(%rsp)
mov    %r13,%rdi
mov    %r13,0x8(%rsp)
call   1030 <cmpswp@plt>
lea    0x14(%r15),%rsi
mov    %rsi,0x18(%rsp)
mov    %r14,%rdi
call   1030 <cmpswp@plt>
lea    0x20(%r15),%rsi
mov    %rsi,0x30(%rsp)
mov    %rbp,%rdi
mov    %rbp,0x20(%rsp)
call   1030 <cmpswp@plt>
mov    %r15,%rdi
mov    %r13,%rsi
call   1030 <cmpswp@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1030 <cmpswp@plt>
mov    (%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1030 <cmpswp@plt>
mov    0x28(%rsp),%rbp
mov    %rbp,%rdi
mov    0x18(%rsp),%r13
mov    %r13,%rsi
call   1030 <cmpswp@plt>
mov    %r15,%rdi
mov    %r12,0x10(%rsp)
mov    %r12,%rsi
call   1030 <cmpswp@plt>
mov    0x8(%rsp),%rdi
mov    %r14,%rsi
call   1030 <cmpswp@plt>
mov    %r13,%rdi
mov    0x30(%rsp),%rsi
call   1030 <cmpswp@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <cmpswp@plt>
mov    %r14,%rdi
mov    0x20(%rsp),%r12
mov    %r12,%rsi
call   1030 <cmpswp@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
call   1030 <cmpswp@plt>
mov    %r15,%rdi
mov    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1030 <cmpswp@plt>
mov    0x8(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <cmpswp@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1030 <cmpswp@plt>
mov    %rbp,%r12
mov    %rbp,%rdi
mov    (%rsp),%rbp
mov    %rbp,%rsi
call   1030 <cmpswp@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <cmpswp@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1030 <cmpswp@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1030 <cmpswp@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1030 <cmpswp@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <cmpswp@plt>

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

LLVM IR (-O2):
define void @fsort9(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = tail call i32 @cmpswp(i32* %0, i32* %2)
%4 = getelementptr inbounds i32, i32* %0, i64 3
%5 = getelementptr inbounds i32, i32* %0, i64 4
%6 = tail call i32 @cmpswp(i32* %4, i32* %5)
%7 = getelementptr inbounds i32, i32* %0, i64 6
%8 = getelementptr inbounds i32, i32* %0, i64 7
%9 = tail call i32 @cmpswp(i32* %7, i32* %8)
%10 = getelementptr inbounds i32, i32* %0, i64 2
%11 = tail call i32 @cmpswp(i32* %2, i32* %10)
%12 = getelementptr inbounds i32, i32* %0, i64 5
%13 = tail call i32 @cmpswp(i32* %5, i32* %12)
%14 = getelementptr inbounds i32, i32* %0, i64 8
%15 = tail call i32 @cmpswp(i32* %8, i32* %14)
%16 = tail call i32 @cmpswp(i32* %0, i32* %2)
%17 = tail call i32 @cmpswp(i32* %4, i32* %5)
%18 = tail call i32 @cmpswp(i32* %7, i32* %8)
%19 = tail call i32 @cmpswp(i32* %10, i32* %12)
%20 = tail call i32 @cmpswp(i32* %0, i32* %4)
%21 = tail call i32 @cmpswp(i32* %2, i32* %5)
%22 = tail call i32 @cmpswp(i32* %12, i32* %14)
%23 = tail call i32 @cmpswp(i32* %4, i32* %7)
%24 = tail call i32 @cmpswp(i32* %5, i32* %8)
%25 = tail call i32 @cmpswp(i32* %10, i32* %12)
%26 = tail call i32 @cmpswp(i32* %0, i32* %4)
%27 = tail call i32 @cmpswp(i32* %2, i32* %5)
%28 = tail call i32 @cmpswp(i32* %12, i32* %8)
%29 = tail call i32 @cmpswp(i32* %10, i32* %7)
%30 = tail call i32 @cmpswp(i32* %2, i32* %4)
%31 = tail call i32 @cmpswp(i32* %5, i32* %7)
%32 = tail call i32 @cmpswp(i32* %10, i32* %5)
%33 = tail call i32 @cmpswp(i32* %12, i32* %7)
%34 = tail call i32 @cmpswp(i32* %10, i32* %4)
ret void
}