#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*/ beatstep_send_sysex(int /*<<< orphan*/, int, int, int);
void beatstep_set_ccbutton(int beatstep_control, int control_no) {
  beatstep_send_sysex(0, 0x01, beatstep_control, 8);
  beatstep_send_sysex(0, 0x02, beatstep_control, 0);
  beatstep_send_sysex(0, 0x03, beatstep_control, control_no);
  beatstep_send_sysex(0, 0x04, beatstep_control, 0);
  beatstep_send_sysex(0, 0x05, beatstep_control, 1);
  beatstep_send_sysex(0, 0x06, beatstep_control, 1);
}


x86 assembly (clang, -O0):
<beatstep_set_ccbutton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x8,%ecx
call   1030 <beatstep_send_sysex@plt>
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
mov    $0x2,%esi
mov    %ecx,%edi
call   1030 <beatstep_send_sysex@plt>
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <beatstep_send_sysex@plt>
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
mov    $0x4,%esi
mov    %ecx,%edi
call   1030 <beatstep_send_sysex@plt>
mov    -0x4(%rbp),%edx
xor    %edi,%edi
mov    $0x5,%esi
mov    $0x1,%ecx
call   1030 <beatstep_send_sysex@plt>
mov    -0x4(%rbp),%edx
xor    %edi,%edi
mov    $0x6,%esi
mov    $0x1,%ecx
call   1030 <beatstep_send_sysex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beatstep_set_ccbutton>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
mov    $0x1,%esi
mov    %ebx,%edx
mov    $0x8,%ecx
call   1030 <beatstep_send_sysex@plt>
xor    %edi,%edi
mov    $0x2,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
call   1030 <beatstep_send_sysex@plt>
xor    %edi,%edi
mov    $0x3,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
call   1030 <beatstep_send_sysex@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
call   1030 <beatstep_send_sysex@plt>
xor    %edi,%edi
mov    $0x5,%esi
mov    %ebx,%edx
mov    $0x1,%ecx
call   1030 <beatstep_send_sysex@plt>
xor    %edi,%edi
mov    $0x6,%esi
mov    %ebx,%edx
mov    $0x1,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <beatstep_send_sysex@plt>

LLVM IR (-O0):
define void @beatstep_set_ccbutton(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @beatstep_send_sysex(i32 0, i32 1, i32 %5, i32 8)
%7 = load i32, i32* %3
%8 = call i32 @beatstep_send_sysex(i32 0, i32 2, i32 %7, i32 0)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @beatstep_send_sysex(i32 0, i32 3, i32 %9, i32 %10)
%12 = load i32, i32* %3
%13 = call i32 @beatstep_send_sysex(i32 0, i32 4, i32 %12, i32 0)
%14 = load i32, i32* %3
%15 = call i32 @beatstep_send_sysex(i32 0, i32 5, i32 %14, i32 1)
%16 = load i32, i32* %3
%17 = call i32 @beatstep_send_sysex(i32 0, i32 6, i32 %16, i32 1)
ret void
}

LLVM IR (-O2):
define void @beatstep_set_ccbutton(i32 %0, i32 %1) {
%3 = tail call i32 @beatstep_send_sysex(i32 0, i32 1, i32 %0, i32 8)
%4 = tail call i32 @beatstep_send_sysex(i32 0, i32 2, i32 %0, i32 0)
%5 = tail call i32 @beatstep_send_sysex(i32 0, i32 3, i32 %0, i32 %1)
%6 = tail call i32 @beatstep_send_sysex(i32 0, i32 4, i32 %0, i32 0)
%7 = tail call i32 @beatstep_send_sysex(i32 0, i32 5, i32 %0, i32 1)
%8 = tail call i32 @beatstep_send_sysex(i32 0, i32 6, i32 %0, i32 1)
ret void
}