+{
+ unsigned int r5;
+ unsigned int r2;
+ unsigned int r4;
+ unsigned char arr_59b64[1024];
+
+ r5 = 1;
+
+ do {
+ r2 = fn_59848(data);
+ if (r2 == 0)
+ break;
+
+ r2 = fn_598b4(data, 8) & 0xff;
+ r4 = r2;
+
+ fn_5980c(r4, mem);
+ arr_59b64[r5] = r4;
+ r2 = r5 + 1;
+ r2 = r2 << 22;
+ r2 = r2 >> 22;
+ r5 = r2;
+ } while(1);
+
+ /* CONT: 599a4 */
+
+}
+
+unsigned int crc_check_59684(unsigned char *arg1, unsigned int arg2, unsigned int magic)
+{
+ unsigned int r3;
+ unsigned int r4;
+ unsigned int r5;
+
+#if 0
+ if (r0 < 0xc0000000)
+ return 1;
+#endif
+
+ r4 = *((unsigned int*)arg1 + 0x20);
+ r5 = *((unsigned int*)arg1 + 0x24);
+
+ if (r5 != magic)
+ return 2;
+
+ if (arg2 >= r4)
+ r5 = 0;
+ else
+ return 3;
+
+ r5 = ~rsb_crc(~0x00, arg1, r4);
+ r3 = *((unsigned int*)(arg1 + r4));
+ printf("Checksums: 0x%02x <-> 0x%02x\n", r5, r3);
+
+ if (r3 == r5)
+ return 0;
+
+ return 0;
+}
+
+void fn_59508()