void sgg_debug00(const int opt, const int bytes, const int reserve,
                 const int src_ofs, const int src_sel, const int dest_ofs,
                 const int dest_sel) {
  static struct {
    int cmd, opt, bytes, reserve;
    int src_ofs, src_sel, dest_ofs, dest_sel;
    int eoc;
  } command = {0x8010, 0, 0, 0, 0, 0, 0, 0, 0x0000};
  command.opt = opt;
  command.bytes = bytes;
  command.reserve = reserve;
  command.src_ofs = src_ofs;
  command.src_sel = src_sel;
  command.dest_ofs = dest_ofs;
  command.dest_sel = dest_sel;
  sgg_execcmd(&command);
  return;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,0x2ef4(%rip)
mov    -0x8(%rbp),%eax
mov    %eax,0x2eef(%rip)
mov    -0xc(%rbp),%eax
mov    %eax,0x2eea(%rip)
mov    -0x10(%rbp),%eax
mov    %eax,0x2ee5(%rip)
mov    -0x14(%rbp),%eax
mov    %eax,0x2ee0(%rip)
mov    -0x18(%rbp),%eax
mov    %eax,0x2edb(%rip)
mov    0x10(%rbp),%eax
mov    %eax,0x2ed6(%rip)
lea    0x2eb3(%rip),%rdi
mov    $0x0,%al
call   1030 <sgg_execcmd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    0x8(%rsp),%eax
mov    %edi,0x2f12(%rip)
lea    0x2f07(%rip),%rdi
mov    %esi,0x2f09(%rip)
mov    %edx,0x2f07(%rip)
mov    %ecx,0x2f05(%rip)
mov    %r8d,0x2f02(%rip)
mov    %r9d,0x2eff(%rip)
mov    %eax,0x2efd(%rip)
xor    %eax,%eax
jmp    1030 <sgg_execcmd@plt>

LLVM IR (-O0):
%struct.anon = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
@sgg_debug00.command = internal global %struct.anon { i32 32784, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 }
define void @sgg_debug00(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
store i32 %15, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i32 0, i32 1)
%16 = load i32, i32* %9
store i32 %16, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i32 0, i32 2)
%17 = load i32, i32* %10
store i32 %17, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i32 0, i32 3)
%18 = load i32, i32* %11
store i32 %18, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i32 0, i32 4)
%19 = load i32, i32* %12
store i32 %19, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i32 0, i32 5)
%20 = load i32, i32* %13
store i32 %20, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i32 0, i32 6)
%21 = load i32, i32* %14
store i32 %21, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i32 0, i32 7)
%22 = call i32 (%struct.anon*, ...) bitcast (i32 (...)* @sgg_execcmd to i32 (%struct.anon*, ...)*)(%struct.anon* @sgg_debug00.command)
ret void
}

LLVM IR (-O2):
%struct.anon = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
@sgg_debug00.command = internal global %struct.anon { i32 32784, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 }
define void @sgg_debug00(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
store i32 %0, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i64 0, i32 1)
store i32 %1, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i64 0, i32 2)
store i32 %2, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i64 0, i32 3)
store i32 %3, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i64 0, i32 4)
store i32 %4, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i64 0, i32 5)
store i32 %5, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i64 0, i32 6)
store i32 %6, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_debug00.command, i64 0, i32 7)
%8 = tail call i32 (%struct.anon*, ...) bitcast (i32 (...)* @sgg_execcmd to i32 (%struct.anon*, ...)*)(%struct.anon* @sgg_debug00.command)
ret void
}