#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*/ ClearGameBlock(int, int);
void ClearAllGameBlocks() {
  for (int x = 0; x < 10; ++x) {
    for (int y = 0; y < 20; ++y) {
      ClearGameBlock(x, y);
    }
  }
}


x86 assembly (clang, -O0):
<ClearAllGameBlocks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1166 <ClearAllGameBlocks+0x56>
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    1153 <ClearAllGameBlocks+0x43>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <ClearGameBlock@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <ClearAllGameBlocks+0x20>
jmp    1158 <ClearAllGameBlocks+0x48>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <ClearAllGameBlocks+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearAllGameBlocks>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
xor    %esi,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x4,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x5,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x6,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x7,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x8,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x9,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0xa,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0xb,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0xc,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0xd,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0xe,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0xf,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x10,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x11,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x12,%esi
call   1030 <ClearGameBlock@plt>
mov    %ebx,%edi
mov    $0x13,%esi
call   1030 <ClearGameBlock@plt>
add    $0x1,%ebx
cmp    $0xa,%ebx
jne    1120 <ClearAllGameBlocks+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ClearAllGameBlocks() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %23, %1 ]
%3 = tail call i32 @ClearGameBlock(i32 %2, i32 0)
%4 = tail call i32 @ClearGameBlock(i32 %2, i32 1)
%5 = tail call i32 @ClearGameBlock(i32 %2, i32 2)
%6 = tail call i32 @ClearGameBlock(i32 %2, i32 3)
%7 = tail call i32 @ClearGameBlock(i32 %2, i32 4)
%8 = tail call i32 @ClearGameBlock(i32 %2, i32 5)
%9 = tail call i32 @ClearGameBlock(i32 %2, i32 6)
%10 = tail call i32 @ClearGameBlock(i32 %2, i32 7)
%11 = tail call i32 @ClearGameBlock(i32 %2, i32 8)
%12 = tail call i32 @ClearGameBlock(i32 %2, i32 9)
%13 = tail call i32 @ClearGameBlock(i32 %2, i32 10)
%14 = tail call i32 @ClearGameBlock(i32 %2, i32 11)
%15 = tail call i32 @ClearGameBlock(i32 %2, i32 12)
%16 = tail call i32 @ClearGameBlock(i32 %2, i32 13)
%17 = tail call i32 @ClearGameBlock(i32 %2, i32 14)
%18 = tail call i32 @ClearGameBlock(i32 %2, i32 15)
%19 = tail call i32 @ClearGameBlock(i32 %2, i32 16)
%20 = tail call i32 @ClearGameBlock(i32 %2, i32 17)
%21 = tail call i32 @ClearGameBlock(i32 %2, i32 18)
%22 = tail call i32 @ClearGameBlock(i32 %2, i32 19)
%23 = add nuw nsw i32 %2, 1
%24 = icmp eq i32 %23, 10
br i1 %24, label %25, label %1
25: ; preds = %1
ret void
}