#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*/ analogWrite(int, int);
int /*<<< orphan*/ delay(int);
void flash(int interval, int rPin, int gPin, int bPin) {
  analogWrite(rPin, 255);
  analogWrite(gPin, 0);
  analogWrite(bPin, 0);
  delay(interval);
  analogWrite(rPin, 0);
  analogWrite(gPin, 255);
  analogWrite(bPin, 0);
  delay(interval);
  analogWrite(rPin, 0);
  analogWrite(gPin, 0);
  analogWrite(bPin, 255);
  delay(interval);
  analogWrite(rPin, 255);
  analogWrite(gPin, 255);
  analogWrite(bPin, 0);
  delay(interval);
  analogWrite(rPin, 255);
  analogWrite(gPin, 0);
  analogWrite(bPin, 255);
  delay(interval);
  analogWrite(rPin, 0);
  analogWrite(gPin, 255);
  analogWrite(bPin, 255);
  delay(interval);
  analogWrite(rPin, 255);
  analogWrite(gPin, 255);
  analogWrite(bPin, 255);
  delay(interval);
}


x86 assembly (clang, -O0):
<flash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    -0x10(%rbp),%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    -0x4(%rbp),%edi
call   1030 <delay@plt>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    -0xc(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0x10(%rbp),%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    -0x4(%rbp),%edi
call   1030 <delay@plt>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    -0x10(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0x4(%rbp),%edi
call   1030 <delay@plt>
mov    -0x8(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0xc(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0x10(%rbp),%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    -0x4(%rbp),%edi
call   1030 <delay@plt>
mov    -0x8(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    -0x10(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0x4(%rbp),%edi
call   1030 <delay@plt>
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    -0xc(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0x10(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0x4(%rbp),%edi
call   1030 <delay@plt>
mov    -0x8(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0xc(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0x10(%rbp),%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    -0x4(%rbp),%edi
call   1030 <delay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flash>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
mov    %esi,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    %r15d,%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    %r14d,%edi
call   1030 <delay@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    %ebx,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %r15d,%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    %r14d,%edi
call   1030 <delay@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    %r15d,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %r14d,%edi
call   1030 <delay@plt>
mov    %ebp,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %ebx,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %r15d,%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    %r14d,%edi
call   1030 <delay@plt>
mov    %ebp,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    %r15d,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %r14d,%edi
call   1030 <delay@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1040 <analogWrite@plt>
mov    %ebx,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %r15d,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %r14d,%edi
call   1030 <delay@plt>
mov    %ebp,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %ebx,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %r15d,%edi
mov    $0xff,%esi
call   1040 <analogWrite@plt>
mov    %r14d,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @flash(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = call i32 @analogWrite(i32 %9, i32 255)
%11 = load i32, i32* %7
%12 = call i32 @analogWrite(i32 %11, i32 0)
%13 = load i32, i32* %8
%14 = call i32 @analogWrite(i32 %13, i32 0)
%15 = load i32, i32* %5
%16 = call i32 @delay(i32 %15)
%17 = load i32, i32* %6
%18 = call i32 @analogWrite(i32 %17, i32 0)
%19 = load i32, i32* %7
%20 = call i32 @analogWrite(i32 %19, i32 255)
%21 = load i32, i32* %8
%22 = call i32 @analogWrite(i32 %21, i32 0)
%23 = load i32, i32* %5
%24 = call i32 @delay(i32 %23)
%25 = load i32, i32* %6
%26 = call i32 @analogWrite(i32 %25, i32 0)
%27 = load i32, i32* %7
%28 = call i32 @analogWrite(i32 %27, i32 0)
%29 = load i32, i32* %8
%30 = call i32 @analogWrite(i32 %29, i32 255)
%31 = load i32, i32* %5
%32 = call i32 @delay(i32 %31)
%33 = load i32, i32* %6
%34 = call i32 @analogWrite(i32 %33, i32 255)
%35 = load i32, i32* %7
%36 = call i32 @analogWrite(i32 %35, i32 255)
%37 = load i32, i32* %8
%38 = call i32 @analogWrite(i32 %37, i32 0)
%39 = load i32, i32* %5
%40 = call i32 @delay(i32 %39)
%41 = load i32, i32* %6
%42 = call i32 @analogWrite(i32 %41, i32 255)
%43 = load i32, i32* %7
%44 = call i32 @analogWrite(i32 %43, i32 0)
%45 = load i32, i32* %8
%46 = call i32 @analogWrite(i32 %45, i32 255)
%47 = load i32, i32* %5
%48 = call i32 @delay(i32 %47)
%49 = load i32, i32* %6
%50 = call i32 @analogWrite(i32 %49, i32 0)
%51 = load i32, i32* %7
%52 = call i32 @analogWrite(i32 %51, i32 255)
%53 = load i32, i32* %8
%54 = call i32 @analogWrite(i32 %53, i32 255)
%55 = load i32, i32* %5
%56 = call i32 @delay(i32 %55)
%57 = load i32, i32* %6
%58 = call i32 @analogWrite(i32 %57, i32 255)
%59 = load i32, i32* %7
%60 = call i32 @analogWrite(i32 %59, i32 255)
%61 = load i32, i32* %8
%62 = call i32 @analogWrite(i32 %61, i32 255)
%63 = load i32, i32* %5
%64 = call i32 @delay(i32 %63)
ret void
}

LLVM IR (-O2):
define void @flash(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @analogWrite(i32 %1, i32 255)
%6 = tail call i32 @analogWrite(i32 %2, i32 0)
%7 = tail call i32 @analogWrite(i32 %3, i32 0)
%8 = tail call i32 @delay(i32 %0)
%9 = tail call i32 @analogWrite(i32 %1, i32 0)
%10 = tail call i32 @analogWrite(i32 %2, i32 255)
%11 = tail call i32 @analogWrite(i32 %3, i32 0)
%12 = tail call i32 @delay(i32 %0)
%13 = tail call i32 @analogWrite(i32 %1, i32 0)
%14 = tail call i32 @analogWrite(i32 %2, i32 0)
%15 = tail call i32 @analogWrite(i32 %3, i32 255)
%16 = tail call i32 @delay(i32 %0)
%17 = tail call i32 @analogWrite(i32 %1, i32 255)
%18 = tail call i32 @analogWrite(i32 %2, i32 255)
%19 = tail call i32 @analogWrite(i32 %3, i32 0)
%20 = tail call i32 @delay(i32 %0)
%21 = tail call i32 @analogWrite(i32 %1, i32 255)
%22 = tail call i32 @analogWrite(i32 %2, i32 0)
%23 = tail call i32 @analogWrite(i32 %3, i32 255)
%24 = tail call i32 @delay(i32 %0)
%25 = tail call i32 @analogWrite(i32 %1, i32 0)
%26 = tail call i32 @analogWrite(i32 %2, i32 255)
%27 = tail call i32 @analogWrite(i32 %3, i32 255)
%28 = tail call i32 @delay(i32 %0)
%29 = tail call i32 @analogWrite(i32 %1, i32 255)
%30 = tail call i32 @analogWrite(i32 %2, i32 255)
%31 = tail call i32 @analogWrite(i32 %3, i32 255)
%32 = tail call i32 @delay(i32 %0)
ret void
}