#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_D5();
void Ping() {
  int x;
  init_LED_D5();
  for (;;) {
    enable_LED(0x40);
    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):
<Ping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <init_LED_D5@plt>
mov    $0x40,%edi
call   1050 <enable_LED@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7d00,-0x4(%rbp)
jge    1180 <Ping+0x40>
jmp    1172 <Ping+0x32>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <Ping+0x20>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7d00,-0x4(%rbp)
jge    11a7 <Ping+0x67>
jmp    1199 <Ping+0x59>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1187 <Ping+0x47>
movl   $0x0,-0x4(%rbp)
cmpl   $0x7d00,-0x4(%rbp)
jge    11ce <Ping+0x8e>
jmp    11c0 <Ping+0x80>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11ae <Ping+0x6e>
mov    $0x0,%al
call   1060 <disable_LEDs@plt>
mov    $0x0,%al
call   1030 <Task_Next@plt>
jmp    114f <Ping+0xf>

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

LLVM IR (-O0):
define void @Ping() {
%1 = alloca i32
%2 = call i32 (...) @init_LED_D5()
br label %3
3: ; preds = %28, %0
%4 = call i32 @enable_LED(i32 64)
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 @Ping() {
%1 = tail call i32 (...) @init_LED_D5()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @enable_LED(i32 64)
%4 = tail call i32 (...) @disable_LEDs()
%5 = tail call i32 (...) @Task_Next()
br label %2
}