#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*/ LC_ALL;
int /*<<< orphan*/ free(float *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int main() {
  setlocale(LC_ALL, "RUS");
  int i, count;
  float *array;
  printf("Введите количество чисел: ");
  scanf("%d", &count);
  array = (float *)malloc(count * sizeof(float));
  printf("Введите %d чисел\n", count);
  for (i = 0; i < count; i++) {
    printf("число номер %d = ", i + 1);
    scanf("%f", &array[i]);
  }
  printf("\nОбратный порядок:\n");
  for (i = count - 1; i >= 0; i--) {
    printf("число номер %d = %f\n", i + 1, array[i]);
  }
  free(array);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1060 <setlocale@plt>
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeac(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    120a <main+0xba>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11bf <main+0x6f>
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     125e <main+0x10e>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1221 <main+0xd1>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
lea    0xe83(%rip),%rsi
call   1070 <setlocale@plt>
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe9e(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    0xc(%rsp),%edi
shl    $0x2,%edi
call   1060 <malloc@plt>
mov    %rax,%r12
mov    0xc(%rsp),%esi
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    120b <main+0xab>
lea    0xe84(%rip),%r14
lea    0xe99(%rip),%r15
mov    %r12,%r13
xor    %ebx,%ebx
xchg   %ax,%ax
add    $0x1,%rbx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
movslq 0xc(%rsp),%rax
add    $0x4,%r13
cmp    %rax,%rbx
jl     11e0 <main+0x80>
lea    0xe82(%rip),%rdi
call   1040 <puts@plt>
mov    0xc(%rsp),%ebx
test   %ebx,%ebx
jle    1256 <main+0xf6>
lea    0xe4f(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rbx),%r15
mov    %r15d,%eax
movss  (%r12,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%al
call   1050 <printf@plt>
cmp    $0x1,%rbx
mov    %r15,%rbx
ja     1230 <main+0xd0>
mov    %r12,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [4 x i8] c"RUS\00"
@.str.1 = [49 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D0\BB\D0\B8\D1\87\D0\B5\D1\81\D1\82\D0\B2\D0\BE \D1\87\D0\B8\D1\81\D0\B5\D0\BB: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [30 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 %d \D1\87\D0\B8\D1\81\D0\B5\D0\BB\0A\00"
@.str.4 = [28 x i8] c"\D1\87\D0\B8\D1\81\D0\BB\D0\BE \D0\BD\D0\BE\D0\BC\D0\B5\D1\80 %d = \00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [35 x i8] c"\0A\D0\9E\D0\B1\D1\80\D0\B0\D1\82\D0\BD\D1\8B\D0\B9 \D0\BF\D0\BE\D1\80\D1\8F\D0\B4\D0\BE\D0\BA:\0A\00"
@.str.7 = [31 x i8] c"\D1\87\D0\B8\D1\81\D0\BB\D0\BE \D0\BD\D0\BE\D0\BC\D0\B5\D1\80 %d = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float*
store i32 0, i32* %1
%5 = load i32, i32* @LC_ALL
%6 = call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to float*
store float* %14, float** %4
%15 = load i32, i32* %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %15)
store i32 0, i32* %2
br label %17
17: ; preds = %30, %0
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %33
21: ; preds = %17
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %23)
%25 = load float*, float** %4
%26 = load i32, i32* %2
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds float, float* %25, i64 %27
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %28)
br label %30
30: ; preds = %21
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
br label %17
33: ; preds = %17
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
%35 = load i32, i32* %3
%36 = sub nsw i32 %35, 1
store i32 %36, i32* %2
br label %37
37: ; preds = %50, %33
%38 = load i32, i32* %2
%39 = icmp sge i32 %38, 0
br i1 %39, label %40, label %53
40: ; preds = %37
%41 = load i32, i32* %2
%42 = add nsw i32 %41, 1
%43 = load float*, float** %4
%44 = load i32, i32* %2
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds float, float* %43, i64 %45
%47 = load float, float* %46
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 %42, double %48)
br label %50
50: ; preds = %40
%51 = load i32, i32* %2
%52 = add nsw i32 %51, -1
store i32 %52, i32* %2
br label %37
53: ; preds = %37
%54 = load float*, float** %4
%55 = call i32 @free(float* %54)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [4 x i8] c"RUS\00"
@.str.1 = [49 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\BA\D0\BE\D0\BB\D0\B8\D1\87\D0\B5\D1\81\D1\82\D0\B2\D0\BE \D1\87\D0\B8\D1\81\D0\B5\D0\BB: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [30 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 %d \D1\87\D0\B8\D1\81\D0\B5\D0\BB\0A\00"
@.str.4 = [28 x i8] c"\D1\87\D0\B8\D1\81\D0\BB\D0\BE \D0\BD\D0\BE\D0\BC\D0\B5\D1\80 %d = \00"
@.str.5 = [3 x i8] c"%f\00"
@.str.7 = [31 x i8] c"\D1\87\D0\B8\D1\81\D0\BB\D0\BE \D0\BD\D0\BE\D0\BC\D0\B5\D1\80 %d = %f\0A\00"
@str = [34 x i8] c"\0A\D0\9E\D0\B1\D1\80\D0\B0\D1\82\D0\BD\D1\8B\D0\B9 \D0\BF\D0\BE\D1\80\D1\8F\D0\B4\D0\BE\D0\BA:\00"
define i32 @main() {
%1 = alloca i32
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = shl i32 %7, 2
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to float*
%11 = load i32, i32* %1
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %1
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %0, %15
%16 = phi i64 [ %17, %15 ], [ 0, %0 ]
%17 = add nuw nsw i64 %16, 1
%18 = trunc i64 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds float, float* %10, i64 %16
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %20)
%22 = load i32, i32* %1
%23 = sext i32 %22 to i64
%24 = icmp slt i64 %17, %23
br i1 %24, label %15, label %25
25: ; preds = %15, %0
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%27 = load i32, i32* %1
%28 = icmp sgt i32 %27, 0
br i1 %28, label %29, label %41
29: ; preds = %25
%30 = zext i32 %27 to i64
br label %31
31: ; preds = %29, %31
%32 = phi i64 [ %30, %29 ], [ %33, %31 ]
%33 = add nsw i64 %32, -1
%34 = and i64 %33, 4294967295
%35 = getelementptr inbounds float, float* %10, i64 %34
%36 = load float, float* %35
%37 = fpext float %36 to double
%38 = trunc i64 %32 to i32
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 %38, double %37)
%40 = icmp ugt i64 %32, 1
br i1 %40, label %31, label %41
41: ; preds = %31, %25
%42 = call i32 @free(float* %10)
ret i32 0
}