#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*/ GLUT_BITMAP_TIMES_ROMAN_24;
int /*<<< orphan*/ glRasterPos3i(int, int, int);
int /*<<< orphan*/ glutBitmapCharacter(int /*<<< orphan*/, char);
int strlen(char *);
void Sprint(int x, int y, int z, char *st) {
  int l, i;
  l = strlen(st);
  glRasterPos3i(x, y, z);
  for (i = 0; i < l; i++) {
    glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24, st[i]);
  }
}


x86 assembly (clang, -O0):
<Sprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1050 <glRasterPos3i@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    119a <Sprint+0x6a>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <glutBitmapCharacter@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1166 <Sprint+0x36>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sprint>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r13
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%r12d
mov    %rcx,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r12d,%edi
mov    %r15d,%esi
mov    %r14d,%edx
call   1050 <glRasterPos3i@plt>
test   %ebp,%ebp
jle    1187 <Sprint+0x57>
mov    %ebp,%ebp
xor    %ebx,%ebx
mov    0x2e72(%rip),%r14
xchg   %ax,%ax
mov    (%r14),%edi
movsbl 0x0(%r13,%rbx,1),%esi
call   1030 <glutBitmapCharacter@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1170 <Sprint+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@GLUT_BITMAP_TIMES_ROMAN_24 = global i32 0
define void @Sprint(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%11 = load i8*, i8** %8
%12 = call i32 @strlen(i8* %11)
store i32 %12, i32* %9
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = call i32 @glRasterPos3i(i32 %13, i32 %14, i32 %15)
store i32 0, i32* %10
br label %17
17: ; preds = %29, %4
%18 = load i32, i32* %10
%19 = load i32, i32* %9
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %32
21: ; preds = %17
%22 = load i32, i32* @GLUT_BITMAP_TIMES_ROMAN_24
%23 = load i8*, i8** %8
%24 = load i32, i32* %10
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %23, i64 %25
%27 = load i8, i8* %26
%28 = call i32 @glutBitmapCharacter(i32 %22, i8 signext %27)
br label %29
29: ; preds = %21
%30 = load i32, i32* %10
%31 = add nsw i32 %30, 1
store i32 %31, i32* %10
br label %17
32: ; preds = %17
ret void
}

LLVM IR (-O2):
@GLUT_BITMAP_TIMES_ROMAN_24 = global i32 0
define void @Sprint(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = tail call i32 @strlen(i8* %3)
%6 = tail call i32 @glRasterPos3i(i32 %0, i32 %1, i32 %2)
%7 = icmp sgt i32 %5, 0
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = zext i32 %5 to i64
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %16, %10 ]
%12 = load i32, i32* @GLUT_BITMAP_TIMES_ROMAN_24
%13 = getelementptr inbounds i8, i8* %3, i64 %11
%14 = load i8, i8* %13
%15 = tail call i32 @glutBitmapCharacter(i32 %12, i8 signext %14)
%16 = add nuw nsw i64 %11, 1
%17 = icmp eq i64 %16, %9
br i1 %17, label %18, label %10
18: ; preds = %10, %4
ret void
}