#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*/ glRasterPos2f(double, double);
int /*<<< orphan*/ glutBitmapCharacter(void *, char);
scalar_t__ strlen(char *);
void vBitmapOutput(double x, double y, char *string, void *font) {
  int len, i;
  glRasterPos2f(x, y);
  len = (int)strlen(string);
  for (i = 0; i < len; i++)
    glutBitmapCharacter(font, string[i]);
}


x86 assembly (clang, -O0):
<vBitmapOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <glRasterPos2f@plt>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    119b <vBitmapOutput+0x6b>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <glutBitmapCharacter@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    116c <vBitmapOutput+0x3c>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vBitmapOutput>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
call   1050 <glRasterPos2f@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1176 <vBitmapOutput+0x46>
mov    %eax,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <glutBitmapCharacter@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1160 <vBitmapOutput+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @vBitmapOutput(double %0, double %1, i8* %2, i8* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store double %0, double* %5
store double %1, double* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%11 = load double, double* %5
%12 = load double, double* %6
%13 = call i32 @glRasterPos2f(double %11, double %12)
%14 = load i8*, i8** %7
%15 = call i64 @strlen(i8* %14)
%16 = trunc i64 %15 to i32
store i32 %16, i32* %9
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 i8*, i8** %8
%23 = load i8*, i8** %7
%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(i8* %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):
define void @vBitmapOutput(double %0, double %1, i8* nocapture %2, i8* %3) {
%5 = tail call i32 @glRasterPos2f(double %0, double %1)
%6 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%7 = trunc i64 %6 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %4
%10 = and i64 %6, 4294967295
br label %11
11: ; preds = %9, %11
%12 = phi i64 [ 0, %9 ], [ %16, %11 ]
%13 = getelementptr inbounds i8, i8* %2, i64 %12
%14 = load i8, i8* %13
%15 = tail call i32 @glutBitmapCharacter(i8* %3, i8 signext %14)
%16 = add nuw nsw i64 %12, 1
%17 = icmp eq i64 %16, %10
br i1 %17, label %18, label %11
18: ; preds = %11, %4
ret void
}