#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int width;
  int height;
};
typedef TYPE_1__ XWindowAttributes;
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ RootWindow(int /*<<< orphan*/ *, int);
int XDefaultScreen(int /*<<< orphan*/ *);
int /*<<< orphan*/ XGetWindowAttributes(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/, TYPE_1__ *);
scalar_t__ iupdrvGetDisplay();
void iupdrvGetFullSize(int *width, int *height) {
  Display *display = (Display *)iupdrvGetDisplay();
  int screen = XDefaultScreen(display);
  Window root = RootWindow(display, screen);
  XWindowAttributes wa;
  XGetWindowAttributes(display, root, &wa);
  *width = wa.width;
  *height = wa.height;
}


x86 assembly (clang, -O0):
<iupdrvGetFullSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <iupdrvGetDisplay@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <XDefaultScreen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <RootWindow@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%esi
lea    -0x28(%rbp),%rdx
call   1050 <XGetWindowAttributes@plt>
mov    -0x28(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupdrvGetFullSize>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
xor    %eax,%eax
call   1060 <iupdrvGetDisplay@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <XDefaultScreen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <RootWindow@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <XGetWindowAttributes@plt>
mov    0x8(%rsp),%eax
mov    %eax,(%r15)
mov    0xc(%rsp),%eax
mov    %eax,(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
define void @iupdrvGetFullSize(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.TYPE_3__
store i32* %0, i32** %3
store i32* %1, i32** %4
%9 = call i64 (...) @iupdrvGetDisplay()
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = call i32 @XDefaultScreen(i32* %11)
store i32 %12, i32* %6
%13 = load i32*, i32** %5
%14 = load i32, i32* %6
%15 = call i32 @RootWindow(i32* %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32*, i32** %5
%17 = load i32, i32* %7
%18 = call i32 @XGetWindowAttributes(i32* %16, i32 %17, %struct.TYPE_3__* %8)
%19 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
%20 = load i32, i32* %19
%21 = load i32*, i32** %3
store i32 %20, i32* %21
%22 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 1
%23 = load i32, i32* %22
%24 = load i32*, i32** %4
store i32 %23, i32* %24
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32 }
define void @iupdrvGetFullSize(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = alloca %struct.TYPE_3__
%4 = tail call i64 (...) @iupdrvGetDisplay()
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 @XDefaultScreen(i32* %5)
%7 = tail call i32 @RootWindow(i32* %5, i32 %6)
%8 = bitcast %struct.TYPE_3__* %3 to i8*
%9 = call i32 @XGetWindowAttributes(i32* %5, i32 %7, %struct.TYPE_3__* %3)
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i64 0, i32 0
%11 = load i32, i32* %10
store i32 %11, i32* %0
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i64 0, i32 1
%13 = load i32, i32* %12
store i32 %13, i32* %1
ret void
}