#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, double *);
void readMatrix3(double matrix[][60], FILE *fPtr) {
  int i, j;
  for (i = 0; i < 60; i++) {
    for (j = 0; j < 4; j++) {
      fscanf(fPtr, "%lg", &matrix[j][i]);
    }
  }
}


x86 assembly (clang, -O0):
<readMatrix3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3c,-0x14(%rbp)
jge    1190 <readMatrix3+0x80>
movl   $0x0,-0x18(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    117d <readMatrix3+0x6d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
movslq -0x18(%rbp),%rax
imul   $0x1e0,%rax,%rax
add    %rax,%rdx
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xe96(%rip),%rsi
call   1030 <fscanf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1138 <readMatrix3+0x28>
jmp    1182 <readMatrix3+0x72>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <readMatrix3+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readMatrix3>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x3c,%r12d
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <fscanf@plt>
lea    0x1e0(%rbx),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <fscanf@plt>
lea    0x3c0(%rbx),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <fscanf@plt>
lea    0x5a0(%rbx),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <fscanf@plt>
add    $0x8,%rbx
add    $0xffffffffffffffff,%r12
jne    1130 <readMatrix3+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lg\00"
define void @readMatrix3([60 x double]* %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %13, %3 ]
%5 = getelementptr inbounds [60 x double], [60 x double]* %0, i64 0, i64 %4
%6 = tail call i32 @fscanf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %5)
%7 = getelementptr inbounds [60 x double], [60 x double]* %0, i64 1, i64 %4
%8 = tail call i32 @fscanf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %7)
%9 = getelementptr inbounds [60 x double], [60 x double]* %0, i64 2, i64 %4
%10 = tail call i32 @fscanf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %9)
%11 = getelementptr inbounds [60 x double], [60 x double]* %0, i64 3, i64 %4
%12 = tail call i32 @fscanf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %11)
%13 = add nuw nsw i64 %4, 1
%14 = icmp eq i64 %13, 60
br i1 %14, label %15, label %3
15: ; preds = %3
ret void
}