#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*/ print_array(char const **, int);
int /*<<< orphan*/ strsort(char const **, int);
int main(void) {
  const char *array1[8] = {"zucchini",      "cake",         "bread",
                           "grapes",        "french fries", "apples",
                           "diced peaches", "eggplant"};
  strsort(array1, 8);
  print_array(array1, 8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0x2c96(%rip),%rsi
mov    $0x40,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rdi
mov    $0x8,%esi
call   1040 <strsort@plt>
lea    -0x50(%rbp),%rdi
mov    $0x8,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movaps 0x2ce4(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2cc8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2cac(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2c90(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <strsort@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"zucchini\00"
@.str.1 = [5 x i8] c"cake\00"
@.str.2 = [6 x i8] c"bread\00"
@.str.3 = [7 x i8] c"grapes\00"
@.str.4 = [13 x i8] c"french fries\00"
@.str.5 = [7 x i8] c"apples\00"
@.str.6 = [14 x i8] c"diced peaches\00"
@.str.7 = [9 x i8] c"eggplant\00"
@__const.main.array1 = [8 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i32 0, i32 0)]
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8*]
store i32 0, i32* %1
%3 = bitcast [8 x i8*]* %2 to i8*
%4 = getelementptr inbounds [8 x i8*], [8 x i8*]* %2, i64 0, i64 0
%5 = call i32 @strsort(i8** %4, i32 8)
%6 = getelementptr inbounds [8 x i8*], [8 x i8*]* %2, i64 0, i64 0
%7 = call i32 @print_array(i8** %6, i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"zucchini\00"
@.str.1 = [5 x i8] c"cake\00"
@.str.2 = [6 x i8] c"bread\00"
@.str.3 = [7 x i8] c"grapes\00"
@.str.4 = [13 x i8] c"french fries\00"
@.str.5 = [7 x i8] c"apples\00"
@.str.6 = [14 x i8] c"diced peaches\00"
@.str.7 = [9 x i8] c"eggplant\00"
@__const.main.array1 = [8 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i32 0, i32 0)]
define i32 @main() {
%1 = alloca [8 x i8*]
%2 = bitcast [8 x i8*]* %1 to i8*
%3 = getelementptr inbounds [8 x i8*], [8 x i8*]* %1, i64 0, i64 0
%4 = call i32 @strsort(i8** %3, i32 8)
%5 = call i32 @print_array(i8** %3, i32 8)
ret i32 0
}