void sdram_init(void) {
  regmask32(0x44e00000 + 0x28, (0b11 << 0), (0b10 << 0));
  while ((regread32(0x44e00000 + 0x28) & (0b11 << 0)) != (0b10 << 0))
    ;
  regmask32(0x44e00400 + 0x94, (0b111 << 0), (0x4 << 0));
  while (!(regread32(0x44e00400 + 0x34) & (1 << 8)))
    ;
  regmask32(0x44e00400 + 0x40, (1 << 23) | (0x7ff << 8) | (0x7f << 0),
            (0 << 23) | (0x109 << 8) | (0x17 << 0));
  regmask32(0x44e00400 + 0xa0, (0b11111 << 0), (0x1 << 0));
  regmask32(0x44e00400 + 0x94, (0b111 << 0), (0x7 << 0));
  while (!(regread32(0x44e00400 + 0x34) & (1 << 0)))
    ;
  regmask32(0x44e10000 + 0xe0c, (1 << 6), (1 << 6));
  regmask32(0x44e10000 + 0xe0c, (1 << 1), (0 << 1));
  regmask32(0x44e10000 + 0xe0c, (1 << 1), (1 << 1));
  while (!(regread32(0x44e10000 + 0xe0c) & (1 << 5)))
    ;
  regwrite32(0x44e12000 + 0x01c, 0x80);
  regwrite32(0x44e12000 + 0x050, 0x80);
  regwrite32(0x44e12000 + 0x084, 0x80);
  regwrite32(0x44e12000 + 0x028, 1);
  regwrite32(0x44e12000 + 0x05c, 1);
  regwrite32(0x44e12000 + 0x090, 1);
  regwrite32(0x44e12000 + 0x02c, 0);
  regwrite32(0x44e12000 + 0x060, 0);
  regwrite32(0x44e12000 + 0x094, 0);
  regwrite32(0x44e12000 + 0x0c8, 0x38);
  regwrite32(0x44e12000 + 0x16c, 0x38);
  regwrite32(0x44e12000 + 0x0dc, 0x44);
  regwrite32(0x44e12000 + 0x180, 0x44);
  regwrite32(0x44e12000 + 0x0f0, 0);
  regwrite32(0x44e12000 + 0x194, 0);
  regwrite32(0x44e12000 + 0x0fc, 0);
  regwrite32(0x44e12000 + 0x1a0, 0);
  regwrite32(0x44e12000 + 0x134, 0);
  regwrite32(0x44e12000 + 0x1d8, 0);
  regwrite32(0x44e12000 + 0x138, 0);
  regwrite32(0x44e12000 + 0x1dc, 0);
  regwrite32(0x44e12000 + 0x108, 0x7d);
  regwrite32(0x44e12000 + 0x1ac, 0x7d);
  regwrite32(0x44e12000 + 0x120, 0x7d);
  regwrite32(0x44e12000 + 0x1c4, 0x7d);
  regwrite32(0x44e10000 + 0x1404, 0x18b);
  regwrite32(0x44e10000 + 0x1408, 0x18b);
  regwrite32(0x44e10000 + 0x140c, 0x18b);
  regwrite32(0x44e10000 + 0x1440, 0x18b);
  regwrite32(0x44e10000 + 0x1444, 0x18b);
  regwrite32(0x4c000000 + 0xe4, 0x00100007);
  regwrite32(0x4c000000 + 0xe8, 0x00100007);
  regwrite32(0x44e10000 + 0x131c, 1);
  regwrite32(0x4c000000 + 0x18, 0x0aaad4db);
  regwrite32(0x4c000000 + 0x1c, 0x0aaad4db);
  regwrite32(0x4c000000 + 0x20, 0x266b7fda);
  regwrite32(0x4c000000 + 0x24, 0x266b7fda);
  regwrite32(0x4c000000 + 0x28, 0x501f867f);
  regwrite32(0x4c000000 + 0x2c, 0x501f867f);
  regwrite32(0x4c000000 + 0x10, 0x2800);
  regwrite32(0x4c000000 + 0xc8, 0x50074be4);
  regwrite32(0x44e10000 + 0x110, 0x61c05332);
  regwrite32(0x4c000000 + 0x08, 0x61c05332);
  regwrite32(0x4c000000 + 0x10, 0xc30);
  regwrite32(0x4c000000 + 0x14, 0xc30);
  regwrite32(0x4c000000 + 0x08, 0x61c05332);
}


