#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*/ drv_LT_command(int);
int /*<<< orphan*/ drv_LT_send(int, int);
void drv_LT_defchar(const int ascii, const unsigned char *matrix) {
  int i;
  drv_LT_command(0x40 | 8 * ascii);
  for (i = 0; i < 8; i++) {
    drv_LT_send(0x14, *matrix++ & 0x1f);
  }
}


x86 assembly (clang, -O0):
<drv_LT_defchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0x40,%edi
call   1030 <drv_LT_command@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    117b <drv_LT_defchar+0x5b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%esi
and    $0x1f,%esi
mov    $0x14,%edi
call   1040 <drv_LT_send@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <drv_LT_defchar+0x24>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_LT_defchar>:
push   %rbx
mov    %rsi,%rbx
shl    $0x3,%edi
or     $0x40,%edi
call   1030 <drv_LT_command@plt>
movzbl (%rbx),%esi
and    $0x1f,%esi
mov    $0x14,%edi
call   1040 <drv_LT_send@plt>
movzbl 0x1(%rbx),%esi
and    $0x1f,%esi
mov    $0x14,%edi
call   1040 <drv_LT_send@plt>
movzbl 0x2(%rbx),%esi
and    $0x1f,%esi
mov    $0x14,%edi
call   1040 <drv_LT_send@plt>
movzbl 0x3(%rbx),%esi
and    $0x1f,%esi
mov    $0x14,%edi
call   1040 <drv_LT_send@plt>
movzbl 0x4(%rbx),%esi
and    $0x1f,%esi
mov    $0x14,%edi
call   1040 <drv_LT_send@plt>
movzbl 0x5(%rbx),%esi
and    $0x1f,%esi
mov    $0x14,%edi
call   1040 <drv_LT_send@plt>
movzbl 0x6(%rbx),%esi
and    $0x1f,%esi
mov    $0x14,%edi
call   1040 <drv_LT_send@plt>
movzbl 0x7(%rbx),%esi
and    $0x1f,%esi
mov    $0x14,%edi
pop    %rbx
jmp    1040 <drv_LT_send@plt>

LLVM IR (-O0):
define void @drv_LT_defchar(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = mul nsw i32 8, %6
%8 = or i32 64, %7
%9 = call i32 @drv_LT_command(i32 %8)
store i32 0, i32* %5
br label %10
10: ; preds = %20, %2
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 8
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
%16 = load i8, i8* %14
%17 = zext i8 %16 to i32
%18 = and i32 %17, 31
%19 = call i32 @drv_LT_send(i32 20, i32 %18)
br label %20
20: ; preds = %13
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %10
23: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @drv_LT_defchar(i32 %0, i8* nocapture %1) {
%3 = shl nsw i32 %0, 3
%4 = or i32 %3, 64
%5 = tail call i32 @drv_LT_command(i32 %4)
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = load i8, i8* %1
%8 = and i8 %7, 31
%9 = zext i8 %8 to i32
%10 = tail call i32 @drv_LT_send(i32 20, i32 %9)
%11 = getelementptr inbounds i8, i8* %1, i64 2
%12 = load i8, i8* %6
%13 = and i8 %12, 31
%14 = zext i8 %13 to i32
%15 = tail call i32 @drv_LT_send(i32 20, i32 %14)
%16 = getelementptr inbounds i8, i8* %1, i64 3
%17 = load i8, i8* %11
%18 = and i8 %17, 31
%19 = zext i8 %18 to i32
%20 = tail call i32 @drv_LT_send(i32 20, i32 %19)
%21 = getelementptr inbounds i8, i8* %1, i64 4
%22 = load i8, i8* %16
%23 = and i8 %22, 31
%24 = zext i8 %23 to i32
%25 = tail call i32 @drv_LT_send(i32 20, i32 %24)
%26 = getelementptr inbounds i8, i8* %1, i64 5
%27 = load i8, i8* %21
%28 = and i8 %27, 31
%29 = zext i8 %28 to i32
%30 = tail call i32 @drv_LT_send(i32 20, i32 %29)
%31 = getelementptr inbounds i8, i8* %1, i64 6
%32 = load i8, i8* %26
%33 = and i8 %32, 31
%34 = zext i8 %33 to i32
%35 = tail call i32 @drv_LT_send(i32 20, i32 %34)
%36 = getelementptr inbounds i8, i8* %1, i64 7
%37 = load i8, i8* %31
%38 = and i8 %37, 31
%39 = zext i8 %38 to i32
%40 = tail call i32 @drv_LT_send(i32 20, i32 %39)
%41 = load i8, i8* %36
%42 = and i8 %41, 31
%43 = zext i8 %42 to i32
%44 = tail call i32 @drv_LT_send(i32 20, i32 %43)
ret void
}