#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*/ Put_sprite(int, unsigned short, unsigned char, int, int,
                              char);
void Print_text(unsigned short x, unsigned char y, char *text_ex) {
  unsigned char i = 0;
  for (i = 0; text_ex[i] != '\0'; i++)
    Put_sprite(6, x + (8 * i), y, 8, 8, text_ex[i] - 33);
}


x86 assembly (clang, -O0):
<Print_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    %rdx,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
movb   $0x0,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movzbl -0x11(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1192 <Print_text+0x82>
movzwl -0x2(%rbp),%eax
movzbl -0x11(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
mov    %ax,%dx
mov    -0x3(%rbp),%cl
mov    -0x10(%rbp),%rax
movzbl -0x11(%rbp),%esi
movsbl (%rax,%rsi,1),%eax
sub    $0x21,%eax
mov    $0x6,%edi
mov    $0x8,%r8d
movzwl %dx,%esi
movzbl %cl,%edx
mov    %r8d,%ecx
movsbl %al,%r9d
call   1030 <Put_sprite@plt>
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    1131 <Print_text+0x21>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Print_text>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    (%rdx),%al
test   %al,%al
je     1169 <Print_text+0x59>
mov    %rdx,%r15
mov    %edi,%r14d
mov    $0x1,%bl
movzbl %sil,%ebp
nopl   0x0(%rax)
lea    -0x1(%rbx),%ecx
movzbl %cl,%ecx
lea    (%r14,%rcx,8),%ecx
add    $0xdf,%al
movzwl %cx,%esi
movsbl %al,%r9d
mov    $0x6,%edi
mov    %ebp,%edx
mov    $0x8,%ecx
mov    $0x8,%r8d
call   1030 <Put_sprite@plt>
movzbl %bl,%ebx
movzbl (%r15,%rbx,1),%eax
add    $0x1,%bl
test   %al,%al
jne    1130 <Print_text+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @Print_text(i16 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = alloca i16
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i8
store i16 %0, i16* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
store i8 0, i8* %7
store i8 0, i8* %7
br label %8
8: ; preds = %34, %3
%9 = load i8*, i8** %6
%10 = load i8, i8* %7
%11 = zext i8 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %37
16: ; preds = %8
%17 = load i16, i16* %4
%18 = zext i16 %17 to i32
%19 = load i8, i8* %7
%20 = zext i8 %19 to i32
%21 = mul nsw i32 8, %20
%22 = add nsw i32 %18, %21
%23 = trunc i32 %22 to i16
%24 = load i8, i8* %5
%25 = load i8*, i8** %6
%26 = load i8, i8* %7
%27 = zext i8 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = sub nsw i32 %30, 33
%32 = trunc i32 %31 to i8
%33 = call i32 @Put_sprite(i32 6, i16 zeroext %23, i8 zeroext %24, i32 8, i32 8, i8 signext %32)
br label %34
34: ; preds = %16
%35 = load i8, i8* %7
%36 = add i8 %35, 1
store i8 %36, i8* %7
br label %8
37: ; preds = %8
ret void
}

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