typedef unsigned char undefined; typedef unsigned char undefined1; typedef unsigned short undefined2; typedef unsigned int undefined4; typedef unsigned long undefined8; /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd00a0(undefined4 param_1) { _DAT_ffd0f0d8 = param_1; _DAT_ffd0f0dc = 0; _DAT_ffd0f0d0 = 0x3645dbf; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd00ec(void) { _DAT_ffd0f0d0 = _DAT_ffd0f0d0 & 0xfdfbffff; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 FUN_fffd0110(void) { return _DAT_ffd0f188; } /* WARNING: Removing unreachable block (ram,0xfffd0144) */ void FUN_fffd0120(void) { /* WARNING: Do nothing block with infinite loop */ do { } while( true ); } undefined8 serial_puts(char *param_1,byte param_2) { if (param_2 < 0x10) { for (; *param_1 != '\0'; param_1 = param_1 + 1) { serial_putc(*param_1); } } return 0; } void FUN_fffd0188(ulong param_1,int param_2,byte param_3) { uint uVar1; uint uVar2; char cVar3; if (param_3 < 0x10) { for (uVar2 = param_2 - 4; -1 < (int)uVar2; uVar2 = uVar2 - 4) { uVar1 = (uint)(param_1 >> ((ulong)uVar2 & 0x3f)) & 0xf; cVar3 = (char)uVar1; if (uVar1 < 10) { cVar3 = cVar3 + '0'; } else { cVar3 = cVar3 + 'W'; } serial_putc(cVar3); } } return; } void FUN_fffd01e0(ulong param_1,byte param_2) { uint uVar1; ulong uVar2; int iVar3; ulong uVar4; ulong uVar5; char acStack_20 [32]; if (param_2 < 0x10) { uVar4 = 0; do { uVar2 = param_1 / 10; acStack_20[uVar4] = (char)param_1 + (char)uVar2 * -10 + '0'; iVar3 = (int)uVar4; uVar5 = uVar4 & 0xffffffff; uVar4 = uVar4 + 1; param_1 = uVar2; } while (iVar3 + 1U < 0x20 && uVar2 != 0); do { iVar3 = (int)uVar5; uVar1 = iVar3 - 1; uVar5 = (ulong)uVar1; serial_putc(acStack_20[iVar3]); } while (uVar1 != 0xffffffff); } return; } void FUN_fffd0264(ulong param_1,int param_2) { uint uVar1; ulong uVar2; ulong uVar3; int iVar4; ulong uVar5; char acStack_20 [32]; uVar3 = 0; do { uVar2 = param_1 / 10; acStack_20[uVar3] = (char)param_1 + (char)uVar2 * -10 + '0'; uVar1 = (int)uVar3 + 1; uVar5 = uVar3 & 0xffffffff; uVar3 = uVar3 + 1; if (0x1f < uVar1) break; param_1 = uVar2; } while (uVar2 != 0); param_2 = param_2 - uVar1; while (param_2 = param_2 + -1, -1 < param_2) { serial_putc('0'); } do { iVar4 = (int)uVar5; uVar1 = iVar4 - 1; uVar5 = (ulong)uVar1; serial_putc(acStack_20[iVar4]); } while (uVar1 != 0xffffffff); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint FUN_fffd02e8(int param_1) { ushort uVar1; uint uVar2; ushort uVar3; uVar3 = 3; do { uVar1 = uVar3 & 1; uVar3 = _DAT_fe1a0008; } while (uVar1 != 0); uVar2 = (uint)_DAT_fe1a0064; if (param_1 == 1) { uVar2 = CONCAT22(_DAT_fe1a0068,_DAT_fe1a0064); } uVar3 = 0; do { uVar1 = uVar3 & 1; uVar3 = _DAT_fe1a0008; } while (uVar1 == 0); _DAT_fe1a0062 = 1; return uVar2; } void FUN_fffd036c(void) { uint uVar1; int iVar2; ushort *puVar3; long lVar4; int local_40 [16]; uVar1 = FUN_fffd02e8(1); for (lVar4 = 0; (uint)lVar4 < (uVar1 & 0xff); lVar4 = lVar4 + 1) { iVar2 = FUN_fffd02e8(1); local_40[lVar4] = iVar2; } if ((uVar1 & 0xfff7ffff) == 0x210005) { uVar1 = (uint)(local_40[3] - local_40[2]) >> 1 & 0xffff; if (uVar1 == 0) { return; } puVar3 = &DAT_fffdbb1c; } else { if (uVar1 != 0x3a0005) { return; } uVar1 = (uint)(local_40[3] - local_40[2]) >> 1 & 0xffff; if (uVar1 == 0) { return; } puVar3 = &DAT_fffdbb20; } if ((*puVar3 == 0) || (uVar1 < *puVar3)) { *puVar3 = (ushort)uVar1; } return; } void FUN_fffd0434(undefined param_1,long param_2) { char cVar1; byte bVar2; byte bVar3; byte bVar4; byte bVar5; uint uVar6; uint uVar7; undefined4 uVar8; uint uVar9; long lVar10; uint uVar11; uint uVar12; ulong uVar13; byte bVar14; int iVar15; int iVar16; undefined4 local_90 [32]; ulong local_10; lVar10 = *(long *)(param_2 + 0xa0); iVar15 = 2; if (*(short *)(lVar10 + 0x2a) == 0) { iVar15 = 1; } uVar6 = 0x10; if ((*(byte *)(lVar10 + 0xf) & 0xf) == 0) { uVar6 = 0x20; } if ((*(char *)(lVar10 + 0x12) == '\b') || (iVar16 = 1, *(char *)(lVar10 + 0x12) == '\x03')) { iVar16 = 2; } uVar7 = FUN_fffd02e8(1); serial_puts(s_INFO___End_of_Write_leveling_coa_fffdb00c + 0x1b,param_1); FUN_fffd0188(uVar7,0x20,param_1); serial_puts(0xfffdad60,param_1); uVar13 = (ulong)(uVar7 & 0xff); for (lVar10 = 0; (uint)lVar10 < (uint)uVar13; lVar10 = lVar10 + 1) { local_10 = uVar13; uVar8 = FUN_fffd02e8(1); local_90[lVar10] = uVar8; serial_puts(s__dmc_margin_tx___fffdb87e + 9,param_1); FUN_fffd0188(uVar8,0x20,param_1); serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc,param_1); uVar13 = local_10; } serial_puts(s__rx_clk_window__fffdb78a,param_1); if ((uVar7 == 0x1e0004) || (uVar7 == 0x200004)) { if (DAT_fffdbb30 != 0) { DAT_fffdbb2e = 0; DAT_fffdbb30 = 0; DAT_fffdbb31 = 0; } DAT_fffdbb31 = DAT_fffdbb31 + 1; } bVar5 = DAT_fffdbb30; if ((uVar7 == 0x230004) || (uVar7 == 0x1c0004)) { if (DAT_fffdbb30 == 0) { DAT_fffdbb2e = DAT_fffdbb30; DAT_fffdbb30 = 1; DAT_fffdbb31 = bVar5; } DAT_fffdbb31 = DAT_fffdbb31 + 1; } bVar5 = DAT_fffdbb30; if (DAT_fffdbb30 == 0) { LAB_fffd0600: bVar14 = 0x7f; } else { cVar1 = *(char *)(*(long *)(param_2 + 0xa0) + 0xe); if (cVar1 == '\x02') { bVar14 = 0x50; } else { bVar14 = 0x49; if (cVar1 != '\x01') goto LAB_fffd0600; } } if (uVar7 != 0x14001f) { return; } lVar10 = 0; do { if ((DAT_fffdbb2f & 1) == 0) { (&DAT_fffdbb38)[lVar10] = (char)local_90[lVar10]; } else { (&DAT_fffdbb58)[lVar10] = (char)local_90[lVar10]; } lVar10 = lVar10 + 1; } while (lVar10 != 0x1f); if ((DAT_fffdbb2f & 1) == 0) goto LAB_fffd07c4; uVar9 = (uint)DAT_fffdbb2e; bVar4 = DAT_fffdbb2e + 1; lVar10 = 0; uVar11 = 0; uVar7 = 0; do { bVar2 = (&DAT_fffdbb38)[lVar10]; if ((((bVar2 != 0) && (bVar3 = (&DAT_fffdbb58)[lVar10], bVar3 != 0)) && (bVar2 < bVar14)) && (bVar3 < bVar14)) { uVar11 = uVar11 + 1 & 0xff; uVar7 = uVar7 + (uint)bVar2 + (uint)bVar3; } lVar10 = lVar10 + 1; } while (lVar10 != 0x1f); lVar10 = *(long *)(param_2 + 0xa0); uVar12 = 0; if (uVar11 != 0) { uVar12 = uVar7 / (uVar11 << 1); } if ((*(char *)(lVar10 + 0xe) == '\x02') && (iVar16 == 2)) { uVar7 = (uint)DAT_fffdbb2e; if ((*(byte *)(lVar10 + 0x41) & 1) == 0) { if (iVar15 == 2) { if (DAT_fffdbb31 == 2) { uVar7 = uVar7 + 0x10; } else { if (DAT_fffdbb31 != 3) goto LAB_fffd076c; uVar7 = DAT_fffdbb2e - 0x10; } goto LAB_fffd0768; } } else if (iVar15 == 1) { if ((uVar7 - 0x12 & 0xff) < 0x10) { uVar7 = uVar7 - 2; LAB_fffd0768: uVar9 = uVar7 & 0xff; } } else { uVar9 = uVar7 - 0x12 & 0xff; if (0xf < uVar9) { uVar9 = uVar7; } if ((uVar9 - 0x24 & 0xff) < 0x10) { uVar9 = uVar9 - 0x14 & 0xff; } if ((uVar9 - 0x36 & 0xff) < 0x10) { uVar7 = uVar9 - 0x26; goto LAB_fffd0768; } } } LAB_fffd076c: DAT_fffdbb2e = bVar4; if (uVar9 < uVar6) { cVar1 = '\0'; if (uVar6 != 0) { cVar1 = (char)(uVar9 / uVar6); } lVar10 = lVar10 + (ulong)(byte)((char)uVar9 - cVar1 * (char)uVar6); if (bVar5 == 0) { LAB_fffd07c0: *(char *)(lVar10 + 0x274) = (char)uVar12; goto LAB_fffd07c4; } } else { if ((int)(uVar9 + uVar6 * -2) < 0 == SBORROW4(uVar9,uVar6 * 2)) goto LAB_fffd07c4; cVar1 = '\0'; if (uVar6 != 0) { cVar1 = (char)(uVar9 / uVar6); } lVar10 = lVar10 + (ulong)(byte)((char)uVar9 - cVar1 * (char)uVar6); if (bVar5 == 0) { uVar12 = *(byte *)(lVar10 + 0x274) + uVar12 >> 1; goto LAB_fffd07c0; } uVar12 = *(byte *)(lVar10 + 0x298) + uVar12 >> 1; } *(char *)(lVar10 + 0x298) = (char)uVar12; LAB_fffd07c4: DAT_fffdbb2f = DAT_fffdbb2f + 1; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 main(char param_1,long param_2) { byte bVar1; int iVar2; long lVar3; char *pcVar4; char cVar5; undefined4 uVar6; DAT_fffdbb2f = 0; DAT_fffdbb31 = 0; DAT_fffdbb2e = 0; DAT_fffdbb30 = 0; lVar3 = 0; do { (&DAT_fffdbb38)[lVar3] = 0; (&DAT_fffdbb58)[lVar3] = 0; lVar3 = lVar3 + 1; } while (lVar3 != 0x1f); do { while( true ) { iVar2 = FUN_fffd02e8(0); if (iVar2 != 0) break; pcVar4 = (char *)0xfffdad64; LAB_fffd08d4: serial_puts(pcVar4,param_1); } if (iVar2 == 1) { pcVar4 = s_Built___14_57_26__Sep_1_2020__g1_fffdad78 + 10; goto LAB_fffd08d4; } if (iVar2 == 2) { pcVar4 = s_Built___14_57_26__Sep_1_2020__g1_fffdad78 + 0x2d; goto LAB_fffd08d4; } if (iVar2 == 3) { pcVar4 = s_INFO___End_of_initialization_fffdadc4 + 5; goto LAB_fffd08d4; } if (iVar2 == 4) { pcVar4 = s_INFO___End_of_fine_write_levelin_fffdade2 + 0x15; goto LAB_fffd08d4; } if (iVar2 == 5) { pcVar4 = s_INFO___End_of_read_enable_traini_fffdae05 + 0x21; goto LAB_fffd08d4; } if (iVar2 == 6) { pcVar4 = s_INFO___End_of_write_delay_center_fffdae57 + 8; goto LAB_fffd08d4; } if (iVar2 == 7) { serial_puts(s_INFO___End_of_2D_read_delay_Volt_fffdae86 + 0x13,param_1); uVar6 = 0; goto LAB_fffd0a88; } if (iVar2 == 9) { pcVar4 = s_INFO___End_of_2D_write_delay_Vol_fffdaebf + 1; goto LAB_fffd08d4; } if (iVar2 == 10) { pcVar4 = s_INFO___End_of_2D_write_delay_Vol_fffdaebf + 0x2a; goto LAB_fffd08d4; } if (iVar2 == 0xb) { pcVar4 = s_INFO___Training_has_run_successf_fffdaef9 + 0x17; goto LAB_fffd08d4; } if (iVar2 == 0xc) { pcVar4 = s_INFO___End_of_max_read_latency_t_fffdaf20 + 0x17; goto LAB_fffd08d4; } if (iVar2 == 0xd) { pcVar4 = s_INFO___End_of_read_dq_deskew_tra_fffdaf49 + 0x16; goto LAB_fffd08d4; } if (iVar2 == 0xfd) { pcVar4 = s_INFO___End_of_LCDL_offset_calibr_fffdaf70 + 10; goto LAB_fffd08d4; } if (iVar2 == 0xfe) { pcVar4 = s_INFO___End_of_LRDIMM_Specific_tr_fffdaf97 + 0x15; goto LAB_fffd08d4; } if (iVar2 == 0xff) { serial_puts(s_INFO___End_of_CA_training_fffdafbf + 0x18,param_1); uVar6 = 0xff; LAB_fffd0a88: if ((*(char *)(*(long *)(param_2 + 0xa0) + 0x11) == '\t') && ((cVar5 = *(char *)(*(long *)(param_2 + 0xa0) + 0xe), cVar5 == '\x03' || (cVar5 == '\0')))) { _DAT_fe1a0000 = 0; serial_puts(s_INFO___End_of_Write_leveling_coa_fffdb00c + 0x1f,param_1); FUN_fffd0188(DAT_fffdbb1c,0x20,param_1); serial_puts(s_INFO___ERROR___Training_has_fail_fffdb037 + 0x10,param_1); FUN_fffd0188(DAT_fffdbb20,0x20,param_1); serial_puts(s_INFO___End_of_Write_leveling_coa_fffdb00c + 0x1f,param_1); FUN_fffd0188(DAT_fffdbb1e,0x20,param_1); serial_puts(s_INFO___End_of_Write_leveling_coa_fffdb00c + 0x1f,param_1); FUN_fffd0188(DAT_fffdbb22,0x20,param_1); _DAT_fe020184 = DAT_fffdbb1c; _DAT_fe020384 = DAT_fffdbb20; _DAT_fe020584 = DAT_fffdbb1e; _DAT_fe020784 = DAT_fffdbb22; _DAT_fe1a0000 = 1; } return uVar6; } if (iVar2 != 8) { serial_puts(s_INFO___End_of_MPR_read_delay_cen_fffdafda + 0x30,param_1); FUN_fffd0188(iVar2,0x20,param_1); pcVar4 = s__rx_clk_window__fffdb78a; goto LAB_fffd08d4; } bVar1 = *(byte *)(*(long *)(param_2 + 0xa0) + 0x11); if (bVar1 == 9) { FUN_fffd036c(param_1,param_2); } else { cVar5 = -1; if (param_1 == '\0') { cVar5 = -(5 < bVar1); } serial_puts(s_INFO___End_of_MPR_read_delay_cen_fffdafda + 0x22,cVar5); FUN_fffd0434(cVar5,param_2); } } while( true ); } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd0bb0(long param_1,char param_2) { long lVar1; long lVar2; uint uVar3; uint uVar4; ulong uVar5; uint uVar6; _DAT_fe1a0000 = 0; if (param_2 == '\x01') { serial_puts(&DAT_fffdb150,*(undefined *)(param_1 + 0x205)); uVar5 = 0; do { lVar1 = *(long *)(param_1 + 0xa0) + uVar5; uVar4 = (uint)uVar5; if (*(byte *)(lVar1 + 0x274) != 0) { uVar6 = (uVar4 & 7) << 8 | (uVar4 >> 3) << 0xc | 0x10040; *(ushort *)((ulong)uVar6 * 2 + 0xfe000000) = (ushort)*(byte *)(lVar1 + 0x274); *(ushort *)((ulong)(uVar6 - 0x10) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar1 + 0x274); if ((uVar4 & 7) == 7) { *(ushort *)((ulong)(uVar6 + 0x100) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar1 + 0x274); *(ushort *)((ulong)(uVar6 + 0xf0) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar1 + 0x274); } } serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc,*(undefined *)(param_1 + 0x205)); FUN_fffd0188(*(undefined *)(*(long *)(param_1 + 0xa0) + uVar5 + 0x274),0x20, *(undefined *)(param_1 + 0x205)); uVar5 = (ulong)(uVar4 + 1); } while (uVar4 + 1 != 0x20); goto LAB_fffd0dd0; } if (param_2 != '\x02') goto LAB_fffd0dd0; lVar1 = 0; lVar2 = *(long *)(param_1 + 0xa0); uVar4 = 0; uVar6 = 0; do { uVar3 = (uint)*(byte *)(lVar2 + lVar1 + 0x298); if (uVar3 != 0) { uVar6 = uVar6 + 1 & 0xff; uVar4 = uVar4 + uVar3; } lVar1 = lVar1 + 1; } while (lVar1 != 0x20); uVar3 = 0; if (uVar6 != 0) { uVar3 = uVar4 / uVar6; } if (uVar3 == 0) { LAB_fffd0ce8: uVar4 = 0; } else { uVar4 = 0; if (*(char *)(lVar2 + 0xe) == '\x01') { if (uVar3 < 0x17) { uVar4 = uVar3 & 0xff | 0x40; } else { uVar4 = uVar3 - 0x17 & 0xff; if ((uVar3 - 0x17 & 0xff) == 0) goto LAB_fffd0d34; } *(uint *)(*(long *)(param_1 + 0xa8) + 0x118) = uVar4 | *(uint *)(*(long *)(param_1 + 0xa8) + 0x118) & 0xff00; } LAB_fffd0d34: if (*(char *)(lVar2 + 0xe) == '\x02') { uVar4 = uVar3; if (0x1d < uVar3) { uVar4 = uVar3 - 0x1e | 0x40; } uVar4 = uVar4 & 0xff; *(uint *)(*(long *)(param_1 + 0xa8) + 300) = uVar4 | *(uint *)(*(long *)(param_1 + 0xa8) + 300) & 0xff80; } else if (uVar4 == 0) goto LAB_fffd0ce8; FUN_fffd7698(uVar4 >> 6,uVar4 & 0x3f,0,param_1); } _DAT_fe1a0000 = 0; _DAT_fe020104 = (undefined2)uVar3; serial_puts(&DAT_fffdb167,*(undefined *)(param_1 + 0x205)); FUN_fffd0188((char)uVar4,0x20,*(undefined *)(param_1 + 0x205)); serial_puts(s__rx_clk_window__fffdb78a,*(undefined *)(param_1 + 0x205)); LAB_fffd0dd0: if (*(char *)(param_1 + 0x264) != -1) { return; } FUN_fffd0120(10000); return; } void FUN_fffd0e08(long param_1) { byte *pbVar1; int iVar2; long lVar3; long lVar4; lVar4 = *(long *)(param_1 + 0xa0); if ((*(char *)(lVar4 + 0xc0) == '\0') && (*(char *)(lVar4 + 0xc1) == '\0')) { lVar4 = *(long *)(param_1 + 0x1a8); } else { lVar4 = lVar4 + 0xdc; } lVar3 = 0; do { iVar2 = (int)lVar3; pbVar1 = (byte *)(lVar4 + lVar3); lVar3 = lVar3 + 1; *(uint *)(ulong)(iVar2 * 4 - 0x9c7980) = (uint)*pbVar1; } while (lVar3 != 0x1a); return; } void FUN_fffd0e50(long param_1) { byte *pbVar1; uint uVar2; long lVar3; char *pcVar4; pcVar4 = *(char **)(param_1 + 0x1b0); lVar3 = *(long *)(param_1 + 0xa0); if ((*(char *)(lVar3 + 0xa0) != '\0') || (*(char *)(lVar3 + 0xa1) != '\0')) { pcVar4 = (char *)(lVar3 + 0xa0); } if ((*pcVar4 != '\0') || (pcVar4[1] != '\0')) { lVar3 = 0; do { uVar2 = (uint)lVar3; pbVar1 = (byte *)(pcVar4 + lVar3); lVar3 = lVar3 + 1; *(ushort *)((ulong)((uVar2 & 7) + 0xa0 | (uVar2 >> 3) << 0xc | 0x10000) * 2 + 0xfe000000) = (ushort)(*pbVar1 & 7); } while (lVar3 != 0x20); } return; } void FUN_fffd0ebc(long param_1) { byte bVar1; uint uVar2; uint uVar3; long lVar4; long lVar5; int iVar6; lVar4 = *(long *)(param_1 + 0xa0); bVar1 = *(byte *)(param_1 + 0x1b9); if (((*(char *)(lVar4 + 0xc0) == '\0') && (*(char *)(lVar4 + 0xc1) == '\0')) && (*(char *)(lVar4 + 0xc2) == '\0')) { lVar4 = *(long *)(param_1 + 0x1a0); } else { lVar4 = lVar4 + 0xc0; } if (*(char *)(param_1 + 0x1b8) == '\x02') { uVar2 = 0x14; } else { uVar2 = 10; if (*(char *)(param_1 + 0x1b8) != '\x03') { uVar2 = 0x1c; } } iVar6 = 0x120; for (lVar5 = 0; uVar3 = (uint)lVar5, uVar3 < uVar2; lVar5 = lVar5 + 1) { if (((byte)(*(char *)(param_1 + 0x1b8) - 2U) < 2) && (iVar6 = 0x106, uVar3 < 10)) { iVar6 = 0x100; } *(ushort *)((ulong)(iVar6 + uVar3 | (uint)bVar1 << 0x14 | 0x20000) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar4 + lVar5); } return; } uint FUN_fffd0f70(uint param_1) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; uVar2 = (param_1 & 0xfffff) >> 0x10 & 7; uVar3 = 2; if ((((uVar2 != 0) && (uVar3 = 3, uVar2 != 1)) && (uVar3 = 4, uVar2 != 2)) && ((uVar3 = 6, uVar2 != 3 && (uVar3 = 8, uVar2 != 4)))) { uVar3 = 0xfff; } uVar4 = (param_1 & 0xfffff) >> 10 & 0x1f; uVar2 = 0; if (uVar4 != 0) { uVar1 = 0; if (uVar4 != 0) { uVar1 = ((param_1 & 0x1ff) * 0x18) / uVar4; } uVar4 = 2; if ((param_1 & 0x80000) == 0) { uVar4 = 1; } uVar2 = 0; if (uVar3 != 0) { uVar2 = ((uVar1 >> (ulong)uVar4) << 1) / uVar3; } } return uVar2; } void FUN_fffd0ff4(uint *param_1) { for (; *param_1 != 0; param_1 = param_1 + 2) { *(undefined2 *)((ulong)*param_1 * 2 + 0xfe000000) = *(undefined2 *)(param_1 + 1); } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd1018(long param_1,char param_2,char param_3,uint param_4,ushort *param_5) { uint uVar1; uint uVar2; ushort uVar3; undefined2 uVar4; int iVar5; long lVar6; undefined2 *puVar7; long lVar8; long lVar9; uint uVar10; ulong uVar11; char cVar12; uint uVar13; ushort *puVar14; ulong uVar15; uVar1 = param_4 << 0x14; _DAT_fe1a0000 = 0; uVar3 = 0; uVar2 = uVar1 | 0x10000; cVar12 = '\x01'; uVar13 = 0x48; uVar11 = 0; uVar15 = 0; puVar14 = param_5; do { uVar10 = (uint)uVar11; if (uVar13 <= uVar10) { if (param_2 == '\b') { if (param_3 == '\x01') { lVar8 = (ulong)param_4 * 0x1ac; *(char *)(*(long *)(param_1 + 0xa0) + lVar8 + 0x2b9) = (char)*(undefined2 *)((ulong)((uVar1 | 0x10020) << 1) + 0xfe000000); *(char *)(*(long *)(param_1 + 0xa0) + lVar8 + 0x2ba) = (char)*(undefined2 *)((ulong)((uVar1 | 0x20020) << 1) + 0xfe000000); } else { lVar8 = *(long *)(param_1 + 0xa0) + (ulong)param_4 * 0x1ac; *(ushort *)((ulong)(uVar1 | 0x10020) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar8 + 0x2b9); *(ushort *)((ulong)(uVar1 | 0x11020) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar8 + 0x2b9); *(ushort *)((ulong)(uVar1 | 0x12020) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar8 + 0x2b9); *(ushort *)((ulong)(uVar1 | 0x13020) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar8 + 0x2b9); *(ushort *)((ulong)(uVar1 | 0x20020) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar8 + 0x2ba); } } else if (param_2 == '\t') { lVar8 = 0; do { uVar1 = (uint)lVar8 & 7; uVar2 = uVar1 << 8 | (((uint)lVar8 & 0xffff) >> 3) << 0xc | 0x10040; if (param_3 == '\x01') { *(byte *)((long)puVar14 + lVar8) = (byte)*(undefined2 *)((ulong)(uVar2 << 1) + 0xfe000000); } else if ((*(byte *)((long)puVar14 + lVar8) != 0) && (*(ushort *)((ulong)uVar2 * 2 + 0xfe000000) = (ushort)*(byte *)((long)puVar14 + lVar8), uVar1 == 7)) { *(ushort *)((ulong)(uVar2 + 0x100) * 2 + 0xfe000000) = (ushort)*(byte *)((long)puVar14 + lVar8); } lVar8 = lVar8 + 1; } while (lVar8 != 0x20); lVar8 = 0; do { if (param_3 == '\x01') { *(byte *)((long)puVar14 + lVar8 + 0x20) = (byte)*(undefined2 *) ((long)(int)(((int)lVar8 << 0xc | 0x10840U) << 1) + 0xfe000000); } lVar8 = lVar8 + 1; } while (lVar8 != 4); } else if (param_2 == '\v') { lVar8 = *(long *)(param_1 + 0xa0); if (param_3 == '\x01') { *(undefined2 *)(lVar8 + 0xf8) = *(undefined2 *)((ulong)((uVar1 | 0x200cb) << 1) + 0xfe000000); *(undefined2 *)(lVar8 + 0x112) = *(undefined2 *)((ulong)((uVar1 | 0x20077) << 1) + 0xfe000000); *(undefined2 *)(lVar8 + 0x114) = *(undefined2 *)((ulong)((uVar1 | 0x20072) << 1) + 0xfe000000); *(undefined2 *)(lVar8 + 0x116) = *(undefined2 *)((ulong)((uVar1 | 0x20073) << 1) + 0xfe000000); *(undefined2 *)(lVar8 + 0x118) = *(undefined2 *)((ulong)((uVar1 | 0x400fd) << 1) + 0xfe000000); *(undefined2 *)(lVar8 + 0x11a) = *(undefined2 *)((ulong)((uVar1 | 0x400c0) << 1) + 0xfe000000); iVar5 = 0; do { uVar2 = uVar1 | iVar5 << 0xc; iVar5 = iVar5 + 1; *(undefined2 *)(lVar8 + 0xfa) = *(undefined2 *)((ulong)((uVar2 | 0x100aa) << 1) + 0xfe000000); *(undefined2 *)(lVar8 + 0x102) = *(undefined2 *)((ulong)((uVar2 | 0x10062) << 1) + 0xfe000000); *(undefined2 *)(lVar8 + 0x10a) = *(undefined2 *)((ulong)((uVar2 | 0x10001) << 1) + 0xfe000000); lVar8 = lVar8 + 2; } while (iVar5 != 4); uVar11 = 0; do { uVar15 = uVar11 & 0xffff; iVar5 = (int)uVar11; uVar2 = iVar5 + 1; uVar11 = (ulong)uVar2; *(char *)(*(long *)(param_1 + 0xa0) + (long)iVar5 + 0x11c) = (char)*(undefined2 *) ((ulong)((uVar1 | 0x10030 | (int)(uVar15 >> 3) << 0xc | ((uint)uVar15 & 7) << 8) << 1) + 0xfe000000); } while (uVar2 != 0x20); lVar8 = 0; do { iVar5 = (int)lVar8; lVar8 = lVar8 + 1; *(char *)(*(long *)(param_1 + 0xa0) + (long)(iVar5 + 0x20) + 0x11c) = (char)*(undefined2 *)((ulong)((uVar1 | 0x10830 | iVar5 << 0xc) << 1) + 0xfe000000); } while (lVar8 != 4); } else { *(undefined2 *)((ulong)(uVar1 | 0x200cb) * 2 + 0xfe000000) = *(undefined2 *)(lVar8 + 0xf8) ; *(undefined2 *)((ulong)(uVar1 | 0x20077) * 2 + 0xfe000000) = *(undefined2 *)(lVar8 + 0x112); *(undefined2 *)((ulong)(uVar1 | 0x20072) * 2 + 0xfe000000) = *(undefined2 *)(lVar8 + 0x114); *(undefined2 *)((ulong)(uVar1 | 0x20073) * 2 + 0xfe000000) = *(undefined2 *)(lVar8 + 0x116); *(undefined2 *)((ulong)(uVar1 | 0x400fd) * 2 + 0xfe000000) = *(undefined2 *)(lVar8 + 0x118); *(undefined2 *)((ulong)(uVar1 | 0x400c0) * 2 + 0xfe000000) = *(undefined2 *)(lVar8 + 0x11a); iVar5 = 0; lVar6 = lVar8; do { uVar2 = uVar1 | iVar5 << 0xc; *(undefined2 *)((ulong)(uVar2 | 0x100aa) * 2 + 0xfe000000) = *(undefined2 *)(lVar6 + 0xfa); *(undefined2 *)((ulong)(uVar2 | 0x10062) * 2 + 0xfe000000) = *(undefined2 *)(lVar6 + 0x102); iVar5 = iVar5 + 1; *(undefined2 *)((ulong)(uVar2 | 0x10001) * 2 + 0xfe000000) = *(undefined2 *)(lVar6 + 0x10a); lVar6 = lVar6 + 2; } while (iVar5 != 4); uVar11 = 0; do { uVar15 = uVar11 & 0xffff; lVar6 = lVar8 + uVar11; uVar11 = uVar11 + 1; *(ushort *) ((ulong)(((uint)uVar15 & 7) << 8 | (int)(uVar15 >> 3) << 0xc | 0x10030) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar6 + 0x11c); } while (uVar11 != 0x20); lVar6 = 0; do { lVar9 = lVar8 + lVar6; uVar1 = (int)lVar6 << 0xc; lVar6 = lVar6 + 1; *(ushort *) ((-(ulong)(uVar1 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar1 | 0x10830) << 1) + 0xfe000000) = (ushort)*(byte *)(lVar9 + 0x13c); } while (lVar6 != 4); } } else if (param_2 == '\f') { lVar8 = *(long *)(param_1 + 0xa0); if (param_3 == '\x01') { lVar6 = (ulong)param_4 * 0x1ac; *(char *)(lVar8 + lVar6 + 699) = (char)*(undefined2 *)((ulong)((uVar1 | 0x2002e) << 1) + 0xfe000000); lVar9 = *(long *)(param_1 + 0xa0); lVar8 = lVar9 + lVar6; *(undefined2 *)(lVar8 + 700) = *(undefined2 *)((ulong)((uVar1 | 0x200b2) << 1) + 0xfe000000); *(undefined2 *)(lVar8 + 0x2e8) = *(undefined2 *)((ulong)((uVar1 | 0x2007c) << 1) + 0xfe000000); *(undefined2 *)(lVar8 + 0x2ea) = *(undefined2 *)((ulong)((uVar1 | 0x2007d) << 1) + 0xfe000000); iVar5 = 0; puVar7 = (undefined2 *)(lVar9 + lVar6 + 0x2c6); do { uVar2 = uVar1 | iVar5 << 0xc; iVar5 = iVar5 + 1; puVar7[-4] = *(undefined2 *)((ulong)((uVar2 | 0x10043) << 1) + 0xfe000000); *puVar7 = *(undefined2 *)((ulong)((uVar2 | 0x100ae) << 1) + 0xfe000000); puVar7[4] = *(undefined2 *)((ulong)((uVar2 | 0x100af) << 1) + 0xfe000000); puVar7 = puVar7 + 1; } while (iVar5 != 4); lVar8 = 0; do { iVar5 = (int)lVar8; lVar6 = lVar8 * 2; lVar8 = lVar8 + 1; *(undefined2 *)(lVar9 + (ulong)param_4 * 0x1ac + lVar6 + 0x2d8) = *(undefined2 *) (((ulong)(uVar1 | 0x90000 | iVar5 + 0x201U) & 0x7fffffff) * 2 + 0xfe000000); } while (lVar8 != 8); } else { lVar9 = (ulong)param_4 * 0x1ac; lVar6 = lVar8 + lVar9; *(ushort *)((ulong)(uVar1 | 0x2002e) * 2 + 0xfe000000) = (ushort)*(byte *)(lVar6 + 699); *(undefined2 *)((ulong)(uVar1 | 0x200b2) * 2 + 0xfe000000) = *(undefined2 *)(lVar6 + 700); *(undefined2 *)((ulong)(uVar1 | 0x2007c) * 2 + 0xfe000000) = *(undefined2 *)(lVar6 + 0x2e8); *(undefined2 *)((ulong)(uVar1 | 0x2007d) * 2 + 0xfe000000) = *(undefined2 *)(lVar6 + 0x2ea); puVar7 = (undefined2 *)(lVar8 + lVar9 + 0x2be); iVar5 = 0; do { uVar2 = uVar1 | iVar5 << 0xc; *(undefined2 *)((ulong)(uVar2 | 0x10043) * 2 + 0xfe000000) = *puVar7; *(undefined2 *)((ulong)(uVar2 | 0x10143) * 2 + 0xfe000000) = *puVar7; *(undefined2 *)((ulong)(uVar2 | 0x100ae) * 2 + 0xfe000000) = puVar7[4]; iVar5 = iVar5 + 1; *(undefined2 *)((ulong)(uVar2 | 0x100af) * 2 + 0xfe000000) = puVar7[8]; puVar7 = puVar7 + 1; } while (iVar5 != 4); lVar6 = 0; do { iVar5 = (int)lVar6; lVar9 = lVar6 * 2; lVar6 = lVar6 + 1; *(undefined2 *)((ulong)(uVar1 | 0x90000 | iVar5 + 0x201U) * 2 + 0xfe000000) = *(undefined2 *)(lVar8 + (ulong)param_4 * 0x1ac + lVar9 + 0x2d8); } while (lVar6 != 8); } } return; } if (((byte)(param_2 - 1U) < 2) || (param_2 == '\x05')) { if (param_2 == '\x01') { uVar15 = (ulong)(uVar1 | 0x80 | uVar10 << 0xc); uVar13 = 10; cVar12 = '\x01'; } else { if (param_2 != '\x02') { if (param_2 != '\x05') goto LAB_fffd1158; uVar15 = (ulong)(int)((uVar10 % 0x24) / 9 << 0xc | 0x10000 | (uVar10 % 9) * 0x100 + 0x68 + uVar10 / 0x24); cVar12 = '\x01'; uVar13 = 0x48; goto LAB_fffd118c; } uVar15 = (ulong)((uVar10 >> 3) + 0xd0 + (uVar10 & 1) * 0x100 | ((uint)(uVar11 >> 1) & 3) << 0xc | uVar2); uVar13 = 0x10; cVar12 = '\x02'; } LAB_fffd120c: if (param_3 == '\x01') { LAB_fffd1234: uVar3 = FUN_fffd6160(param_2,*(undefined2 *)(uVar15 * 2 + 0xfe000000)); if (cVar12 == '\x01') { *(byte *)puVar14 = (byte)uVar3; goto LAB_fffd130c; } if (cVar12 == '\x02') { *param_5 = uVar3; goto LAB_fffd1320; } } else { if (cVar12 == '\x01') { LAB_fffd1294: uVar3 = (ushort)*(byte *)puVar14; cVar12 = '\x01'; } else if (cVar12 == '\x02') goto LAB_fffd12a8; LAB_fffd12b0: uVar4 = FUN_fffd61cc(param_2,uVar3); *(undefined2 *)(uVar15 * 2 + 0xfe000000) = uVar4; if (param_2 == '\x03') { *(undefined2 *)((uVar15 + 4) * 2 + 0xfe000000) = uVar4; } if (cVar12 == '\x01') { LAB_fffd130c: puVar14 = (ushort *)((long)puVar14 + 1); cVar12 = '\x01'; } else { if (cVar12 != '\x02') goto LAB_fffd1328; LAB_fffd1320: param_5 = param_5 + 1; cVar12 = '\x02'; } } } else { if ((param_2 == '\x03') || (param_2 == '\x06')) { LAB_fffd1158: if (param_2 == '\x06') { uVar15 = (ulong)((uVar10 >> 3) + 0x80 + (uVar10 & 1) * 0x100 | ((uint)(uVar11 >> 1) & 3) << 0xc | uVar2); if (param_3 != '\x01') { uVar13 = 0x10; goto LAB_fffd12a8; } cVar12 = '\x02'; } else { LAB_fffd118c: if (param_2 != '\x03') { if (param_2 != '\x04') goto LAB_fffd120c; goto LAB_fffd11c8; } uVar15 = (ulong)((uVar10 >> 3) + 0x8c + (uVar10 & 1) * 0x100 | ((uint)(uVar11 >> 1) & 3) << 0xc | uVar2); if (param_3 != '\x01') { uVar13 = 0x10; goto LAB_fffd1294; } cVar12 = '\x01'; } uVar13 = 0x10; goto LAB_fffd1234; } if (param_2 == '\x04') { LAB_fffd11c8: uVar15 = (ulong)(uVar2 | (uVar10 % 0x24) / 9 << 0xc | (uVar10 % 9) * 0x100 + 0xc0 + uVar10 / 0x24); if (param_3 == '\x01') { cVar12 = '\x02'; uVar13 = 0x48; goto LAB_fffd1234; } uVar13 = 0x48; LAB_fffd12a8: uVar3 = *param_5; cVar12 = '\x02'; goto LAB_fffd12b0; } } LAB_fffd1328: uVar11 = (ulong)(ushort)((short)uVar11 + 1); } while( true ); } void FUN_fffd1a40(long param_1,undefined param_2) { uint uVar1; ulong uVar2; long lVar3; uVar2 = 0; do { lVar3 = uVar2 * 0x1ac; FUN_fffd1018(param_1,1,param_2,uVar2,*(long *)(param_1 + 0xa0) + lVar3 + 0x140); FUN_fffd1018(param_1,2,param_2,uVar2,*(long *)(param_1 + 0xa0) + lVar3 + 0x1a4); FUN_fffd1018(param_1,3,param_2,uVar2,*(long *)(param_1 + 0xa0) + lVar3 + 0x140 + 0xc); FUN_fffd1018(param_1,4,param_2,uVar2,*(long *)(param_1 + 0xa0) + lVar3 + 0x1c4); FUN_fffd1018(param_1,5,param_2,uVar2,*(long *)(param_1 + 0xa0) + lVar3 + 0x15c); FUN_fffd1018(param_1,6,param_2,uVar2,*(long *)(param_1 + 0xa0) + lVar3 + 0x254); FUN_fffd1018(param_1,8,param_2,uVar2,0); FUN_fffd1018(param_1,9,param_2,uVar2,*(long *)(param_1 + 0xa0) + lVar3 + 0x274); FUN_fffd1018(param_1,0xc,param_2,uVar2,0); uVar1 = (int)uVar2 + 1; uVar2 = (ulong)uVar1; } while (uVar1 != 2); FUN_fffd1018(param_1,0xb,param_2,0,0); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_fffd1bb0(long param_1) { ushort uVar1; ushort uVar2; uint uVar3; ushort uVar4; uint uVar5; long lVar6; long lVar7; int iVar8; undefined2 uVar9; int iVar10; uint uVar11; undefined2 local_10 [4]; undefined2 local_8 [4]; if (*(int *)(*(long *)(param_1 + 0xa0) + 0x44) != 0) { _DAT_ff638c0c = 0xa691c00; _DAT_ff638c08 = *(undefined4 *)(*(long *)(param_1 + 0xa0) + 0x44); } _DAT_fe1a0000 = 0; FUN_fffd64a8(param_1); FUN_fffd0ff4(*(undefined8 *)(param_1 + 0x98)); lVar7 = *(long *)(param_1 + 0xa0); _DAT_fe040016 = *(ushort *)(lVar7 + 0x38) >> 4; _DAT_fe240016 = *(ushort *)(lVar7 + 0x3a) >> 4; _DAT_fe040018 = *(ushort *)(lVar7 + 0x38) >> 3; _DAT_fe240018 = *(ushort *)(lVar7 + 0x3a) >> 3; _DAT_fe04001a = (undefined2)((uint)*(ushort *)(lVar7 + 0x38) * 10 >> 3); _DAT_fe24001a = (undefined2)((uint)*(ushort *)(lVar7 + 0x3a) * 10 >> 3); _DAT_fe04001c = 0x2c; _DAT_fe24001c = 0x2c; _DAT_fe120018 = 0; _DAT_fe12001a = 0x173; _DAT_fe12001c = 0x60; _DAT_fe12001e = 0x6110; _DAT_fe120020 = 0x2152; _DAT_fe120022 = 0xdfbd; _DAT_fe120024 = 0xffff; _DAT_fe120026 = 0x6152; if ((byte)(*(char *)(param_1 + 0x1b8) - 2U) < 2) { if (s_pin_index_count_end_0x_fffdb8b0._8_4_ == 0) { _DAT_fe120024 = 0xffff; } else { _DAT_fe120024 = 0x60; } _DAT_fe240020 = 0; _DAT_fe040020 = 0; _DAT_fe040022 = 3; _DAT_fe240022 = 3; local_8[0] = 0x12; local_8[1] = 0x12; local_8[2] = 0x12; local_10[0] = 0xe0; local_10[1] = 0xe0; local_10[2] = 0xe0; iVar8 = 3; local_10[3] = 0; local_8[3] = 0; if (*(char *)(param_1 + 0x1b8) == '\x03') { local_10[0] = 0xb0; local_10[1] = 0x10; local_10[2] = 0x20; local_10[3] = 0x30; lVar6 = *(long *)(param_1 + 0xa8); local_8[0] = (short)(*(int *)(lVar6 + 0x120) << 2); local_8[1] = (short)(*(int *)(lVar6 + 0x104) << 2); local_8[2] = (short)(*(int *)(lVar6 + 0x108) << 2); local_8[3] = (short)(*(int *)(lVar6 + 0x10c) << 2); iVar8 = 4; } lVar6 = 0; iVar10 = 0; do { uVar5 = (int)lVar6 + 0x80; *(undefined2 *) ((-(ulong)(uVar5 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar5 | 0x40000) << 1) + 0xfe000000) = *(undefined2 *)((long)local_10 + lVar6); uVar5 = (int)lVar6 + 0x81; iVar10 = iVar10 + 1; *(undefined2 *) ((-(ulong)(uVar5 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar5 | 0x40000) << 1) + 0xfe000000) = *(undefined2 *)((long)local_8 + lVar6); lVar6 = lVar6 + 2; } while (iVar10 < iVar8); if (*(char *)(param_1 + 0x1b8) == '\x03') { lVar6 = *(long *)(param_1 + 0xa8); local_8[0] = (short)(*(int *)(lVar6 + 0x160) << 2); local_8[1] = (short)(*(int *)(lVar6 + 0x144) << 2); local_8[2] = (short)(*(int *)(lVar6 + 0x148) << 2); local_8[3] = (short)(*(int *)(lVar6 + 0x14c) << 2); } lVar6 = 0; iVar10 = 0; do { uVar5 = (int)lVar6 + 0x80; *(undefined2 *) ((-(ulong)(uVar5 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar5 | 0x140000) << 1) + 0xfe000000 ) = *(undefined2 *)((long)local_10 + lVar6); uVar5 = (int)lVar6 + 0x81; iVar10 = iVar10 + 1; *(undefined2 *) ((-(ulong)(uVar5 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar5 | 0x140000) << 1) + 0xfe000000 ) = *(undefined2 *)((long)local_8 + lVar6); lVar6 = lVar6 + 2; } while (iVar10 < iVar8); _DAT_fe0801fa = 0xf; uVar9 = 0xf; uVar5 = 0; while( true ) { *(undefined2 *)((ulong)(uVar5 | 0x10011) * 2 + 0xfe000000) = 1; *(undefined2 *)((ulong)(uVar5 | 0x10012) * 2 + 0xfe000000) = 1; if (*(char *)(param_1 + 0x1b8) == '\x03') { uVar9 = 0x80; } else if (*(char *)(param_1 + 0x1b8) == '\x02') { uVar9 = 0x180; } *(undefined2 *)((ulong)(uVar5 | 0x10013) * 2 + 0xfe000000) = uVar9; *(undefined2 *)((ulong)(uVar5 | 0x10018) * 2 + 0xfe000000) = 1; *(undefined2 *)((ulong)(uVar5 | 0x10002) * 2 + 0xfe000000) = 0x6209; *(undefined2 *)((ulong)(uVar5 | 0x100b2) * 2 + 0xfe000000) = 1; uVar11 = 0x100; do { uVar3 = uVar5 | 0x100b4 | uVar11; uVar11 = uVar11 + 0x100; *(undefined2 *)((ulong)uVar3 * 2 + 0xfe000000) = 1; } while (uVar11 != 0x900); uVar5 = uVar5 + 0x1000; if (uVar5 == 0x4000) break; uVar9 = 1; } if (*(char *)(param_1 + 0x1b8) == '\x02') { _DAT_fe040074 = 2; } } _DAT_fe040112 = 1; _DAT_fe040110 = 0x11; if (((byte)(*(char *)(lVar7 + 0xe) - 1U) < 2) && (_DAT_fe040160 = 1, *(char *)(lVar7 + 0xe) == '\x02')) { _DAT_fe040160 = 4; } serial_puts(&DAT_fffdb180,*(undefined *)(param_1 + 0x205)); FUN_fffd0188(_DAT_fe040160,0x10,*(undefined *)(param_1 + 0x205)); serial_puts(s__txdqs_window__fffdb77b + 0xe,*(undefined *)(param_1 + 0x205)); _DAT_fe180100 = 3; if (*(short *)(*(long *)(param_1 + 0xa0) + 0x1e) != 0) { _DAT_fe020090 = 1; _DAT_fe022090 = 1; _DAT_fe024090 = 1; _DAT_fe026090 = 1; } uVar4 = 0; iVar8 = 0; do { uVar2 = *(ushort *)((ulong)((iVar8 << 0xc | 0x10020U) << 1) + 0xfe000000); iVar8 = iVar8 + 1; uVar1 = uVar4; if (uVar4 <= uVar2) { uVar1 = uVar2; } uVar4 = uVar1 & 0xff; if (7 < (uVar1 & 0xff)) { uVar4 = 7; } } while (iVar8 != 4); iVar8 = 0; do { uVar5 = iVar8 << 0xc; iVar8 = iVar8 + 1; *(ushort *)((ulong)(uVar5 | 0x10020) * 2 + 0xfe000000) = uVar4; } while (iVar8 != 4); _DAT_fe0401c6 = 0xc00; return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd21b4(void) { _DAT_ff639130 = 0xffffffff; _DAT_ff639134 = 0xffffffff; _DAT_ff639138 = 0xffffffff; _DAT_ff63913c = 0xffffffff; _DAT_ff639230 = 0xffffffff; _DAT_ff639234 = 0xffffffff; _DAT_ff639238 = 0xffffffff; _DAT_ff63923c = 0xffffffff; _DAT_ff639000 = 0; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd2228(long param_1,ulong param_2,long param_3) { ulong uVar1; _DAT_fe0400c0 = 2; for (uVar1 = 0; (uVar1 & 0xffffffff) < param_2 >> 1; uVar1 = uVar1 + 1) { *(undefined2 *)(((uVar1 & 0xffffffff) + param_3) * 2 + 0xfe000000) = *(undefined2 *)(param_1 + uVar1 * 2); } _DAT_fe1a0000 = 1; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd2280(void) { _DAT_fe0400c0 = 2; _DAT_fe1a0000 = 0; FUN_fffd2228(0xfffc0000,0x8000,0x50000); _DAT_fe1a0000 = 0; FUN_fffd2228(0xfffc8000,0x1000,0x54000); _DAT_fe1a0000 = 0; return; } char FUN_fffd22e8(char param_1) { char cVar1; cVar1 = '\0'; if ((byte)(param_1 - 1U) < 8) { cVar1 = s_non_sec_scramble_use_random_key_fffdb309[(ulong)(byte)(param_1 - 1) + 0x1f]; } return cVar1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_fffd2314(long param_1) { byte bVar1; ushort uVar2; int iVar3; long lVar4; long lVar5; uint uVar6; undefined4 *puVar7; bVar1 = *(byte *)(param_1 + 0x1b9); lVar5 = *(long *)(param_1 + 0xa0); lVar4 = *(long *)(param_1 + 0xa8); uVar2 = *(ushort *)(lVar5 + (ulong)bVar1 * 2 + 0x38); iVar3 = (uint)bVar1 * 0x100; if ((800 < uVar2) && (*(char *)(lVar5 + 0xe) == '\x03')) { *(undefined4 *)(lVar4 + 0x78) = 6; } uVar6 = *(uint *)(lVar4 + 8); if (0x3ff < uVar6) { uVar6 = 0x3ff; } *(uint *)(ulong)(iVar3 - 0x9c7bfc) = uVar6; uVar6 = *(uint *)(lVar4 + 4); if (0xf < uVar6) { uVar6 = 0xf; } *(uint *)(ulong)(iVar3 - 0x9c7c00) = uVar6; *(uint *)(ulong)(iVar3 - 0x9c7bf8) = *(uint *)(lVar4 + 0x14) | *(int *)(lVar4 + 0x10) << 0x10; *(undefined4 *)(ulong)(iVar3 - 0x9c7bec) = *(undefined4 *)(lVar4 + 0x20); *(undefined4 *)(ulong)(iVar3 - 0x9c7bf0) = *(undefined4 *)(lVar4 + 0x1c); *(undefined4 *)(ulong)(iVar3 - 0x9c7be8) = *(undefined4 *)(lVar4 + 0x24); *(undefined4 *)(ulong)(iVar3 - 0x9c7be4) = *(undefined4 *)(lVar4 + 0x28); *(undefined4 *)(ulong)(iVar3 - 0x9c7be0) = *(undefined4 *)(lVar4 + 0x2c); *(uint *)(ulong)(iVar3 - 0x9c7bdc) = *(uint *)(lVar4 + 0x30) | *(int *)(lVar4 + 0x34) << 0x10; *(uint *)(ulong)(iVar3 - 0x9c7bc8) = *(uint *)(lVar4 + 0x4c) | *(int *)(lVar4 + 0x50) << 0x10; *(uint *)(ulong)(iVar3 - 0x9c7bcc) = *(uint *)(lVar4 + 0x44) | *(int *)(lVar4 + 0x48) << 0x10; *(undefined4 *)(ulong)(iVar3 - 0x9c7bd4) = *(undefined4 *)(lVar4 + 0x3c); *(undefined4 *)(ulong)(iVar3 - 0x9c7bd0) = *(undefined4 *)(lVar4 + 0x40); *(undefined4 *)(ulong)(iVar3 - 0x9c7bd8) = *(undefined4 *)(lVar4 + 0x38); *(undefined4 *)(ulong)(iVar3 - 0x9c7bc4) = 0x3ff; uVar6 = *(uint *)(lVar4 + 0x5c); if (0xf < uVar6) { uVar6 = 0xf; } *(uint *)(ulong)(iVar3 - 0x9c7bbc) = uVar6; *(undefined4 *)(ulong)(iVar3 - 0x9c7ba0) = *(undefined4 *)(lVar4 + 0x78); *(undefined4 *)(ulong)(iVar3 - 0x9c7bf4) = *(undefined4 *)(lVar4 + 0x18); uVar6 = *(uint *)(lVar4 + 0x68); if (0x1f < uVar6) { uVar6 = 0x1f; } *(uint *)(ulong)(iVar3 - 0x9c7bb0) = uVar6; uVar6 = *(uint *)(lVar4 + 0x6c); if (0x1f < uVar6) { uVar6 = 0x1f; } *(uint *)(ulong)(iVar3 - 0x9c7bac) = uVar6; *(undefined4 *)(ulong)(iVar3 - 0x9c7ba4) = *(undefined4 *)(lVar4 + 0x74); *(undefined4 *)(ulong)(iVar3 - 0x9c7ba8) = *(undefined4 *)(lVar4 + 0x70); uVar6 = *(uint *)(lVar4 + 100); if (0xff < uVar6) { uVar6 = 0xff; } *(uint *)(ulong)(iVar3 - 0x9c7bb4) = uVar6; *(undefined4 *)(ulong)(iVar3 - 0x9c7bb8) = *(undefined4 *)(lVar4 + 0x60); *(undefined4 *)(ulong)(iVar3 - 0x9c7b90) = *(undefined4 *)(lVar4 + 0x88); *(undefined4 *)(ulong)(iVar3 - 0x9c7bc0) = 0x3ff; *(undefined4 *)(ulong)(iVar3 - 0x9c7b84) = *(undefined4 *)(lVar4 + 0xac); *(undefined4 *)(ulong)(iVar3 - 0x9c7b80) = *(undefined4 *)(lVar4 + 0xb0); puVar7 = (undefined4 *)(ulong)(iVar3 - 0x9c7b7c); *puVar7 = *(undefined4 *)(lVar4 + 0xb4); uVar6 = (uint)uVar2; if (((bVar1 != 0) && (*puVar7 = *(undefined4 *)(lVar4 + 0xb4), 0x17f < uVar6)) && (*(char *)(lVar5 + 0xe) == '\x02')) { *puVar7 = *(undefined4 *)(lVar4 + 0xb4); } *(undefined4 *)(ulong)(iVar3 - 0x9c7b78) = *(undefined4 *)(lVar4 + 0xb8); *(undefined4 *)(ulong)(iVar3 - 0x9c7b88) = *(undefined4 *)(lVar4 + 0xa8); *(undefined4 *)(ulong)(iVar3 - 0x9c7b60) = *(undefined4 *)(lVar4 + 0xd0); *(undefined4 *)(ulong)(iVar3 - 0x9c7b74) = *(undefined4 *)(lVar4 + 0xbc); *(undefined4 *)(ulong)(iVar3 - 0x9c7b70) = *(undefined4 *)(lVar4 + 0xc0); _DAT_ff638600 = 0x1e; _DAT_ff638610 = *(undefined4 *)(lVar5 + 0x34); _DAT_ff638614 = 0x8080000; if (*(char *)(lVar5 + 0xe) == '\x03') { _DAT_ff638614 = *(int *)(lVar4 + 0x20) - 2U | 0x8080000; } if ((*(uint *)(lVar5 + 0x34) & 0x101) == 0x101) { _DAT_ff638614 = (*(int *)(lVar4 + 0x1c) - *(int *)(lVar4 + 0x20)) * 0x100 | 0x8080000; } *(uint *)(lVar4 + (((ulong)*(byte *)(param_1 + 0x1b9) & 1) + 0x60) * 4) = _DAT_ff638614; _DAT_ff63862c = 4; if (*(short *)(lVar5 + 0x2a) == 0) { _DAT_ff63862c = 1; } if (*(byte *)(lVar5 + 0xe) < 2) { _DAT_ff63862c = 2; } *(undefined4 *)(ulong)(iVar3 - 0x9c7b50) = *(undefined4 *)(lVar4 + 0x90); *(uint *)(ulong)(iVar3 - 0x9c7b4c) = *(int *)(lVar4 + 0x94) << 8 | 0x20100000U | uVar6 / 0x14 - 1; *(undefined4 *)(ulong)(iVar3 - 0x9c7b38) = 10; *(uint *)(ulong)(iVar3 - 0x9c7b34) = (uVar6 / 200) * 1000; *(int *)(ulong)(iVar3 - 0x9c7b30) = *(int *)(lVar4 + 0x2c) + 3; *(undefined4 *)(ulong)(iVar3 - 0x9c7b9c) = *(undefined4 *)(lVar4 + 0x7c); *(undefined4 *)(ulong)(iVar3 - 0x9c7b98) = 0x3f; *(undefined4 *)(ulong)(iVar3 - 0x9c7b94) = *(undefined4 *)(lVar4 + 0x84); *(undefined4 *)(ulong)(iVar3 - 0x9c7b8c) = *(undefined4 *)(lVar4 + 0x8c); *(undefined4 *)(ulong)(iVar3 - 0x9c7b6c) = *(undefined4 *)(lVar4 + 0xc4); *(undefined4 *)(ulong)(iVar3 - 0x9c7b68) = *(undefined4 *)(lVar4 + 200); *(undefined4 *)(ulong)(iVar3 - 0x9c7b64) = *(undefined4 *)(lVar4 + 0xcc); *(undefined4 *)(ulong)(iVar3 - 0x9c7b58) = 0xf; *(undefined4 *)(ulong)(iVar3 - 0x9c7b54) = *(undefined4 *)(lVar4 + 0xd8); *(undefined4 *)(ulong)(iVar3 - 0x9c7b48) = 0x3f; *(undefined4 *)(ulong)(iVar3 - 0x9c7b44) = *(undefined4 *)(lVar4 + 0x9c); *(undefined4 *)(ulong)(iVar3 - 0x9c7b40) = *(undefined4 *)(lVar4 + 0xa0); *(undefined4 *)(ulong)(iVar3 - 0x9c7b3c) = *(undefined4 *)(lVar4 + 0xa4); _DAT_ff638604 = 0x30; _DAT_ff638608 = 0; _DAT_ff63860c = 0; uVar6 = *(byte *)(lVar5 + 0x41) & 1; _DAT_ff638618 = uVar6 << 0xc | uVar6 << 0xb | (uint)(*(byte *)(lVar5 + 0x10) | 2); if (*(char *)(lVar5 + 0xe) == '\x02') { _DAT_ff638618 = (*(byte *)(lVar5 + 0x41) & 1) << 0xb | (*(byte *)(lVar5 + 0x41) & 2) << 0xc | (uint)(*(byte *)(lVar5 + 0x10) | 2); } return 0; } undefined4 FUN_fffd27d0(ushort param_1) { undefined4 uVar1; uVar1 = 7; if ((((0x1d5 < param_1) && (uVar1 = 6, 0x270 < param_1)) && (uVar1 = 0xb, 0x3a9 < param_1)) && ((uVar1 = 10, 0x4e1 < param_1 && (uVar1 = 0x19, param_1 < 0x856)))) { uVar1 = 0x18; } return uVar1; } uint FUN_fffd2818(ushort param_1,ushort param_2) { uint uVar1; uint uVar2; ulong uVar3; uint uVar4; uint uVar5; uVar3 = 0; if (param_1 != 0) { uVar4 = 0; if (param_1 != 0) { uVar4 = 0x1e0 / param_1; } uVar3 = (ulong)uVar4; } if ((param_2 & 0xfffd) == 1) { uVar4 = (uint)(uVar3 >> 2); if (3 < uVar4) { uVar4 = 3; } uVar2 = (uint)uVar3 & 0xff; uVar1 = uVar2 + uVar4 * -4 >> 1; uVar5 = uVar1 & 0x7f; if (2 < uVar5) { uVar4 = 2; } uVar5 = uVar2 + uVar4 * -4 + uVar5 * -2 & 0xff; if (uVar5 != 0) { uVar5 = 1; } uVar3 = (ulong)(ushort)(((short)(1 << (ulong)(uVar1 & 0x1f)) + -1) * 2 | ((short)(1 << (ulong)(uVar4 & 0x1f)) + -1) * 8 | (short)(1 << (ulong)(uVar5 & 0x1f)) - 1U); } uVar4 = (uint)uVar3; if (param_2 == 2) { uVar4 = (uint)(uVar3 >> 2) & 0xff; if (6 < uVar4) { uVar4 = 6; } uVar4 = (1 << (ulong)(uVar4 & 0x1f)) - 1U >> 1 & 0xffff; } return uVar4 & 0x7f; } uint FUN_fffd28dc(ushort param_1,short param_2) { ushort uVar1; int iVar2; int iVar3; uint uVar4; uVar4 = (uint)param_1; if (param_2 == 1) { if (param_1 < 0x27b) { return (uVar4 / 5 + 1 & 0x1fff) << 3 | 4; } return ((int)(uVar4 - 0x159) / 5 & 0x1fffU) << 3; } if (param_2 == 2) { if (uVar4 < 600) { iVar2 = uVar4 * 100 + -45000; iVar3 = 0x28a; LAB_fffd2978: uVar4 = 0; if (iVar3 != 0) { uVar4 = iVar2 / iVar3; } return uVar4 & 0xffff | 0x40; } iVar2 = uVar4 * 100 + -60000; iVar3 = 0x28a; } else if (param_2 == 3) { if (0xdb < uVar4) { iVar2 = uVar4 * 100 + -22000; iVar3 = 400; goto LAB_fffd2978; } iVar2 = uVar4 * 100 + -10000; iVar3 = 400; } else { if (param_2 != 4) { return 0; } if (0x274 < uVar4) { uVar4 = 0x275; LAB_fffd29c4: uVar1 = (ushort)((int)(uVar4 * 100 + -0x8084) / 600) | 0x40; goto LAB_fffd2a00; } if (uVar4 < 0x97) { uVar4 = 0x96; } else if (0x1c6 < uVar4) goto LAB_fffd29c4; iVar2 = uVar4 * 100 + -15000; iVar3 = 600; } uVar1 = 0; if (iVar3 != 0) { uVar1 = (ushort)(iVar2 / iVar3); } LAB_fffd2a00: return (uint)uVar1; } void FUN_fffd2a08(long param_1) { byte bVar1; byte bVar2; byte bVar3; byte bVar4; char cVar5; ushort uVar6; ushort uVar7; uint uVar8; undefined4 uVar9; int iVar10; uint uVar11; uint uVar12; uint uVar13; uint uVar14; uint uVar15; uint uVar16; int iVar17; uint uVar18; ulong uVar19; short sVar20; undefined2 uVar21; ushort uVar22; uint uVar23; undefined4 uVar24; int iVar25; int iVar26; int iVar27; uint uVar28; long lVar29; long lVar30; lVar30 = *(long *)(param_1 + 0xa0); bVar1 = *(byte *)(param_1 + 0x1b9); uVar6 = *(ushort *)(lVar30 + (long)(int)(uint)bVar1 * 2 + 0x38); bVar2 = *(byte *)(param_1 + 0x1b8); uVar19 = (ulong)bVar2; bVar3 = *(byte *)(lVar30 + 0x41); bVar4 = *(byte *)(lVar30 + 0x42); uVar23 = (uint)*(ushort *)(lVar30 + 0x56); uVar8 = (uint)*(ushort *)(lVar30 + 0x58); uVar14 = uVar23; uVar13 = uVar8; uVar12 = (uint)*(byte *)(lVar30 + 0x7c); if (bVar1 == 1) { uVar14 = (uint)*(ushort *)(lVar30 + 0x16); if (0xef < (*(ushort *)(lVar30 + 0x16) - 1 & 0xffff)) { uVar14 = uVar23; } uVar13 = (uint)*(ushort *)(lVar30 + 0x1a); if (0xef < (*(ushort *)(lVar30 + 0x1a) - 1 & 0xffff)) { uVar13 = uVar8; } uVar12 = (uint)(byte)*(short *)(lVar30 + 0x1c); if (0xef < (ushort)(*(short *)(lVar30 + 0x1c) - 1U)) { uVar12 = (uint)*(byte *)(lVar30 + 0x7c); } } DAT_fffdbb14 = (uint)*(byte *)(lVar30 + 0x76); if ((*(short *)(lVar30 + 0x66) != 0) && (bVar1 != 1)) goto LAB_fffd2b34; cVar5 = *(char *)(lVar30 + 0xe); if (cVar5 == '\0') { sVar20 = 500; LAB_fffd2b30: *(short *)(lVar30 + 0x66) = sVar20; } else { if ((cVar5 == '\x03') || (cVar5 == '\x01')) { uVar18 = uVar23 + *(ushort *)(lVar30 + 0x52); sVar20 = 0; if (uVar18 != 0) { sVar20 = (short)((uVar23 * 500) / uVar18); } sVar20 = sVar20 + 500; goto LAB_fffd2b30; } if (cVar5 == '\x02') { uVar21 = 200; if (DAT_fffdbb14 != 0) { uVar21 = 0xa0; } *(undefined2 *)(lVar30 + 0x66) = uVar21; if (*(char *)(lVar30 + 0x43) != '\0') { sVar20 = (short)(((uint)*(ushort *)(lVar30 + 0x66) * 9) / 0xb); goto LAB_fffd2b30; } } } LAB_fffd2b34: if ((*(short *)(lVar30 + 0x68) != 0) && (*(char *)(param_1 + 0x1b9) != '\x01')) goto LAB_fffd2bc0; cVar5 = *(char *)(lVar30 + 0xe); if (cVar5 == '\0') { sVar20 = 500; LAB_fffd2bbc: *(short *)(lVar30 + 0x68) = sVar20; } else { if ((cVar5 == '\x03') || (cVar5 == '\x01')) { uVar8 = *(ushort *)(lVar30 + 0x50) + uVar8; sVar20 = 0; if (uVar8 != 0) { sVar20 = (short)(((uint)*(ushort *)(lVar30 + 0x50) * 500) / uVar8); } sVar20 = sVar20 + 500; goto LAB_fffd2bbc; } if (cVar5 == '\x02') { uVar23 = *(ushort *)(lVar30 + 0x4e) + uVar8; uVar18 = 0; if (uVar23 != 0) { uVar18 = (uVar8 * 500) / uVar23; } *(short *)(lVar30 + 0x68) = (short)uVar18; if (*(char *)(lVar30 + 0x43) != '\0') { sVar20 = (short)(((uVar18 & 0xffff) * 0xb) / 6); goto LAB_fffd2bbc; } } } LAB_fffd2bc0: if (*(short *)(lVar30 + 100) != 0) goto LAB_fffd2c4c; cVar5 = *(char *)(lVar30 + 0xe); if (cVar5 == '\0') { LAB_fffd2c00: sVar20 = 500; LAB_fffd2c48: *(short *)(lVar30 + 100) = sVar20; } else { if (cVar5 == '\x03') { uVar8 = (uint)*(ushort *)(lVar30 + 0x4c) + (uint)*(ushort *)(lVar30 + 0x5a); sVar20 = 0; if (uVar8 != 0) { sVar20 = (short)(((uint)*(ushort *)(lVar30 + 0x4c) * 500) / uVar8); } sVar20 = sVar20 + 500; goto LAB_fffd2c48; } if (cVar5 == '\x01') goto LAB_fffd2c00; if (cVar5 == '\x02') { uVar8 = (uint)*(ushort *)(lVar30 + 0x4c) + (uint)*(ushort *)(lVar30 + 0x5a); uVar23 = 0; if (uVar8 != 0) { uVar23 = ((uint)*(ushort *)(lVar30 + 0x5a) * 500) / uVar8; } *(short *)(lVar30 + 100) = (short)uVar23; if (*(char *)(lVar30 + 0x43) != '\0') { sVar20 = (short)(((uVar23 & 0xffff) * 0xb) / 6); goto LAB_fffd2c48; } } } LAB_fffd2c4c: uVar22 = *(ushort *)(lVar30 + 0x6a); if (uVar22 == 0) { uVar22 = 0x640; } *(ushort *)(lVar30 + 0x6a) = uVar22; uVar7 = uVar6; if (uVar22 <= uVar6) { uVar7 = uVar22 - 0xc; } lVar29 = *(long *)(param_1 + 0xa8); uVar23 = (uint)uVar6; uVar18 = (uint)bVar2; uVar8 = (uint)uVar6; uVar28 = (uint)bVar3; if (bVar2 == 0) { if (uVar7 < 400) { uVar9 = 5; *(undefined4 *)(lVar29 + 0x1c) = 5; LAB_fffd2ca4: *(undefined4 *)(lVar29 + 0x20) = uVar9; iVar17 = 50000; iVar10 = 10000; iVar25 = 0x927c; } else { if (uVar7 < 0x215) { *(undefined4 *)(lVar29 + 0x1c) = 7; uVar9 = 6; goto LAB_fffd2ca4; } if (uVar7 < 0x29b) { *(undefined4 *)(lVar29 + 0x1c) = 9; *(undefined4 *)(lVar29 + 0x20) = 7; iVar17 = 45000; iVar10 = 0x1d4c; iVar25 = 36000; } else if (uVar7 < 800) { *(undefined4 *)(lVar29 + 0x1c) = 0xb; *(undefined4 *)(lVar29 + 0x20) = 8; iVar17 = 40000; iVar10 = 0x1d4c; iVar25 = 35000; } else if (uVar7 < 0x3a5) { *(undefined4 *)(lVar29 + 0x1c) = 0xd; *(undefined4 *)(lVar29 + 0x20) = 9; iVar17 = 27000; iVar10 = 0x2134; iVar25 = 34000; } else { *(undefined4 *)(lVar29 + 0x1c) = 0xe; *(undefined4 *)(lVar29 + 0x20) = 10; iVar17 = 25000; iVar10 = 0x2134; iVar25 = 33000; } } uVar15 = (uVar23 * 15000) / 1000000 + 1; if (uVar15 < 5) { uVar15 = 5; } *(uint *)(lVar29 + 0x40) = uVar15; if (8 < *(uint *)(lVar29 + 0x40)) { *(uint *)(lVar29 + 0x40) = *(uint *)(lVar29 + 0x40) + 1 & 0xfffffffe; } if (0x10 < *(uint *)(lVar29 + 0x40)) { *(undefined4 *)(lVar29 + 0x40) = 0x10; } *(uint *)(lVar29 + 0x38) = (iVar17 * uVar8) / 1000000 + 1; uVar15 = (iVar10 * uVar8) / 1000000 + 1; uVar16 = 4; if (3 < uVar15) { uVar16 = uVar15; } *(uint *)(lVar29 + 0x30) = uVar16; *(uint *)(lVar29 + 0x34) = uVar16; uVar15 = (uVar8 * 0x1d4c) / 1000000 + 1; *(undefined4 *)(lVar29 + 0x4c) = 4; *(undefined4 *)(lVar29 + 0x50) = 4; uVar16 = 4; if (3 < uVar15) { uVar16 = uVar15; } *(uint *)(lVar29 + 0x24) = (iVar25 * uVar8) / 1000000 + 1; *(uint *)(lVar29 + 0x44) = uVar16; *(uint *)(lVar29 + 0x48) = uVar16; if (bVar4 < 4) { iVar10 = 260000; } else { iVar10 = 350000; } iVar10 = (iVar10 * uVar23) / 1000000 + 1; *(int *)(lVar29 + 0xc) = iVar10; *(int *)(lVar29 + 8) = iVar10; *(uint *)(lVar29 + 0x3c) = *(uint *)(lVar29 + 0x40) >> 1; iVar10 = *(int *)(lVar29 + 0x1c); *(undefined4 *)(lVar29 + 0xf8) = 0; *(int *)(lVar29 + 0x14) = iVar10; *(int *)(lVar29 + 0x10) = iVar10; *(int *)(lVar29 + 0x18) = (iVar10 + 6) - *(int *)(lVar29 + 0x20); *(undefined4 *)(lVar29 + 0xfc) = 0; uVar9 = 4; LAB_fffd31cc: *(undefined4 *)(lVar29 + 4) = uVar9; iVar10 = 0x1ff; LAB_fffd3438: *(int *)(lVar29 + 0x54) = iVar10; uVar15 = 0; } else { uVar15 = (uint)uVar6; if (bVar2 == 1) { uVar16 = uVar28 & 1; if (uVar7 < 800) { *(undefined4 *)(lVar29 + 0x20) = 9; iVar10 = 35000; *(uint *)(lVar29 + 0x1c) = uVar16 * 2 + 0xb; iVar25 = 6000; iVar17 = 0x1d4c; iVar26 = 0x186a; iVar27 = 35000; } else if (uVar7 < 0x3a5) { *(uint *)(lVar29 + 0x1c) = uVar16 * 2 + 0xd; *(undefined4 *)(lVar29 + 0x20) = 10; iVar17 = 0x1900; iVar25 = 0x14b4; iVar26 = 0x14eb; iVar10 = 30000; iVar27 = 34000; } else if (uVar7 < 0x42a) { *(uint *)(lVar29 + 0x1c) = uVar16 * 3 + 0xf; *(undefined4 *)(lVar29 + 0x20) = 0xb; iVar17 = 0x1900; iVar25 = 0x14b4; iVar26 = 0x14eb; iVar10 = 30000; iVar27 = 33000; } else { if ((uVar7 < 0x4b0) || (uVar7 < 0x535)) { *(uint *)(lVar29 + 0x1c) = uVar16 * 3 + 0x12; uVar9 = 0xc; } else if (uVar7 < 0x5ba) { *(uint *)(lVar29 + 0x1c) = uVar16 * 4 + 0x14; uVar9 = 0xe; } else { *(uint *)(lVar29 + 0x1c) = uVar16 * 4 + 0x16; uVar9 = 0x10; } *(undefined4 *)(lVar29 + 0x20) = uVar9; iVar17 = 0x1900; iVar25 = 0x14b4; iVar26 = 5000; iVar10 = 30000; iVar27 = 32000; } if (*(int *)(lVar29 + 0x1c) - 0x11U < 8) { *(uint *)(lVar29 + 0x1c) = *(int *)(lVar29 + 0x1c) + 1U & 0xfffffffe; } uVar16 = (uVar8 * 15000) / 1000000 + 1; if (uVar16 < 10) { uVar16 = 10; } *(uint *)(lVar29 + 0x40) = uVar16; uVar16 = *(int *)(lVar29 + 0x40) + 1U & 0xfffffffe; if (0x16 < uVar16) { uVar16 = 0x1a; } *(uint *)(lVar29 + 0x40) = uVar16; uVar16 = (iVar10 * uVar15) / 1000000 + 1; if (uVar16 < 0x1c) { uVar16 = 0x1c; } *(uint *)(lVar29 + 0x38) = uVar16; *(undefined4 *)(lVar29 + 0x4c) = 4; uVar16 = (iVar26 * uVar15) / 1000000 + 1; *(uint *)(lVar29 + 0x24) = (iVar27 * uVar8) / 1000000 + 1; if (uVar16 < 5) { *(undefined4 *)(lVar29 + 0x50) = 5; } else { *(uint *)(lVar29 + 0x50) = uVar16; } uVar16 = (iVar25 * uVar15) / 1000000 + 1; if (uVar16 < 4) { *(undefined4 *)(lVar29 + 0x30) = 4; } else { *(uint *)(lVar29 + 0x30) = uVar16; } uVar15 = (iVar17 * uVar15) / 1000000 + 1; if (uVar15 < 4) { *(undefined4 *)(lVar29 + 0x34) = 4; } else { *(uint *)(lVar29 + 0x34) = uVar15; } uVar15 = (uVar8 * 0x9c4) / 1000000 + 1; if (uVar15 < 4) { uVar15 = 4; } *(uint *)(lVar29 + 0x44) = uVar15; uVar8 = (uVar8 * 0x1d4c) / 1000000 + 1; if (uVar8 < 4) { uVar8 = 4; } *(uint *)(lVar29 + 0x48) = uVar8; *(undefined4 *)(lVar29 + 0x44) = *(undefined4 *)(lVar29 + 0x48); if (bVar4 < 6) { iVar10 = 160000; } else if (bVar4 == 6) { iVar10 = 260000; } else if (bVar4 == 7) { iVar10 = 350000; } else { iVar10 = 550000; } iVar10 = (iVar10 * uVar23) / 1000000 + 1; *(int *)(lVar29 + 0xc) = iVar10; *(int *)(lVar29 + 8) = iVar10; *(uint *)(lVar29 + 0x3c) = *(uint *)(lVar29 + 0x40) >> 1; iVar10 = *(int *)(lVar29 + 0x1c); *(undefined4 *)(lVar29 + 0xf8) = 0; *(int *)(lVar29 + 0x14) = iVar10; *(int *)(lVar29 + 0x10) = iVar10; *(int *)(lVar29 + 0x18) = (iVar10 + 7) - *(int *)(lVar29 + 0x20); *(undefined4 *)(lVar29 + 0xfc) = 0; uVar9 = 8; goto LAB_fffd31cc; } uVar16 = (uint)uVar6; if (bVar2 == 3) { if (uVar7 < 0xa6) { *(uint *)(lVar29 + 0x1c) = uVar18; uVar9 = 1; LAB_fffd3290: *(undefined4 *)(lVar29 + 0x20) = uVar9; } else { if (399 < uVar7) { if (uVar7 < 0x215) { *(undefined4 *)(lVar29 + 0x1c) = 8; uVar9 = 4; } else if (uVar7 < 600) { *(undefined4 *)(lVar29 + 0x1c) = 9; uVar9 = 5; } else { if (uVar16 < 0x29b) { uVar9 = 10; } else if (uVar7 < 0x2dd) { uVar9 = 0xb; } else { if (799 < uVar16) { uVar9 = 8; if (uVar7 < 0x3a5) { uVar24 = 0xe; } else { uVar24 = 0x10; } *(undefined4 *)(lVar29 + 0x1c) = uVar24; goto LAB_fffd3290; } uVar9 = 0xc; } *(undefined4 *)(lVar29 + 0x1c) = uVar9; uVar9 = 6; } goto LAB_fffd3290; } *(undefined4 *)(lVar29 + 0x1c) = 6; *(undefined4 *)(lVar29 + 0x20) = 3; } uVar11 = (uVar16 * 15000) / 1000000 + 1; if (uVar11 < 10) { uVar11 = 10; } *(uint *)(lVar29 + 0x40) = uVar11; if (0xc < *(uint *)(lVar29 + 0x40)) { *(undefined4 *)(lVar29 + 0x40) = 0xc; } *(uint *)(lVar29 + 0x24) = (uVar16 * 42000) / 1000000 + 1; *(uint *)(lVar29 + 0x38) = (uVar16 * 50000) / 1000000 + 1; *(undefined4 *)(lVar29 + 0x4c) = 4; *(undefined4 *)(lVar29 + 0x50) = 4; uVar16 = (uVar16 * 10000) / 1000000; if (uVar16 == 0) { *(undefined4 *)(lVar29 + 0x30) = 2; } else { *(uint *)(lVar29 + 0x30) = uVar16 + 1; } *(undefined4 *)(lVar29 + 0x34) = *(undefined4 *)(lVar29 + 0x30); uVar16 = (uVar15 * 0x1d4c) / 1000000 + 1; if (uVar16 < 4) { uVar16 = 4; } *(uint *)(lVar29 + 0x44) = uVar16; *(undefined4 *)(lVar29 + 0x48) = *(undefined4 *)(lVar29 + 0x44); uVar16 = (uVar15 * 210000) / 1000000; iVar10 = uVar16 + 1; *(int *)(lVar29 + 0xc) = iVar10; *(int *)(lVar29 + 8) = iVar10; *(uint *)(lVar29 + 0x3c) = *(uint *)(lVar29 + 0x40) >> 1; *(uint *)(lVar29 + 0x10) = (uVar15 * 21000) / 1000000 + 1; *(uint *)(lVar29 + 0xf8) = (uVar15 * 0x9c4) / 1000000 + 1; *(int *)(lVar29 + 0x14) = *(int *)(lVar29 + 0x1c); iVar10 = (uVar8 * 0x157c) / 1000000 + 1; *(int *)(lVar29 + 0xfc) = iVar10; *(int *)(lVar29 + 0x18) = ((*(int *)(lVar29 + 0x1c) + 5) - *(int *)(lVar29 + 0x20)) + iVar10; *(uint *)(lVar29 + 4) = (uVar8 * 15000) / 1000000 + 1; iVar10 = uVar16 + 0x15; goto LAB_fffd3438; } uVar15 = 0; if (bVar2 == 2) { if (uVar7 < 0x10a) { *(undefined4 *)(lVar29 + 0x1c) = 6; *(undefined4 *)(lVar29 + 0x40) = 6; *(undefined4 *)(lVar29 + 0x20) = 4; *(undefined4 *)(lVar29 + 0x3c) = 8; uVar15 = 0; } else { uVar15 = uVar28 & 1; if (uVar7 < 0x215) { *(uint *)(lVar29 + 0x1c) = uVar15 * 2 + 10; *(undefined4 *)(lVar29 + 0x20) = 6; uVar15 = 1; *(uint *)(lVar29 + 0x40) = (uint)*(byte *)(lVar30 + 0x77) * 2 + 10; *(undefined4 *)(lVar29 + 0x3c) = 8; } else { uVar11 = (uint)*(byte *)(lVar30 + 0x77); if (uVar7 < 800) { *(uint *)(lVar29 + 0x1c) = uVar11 * 2 + 0xe + uVar15 * 2; *(undefined4 *)(lVar29 + 0x40) = 0x10; *(undefined4 *)(lVar29 + 0x20) = 8; *(undefined4 *)(lVar29 + 0x3c) = 8; uVar15 = 2; } else if (uVar7 < 0x42a) { *(uint *)(lVar29 + 0x1c) = uVar11 * 2 + 0x14 + uVar15 * 2; *(undefined4 *)(lVar29 + 0x20) = 10; uVar15 = 3; *(uint *)(lVar29 + 0x40) = (uint)*(byte *)(lVar30 + 0x77) * 2 + 0x14; *(undefined4 *)(lVar29 + 0x3c) = 8; } else if (uVar7 < 0x535) { *(uint *)(lVar29 + 0x1c) = uVar11 * 2 + 0x18 + uVar15 * 4; *(undefined4 *)(lVar29 + 0x20) = 0xc; uVar15 = 4; *(uint *)(lVar29 + 0x40) = (uint)*(byte *)(lVar30 + 0x77) * 4 + 0x18; *(undefined4 *)(lVar29 + 0x3c) = 10; } else { iVar10 = uVar11 * 4; if (uVar7 < 0x640) { *(uint *)(lVar29 + 0x1c) = iVar10 + 0x1c + uVar15 * 4; *(undefined4 *)(lVar29 + 0x20) = 0xe; uVar15 = 5; *(uint *)(lVar29 + 0x40) = (uint)*(byte *)(lVar30 + 0x77) * 2 + 0x1e; *(undefined4 *)(lVar29 + 0x3c) = 0xc; } else if (uVar7 < 0x74a) { *(uint *)(lVar29 + 0x1c) = iVar10 + 0x20 + uVar15 * 4; *(undefined4 *)(lVar29 + 0x20) = 0x10; uVar15 = 6; *(uint *)(lVar29 + 0x40) = (uint)*(byte *)(lVar30 + 0x77) * 4 + 0x22; *(undefined4 *)(lVar29 + 0x3c) = 0xe; } else { *(uint *)(lVar29 + 0x1c) = iVar10 + 0x24 + uVar15 * 4; *(undefined4 *)(lVar29 + 0x20) = 0x12; uVar15 = 7; *(uint *)(lVar29 + 0x40) = (uint)*(byte *)(lVar30 + 0x77) * 4 + 0x28; *(undefined4 *)(lVar29 + 0x3c) = 0x10; } } } } *(int *)(lVar29 + 0x3c) = *(int *)(lVar29 + 0x3c) + 2; *(uint *)(lVar29 + 0x24) = (uVar16 * 44000) / 1000000 + 3; *(uint *)(lVar29 + 0x38) = (uVar16 * 40000) / 1000000 + 1; *(undefined4 *)(lVar29 + 0x4c) = 8; *(undefined4 *)(lVar29 + 0x50) = 8; uVar11 = (uVar16 * 12000) / 1000000 + 1; if (uVar11 < 4) { uVar11 = 4; } *(uint *)(lVar29 + 0x30) = uVar11; *(undefined4 *)(lVar29 + 0x34) = *(undefined4 *)(lVar29 + 0x30); uVar11 = (uVar16 * 10000) / 1000000 + 1; if (uVar11 < 8) { uVar11 = 8; } *(uint *)(lVar29 + 0x44) = uVar11; *(undefined4 *)(lVar29 + 0x48) = *(undefined4 *)(lVar29 + 0x44); if (bVar4 == 9) { *(uint *)(lVar29 + 0xc) = (uVar23 * 60000) / 1000000 + 1; iVar10 = 130000; LAB_fffd372c: iVar10 = (uVar23 * iVar10) / 1000000 + 1; } else { if (bVar4 == 10) { *(uint *)(lVar29 + 0xc) = (uVar8 * 90000) / 1000000 + 1; iVar10 = 180000; goto LAB_fffd372c; } if (bVar4 == 0xb) { iVar10 = 180000; } else { iVar10 = 280000; } iVar10 = (uVar8 * iVar10) / 1000000 + 1; *(int *)(lVar29 + 0xc) = iVar10; } *(int *)(lVar29 + 8) = iVar10; *(uint *)(lVar29 + 0x10) = (uVar16 * 21000) / 1000000 + 1; *(undefined4 *)(lVar29 + 0x18) = *(undefined4 *)(lVar29 + 0x44); *(undefined4 *)(lVar29 + 0x14) = *(undefined4 *)(lVar29 + 0x1c); *(uint *)(lVar29 + 0xf8) = (uVar16 * 0x5dc) / 1000000 + 1; *(uint *)(lVar29 + 0xfc) = (uVar16 * 0xdac) / 1000000 + 1; uVar8 = (uVar16 * 14000) / 1000000 + 1; if (uVar8 < 10) { uVar8 = 10; } *(uint *)(lVar29 + 4) = uVar8; *(undefined4 *)(lVar29 + 0x54) = 0x1ff; } } *(int *)(lVar29 + 0x28) = *(int *)(lVar29 + 0x24) + *(int *)(lVar29 + 0x10); *(undefined4 *)(lVar29 + 0x7c) = 300; *(undefined4 *)(lVar29 + 0x58) = *(undefined4 *)(lVar29 + 0x54); *(undefined4 *)(lVar29 + 0x5c) = 0xf; *(undefined4 *)(lVar29 + 0x68) = 0xf; *(undefined4 *)(lVar29 + 0x6c) = 0xf; *(undefined4 *)(lVar29 + 0x70) = 0xf; *(undefined4 *)(lVar29 + 0x90) = 0xf; *(undefined4 *)(lVar29 + 0x60) = 0x300; *(undefined4 *)(lVar29 + 0x94) = 0x4c; uVar8 = *(uint *)(lVar29 + 0x1c); *(undefined4 *)(lVar29 + 100) = 0x80; *(undefined4 *)(lVar29 + 0x98) = 0x3f; *(undefined4 *)(lVar29 + 0x74) = 0x1f; *(undefined4 *)(lVar29 + 0x8c) = 500; *(undefined4 *)(lVar29 + 0x9c) = 0x20; *(uint *)(lVar29 + 0x2c) = uVar8; *(undefined4 *)(lVar29 + 0x78) = 5; *(uint *)(lVar29 + 0x80) = (uVar23 * 30000) / 1000000 + 1; *(undefined4 *)(lVar29 + 0x84) = 8; *(undefined4 *)(lVar29 + 0x88) = 0x10; *(undefined4 *)(lVar29 + 0xa0) = 6; *(undefined4 *)(lVar29 + 0xa4) = 0x98; iVar10 = *(int *)(lVar29 + 0xe8); uVar23 = *(uint *)(lVar29 + 0x20); if (uVar18 == 0) { if ((((uVar13 < 0xa0) && (uVar19 = 2, uVar13 < 0x5b)) && (uVar19 = 1, uVar13 < 0x33)) && (uVar19 = 3, uVar13 < 0x24)) { uVar18 = 4; if (0x19 < uVar13) { uVar18 = 5; } uVar19 = (ulong)uVar18; } if (uVar12 != 0) { uVar12 = uVar12 / 0x3c; } uVar13 = *(uint *)(lVar29 + 0x40); if (uVar13 < 9) { uVar13 = uVar13 - 4; } else { uVar13 = uVar13 >> 1; } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x100) = (uVar8 - 4 & 8) >> 1 | (uVar8 - 4 & 7) << 4 | 0xc00 | (uVar13 & 7) << 9; uVar13 = 0; if (iVar10 != 0) { uVar13 = (uVar8 - iVar10 & 3) << 3; } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104) = ((uint)uVar19 & 1) << 2 | (uint)(uVar14 < 0x28) << 1 | ((uint)(uVar19 >> 1) & 1) << 6 | ((uint)(uVar19 >> 2) & 1) << 9 | uVar13; *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108) = (uVar23 - 5 & 7) << 3 | 0x40 | uVar12 << 9; } else if (bVar2 == 1) { iVar17 = 0; if ((((uVar13 < 0x119) && (iVar17 = 4, uVar13 < 0xb5)) && ((iVar17 = 2, uVar13 < 0x65 && (((iVar17 = 6, uVar13 < 0x47 && (iVar17 = 1, uVar13 < 0x37)) && (iVar17 = 5, uVar13 < 0x2d) ))))) && ((iVar17 = 3, uVar13 < 0x26 && (iVar17 = 0, uVar13 < 0x23)))) { iVar17 = 7; } if (uVar12 != 0) { if (uVar12 < 0xb5) { if (uVar12 < 0x65) { if (0x28 < uVar12) { uVar12 = 4; } } else { uVar12 = 1; } } else { uVar12 = 2; } } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x114) = (uVar28 & 1) << 0xc | (uVar28 & 2) << 10 | 0x400; if ((uVar8 < 0x11) || (0x18 < uVar8)) { uVar19 = (ulong)(uVar8 - 9); } else if (uVar8 == 0x11) { uVar19 = 0xd; } else if (uVar8 == 0x12) { uVar19 = 8; } else if (uVar8 == 0x13) { uVar19 = 0xe; } else if (uVar8 == 0x14) { uVar19 = 9; } else if (uVar8 == 0x15) { uVar19 = 0xf; } else if (uVar8 == 0x16) { uVar19 = 10; } else { uVar13 = 0xc; if (uVar8 != 0x17) { uVar13 = 0xb; } uVar19 = (ulong)uVar13; } uVar13 = 0xc00; if (*(uint *)(lVar29 + 0x40) < 0x16) { uVar13 = (*(uint *)(lVar29 + 0x40) - 10 >> 1 & 7) << 9; } *(uint *)(lVar29 + (long)(int)(uint)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x100) = ((uint)(uVar19 >> 4) & 1) << 0xc | ((uint)(uVar19 >> 1) & 7) << 4 | ((uint)uVar19 & 1) << 2 | uVar13; uVar13 = 0; if (iVar10 != 0) { uVar13 = (uVar8 - iVar10 & 3) << 3; } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104) = (uint)(0x2f < uVar14) << 1 | 1 | iVar17 << 8 | uVar13; if (uVar23 < 0xd) { uVar14 = uVar23 - 9; } else { uVar14 = uVar23 - 6 >> 1; } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108) = (uVar14 & 7) << 3 | 0xc0 | uVar12 << 9; *(undefined4 *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c) = 0; *(undefined4 *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x110) = 0x808; uVar14 = FUN_fffd28dc(*(undefined2 *)(lVar30 + 0x68),2); *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x118) = uVar14 & 0xffff | (*(int *)(lVar29 + 0x50) + -4) * 0x400; } else { if (bVar2 == 3) { uVar12 = 1; if ((((0x24 < uVar14) && (uVar12 = 2, 0x2b < uVar14)) && (uVar12 = uVar18, 0x35 < uVar14)) && (uVar12 = 4, 0x45 < uVar14)) { uVar12 = 6; } uVar14 = 0; if (((uVar13 < 0x169) && (uVar14 = 3, uVar13 < 0xb5)) && (uVar14 = 2, uVar13 < 0x5b)) { uVar14 = (uint)(uVar13 != 0); } uVar13 = *(uint *)(lVar29 + 0x40); if (uVar13 < 10) { uVar18 = uVar13 - 2; } else { uVar18 = uVar13 - 10; } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104) = (uVar18 & 7) << 5 | 3; uVar18 = 0; if (9 < uVar13) { uVar18 = 0x10; } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108) = uVar18 | uVar8 - 2; *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c) = uVar12; *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x120) = uVar14 | 4; } else { if (uVar18 != 2) goto LAB_fffd3e58; *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104) = (DAT_fffdbb10 & 1) << 3 | 4 | uVar15 << 4; uVar18 = DAT_fffdbb14; uVar9 = s_pin_index_count_end_0x_fffdb8b0._12_4_; *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108) = uVar15 | ((uVar23 >> 1) - 2) * 8; uVar12 = 0; if (uVar14 != 0) { uVar12 = 0xf0 / uVar14; } if (6 < uVar12) { uVar12 = 6; } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c) = uVar18 | uVar9 << 1 | (uVar28 & 1) << 6 | (bVar3 >> 1 & 1) << 7 | uVar12 << 3; uVar6 = *(ushort *)(lVar30 + 0x5a); *(undefined4 *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x110) = 0; uVar14 = 0; if (uVar13 != 0) { uVar14 = 0xf0 / uVar13; } uVar13 = 0; if (uVar6 != 0) { uVar13 = 0xf0 / uVar6; } if (6 < uVar14) { uVar14 = 6; } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x120) = uVar14 | (uVar13 & 7) << 4; *(undefined4 *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x128) = 0; uVar14 = FUN_fffd28dc(*(undefined2 *)(lVar30 + 100),*(byte *)(lVar30 + 0x43) + 3); *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x124) = uVar14 & 0xffff; uVar14 = FUN_fffd28dc(*(undefined2 *)(lVar30 + 0x68),*(byte *)(lVar30 + 0x43) + 3); *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 300) = uVar14 & 0xffff; uVar6 = *(ushort *)(lVar30 + 0x54); *(undefined4 *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x130) = 0; *(undefined4 *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x134) = 0; uVar14 = (uint)*(ushort *)(lVar30 + 0x52); if (uVar14 == 0) { uVar14 = (uint)uVar6; } uVar13 = 0; if (uVar14 != 0) { uVar13 = 0xf0 / uVar14; } uVar14 = 0; if (*(char *)(lVar30 + 0x43) == '\0') { uVar14 = 8; } uVar12 = 0; if (*(char *)(lVar30 + 0x43) == '\0') { uVar12 = 0x10; } *(uint *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x138) = uVar14 | uVar13 & 7 | uVar12; *(undefined4 *)(lVar29 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x13c) = 0; } *(undefined4 *)(lVar29 + 0x94) = 0x26; } LAB_fffd3e58: *(undefined4 *)(lVar29 + 0xa8) = 0xf; *(undefined4 *)(lVar29 + 0xac) = 2; iVar17 = iVar10 + uVar8; *(uint *)(lVar29 + 0xb0) = iVar10 + uVar23 + -5; *(int *)(lVar29 + 0xb4) = iVar17 + -5; if (*(char *)(lVar30 + 0xe) == '\x03') { *(uint *)(lVar29 + 0xb0) = iVar10 + uVar23 + -4; } if (*(char *)(lVar30 + 0xe) == '\x02') { *(int *)(lVar29 + 0xb0) = *(int *)(lVar29 + 0xb0) + 2; *(int *)(lVar29 + 0xb4) = iVar17 + -4; if (s_pin_index_count_end_0x_fffdb8b0._8_4_ == 0) { *(int *)(lVar29 + 0xb4) = iVar17 + -3; } } *(undefined4 *)(lVar29 + 0xb8) = 0x22; *(undefined4 *)(lVar29 + 0xbc) = 0x18; *(undefined4 *)(lVar29 + 0xc0) = 0x30; *(undefined4 *)(lVar29 + 0xc4) = 0x1000; *(undefined4 *)(lVar29 + 200) = 0; *(undefined4 *)(lVar29 + 0xcc) = 0; *(undefined4 *)(lVar29 + 0xd0) = 0x30f0f; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_fffd3f1c(long param_1) { int iVar1; byte bVar2; char cVar3; ushort uVar4; ushort uVar5; short sVar6; short sVar7; bool bVar8; byte bVar9; ushort uVar10; ushort uVar11; undefined2 uVar12; uint uVar13; uint uVar14; uint uVar15; long lVar16; short sVar17; ulong uVar18; ulong uVar19; long lVar20; long lVar21; long lVar22; ulong uVar23; long lVar24; int iVar25; long lVar26; bVar2 = *(byte *)(param_1 + 0x1b9); lVar20 = *(long *)(param_1 + 0xa0); uVar23 = (ulong)bVar2; uVar4 = *(ushort *)(lVar20 + uVar23 * 2 + 0x38); uVar13 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x1e),3); _DAT_fe1a0000 = 0; bVar9 = *(byte *)(lVar20 + 0xe); if (uVar23 == 0) { uVar10 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x4e),1); uVar14 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x50),1); uVar5 = *(ushort *)(lVar20 + 0x52); uVar14 = uVar14 & 0xffff; uVar11 = FUN_fffd2818(uVar5,3); uVar15 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x54),3); uVar15 = uVar15 & 0xffff; if (bVar9 == 0) { uVar15 = FUN_fffd2818((ulong)uVar5 << 1,3); uVar15 = uVar15 & 0xffff; uVar11 = (ushort)uVar15; } } else if (uVar23 == 1) { if (0xef < (ushort)(*(short *)(lVar20 + 0x14) - 1U)) { *(undefined2 *)(lVar20 + 0x14) = *(undefined2 *)(lVar20 + 0x4e); } if (0xef < (ushort)(*(short *)(lVar20 + 0x18) - 1U)) { *(undefined2 *)(lVar20 + 0x18) = *(undefined2 *)(lVar20 + 0x52); } if (0xef < (ushort)(*(short *)(lVar20 + 0x18) - 1U)) { *(undefined2 *)(lVar20 + 0x18) = *(undefined2 *)(lVar20 + 0x54); } uVar14 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x14),1); uVar14 = uVar14 & 0xffff; uVar10 = (ushort)uVar14; uVar15 = 0; if (bVar9 == 0) { uVar15 = FUN_fffd2818((ulong)*(ushort *)(lVar20 + 0x18) << 1,3); uVar15 = uVar15 & 0xffff; } uVar11 = (ushort)uVar15; if ((bVar9 & 0xfd) == 1) { uVar11 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x18),3); uVar15 = 0; } if (bVar9 == 2) { uVar15 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x18),3); uVar15 = uVar15 & 0xffff; uVar11 = 0; } } else { uVar15 = 0; uVar11 = 0; uVar14 = 0; uVar10 = 0; } if ((bVar9 & 0xfd) == 1) { uVar15 = 0; } if (bVar9 == 2) { uVar11 = 0; } uVar11 = uVar11 | (ushort)(uVar15 << 6); uVar10 = uVar10 | (ushort)(uVar14 << 6); uVar5 = (ushort)uVar13 | (ushort)((uVar13 & 0xffff) << 6); uVar19 = uVar23 << 0x14; lVar16 = 0; do { uVar18 = uVar19 | lVar16 << 0xc; *(undefined2 *)((uVar18 | 0x1005f) * 2 + 0xfe000000) = *(undefined2 *)(lVar20 + 0x62); *(undefined2 *)((uVar18 | 0x1015f) * 2 + 0xfe000000) = *(undefined2 *)(lVar20 + 0x62); *(ushort *)((uVar18 | 0x10049) * 2 + 0xfe000000) = uVar10; *(ushort *)((uVar18 | 0x10149) * 2 + 0xfe000000) = uVar10; *(ushort *)((uVar18 | 0x10041) * 2 + 0xfe000000) = uVar10; *(ushort *)((uVar18 | 0x10141) * 2 + 0xfe000000) = uVar10; *(ushort *)((uVar18 | 0x1004b) * 2 + 0xfe000000) = uVar5; *(ushort *)((uVar18 | 0x1014b) * 2 + 0xfe000000) = uVar5; *(ushort *)((uVar18 | 0x1004d) * 2 + 0xfe000000) = uVar11; *(ushort *)((uVar18 | 0x1014d) * 2 + 0xfe000000) = uVar11; if (*(char *)(lVar20 + 0xe) == '\0') { *(undefined2 *)((uVar18 | 0x10043) * 2 + 0xfe000000) = 0x581; *(undefined2 *)((uVar18 | 0x10143) * 2 + 0xfe000000) = 0x581; } if (*(char *)(lVar20 + 0xe) == '\x01') { *(undefined2 *)((uVar18 | 0x10043) * 2 + 0xfe000000) = 0x5b3; *(undefined2 *)((uVar18 | 0x10143) * 2 + 0xfe000000) = 0x5b3; } if (*(char *)(lVar20 + 0xe) == '\x03') { *(undefined2 *)((uVar18 | 0x10043) * 2 + 0xfe000000) = 0x5b1; *(undefined2 *)((uVar18 | 0x10143) * 2 + 0xfe000000) = 0x5b1; } if (*(char *)(lVar20 + 0xe) == '\x02') { *(undefined2 *)((uVar18 | 0x10043) * 2 + 0xfe000000) = 0x5a1; *(undefined2 *)((uVar18 | 0x10143) * 2 + 0xfe000000) = 0x5a1; } lVar16 = lVar16 + 1; } while (lVar16 != 4); if (*(char *)(lVar20 + 0xe) == '\0') { *(undefined2 *)((uVar19 | 0x20024) * 2 + 0xfe000000) = 8; _DAT_fe040074 = 0; } if (*(char *)(lVar20 + 0xe) == '\x03') { *(undefined2 *)((uVar19 | 0x20024) * 2 + 0xfe000000) = 8; _DAT_fe040074 = 0; } bVar8 = *(char *)(lVar20 + 0xe) == '\x01'; if (bVar8) { *(undefined2 *)((uVar19 | 0x20024) * 2 + 0xfe000000) = 9; _DAT_fe040074 = 2; } uVar12 = s_pin_index_count_end_0x_fffdb8b0._20_2_; uVar13 = (uint)bVar8; if (*(char *)(lVar20 + 0xe) == '\x02') { uVar13 = DAT_fffdbb10 & 0xffff; _DAT_fe040074 = (undefined2)((DAT_fffdbb10 & 1) << 1); uVar11 = 10; if ((DAT_fffdbb10 & 1) == 0) { uVar11 = 0xb; } uVar10 = 0x80; if ((DAT_fffdbb10 & 1) != 0) { uVar10 = 0; } *(ushort *)((uVar19 | 0x20024) * 2 + 0xfe000000) = uVar10 | uVar11 | (ushort)((s_pin_index_count_end_0x_fffdb8b0._12_4_ & 0x3ff) << 6) | s_pin_index_count_end_0x_fffdb8b0._20_2_ << 8; if (uVar12 == 0) goto LAB_fffd43ec; LAB_fffd43e4: uVar12 = 3; } else { LAB_fffd43ec: uVar12 = 10; if (0x3a5 < uVar4) { if (uVar4 < 0x4b1) { uVar12 = 6; if (uVar13 != 0) { uVar12 = 2; } } else { if (uVar13 != 0) goto LAB_fffd43e4; uVar12 = 7; } } } lVar21 = (uVar19 | 0x20056) * 2; *(undefined2 *)(lVar21 + 0xfe000000) = uVar12; uVar12 = FUN_fffd28dc(*(undefined2 *)(lVar20 + 0x66),1); *(undefined2 *)((uVar19 | 0x200b2) * 2 + 0xfe000000) = uVar12; *(undefined2 *)((uVar19 | 0x200fa) * 2 + 0xfe000000) = 1; lVar16 = (uVar19 | 0x20019) * 2; *(ushort *)(lVar16 + 0xfe000000) = (ushort)*(byte *)(lVar20 + 0x10) << 1; *(ushort *)((uVar19 | 0x2002d) * 2 + 0xfe000000) = *(byte *)(lVar20 + 0x41) & 1; uVar12 = FUN_fffd27d0(uVar4); *(undefined2 *)((uVar19 | 0x200c5) * 2 + 0xfe000000) = uVar12; sVar17 = 2; if (uVar4 < 0x3a5) { sVar17 = 1; } lVar22 = (uVar19 | 0x2002e) * 2; *(ushort *)(lVar22 + 0xfe000000) = sVar17 + ((ushort)((int)(uint)*(byte *)(lVar20 + 0x40) >> (bVar2 & 0x1f)) & 1); *(ushort *)((uVar19 | 0x20008) * 2 + 0xfe000000) = uVar4 >> 1; lVar26 = 0; uVar13 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x4c)); do { uVar18 = lVar26 << 0xc; *(undefined2 *)((uVar18 | 0x55) * 2 + 0xfe000000) = *(undefined2 *)(lVar20 + 0x60); *(ushort *)((uVar18 | 0x43) * 2 + 0xfe000000) = (ushort)((uVar13 & 0xffff) << 5) | (ushort)uVar13; uVar12 = FUN_fffd61cc(1,*(undefined *)(lVar20 + lVar26 + 0x6c)); lVar24 = (uVar19 | 0x80 | uVar18) * 2; *(undefined2 *)(lVar24 + 0xfe000000) = uVar12; if (*(char *)(lVar20 + uVar23 * 0x1ac + lVar26 + 0x140) != '\0') { uVar12 = FUN_fffd61cc(1); *(undefined2 *)(lVar24 + 0xfe000000) = uVar12; } lVar26 = lVar26 + 1; } while (lVar26 != 10); bVar9 = *(byte *)(lVar20 + 0xe); if (bVar9 < 2) { _DAT_fe0000aa = *(undefined2 *)(lVar20 + 0x5e); _DAT_fe0120aa = *(undefined2 *)(lVar20 + 0x5e); _DAT_fe0080aa = *(undefined2 *)(lVar20 + 0x5c); uVar12 = *(undefined2 *)(lVar20 + 0x5c); uVar23 = 0xa0aa; } else { if (1 < (byte)(bVar9 - 2)) goto LAB_fffd469c; if (bVar9 == 2) { uVar11 = 1; if (((0x4af < uVar4) && (uVar11 = (ushort)bVar9, 0x513 < uVar4)) && (uVar11 = 3, uVar4 < 0x640)) { uVar11 = 1; } *(ushort *)(lVar22 + 0xfe000000) = uVar11 + ((ushort)((int)(uint)*(byte *)(lVar20 + 0x40) >> (bVar2 & 0x1f)) & 1); } _DAT_fe0000aa = *(undefined2 *)(lVar20 + 0x5e); _DAT_fe00a0aa = *(undefined2 *)(lVar20 + 0x5e); _DAT_fe0020aa = *(undefined2 *)(lVar20 + 0x5c); uVar12 = *(undefined2 *)(lVar20 + 0x5c); uVar23 = 0xc0aa; } *(undefined2 *)(uVar23 | 0xfe000000) = uVar12; LAB_fffd469c: bVar9 = *(char *)(lVar20 + 0xe) - 2; iVar1 = 6; if (1 < bVar9) { iVar1 = 5; } iVar25 = 4; if (bVar9 < 2) { iVar25 = 1; } uVar13 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x4a),2); _DAT_fe000086 = (ushort)((uVar13 & 0xffff) << 5) | (ushort)uVar13; _DAT_fe012086 = _DAT_fe000086; uVar13 = FUN_fffd2818(*(undefined2 *)(lVar20 + 0x48),2); uVar11 = (ushort)((uVar13 & 0xffff) << 5) | (ushort)uVar13; *(ushort *)((ulong)(iVar25 << 0xc | 0x43) * 2 + 0xfe000000) = uVar11; *(ushort *)((ulong)(iVar1 << 0xc | 0x43) * 2 + 0xfe000000) = uVar11; _DAT_fe040030 = 5; if (*(char *)(lVar20 + 0xe) == '\0') { _DAT_fe0400ea = 0; } if (*(char *)(lVar20 + 0xe) == '\x01') { _DAT_fe0400ea = 2; } if (*(char *)(lVar20 + 0xe) == '\x03') { _DAT_fe0400ea = 1; *(undefined2 *)((uVar19 | 0x20024) * 2 + 0xfe000000) = 8; _DAT_fe040074 = 0; uVar12 = 10; if (0x3a4 < uVar4) { uVar12 = 6; } *(undefined2 *)(lVar21 + 0xfe000000) = uVar12; } if (*(char *)(lVar20 + 0xe) == '\x02') { *(undefined2 *)(lVar16 + 0xfe000000) = 1; _DAT_fe0400ea = 4; *(undefined2 *)((uVar19 | 0x20204) * 2 + 0xfe000000) = 0; _DAT_fe040030 = 3; cVar3 = *(char *)(*(long *)(param_1 + 0xa0) + 0x12); if ((cVar3 == '\a') || (cVar3 == '\x02')) { _DAT_fe040030 = 5; } cVar3 = *(char *)(*(long *)(param_1 + 0xa0) + 0x12); if ((cVar3 == '\x04') || (cVar3 == '\x01')) { _DAT_fe040030 = 5; } *(undefined2 *)(lVar16 + 0xfe000000) = 1; } _DAT_fe0400a0 = 0; _DAT_fe040110 = 9; uVar13 = *(byte *)(lVar20 + 0x40) & 1; _DAT_fe0401e0 = ((ushort)(uVar13 << 8) | (ushort)(uVar13 << 4) | (ushort)uVar13 | (ushort)(uVar13 << 0xc)) + 0x5555; uVar23 = 0xf1; do { uVar19 = uVar23 | 0x20000; uVar23 = uVar23 + 1; *(undefined2 *)(uVar19 * 2 + 0xfe000000) = 0x5555; } while (uVar23 != 0xf7); _DAT_fe0401ee = 0xf000; if ((byte)(*(char *)(lVar20 + 0xe) - 2U) < 2) { uVar13 = *(byte *)(lVar20 + 0x40) & 1; uVar11 = (ushort)(uVar13 << 8) | (ushort)(uVar13 << 4) | (ushort)uVar13 | (ushort)(uVar13 << 0xc); sVar17 = 0; if (uVar4 < 0x14d) { sVar17 = (short)(5 << (ulong)((bVar2 & 7) << 2)); } lVar16 = 0; do { sVar6 = sVar17 + uVar11; sVar7 = _DAT_fe0401e8; if (lVar16 != 0) { sVar6 = _DAT_fe0401e0; if (lVar16 == 2) { _DAT_fe0401e4 = 0x4444; } else if (lVar16 == 3) { _DAT_fe0401e6 = 0x8888; } else { sVar7 = uVar11 + 0x5555; if (lVar16 != 4) { if (lVar16 == 7) { _DAT_fe0401ee = 0xf000; sVar7 = _DAT_fe0401e8; } else { *(undefined2 *)((lVar16 + 0xf0U | 0x20000) * 2 + 0xfe000000) = 0; sVar6 = _DAT_fe0401e0; sVar7 = _DAT_fe0401e8; } } } } _DAT_fe0401e8 = sVar7; _DAT_fe0401e0 = sVar6; lVar16 = lVar16 + 1; } while (lVar16 != 8); } _DAT_fe04004a = 0; if ((*(byte *)(lVar20 + 0xf) & 1) != 0) { _DAT_fe020000 = 4; _DAT_fe020094 = 0x7ff; } if ((*(byte *)(lVar20 + 0xf) >> 1 & 1) != 0) { _DAT_fe022000 = 4; _DAT_fe022094 = 0x7ff; } if ((*(byte *)(lVar20 + 0xf) >> 2 & 1) != 0) { _DAT_fe024000 = 4; _DAT_fe024094 = 0x7ff; } if ((*(byte *)(lVar20 + 0xf) >> 3 & 1) != 0) { _DAT_fe026000 = 4; _DAT_fe026094 = 0x7ff; } _DAT_fe0400c0 = 3; _DAT_fe040042 = 0; _DAT_fe1a0000 = 0; return 1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_fffd4adc(long param_1) { int iVar1; uint uVar2; uint uVar3; long lVar4; lVar4 = *(long *)(param_1 + 0xa0); if ((*(char *)(lVar4 + 0xe) == '\x02') && ((*(char *)(lVar4 + 0x12) == '\x03' || (*(char *)(lVar4 + 0x12) == '\b')))) { _DAT_ff638624 = 0x18db6b; } _DAT_ff638650 = 2; while ((_DAT_ff638654 & 0xf) != 2) { FUN_fffd0120(1); } _DAT_ff638628 = 0x4140; FUN_fffd0120(1); _DAT_ff638628 = 0x4141; FUN_fffd0120(1); do { } while (-1 < _DAT_ff638628); _DAT_ff638628 = 0x4140; FUN_fffd0120(0x21); do { } while ((_DAT_ff638654 & 0xf) != 4); _DAT_ff638648 = 0x31; if (*(char *)(param_1 + 0x264) == -1) { _DAT_ff638650 = 1; do { } while ((_DAT_ff638654 & 0xf) != 1); FUN_fffd7368(param_1,*(char *)(param_1 + 0x267) != '\0'); do { } while ((_DAT_ff638654 & 0xf) != 4); do { } while ((_DAT_ff638654 & 0xf) != 2); do { } while ((_DAT_ff638654 & 0xf) != 4); } _DAT_ff638650 = 4; _DAT_ff638648 = 0x31; uVar3 = 0; do { uVar2 = uVar3 % 5; iVar1 = uVar3 * 4; uVar3 = uVar3 + 1; *(undefined4 *)(ulong)(iVar1 - 0x9c6cc0) = *(undefined4 *)(lVar4 + ((ulong)uVar2 + 0x20) * 4); } while (uVar3 != 10); return 1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_fffd4d18(long param_1) { _DAT_ff638668 = 1; _DAT_ff63810c = 0x31030820; if (*(char *)(*(long *)(param_1 + 0xa0) + 0xe) == '\x02') { _DAT_ff63865c = 0xc10003e8; FUN_fffd0120(1000); _DAT_ff63865c = 0x10186a0; } _DAT_ff638000 = 0xffffff; _DAT_ffd08140 = 0xbaadf00d; InstructionSynchronizationBarrier(); DataMemoryBarrier(3,3); return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd4dc0(long param_1) { int iVar1; _DAT_fe1a0000 = 1; _DAT_fe1a0132 = 0; if (*(byte *)(param_1 + 0x205) < 10) { serial_puts(s__soc_vref_reg_value_0x_fffdb1b0 + 3); } iVar1 = main(*(undefined *)(param_1 + 0x205)); if (iVar1 == 0) { _DAT_fe1a0132 = 1; _DAT_fe1a0000 = 0; } return; } uint FUN_fffd4e4c(int param_1) { uint uVar1; uint uVar2; if (param_1 == 0x80) { LAB_fffd4f04: uVar2 = 0; } else if (param_1 == 0x100) { uVar2 = 1; } else { uVar2 = 2; if ((((param_1 != 0x200) && (uVar2 = 3, param_1 != 0x400)) && (uVar2 = 4, param_1 != 0x800)) && (uVar2 = 5, param_1 != 0x1000)) { if (param_1 == 0x60) goto LAB_fffd4f04; if (param_1 == 0xc0) { uVar1 = 8; uVar2 = 0; goto LAB_fffd4efc; } if (param_1 == 0x180) { uVar1 = 0x108; uVar2 = 1; goto LAB_fffd4efc; } if (param_1 == 0x300) { uVar1 = 0x208; uVar2 = 2; goto LAB_fffd4efc; } if (param_1 == 0x600) { uVar1 = 0x408; uVar2 = 3; goto LAB_fffd4efc; } if (param_1 == 0xc00) { uVar1 = 0x808; uVar2 = 4; goto LAB_fffd4efc; } } } uVar1 = 0; LAB_fffd4efc: return uVar1 | uVar2; } uint FUN_fffd4f14(ushort param_1,byte param_2) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; uVar3 = (uint)param_2; uVar1 = (uint)param_1; uVar2 = (int)uVar1 >> 2; if (param_2 == 0) { if (uVar1 < 0x641) { if (0x4b0 < param_1) { uVar3 = 1; uVar2 = (int)uVar1 >> 3; uVar4 = 2; goto LAB_fffd503c; } if (800 < param_1) { uVar2 = uVar1 / 6; uVar4 = 2; goto LAB_fffd5000; } uVar3 = 3; if (uVar1 < 0x259) { if (uVar1 < 0x191) { if (0x168 < uVar1) goto LAB_fffd5014; uVar2 = (uVar1 << 4) / 0x18; uVar4 = 3; } else { uVar2 = uVar1 / 3; uVar4 = 2; } LAB_fffd5028: uVar3 = 4; goto LAB_fffd503c; } } else { uVar2 = uVar1 / 0xc; uVar3 = (uint)param_2; } uVar4 = 2; } else { if (param_2 != 1) { uVar4 = 0; uVar3 = 0; uVar2 = 0; goto LAB_fffd503c; } if (799 < uVar1) { uVar2 = uVar1 / 6; uVar4 = 3; uVar3 = 0; goto LAB_fffd503c; } if (599 < uVar1) { uVar4 = 3; goto LAB_fffd503c; } uVar4 = 3; if (uVar1 < 400) { if (299 < uVar1) { LAB_fffd5014: uVar3 = 3; uVar2 = (int)uVar1 >> 1; uVar4 = uVar3; goto LAB_fffd503c; } uVar2 = (uVar1 << 4) / 0x18; goto LAB_fffd5028; } uVar2 = uVar1 / 3; LAB_fffd5000: uVar3 = 2; } LAB_fffd503c: return uVar2 | 0x400 | uVar3 << 0x10 | uVar4 << 0x13; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_fffd504c(long param_1) { uint uVar1; undefined4 uVar2; long lVar3; int iVar4; if (_DAT_fffdc8c0 == 0x12345678) { serial_puts(s__rx_clk_window__fffdb78a); serial_puts(s__soc_vref_reg_value_0x_fffdb1b0 + 0x15); serial_puts(s__bl2_window_loop_fffdb7d9 + 4); serial_puts(FUN_fffdad18); serial_puts(s__rx_clk_window__fffdb78a); _DAT_fffdc8c0 = -0x5a5aa5a6; } if (*(byte *)(*(long *)(param_1 + 0xa0) + 0x11) < 10) { FUN_fffd00ec(); } lVar3 = *(long *)(param_1 + 0xa0) + (ulong)*(byte *)(param_1 + 0x1b9) * 2; uVar1 = FUN_fffd4f14(*(undefined2 *)(lVar3 + 0x38), (int)(uint)*(byte *)(*(long *)(param_1 + 0xa0) + 0x40) >> (*(byte *)(param_1 + 0x1b9) & 0x1f) & 1); uVar2 = FUN_fffd0f70(); *(short *)(lVar3 + 0x38) = (short)uVar2; if (*(char *)(param_1 + 0x1ba) == '\0') { serial_puts(s__dram_vref_reg_value_0x_fffdb1c7 + 0x12); FUN_fffdaca0(uVar2); serial_puts(&DAT_fffdb1e5); } lVar3 = *(long *)(param_1 + 0xb0); if ((*(int *)(lVar3 + 0x44) == 0) && (*(int *)(lVar3 + 0x4c) == 0)) { *(undefined4 *)(lVar3 + 0x48) = 0; *(undefined4 *)(lVar3 + 0x4c) = 0x8691c00; *(undefined4 *)(lVar3 + 0x50) = 0x88770290; *(undefined4 *)(lVar3 + 0x40) = 0x18110400; *(undefined4 *)(lVar3 + 0x54) = 0x39272000; *(undefined4 *)(lVar3 + 0x44) = 4; *(undefined4 *)(lVar3 + 0x58) = 0x50540000; } iVar4 = 100; do { lVar3 = *(long *)(param_1 + 0xb0); _DAT_ff638c18 = *(undefined4 *)(lVar3 + 0x58); _DAT_ff638c14 = *(undefined4 *)(lVar3 + 0x54); _DAT_ff638c10 = *(undefined4 *)(lVar3 + 0x50); _DAT_ff638c0c = *(undefined4 *)(lVar3 + 0x4c); _DAT_ff638c08 = *(undefined4 *)(lVar3 + 0x48); _DAT_ff638c04 = *(undefined4 *)(lVar3 + 0x44); FUN_fffd0120(10); _DAT_ff638c00 = uVar1 | 0x1c000000; FUN_fffd0120(100); _DAT_ff638c00 = uVar1 | 0x3c000000; FUN_fffd0120(100); _DAT_ff638c00 = uVar1 | 0x1c000000; FUN_fffd0120(100); if ((int)_DAT_ff638c00 < 0) { if (iVar4 != 0) { return 0; } serial_puts(s_y_apb_wr__0__20___2__16___0__12__fffdb1ea); return 0xf; } iVar4 = iVar4 + -1; } while (iVar4 != -1); return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined FUN_fffd5288(long param_1) { *(undefined *)(param_1 + 0x262) = 0; _DAT_ff638668 = 0x1234; *(undefined *)(param_1 + 0x262) = 1; serial_puts(s_Check_phy_result_fffdb213 + 0xf,*(undefined *)(param_1 + 0x205)); FUN_fffd0188(*(undefined *)(param_1 + 0x262),0x10,*(undefined *)(param_1 + 0x205)); serial_puts(s__rx_clk_window__fffdb78a,*(undefined *)(param_1 + 0x205)); return *(undefined *)(param_1 + 0x262); } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_fffd5308(long param_1) { char cVar1; ushort uVar2; ushort uVar3; uint uVar4; uint uVar5; long lVar6; FUN_fffd5288(); if (*(char *)(param_1 + 0x262) == '\0') { *(undefined *)(*(long *)(param_1 + 0xa0) + 0x41) = 0; } lVar6 = *(long *)(param_1 + 0xa0); uVar2 = *(ushort *)(lVar6 + 0x28); uVar4 = FUN_fffd4e4c(uVar2); uVar3 = *(ushort *)(lVar6 + 0x2a); uVar5 = FUN_fffd4e4c(uVar3); cVar1 = *(char *)(lVar6 + 0xe); uVar4 = (uVar5 & 7) * 8 + (uVar4 & 0xf00) * 0x100000 + (uVar4 & 7) + (uVar4 & 8) * 0x20 + (uVar5 & 8) * 0x40; if (cVar1 == '\x01') { uVar4 = uVar4 | 0x500000; } else if (cVar1 == '\x03') { uVar4 = uVar4 | 0x800000; } else if (cVar1 == '\x02') { if (1 < (byte)(*(char *)(lVar6 + 0x12) - 5U)) { uVar4 = uVar4 & 0xf3fffff; } uVar4 = uVar4 | 0xc00000; } uVar5 = uVar4 | 0x200000; if (uVar3 == 0) { uVar5 = uVar4; } _DAT_ff639368 = uVar5 | 0x10000; if ((*(byte *)(lVar6 + 0xf) & 0xf) == 0) { _DAT_ff639368 = uVar5; } _DAT_ff639254 = _DAT_ff639254 & 0xfffffffd; _DAT_ff800240 = _DAT_ff800240 & 0xffff | ((uint)uVar2 + (uint)uVar3) * 0x10000; return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint FUN_fffd5444(long param_1) { uint uVar1; uint uVar2; _DAT_fe0401c6 = 0xc00; uVar2 = (uint)*(ushort *)(*(long *)(param_1 + 0xa0) + (((ulong)_DAT_ff63864c & 1) + 0x18) * 2 + 8) ; uVar1 = 0; if (uVar2 != 0) { uVar1 = 100000000 / (uVar2 << 1); } uVar2 = 0; if ((_DAT_fe0401c8 & 0x3ff) != 0) { uVar2 = uVar1 / (_DAT_fe0401c8 & 0x3ff); } return uVar2; } uint FUN_fffd549c(long param_1) { uint uVar1; uint uVar2; uVar1 = 0; uVar2 = (uint)*(ushort *) (*(long *)(param_1 + 0xa0) + (ulong)*(byte *)(param_1 + 0x1b9) * 2 + 0x38); if (uVar2 != 0) { uVar1 = 0x17d784 / uVar2; } return uVar1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd54bc(long param_1) { char cVar1; byte bVar2; byte bVar3; long lVar4; lVar4 = *(long *)(param_1 + 0xa0); if ((*(uint *)(lVar4 + 8) >> 0x1d & 1) == 0) { return; } cVar1 = *(char *)(lVar4 + 0xe); bVar2 = *(byte *)(lVar4 + 0x13); if (cVar1 == '\x03') { bVar3 = 0x28; } else if (cVar1 == '\x01') { bVar3 = 0; if (bVar2 != 0) { bVar3 = 0x28; } } else { bVar3 = 0x1e; if (cVar1 != '\x02') { bVar3 = 0x32; } } if (bVar2 < 0x14) { bVar2 = bVar3; } _DAT_fee20086 = _DAT_fe020086 | 4; _DAT_fee20286 = _DAT_fee20086; _DAT_fee22086 = _DAT_fee20086; _DAT_fee22286 = _DAT_fee20086; _DAT_fee24086 = _DAT_fee20086; _DAT_fee24286 = _DAT_fee20086; _DAT_fee26086 = _DAT_fee20086; _DAT_fee26286 = _DAT_fee20086; FUN_fffd7008(*(undefined *)(lVar4 + 0xe),1,bVar2); FUN_fffd7008(*(undefined *)(*(long *)(param_1 + 0xa0) + 0xe),2,bVar2); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd55cc(uint param_1) { uint uVar1; ulong uVar2; char *pcVar3; uint uVar4; pcVar3 = s_INFO___STREAM_fffdb05c + 0xc; uVar4 = 0x1c; while( true ) { uVar1 = uVar4 - 1; uVar2 = (ulong)uVar1; if ((*(uint *)(s_WARNING___Get_unknown_status__0x_fffdb06a + uVar2 * 8 + 2) < param_1) && (param_1 <= *(uint *)(pcVar3 + 0xe4))) break; pcVar3 = pcVar3 + -8; uVar4 = uVar1; if (uVar1 == 0) { if (param_1 == 0) { return; } LAB_fffd561c: _DAT_ff807004 = *(undefined4 *)(s_INFO___STREAM_fffdb05c + uVar2 * 8 + 0xc); FUN_fffdad18(s_V_0_1_22_fffdb230, *(undefined4 *) (s_WARNING___Get_unknown_status__0x_fffdb06a + (ulong)((int)uVar2 - 1) * 8 + 2), 1,s_DDR_pll_lock_failed__fffdb24a + 1); return; } } uVar2 = (ulong)uVar4; goto LAB_fffd561c; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined4 FUN_fffd565c(void) { return *(undefined4 *) (s_WARNING___Get_unknown_status__0x_fffdb06a + (ulong)(byte)_DAT_ff807004 * 8 + 2); } ulong FUN_fffd567c(uint param_1) { ulong uVar1; uVar1 = 0; do { if (param_1 <= *(uint *)(s_WARNING___Get_unknown_status__0x_fffdb06a + uVar1 * 8 + 2)) { return uVar1 & 0xffffffff; } uVar1 = uVar1 + 1; } while (uVar1 != 0x1d); return 0x1c; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_fffd56b4(long param_1) { undefined4 uVar1; uint uVar2; int iVar3; undefined4 uVar4; ulong uVar5; uVar1 = FUN_fffd565c(); FUN_fffdad18(s_DDR_pll_lock_failed__fffdb24a + 7,uVar1,1,s_DDR_pll_lock_failed__fffdb24a + 1); if (0x119 < *(int *)(param_1 + 0x1fc) - 0x2a9U) { *(undefined4 *)(param_1 + 0x1fc) = 0x2a9; } uVar2 = FUN_fffd567c(*(undefined4 *)(param_1 + 0x1fc)); if (0x119 < *(int *)(param_1 + 0x200) - 0x2a9U) { *(undefined4 *)(param_1 + 0x200) = 0x3c2; } iVar3 = FUN_fffd567c(*(undefined4 *)(param_1 + 0x200)); uVar5 = (ulong)(iVar3 + 1); while (uVar2 < (uint)uVar5) { uVar5 = (ulong)((uint)uVar5 - 1); _DAT_ff807004 = *(undefined4 *)(s_INFO___STREAM_fffdb05c + uVar5 * 8 + 0xc); uVar1 = *(undefined4 *)(s_WARNING___Get_unknown_status__0x_fffdb06a + uVar5 * 8 + 2); FUN_fffdad18(s_D2PLL_flow_fffdb260 + 7,uVar1,1,s__dmc_version_fffdb282 + 2); uVar4 = FUN_fffd5444(param_1,*(undefined *)(param_1 + 0x205)); FUN_fffdaca0(uVar4); serial_puts(s__txdqs_window__fffdb77b + 0xe); FUN_fffd6c08(param_1); FUN_fffdad18(s__dmc_version_fffdb282 + 0xc,uVar1,1,s_DDR_pll_lock_failed__fffdb24a + 1); } return 1; } void FUN_fffd57f0(uint param_1,int param_2) { uint uVar1; uint *puVar2; puVar2 = (uint *)(ulong)((param_1 & 0xfffffffc) - 0x9c7800); uVar1 = (param_1 & 3) << 3; *puVar2 = *puVar2 & (0xff << (ulong)uVar1 ^ 0xffffffffU) | param_2 << (ulong)uVar1; return; } void FUN_fffd5820(uint param_1,uint param_2) { long lVar1; lVar1 = 0; serial_puts(&DAT_fffdb4c0); do { if (((param_2 ^ param_1) >> (ulong)((uint)lVar1 & 0x1f) & 1) != 0) { FUN_fffdaca0(lVar1); serial_puts(s__bl2_window_loop_fffdb7d9 + 8); } lVar1 = lVar1 + 1; } while (lVar1 != 0x20); serial_puts(s__rx_clk_window__fffdb78a); return; } void FUN_fffd5890(uint param_1,uint param_2,byte param_3) { long lVar1; uint uVar2; if (param_3 < 0xf) { serial_puts(&DAT_fffdb4c7); FUN_fffdaca0(param_2 & 0xff); serial_puts(s__bl2_window_loop_fffdb7d9 + 8); serial_puts(&DAT_fffdb4dc); FUN_fffdac54(param_1,0x20); serial_puts(s__bl2_window_loop_fffdb7d9 + 8); uVar2 = 0; do { if ((param_1 >> (ulong)(uVar2 & 0x1f) & 1) != 0) { lVar1 = 0; do { if (uVar2 == (*(uint *)(ulong)((param_2 & 0xff) * 0x14 + -0x9c6cc0 + ((uint)lVar1 / 6) * 4 ) >> (ulong)(((uint)lVar1 % 6) * 5 & 0x1f) & 0x1f)) { serial_puts((&DAT_fffdb3d0)[lVar1]); serial_puts(s__bl2_window_loop_fffdb7d9 + 8); } lVar1 = lVar1 + 1; } while (lVar1 != 0x1e); } uVar2 = uVar2 + 1; } while (uVar2 != 0x20); serial_puts(s__rx_clk_window__fffdb78a); return; } return; } undefined4 FUN_fffd59bc(int *param_1) { int iVar1; undefined4 uVar2; int iVar3; int iVar4; *param_1 = -0x55555556; iVar3 = *param_1; uVar2 = 0; if (iVar3 != -0x55555556) { uVar2 = FUN_fffdab14(&DAT_fffdb4e4,(ulong)param_1 & 0xffffffff,0xaaaaaaaa,iVar3); FUN_fffd5820(0xaaaaaaaa,iVar3); } *param_1 = 0x55555555; iVar3 = *param_1; if (iVar3 != 0x55555555) { uVar2 = FUN_fffdab14(&DAT_fffdb4e4,(ulong)param_1 & 0xffffffff,0x55555555,iVar3); FUN_fffd5820(0x55555555,iVar3); } iVar4 = 0x20; iVar3 = 1; do { *param_1 = iVar3; iVar1 = *param_1; if (iVar1 != iVar3) { uVar2 = FUN_fffdab14(&DAT_fffdb4e4,(ulong)param_1 & 0xffffffff,iVar3,iVar1); FUN_fffd5820(iVar3,iVar1); } iVar4 = iVar4 + -1; iVar3 = iVar3 << 1; } while (iVar4 != 0); return uVar2; } ulong FUN_fffd5ab8(int *param_1,ulong param_2,byte param_3) { int iVar1; uint uVar2; ulong uVar3; undefined *puVar4; undefined8 uVar5; uint uVar6; uint uVar7; ulong uVar8; int *piVar9; uVar2 = ((uint)(param_2 >> 2) & 0x3fffffff) - 1; for (uVar3 = 1; ((uint)uVar3 & uVar2) != 0; uVar3 = (ulong)((uint)uVar3 << 1)) { param_1[uVar3] = -0x55555556; } *param_1 = 0x55555555; uVar3 = 1; do { if (((uint)uVar3 & uVar2) == 0) { *param_1 = -0x55555556; uVar3 = 1; while( true ) { uVar6 = (uint)uVar3; if ((uVar6 & uVar2) == 0) { return (ulong)(uVar6 & uVar2); } param_1[uVar3] = 0x55555555; piVar9 = param_1 + uVar3; if (*param_1 != -0x55555556) break; uVar8 = 1; while (uVar7 = (uint)uVar8, (uVar7 & uVar2) != 0) { iVar1 = param_1[uVar8]; piVar9 = param_1 + uVar8; if ((iVar1 != -0x55555556) && (uVar7 != uVar6)) { if (0xf < param_3) goto LAB_fffd5b78; puVar4 = &DAT_fffdb4f4; goto LAB_fffd5b6c; } uVar8 = (ulong)(uVar7 << 1); } param_1[uVar3] = -0x55555556; uVar3 = (ulong)(uVar6 << 1); } if (param_3 < 0x10) { iVar1 = *param_1; puVar4 = &DAT_fffdb4ee; LAB_fffd5b6c: uVar5 = 0x55555555; LAB_fffd5b74: FUN_fffdab14(puVar4,(ulong)piVar9 & 0xffffffff,uVar5,iVar1); } LAB_fffd5b78: return (ulong)piVar9 & 0xffffffff; } iVar1 = param_1[uVar3]; piVar9 = param_1 + uVar3; if (iVar1 != -0x55555556) { if (0xf < param_3) goto LAB_fffd5b78; puVar4 = &DAT_fffdb4e9; uVar5 = 0xaaaaaaaa; goto LAB_fffd5b74; } uVar3 = (ulong)((uint)uVar3 << 1); } while( true ); } uint FUN_fffd5bfc(long param_1) { uint uVar1; ushort uVar2; uint uVar3; uint uVar4; undefined *puVar5; long lVar6; lVar6 = *(long *)(param_1 + 0xa0); uVar1 = *(uint *)(lVar6 + 0x20); uVar2 = *(ushort *)(lVar6 + 0x28); uVar3 = FUN_fffd59bc((ulong)uVar1); serial_puts(&DAT_fffdb4fa,*(undefined *)(param_1 + 0x205)); if (uVar3 == 0) { puVar5 = &DAT_fffdb514; } else { puVar5 = &DAT_fffdb50c; } uVar4 = 0; serial_puts(puVar5,*(undefined *)(param_1 + 0x205)); if (*(short *)(lVar6 + 0x2a) != 0) { uVar4 = FUN_fffd59bc((ulong)uVar2 * 0x100000 + (ulong)uVar1); serial_puts(&DAT_fffdb51a,*(undefined *)(param_1 + 0x205)); if (uVar4 == 0) { puVar5 = &DAT_fffdb514; } else { puVar5 = &DAT_fffdb50c; } serial_puts(puVar5,*(undefined *)(param_1 + 0x205)); } uVar4 = uVar4 | uVar3; if (uVar4 != 0) { uVar4 = 0xff; } return uVar4; } uint FUN_fffd5ccc(long param_1) { uint uVar1; ushort uVar2; uint uVar3; uint uVar4; long lVar5; ulong uVar6; lVar5 = *(long *)(param_1 + 0xa0); uVar1 = *(uint *)(lVar5 + 0x20); if (0xfff < *(ushort *)(lVar5 + 0x28)) { *(undefined2 *)(lVar5 + 0x28) = 0xf58; } uVar6 = (ulong)*(ushort *)(lVar5 + 0x28) * 0x100000; uVar2 = *(ushort *)(lVar5 + 0x2a); uVar3 = FUN_fffd5ab8((ulong)uVar1,uVar6 & 0xffffffff,*(undefined *)(param_1 + 0x205)); serial_puts(s_fail_address_pin_cs_fffdb527 + 5,*(undefined *)(param_1 + 0x205)); if (uVar3 == 0) { serial_puts(&DAT_fffdb514,*(undefined *)(param_1 + 0x205)); } else { serial_puts(&DAT_fffdb50c,*(undefined *)(param_1 + 0x205)); FUN_fffd5890(uVar3,0,*(undefined *)(param_1 + 0x205)); } uVar4 = 0; if (*(short *)(lVar5 + 0x2a) != 0) { uVar4 = FUN_fffd5ab8(uVar6 + uVar1,(uint)uVar2 << 0x14,*(undefined *)(param_1 + 0x205)); serial_puts(s_d_0x_fffdb53e,*(undefined *)(param_1 + 0x205)); if (uVar4 == 0) { serial_puts(&DAT_fffdb514,*(undefined *)(param_1 + 0x205)); } else { serial_puts(&DAT_fffdb50c,*(undefined *)(param_1 + 0x205)); FUN_fffd5890(uVar4,1,*(undefined *)(param_1 + 0x205)); } } uVar4 = uVar4 | uVar3; if (uVar4 != 0) { uVar4 = 0xff; } return uVar4; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int FUN_fffd5df4(long param_1) { int iVar1; bool bVar2; uint uVar3; int iVar4; int iVar5; int *piVar6; undefined4 *puVar7; ulong uVar8; long lVar9; long lVar10; int *piVar11; uint uVar12; lVar9 = *(long *)(param_1 + 0xa0); bVar2 = *(short *)(lVar9 + 0x28) != -1; if (!bVar2) { serial_puts(&DAT_fffdb550); FUN_fffdaca0(*(undefined2 *)(lVar9 + 0x28)); *(undefined2 *)(lVar9 + 0x28) = 0x1000; } if (*(short *)(lVar9 + 0x2a) == -1) { *(undefined2 *)(lVar9 + 0x2a) = 0x1000; uVar12 = 2; } else { if (bVar2) { LAB_fffd6068: uVar12 = (uint)*(ushort *)(lVar9 + 0x28) + (uint)*(ushort *)(lVar9 + 0x2a); serial_puts(s_cs0_DataBus_test_fffdb55a + 3); FUN_fffdaca0(*(undefined2 *)(lVar9 + 0x28)); serial_puts(s_failed_fffdb56c); serial_puts(s_failed_fffdb56c + 4); FUN_fffdaca0(*(undefined2 *)(lVar9 + 0x2a)); serial_puts(s_failed_fffdb56c); serial_puts(s_cs1_DataBus_test_fffdb57a + 5); FUN_fffdac54(_DAT_ff639368,0x20); if (0xfff < uVar12) { uVar12 = 0xf58; } serial_puts(s_cs0_AddrBus_test_fffdb58c + 0xf); FUN_fffdaca0(uVar12 & 0xff8); serial_puts(s_failed_fffdb56c); _DAT_ff800240 = _DAT_ff800240 & 0xffff | (uVar12 & 0xff8) << 0x10; iVar4 = FUN_fffd5bfc(param_1); iVar5 = FUN_fffd5ccc(param_1); return iVar5 + iVar4; } uVar12 = 1; } _DAT_ff639368 = _DAT_ff639368 & 0xffffffc0 | 0x2d; iVar4 = 0; piVar11 = (int *)0x0; do { *piVar11 = -0x55443323; lVar10 = 0; do { iVar5 = (int)piVar11; piVar6 = (int *)(ulong)(uint)((4 << (ulong)((uint)lVar10 & 0x1f)) + iVar5); *piVar6 = -0x55443323; if (*piVar6 != -0x55443323) { serial_puts(s_cs0_AddrBus_test_fffdb58c + 2); } lVar10 = lVar10 + 1; } while (lVar10 != 0x1e); lVar10 = 0x14; do { piVar6 = (int *)(ulong)(uint)((4 << (ulong)((uint)lVar10 & 0x1f)) + iVar5); *piVar6 = 0x55443322; FUN_fffd0120(1); if ((*piVar6 != 0x55443322) || (*piVar11 != -0x55443323)) break; lVar10 = lVar10 + 1; } while (lVar10 != 0x1e); uVar3 = (uint)lVar10; iVar1 = 2 << (ulong)(uVar3 & 0x1f); puVar7 = (undefined4 *)(ulong)(uint)(iVar1 + iVar5); piVar11 = (int *)(ulong)(uint)(iVar1 + (1 << (ulong)(uVar3 & 0x1f)) + iVar5); *puVar7 = 0xaabbccdd; *piVar11 = -0x55443323; *puVar7 = 0x55443322; FUN_fffd0120(1); if (*piVar11 == -0x55443323) { iVar5 = 4 << (ulong)(uVar3 - 0x14 & 0x1f); } else { iVar5 = 3 << (ulong)(uVar3 - 0x14 & 0x1f); } uVar8 = (ulong)iVar5; if (iVar4 == 0) { *(short *)(lVar9 + 0x28) = (short)iVar5; } else { if (0x800 < uVar8) { uVar8 = 0x800; } *(short *)(lVar9 + 0x2a) = (short)uVar8; } uVar3 = FUN_fffd4e4c(uVar8 & 0xffffffff); if (iVar4 == 0) { _DAT_ff639368 = uVar3 & 7 | _DAT_ff639368 & 0xfffffef8 | (uVar3 & 8) << 5; } else { _DAT_ff639368 = (uVar3 & 8) << 6 | (uVar3 & 7) << 3 | _DAT_ff639368 & 0xfffffdc7; } if (uVar12 <= iVar4 + 1U) goto LAB_fffd6068; iVar4 = 1; piVar11 = (int *)(ulong)((uint)*(ushort *)(lVar9 + 0x28) << 0x14); } while( true ); } uint FUN_fffd6160(byte param_1,ulong param_2) { uint uVar1; uint uVar2; uint uVar3; uVar2 = (uint)param_2; if (param_1 == 1) { uVar3 = (uint)(param_2 >> 5); uVar1 = (uint)(param_2 >> 6) & 1; LAB_fffd61ac: uVar2 = (uVar2 & 0x1f) + ((uVar3 & 1) + uVar1) * 0x20; } else { if ((param_1 == 2) || (param_1 == 4)) { uVar3 = (uVar2 & 0x3f) + ((uint)(param_2 >> 6) & 7) * 0x20; } else { uVar3 = uVar2 & 0x3f; if (param_1 == 6) { uVar3 = (uint)(param_2 >> 5); uVar1 = (uint)(param_2 >> 6) & 0x1f; goto LAB_fffd61ac; } } if (param_1 < 0x11) { uVar2 = uVar3; } } return uVar2; } uint FUN_fffd61cc(byte param_1,uint param_2) { if (param_1 == 1) { if (0x3f < param_2) { return (param_2 & 0x1f) + 0x60; } } else if (((byte)(param_1 - 3) < 2) || (param_1 == 6)) { if ((param_1 & 0xfd) != 4) goto LAB_fffd622c; } else { if (param_1 == 5) { LAB_fffd622c: return param_2 & 0x3f; } if (param_1 != 2) { if (5 < param_1) { return param_2; } return 0; } } return (param_2 & 0x1f) + (param_2 >> 5) * 0x40; } void FUN_fffd624c(char param_1,ulong param_2,ulong param_3) { ushort uVar1; short sVar2; short sVar3; undefined2 uVar4; int iVar5; undefined8 uVar6; uint uVar7; long lVar8; ulong uVar9; if (param_1 == '\x01') { uVar9 = (param_2 & 0xfffff) << 0xd | 0x100; if ((param_3 & 1) == 0) { iVar5 = FUN_fffd6160(); uVar7 = iVar5 + 1; if (0x5f < uVar7) { uVar7 = 0x5f; } } else { uVar7 = 0; if (*(short *)(uVar9 + 0xfe000000) != 0) { iVar5 = FUN_fffd6160(1,*(short *)(uVar9 + 0xfe000000),0); uVar7 = iVar5 - 1; } } uVar6 = 1; } else { uVar7 = (uint)param_2; if (param_1 == '\x02') { lVar8 = (ulong)(((uint)(param_2 >> 3) & 0x1fffffff) + 0xd0 + (uVar7 & 1) * 0x100 | ((uint)(param_2 >> 1) & 3) << 0xc | 0x10000) * 2; uVar1 = *(ushort *)(lVar8 + 0xfe000000); if ((param_3 & 1) == 0) { sVar2 = 1; } else { sVar2 = -1; } *(ushort *)(lVar8 + 0xfe000000) = uVar1 + sVar2 | uVar1 & 0xffc0; return; } if (param_1 == '\x03') { uVar9 = (ulong)((uVar7 >> 3) + 0x8c + (uVar7 & 1) * 0x100 | ((uint)(param_2 >> 1) & 3) << 0xc | 0x10000); lVar8 = uVar9 * 2; sVar2 = *(short *)(lVar8 + 0xfe000000); if ((param_3 & 1) == 0) { sVar3 = sVar2 + 1; } else { sVar3 = sVar2 + -1; if (sVar2 == 0) { sVar3 = 0; } } *(short *)(lVar8 + 0xfe000000) = sVar3; *(short *)((uVar9 + 4) * 2 + 0xfe000000) = sVar3; return; } if (param_1 != '\x04') { if (param_1 == '\x05') { lVar8 = (ulong)(uVar7 / 0x24 + 0x68 + (uVar7 % 9) * 0x100 | (uVar7 % 0x24) / 9 << 0xc | 0x10000) * 2; sVar2 = *(short *)(lVar8 + 0xfe000000); if ((param_3 & 1) == 0) { sVar3 = sVar2 + 1; } else { sVar3 = sVar2 + -1; if (sVar2 == 0) { sVar3 = 0; } } *(short *)(lVar8 + 0xfe000000) = sVar3; return; } if (param_1 != '\x06') { return; } lVar8 = (ulong)((uVar7 >> 3) + 0x80 + (uVar7 & 1) * 0x100 | ((uint)(param_2 >> 1) & 3) << 0xc | 0x10000) * 2; if ((param_3 & 1) == 0) { sVar2 = 1; } else { sVar2 = -1; } *(short *)(lVar8 + 0xfe000000) = *(short *)(lVar8 + 0xfe000000) + sVar2; return; } uVar9 = (ulong)(uVar7 / 0x24 + 0xc0 + (uVar7 % 9) * 0x100 | (uVar7 % 0x24) / 9 << 0xc | 0x10000) * 2; if ((param_3 & 1) == 0) { iVar5 = FUN_fffd6160(4,*(undefined2 *)(uVar9 + 0xfe000000)); uVar7 = iVar5 + 1; } else { iVar5 = FUN_fffd6160(4,*(undefined2 *)(uVar9 + 0xfe000000)); uVar7 = iVar5 - 1; } uVar6 = 4; } uVar4 = FUN_fffd61cc(uVar6,uVar7); *(undefined2 *)(uVar9 + 0xfe000000) = uVar4; return; } void FUN_fffd64a8(long param_1) { undefined uVar1; byte bVar2; uint uVar3; uint uVar4; if (*(char *)(param_1 + 0x1c8) < '\0') { uVar1 = *(undefined *)(param_1 + 0x1c9); bVar2 = *(byte *)(param_1 + 0x1ca); uVar3 = 0; do { uVar4 = 1 << (ulong)(uVar3 & 0x1f) & *(uint *)(param_1 + 0x1bc); if (uVar4 == 0) { for (; uVar4 < bVar2; uVar4 = uVar4 + 1 & 0xff) { FUN_fffd624c(1,uVar3,uVar1); } } uVar3 = uVar3 + 1; } while (uVar3 != 10); } return; } void FUN_fffd6530(long param_1) { int iVar1; byte bVar2; byte bVar3; bVar3 = *(byte *)(*(long *)(param_1 + 0xa0) + 0x7f); if (bVar3 != 0) { for (bVar2 = 0; bVar2 != (bVar3 & 7); bVar2 = bVar2 + 1) { iVar1 = 0; do { FUN_fffd624c(3,iVar1,bVar3 >> 3 & 1); iVar1 = iVar1 + 1; } while (iVar1 != 0x10); } bVar2 = *(byte *)(*(long *)(param_1 + 0xa0) + 0x7f); for (bVar3 = 0; bVar3 != (bVar2 >> 4 & 7); bVar3 = bVar3 + 1) { iVar1 = 0; do { FUN_fffd624c(2,iVar1,bVar2 >> 7); iVar1 = iVar1 + 1; } while (iVar1 != 0x10); } } return; } uint FUN_fffd65f0(uint param_1,uint param_2) { uint uVar1; param_1 = param_1 % 0x44; if (param_1 == 0) { uVar1 = 0xaaaa5555; } else { uVar1 = 0xffff; if (param_1 != 1) { uVar1 = 0; } } if (param_1 - 3 < 0x20) { uVar1 = 1 << (ulong)(param_1 - 3 & 0x1f); } if (param_1 - 0x23 < 0x10) { uVar1 = 1 << (ulong)(param_1 - 0x23 & 0x1f); uVar1 = uVar1 | ~uVar1 << 0x10; } if (param_1 - 0x33 < 0x11) { uVar1 = param_1 * 0xf0f - 0x2f0ee; uVar1 = uVar1 | ~uVar1 << 0x10; } if ((param_2 & 1) != 0) { uVar1 = ~uVar1; } if ((param_2 & 0xf) == 3) { uVar1 = 0; } else if ((param_2 & 0xf) == 0xb) { uVar1 = 0xffffffff; } return uVar1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int FUN_fffd6698(undefined4 param_1,int param_2,int param_3,int param_4,int param_5,uint param_6, int param_7) { int iVar1; undefined4 uVar2; uint uVar3; uint uVar4; undefined4 uVar5; uVar2 = _DAT_ff63865c; uVar5 = 0; if ((_DAT_ff639368 >> 0x16 & 3) == 3) { _DAT_ff63865c = 0xc10186a0; uVar5 = uVar2; } _DAT_ff639384 = param_5 + -4; _DAT_ff639380 = param_1; if (param_6 == 0) { _DAT_ff639390 = 0xaa5555aa; _DAT_ff639394 = 0x55aaaa55; _DAT_ff63939c = 0xffffffff; _DAT_ff6393a4 = 0xffff; _DAT_ff6393a8 = 0xffff0000; _DAT_ff6393ac = 0x33cccc33; _DAT_ff6393b0 = 0xaa5555aa; _DAT_ff6393b4 = 0x55aaaa55; _DAT_ff6393bc = 0xffffffff; _DAT_ff6393c4 = 0xffff; _DAT_ff6393c8 = 0xffff0000; _DAT_ff6393cc = 0x33cccc33; _DAT_ff639398 = 0; _DAT_ff6393a0 = 0; _DAT_ff6393b8 = 0; _DAT_ff6393c0 = 0; } else if (param_6 < 0x21) { uVar3 = param_6 - 1; _DAT_ff639390 = (1 << (ulong)(uVar3 & 0x1f)) + param_7; _DAT_ff639394 = (2 << (ulong)(uVar3 & 0x1f)) + param_7; _DAT_ff639398 = (3 << (ulong)(uVar3 & 0x1f)) + param_7; _DAT_ff6393a0 = 4 << (ulong)(uVar3 & 0x1f); _DAT_ff63939c = _DAT_ff6393a0 + param_7; if ((0x10 < param_6) || (_DAT_ff6393a4 = _DAT_ff6393a0, _DAT_ff6393a8 = _DAT_ff6393a0, _DAT_ff6393ac = _DAT_ff6393a0, param_6 != 1)) { _DAT_ff6393a0 = _DAT_ff6393a0 + 0x1010101; _DAT_ff6393a4 = _DAT_ff6393a0; _DAT_ff6393a8 = _DAT_ff6393a0; _DAT_ff6393ac = _DAT_ff6393a0; } } else { _DAT_ff639390 = FUN_fffd65f0(param_6 - 0x21,0); _DAT_ff639394 = ~_DAT_ff639390; _DAT_ff639398 = _DAT_ff639390; _DAT_ff63939c = _DAT_ff639394; _DAT_ff6393a0 = _DAT_ff639390; _DAT_ff6393a4 = _DAT_ff639394; _DAT_ff6393a8 = _DAT_ff639390; _DAT_ff6393ac = _DAT_ff639394; _DAT_ff639460 = _DAT_ff639390; _DAT_ff639464 = _DAT_ff639394; _DAT_ff639468 = _DAT_ff639390; _DAT_ff63946c = _DAT_ff639394; _DAT_ff639470 = _DAT_ff639390; _DAT_ff639474 = _DAT_ff639394; _DAT_ff639478 = _DAT_ff639390; _DAT_ff63947c = _DAT_ff639394; } _DAT_ff6393d8 = 0x8000001f; _DAT_ff63937c = 0xf000f000; uVar3 = 0x81800000; if (0x20 < param_6) { uVar3 = 0x81000000; } _DAT_ff639388 = param_3 << 0x1d | uVar3 | param_2 << 0x1e | param_4 << 0x1b; do { uVar3 = _DAT_ff6393d8; serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xb); } while ((uVar3 & 0xc0000000) == 0); _DAT_ff639388 = 0; uVar4 = 1; if ((uVar3 >> 0x1e & 1) == 0) { uVar4 = (uint)((uVar3 & 0x40000001) != 0); } _DAT_ff6393d8 = 0x8000001f; iVar1 = uVar4 + _DAT_ff6393d4; if (iVar1 != 0) { _DAT_ff638004 = _DAT_ff638004 & 0xdeffffff; FUN_fffd0120(1); _DAT_ff638004 = _DAT_ff638004 | 0x21000000; FUN_fffd0120(1); } if ((_DAT_ff639368 >> 0x16 & 3) == 3) { _DAT_ff63865c = uVar5; } return iVar1; } int FUN_fffd6b1c(long param_1) { undefined4 uVar1; undefined4 uVar2; ushort uVar3; ushort uVar4; int iVar5; int iVar6; int iVar7; int iVar8; long lVar9; uVar1 = *(undefined4 *)(param_1 + 600); FUN_fffd00ec(); lVar9 = *(long *)(param_1 + 0xa0); uVar3 = *(ushort *)(lVar9 + 0x28); uVar4 = *(ushort *)(lVar9 + 0x2a); uVar2 = *(undefined4 *)(lVar9 + 0x20); iVar5 = FUN_fffd0110(); iVar7 = ((uint)uVar3 + (uint)uVar4) * 0x100000 + -4; iVar6 = FUN_fffd6698(uVar2,1,0,0,iVar7,1,uVar1); iVar7 = FUN_fffd6698(uVar2,0,1,1,iVar7,1,uVar1); iVar8 = FUN_fffd0110(); serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xe); FUN_fffdaca0(iVar7 + iVar6); serial_puts(s_DDR_size__fffdb5fb + 10); FUN_fffdaca0(iVar8 - iVar5); serial_puts(s__rx_clk_window__fffdb78a); *(int *)(param_1 + 0x22c) = iVar8 - iVar5; FUN_fffd00a0(5000); return iVar7 + iVar6; } undefined8 FUN_fffd6c08(code **param_1) { uint uVar1; ushort uVar2; int iVar3; int iVar4; uint *puVar5; char *pcVar6; code *pcVar7; uint uVar8; uint uVar9; uint uVar10; uint local_400 [256]; *(undefined *)((long)param_1 + 0x205) = 0xff; FUN_fffd00ec(); pcVar7 = param_1[0x14]; uVar2 = *(ushort *)(pcVar7 + (ulong)*(byte *)((long)param_1 + 0x1b9) * 2 + 0x38); if (*(int *)((long)param_1 + 500) == 0) { *(undefined4 *)((long)param_1 + 500) = 100; } if (*(int *)(param_1 + 0x3f) == 0) { *(undefined4 *)(param_1 + 0x3f) = 3000; } uVar10 = *(uint *)((long)param_1 + 500) / 0x18; uVar9 = uVar10 * 0x18; iVar3 = (*(uint *)(param_1 + 0x3f) / 0x18) * 0x18; *(int *)(param_1 + 0x3f) = iVar3; *(uint *)((long)param_1 + 500) = uVar9; uVar10 = (iVar3 + uVar10 * -0x18) / 0x18 + 2; puVar5 = local_400; uVar8 = 1; do { uVar8 = uVar8 + 1; puVar5[2] = uVar9; puVar5[3] = 0; uVar9 = uVar9 + 0x18; puVar5 = puVar5 + 2; } while (uVar8 < uVar10); local_400[0] = (uint)uVar2; if ((*(char *)(param_1 + 0x3e) == '\0') && (((byte)pcVar7[0x78] & 1) != 0)) { puVar5 = local_400; uVar10 = 1; do { uVar2 = *(ushort *)(pcVar7 + 0x3a); puVar5[3] = 0; puVar5[2] = (uint)uVar2; puVar5 = puVar5 + 2; if (uVar2 != 0) { uVar10 = uVar10 + 1; } pcVar7 = pcVar7 + 2; } while (puVar5 != local_400 + 6); } puVar5 = local_400; for (uVar8 = 0; uVar8 != uVar10; uVar8 = uVar8 + 1) { uVar9 = *puVar5; *(undefined4 *)((long)param_1 + 0x22c) = 0; pcVar7 = *param_1; *(short *)(param_1[0x14] + (ulong)*(byte *)((long)param_1 + 0x1b9) * 2 + 0x38) = (short)uVar9; iVar3 = (*pcVar7)(param_1); iVar4 = (*param_1[7])(param_1); if ((iVar4 + iVar3 == 0) && (iVar3 = FUN_fffd6b1c(param_1), iVar3 == 0)) { uVar9 = uVar9 | 0x10000; } else { uVar9 = uVar9 | 0x20000; } uVar1 = *(uint *)((long)param_1 + 0x22c); *puVar5 = uVar9; puVar5[1] = uVar1; puVar5 = puVar5 + 2; } puVar5 = local_400; uVar8 = 0; do { if (uVar8 == uVar10) { serial_puts(s__cost_time_us___fffdb665 + 0xc); return 1; } uVar9 = *puVar5; FUN_fffdad18(s__100_max___fffdb62f,(short)uVar9,1,&DAT_fffdb641); uVar9 = uVar9 >> 0x10; if (uVar9 == 0) { pcVar6 = s_cur___fffdb644; LAB_fffd6dec: serial_puts(pcVar6); } else { if (uVar9 == 1) { pcVar6 = &DAT_fffdb64c; goto LAB_fffd6dec; } if (uVar9 == 2) { pcVar6 = s__dmc_full_test_result___fffdb64d + 7; goto LAB_fffd6dec; } } FUN_fffdad18(s__dmc_full_test_result___fffdb64d + 0xf,puVar5[1],1,s__cost_time_us___fffdb665 + 8 ); uVar8 = uVar8 + 1; puVar5 = puVar5 + 2; } while( true ); } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined2 FUN_fffd6e44(undefined8 param_1,int param_2,undefined2 param_3,uint param_4,undefined param_5) { undefined2 uVar1; uint uVar2; uint uVar3; int iVar4; int iVar5; ushort uVar6; uVar6 = 0x20; if (((param_2 != 0) && (uVar6 = 0x30, param_2 != 1)) && (uVar6 = 2, param_2 != 2)) { uVar6 = 0; } serial_puts(s__dmc_offset_test_result___fffdb675 + 0x15,param_5); serial_puts(s__DDR_SWEEP_clk___fffdb68f + 5,param_5); iVar5 = 0; do { iVar4 = 0; do { serial_puts(s__bl2_window_loop_fffdb7d9 + 9,param_5); FUN_fffd01e0(*(undefined2 *) ((long)(int)((iVar5 << 0xc | 0x10040U | iVar4 << 8) << 1) + 0xfe000000),param_5) ; iVar4 = iVar4 + 1; } while (iVar4 != 9); iVar5 = iVar5 + 1; } while (iVar5 != 4); serial_puts(s__txdqs_window__fffdb77b + 0xe,param_5); uVar2 = (param_4 & 0xff) % 0x24; uVar1 = *(undefined2 *) ((long)(int)((uVar2 % 9 << 8 | uVar2 / 9 << 0xc | 0x10040) << 1) + 0xfe000000); uVar6 = uVar6 | _DAT_fe020086 & 0xff8e; iVar5 = 0; do { uVar2 = iVar5 << 0xc; *(ushort *) ((-(ulong)(uVar2 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar2 | 0x710043) << 1) + 0xfe000000) = uVar6; *(ushort *) ((-(ulong)(uVar2 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar2 | 0x710143) << 1) + 0xfe000000) = uVar6; iVar4 = 0; do { uVar3 = uVar2 | 0x10000 | iVar4 << 8; *(undefined2 *) ((-(ulong)(uVar3 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar3 | 0x40) << 1) + 0xfe000000) = param_3; iVar4 = iVar4 + 1; *(undefined2 *) ((-(ulong)(uVar3 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar3 | 0x30) << 1) + 0xfe000000) = param_3; } while (iVar4 != 9); iVar5 = iVar5 + 1; } while (iVar5 != 4); return uVar1; } void FUN_fffd7008(char param_1,byte param_2,ushort param_3) { short sVar1; short sVar2; int iVar3; uint uVar4; int iVar5; uint uVar6; uVar4 = 0x40; if ((param_2 & 2) != 0) { uVar4 = 0x30; } if (param_1 == '\x02') { uVar6 = 0x28; } else { uVar6 = 0x2e; if ((param_1 != '\x01') && (uVar6 = 0x39, param_1 != '\0')) { uVar6 = 1; } } sVar1 = 0; if (uVar6 != 0) { sVar1 = (short)(((uint)param_3 * 10) / uVar6); } iVar5 = 0; do { iVar3 = 0; do { uVar6 = iVar5 << 0xc | 0x10000U | iVar3 << 8 | uVar4; sVar2 = sVar1; if ((param_2 & 1) == 0) { sVar2 = -sVar1; } iVar3 = iVar3 + 1; *(short *)((ulong)uVar6 * 2 + 0xfe000000) = sVar2 + *(short *)((ulong)(uVar6 << 1) + 0xfe000000); } while (iVar3 != 9); iVar5 = iVar5 + 1; } while (iVar5 != 4); return; } void FUN_fffd70c8(undefined8 param_1,undefined8 param_2,undefined2 param_3,byte param_4,char param_5 ) { uint uVar1; uVar1 = 0x40; if (param_5 != '\0') { uVar1 = 0x30; } *(undefined2 *) ((ulong)(((uint)param_4 % 0x24) % 9 << 8 | ((uint)param_4 % 0x24) / 9 << 0xc | 0x10000 | uVar1) * 2 + 0xfe000000) = param_3; return; } void FUN_fffd7124(long param_1) { uint uVar1; bool bVar2; int iVar3; if (*(byte *)(param_1 + 0x1c9) != 0) { uVar1 = *(byte *)(param_1 + 0x1c9) - 1; bVar2 = *(char *)(param_1 + 0x208) == '\f'; if ((*(char *)(param_1 + 0x208) == '\x03') || (bVar2)) { iVar3 = 0; do { FUN_fffd70c8(*(undefined *)(*(long *)(param_1 + 0xa0) + 0xe),*(undefined *)(param_1 + 0x233) ,*(undefined *)(param_1 + 0x232),((uVar1 >> 1) * 9 & 0xff) + iVar3,bVar2); iVar3 = iVar3 + 1; } while (iVar3 != 9); } if ((*(byte *)(param_1 + 0x208) & 0xf7) == 5) { FUN_fffd70c8(*(undefined *)(*(long *)(param_1 + 0xa0) + 0xe),*(undefined *)(param_1 + 0x233), *(undefined *)(param_1 + 0x232),uVar1,bVar2); } if ((*(char *)(param_1 + 0x208) == '\x0e') || (*(char *)(param_1 + 0x208) == '\a')) { FUN_fffd70c8(*(undefined *)(*(long *)(param_1 + 0xa0) + 0xe),*(undefined *)(param_1 + 0x233), *(undefined *)(param_1 + 0x232),uVar1,bVar2); return; } } return; } /* WARNING: Removing unreachable block (ram,0xfffd7330) */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd7224(undefined8 param_1,byte param_2,ushort param_3,long param_4) { char cVar1; uint uVar2; _DAT_ff6394e8 = 0xa000a; cVar1 = *(char *)(param_4 + 0x1b8); if ((cVar1 == '\x03') || (uVar2 = (uint)(cVar1 == '\0'), cVar1 == '\0')) { uVar2 = (uint)param_2; } if (cVar1 == '\x01') { uVar2 = param_2 & 3 | (param_2 >> 2 & 3) << 3; } else if (cVar1 == '\x02') { uVar2 = (uint)param_2; } if (*(char *)(param_4 + 0x262) != '\0') { do { } while( true ); } _DAT_ff638664 = param_3 | 0x80000000 | uVar2 << 0x10; do { } while ((int)_DAT_ff638664 < 0); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd7368(long param_1,byte param_2) { byte bVar1; byte bVar2; byte bVar3; if ((param_2 & 1) == 0) { _DAT_fe0400c0 = 2; FUN_fffd0120(200); _DAT_fe0400c0 = 3; FUN_fffd0120(0x7da); } if ((*(uint *)(*(long *)(param_1 + 0xa0) + 0x34) & 0x101) == 0x101) { _DAT_ff638614 = *(undefined4 *) (*(long *)(param_1 + 0xa8) + (((ulong)*(byte *)(param_1 + 0x1b9) & 1) + 0x60) * 4); } bVar3 = 2; if (*(short *)(*(long *)(param_1 + 0xa0) + 0x2a) == 0) { bVar3 = 1; } bVar2 = 0; do { if (*(char *)(param_1 + 0x1b8) == '\x01') { FUN_fffd7224(bVar2,3,*(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c),param_1); FUN_fffd7224(bVar2,4,*(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x110),param_1); FUN_fffd7224(bVar2,5,*(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x114),param_1); if ((param_2 & 2) == 0) { FUN_fffd7224(bVar2,6,*(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x118),param_1); } } if (*(char *)(param_1 + 0x1b8) == '\x03') { FUN_fffd7224(bVar2,3,*(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c),param_1); FUN_fffd7224(bVar2,0xb, *(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x120), param_1); } if (*(char *)(param_1 + 0x1b8) == '\x02') { FUN_fffd7224(bVar2,0xd, *(uint *)(*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x128) | 8,param_1); FUN_fffd7224(bVar2,3,*(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c),param_1); FUN_fffd7224(bVar2,4,*(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x110),param_1); FUN_fffd7224(bVar2,0xb, *(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x120), param_1); FUN_fffd7224(bVar2,0xc, *(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x124), param_1); FUN_fffd7224(bVar2,0x10, *(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x130), param_1); FUN_fffd7224(bVar2,0x11, *(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x134), param_1); if ((param_2 & 2) == 0) { FUN_fffd7224(bVar2,0xe, *(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 300), param_1); } FUN_fffd7224(bVar2,0x16, *(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x138), param_1); } FUN_fffd7224(bVar2,0,*(uint *)(*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x100) | 0x100,param_1 ); FUN_fffd7224(bVar2,1,*(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104),param_1); bVar1 = bVar2 + 1; FUN_fffd7224(bVar2,2,*(undefined2 *) (*(long *)(param_1 + 0xa8) + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108),param_1); bVar2 = bVar1; } while (bVar1 < bVar3); return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd7698(int param_1,ushort param_2,undefined8 param_3,long param_4) { ushort uVar1; undefined8 uVar2; if (*(char *)(param_4 + 0x1b8) == '\x02') { param_2 = param_2 | (ushort)(param_1 << 6); uVar2 = 0xe; } else if (*(char *)(param_4 + 0x1b8) == '\x01') { param_2 = param_2 | (ushort)(param_1 << 6) | (((ushort)*(undefined4 *)(*(long *)(param_4 + 0xa8) + 0x50) & 0xff) - 4) * 0x400; uVar2 = 6; } else { uVar2 = 6; param_2 = 0; } _DAT_ff638650 = 1; FUN_fffd0120(); do { } while ((_DAT_ff638654 >> 4 & 0xf) != 1); if (*(char *)(param_4 + 0x1b8) == '\x01') { uVar1 = param_2 | 0x80; FUN_fffd7224(0,uVar2,uVar1,param_4); param_2 = param_2 & 0xff7f; FUN_fffd7224(0,uVar2,uVar1,param_4); FUN_fffd7224(0,uVar2,param_2,param_4); if (*(short *)(*(long *)(param_4 + 0xa0) + 0x2a) != 0) { FUN_fffd7224(1,uVar2,uVar1,param_4); FUN_fffd7224(1,uVar2,uVar1,param_4); FUN_fffd7224(1,6,param_2,param_4); } } if (*(char *)(param_4 + 0x1b8) == '\x02') { FUN_fffd7224(0,uVar2,param_2,param_4); if (*(short *)(*(long *)(param_4 + 0xa0) + 0x2a) != 0) { FUN_fffd7224(1,uVar2,param_2,param_4); } } _DAT_ff638650 = 4; FUN_fffd0120(1); do { } while ((_DAT_ff638654 >> 4 & 0xf) != 2); FUN_fffd0120(1); return; } void FUN_fffd7850(undefined8 param_1,char param_2,undefined4 param_3,undefined4 param_4) { if (param_2 != '\0') { FUN_fffd624c(param_2,param_3,param_4); return; } return; } void FUN_fffd7868(long param_1,char param_2,ulong param_3,ulong param_4) { ushort uVar1; long lVar2; char cVar3; ushort uVar4; short sVar5; undefined4 uVar6; uint uVar7; int iVar8; ulong uVar9; ulong uVar10; ulong uVar11; int iVar12; uVar9 = param_3 & 0xffffffff; uVar11 = param_4 & 0xffffffff; if (param_2 == '\0') { return; } uVar6 = FUN_fffd61cc(param_2,param_4 & 0xffffffff); uVar7 = (uint)uVar9; uVar4 = (ushort)uVar6; if (param_2 == '\x01') { uVar11 = (param_3 & 0xfffff) << 0xd | 0x100; } else { if (param_2 == '\x02') { lVar2 = (ulong)((int)(uVar9 >> 3) + 0xd0 + (uVar7 & 1) * 0x100 | ((uint)(uVar9 >> 1) & 3) << 0xc | 0x10000) * 2; uVar1 = *(ushort *)(lVar2 + 0xfe000000); uVar7 = FUN_fffd6160(2,uVar1); uVar1 = uVar1 & 0xffc0; if (uVar7 < (uint)uVar11) { sVar5 = FUN_fffd6160(2,uVar1); uVar4 = (short)uVar11 - sVar5; } *(ushort *)(lVar2 + 0xfe000000) = uVar1 | uVar4; goto LAB_fffd7b28; } if (param_2 == '\x03') { uVar11 = (ulong)((uVar7 >> 3) + 0x8c + (uVar7 & 1) * 0x100 | ((uint)(uVar9 >> 1) & 3) << 0xc | 0x10000); *(ushort *)(uVar11 * 2 + 0xfe000000) = uVar4; *(ushort *)((uVar11 + 4) * 2 + 0xfe000000) = uVar4; goto LAB_fffd7b28; } if (param_2 == '\x04') { iVar8 = uVar7 / 0x24 + 0xc0; } else { if (param_2 != '\x05') { if (param_2 != '\x06') { if (param_2 == '\x11') { iVar8 = FUN_fffd565c(); FUN_fffd55cc(uVar11); } else { if (param_2 != '\x12') { if (param_2 == '\x13') { FUN_fffd7698(uVar11 >> 8 & 0xff,param_4 & 0xff,uVar9,param_1); } goto LAB_fffd7b28; } uVar10 = uVar11 >> 8 & 0xff; param_3 = param_3 & 0xff; iVar8 = FUN_fffd6e44(*(undefined *)(param_1 + 0x1b8),uVar10,uVar11,param_3, *(undefined *)(param_1 + 0x205),param_1); FUN_fffd70c8(*(undefined *)(param_1 + 0x1b8),uVar10,uVar11,param_3,0); FUN_fffd70c8(*(undefined *)(param_1 + 0x1b8),uVar10,uVar11,param_3,1); if (*(char *)(param_1 + 0x208) == '\x03') { iVar12 = 1; do { cVar3 = (char)param_3 + (char)iVar12; FUN_fffd70c8(*(undefined *)(param_1 + 0x1b8),uVar10,uVar11,cVar3,0); FUN_fffd70c8(*(undefined *)(param_1 + 0x1b8),uVar10,uVar11,cVar3,1); iVar12 = iVar12 + 1; } while (iVar12 != 9); } } if (iVar8 == -1) { FUN_fffd0188(0xffffffff,0x20,*(undefined *)(param_1 + 0x205)); } goto LAB_fffd7b28; } uVar11 = (ulong)((uVar7 & 3) << 0xc | (uVar7 >> 2) + 0x80 | 0x10000) << 1; goto LAB_fffd7a08; } iVar8 = uVar7 / 0x24 + 0x68; } uVar11 = (ulong)(iVar8 + (uVar7 % 9) * 0x100 | (uVar7 % 0x24) / 9 << 0xc | 0x10000) << 1; } LAB_fffd7a08: *(ushort *)(uVar11 + 0xfe000000) = uVar4; LAB_fffd7b28: FUN_fffd0188(uVar9,0x10,0); serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc,0); FUN_fffd0188(uVar6,0x10,0); serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc,0); return; } void FUN_fffd7b9c(long param_1) { if ((*(char *)(param_1 + 0x1cd) == '\x01') && (*(char *)(param_1 + 0x1ce) != '\0')) { FUN_fffd7868(param_1,*(char *)(param_1 + 0x1ce),*(undefined4 *)(param_1 + 0x1d0), *(undefined4 *)(param_1 + 0x1d4)); FUN_fffd7868(param_1,*(undefined *)(param_1 + 0x1d8),*(undefined4 *)(param_1 + 0x1dc), *(undefined4 *)(param_1 + 0x1e0)); FUN_fffd7868(param_1,*(undefined *)(param_1 + 0x1e4),*(undefined4 *)(param_1 + 0x1e8), *(undefined4 *)(param_1 + 0x1ec)); } *(undefined *)(param_1 + 0x1cd) = 0; return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd7c04(long param_1,byte param_2,byte param_3,byte param_4) { byte *pbVar1; char cVar2; uint uVar3; uint uVar4; bool bVar5; undefined2 uVar6; ushort uVar7; uint uVar8; int iVar9; int iVar10; int iVar11; uint uVar12; ulong uVar13; undefined8 uVar14; long lVar15; char *pcVar16; uint uVar17; int iVar18; uint uVar19; ulong uVar20; uint uVar21; byte bVar22; int iVar23; uint auStack_1a0 [72]; uint local_80; int local_70; int local_6c; int local_68; uint local_64; char *local_60; long local_58; int local_50; int local_4c; undefined8 local_48; char *local_40; uint local_38; uint local_34; long local_30; char *local_28; uint local_20; uint local_1c; char *local_18; ulong local_10; ulong local_8; *(undefined *)(param_1 + 0x264) = 1; *(undefined *)(*(long *)(param_1 + 0xa0) + 0x7d) = 1; uVar12 = (uint)*(ushort *)(*(long *)(param_1 + 0xa0) + 0x28); local_6c = (uVar12 + *(ushort *)(*(long *)(param_1 + 0xa0) + 0x2a)) * 0x100000; local_4c = uVar12 << 0x14; local_34 = (uint)param_3; local_20 = (uint)param_4; FUN_fffdabb0(auStack_1a0,0,0x120); local_50 = FUN_fffd5444(param_1,*(undefined *)(param_1 + 0x205)); local_38 = FUN_fffd549c(param_1); if (param_2 == 1) { if (*(char *)(param_1 + 0x1b8) == '\x03') { local_68 = 0x1000; uVar12 = 5; } else { if (*(char *)(param_1 + 0x1b8) != '\x02') { local_68 = 0x1000; local_70 = 0x60; goto LAB_fffd7d24; } cVar2 = *(char *)(*(long *)(param_1 + 0xa0) + 0x12); if ((cVar2 == '\a') || (cVar2 == '\x02')) { local_68 = 0x1000; local_6c = 0x8000000; uVar12 = 4; local_70 = 0x60; goto LAB_fffd7d68; } local_68 = 0x1000; local_6c = 0x8000000; uVar12 = 10; } local_70 = 0x60; LAB_fffd7d64: local_68 = 0x1000; } else { local_6c = *(int *)(param_1 + 0x238); if (local_6c == 0) { local_68 = 0x1000; local_6c = 0x8000000; uVar12 = 10; local_70 = 0x7f; goto LAB_fffd7d64; } local_68 = local_6c; local_70 = 0x7f; LAB_fffd7d24: uVar12 = 10; } LAB_fffd7d68: if (*(char *)(param_1 + 0x208) != '\0') { if (*(int *)(param_1 + 0x220) != 0) { local_6c = *(int *)(param_1 + 0x220); } } if (param_2 == 2) { uVar12 = 8; local_70 = 0x200; } else if (param_2 == 3) { uVar12 = 8; local_70 = 0x3f; } else if (param_2 == 4) { uVar12 = 0x24; local_70 = 0x100; } else { if (param_2 == 5) { uVar12 = 0x24; local_70 = 0x3f; } } uVar8 = uVar12; if ((*(short *)(*(long *)(param_1 + 0xa0) + 0x2a) != 0) && (uVar8 = uVar12 << 1, param_2 < 2)) { uVar8 = uVar12; } bVar22 = *(byte *)(param_1 + 0x1c9); local_80 = 0; if (bVar22 != 0) { local_80 = bVar22 - 1; uVar8 = (uint)bVar22; } local_28 = s_vref_test_range_fffdb8c7 + 1; local_60 = s_vref_test_range_fffdb8c7 + 1; iVar23 = 0; local_58 = 0; local_1c = (uint)(byte)(param_2 - 2); uVar12 = local_80; LAB_fffd7e40: pcVar16 = local_60; if (uVar12 < uVar8) { if ((0x1f < uVar12) || ((1 << (ulong)(uVar12 & 0x1f) & *(uint *)(param_1 + 0x1bc)) == 0)) { if (uVar12 - 0x20 < 0x1f) { uVar19 = *(uint *)(param_1 + 0x1c0); LAB_fffd7e94: if ((1 << (ulong)(uVar12 & 0x1f) & uVar19) != 0) goto LAB_fffd8860; } else if (0x3f < uVar12) { uVar19 = *(uint *)(param_1 + 0x1c4); goto LAB_fffd7e94; } if (((*(char *)(param_1 + 0x1b8) == '\x02') && (param_2 == 1)) && ((uVar12 == 9 || (uVar12 == 4)))) { uVar12 = uVar12 + 1; } uVar20 = (ulong)uVar12; bVar22 = local_28[uVar20 * 8]; lVar15 = *(long *)(param_1 + 0xa0); iVar18 = *(int *)(lVar15 + 0x20); if (uVar8 <= bVar22) goto LAB_fffd8860; if (param_2 == 1) { local_58 = (long)(int)((uint)bVar22 << 0xc | 0x80); } else { uVar19 = (uint)bVar22; if (param_2 == 2) { if (7 < bVar22) { iVar18 = local_4c; } local_58 = (long)(int)((bVar22 >> 3) + 0xd0 + (uVar19 & 1) * 0x100 | (bVar22 >> 1 & 3) << 0xc | 0x10000); if (((*(char *)(lVar15 + 0x12) != '\x04') && (*(char *)(lVar15 + 0x12) != '\x01')) || ((uVar12 & 7) < 4)) { if ((uVar12 & 1) == 0) goto LAB_fffd80e8; uVar13 = (ulong)(uVar12 - 1); *(undefined2 *)(local_60 + uVar20 * 8 + 2) = *(undefined2 *)(local_60 + uVar13 * 8 + 2); auStack_1a0[uVar20] = auStack_1a0[uVar13]; uVar6 = *(undefined2 *)(pcVar16 + uVar13 * 8 + 6); *(undefined2 *)(pcVar16 + uVar20 * 8 + 4) = *(undefined2 *)(pcVar16 + uVar13 * 8 + 4); *(undefined2 *)(pcVar16 + uVar20 * 8 + 6) = uVar6; } goto LAB_fffd8860; } if (param_2 == 3) { if (((*(char *)(lVar15 + 0x12) == '\x04') || (*(char *)(lVar15 + 0x12) == '\x01')) && (3 < (uVar12 & 7))) goto LAB_fffd8860; local_58 = (long)(int)((bVar22 >> 3) + 0x8c + (uVar19 & 1) * 0x100 | (bVar22 >> 1 & 3) << 0xc | 0x10000); if (7 < uVar19) { iVar18 = local_4c; } } else { uVar19 = (uint)bVar22; if (param_2 == 4) { local_58 = (long)(int)((uVar19 % 0x24) / 9 << 0xc | 0x10000 | (uVar19 % 9) * 0x100 + 0xc0 + uVar19 / 0x24); if (0x23 < bVar22) { iVar18 = local_4c; } } else if (param_2 == 5) { if (((*(char *)(param_1 + 0x262) == '\0') || ((*(byte *)(lVar15 + 0x41) & 1) == 0)) && (uVar12 % 9 == 8)) { *(undefined2 *)(local_60 + uVar20 * 8 + 2) = 0; *(undefined2 *)(local_60 + uVar20 * 8 + 4) = 0; *(undefined2 *)(local_60 + uVar20 * 8 + 6) = 0; goto LAB_fffd8860; } uVar21 = bVar22 / 0x24; local_58 = (long)(int)((uVar19 + uVar21 * -0x24 & 0xff) / 9 << 0xc | 0x10000 | (uVar19 % 9) * 0x100 + 0x68 + uVar21); if (0x23 < uVar19) { iVar18 = local_4c; } } } } LAB_fffd80e8: local_30 = local_58 * 2; uVar6 = FUN_fffd6160(param_2,*(undefined2 *)(local_30 + 0xfe000000)); pbVar1 = (byte *)(local_60 + uVar20 * 8); *(undefined2 *)(pbVar1 + 2) = uVar6; *(undefined2 *)(pbVar1 + 4) = uVar6; *(undefined2 *)(pbVar1 + 6) = uVar6; local_48 = s__0_skip_fffdb6a4; auStack_1a0[uVar20] = 0; local_40 = s__rx_clk_window__fffdb78a; while( true ) { uVar7 = *(ushort *)(pbVar1 + 4); if ((uVar7 == 0) || ((param_2 == 2 && ((uVar7 & 0x1f) == 0)))) break; *(byte *)(param_1 + 0x1ce) = param_2; *(undefined *)(param_1 + 0x1cd) = 1; *(uint *)(param_1 + 0x1d0) = (uint)*pbVar1; *(uint *)(param_1 + 0x1d4) = (uint)uVar7; if (param_2 == 1) { (**(code **)(param_1 + 0x38))(param_1); } iVar23 = iVar18 + local_6c; if (param_2 != 1) { FUN_fffd7b9c(param_1); } if (*(char *)(param_1 + 0x236) == '\0') { uVar13 = FUN_fffd6698(iVar18,1,0,0,iVar23,0,0); local_18 = (char *)(uVar13 & 0xffffffff); iVar9 = FUN_fffd6698(iVar18,0,1,1,iVar23,0,0); uVar13 = (ulong)(uint)(iVar9 + (int)local_18); } else if (param_2 == 1) { iVar9 = FUN_fffd6698(iVar18,1,0,0,iVar23,1,0); iVar10 = FUN_fffd6698(iVar18,0,1,1,iVar23,1,0); uVar13 = (ulong)(uint)(iVar10 + iVar9); } else { iVar9 = 0; local_64 = iVar18 + local_68; do { uVar13 = FUN_fffd6698(iVar18,1,0,0,local_64,iVar9,0); local_18 = (char *)(uVar13 & 0xffffffff); iVar10 = FUN_fffd6698(iVar18,0,1,1,local_64,iVar9,0); uVar19 = iVar10 + (int)local_18; uVar13 = (ulong)uVar19; if (uVar19 != 0) break; iVar9 = iVar9 + 1; } while (iVar9 != 0x44); } local_8 = uVar13; serial_puts(local_48,*(undefined *)(param_1 + 0x205)); FUN_fffd0188(*(undefined2 *)(pbVar1 + 4),0x20,*(undefined *)(param_1 + 0x205)); serial_puts(local_40,*(undefined *)(param_1 + 0x205)); if ((int)local_8 != 0) { *(short *)(pbVar1 + 4) = *(short *)(pbVar1 + 4) + 1; goto LAB_fffd835c; } *(short *)(pbVar1 + 4) = *(short *)(pbVar1 + 4) + -1; } local_64 = (uint)(param_2 == 5); if ((1 < local_1c) && ((param_2 == 5) == 0)) goto LAB_fffd8610; if ((uVar7 & 0x1f) == 0) { auStack_1a0[uVar20] = uVar7 & 0x1f; uVar20 = (ulong)uVar12; pbVar1 = (byte *)(local_60 + uVar20 * 8); local_40 = s__1_pass_fffdb6ac + 7; while (uVar19 = auStack_1a0[uVar20], uVar19 < 0x3f) { *(byte *)(param_1 + 0x1ce) = param_2; *(undefined *)(param_1 + 0x1cd) = 1; *(uint *)(param_1 + 0x1d0) = (uint)*pbVar1; uVar7 = *(ushort *)(pbVar1 + 4); *(undefined *)(param_1 + 0x1e4) = 0; *(uint *)(param_1 + 0x1d4) = (uint)uVar7; if (param_2 == 2) { iVar9 = 0; do { FUN_fffd624c(4,iVar9 + (*(uint *)(param_1 + 0x1d0) >> 1) * 9,0); iVar9 = iVar9 + 1; } while (iVar9 != 9); uVar21 = *(uint *)(param_1 + 0x1d0); iVar9 = uVar21 - 1; uVar14 = 2; if ((uVar21 & 1) == 0) { iVar9 = uVar21 + 1; } LAB_fffd85a0: FUN_fffd624c(uVar14,iVar9,0); } else if (param_2 == 3) { iVar9 = 0; do { FUN_fffd624c(5,(*(uint *)(param_1 + 0x1d0) & 1) * 4 + (*(uint *)(param_1 + 0x1d0) >> 1) * 9 + iVar9,0); iVar9 = iVar9 + 1; } while (iVar9 != 4); } else if (local_64 != 0) { local_8 = 9; uVar21 = 0; local_18 = (char *)0x9; local_10 = 4; do { uVar17 = *(uint *)(param_1 + 0x1d0); uVar3 = 0; if ((uint)local_8 != 0) { uVar3 = uVar17 / (uint)local_8; } uVar3 = uVar17 + uVar3 * -9; if (uVar21 == (uVar3 & 3)) { uVar21 = uVar21 + 1 & 0xff; } uVar4 = 0; if ((uint)local_18 != 0) { uVar4 = uVar17 / (uint)local_18; } iVar9 = 0; if (3 < uVar3) { iVar9 = (int)local_10; } iVar10 = uVar21 + uVar4 * 9; uVar21 = uVar21 + 1 & 0xff; FUN_fffd624c(5,iVar10 + iVar9,0); } while (uVar21 < 4); uVar21 = (uVar19 + 1) * local_50; uVar17 = 0; if (local_38 != 0) { uVar17 = uVar21 / local_38; } uVar3 = 0; if (local_38 != 0) { uVar3 = (uVar21 - local_50) / local_38; } if (uVar3 < uVar17) { iVar9 = (*(uint *)(param_1 + 0x1d0) / 9) * 2; uVar14 = 3; if (3 < *(uint *)(param_1 + 0x1d0) % 9) { iVar9 = iVar9 + 1; } goto LAB_fffd85a0; } } if (*(char *)(param_1 + 0x236) == '\0') { uVar13 = FUN_fffd6698(iVar18,1,0,0,iVar23,0,0); local_18 = (char *)(uVar13 & 0xffffffff); iVar9 = FUN_fffd6698(iVar18,0,1,1,iVar23,0,0); pcVar16 = (char *)(ulong)(uint)(iVar9 + (int)local_18); } else { iVar9 = 0; local_48 = (char *)CONCAT44(local_48._4_4_,iVar18 + local_68); do { uVar13 = FUN_fffd6698(iVar18,1,0,0,(ulong)local_48 & 0xffffffff,iVar9,0); local_18 = (char *)(uVar13 & 0xffffffff); iVar10 = FUN_fffd6698(iVar18,0,1,1,(ulong)local_48 & 0xffffffff,iVar9,0); uVar21 = iVar10 + (int)local_18; pcVar16 = (char *)(ulong)uVar21; if (uVar21 != 0) break; iVar9 = iVar9 + 1; } while (iVar9 != 0x44); } local_18 = pcVar16; serial_puts(local_40,*(undefined *)(param_1 + 0x205)); FUN_fffd0188(uVar19,0x20,*(undefined *)(param_1 + 0x205)); serial_puts(s__rx_clk_window__fffdb78a,*(undefined *)(param_1 + 0x205)); if ((int)local_18 != 0) goto LAB_fffd835c; auStack_1a0[uVar20] = uVar19 + 1; } } goto LAB_fffd8624; } goto LAB_fffd8860; } *(undefined *)(param_1 + 0x264) = 1; *(undefined *)(param_1 + 0x1ce) = 0; (**(code **)(param_1 + 0x38))(param_1); uVar12 = FUN_fffd549c(param_1); serial_puts(s__ddr_frequency_test_end_fffdb6d1 + 0x18); FUN_fffdaca0(param_2); if (param_2 == 1) { pcVar16 = s__org_vref_lane_fffdb6f4 + 0xb; } else { if (param_2 == 2) { serial_puts(s__txdqsdly_second_tune_value_coun_fffdb713 + 8); serial_puts(s__delay_min__0x_fffdb704 + 7); FUN_fffdaca0(uVar12); serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 0xd); iVar23 = 0x3e; goto LAB_fffd89a0; } if (param_2 == 3) { serial_puts(s__txdqsdly_second_tune_value_coun_fffdb713 + 0x17); serial_puts(s__delay_min__0x_fffdb704 + 7); FUN_fffdaca0(uVar12); serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 0xd); iVar23 = 0x6e; goto LAB_fffd89a0; } if (param_2 != 4) { iVar23 = 0x20; if (param_2 == 5) { serial_puts(s__test_result_index___fffdb749 + 4); serial_puts(s__delay_min__0x_fffdb704 + 7); FUN_fffdaca0(local_50); serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 0xd); } goto LAB_fffd89a0; } pcVar16 = s__delay_max__0x_fffdb73a; } serial_puts(pcVar16); serial_puts(s__delay_min__0x_fffdb704 + 7); FUN_fffdaca0(uVar12); serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 0xd); iVar23 = 0x20; LAB_fffd89a0: serial_puts(s__ac_window__fffdb75f); FUN_fffdaca0(*(undefined2 *) (*(long *)(param_1 + 0xa0) + (ulong)*(byte *)(param_1 + 0x1b9) * 2 + 0x38)); serial_puts(s__step_size_ps___fffdb76b + 9); serial_puts(s__step_size_ps___fffdb76b + 0xe); serial_puts(s__rx_clk_window__fffdb78a + 2); serial_puts(s__step_size_ps___fffdb76b + 0xe); iVar23 = iVar23 + local_80 * 3; uVar19 = 0; do { if (uVar8 <= local_80) { (**(code **)(param_1 + 0x38))(param_1); _DAT_ff638800 = _DAT_ff638800 & 0xff00ffff | 0x10000; if (param_2 == 2) { uVar20 = 0x184; DAT_fffdbb33 = (char)uVar19; } else { if (param_2 != 3) { return; } uVar20 = 0x186; DAT_fffdbb32 = (char)uVar19; } *(short *)(uVar20 | 0xfe020000) = (short)uVar19; return; } uVar20 = (ulong)local_80; FUN_fffd0264(uVar20,8); local_18 = s_DMC_DDR_CTRL__fffdb5df + 0xc; serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc); lVar15 = uVar20 * 8; FUN_fffd0264(*(undefined2 *)(s_vref_test_range_fffdb8c7 + lVar15 + 3),8); pcVar16 = local_18; if (param_2 == 2) { uVar21 = auStack_1a0[uVar20]; if (uVar21 == 0) goto LAB_fffd8b14; local_18 = (char *)(ulong)uVar21; if (*(ushort *)(s_vref_test_range_fffdb8c7 + lVar15 + 5) < uVar21) { serial_puts(s__bl2_window_loop_fffdb7d9 + 3); uVar21 = (int)local_18 - (uint)*(ushort *)(s_vref_test_range_fffdb8c7 + lVar15 + 5); goto LAB_fffd8b0c; } serial_puts(pcVar16); uVar21 = (uint)*(ushort *)(s_vref_test_range_fffdb8c7 + lVar15 + 5) - (int)local_18; LAB_fffd8b24: uVar14 = 8; } else { if (param_2 == 3) { uVar17 = auStack_1a0[uVar20]; if (uVar17 == 0) { LAB_fffd8b14: serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc); uVar21 = (uint)*(ushort *)(s_vref_test_range_fffdb8c7 + uVar20 * 8 + 5); goto LAB_fffd8b24; } serial_puts(s__bl2_window_loop_fffdb7d9 + 3); uVar21 = 0; if (uVar12 != 0) { uVar21 = (uVar17 * local_50) / uVar12; } } else { if ((param_2 != 5) || (uVar21 = auStack_1a0[uVar20], uVar21 == 0)) goto LAB_fffd8b14; serial_puts(s__bl2_window_loop_fffdb7d9 + 3); } LAB_fffd8b0c: uVar14 = 7; } FUN_fffd0264(uVar21,uVar14); serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc); lVar15 = uVar20 * 8; FUN_fffd0264(*(undefined2 *)(s_vref_test_range_fffdb8c7 + lVar15 + 7),8); serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc); uVar21 = 0; if (*(ushort *)(s_vref_test_range_fffdb8c7 + lVar15 + 5) < *(ushort *)(s_vref_test_range_fffdb8c7 + lVar15 + 3)) { uVar21 = (uint)*(ushort *)(s_vref_test_range_fffdb8c7 + lVar15 + 3) - (uint)*(ushort *)(s_vref_test_range_fffdb8c7 + lVar15 + 5) & 0xff; } if (param_2 == 2) { uVar17 = auStack_1a0[uVar20]; LAB_fffd8bac: uVar21 = uVar21 + uVar17 & 0xff; } else { if (param_2 == 3) { uVar17 = 0; if (uVar12 != 0) { uVar17 = (local_50 * auStack_1a0[uVar20]) / uVar12; } goto LAB_fffd8bac; } if (param_2 == 5) { uVar17 = auStack_1a0[uVar20]; goto LAB_fffd8bac; } if ((param_2 == 4) && (auStack_1a0[uVar20] != 0)) { *(short *)(s_vref_test_range_fffdb8c7 + uVar20 * 8 + 3) = (short)auStack_1a0[uVar20]; } } uVar17 = 0; if (*(ushort *)(s_vref_test_range_fffdb8c7 + uVar20 * 8 + 3) < *(ushort *)(s_vref_test_range_fffdb8c7 + uVar20 * 8 + 7)) { uVar17 = (uint)(byte)((char)*(ushort *)(s_vref_test_range_fffdb8c7 + uVar20 * 8 + 7) - (char)*(ushort *)(s_vref_test_range_fffdb8c7 + uVar20 * 8 + 3)); } FUN_fffd0264((char)uVar21,8); serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc); FUN_fffd0264(uVar17,8); serial_puts(s__bl2_window_loop_fffdb7d9 + 6); FUN_fffd0264((undefined)local_34,2); serial_puts(s__bl2_window_loop_fffdb7d9 + 8); FUN_fffd0264((undefined)local_20,3); serial_puts(s__dmc_offset_test_result___fffdb675 + 0x15); serial_puts(s__bl2_window_loop_fffdb7d9 + 0xc); FUN_fffd0264(*(undefined *)(param_1 + 0x1b8),2); serial_puts(s_DMC_DDR_CTRL__fffdb5df + 0xc); FUN_fffdaca0(*(undefined2 *) (*(long *)(param_1 + 0xa0) + (ulong)*(byte *)(param_1 + 0x1b9) * 2 + 0x38)); serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 4); FUN_fffd0264(local_50,4); local_18 = s_index_org_min_max_left_right_dec_fffdb7ec + 0xc; serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 0xc); serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 0x16); FUN_fffd0264(uVar12,4); serial_puts(local_18); serial_puts(s__step_size_ps___fffdb76b + 0xe); FUN_fffd57f0(iVar23,uVar21); FUN_fffd57f0(iVar23 + 1,uVar17); FUN_fffd57f0(iVar23 + 2,0); if ((uVar17 != 0 && uVar21 != 0) && ((uVar19 == 0 || (uVar21 + uVar17 < uVar19)))) { uVar19 = uVar21 + uVar17 & 0xff; } if (*(char *)(param_1 + 0x265) != '\0') { bVar5 = false; if (param_2 == 1) { if (*(byte *)(param_1 + 0x1b8) < 2) { if ((local_80 - 4 < 2) || (local_80 == 0)) { bVar5 = true; } else { bVar5 = local_80 == 9; } } if ((byte)(*(byte *)(param_1 + 0x1b8) - 2) < 2) { bVar5 = true; } } if (uVar17 != 0 && uVar21 != 0) { if (uVar17 <= uVar21) { bVar22 = (byte)((int)(uVar21 - uVar17) / 2); } else { bVar22 = (byte)((int)(uVar17 - uVar21) / 2); } uVar21 = (uint)(uVar17 <= uVar21); if (bVar22 != 0) { if (param_2 == 4) { if (bVar22 < 0x15) { LAB_fffd8e44: if (!bVar5) { do { bVar22 = bVar22 - 1; FUN_fffd7850(param_1,param_2,local_80,uVar21); } while (bVar22 != 0); } } } else { if (param_2 != 2) goto LAB_fffd8e44; if ((local_80 & 1) == 0) { local_10 = (ulong)(uVar21 ^ 1); local_8 = (ulong)((local_80 >> 1) * 9); do { lVar15 = 0; do { iVar18 = (int)lVar15; lVar15 = lVar15 + 1; FUN_fffd624c(4,(int)local_8 + iVar18,local_10 & 0xffffffff); } while (lVar15 != 9); bVar5 = bVar22 != 0; bVar22 = bVar22 - 1; } while (bVar5); } } } } FUN_fffd1a40(param_1,1); } iVar23 = iVar23 + 3; local_80 = local_80 + 1; } while( true ); LAB_fffd835c: *(undefined *)(param_1 + 0x1ce) = 0; LAB_fffd8610: *(undefined *)(param_1 + 0x264) = 1; (**(code **)(param_1 + 0x38))(param_1); LAB_fffd8624: local_64 = local_70 + 1U & 0xffff; uVar20 = (ulong)uVar12; if ((param_2 == 4) && (uVar7 = FUN_fffd6160(4,*(undefined2 *)(local_30 + 0xfe000000)), *(ushort *)(local_60 + uVar20 * 8 + 2) != uVar7)) { auStack_1a0[uVar20] = (uint)uVar7; } pbVar1 = (byte *)(local_60 + uVar20 * 8); local_48 = s__ddr_frequency_test_end_fffdb6d1 + 9; while (uVar7 = *(ushort *)(pbVar1 + 6), uVar7 < local_64) { *(byte *)(param_1 + 0x1ce) = param_2; *(undefined *)(param_1 + 0x1cd) = 1; *(uint *)(param_1 + 0x1d0) = (uint)*pbVar1; *(uint *)(param_1 + 0x1d4) = (uint)uVar7; if ((param_2 == 3) || (*(undefined *)(param_1 + 0x1e4) = 0, param_2 != 1)) { FUN_fffd7b9c(param_1); } else { (**(code **)(param_1 + 0x38))(param_1); } if (*(char *)(param_1 + 0x236) == '\0') { uVar20 = FUN_fffd6698(iVar18,1,0,0,iVar23,0,0); local_18 = (char *)(uVar20 & 0xffffffff); iVar9 = FUN_fffd6698(iVar18,0,1,1,iVar23,0,0); uVar20 = (ulong)(uint)(iVar9 + (int)local_18); } else if (param_2 == 1) { iVar9 = FUN_fffd6698(iVar18,1,0,0,iVar23,1,0); iVar10 = FUN_fffd6698(iVar18,0,1,1,iVar23,1,0); uVar20 = (ulong)(uint)(iVar10 + iVar9); } else { iVar9 = 0; iVar10 = iVar18 + local_68; do { uVar20 = FUN_fffd6698(iVar18,1,0,0,iVar10,iVar9,0); local_18 = (char *)(uVar20 & 0xffffffff); iVar11 = FUN_fffd6698(iVar18,0,1,1,iVar10,iVar9,0); uVar19 = iVar11 + (int)local_18; uVar20 = (ulong)uVar19; if (uVar19 != 0) break; iVar9 = iVar9 + 1; } while (iVar9 != 0x44); } local_8 = uVar20; serial_puts(local_48,*(undefined *)(param_1 + 0x205)); FUN_fffd0188(*(undefined2 *)(pbVar1 + 6),0x20,*(undefined *)(param_1 + 0x205)); serial_puts(s__rx_clk_window__fffdb78a,*(undefined *)(param_1 + 0x205)); if ((int)local_8 != 0) { *(short *)(pbVar1 + 6) = *(short *)(pbVar1 + 6) + -1; *(undefined *)(param_1 + 0x1ce) = 0; break; } *(short *)(pbVar1 + 6) = *(short *)(pbVar1 + 6) + 1; } *(undefined *)(param_1 + 0x264) = 1; (**(code **)(param_1 + 0x38))(param_1); LAB_fffd8860: uVar12 = uVar12 + 1; goto LAB_fffd7e40; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd8f10(long param_1) { uint uVar1; FUN_fffd00ec(); _DAT_ff639254 = _DAT_ff639254 | 2; if ((*(byte *)(param_1 + 0x1c8) >> 2 & 1) != 0) { FUN_fffd7008(*(undefined *)(param_1 + 0x1b8),1,*(undefined2 *)(param_1 + 0x1ca)); FUN_fffd7008(*(undefined *)(param_1 + 0x1b8),3,*(undefined2 *)(param_1 + 0x1ca)); FUN_fffd1018(param_1,0xb,1,0,0); FUN_fffd1018(param_1,9,1,0,0); } uVar1 = 1; do { if (7 < uVar1) { _DAT_fe020184 = (ushort)DAT_fffdbb33; _DAT_fe020186 = (ushort)DAT_fffdbb32; serial_puts(0xfffdc78a); if (DAT_fffdbb32 != 0) { serial_puts(0xfffdc80e); FUN_fffdaca0(DAT_fffdbb32 >> 1); } if (DAT_fffdbb33 != 0) { serial_puts(0xfffdc81e); FUN_fffdaca0(DAT_fffdbb33 >> 1); } serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 0x43); if (*(char *)(param_1 + 0x254) == '\0') { if ((*(short *)(param_1 + 0x1ca) != 0) && ((*(byte *)(param_1 + 0x1c8) >> 2 & 1) != 0)) { FUN_fffd7008(*(undefined *)(param_1 + 0x1b8),0); FUN_fffd7008(*(undefined *)(param_1 + 0x1b8),2,*(undefined2 *)(param_1 + 0x1ca)); FUN_fffd1018(param_1,0xb,1,0,0); FUN_fffd1018(param_1,9,1,0,0); *(undefined2 *)(param_1 + 0x1ca) = 0; } if (*(char *)(*(long *)(param_1 + 0xa0) + 4) == -3) { *(undefined *)(*(long *)(param_1 + 0xa0) + 4) = 0xfe; } *(undefined *)(param_1 + 0x1c8) = 0; return; } uVar1 = 1; } if (((int)(uint)*(byte *)(param_1 + 0x1c8) >> (uVar1 - 1 & 0x1f) & 1U) != 0) { *(undefined *)(param_1 + 0x205) = 0xff; FUN_fffd7c04(param_1,uVar1,0,0); } uVar1 = uVar1 + 1; } while( true ); } undefined8 FUN_fffd910c(long param_1) { byte bVar1; byte bVar2; short sVar3; uint uVar4; uint uVar5; uint uVar6; uint uVar7; uint uVar8; char cVar9; uint uVar10; uint uVar11; FUN_fffd00ec(); cVar9 = *(char *)(param_1 + 0x224); if (cVar9 == '\0') { cVar9 = '\x01'; } *(char *)(param_1 + 0x224) = cVar9; uVar4 = (uint)*(byte *)(param_1 + 0x209); *(undefined4 *)(param_1 + 0x238) = *(undefined4 *)(param_1 + 0x220); *(undefined *)(param_1 + 0x255) = 2; *(undefined *)(param_1 + 0x205) = 0xff; sVar3 = *(short *)(*(long *)(param_1 + 0xa0) + 0x2a); uVar5 = 0x48; if (sVar3 == 0) { uVar5 = 0x24; } cVar9 = *(char *)(param_1 + 0x208); if ((((byte)(cVar9 - 2U) < 2) || (cVar9 == '\f')) && (uVar5 = 0x10, sVar3 == 0)) { uVar5 = 8; } uVar10 = (uint)*(byte *)(param_1 + 0x218); if (*(byte *)(param_1 + 0x219) != 0) { uVar5 = (uint)*(byte *)(param_1 + 0x219); } uVar11 = uVar10; if ((cVar9 == '\x04') || (cVar9 == '\x02')) { while (uVar11 < uVar5) { uVar11 = uVar11 + 1; for (uVar8 = uVar4; uVar8 < 2; uVar8 = uVar8 + 1) { serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 0x4b,0); FUN_fffd0188(2,8,0); if (uVar8 == 0) { bVar1 = *(byte *)(param_1 + 0x21a); bVar2 = *(byte *)(param_1 + 0x21b); } else { bVar1 = *(byte *)(param_1 + 0x21c); bVar2 = *(byte *)(param_1 + 0x21d); } uVar7 = (uint)bVar1; uVar6 = (uint)bVar2; if (uVar6 == 0) { uVar6 = 0x32; } serial_puts(s__M_bdl_fffdb850,0); FUN_fffd0188(uVar5,8,0); serial_puts(s__rx_clk_window__fffdb78a,0); *(char *)(param_1 + 0x1c9) = (char)uVar11; for (; uVar7 < uVar6; uVar7 = uVar7 + *(byte *)(param_1 + 0x224)) { serial_puts(s_tep___fffdb867,0); FUN_fffd0188(uVar8,8,0); serial_puts(s_dmc_margin_rx___fffdb86e + 9,0); FUN_fffd0188(uVar7,8,0); serial_puts(s__rx_clk_window__fffdb78a,0); FUN_fffd7698(uVar8,uVar7,0,param_1); *(char *)(param_1 + 0x232) = (char)(uVar7 & 0xff); *(char *)(param_1 + 0x233) = (char)(uVar8 & 0xff); if (*(char *)(param_1 + 0x208) == '\x02') { FUN_fffd7c04(param_1,2,uVar8 & 0xff,uVar7 & 0xff); } if (*(char *)(param_1 + 0x208) == '\x04') { FUN_fffd7c04(param_1,4,(char)uVar8,(char)uVar7); } } } } } cVar9 = *(char *)(param_1 + 0x208); if ((cVar9 == '\x05') || (cVar9 == '\x03')) { if (cVar9 != '\f') goto LAB_fffd9384; LAB_fffd939c: cVar9 = '\x03'; } else if (cVar9 != '\a') { if (cVar9 == '\f') goto LAB_fffd939c; if (1 < (byte)(cVar9 - 0xdU)) goto LAB_fffd9540; LAB_fffd9384: if (cVar9 == '\r') { cVar9 = '\x05'; } else if (cVar9 == '\x0e') { cVar9 = '\a'; } } uVar11 = 2; if (*(char *)(*(long *)(param_1 + 0xa0) + 0xe) == '\0') { uVar4 = 2; uVar11 = 3; } while (uVar10 < uVar5) { uVar10 = uVar10 + 1; for (uVar8 = uVar4; uVar8 < uVar11; uVar8 = uVar8 + 1) { serial_puts(s_index_org_min_max_left_right_dec_fffdb7ec + 0x4b,0); FUN_fffd0188(uVar11,8,0); if ((uVar8 == 0) || (uVar8 != 1)) { bVar1 = *(byte *)(param_1 + 0x21a); bVar2 = *(byte *)(param_1 + 0x21b); } else { bVar1 = *(byte *)(param_1 + 0x21c); bVar2 = *(byte *)(param_1 + 0x21d); } uVar6 = (uint)bVar2; uVar7 = (uint)bVar1; if (uVar6 == 0) { uVar6 = 0x7f; } serial_puts(s__M_bdl_fffdb850,0); FUN_fffd0188(uVar5,8,0); serial_puts(s__rx_clk_window__fffdb78a,0); *(char *)(param_1 + 0x1c9) = (char)uVar10; for (; uVar7 < uVar6; uVar7 = uVar7 + *(byte *)(param_1 + 0x224)) { serial_puts(s_tep___fffdb867,0); FUN_fffd0188(uVar8,8,0); serial_puts(s_dmc_margin_rx___fffdb86e + 9,0); FUN_fffd0188(uVar7,8,0); serial_puts(s__rx_clk_window__fffdb78a,0); *(char *)(param_1 + 0x232) = (char)uVar7; *(char *)(param_1 + 0x233) = (char)uVar8; FUN_fffd7124(param_1); FUN_fffd7c04(param_1,cVar9,(char)uVar8,(char)uVar7); } } } LAB_fffd9540: *(undefined *)(param_1 + 0x1ce) = 0; *(undefined *)(param_1 + 0x1cd) = 0; *(undefined *)(param_1 + 0x205) = 0; *(undefined *)(param_1 + 0x1d8) = 0; *(undefined4 *)(param_1 + 0x1dc) = 0; *(undefined4 *)(param_1 + 0x1e0) = 0; return 1; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void FUN_fffd9578(long param_1) { uint uVar1; uVar1 = 0; if (*(char *)(param_1 + 0x236) == '\0') { uVar1 = 2; } _DAT_ff639254 = uVar1 | _DAT_ff639254; if (*(int *)(param_1 + 600) == 0) { *(undefined4 *)(param_1 + 600) = 0x55aa55aa; } DAT_fffdbb24 = FUN_fffd5444(param_1,*(undefined *)(param_1 + 0x205)); DAT_fffdbb2a = *(undefined2 *) (*(long *)(param_1 + 0xa0) + (ulong)*(byte *)(param_1 + 0x1b9) * 2 + 0x38); DAT_fffdbb26 = DAT_fffdbb24; DAT_fffdbb28 = DAT_fffdbb24; DAT_fffdbb2c = DAT_fffdbb24; if (*(char *)(param_1 + 0x1cc) != '\0') { FUN_fffd6b1c(param_1); } if ((*(char *)(param_1 + 0x1f0) == '\x01') || ((*(byte *)(*(long *)(param_1 + 0xa0) + 0x78) & 1) != 0)) { FUN_fffd6c08(param_1); } if (*(char *)(param_1 + 0x1f0) == '\x02') { FUN_fffd56b4(param_1); } if (*(char *)(param_1 + 0x1c8) != '\0') { FUN_fffd8f10(param_1); } if (*(char *)(param_1 + 0x208) != '\0') { FUN_fffd910c(param_1); } FUN_fffd00a0(5000); return; } undefined8 FUN_fffd96a0(long param_1) { byte bVar1; byte bVar2; undefined uVar3; byte bVar4; ushort uVar5; undefined *puVar6; long lVar7; long lVar8; lVar7 = *(long *)(param_1 + 0xa0); puVar6 = *(undefined **)(param_1 + 0x48); bVar1 = *(byte *)(param_1 + 0x1b9); lVar8 = *(long *)(param_1 + 0xa8); bVar4 = FUN_fffd22e8(*(undefined *)(lVar7 + 0x12)); puVar6[0xd] = 1; puVar6[0xe] = *(undefined *)(lVar7 + 0xf); *(short *)(puVar6 + 6) = *(short *)(lVar7 + (long)(int)(uint)bVar1 * 2 + 0x38) << 1; bVar2 = *(byte *)(lVar7 + 0x40); puVar6[8] = 1; puVar6[5] = (byte)((int)(uint)bVar2 >> (bVar1 & 0x1f)) & 1; puVar6[10] = 0; puVar6[0xb] = 0; puVar6[9] = 0; puVar6[4] = bVar1; uVar5 = *(ushort *)(lVar7 + 0x2c); if (bVar1 != 0) { uVar5 = uVar5 & 0xfeff; } *(ushort *)(puVar6 + 0x16) = uVar5; *(undefined2 *)(puVar6 + 0x22) = 0; puVar6[0x18] = *(undefined *)(lVar7 + 0x11); if (*(char *)(lVar7 + 0x11) == '\t') { puVar6[0x18] = 4; } puVar6[1] = 0; *puVar6 = 0; puVar6[0x24] = 2; puVar6[0xc] = (char)(((uint)*(ushort *)(lVar7 + 0x66) << 7) / 1000); puVar6[0x10] = bVar4 & 3; puVar6[0x11] = bVar4 & 3; puVar6[0x12] = 0; puVar6[0x13] = 0; puVar6[0x74] = *(undefined *)(lVar7 + 0x30); uVar3 = *(undefined *)(lVar7 + 0x31); puVar6[0x78] = 0; puVar6[0x75] = uVar3; puVar6[0x79] = 0; puVar6[0x7a] = 0; puVar6[0x7b] = 0; puVar6[0xf] = 0x10; if (1 < *(byte *)(*(long *)(param_1 + 0xa0) + 0x12)) { puVar6[0xf] = 0x20; } puVar6[0x15] = *(undefined *)(lVar7 + 0x10); *(short *)(puVar6 + 0x5e) = (short)*(undefined4 *)(lVar8 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x100); *(short *)(puVar6 + 0x60) = (short)*(undefined4 *)(lVar8 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104); *(short *)(puVar6 + 0x62) = (short)*(undefined4 *)(lVar8 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108); return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong FUN_fffd980c(long param_1) { ulong uVar1; ulong uVar2; if ((*(uint *)(*(long *)(param_1 + 0xa0) + 8) >> 0x1c & 1) != 0) { *(byte *)(param_1 + 0x225) = *(byte *)(param_1 + 0x225) | 1; } if (0xfc < *(byte *)(*(long *)(param_1 + 0xa0) + 4)) { *(undefined *)(param_1 + 0x264) = 0xff; } uVar2 = 0xff; if (*(char *)(param_1 + 0x264) == -1) { *(undefined *)(param_1 + 0xea) = 1; uVar2 = 0; } *(undefined *)(param_1 + 0x1b9) = 0; FUN_fffd5308(param_1); FUN_fffd2a08(param_1); FUN_fffd96a0(param_1); FUN_fffd0e08(param_1); FUN_fffd2314(param_1); FUN_fffd0ebc(param_1); FUN_fffd3f1c(param_1); *(undefined *)(param_1 + 0x1b9) = 0; if ((*(char *)(param_1 + 0x264) == -1) && ((*(uint *)(*(long *)(param_1 + 0xa0) + 8) >> 0x1b & 1) == 0)) { FUN_fffd2280(param_1); _DAT_fe0a8016 = 1; uVar2 = FUN_fffd4dc0(param_1); uVar2 = uVar2 & 0xffffffff; } if (*(char *)(param_1 + 0x264) == -1) { FUN_fffd1a40(param_1,0); _DAT_fe120050 = 0; } else { FUN_fffd2280(); uVar1 = FUN_fffd4dc0(param_1); uVar2 = uVar1 & 0xffffffff; if ((int)uVar1 != 0) { return uVar2; } FUN_fffd6e44(uVar1,2,0x41,uVar2,0xffffffff,param_1); FUN_fffd54bc(param_1); FUN_fffd6530(param_1); } *(undefined *)(param_1 + 0x1b9) = 0; FUN_fffd2a08(param_1); FUN_fffd2314(param_1); FUN_fffd1bb0(param_1); FUN_fffd1a40(param_1,1); FUN_fffd7b9c(param_1); FUN_fffd4adc(param_1); FUN_fffd21b4(); FUN_fffd4d18(param_1); return uVar2; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ undefined8 FUN_fffd9998(long param_1) { undefined4 uVar1; byte bVar2; byte bVar3; undefined2 uVar4; bool bVar5; byte bVar6; ushort uVar7; undefined uVar8; undefined *puVar9; long lVar10; long lVar11; long lVar12; uint uVar13; lVar11 = *(long *)(param_1 + 0xa0); bVar2 = *(byte *)(param_1 + 0x1b9); lVar12 = *(long *)(param_1 + 0xa8); lVar10 = *(long *)(param_1 + 0x50); puVar9 = *(undefined **)(param_1 + 0x58); _DAT_fe1a0000 = 0; bVar6 = FUN_fffd22e8(*(undefined *)(lVar11 + 0x12)); bVar6 = bVar6 & 3; uVar13 = (uint)bVar2; if (*(char *)(param_1 + 0xea) == '\x01') { *(undefined *)(lVar10 + 0xd) = 2; *(undefined *)(lVar10 + 0xe) = *(undefined *)(lVar11 + 0xf); *(short *)(lVar10 + 6) = *(short *)(lVar11 + (long)(int)uVar13 * 2 + 0x38) << 1; bVar3 = *(byte *)(lVar11 + 0x40); *(undefined *)(lVar10 + 8) = 2; *(byte *)(lVar10 + 5) = (byte)((int)(uint)bVar3 >> (uVar13 & 0x1f)) & 1; *(undefined *)(lVar10 + 10) = 0; *(undefined *)(lVar10 + 0xb) = 0; *(undefined *)(lVar10 + 9) = 0; *(byte *)(lVar10 + 4) = bVar2; uVar7 = *(ushort *)(lVar11 + 0x2c); if (uVar13 != 0) { uVar7 = uVar7 & 0xfeff; } *(ushort *)(lVar10 + 0x16) = uVar7; *(undefined2 *)(lVar10 + 0x22) = 0; uVar8 = *(undefined *)(lVar11 + 0x11); *(undefined *)(lVar10 + 1) = 0; *(undefined *)(lVar10 + 0x18) = uVar8; *(undefined *)(lVar10 + 0x24) = 3; *(char *)(lVar10 + 0xc) = (char)(((uint)*(ushort *)(lVar11 + 0x66) << 7) / 1000); *(byte *)(lVar10 + 0x10) = bVar6; *(byte *)(lVar10 + 0x11) = bVar6; *(undefined *)(lVar10 + 0x12) = 0; *(undefined *)(lVar10 + 0x13) = 0; *(undefined *)(lVar10 + 0x7e) = *(undefined *)(lVar11 + 0x30); uVar8 = *(undefined *)(lVar11 + 0x31); *(undefined *)(lVar10 + 0x82) = 0; *(undefined *)(lVar10 + 0x7f) = uVar8; *(undefined *)(lVar10 + 0x83) = 0; *(undefined *)(lVar10 + 0x84) = 0; *(undefined *)(lVar10 + 0x85) = 0; uVar8 = 0x20; if ((*(byte *)(lVar11 + 0xf) & 0xf) != 0) { uVar8 = 0x10; } *(undefined *)(lVar10 + 0xf) = uVar8; uVar8 = *(undefined *)(lVar11 + 0x10); *(undefined *)(lVar10 + 0x6c) = 3; *(undefined *)(lVar10 + 0x15) = uVar8; *(undefined *)(lVar10 + 0x3f9) = 1; *(undefined *)(lVar10 + 0x6d) = 1; *(short *)(lVar10 + 0x6e) = (short)*(undefined4 *)(lVar11 + 0x94); *(short *)(lVar10 + 0x70) = (short)*(undefined4 *)(lVar11 + 0x98); *(short *)(lVar10 + 0x5e) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x100); *(short *)(lVar10 + 0x60) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104); *(short *)(lVar10 + 0x62) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108); *(short *)(lVar10 + 100) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c); *(short *)(lVar10 + 0x66) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x110); *(short *)(lVar10 + 0x68) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x114); uVar1 = *(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x118); *(undefined2 *)(lVar10 + 0x3f6) = 0; *(short *)(lVar10 + 0x6a) = (short)uVar1; *(undefined *)(lVar10 + 0x3f8) = 0; } else if (*(char *)(param_1 + 0xea) == '\x02') { puVar9[0xd] = 2; puVar9[0xe] = *(undefined *)(lVar11 + 0xf); *(short *)(puVar9 + 6) = *(short *)(lVar11 + (long)(int)uVar13 * 2 + 0x38) << 1; bVar3 = *(byte *)(lVar11 + 0x40); puVar9[8] = 2; puVar9[5] = (byte)((int)(uint)bVar3 >> (uVar13 & 0x1f)) & 1; puVar9[10] = 0; puVar9[0xb] = 0; puVar9[9] = 0; puVar9[4] = bVar2; uVar4 = *(undefined2 *)(lVar11 + 0x2e); puVar9[1] = 0; *(undefined2 *)(puVar9 + 0x16) = uVar4; puVar9[0x18] = 4; puVar9[0x24] = 3; *puVar9 = 0; uVar7 = *(ushort *)(lVar11 + 0x66); *(undefined2 *)(puVar9 + 0x22) = 0; puVar9[0xc] = (char)(((uint)uVar7 << 7) / 1000); puVar9[0x10] = bVar6; puVar9[0x11] = bVar6; puVar9[0x12] = 0; puVar9[0x13] = 0; puVar9[0x7e] = *(undefined *)(lVar11 + 0x30); uVar8 = *(undefined *)(lVar11 + 0x31); puVar9[0x82] = 0; puVar9[0x7f] = uVar8; puVar9[0x83] = 0; puVar9[0x84] = 0; puVar9[0x85] = 0; uVar8 = 0x20; if ((*(byte *)(lVar11 + 0xf) & 0xf) != 0) { uVar8 = 0x10; } puVar9[0xf] = uVar8; uVar8 = *(undefined *)(lVar11 + 0x10); puVar9[0x6c] = 3; puVar9[0x15] = uVar8; puVar9[0x3f9] = 1; puVar9[0x6d] = 1; *(short *)(puVar9 + 0x6e) = (short)*(undefined4 *)(lVar11 + 0x94); *(short *)(puVar9 + 0x70) = (short)*(undefined4 *)(lVar11 + 0x98); *(short *)(puVar9 + 0x5e) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x100); *(short *)(puVar9 + 0x60) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104); *(short *)(puVar9 + 0x62) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108); *(short *)(puVar9 + 100) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c); *(short *)(puVar9 + 0x66) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x110); *(short *)(puVar9 + 0x68) = (short)*(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x114); uVar1 = *(undefined4 *)(lVar12 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x118); puVar9[0x3f8] = 0; lVar10 = *(long *)(param_1 + 0xa0); *(short *)(puVar9 + 0x6a) = (short)uVar1; uVar13 = *(uint *)(lVar10 + 8); *(undefined2 *)(puVar9 + 0x3f6) = 0; bVar5 = false; if ((uVar13 >> 0x1d & 1) != 0) { bVar5 = *(char *)(lVar10 + 0x13) == '\0'; } puVar9[0x19] = bVar5; puVar9[0x1c] = 0x20; puVar9[0x1a] = 0; puVar9[0x1b] = 0; puVar9[0x1d] = 0x80; puVar9[0x5d] = 0; } return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int FUN_fffd9d14(long param_1) { bool bVar1; bool bVar2; int iVar3; if (0xfc < *(byte *)(*(long *)(param_1 + 0xa0) + 4)) { *(undefined *)(param_1 + 0x264) = 0xff; } bVar1 = *(char *)(param_1 + 0x264) == -1; if (bVar1) { *(undefined *)(param_1 + 0xea) = 1; } iVar3 = 0xff; if (*(char *)(param_1 + 0xea) == '\x01') { FUN_fffd5308(param_1); *(undefined *)(param_1 + 0x1b9) = 0; FUN_fffd2a08(param_1); FUN_fffd9998(param_1); FUN_fffd0e08(param_1); FUN_fffd2314(param_1); FUN_fffd0ebc(param_1); FUN_fffd3f1c(param_1); *(undefined *)(param_1 + 0x1b9) = 0; if ((*(char *)(param_1 + 0x264) == -1) && ((*(uint *)(*(long *)(param_1 + 0xa0) + 8) >> 0x1b & 1) == 0)) { FUN_fffd2280(param_1); _DAT_fe0a8016 = 1; iVar3 = FUN_fffd4dc0(param_1); } if (*(char *)(param_1 + 0x264) != -1) { FUN_fffd2280(param_1); iVar3 = FUN_fffd4dc0(param_1); if (iVar3 != 0) { return iVar3; } } } *(undefined *)(param_1 + 0x1b9) = 0; FUN_fffd2a08(param_1); FUN_fffd2314(param_1); bVar2 = *(char *)(param_1 + 0x264) == -1; if (bVar2) { *(undefined *)(param_1 + 0xea) = 2; *(undefined *)(param_1 + 0xe8) = 0; } if (*(char *)(param_1 + 0xea) == '\x02') { if (bVar2 || bVar1) { FUN_fffd1a40(param_1,0); } else { FUN_fffd9998(); FUN_fffd2280(param_1); iVar3 = FUN_fffd4dc0(param_1); if (((*(uint *)(*(long *)(param_1 + 0xa0) + 8) >> 0x1d & 1) == 0) || (*(char *)(*(long *)(param_1 + 0xa0) + 0x13) != '\0')) { FUN_fffd0bb0(param_1,1); } FUN_fffd54bc(param_1); FUN_fffd6530(param_1); if (iVar3 != 0) { return iVar3; } } FUN_fffd1bb0(param_1); FUN_fffd1a40(param_1,1); FUN_fffd7b9c(param_1); FUN_fffd4adc(param_1); FUN_fffd0bb0(param_1,2); FUN_fffd21b4(); FUN_fffd4d18(param_1); iVar3 = 0; } return iVar3; } undefined8 FUN_fffd9efc(long param_1) { byte bVar1; byte bVar2; byte bVar3; ushort uVar4; undefined *puVar5; long lVar6; long lVar7; lVar6 = *(long *)(param_1 + 0xa0); puVar5 = *(undefined **)(param_1 + 0x60); bVar1 = *(byte *)(param_1 + 0x1b9); lVar7 = *(long *)(param_1 + 0xa8); bVar3 = FUN_fffd22e8(*(undefined *)(lVar6 + 0x12)); puVar5[0x18] = *(byte *)(lVar6 + 0x9c) | 0x80; puVar5[0x19] = *(byte *)(lVar6 + 0x9d) | 0x80; puVar5[0x1a] = *(byte *)(lVar6 + 0x9e) | 0x80; puVar5[0x1b] = *(byte *)(lVar6 + 0x9f) | 0x80; *(short *)(puVar5 + 6) = *(short *)(lVar6 + (long)(int)(uint)bVar1 * 2 + 0x38) << 1; bVar2 = *(byte *)(lVar6 + 0x40); puVar5[10] = 0; puVar5[5] = (byte)((int)(uint)bVar2 >> (bVar1 & 0x1f)) & 1; puVar5[8] = 2; puVar5[0xb] = 0; puVar5[9] = 0; puVar5[4] = bVar1; uVar4 = *(ushort *)(lVar6 + 0x2c); if (bVar1 != 0) { uVar4 = uVar4 & 0xfeff; } *(ushort *)(puVar5 + 0x10) = uVar4; *(undefined2 *)(puVar5 + 0x6e) = 0; puVar5[0x12] = *(undefined *)(lVar6 + 0x11); if (*(char *)(lVar6 + 0x11) == '\t') { puVar5[0x12] = 4; } puVar5[1] = 0; *puVar5 = 0; puVar5[0x14] = 3; puVar5[0xc] = (char)(((uint)*(ushort *)(lVar6 + 0x66) << 7) / 1000); puVar5[0x23] = bVar3 & 3; puVar5[0x22] = 0x20; puVar5[0x48] = 0x20; puVar5[0x49] = 0; puVar5[0x16] = 1; puVar5[0x31] = (char)*(undefined4 *)(lVar7 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104); puVar5[0x32] = (char)*(undefined4 *)(lVar7 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108); puVar5[0x33] = (char)*(undefined4 *)(lVar7 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c); puVar5[0x35] = (char)*(undefined4 *)(lVar7 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x120); return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int FUN_fffda064(long param_1) { undefined2 uVar1; int iVar2; undefined8 uVar3; if (0xfc < *(byte *)(*(long *)(param_1 + 0xa0) + 4)) { *(undefined *)(param_1 + 0x264) = 1; } iVar2 = 0xff; if (*(char *)(param_1 + 0x264) == -1) { *(undefined *)(param_1 + 0xea) = 1; iVar2 = 0; } *(undefined *)(param_1 + 0x1b9) = 0; FUN_fffd5308(param_1); FUN_fffd2a08(param_1); FUN_fffd9efc(param_1); FUN_fffd2314(param_1); FUN_fffd0ebc(param_1); FUN_fffd0e50(param_1); FUN_fffd3f1c(param_1); if (*(char *)(param_1 + 0x264) == -1) { uVar3 = 0; } else { FUN_fffd2280(param_1); if ((*(ushort *)(*(long *)(param_1 + 0xa0) + 0x2c) >> 0xc & 1) != 0) { _DAT_fe0a8010 = 0x1005; FUN_fffd4dc0(param_1); } iVar2 = 0; _DAT_fe0a8010 = *(ushort *)(*(long *)(param_1 + 0xa0) + 0x2c) & 0xfff; do { if (*(char *)(*(long *)(param_1 + 0xa0) + (long)iVar2 + 0x6c) != '\0') { uVar1 = FUN_fffd61cc(1); *(undefined2 *) ((-(ulong)((uint)(iVar2 << 0xc) >> 0x1f) & 0xfffffffe00000000 | (ulong)(iVar2 << 0xc | 0x80) << 1) + 0xfe000000) = uVar1; } iVar2 = iVar2 + 1; } while (iVar2 != 10); iVar2 = FUN_fffd4dc0(param_1); if (iVar2 != 0) { return iVar2; } FUN_fffd6530(param_1); uVar3 = 1; iVar2 = 0; } FUN_fffd1a40(param_1,uVar3); uVar1 = FUN_fffd28dc(*(undefined2 *)(*(long *)(param_1 + 0xa0) + 0x66),2); FUN_fffd6e44(0,1,uVar1,0,0xffffffff,param_1); FUN_fffd54bc(param_1); FUN_fffd1a40(param_1,1); *(undefined *)(param_1 + 0x1b9) = 0; FUN_fffd2a08(param_1); FUN_fffd2314(param_1); FUN_fffd1bb0(param_1); FUN_fffd7b9c(param_1); FUN_fffd4adc(param_1); FUN_fffd21b4(); FUN_fffd4d18(param_1); return iVar2; } undefined8 FUN_fffda230(long param_1) { undefined4 uVar1; byte bVar2; byte bVar3; char cVar4; undefined2 uVar5; byte bVar6; short sVar7; byte bVar8; uint uVar9; undefined uVar10; ushort uVar11; undefined *puVar12; undefined *puVar13; long lVar14; long lVar15; lVar15 = *(long *)(param_1 + 0xa0); bVar2 = *(byte *)(param_1 + 0x1b9); lVar14 = *(long *)(param_1 + 0xa8); puVar13 = *(undefined **)(param_1 + 0x68); puVar12 = *(undefined **)(param_1 + 0x70); uVar9 = FUN_fffd22e8(*(undefined *)(lVar15 + 0x12)); bVar6 = (byte)uVar9 & 3; sVar7 = *(short *)(lVar15 + (long)(int)(uint)bVar2 * 2 + 0x38) << 1; bVar8 = (byte)((uVar9 & 0xff) >> 2); if (*(char *)(param_1 + 0xea) == '\x01') { *(short *)(puVar13 + 6) = sVar7; bVar3 = *(byte *)(lVar15 + 0x40); puVar13[10] = 0; puVar13[5] = (byte)((int)(uint)bVar3 >> (bVar2 & 0x1f)) & 1; puVar13[8] = 2; puVar13[0xb] = 0; puVar13[9] = 0; puVar13[4] = bVar2; uVar11 = *(ushort *)(lVar15 + 0x2c); if (bVar2 != 0) { uVar11 = uVar11 & 0xfeff; } *(ushort *)(puVar13 + 0x10) = uVar11; *(undefined2 *)(puVar13 + 0x22) = 0; uVar10 = *(undefined *)(lVar15 + 0x11); puVar13[1] = 0; puVar13[0x12] = uVar10; *puVar13 = 0; puVar13[0x16] = 3; puVar13[0xc] = (char)(((uint)*(ushort *)(lVar15 + 0x66) << 7) / 1000); puVar13[0x24] = 0x10; puVar13[0x25] = bVar6; puVar13[0x57] = 0x10; puVar13[0x58] = bVar8 & 3; cVar4 = *(char *)(*(long *)(param_1 + 0xa0) + 0x12); if (((cVar4 == '\a') || ((byte)(cVar4 - 1U) < 2)) || (cVar4 == '\x04')) { uVar10 = 0x20; if ((*(byte *)(lVar15 + 0xf) & 0xf) != 0) { uVar10 = 0x10; } puVar13[0x24] = uVar10; puVar13[0x57] = 0; puVar13[0x58] = 0; } puVar13[0x18] = 1; puVar13[0xd] = 0; puVar13[0x4a] = *(byte *)(lVar15 + 0x30) & 0xf; bVar2 = *(byte *)(lVar15 + 0x31); puVar13[0x19] = 0; puVar13[0x7d] = bVar2 & 0xf; puVar13[0x1b] = 0; puVar13[0x1c] = 0; puVar13[0x32] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104) ; puVar13[0x33] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108) ; puVar13[0x34] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c) ; puVar13[0x35] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x110) ; puVar13[0x36] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x120) ; puVar13[0x37] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x124) ; puVar13[0x38] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x128) ; puVar13[0x39] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 300); puVar13[0x3a] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x130) ; puVar13[0x3b] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x134) ; puVar13[0x3c] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x138) ; puVar13[0x3d] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x13c) ; } else { *(short *)(puVar12 + 6) = sVar7; bVar3 = *(byte *)(lVar15 + 0x40); puVar12[10] = 0; puVar12[5] = (byte)((int)(uint)bVar3 >> (bVar2 & 0x1f)) & 1; puVar12[8] = 2; puVar12[0xb] = 0; puVar12[9] = 0; puVar12[4] = bVar2; uVar5 = *(undefined2 *)(lVar15 + 0x2e); *(undefined2 *)(puVar12 + 0x22) = 0; *(undefined2 *)(puVar12 + 0x10) = uVar5; puVar12[0x12] = *(undefined *)(lVar15 + 0x11); puVar13[0x12] = 4; puVar12[1] = 0; *puVar12 = 0; puVar12[0x16] = puVar13[0x16]; uVar11 = *(ushort *)(lVar15 + 0x66); puVar12[0x25] = bVar6; puVar12[0xc] = (char)(((uint)uVar11 << 7) / 1000); puVar12[0x24] = 0x10; puVar12[0x57] = 0x10; puVar12[0x58] = bVar8 & 3; cVar4 = *(char *)(*(long *)(param_1 + 0xa0) + 0x12); if (((cVar4 == '\a') || ((byte)(cVar4 - 1U) < 2)) || (cVar4 == '\x04')) { uVar10 = 0x20; if ((*(byte *)(lVar15 + 0xf) & 0xf) != 0) { uVar10 = 0x10; } puVar12[0x24] = uVar10; puVar12[0x57] = 0; puVar12[0x58] = 0; } puVar12[0x18] = 1; puVar12[0xd] = 0; puVar12[0x4a] = *(byte *)(lVar15 + 0x30) & 0xf; bVar2 = *(byte *)(lVar15 + 0x31); puVar12[0x1b] = 0; puVar12[0x7d] = bVar2 & 0xf; puVar12[0x1c] = 0; puVar12[0x32] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x104) ; puVar12[0x33] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x108) ; puVar12[0x34] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x10c) ; puVar12[0x35] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x110) ; puVar12[0x36] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x120) ; puVar12[0x37] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x124) ; puVar12[0x38] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x128) ; puVar12[0x39] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 300); puVar12[0x3a] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x130) ; puVar12[0x3b] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x134) ; puVar12[0x3c] = (char)*(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x138) ; uVar1 = *(undefined4 *)(lVar14 + (ulong)*(byte *)(param_1 + 0x1b9) * 0x40 + 0x13c); puVar12[0x1d] = 0; puVar12[0x3d] = (char)uVar1; puVar12[0x20] = 0x20; puVar12[0x1e] = 0; puVar12[0x1f] = 0; puVar12[0x21] = 0x80; puVar12[0xe] = 0; } return 0; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int FUN_fffda644(long param_1) { ushort uVar1; uint uVar2; uint uVar3; short sVar4; bool bVar5; undefined2 uVar6; short sVar7; short sVar8; short sVar9; int iVar10; int iVar11; int iVar12; ulong uVar13; int iVar14; uint uVar15; ulong uVar16; if (0xfc < *(byte *)(*(long *)(param_1 + 0xa0) + 4)) { *(undefined *)(param_1 + 0x264) = 0xff; } bVar5 = *(char *)(param_1 + 0x264) != -1; if (bVar5) { iVar12 = 0xff; } else { *(undefined *)(param_1 + 0xea) = 1; iVar12 = 0; } *(undefined *)(param_1 + 0x1b9) = 0; if (*(char *)(param_1 + 0xea) == '\x01') { FUN_fffd5308(param_1); FUN_fffd2a08(param_1); FUN_fffda230(param_1); FUN_fffd3f1c(param_1); FUN_fffd2314(param_1); FUN_fffd0ebc(param_1); FUN_fffd0e50(param_1); *(undefined *)(param_1 + 0x1b9) = 0; if (*(char *)(param_1 + 0x264) != -1) { FUN_fffd2280(param_1); if ((*(ushort *)(*(long *)(param_1 + 0xa0) + 0x2c) >> 0xc & 1) != 0) { _DAT_fe0a8010 = 0x1001; iVar10 = FUN_fffd4dc0(param_1); iVar12 = iVar12 + iVar10; } iVar10 = 0; do { if (*(char *)(*(long *)(param_1 + 0xa0) + (long)iVar10 + 0x6c) != '\0') { uVar6 = FUN_fffd61cc(1); *(undefined2 *) ((-(ulong)((uint)(iVar10 << 0xc) >> 0x1f) & 0xfffffffe00000000 | (ulong)(iVar10 << 0xc | 0x80) << 1) + 0xfe000000) = uVar6; } iVar10 = iVar10 + 1; } while (iVar10 != 10); iVar10 = 1; do { uVar1 = *(ushort *)((long)(int)(iVar10 << 0xd | 0x100) + 0xfe000000); uVar15 = (uint)uVar1; if (uVar1 == 0) { do { uVar2 = (iVar10 + -1 + uVar15) * 0x1000; uVar3 = uVar2 | 0x80; iVar11 = FUN_fffd6160(1,*(undefined2 *)((long)(int)(uVar3 << 1) + 0xfe000000)); uVar6 = FUN_fffd61cc(1,iVar11 + 0x20); uVar15 = uVar15 + 1; *(undefined2 *) ((-(ulong)(uVar2 >> 0x1f) & 0xfffffffe00000000 | (ulong)uVar3 << 1) + 0xfe000000) = uVar6; } while (uVar15 != 5); } iVar10 = iVar10 + 5; } while (iVar10 != 0xb); _DAT_fe0a8010 = 0x10f; iVar10 = FUN_fffd4dc0(param_1); FUN_fffd1018(param_1,6,1,0,*(long *)(param_1 + 0xa0) + 0x254); FUN_fffd1018(param_1,6,1,1,*(long *)(param_1 + 0xa0) + 0x400); sVar4 = _DAT_fe02015c; sVar7 = FUN_fffd6160(1,_DAT_fe002100); uVar13 = 0; if ((*(uint *)(*(long *)(param_1 + 0xa0) + 8) >> 0x1a & 1) == 0) { do { iVar11 = (int)(uVar13 >> 3); uVar2 = ((uint)(uVar13 >> 1) & 3) << 0xc | 0x10000; uVar3 = uVar2 | iVar11 + 0xd0 + ((uint)uVar13 & 1) * 0x100; uVar16 = (ulong)(uVar3 << 1); uVar15 = FUN_fffd6160(2,*(undefined2 *)(uVar16 + 0xfe000000)); if (sVar7 == 0x20) { uVar15 = uVar15 & 0x3f; if (0x3c < uVar15) { uVar15 = 0x20; } uVar6 = FUN_fffd61cc(2,uVar15 + 0x80); *(undefined2 *)((ulong)uVar3 * 2 + 0xfe000000) = uVar6; } uVar1 = *(ushort *)(uVar16 + 0xfe000000); iVar14 = 0; do { uVar15 = iVar11 + iVar14 * 0x100 + 0xc0; sVar8 = FUN_fffd6160(2,uVar1); sVar9 = FUN_fffd6160(2,uVar1 & 0xffc0); uVar6 = FUN_fffd61cc(4,(sVar4 + 0x10 + sVar8) - sVar9); iVar14 = iVar14 + 1; *(undefined2 *) ((-(ulong)(uVar15 >> 0x1f) & 0xfffffffe00000000 | (ulong)(uVar15 | uVar2) << 1) + 0xfe000000) = uVar6; } while (iVar14 != 9); uVar15 = (uint)uVar13 + 1; uVar13 = (ulong)(ushort)uVar15; } while ((uVar15 & 0xffff) != 0x10); } _DAT_fe0a8010 = *(ushort *)(*(long *)(param_1 + 0xa0) + 0x2c) & 0xef9; if (bVar5) { _DAT_fe0a8010 = *(ushort *)(*(long *)(param_1 + 0xa0) + 0x2c) & 0xef9; iVar12 = FUN_fffd4dc0(param_1); } else { iVar12 = iVar12 + iVar10; } if (iVar12 != 0) { return iVar12; } } } *(undefined *)(param_1 + 0x1b9) = 0; FUN_fffd2a08(param_1); FUN_fffd2314(param_1); if (*(char *)(param_1 + 0x264) == -1) { *(undefined *)(param_1 + 0xea) = 2; *(undefined *)(param_1 + 0xe8) = 0; } if (*(char *)(param_1 + 0xea) == '\x02') { if (*(char *)(param_1 + 0x264) == -1) { FUN_fffd1a40(param_1,0); } else { FUN_fffda230(); FUN_fffd2280(param_1); iVar12 = FUN_fffd4dc0(param_1); FUN_fffd0bb0(param_1,1); FUN_fffd54bc(param_1); FUN_fffd6530(param_1); } if (iVar12 == 0) { FUN_fffd1bb0(param_1); FUN_fffd1a40(param_1,1); FUN_fffd7b9c(param_1); FUN_fffd4adc(param_1); FUN_fffd21b4(); FUN_fffd4d18(param_1); _DAT_fe240048 = _DAT_fe040048 | 0x20; _DAT_fe040048 = _DAT_fe040048 | 0x20; FUN_fffd0bb0(param_1,2); } } return iVar12; } undefined8 FUN_fffdab14(undefined8 param_1,undefined8 param_2,undefined4 param_3,undefined4 param_4) { serial_puts(s__bl2_window_loop_fffdb7d9 + 9); serial_puts(param_1); FUN_fffdad18(s__dmc_margin_tx___fffdb87e + 0xc,param_2,0,s__rx_clk_window__fffdb78a + 1); FUN_fffdad18(&DAT_fffdb890,param_3,0,s__rx_clk_window__fffdb78a + 1); FUN_fffdad18(&DAT_fffdb895,param_4,0,s__rx_clk_window__fffdb78a); return 1; } void FUN_fffdabb0(long param_1,undefined param_2,long param_3) { long lVar1; for (lVar1 = 0; lVar1 != param_3; lVar1 = lVar1 + 1) { *(undefined *)(param_1 + lVar1) = param_2; } return; } /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void serial_putc(char c) { if (DAT_fffdbb18 == 0) { _DAT_ff803000 = (uint)(byte)c; if (_DAT_ff803000 == 10) { do { } while ((_DAT_ff80300c >> 0x15 & 1) != 0); } do { } while ((_DAT_ff80300c >> 0x15 & 1) != 0); } return; } void serial_puts(char *s) { for (; *s != '\0'; s = s + 1) { serial_putc(*s); } return; } void FUN_fffdac54(ulong param_1,int param_2) { uint uVar1; uint uVar2; char cVar3; for (uVar2 = param_2 - 4; -1 < (int)uVar2; uVar2 = uVar2 - 4) { uVar1 = (uint)(param_1 >> ((ulong)uVar2 & 0x3f)) & 0xf; cVar3 = (char)uVar1; if (uVar1 < 10) { cVar3 = cVar3 + '0'; } else { cVar3 = cVar3 + 'W'; } serial_putc(cVar3); } return; } void FUN_fffdaca0(ulong param_1) { uint uVar1; ulong uVar2; int iVar3; ulong uVar4; ulong uVar5; char acStack_20 [32]; uVar4 = 0; do { uVar2 = param_1 / 10; acStack_20[uVar4] = (char)param_1 + (char)uVar2 * -10 + '0'; iVar3 = (int)uVar4; uVar5 = uVar4 & 0xffffffff; uVar4 = uVar4 + 1; param_1 = uVar2; } while (iVar3 + 1U < 0x20 && uVar2 != 0); do { iVar3 = (int)uVar5; uVar1 = iVar3 - 1; uVar5 = (ulong)uVar1; serial_putc(acStack_20[iVar3]); } while (uVar1 != 0xffffffff); return; } void FUN_fffdad18(long param_1,undefined4 param_2,int param_3,long param_4) { if (param_1 != 0) { serial_puts(); } if (param_3 == 0) { FUN_fffdac54(param_2,0x20); } else { FUN_fffdaca0(); } if (param_4 != 0) { serial_puts(param_4); return; } return; }