#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*/ Task_Next();
int /*<<< orphan*/ disable_LEDs();
int /*<<< orphan*/ enable_LED(int);
int /*<<< orphan*/ init_LED_D2();
void Pong() {
  int x;
  init_LED_D2();
  for (;;) {
    enable_LED(0x20);
    for (x = 0; x < 32000; ++x)
      ;
    for (x = 0; x < 32000; ++x)
      ;
    for (x = 0; x < 32000; ++x)
      ;
    disable_LEDs();
    Task_Next();
  }
}


x86 assembly (clang, -O0):
<Pong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <init_LED_D2@plt>
mov    $0x20,%edi
call   1050 <enable_LED@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7d00,-0x4(%rbp)
jge    1180 <Pong+0x40>
jmp    1172 <Pong+0x32>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <Pong+0x20>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7d00,-0x4(%rbp)
jge    11a7 <Pong+0x67>
jmp    1199 <Pong+0x59>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1187 <Pong+0x47>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7d00,-0x4(%rbp)
jge    11ce <Pong+0x8e>
jmp    11c0 <Pong+0x80>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11ae <Pong+0x6e>
mov    $0x0,%al
call   1060 <disable_LEDs@plt>
mov    $0x0,%al
call   1040 <Task_Next@plt>
jmp    114f <Pong+0xf>

x86 assembly (clang, -O2):
<Pong>:
push   %rax
xor    %eax,%eax
call   1030 <init_LED_D2@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1050 <enable_LED@plt>
xor    %eax,%eax
call   1060 <disable_LEDs@plt>
xor    %eax,%eax
call   1040 <Task_Next@plt>
jmp    1150 <Pong+0x10>

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

LLVM IR (-O2):
define void @Pong() {
%1 = tail call i32 (...) @init_LED_D2()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @enable_LED(i32 32)
%4 = tail call i32 (...) @disable_LEDs()
%5 = tail call i32 (...) @Task_Next()
br label %2
}