#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 red_mask;
  int green_mask;
  int blue_mask;
  int map_entries;
  int bits_per_rgb;
  int /*<<< orphan*/ class;
  int /*<<< orphan*/ *ext_data;
};
typedef TYPE_1__ Visual;

/* Variables and functions */
int /*<<< orphan*/ DirectColor;
void initFakeVisual(Visual *Vis) {
  Vis->ext_data = NULL;
  Vis->class = DirectColor;
  Vis->red_mask = 0x00FF0000;
  Vis->green_mask = 0x0000FF00;
  Vis->blue_mask = 0x000000FF;
  Vis->map_entries = 256;
  Vis->bits_per_rgb = 8;
}


x86 assembly (clang, -O0):
<initFakeVisual>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,0x18(%rax)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0x8(%rbp),%rax
movl   $0xff0000,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xff00,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0xff,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x100,0xc(%rax)
mov    -0x8(%rbp),%rax
movl   $0x8,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initFakeVisual>:
movq   $0x0,0x18(%rdi)
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rdi)
movaps 0xee5(%rip),%xmm0
movups %xmm0,(%rdi)
movl   $0x8,0x10(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32, i32, i32* }
@DirectColor = global i32 0
define void @initFakeVisual(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%3 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 6
store i32* null, i32** %4
%5 = load i32, i32* @DirectColor
%6 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i32 0, i32 5
store i32 %5, i32* %7
%8 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 16711680, i32* %9
%10 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %10, i32 0, i32 1
store i32 65280, i32* %11
%12 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %12, i32 0, i32 2
store i32 255, i32* %13
%14 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %14, i32 0, i32 3
store i32 256, i32* %15
%16 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%17 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %16, i32 0, i32 4
store i32 8, i32* %17
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32, i32, i32* }
@DirectColor = global i32 0
define void @initFakeVisual(%struct.TYPE_3__* nocapture writeonly %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 6
store i32* null, i32** %2
%3 = load i32, i32* @DirectColor
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 5
store i32 %3, i32* %4
%5 = bitcast %struct.TYPE_3__* %0 to <4 x i32>*
store <4 x i32> <i32 16711680, i32 65280, i32 255, i32 256>, <4 x i32>* %5
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 4
store i32 8, i32* %6
ret void
}