void sys_Sendblock(unsigned int block) {
  unsigned int i;
  unsigned int WOffset;
  unsigned int BOffset;
  unsigned int aword;
  unsigned int blocks;
  unsigned int shift_number;
  volatile unsigned int *com = (unsigned int *)0xfe000000;
  *com = (unsigned int)'*';
  while (1) {
    blocks = block & 0x000000ff;
    block = block >> 8;
    *com = blocks;
    if (block <= 0)
      break;
  }
  *com = (unsigned int)'#';
  for (i = 0; i < 512; i++) {
    aword = 0;
    WOffset = i >> 2;
    BOffset = i & 0x00000003;
    shift_number = BOffset << 3;
    aword = *((unsigned int *)(0x00007a08) + WOffset);
    while (shift_number) {
      aword >>= 1;
      shift_number--;
    }
    *com = aword & 0xff;
  }
}


x86 assembly (clang, -O0):
<sys_Sendblock>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0xfe000000,%eax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x2a,(%rax)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x18(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0x4(%rbp)
ja     1146 <sys_Sendblock+0x46>
jmp    114b <sys_Sendblock+0x4b>
jmp    111a <sys_Sendblock+0x1a>
mov    -0x28(%rbp),%rax
movl   $0x23,(%rax)
movl   $0x0,-0x8(%rbp)
cmpl   $0x200,-0x8(%rbp)
jae    11d9 <sys_Sendblock+0xd9>
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
mov    $0x7a08,%eax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     11bc <sys_Sendblock+0xbc>
mov    -0x14(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    119b <sys_Sendblock+0x9b>
mov    -0x14(%rbp),%ecx
and    $0xff,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115c <sys_Sendblock+0x5c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_Sendblock>:
mov    $0xfe000000,%eax
movl   $0x2a,(%rax)
mov    %edi,%ecx
nopl   (%rax)
movzbl %dil,%edx
shr    $0x8,%ecx
mov    %edx,(%rax)
cmp    $0xff,%edi
mov    %ecx,%edi
ja     1110 <sys_Sendblock+0x10>
movl   $0x23,(%rax)
xor    %ecx,%ecx
jmp    1140 <sys_Sendblock+0x40>
nopl   (%rax)
movzbl %dl,%edx
mov    %edx,(%rax)
add    $0x1,%ecx
cmp    $0x200,%ecx
je     117a <sys_Sendblock+0x7a>
mov    %ecx,%edx
and    $0xfffffffc,%edx
lea    0x0(,%rcx,8),%esi
mov    0x7a08(%rdx),%edx
test   $0x18,%sil
je     1130 <sys_Sendblock+0x30>
mov    %ecx,%esi
and    $0x3,%esi
shl    $0x3,%esi
neg    %esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
shr    $0x8,%edx
add    $0x8,%esi
jne    1170 <sys_Sendblock+0x70>
jmp    1130 <sys_Sendblock+0x30>
ret

LLVM IR (-O0):
define void @sys_Sendblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
store i32 %0, i32* %2
store i32* inttoptr (i64 4261412864 to i32*), i32** %9
%10 = load i32*, i32** %9
store volatile i32 42, i32* %10
br label %11
11: ; preds = %1, %21
%12 = load i32, i32* %2
%13 = and i32 %12, 255
store i32 %13, i32* %7
%14 = load i32, i32* %2
%15 = lshr i32 %14, 8
store i32 %15, i32* %2
%16 = load i32, i32* %7
%17 = load i32*, i32** %9
store volatile i32 %16, i32* %17
%18 = load i32, i32* %2
%19 = icmp ule i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %11
br label %22
21: ; preds = %11
br label %11
22: ; preds = %20
%23 = load i32*, i32** %9
store volatile i32 35, i32* %23
store i32 0, i32* %3
br label %24
24: ; preds = %50, %22
%25 = load i32, i32* %3
%26 = icmp ult i32 %25, 512
br i1 %26, label %27, label %53
27: ; preds = %24
store i32 0, i32* %6
%28 = load i32, i32* %3
%29 = lshr i32 %28, 2
store i32 %29, i32* %4
%30 = load i32, i32* %3
%31 = and i32 %30, 3
store i32 %31, i32* %5
%32 = load i32, i32* %5
%33 = shl i32 %32, 3
store i32 %33, i32* %8
%34 = load i32, i32* %4
%35 = zext i32 %34 to i64
%36 = getelementptr inbounds i32, i32* inttoptr (i64 31240 to i32*), i64 %35
%37 = load i32, i32* %36
store i32 %37, i32* %6
br label %38
38: ; preds = %41, %27
%39 = load i32, i32* %8
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %46
41: ; preds = %38
%42 = load i32, i32* %6
%43 = lshr i32 %42, 1
store i32 %43, i32* %6
%44 = load i32, i32* %8
%45 = add i32 %44, -1
store i32 %45, i32* %8
br label %38
46: ; preds = %38
%47 = load i32, i32* %6
%48 = and i32 %47, 255
%49 = load i32*, i32** %9
store volatile i32 %48, i32* %49
br label %50
50: ; preds = %46
%51 = load i32, i32* %3
%52 = add i32 %51, 1
store i32 %52, i32* %3
br label %24
53: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @sys_Sendblock(i32 %0) {
store volatile i32 42, i32* inttoptr (i64 4261412864 to i32*)
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = and i32 %3, 255
%5 = lshr i32 %3, 8
store volatile i32 %4, i32* inttoptr (i64 4261412864 to i32*)
%6 = icmp ult i32 %3, 256
br i1 %6, label %7, label %2
7: ; preds = %2
store volatile i32 35, i32* inttoptr (i64 4261412864 to i32*)
br label %8
8: ; preds = %7, %23
%9 = phi i32 [ 0, %7 ], [ %26, %23 ]
%10 = lshr i32 %9, 2
%11 = shl nuw nsw i32 %9, 3
%12 = and i32 %11, 24
%13 = zext i32 %10 to i64
%14 = getelementptr inbounds i32, i32* inttoptr (i64 31240 to i32*), i64 %13
%15 = load i32, i32* %14
%16 = icmp eq i32 %12, 0
br i1 %16, label %23, label %17
17: ; preds = %8, %17
%18 = phi i32 [ %21, %17 ], [ %12, %8 ]
%19 = phi i32 [ %20, %17 ], [ %15, %8 ]
%20 = lshr i32 %19, 8
%21 = add nsw i32 %18, -8
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %17
23: ; preds = %17, %8
%24 = phi i32 [ %15, %8 ], [ %20, %17 ]
%25 = and i32 %24, 255
store volatile i32 %25, i32* inttoptr (i64 4261412864 to i32*)
%26 = add nuw nsw i32 %9, 1
%27 = icmp eq i32 %26, 512
br i1 %27, label %28, label %8
28: ; preds = %23
ret void
}