#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 */
int /*<<< orphan*/ fexpect(char *, int, int, int);
void test_for() {
  int i;
  int acc = 0;
  for (i = 0; i < 5; i++) {
    acc = acc + i;
  }
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
          37, 10, acc);
  ;
  acc = 0;
  for (i = 0; i < 5; i++) {
    acc = acc + i;
  }
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
          43, 10, acc);
  ;
  acc = 0;
  for (i = 0; i < 100; i++) {
    if (i < 5)
      continue;
    if (i == 9)
      break;
    acc += i;
  }
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
          51, 5 + 6 + 7 + 8, acc);
  ;
  for (int x = 3, y = 5, z = 8; x < 100; x++, y++, z += 2)
    fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
            54, z, x + y);
  ;
  for (;;)
    break;
  for (i = 0; i < 100; i++)
    ;
  i = 0;
  for (; 0.5;) {
    i = 68;
    break;
  }
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c",
          66, 68, i);
  ;
}


x86 assembly (clang, -O0):
<test_for>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1147 <test_for+0x37>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <test_for+0x16>
mov    -0x8(%rbp),%ecx
lea    0xeaf(%rip),%rdi
mov    $0x25,%esi
mov    $0xa,%edx
call   1030 <fexpect@plt>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    118f <test_for+0x7f>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    116e <test_for+0x5e>
mov    -0x8(%rbp),%ecx
lea    0xe67(%rip),%rdi
mov    $0x2b,%esi
mov    $0xa,%edx
call   1030 <fexpect@plt>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    11f5 <test_for+0xe5>
cmpl   $0x5,-0x4(%rbp)
jge    11cf <test_for+0xbf>
jmp    11e7 <test_for+0xd7>
cmpl   $0x9,-0x4(%rbp)
jne    11de <test_for+0xce>
jmp    11f5 <test_for+0xe5>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11b6 <test_for+0xa6>
mov    -0x8(%rbp),%ecx
lea    0xe01(%rip),%rdi
mov    $0x33,%esi
mov    $0x1a,%edx
call   1030 <fexpect@plt>
movl   $0x3,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1267 <test_for+0x157>
mov    -0x14(%rbp),%edx
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
lea    0xdc3(%rip),%rdi
mov    $0x36,%esi
call   1030 <fexpect@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
jmp    1223 <test_for+0x113>
jmp    126c <test_for+0x15c>
jmp    1271 <test_for+0x161>
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1295 <test_for+0x185>
jmp    1287 <test_for+0x177>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1278 <test_for+0x168>
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    12ab <test_for+0x19b>
jmp    12b2 <test_for+0x1a2>
movl   $0x44,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xd44(%rip),%rdi
mov    $0x42,%esi
mov    $0x44,%edx
call   1030 <fexpect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_for>:
push   %rbp
push   %rbx
push   %rax
lea    0xee6(%rip),%rbx
mov    %rbx,%rdi
mov    $0x25,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
call   1030 <fexpect@plt>
mov    %rbx,%rdi
mov    $0x2b,%esi
mov    $0xa,%edx
mov    $0xa,%ecx
call   1030 <fexpect@plt>
xor    %edx,%edx
xor    %eax,%eax
jmp    115a <test_for+0x4a>
xchg   %ax,%ax
add    $0x2,%eax
mov    %ecx,%edx
cmp    $0x64,%eax
je     1174 <test_for+0x64>
lea    (%rdx,%rax,1),%ecx
cmp    $0x5,%eax
cmovb  %edx,%ecx
cmp    $0x4,%eax
jb     1150 <test_for+0x40>
cmp    $0x8,%eax
je     1174 <test_for+0x64>
add    %eax,%ecx
add    $0x1,%ecx
jmp    1150 <test_for+0x40>
lea    0xe85(%rip),%rbx
mov    %rbx,%rdi
mov    $0x33,%esi
mov    $0x1a,%edx
call   1030 <fexpect@plt>
mov    $0x8,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x36,%esi
mov    %ebp,%edx
mov    %ebp,%ecx
call   1030 <fexpect@plt>
add    $0x2,%ebp
cmp    $0xca,%ebp
jne    11a0 <test_for+0x90>
lea    0xe3d(%rip),%rdi
mov    $0x42,%esi
mov    $0x44,%edx
mov    $0x44,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c\00"
define void @test_for() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %2
store i32 0, i32* %1
br label %6
6: ; preds = %13, %0
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 5
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = add nsw i32 %10, %11
store i32 %12, i32* %2
br label %13
13: ; preds = %9
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %6
16: ; preds = %6
%17 = load i32, i32* %2
%18 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 37, i32 10, i32 %17)
store i32 0, i32* %2
store i32 0, i32* %1
br label %19
19: ; preds = %26, %16
%20 = load i32, i32* %1
%21 = icmp slt i32 %20, 5
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = load i32, i32* %2
%24 = load i32, i32* %1
%25 = add nsw i32 %23, %24
store i32 %25, i32* %2
br label %26
26: ; preds = %22
%27 = load i32, i32* %1
%28 = add nsw i32 %27, 1
store i32 %28, i32* %1
br label %19
29: ; preds = %19
%30 = load i32, i32* %2
%31 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 43, i32 10, i32 %30)
store i32 0, i32* %2
store i32 0, i32* %1
br label %32
32: ; preds = %47, %29
%33 = load i32, i32* %1
%34 = icmp slt i32 %33, 100
br i1 %34, label %35, label %50
35: ; preds = %32
%36 = load i32, i32* %1
%37 = icmp slt i32 %36, 5
br i1 %37, label %38, label %39
38: ; preds = %35
br label %47
39: ; preds = %35
%40 = load i32, i32* %1
%41 = icmp eq i32 %40, 9
br i1 %41, label %42, label %43
42: ; preds = %39
br label %50
43: ; preds = %39
%44 = load i32, i32* %1
%45 = load i32, i32* %2
%46 = add nsw i32 %45, %44
store i32 %46, i32* %2
br label %47
47: ; preds = %43, %38
%48 = load i32, i32* %1
%49 = add nsw i32 %48, 1
store i32 %49, i32* %1
br label %32
50: ; preds = %42, %32
%51 = load i32, i32* %2
%52 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 51, i32 26, i32 %51)
store i32 3, i32* %3
store i32 5, i32* %4
store i32 8, i32* %5
br label %53
53: ; preds = %62, %50
%54 = load i32, i32* %3
%55 = icmp slt i32 %54, 100
br i1 %55, label %56, label %69
56: ; preds = %53
%57 = load i32, i32* %5
%58 = load i32, i32* %3
%59 = load i32, i32* %4
%60 = add nsw i32 %58, %59
%61 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 54, i32 %57, i32 %60)
br label %62
62: ; preds = %56
%63 = load i32, i32* %3
%64 = add nsw i32 %63, 1
store i32 %64, i32* %3
%65 = load i32, i32* %4
%66 = add nsw i32 %65, 1
store i32 %66, i32* %4
%67 = load i32, i32* %5
%68 = add nsw i32 %67, 2
store i32 %68, i32* %5
br label %53
69: ; preds = %53
br label %70
70: ; preds = %69
br label %71
71: ; preds = %70
store i32 0, i32* %1
br label %72
72: ; preds = %76, %71
%73 = load i32, i32* %1
%74 = icmp slt i32 %73, 100
br i1 %74, label %75, label %79
75: ; preds = %72
br label %76
76: ; preds = %75
%77 = load i32, i32* %1
%78 = add nsw i32 %77, 1
store i32 %78, i32* %1
br label %72
79: ; preds = %72
store i32 0, i32* %1
br label %80
80: ; preds = %79
br i1 true, label %81, label %82
81: ; preds = %80
store i32 68, i32* %1
br label %82
82: ; preds = %81, %80
%83 = load i32, i32* %1
%84 = call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 66, i32 68, i32 %83)
ret void
}

