#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*/ glRasterPos2i(int, int);
int /*<<< orphan*/ glutBitmapCharacter(int /*<<< orphan*/, char);
int strlen(char *);
void Sprint(int x, int y, char *st) {
  int l, i;
  l = strlen(st);
  glRasterPos2i(x, y);
  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    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <glRasterPos2i@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1194 <Sprint+0x64>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <glutBitmapCharacter@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1160 <Sprint+0x30>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sprint>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r12
mov    %esi,%r14d
mov    %edi,%r15d
mov    %rdx,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r15d,%edi
mov    %r14d,%esi
call   1050 <glRasterPos2i@plt>
test   %ebp,%ebp
jle    1186 <Sprint+0x56>
mov    %ebp,%ebp
xor    %ebx,%ebx
mov    0x2e7b(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14),%edi
movsbl (%r12,%rbx,1),%esi
call   1030 <glutBitmapCharacter@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1170 <Sprint+0x40>
pop    %rbx
pop    %r12
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, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = call i32 @strlen(i8* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @glRasterPos2i(i32 %11, i32 %12)
store i32 0, i32* %8
br label %14
14: ; preds = %26, %3
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %29
18: ; preds = %14
%19 = load i32, i32* @GLUT_BITMAP_TIMES_ROMAN_24
%20 = load i8*, i8** %6
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i8, i8* %23
%25 = call i32 @glutBitmapCharacter(i32 %19, i8 signext %24)
br label %26
26: ; preds = %18
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
br label %14
29: ; preds = %14
ret void
}

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