void sgg_settasklocallevel(const int task, const int local, const int global,
                           const int inner) {
  static struct {
    int cmd, opt, data[6];
    int eoc;
  } command = {0x0020, 0x80000000 + 6, 0x1245, 0x0108, 0, 0, 0, 0, 0x0000};
  command.data[2] = task;
  command.data[3] = local;
  command.data[4] = global;
  command.data[5] = inner;
  sgg_execcmd(&command);
  return;
}


x86 assembly (clang, -O0):
<sgg_settasklocallevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,0x2f0b(%rip)
mov    -0x8(%rbp),%eax
mov    %eax,0x2f06(%rip)
mov    -0xc(%rbp),%eax
mov    %eax,0x2f01(%rip)
mov    -0x10(%rbp),%eax
mov    %eax,0x2efc(%rip)
lea    0x2ed9(%rip),%rdi
mov    $0x0,%al
call   1030 <sgg_execcmd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgg_settasklocallevel>:
mov    %edi,0x2f22(%rip)
lea    0x2f0b(%rip),%rdi
mov    %esi,0x2f19(%rip)
mov    %edx,0x2f17(%rip)
mov    %ecx,0x2f15(%rip)
xor    %eax,%eax
jmp    1030 <sgg_execcmd@plt>

LLVM IR (-O0):
%struct.anon = type { i32, i32, [6 x i32], i32 }
@sgg_settasklocallevel.command = internal global %struct.anon { i32 32, i32 -2147483642, [6 x i32] [i32 4677, i32 264, i32 0, i32 0, i32 0, i32 0], i32 0 }
define void @sgg_settasklocallevel(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
store i32 %9, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_settasklocallevel.command, i32 0, i32 2, i64 2)
%10 = load i32, i32* %6
store i32 %10, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_settasklocallevel.command, i32 0, i32 2, i64 3)
%11 = load i32, i32* %7
store i32 %11, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_settasklocallevel.command, i32 0, i32 2, i64 4)
%12 = load i32, i32* %8
store i32 %12, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_settasklocallevel.command, i32 0, i32 2, i64 5)
%13 = call i32 (%struct.anon*, ...) bitcast (i32 (...)* @sgg_execcmd to i32 (%struct.anon*, ...)*)(%struct.anon* @sgg_settasklocallevel.command)
ret void
}

LLVM IR (-O2):
%struct.anon = type { i32, i32, [6 x i32], i32 }
@sgg_settasklocallevel.command = internal global %struct.anon { i32 32, i32 -2147483642, [6 x i32] [i32 4677, i32 264, i32 0, i32 0, i32 0, i32 0], i32 0 }
define void @sgg_settasklocallevel(i32 %0, i32 %1, i32 %2, i32 %3) {
store i32 %0, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_settasklocallevel.command, i64 0, i32 2, i64 2)
store i32 %1, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_settasklocallevel.command, i64 0, i32 2, i64 3)
store i32 %2, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_settasklocallevel.command, i64 0, i32 2, i64 4)
store i32 %3, i32* getelementptr inbounds (%struct.anon, %struct.anon* @sgg_settasklocallevel.command, i64 0, i32 2, i64 5)
%5 = tail call i32 (%struct.anon*, ...) bitcast (i32 (...)* @sgg_execcmd to i32 (%struct.anon*, ...)*)(%struct.anon* @sgg_settasklocallevel.command)
ret void
}