#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*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glScalef(float, float, float);
int /*<<< orphan*/ glTranslatef(float, float, float);
int /*<<< orphan*/ glutStrokeCharacter(void *, char);
void renderStrokeFontString(float x, float y, float z, void *font,
                            char *string) {
  char *c;
  glPushMatrix();
  glTranslatef(x, y, z);
  glScalef(0.002f, 0.002f, 0.002f);
  for (c = string; *c != '\0'; c++) {
    glutStrokeCharacter(font, *c);
  }
  glPopMatrix();
}


x86 assembly (clang, -O0):
<renderStrokeFontString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1070 <glTranslatef@plt>
movss  0xe6e(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glScalef@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11d6 <renderStrokeFontString+0x86>
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rax
movsbl (%rax),%esi
call   1030 <glutStrokeCharacter@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11a5 <renderStrokeFontString+0x55>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renderStrokeFontString>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
movss  %xmm2,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0x14(%rsp),%xmm2
call   1070 <glTranslatef@plt>
movss  0xe6b(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1050 <glScalef@plt>
mov    (%rbx),%al
test   %al,%al
je     11c6 <renderStrokeFontString+0x76>
add    $0x1,%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <glutStrokeCharacter@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    11b0 <renderStrokeFontString+0x60>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
jmp    1040 <glPopMatrix@plt>

LLVM IR (-O0):
define void @renderStrokeFontString(float %0, float %1, float %2, i8* %3, i8* %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%12 = call i32 (...) @glPushMatrix()
%13 = load float, float* %6
%14 = load float, float* %7
%15 = load float, float* %8
%16 = call i32 @glTranslatef(float %13, float %14, float %15)
%17 = call i32 @glScalef(float 0x3F60624DE0000000, float 0x3F60624DE0000000, float 0x3F60624DE0000000)
%18 = load i8*, i8** %10
store i8* %18, i8** %11
br label %19
19: ; preds = %29, %5
%20 = load i8*, i8** %11
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %32
24: ; preds = %19
%25 = load i8*, i8** %9
%26 = load i8*, i8** %11
%27 = load i8, i8* %26
%28 = call i32 @glutStrokeCharacter(i8* %25, i8 signext %27)
br label %29
29: ; preds = %24
%30 = load i8*, i8** %11
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %11
br label %19
32: ; preds = %19
%33 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
define void @renderStrokeFontString(float %0, float %1, float %2, i8* %3, i8* nocapture %4) {
%6 = tail call i32 (...) @glPushMatrix()
%7 = tail call i32 @glTranslatef(float %0, float %1, float %2)
%8 = tail call i32 @glScalef(float 0x3F60624DE0000000, float 0x3F60624DE0000000, float 0x3F60624DE0000000)
%9 = load i8, i8* %4
%10 = icmp eq i8 %9, 0
br i1 %10, label %18, label %11
11: ; preds = %5, %11
%12 = phi i8 [ %16, %11 ], [ %9, %5 ]
%13 = phi i8* [ %15, %11 ], [ %4, %5 ]
%14 = tail call i32 @glutStrokeCharacter(i8* %3, i8 signext %12)
%15 = getelementptr inbounds i8, i8* %13, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %11
18: ; preds = %11, %5
%19 = tail call i32 (...) @glPopMatrix()
ret void
}