#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(int argc, const char *argv[]) {
  int a[8] = {48, 37, 64, 97, 75, 12, 26, 49};
  int i, j, t;
  for (i = 1; i <= 6; i++) {
    for (j = 1; j <= 7 - i; j++) {
      if (a[j] > a[j + 1]) {
        t = a[j];
        a[j] = a[j + 1];
        a[j + 1] = t;
      }
    }
  }
  printf("排序后的数组元素为：\n");
  for (i = 1; i <= 7; i++) {
    printf(" %d ", a[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xecd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x1,-0x34(%rbp)
cmpl   $0x6,-0x34(%rbp)
jg     11ec <main+0xdc>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x7,%ecx
sub    -0x34(%rbp),%ecx
cmp    %ecx,%eax
jg     11d9 <main+0xc9>
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0x30(%rbp,%rcx,4),%eax
jle    11c6 <main+0xb6>
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x38(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x30(%rbp,%rax,4)
jmp    11cb <main+0xbb>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    116a <main+0x5a>
jmp    11de <main+0xce>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1159 <main+0x49>
lea    0xe2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x34(%rbp)
cmpl   $0x7,-0x34(%rbp)
jg     122f <main+0x11f>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1201 <main+0xf1>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
lea    0xebc(%rip),%rbx
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1a,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x25,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x31,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x40,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x4b,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [8 x i32] [i32 48, i32 37, i32 64, i32 97, i32 75, i32 12, i32 26, i32 49]
@.str = [32 x i8] c"\E6\8E\92\E5\BA\8F\E5\90\8E\E7\9A\84\E6\95\B0\E7\BB\84\E5\85\83\E7\B4\A0\E4\B8\BA\EF\BC\9A\0A\00"
@.str.1 = [5 x i8] c" %d \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [8 x i32]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [8 x i32]* %6 to i8*
store i32 1, i32* %7
br label %11
11: ; preds = %54, %2
%12 = load i32, i32* %7
%13 = icmp sle i32 %12, 6
br i1 %13, label %14, label %57
14: ; preds = %11
store i32 1, i32* %8
br label %15
15: ; preds = %50, %14
%16 = load i32, i32* %8
%17 = load i32, i32* %7
%18 = sub nsw i32 7, %17
%19 = icmp sle i32 %16, %18
br i1 %19, label %20, label %53
20: ; preds = %15
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = load i32, i32* %8
%26 = add nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = icmp sgt i32 %24, %29
br i1 %30, label %31, label %49
31: ; preds = %20
%32 = load i32, i32* %8
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 %33
%35 = load i32, i32* %34
store i32 %35, i32* %9
%36 = load i32, i32* %8
%37 = add nsw i32 %36, 1
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = load i32, i32* %8
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 %42
store i32 %40, i32* %43
%44 = load i32, i32* %9
%45 = load i32, i32* %8
%46 = add nsw i32 %45, 1
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 %47
store i32 %44, i32* %48
br label %49
49: ; preds = %31, %20
br label %50
50: ; preds = %49
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
store i32 %52, i32* %8
br label %15
53: ; preds = %15
br label %54
54: ; preds = %53
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
br label %11
57: ; preds = %11
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %7
br label %59
59: ; preds = %68, %57
%60 = load i32, i32* %7
%61 = icmp sle i32 %60, 7
br i1 %61, label %62, label %71
62: ; preds = %59
%63 = load i32, i32* %7
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 %64
%66 = load i32, i32* %65
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %66)
br label %68
68: ; preds = %62
%69 = load i32, i32* %7
%70 = add nsw i32 %69, 1
store i32 %70, i32* %7
br label %59
71: ; preds = %59
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c" %d \00"
@str = [31 x i8] c"\E6\8E\92\E5\BA\8F\E5\90\8E\E7\9A\84\E6\95\B0\E7\BB\84\E5\85\83\E7\B4\A0\E4\B8\BA\EF\BC\9A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 12)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 26)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 37)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 49)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 64)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 75)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 97)
%11 = tail call i32 @putchar(i32 10)
ret i32 0
}