#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*/ dump_sector(int, int, int);
int main(void) {
  int c, h, s;
  for (c = 0; c < 80; c++)
    for (h = 0; h < 2; h++)
      for (s = 1; s < 6; s++)
        dump_sector(c, h, s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x50,-0x8(%rbp)
jge    1194 <main+0x84>
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1181 <main+0x71>
movl   $0x1,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    116e <main+0x5e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <dump_sector@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <main+0x38>
jmp    1173 <main+0x63>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    1186 <main+0x76>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <dump_sector@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <dump_sector@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <dump_sector@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <dump_sector@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x5,%edx
call   1030 <dump_sector@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <dump_sector@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <dump_sector@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <dump_sector@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x4,%edx
call   1030 <dump_sector@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x5,%edx
call   1030 <dump_sector@plt>
add    $0x1,%ebx
cmp    $0x50,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %29, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 80
br i1 %7, label %8, label %32
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %25, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 2
br i1 %11, label %12, label %28
12: ; preds = %9
store i32 1, i32* %4
br label %13
13: ; preds = %21, %12
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 6
br i1 %15, label %16, label %24
16: ; preds = %13
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = call i32 @dump_sector(i32 %17, i32 %18, i32 %19)
br label %21
21: ; preds = %16
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %13
24: ; preds = %13
br label %25
25: ; preds = %24
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %9
28: ; preds = %9
br label %29
29: ; preds = %28
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %5
32: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %13, %1 ]
%3 = tail call i32 @dump_sector(i32 %2, i32 0, i32 1)
%4 = tail call i32 @dump_sector(i32 %2, i32 0, i32 2)
%5 = tail call i32 @dump_sector(i32 %2, i32 0, i32 3)
%6 = tail call i32 @dump_sector(i32 %2, i32 0, i32 4)
%7 = tail call i32 @dump_sector(i32 %2, i32 0, i32 5)
%8 = tail call i32 @dump_sector(i32 %2, i32 1, i32 1)
%9 = tail call i32 @dump_sector(i32 %2, i32 1, i32 2)
%10 = tail call i32 @dump_sector(i32 %2, i32 1, i32 3)
%11 = tail call i32 @dump_sector(i32 %2, i32 1, i32 4)
%12 = tail call i32 @dump_sector(i32 %2, i32 1, i32 5)
%13 = add nuw nsw i32 %2, 1
%14 = icmp eq i32 %13, 80
br i1 %14, label %15, label %1
15: ; preds = %1
ret i32 0
}