#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*/ pr_array(char **, int);
int /*<<< orphan*/ sort(char **, int);
main() {
  char *a[] = {"orWld", "Hello", "World", "eHllo", "olleH"};
  pr_array(a, 5);
  sort(a, 5);
  pr_array(a, 5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
lea    0xeb1(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xeac(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xea7(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xea2(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xe9d(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1030 <pr_array@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1040 <sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1030 <pr_array@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xed4(%rip),%rax
mov    %rax,(%rsp)
lea    0xecf(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0xec9(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xec3(%rip),%rax
mov    %rax,0x18(%rsp)
lea    0xebd(%rip),%rax
mov    %rax,0x20(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <pr_array@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <sort@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <pr_array@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"orWld\00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [6 x i8] c"World\00"
@.str.3 = [6 x i8] c"eHllo\00"
@.str.4 = [6 x i8] c"olleH\00"
define i32 @main() {
%1 = alloca [5 x i8*]
%2 = bitcast [5 x i8*]* %1 to i8*
%3 = bitcast i8* %2 to [5 x i8*]*
%4 = getelementptr inbounds [5 x i8*], [5 x i8*]* %3, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8** %4
%5 = getelementptr inbounds [5 x i8*], [5 x i8*]* %3, i32 0, i32 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8** %5
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %3, i32 0, i32 2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %3, i32 0, i32 3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %3, i32 0, i32 4
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 0
%10 = call i32 @pr_array(i8** %9, i32 5)
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 0
%12 = call i32 @sort(i8** %11, i32 5)
%13 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 0
%14 = call i32 @pr_array(i8** %13, i32 5)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"orWld\00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [6 x i8] c"World\00"
@.str.3 = [6 x i8] c"eHllo\00"
@.str.4 = [6 x i8] c"olleH\00"
define i32 @main() {
%1 = alloca [5 x i8*]
%2 = bitcast [5 x i8*]* %1 to i8*
%3 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 4
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %7
%8 = call i32 @pr_array(i8** %3, i32 5)
%9 = call i32 @sort(i8** %3, i32 5)
%10 = call i32 @pr_array(i8** %3, i32 5)
ret i32 0
}