#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 */
struct YsGLSLPlain2DRenderer {
  int dummy;
};

/* Variables and functions */
struct YsGLSLPlain2DRenderer *YsGLSLAllocAndInitPlain2DRenderer();
int /*<<< orphan*/
YsGLSLPlain2DDrawingCreateProgram(struct YsGLSLPlain2DRenderer *);
int /*<<< orphan*/
YsGLSLPlain2DDrawingInitializeUniform(struct YsGLSLPlain2DRenderer *);
struct YsGLSLPlain2DRenderer *YsGLSLCreatePlain2DRenderer(void) {
  struct YsGLSLPlain2DRenderer *renderer = YsGLSLAllocAndInitPlain2DRenderer();
  if (NULL != renderer) {
    YsGLSLPlain2DDrawingCreateProgram(renderer);
    YsGLSLPlain2DDrawingInitializeUniform(renderer);
  }
  return renderer;
}


x86 assembly (clang, -O0):
<YsGLSLCreatePlain2DRenderer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <YsGLSLAllocAndInitPlain2DRenderer@plt>
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
je     1161 <YsGLSLCreatePlain2DRenderer+0x31>
mov    -0x8(%rbp),%rdi
call   1040 <YsGLSLPlain2DDrawingCreateProgram@plt>
mov    -0x8(%rbp),%rdi
call   1030 <YsGLSLPlain2DDrawingInitializeUniform@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<YsGLSLCreatePlain2DRenderer>:
push   %rbx
xor    %eax,%eax
call   1050 <YsGLSLAllocAndInitPlain2DRenderer@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1150 <YsGLSLCreatePlain2DRenderer+0x20>
mov    %rbx,%rdi
call   1040 <YsGLSLPlain2DDrawingCreateProgram@plt>
mov    %rbx,%rdi
call   1030 <YsGLSLPlain2DDrawingInitializeUniform@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.YsGLSLPlain2DRenderer = type { i32 }
define %struct.YsGLSLPlain2DRenderer* @YsGLSLCreatePlain2DRenderer() {
%1 = alloca %struct.YsGLSLPlain2DRenderer*
%2 = call %struct.YsGLSLPlain2DRenderer* (...) @YsGLSLAllocAndInitPlain2DRenderer()
store %struct.YsGLSLPlain2DRenderer* %2, %struct.YsGLSLPlain2DRenderer** %1
%3 = load %struct.YsGLSLPlain2DRenderer*, %struct.YsGLSLPlain2DRenderer** %1
%4 = icmp ne %struct.YsGLSLPlain2DRenderer* null, %3
br i1 %4, label %5, label %10
5: ; preds = %0
%6 = load %struct.YsGLSLPlain2DRenderer*, %struct.YsGLSLPlain2DRenderer** %1
%7 = call i32 @YsGLSLPlain2DDrawingCreateProgram(%struct.YsGLSLPlain2DRenderer* %6)
%8 = load %struct.YsGLSLPlain2DRenderer*, %struct.YsGLSLPlain2DRenderer** %1
%9 = call i32 @YsGLSLPlain2DDrawingInitializeUniform(%struct.YsGLSLPlain2DRenderer* %8)
br label %10
10: ; preds = %5, %0
%11 = load %struct.YsGLSLPlain2DRenderer*, %struct.YsGLSLPlain2DRenderer** %1
ret %struct.YsGLSLPlain2DRenderer* %11
}

LLVM IR (-O2):
%struct.YsGLSLPlain2DRenderer = type { i32 }
define %struct.YsGLSLPlain2DRenderer* @YsGLSLCreatePlain2DRenderer() {
%1 = tail call %struct.YsGLSLPlain2DRenderer* (...) @YsGLSLAllocAndInitPlain2DRenderer()
%2 = icmp eq %struct.YsGLSLPlain2DRenderer* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @YsGLSLPlain2DDrawingCreateProgram(%struct.YsGLSLPlain2DRenderer* %1)
%5 = tail call i32 @YsGLSLPlain2DDrawingInitializeUniform(%struct.YsGLSLPlain2DRenderer* %1)
br label %6
6: ; preds = %3, %0
ret %struct.YsGLSLPlain2DRenderer* %1
}