#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*/ Dorado9211WriteReg(int, unsigned long);
void DoradoProgramFRMload(void) {
  unsigned long DoradoFRMtable[] = {
      0x00000000, 0x00000000, 0x01000100, 0x01000100, 0x01010101, 0x01010101,
      0x02081041, 0x02081041, 0x10111111, 0x11111101, 0x49249241, 0x12412492,
      0x92244891, 0x92244891, 0x22252525, 0x22252525, 0x528294a5, 0x2528494a,
      0x294a5295, 0x294a5295, 0x54a54a95, 0x2952a52a, 0x2a552a55, 0x2a552a55,
      0x554aa955, 0x2a9552aa, 0x2aaa5555, 0x2aaa5555, 0x55555555, 0x2aaaaaaa,
      0x55555555, 0x55555555, 0xaaaaaaab, 0x55555555, 0x5555aaab, 0x5555aaab,
      0xaab556ab, 0x556aad55, 0x55ab55ab, 0x55ab55ab, 0xab5ab56b, 0x56ad5ad5,
      0x56b5ad6b, 0x56b5ad6b, 0xad6d6b5b, 0x5ad6b6b6, 0x5b5b5b5b, 0x5b5b5b5b,
      0x5F6db6db, 0x5F6db6db, 0xF776F776, 0xF776F776, 0xFBDEFBDE, 0xFBDEFBDE,
      0x7eFFBFF7, 0x7eFFBFF7, 0xFF7FF7F7, 0xFF7FF7F7, 0xFF7FFF7F, 0xFF7FFF7F,
      0xFFF7FFFF, 0xFFF7FFFF, 0xFFFFFFFF, 0xFFFFFFFF,
  };
  unsigned char i;
  unsigned short index;
  unsigned long data;
  Dorado9211WriteReg(0x00000400 + 0x18, 0);
  index = 0x00000400 + 0x1C;
  for (i = 0; i < 64; i += 2) {
    data = DoradoFRMtable[i];
    Dorado9211WriteReg(index, data);
    data = DoradoFRMtable[i + 1];
    Dorado9211WriteReg(index, data);
  }
  Dorado9211WriteReg(0x00000400 + 0x18, 0);
  Dorado9211WriteReg(0x00000400 + 0x1C, 0);
  Dorado9211WriteReg(0x00000400 + 0x1C, 0);
}


