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

/* Variables and functions */
int /*<<< orphan*/ GLUT_STROKE_ROMAN;
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glTranslatef(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
int /*<<< orphan*/ glutStrokeCharacter(int /*<<< orphan*/, char);
void output(GLfloat x, GLfloat y, char *text) {
  char *p;
  glPushMatrix();
  glTranslatef(x, y, 0);
  for (p = text; *p; p++)
    glutStrokeCharacter(GLUT_STROKE_ROMAN, *p);
  glPopMatrix();
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0x0,%al
call   1050 <glPushMatrix@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1060 <glTranslatef@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     11a1 <output+0x61>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
movsbl (%rax),%esi
call   1030 <glutStrokeCharacter@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    116e <output+0x2e>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <glPushMatrix@plt>
mov    %ebp,%edi
mov    %r14d,%esi
xor    %edx,%edx
call   1060 <glTranslatef@plt>
mov    (%rbx),%al
test   %al,%al
je     1186 <output+0x46>
add    $0x1,%rbx
mov    0x2e78(%rip),%rbp
mov    0x0(%rbp),%edi
movsbl %al,%esi
call   1030 <glutStrokeCharacter@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1170 <output+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <glPopMatrix@plt>

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

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