#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 LetturaElemento(float **, int, int);
int /*<<< orphan*/ ScrivereElemento(float **, int, int, float);
void CopiaIndici(float matrice[][(100)], float matrice3[][(100)]) {
  int righe = 0;
  int colonne = 0;
  float valore = 0;
  valore = LetturaElemento(matrice, righe, colonne);
  ScrivereElemento(matrice3, righe, colonne, valore);
  colonne++;
  valore = LetturaElemento(matrice, righe, colonne);
  ScrivereElemento(matrice3, righe, colonne, valore);
  return;
}


x86 assembly (clang, -O0):
<CopiaIndici>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1040 <LetturaElemento@plt>
movss  %xmm0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movss  -0x1c(%rbp),%xmm0
call   1030 <ScrivereElemento@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1040 <LetturaElemento@plt>
movss  %xmm0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
movss  -0x1c(%rbp),%xmm0
call   1030 <ScrivereElemento@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopiaIndici>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
xor    %edx,%edx
call   1040 <LetturaElemento@plt>
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <ScrivereElemento@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <LetturaElemento@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x1,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <ScrivereElemento@plt>

LLVM IR (-O0):
define void @CopiaIndici([100 x float]* %0, [100 x float]* %1) {
%3 = alloca [100 x float]*
%4 = alloca [100 x float]*
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store [100 x float]* %0, [100 x float]** %3
store [100 x float]* %1, [100 x float]** %4
store i32 0, i32* %5
store i32 0, i32* %6
store float 0.000000e+00, float* %7
%8 = load [100 x float]*, [100 x float]** %3
%9 = bitcast [100 x float]* %8 to float**
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call float @LetturaElemento(float** %9, i32 %10, i32 %11)
store float %12, float* %7
%13 = load [100 x float]*, [100 x float]** %4
%14 = bitcast [100 x float]* %13 to float**
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load float, float* %7
%18 = call i32 @ScrivereElemento(float** %14, i32 %15, i32 %16, float %17)
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
%21 = load [100 x float]*, [100 x float]** %3
%22 = bitcast [100 x float]* %21 to float**
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = call float @LetturaElemento(float** %22, i32 %23, i32 %24)
store float %25, float* %7
%26 = load [100 x float]*, [100 x float]** %4
%27 = bitcast [100 x float]* %26 to float**
%28 = load i32, i32* %5
%29 = load i32, i32* %6
%30 = load float, float* %7
%31 = call i32 @ScrivereElemento(float** %27, i32 %28, i32 %29, float %30)
ret void
}

LLVM IR (-O2):
define void @CopiaIndici([100 x float]* %0, [100 x float]* %1) {
%3 = bitcast [100 x float]* %0 to float**
%4 = tail call float @LetturaElemento(float** %3, i32 0, i32 0)
%5 = bitcast [100 x float]* %1 to float**
%6 = tail call i32 @ScrivereElemento(float** %5, i32 0, i32 0, float %4)
%7 = tail call float @LetturaElemento(float** %3, i32 0, i32 1)
%8 = tail call i32 @ScrivereElemento(float** %5, i32 0, i32 1, float %7)
ret void
}