#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*/ printf(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void ordena(char aux_list[][50]) {
  int i, j;
  char valor_mas_chico[50];
  int pos_mas_chico;
  for (i = 0; i < 4 - 1; i++) {
    strcpy(valor_mas_chico, aux_list[i]);
    pos_mas_chico = i;
    for (j = i + 1; j < 4; j++) {
      if (strcmp(valor_mas_chico, aux_list[j]) > 0) {
        strcpy(valor_mas_chico, aux_list[j]);
        pos_mas_chico = j;
      }
    }
    if (i != pos_mas_chico) {
      strcpy(aux_list[pos_mas_chico], aux_list[i]);
      strcpy(aux_list[i], valor_mas_chico);
    }
  }
  for (i = 0; i < 4; i++) {
    printf("\n%s", aux_list[i]);
  }
}


x86 assembly (clang, -O0):
<ordena>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    122b <ordena+0xfb>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    11d1 <ordena+0xa1>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jle    11be <ordena+0x8e>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x54(%rbp)
jmp    11c3 <ordena+0x93>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1174 <ordena+0x44>
mov    -0xc(%rbp),%eax
cmp    -0x54(%rbp),%eax
je     1218 <ordena+0xe8>
mov    -0x8(%rbp),%rdi
movslq -0x54(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rdi
lea    -0x50(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    121d <ordena+0xed>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <ordena+0x13>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1265 <ordena+0x135>
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rsi
lea    0xdae(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1232 <ordena+0x102>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ordena>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%r13
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <strcpy@plt>
lea    0x32(%r13),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
xor    %ebx,%ebx
test   %rax,%rax
jle    1174 <ordena+0x44>
mov    %rsp,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    $0x1,%ebx
lea    0x64(%r13),%r15
mov    %rsp,%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    1198 <ordena+0x68>
mov    %rsp,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    $0x2,%ebx
lea    0x96(%r13),%r12
mov    %rsp,%rdi
mov    %r12,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    11c1 <ordena+0x91>
mov    %rsp,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    $0x3,%ebx
jmp    11c5 <ordena+0x95>
test   %ebx,%ebx
je     11e1 <ordena+0xb1>
mov    %ebx,%eax
imul   $0x32,%rax,%rdi
add    %r13,%rdi
mov    %r13,%rsi
call   1030 <strcpy@plt>
mov    %rsp,%rsi
mov    %r13,%rdi
call   1030 <strcpy@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
mov    %rax,%rbx
test   %rax,%rax
jle    120d <ordena+0xdd>
mov    %rsp,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rsp,%rdi
mov    %r12,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    122f <ordena+0xff>
mov    %rsp,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    $0x3,%eax
jmp    1239 <ordena+0x109>
mov    $0x2,%eax
test   %rbx,%rbx
jle    1253 <ordena+0x123>
imul   $0x32,%rax,%rdi
add    %r13,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rsp,%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jle    1295 <ordena+0x165>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xd64(%rip),%rbx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\0A%s\00"
define void @ordena([50 x i8]* %0) {
%2 = alloca [50 x i8]*
%3 = alloca i32
%4 = alloca i32
%5 = alloca [50 x i8]
%6 = alloca i32
store [50 x i8]* %0, [50 x i8]** %2
store i32 0, i32* %3
br label %7
7: ; preds = %70, %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %73
10: ; preds = %7
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%12 = load [50 x i8]*, [50 x i8]** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [50 x i8], [50 x i8]* %12, i64 %14
%16 = getelementptr inbounds [50 x i8], [50 x i8]* %15, i64 0, i64 0
%17 = call i32 @strcpy(i8* %11, i8* %16)
%18 = load i32, i32* %3
store i32 %18, i32* %6
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %21
21: ; preds = %43, %10
%22 = load i32, i32* %4
%23 = icmp slt i32 %22, 4
br i1 %23, label %24, label %46
24: ; preds = %21
%25 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%26 = load [50 x i8]*, [50 x i8]** %2
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [50 x i8], [50 x i8]* %26, i64 %28
%30 = getelementptr inbounds [50 x i8], [50 x i8]* %29, i64 0, i64 0
%31 = call i64 @strcmp(i8* %25, i8* %30)
%32 = icmp sgt i64 %31, 0
br i1 %32, label %33, label %42
33: ; preds = %24
%34 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%35 = load [50 x i8]*, [50 x i8]** %2
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [50 x i8], [50 x i8]* %35, i64 %37
%39 = getelementptr inbounds [50 x i8], [50 x i8]* %38, i64 0, i64 0
%40 = call i32 @strcpy(i8* %34, i8* %39)
%41 = load i32, i32* %4
store i32 %41, i32* %6
br label %42
42: ; preds = %33, %24
br label %43
43: ; preds = %42
%44 = load i32, i32* %4
%45 = add nsw i32 %44, 1
store i32 %45, i32* %4
br label %21
46: ; preds = %21
%47 = load i32, i32* %3
%48 = load i32, i32* %6
%49 = icmp ne i32 %47, %48
br i1 %49, label %50, label %69
50: ; preds = %46
%51 = load [50 x i8]*, [50 x i8]** %2
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [50 x i8], [50 x i8]* %51, i64 %53
%55 = getelementptr inbounds [50 x i8], [50 x i8]* %54, i64 0, i64 0
%56 = load [50 x i8]*, [50 x i8]** %2
%57 = load i32, i32* %3
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [50 x i8], [50 x i8]* %56, i64 %58
%60 = getelementptr inbounds [50 x i8], [50 x i8]* %59, i64 0, i64 0
%61 = call i32 @strcpy(i8* %55, i8* %60)
%62 = load [50 x i8]*, [50 x i8]** %2
%63 = load i32, i32* %3
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [50 x i8], [50 x i8]* %62, i64 %64
%66 = getelementptr inbounds [50 x i8], [50 x i8]* %65, i64 0, i64 0
%67 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%68 = call i32 @strcpy(i8* %66, i8* %67)
br label %69
69: ; preds = %50, %46
br label %70
70: ; preds = %69
%71 = load i32, i32* %3
%72 = add nsw i32 %71, 1
store i32 %72, i32* %3
br label %7
73: ; preds = %7
store i32 0, i32* %3
br label %74
74: ; preds = %84, %73
%75 = load i32, i32* %3
%76 = icmp slt i32 %75, 4
br i1 %76, label %77, label %87
77: ; preds = %74
%78 = load [50 x i8]*, [50 x i8]** %2
%79 = load i32, i32* %3
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [50 x i8], [50 x i8]* %78, i64 %80
%82 = getelementptr inbounds [50 x i8], [50 x i8]* %81, i64 0, i64 0
%83 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %82)
br label %84
84: ; preds = %77
%85 = load i32, i32* %3
%86 = add nsw i32 %85, 1
store i32 %86, i32* %3
br label %74
87: ; preds = %74
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%s\00"
define void @ordena([50 x i8]* %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 0, i64 0
%5 = call i32 @strcpy(i8* %3, i8* %4)
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 1, i64 0
%7 = call i64 @strcmp(i8* %3, i8* %6)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @strcpy(i8* %3, i8* %6)
br label %11
11: ; preds = %1, %9
%12 = phi i32 [ 1, %9 ], [ 0, %1 ]
%13 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 2, i64 0
%14 = call i64 @strcmp(i8* %3, i8* %13)
%15 = icmp sgt i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 @strcpy(i8* %3, i8* %13)
br label %18
18: ; preds = %16, %11
%19 = phi i32 [ 2, %16 ], [ %12, %11 ]
%20 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 3, i64 0
%21 = call i64 @strcmp(i8* %3, i8* %20)
%22 = icmp sgt i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %18
%24 = call i32 @strcpy(i8* %3, i8* %20)
br label %27
25: ; preds = %18
%26 = icmp eq i32 %19, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %25
%28 = phi i32 [ 3, %23 ], [ %19, %25 ]
%29 = zext i32 %28 to i64
%30 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 %29, i64 0
%31 = call i32 @strcpy(i8* %30, i8* %4)
%32 = call i32 @strcpy(i8* %4, i8* %3)
br label %33
33: ; preds = %27, %25
%34 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 1, i64 0
%35 = call i32 @strcpy(i8* %3, i8* %34)
%36 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 2, i64 0
%37 = call i64 @strcmp(i8* %3, i8* %36)
%38 = icmp sgt i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %33
%40 = call i32 @strcpy(i8* %3, i8* %36)
br label %41
41: ; preds = %39, %33
%42 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 3, i64 0
%43 = call i64 @strcmp(i8* %3, i8* %42)
%44 = icmp sgt i64 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = call i32 @strcpy(i8* %3, i8* %42)
br label %48
47: ; preds = %41
br i1 %38, label %48, label %53
48: ; preds = %45, %47
%49 = phi i64 [ 3, %45 ], [ 2, %47 ]
%50 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 %49, i64 0
%51 = call i32 @strcpy(i8* %50, i8* %34)
%52 = call i32 @strcpy(i8* %34, i8* %3)
br label %53
53: ; preds = %47, %48
%54 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 2, i64 0
%55 = call i32 @strcpy(i8* %3, i8* %54)
%56 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 3, i64 0
%57 = call i64 @strcmp(i8* %3, i8* %56)
%58 = icmp sgt i64 %57, 0
br i1 %58, label %59, label %64
59: ; preds = %53
%60 = call i32 @strcpy(i8* %3, i8* %56)
%61 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 3, i64 0
%62 = call i32 @strcpy(i8* %61, i8* %54)
%63 = call i32 @strcpy(i8* %54, i8* %3)
br label %64
64: ; preds = %53, %59
%65 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%66 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %34)
%67 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %54)
%68 = getelementptr inbounds [50 x i8], [50 x i8]* %0, i64 3, i64 0
%69 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %68)
ret void
}