#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 */
float cos(float);
scalar_t__ pow(float, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
float sin(float);
int /*<<< orphan*/ sort(float *, int, int);
double sqrt(float);
int main(int argc, char **argv) {
  int n, p, q;
  printf("Введите n: ");
  scanf("%d", &n);
  printf("Введите p: ");
  scanf("%d", &p);
  printf("Введите q: ");
  scanf("%d", &q);
  float a[100];
  printf("Введите %d элементов:\n", n);
  float rmax = -1.0, rmin = 1.0, sq = 0.0;
  for (int i = 1; i <= n; i++) {
    scanf("%f", &a[i]);
    if (i <= q) {
      rmax = (((rmax) > (cos(a[i]))) ? (rmax) : (cos(a[i])));
    }
    if (i >= p) {
      rmin = (((rmin) < (sin(a[i]))) ? (rmin) : (sin(a[i])));
    }
    if ((p <= i) && (i <= q) && (((i - p) % 2 == 0) || (i == q))) {
      sq += pow(a[i], 2);
    }
  }
  printf("Максимальный cos: %.2f\n", rmax);
  printf("Минимальный  sin: %.2f\n", rmin);
  printf("Корень квадратов: %.2f\n", sqrt(sq));
  sort(a, p, q);
  printf("Отсортированный массив:\n");
  for (int i = 1; i <= n; i++) {
    printf("%.2f ", a[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1e0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7d(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5d(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3d(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x14(%rbp),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xe02(%rip),%xmm0
movss  %xmm0,-0x1b4(%rbp)
ff
movss  0xdee(%rip),%xmm0
movss  %xmm0,-0x1b8(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1bc(%rbp)
ff
movl   $0x1,-0x1c0(%rbp)
mov    -0x1c0(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1401 <main+0x291>
movslq -0x1c0(%rbp),%rax
lea    -0x1b0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x1c0(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     12eb <main+0x17b>
movss  -0x1b4(%rbp),%xmm0
ff
movss  %xmm0,-0x1c8(%rbp)
ff
movslq -0x1c0(%rbp),%rax
movss  -0x1b0(%rbp,%rax,4),%xmm0
ff ff
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movss  -0x1c8(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
jbe    12be <main+0x14e>
movss  -0x1b4(%rbp),%xmm0
ff
movss  %xmm0,-0x1cc(%rbp)
ff
jmp    12db <main+0x16b>
movslq -0x1c0(%rbp),%rax
movss  -0x1b0(%rbp,%rax,4),%xmm0
ff ff
call   1070 <cos@plt>
movss  %xmm0,-0x1cc(%rbp)
ff
movss  -0x1cc(%rbp),%xmm0
ff
movss  %xmm0,-0x1b4(%rbp)
ff
mov    -0x1c0(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     1372 <main+0x202>
movss  -0x1b8(%rbp),%xmm0
ff
movss  %xmm0,-0x1d0(%rbp)
ff
movslq -0x1c0(%rbp),%rax
movss  -0x1b0(%rbp,%rax,4),%xmm0
ff ff
call   1050 <sin@plt>
movss  -0x1d0(%rbp),%xmm1
ff
ucomiss %xmm1,%xmm0
jbe    1345 <main+0x1d5>
movss  -0x1b8(%rbp),%xmm0
ff
movss  %xmm0,-0x1d4(%rbp)
ff
jmp    1362 <main+0x1f2>
movslq -0x1c0(%rbp),%rax
movss  -0x1b0(%rbp,%rax,4),%xmm0
ff ff
call   1050 <sin@plt>
movss  %xmm0,-0x1d4(%rbp)
ff
movss  -0x1d4(%rbp),%xmm0
ff
movss  %xmm0,-0x1b8(%rbp)
ff
mov    -0x18(%rbp),%eax
cmp    -0x1c0(%rbp),%eax
jg     13e8 <main+0x278>
mov    -0x1c0(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     13e8 <main+0x278>
mov    -0x1c0(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     13b9 <main+0x249>
mov    -0x1c0(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    13e8 <main+0x278>
movslq -0x1c0(%rbp),%rax
movss  -0x1b0(%rbp,%rax,4),%xmm0
ff ff
mov    $0x2,%edi
call   1080 <pow@plt>
cvtsi2ss %rax,%xmm0
addss  -0x1bc(%rbp),%xmm0
ff
movss  %xmm0,-0x1bc(%rbp)
ff
jmp    13ed <main+0x27d>
mov    -0x1c0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c0(%rbp)
jmp    122f <main+0xbf>
movss  -0x1b4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xc5a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x1b8(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xc64(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x1bc(%rbp),%xmm0
ff
call   1090 <sqrt@plt>
lea    0xc6c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    -0x1b0(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1040 <sort@plt>
lea    0xc73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x1c4(%rbp)
mov    -0x1c4(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     14bf <main+0x34f>
movslq -0x1c4(%rbp),%rax
movss  -0x1b0(%rbp,%rax,4),%xmm0
ff ff
cvtss2sd %xmm0,%xmm0
lea    0xc66(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x1c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c4(%rbp)
jmp    147a <main+0x30a>
lea    0xc42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1b0,%rsp
lea    0xe65(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe6a(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xe57(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xe4d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    0x8(%rsp),%esi
lea    0xe3f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x8(%rsp)
jle    1342 <main+0x1b2>
movss  0xde5(%rip),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0xdd3(%rip),%xmm0
movss  %xmm0,0x14(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
mov    $0x1,%ebx
mov    $0x4,%r15d
lea    0xe1d(%rip),%r14
jmp    1299 <main+0x109>
movss  0x20(%rsp,%rbx,4),%xmm0
mov    $0x2,%edi
call   10a0 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  0xc(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0xc(%rsp)
nopl   0x0(%rax,%rax,1)
lea    0x1(%rbx),%rax
movslq 0x8(%rsp),%rcx
add    $0x4,%r15
cmp    %rcx,%rbx
mov    %rax,%rbx
jge    1367 <main+0x1d7>
lea    (%rsp,%r15,1),%rsi
add    $0x20,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1080 <scanf@plt>
movslq 0x18(%rsp),%rax
cmp    %rax,%rbx
jg     12dc <main+0x14c>
movss  0x20(%rsp,%rbx,4),%xmm0
call   1090 <cos@plt>
movss  0x10(%rsp),%xmm1
ucomiss %xmm0,%xmm1
ja     12dc <main+0x14c>
movss  0x20(%rsp,%rbx,4),%xmm0
call   1090 <cos@plt>
movss  %xmm0,0x10(%rsp)
movslq 0x1c(%rsp),%rax
cmp    %rax,%rbx
jl     1309 <main+0x179>
movss  0x20(%rsp,%rbx,4),%xmm0
call   1070 <sin@plt>
ucomiss 0x14(%rsp),%xmm0
ja     1309 <main+0x179>
movss  0x20(%rsp,%rbx,4),%xmm0
call   1070 <sin@plt>
movss  %xmm0,0x14(%rsp)
movslq 0x1c(%rsp),%rcx
cmp    %rcx,%rbx
jl     1280 <main+0xf0>
movslq 0x18(%rsp),%rax
cmp    %rax,%rbx
jg     1280 <main+0xf0>
mov    %ebx,%edx
sub    %ecx,%edx
test   $0x1,%dl
je     1250 <main+0xc0>
mov    %eax,%eax
cmp    %rax,%rbx
jne    1280 <main+0xf0>
jmp    1250 <main+0xc0>
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
movss  0xcad(%rip),%xmm0
movss  %xmm0,0x14(%rsp)
movss  0xca3(%rip),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcf6(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd02(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0xc(%rsp),%xmm0
call   10b0 <sqrt@plt>
lea    0xd0c(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x1c(%rsp),%esi
mov    0x18(%rsp),%edx
lea    0x20(%rsp),%rdi
call   1060 <sort@plt>
lea    0xd19(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x8(%rsp)
jle    1402 <main+0x272>
xor    %ebx,%ebx
lea    0xcfe(%rip),%r14
xchg   %ax,%ax
movss  0x24(%rsp,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movslq 0x8(%rsp),%rax
add    $0x1,%rbx
cmp    %rax,%rbx
jl     13e0 <main+0x250>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 n: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 p: \00"
@.str.3 = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 q: \00"
@.str.4 = [39 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 %d \D1\8D\D0\BB\D0\B5\D0\BC\D0\B5\D0\BD\D1\82\D0\BE\D0\B2:\0A\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [36 x i8] c"\D0\9C\D0\B0\D0\BA\D1\81\D0\B8\D0\BC\D0\B0\D0\BB\D1\8C\D0\BD\D1\8B\D0\B9 cos: %.2f\0A\00"
@.str.7 = [35 x i8] c"\D0\9C\D0\B8\D0\BD\D0\B8\D0\BC\D0\B0\D0\BB\D1\8C\D0\BD\D1\8B\D0\B9 sin: %.2f\0A\00"
@.str.8 = [39 x i8] c"\D0\9A\D0\BE\D1\80\D0\B5\D0\BD\D1\8C \D0\BA\D0\B2\D0\B0\D0\B4\D1\80\D0\B0\D1\82\D0\BE\D0\B2: %.2f\0A\00"
@.str.9 = [46 x i8] c"\D0\9E\D1\82\D1\81\D0\BE\D1\80\D1\82\D0\B8\D1\80\D0\BE\D0\B2\D0\B0\D0\BD\D0\BD\D1\8B\D0\B9 \D0\BC\D0\B0\D1\81\D1\81\D0\B8\D0\B2:\0A\00"
@.str.10 = [6 x i8] c"%.2f \00"
@.str.11 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [100 x float]
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%21 = load i32, i32* %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %21)
store float -1.000000e+00, float* %10
store float 1.000000e+00, float* %11
store float 0.000000e+00, float* %12
store i32 1, i32* %13
br label %23
23: ; preds = %103, %2
%24 = load i32, i32* %13
%25 = load i32, i32* %6
%26 = icmp sle i32 %24, %25
br i1 %26, label %27, label %106
27: ; preds = %23
%28 = load i32, i32* %13
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [100 x float], [100 x float]* %9, i64 0, i64 %29
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %30)
%32 = load i32, i32* %13
%33 = load i32, i32* %8
%34 = icmp sle i32 %32, %33
br i1 %34, label %35, label %53
35: ; preds = %27
%36 = load float, float* %10
%37 = load i32, i32* %13
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [100 x float], [100 x float]* %9, i64 0, i64 %38
%40 = load float, float* %39
%41 = call float @cos(float %40)
%42 = fcmp ogt float %36, %41
br i1 %42, label %43, label %45
43: ; preds = %35
%44 = load float, float* %10
br label %51
45: ; preds = %35
%46 = load i32, i32* %13
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [100 x float], [100 x float]* %9, i64 0, i64 %47
%49 = load float, float* %48
%50 = call float @cos(float %49)
br label %51
51: ; preds = %45, %43
%52 = phi float [ %44, %43 ], [ %50, %45 ]
store float %52, float* %10
br label %53
53: ; preds = %51, %27
%54 = load i32, i32* %13
%55 = load i32, i32* %7
%56 = icmp sge i32 %54, %55
br i1 %56, label %57, label %75
57: ; preds = %53
%58 = load float, float* %11
%59 = load i32, i32* %13
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [100 x float], [100 x float]* %9, i64 0, i64 %60
%62 = load float, float* %61
%63 = call float @sin(float %62)
%64 = fcmp olt float %58, %63
br i1 %64, label %65, label %67
65: ; preds = %57
%66 = load float, float* %11
br label %73
67: ; preds = %57
%68 = load i32, i32* %13
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [100 x float], [100 x float]* %9, i64 0, i64 %69
%71 = load float, float* %70
%72 = call float @sin(float %71)
br label %73
73: ; preds = %67, %65
%74 = phi float [ %66, %65 ], [ %72, %67 ]
store float %74, float* %11
br label %75
75: ; preds = %73, %53
%76 = load i32, i32* %7
%77 = load i32, i32* %13
%78 = icmp sle i32 %76, %77
br i1 %78, label %79, label %102
79: ; preds = %75
%80 = load i32, i32* %13
%81 = load i32, i32* %8
%82 = icmp sle i32 %80, %81
br i1 %82, label %83, label %102
83: ; preds = %79
%84 = load i32, i32* %13
%85 = load i32, i32* %7
%86 = sub nsw i32 %84, %85
%87 = srem i32 %86, 2
%88 = icmp eq i32 %87, 0
br i1 %88, label %93, label %89
89: ; preds = %83
%90 = load i32, i32* %13
%91 = load i32, i32* %8
%92 = icmp eq i32 %90, %91
br i1 %92, label %93, label %102
93: ; preds = %89, %83
%94 = load i32, i32* %13
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [100 x float], [100 x float]* %9, i64 0, i64 %95
%97 = load float, float* %96
%98 = call i64 @pow(float %97, i32 2)
%99 = sitofp i64 %98 to float
%100 = load float, float* %12
%101 = fadd float %100, %99
store float %101, float* %12
br label %102
102: ; preds = %93, %89, %79, %75
br label %103
103: ; preds = %102
%104 = load i32, i32* %13
%105 = add nsw i32 %104, 1
store i32 %105, i32* %13
br label %23
106: ; preds = %23
%107 = load float, float* %10
%108 = fpext float %107 to double
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), double %108)
%110 = load float, float* %11
%111 = fpext float %110 to double
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double %111)
%113 = load float, float* %12
%114 = call double @sqrt(float %113)
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), double %114)
%116 = getelementptr inbounds [100 x float], [100 x float]* %9, i64 0, i64 0
%117 = load i32, i32* %7
%118 = load i32, i32* %8
%119 = call i32 @sort(float* %116, i32 %117, i32 %118)
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.9, i64 0, i64 0))
store i32 1, i32* %14
br label %121
121: ; preds = %132, %106
%122 = load i32, i32* %14
%123 = load i32, i32* %6
%124 = icmp sle i32 %122, %123
br i1 %124, label %125, label %135
125: ; preds = %121
%126 = load i32, i32* %14
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [100 x float], [100 x float]* %9, i64 0, i64 %127
%129 = load float, float* %128
%130 = fpext float %129 to double
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), double %130)
br label %132
132: ; preds = %125
%133 = load i32, i32* %14
%134 = add nsw i32 %133, 1
store i32 %134, i32* %14
br label %121
135: ; preds = %121
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 n: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 p: \00"
@.str.3 = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 q: \00"
@.str.4 = [39 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 %d \D1\8D\D0\BB\D0\B5\D0\BC\D0\B5\D0\BD\D1\82\D0\BE\D0\B2:\0A\00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [36 x i8] c"\D0\9C\D0\B0\D0\BA\D1\81\D0\B8\D0\BC\D0\B0\D0\BB\D1\8C\D0\BD\D1\8B\D0\B9 cos: %.2f\0A\00"
@.str.7 = [35 x i8] c"\D0\9C\D0\B8\D0\BD\D0\B8\D0\BC\D0\B0\D0\BB\D1\8C\D0\BD\D1\8B\D0\B9 sin: %.2f\0A\00"
@.str.8 = [39 x i8] c"\D0\9A\D0\BE\D1\80\D0\B5\D0\BD\D1\8C \D0\BA\D0\B2\D0\B0\D0\B4\D1\80\D0\B0\D1\82\D0\BE\D0\B2: %.2f\0A\00"
@.str.10 = [6 x i8] c"%.2f \00"
@str = [45 x i8] c"\D0\9E\D1\82\D1\81\D0\BE\D1\80\D1\82\D0\B8\D1\80\D0\BE\D0\B2\D0\B0\D0\BD\D0\BD\D1\8B\D0\B9 \D0\BC\D0\B0\D1\81\D1\81\D0\B8\D0\B2:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [100 x float]
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%16 = bitcast [100 x float]* %6 to i8*
%17 = load i32, i32* %3
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 1
br i1 %20, label %21, label %38
21: ; preds = %89, %2
%22 = phi float [ -1.000000e+00, %2 ], [ %56, %89 ]
%23 = phi float [ 1.000000e+00, %2 ], [ %68, %89 ]
%24 = phi float [ 0.000000e+00, %2 ], [ %90, %89 ]
%25 = fpext float %22 to double
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), double %25)
%27 = fpext float %23 to double
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), double %27)
%29 = call double @sqrt(float %24)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), double %29)
%31 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%32 = load i32, i32* %4
%33 = load i32, i32* %5
%34 = call i32 @sort(float* %31, i32 %32, i32 %33)
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%36 = load i32, i32* %3
%37 = icmp slt i32 %36, 1
br i1 %37, label %95, label %97
38: ; preds = %2, %89
%39 = phi i64 [ %91, %89 ], [ 1, %2 ]
%40 = phi float [ %90, %89 ], [ 0.000000e+00, %2 ]
%41 = phi float [ %68, %89 ], [ 1.000000e+00, %2 ]
%42 = phi float [ %56, %89 ], [ -1.000000e+00, %2 ]
%43 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 %39
%44 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %43)
%45 = load i32, i32* %5
%46 = sext i32 %45 to i64
%47 = icmp sgt i64 %39, %46
br i1 %47, label %55, label %48
48: ; preds = %38
%49 = load float, float* %43
%50 = call float @cos(float %49)
%51 = fcmp ogt float %42, %50
br i1 %51, label %55, label %52
52: ; preds = %48
%53 = load float, float* %43
%54 = call float @cos(float %53)
br label %55
55: ; preds = %52, %48, %38
%56 = phi float [ %42, %38 ], [ %54, %52 ], [ %42, %48 ]
%57 = load i32, i32* %4
%58 = sext i32 %57 to i64
%59 = icmp slt i64 %39, %58
br i1 %59, label %67, label %60
60: ; preds = %55
%61 = load float, float* %43
%62 = call float @sin(float %61)
%63 = fcmp olt float %41, %62
br i1 %63, label %67, label %64
64: ; preds = %60
%65 = load float, float* %43
%66 = call float @sin(float %65)
br label %67
67: ; preds = %64, %60, %55
%68 = phi float [ %41, %55 ], [ %66, %64 ], [ %41, %60 ]
%69 = load i32, i32* %4
%70 = sext i32 %69 to i64
%71 = icmp slt i64 %39, %70
br i1 %71, label %89, label %72
72: ; preds = %67
%73 = load i32, i32* %5
%74 = sext i32 %73 to i64
%75 = icmp sgt i64 %39, %74
br i1 %75, label %89, label %76
76: ; preds = %72
%77 = trunc i64 %39 to i32
%78 = sub nsw i32 %77, %69
%79 = and i32 %78, 1
%80 = icmp eq i32 %79, 0
%81 = zext i32 %73 to i64
%82 = icmp eq i64 %39, %81
%83 = select i1 %80, i1 true, i1 %82
br i1 %83, label %84, label %89
84: ; preds = %76
%85 = load float, float* %43
%86 = call i64 @pow(float %85, i32 2)
%87 = sitofp i64 %86 to float
%88 = fadd float %40, %87
br label %89
89: ; preds = %76, %67, %72, %84
%90 = phi float [ %88, %84 ], [ %40, %72 ], [ %40, %67 ], [ %40, %76 ]
%91 = add nuw nsw i64 %39, 1
%92 = load i32, i32* %3
%93 = sext i32 %92 to i64
%94 = icmp slt i64 %39, %93
br i1 %94, label %38, label %21
95: ; preds = %97, %21
%96 = call i32 @putchar(i32 10)
ret i32 0
97: ; preds = %21, %97
%98 = phi i64 [ %103, %97 ], [ 1, %21 ]
%99 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 %98
%100 = load float, float* %99
%101 = fpext float %100 to double
%102 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), double %101)
%103 = add nuw nsw i64 %98, 1
%104 = load i32, i32* %3
%105 = sext i32 %104 to i64
%106 = icmp slt i64 %98, %105
br i1 %106, label %97, label %95
}