LLVM IR (-O2):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/control.c\00"
define void @test_for() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 37, i32 10, i32 10)
%2 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 43, i32 10, i32 10)
br label %3
3: ; preds = %15, %0
%4 = phi i32 [ 0, %0 ], [ %16, %15 ]
%5 = phi i32 [ 0, %0 ], [ %17, %15 ]
%6 = icmp ult i32 %5, 5
%7 = add nsw i32 %4, %5
%8 = select i1 %6, i32 %4, i32 %7
%9 = or i32 %5, 1
%10 = icmp ult i32 %5, 4
br i1 %10, label %15, label %11
11: ; preds = %3
%12 = icmp eq i32 %9, 9
br i1 %12, label %19, label %13
13: ; preds = %11
%14 = add nsw i32 %8, %9
br label %15
15: ; preds = %13, %3
%16 = phi i32 [ %8, %3 ], [ %14, %13 ]
%17 = add nuw nsw i32 %5, 2
%18 = icmp eq i32 %17, 100
br i1 %18, label %19, label %3
19: ; preds = %15, %11
%20 = phi i32 [ %8, %11 ], [ %16, %15 ]
%21 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 51, i32 26, i32 %20)
br label %22
22: ; preds = %19, %22
%23 = phi i32 [ 8, %19 ], [ %30, %22 ]
%24 = phi i32 [ 5, %19 ], [ %29, %22 ]
%25 = phi i32 [ 3, %19 ], [ %28, %22 ]
%26 = add nuw nsw i32 %24, %25
%27 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 54, i32 %23, i32 %26)
%28 = add nuw nsw i32 %25, 1
%29 = add nuw nsw i32 %24, 1
%30 = add nuw nsw i32 %23, 2
%31 = icmp eq i32 %29, 102
br i1 %31, label %32, label %22
32: ; preds = %22
%33 = tail call i32 @fexpect(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 66, i32 68, i32 68)
ret void
}