#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*/ le_entrada(int *, double **, double *);
double norma2_sem_overflow(int, double *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int n;
  double A[100][100];
  double b[100];
  double norma;
  int p[100];
  int ret;
  int i;
  le_entrada(&n, A, b);
  printf("b eh :");
  for (i = 0; i < n; i++)
    printf("%lf ", b[i]);
  printf("\n");
  norma = norma2_sem_overflow(n, b);
  printf("Norma: %lf\n", norma);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x13d60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x13890(%rbp),%rsi
lea    -0x13bb0(%rbp),%rdx
lea    -0x8(%rbp),%rdi
call   1040 <le_entrada@plt>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x13d58(%rbp)
mov    -0x13d58(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b2 <main+0x82>
movslq -0x13d58(%rbp),%rax
movsd  -0x13bb0(%rbp,%rax,8),%xmm0
fe ff
lea    0xe70(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x13d58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13d58(%rbp)
jmp    1171 <main+0x41>
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%edi
lea    -0x13bb0(%rbp),%rsi
call   1030 <norma2_sem_overflow@plt>
movsd  %xmm0,-0x13bb8(%rbp)
ff
movsd  -0x13bb8(%rbp),%xmm0
ff
lea    0xe26(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x13d60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x13bb8,%rsp
lea    0xc(%rsp),%rdi
lea    0x330(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1050 <le_entrada@plt>
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    119e <main+0x5e>
xor    %ebx,%ebx
lea    0xe88(%rip),%r14
nop
movsd  0x10(%rsp,%rbx,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     1180 <main+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%edi
lea    0x10(%rsp),%rsi
call   1040 <norma2_sem_overflow@plt>
lea    0xe4f(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x13bb8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"b eh :\00"
@.str.1 = [5 x i8] c"%lf \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [12 x i8] c"Norma: %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x [100 x double]]
%4 = alloca [100 x double]
%5 = alloca double
%6 = alloca [100 x i32]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = getelementptr inbounds [100 x [100 x double]], [100 x [100 x double]]* %3, i64 0, i64 0
%10 = bitcast [100 x double]* %9 to double**
%11 = getelementptr inbounds [100 x double], [100 x double]* %4, i64 0, i64 0
%12 = call i32 @le_entrada(i32* %2, double** %10, double* %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %8
br label %14
14: ; preds = %24, %0
%15 = load i32, i32* %8
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %27
18: ; preds = %14
%19 = load i32, i32* %8
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [100 x double], [100 x double]* %4, i64 0, i64 %20
%22 = load double, double* %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %22)
br label %24
24: ; preds = %18
%25 = load i32, i32* %8
%26 = add nsw i32 %25, 1
store i32 %26, i32* %8
br label %14
27: ; preds = %14
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%29 = load i32, i32* %2
%30 = getelementptr inbounds [100 x double], [100 x double]* %4, i64 0, i64 0
%31 = call double @norma2_sem_overflow(i32 %29, double* %30)
store double %31, double* %5
%32 = load double, double* %5
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"b eh :\00"
@.str.1 = [5 x i8] c"%lf \00"
@.str.3 = [12 x i8] c"Norma: %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x [100 x double]]
%3 = alloca [100 x double]
%4 = bitcast i32* %1 to i8*
%5 = bitcast [100 x [100 x double]]* %2 to i8*
%6 = bitcast [100 x double]* %3 to i8*
%7 = bitcast [100 x [100 x double]]* %2 to double**
%8 = getelementptr inbounds [100 x double], [100 x double]* %3, i64 0, i64 0
%9 = call i32 @le_entrada(i32* %1, double** %7, double* %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %1
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %22
13: ; preds = %0, %13
%14 = phi i64 [ %18, %13 ], [ 0, %0 ]
%15 = getelementptr inbounds [100 x double], [100 x double]* %3, i64 0, i64 %14
%16 = load double, double* %15
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %16)
%18 = add nuw nsw i64 %14, 1
%19 = load i32, i32* %1
%20 = sext i32 %19 to i64
%21 = icmp slt i64 %18, %20
br i1 %21, label %13, label %22
22: ; preds = %13, %0
%23 = call i32 @putchar(i32 10)
%24 = load i32, i32* %1
%25 = call double @norma2_sem_overflow(i32 %24, double* %8)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %25)
ret i32 0
}