x86 assembly (clang, -O0):
<DoradoProgramFRMload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
lea    -0x200(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x200,%edx
call   1040 <memcpy@plt>
mov    $0x418,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <Dorado9211WriteReg@plt>
movw   $0x41c,-0x204(%rbp)
1c 04
movb   $0x0,-0x201(%rbp)
movzbl -0x201(%rbp),%eax
cmp    $0x40,%eax
jge    11dd <DoradoProgramFRMload+0xbd>
movzbl -0x201(%rbp),%eax
mov    -0x200(%rbp,%rax,8),%rax
ff
mov    %rax,-0x210(%rbp)
movzwl -0x204(%rbp),%edi
mov    -0x210(%rbp),%rsi
call   1030 <Dorado9211WriteReg@plt>
movzbl -0x201(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x200(%rbp,%rax,8),%rax
ff
mov    %rax,-0x210(%rbp)
movzwl -0x204(%rbp),%edi
mov    -0x210(%rbp),%rsi
call   1030 <Dorado9211WriteReg@plt>
movzbl -0x201(%rbp),%eax
add    $0x2,%eax
mov    %al,-0x201(%rbp)
jmp    1161 <DoradoProgramFRMload+0x41>
mov    $0x418,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <Dorado9211WriteReg@plt>
mov    $0x41c,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <Dorado9211WriteReg@plt>
mov    $0x41c,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <Dorado9211WriteReg@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoradoProgramFRMload>:
push   %r15
push   %r14
push   %rbx
mov    $0x418,%edi
xor    %esi,%esi
call   1030 <Dorado9211WriteReg@plt>
mov    $0xfffffffffffffffe,%rbx
lea    0xed1(%rip),%r15
nop
mov    0x10(%r15,%rbx,8),%rsi
mov    0x18(%r15,%rbx,8),%r14
mov    $0x41c,%edi
call   1030 <Dorado9211WriteReg@plt>
mov    $0x41c,%edi
mov    %r14,%rsi
call   1030 <Dorado9211WriteReg@plt>
add    $0x2,%rbx
cmp    $0x3e,%rbx
jb     1130 <DoradoProgramFRMload+0x20>
mov    $0x418,%edi
xor    %esi,%esi
call   1030 <Dorado9211WriteReg@plt>
mov    $0x41c,%edi
xor    %esi,%esi
call   1030 <Dorado9211WriteReg@plt>
mov    $0x41c,%edi
xor    %esi,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <Dorado9211WriteReg@plt>

LLVM IR (-O0):
@__const.DoradoProgramFRMload.DoradoFRMtable = [64 x i64] [i64 0, i64 0, i64 16777472, i64 16777472, i64 16843009, i64 16843009, i64 34082881, i64 34082881, i64 269553937, i64 286331137, i64 1227133505, i64 306259090, i64 2451851409, i64 2451851409, i64 572859685, i64 572859685, i64 1384289445, i64 623397194, i64 692736661, i64 692736661, i64 1420118677, i64 693282090, i64 710224469, i64 710224469, i64 1430956373, i64 714429098, i64 715806037, i64 715806037, i64 1431655765, i64 715827882, i64 1431655765, i64 1431655765, i64 2863311531, i64 1431655765, i64 1431677611, i64 1431677611, i64 2864010923, i64 1433054549, i64 1437291947, i64 1437291947, i64 2874848619, i64 1454201557, i64 1454746987, i64 1454746987, i64 2909629275, i64 1524020918, i64 1532713819, i64 1532713819, i64 1601025755, i64 1601025755, i64 4151768950, i64 4151768950, i64 4225694686, i64 4225694686, i64 2130690039, i64 2130690039, i64 4286576631, i64 4286576631, i64 4286578559, i64 4286578559, i64 4294443007, i64 4294443007, i64 4294967295, i64 4294967295]
define void @DoradoProgramFRMload() {
%1 = alloca [64 x i64]
%2 = alloca i8
%3 = alloca i16
%4 = alloca i64
%5 = bitcast [64 x i64]* %1 to i8*
%6 = call i32 @Dorado9211WriteReg(i32 1048, i64 0)
store i16 1052, i16* %3
store i8 0, i8* %2
br label %7
7: ; preds = %30, %0
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = icmp slt i32 %9, 64
br i1 %10, label %11, label %35
11: ; preds = %7
%12 = load i8, i8* %2
%13 = zext i8 %12 to i64
%14 = getelementptr inbounds [64 x i64], [64 x i64]* %1, i64 0, i64 %13
%15 = load i64, i64* %14
store i64 %15, i64* %4
%16 = load i16, i16* %3
%17 = zext i16 %16 to i32
%18 = load i64, i64* %4
%19 = call i32 @Dorado9211WriteReg(i32 %17, i64 %18)
%20 = load i8, i8* %2
%21 = zext i8 %20 to i32
%22 = add nsw i32 %21, 1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [64 x i64], [64 x i64]* %1, i64 0, i64 %23
%25 = load i64, i64* %24
store i64 %25, i64* %4
%26 = load i16, i16* %3
%27 = zext i16 %26 to i32
%28 = load i64, i64* %4
%29 = call i32 @Dorado9211WriteReg(i32 %27, i64 %28)
br label %30
30: ; preds = %11
%31 = load i8, i8* %2
%32 = zext i8 %31 to i32
%33 = add nsw i32 %32, 2
%34 = trunc i32 %33 to i8
store i8 %34, i8* %2
br label %7
35: ; preds = %7
%36 = call i32 @Dorado9211WriteReg(i32 1048, i64 0)
%37 = call i32 @Dorado9211WriteReg(i32 1052, i64 0)
%38 = call i32 @Dorado9211WriteReg(i32 1052, i64 0)
ret void
}

LLVM IR (-O2):
@__const.DoradoProgramFRMload.DoradoFRMtable = [64 x i64] [i64 0, i64 0, i64 16777472, i64 16777472, i64 16843009, i64 16843009, i64 34082881, i64 34082881, i64 269553937, i64 286331137, i64 1227133505, i64 306259090, i64 2451851409, i64 2451851409, i64 572859685, i64 572859685, i64 1384289445, i64 623397194, i64 692736661, i64 692736661, i64 1420118677, i64 693282090, i64 710224469, i64 710224469, i64 1430956373, i64 714429098, i64 715806037, i64 715806037, i64 1431655765, i64 715827882, i64 1431655765, i64 1431655765, i64 2863311531, i64 1431655765, i64 1431677611, i64 1431677611, i64 2864010923, i64 1433054549, i64 1437291947, i64 1437291947, i64 2874848619, i64 1454201557, i64 1454746987, i64 1454746987, i64 2909629275, i64 1524020918, i64 1532713819, i64 1532713819, i64 1601025755, i64 1601025755, i64 4151768950, i64 4151768950, i64 4225694686, i64 4225694686, i64 2130690039, i64 2130690039, i64 4286576631, i64 4286576631, i64 4286578559, i64 4286578559, i64 4294443007, i64 4294443007, i64 4294967295, i64 4294967295]
define void @DoradoProgramFRMload() {
%1 = tail call i32 @Dorado9211WriteReg(i32 1048, i64 0)
br label %2
2: ; preds = %0, %2
%3 = phi i64 [ 0, %0 ], [ %11, %2 ]
%4 = getelementptr inbounds [64 x i64], [64 x i64]* @__const.DoradoProgramFRMload.DoradoFRMtable, i64 0, i64 %3
%5 = load i64, i64* %4
%6 = tail call i32 @Dorado9211WriteReg(i32 1052, i64 %5)
%7 = or i64 %3, 1
%8 = getelementptr inbounds [64 x i64], [64 x i64]* @__const.DoradoProgramFRMload.DoradoFRMtable, i64 0, i64 %7
%9 = load i64, i64* %8
%10 = tail call i32 @Dorado9211WriteReg(i32 1052, i64 %9)
%11 = add nuw nsw i64 %3, 2
%12 = icmp ult i64 %3, 62
br i1 %12, label %2, label %13
13: ; preds = %2
%14 = tail call i32 @Dorado9211WriteReg(i32 1048, i64 0)
%15 = tail call i32 @Dorado9211WriteReg(i32 1052, i64 0)
%16 = tail call i32 @Dorado9211WriteReg(i32 1052, i64 0)
ret void
}