#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*/ GLUT_STROKE_ROMAN;
int /*<<< orphan*/ GL_BLEND;
int /*<<< orphan*/ GL_LINE_SMOOTH;
int /*<<< orphan*/ GL_ONE_MINUS_SRC_ALPHA;
int /*<<< orphan*/ GL_SRC_ALPHA;
int /*<<< orphan*/ glBlendFunc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glScalef(float, float, float);
int /*<<< orphan*/ glTranslatef(float, float, float);
int /*<<< orphan*/ glutStrokeCharacter(int /*<<< orphan*/, char);
scalar_t__ strlen(char *);
void RenderString(float x, float y, char *string) {
  GLfloat size = 0.0009f;
  int len, i;
  glPushMatrix();
  glLoadIdentity();
  glTranslatef(x, y, -1.2f);
  glScalef(size, size, size);
  len = (int)strlen(string);
  glEnable(GL_LINE_SMOOTH);
  glEnable(GL_BLEND);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  for (i = 0; i < len; i++)
    glutStrokeCharacter(GLUT_STROKE_ROMAN, string[i]);
  glPopMatrix();
  glDisable(GL_BLEND);
  glDisable(GL_LINE_SMOOTH);
}


x86 assembly (clang, -O0):
<RenderString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movss  0xe46(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    $0x0,%al
call   10a0 <glPushMatrix@plt>
mov    $0x0,%al
call   1080 <glLoadIdentity@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xe1d(%rip),%xmm2
call   10b0 <glTranslatef@plt>
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
call   1090 <glScalef@plt>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d9d(%rip),%rax
mov    (%rax),%edi
mov    0x2db4(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1276 <RenderString+0xd6>
mov    0x2d83(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1060 <glutStrokeCharacter@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1242 <RenderString+0xa2>
mov    $0x0,%al
call   1070 <glPopMatrix@plt>
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
mov    0x2d2e(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RenderString>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r13
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   10a0 <glPushMatrix@plt>
xor    %eax,%eax
call   1080 <glLoadIdentity@plt>
movss  0xe31(%rip),%xmm2
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   10b0 <glTranslatef@plt>
movss  0xe1d(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1090 <glScalef@plt>
mov    %r13,%rdi
call   1040 <strlen@plt>
mov    %rax,%r14
mov    0x2dbc(%rip),%r15
mov    (%r15),%edi
call   1050 <glEnable@plt>
mov    0x2dcd(%rip),%r12
mov    (%r12),%edi
call   1050 <glEnable@plt>
mov    0x2da5(%rip),%rax
mov    (%rax),%edi
mov    0x2dbc(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
test   %r14d,%r14d
jle    1267 <RenderString+0xc7>
mov    %r14d,%r14d
xor    %ebx,%ebx
mov    0x2d94(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%rbp),%edi
movsbl 0x0(%r13,%rbx,1),%esi
call   1060 <glutStrokeCharacter@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1250 <RenderString+0xb0>
xor    %eax,%eax
call   1070 <glPopMatrix@plt>
mov    (%r12),%edi
call   10c0 <glDisable@plt>
mov    (%r15),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10c0 <glDisable@plt>

LLVM IR (-O0):
@GL_LINE_SMOOTH = global i32 0
@GL_BLEND = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GLUT_STROKE_ROMAN = global i32 0
define void @RenderString(float %0, float %1, i8* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i8*
%7 = alloca float
%8 = alloca i32
%9 = alloca i32
store float %0, float* %4
store float %1, float* %5
store i8* %2, i8** %6
store float 0x3F4D7DBF40000000, float* %7
%10 = call i32 (...) @glPushMatrix()
%11 = call i32 (...) @glLoadIdentity()
%12 = load float, float* %4
%13 = load float, float* %5
%14 = call i32 @glTranslatef(float %12, float %13, float 0xBFF3333340000000)
%15 = load float, float* %7
%16 = load float, float* %7
%17 = load float, float* %7
%18 = call i32 @glScalef(float %15, float %16, float %17)
%19 = load i8*, i8** %6
%20 = call i64 @strlen(i8* %19)
%21 = trunc i64 %20 to i32
store i32 %21, i32* %8
%22 = load i32, i32* @GL_LINE_SMOOTH
%23 = call i32 @glEnable(i32 %22)
%24 = load i32, i32* @GL_BLEND
%25 = call i32 @glEnable(i32 %24)
%26 = load i32, i32* @GL_SRC_ALPHA
%27 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%28 = call i32 @glBlendFunc(i32 %26, i32 %27)
store i32 0, i32* %9
br label %29
29: ; preds = %41, %3
%30 = load i32, i32* %9
%31 = load i32, i32* %8
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %44
33: ; preds = %29
%34 = load i32, i32* @GLUT_STROKE_ROMAN
%35 = load i8*, i8** %6
%36 = load i32, i32* %9
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %35, i64 %37
%39 = load i8, i8* %38
%40 = call i32 @glutStrokeCharacter(i32 %34, i8 signext %39)
br label %41
41: ; preds = %33
%42 = load i32, i32* %9
%43 = add nsw i32 %42, 1
store i32 %43, i32* %9
br label %29
44: ; preds = %29
%45 = call i32 (...) @glPopMatrix()
%46 = load i32, i32* @GL_BLEND
%47 = call i32 @glDisable(i32 %46)
%48 = load i32, i32* @GL_LINE_SMOOTH
%49 = call i32 @glDisable(i32 %48)
ret void
}

LLVM IR (-O2):
@GL_LINE_SMOOTH = global i32 0
@GL_BLEND = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GLUT_STROKE_ROMAN = global i32 0
define void @RenderString(float %0, float %1, i8* nocapture %2) {
%4 = tail call i32 (...) @glPushMatrix()
%5 = tail call i32 (...) @glLoadIdentity()
%6 = tail call i32 @glTranslatef(float %0, float %1, float 0xBFF3333340000000)
%7 = tail call i32 @glScalef(float 0x3F4D7DBF40000000, float 0x3F4D7DBF40000000, float 0x3F4D7DBF40000000)
%8 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%9 = trunc i64 %8 to i32
%10 = load i32, i32* @GL_LINE_SMOOTH
%11 = tail call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_BLEND
%13 = tail call i32 @glEnable(i32 %12)
%14 = load i32, i32* @GL_SRC_ALPHA
%15 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%16 = tail call i32 @glBlendFunc(i32 %14, i32 %15)
%17 = icmp sgt i32 %9, 0
br i1 %17, label %18, label %28
18: ; preds = %3
%19 = and i64 %8, 4294967295
br label %20
20: ; preds = %18, %20
%21 = phi i64 [ 0, %18 ], [ %26, %20 ]
%22 = load i32, i32* @GLUT_STROKE_ROMAN
%23 = getelementptr inbounds i8, i8* %2, i64 %21
%24 = load i8, i8* %23
%25 = tail call i32 @glutStrokeCharacter(i32 %22, i8 signext %24)
%26 = add nuw nsw i64 %21, 1
%27 = icmp eq i64 %26, %19
br i1 %27, label %28, label %20
28: ; preds = %20, %3
%29 = tail call i32 (...) @glPopMatrix()
%30 = load i32, i32* @GL_BLEND
%31 = tail call i32 @glDisable(i32 %30)
%32 = load i32, i32* @GL_LINE_SMOOTH
%33 = tail call i32 @glDisable(i32 %32)
ret void
}