#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*/ refreshDungeonCell(short, short);
void displayLevel() {
  short i, j;
  for (i = 0; i < (100 - 20 - 1); i++) {
    for (j = 0; j < ((31 + 3) - 3 - 2); j++) {
      refreshDungeonCell(i, j);
    }
  }
}


x86 assembly (clang, -O0):
<displayLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x4f,%eax
jge    1175 <displayLevel+0x65>
movw   $0x0,-0x4(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x1d,%eax
jge    115f <displayLevel+0x4f>
mov    -0x2(%rbp),%ax
movswl %ax,%edi
movswl -0x4(%rbp),%esi
call   1030 <refreshDungeonCell@plt>
mov    -0x4(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x4(%rbp)
jmp    1131 <displayLevel+0x21>
jmp    1164 <displayLevel+0x54>
mov    -0x2(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x2(%rbp)
jmp    111e <displayLevel+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayLevel>:
push   %rbx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movswl %ax,%ebx
mov    %ebx,%edi
xor    %esi,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x4,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x5,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x6,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x7,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x8,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x9,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0xa,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0xb,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0xc,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0xd,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0xe,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0xf,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x10,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x11,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x12,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x13,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x14,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x15,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x16,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x17,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x18,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x19,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x1a,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x1b,%esi
call   1030 <refreshDungeonCell@plt>
mov    %ebx,%edi
mov    $0x1c,%esi
call   1030 <refreshDungeonCell@plt>
lea    0x1(%rbx),%eax
cmp    $0x4f,%ax
jne    1120 <displayLevel+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @displayLevel() {
br label %1
1: ; preds = %0, %1
%2 = phi i16 [ 0, %0 ], [ %32, %1 ]
%3 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 0)
%4 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 1)
%5 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 2)
%6 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 3)
%7 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 4)
%8 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 5)
%9 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 6)
%10 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 7)
%11 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 8)
%12 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 9)
%13 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 10)
%14 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 11)
%15 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 12)
%16 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 13)
%17 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 14)
%18 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 15)
%19 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 16)
%20 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 17)
%21 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 18)
%22 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 19)
%23 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 20)
%24 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 21)
%25 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 22)
%26 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 23)
%27 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 24)
%28 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 25)
%29 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 26)
%30 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 27)
%31 = tail call i32 @refreshDungeonCell(i16 signext %2, i16 signext 28)
%32 = add nuw nsw i16 %2, 1
%33 = icmp eq i16 %32, 79
br i1 %33, label %34, label %1
34: ; preds = %1
ret void
}