#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*/ displaySetCursorLower(int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ displaySetCursorUpper(int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ displayWriteDisplayData(char, char, char, char, char, char,
                                           char, char);
int strlen(char *);
void displayWritePixels(char sequence[]) {
  int i, lenoriginale;
  displaySetCursorLower(0, 0, 0, 0, 0, 0, 0, 0);
  displaySetCursorUpper(0, 0, 0, 0, 0, 0, 0, 0);
  lenoriginale = strlen(sequence);
  for (i = 0; i < lenoriginale; i += 8) {
    displayWriteDisplayData(sequence[i], sequence[i + 1], sequence[i + 2],
                            sequence[i + 3], sequence[i + 4], sequence[i + 5],
                            sequence[i + 6], sequence[i + 7]);
  }
}


x86 assembly (clang, -O0):
<displayWritePixels>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1050 <displaySetCursorLower@plt>
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <displaySetCursorUpper@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1276 <displayWritePixels+0x136>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%dil
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%sil
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%r8d
add    $0x4,%r8d
movslq %r8d,%r8
mov    (%rax,%r8,1),%r8b
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%r9d
add    $0x5,%r9d
movslq %r9d,%r9
mov    (%rax,%r9,1),%r9b
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%r10d
add    $0x6,%r10d
movslq %r10d,%r10
mov    (%rax,%r10,1),%r11b
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%r10d
add    $0x7,%r10d
movslq %r10d,%r10
movsbl %dil,%edi
movsbl %sil,%esi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl %r8b,%r8d
movsbl %r9b,%r9d
movsbl %r11b,%r11d
mov    %r11d,(%rsp)
movsbl (%rax,%r10,1),%eax
mov    %eax,0x8(%rsp)
call   1040 <displayWriteDisplayData@plt>
mov    -0xc(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0xc(%rbp)
jmp    11ab <displayWritePixels+0x6b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayWritePixels>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1050 <displaySetCursorLower@plt>
add    $0x10,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1060 <displaySetCursorUpper@plt>
add    $0x10,%rsp
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    11cf <displayWritePixels+0x8f>
mov    %eax,%r14d
xor    %ebp,%ebp
xchg   %ax,%ax
movsbl (%rbx,%rbp,1),%edi
movsbl 0x1(%rbx,%rbp,1),%esi
movsbl 0x2(%rbx,%rbp,1),%edx
movsbl 0x3(%rbx,%rbp,1),%ecx
movsbl 0x4(%rbx,%rbp,1),%r8d
movsbl 0x5(%rbx,%rbp,1),%r9d
movsbl 0x6(%rbx,%rbp,1),%r10d
movsbl 0x7(%rbx,%rbp,1),%eax
push   %rax
push   %r10
call   1040 <displayWriteDisplayData@plt>
add    $0x10,%rsp
add    $0x8,%rbp
cmp    %ebp,%r14d
jg     1190 <displayWritePixels+0x50>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @displayWritePixels(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = call i32 @displaySetCursorLower(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%6 = call i32 @displaySetCursorUpper(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
store i32 %8, i32* %4
store i32 0, i32* %3
br label %9
9: ; preds = %62, %1
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %65
13: ; preds = %9
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = load i8*, i8** %2
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
%24 = load i8, i8* %23
%25 = load i8*, i8** %2
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 2
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %25, i64 %28
%30 = load i8, i8* %29
%31 = load i8*, i8** %2
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8, i8* %31, i64 %34
%36 = load i8, i8* %35
%37 = load i8*, i8** %2
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %37, i64 %40
%42 = load i8, i8* %41
%43 = load i8*, i8** %2
%44 = load i32, i32* %3
%45 = add nsw i32 %44, 5
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8, i8* %43, i64 %46
%48 = load i8, i8* %47
%49 = load i8*, i8** %2
%50 = load i32, i32* %3
%51 = add nsw i32 %50, 6
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8, i8* %49, i64 %52
%54 = load i8, i8* %53
%55 = load i8*, i8** %2
%56 = load i32, i32* %3
%57 = add nsw i32 %56, 7
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %55, i64 %58
%60 = load i8, i8* %59
%61 = call i32 @displayWriteDisplayData(i8 signext %18, i8 signext %24, i8 signext %30, i8 signext %36, i8 signext %42, i8 signext %48, i8 signext %54, i8 signext %60)
br label %62
62: ; preds = %13
%63 = load i32, i32* %3
%64 = add nsw i32 %63, 8
store i32 %64, i32* %3
br label %9
65: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @displayWritePixels(i8* %0) {
%2 = tail call i32 @displaySetCursorLower(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%3 = tail call i32 @displaySetCursorUpper(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %35
6: ; preds = %1, %6
%7 = phi i64 [ %32, %6 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = or i64 %7, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = or i64 %7, 2
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = or i64 %7, 3
%17 = getelementptr inbounds i8, i8* %0, i64 %16
%18 = load i8, i8* %17
%19 = or i64 %7, 4
%20 = getelementptr inbounds i8, i8* %0, i64 %19
%21 = load i8, i8* %20
%22 = or i64 %7, 5
%23 = getelementptr inbounds i8, i8* %0, i64 %22
%24 = load i8, i8* %23
%25 = or i64 %7, 6
%26 = getelementptr inbounds i8, i8* %0, i64 %25
%27 = load i8, i8* %26
%28 = or i64 %7, 7
%29 = getelementptr inbounds i8, i8* %0, i64 %28
%30 = load i8, i8* %29
%31 = tail call i32 @displayWriteDisplayData(i8 signext %9, i8 signext %12, i8 signext %15, i8 signext %18, i8 signext %21, i8 signext %24, i8 signext %27, i8 signext %30)
%32 = add nuw i64 %7, 8
%33 = trunc i64 %32 to i32
%34 = icmp sgt i32 %4, %33
br i1 %34, label %6, label %35
35: ; preds = %6, %1
ret void
}