#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 powf(float, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
float sqrtf(float);
int main() {
  int n;
  float X[100];
  float Y[100];
  float F[100];
  int i;
  float e;
  float m;
  float b;
  printf("Ingrese la pendiente:");
  scanf("%f", &m);
  printf("Ingrese ordenada al origen:");
  scanf("%f", &b);
  printf("Ingrese la cantidad de mediciones:");
  scanf("%d", &n);
  if (n <= 0) {
    printf("No. %d no. No jodamos.\n", n);
    return 1;
  }
  for (i = 0; i < n; i++) {
    printf("X[%d]:", i);
    scanf("%f", &X[i]);
    printf("Y[%d]:", i);
    scanf("%f", &Y[i]);
    F[i] = m * X[i] + b;
  }
  e = 0;
  for (i = 0; i < n; i++) {
    e = e + powf((Y[i] - F[i]), 2);
  }
  e = sqrtf(e / n);
  if (e > 0.75) {
    printf("Poné números como la gente, dejate de joder.\n");
    return 1;
  }
  printf("Error cuadrático medio: %f\n", e);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
lea    -0x4cc(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe94(%rip),%rdi
lea    -0x4d0(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jg     11df <main+0x9f>
mov    -0x8(%rbp),%esi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13b2 <main+0x272>
movl   $0x0,-0x4c4(%rbp)
mov    -0x4c4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12b2 <main+0x172>
mov    -0x4c4(%rbp),%esi
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x4c4(%rbp),%rax
lea    -0x1a0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x4c4(%rbp),%esi
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x4c4(%rbp),%rax
lea    -0x330(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
movss  -0x4cc(%rbp),%xmm0
ff
movslq -0x4c4(%rbp),%rax
movss  -0x1a0(%rbp,%rax,4),%xmm2
ff ff
movss  -0x4d0(%rbp),%xmm1
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movslq -0x4c4(%rbp),%rax
movss  %xmm0,-0x4c0(%rbp,%rax,4)
ff ff
mov    -0x4c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c4(%rbp)
jmp    11e9 <main+0xa9>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4c8(%rbp)
ff
movl   $0x0,-0x4c4(%rbp)
mov    -0x4c4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    133b <main+0x1fb>
movss  -0x4c8(%rbp),%xmm0
ff
movss  %xmm0,-0x4d4(%rbp)
ff
movslq -0x4c4(%rbp),%rax
movss  -0x330(%rbp,%rax,4),%xmm0
ff ff
movslq -0x4c4(%rbp),%rax
subss  -0x4c0(%rbp,%rax,4),%xmm0
ff ff
mov    $0x2,%edi
call   1030 <powf@plt>
movaps %xmm0,%xmm1
movss  -0x4d4(%rbp),%xmm0
ff
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c8(%rbp)
ff
mov    -0x4c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c4(%rbp)
jmp    12c7 <main+0x187>
movss  -0x4c8(%rbp),%xmm0
ff
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
call   1050 <sqrtf@plt>
movss  %xmm0,-0x4c8(%rbp)
ff
movss  -0x4c8(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  0xc93(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1391 <main+0x251>
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13b2 <main+0x272>
movss  -0x4c8(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xd15(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4c8,%rsp
lea    0xe9c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <scanf@plt>
lea    0xe91(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <scanf@plt>
lea    0xe90(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea5(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    (%rsp),%esi
test   %esi,%esi
jle    12df <main+0x18f>
lea    0x1a0(%rsp),%r13
lea    0xe9c(%rip),%r14
lea    0xe38(%rip),%r15
lea    0xe95(%rip),%r12
xor    %ebp,%ebp
xor    %ebx,%ebx
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    (%rsp,%rbp,1),%rsi
add    $0x330,%rsi
mov    %r15,%rdi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %r12,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
movss  0xc(%rsp),%xmm0
mulss  0x330(%rsp,%rbx,4),%xmm0
addss  0x8(%rsp),%xmm0
movss  %xmm0,0x10(%rsp,%rbx,4)
add    $0x1,%rbx
movslq (%rsp),%rax
add    $0x4,%r13
add    $0x4,%rbp
cmp    %rax,%rbx
jl     11f0 <main+0xa0>
xorps  %xmm2,%xmm2
xorps  %xmm1,%xmm1
test   %eax,%eax
jle    12a9 <main+0x159>
xorps  %xmm1,%xmm1
xor    %ebx,%ebx
nopl   0x0(%rax)
movss  %xmm1,0x4(%rsp)
movss  0x1a0(%rsp,%rbx,4),%xmm0
subss  0x10(%rsp,%rbx,4),%xmm0
mov    $0x2,%edi
call   1040 <powf@plt>
movss  0x4(%rsp),%xmm1
addss  %xmm0,%xmm1
add    $0x1,%rbx
movslq (%rsp),%rax
cmp    %rax,%rbx
jl     1270 <main+0x120>
xorps  %xmm2,%xmm2
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  %xmm0,%xmm1
ucomiss %xmm2,%xmm1
jb     12ef <main+0x19f>
xorps  %xmm0,%xmm0
sqrtss %xmm1,%xmm0
ucomiss 0xd39(%rip),%xmm0
ja     1300 <main+0x1b0>
cvtss2sd %xmm0,%xmm0
lea    0xdb1(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
jmp    1311 <main+0x1c1>
lea    0xd79(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    130c <main+0x1bc>
movaps %xmm1,%xmm0
call   1060 <sqrtf@plt>
ucomiss 0xd02(%rip),%xmm0
jbe    12c9 <main+0x179>
lea    0xd9b(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x4c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Ingrese la pendiente:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"Ingrese ordenada al origen:\00"
@.str.3 = [35 x i8] c"Ingrese la cantidad de mediciones:\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [24 x i8] c"No. %d no. No jodamos.\0A\00"
@.str.6 = [7 x i8] c"X[%d]:\00"
@.str.7 = [7 x i8] c"Y[%d]:\00"
@.str.8 = [48 x i8] c"Pon\C3\A9 n\C3\BAmeros como la gente, dejate de joder.\0A\00"
@.str.9 = [29 x i8] c"Error cuadr\C3\A1tico medio: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x float]
%4 = alloca [100 x float]
%5 = alloca [100 x float]
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
store i32 0, i32* %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 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), float* %8)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 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), float* %9)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %2)
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %0
%19 = load i32, i32* %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %19)
store i32 1, i32* %1
br label %88
21: ; preds = %0
store i32 0, i32* %6
br label %22
22: ; preds = %49, %21
%23 = load i32, i32* %6
%24 = load i32, i32* %2
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %52
26: ; preds = %22
%27 = load i32, i32* %6
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %6
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 %30
%32 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %31)
%33 = load i32, i32* %6
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %6
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 %36
%38 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %37)
%39 = load float, float* %8
%40 = load i32, i32* %6
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 %41
%43 = load float, float* %42
%44 = load float, float* %9
%45 = call float @llvm.fmuladd.f32(float %39, float %43, float %44)
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [100 x float], [100 x float]* %5, i64 0, i64 %47
store float %45, float* %48
br label %49
49: ; preds = %26
%50 = load i32, i32* %6
%51 = add nsw i32 %50, 1
store i32 %51, i32* %6
br label %22
52: ; preds = %22
store float 0.000000e+00, float* %7
store i32 0, i32* %6
br label %53
53: ; preds = %70, %52
%54 = load i32, i32* %6
%55 = load i32, i32* %2
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %73
57: ; preds = %53
%58 = load float, float* %7
%59 = load i32, i32* %6
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 %60
%62 = load float, float* %61
%63 = load i32, i32* %6
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [100 x float], [100 x float]* %5, i64 0, i64 %64
%66 = load float, float* %65
%67 = fsub float %62, %66
%68 = call float @powf(float %67, i32 2)
%69 = fadd float %58, %68
store float %69, float* %7
br label %70
70: ; preds = %57
%71 = load i32, i32* %6
%72 = add nsw i32 %71, 1
store i32 %72, i32* %6
br label %53
73: ; preds = %53
%74 = load float, float* %7
%75 = load i32, i32* %2
%76 = sitofp i32 %75 to float
%77 = fdiv float %74, %76
%78 = call float @sqrtf(float %77)
store float %78, float* %7
%79 = load float, float* %7
%80 = fpext float %79 to double
%81 = fcmp ogt double %80, 7.500000e-01
br i1 %81, label %82, label %84
82: ; preds = %73
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0))
store i32 1, i32* %1
br label %88
84: ; preds = %73
%85 = load float, float* %7
%86 = fpext float %85 to double
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), double %86)
store i32 0, i32* %1
br label %88
88: ; preds = %84, %82, %18
%89 = load i32, i32* %1
ret i32 %89
}

LLVM IR (-O2):
@.str = [22 x i8] c"Ingrese la pendiente:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"Ingrese ordenada al origen:\00"
@.str.3 = [35 x i8] c"Ingrese la cantidad de mediciones:\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [24 x i8] c"No. %d no. No jodamos.\0A\00"
@.str.6 = [7 x i8] c"X[%d]:\00"
@.str.7 = [7 x i8] c"Y[%d]:\00"
@.str.9 = [29 x i8] c"Error cuadr\C3\A1tico medio: %f\0A\00"
@str = [47 x i8] c"Pon\C3\A9 n\C3\BAmeros como la gente, dejate de joder.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x float]
%3 = alloca [100 x float]
%4 = alloca [100 x float]
%5 = alloca float
%6 = alloca float
%7 = bitcast i32* %1 to i8*
%8 = bitcast [100 x float]* %2 to i8*
%9 = bitcast [100 x float]* %3 to i8*
%10 = bitcast [100 x float]* %4 to i8*
%11 = bitcast float* %5 to i8*
%12 = bitcast float* %6 to i8*
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %6)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%19 = load i32, i32* %1
%20 = icmp slt i32 %19, 1
br i1 %20, label %21, label %25
21: ; preds = %0
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %19)
br label %69
23: ; preds = %25
%24 = icmp sgt i32 %40, 0
br i1 %24, label %43, label %57
25: ; preds = %0, %25
%26 = phi i64 [ %39, %25 ], [ 0, %0 ]
%27 = trunc i64 %26 to i32
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %27)
%29 = getelementptr inbounds [100 x float], [100 x float]* %2, i64 0, i64 %26
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %29)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %27)
%32 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 %26
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %32)
%34 = load float, float* %5
%35 = load float, float* %29
%36 = load float, float* %6
%37 = call float @llvm.fmuladd.f32(float %34, float %35, float %36)
%38 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 %26
store float %37, float* %38
%39 = add nuw nsw i64 %26, 1
%40 = load i32, i32* %1
%41 = sext i32 %40 to i64
%42 = icmp slt i64 %39, %41
br i1 %42, label %25, label %23
43: ; preds = %23, %43
%44 = phi i64 [ %53, %43 ], [ 0, %23 ]
%45 = phi float [ %52, %43 ], [ 0.000000e+00, %23 ]
%46 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 %44
%47 = load float, float* %46
%48 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 %44
%49 = load float, float* %48
%50 = fsub float %47, %49
%51 = call float @powf(float %50, i32 2)
%52 = fadd float %45, %51
%53 = add nuw nsw i64 %44, 1
%54 = load i32, i32* %1
%55 = sext i32 %54 to i64
%56 = icmp slt i64 %53, %55
br i1 %56, label %43, label %57
57: ; preds = %43, %23
%58 = phi float [ 0.000000e+00, %23 ], [ %52, %43 ]
%59 = phi i32 [ %40, %23 ], [ %54, %43 ]
%60 = sitofp i32 %59 to float
%61 = fdiv float %58, %60
%62 = call float @sqrtf(float %61)
%63 = fcmp ogt float %62, 7.500000e-01
br i1 %63, label %64, label %66
64: ; preds = %57
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
br label %69
66: ; preds = %57
%67 = fpext float %62 to double
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), double %67)
br label %69
69: ; preds = %66, %64, %21
%70 = phi i32 [ 1, %21 ], [ 1, %64 ], [ 0, %66 ]
ret i32 %70
}