#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 */
scalar_t__ strcmp(char *, char *);
void order_str(char (*p)[80]) {
  int i, j, k;
  char *temp;
  for (i = 0; i < 5 - 1; i++) {
    k = i;
    for (j = i + 1; j < 5; j++) {
      if (strcmp(*(p + k), *(p + j)) > 0) {
        k = j;
      }
    }
    if (k != i) {
    }
  }
}


x86 assembly (clang, -O0):
<order_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    11b0 <order_str+0xa0>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    118c <order_str+0x7c>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
imul   $0x50,%rax,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
imul   $0x50,%rax,%rax
add    %rax,%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jle    1179 <order_str+0x69>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    117e <order_str+0x6e>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113c <order_str+0x2c>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     119d <order_str+0x8d>
jmp    119d <order_str+0x8d>
jmp    11a2 <order_str+0x92>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <order_str+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<order_str>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r13
lea    0x50(%rdi),%rsi
mov    %rsi,(%rsp)
call   1030 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
setg   %bpl
lea    0x0(,%rbp,4),%rdi
add    %rbp,%rdi
shl    $0x4,%rdi
add    %r13,%rdi
lea    0xa0(%r13),%r14
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x2,%ebx
cmovle %ebp,%ebx
lea    (%rbx,%rbx,4),%rdi
shl    $0x4,%rdi
add    %r13,%rdi
lea    0xf0(%r13),%r15
mov    %r15,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
mov    $0x3,%ebp
cmovg  %rbp,%rbx
lea    (%rbx,%rbx,4),%rdi
shl    $0x4,%rdi
add    %r13,%rdi
lea    0x140(%r13),%r12
mov    %r12,%rsi
call   1030 <strcmp@plt>
mov    (%rsp),%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
xor    %ebx,%ebx
test   %rax,%rax
setg   %bl
add    $0x1,%ebx
lea    (%rbx,%rbx,4),%rdi
shl    $0x4,%rdi
add    %r13,%rdi
mov    %r15,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
cmovg  %rbp,%rbx
lea    (%rbx,%rbx,4),%rdi
shl    $0x4,%rdi
add    %r13,%rdi
mov    %r12,%rsi
call   1030 <strcmp@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
cmovg  %r15,%r14
mov    %r14,%rdi
mov    %r12,%rsi
call   1030 <strcmp@plt>
mov    %r15,%rdi
mov    %r12,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define void @order_str([80 x i8]* %0) {
%2 = alloca [80 x i8]*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store [80 x i8]* %0, [80 x i8]** %2
store i32 0, i32* %3
br label %7
7: ; preds = %42, %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 4
br i1 %9, label %10, label %45
10: ; preds = %7
%11 = load i32, i32* %3
store i32 %11, i32* %5
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
br label %14
14: ; preds = %33, %10
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 5
br i1 %16, label %17, label %36
17: ; preds = %14
%18 = load [80 x i8]*, [80 x i8]** %2
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [80 x i8], [80 x i8]* %18, i64 %20
%22 = getelementptr inbounds [80 x i8], [80 x i8]* %21, i64 0, i64 0
%23 = load [80 x i8]*, [80 x i8]** %2
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [80 x i8], [80 x i8]* %23, i64 %25
%27 = getelementptr inbounds [80 x i8], [80 x i8]* %26, i64 0, i64 0
%28 = call i64 @strcmp(i8* %22, i8* %27)
%29 = icmp sgt i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %17
%31 = load i32, i32* %4
store i32 %31, i32* %5
br label %32
32: ; preds = %30, %17
br label %33
33: ; preds = %32
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
store i32 %35, i32* %4
br label %14
36: ; preds = %14
%37 = load i32, i32* %5
%38 = load i32, i32* %3
%39 = icmp ne i32 %37, %38
br i1 %39, label %40, label %41
40: ; preds = %36
br label %41
41: ; preds = %40, %36
br label %42
42: ; preds = %41
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %7
45: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @order_str([80 x i8]* %0) {
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 0, i64 0
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 1, i64 0
%4 = tail call i64 @strcmp(i8* %2, i8* %3)
%5 = icmp sgt i64 %4, 0
%6 = zext i1 %5 to i32
%7 = zext i1 %5 to i64
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 %7, i64 0
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 2, i64 0
%10 = tail call i64 @strcmp(i8* %8, i8* %9)
%11 = icmp sgt i64 %10, 0
%12 = select i1 %11, i32 2, i32 %6
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 %13, i64 0
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 3, i64 0
%16 = tail call i64 @strcmp(i8* %14, i8* %15)
%17 = icmp sgt i64 %16, 0
%18 = zext i32 %12 to i64
%19 = select i1 %17, i64 3, i64 %18
%20 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 %19, i64 0
%21 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 4, i64 0
%22 = tail call i64 @strcmp(i8* %20, i8* %21)
%23 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 1, i64 0
%24 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 2, i64 0
%25 = tail call i64 @strcmp(i8* %23, i8* %24)
%26 = icmp sgt i64 %25, 0
%27 = select i1 %26, i32 2, i32 1
%28 = zext i32 %27 to i64
%29 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 %28, i64 0
%30 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 3, i64 0
%31 = tail call i64 @strcmp(i8* %29, i8* %30)
%32 = icmp sgt i64 %31, 0
%33 = zext i32 %27 to i64
%34 = select i1 %32, i64 3, i64 %33
%35 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 %34, i64 0
%36 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 4, i64 0
%37 = tail call i64 @strcmp(i8* %35, i8* %36)
%38 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 2, i64 0
%39 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 3, i64 0
%40 = tail call i64 @strcmp(i8* %38, i8* %39)
%41 = icmp sgt i64 %40, 0
%42 = select i1 %41, i64 3, i64 2
%43 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 %42, i64 0
%44 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 4, i64 0
%45 = tail call i64 @strcmp(i8* %43, i8* %44)
%46 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 3, i64 0
%47 = getelementptr inbounds [80 x i8], [80 x i8]* %0, i64 4, i64 0
%48 = tail call i64 @strcmp(i8* %46, i8* %47)
ret void
}