#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*/ private_fusion(char const **, int, int, unsigned char);
void private_merge_sort_str(const char **list, int ind_lower, int ind_upper,
                            unsigned char ascending_order) {
  if (ind_upper - ind_lower > 0) {
    private_merge_sort_str(list, ind_lower,
                           ind_lower + (ind_upper - ind_lower) / 2,
                           ascending_order);
    private_merge_sort_str(list, (ind_lower + (ind_upper - ind_lower) / 2) + 1,
                           ind_upper, ascending_order);
    private_fusion(list, ind_lower, ind_upper, ascending_order);
  }
}


x86 assembly (clang, -O0):
<private_merge_sort_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
jle    11a8 <private_merge_sort_str+0x88>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%edx
add    %eax,%edx
movzbl -0x11(%rbp),%ecx
call   1030 <private_merge_sort_str@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    %eax,%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
movzbl -0x11(%rbp),%ecx
call   1030 <private_merge_sort_str@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movzbl -0x11(%rbp),%ecx
call   1040 <private_fusion@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<private_merge_sort_str>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%ebp
sub    %esi,%ebp
jle    1173 <private_merge_sort_str+0x53>
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%r14
shr    %ebp
lea    (%rbx,%rbp,1),%edx
movzbl %cl,%r12d
mov    %r12d,%ecx
call   1030 <private_merge_sort_str@plt>
lea    (%rbx,%rbp,1),%esi
add    $0x1,%esi
mov    %r14,%rdi
mov    %r15d,%edx
mov    %r12d,%ecx
call   1030 <private_merge_sort_str@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r12d,%ecx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <private_fusion@plt>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @private_merge_sort_str(i8** %0, i32 %1, i32 %2, i8 zeroext %3) {
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i8** %0, i8*** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8 %3, i8* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = sub nsw i32 %9, %10
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %38
13: ; preds = %4
%14 = load i8**, i8*** %5
%15 = load i32, i32* %6
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = load i32, i32* %6
%19 = sub nsw i32 %17, %18
%20 = sdiv i32 %19, 2
%21 = add nsw i32 %16, %20
%22 = load i8, i8* %8
%23 = load i8**, i8*** %5
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = load i32, i32* %6
%27 = sub nsw i32 %25, %26
%28 = sdiv i32 %27, 2
%29 = add nsw i32 %24, %28
%30 = add nsw i32 %29, 1
%31 = load i32, i32* %7
%32 = load i8, i8* %8
%33 = load i8**, i8*** %5
%34 = load i32, i32* %6
%35 = load i32, i32* %7
%36 = load i8, i8* %8
%37 = call i32 @private_fusion(i8** %33, i32 %34, i32 %35, i8 zeroext %36)
br label %38
38: ; preds = %13, %4
ret void
}

LLVM IR (-O2):
define void @private_merge_sort_str(i8** %0, i32 %1, i32 %2, i8 zeroext %3) {
%5 = sub nsw i32 %2, %1
%6 = icmp sgt i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %4, %8
ret void
8: ; preds = %4
%9 = lshr i32 %5, 1
%10 = add nsw i32 %9, %1
tail call void @private_merge_sort_str(i8** %0, i32 %1, i32 %10, i8 zeroext %3)
%11 = add nsw i32 %10, 1
tail call void @private_merge_sort_str(i8** %0, i32 %11, i32 %2, i8 zeroext %3)
%12 = tail call i32 @private_fusion(i8** %0, i32 %1, i32 %2, i8 zeroext %3)
br label %7
}