x86 assembly (clang, -O0):
<sdram_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44e00028,%edi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x0,%al
call   1040 <regmask32@plt>
mov    $0x44e00028,%edi
mov    $0x0,%al
call   1030 <regread32@plt>
and    $0x3,%eax
cmp    $0x2,%eax
je     1167 <sdram_init+0x37>
jmp    114a <sdram_init+0x1a>
mov    $0x44e00494,%edi
mov    $0x7,%esi
mov    $0x4,%edx
mov    $0x0,%al
call   1040 <regmask32@plt>
mov    $0x44e00434,%edi
mov    $0x0,%al
call   1030 <regread32@plt>
and    $0x100,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11a3 <sdram_init+0x73>
jmp    11a8 <sdram_init+0x78>
jmp    117d <sdram_init+0x4d>
mov    $0x44e00440,%edi
mov    $0x87ff7f,%esi
mov    $0x10917,%edx
mov    $0x0,%al
call   1040 <regmask32@plt>
mov    $0x44e004a0,%edi
mov    $0x1f,%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <regmask32@plt>
mov    $0x44e00494,%edi
mov    $0x7,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1040 <regmask32@plt>
mov    $0x44e00434,%edi
mov    $0x0,%al
call   1030 <regread32@plt>
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    120b <sdram_init+0xdb>
jmp    1210 <sdram_init+0xe0>
jmp    11e7 <sdram_init+0xb7>
mov    $0x44e10e0c,%edi
mov    $0x40,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1040 <regmask32@plt>
mov    $0x44e10e0c,%edi
mov    $0x2,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1040 <regmask32@plt>
mov    $0x44e10e0c,%edi
mov    $0x2,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1040 <regmask32@plt>
mov    $0x44e10e0c,%edi
mov    $0x0,%al
call   1030 <regread32@plt>
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    126d <sdram_init+0x13d>
jmp    1272 <sdram_init+0x142>
jmp    1249 <sdram_init+0x119>
mov    $0x44e1201c,%edi
mov    $0x80,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12050,%edi
mov    $0x80,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12084,%edi
mov    $0x80,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12028,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e1205c,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12090,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e1202c,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12060,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12094,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e120c8,%edi
mov    $0x38,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e1216c,%edi
mov    $0x38,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e120dc,%edi
mov    $0x44,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12180,%edi
mov    $0x44,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e120f0,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12194,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e120fc,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e121a0,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12134,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e121d8,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12138,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e121dc,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12108,%edi
mov    $0x7d,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e121ac,%edi
mov    $0x7d,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e12120,%edi
mov    $0x7d,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e121c4,%edi
mov    $0x7d,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e11404,%edi
mov    $0x18b,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e11408,%edi
mov    $0x18b,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e1140c,%edi
mov    $0x18b,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e11440,%edi
mov    $0x18b,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e11444,%edi
mov    $0x18b,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c0000e4,%edi
mov    $0x100007,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c0000e8,%edi
mov    $0x100007,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e1131c,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c000018,%edi
mov    $0xaaad4db,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c00001c,%edi
mov    $0xaaad4db,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c000020,%edi
mov    $0x266b7fda,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c000024,%edi
mov    $0x266b7fda,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c000028,%edi
mov    $0x501f867f,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c00002c,%edi
mov    $0x501f867f,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c000010,%edi
mov    $0x2800,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c0000c8,%edi
mov    $0x50074be4,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x44e10110,%edi
mov    $0x61c05332,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c000008,%edi
mov    $0x61c05332,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c000010,%edi
mov    $0xc30,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c000014,%edi
mov    $0xc30,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
mov    $0x4c000008,%edi
mov    $0x61c05332,%esi
mov    $0x0,%al
call   1050 <regwrite32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdram_init>:
push   %rax
mov    $0x44e00028,%edi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <regmask32@plt>
nopw   0x0(%rax,%rax,1)
mov    $0x44e00028,%edi
xor    %eax,%eax
call   1030 <regread32@plt>
and    $0x3,%eax
cmp    $0x2,%eax
jne    1150 <sdram_init+0x20>
mov    $0x44e00494,%edi
mov    $0x7,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1040 <regmask32@plt>
nopw   0x0(%rax,%rax,1)
mov    $0x44e00434,%edi
xor    %eax,%eax
call   1030 <regread32@plt>
test   $0x100,%eax
je     1180 <sdram_init+0x50>
mov    $0x44e00440,%edi
mov    $0x87ff7f,%esi
mov    $0x10917,%edx
xor    %eax,%eax
call   1040 <regmask32@plt>
mov    $0x44e004a0,%edi
mov    $0x1f,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <regmask32@plt>
mov    $0x44e00494,%edi
mov    $0x7,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1040 <regmask32@plt>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x44e00434,%edi
xor    %eax,%eax
call   1030 <regread32@plt>
test   $0x1,%al
je     11e0 <sdram_init+0xb0>
mov    $0x44e10e0c,%edi
mov    $0x40,%esi
mov    $0x40,%edx
xor    %eax,%eax
call   1040 <regmask32@plt>
mov    $0x44e10e0c,%edi
mov    $0x2,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <regmask32@plt>
mov    $0x44e10e0c,%edi
mov    $0x2,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <regmask32@plt>
nop
mov    $0x44e10e0c,%edi
xor    %eax,%eax
call   1030 <regread32@plt>
test   $0x20,%al
je     1230 <sdram_init+0x100>
mov    $0x44e1201c,%edi
mov    $0x80,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12050,%edi
mov    $0x80,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12084,%edi
mov    $0x80,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12028,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e1205c,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12090,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e1202c,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12060,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12094,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e120c8,%edi
mov    $0x38,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e1216c,%edi
mov    $0x38,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e120dc,%edi
mov    $0x44,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12180,%edi
mov    $0x44,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e120f0,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12194,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e120fc,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e121a0,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12134,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e121d8,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12138,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e121dc,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12108,%edi
mov    $0x7d,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e121ac,%edi
mov    $0x7d,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e12120,%edi
mov    $0x7d,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e121c4,%edi
mov    $0x7d,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e11404,%edi
mov    $0x18b,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e11408,%edi
mov    $0x18b,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e1140c,%edi
mov    $0x18b,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e11440,%edi
mov    $0x18b,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e11444,%edi
mov    $0x18b,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c0000e4,%edi
mov    $0x100007,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c0000e8,%edi
mov    $0x100007,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e1131c,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c000018,%edi
mov    $0xaaad4db,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c00001c,%edi
mov    $0xaaad4db,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c000020,%edi
mov    $0x266b7fda,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c000024,%edi
mov    $0x266b7fda,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c000028,%edi
mov    $0x501f867f,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c00002c,%edi
mov    $0x501f867f,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c000010,%edi
mov    $0x2800,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c0000c8,%edi
mov    $0x50074be4,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x44e10110,%edi
mov    $0x61c05332,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c000008,%edi
mov    $0x61c05332,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c000010,%edi
mov    $0xc30,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c000014,%edi
mov    $0xc30,%esi
xor    %eax,%eax
call   1050 <regwrite32@plt>
mov    $0x4c000008,%edi
mov    $0x61c05332,%esi
xor    %eax,%eax
pop    %rcx
jmp    1050 <regwrite32@plt>

