#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 strobe(int strobeSpeed, int rPin, int gPin, int bPin) {
  for (int strobeValue = 0; strobeValue < 255; strobeValue += strobeSpeed) {
    analogWrite(rPin, strobeValue);
    analogWrite(gPin, strobeValue);
    analogWrite(bPin, strobeValue);
    delay(50);
  }
  for (int strobeValue = 255; strobeValue > 0; strobeValue -= strobeSpeed) {
    analogWrite(rPin, strobeValue);
    analogWrite(gPin, strobeValue);
    analogWrite(bPin, strobeValue);
    delay(50);
  }
}


x86 assembly (clang, -O0):
<strobe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xff,-0x14(%rbp)
jge    1181 <strobe+0x61>
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <analogWrite@plt>
mov    -0xc(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <analogWrite@plt>
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <analogWrite@plt>
mov    $0x32,%edi
call   1030 <delay@plt>
mov    -0x4(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    113b <strobe+0x1b>
movl   $0xff,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    11cd <strobe+0xad>
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <analogWrite@plt>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <analogWrite@plt>
mov    -0x10(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <analogWrite@plt>
mov    $0x32,%edi
call   1030 <delay@plt>
mov    -0x4(%rbp),%ecx
mov    -0x18(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    1188 <strobe+0x68>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strobe>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%r12d
mov    %edi,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12d,%edi
mov    %ebx,%esi
call   1040 <analogWrite@plt>
mov    %r15d,%edi
mov    %ebx,%esi
call   1040 <analogWrite@plt>
mov    %r14d,%edi
mov    %ebx,%esi
call   1040 <analogWrite@plt>
mov    $0x32,%edi
call   1030 <delay@plt>
add    %ebp,%ebx
cmp    $0xff,%ebx
jl     1140 <strobe+0x20>
mov    $0xff,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %ebx,%esi
call   1040 <analogWrite@plt>
mov    %r15d,%edi
mov    %ebx,%esi
call   1040 <analogWrite@plt>
mov    %r14d,%edi
mov    %ebx,%esi
call   1040 <analogWrite@plt>
mov    $0x32,%edi
call   1030 <delay@plt>
sub    %ebp,%ebx
test   %ebx,%ebx
jg     1180 <strobe+0x60>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @strobe(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
br label %11
11: ; preds = %25, %4
%12 = load i32, i32* %9
%13 = icmp slt i32 %12, 255
br i1 %13, label %14, label %29
14: ; preds = %11
%15 = load i32, i32* %6
%16 = load i32, i32* %9
%17 = call i32 @analogWrite(i32 %15, i32 %16)
%18 = load i32, i32* %7
%19 = load i32, i32* %9
%20 = call i32 @analogWrite(i32 %18, i32 %19)
%21 = load i32, i32* %8
%22 = load i32, i32* %9
%23 = call i32 @analogWrite(i32 %21, i32 %22)
%24 = call i32 @delay(i32 50)
br label %25
25: ; preds = %14
%26 = load i32, i32* %5
%27 = load i32, i32* %9
%28 = add nsw i32 %27, %26
store i32 %28, i32* %9
br label %11
29: ; preds = %11
store i32 255, i32* %10
br label %30
30: ; preds = %44, %29
%31 = load i32, i32* %10
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %48
33: ; preds = %30
%34 = load i32, i32* %6
%35 = load i32, i32* %10
%36 = call i32 @analogWrite(i32 %34, i32 %35)
%37 = load i32, i32* %7
%38 = load i32, i32* %10
%39 = call i32 @analogWrite(i32 %37, i32 %38)
%40 = load i32, i32* %8
%41 = load i32, i32* %10
%42 = call i32 @analogWrite(i32 %40, i32 %41)
%43 = call i32 @delay(i32 50)
br label %44
44: ; preds = %33
%45 = load i32, i32* %5
%46 = load i32, i32* %10
%47 = sub nsw i32 %46, %45
store i32 %47, i32* %10
br label %30
48: ; preds = %30
ret void
}

LLVM IR (-O2):
define void @strobe(i32 %0, i32 %1, i32 %2, i32 %3) {
br label %5
5: ; preds = %4, %5
%6 = phi i32 [ 0, %4 ], [ %11, %5 ]
%7 = tail call i32 @analogWrite(i32 %1, i32 %6)
%8 = tail call i32 @analogWrite(i32 %2, i32 %6)
%9 = tail call i32 @analogWrite(i32 %3, i32 %6)
%10 = tail call i32 @delay(i32 50)
%11 = add nsw i32 %6, %0
%12 = icmp slt i32 %11, 255
br i1 %12, label %5, label %14
13: ; preds = %14
ret void
14: ; preds = %5, %14
%15 = phi i32 [ %20, %14 ], [ 255, %5 ]
%16 = tail call i32 @analogWrite(i32 %1, i32 %15)
%17 = tail call i32 @analogWrite(i32 %2, i32 %15)
%18 = tail call i32 @analogWrite(i32 %3, i32 %15)
%19 = tail call i32 @delay(i32 50)
%20 = sub nsw i32 %15, %0
%21 = icmp sgt i32 %20, 0
br i1 %21, label %14, label %13
}