#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 int *get_overscan(int file_desc, unsigned int coord[4]) {
  int i = 0;
  unsigned int property[32];
  property[i++] = 0;
  property[i++] = 0x00000000;
  property[i++] = 0x0004000a;
  property[i++] = 0x00000010;
  property[i++] = 0x00000000;
  property[i++] = 0x00000000;
  property[i++] = 0x00000000;
  property[i++] = 0x00000000;
  property[i++] = 0x00000000;
  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 coord;
}


x86 assembly (clang, -O0):
<get_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   $0x4000a,-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   $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   $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   $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)
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)
mov    -0x10(%rbp),%rax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_overscan>:
push   %rbx
sub    $0x80,%rsp
mov    %rsi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x20(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
call   1030 <mailbox_property@plt>
movups 0x14(%rsp),%xmm0
movups %xmm0,(%rbx)
mov    %rbx,%rax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32* @get_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 262154, 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 0, i32* %26
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
%29 = sext i32 %27 to i64
%30 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %29
store i32 0, i32* %30
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
%33 = sext i32 %31 to i64
%34 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %33
store i32 0, i32* %34
%35 = load i32, i32* %5
%36 = add nsw i32 %35, 1
store i32 %36, i32* %5
%37 = sext i32 %35 to i64
%38 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %37
store i32 0, i32* %38
%39 = load i32, i32* %5
%40 = add nsw i32 %39, 1
store i32 %40, i32* %5
%41 = sext i32 %39 to i64
%42 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %41
store i32 0, i32* %42
%43 = load i32, i32* %5
%44 = add nsw i32 %43, 1
store i32 %44, i32* %5
%45 = sext i32 %43 to i64
%46 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 %45
store i32 0, i32* %46
%47 = load i32, i32* %5
%48 = sext i32 %47 to i64
%49 = mul i64 %48, 4
%50 = trunc i64 %49 to i32
%51 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 0
store i32 %50, i32* %51
%52 = load i32, i32* %3
%53 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 0
%54 = call i32 @mailbox_property(i32 %52, i32* %53)
%55 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 5
%56 = load i32, i32* %55
%57 = load i32*, i32** %4
%58 = getelementptr inbounds i32, i32* %57, i64 0
store i32 %56, i32* %58
%59 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 6
%60 = load i32, i32* %59
%61 = load i32*, i32** %4
%62 = getelementptr inbounds i32, i32* %61, i64 1
store i32 %60, i32* %62
%63 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 7
%64 = load i32, i32* %63
%65 = load i32*, i32** %4
%66 = getelementptr inbounds i32, i32* %65, i64 2
store i32 %64, i32* %66
%67 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 8
%68 = load i32, i32* %67
%69 = load i32*, i32** %4
%70 = getelementptr inbounds i32, i32* %69, i64 3
store i32 %68, i32* %70
%71 = load i32*, i32** %4
ret i32* %71
}

LLVM IR (-O2):
define i32* @get_overscan(i32 %0, i32* returned writeonly %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
%7 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 5
%8 = bitcast i32* %6 to i8*
%9 = bitcast [32 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 40, i32 0, i32 262154, i32 16>, <4 x i32>* %9
%10 = call i32 @mailbox_property(i32 %0, i32* %5)
%11 = bitcast i32* %7 to <4 x i32>*
%12 = load <4 x i32>, <4 x i32>* %11
%13 = bitcast i32* %1 to <4 x i32>*
store <4 x i32> %12, <4 x i32>* %13
ret i32* %1
}