#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 int GLdouble;

/* Variables and functions */
int /*<<< orphan*/ GLUT_STROKE_ROMAN;
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glScaled(double, double, double);
int /*<<< orphan*/ glTranslated(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ glutStrokeCharacter(int /*<<< orphan*/, int /*<<< orphan*/);
void render_label(GLdouble size, const char *string) {
  glPushMatrix();
  glTranslated(+size / 2, size, 0);
  glScaled(0.001, 0.001, 0.001);
  while (*string)
    glutStrokeCharacter(GLUT_STROKE_ROMAN, *(string++));
  glPopMatrix();
}


x86 assembly (clang, -O0):
<render_label>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x4(%rbp),%esi
xor    %edx,%edx
call   1070 <glTranslated@plt>
movsd  0xe7b(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glScaled@plt>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     11c2 <render_label+0x72>
mov    0x2e44(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%esi
call   1030 <glutStrokeCharacter@plt>
jmp    1190 <render_label+0x40>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<render_label>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
mov    %ebp,%edi
shr    $0x1f,%edi
add    %ebp,%edi
sar    %edi
mov    %ebp,%esi
xor    %edx,%edx
call   1070 <glTranslated@plt>
movsd  0xe87(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1050 <glScaled@plt>
mov    (%rbx),%al
test   %al,%al
je     11b6 <render_label+0x66>
add    $0x1,%rbx
mov    0x2e53(%rip),%rbp
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x0(%rbp),%edi
movsbl %al,%esi
call   1030 <glutStrokeCharacter@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    11a0 <render_label+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <glPopMatrix@plt>

LLVM IR (-O0):
@GLUT_STROKE_ROMAN = global i32 0
define void @render_label(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 (...) @glPushMatrix()
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 2
%8 = load i32, i32* %3
%9 = call i32 @glTranslated(i32 %7, i32 %8, i32 0)
%10 = call i32 @glScaled(double 1.000000e-03, double 1.000000e-03, double 1.000000e-03)
br label %11
11: ; preds = %15, %2
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %11
%16 = load i32, i32* @GLUT_STROKE_ROMAN
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
%19 = load i8, i8* %17
%20 = sext i8 %19 to i32
%21 = call i32 @glutStrokeCharacter(i32 %16, i32 %20)
br label %11
22: ; preds = %11
%23 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
@GLUT_STROKE_ROMAN = global i32 0
define void @render_label(i32 %0, i8* nocapture %1) {
%3 = tail call i32 (...) @glPushMatrix()
%4 = sdiv i32 %0, 2
%5 = tail call i32 @glTranslated(i32 %4, i32 %0, i32 0)
%6 = tail call i32 @glScaled(double 1.000000e-03, double 1.000000e-03, double 1.000000e-03)
%7 = load i8, i8* %1
%8 = icmp eq i8 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %2, %9
%10 = phi i8 [ %16, %9 ], [ %7, %2 ]
%11 = phi i8* [ %13, %9 ], [ %1, %2 ]
%12 = load i32, i32* @GLUT_STROKE_ROMAN
%13 = getelementptr inbounds i8, i8* %11, i64 1
%14 = sext i8 %10 to i32
%15 = tail call i32 @glutStrokeCharacter(i32 %12, i32 %14)
%16 = load i8, i8* %13
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %9
18: ; preds = %9, %2
%19 = tail call i32 (...) @glPopMatrix()
ret void
}