#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*/ mbox_property(int, unsigned int *);
unsigned int execute_qpu(int file_desc, unsigned int num_qpus,
                         unsigned int control, unsigned int noflush,
                         unsigned int timeout) {
  int i = 0;
  unsigned int p[32];
  p[i++] = 0;
  p[i++] = 0x00000000;
  p[i++] = 0x30011;
  p[i++] = 16;
  p[i++] = 16;
  p[i++] = num_qpus;
  p[i++] = control;
  p[i++] = noflush;
  p[i++] = timeout;
  p[i++] = 0x00000000;
  p[0] = i * sizeof *p;
  mbox_property(file_desc, p);
  return p[5];
}


x86 assembly (clang, -O0):
<execute_qpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
movl   $0x0,-0xa0(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
movl   $0x0,-0xa0(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
movl   $0x30011,-0xa0(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
movl   $0x10,-0xa0(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
movl   $0x10,-0xa0(%rbp,%rax,4)
mov    -0x8(%rbp),%ecx
mov    -0x18(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x18(%rbp)
cltq
movl   $0x0,-0xa0(%rbp,%rax,4)
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
mov    %eax,-0xa0(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xa0(%rbp),%rsi
call   1030 <mbox_property@plt>
mov    -0x8c(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_qpu>:
sub    $0x88,%rsp
movl   $0x10,0x10(%rsp)
mov    %esi,0x14(%rsp)
mov    %edx,0x18(%rsp)
mov    %ecx,0x1c(%rsp)
mov    %r8d,0x20(%rsp)
movl   $0x0,0x24(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
call   1030 <mbox_property@plt>
mov    0x14(%rsp),%eax
add    $0x88,%rsp
ret

LLVM IR (-O0):
define i32 @execute_qpu(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [32 x i32]
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
store i32 0, i32* %11
%13 = load i32, i32* %11
%14 = add nsw i32 %13, 1
store i32 %14, i32* %11
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %15
store i32 0, i32* %16
%17 = load i32, i32* %11
%18 = add nsw i32 %17, 1
store i32 %18, i32* %11
%19 = sext i32 %17 to i64
%20 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %19
store i32 0, i32* %20
%21 = load i32, i32* %11
%22 = add nsw i32 %21, 1
store i32 %22, i32* %11
%23 = sext i32 %21 to i64
%24 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %23
store i32 196625, i32* %24
%25 = load i32, i32* %11
%26 = add nsw i32 %25, 1
store i32 %26, i32* %11
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %27
store i32 16, i32* %28
%29 = load i32, i32* %11
%30 = add nsw i32 %29, 1
store i32 %30, i32* %11
%31 = sext i32 %29 to i64
%32 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %31
store i32 16, i32* %32
%33 = load i32, i32* %7
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
%36 = sext i32 %34 to i64
%37 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %36
store i32 %33, i32* %37
%38 = load i32, i32* %8
%39 = load i32, i32* %11
%40 = add nsw i32 %39, 1
store i32 %40, i32* %11
%41 = sext i32 %39 to i64
%42 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %41
store i32 %38, i32* %42
%43 = load i32, i32* %9
%44 = load i32, i32* %11
%45 = add nsw i32 %44, 1
store i32 %45, i32* %11
%46 = sext i32 %44 to i64
%47 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %46
store i32 %43, i32* %47
%48 = load i32, i32* %10
%49 = load i32, i32* %11
%50 = add nsw i32 %49, 1
store i32 %50, i32* %11
%51 = sext i32 %49 to i64
%52 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %51
store i32 %48, i32* %52
%53 = load i32, i32* %11
%54 = add nsw i32 %53, 1
store i32 %54, i32* %11
%55 = sext i32 %53 to i64
%56 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 %55
store i32 0, i32* %56
%57 = load i32, i32* %11
%58 = sext i32 %57 to i64
%59 = mul i64 %58, 4
%60 = trunc i64 %59 to i32
%61 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 0
store i32 %60, i32* %61
%62 = load i32, i32* %6
%63 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 0
%64 = call i32 @mbox_property(i32 %62, i32* %63)
%65 = getelementptr inbounds [32 x i32], [32 x i32]* %12, i64 0, i64 5
%66 = load i32, i32* %65
ret i32 %66
}

LLVM IR (-O2):
define i32 @execute_qpu(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [32 x i32]
%7 = bitcast [32 x i32]* %6 to i8*
%8 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 0
%9 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 4
store i32 16, i32* %9
%10 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 5
store i32 %1, i32* %10
%11 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 6
store i32 %2, i32* %11
%12 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 7
store i32 %3, i32* %12
%13 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 8
store i32 %4, i32* %13
%14 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 9
store i32 0, i32* %14
%15 = bitcast [32 x i32]* %6 to <4 x i32>*
store <4 x i32> <i32 40, i32 0, i32 196625, i32 16>, <4 x i32>* %15
%16 = call i32 @mbox_property(i32 %0, i32* %8)
%17 = load i32, i32* %10
ret i32 %17
}