LLVM IR (-O0):
define void @sdram_init() {
%1 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155530792, i32 3, i32 2)
br label %2
2: ; preds = %6, %0
%3 = call i32 (i32, ...) bitcast (i32 (...)* @regread32 to i32 (i32, ...)*)(i32 1155530792)
%4 = and i32 %3, 3
%5 = icmp ne i32 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155531924, i32 7, i32 4)
br label %9
9: ; preds = %14, %7
%10 = call i32 (i32, ...) bitcast (i32 (...)* @regread32 to i32 (i32, ...)*)(i32 1155531828)
%11 = and i32 %10, 256
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br i1 %13, label %14, label %15
14: ; preds = %9
br label %9
15: ; preds = %9
%16 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155531840, i32 8912767, i32 67863)
%17 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155531936, i32 31, i32 1)
%18 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155531924, i32 7, i32 7)
br label %19
19: ; preds = %24, %15
%20 = call i32 (i32, ...) bitcast (i32 (...)* @regread32 to i32 (i32, ...)*)(i32 1155531828)
%21 = and i32 %20, 1
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
br i1 %23, label %24, label %25
24: ; preds = %19
br label %19
25: ; preds = %19
%26 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155599884, i32 64, i32 64)
%27 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155599884, i32 2, i32 0)
%28 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155599884, i32 2, i32 2)
br label %29
29: ; preds = %34, %25
%30 = call i32 (i32, ...) bitcast (i32 (...)* @regread32 to i32 (i32, ...)*)(i32 1155599884)
%31 = and i32 %30, 32
%32 = icmp ne i32 %31, 0
%33 = xor i1 %32, true
br i1 %33, label %34, label %35
34: ; preds = %29
br label %29
35: ; preds = %29
%36 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604508, i32 128)
%37 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604560, i32 128)
%38 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604612, i32 128)
%39 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604520, i32 1)
%40 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604572, i32 1)
%41 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604624, i32 1)
%42 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604524, i32 0)
%43 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604576, i32 0)
%44 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604628, i32 0)
%45 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604680, i32 56)
%46 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604844, i32 56)
%47 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604700, i32 68)
%48 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604864, i32 68)
%49 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604720, i32 0)
%50 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604884, i32 0)
%51 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604732, i32 0)
%52 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604896, i32 0)
%53 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604788, i32 0)
%54 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604952, i32 0)
%55 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604792, i32 0)
%56 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604956, i32 0)
%57 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604744, i32 125)
%58 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604908, i32 125)
%59 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604768, i32 125)
%60 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604932, i32 125)
%61 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601412, i32 395)
%62 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601416, i32 395)
%63 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601420, i32 395)
%64 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601472, i32 395)
%65 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601476, i32 395)
%66 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068644, i32 1048583)
%67 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068648, i32 1048583)
%68 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601180, i32 1)
%69 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068440, i32 178967771)
%70 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068444, i32 178967771)
%71 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068448, i32 644579290)
%72 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068452, i32 644579290)
%73 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068456, i32 1344243327)
%74 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068460, i32 1344243327)
%75 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068432, i32 10240)
%76 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068616, i32 1342655460)
%77 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155596560, i32 1639994162)
%78 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068424, i32 1639994162)
%79 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068432, i32 3120)
%80 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068436, i32 3120)
%81 = call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068424, i32 1639994162)
ret void
}

