#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(unsigned char, int /*<<< orphan*/ *);
void write_sbi_data(FILE *fstream, unsigned char *data) {
  fputc(data[0], fstream);
  fputc(data[4], fstream);
  fputc(data[6], fstream);
  fputc(data[8], fstream);
  fputc(data[2] & 0xc0, fstream);
  fputc(data[2] & ~0xc0, fstream);
  fputc(data[10], fstream);
  fputc(data[0 + 1], fstream);
  fputc(data[4 + 1], fstream);
  fputc(data[6 + 1], fstream);
  fputc(data[8 + 1], fstream);
  fputc(data[2 + 1] & 0xc0, fstream);
  fputc(data[2 + 1] & ~0xc0, fstream);
  fputc(0, fstream);
  fputc(0, fstream);
  fputc(0, fstream);
}


x86 assembly (clang, -O0):
<write_sbi_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
mov    0x6(%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
and    $0xc0,%eax
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
and    $0xffffff3f,%eax
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
mov    0xa(%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
mov    0x5(%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
mov    0x7(%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
mov    0x9(%rax),%al
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
and    $0xc0,%eax
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
and    $0xffffff3f,%eax
mov    -0x8(%rbp),%rsi
movzbl %al,%edi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_sbi_data>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movzbl (%rsi),%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x4(%r14),%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x6(%r14),%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x8(%r14),%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x2(%r14),%edi
and    $0xffffffc0,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x2(%r14),%edi
and    $0x3f,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0xa(%r14),%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x1(%r14),%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x5(%r14),%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x7(%r14),%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x9(%r14),%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x3(%r14),%edi
and    $0xffffffc0,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
movzbl 0x3(%r14),%edi
and    $0x3f,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fputc@plt>

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

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