#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*/ mailbox_property(int, unsigned int *);
unsigned set_overscan(int file_desc, unsigned coord[4]) {
  int i = 0;
  unsigned property[32];
  property[i++] = 0;
  property[i++] = 0x00000000;
  property[i++] = 0x0004800a;
  property[i++] = 0x00000010;
  property[i++] = 0x00000010;
  property[i++] = coord[0];
  property[i++] = coord[1];
  property[i++] = coord[2];
  property[i++] = coord[3];
  property[i++] = 0x00000000;
  property[0] = i * sizeof *property;
  mailbox_property(file_desc, property);
  coord[0] = property[5];
  coord[1] = property[6];
  coord[2] = property[7];
  coord[3] = property[8];
  return 0;
}


x86 assembly (clang, -O0):
<set_overscan>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
cltq
movl   $0x0,-0xa0(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
cltq
movl   $0x0,-0xa0(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
cltq
movl   $0x4800a,-0xa0(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
cltq
movl   $0x10,-0xa0(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
cltq
movl   $0x10,-0xa0(%rbp,%rax,4)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x14(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x14(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x14(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x14(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
cltq
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
cltq
movl   $0x0,-0xa0(%rbp,%rax,4)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,-0xa0(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xa0(%rbp),%rsi
call   1030 <mailbox_property@plt>
mov    -0x8c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x88(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x84(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x80(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_overscan>:
push   %rbx
sub    $0x80,%rsp
mov    %rsi,%rbx
movl   $0x10,0x10(%rsp)
movups (%rsi),%xmm0
movups %xmm0,0x14(%rsp)
movl   $0x0,0x24(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
call   1030 <mailbox_property@plt>
movups 0x14(%rsp),%xmm0
movups %xmm0,(%rbx)
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

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

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