LLVM IR (-O2):
define void @sdram_init() {
%1 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155530792, i32 3, i32 2)
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @regread32 to i32 (i32, ...)*)(i32 1155530792)
%4 = and i32 %3, 3
%5 = icmp eq i32 %4, 2
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155531924, i32 7, i32 4)
br label %8
8: ; preds = %8, %6
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @regread32 to i32 (i32, ...)*)(i32 1155531828)
%10 = and i32 %9, 256
%11 = icmp eq i32 %10, 0
br i1 %11, label %8, label %12
12: ; preds = %8
%13 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155531840, i32 8912767, i32 67863)
%14 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155531936, i32 31, i32 1)
%15 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155531924, i32 7, i32 7)
br label %16
16: ; preds = %16, %12
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @regread32 to i32 (i32, ...)*)(i32 1155531828)
%18 = and i32 %17, 1
%19 = icmp eq i32 %18, 0
br i1 %19, label %16, label %20
20: ; preds = %16
%21 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155599884, i32 64, i32 64)
%22 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155599884, i32 2, i32 0)
%23 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @regmask32 to i32 (i32, i32, i32, ...)*)(i32 1155599884, i32 2, i32 2)
br label %24
24: ; preds = %24, %20
%25 = tail call i32 (i32, ...) bitcast (i32 (...)* @regread32 to i32 (i32, ...)*)(i32 1155599884)
%26 = and i32 %25, 32
%27 = icmp eq i32 %26, 0
br i1 %27, label %24, label %28
28: ; preds = %24
%29 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604508, i32 128)
%30 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604560, i32 128)
%31 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604612, i32 128)
%32 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604520, i32 1)
%33 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604572, i32 1)
%34 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604624, i32 1)
%35 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604524, i32 0)
%36 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604576, i32 0)
%37 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604628, i32 0)
%38 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604680, i32 56)
%39 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604844, i32 56)
%40 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604700, i32 68)
%41 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604864, i32 68)
%42 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604720, i32 0)
%43 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604884, i32 0)
%44 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604732, i32 0)
%45 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604896, i32 0)
%46 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604788, i32 0)
%47 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604952, i32 0)
%48 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604792, i32 0)
%49 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604956, i32 0)
%50 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604744, i32 125)
%51 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604908, i32 125)
%52 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604768, i32 125)
%53 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155604932, i32 125)
%54 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601412, i32 395)
%55 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601416, i32 395)
%56 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601420, i32 395)
%57 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601472, i32 395)
%58 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601476, i32 395)
%59 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068644, i32 1048583)
%60 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068648, i32 1048583)
%61 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155601180, i32 1)
%62 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068440, i32 178967771)
%63 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068444, i32 178967771)
%64 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068448, i32 644579290)
%65 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068452, i32 644579290)
%66 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068456, i32 1344243327)
%67 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068460, i32 1344243327)
%68 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068432, i32 10240)
%69 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068616, i32 1342655460)
%70 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1155596560, i32 1639994162)
%71 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068424, i32 1639994162)
%72 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068432, i32 3120)
%73 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068436, i32 3120)
%74 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @regwrite32 to i32 (i32, i32, ...)*)(i32 1275068424, i32 1639994162)
ret void
}