#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*/ strcpy(char *, char *);
void sort(char s[10][20]) {
  int i, j;
  char *temp;
  for (i = 0; i < 9; i++)
    for (j = 0; j < 9 - i; j++)
      if (s[j] > s[j + 1]) {
        strcpy(temp, s[j]);
        strcpy(s[j], s[j + 1]);
        strcpy(s[j + 1], temp);
      }
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jge    11f4 <sort+0xe4>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x9,%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    11e1 <sort+0xd1>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
imul   $0x14,%rdx,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jbe    11ce <sort+0xbe>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
imul   $0x14,%rax,%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0x10(%rbp),%rax
imul   $0x14,%rax,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%eax
add    $0x1,%eax
cltq
imul   $0x14,%rax,%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%eax
add    $0x1,%eax
cltq
imul   $0x14,%rax,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    11d3 <sort+0xc3>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <sort+0x24>
jmp    11e6 <sort+0xd6>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <sort+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort>:
ret

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

LLVM IR (-O2):
define void @sort([20 x i8]* nocapture %0) {
ret void
}