#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*/ send_one_midiled(int, int);
void korgnano_func_reset(void) {
  int j, i;
  for (j = 0x30; j < 0x50; j += 0x10) {
    for (i = 0; i < 8; i++) {
      send_one_midiled(i + j, 0x00);
    }
  }
}


x86 assembly (clang, -O0):
<korgnano_func_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x30,-0x4(%rbp)
cmpl   $0x50,-0x4(%rbp)
jge    1168 <korgnano_func_reset+0x58>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1155 <korgnano_func_reset+0x45>
mov    -0x8(%rbp),%edi
add    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <korgnano_func_reset+0x20>
jmp    115a <korgnano_func_reset+0x4a>
mov    -0x4(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <korgnano_func_reset+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<korgnano_func_reset>:
push   %rax
mov    $0x30,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x31,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x32,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x33,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x34,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x35,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x36,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x37,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x40,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x41,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x42,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x43,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x44,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x45,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x46,%edi
xor    %esi,%esi
call   1030 <send_one_midiled@plt>
mov    $0x47,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <send_one_midiled@plt>

LLVM IR (-O0):
define void @korgnano_func_reset() {
%1 = alloca i32
%2 = alloca i32
store i32 48, i32* %1
br label %3
3: ; preds = %19, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 80
br i1 %5, label %6, label %22
6: ; preds = %3
store i32 0, i32* %2
br label %7
7: ; preds = %15, %6
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 8
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = load i32, i32* %2
%12 = load i32, i32* %1
%13 = add nsw i32 %11, %12
%14 = call i32 @send_one_midiled(i32 %13, i32 0)
br label %15
15: ; preds = %10
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %7
18: ; preds = %7
br label %19
19: ; preds = %18
%20 = load i32, i32* %1
%21 = add nsw i32 %20, 16
store i32 %21, i32* %1
br label %3
22: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @korgnano_func_reset() {
%1 = tail call i32 @send_one_midiled(i32 48, i32 0)
%2 = tail call i32 @send_one_midiled(i32 49, i32 0)
%3 = tail call i32 @send_one_midiled(i32 50, i32 0)
%4 = tail call i32 @send_one_midiled(i32 51, i32 0)
%5 = tail call i32 @send_one_midiled(i32 52, i32 0)
%6 = tail call i32 @send_one_midiled(i32 53, i32 0)
%7 = tail call i32 @send_one_midiled(i32 54, i32 0)
%8 = tail call i32 @send_one_midiled(i32 55, i32 0)
%9 = tail call i32 @send_one_midiled(i32 64, i32 0)
%10 = tail call i32 @send_one_midiled(i32 65, i32 0)
%11 = tail call i32 @send_one_midiled(i32 66, i32 0)
%12 = tail call i32 @send_one_midiled(i32 67, i32 0)
%13 = tail call i32 @send_one_midiled(i32 68, i32 0)
%14 = tail call i32 @send_one_midiled(i32 69, i32 0)
%15 = tail call i32 @send_one_midiled(i32 70, i32 0)
%16 = tail call i32 @send_one_midiled(i32 71, i32 0)
ret void
}