#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 */
typedef float GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW_MATRIX;
int /*<<< orphan*/ glGetFloatv(int /*<<< orphan*/, float *);
int /*<<< orphan*/ glLoadMatrixf(float *);
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glTranslatef(float, float, float);
int _vsofont_billboard_spherical_cheat_apply(float x, float y, float z) {
  GLfloat m[4 * 4];
  int i;
  glPushMatrix();
  glTranslatef(x, y, z);
  glGetFloatv(GL_MODELVIEW_MATRIX, m);
  i = 0;
  m[i++] = 1.0f;
  m[i++] = 0.0f;
  m[i++] = 0.0f;
  i++;
  m[i++] = 0.0f;
  m[i++] = 1.0f;
  m[i++] = 0.0f;
  i++;
  m[i++] = 0.0f;
  m[i++] = 0.0f;
  m[i] = 1.0f;
  glLoadMatrixf(m);
  return 1;
}


x86 assembly (clang, -O0):
<_vsofont_billboard_spherical_cheat_apply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    $0x0,%al
call   1040 <glPushMatrix@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1060 <glTranslatef@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rsi
call   1050 <glGetFloatv@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x54(%rbp)
cltq
movss  0xe60(%rip),%xmm0
movss  %xmm0,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x54(%rbp)
cltq
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x54(%rbp)
cltq
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x54(%rbp)
cltq
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x54(%rbp)
cltq
movss  0xdfa(%rip),%xmm0
movss  %xmm0,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x54(%rbp)
cltq
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x54(%rbp)
cltq
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x54(%rbp)
cltq
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp,%rax,4)
movslq -0x54(%rbp),%rax
movss  0xd9d(%rip),%xmm0
movss  %xmm0,-0x50(%rbp,%rax,4)
lea    -0x50(%rbp),%rdi
call   1030 <glLoadMatrixf@plt>
mov    $0x1,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_vsofont_billboard_spherical_cheat_apply>:
push   %rbx
sub    $0x50,%rsp
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1040 <glPushMatrix@plt>
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
call   1060 <glTranslatef@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <glGetFloatv@plt>
movq   $0x3f800000,0x10(%rsp)
80 3f
movl   $0x0,0x18(%rsp)
movabs $0x3f80000000000000,%rax
mov    %rax,0x20(%rsp)
movl   $0x0,0x28(%rsp)
movq   $0x0,0x30(%rsp)
movl   $0x3f800000,0x38(%rsp)
3f
mov    %rbx,%rdi
call   1030 <glLoadMatrixf@plt>
mov    $0x1,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@GL_MODELVIEW_MATRIX = global i32 0
define i32 @_vsofont_billboard_spherical_cheat_apply(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca [16 x float]
%8 = alloca i32
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = call i32 (...) @glPushMatrix()
%10 = load float, float* %4
%11 = load float, float* %5
%12 = load float, float* %6
%13 = call i32 @glTranslatef(float %10, float %11, float %12)
%14 = load i32, i32* @GL_MODELVIEW_MATRIX
%15 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%16 = call i32 @glGetFloatv(i32 %14, float* %15)
store i32 0, i32* %8
%17 = load i32, i32* %8
%18 = add nsw i32 %17, 1
store i32 %18, i32* %8
%19 = sext i32 %17 to i64
%20 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %19
store float 1.000000e+00, float* %20
%21 = load i32, i32* %8
%22 = add nsw i32 %21, 1
store i32 %22, i32* %8
%23 = sext i32 %21 to i64
%24 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %23
store float 0.000000e+00, float* %24
%25 = load i32, i32* %8
%26 = add nsw i32 %25, 1
store i32 %26, i32* %8
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %27
store float 0.000000e+00, float* %28
%29 = load i32, i32* %8
%30 = add nsw i32 %29, 1
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
store i32 %32, i32* %8
%33 = sext i32 %31 to i64
%34 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %33
store float 0.000000e+00, float* %34
%35 = load i32, i32* %8
%36 = add nsw i32 %35, 1
store i32 %36, i32* %8
%37 = sext i32 %35 to i64
%38 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %37
store float 1.000000e+00, float* %38
%39 = load i32, i32* %8
%40 = add nsw i32 %39, 1
store i32 %40, i32* %8
%41 = sext i32 %39 to i64
%42 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %41
store float 0.000000e+00, float* %42
%43 = load i32, i32* %8
%44 = add nsw i32 %43, 1
store i32 %44, i32* %8
%45 = load i32, i32* %8
%46 = add nsw i32 %45, 1
store i32 %46, i32* %8
%47 = sext i32 %45 to i64
%48 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %47
store float 0.000000e+00, float* %48
%49 = load i32, i32* %8
%50 = add nsw i32 %49, 1
store i32 %50, i32* %8
%51 = sext i32 %49 to i64
%52 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %51
store float 0.000000e+00, float* %52
%53 = load i32, i32* %8
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 %54
store float 1.000000e+00, float* %55
%56 = getelementptr inbounds [16 x float], [16 x float]* %7, i64 0, i64 0
%57 = call i32 @glLoadMatrixf(float* %56)
ret i32 1
}

LLVM IR (-O2):
@GL_MODELVIEW_MATRIX = global i32 0
define i32 @_vsofont_billboard_spherical_cheat_apply(float %0, float %1, float %2) {
%4 = alloca [16 x float]
%5 = bitcast [16 x float]* %4 to i8*
%6 = tail call i32 (...) @glPushMatrix()
%7 = tail call i32 @glTranslatef(float %0, float %1, float %2)
%8 = load i32, i32* @GL_MODELVIEW_MATRIX
%9 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 0
%10 = call i32 @glGetFloatv(i32 %8, float* %9)
store float 1.000000e+00, float* %9
%11 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 1
store float 0.000000e+00, float* %11
%12 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 2
store float 0.000000e+00, float* %12
%13 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 4
store float 0.000000e+00, float* %13
%14 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 5
store float 1.000000e+00, float* %14
%15 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 6
store float 0.000000e+00, float* %15
%16 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 8
store float 0.000000e+00, float* %16
%17 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 9
store float 0.000000e+00, float* %17
%18 = getelementptr inbounds [16 x float], [16 x float]* %4, i64 0, i64 10
store float 1.000000e+00, float* %18
%19 = call i32 @glLoadMatrixf(float* %9)
ret i32 1
}