#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_code(int file_desc, unsigned int code, unsigned int r0,
                          unsigned int r1, unsigned int r2, unsigned int r3,
                          unsigned int r4, unsigned int r5) {
  int i = 0;
  unsigned int p[32];
  p[i++] = 0;
  p[i++] = 0x00000000;
  p[i++] = 0x30010;
  p[i++] = 28;
  p[i++] = 28;
  p[i++] = code;
  p[i++] = r0;
  p[i++] = r1;
  p[i++] = r2;
  p[i++] = r3;
  p[i++] = r4;
  p[i++] = r5;
  p[i++] = 0x00000000;
  p[0] = i * sizeof *p;
  mbox_property(file_desc, p);
  return p[5];
}


x86 assembly (clang, -O0):
<execute_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x18(%rbp),%eax
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)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movl   $0x0,-0xa0(%rbp,%rax,4)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movl   $0x0,-0xa0(%rbp,%rax,4)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movl   $0x30010,-0xa0(%rbp,%rax,4)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movl   $0x1c,-0xa0(%rbp,%rax,4)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movl   $0x1c,-0xa0(%rbp,%rax,4)
mov    -0x8(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1c(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0xc(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1c(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x10(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1c(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x14(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1c(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1c(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    0x10(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1c(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    0x18(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1c(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
cltq
movl   $0x0,-0xa0(%rbp,%rax,4)
movslq -0x1c(%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_code>:
sub    $0x88,%rsp
mov    0x98(%rsp),%r10d
mov    0x90(%rsp),%eax
movl   $0x1c,0x10(%rsp)
mov    %esi,0x14(%rsp)
mov    %edx,0x18(%rsp)
mov    %ecx,0x1c(%rsp)
mov    %r8d,0x20(%rsp)
mov    %r9d,0x24(%rsp)
mov    %eax,0x28(%rsp)
mov    %r10d,0x2c(%rsp)
movl   $0x0,0x30(%rsp)
movaps 0xea4(%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_code(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca [32 x i32]
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
store i32 0, i32* %17
%19 = load i32, i32* %17
%20 = add nsw i32 %19, 1
store i32 %20, i32* %17
%21 = sext i32 %19 to i64
%22 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %21
store i32 0, i32* %22
%23 = load i32, i32* %17
%24 = add nsw i32 %23, 1
store i32 %24, i32* %17
%25 = sext i32 %23 to i64
%26 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %25
store i32 0, i32* %26
%27 = load i32, i32* %17
%28 = add nsw i32 %27, 1
store i32 %28, i32* %17
%29 = sext i32 %27 to i64
%30 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %29
store i32 196624, i32* %30
%31 = load i32, i32* %17
%32 = add nsw i32 %31, 1
store i32 %32, i32* %17
%33 = sext i32 %31 to i64
%34 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %33
store i32 28, i32* %34
%35 = load i32, i32* %17
%36 = add nsw i32 %35, 1
store i32 %36, i32* %17
%37 = sext i32 %35 to i64
%38 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %37
store i32 28, i32* %38
%39 = load i32, i32* %10
%40 = load i32, i32* %17
%41 = add nsw i32 %40, 1
store i32 %41, i32* %17
%42 = sext i32 %40 to i64
%43 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %42
store i32 %39, i32* %43
%44 = load i32, i32* %11
%45 = load i32, i32* %17
%46 = add nsw i32 %45, 1
store i32 %46, i32* %17
%47 = sext i32 %45 to i64
%48 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %47
store i32 %44, i32* %48
%49 = load i32, i32* %12
%50 = load i32, i32* %17
%51 = add nsw i32 %50, 1
store i32 %51, i32* %17
%52 = sext i32 %50 to i64
%53 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %52
store i32 %49, i32* %53
%54 = load i32, i32* %13
%55 = load i32, i32* %17
%56 = add nsw i32 %55, 1
store i32 %56, i32* %17
%57 = sext i32 %55 to i64
%58 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %57
store i32 %54, i32* %58
%59 = load i32, i32* %14
%60 = load i32, i32* %17
%61 = add nsw i32 %60, 1
store i32 %61, i32* %17
%62 = sext i32 %60 to i64
%63 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %62
store i32 %59, i32* %63
%64 = load i32, i32* %15
%65 = load i32, i32* %17
%66 = add nsw i32 %65, 1
store i32 %66, i32* %17
%67 = sext i32 %65 to i64
%68 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %67
store i32 %64, i32* %68
%69 = load i32, i32* %16
%70 = load i32, i32* %17
%71 = add nsw i32 %70, 1
store i32 %71, i32* %17
%72 = sext i32 %70 to i64
%73 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %72
store i32 %69, i32* %73
%74 = load i32, i32* %17
%75 = add nsw i32 %74, 1
store i32 %75, i32* %17
%76 = sext i32 %74 to i64
%77 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 %76
store i32 0, i32* %77
%78 = load i32, i32* %17
%79 = sext i32 %78 to i64
%80 = mul i64 %79, 4
%81 = trunc i64 %80 to i32
%82 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 0
store i32 %81, i32* %82
%83 = load i32, i32* %9
%84 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 0
%85 = call i32 @mbox_property(i32 %83, i32* %84)
%86 = getelementptr inbounds [32 x i32], [32 x i32]* %18, i64 0, i64 5
%87 = load i32, i32* %86
ret i32 %87
}

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