#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, float *matrice3) {
  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(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store float* %0, float** %3
store float* %1, float** %4
store i32 0, i32* %5
store i32 0, i32* %6
store float 0.000000e+00, float* %7
%8 = load float*, float** %3
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call float @LetturaElemento(float* %8, i32 %9, i32 %10)
store float %11, float* %7
%12 = load float*, float** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = load float, float* %7
%16 = call i32 @ScrivereElemento(float* %12, i32 %13, i32 %14, float %15)
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
%19 = load float*, float** %3
%20 = load i32, i32* %5
%21 = load i32, i32* %6
%22 = call float @LetturaElemento(float* %19, i32 %20, i32 %21)
store float %22, float* %7
%23 = load float*, float** %4
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = load float, float* %7
%27 = call i32 @ScrivereElemento(float* %23, i32 %24, i32 %25, float %26)
ret void
}

LLVM IR (-O2):
define void @CopiaIndici(float* %0, float* %1) {
%3 = tail call float @LetturaElemento(float* %0, i32 0, i32 0)
%4 = tail call i32 @ScrivereElemento(float* %1, i32 0, i32 0, float %3)
%5 = tail call float @LetturaElemento(float* %0, i32 0, i32 1)
%6 = tail call i32 @ScrivereElemento(float* %1, i32 0, i32 1, float %5)
ret void
}