#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++) {
    if (text_ex[i] != ' ')
      Put_sprite(100, 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     11ac <Print_text+0x9c>
mov    -0x10(%rbp),%rax
movzbl -0x11(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     119a <Print_text+0x8a>
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    $0x64,%edi
mov    $0x8,%r8d
movzwl %dx,%esi
movzbl %cl,%edx
mov    %r8d,%ecx
movsbl %al,%r9d
call   1030 <Put_sprite@plt>
jmp    119f <Print_text+0x8f>
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,%rbx
mov    %edi,%r14d
xor    %ebp,%ebp
movzbl %sil,%r15d
jmp    1134 <Print_text+0x24>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%bpl
movzbl %bpl,%ecx
movzbl (%rbx,%rcx,1),%eax
cmp    $0x20,%al
je     1130 <Print_text+0x20>
test   %al,%al
je     116b <Print_text+0x5b>
lea    (%r14,%rcx,8),%ecx
add    $0xdf,%al
movzwl %cx,%esi
movsbl %al,%r9d
mov    $0x64,%edi
mov    %r15d,%edx
mov    $0x8,%ecx
mov    $0x8,%r8d
call   1030 <Put_sprite@plt>
jmp    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 = %43, %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 %46
16: ; preds = %8
%17 = load i8*, i8** %6
%18 = load i8, i8* %7
%19 = zext i8 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 32
br i1 %23, label %24, label %42
24: ; preds = %16
%25 = load i16, i16* %4
%26 = zext i16 %25 to i32
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = mul nsw i32 8, %28
%30 = add nsw i32 %26, %29
%31 = trunc i32 %30 to i16
%32 = load i8, i8* %5
%33 = load i8*, i8** %6
%34 = load i8, i8* %7
%35 = zext i8 %34 to i64
%36 = getelementptr inbounds i8, i8* %33, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = sub nsw i32 %38, 33
%40 = trunc i32 %39 to i8
%41 = call i32 @Put_sprite(i32 100, i16 zeroext %31, i8 zeroext %32, i32 8, i32 8, i8 signext %40)
br label %42
42: ; preds = %24, %16
br label %43
43: ; preds = %42
%44 = load i8, i8* %7
%45 = add i8 %44, 1
store i8 %45, i8* %7
br label %8
46: ; preds = %8
ret void
}

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