int main(void) {
  char string[][10] = {
      "Ken",
      "Cindy",
      "David",
      "Amy",
  };
  int length = sizeof(string) / sizeof(char[10]);
  Merge_Sort(string, 0, length - 1);
  for (int i = 0; i < length; i++) {
    printf("%s\n", string[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
mov    $0x0,%al
call   1050 <Merge_Sort@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    11ac <main+0x7c>
movslq -0x38(%rbp),%rax
lea    -0x30(%rbp),%rsi
imul   $0xa,%rax,%rax
add    %rax,%rsi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1175 <main+0x45>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1040 <Merge_Sort@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xa(%rsp),%rdi
call   1030 <puts@plt>
lea    0x14(%rsp),%rdi
call   1030 <puts@plt>
lea    0x1e(%rsp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.string = [4 x [10 x i8]] [[10 x i8] c"Ken\00\00\00\00\00\00\00", [10 x i8] c"Cindy\00\00\00\00\00", [10 x i8] c"David\00\00\00\00\00", [10 x i8] c"Amy\00\00\00\00\00\00\00"]
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [10 x i8]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [4 x [10 x i8]]* %2 to i8*
store i32 4, i32* %3
%6 = getelementptr inbounds [4 x [10 x i8]], [4 x [10 x i8]]* %2, i64 0, i64 0
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = call i32 ([10 x i8]*, i32, i32, ...) bitcast (i32 (...)* @Merge_Sort to i32 ([10 x i8]*, i32, i32, ...)*)([10 x i8]* %6, i32 0, i32 %8)
store i32 0, i32* %4
br label %10
10: ; preds = %20, %0
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %23
14: ; preds = %10
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [4 x [10 x i8]], [4 x [10 x i8]]* %2, i64 0, i64 %16
%18 = getelementptr inbounds [10 x i8], [10 x i8]* %17, i64 0, i64 0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %14
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %10
23: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@__const.main.string = [4 x [10 x i8]] [[10 x i8] c"Ken\00\00\00\00\00\00\00", [10 x i8] c"Cindy\00\00\00\00\00", [10 x i8] c"David\00\00\00\00\00", [10 x i8] c"Amy\00\00\00\00\00\00\00"]
define i32 @main() {
%1 = alloca [4 x [10 x i8]]
%2 = getelementptr inbounds [4 x [10 x i8]], [4 x [10 x i8]]* %1, i64 0, i64 0, i64 0
%3 = getelementptr inbounds [4 x [10 x i8]], [4 x [10 x i8]]* %1, i64 0, i64 0
%4 = call i32 ([10 x i8]*, i32, i32, ...) bitcast (i32 (...)* @Merge_Sort to i32 ([10 x i8]*, i32, i32, ...)*)([10 x i8]* %3, i32 0, i32 3)
%5 = call i32 @puts(i8* %2)
%6 = getelementptr inbounds [4 x [10 x i8]], [4 x [10 x i8]]* %1, i64 0, i64 1, i64 0
%7 = call i32 @puts(i8* %6)
%8 = getelementptr inbounds [4 x [10 x i8]], [4 x [10 x i8]]* %1, i64 0, i64 2, i64 0
%9 = call i32 @puts(i8* %8)
%10 = getelementptr inbounds [4 x [10 x i8]], [4 x [10 x i8]]* %1, i64 0, i64 3, i64 0
%11 = call i32 @puts(i8* %10)
ret i32 0
}