#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 *, ...);
int main() {
  char *names[5] = {"tani", "jun", "mizu", "aran", "kei"};
  int i = 0;
  for (; i < 5; i++) {
    printf("---%s----\n", *(names + i));
  }
  const int a = 10, b = 30, c = 2;
  const int *p[3] = {&a, &b, &c};
  for (i = 0; i < 3; i++) {
    printf("%d ", *p[i]);
  }
  printf("\n");
  int j;
  for (i = 0; i < 3; i++) {
    for (j = i; j < 3; j++) {
      if (*p[j] < *p[i]) {
        const int *tmp = p[j];
        p[j] = p[i];
        p[i] = tmp;
      }
    }
  }
  for (i = 0; i < 3; i++) {
    printf("%d ", *p[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0xeba(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xeb4(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xead(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xea7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xea1(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    11ac <main+0x8c>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rsi
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    117d <main+0x5d>
movl   $0xa,-0x38(%rbp)
movl   $0x1e,-0x3c(%rbp)
movl   $0x2,-0x40(%rbp)
lea    -0x38(%rbp),%rax
mov    %rax,-0x60(%rbp)
lea    -0x3c(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    1211 <main+0xf1>
movslq -0x34(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rax
mov    (%rax),%esi
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11e0 <main+0xc0>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    12ae <main+0x18e>
mov    -0x34(%rbp),%eax
mov    %eax,-0x64(%rbp)
cmpl   $0x3,-0x64(%rbp)
jge    129b <main+0x17b>
movslq -0x64(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rax
mov    (%rax),%eax
movslq -0x34(%rbp),%rcx
mov    -0x60(%rbp,%rcx,8),%rcx
cmp    (%rcx),%eax
jge    1288 <main+0x168>
movslq -0x64(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rax
mov    %rax,-0x70(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rcx
movslq -0x64(%rbp),%rax
mov    %rcx,-0x60(%rbp,%rax,8)
mov    -0x70(%rbp),%rcx
movslq -0x34(%rbp),%rax
mov    %rcx,-0x60(%rbp,%rax,8)
jmp    128d <main+0x16d>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1236 <main+0x116>
jmp    12a0 <main+0x180>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1226 <main+0x106>
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    12e6 <main+0x1c6>
movslq -0x34(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rax
mov    (%rax),%esi
lea    0xd51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12b5 <main+0x195>
lea    0xd33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xee7(%rip),%rbx
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea4(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe98(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0xa,0xc(%rsp)
movl   $0x1e,0x8(%rsp)
movl   $0x2,0x4(%rsp)
lea    0xe7e(%rip),%r14
mov    %r14,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
cmp    %eax,%ecx
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    %rsi,%rdi
cmovl  %rdx,%rdi
cmovl  %ecx,%eax
cmovl  %rsi,%rdx
mov    0x4(%rsp),%esi
cmp    %eax,%esi
lea    0x4(%rsp),%rbx
cmovl  %rdx,%rbx
cmovge (%rdx),%esi
mov    (%rbx),%eax
cmp    (%rdi),%eax
mov    %rdi,%r15
cmovl  %rbx,%r15
cmovl  %rdi,%rbx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"tani\00"
@.str.1 = [4 x i8] c"jun\00"
@.str.2 = [5 x i8] c"mizu\00"
@.str.3 = [5 x i8] c"aran\00"
@.str.4 = [4 x i8] c"kei\00"
@.str.5 = [11 x i8] c"---%s----\0A\00"
@.str.6 = [4 x i8] c"%d \00"
@.str.7 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8*]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [3 x i32*]
%8 = alloca i32
%9 = alloca i32*
store i32 0, i32* %1
%10 = bitcast [5 x i8*]* %2 to i8*
%11 = bitcast i8* %10 to [5 x i8*]*
%12 = getelementptr inbounds [5 x i8*], [5 x i8*]* %11, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8** %12
%13 = getelementptr inbounds [5 x i8*], [5 x i8*]* %11, i32 0, i32 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8** %13
%14 = getelementptr inbounds [5 x i8*], [5 x i8*]* %11, i32 0, i32 2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8** %14
%15 = getelementptr inbounds [5 x i8*], [5 x i8*]* %11, i32 0, i32 3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8** %15
%16 = getelementptr inbounds [5 x i8*], [5 x i8*]* %11, i32 0, i32 4
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8** %16
store i32 0, i32* %3
br label %17
17: ; preds = %27, %0
%18 = load i32, i32* %3
%19 = icmp slt i32 %18, 5
br i1 %19, label %20, label %30
20: ; preds = %17
%21 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 0
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %25)
br label %27
27: ; preds = %20
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %17
30: ; preds = %17
store i32 10, i32* %4
store i32 30, i32* %5
store i32 2, i32* %6
%31 = getelementptr inbounds [3 x i32*], [3 x i32*]* %7, i64 0, i64 0
store i32* %4, i32** %31
%32 = getelementptr inbounds i32*, i32** %31, i64 1
store i32* %5, i32** %32
%33 = getelementptr inbounds i32*, i32** %32, i64 1
store i32* %6, i32** %33
store i32 0, i32* %3
br label %34
34: ; preds = %44, %30
%35 = load i32, i32* %3
%36 = icmp slt i32 %35, 3
br i1 %36, label %37, label %47
37: ; preds = %34
%38 = load i32, i32* %3
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [3 x i32*], [3 x i32*]* %7, i64 0, i64 %39
%41 = load i32*, i32** %40
%42 = load i32, i32* %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %42)
br label %44
44: ; preds = %37
%45 = load i32, i32* %3
%46 = add nsw i32 %45, 1
store i32 %46, i32* %3
br label %34
47: ; preds = %34
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %3
br label %49
49: ; preds = %90, %47
%50 = load i32, i32* %3
%51 = icmp slt i32 %50, 3
br i1 %51, label %52, label %93
52: ; preds = %49
%53 = load i32, i32* %3
store i32 %53, i32* %8
br label %54
54: ; preds = %86, %52
%55 = load i32, i32* %8
%56 = icmp slt i32 %55, 3
br i1 %56, label %57, label %89
57: ; preds = %54
%58 = load i32, i32* %8
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [3 x i32*], [3 x i32*]* %7, i64 0, i64 %59
%61 = load i32*, i32** %60
%62 = load i32, i32* %61
%63 = load i32, i32* %3
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [3 x i32*], [3 x i32*]* %7, i64 0, i64 %64
%66 = load i32*, i32** %65
%67 = load i32, i32* %66
%68 = icmp slt i32 %62, %67
br i1 %68, label %69, label %85
69: ; preds = %57
%70 = load i32, i32* %8
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [3 x i32*], [3 x i32*]* %7, i64 0, i64 %71
%73 = load i32*, i32** %72
store i32* %73, i32** %9
%74 = load i32, i32* %3
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [3 x i32*], [3 x i32*]* %7, i64 0, i64 %75
%77 = load i32*, i32** %76
%78 = load i32, i32* %8
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [3 x i32*], [3 x i32*]* %7, i64 0, i64 %79
store i32* %77, i32** %80
%81 = load i32*, i32** %9
%82 = load i32, i32* %3
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [3 x i32*], [3 x i32*]* %7, i64 0, i64 %83
store i32* %81, i32** %84
br label %85
85: ; preds = %69, %57
br label %86
86: ; preds = %85
%87 = load i32, i32* %8
%88 = add nsw i32 %87, 1
store i32 %88, i32* %8
br label %54
89: ; preds = %54
br label %90
90: ; preds = %89
%91 = load i32, i32* %3
%92 = add nsw i32 %91, 1
store i32 %92, i32* %3
br label %49
93: ; preds = %49
store i32 0, i32* %3
br label %94
94: ; preds = %104, %93
%95 = load i32, i32* %3
%96 = icmp slt i32 %95, 3
br i1 %96, label %97, label %107
97: ; preds = %94
%98 = load i32, i32* %3
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [3 x i32*], [3 x i32*]* %7, i64 0, i64 %99
%101 = load i32*, i32** %100
%102 = load i32, i32* %101
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %102)
br label %104
104: ; preds = %97
%105 = load i32, i32* %3
%106 = add nsw i32 %105, 1
store i32 %106, i32* %3
br label %94
107: ; preds = %94
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"tani\00"
@.str.1 = [4 x i8] c"jun\00"
@.str.2 = [5 x i8] c"mizu\00"
@.str.3 = [5 x i8] c"aran\00"
@.str.4 = [4 x i8] c"kei\00"
@.str.5 = [11 x i8] c"---%s----\0A\00"
@.str.6 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%9 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%10 = bitcast i32* %2 to i8*
store i32 30, i32* %2
%11 = bitcast i32* %3 to i8*
store i32 2, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 10)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 30)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 2)
%15 = call i32 @putchar(i32 10)
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, %16
%19 = select i1 %18, i32* %1, i32* %2
%20 = select i1 %18, i32 %17, i32 %16
%21 = select i1 %18, i32* %2, i32* %1
%22 = load i32, i32* %3
%23 = icmp slt i32 %22, %20
%24 = select i1 %23, i32* %21, i32* %3
%25 = load i32, i32* %19
%26 = load i32, i32* %24
%27 = icmp slt i32 %26, %25
%28 = load i32, i32* %21
%29 = select i1 %23, i32 %22, i32 %28
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %29)
%31 = load i32, i32* %24
%32 = load i32, i32* %19
%33 = select i1 %27, i32 %31, i32 %32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %19
%36 = load i32, i32* %24
%37 = select i1 %27, i32 %35, i32 %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %37)
%39 = call i32 @putchar(i32 10)
ret i32 0
}