#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 */
unsigned int rastafont6x8_select(unsigned int, unsigned int, int);
__attribute__((always_)) void
rastafont6x8_blit6(unsigned *output, unsigned colour, unsigned m, unsigned b) {
  output[0] =
      rastafont6x8_select(output[0], colour, (int)(m << (31 - b)) >> 31);
  output[1] =
      rastafont6x8_select(output[1], colour, (int)(m << (30 - b)) >> 31);
  output[2] =
      rastafont6x8_select(output[2], colour, (int)(m << (29 - b)) >> 31);
  output[3] =
      rastafont6x8_select(output[3], colour, (int)(m << (28 - b)) >> 31);
  output[4] =
      rastafont6x8_select(output[4], colour, (int)(m << (27 - b)) >> 31);
  output[5] =
      rastafont6x8_select(output[5], colour, (int)(m << (26 - b)) >> 31);
}


x86 assembly (clang, -O0):
<rastafont6x8_blit6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x1f,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%edx
sar    $0x1f,%edx
call   1030 <rastafont6x8_select@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x1e,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%edx
sar    $0x1f,%edx
call   1030 <rastafont6x8_select@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x1d,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%edx
sar    $0x1f,%edx
call   1030 <rastafont6x8_select@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x1c,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%edx
sar    $0x1f,%edx
call   1030 <rastafont6x8_select@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x1b,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%edx
sar    $0x1f,%edx
call   1030 <rastafont6x8_select@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x1a,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%edx
sar    $0x1f,%edx
call   1030 <rastafont6x8_select@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rastafont6x8_blit6>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %edx,%ebp
mov    %esi,%r14d
mov    %rdi,%rbx
mov    (%rdi),%edi
mov    $0x1f,%cl
sub    %r15b,%cl
shl    %cl,%edx
sar    $0x1f,%edx
call   1030 <rastafont6x8_select@plt>
mov    %eax,(%rbx)
mov    0x4(%rbx),%edi
mov    $0x1e,%cl
sub    %r15b,%cl
mov    %ebp,%edx
shl    %cl,%edx
sar    $0x1f,%edx
mov    %r14d,%esi
call   1030 <rastafont6x8_select@plt>
mov    %eax,0x4(%rbx)
mov    0x8(%rbx),%edi
mov    $0x1d,%cl
sub    %r15b,%cl
mov    %ebp,%edx
shl    %cl,%edx
sar    $0x1f,%edx
mov    %r14d,%esi
call   1030 <rastafont6x8_select@plt>
mov    %eax,0x8(%rbx)
mov    0xc(%rbx),%edi
mov    $0x1c,%cl
sub    %r15b,%cl
mov    %ebp,%edx
shl    %cl,%edx
sar    $0x1f,%edx
mov    %r14d,%esi
call   1030 <rastafont6x8_select@plt>
mov    %eax,0xc(%rbx)
mov    0x10(%rbx),%edi
mov    $0x1b,%cl
sub    %r15b,%cl
mov    %ebp,%edx
shl    %cl,%edx
sar    $0x1f,%edx
mov    %r14d,%esi
call   1030 <rastafont6x8_select@plt>
mov    %eax,0x10(%rbx)
mov    0x14(%rbx),%edi
mov    $0x1a,%cl
sub    %r15b,%cl
shl    %cl,%ebp
sar    $0x1f,%ebp
mov    %r14d,%esi
mov    %ebp,%edx
call   1030 <rastafont6x8_select@plt>
mov    %eax,0x14(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @rastafont6x8_blit6(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = sub i32 31, %14
%16 = shl i32 %13, %15
%17 = ashr i32 %16, 31
%18 = call i32 @rastafont6x8_select(i32 %11, i32 %12, i32 %17)
%19 = load i32*, i32** %5
%20 = getelementptr inbounds i32, i32* %19, i64 0
store i32 %18, i32* %20
%21 = load i32*, i32** %5
%22 = getelementptr inbounds i32, i32* %21, i64 1
%23 = load i32, i32* %22
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = load i32, i32* %8
%27 = sub i32 30, %26
%28 = shl i32 %25, %27
%29 = ashr i32 %28, 31
%30 = call i32 @rastafont6x8_select(i32 %23, i32 %24, i32 %29)
%31 = load i32*, i32** %5
%32 = getelementptr inbounds i32, i32* %31, i64 1
store i32 %30, i32* %32
%33 = load i32*, i32** %5
%34 = getelementptr inbounds i32, i32* %33, i64 2
%35 = load i32, i32* %34
%36 = load i32, i32* %6
%37 = load i32, i32* %7
%38 = load i32, i32* %8
%39 = sub i32 29, %38
%40 = shl i32 %37, %39
%41 = ashr i32 %40, 31
%42 = call i32 @rastafont6x8_select(i32 %35, i32 %36, i32 %41)
%43 = load i32*, i32** %5
%44 = getelementptr inbounds i32, i32* %43, i64 2
store i32 %42, i32* %44
%45 = load i32*, i32** %5
%46 = getelementptr inbounds i32, i32* %45, i64 3
%47 = load i32, i32* %46
%48 = load i32, i32* %6
%49 = load i32, i32* %7
%50 = load i32, i32* %8
%51 = sub i32 28, %50
%52 = shl i32 %49, %51
%53 = ashr i32 %52, 31
%54 = call i32 @rastafont6x8_select(i32 %47, i32 %48, i32 %53)
%55 = load i32*, i32** %5
%56 = getelementptr inbounds i32, i32* %55, i64 3
store i32 %54, i32* %56
%57 = load i32*, i32** %5
%58 = getelementptr inbounds i32, i32* %57, i64 4
%59 = load i32, i32* %58
%60 = load i32, i32* %6
%61 = load i32, i32* %7
%62 = load i32, i32* %8
%63 = sub i32 27, %62
%64 = shl i32 %61, %63
%65 = ashr i32 %64, 31
%66 = call i32 @rastafont6x8_select(i32 %59, i32 %60, i32 %65)
%67 = load i32*, i32** %5
%68 = getelementptr inbounds i32, i32* %67, i64 4
store i32 %66, i32* %68
%69 = load i32*, i32** %5
%70 = getelementptr inbounds i32, i32* %69, i64 5
%71 = load i32, i32* %70
%72 = load i32, i32* %6
%73 = load i32, i32* %7
%74 = load i32, i32* %8
%75 = sub i32 26, %74
%76 = shl i32 %73, %75
%77 = ashr i32 %76, 31
%78 = call i32 @rastafont6x8_select(i32 %71, i32 %72, i32 %77)
%79 = load i32*, i32** %5
%80 = getelementptr inbounds i32, i32* %79, i64 5
store i32 %78, i32* %80
ret void
}

LLVM IR (-O2):
define void @rastafont6x8_blit6(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = load i32, i32* %0
%6 = sub i32 31, %3
%7 = shl i32 %2, %6
%8 = ashr i32 %7, 31
%9 = tail call i32 @rastafont6x8_select(i32 %5, i32 %1, i32 %8)
store i32 %9, i32* %0
%10 = getelementptr inbounds i32, i32* %0, i64 1
%11 = load i32, i32* %10
%12 = sub i32 30, %3
%13 = shl i32 %2, %12
%14 = ashr i32 %13, 31
%15 = tail call i32 @rastafont6x8_select(i32 %11, i32 %1, i32 %14)
store i32 %15, i32* %10
%16 = getelementptr inbounds i32, i32* %0, i64 2
%17 = load i32, i32* %16
%18 = sub i32 29, %3
%19 = shl i32 %2, %18
%20 = ashr i32 %19, 31
%21 = tail call i32 @rastafont6x8_select(i32 %17, i32 %1, i32 %20)
store i32 %21, i32* %16
%22 = getelementptr inbounds i32, i32* %0, i64 3
%23 = load i32, i32* %22
%24 = sub i32 28, %3
%25 = shl i32 %2, %24
%26 = ashr i32 %25, 31
%27 = tail call i32 @rastafont6x8_select(i32 %23, i32 %1, i32 %26)
store i32 %27, i32* %22
%28 = getelementptr inbounds i32, i32* %0, i64 4
%29 = load i32, i32* %28
%30 = sub i32 27, %3
%31 = shl i32 %2, %30
%32 = ashr i32 %31, 31
%33 = tail call i32 @rastafont6x8_select(i32 %29, i32 %1, i32 %32)
store i32 %33, i32* %28
%34 = getelementptr inbounds i32, i32* %0, i64 5
%35 = load i32, i32* %34
%36 = sub i32 26, %3
%37 = shl i32 %2, %36
%38 = ashr i32 %37, 31
%39 = tail call i32 @rastafont6x8_select(i32 %35, i32 %1, i32 %38)
store i32 %39, i32* %34
ret void
}