#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*/ big_delay();
int /*<<< orphan*/ delay();
int /*<<< orphan*/ led_init(int);
int /*<<< orphan*/ led_off();
int /*<<< orphan*/ led_on();
void startup(void) {
  int i;
  led_init(13);
  for (;;) {
    for (i = 0; i < 5; i++) {
      led_on();
      delay();
      led_off();
      delay();
    }
    big_delay();
  }
}


x86 assembly (clang, -O0):
<startup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xd,%edi
call   1050 <led_init@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    119d <startup+0x4d>
mov    $0x0,%al
call   1070 <led_on@plt>
mov    $0x0,%al
call   1060 <delay@plt>
mov    $0x0,%al
call   1030 <led_off@plt>
mov    $0x0,%al
call   1060 <delay@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <startup+0x19>
mov    $0x0,%al
call   1040 <big_delay@plt>
jmp    1162 <startup+0x12>

x86 assembly (clang, -O2):
<startup>:
push   %rax
mov    $0xd,%edi
call   1050 <led_init@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <led_on@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1030 <led_off@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1070 <led_on@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1030 <led_off@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1070 <led_on@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1030 <led_off@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1070 <led_on@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1030 <led_off@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1070 <led_on@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1030 <led_off@plt>
xor    %eax,%eax
call   1060 <delay@plt>
xor    %eax,%eax
call   1040 <big_delay@plt>
jmp    1160 <startup+0x10>

LLVM IR (-O0):
define void @startup() {
%1 = alloca i32
%2 = call i32 @led_init(i32 13)
br label %3
3: ; preds = %15, %0
store i32 0, i32* %1
br label %4
4: ; preds = %12, %3
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = call i32 (...) @led_on()
%9 = call i32 (...) @delay()
%10 = call i32 (...) @led_off()
%11 = call i32 (...) @delay()
br label %12
12: ; preds = %7
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
store i32 %14, i32* %1
br label %4
15: ; preds = %4
%16 = call i32 (...) @big_delay()
br label %3
}

LLVM IR (-O2):
define void @startup() {
%1 = tail call i32 @led_init(i32 13)
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @led_on()
%4 = tail call i32 (...) @delay()
%5 = tail call i32 (...) @led_off()
%6 = tail call i32 (...) @delay()
%7 = tail call i32 (...) @led_on()
%8 = tail call i32 (...) @delay()
%9 = tail call i32 (...) @led_off()
%10 = tail call i32 (...) @delay()
%11 = tail call i32 (...) @led_on()
%12 = tail call i32 (...) @delay()
%13 = tail call i32 (...) @led_off()
%14 = tail call i32 (...) @delay()
%15 = tail call i32 (...) @led_on()
%16 = tail call i32 (...) @delay()
%17 = tail call i32 (...) @led_off()
%18 = tail call i32 (...) @delay()
%19 = tail call i32 (...) @led_on()
%20 = tail call i32 (...) @delay()
%21 = tail call i32 (...) @led_off()
%22 = tail call i32 (...) @delay()
%23 = tail call i32 (...) @big_delay()
br label %2
}