#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int A[3][7];
  double mediaDia[7], mediaRefeicao[3];
  FILE *f;
  int n, m;
  int i, j;
  int maior, maiorDia;
  n = 3;
  m = 7;
  f = fopen("calorias.csv", "r");
  for (i = 0; i < n; i++)
    for (j = 0; j < m; j++)
      fscanf(f, "%d;", &A[i][j]);
  fclose(f);
  for (i = 0; i < n; i++)
    mediaRefeicao[i] = 0.0;
  for (i = 0; i < m; i++)
    mediaDia[i] = 0.0;
  maior = A[0][0];
  maiorDia = 0;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      mediaRefeicao[i] += (double)A[i][j] / m;
      mediaDia[j] += (double)A[i][j] / n;
      if (A[i][j] > maior) {
        maior = A[i][j];
        maiorDia = j;
      }
    }
  }
  printf("\tSeg.\tTer.\tQua.\tQui.\tSex.\tSab.\tDom.\tMedia\n");
  printf("Manhã\t");
  for (i = 0; i < m; i++)
    printf("%d\t", A[0][i]);
  printf("%lf\n", mediaRefeicao[0]);
  printf("Tarde\t");
  for (i = 0; i < m; i++)
    printf("%d\t", A[1][i]);
  printf("%lf\n", mediaRefeicao[1]);
  printf("Noite\t");
  for (i = 0; i < m; i++)
    printf("%d\t", A[2][i]);
  printf("%lf\n", mediaRefeicao[2]);
  printf("Média\t");
  for (i = 0; i < m; i++)
    printf("%.2lf\t", mediaDia[i]);
  printf("\n");
  printf("Dia de maior refeição: %d\n", maiorDia + 1);
  for (i = 0; i < m; i++)
    if (A[0][i] > mediaRefeicao[0] || A[1][i] > mediaRefeicao[1] ||
        A[2][i] > mediaRefeicao[2])
      printf("No dia %d, comeu acima da média\n", i + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0xcc(%rbp)
movl   $0x7,-0xd0(%rbp)
lea    0xe93(%rip),%rdi
lea    0xe99(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0xc8(%rbp)
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xcc(%rbp),%eax
jge    1218 <main+0xd8>
movl   $0x0,-0xd8(%rbp)
mov    -0xd8(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    11ff <main+0xbf>
mov    -0xc8(%rbp),%rdi
movslq -0xd4(%rbp),%rax
lea    -0x60(%rbp),%rdx
imul   $0x1c,%rax,%rax
add    %rax,%rdx
movslq -0xd8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe29(%rip),%rsi
call   1050 <fscanf@plt>
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    11a6 <main+0x66>
jmp    1204 <main+0xc4>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    118a <main+0x4a>
mov    -0xc8(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xcc(%rbp),%eax
jge    1267 <main+0x127>
movslq -0xd4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    122e <main+0xee>
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    12aa <main+0x16a>
movslq -0xd4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1271 <main+0x131>
mov    -0x60(%rbp),%eax
mov    %eax,-0xdc(%rbp)
movl   $0x0,-0xe0(%rbp)
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xcc(%rbp),%eax
jge    1403 <main+0x2c3>
movl   $0x0,-0xd8(%rbp)
mov    -0xd8(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    13ea <main+0x2aa>
movslq -0xd4(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xd8(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
cvtsi2sdl -0xd0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movslq -0xd4(%rbp),%rax
addsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
movslq -0xd4(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xd8(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
cvtsi2sdl -0xcc(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movslq -0xd8(%rbp),%rax
addsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
movslq -0xd4(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xd8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0xdc(%rbp),%eax
jle    13d1 <main+0x291>
movslq -0xd4(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xd8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xdc(%rbp)
mov    -0xd8(%rbp),%eax
mov    %eax,-0xe0(%rbp)
jmp    13d6 <main+0x296>
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    12e3 <main+0x1a3>
jmp    13ef <main+0x2af>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    12c7 <main+0x187>
lea    0xc09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc26(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    1468 <main+0x328>
movslq -0xd4(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%esi
lea    0xbf9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1429 <main+0x2e9>
movsd  -0xc0(%rbp),%xmm0
ff
lea    0xbd3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xbca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    14d5 <main+0x395>
movslq -0xd4(%rbp),%rax
mov    -0x44(%rbp,%rax,4),%esi
lea    0xb8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1496 <main+0x356>
movsd  -0xb8(%rbp),%xmm0
ff
lea    0xb66(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xb64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    1542 <main+0x402>
movslq -0xd4(%rbp),%rax
mov    -0x28(%rbp,%rax,4),%esi
lea    0xb1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1503 <main+0x3c3>
movsd  -0xb0(%rbp),%xmm0
ff
lea    0xaf9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xafe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    15b4 <main+0x474>
movslq -0xd4(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
lea    0xacc(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1570 <main+0x430>
lea    0xa81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xe0(%rbp),%esi
add    $0x1,%esi
lea    0xa9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    1676 <main+0x536>
movslq -0xd4(%rbp),%rax
cvtsi2sdl -0x60(%rbp,%rax,4),%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
ja     1646 <main+0x506>
movslq -0xd4(%rbp),%rax
cvtsi2sdl -0x44(%rbp,%rax,4),%xmm0
ucomisd -0xb8(%rbp),%xmm0
ff
ja     1646 <main+0x506>
movslq -0xd4(%rbp),%rax
cvtsi2sdl -0x28(%rbp,%rax,4),%xmm0
ucomisd -0xb0(%rbp),%xmm0
ff
jbe    165d <main+0x51d>
mov    -0xd4(%rbp),%esi
add    $0x1,%esi
lea    0xa33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1662 <main+0x522>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    15e3 <main+0x4a3>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xd0,%rsp
lea    0xeaa(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%rbx
lea    0xea3(%rip),%r15
lea    0x20(%rsp),%rdx
mov    %rax,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x24(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x28(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x2c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x30(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x34(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x38(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x3c(%rsp),%r14
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1070 <fscanf@plt>
lea    0x40(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x44(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x48(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x4c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x50(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x54(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x58(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x5c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x60(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x64(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x68(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x6c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
lea    0x70(%rsp),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fscanf@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xorpd  %xmm0,%xmm0
movapd %xmm0,0x80(%rsp)
movq   $0x0,0x90(%rsp)
mov    0x20(%rsp),%ebp
xor    %r8d,%r8d
xorpd  %xmm14,%xmm14
movsd  0xceb(%rip),%xmm12
mov    $0x1,%r9d
mov    $0x2,%r10d
movapd 0xce6(%rip),%xmm8
mov    $0x3,%r11d
movsd  0xccf(%rip),%xmm9
mov    $0x4,%r15d
mov    $0x5,%r12d
mov    $0x6,%ecx
xorpd  %xmm3,%xmm3
xorpd  %xmm4,%xmm4
xorpd  %xmm1,%xmm1
xor    %edx,%edx
xor    %ebx,%ebx
mov    %ebp,%esi
xorpd  %xmm7,%xmm7
movapd %xmm7,%xmm5
movapd %xmm0,%xmm6
movapd %xmm1,%xmm10
movapd %xmm4,%xmm11
movapd %xmm3,%xmm13
mov    -0x18(%r14),%eax
mov    -0x14(%r14),%rdi
movq   %rdi,%xmm2
movd   %ebp,%xmm3
movd   %eax,%xmm4
punpckldq %xmm4,%xmm3
cvtdq2pd %xmm3,%xmm0
cvtdq2pd %xmm2,%xmm7
movapd %xmm0,%xmm3
divsd  %xmm12,%xmm3
cmp    %esi,%ebp
cmovg  %ebp,%esi
addsd  %xmm14,%xmm3
cmovg  %r8d,%ebx
movapd %xmm0,%xmm4
unpckhpd %xmm0,%xmm4
divsd  %xmm12,%xmm4
cmp    %esi,%eax
cmovg  %eax,%esi
addsd  %xmm3,%xmm4
cmovg  %r9d,%ebx
movapd %xmm7,%xmm3
divsd  %xmm12,%xmm3
addsd  %xmm4,%xmm3
cmp    %esi,%edi
cmovg  %edi,%esi
cmovg  %r10d,%ebx
movapd %xmm7,%xmm4
unpckhpd %xmm7,%xmm4
divsd  %xmm12,%xmm4
addsd  %xmm3,%xmm4
divpd  %xmm8,%xmm0
addpd  %xmm6,%xmm0
divpd  %xmm8,%xmm7
addpd  %xmm5,%xmm7
pshufd $0x55,%xmm2,%xmm1
movd   %xmm1,%eax
cmp    %esi,%eax
cmovg  %eax,%esi
cmovg  %r11d,%ebx
mov    -0xc(%r14),%eax
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
movapd %xmm3,%xmm1
divsd  %xmm12,%xmm1
addsd  %xmm4,%xmm1
divsd  %xmm9,%xmm3
addsd  %xmm13,%xmm3
cmp    %esi,%eax
cmovg  %eax,%esi
cmovg  %r15d,%ebx
mov    -0x8(%r14),%eax
xorps  %xmm4,%xmm4
cvtsi2sd %eax,%xmm4
movapd %xmm4,%xmm2
divsd  %xmm12,%xmm2
addsd  %xmm1,%xmm2
divsd  %xmm9,%xmm4
addsd  %xmm11,%xmm4
cmp    %esi,%eax
cmovg  %eax,%esi
cmovg  %r12d,%ebx
mov    -0x4(%r14),%edi
xorps  %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
movapd %xmm1,%xmm5
divsd  %xmm12,%xmm5
addsd  %xmm2,%xmm5
divsd  %xmm9,%xmm1
addsd  %xmm10,%xmm1
cmp    %esi,%edi
cmovg  %ecx,%ebx
movsd  %xmm5,0x80(%rsp,%rdx,8)
cmp    $0x2,%rdx
je     14bf <main+0x35f>
cmp    %esi,%edi
cmovg  %edi,%esi
movsd  0x88(%rsp,%rdx,8),%xmm14
mov    (%r14),%ebp
add    $0x1c,%r14
add    $0x1,%rdx
jmp    1360 <main+0x200>
lea    0xbda(%rip),%rdi
movapd %xmm0,0xb0(%rsp)
movapd %xmm7,0xc0(%rsp)
movsd  %xmm3,0x98(%rsp)
movsd  %xmm4,0xa0(%rsp)
movsd  %xmm1,0xa8(%rsp)
call   1040 <puts@plt>
lea    0xb34(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x20(%rsp),%esi
lea    0xb2a(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x24(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x28(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x30(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x34(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x38(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0x80(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0xaba(%rip),%r15
mov    %r15,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xaae(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x3c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x40(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x44(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x48(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x4c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x50(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x54(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0x88(%rsp),%xmm0
mov    %r15,%rdi
movsd  %xmm0,0x10(%rsp)
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xa2c(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x58(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x5c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x60(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x64(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x68(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x6c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x70(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movsd  0x90(%rsp),%xmm0
mov    %r15,%rdi
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1060 <printf@plt>
lea    0x9aa(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x9a4(%rip),%r14
mov    %r14,%rdi
movaps 0xb0(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movaps 0xb0(%rsp),%xmm0
movhlps %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %r14,%rdi
movaps 0xc0(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
movaps 0xc0(%rsp),%xmm0
movhlps %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %r14,%rdi
movsd  0x98(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
mov    %r14,%rdi
movsd  0xa0(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
mov    %r14,%rdi
movsd  0xa8(%rsp),%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
lea    0x910(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x20(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
ja     178d <main+0x62d>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x3c(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     178d <main+0x62d>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x58(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
jbe    17a0 <main+0x640>
lea    0x8ea(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x24(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
ja     17d3 <main+0x673>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x40(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     17d3 <main+0x673>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x5c(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
jbe    17e6 <main+0x686>
lea    0x8a4(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x28(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
ja     1819 <main+0x6b9>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x44(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     1819 <main+0x6b9>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x60(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
jbe    182c <main+0x6cc>
lea    0x85e(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x2c(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
ja     185f <main+0x6ff>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x48(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     185f <main+0x6ff>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x64(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
jbe    1872 <main+0x712>
lea    0x818(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x30(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
ja     18a5 <main+0x745>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x4c(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     18a5 <main+0x745>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x68(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
jbe    18b8 <main+0x758>
lea    0x7d2(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x34(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
ja     18eb <main+0x78b>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x50(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     18eb <main+0x78b>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x6c(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
jbe    18fe <main+0x79e>
lea    0x78c(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x38(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
ja     1931 <main+0x7d1>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x54(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
ja     1931 <main+0x7d1>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x70(%rsp),%xmm0
ucomisd 0x8(%rsp),%xmm0
jbe    1944 <main+0x7e4>
lea    0x746(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"calorias.csv\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%d;\00"
@.str.3 = [43 x i8] c"\09Seg.\09Ter.\09Qua.\09Qui.\09Sex.\09Sab.\09Dom.\09Media\0A\00"
@.str.4 = [8 x i8] c"Manh\C3\A3\09\00"
@.str.5 = [4 x i8] c"%d\09\00"
@.str.6 = [5 x i8] c"%lf\0A\00"
@.str.7 = [7 x i8] c"Tarde\09\00"
@.str.8 = [7 x i8] c"Noite\09\00"
@.str.9 = [8 x i8] c"M\C3\A9dia\09\00"
@.str.10 = [7 x i8] c"%.2lf\09\00"
@.str.11 = [2 x i8] c"\0A\00"
@.str.12 = [29 x i8] c"Dia de maior refei\C3\A7\C3\A3o: %d\0A\00"
@.str.13 = [34 x i8] c"No dia %d, comeu acima da m\C3\A9dia\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [7 x i32]]
%3 = alloca [7 x double]
%4 = alloca [3 x double]
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %6
store i32 7, i32* %7
%12 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %12, i32** %5
store i32 0, i32* %8
br label %13
13: ; preds = %35, %0
%14 = load i32, i32* %8
%15 = load i32, i32* %6
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %38
17: ; preds = %13
store i32 0, i32* %9
br label %18
18: ; preds = %31, %17
%19 = load i32, i32* %9
%20 = load i32, i32* %7
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %34
22: ; preds = %18
%23 = load i32*, i32** %5
%24 = load i32, i32* %8
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 %25
%27 = load i32, i32* %9
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [7 x i32], [7 x i32]* %26, i64 0, i64 %28
%30 = call i32 @fscanf(i32* %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %29)
br label %31
31: ; preds = %22
%32 = load i32, i32* %9
%33 = add nsw i32 %32, 1
store i32 %33, i32* %9
br label %18
34: ; preds = %18
br label %35
35: ; preds = %34
%36 = load i32, i32* %8
%37 = add nsw i32 %36, 1
store i32 %37, i32* %8
br label %13
38: ; preds = %13
%39 = load i32*, i32** %5
%40 = call i32 @fclose(i32* %39)
store i32 0, i32* %8
br label %41
41: ; preds = %49, %38
%42 = load i32, i32* %8
%43 = load i32, i32* %6
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %52
45: ; preds = %41
%46 = load i32, i32* %8
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 %47
store double 0.000000e+00, double* %48
br label %49
49: ; preds = %45
%50 = load i32, i32* %8
%51 = add nsw i32 %50, 1
store i32 %51, i32* %8
br label %41
52: ; preds = %41
store i32 0, i32* %8
br label %53
53: ; preds = %61, %52
%54 = load i32, i32* %8
%55 = load i32, i32* %7
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %64
57: ; preds = %53
%58 = load i32, i32* %8
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 %59
store double 0.000000e+00, double* %60
br label %61
61: ; preds = %57
%62 = load i32, i32* %8
%63 = add nsw i32 %62, 1
store i32 %63, i32* %8
br label %53
64: ; preds = %53
%65 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 0
%66 = getelementptr inbounds [7 x i32], [7 x i32]* %65, i64 0, i64 0
%67 = load i32, i32* %66
store i32 %67, i32* %10
store i32 0, i32* %11
store i32 0, i32* %8
br label %68
68: ; preds = %133, %64
%69 = load i32, i32* %8
%70 = load i32, i32* %6
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %136
72: ; preds = %68
store i32 0, i32* %9
br label %73
73: ; preds = %129, %72
%74 = load i32, i32* %9
%75 = load i32, i32* %7
%76 = icmp slt i32 %74, %75
br i1 %76, label %77, label %132
77: ; preds = %73
%78 = load i32, i32* %8
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 %79
%81 = load i32, i32* %9
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [7 x i32], [7 x i32]* %80, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = sitofp i32 %84 to double
%86 = load i32, i32* %7
%87 = sitofp i32 %86 to double
%88 = fdiv double %85, %87
%89 = load i32, i32* %8
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 %90
%92 = load double, double* %91
%93 = fadd double %92, %88
store double %93, double* %91
%94 = load i32, i32* %8
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 %95
%97 = load i32, i32* %9
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [7 x i32], [7 x i32]* %96, i64 0, i64 %98
%100 = load i32, i32* %99
%101 = sitofp i32 %100 to double
%102 = load i32, i32* %6
%103 = sitofp i32 %102 to double
%104 = fdiv double %101, %103
%105 = load i32, i32* %9
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 %106
%108 = load double, double* %107
%109 = fadd double %108, %104
store double %109, double* %107
%110 = load i32, i32* %8
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 %111
%113 = load i32, i32* %9
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [7 x i32], [7 x i32]* %112, i64 0, i64 %114
%116 = load i32, i32* %115
%117 = load i32, i32* %10
%118 = icmp sgt i32 %116, %117
br i1 %118, label %119, label %128
119: ; preds = %77
%120 = load i32, i32* %8
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 %121
%123 = load i32, i32* %9
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [7 x i32], [7 x i32]* %122, i64 0, i64 %124
%126 = load i32, i32* %125
store i32 %126, i32* %10
%127 = load i32, i32* %9
store i32 %127, i32* %11
br label %128
128: ; preds = %119, %77
br label %129
129: ; preds = %128
%130 = load i32, i32* %9
%131 = add nsw i32 %130, 1
store i32 %131, i32* %9
br label %73
132: ; preds = %73
br label %133
133: ; preds = %132
%134 = load i32, i32* %8
%135 = add nsw i32 %134, 1
store i32 %135, i32* %8
br label %68
136: ; preds = %68
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %8
br label %139
139: ; preds = %150, %136
%140 = load i32, i32* %8
%141 = load i32, i32* %7
%142 = icmp slt i32 %140, %141
br i1 %142, label %143, label %153
143: ; preds = %139
%144 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 0
%145 = load i32, i32* %8
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [7 x i32], [7 x i32]* %144, i64 0, i64 %146
%148 = load i32, i32* %147
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %148)
br label %150
150: ; preds = %143
%151 = load i32, i32* %8
%152 = add nsw i32 %151, 1
store i32 %152, i32* %8
br label %139
153: ; preds = %139
%154 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%155 = load double, double* %154
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %155)
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %8
br label %158
158: ; preds = %169, %153
%159 = load i32, i32* %8
%160 = load i32, i32* %7
%161 = icmp slt i32 %159, %160
br i1 %161, label %162, label %172
162: ; preds = %158
%163 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 1
%164 = load i32, i32* %8
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [7 x i32], [7 x i32]* %163, i64 0, i64 %165
%167 = load i32, i32* %166
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %167)
br label %169
169: ; preds = %162
%170 = load i32, i32* %8
%171 = add nsw i32 %170, 1
store i32 %171, i32* %8
br label %158
172: ; preds = %158
%173 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%174 = load double, double* %173
%175 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %174)
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %8
br label %177
177: ; preds = %188, %172
%178 = load i32, i32* %8
%179 = load i32, i32* %7
%180 = icmp slt i32 %178, %179
br i1 %180, label %181, label %191
181: ; preds = %177
%182 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 2
%183 = load i32, i32* %8
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [7 x i32], [7 x i32]* %182, i64 0, i64 %184
%186 = load i32, i32* %185
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %186)
br label %188
188: ; preds = %181
%189 = load i32, i32* %8
%190 = add nsw i32 %189, 1
store i32 %190, i32* %8
br label %177
191: ; preds = %177
%192 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%193 = load double, double* %192
%194 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %193)
%195 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %8
br label %196
196: ; preds = %206, %191
%197 = load i32, i32* %8
%198 = load i32, i32* %7
%199 = icmp slt i32 %197, %198
br i1 %199, label %200, label %209
200: ; preds = %196
%201 = load i32, i32* %8
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 %202
%204 = load double, double* %203
%205 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %204)
br label %206
206: ; preds = %200
%207 = load i32, i32* %8
%208 = add nsw i32 %207, 1
store i32 %208, i32* %8
br label %196
209: ; preds = %196
%210 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%211 = load i32, i32* %11
%212 = add nsw i32 %211, 1
%213 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), i32 %212)
store i32 0, i32* %8
br label %214
214: ; preds = %253, %209
%215 = load i32, i32* %8
%216 = load i32, i32* %7
%217 = icmp slt i32 %215, %216
br i1 %217, label %218, label %256
218: ; preds = %214
%219 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 0
%220 = load i32, i32* %8
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds [7 x i32], [7 x i32]* %219, i64 0, i64 %221
%223 = load i32, i32* %222
%224 = sitofp i32 %223 to double
%225 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%226 = load double, double* %225
%227 = fcmp ogt double %224, %226
br i1 %227, label %248, label %228
228: ; preds = %218
%229 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 1
%230 = load i32, i32* %8
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds [7 x i32], [7 x i32]* %229, i64 0, i64 %231
%233 = load i32, i32* %232
%234 = sitofp i32 %233 to double
%235 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%236 = load double, double* %235
%237 = fcmp ogt double %234, %236
br i1 %237, label %248, label %238
238: ; preds = %228
%239 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %2, i64 0, i64 2
%240 = load i32, i32* %8
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds [7 x i32], [7 x i32]* %239, i64 0, i64 %241
%243 = load i32, i32* %242
%244 = sitofp i32 %243 to double
%245 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%246 = load double, double* %245
%247 = fcmp ogt double %244, %246
br i1 %247, label %248, label %252
248: ; preds = %238, %228, %218
%249 = load i32, i32* %8
%250 = add nsw i32 %249, 1
%251 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i32 %250)
br label %252
252: ; preds = %248, %238
br label %253
253: ; preds = %252
%254 = load i32, i32* %8
%255 = add nsw i32 %254, 1
store i32 %255, i32* %8
br label %214
256: ; preds = %214
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"calorias.csv\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [4 x i8] c"%d;\00"
@.str.4 = [8 x i8] c"Manh\C3\A3\09\00"
@.str.5 = [4 x i8] c"%d\09\00"
@.str.6 = [5 x i8] c"%lf\0A\00"
@.str.7 = [7 x i8] c"Tarde\09\00"
@.str.8 = [7 x i8] c"Noite\09\00"
@.str.9 = [8 x i8] c"M\C3\A9dia\09\00"
@.str.10 = [7 x i8] c"%.2lf\09\00"
@.str.12 = [29 x i8] c"Dia de maior refei\C3\A7\C3\A3o: %d\0A\00"
@.str.13 = [34 x i8] c"No dia %d, comeu acima da m\C3\A9dia\0A\00"
@str = [42 x i8] c"\09Seg.\09Ter.\09Qua.\09Qui.\09Sex.\09Sab.\09Dom.\09Media\00"
define i32 @main() {
%1 = alloca [3 x [7 x i32]]
%2 = alloca [3 x double]
%3 = bitcast [3 x double]* %2 to i8*
%4 = bitcast [3 x [7 x i32]]* %1 to i8*
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 0, i64 0
%7 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%8 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 0, i64 1
%9 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %8)
%10 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 0, i64 2
%11 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %10)
%12 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 0, i64 3
%13 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %12)
%14 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 0, i64 4
%15 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %14)
%16 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 0, i64 5
%17 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %16)
%18 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 0, i64 6
%19 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %18)
%20 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 1, i64 0
%21 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %20)
%22 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 1, i64 1
%23 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %22)
%24 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 1, i64 2
%25 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %24)
%26 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 1, i64 3
%27 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %26)
%28 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 1, i64 4
%29 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %28)
%30 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 1, i64 5
%31 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %30)
%32 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 1, i64 6
%33 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %32)
%34 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 2, i64 0
%35 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %34)
%36 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 2, i64 1
%37 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %36)
%38 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 2, i64 2
%39 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %38)
%40 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 2, i64 3
%41 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %40)
%42 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 2, i64 4
%43 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %42)
%44 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 2, i64 5
%45 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %44)
%46 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 2, i64 6
%47 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %46)
%48 = call i32 @fclose(i32* %5)
%49 = load i32, i32* %6
br label %50
50: ; preds = %130, %0
%51 = phi i32 [ %49, %0 ], [ %135, %130 ]
%52 = phi double [ 0.000000e+00, %0 ], [ %133, %130 ]
%53 = phi double [ 0.000000e+00, %0 ], [ %105, %130 ]
%54 = phi double [ 0.000000e+00, %0 ], [ %115, %130 ]
%55 = phi double [ 0.000000e+00, %0 ], [ %125, %130 ]
%56 = phi i64 [ 0, %0 ], [ %128, %130 ]
%57 = phi i32 [ 0, %0 ], [ %127, %130 ]
%58 = phi i32 [ %49, %0 ], [ %131, %130 ]
%59 = phi <4 x double> [ zeroinitializer, %0 ], [ %94, %130 ]
%60 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 %56
%61 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 %56, i64 1
%62 = load i32, i32* %61
%63 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 %56, i64 2
%64 = bitcast i32* %63 to <2 x i32>*
%65 = load <2 x i32>, <2 x i32>* %64
%66 = insertelement <4 x i32> poison, i32 %51, i64 0
%67 = insertelement <4 x i32> %66, i32 %62, i64 1
%68 = shufflevector <2 x i32> %65, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%69 = shufflevector <4 x i32> %67, <4 x i32> %68, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
%70 = sitofp <4 x i32> %69 to <4 x double>
%71 = extractelement <4 x double> %70, i64 0
%72 = fdiv double %71, 7.000000e+00
%73 = fadd double %52, %72
%74 = icmp sgt i32 %51, %58
%75 = select i1 %74, i32 %51, i32 %58
%76 = select i1 %74, i32 0, i32 %57
%77 = extractelement <4 x double> %70, i64 1
%78 = fdiv double %77, 7.000000e+00
%79 = fadd double %73, %78
%80 = icmp sgt i32 %62, %75
%81 = select i1 %80, i32 %62, i32 %75
%82 = select i1 %80, i32 1, i32 %76
%83 = extractelement <4 x double> %70, i64 2
%84 = fdiv double %83, 7.000000e+00
%85 = fadd double %79, %84
%86 = extractelement <2 x i32> %65, i64 0
%87 = icmp sgt i32 %86, %81
%88 = select i1 %87, i32 %86, i32 %81
%89 = select i1 %87, i32 2, i32 %82
%90 = extractelement <4 x double> %70, i64 3
%91 = fdiv double %90, 7.000000e+00
%92 = fadd double %85, %91
%93 = fdiv <4 x double> %70, <double 3.000000e+00, double 3.000000e+00, double 3.000000e+00, double 3.000000e+00>
%94 = fadd <4 x double> %93, %59
%95 = extractelement <2 x i32> %65, i64 1
%96 = icmp sgt i32 %95, %88
%97 = select i1 %96, i32 %95, i32 %88
%98 = select i1 %96, i32 3, i32 %89
%99 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 %56, i64 4
%100 = load i32, i32* %99
%101 = sitofp i32 %100 to double
%102 = fdiv double %101, 7.000000e+00
%103 = fadd double %92, %102
%104 = fdiv double %101, 3.000000e+00
%105 = fadd double %104, %53
%106 = icmp sgt i32 %100, %97
%107 = select i1 %106, i32 %100, i32 %97
%108 = select i1 %106, i32 4, i32 %98
%109 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 %56, i64 5
%110 = load i32, i32* %109
%111 = sitofp i32 %110 to double
%112 = fdiv double %111, 7.000000e+00
%113 = fadd double %103, %112
%114 = fdiv double %111, 3.000000e+00
%115 = fadd double %114, %54
%116 = icmp sgt i32 %110, %107
%117 = select i1 %116, i32 %110, i32 %107
%118 = select i1 %116, i32 5, i32 %108
%119 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 %56, i64 6
%120 = load i32, i32* %119
%121 = sitofp i32 %120 to double
%122 = fdiv double %121, 7.000000e+00
%123 = fadd double %113, %122
%124 = fdiv double %121, 3.000000e+00
%125 = fadd double %124, %55
%126 = icmp sgt i32 %120, %117
%127 = select i1 %126, i32 6, i32 %118
store double %123, double* %60
%128 = add nuw nsw i64 %56, 1
%129 = icmp eq i64 %128, 3
br i1 %129, label %136, label %130
130: ; preds = %50
%131 = select i1 %126, i32 %120, i32 %117
%132 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 %128
%133 = load double, double* %132
%134 = getelementptr inbounds [3 x [7 x i32]], [3 x [7 x i32]]* %1, i64 0, i64 %128, i64 0
%135 = load i32, i32* %134
br label %50
136: ; preds = %50
%137 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%138 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%139 = load i32, i32* %6
%140 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %139)
%141 = load i32, i32* %8
%142 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %141)
%143 = load i32, i32* %10
%144 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %143)
%145 = load i32, i32* %12
%146 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %145)
%147 = load i32, i32* %14
%148 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %147)
%149 = load i32, i32* %16
%150 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %149)
%151 = load i32, i32* %18
%152 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %151)
%153 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%154 = load double, double* %153
%155 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %154)
%156 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%157 = load i32, i32* %20
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %157)
%159 = load i32, i32* %22
%160 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %159)
%161 = load i32, i32* %24
%162 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %161)
%163 = load i32, i32* %26
%164 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %163)
%165 = load i32, i32* %28
%166 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %165)
%167 = load i32, i32* %30
%168 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %167)
%169 = load i32, i32* %32
%170 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %169)
%171 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 1
%172 = load double, double* %171
%173 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %172)
%174 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%175 = load i32, i32* %34
%176 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %175)
%177 = load i32, i32* %36
%178 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %177)
%179 = load i32, i32* %38
%180 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %179)
%181 = load i32, i32* %40
%182 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %181)
%183 = load i32, i32* %42
%184 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %183)
%185 = load i32, i32* %44
%186 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %185)
%187 = load i32, i32* %46
%188 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %187)
%189 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 2
%190 = load double, double* %189
%191 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double %190)
%192 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%193 = extractelement <4 x double> %94, i64 0
%194 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %193)
%195 = extractelement <4 x double> %94, i64 1
%196 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %195)
%197 = extractelement <4 x double> %94, i64 2
%198 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %197)
%199 = extractelement <4 x double> %94, i64 3
%200 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %199)
%201 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %105)
%202 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %115)
%203 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), double %125)
%204 = call i32 @putchar(i32 10)
%205 = add nsw i32 %127, 1
%206 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), i32 %205)
%207 = load i32, i32* %6
%208 = sitofp i32 %207 to double
%209 = fcmp olt double %154, %208
br i1 %209, label %218, label %210
210: ; preds = %136
%211 = load i32, i32* %20
%212 = sitofp i32 %211 to double
%213 = fcmp olt double %172, %212
br i1 %213, label %218, label %214
214: ; preds = %210
%215 = load i32, i32* %34
%216 = sitofp i32 %215 to double
%217 = fcmp olt double %190, %216
br i1 %217, label %218, label %220
218: ; preds = %214, %210, %136
%219 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i32 1)
br label %220
220: ; preds = %214, %218
%221 = load i32, i32* %8
%222 = sitofp i32 %221 to double
%223 = fcmp olt double %154, %222
br i1 %223, label %232, label %224
224: ; preds = %220
%225 = load i32, i32* %22
%226 = sitofp i32 %225 to double
%227 = fcmp olt double %172, %226
br i1 %227, label %232, label %228
228: ; preds = %224
%229 = load i32, i32* %36
%230 = sitofp i32 %229 to double
%231 = fcmp olt double %190, %230
br i1 %231, label %232, label %234
232: ; preds = %228, %224, %220
%233 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i32 2)
br label %234
234: ; preds = %232, %228
%235 = load i32, i32* %10
%236 = sitofp i32 %235 to double
%237 = fcmp olt double %154, %236
br i1 %237, label %246, label %238
238: ; preds = %234
%239 = load i32, i32* %24
%240 = sitofp i32 %239 to double
%241 = fcmp olt double %172, %240
br i1 %241, label %246, label %242
242: ; preds = %238
%243 = load i32, i32* %38
%244 = sitofp i32 %243 to double
%245 = fcmp olt double %190, %244
br i1 %245, label %246, label %248
246: ; preds = %242, %238, %234
%247 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i32 3)
br label %248
248: ; preds = %246, %242
%249 = load i32, i32* %12
%250 = sitofp i32 %249 to double
%251 = fcmp olt double %154, %250
br i1 %251, label %260, label %252
252: ; preds = %248
%253 = load i32, i32* %26
%254 = sitofp i32 %253 to double
%255 = fcmp olt double %172, %254
br i1 %255, label %260, label %256
256: ; preds = %252
%257 = load i32, i32* %40
%258 = sitofp i32 %257 to double
%259 = fcmp olt double %190, %258
br i1 %259, label %260, label %262
260: ; preds = %256, %252, %248
%261 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i32 4)
br label %262
262: ; preds = %260, %256
%263 = load i32, i32* %14
%264 = sitofp i32 %263 to double
%265 = fcmp olt double %154, %264
br i1 %265, label %274, label %266
266: ; preds = %262
%267 = load i32, i32* %28
%268 = sitofp i32 %267 to double
%269 = fcmp olt double %172, %268
br i1 %269, label %274, label %270
270: ; preds = %266
%271 = load i32, i32* %42
%272 = sitofp i32 %271 to double
%273 = fcmp olt double %190, %272
br i1 %273, label %274, label %276
274: ; preds = %270, %266, %262
%275 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i32 5)
br label %276
276: ; preds = %274, %270
%277 = load i32, i32* %16
%278 = sitofp i32 %277 to double
%279 = fcmp olt double %154, %278
br i1 %279, label %288, label %280
280: ; preds = %276
%281 = load i32, i32* %30
%282 = sitofp i32 %281 to double
%283 = fcmp olt double %172, %282
br i1 %283, label %288, label %284
284: ; preds = %280
%285 = load i32, i32* %44
%286 = sitofp i32 %285 to double
%287 = fcmp olt double %190, %286
br i1 %287, label %288, label %290
288: ; preds = %284, %280, %276
%289 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i32 6)
br label %290
290: ; preds = %288, %284
%291 = load i32, i32* %18
%292 = sitofp i32 %291 to double
%293 = fcmp olt double %154, %292
br i1 %293, label %302, label %294
294: ; preds = %290
%295 = load i32, i32* %32
%296 = sitofp i32 %295 to double
%297 = fcmp olt double %172, %296
br i1 %297, label %302, label %298
298: ; preds = %294
%299 = load i32, i32* %46
%300 = sitofp i32 %299 to double
%301 = fcmp olt double %190, %300
br i1 %301, label %302, label %304
302: ; preds = %298, %294, %290
%303 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0), i32 7)
br label %304
304: ; preds = %302, %298
ret i32 0
}