#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*/ delay_ms(int);
int /*<<< orphan*/ fill(int);
void blinky() {
  int a;
  fill(0x00);
  delay_ms(2000);
  for (a = 0; a < 3; a++) {
    fill(0xff);
    delay_ms(50);
    fill(0x00);
    delay_ms(1500);
    fill(0xff);
    delay_ms(30);
    fill(0x00);
    delay_ms(7000);
  }
}


x86 assembly (clang, -O0):
<blinky>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x7d0,%edi
call   1040 <delay_ms@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    11a2 <blinky+0x82>
mov    $0xff,%edi
call   1030 <fill@plt>
mov    $0x32,%edi
call   1040 <delay_ms@plt>
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x5dc,%edi
call   1040 <delay_ms@plt>
mov    $0xff,%edi
call   1030 <fill@plt>
mov    $0x1e,%edi
call   1040 <delay_ms@plt>
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x1b58,%edi
call   1040 <delay_ms@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <blinky+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blinky>:
push   %rax
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x7d0,%edi
call   1040 <delay_ms@plt>
mov    $0xff,%edi
call   1030 <fill@plt>
mov    $0x32,%edi
call   1040 <delay_ms@plt>
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x5dc,%edi
call   1040 <delay_ms@plt>
mov    $0xff,%edi
call   1030 <fill@plt>
mov    $0x1e,%edi
call   1040 <delay_ms@plt>
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x1b58,%edi
call   1040 <delay_ms@plt>
mov    $0xff,%edi
call   1030 <fill@plt>
mov    $0x32,%edi
call   1040 <delay_ms@plt>
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x5dc,%edi
call   1040 <delay_ms@plt>
mov    $0xff,%edi
call   1030 <fill@plt>
mov    $0x1e,%edi
call   1040 <delay_ms@plt>
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x1b58,%edi
call   1040 <delay_ms@plt>
mov    $0xff,%edi
call   1030 <fill@plt>
mov    $0x32,%edi
call   1040 <delay_ms@plt>
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x5dc,%edi
call   1040 <delay_ms@plt>
mov    $0xff,%edi
call   1030 <fill@plt>
mov    $0x1e,%edi
call   1040 <delay_ms@plt>
xor    %edi,%edi
call   1030 <fill@plt>
mov    $0x1b58,%edi
pop    %rax
jmp    1040 <delay_ms@plt>

LLVM IR (-O0):
define void @blinky() {
%1 = alloca i32
%2 = call i32 @fill(i32 0)
%3 = call i32 @delay_ms(i32 2000)
store i32 0, i32* %1
br label %4
4: ; preds = %16, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = call i32 @fill(i32 255)
%9 = call i32 @delay_ms(i32 50)
%10 = call i32 @fill(i32 0)
%11 = call i32 @delay_ms(i32 1500)
%12 = call i32 @fill(i32 255)
%13 = call i32 @delay_ms(i32 30)
%14 = call i32 @fill(i32 0)
%15 = call i32 @delay_ms(i32 7000)
br label %16
16: ; preds = %7
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %4
19: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @blinky() {
%1 = tail call i32 @fill(i32 0)
%2 = tail call i32 @delay_ms(i32 2000)
%3 = tail call i32 @fill(i32 255)
%4 = tail call i32 @delay_ms(i32 50)
%5 = tail call i32 @fill(i32 0)
%6 = tail call i32 @delay_ms(i32 1500)
%7 = tail call i32 @fill(i32 255)
%8 = tail call i32 @delay_ms(i32 30)
%9 = tail call i32 @fill(i32 0)
%10 = tail call i32 @delay_ms(i32 7000)
%11 = tail call i32 @fill(i32 255)
%12 = tail call i32 @delay_ms(i32 50)
%13 = tail call i32 @fill(i32 0)
%14 = tail call i32 @delay_ms(i32 1500)
%15 = tail call i32 @fill(i32 255)
%16 = tail call i32 @delay_ms(i32 30)
%17 = tail call i32 @fill(i32 0)
%18 = tail call i32 @delay_ms(i32 7000)
%19 = tail call i32 @fill(i32 255)
%20 = tail call i32 @delay_ms(i32 50)
%21 = tail call i32 @fill(i32 0)
%22 = tail call i32 @delay_ms(i32 1500)
%23 = tail call i32 @fill(i32 255)
%24 = tail call i32 @delay_ms(i32 30)
%25 = tail call i32 @fill(i32 0)
%26 = tail call i32 @delay_ms(i32 7000)
ret void
}