#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 */
scalar_t__ line_is_full(int);
int number_of_full_lines() {
  int ret = 0;
  int y;
  for (y = 0; y < 20 + 4 + 1 - 1; y++)
    if (line_is_full(y))
      ret++;
  return ret;
}


x86 assembly (clang, -O0):
<number_of_full_lines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x18,-0x8(%rbp)
jge    115e <number_of_full_lines+0x4e>
mov    -0x8(%rbp),%edi
call   1030 <line_is_full@plt>
cmp    $0x0,%rax
je     114b <number_of_full_lines+0x3b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <number_of_full_lines+0x40>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <number_of_full_lines+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_of_full_lines>:
push   %rbx
xor    %edi,%edi
call   1030 <line_is_full@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    $0x1,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x2,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x3,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x4,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x5,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x6,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x7,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x8,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x9,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0xa,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0xb,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0xc,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0xd,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0xe,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0xf,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x10,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x11,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x12,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x13,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x14,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x15,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x16,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    $0x17,%edi
call   1030 <line_is_full@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @number_of_full_lines() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 24
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i64 @line_is_full(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %13
13: ; preds = %10, %6
br label %14
14: ; preds = %13
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %3
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @number_of_full_lines() {
%1 = tail call i64 @line_is_full(i32 0)
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i64 @line_is_full(i32 1)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
%7 = add nuw nsw i32 %3, %6
%8 = tail call i64 @line_is_full(i32 2)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %7, %10
%12 = tail call i64 @line_is_full(i32 3)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
%15 = add nuw nsw i32 %11, %14
%16 = tail call i64 @line_is_full(i32 4)
%17 = icmp ne i64 %16, 0
%18 = zext i1 %17 to i32
%19 = add nuw nsw i32 %15, %18
%20 = tail call i64 @line_is_full(i32 5)
%21 = icmp ne i64 %20, 0
%22 = zext i1 %21 to i32
%23 = add nuw nsw i32 %19, %22
%24 = tail call i64 @line_is_full(i32 6)
%25 = icmp ne i64 %24, 0
%26 = zext i1 %25 to i32
%27 = add nuw nsw i32 %23, %26
%28 = tail call i64 @line_is_full(i32 7)
%29 = icmp ne i64 %28, 0
%30 = zext i1 %29 to i32
%31 = add nuw nsw i32 %27, %30
%32 = tail call i64 @line_is_full(i32 8)
%33 = icmp ne i64 %32, 0
%34 = zext i1 %33 to i32
%35 = add nuw nsw i32 %31, %34
%36 = tail call i64 @line_is_full(i32 9)
%37 = icmp ne i64 %36, 0
%38 = zext i1 %37 to i32
%39 = add nuw nsw i32 %35, %38
%40 = tail call i64 @line_is_full(i32 10)
%41 = icmp ne i64 %40, 0
%42 = zext i1 %41 to i32
%43 = add nuw nsw i32 %39, %42
%44 = tail call i64 @line_is_full(i32 11)
%45 = icmp ne i64 %44, 0
%46 = zext i1 %45 to i32
%47 = add nuw nsw i32 %43, %46
%48 = tail call i64 @line_is_full(i32 12)
%49 = icmp ne i64 %48, 0
%50 = zext i1 %49 to i32
%51 = add nuw nsw i32 %47, %50
%52 = tail call i64 @line_is_full(i32 13)
%53 = icmp ne i64 %52, 0
%54 = zext i1 %53 to i32
%55 = add nuw nsw i32 %51, %54
%56 = tail call i64 @line_is_full(i32 14)
%57 = icmp ne i64 %56, 0
%58 = zext i1 %57 to i32
%59 = add nuw nsw i32 %55, %58
%60 = tail call i64 @line_is_full(i32 15)
%61 = icmp ne i64 %60, 0
%62 = zext i1 %61 to i32
%63 = add nuw nsw i32 %59, %62
%64 = tail call i64 @line_is_full(i32 16)
%65 = icmp ne i64 %64, 0
%66 = zext i1 %65 to i32
%67 = add nuw nsw i32 %63, %66
%68 = tail call i64 @line_is_full(i32 17)
%69 = icmp ne i64 %68, 0
%70 = zext i1 %69 to i32
%71 = add nuw nsw i32 %67, %70
%72 = tail call i64 @line_is_full(i32 18)
%73 = icmp ne i64 %72, 0
%74 = zext i1 %73 to i32
%75 = add nuw nsw i32 %71, %74
%76 = tail call i64 @line_is_full(i32 19)
%77 = icmp ne i64 %76, 0
%78 = zext i1 %77 to i32
%79 = add nuw nsw i32 %75, %78
%80 = tail call i64 @line_is_full(i32 20)
%81 = icmp ne i64 %80, 0
%82 = zext i1 %81 to i32
%83 = add nuw nsw i32 %79, %82
%84 = tail call i64 @line_is_full(i32 21)
%85 = icmp ne i64 %84, 0
%86 = zext i1 %85 to i32
%87 = add nuw nsw i32 %83, %86
%88 = tail call i64 @line_is_full(i32 22)
%89 = icmp ne i64 %88, 0
%90 = zext i1 %89 to i32
%91 = add nuw nsw i32 %87, %90
%92 = tail call i64 @line_is_full(i32 23)
%93 = icmp ne i64 %92, 0
%94 = zext i1 %93 to i32
%95 = add nuw nsw i32 %91, %94
ret i32 %95
}