#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*/ fill_plasma(void *, int const, int const, long const,
                               int const, int const, int const);
int /*<<< orphan*/ init_tables();
void render_plasma(void *pixels, const int width, const int height,
                   const long time_ms, const int touchX, const int touchY,
                   const int radius) {
  static int init;
  if (!init) {
    init_tables();
    init = 1;
  }
  fill_plasma(pixels, width, height, time_ms, touchX, touchY, radius);
}


x86 assembly (clang, -O0):
<render_plasma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
cmpl   $0x0,0x2eec(%rip)
jne    115f <render_plasma+0x3f>
mov    $0x0,%al
call   1040 <init_tables@plt>
movl   $0x1,0x2ed5(%rip)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <fill_plasma@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<render_plasma>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %rcx,%r12
mov    %edx,%r13d
mov    %esi,%ebx
mov    %rdi,%rbp
cmpb   $0x0,0x2ef1(%rip)
jne    1153 <render_plasma+0x33>
xor    %eax,%eax
call   1040 <init_tables@plt>
movb   $0x1,0x2ee1(%rip)
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r13d,%edx
mov    %r12,%rcx
mov    %r15d,%r8d
mov    %r14d,%r9d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fill_plasma@plt>

LLVM IR (-O0):
@render_plasma.init = internal global i32 0
define void @render_plasma(i8* %0, i32 %1, i32 %2, i64 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i64 %3, i64* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* @render_plasma.init
%16 = icmp ne i32 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %7
%18 = call i32 (...) @init_tables()
store i32 1, i32* @render_plasma.init
br label %19
19: ; preds = %17, %7
%20 = load i8*, i8** %8
%21 = load i32, i32* %9
%22 = load i32, i32* %10
%23 = load i64, i64* %11
%24 = load i32, i32* %12
%25 = load i32, i32* %13
%26 = load i32, i32* %14
%27 = call i32 @fill_plasma(i8* %20, i32 %21, i32 %22, i64 %23, i32 %24, i32 %25, i32 %26)
ret void
}

LLVM IR (-O2):
@render_plasma.init = internal unnamed_addr global i1 false
define void @render_plasma(i8* %0, i32 %1, i32 %2, i64 %3, i32 %4, i32 %5, i32 %6) {
%8 = load i1, i1* @render_plasma.init
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 (...) @init_tables()
store i1 true, i1* @render_plasma.init
br label %11
11: ; preds = %9, %7
%12 = tail call i32 @fill_plasma(i8* %0, i32 %1, i32 %2, i64 %3, i32 %4, i32 %5, i32 %6)
ret void
}