input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
void GetHelpLine(FILE *H, STRPTR Text) {
WORD v2;
WORD v3;
WORD v4;
WORD i;
WORD j;
UBYTE Txt[104];
unsigned long v8;
v8 = __readfsqword(0x28u);
do
fgets((char *)Txt, 91, H);
while (!feof(H) && Txt[0] == 59);
i = 0;
j = 0;
while (i < strlen((const char *)Txt)) {
if (Txt[i] == 8) {
... | VOID GetHelpLine(FILE *H, STRPTR Text) {
UBYTE Txt[TEXTLEN];
WORD i, j;
do {
fgets(Txt, TEXTLEN - 1, H);
} while (!feof(H) && Txt[0] == ';');
for (i = 0, j = 0; i < strlen(Txt); i++) {
if (Txt[i] != TAB) {
if (Txt[i] >= SPACE)
Text[j++] = Txt[i];
else
Text[j++] = SPACE;
... | GetHelpLine | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void HandleBreakpoints(STRPTR Cmd) {
int v1;
WORD pos;
BOOL Blank;
ULONG i;
ULONG Val;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (((*__ctype_b_loc())[Cmd[1]] & 0x200) != 0)
Cmd[1] = toupper(Cmd[1]);
v1 = Cmd[1];
if (v1 == 67) {
puts("Breakpoints cleared");
for (i = 0; i <= 0x1D; +... | VOID HandleBreakpoints(STRPTR Cmd) {
ULONG i, Val;
WORD pos;
BOOL Blank;
if (islower(Cmd[1]))
Cmd[1] = toupper(Cmd[1]);
switch (Cmd[1]) {
case ' ':
pos = 1;
Val = ExtractNo(Cmd, &pos, &Blank);
if (!Blank) {
if (Val % 4)
printf("Invalid breakpoint address\n");
else {
... | HandleBreakpoints | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void IncClock(ULONG Num) {
ULONG Timer1Status;
ULONG Timer2Status;
ULONG Timer3Status;
if (!stru_19EE0.Copy) {
dlx.Cycles += Num;
dlx.Clock += Num;
if ((dlx.Type & 0x10) != 0) {
if ((timer.Timer1Status & 1) != 0) {
timer.Timer1Count += Num;
if (timer.Timer1Count >= timer.Timer... | VOID IncClock(ULONG Num) {
if (!BP.Copy) {
dlx.Cycles += Num;
dlx.Clock += Num;
if (dlx.Type & TIMERON) {
if (timer.Timer1Status & T_ENABLED) {
timer.Timer1Count += Num;
if (timer.Timer1Count >= timer.Timer1Latch) {
SetInterrupt(INT_TIMER);
timer.Timer1Status |... | IncClock | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void IncInsType(UBYTE Type) {
switch (Type) {
case 1u:
++dlx.Loads;
break;
case 2u:
++dlx.Stores;
break;
case 3u:
++dlx.ALU;
break;
case 4u:
++dlx.Set;
break;
case 5u:
++dlx.Jumps;
break;
case 6u:
++dlx.JALs;
break;
case 7u:
++dlx.Move;
break;
ca... | VOID IncInsType(UBYTE Type) {
switch (Type) {
case T_Load:
dlx.Loads++;
break;
case T_Store:
dlx.Stores++;
break;
case T_ALU:
dlx.ALU++;
break;
case T_Set:
dlx.Set++;
break;
case T_Jump:
dlx.Jumps++;
break;
case T_JAL:
dlx.JALs++;
break;
case T_Move:... | IncInsType | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void IniSetting(ULONG Which, STRPTR ptr) {
ULONG Type;
ULONG v3;
ULONG Val;
Val = atol((const char *)ptr);
switch (Which) {
case 0uLL:
dlx.SizeOfMem = Val << 10;
break;
case 1uLL:
if (Val)
dlx.Type |= 0x10uLL;
else
dlx.Type &= ~0x10uLL;
break;
case 2uLL:
Type = dlx.T... | VOID IniSetting(ULONG Which, STRPTR ptr) {
ULONG Val;
Val = atol(ptr);
switch (Which) {
case INI_MEMORY:
dlx.SizeOfMem = Val * 1024;
break;
case INI_TIMER:
if (Val == 0)
dlx.Type &= ~TIMERON;
else
dlx.Type |= TIMERON;
break;
case INI_TRAPS:
if (Val == 0)
dlx.Ty... | IniSetting | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
BOOL InitCpu() {
FILE *f;
UBYTE Txt[88];
unsigned long v3;
v3 = __readfsqword(0x28u);
memset(&dlx, 0, sizeof(dlx));
dlx.Type = 913;
dlx.SizeOfMem = 0x40000;
LoadMicrocode((STRPTR) "dlxmcode.tbl", 1);
ReadIni();
do {
dlx.Memory = (STRPTR)calloc(1u, dlx.SizeOfMem);
if (dlx.Memory)
break... | BOOL InitCpu() {
FILE *f;
UBYTE Txt[82];
memset(&dlx, 0, sizeof(dlx));
dlx.Type = HARDWIRED | TIMERON | TRAPSON | MOVESON | VECTORTRAPS;
dlx.SizeOfMem = 0x40000;
LoadMicrocode("dlxmcode.tbl", TRUE);
ReadIni();
do {
dlx.Memory = (STRPTR)calloc(1, dlx.SizeOfMem);
if (!dlx.Memory)
dlx.... | InitCpu | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
UBYTE InputChr() {
LONG Ch_0;
do
Ch_0 = getchar();
while (Ch_0 == -1);
return Ch_0;
} | UBYTE InputChr() {
LONG Ch;
do {
#ifdef AMIGA
Ch = getch();
#else
Ch = getchar();
#endif
} while (Ch == EOF);
return (UBYTE)Ch;
} | InputChr | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
BOOL IsBranchJump(UBYTE Op) {
if (Op <= 3u)
return Op >= 2u;
return (unsigned int)Op - 10 <= 5;
} | BOOL IsBranchJump(UBYTE Op) {
switch (Op) {
case 0x02:
case 0x03:
case 0x0A:
case 0x0B:
case 0x0C:
case 0x0D:
case 0x0E:
case 0x0F:
return TRUE;
}
return FALSE;
} | IsBranchJump | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void LoadMicrocode(STRPTR FName, BOOL MainTable) {
long v2;
long v3;
long v4;
UBYTE j;
UWORD i;
BOOL McErr;
BOOL Open;
FILE *f;
size_t Sz;
size_t Sza;
size_t Szb;
size_t Szc;
UBYTE Conv1[4];
UBYTE Conv2[4];
unsigned long v16;
v16 = __readfsqword(0x28u);
McErr = 0;
Open = 0;
f = fo... | VOID LoadMicrocode(STRPTR FName, BOOL MainTable) {
UWORD i;
FILE *f;
ULONG Sz;
UBYTE Conv1[4], Conv2[4], j;
BOOL McErr = FALSE, Open = FALSE;
f = fopen(FName, "rb");
if (!f) {
printf("Cannot open microcode table file '%s'\n", FName);
McErr = TRUE;
} else
Open = TRUE;
if (!McErr)
for... | LoadMicrocode | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void MainLoop() {
WORD pos;
BOOL Blank;
BOOL Loop;
BOOL Debug;
BOOL Playback;
BOOL Record;
BOOL TraceLoop;
ULONG i;
FILE *Rec;
FILE *Lg;
ULONG Val;
UBYTE Cmd[168];
unsigned long v12;
v12 = __readfsqword(0x28u);
Rec = 0;
Lg = stdout;
Loop = 1;
Debug = 0;
Playback = 0;
Record = 0;... | VOID MainLoop() {
ULONG i, Val;
WORD pos;
UBYTE Cmd[162];
FILE *Rec = NULL, *Lg = stdout;
BOOL Loop = TRUE, Debug = FALSE, Blank, TraceLoop, Playback = FALSE,
Record = FALSE;
do {
printf(">");
if (Playback) {
fgets(Cmd, 160, Rec);
printf("%s", Cmd);
} else
fgets(Cmd, ... | MainLoop | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void MemoryDump(STRPTR Cmd) {
UBYTE Val;
BOOL Blank;
WORD Pos;
ULONG Start;
ULONG End;
ULONG i;
ULONG j;
char Str[24];
unsigned long v9;
v9 = __readfsqword(0x28u);
Pos = 1;
Start = ExtractNo(Cmd, &Pos, &Blank);
if (Blank)
Start = LastAddr;
else
End = ExtractNo(Cmd, &Pos, &Blank);
... | VOID MemoryDump(STRPTR Cmd) {
ULONG Start, End, i, j;
UBYTE Str[16], Val;
BOOL Blank;
WORD Pos = 1;
Start = ExtractNo(Cmd, &Pos, &Blank);
if (!Blank)
End = ExtractNo(Cmd, &Pos, &Blank);
else
Start = LastAddr;
if (Blank || End < Start)
End = Start + 127;
for (i = Start; i <= End; i += 1... | MemoryDump | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void OnOff(ULONG Flag) {
if ((Flag & DebugLevel) != 0)
puts("<<ON>>");
else
puts("off");
} | VOID OnOff(ULONG Flag) {
if (DebugLevel & Flag)
printf("<<ON>>\n");
else
printf("off\n");
} | OnOff | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void OutputChr(UBYTE Ch_0) {
putchar(Ch_0);
fflush(stdout);
} | VOID OutputChr(UBYTE Ch) {
putchar(Ch);
fflush(stdout);
} | OutputChr | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void OutputDecVal(ULONG Val) { printf("%ld", Val); } | VOID OutputDecVal(ULONG Val) { printf("%ld", Val); } | OutputDecVal | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void OutputHexVal(ULONG Val) { printf("%lX", Val); } | VOID OutputHexVal(ULONG Val) { printf("%lX", Val); } | OutputHexVal | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PExecuteIType(UBYTE p) {
switch (dlx.Pipe[p].Op >> 3) {
case 1:
if ((dlx.Type & 0xF0000) <= 0x1FFFF)
PPerformBranchJump(p);
break;
case 2:
PPerformLoad(p);
break;
case 3:
PPerformStore(p);
break;
case 4:
case 5:
PPerformIMath(p);
break;
case 6:
if (p == 2)
... | VOID PExecuteIType(UBYTE p) {
switch (dlx.Pipe[p].Op >> 3) {
case 1:
if (BRANCHTYPE < BR_EARLY)
PPerformBranchJump(p);
break;
case 2:
PPerformLoad(p);
break;
case 3:
PPerformStore(p);
break;
case 4:
case 5:
PPerformIMath(p);
break;
case 6:
if (p == EX)
... | PExecuteIType | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PExecuteJType(UBYTE p) {
int Op;
UBYTE DoEX;
UBYTE DoWB;
DoEX = 2;
DoWB = 4;
if ((dlx.Type & 0xF0000) > 0x1FFFF) {
DoEX = 1;
DoWB = 1;
}
Op = dlx.Pipe[p].Op;
if (Op == 3) {
if (p == DoEX) {
++dlx.JALs;
dlx.Pipe[p].DoNewPC = 1;
dlx.Pipe[p].NewPC = dlx.Pipe[p].PC + dl... | VOID PExecuteJType(UBYTE p) {
UBYTE DoEX = EX, DoWB = WB;
if (BRANCHTYPE >= BR_EARLY) {
DoEX = ID;
DoWB = ID;
}
switch (dlx.Pipe[p].Op) {
case 0:
if (p == EX)
dlx.TrapRfe++;
if ((dlx.Type & TRAPSON) && dlx.Pipe[p].Offset26 < 64)
switch (dlx.Pipe[p].Offset26) {
case 0:
... | PExecuteJType | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PExecuteRType(UBYTE p) {
switch (dlx.Pipe[p].Func >> 3) {
case 0:
if (p == 2)
PPerformMove(2u);
break;
case 1:
if (p == 2)
PPerformConvert(2u);
break;
case 2:
case 3:
if (p == 2)
PPerformSetFP(2u);
break;
case 4:
case 5:
if (p == 2)
PPerformRMath(2u... | VOID PExecuteRType(UBYTE p) {
switch (dlx.Pipe[p].Func >> 3) {
case 0:
if (p == EX)
PPerformMove(p);
break;
case 1:
if (p == EX)
PPerformConvert(p);
break;
case 2:
case 3:
if (p == EX)
PPerformSetFP(p);
break;
case 4:
case 5:
if (p == EX)
PPerformR... | PExecuteRType | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformBitShift(UBYTE p, WORD Op, ULONG Val) {
ULONG Tmp;
ULONG i;
ULONG v;
++dlx.ALU;
switch (Op) {
case 0:
dlx.Pipe[p].IntC = Val & dlx.Pipe[p].IntA;
break;
case 2:
dlx.Pipe[p].IntC = Val | dlx.Pipe[p].IntA;
break;
case 3:
dlx.Pipe[p].IntC = Val ^ dlx.Pipe[p].IntA;
break... | VOID PPerformBitShift(UBYTE p, WORD Op, ULONG Val) {
ULONG Tmp, i, v;
dlx.ALU++;
switch (Op) {
case 0:
dlx.Pipe[p].IntC = (dlx.Pipe[p].IntA & Val);
break;
case 2:
dlx.Pipe[p].IntC = (dlx.Pipe[p].IntA | Val);
break;
case 3:
dlx.Pipe[p].IntC = (dlx.Pipe[p].IntA ^ Val);
break;
ca... | PPerformBitShift | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformBranchJump(UBYTE p) {
UBYTE DoEX;
UBYTE DoWB;
DoEX = 2;
DoWB = 4;
if ((dlx.Type & 0xF0000) > 0x1FFFF) {
DoEX = 1;
DoWB = 1;
}
switch (dlx.Pipe[p].Op & 7) {
case 2:
if (p == DoEX) {
dlx.Pipe[p].NewPC = dlx.Pipe[p].IntA;
dlx.Pipe[p].DoNewPC = 1;
++dlx.Jumps;
... | VOID PPerformBranchJump(UBYTE p) {
UBYTE DoEX = EX, DoWB = WB;
if (BRANCHTYPE >= BR_EARLY) {
DoEX = ID;
DoWB = ID;
}
switch (dlx.Pipe[p].Op & 7) {
case 2:
if (p == DoEX) {
dlx.Pipe[p].NewPC = dlx.Pipe[p].IntA;
dlx.Pipe[p].DoNewPC = TRUE;
dlx.Jumps++;
}
break;
case 3... | PPerformBranchJump | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformConvert(UBYTE p) {
double FpA;
ULONG v2;
ULONG IntA;
double v4;
++dlx.Convert;
switch (dlx.Pipe[p].Func & 7) {
case 0:
case 2:
dlx.Pipe[p].FpC = dlx.Pipe[p].FpA;
break;
case 1:
case 3:
FpA = dlx.Pipe[p].FpA;
if (FpA >= 9.223372036854776e18)
v2 = (unsigned int)(int... | VOID PPerformConvert(UBYTE p) {
dlx.Convert++;
switch (dlx.Pipe[p].Func & 7) {
case 0:
case 2:
dlx.Pipe[p].FpC = dlx.Pipe[p].FpA;
break;
case 1:
case 3:
dlx.Pipe[p].IntC = (ULONG)(dlx.Pipe[p].FpA);
break;
case 4:
case 5:
dlx.Pipe[p].FpC = (DOUBLE)(dlx.Pipe[p].IntA);
break;
... | PPerformConvert | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformIMath(UBYTE p) {
if (p == 2) {
++dlx.ALU;
switch (dlx.Pipe[2].Op & 0xF) {
case 0:
dlx.Pipe[2].IntC = dlx.Pipe[2].IntA + dlx.Pipe[2].Offset16;
break;
case 1:
dlx.Pipe[2].IntC =
dlx.Pipe[2].IntA + (unsigned short)dlx.Pipe[2].Offset16;
break;
case 4:
... | VOID PPerformIMath(UBYTE p) {
if (p == EX) {
dlx.ALU++;
switch (dlx.Pipe[p].Op & 15) {
case 0:
dlx.Pipe[p].IntC = (ULONG)((LONG)dlx.Pipe[p].IntA + dlx.Pipe[p].Offset16);
break;
case 1:
dlx.Pipe[p].IntC =
(ULONG)((LONG)dlx.Pipe[p].IntA + (UWORD)dlx.Pipe[p].Offset16);
... | PPerformIMath | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformLoad(UBYTE p) {
if (p == 2)
++dlx.Loads;
switch (dlx.Pipe[p].Op & 7) {
case 0:
if (p == 3) {
dlx.Pipe[3].IntC =
FetchB(dlx.Pipe[3].IntA + (unsigned short)dlx.Pipe[3].Offset16);
if ((dlx.Pipe[3].IntC & 0x80) != 0)
dlx.Pipe[3].IntC |= 0xFFFFFF00uLL;
}
break... | VOID PPerformLoad(UBYTE p) {
FLOAT Fp;
ULONG L;
if (p == EX)
dlx.Loads++;
switch (dlx.Pipe[p].Op & 7) {
case 0:
if (p == MEM) {
dlx.Pipe[p].IntC =
(ULONG)FetchB(dlx.Pipe[p].IntA + (UWORD)dlx.Pipe[p].Offset16);
if (dlx.Pipe[p].IntC & 0x80)
dlx.Pipe[p].IntC |= 0xFFFFFF00... | PPerformLoad | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformMove(UBYTE p) {
unsigned int v1;
++dlx.Move;
v1 = dlx.Pipe[p].Func & 7;
if (v1 > 5) {
SetInterrupt(1u);
--dlx.Move;
} else if ((dlx.Pipe[p].Func & 7u) >= 4) {
dlx.Pipe[p].FpC = dlx.Pipe[p].FpA;
} else if ((dlx.Pipe[p].Func & 7u) >= 2) {
dlx.Pipe[p].IntC = dlx.Pipe[p].IntA;
} ... | VOID PPerformMove(UBYTE p) {
dlx.Move++;
switch (dlx.Pipe[p].Func & 7) {
case 0:
switch (dlx.Pipe[p].RegA) {
case 0:
dlx.Pipe[p].IntC = dlx.IAR;
break;
case 1:
dlx.Pipe[p].IntC = dlx.IStatus;
break;
case 2:
dlx.Pipe[p].IntC = dlx.FPStatus;
}
break;
case... | PPerformMove | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformRMath(UBYTE p) {
ULONG IntA;
double v2;
ULONG IntB;
double v4;
double d1;
double d2;
++dlx.ALU;
switch (dlx.Pipe[p].Func & 0xF) {
case 0:
case 4:
case 8:
d1 = (double)(int)dlx.Pipe[p].IntA;
d2 = (double)(int)dlx.Pipe[p].IntB;
break;
case 1:
case 9:
IntA = dlx.Pipe... | VOID PPerformRMath(UBYTE p) {
DOUBLE d1, d2;
dlx.ALU++;
switch (dlx.Pipe[p].Func & 0xF) {
case 0x00:
case 0x04:
case 0x08:
d1 = (DOUBLE)((LONG)dlx.Pipe[p].IntA);
d2 = (DOUBLE)((LONG)dlx.Pipe[p].IntB);
break;
case 0x01:
case 0x09:
d1 = (DOUBLE)dlx.Pipe[p].IntA;
d2 = (DOUBLE)dlx.Pip... | PPerformRMath | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformSet(UBYTE p, WORD Op, LONG Val) {
signed long Cmp;
Cmp = dlx.Pipe[p].IntA;
++dlx.Set;
switch (Op) {
case 0:
dlx.Pipe[p].IntC = Cmp < Val;
break;
case 1:
dlx.Pipe[p].IntC = Cmp > Val;
break;
case 2:
dlx.Pipe[p].IntC = Cmp <= Val;
break;
case 3:
dlx.Pipe[p].IntC =... | VOID PPerformSet(UBYTE p, WORD Op, LONG Val) {
LONG Cmp = (LONG)dlx.Pipe[p].IntA;
dlx.Set++;
switch (Op) {
case 0:
dlx.Pipe[p].IntC = (Cmp < Val);
break;
case 1:
dlx.Pipe[p].IntC = (Cmp > Val);
break;
case 2:
dlx.Pipe[p].IntC = (Cmp <= Val);
break;
case 3:
dlx.Pipe[p].IntC... | PPerformSet | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformSetFP(UBYTE p) {
double F1;
double F2;
++dlx.Set;
F1 = dlx.Pipe[p].FpA;
F2 = dlx.Pipe[p].FpB;
dlx.FPStatus &= ~1uLL;
switch (dlx.Pipe[p].Func & 7) {
case 0:
if (F2 > F1)
dlx.FPStatus |= 1uLL;
break;
case 1:
if (F1 > F2)
dlx.FPStatus |= 1uLL;
break;
case 2:
... | VOID PPerformSetFP(UBYTE p) {
DOUBLE F1, F2;
dlx.Set++;
F1 = dlx.Pipe[p].FpA;
F2 = dlx.Pipe[p].FpB;
dlx.FPStatus &= (~FST_COMPARE);
switch (dlx.Pipe[p].Func & 7) {
case 0:
if (F1 < F2)
dlx.FPStatus |= FST_COMPARE;
break;
case 1:
if (F1 > F2)
dlx.FPStatus |= FST_COMPARE;
... | PPerformSetFP | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PPerformStore(UBYTE p) {
float FpB;
ULONG Ul;
if (p == 2)
++dlx.Stores;
switch (dlx.Pipe[p].Op & 7) {
case 0:
if (p == 3)
StoreB(dlx.Pipe[3].IntA + (unsigned short)dlx.Pipe[3].Offset16,
dlx.Pipe[3].IntB);
break;
case 2:
if (p == 3)
StoreW(dlx.Pipe[3].IntA + (un... | VOID PPerformStore(UBYTE p) {
FLOAT Fp;
ULONG Ul;
if (p == EX)
dlx.Stores++;
switch (dlx.Pipe[p].Op & 7) {
case 0:
if (p == MEM)
StoreB(dlx.Pipe[p].IntA + (UWORD)dlx.Pipe[p].Offset16,
(UBYTE)dlx.Pipe[p].IntB);
break;
case 2:
if (p == MEM)
StoreW(dlx.Pipe[p].IntA ... | PPerformStore | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
UBYTE PauseForKey(UBYTE Msg) {
UBYTE Pause[4];
unsigned long v3;
v3 = __readfsqword(0x28u);
if (Msg == 2) {
printf("Press RETURN to continue");
} else if (Msg <= 2u && Msg && Msg == 1) {
printf("(press RETURN for more)");
}
fgets((char *)Pause, 3, stdin);
return Pause[0];
} | UBYTE PauseForKey(UBYTE Msg) {
UBYTE Pause[4];
switch (Msg) {
case 0:
break;
case 1:
printf("(press RETURN for more)");
break;
case 2:
printf("Press RETURN to continue");
break;
}
fgets(Pause, 3, stdin);
return Pause[0];
} | PauseForKey | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformBitShift(WORD Op, UBYTE Dest, UBYTE Src, ULONG Val) {
ULONG Tmp;
ULONG i;
ULONG v;
++dlx.ALU;
switch (Op) {
case 0:
SetDest(Dest, Val & dlx.R[Src]);
goto LABEL_18;
case 2:
SetDest(Dest, Val | dlx.R[Src]);
goto LABEL_18;
case 3:
SetDest(Dest, Val ^ dlx.R[Src]);
goto L... | VOID PerformBitShift(WORD Op, UBYTE Dest, UBYTE Src, ULONG Val) {
ULONG Tmp, i, v;
dlx.ALU++;
switch (Op) {
case 0:
SetDest(Dest, dlx.R[Src] & Val);
break;
case 2:
SetDest(Dest, dlx.R[Src] | Val);
break;
case 3:
SetDest(Dest, dlx.R[Src] ^ Val);
break;
case 4:
if (Val < 33)... | PerformBitShift | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformBranchJump(WORD Src, WORD Offset) {
switch ((dlx.IR >> 26) & 7) {
case 2uLL:
dlx.PC = dlx.R[Src];
++dlx.Jumps;
IncClock(1u);
return;
case 3uLL:
dlx.R[31] = dlx.PC;
dlx.RegC = dlx.PC;
dlx.PC = dlx.R[Src];
++dlx.JALs;
IncClock(3u);
return;
case 4uLL:
if (dlx... | VOID PerformBranchJump(WORD Src, WORD Offset) {
switch ((dlx.IR & 0x1C000000) >> 26) {
case 2:
dlx.PC = dlx.R[Src];
dlx.Jumps++;
IncClock(1);
break;
case 3:
dlx.RegC = dlx.R[31] = dlx.PC;
dlx.PC = dlx.R[Src];
dlx.JALs++;
IncClock(3);
break;
case 4:
if (!dlx.R[Src]) {
... | PerformBranchJump | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformConvert(WORD Op, UBYTE Dest, UBYTE Src) {
float v3;
unsigned long v4;
FLOAT v5;
double v6;
unsigned long v7;
long v8;
float v9;
long v10;
double v11;
ULONG v12;
++dlx.Convert;
switch (Op) {
case 0:
dlx.FP.D[Dest >> 1] = dlx.FP.F[Src];
IncClock(4u);
break;
case 1:
... | VOID PerformConvert(WORD Op, UBYTE Dest, UBYTE Src) {
dlx.Convert++;
switch (Op) {
case 0:
dlx.FP.D[Dest / 2] = (DOUBLE)(dlx.FP.F[Src]);
IncClock(4);
break;
case 1:
dlx.FP.I[Dest] = (ULONG)(dlx.FP.F[Src]);
IncClock(2);
break;
case 2:
dlx.FP.F[Dest] = (FLOAT)(dlx.FP.D[Src / 2]);
... | PerformConvert | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformIMath(UBYTE Dest, UBYTE Src, WORD Imm) {
long Val;
++dlx.ALU;
switch ((dlx.IR >> 26) & 0xF) {
case 0uLL:
Val = dlx.R[Src] + Imm;
goto LABEL_8;
case 1uLL:
Val = dlx.R[Src] + (unsigned short)Imm;
goto LABEL_8;
case 4uLL:
Val = dlx.R[Src] - Imm;
goto LABEL_8;
case 5uLL:
... | VOID PerformIMath(UBYTE Dest, UBYTE Src, WORD Imm) {
ULONG Val;
dlx.ALU++;
switch ((dlx.IR & 0x3C000000) >> 26) {
case 0:
Val = (ULONG)((LONG)dlx.R[Src] + (LONG)Imm);
break;
case 1:
Val = dlx.R[Src] + (UWORD)Imm;
break;
case 4:
Val = (ULONG)((LONG)dlx.R[Src] - (LONG)Imm);
break;
... | PerformIMath | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformLoad(UBYTE Dest, UBYTE Src, WORD Imm) {
UBYTE v3;
UBYTE v4;
UWORD v5;
UWORD v6;
ULONG v7;
++dlx.Loads;
switch ((dlx.IR >> 26) & 7) {
case 0uLL:
v3 = FetchB(dlx.R[Src] + Imm);
SetDest(Dest, v3);
if ((dlx.R[Dest] & 0x80) != 0)
dlx.R[Dest] |= 0xFFFFFF00uLL;
goto LABEL_12;... | VOID PerformLoad(UBYTE Dest, UBYTE Src, WORD Imm) {
dlx.Loads++;
switch ((dlx.IR & 0x1C000000) >> 26) {
case 0:
SetDest(Dest, (ULONG)FetchB(dlx.R[Src] + Imm));
if (dlx.R[Dest] & 0x80)
dlx.R[Dest] |= 0xFFFFFF00;
break;
case 1:
SetDest(Dest, (ULONG)FetchB(dlx.R[Src] + Imm));
break;
... | PerformLoad | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformMove(WORD Op, UBYTE Dest, UBYTE Src) {
++dlx.Move;
switch (Op) {
case 0:
if (Src == 2) {
SetDest(Dest, dlx.FPStatus);
} else if (Src <= 2u) {
if (Src) {
if (Src == 1)
SetDest(Dest, dlx.IStatus);
} else {
SetDest(Dest, dlx.IAR);
}
}
IncC... | VOID PerformMove(WORD Op, UBYTE Dest, UBYTE Src) {
dlx.Move++;
switch (Op) {
case 0:
switch (Src) {
case 0:
SetDest(Dest, dlx.IAR);
break;
case 1:
SetDest(Dest, dlx.IStatus);
break;
case 2:
SetDest(Dest, dlx.FPStatus);
}
IncClock(2);
break;
case 1:
... | PerformMove | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformRMath(WORD Op, UBYTE Dest, UBYTE Src1, UBYTE Src2) {
long v4;
double v5;
long v6;
double v7;
long v8;
double v9;
long v10;
double v11;
double d1;
double d1a;
double d2;
++dlx.ALU;
switch (Op) {
case 0:
case 4:
case 8:
d1 = (double)(int)dlx.R[Src1];
d2 = (double)(int)... | VOID PerformRMath(WORD Op, UBYTE Dest, UBYTE Src1, UBYTE Src2) {
DOUBLE d1, d2;
dlx.ALU++;
switch (Op) {
case 0x00:
case 0x04:
case 0x08:
d1 = (DOUBLE)((LONG)dlx.R[Src1]);
d2 = (DOUBLE)((LONG)dlx.R[Src2]);
break;
case 0x01:
case 0x09:
d1 = (DOUBLE)dlx.R[Src1];
d2 = (DOUBLE)dlx.R[S... | PerformRMath | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformSet(WORD Op, UBYTE Dest, UBYTE Src, LONG Val) {
signed long Cmp;
Cmp = dlx.R[Src];
++dlx.Set;
switch (Op) {
case 0:
SetDest(Dest, Cmp < Val);
goto LABEL_9;
case 1:
SetDest(Dest, Cmp > Val);
goto LABEL_9;
case 2:
SetDest(Dest, Cmp <= Val);
goto LABEL_9;
case 3:
Se... | VOID PerformSet(WORD Op, UBYTE Dest, UBYTE Src, LONG Val) {
LONG Cmp = (LONG)dlx.R[Src];
dlx.Set++;
switch (Op) {
case 0:
SetDest(Dest, (Cmp < Val));
break;
case 1:
SetDest(Dest, (Cmp > Val));
break;
case 2:
SetDest(Dest, (Cmp <= Val));
break;
case 3:
SetDest(Dest, (Cmp >=... | PerformSet | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformSetFP(WORD Op, UBYTE Src1, UBYTE Src2) {
double F1;
double F2;
++dlx.Set;
if (Op <= 7) {
F1 = dlx.FP.F[Src1];
F2 = dlx.FP.F[Src2];
} else {
F1 = dlx.FP.D[Src1 >> 1];
F2 = dlx.FP.D[Src2 >> 1];
}
dlx.FPStatus &= ~1uLL;
switch (Op & 7) {
case 0:
if (F2 > F1)
dlx.FPS... | VOID PerformSetFP(WORD Op, UBYTE Src1, UBYTE Src2) {
DOUBLE F1, F2;
dlx.Set++;
if (Op > 7) {
F1 = dlx.FP.D[Src1 / 2];
F2 = dlx.FP.D[Src2 / 2];
} else {
F1 = (DOUBLE)dlx.FP.F[Src1];
F2 = (DOUBLE)dlx.FP.F[Src2];
}
dlx.FPStatus &= (~FST_COMPARE);
switch (Op & 7) {
case 0:
if (F1 < F... | PerformSetFP | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PerformStore(UBYTE Dest, UBYTE Src, WORD Imm) {
++dlx.Stores;
switch ((dlx.IR >> 26) & 7) {
case 0uLL:
StoreB(dlx.R[Dest] + Imm, dlx.R[Src]);
goto LABEL_8;
case 2uLL:
StoreW(dlx.R[Dest] + Imm, dlx.R[Src]);
goto LABEL_8;
case 4uLL:
StoreL(dlx.R[Dest] + Imm, dlx.R[Src]);
goto LABEL_... | VOID PerformStore(UBYTE Dest, UBYTE Src, WORD Imm) {
dlx.Stores++;
switch ((dlx.IR & 0x1C000000) >> 26) {
case 0:
StoreB(dlx.R[Dest] + Imm, (UBYTE)dlx.R[Src]);
break;
case 2:
StoreW(dlx.R[Dest] + Imm, (UWORD)dlx.R[Src]);
break;
case 4:
StoreL(dlx.R[Dest] + Imm, dlx.R[Src]);
break;
... | PerformStore | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void Performance() {
double Instr_low;
double Loads_low;
double Stores_low;
double ALU_low;
double Set_low;
double Move_low;
double Convert_low;
double Jumps_low;
double JALs_low;
double BranchTaken_low;
double v10;
double BranchNotTaken_low;
double TrapRfe_low;
double Clock_low;
double v1... | VOID Performance() {
DOUBLE Perc = ((DOUBLE)100) / ((DOUBLE)dlx.Instr);
printf("Performance of last run:\n");
if (SIMTYPE == PIPELINED || dlx.IDone) {
printf(" No. of instructions\n");
printf(" Started (IF) : %ld\n", dlx.IStart);
printf(" Executed (EX) : %ld\n", dlx.Instr);
printf(... | Performance | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void PrReg(UBYTE Type, UBYTE Reg, WORD Dest, WORD Src1, WORD Src2) {
fputc(Type, Log);
if (Reg == 100) {
fprintf(Log, "%d", Dest);
} else if (Reg == 49) {
fprintf(Log, "%d", Src1);
} else {
fprintf(Log, "%d", Src2);
}
} | VOID PrReg(UBYTE Type, UBYTE Reg, WORD Dest, WORD Src1, WORD Src2) {
fputc(Type, Log);
if (Reg == 'd')
fprintf(Log, "%d", Dest);
else if (Reg == '1')
fprintf(Log, "%d", Src1);
else
fprintf(Log, "%d", Src2);
} | PrReg | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void ReadIni() {
BOOL Loop;
BOOL Found;
UBYTE *ptr;
STRPTR ptra;
ULONG i;
FILE *fIni;
char Keyword[32];
char Line[136];
unsigned long v8;
v8 = __readfsqword(0x28u);
Loop = 1;
fIni = fopen("dlx.ini", "rb");
if (fIni) {
do {
fgets(Line, 120, fIni);
if (feof(fIni)) {
Loop... | VOID ReadIni() {
FILE *fIni;
UBYTE Line[122], Keyword[30];
BOOL Loop = TRUE, Found;
STRPTR ptr;
ULONG i;
fIni = fopen("dlx.ini", "rb");
if (fIni) {
do {
fgets(Line, 120, fIni);
if (feof(fIni))
Loop = FALSE;
else {
ptr = &Line[0];
while (*ptr == ' ' || *ptr... | ReadIni | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void Run(BOOL Debug) {
dlx.Running = 1;
do {
dlx.Running = RunOneInstr(Debug);
CheckCtrlC();
} while (dlx.Running);
} | VOID Run(BOOL Debug) {
dlx.Running = TRUE;
do {
dlx.Running = RunOneInstr(Debug);
CheckCtrlC();
} while (dlx.Running);
} | Run | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
BOOL RunOneHardwiredInstr(BOOL Debug) {
ULONG PC;
CallDebug(0, 0);
if (dlx.IStatus && !dlx.IAR) {
dlx.IAR = dlx.PC;
dlx.PC = 0;
}
if (Debug)
PC = dlx.PC;
FetchInstruction();
if (Debug)
CallDebug(1u, PC);
if (dlx.IR) {
ExecuteInstruction();
return 1;
} else {
if (!stru_19EE... | BOOL RunOneHardwiredInstr(BOOL Debug) {
ULONG PC;
CallDebug(0, 0);
if (dlx.IStatus && !dlx.IAR) {
dlx.IAR = dlx.PC;
dlx.PC = 0;
}
if (Debug)
PC = dlx.PC;
FetchInstruction();
if (Debug)
CallDebug(1, PC);
if (dlx.IR) {
ExecuteInstruction();
return TRUE;
}
if (!BP.Copy)
... | RunOneHardwiredInstr | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
BOOL RunOneInstr(BOOL Debug) {
unsigned long v1;
v1 = dlx.Type & 3;
if (v1 == 3)
return RunOnePipelinedInstr(Debug);
if (v1 > 3)
return 0;
if (v1 == 1)
return RunOneHardwiredInstr(Debug);
return v1 == 2 && RunOneMicrocodeInstr(Debug);
} | BOOL RunOneInstr(BOOL Debug) {
switch (SIMTYPE) {
case HARDWIRED:
return RunOneHardwiredInstr(Debug);
case MICROCODE:
return RunOneMicrocodeInstr(Debug);
case PIPELINED:
return RunOnePipelinedInstr(Debug);
}
return FALSE;
} | RunOneInstr | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
BOOL RunOneMicrocodeInstr(BOOL Debug) {
UBYTE MDest;
UBYTE MSrc1;
UBYTE MSrc2;
UBYTE S1Type;
UBYTE S2Type;
UBYTE DType;
UBYTE Misc;
UBYTE Cond;
UBYTE Op;
UBYTE OpF;
UBYTE Dest;
UBYTE AluOp;
UBYTE Src1;
UBYTE Src2;
UBYTE Const;
UBYTE Ptr;
WORD MFunc;
WORD Sz;
WORD i;
WORD MemDelay... | BOOL RunOneMicrocodeInstr(BOOL Debug) {
UBYTE MDest, MSrc1, MSrc2;
WORD MFunc, Sz, i, MemDelay = 0;
WORD Index = 0;
UBYTE Dest, AluOp, Src1, Src2, Const, Misc, Cond;
BOOL RunState = dlx.Running, Unsigned = FALSE, Continue = TRUE;
LONG imm26;
UBYTE Ptr, S1Type = 0, S2Type = 0, DType = 0, Op, OpF;
dlx.Ru... | RunOneMicrocodeInstr | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
BOOL RunOnePipelinedInstr(BOOL Debug) {
UBYTE Stage;
BOOL Continue;
BOOL Stall;
WORD i;
WORD j;
Continue = 1;
Stall = 0;
Stage = 3;
i = 0;
j = 0;
while (i <= 4) {
if (dlx.Pipe[i].Status == 2 && ++j == 5)
dlx.Trapped = 0;
++i;
}
if (dlx.Pipe[4].Status || dlx.Pipe[4].IR || !dlx.Tr... | BOOL RunOnePipelinedInstr(BOOL Debug) {
BOOL Continue = TRUE, Stall = FALSE;
WORD i, j;
UBYTE Stage = MEM;
for (i = IF, j = 0; i <= WB; i++)
if (dlx.Pipe[i].Status == FLUSH)
if (++j == 5)
dlx.Trapped = FALSE;
if (dlx.Pipe[WB].Status == RUN && dlx.Pipe[WB].IR == 0 && dlx.Trapped) {
Cont... | RunOnePipelinedInstr | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void SetDebugLevel(STRPTR Cmd) {
WORD i;
for (i = 1; Cmd[i] > 0x1Fu; ++i) {
switch (Cmd[i]) {
case 'D':
DebugLevel |= 1uLL;
break;
case 'E':
DebugLevel |= 0x20uLL;
break;
case 'M':
DebugLevel |= 2uLL;
break;
case 'P':
DebugLevel |= 0x10uLL;
break;... | VOID SetDebugLevel(STRPTR Cmd) {
WORD i;
for (i = 1; Cmd[i] > 31; i++) {
switch (Cmd[i]) {
case 'D':
DebugLevel |= DB_DISASSEM;
break;
case 'P':
DebugLevel |= DB_PIPEREGS;
break;
case 'M':
DebugLevel |= DB_MICROCODE;
break;
case 'S':
DebugLevel |= DB... | SetDebugLevel | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void SetDest(UBYTE Dest, ULONG Val) {
dlx.RegC = Val;
if (Dest)
dlx.R[Dest] = Val;
} | VOID SetDest(UBYTE Dest, ULONG Val) {
dlx.RegC = Val;
if (Dest)
dlx.R[Dest] = Val;
} | SetDest | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
BOOL SetHelpAddr(FILE *H, STRPTR Cmd) {
BOOL Recreate;
BOOL Loop;
BOOL Loopa;
BOOL Found;
LONG i;
FILE *I;
HelpIndexType HI;
unsigned char Text[104];
unsigned long v11;
v11 = __readfsqword(0x28u);
i = 0;
Loop = 1;
Found = 0;
do {
++i;
I = fopen("dlxhlp.idx", "rb");
if (I || i !=... | BOOL SetHelpAddr(FILE *H, STRPTR Cmd) {
FILE *I;
LONG i = 0;
struct HelpIndexType HI;
UBYTE Text[TEXTLEN];
BOOL Recreate, Loop = TRUE, Found = FALSE;
do {
i++;
I = fopen("dlxhlp.idx", "rb");
if (!I && i == 1) {
if (!CreateHelpIndex(H))
return FALSE;
} else if (!I) {
fpr... | SetHelpAddr | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void SetInterrupt(ULONG Int) { dlx.IStatus |= Int; } | VOID SetInterrupt(ULONG Int) { dlx.IStatus |= Int; } | SetInterrupt | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
BOOL SetPC(STRPTR Cmd) {
WORD Pos;
BOOL Blank;
BOOL Ok;
ULONG Val;
unsigned long v6;
v6 = __readfsqword(0x28u);
Pos = 1;
Ok = 1;
Val = ExtractNo(Cmd, &Pos, &Blank);
if (!Blank) {
if ((Val & 3) != 0) {
puts("Invalid PC");
return 0;
} else {
dlx.PC = Val;
}
}
return ... | BOOL SetPC(STRPTR Cmd) {
WORD Pos = 1;
ULONG Val;
BOOL Blank, Ok = TRUE;
Val = ExtractNo(Cmd, &Pos, &Blank);
if (!Blank) {
if (Val % 4) {
printf("Invalid PC\n");
Ok = FALSE;
} else
dlx.PC = Val;
}
return Ok;
} | SetPC | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void SetPipelineControl(STRPTR Cmd) {
int v1;
unsigned long v2;
unsigned long v3;
WORD i;
for (i = 1; Cmd[i] > 0x1Fu; ++i) {
if (((*__ctype_b_loc())[Cmd[i]] & 0x200) != 0)
Cmd[i] = toupper(Cmd[i]);
v1 = Cmd[i];
if (v1 == 76) {
dlx.Type = dlx.Type & 0xF0FFFFFF;
dlx.Type |=
... | VOID SetPipelineControl(STRPTR Cmd) {
WORD i;
for (i = 1; Cmd[i] > 31; i++) {
if (islower(Cmd[i]))
Cmd[i] = toupper(Cmd[i]);
switch (Cmd[i]) {
case 'B':
dlx.Type &= 0xFFF0FFFF;
dlx.Type |= ((atol(&Cmd[++i]) & 3) << 16);
break;
case 'F':
dlx.Type &= 0xFF0FFFFF;
... | SetPipelineControl | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void SetRegister(STRPTR Cmd) {
int v1;
ULONG v2;
FLOAT v3;
WORD pos;
BOOL Blank;
ULONG i;
ULONG Val;
unsigned long v8;
v8 = __readfsqword(0x28u);
if (((*__ctype_b_loc())[Cmd[1]] & 0x800) != 0) {
pos = 1;
i = (unsigned short)ExtractDecNo(Cmd, &pos, &Blank);
if (!Blank && i && i <= 0x1F) ... | VOID SetRegister(STRPTR Cmd) {
ULONG i, Val;
WORD pos;
BOOL Blank;
if (isdigit(Cmd[1])) {
pos = 1;
i = (UWORD)ExtractDecNo(Cmd, &pos, &Blank);
if (!Blank && i && i < 32) {
Val = ExtractNo(Cmd, &pos, &Blank);
if (!Blank)
dlx.R[i] = Val;
}
} else {
if (islower(Cmd[1]))... | SetRegister | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void SetRegisterTypes(ULONG IR, UBYTE *Src1, UBYTE *Src2, UBYTE *Dest) {
UBYTE Op;
UBYTE i;
UBYTE *p;
Op = (unsigned int)IR >> 26;
if (Op == 63)
Op = (IR & 0x3F) + 64;
for (i = 0; i <= 2u; ++i) {
if (i == 2) {
p = Src2;
} else if (i) {
if (i == 1)
p = Src1;
} else {
... | VOID SetRegisterTypes(ULONG IR, UBYTE *Src1, UBYTE *Src2, UBYTE *Dest) {
UBYTE Op = ((IR >> 26) & 0x3F), i, *p;
if (Op == 0x3F)
Op = (IR & 0x3F) + 64;
for (i = 0; i < 3; i++) {
switch (i) {
case 0:
p = Dest;
break;
case 1:
p = Src1;
break;
case 2:
p = Src2;
... | SetRegisterTypes | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void ShowMicrocode(ULONG Index, BOOL ShowCycles) {
UWORD Cond;
fprintf(Log, "%2ld ", Index);
switch ((unsigned char)HIBYTE(LODWORD(dlx.Microcode[Index])) >> 4) {
case 1:
fwrite("C ", 1u, 5u, Log);
break;
case 2:
fwrite("Temp ", 1u, 5u, Log);
break;
case 3:
fwrite("PC ", 1u, 5u, Lo... | VOID ShowMicrocode(ULONG Index, BOOL ShowCycles) {
UWORD Cond;
fprintf(Log, "%2ld ", Index);
switch ((dlx.Microcode[Index] >> 28) & 15) {
case DEST_C:
fprintf(Log, "C ");
break;
case DEST_Temp:
fprintf(Log, "Temp ");
break;
case DEST_PC:
fprintf(Log, "PC ");
break;
case DES... | ShowMicrocode | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void ShowPipeStages() {
WORD i;
WORD St;
WORD End;
St = 0;
End = 4;
if ((DebugLevel & 0x20) != 0) {
St = 2;
End = 2;
fprintf(Log, "%6ld %6ld ", dlx.Instr, dlx.Cycles);
} else {
fprintf(Log, "(Instructions Started=%ld, Executed=%ld", dlx.IStart,
dlx.Instr);
fprintf(Log, ", ... | VOID ShowPipeStages() {
WORD i, St = IF, End = WB;
if (DebugLevel & DB_EXONLY) {
St = EX;
End = EX;
fprintf(Log, "%6ld %6ld ", dlx.Instr, dlx.Cycles);
} else {
fprintf(Log, "(Instructions Started=%ld, Executed=%ld", dlx.IStart,
dlx.Instr);
fprintf(Log, ", Complete=%ld. Cycles=%ld)... | ShowPipeStages | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void SpecialTraps(LONG imm26) {
dlx.PC += 4LL;
if (!stru_19EE0.Copy)
++dlx.TrapRfe;
IncClock(4u);
switch (imm26) {
case 4LL:
OutputChr(dlx.R[1]);
break;
case 8LL:
OutputDecVal(dlx.R[1]);
break;
case 12LL:
OutputHexVal(dlx.R[1]);
break;
case 16LL:
dlx.R[1] = InputChr();
... | VOID SpecialTraps(LONG imm26) {
dlx.PC += 4;
if (!BP.Copy)
dlx.TrapRfe++;
IncClock(4);
switch (imm26) {
case 0:
break;
case 4:
OutputChr(dlx.R[1] & 0xFF);
break;
case 8:
OutputDecVal(dlx.R[1]);
break;
case 12:
OutputHexVal(dlx.R[1]);
break;
case 16:
dlx.R[1] ... | SpecialTraps | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void Store8(ULONG Addr, STRPTR Val) {
UBYTE i;
if (Addr < dlx.SizeOfMem - 7) {
if (LittleEndian) {
for (i = 0; i <= 7u; ++i)
dlx.Memory[7 - i + Addr] = Val[i];
} else {
*(_QWORD *)&dlx.Memory[Addr] = *(_QWORD *)Val;
}
}
} | VOID Store8(ULONG Addr, STRPTR Val) {
if (Addr < dlx.SizeOfMem - 7) {
if (LittleEndian) {
UBYTE i;
for (i = 0; i < 8; i++)
dlx.Memory[Addr + (7 - i)] = Val[i];
} else
memcpy(&dlx.Memory[Addr], Val, 8);
}
} | Store8 | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void StoreB(ULONG Addr, UBYTE Val) {
if (Addr < dlx.SizeOfMem)
dlx.Memory[Addr] = Val;
} | VOID StoreB(ULONG Addr, UBYTE Val) {
if (Addr < dlx.SizeOfMem)
dlx.Memory[Addr] = Val;
} | StoreB | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void StoreL(ULONG Addr, ULONG Val) {
UBYTE i;
UBYTE V[4];
unsigned long v4;
v4 = __readfsqword(0x28u);
if (Addr >= dlx.SizeOfMem - 3) {
if ((dlx.Type & 0x10) != 0 && Addr > 0xFEFFFFFF && Addr <= 0xFF000028) {
switch (Addr) {
case 0xFF000000uLL:
timer.Timer1Latch = Val;
timer.T... | VOID StoreL(ULONG Addr, ULONG Val) {
if (Addr < dlx.SizeOfMem - 3) {
if (LittleEndian) {
UBYTE V[4], i;
memcpy(V, &Val, 4);
for (i = 0; i < 4; i++)
dlx.Memory[Addr + (3 - i)] = V[i];
} else
memcpy(&dlx.Memory[Addr], &Val, 4);
} else if ((dlx.Type & TIMERON) && Addr >= T1_LA... | StoreL | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void StoreW(ULONG Addr, UWORD Val) {
UBYTE i;
UBYTE V[2];
unsigned long v4;
v4 = __readfsqword(0x28u);
if (Addr < dlx.SizeOfMem - 1) {
if (LittleEndian) {
*(_WORD *)V = Val;
for (i = 0; i <= 1u; ++i)
dlx.Memory[1 - i + Addr] = V[i];
} else {
*(_WORD *)&dlx.Memory[Addr] = Val... | VOID StoreW(ULONG Addr, UWORD Val) {
if (Addr < dlx.SizeOfMem - 1) {
if (LittleEndian) {
UBYTE V[2], i;
memcpy(V, &Val, 2);
for (i = 0; i < 2; i++)
dlx.Memory[Addr + (1 - i)] = V[i];
} else
memcpy(&dlx.Memory[Addr], &Val, 2);
}
} | StoreW | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
int main(int argc, const char **argv, const char **envp) {
ULONG i;
LittleEndian = 1;
Log = stdout;
puts("Please wait. Initialising...\n");
if (!InitCpu()) {
puts("Could not allocate DLX memory");
exit(20);
}
for (i = 0; i <= 0x1D; ++i)
stru_19EE0.BPs[i] = -1;
stru_19EE0.Copy = 0;
stru_19... | int main() {
ULONG i;
UBYTE LE[4];
i = 0x01020304;
memcpy(LE, &i, 4);
if (LE[0] == 4)
LittleEndian = TRUE;
Log = stdout;
printf("Please wait. Initialising...\n\n");
if (!InitCpu()) {
printf("Could not allocate DLX memory\n");
exit(20);
}
for (i = 0; i < MAXBREAKPOINTS; i++)
BP.... | main | dlx-1.5.20 | app-emulation | O0/app-emulation/dlx-1.5.20/mon | ida | O0 |
void Adam7_deinterlace(unsigned char *out, const unsigned char *in,
unsigned int w, unsigned int h, unsigned int bpp) {
unsigned char bit;
unsigned int i;
unsigned int ia;
unsigned int x;
unsigned int y;
unsigned int b;
unsigned int x_0;
unsigned int y_0;
unsigned int b_0;
uns... | static void Adam7_deinterlace(unsigned char *out, const unsigned char *in,
unsigned w, unsigned h, unsigned bpp) {
unsigned passw[7], passh[7];
size_t filter_passstart[8], padded_passstart[8], passstart[8];
unsigned i;
Adam7_getpassvalues(passw, passh, filter_passstart, padded_pas... | Adam7_deinterlace | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void Adam7_getpassvalues(unsigned int *passw, unsigned int *passh,
size_t *filter_passstart, size_t *padded_passstart,
size_t *passstart, unsigned int w, unsigned int h,
unsigned int bpp) {
long v8;
unsigned int i;
unsigned int ia;
for ... | static void Adam7_getpassvalues(unsigned passw[7], unsigned passh[7],
size_t filter_passstart[8],
size_t padded_passstart[8], size_t passstart[8],
unsigned w, unsigned h, unsigned bpp) {
unsigned i;
for (i = 0; i != 7;... | Adam7_getpassvalues | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void Adam7_interlace(unsigned char *out, const unsigned char *in,
unsigned int w, unsigned int h, unsigned int bpp) {
unsigned char bit;
unsigned int i;
unsigned int ia;
unsigned int x;
unsigned int y;
unsigned int b;
unsigned int x_0;
unsigned int y_0;
unsigned int b_0;
unsigne... | static void Adam7_interlace(unsigned char *out, const unsigned char *in,
unsigned w, unsigned h, unsigned bpp) {
unsigned passw[7], passh[7];
size_t filter_passstart[8], padded_passstart[8], passstart[8];
unsigned i;
Adam7_getpassvalues(passw, passh, filter_passstart, padded_passsta... | Adam7_interlace | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int AutoChooseFilterStrategy(
const std_vector<unsigned char> *image, unsigned int w, unsigned int h,
const lodepng_State *inputstate, bool bit16, bool keep_colortype,
const std_vector<unsigned char> *origfile, int numstrategies,
ZopfliPNGFilterStrategy *strategies, bool *enable) {
unsigned i... | unsigned AutoChooseFilterStrategy(
const std::vector<unsigned char> &image, unsigned w, unsigned h,
const lodepng::State &inputstate, bool bit16, bool keep_colortype,
const std::vector<unsigned char> &origfile, int numstrategies,
ZopfliPNGFilterStrategy *strategies, bool *enable) {
std::vector<unsigne... | AutoChooseFilterStrategy | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
int CZopfliPNGOptimize(const unsigned char *origpng, const size_t origpng_size,
const CZopfliPNGOptions *png_options, int verbose,
unsigned char **resultpng, size_t *resultpng_size) {
int v6;
size_t v7;
size_t v8;
std_vector<unsigned char> _reference v9;
int i;
... | extern "C" int CZopfliPNGOptimize(const unsigned char *origpng,
const size_t origpng_size,
const CZopfliPNGOptions *png_options,
int verbose, unsigned char **resultpng,
size_t *resultp... | CZopfliPNGOptimize | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void CZopfliPNGSetDefaults(CZopfliPNGOptions *png_options) {
ZopfliPNGOptions opts;
unsigned long v2;
v2 = __readfsqword(0x28u);
memset(png_options, 0, sizeof(CZopfliPNGOptions));
ZopfliPNGOptions_ZopfliPNGOptions(&opts);
png_options->lossy_transparent = opts.lossy_transparent;
png_options->lossy_8bit = ... | extern "C" void CZopfliPNGSetDefaults(CZopfliPNGOptions *png_options) {
memset(png_options, 0, sizeof(*png_options));
ZopfliPNGOptions opts;
png_options->lossy_transparent = opts.lossy_transparent;
png_options->lossy_8bit = opts.lossy_8bit;
png_options->auto_filter_strategy = opts.auto_filter_strategy;
p... | CZopfliPNGSetDefaults | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void ChunksToKeep(const std_vector<unsigned char> *origpng,
const std_vector<std_string> *keepnames,
std_set<std_string> *result) {
long v3;
std_vector<std_string> *v4;
long v5;
std_vector<std_vector<unsigned char>> *v6;
const std_string *v7;
const std_string *v8;
const... | void ChunksToKeep(const std::vector<unsigned char> &origpng,
const std::vector<std::string> &keepnames,
std::set<std::string> *result) {
std::vector<std::string> names[3];
std::vector<std::vector<unsigned char>> chunks[3];
lodepng::getChunks(names, chunks, origpng);
for (si... | ChunksToKeep | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int ColorIndex(const unsigned char *color) {
return *color + ((((color[2] + (color[3] << 8)) << 8) + color[1]) << 8);
} | static unsigned ColorIndex(const unsigned char *color) {
return color[0] + 256u * color[1] + 65536u * color[2] + 16777216u * color[3];
} | ColorIndex | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void CountColors(std_set<unsigned int> *unique, const unsigned char *image,
unsigned int w, unsigned int h,
bool transparent_counts_as_one) {
unsigned int index;
size_t i;
unsigned long v10;
v10 = __readfsqword(0x28u);
std_set<unsigned int> _clear(unique);
for (i = 0; i < ... | void CountColors(std::set<unsigned> *unique, const unsigned char *image,
unsigned w, unsigned h, bool transparent_counts_as_one) {
unique->clear();
for (size_t i = 0; i < w * h; i++) {
unsigned index = ColorIndex(&image[i * 4]);
if (transparent_counts_as_one && image[i * 4 + 3] == 0)
... | CountColors | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int CustomPNGDeflate(unsigned char **out, size_t *outsize,
const unsigned char *in, size_t insize,
const LodePNGCompressSettings *settings) {
int num_iterations_large;
unsigned char bp_0;
const ZopfliPNGOptions *png_options;
ZopfliOptions opti... | unsigned CustomPNGDeflate(unsigned char **out, size_t *outsize,
const unsigned char *in, size_t insize,
const LodePNGCompressSettings *settings) {
const ZopfliPNGOptions *png_options =
static_cast<const ZopfliPNGOptions *>(settings->custom_context);
unsigned... | CustomPNGDeflate | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void HuffmanTree_cleanup(HuffmanTree *tree) {
lodepng_free(tree->codes);
lodepng_free(tree->lengths);
lodepng_free(tree->table_len);
lodepng_free(tree->table_value);
} | static void HuffmanTree_cleanup(HuffmanTree *tree) {
lodepng_free(tree->codes);
lodepng_free(tree->lengths);
lodepng_free(tree->table_len);
lodepng_free(tree->table_value);
} | HuffmanTree_cleanup | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int HuffmanTree_getCode(const HuffmanTree *tree, unsigned int index) {
return tree->codes[index];
} | static unsigned HuffmanTree_getCode(const HuffmanTree *tree, unsigned index) {
return tree->codes[index];
} | HuffmanTree_getCode | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int HuffmanTree_getLength(const HuffmanTree *tree,
unsigned int index) {
return tree->lengths[index];
} | static unsigned HuffmanTree_getLength(const HuffmanTree *tree, unsigned index) {
return tree->lengths[index];
} | HuffmanTree_getLength | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void HuffmanTree_init(HuffmanTree *tree) {
tree->codes = 0;
tree->lengths = 0;
tree->table_len = 0;
tree->table_value = 0;
} | static void HuffmanTree_init(HuffmanTree *tree) {
tree->codes = 0;
tree->lengths = 0;
tree->table_len = 0;
tree->table_value = 0;
} | HuffmanTree_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int HuffmanTree_makeFromFrequencies(HuffmanTree *tree,
const unsigned int *frequencies,
size_t mincodes, size_t numcodes,
unsigned int maxbitlen) {
unsigned int error;
size... | static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree *tree,
const unsigned *frequencies,
size_t mincodes,
size_t numcodes,
... | HuffmanTree_makeFromFrequencies | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int HuffmanTree_makeFromLengths(HuffmanTree *tree,
const unsigned int *bitlen,
size_t numcodes,
unsigned int maxbitlen) {
unsigned int i;
tree->lengths = (unsigned int *)lodepng_mallo... | static unsigned HuffmanTree_makeFromLengths(HuffmanTree *tree,
const unsigned *bitlen,
size_t numcodes,
unsigned maxbitlen) {
unsigned i;
tree->lengths = (unsigned *)lodepng_malloc(num... | HuffmanTree_makeFromLengths | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int HuffmanTree_makeFromLengths2(HuffmanTree *tree) {
unsigned int *v1;
unsigned int *v2;
unsigned int *v3;
unsigned int v4;
int error;
unsigned int bits;
unsigned int bitsa;
unsigned int n;
unsigned int na;
unsigned int *blcount;
unsigned int *nextcode;
error = 0;
tree->codes = (uns... | static unsigned HuffmanTree_makeFromLengths2(HuffmanTree *tree) {
unsigned *blcount;
unsigned *nextcode;
unsigned error = 0;
unsigned bits, n;
tree->codes = (unsigned *)lodepng_malloc(tree->numcodes * sizeof(unsigned));
blcount =
(unsigned *)lodepng_malloc((tree->maxbitlen + 1) * sizeof(unsigned));
... | HuffmanTree_makeFromLengths2 | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int HuffmanTree_makeTable(HuffmanTree *tree) {
unsigned int v2;
unsigned char v3;
unsigned int j;
unsigned int j_0;
unsigned int l;
unsigned int index;
unsigned int l_0;
unsigned int l_1;
unsigned int l_2;
unsigned int reverse;
unsigned int maxlen;
unsigned int start;
unsigned int ind... | static unsigned HuffmanTree_makeTable(HuffmanTree *tree) {
static const unsigned headsize = 1u << FIRSTBITS;
static const unsigned mask = (1u << FIRSTBITS) - 1u;
size_t i, numpresent, pointer, size;
unsigned *maxlens = (unsigned *)lodepng_malloc(headsize * sizeof(unsigned));
if (!maxlens)
return 83;
fo... | HuffmanTree_makeTable | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void KeepChunks(const std_vector<unsigned char> *origpng,
const std_vector<std_string> *keepnames,
std_vector<unsigned char> *png) {
long v3;
std_vector<std_string> *v4;
long v5;
std_vector<std_vector<unsigned char>> *v6;
long v7;
std_vector<std_vector<unsigned char>> *v8;
... | void KeepChunks(const std::vector<unsigned char> &origpng,
const std::vector<std::string> &keepnames,
std::vector<unsigned char> *png) {
std::vector<std::string> names[3];
std::vector<std::vector<unsigned char>> chunks[3];
lodepng::getChunks(names, chunks, origpng);
std::vector<... | KeepChunks | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int LodePNGBitReader_init(LodePNGBitReader *reader,
const unsigned char *data, size_t size) {
size_t temp[2];
temp[1] = __readfsqword(0x28u);
reader->data = data;
reader->size = size;
if (lodepng_mulofl(size, 8u, &reader->bitsize))
return 105;
if (lodepng_add... | static unsigned LodePNGBitReader_init(LodePNGBitReader *reader,
const unsigned char *data, size_t size) {
size_t temp;
reader->data = data;
reader->size = size;
if (lodepng_mulofl(size, 8u, &reader->bitsize))
return 105;
if (lodepng_addofl(reader->bitsize, 64u, &tem... | LodePNGBitReader_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void LodePNGBitWriter_init(LodePNGBitWriter *writer, ucvector *data) {
writer->data = data;
writer->bp = 0;
} | void LodePNGBitWriter_init(LodePNGBitWriter *writer, ucvector *data) {
writer->data = data;
writer->bp = 0;
} | LodePNGBitWriter_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void LodePNGIText_cleanup(LodePNGInfo *info) {
size_t i;
for (i = 0; i != info->itext_num; ++i) {
string_cleanup(&info->itext_keys[i]);
string_cleanup(&info->itext_langtags[i]);
string_cleanup(&info->itext_transkeys[i]);
string_cleanup(&info->itext_strings[i]);
}
lodepng_free(info->itext_keys);... | static void LodePNGIText_cleanup(LodePNGInfo *info) {
size_t i;
for (i = 0; i != info->itext_num; ++i) {
string_cleanup(&info->itext_keys[i]);
string_cleanup(&info->itext_langtags[i]);
string_cleanup(&info->itext_transkeys[i]);
string_cleanup(&info->itext_strings[i]);
}
lodepng_free(info->itext_... | LodePNGIText_cleanup | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int LodePNGIText_copy(LodePNGInfo *dest, const LodePNGInfo *source) {
unsigned int error;
size_t i;
dest->itext_keys = 0;
dest->itext_langtags = 0;
dest->itext_transkeys = 0;
dest->itext_strings = 0;
dest->itext_num = 0;
for (i = 0; i != source->itext_num; ++i) {
error = lodepng_add_itext(... | static unsigned LodePNGIText_copy(LodePNGInfo *dest,
const LodePNGInfo *source) {
size_t i = 0;
dest->itext_keys = 0;
dest->itext_langtags = 0;
dest->itext_transkeys = 0;
dest->itext_strings = 0;
dest->itext_num = 0;
for (i = 0; i != source->itext_num; ++i) {
CERROR_T... | LodePNGIText_copy | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void LodePNGIText_init(LodePNGInfo *info) {
info->itext_num = 0;
info->itext_keys = 0;
info->itext_langtags = 0;
info->itext_transkeys = 0;
info->itext_strings = 0;
} | static void LodePNGIText_init(LodePNGInfo *info) {
info->itext_num = 0;
info->itext_keys = NULL;
info->itext_langtags = NULL;
info->itext_transkeys = NULL;
info->itext_strings = NULL;
} | LodePNGIText_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void LodePNGText_cleanup(LodePNGInfo *info) {
size_t i;
for (i = 0; i != info->text_num; ++i) {
string_cleanup(&info->text_keys[i]);
string_cleanup(&info->text_strings[i]);
}
lodepng_free(info->text_keys);
lodepng_free(info->text_strings);
} | static void LodePNGText_cleanup(LodePNGInfo *info) {
size_t i;
for (i = 0; i != info->text_num; ++i) {
string_cleanup(&info->text_keys[i]);
string_cleanup(&info->text_strings[i]);
}
lodepng_free(info->text_keys);
lodepng_free(info->text_strings);
} | LodePNGText_cleanup | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int LodePNGText_copy(LodePNGInfo *dest, const LodePNGInfo *source) {
unsigned int error;
size_t i;
dest->text_keys = 0;
dest->text_strings = 0;
dest->text_num = 0;
for (i = 0; i != source->text_num; ++i) {
error =
lodepng_add_text(dest, source->text_keys[i], source->text_strings[i]);
... | static unsigned LodePNGText_copy(LodePNGInfo *dest, const LodePNGInfo *source) {
size_t i = 0;
dest->text_keys = 0;
dest->text_strings = 0;
dest->text_num = 0;
for (i = 0; i != source->text_num; ++i) {
CERROR_TRY_RETURN(
lodepng_add_text(dest, source->text_keys[i], source->text_strings[i]));
}
... | LodePNGText_copy | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void LodePNGText_init(LodePNGInfo *info) {
info->text_num = 0;
info->text_keys = 0;
info->text_strings = 0;
} | static void LodePNGText_init(LodePNGInfo *info) {
info->text_num = 0;
info->text_keys = NULL;
info->text_strings = NULL;
} | LodePNGText_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void LodePNGUnknownChunks_cleanup(LodePNGInfo *info) {
unsigned int i;
for (i = 0; i != 3; ++i)
lodepng_free(info->unknown_chunks_data[i]);
} | static void LodePNGUnknownChunks_cleanup(LodePNGInfo *info) {
unsigned i;
for (i = 0; i != 3; ++i)
lodepng_free(info->unknown_chunks_data[i]);
} | LodePNGUnknownChunks_cleanup | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int LodePNGUnknownChunks_copy(LodePNGInfo *dest,
const LodePNGInfo *src) {
unsigned int i;
size_t j;
LodePNGUnknownChunks_cleanup(dest);
for (i = 0; i != 3; ++i) {
dest->unknown_chunks_size[i] = src->unknown_chunks_size[i];
dest->unknown_chunks_data[i] =
... | static unsigned LodePNGUnknownChunks_copy(LodePNGInfo *dest,
const LodePNGInfo *src) {
unsigned i;
LodePNGUnknownChunks_cleanup(dest);
for (i = 0; i != 3; ++i) {
size_t j;
dest->unknown_chunks_size[i] = src->unknown_chunks_size[i];
dest->unknown_chunks_data[... | LodePNGUnknownChunks_copy | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void LodePNGUnknownChunks_init(LodePNGInfo *info) {
unsigned int i;
unsigned int ia;
for (i = 0; i != 3; ++i)
info->unknown_chunks_data[i] = 0;
for (ia = 0; ia != 3; ++ia)
info->unknown_chunks_size[ia] = 0;
} | static void LodePNGUnknownChunks_init(LodePNGInfo *info) {
unsigned i;
for (i = 0; i != 3; ++i)
info->unknown_chunks_data[i] = 0;
for (i = 0; i != 3; ++i)
info->unknown_chunks_size[i] = 0;
} | LodePNGUnknownChunks_init | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
void LossyOptimizeTransparent(lodepng_State *inputstate, unsigned char *image,
unsigned int w, unsigned int h) {
size_t v4;
std_vector<unsigned char> _reference v5;
short key;
std_set<unsigned int> _key_type __x;
int r;
int g;
int b;
size_t i;
size_t i_0;
size_t i_1;
... | void LossyOptimizeTransparent(lodepng::State *inputstate, unsigned char *image,
unsigned w, unsigned h) {
bool key = true;
for (size_t i = 0; i < w * h; i++) {
if (image[i * 4 + 3] > 0 && image[i * 4 + 3] < 255) {
key = false;
break;
}
}
std::set<unsigned> coun... | LossyOptimizeTransparent | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int TryOptimize(const std_vector<unsigned char> *image, unsigned int w,
unsigned int h, const lodepng_State *inputstate,
bool bit16, bool keep_colortype,
const std_vector<unsigned char> *origfile,
ZopfliPNGFilte... | unsigned TryOptimize(const std::vector<unsigned char> &image, unsigned w,
unsigned h, const lodepng::State &inputstate, bool bit16,
bool keep_colortype,
const std::vector<unsigned char> &origfile,
ZopfliPNGFilterStrategy filterstrategy,... | TryOptimize | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
int ZopfliPNGOptimize(const std_vector<unsigned char> *origpng,
const ZopfliPNGOptions *png_options, bool verbose,
std_vector<unsigned char> *resultpng) {
char v4;
char v5;
bool v6;
const char *v7;
unsigned int v8;
unsigned int v9;
unsigned int v10;
unsigned c... | int ZopfliPNGOptimize(const std::vector<unsigned char> &origpng,
const ZopfliPNGOptions &png_options, bool verbose,
std::vector<unsigned char> *resultpng) {
int windowsize = 32768;
ZopfliPNGFilterStrategy filterstrategies[kNumFilterStrategies] = {
kStrategyZero, ... | ZopfliPNGOptimize | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk(ucvector *out, const char *chunkName,
const unsigned char *data, size_t length) {
unsigned int error;
error = lodepng_chunk_create(&out->data, &out->size, length, chunkName, data);
if (error)
return error;
out->allocsize = out->size;
return 0;
} | static unsigned addChunk(ucvector *out, const char *chunkName,
const unsigned char *data, size_t length) {
CERROR_TRY_RETURN(lodepng_chunk_create(&out->data, &out->size,
(unsigned)length, chunkName, data));
out->allocsize = out->size;
return 0;
} | addChunk | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_IDAT(ucvector *out, const unsigned char *data,
size_t datasize,
LodePNGCompressSettings *zlibsettings) {
unsigned int error;
ucvector zlibdata;
unsigned long v9;
v9 = __readfsqword(0x28u);
ucvector_init(&zlibdata);
error = zlib_com... | static unsigned addChunk_IDAT(ucvector *out, const unsigned char *data,
size_t datasize,
LodePNGCompressSettings *zlibsettings) {
ucvector zlibdata;
unsigned error = 0;
ucvector_init(&zlibdata);
error = zlib_compress(&zlibdata.data, &zlibdata.size, da... | addChunk_IDAT | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_IEND(ucvector *out) {
return addChunk(out, "IEND", 0, 0);
} | static unsigned addChunk_IEND(ucvector *out) {
unsigned error = 0;
error = addChunk(out, "IEND", 0, 0);
return error;
} | addChunk_IEND | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
unsigned int addChunk_IHDR(ucvector *out, unsigned int w, unsigned int h,
LodePNGColorType colortype, unsigned int bitdepth,
unsigned int interlace_method) {
unsigned char interlace_methoda;
unsigned char bitdeptha;
unsigned char colortypea;
unsigned char da... | static unsigned addChunk_IHDR(ucvector *out, unsigned w, unsigned h,
LodePNGColorType colortype, unsigned bitdepth,
unsigned interlace_method) {
unsigned char data[13];
lodepng_set32bitInt(data + 0, w);
lodepng_set32bitInt(data + 4, h);
data[8] = (uns... | addChunk_IHDR | zopfli-1.0.3 | app-arch | O0/app-arch/zopfli-1.0.3/libzopflipng.so.1.0.3 | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.