#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int,
                           int /*<<< orphan*/, int, int, int);
int dumpDisabledLed(FILE *fp, int count, int ledCount) {
  int i;
  for (i = 0; i < count; i++, ledCount++)
    fprintf(fp, "%7d %7d %9d %8d %9d\n", ledCount, 0, 1, 1, 1);
  return ledCount++;
}


x86 assembly (clang, -O0):
<dumpDisabledLed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1171 <dumpDisabledLed+0x61>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
lea    0xebd(%rip),%rsi
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
movl   $0x1,(%rsp)
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1129 <dumpDisabledLed+0x19>
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x10(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpDisabledLed>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
test   %esi,%esi
jle    115a <dumpDisabledLed+0x4a>
mov    %esi,%ebp
mov    %rdi,%r14
lea    0xed7(%rip),%r15
nopl   0x0(%rax)
movl   $0x1,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1030 <fprintf@plt>
add    $0x1,%ebx
add    $0xffffffff,%ebp
jne    1130 <dumpDisabledLed+0x20>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"%7d %7d %9d %8d %9d\0A\00"
define i32 @dumpDisabledLed(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %16, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %14, i32 0, i32 1, i32 1, i32 1)
br label %16
16: ; preds = %12
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 1
store i32 %18, i32* %7
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %8
21: ; preds = %8
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
ret i32 %22
}

LLVM IR (-O2):
@.str = [21 x i8] c"%7d %7d %9d %8d %9d\0A\00"
define i32 @dumpDisabledLed(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ 0, %3 ]
%7 = phi i32 [ %10, %5 ], [ %2, %3 ]
%8 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7, i32 0, i32 1, i32 1, i32 1)
%9 = add nuw nsw i32 %6, 1
%10 = add nsw i32 %7, 1
%11 = icmp eq i32 %9, %1
br i1 %11, label %12, label %5
12: ; preds = %5, %3
%13 = phi i32 [ %2, %3 ], [ %10, %5 ]
ret i32 %13
}