#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 */
double LetturaElemento(float **, int, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
void StampaMatriceRisulta(float matrice[][(100)]) {
  int i = 0;
  int j = 0;
  int righe = 0;
  int colonne = 0;
  printf("\n==================================================================="
         "========\n");
  printf("La matrice di risulta e' :\n");
  i = 0;
  while (i < LetturaElemento(matrice, righe, colonne)) {
    j = 0;
    while (j < LetturaElemento(matrice, righe, colonne + 1)) {
      printf("%.2f\t", LetturaElemento(matrice, i, j + 2));
      j++;
    }
    printf("\n");
    i++;
  }
  printf("\n==================================================================="
         "========\n");
  getchar();
  getchar();
  return;
}


x86 assembly (clang, -O0):
<StampaMatriceRisulta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1050 <LetturaElemento@plt>
movsd  -0x20(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    121f <StampaMatriceRisulta+0xef>
movl   $0x0,-0x10(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
add    $0x1,%edx
call   1050 <LetturaElemento@plt>
movsd  -0x28(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    1203 <StampaMatriceRisulta+0xd3>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
add    $0x2,%edx
call   1050 <LetturaElemento@plt>
lea    0xe7c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11aa <StampaMatriceRisulta+0x7a>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    117b <StampaMatriceRisulta+0x4b>
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StampaMatriceRisulta>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
lea    0xea1(%rip),%rdi
call   1040 <puts@plt>
xor    %r15d,%r15d
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <LetturaElemento@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1234 <StampaMatriceRisulta+0xe4>
lea    0xe72(%rip),%r14
jmp    11ce <StampaMatriceRisulta+0x7e>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15d
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <LetturaElemento@plt>
ucomisd (%rsp),%xmm0
jbe    1234 <StampaMatriceRisulta+0xe4>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1070 <LetturaElemento@plt>
ucomisd 0xe1b(%rip),%xmm0
jbe    11a0 <StampaMatriceRisulta+0x50>
mov    $0x2,%ebp
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
call   1070 <LetturaElemento@plt>
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    -0x1(%rbp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1070 <LetturaElemento@plt>
add    $0x1,%ebp
ucomisd (%rsp),%xmm0
ja     11f0 <StampaMatriceRisulta+0xa0>
jmp    11a0 <StampaMatriceRisulta+0x50>
lea    0xdee(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <getchar@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"\0A===========================================================================\0A\00"
@.str.1 = [28 x i8] c"La matrice di risulta e' :\0A\00"
@.str.2 = [6 x i8] c"%.2f\09\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @StampaMatriceRisulta([100 x float]* %0) {
%2 = alloca [100 x float]*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store [100 x float]* %0, [100 x float]** %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %9
9: ; preds = %39, %1
%10 = load i32, i32* %3
%11 = sitofp i32 %10 to double
%12 = load [100 x float]*, [100 x float]** %2
%13 = bitcast [100 x float]* %12 to float**
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call double @LetturaElemento(float** %13, i32 %14, i32 %15)
%17 = fcmp olt double %11, %16
br i1 %17, label %18, label %43
18: ; preds = %9
store i32 0, i32* %4
br label %19
19: ; preds = %29, %18
%20 = load i32, i32* %4
%21 = sitofp i32 %20 to double
%22 = load [100 x float]*, [100 x float]** %2
%23 = bitcast [100 x float]* %22 to float**
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
%27 = call double @LetturaElemento(float** %23, i32 %24, i32 %26)
%28 = fcmp olt double %21, %27
br i1 %28, label %29, label %39
29: ; preds = %19
%30 = load [100 x float]*, [100 x float]** %2
%31 = bitcast [100 x float]* %30 to float**
%32 = load i32, i32* %3
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 2
%35 = call double @LetturaElemento(float** %31, i32 %32, i32 %34)
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %35)
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 1
store i32 %38, i32* %4
br label %19
39: ; preds = %19
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 1
store i32 %42, i32* %3
br label %9
43: ; preds = %9
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%45 = call i32 (...) @getchar()
%46 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str.2 = [6 x i8] c"%.2f\09\00"
@str.4 = [27 x i8] c"La matrice di risulta e' :\00"
@str.5 = [77 x i8] c"\0A===========================================================================\00"
define void @StampaMatriceRisulta([100 x float]* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.4, i64 0, i64 0))
%4 = bitcast [100 x float]* %0 to float**
%5 = tail call double @LetturaElemento(float** %4, i32 0, i32 0)
%6 = fcmp ogt double %5, 0.000000e+00
br i1 %6, label %7, label %26
7: ; preds = %1, %20
%8 = phi i32 [ %22, %20 ], [ 0, %1 ]
%9 = tail call double @LetturaElemento(float** %4, i32 0, i32 1)
%10 = fcmp ogt double %9, 0.000000e+00
br i1 %10, label %11, label %20
11: ; preds = %7, %11
%12 = phi i32 [ %16, %11 ], [ 0, %7 ]
%13 = add nuw nsw i32 %12, 2
%14 = tail call double @LetturaElemento(float** %4, i32 %8, i32 %13)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %14)
%16 = add nuw nsw i32 %12, 1
%17 = sitofp i32 %16 to double
%18 = tail call double @LetturaElemento(float** %4, i32 0, i32 1)
%19 = fcmp ogt double %18, %17
br i1 %19, label %11, label %20
20: ; preds = %11, %7
%21 = tail call i32 @putchar(i32 10)
%22 = add nuw nsw i32 %8, 1
%23 = sitofp i32 %22 to double
%24 = tail call double @LetturaElemento(float** %4, i32 0, i32 0)
%25 = fcmp ogt double %24, %23
br i1 %25, label %7, label %26
26: ; preds = %20, %1
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.5, i64 0, i64 0))
%28 = tail call i32 (...) @getchar()
%29 = tail call i32 (...) @getchar()
ret void
}