diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/doc/tcc-doc.html b/.cache/overlay-toolchain/tcc_extract/tcc/doc/tcc-doc.html
new file mode 100644
index 00000000..a15247ed
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/doc/tcc-doc.html
@@ -0,0 +1,1744 @@
+
+
+
+
+Tiny C Compiler Reference Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Tiny C Compiler Reference Documentation
+
+
+
+
+Table of Contents
+
+
+
+
+
+
+
+Tiny C Compiler Reference Documentation
+
+This manual documents version 0.9.27 of the Tiny C Compiler.
+
+
+
+
+
+
+
+
+1 Introduction
+
+TinyCC (aka TCC) is a small but hyper fast C compiler. Unlike other C
+compilers, it is meant to be self-relying: you do not need an
+external assembler or linker because TCC does that for you.
+
+TCC compiles so fast that even for big projects Makefiles may
+not be necessary.
+
+TCC not only supports ANSI C, but also most of the new ISO C99
+standard and many GNUC extensions including inline assembly.
+
+TCC can also be used to make C scripts , i.e. pieces of C source
+that you run as a Perl or Python script. Compilation is so fast that
+your script will be as fast as if it was an executable.
+
+TCC can also automatically generate memory and bound checks
+(see Bounds ) while allowing all C pointers operations. TCC can do
+these checks even if non patched libraries are used.
+
+With libtcc, you can use TCC as a backend for dynamic code
+generation (see Libtcc ).
+
+TCC mainly supports the i386 target on Linux and Windows. There are alpha
+ports for the ARM (arm-tcc) and the TMS320C67xx targets
+(c67-tcc). More information about the ARM port is available at
+http://lists.gnu.org/archive/html/tinycc-devel/2003-10/msg00044.html .
+
+For usage on Windows, see also tcc-win32.txt .
+
+
+
+
+
+2 Command line invocation
+
+
+2.1 Quick start
+
+
+
usage: tcc [options] [infile1 infile2 …] [-run infile args …]
+
+
+TCC options are a very much like gcc options. The main difference is that TCC
+can also execute directly the resulting program and give it runtime
+arguments.
+
+Here are some examples to understand the logic:
+
+
+‘tcc -run a.c ’
+Compile a.c and execute it directly
+
+
+‘tcc -run a.c arg1 ’
+Compile a.c and execute it directly. arg1 is given as first argument to
+the main() of a.c.
+
+
+‘tcc a.c -run b.c arg1 ’
+Compile a.c and b.c , link them together and execute them. arg1 is given
+as first argument to the main() of the resulting program.
+
+
+‘tcc -o myprog a.c b.c ’
+Compile a.c and b.c , link them and generate the executable myprog .
+
+
+‘tcc -o myprog a.o b.o ’
+link a.o and b.o together and generate the executable myprog .
+
+
+‘tcc -c a.c ’
+Compile a.c and generate object file a.o .
+
+
+‘tcc -c asmfile.S ’
+Preprocess with C preprocess and assemble asmfile.S and generate
+object file asmfile.o .
+
+
+‘tcc -c asmfile.s ’
+Assemble (but not preprocess) asmfile.s and generate object file
+asmfile.o .
+
+
+‘tcc -r -o ab.o a.c b.c ’
+Compile a.c and b.c , link them together and generate the object file ab.o .
+
+
+
+
+Scripting:
+
+TCC can be invoked from scripts , just as shell scripts. You just
+need to add #!/usr/local/bin/tcc -run at the start of your C source:
+
+
+
#!/usr/local/bin/tcc -run
+#include <stdio.h>
+
+int main()
+{
+ printf("Hello World\n");
+ return 0;
+}
+
+
+TCC can read C source code from standard input when - is used in
+place of infile . Example:
+
+
+
echo 'main(){puts("hello");}' | tcc -run -
+
+
+
+2.2 Option summary
+
+General Options:
+
+
+-c
+Generate an object file.
+
+
+-o outfile
+Put object file, executable, or dll into output file outfile .
+
+
+-run source [args...]
+Compile file source and run it with the command line arguments
+args . In order to be able to give more than one argument to a
+script, several TCC options can be given after the
+-run option, separated by spaces:
+
+
tcc "-run -L/usr/X11R6/lib -lX11" ex4.c
+
+In a script, it gives the following header:
+
+
#!/usr/local/bin/tcc -run -L/usr/X11R6/lib -lX11
+
+
+
+-v
+Display TCC version.
+
+
+-vv
+Show included files. As sole argument, print search dirs. -vvv shows tries too.
+
+
+-bench
+Display compilation statistics.
+
+
+
+
+Preprocessor options:
+
+
+-Idir
+Specify an additional include path. Include paths are searched in the
+order they are specified.
+
+System include paths are always searched after. The default system
+include paths are: /usr/local/include , /usr/include
+and PREFIX/lib/tcc/include . (PREFIX is usually
+/usr or /usr/local ).
+
+
+-Dsym[=val]
+Define preprocessor symbol ‘sym ’ to
+val. If val is not present, its value is ‘1 ’. Function-like macros can
+also be defined: -DF(a)=a+1
+
+
+-Usym
+Undefine preprocessor symbol ‘sym ’.
+
+
+-E
+Preprocess only, to stdout or file (with -o).
+
+
+
+
+Compilation flags:
+
+Note: each of the following options has a negative form beginning with
+-fno- .
+
+
+-funsigned-char
+Let the char type be unsigned.
+
+
+-fsigned-char
+Let the char type be signed.
+
+
+-fno-common
+Do not generate common symbols for uninitialized data.
+
+
+-fleading-underscore
+Add a leading underscore at the beginning of each C symbol.
+
+
+-fms-extensions
+Allow a MS C compiler extensions to the language. Currently this
+assumes a nested named structure declaration without an identifier
+behaves like an unnamed one.
+
+
+-fdollars-in-identifiers
+Allow dollar signs in identifiers
+
+
+
+
+Warning options:
+
+
+-w
+Disable all warnings.
+
+
+
+
+Note: each of the following warning options has a negative form beginning with
+-Wno- .
+
+
+-Wimplicit-function-declaration
+Warn about implicit function declaration.
+
+
+-Wunsupported
+Warn about unsupported GCC features that are ignored by TCC.
+
+
+-Wwrite-strings
+Make string constants be of type const char * instead of char
+*.
+
+
+-Werror
+Abort compilation if warnings are issued.
+
+
+-Wall
+Activate all warnings, except -Werror , -Wunusupported and
+-Wwrite-strings .
+
+
+
+
+Linker options:
+
+
+-Ldir
+Specify an additional static library path for the -l option. The
+default library paths are /usr/local/lib , /usr/lib and /lib .
+
+
+-lxxx
+Link your program with dynamic library libxxx.so or static library
+libxxx.a. The library is searched in the paths specified by the
+-L option and LIBRARY_PATH variable.
+
+
+-Bdir
+Set the path where the tcc internal libraries (and include files) can be
+found (default is PREFIX/lib/tcc ).
+
+
+-shared
+Generate a shared library instead of an executable.
+
+
+-soname name
+set name for shared library to be used at runtime
+
+
+-static
+Generate a statically linked executable (default is a shared linked
+executable).
+
+
+-rdynamic
+Export global symbols to the dynamic linker. It is useful when a library
+opened with dlopen() needs to access executable symbols.
+
+
+-r
+Generate an object file combining all input files.
+
+
+-Wl,-rpath=path
+Put custom search path for dynamic libraries into executable.
+
+
+-Wl,--enable-new-dtags
+When putting a custom search path for dynamic libraries into the executable,
+create the new ELF dynamic tag DT_RUNPATH instead of the old legacy DT_RPATH.
+
+
+-Wl,--oformat=fmt
+Use fmt as output format. The supported output formats are:
+
+elf32-i386
+ELF output format (default)
+
+binary
+Binary image (only for executable output)
+
+coff
+COFF output format (only for executable output for TMS320C67xx target)
+
+
+
+
+-Wl,-subsystem=console/gui/wince/...
+Set type for PE (Windows) executables.
+
+
+-Wl,-[Ttext=# | section-alignment=# | file-alignment=# | image-base=# | stack=#]
+Modify executable layout.
+
+
+-Wl,-Bsymbolic
+Set DT_SYMBOLIC tag.
+
+
+-Wl,-(no-)whole-archive
+Turn on/off linking of all objects in archives.
+
+
+
+
+Debugger options:
+
+
+-g
+Generate run time debug information so that you get clear run time
+error messages: test.c:68: in function 'test5()': dereferencing
+invalid pointer instead of the laconic Segmentation
+fault.
+
+
+-b
+Generate additional support code to check
+memory allocations and array/pointer bounds. -g is implied. Note
+that the generated code is slower and bigger in this case.
+
+Note: -b is only available on i386 when using libtcc for the moment.
+
+
+-bt N
+Display N callers in stack traces. This is useful with -g or
+-b .
+
+
+
+
+Misc options:
+
+
+-MD
+Generate makefile fragment with dependencies.
+
+
+-MF depfile
+Use depfile as output for -MD.
+
+
+-print-search-dirs
+Print the configured installation directory and a list of library
+and include directories tcc will search.
+
+
+-dumpversion
+Print version.
+
+
+
+
+Target specific options:
+
+
+-mms-bitfields
+Use an algorithm for bitfield alignment consistent with MSVC. Default is
+gcc’s algorithm.
+
+
+-mfloat-abi (ARM only)
+Select the float ABI. Possible values: softfp and hard
+
+
+-mno-sse
+Do not use sse registers on x86_64
+
+
+-m32, -m64
+Pass command line to the i386/x86_64 cross compiler.
+
+
+
+
+Note: GCC options -Ox , -fx and -mx are
+ignored.
+
+Environment variables that affect how tcc operates.
+
+
+CPATH
+C_INCLUDE_PATH
+A colon-separated list of directories searched for include files,
+directories given with -I are searched first.
+
+
+LIBRARY_PATH
+A colon-separated list of directories searched for libraries for the
+-l option, directories given with -L are searched first.
+
+
+
+
+
+
+
+
+
+
+3 C language support
+
+
+3.1 ANSI C
+
+TCC implements all the ANSI C standard, including structure bit fields
+and floating point numbers (long double, double, and
+float fully supported).
+
+
+3.2 ISOC99 extensions
+
+TCC implements many features of the new C standard: ISO C99. Currently
+missing items are: complex and imaginary numbers.
+
+Currently implemented ISOC99 features:
+
+
+
+
+3.3 GNU C extensions
+
+TCC implements some GNU C extensions:
+
+
+ array designators can be used without ’=’:
+
+
int a[10] = { [0] 1, [5] 2, 3, 4 };
+
+
+ Structure field designators can be a label:
+
+
struct { int x, y; } st = { x: 1, y: 1};
+
+instead of
+
+
struct { int x, y; } st = { .x = 1, .y = 1};
+
+
+ \e is ASCII character 27.
+
+ case ranges : ranges can be used in cases:
+
+
switch(a) {
+ case 1 … 9:
+ printf("range 1 to 9\n");
+ break;
+ default:
+ printf("unexpected\n");
+ break;
+ }
+
+
+
+
+
+
+
+
+
+
+
+ The keyword __attribute__ is handled to specify variable or
+function attributes. The following attributes are supported:
+
+ aligned(n): align a variable or a structure field to n bytes
+(must be a power of two).
+
+ packed: force alignment of a variable or a structure field to
+ 1.
+
+ section(name): generate function or data in assembly section
+name (name is a string containing the section name) instead of the default
+section.
+
+ unused: specify that the variable or the function is unused.
+
+ cdecl: use standard C calling convention (default).
+
+ stdcall: use Pascal-like calling convention.
+
+ regparm(n): use fast i386 calling convention. n must be
+between 1 and 3. The first n function parameters are respectively put in
+registers %eax, %edx and %ecx.
+
+ dllexport: export function from dll/executable (win32 only)
+
+
+
+Here are some examples:
+
+
int a __attribute__ ((aligned(8), section(".mysection")));
+
+
+align variable a to 8 bytes and put it in section .mysection.
+
+
+
int my_add(int a, int b) __attribute__ ((section(".mycodesection")))
+ {
+ return a + b;
+ }
+
+
+generate function my_add in section .mycodesection.
+
+ GNU style variadic macros:
+
+
#define dprintf(fmt, args…) printf(fmt, ## args)
+
+ dprintf("no arg\n");
+ dprintf("one arg %d\n", 1);
+
+
+ __FUNCTION__ is interpreted as C99 __func__
+(so it has not exactly the same semantics as string literal GNUC
+where it is a string literal).
+
+ The __alignof__ keyword can be used as sizeof
+to get the alignment of a type or an expression.
+
+ The typeof(x) returns the type of x.
+x is an expression or a type.
+
+ Computed gotos: &&label returns a pointer of type
+void * on the goto label label. goto *expr can be
+used to jump on the pointer resulting from expr.
+
+ Inline assembly with asm instruction:
+
+
+
+
+
static inline void * my_memcpy(void * to, const void * from, size_t n)
+{
+int d0, d1, d2;
+__asm__ __volatile__(
+ "rep ; movsl\n\t"
+ "testb $2,%b4\n\t"
+ "je 1f\n\t"
+ "movsw\n"
+ "1:\ttestb $1,%b4\n\t"
+ "je 2f\n\t"
+ "movsb\n"
+ "2:"
+ : "=&c" (d0), "=&D" (d1), "=&S" (d2)
+ :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from)
+ : "memory");
+return (to);
+}
+
+
+
+TCC includes its own x86 inline assembler with a gas-like (GNU
+assembler) syntax. No intermediate files are generated. GCC 3.x named
+operands are supported.
+
+ __builtin_types_compatible_p() and __builtin_constant_p()
+are supported.
+
+ #pragma pack is supported for win32 compatibility.
+
+
+
+
+3.4 TinyCC extensions
+
+
+ __TINYC__ is a predefined macro to indicate that you use TCC.
+
+ #! at the start of a line is ignored to allow scripting.
+
+ Binary digits can be entered (0b101 instead of
+5).
+
+ __BOUNDS_CHECKING_ON is defined if bound checking is activated.
+
+
+
+
+
+
+
+4 TinyCC Assembler
+
+Since version 0.9.16, TinyCC integrates its own assembler. TinyCC
+assembler supports a gas-like syntax (GNU assembler). You can
+deactivate assembler support if you want a smaller TinyCC executable
+(the C compiler does not rely on the assembler).
+
+TinyCC Assembler is used to handle files with .S (C
+preprocessed assembler) and .s extensions. It is also used to
+handle the GNU inline assembler with the asm keyword.
+
+
+4.1 Syntax
+
+TinyCC Assembler supports most of the gas syntax. The tokens are the
+same as C.
+
+
+ C and C++ comments are supported.
+
+ Identifiers are the same as C, so you cannot use ’.’ or ’$’.
+
+ Only 32 bit integer numbers are supported.
+
+
+
+
+4.2 Expressions
+
+
+ Integers in decimal, octal and hexa are supported.
+
+ Unary operators: +, -, ~.
+
+ Binary operators in decreasing priority order:
+
+
+ *, /, %
+ &, |, ^
+ +, -
+
+
+ A value is either an absolute number or a label plus an offset.
+All operators accept absolute values except ’+’ and ’-’. ’+’ or ’-’ can be
+used to add an offset to a label. ’-’ supports two labels only if they
+are the same or if they are both defined and in the same section.
+
+
+
+
+4.3 Labels
+
+
+ All labels are considered as local, except undefined ones.
+
+ Numeric labels can be used as local gas-like labels.
+They can be defined several times in the same source. Use ’b’
+(backward) or ’f’ (forward) as suffix to reference them:
+
+
+
1:
+ jmp 1b /* jump to '1' label before */
+ jmp 1f /* jump to '1' label after */
+ 1:
+
+
+
+
+
+4.4 Directives
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+All directives are preceded by a ’.’. The following directives are
+supported:
+
+
+ .align n[,value]
+ .skip n[,value]
+ .space n[,value]
+ .byte value1[,...]
+ .word value1[,...]
+ .short value1[,...]
+ .int value1[,...]
+ .long value1[,...]
+ .quad immediate_value1[,...]
+ .globl symbol
+ .global symbol
+ .section section
+ .text
+ .data
+ .bss
+ .fill repeat[,size[,value]]
+ .org n
+ .previous
+ .string string[,...]
+ .asciz string[,...]
+ .ascii string[,...]
+
+
+
+4.5 X86 Assembler
+
+
+All X86 opcodes are supported. Only ATT syntax is supported (source
+then destination operand order). If no size suffix is given, TinyCC
+tries to guess it from the operand sizes.
+
+Currently, MMX opcodes are supported but not SSE ones.
+
+
+
+
+
+5 TinyCC Linker
+
+
+
+5.1 ELF file generation
+
+
+TCC can directly output relocatable ELF files (object files),
+executable ELF files and dynamic ELF libraries without relying on an
+external linker.
+
+Dynamic ELF libraries can be output but the C compiler does not generate
+position independent code (PIC). It means that the dynamic library
+code generated by TCC cannot be factorized among processes yet.
+
+TCC linker eliminates unreferenced object code in libraries. A single pass is
+done on the object and library list, so the order in which object files and
+libraries are specified is important (same constraint as GNU ld). No grouping
+options (--start-group and --end-group ) are supported.
+
+
+5.2 ELF file loader
+
+TCC can load ELF object files, archives (.a files) and dynamic
+libraries (.so).
+
+
+5.3 PE-i386 file generation
+
+
+TCC for Windows supports the native Win32 executable file format (PE-i386). It
+generates EXE files (console and gui) and DLL files.
+
+For usage on Windows, see also tcc-win32.txt.
+
+
+5.4 GNU Linker Scripts
+
+
+
+
+
+
+
+Because on many Linux systems some dynamic libraries (such as
+/usr/lib/libc.so ) are in fact GNU ld link scripts (horrible!),
+the TCC linker also supports a subset of GNU ld scripts.
+
+The GROUP and FILE commands are supported. OUTPUT_FORMAT
+and TARGET are ignored.
+
+Example from /usr/lib/libc.so :
+
+
/* GNU ld script
+ Use the shared library, but some functions are only in
+ the static library, so try that secondarily. */
+GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )
+
+
+
+
+
+
+6 TinyCC Memory and Bound checks
+
+
+
+This feature is activated with the -b (see Invoke ).
+
+Note that pointer size is unchanged and that code generated
+with bound checks is fully compatible with unchecked
+code. When a pointer comes from unchecked code, it is assumed to be
+valid. Even very obscure C code with casts should work correctly.
+
+For more information about the ideas behind this method, see
+http://www.doc.ic.ac.uk/~phjk/BoundsChecking.html .
+
+Here are some examples of caught errors:
+
+
+Invalid range with standard string function:
+
+
{
+ char tab[10];
+ memset(tab, 0, 11);
+}
+
+
+
+Out of bounds-error in global or local arrays:
+
+
{
+ int tab[10];
+ for(i=0;i<11;i++) {
+ sum += tab[i];
+ }
+}
+
+
+
+Out of bounds-error in malloc’ed data:
+
+
{
+ int *tab;
+ tab = malloc(20 * sizeof(int));
+ for(i=0;i<21;i++) {
+ sum += tab4[i];
+ }
+ free(tab);
+}
+
+
+
+Access of freed memory:
+
+
{
+ int *tab;
+ tab = malloc(20 * sizeof(int));
+ free(tab);
+ for(i=0;i<20;i++) {
+ sum += tab4[i];
+ }
+}
+
+
+
+Double free:
+
+
{
+ int *tab;
+ tab = malloc(20 * sizeof(int));
+ free(tab);
+ free(tab);
+}
+
+
+
+
+
+
+
+
+
+7 The libtcc library
+
+The libtcc library enables you to use TCC as a backend for
+dynamic code generation.
+
+Read the libtcc.h to have an overview of the API. Read
+libtcc_test.c to have a very simple example.
+
+The idea consists in giving a C string containing the program you want
+to compile directly to libtcc. Then you can access to any global
+symbol (function or variable) defined.
+
+
+
+
+
+8 Developer’s guide
+
+This chapter gives some hints to understand how TCC works. You can skip
+it if you do not intend to modify the TCC code.
+
+
+8.1 File reading
+
+The BufferedFile structure contains the context needed to read a
+file, including the current line number. tcc_open() opens a new
+file and tcc_close() closes it. inp() returns the next
+character.
+
+
+8.2 Lexer
+
+next() reads the next token in the current
+file. next_nomacro() reads the next token without macro
+expansion.
+
+tok contains the current token (see TOK_xxx)
+constants. Identifiers and keywords are also keywords. tokc
+contains additional infos about the token (for example a constant value
+if number or string token).
+
+
+8.3 Parser
+
+The parser is hardcoded (yacc is not necessary). It does only one pass,
+except:
+
+
+ For initialized arrays with unknown size, a first pass
+is done to count the number of elements.
+
+ For architectures where arguments are evaluated in
+reverse order, a first pass is done to reverse the argument order.
+
+
+
+
+8.4 Types
+
+The types are stored in a single ’int’ variable. It was chosen in the
+first stages of development when tcc was much simpler. Now, it may not
+be the best solution.
+
+
+
#define VT_INT 0 /* integer type */
+#define VT_BYTE 1 /* signed byte type */
+#define VT_SHORT 2 /* short type */
+#define VT_VOID 3 /* void type */
+#define VT_PTR 4 /* pointer */
+#define VT_ENUM 5 /* enum definition */
+#define VT_FUNC 6 /* function type */
+#define VT_STRUCT 7 /* struct/union definition */
+#define VT_FLOAT 8 /* IEEE float */
+#define VT_DOUBLE 9 /* IEEE double */
+#define VT_LDOUBLE 10 /* IEEE long double */
+#define VT_BOOL 11 /* ISOC99 boolean type */
+#define VT_LLONG 12 /* 64 bit integer */
+#define VT_LONG 13 /* long integer (NEVER USED as type, only
+ during parsing) */
+#define VT_BTYPE 0x000f /* mask for basic type */
+#define VT_UNSIGNED 0x0010 /* unsigned type */
+#define VT_ARRAY 0x0020 /* array type (also has VT_PTR) */
+#define VT_VLA 0x20000 /* VLA type (also has VT_PTR and VT_ARRAY) */
+#define VT_BITFIELD 0x0040 /* bitfield modifier */
+#define VT_CONSTANT 0x0800 /* const modifier */
+#define VT_VOLATILE 0x1000 /* volatile modifier */
+#define VT_DEFSIGN 0x2000 /* signed type */
+
+#define VT_STRUCT_SHIFT 18 /* structure/enum name shift (14 bits left) */
+
+
+When a reference to another type is needed (for pointers, functions and
+structures), the 32 - VT_STRUCT_SHIFT high order bits are used to
+store an identifier reference.
+
+The VT_UNSIGNED flag can be set for chars, shorts, ints and long
+longs.
+
+Arrays are considered as pointers VT_PTR with the flag
+VT_ARRAY set. Variable length arrays are considered as special
+arrays and have flag VT_VLA set instead of VT_ARRAY.
+
+The VT_BITFIELD flag can be set for chars, shorts, ints and long
+longs. If it is set, then the bitfield position is stored from bits
+VT_STRUCT_SHIFT to VT_STRUCT_SHIFT + 5 and the bit field size is stored
+from bits VT_STRUCT_SHIFT + 6 to VT_STRUCT_SHIFT + 11.
+
+VT_LONG is never used except during parsing.
+
+During parsing, the storage of an object is also stored in the type
+integer:
+
+
+
#define VT_EXTERN 0x00000080 /* extern definition */
+#define VT_STATIC 0x00000100 /* static variable */
+#define VT_TYPEDEF 0x00000200 /* typedef definition */
+#define VT_INLINE 0x00000400 /* inline definition */
+#define VT_IMPORT 0x00004000 /* win32: extern data imported from dll */
+#define VT_EXPORT 0x00008000 /* win32: data exported from dll */
+#define VT_WEAK 0x00010000 /* win32: data exported from dll */
+
+
+
+8.5 Symbols
+
+All symbols are stored in hashed symbol stacks. Each symbol stack
+contains Sym structures.
+
+Sym.v contains the symbol name (remember
+an identifier is also a token, so a string is never necessary to store
+it). Sym.t gives the type of the symbol. Sym.r is usually
+the register in which the corresponding variable is stored. Sym.c is
+usually a constant associated to the symbol like its address for normal
+symbols, and the number of entries for symbols representing arrays.
+Variable length array types use Sym.c as a location on the stack
+which holds the runtime sizeof for the type.
+
+Four main symbol stacks are defined:
+
+
+define_stack
+for the macros (#defines).
+
+
+global_stack
+for the global variables, functions and types.
+
+
+local_stack
+for the local variables, functions and types.
+
+
+global_label_stack
+for the local labels (for goto).
+
+
+label_stack
+for GCC block local labels (see the __label__ keyword).
+
+
+
+
+sym_push() is used to add a new symbol in the local symbol
+stack. If no local symbol stack is active, it is added in the global
+symbol stack.
+
+sym_pop(st,b) pops symbols from the symbol stack st until
+the symbol b is on the top of stack. If b is NULL, the stack
+is emptied.
+
+sym_find(v) return the symbol associated to the identifier
+v . The local stack is searched first from top to bottom, then the
+global stack.
+
+
+8.6 Sections
+
+The generated code and data are written in sections. The structure
+Section contains all the necessary information for a given
+section. new_section() creates a new section. ELF file semantics
+is assumed for each section.
+
+The following sections are predefined:
+
+
+text_section
+is the section containing the generated code. ind contains the
+current position in the code section.
+
+
+data_section
+contains initialized data
+
+
+bss_section
+contains uninitialized data
+
+
+bounds_section
+lbounds_section
+are used when bound checking is activated
+
+
+stab_section
+stabstr_section
+are used when debugging is active to store debug information
+
+
+symtab_section
+strtab_section
+contain the exported symbols (currently only used for debugging).
+
+
+
+
+
+8.7 Code generation
+
+
+
+8.7.1 Introduction
+
+The TCC code generator directly generates linked binary code in one
+pass. It is rather unusual these days (see gcc for example which
+generates text assembly), but it can be very fast and surprisingly
+little complicated.
+
+The TCC code generator is register based. Optimization is only done at
+the expression level. No intermediate representation of expression is
+kept except the current values stored in the value stack .
+
+On x86, three temporary registers are used. When more registers are
+needed, one register is spilled into a new temporary variable on the stack.
+
+
+8.7.2 The value stack
+
+
+When an expression is parsed, its value is pushed on the value stack
+(vstack ). The top of the value stack is vtop . Each value
+stack entry is the structure SValue.
+
+SValue.t is the type. SValue.r indicates how the value is
+currently stored in the generated code. It is usually a CPU register
+index (REG_xxx constants), but additional values and flags are
+defined:
+
+
+
#define VT_CONST 0x00f0
+#define VT_LLOCAL 0x00f1
+#define VT_LOCAL 0x00f2
+#define VT_CMP 0x00f3
+#define VT_JMP 0x00f4
+#define VT_JMPI 0x00f5
+#define VT_LVAL 0x0100
+#define VT_SYM 0x0200
+#define VT_MUSTCAST 0x0400
+#define VT_MUSTBOUND 0x0800
+#define VT_BOUNDED 0x8000
+#define VT_LVAL_BYTE 0x1000
+#define VT_LVAL_SHORT 0x2000
+#define VT_LVAL_UNSIGNED 0x4000
+#define VT_LVAL_TYPE (VT_LVAL_BYTE | VT_LVAL_SHORT | VT_LVAL_UNSIGNED)
+
+
+
+VT_CONST
+indicates that the value is a constant. It is stored in the union
+SValue.c, depending on its type.
+
+
+VT_LOCAL
+indicates a local variable pointer at offset SValue.c.i in the
+stack.
+
+
+VT_CMP
+indicates that the value is actually stored in the CPU flags (i.e. the
+value is the consequence of a test). The value is either 0 or 1. The
+actual CPU flags used is indicated in SValue.c.i.
+
+If any code is generated which destroys the CPU flags, this value MUST be
+put in a normal register.
+
+
+VT_JMP
+VT_JMPI
+indicates that the value is the consequence of a conditional jump. For VT_JMP,
+it is 1 if the jump is taken, 0 otherwise. For VT_JMPI it is inverted.
+
+These values are used to compile the || and && logical
+operators.
+
+If any code is generated, this value MUST be put in a normal
+register. Otherwise, the generated code won’t be executed if the jump is
+taken.
+
+
+VT_LVAL
+is a flag indicating that the value is actually an lvalue (left value of
+an assignment). It means that the value stored is actually a pointer to
+the wanted value.
+
+Understanding the use VT_LVAL is very important if you want to
+understand how TCC works.
+
+
+VT_LVAL_BYTE
+VT_LVAL_SHORT
+VT_LVAL_UNSIGNED
+if the lvalue has an integer type, then these flags give its real
+type. The type alone is not enough in case of cast optimisations.
+
+
+VT_LLOCAL
+is a saved lvalue on the stack. VT_LVAL must also be set with
+VT_LLOCAL. VT_LLOCAL can arise when a VT_LVAL in
+a register has to be saved to the stack, or it can come from an
+architecture-specific calling convention.
+
+
+VT_MUSTCAST
+indicates that a cast to the value type must be performed if the value
+is used (lazy casting).
+
+
+VT_SYM
+indicates that the symbol SValue.sym must be added to the constant.
+
+
+VT_MUSTBOUND
+VT_BOUNDED
+are only used for optional bound checking.
+
+
+
+
+
+8.7.3 Manipulating the value stack
+
+
+vsetc() and vset() pushes a new value on the value
+stack. If the previous vtop was stored in a very unsafe place(for
+example in the CPU flags), then some code is generated to put the
+previous vtop in a safe storage.
+
+vpop() pops vtop . In some cases, it also generates cleanup
+code (for example if stacked floating point registers are used as on
+x86).
+
+The gv(rc) function generates code to evaluate vtop (the
+top value of the stack) into registers. rc selects in which
+register class the value should be put. gv() is the most
+important function of the code generator.
+
+gv2() is the same as gv() but for the top two stack
+entries.
+
+
+8.7.4 CPU dependent code generation
+
+See the i386-gen.c file to have an example.
+
+
+load()
+must generate the code needed to load a stack value into a register.
+
+
+store()
+must generate the code needed to store a register into a stack value
+lvalue.
+
+
+gfunc_start()
+gfunc_param()
+gfunc_call()
+should generate a function call
+
+
+gfunc_prolog()
+gfunc_epilog()
+should generate a function prolog/epilog.
+
+
+gen_opi(op)
+must generate the binary integer operation op on the two top
+entries of the stack which are guaranteed to contain integer types.
+
+The result value should be put on the stack.
+
+
+gen_opf(op)
+same as gen_opi() for floating point operations. The two top
+entries of the stack are guaranteed to contain floating point values of
+same types.
+
+
+gen_cvt_itof()
+integer to floating point conversion.
+
+
+gen_cvt_ftoi()
+floating point to integer conversion.
+
+
+gen_cvt_ftof()
+floating point to floating point of different size conversion.
+
+
+gen_bounded_ptr_add()
+gen_bounded_ptr_deref()
+are only used for bounds checking.
+
+
+
+
+
+8.8 Optimizations done
+
+
+
+
+
+
+
+Constant propagation is done for all operations. Multiplications and
+divisions are optimized to shifts when appropriate. Comparison
+operators are optimized by maintaining a special cache for the
+processor flags. &&, || and ! are optimized by maintaining a special
+’jump target’ value. No other jump optimization is currently performed
+because it would require to store the code in a more abstract fashion.
+
+
+Concept Index
+Jump to: _
+
+
+A
+
+B
+
+C
+
+D
+
+E
+
+F
+
+G
+
+I
+
+J
+
+L
+
+M
+
+O
+
+P
+
+Q
+
+R
+
+S
+
+T
+
+U
+
+V
+
+W
+
+
+
+Jump to: _
+
+
+A
+
+B
+
+C
+
+D
+
+E
+
+F
+
+G
+
+I
+
+J
+
+L
+
+M
+
+O
+
+P
+
+Q
+
+R
+
+S
+
+T
+
+U
+
+V
+
+W
+
+
+
+
+
+
+
+
+
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/doc/tcc-win32.txt b/.cache/overlay-toolchain/tcc_extract/tcc/doc/tcc-win32.txt
new file mode 100644
index 00000000..ab730073
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/doc/tcc-win32.txt
@@ -0,0 +1,168 @@
+
+ TinyCC
+ ======
+
+ This file contains specific information for usage of TinyCC
+ under MS-Windows. See tcc-doc.html to have all the features.
+
+
+ Installation from the binary ZIP package:
+ -----------------------------------------
+ Unzip the package to a directory of your choice.
+
+
+ Set the system PATH:
+ --------------------
+ To be able to invoke the compiler from everywhere on your computer by
+ just typing "tcc", please add the directory containing tcc.exe to your
+ system PATH.
+
+
+ Include and library search paths
+ --------------------------------
+ On windows, the standard "include" and "lib" directories are searched
+ relatively from the location of the executables (tcc.exe, libtcc.dll).
+
+
+ Examples:
+ ---------
+ Open a console window (DOS box) and 'cd' to the examples directory.
+
+ For the 'Fibonacci' example type:
+
+ tcc fib.c
+
+ For the 'Hello Windows' GUI example type:
+
+ tcc hello_win.c
+
+ For the 'Hello DLL' example type
+
+ tcc -shared dll.c
+ tcc -impdef dll.dll (optional)
+ tcc hello_dll.c dll.def
+
+
+ Using libtcc as JIT compiler in your program
+ --------------------------------------------
+ Check out the 'libtcc_test' example:
+
+ - Running it from source:
+ tcc -I libtcc libtcc/libtcc.def -run examples/libtcc_test.c
+
+ - Compiling with TCC:
+ tcc examples/libtcc_test.c -I libtcc libtcc/libtcc.def
+
+ - Compiling with MinGW:
+ gcc examples/libtcc_test.c -I libtcc libtcc.dll -o libtcc_test.exe
+
+ - Compiling with MSVC:
+ lib /def:libtcc\libtcc.def /out:libtcc.lib
+ cl /MD examples/libtcc_test.c -I libtcc libtcc.lib
+
+
+ Import Definition Files:
+ ------------------------
+ To link with Windows system DLLs, TCC uses import definition
+ files (.def) instead of libraries.
+
+ The now built-in 'tiny_impdef' program may be used to make
+ additional .def files for any DLL. For example
+
+ tcc -impdef [-v] opengl32.dll [-o opengl32.def]
+
+ Put opengl32.def into the tcc/lib directory. Specify -lopengl32 at
+ the TCC commandline to link a program that uses opengl32.dll.
+
+
+ Header Files:
+ -------------
+ The system header files (except _mingw.h) are from the MinGW
+ distribution:
+
+ http://www.mingw.org/
+
+ From the windows headers, only a minimal set is included. If you need
+ more, get MinGW's "w32api" package. Extract the files from "include"
+ into your "tcc/include/winapi" directory.
+
+
+ Resource Files:
+ ---------------
+ TCC can link windows resources in coff format as generated by MinGW's
+ windres.exe. For example:
+
+ windres -O coff app.rc -o appres.o
+ tcc app.c appres.o -o app.exe
+
+
+ Tiny Libmaker:
+ --------------
+ The now built-in tiny_libmaker tool by Timovj Lahde can be used as
+ 'ar' replacement to make a library from several object files:
+
+ tcc -ar [rcsv] library objectfiles ...
+
+
+ Compilation from source:
+ ------------------------
+ * You can use the MinGW and MSYS tools available at
+ http://www.mingw.org
+ http://www.mingw-w64.org
+ http://www.msys2.org
+
+ Untar the TCC archive and type in the MSYS shell:
+ ./configure [--prefix installpath]
+ make
+ make install
+
+ The default install location is c:\Program Files\tcc
+
+ Cygwin can be used too with its mingw cross-compiler installed:
+ ./configure --cross-prefix=i686-w64-mingw32-
+ (the prefix may vary)
+
+ * Alternatively you can compile TCC with just GCC from MinGW using
+ > build-tcc.bat (from the win32 directory)
+
+ Also MSVC can be used with the "VSTools Developer Command Prompt":
+ > build-tcc.bat -c cl
+
+ or with an existing tcc (needs to be in a different directory)
+ > build-tcc.bat -c some-tcc-dir\tcc.exe
+
+ Also you can copy/install everything into another directory:
+ > build-tcc.bat -i
+
+ Limitations:
+ ------------
+ - On the object file level, currently TCC supports only the ELF format,
+ not COFF as used by MinGW and MSVC. It is not possible to exchange
+ object files or libraries between TCC and these compilers.
+
+ However libraries for TCC from objects by TCC can be made using
+ tcc -ar lib.a files.o ,,,
+
+ - No leading underscore is generated in the ELF symbols.
+
+ Documentation and License:
+ --------------------------
+ TCC is distributed under the GNU Lesser General Public License. (See
+ COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
+
+ TinyCC homepage is at:
+
+ http://fabrice.bellard.free.fr/tcc/
+
+
+ WinAPI Help and 3rd-party tools:
+ --------------------------------
+ The Windows API documentation (Win95) in a single .hlp file is
+ available on the lcc-win32 site as "win32hlp.exe" or from other
+ locations as "win32hlp_big.zip".
+
+ A nice RAD tool to create windows resources (dialog boxes etc.) is
+ "ResEd", available at the RadASM website.
+
+
+ --- grischka
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/examples/dll.c b/.cache/overlay-toolchain/tcc_extract/tcc/examples/dll.c
new file mode 100644
index 00000000..052a0564
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/examples/dll.c
@@ -0,0 +1,13 @@
+//+---------------------------------------------------------------------------
+//
+// dll.c - Windows DLL example - dynamically linked part
+//
+
+#include
+
+__declspec(dllexport) const char *hello_data = "(not set)";
+
+__declspec(dllexport) void hello_func (void)
+{
+ MessageBox (0, hello_data, "From DLL", MB_ICONINFORMATION);
+}
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/examples/fib.c b/.cache/overlay-toolchain/tcc_extract/tcc/examples/fib.c
new file mode 100644
index 00000000..8da26bce
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/examples/fib.c
@@ -0,0 +1,24 @@
+#include
+#include // atoi()
+
+int fib(n)
+{
+ if (n <= 2)
+ return 1;
+ else
+ return fib(n-1) + fib(n-2);
+}
+
+int main(int argc, char **argv)
+{
+ int n;
+ if (argc < 2) {
+ printf("usage: fib n\n"
+ "Compute nth Fibonacci number\n");
+ return 1;
+ }
+
+ n = atoi(argv[1]);
+ printf("fib(%d) = %d\n", n, fib(n));
+ return 0;
+}
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/examples/hello_dll.c b/.cache/overlay-toolchain/tcc_extract/tcc/examples/hello_dll.c
new file mode 100644
index 00000000..4813c5b9
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/examples/hello_dll.c
@@ -0,0 +1,20 @@
+//+---------------------------------------------------------------------------
+//
+// HELLO_DLL.C - Windows DLL example - main application part
+//
+
+#include
+
+void hello_func (void);
+__declspec(dllimport) extern const char *hello_data;
+
+int WINAPI WinMain(
+ HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPSTR lpCmdLine,
+ int nCmdShow)
+{
+ hello_data = "Hello World!";
+ hello_func();
+ return 0;
+}
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/examples/hello_win.c b/.cache/overlay-toolchain/tcc_extract/tcc/examples/hello_win.c
new file mode 100644
index 00000000..96546e41
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/examples/hello_win.c
@@ -0,0 +1,163 @@
+//+---------------------------------------------------------------------------
+//
+// HELLO_WIN.C - Windows GUI 'Hello World!' Example
+//
+//+---------------------------------------------------------------------------
+
+#include
+
+#define APPNAME "HELLO_WIN"
+
+char szAppName[] = APPNAME; // The name of this application
+char szTitle[] = APPNAME; // The title bar text
+const char *pWindowText;
+
+void CenterWindow(HWND hWnd);
+
+//+---------------------------------------------------------------------------
+//
+// Function: WndProc
+//
+// Synopsis: very unusual type of function - gets called by system to
+// process windows messages.
+//
+// Arguments: same as always.
+//----------------------------------------------------------------------------
+
+LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch (message) {
+
+ // ----------------------- first and last
+ case WM_CREATE:
+ CenterWindow(hwnd);
+ break;
+
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ break;
+
+ // ----------------------- get out of it...
+ case WM_RBUTTONUP:
+ DestroyWindow(hwnd);
+ break;
+
+ case WM_KEYDOWN:
+ if (VK_ESCAPE == wParam)
+ DestroyWindow(hwnd);
+ break;
+
+ // ----------------------- display our minimal info
+ case WM_PAINT:
+ {
+ PAINTSTRUCT ps;
+ HDC hdc;
+ RECT rc;
+ hdc = BeginPaint(hwnd, &ps);
+
+ GetClientRect(hwnd, &rc);
+ SetTextColor(hdc, RGB(240,240,96));
+ SetBkMode(hdc, TRANSPARENT);
+ DrawText(hdc, pWindowText, -1, &rc, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
+
+ EndPaint(hwnd, &ps);
+ break;
+ }
+
+ // ----------------------- let windows do all other stuff
+ default:
+ return DefWindowProc(hwnd, message, wParam, lParam);
+ }
+ return 0;
+}
+
+//+---------------------------------------------------------------------------
+//
+// Function: WinMain
+//
+// Synopsis: standard entrypoint for GUI Win32 apps
+//
+//----------------------------------------------------------------------------
+int APIENTRY WinMain(
+ HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPSTR lpCmdLine,
+ int nCmdShow
+ )
+{
+ MSG msg;
+ WNDCLASS wc;
+ HWND hwnd;
+
+ pWindowText = lpCmdLine[0] ? lpCmdLine : "Hello Windows!";
+
+ // Fill in window class structure with parameters that describe
+ // the main window.
+
+ ZeroMemory(&wc, sizeof wc);
+ wc.hInstance = hInstance;
+ wc.lpszClassName = szAppName;
+ wc.lpfnWndProc = (WNDPROC)WndProc;
+ wc.style = CS_DBLCLKS|CS_VREDRAW|CS_HREDRAW;
+ wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
+ wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+
+ if (FALSE == RegisterClass(&wc))
+ return 0;
+
+ // create the browser
+ hwnd = CreateWindow(
+ szAppName,
+ szTitle,
+ WS_OVERLAPPEDWINDOW|WS_VISIBLE,
+ CW_USEDEFAULT,
+ CW_USEDEFAULT,
+ 360,//CW_USEDEFAULT,
+ 240,//CW_USEDEFAULT,
+ 0,
+ 0,
+ hInstance,
+ 0);
+
+ if (NULL == hwnd)
+ return 0;
+
+ // Main message loop:
+ while (GetMessage(&msg, NULL, 0, 0) > 0) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+
+ return msg.wParam;
+}
+
+//+---------------------------------------------------------------------------
+
+//+---------------------------------------------------------------------------
+
+void CenterWindow(HWND hwnd_self)
+{
+ HWND hwnd_parent;
+ RECT rw_self, rc_parent, rw_parent;
+ int xpos, ypos;
+
+ hwnd_parent = GetParent(hwnd_self);
+ if (NULL == hwnd_parent)
+ hwnd_parent = GetDesktopWindow();
+
+ GetWindowRect(hwnd_parent, &rw_parent);
+ GetClientRect(hwnd_parent, &rc_parent);
+ GetWindowRect(hwnd_self, &rw_self);
+
+ xpos = rw_parent.left + (rc_parent.right + rw_self.left - rw_self.right) / 2;
+ ypos = rw_parent.top + (rc_parent.bottom + rw_self.top - rw_self.bottom) / 2;
+
+ SetWindowPos(
+ hwnd_self, NULL,
+ xpos, ypos, 0, 0,
+ SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE
+ );
+}
+
+//+---------------------------------------------------------------------------
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/examples/libtcc_test.c b/.cache/overlay-toolchain/tcc_extract/tcc/examples/libtcc_test.c
new file mode 100644
index 00000000..480d3148
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/examples/libtcc_test.c
@@ -0,0 +1,96 @@
+/*
+ * Simple Test program for libtcc
+ *
+ * libtcc can be useful to use tcc as a "backend" for a code generator.
+ */
+#include
+#include
+#include
+
+#include "libtcc.h"
+
+/* this function is called by the generated code */
+int add(int a, int b)
+{
+ return a + b;
+}
+
+/* this strinc is referenced by the generated code */
+const char hello[] = "Hello World!";
+
+char my_program[] =
+"#include \n" /* include the "Simple libc header for TCC" */
+"extern int add(int a, int b);\n"
+"#ifdef _WIN32\n" /* dynamically linked data needs 'dllimport' */
+" __attribute__((dllimport))\n"
+"#endif\n"
+"extern const char hello[];\n"
+"int fib(int n)\n"
+"{\n"
+" if (n <= 2)\n"
+" return 1;\n"
+" else\n"
+" return fib(n-1) + fib(n-2);\n"
+"}\n"
+"\n"
+"int foo(int n)\n"
+"{\n"
+" printf(\"%s\\n\", hello);\n"
+" printf(\"fib(%d) = %d\\n\", n, fib(n));\n"
+" printf(\"add(%d, %d) = %d\\n\", n, 2 * n, add(n, 2 * n));\n"
+" return 0;\n"
+"}\n";
+
+int main(int argc, char **argv)
+{
+ TCCState *s;
+ int i;
+ int (*func)(int);
+
+ s = tcc_new();
+ if (!s) {
+ fprintf(stderr, "Could not create tcc state\n");
+ exit(1);
+ }
+
+ /* if tcclib.h and libtcc1.a are not installed, where can we find them */
+ for (i = 1; i < argc; ++i) {
+ char *a = argv[i];
+ if (a[0] == '-') {
+ if (a[1] == 'B')
+ tcc_set_lib_path(s, a+2);
+ else if (a[1] == 'I')
+ tcc_add_include_path(s, a+2);
+ else if (a[1] == 'L')
+ tcc_add_library_path(s, a+2);
+ }
+ }
+
+ /* MUST BE CALLED before any compilation */
+ tcc_set_output_type(s, TCC_OUTPUT_MEMORY);
+
+ if (tcc_compile_string(s, my_program) == -1)
+ return 1;
+
+ /* as a test, we add symbols that the compiled program can use.
+ You may also open a dll with tcc_add_dll() and use symbols from that */
+ tcc_add_symbol(s, "add", add);
+ tcc_add_symbol(s, "hello", hello);
+
+ /* relocate the code */
+ if (tcc_relocate(s, TCC_RELOCATE_AUTO) < 0)
+ return 1;
+
+ /* get entry symbol */
+ func = tcc_get_symbol(s, "foo");
+ if (!func)
+ return 1;
+
+ /* run the code */
+ func(32);
+
+ /* delete the state */
+ tcc_delete(s);
+
+ return 0;
+}
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/i386-win32-tcc.exe b/.cache/overlay-toolchain/tcc_extract/tcc/i386-win32-tcc.exe
new file mode 100644
index 00000000..9f985670
Binary files /dev/null and b/.cache/overlay-toolchain/tcc_extract/tcc/i386-win32-tcc.exe differ
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/_mingw.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/_mingw.h
new file mode 100644
index 00000000..2fc97987
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/_mingw.h
@@ -0,0 +1,170 @@
+/*
+ * _mingw.h
+ *
+ * This file is for TinyCC and not part of the Mingw32 package.
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#ifndef __MINGW_H
+#define __MINGW_H
+
+/* some winapi files define these before including _mingw.h --> */
+#undef __cdecl
+#undef _X86_
+#undef WIN32
+/* <-- */
+
+#include
+#include
+
+#define __int8 char
+#define __int16 short
+#define __int32 int
+#define __int64 long long
+#define _HAVE_INT64
+
+#define __cdecl
+#define __declspec(x) __attribute__((x))
+#define __unaligned __attribute__((packed))
+#define __fastcall __attribute__((fastcall))
+
+#define __MSVCRT__ 1
+#undef _MSVCRT_
+#define __MINGW_IMPORT extern __declspec(dllimport)
+#define __MINGW_ATTRIB_NORETURN
+#define __MINGW_ATTRIB_CONST
+#define __MINGW_ATTRIB_DEPRECATED
+#define __MINGW_ATTRIB_MALLOC
+#define __MINGW_ATTRIB_PURE
+#define __MINGW_ATTRIB_NONNULL(arg)
+#define __MINGW_NOTHROW
+#define __GNUC_VA_LIST
+
+#define _CRTIMP extern
+#define __CRT_INLINE extern __inline__
+
+#define _CRT_ALIGN(x) __attribute__((aligned(x)))
+#define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
+#define _CRT_PACKING 8
+#define __CRT_UNALIGNED
+#define _CONST_RETURN
+
+#ifndef _TRUNCATE
+#define _TRUNCATE ((size_t)-1)
+#endif
+
+#define __CRT_STRINGIZE(_Value) #_Value
+#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
+#define __CRT_WIDE(_String) L ## _String
+#define _CRT_WIDE(_String) __CRT_WIDE(_String)
+
+#ifdef _WIN64
+#define __stdcall
+#define _AMD64_ 1
+#define __x86_64 1
+#define _M_X64 100 /* Visual Studio */
+#define _M_AMD64 100 /* Visual Studio */
+#define USE_MINGW_SETJMP_TWO_ARGS
+#define mingw_getsp tinyc_getbp
+#define __TRY__
+#else
+#define __stdcall __attribute__((__stdcall__))
+#define _X86_ 1
+#define _M_IX86 300 /* Visual Studio */
+#define WIN32 1
+#define _USE_32BIT_TIME_T
+#ifdef __arm__
+#define __TRY__
+#else
+#define __TRY__ void __try__(void**), *_sehrec[6]; __try__(_sehrec);
+#endif
+#endif
+
+/* in stddef.h */
+#define _SIZE_T_DEFINED
+#define _SSIZE_T_DEFINED
+#define _PTRDIFF_T_DEFINED
+#define _WCHAR_T_DEFINED
+#define _UINTPTR_T_DEFINED
+#define _INTPTR_T_DEFINED
+#define _INTEGRAL_MAX_BITS 64
+
+#ifndef _TIME32_T_DEFINED
+#define _TIME32_T_DEFINED
+typedef long __time32_t;
+#endif
+
+#ifndef _TIME64_T_DEFINED
+#define _TIME64_T_DEFINED
+typedef long long __time64_t;
+#endif
+
+#ifndef _TIME_T_DEFINED
+#define _TIME_T_DEFINED
+#ifdef _USE_32BIT_TIME_T
+typedef __time32_t time_t;
+#else
+typedef __time64_t time_t;
+#endif
+#endif
+
+#ifndef _WCTYPE_T_DEFINED
+#define _WCTYPE_T_DEFINED
+typedef wchar_t wctype_t;
+#endif
+
+#ifndef _WINT_T
+#define _WINT_T
+typedef __WINT_TYPE__ wint_t;
+#endif
+
+typedef int errno_t;
+#define _ERRCODE_DEFINED
+
+typedef struct threadlocaleinfostruct *pthreadlocinfo;
+typedef struct threadmbcinfostruct *pthreadmbcinfo;
+typedef struct localeinfo_struct _locale_tstruct,*_locale_t;
+
+/* for winapi */
+#define _ANONYMOUS_UNION
+#define _ANONYMOUS_STRUCT
+#define DECLSPEC_NORETURN
+#define DECLARE_STDCALL_P(type) __stdcall type
+#define NOSERVICE 1
+#define NOMCX 1
+#define NOIME 1
+#define __INTRIN_H_
+#ifndef DUMMYUNIONNAME
+# define DUMMYUNIONNAME
+# define DUMMYUNIONNAME1
+# define DUMMYUNIONNAME2
+# define DUMMYUNIONNAME3
+# define DUMMYUNIONNAME4
+# define DUMMYUNIONNAME5
+#endif
+#ifndef DUMMYSTRUCTNAME
+# define DUMMYSTRUCTNAME
+#endif
+#ifndef WINVER
+# define WINVER 0x0502
+#endif
+#ifndef _WIN32_WINNT
+# define _WIN32_WINNT 0x502
+#endif
+
+#define __C89_NAMELESS
+#define __MINGW_EXTENSION
+#define WINAPI_FAMILY_PARTITION(X) 1
+#define MINGW_HAS_SECURE_API
+
+#endif /* __MINGW_H */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/assert.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/assert.h
new file mode 100644
index 00000000..466d4571
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/assert.h
@@ -0,0 +1,57 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef __ASSERT_H_
+#define __ASSERT_H_
+
+#include <_mingw.h>
+#ifdef __cplusplus
+#include
+#endif
+
+#ifdef NDEBUG
+#ifndef assert
+#define assert(_Expression) ((void)0)
+#endif
+#else
+
+#ifndef _CRT_TERMINATE_DEFINED
+#define _CRT_TERMINATE_DEFINED
+ void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
+ _CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
+#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
+/* C99 function name */
+void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
+__CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
+{ _exit(status); }
+#endif
+
+#pragma push_macro("abort")
+#undef abort
+ void __cdecl __declspec(noreturn) abort(void);
+#pragma pop_macro("abort")
+
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern void __cdecl _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line);
+extern void __cdecl _assert(const char *, const char *, unsigned);
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef assert
+//#define assert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
+#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
+#endif
+
+#endif
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/conio.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/conio.h
new file mode 100644
index 00000000..39f779eb
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/conio.h
@@ -0,0 +1,409 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_CONIO
+#define _INC_CONIO
+
+#include <_mingw.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ _CRTIMP char *_cgets(char *_Buffer);
+ _CRTIMP int __cdecl _cprintf(const char *_Format,...);
+ _CRTIMP int __cdecl _cputs(const char *_Str);
+ _CRTIMP int __cdecl _cscanf(const char *_Format,...);
+ _CRTIMP int __cdecl _cscanf_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _getch(void);
+ _CRTIMP int __cdecl _getche(void);
+ _CRTIMP int __cdecl _vcprintf(const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _cprintf_p(const char *_Format,...);
+ _CRTIMP int __cdecl _vcprintf_p(const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _cprintf_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _cprintf_p_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _kbhit(void);
+
+#if defined(_X86_) && !defined(__x86_64)
+ int __cdecl _inp(unsigned short);
+ unsigned short __cdecl _inpw(unsigned short);
+ unsigned long __cdecl _inpd(unsigned short);
+ int __cdecl _outp(unsigned short,int);
+ unsigned short __cdecl _outpw(unsigned short,unsigned short);
+ unsigned long __cdecl _outpd(unsigned short,unsigned long);
+#endif
+
+ _CRTIMP int __cdecl _putch(int _Ch);
+ _CRTIMP int __cdecl _ungetch(int _Ch);
+ _CRTIMP int __cdecl _getch_nolock(void);
+ _CRTIMP int __cdecl _getche_nolock(void);
+ _CRTIMP int __cdecl _putch_nolock(int _Ch);
+ _CRTIMP int __cdecl _ungetch_nolock(int _Ch);
+
+#ifndef _WCONIO_DEFINED
+#define _WCONIO_DEFINED
+
+#ifndef WEOF
+#define WEOF (wint_t)(0xFFFF)
+#endif
+
+ _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
+ _CRTIMP wint_t __cdecl _getwch(void);
+ _CRTIMP wint_t __cdecl _getwche(void);
+ _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
+ _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
+ _CRTIMP int __cdecl _cputws(const wchar_t *_String);
+ _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP wint_t __cdecl _putwch_nolock(wchar_t _WCh);
+ _CRTIMP wint_t __cdecl _getwch_nolock(void);
+ _CRTIMP wint_t __cdecl _getwche_nolock(void);
+ _CRTIMP wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
+#endif
+
+#ifndef NO_OLDNAMES
+ char *__cdecl cgets(char *_Buffer);
+ int __cdecl cprintf(const char *_Format,...);
+ int __cdecl cputs(const char *_Str);
+ int __cdecl cscanf(const char *_Format,...);
+ int __cdecl getch(void);
+ int __cdecl getche(void);
+ int __cdecl kbhit(void);
+ int __cdecl putch(int _Ch);
+ int __cdecl ungetch(int _Ch);
+
+#if (defined(_X86_) && !defined(__x86_64))
+ int __cdecl inp(unsigned short);
+ unsigned short __cdecl inpw(unsigned short);
+ int __cdecl outp(unsigned short,int);
+ unsigned short __cdecl outpw(unsigned short,unsigned short);
+#endif
+
+ /* I/O intrin functions. */
+ __CRT_INLINE unsigned char __inbyte(unsigned short Port)
+ {
+ unsigned char value;
+ __asm__ __volatile__ ("inb %w1,%b0"
+ : "=a" (value)
+ : "Nd" (Port));
+ return value;
+ }
+ __CRT_INLINE unsigned short __inword(unsigned short Port)
+ {
+ unsigned short value;
+ __asm__ __volatile__ ("inw %w1,%w0"
+ : "=a" (value)
+ : "Nd" (Port));
+ return value;
+ }
+ __CRT_INLINE unsigned long __indword(unsigned short Port)
+ {
+ unsigned long value;
+ __asm__ __volatile__ ("inl %w1,%0"
+ : "=a" (value)
+ : "Nd" (Port));
+ return value;
+ }
+ __CRT_INLINE void __outbyte(unsigned short Port,unsigned char Data)
+ {
+ __asm__ __volatile__ ("outb %b0,%w1"
+ :
+ : "a" (Data), "Nd" (Port));
+ }
+ __CRT_INLINE void __outword(unsigned short Port,unsigned short Data)
+ {
+ __asm__ __volatile__ ("outw %w0,%w1"
+ :
+ : "a" (Data), "Nd" (Port));
+ }
+ __CRT_INLINE void __outdword(unsigned short Port,unsigned long Data)
+ {
+ __asm__ __volatile__ ("outl %0,%w1"
+ :
+ : "a" (Data), "Nd" (Port));
+ }
+ __CRT_INLINE void __inbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
+ {
+ __asm__ __volatile__ (
+ "cld ; rep ; insb "
+ : "=D" (Buffer), "=c" (Count)
+ : "d"(Port), "0"(Buffer), "1" (Count)
+ );
+ }
+ __CRT_INLINE void __inwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
+ {
+ __asm__ __volatile__ (
+ "cld ; rep ; insw "
+ : "=D" (Buffer), "=c" (Count)
+ : "d"(Port), "0"(Buffer), "1" (Count)
+ );
+ }
+ __CRT_INLINE void __indwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
+ {
+ __asm__ __volatile__ (
+ "cld ; rep ; insl "
+ : "=D" (Buffer), "=c" (Count)
+ : "d"(Port), "0"(Buffer), "1" (Count)
+ );
+ }
+
+ __CRT_INLINE void __outbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
+ {
+ __asm__ __volatile__ (
+ "cld ; rep ; outsb "
+ : "=S" (Buffer), "=c" (Count)
+ : "d"(Port), "0"(Buffer), "1" (Count)
+ );
+ }
+ __CRT_INLINE void __outwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
+ {
+ __asm__ __volatile__ (
+ "cld ; rep ; outsw "
+ : "=S" (Buffer), "=c" (Count)
+ : "d"(Port), "0"(Buffer), "1" (Count)
+ );
+ }
+ __CRT_INLINE void __outdwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
+ {
+ __asm__ __volatile__ (
+ "cld ; rep ; outsl "
+ : "=S" (Buffer), "=c" (Count)
+ : "d"(Port), "0"(Buffer), "1" (Count)
+ );
+ }
+
+ __CRT_INLINE unsigned __int64 __readcr0(void)
+ {
+ unsigned __int64 value;
+ __asm__ __volatile__ (
+ "mov %%cr0, %[value]"
+ : [value] "=q" (value));
+ return value;
+ }
+
+ /* Register sizes are different between 32/64 bit mode. So we have to do this for _WIN64 and _WIN32
+ separately. */
+
+#ifdef _WIN64
+ __CRT_INLINE void __writecr0(unsigned __int64 Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr0"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+ __CRT_INLINE unsigned __int64 __readcr2(void)
+ {
+ unsigned __int64 value;
+ __asm__ __volatile__ (
+ "mov %%cr2, %[value]"
+ : [value] "=q" (value));
+ return value;
+ }
+
+ __CRT_INLINE void __writecr2(unsigned __int64 Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr2"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+ __CRT_INLINE unsigned __int64 __readcr3(void)
+ {
+ unsigned __int64 value;
+ __asm__ __volatile__ (
+ "mov %%cr3, %[value]"
+ : [value] "=q" (value));
+ return value;
+ }
+
+ __CRT_INLINE void __writecr3(unsigned __int64 Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr3"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+ __CRT_INLINE unsigned __int64 __readcr4(void)
+ {
+ unsigned __int64 value;
+ __asm__ __volatile__ (
+ "mov %%cr4, %[value]"
+ : [value] "=q" (value));
+ return value;
+ }
+
+ __CRT_INLINE void __writecr4(unsigned __int64 Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr4"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+ __CRT_INLINE unsigned __int64 __readcr8(void)
+ {
+ unsigned __int64 value;
+ __asm__ __volatile__ (
+ "mov %%cr8, %[value]"
+ : [value] "=q" (value));
+ return value;
+ }
+
+ __CRT_INLINE void __writecr8(unsigned __int64 Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr8"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+#elif defined(_WIN32)
+
+ __CRT_INLINE void __writecr0(unsigned Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr0"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+ __CRT_INLINE unsigned long __readcr2(void)
+ {
+ unsigned long value;
+ __asm__ __volatile__ (
+ "mov %%cr2, %[value]"
+ : [value] "=q" (value));
+ return value;
+ }
+
+ __CRT_INLINE void __writecr2(unsigned Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr2"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+ __CRT_INLINE unsigned long __readcr3(void)
+ {
+ unsigned long value;
+ __asm__ __volatile__ (
+ "mov %%cr3, %[value]"
+ : [value] "=q" (value));
+ return value;
+ }
+
+ __CRT_INLINE void __writecr3(unsigned Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr3"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+ __CRT_INLINE unsigned long __readcr4(void)
+ {
+ unsigned long value;
+ __asm__ __volatile__ (
+ "mov %%cr4, %[value]"
+ : [value] "=q" (value));
+ return value;
+ }
+
+ __CRT_INLINE void __writecr4(unsigned Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr4"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+ __CRT_INLINE unsigned long __readcr8(void)
+ {
+ unsigned long value; __asm__ __volatile__ (
+ "mov %%cr8, %[value]"
+ : [value] "=q" (value));
+ return value;
+ }
+
+ __CRT_INLINE void __writecr8(unsigned Data)
+ {
+ __asm__ __volatile__ (
+ "mov %[Data], %%cr8"
+ :
+ : [Data] "q" (Data)
+ : "memory");
+ }
+
+#endif
+
+ __CRT_INLINE unsigned __int64 __readmsr(unsigned long msr)
+ {
+ unsigned __int64 val1, val2;
+ __asm__ __volatile__(
+ "rdmsr"
+ : "=a" (val1), "=d" (val2)
+ : "c" (msr));
+ return val1 | (val2 << 32);
+ }
+
+ __CRT_INLINE void __writemsr (unsigned long msr, unsigned __int64 Value)
+ {
+ unsigned long val1 = Value, val2 = Value >> 32;
+ __asm__ __volatile__ (
+ "wrmsr"
+ :
+ : "c" (msr), "a" (val1), "d" (val2));
+ }
+
+ __CRT_INLINE unsigned __int64 __rdtsc(void)
+ {
+ unsigned __int64 val1, val2;
+ __asm__ __volatile__ (
+ "rdtsc"
+ : "=a" (val1), "=d" (val2));
+ return val1 | (val2 << 32);
+ }
+
+ __CRT_INLINE void __cpuid(int CPUInfo[4], int InfoType)
+ {
+ __asm__ __volatile__ (
+ "cpuid"
+ : "=a" (CPUInfo [0]), "=b" (CPUInfo [1]), "=c" (CPUInfo [2]), "=d" (CPUInfo [3])
+ : "a" (InfoType));
+ }
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#include
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/ctype.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/ctype.h
new file mode 100644
index 00000000..7e901002
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/ctype.h
@@ -0,0 +1,281 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_CTYPE
+#define _INC_CTYPE
+
+#include <_mingw.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef WEOF
+#define WEOF (wint_t)(0xFFFF)
+#endif
+
+#ifndef _CRT_CTYPEDATA_DEFINED
+#define _CRT_CTYPEDATA_DEFINED
+#ifndef _CTYPE_DISABLE_MACROS
+
+#ifndef __PCTYPE_FUNC
+#define __PCTYPE_FUNC __pctype_func()
+#ifdef _MSVCRT_
+#define __pctype_func() (_pctype)
+#else
+#define __pctype_func() (*_imp___pctype)
+#endif
+#endif
+
+#ifndef _pctype
+#ifdef _MSVCRT_
+ extern unsigned short *_pctype;
+#else
+ extern unsigned short **_imp___pctype;
+#define _pctype (*_imp___pctype)
+#endif
+#endif
+
+#endif
+#endif
+
+#ifndef _CRT_WCTYPEDATA_DEFINED
+#define _CRT_WCTYPEDATA_DEFINED
+#ifndef _CTYPE_DISABLE_MACROS
+#ifndef _wctype
+#ifdef _MSVCRT_
+ extern unsigned short *_wctype;
+#else
+ extern unsigned short **_imp___wctype;
+#define _wctype (*_imp___wctype)
+#endif
+#endif
+#ifdef _MSVCRT_
+#define __pwctype_func() (_pwctype)
+#ifndef _pwctype
+ extern unsigned short *_pwctype;
+#endif
+#else
+#define __pwctype_func() (*_imp___pwctype)
+#ifndef _pwctype
+ extern unsigned short **_imp___pwctype;
+#define _pwctype (*_imp___pwctype)
+#endif
+#endif
+#endif
+#endif
+
+ /* CRT stuff */
+#if 1
+ extern const unsigned char __newclmap[];
+ extern const unsigned char __newcumap[];
+ extern pthreadlocinfo __ptlocinfo;
+ extern pthreadmbcinfo __ptmbcinfo;
+ extern int __globallocalestatus;
+ extern int __locale_changed;
+ extern struct threadlocaleinfostruct __initiallocinfo;
+ extern _locale_tstruct __initiallocalestructinfo;
+ pthreadlocinfo __cdecl __updatetlocinfo(void);
+ pthreadmbcinfo __cdecl __updatetmbcinfo(void);
+#endif
+
+#define _UPPER 0x1
+#define _LOWER 0x2
+#define _DIGIT 0x4
+#define _SPACE 0x8
+
+#define _PUNCT 0x10
+#define _CONTROL 0x20
+#define _BLANK 0x40
+#define _HEX 0x80
+
+#define _LEADBYTE 0x8000
+#define _ALPHA (0x0100|_UPPER|_LOWER)
+
+#ifndef _CTYPE_DEFINED
+#define _CTYPE_DEFINED
+
+ _CRTIMP int __cdecl _isctype(int _C,int _Type);
+ _CRTIMP int __cdecl _isctype_l(int _C,int _Type,_locale_t _Locale);
+ _CRTIMP int __cdecl isalpha(int _C);
+ _CRTIMP int __cdecl _isalpha_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl isupper(int _C);
+ _CRTIMP int __cdecl _isupper_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl islower(int _C);
+ _CRTIMP int __cdecl _islower_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl isdigit(int _C);
+ _CRTIMP int __cdecl _isdigit_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl isxdigit(int _C);
+ _CRTIMP int __cdecl _isxdigit_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl isspace(int _C);
+ _CRTIMP int __cdecl _isspace_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl ispunct(int _C);
+ _CRTIMP int __cdecl _ispunct_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl isalnum(int _C);
+ _CRTIMP int __cdecl _isalnum_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl isprint(int _C);
+ _CRTIMP int __cdecl _isprint_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl isgraph(int _C);
+ _CRTIMP int __cdecl _isgraph_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl iscntrl(int _C);
+ _CRTIMP int __cdecl _iscntrl_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl toupper(int _C);
+ _CRTIMP int __cdecl tolower(int _C);
+ _CRTIMP int __cdecl _tolower(int _C);
+ _CRTIMP int __cdecl _tolower_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl _toupper(int _C);
+ _CRTIMP int __cdecl _toupper_l(int _C,_locale_t _Locale);
+ _CRTIMP int __cdecl __isascii(int _C);
+ _CRTIMP int __cdecl __toascii(int _C);
+ _CRTIMP int __cdecl __iscsymf(int _C);
+ _CRTIMP int __cdecl __iscsym(int _C);
+
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
+int __cdecl isblank(int _C);
+#endif
+#endif
+
+#ifndef _WCTYPE_DEFINED
+#define _WCTYPE_DEFINED
+
+ int __cdecl iswalpha(wint_t _C);
+ _CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswupper(wint_t _C);
+ _CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswlower(wint_t _C);
+ _CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswdigit(wint_t _C);
+ _CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswxdigit(wint_t _C);
+ _CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswspace(wint_t _C);
+ _CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswpunct(wint_t _C);
+ _CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswalnum(wint_t _C);
+ _CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswprint(wint_t _C);
+ _CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswgraph(wint_t _C);
+ _CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswcntrl(wint_t _C);
+ _CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswascii(wint_t _C);
+ int __cdecl isleadbyte(int _C);
+ _CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale);
+ wint_t __cdecl towupper(wint_t _C);
+ _CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale);
+ wint_t __cdecl towlower(wint_t _C);
+ _CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswctype(wint_t _C,wctype_t _Type);
+ _CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale);
+ _CRTIMP int __cdecl __iswcsymf(wint_t _C);
+ _CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale);
+ _CRTIMP int __cdecl __iswcsym(wint_t _C);
+ _CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale);
+ int __cdecl is_wctype(wint_t _C,wctype_t _Type);
+
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
+int __cdecl iswblank(wint_t _C);
+#endif
+#endif
+
+#ifndef _CTYPE_DISABLE_MACROS
+
+#ifndef MB_CUR_MAX
+#define MB_CUR_MAX ___mb_cur_max_func()
+#ifndef __mb_cur_max
+#ifdef _MSVCRT_
+ extern int __mb_cur_max;
+#else
+#define __mb_cur_max (*_imp____mb_cur_max)
+ extern int *_imp____mb_cur_max;
+#endif
+#endif
+#ifdef _MSVCRT_
+#define ___mb_cur_max_func() (__mb_cur_max)
+#else
+#define ___mb_cur_max_func() (*_imp____mb_cur_max)
+#endif
+#endif
+
+#define __chvalidchk(a,b) (__PCTYPE_FUNC[(a)] & (b))
+#define _chvalidchk_l(_Char,_Flag,_Locale) (!_Locale ? __chvalidchk(_Char,_Flag) : ((_locale_t)_Locale)->locinfo->pctype[_Char] & (_Flag))
+#define _ischartype_l(_Char,_Flag,_Locale) (((_Locale)!=NULL && (((_locale_t)(_Locale))->locinfo->mb_cur_max) > 1) ? _isctype_l(_Char,(_Flag),_Locale) : _chvalidchk_l(_Char,_Flag,_Locale))
+#define _isalpha_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA,_Locale)
+#define _isupper_l(_Char,_Locale) _ischartype_l(_Char,_UPPER,_Locale)
+#define _islower_l(_Char,_Locale) _ischartype_l(_Char,_LOWER,_Locale)
+#define _isdigit_l(_Char,_Locale) _ischartype_l(_Char,_DIGIT,_Locale)
+#define _isxdigit_l(_Char,_Locale) _ischartype_l(_Char,_HEX,_Locale)
+#define _isspace_l(_Char,_Locale) _ischartype_l(_Char,_SPACE,_Locale)
+#define _ispunct_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT,_Locale)
+#define _isalnum_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA|_DIGIT,_Locale)
+#define _isprint_l(_Char,_Locale) _ischartype_l(_Char,_BLANK|_PUNCT|_ALPHA|_DIGIT,_Locale)
+#define _isgraph_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT|_ALPHA|_DIGIT,_Locale)
+#define _iscntrl_l(_Char,_Locale) _ischartype_l(_Char,_CONTROL,_Locale)
+#define _tolower(_Char) ((_Char)-'A'+'a')
+#define _toupper(_Char) ((_Char)-'a'+'A')
+#define __isascii(_Char) ((unsigned)(_Char) < 0x80)
+#define __toascii(_Char) ((_Char) & 0x7f)
+
+#ifndef _WCTYPE_INLINE_DEFINED
+#define _WCTYPE_INLINE_DEFINED
+
+#undef _CRT_WCTYPE_NOINLINE
+#ifndef __cplusplus
+#define iswalpha(_c) (iswctype(_c,_ALPHA))
+#define iswupper(_c) (iswctype(_c,_UPPER))
+#define iswlower(_c) (iswctype(_c,_LOWER))
+#define iswdigit(_c) (iswctype(_c,_DIGIT))
+#define iswxdigit(_c) (iswctype(_c,_HEX))
+#define iswspace(_c) (iswctype(_c,_SPACE))
+#define iswpunct(_c) (iswctype(_c,_PUNCT))
+#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
+#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
+#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
+#define iswcntrl(_c) (iswctype(_c,_CONTROL))
+#define iswascii(_c) ((unsigned)(_c) < 0x80)
+#define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
+#define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
+#define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
+#define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
+#define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
+#define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
+#define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
+#define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
+#define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
+#define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
+#define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
+#endif
+#endif
+
+#define __iscsymf(_c) (isalpha(_c) || ((_c)=='_'))
+#define __iscsym(_c) (isalnum(_c) || ((_c)=='_'))
+#define __iswcsymf(_c) (iswalpha(_c) || ((_c)=='_'))
+#define __iswcsym(_c) (iswalnum(_c) || ((_c)=='_'))
+#define _iscsymf_l(_c,_p) (_isalpha_l(_c,_p) || ((_c)=='_'))
+#define _iscsym_l(_c,_p) (_isalnum_l(_c,_p) || ((_c)=='_'))
+#define _iswcsymf_l(_c,_p) (_iswalpha_l(_c,_p) || ((_c)=='_'))
+#define _iswcsym_l(_c,_p) (_iswalnum_l(_c,_p) || ((_c)=='_'))
+#endif
+
+#ifndef NO_OLDNAMES
+#ifndef _CTYPE_DEFINED
+ int __cdecl isascii(int _C);
+ int __cdecl toascii(int _C);
+ int __cdecl iscsymf(int _C);
+ int __cdecl iscsym(int _C);
+#else
+#define isascii __isascii
+#define toascii __toascii
+#define iscsymf __iscsymf
+#define iscsym __iscsym
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/dir.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/dir.h
new file mode 100644
index 00000000..f38f750d
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/dir.h
@@ -0,0 +1,31 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+/*
+ * dir.h
+ *
+ * This file OBSOLESCENT and only provided for backward compatibility.
+ * Please use io.h instead.
+ *
+ * This file is part of the Mingw32 package.
+ *
+ * Contributors:
+ * Created by Colin Peters
+ * Mumit Khan
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#include
+
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/direct.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/direct.h
new file mode 100644
index 00000000..99ce69db
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/direct.h
@@ -0,0 +1,68 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_DIRECT
+#define _INC_DIRECT
+
+#include <_mingw.h>
+#include
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _DISKFREE_T_DEFINED
+#define _DISKFREE_T_DEFINED
+ struct _diskfree_t {
+ unsigned total_clusters;
+ unsigned avail_clusters;
+ unsigned sectors_per_cluster;
+ unsigned bytes_per_sector;
+ };
+#endif
+
+ _CRTIMP char *__cdecl _getcwd(char *_DstBuf,int _SizeInBytes);
+ _CRTIMP char *__cdecl _getdcwd(int _Drive,char *_DstBuf,int _SizeInBytes);
+ char *__cdecl _getdcwd_nolock(int _Drive,char *_DstBuf,int _SizeInBytes);
+ _CRTIMP int __cdecl _chdir(const char *_Path);
+ _CRTIMP int __cdecl _mkdir(const char *_Path);
+ _CRTIMP int __cdecl _rmdir(const char *_Path);
+ _CRTIMP int __cdecl _chdrive(int _Drive);
+ _CRTIMP int __cdecl _getdrive(void);
+ _CRTIMP unsigned long __cdecl _getdrives(void);
+
+#ifndef _GETDISKFREE_DEFINED
+#define _GETDISKFREE_DEFINED
+ _CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
+#endif
+
+#ifndef _WDIRECT_DEFINED
+#define _WDIRECT_DEFINED
+ _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
+ _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
+ wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
+ _CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
+ _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
+ _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
+#endif
+
+#ifndef NO_OLDNAMES
+
+#define diskfree_t _diskfree_t
+
+ char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes);
+ int __cdecl chdir(const char *_Path);
+ int __cdecl mkdir(const char *_Path);
+ int __cdecl rmdir(const char *_Path);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/dirent.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/dirent.h
new file mode 100644
index 00000000..cd31f59e
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/dirent.h
@@ -0,0 +1,135 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+/* All the headers include this file. */
+#include <_mingw.h>
+
+#ifndef __STRICT_ANSI__
+
+#ifndef _DIRENT_H_
+#define _DIRENT_H_
+
+
+#pragma pack(push,_CRT_PACKING)
+
+#include
+
+#ifndef RC_INVOKED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ struct dirent
+ {
+ long d_ino; /* Always zero. */
+ unsigned short d_reclen; /* Always zero. */
+ unsigned short d_namlen; /* Length of name in d_name. */
+ char* d_name; /* File name. */
+ /* NOTE: The name in the dirent structure points to the name in the
+ * finddata_t structure in the DIR. */
+ };
+
+ /*
+ * This is an internal data structure. Good programmers will not use it
+ * except as an argument to one of the functions below.
+ * dd_stat field is now int (was short in older versions).
+ */
+ typedef struct
+ {
+ /* disk transfer area for this dir */
+ struct _finddata_t dd_dta;
+
+ /* dirent struct to return from dir (NOTE: this makes this thread
+ * safe as long as only one thread uses a particular DIR struct at
+ * a time) */
+ struct dirent dd_dir;
+
+ /* _findnext handle */
+ long dd_handle;
+
+ /*
+ * Status of search:
+ * 0 = not started yet (next entry to read is first entry)
+ * -1 = off the end
+ * positive = 0 based index of next entry
+ */
+ int dd_stat;
+
+ /* given path for dir with search pattern (struct is extended) */
+ char dd_name[1];
+ } DIR;
+
+ DIR* __cdecl opendir (const char*);
+ struct dirent* __cdecl readdir (DIR*);
+ int __cdecl closedir (DIR*);
+ void __cdecl rewinddir (DIR*);
+ long __cdecl telldir (DIR*);
+ void __cdecl seekdir (DIR*, long);
+
+
+ /* wide char versions */
+
+ struct _wdirent
+ {
+ long d_ino; /* Always zero. */
+ unsigned short d_reclen; /* Always zero. */
+ unsigned short d_namlen; /* Length of name in d_name. */
+ wchar_t* d_name; /* File name. */
+ /* NOTE: The name in the dirent structure points to the name in the * wfinddata_t structure in the _WDIR. */
+ };
+
+ /*
+ * This is an internal data structure. Good programmers will not use it
+ * except as an argument to one of the functions below.
+ */
+ typedef struct
+ {
+ /* disk transfer area for this dir */
+ struct _wfinddata_t dd_dta;
+
+ /* dirent struct to return from dir (NOTE: this makes this thread
+ * safe as long as only one thread uses a particular DIR struct at
+ * a time) */
+ struct _wdirent dd_dir;
+
+ /* _findnext handle */
+ long dd_handle;
+
+ /*
+ * Status of search:
+ * 0 = not started yet (next entry to read is first entry)
+ * -1 = off the end
+ * positive = 0 based index of next entry
+ */
+ int dd_stat;
+
+ /* given path for dir with search pattern (struct is extended) */
+ wchar_t dd_name[1];
+ } _WDIR;
+
+
+
+ _WDIR* __cdecl _wopendir (const wchar_t*);
+ struct _wdirent* __cdecl _wreaddir (_WDIR*);
+ int __cdecl _wclosedir (_WDIR*);
+ void __cdecl _wrewinddir (_WDIR*);
+ long __cdecl _wtelldir (_WDIR*);
+ void __cdecl _wseekdir (_WDIR*, long);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* Not RC_INVOKED */
+
+#pragma pack(pop)
+
+#endif /* Not _DIRENT_H_ */
+
+
+#endif /* Not __STRICT_ANSI__ */
+
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/dos.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/dos.h
new file mode 100644
index 00000000..294e8fe1
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/dos.h
@@ -0,0 +1,55 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_DOS
+#define _INC_DOS
+
+#include <_mingw.h>
+#include
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _DISKFREE_T_DEFINED
+#define _DISKFREE_T_DEFINED
+
+ struct _diskfree_t {
+ unsigned total_clusters;
+ unsigned avail_clusters;
+ unsigned sectors_per_cluster;
+ unsigned bytes_per_sector;
+ };
+#endif
+
+#define _A_NORMAL 0x00
+#define _A_RDONLY 0x01
+#define _A_HIDDEN 0x02
+#define _A_SYSTEM 0x04
+#define _A_SUBDIR 0x10
+#define _A_ARCH 0x20
+
+#ifndef _GETDISKFREE_DEFINED
+#define _GETDISKFREE_DEFINED
+ _CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
+#endif
+
+#if (defined(_X86_) && !defined(__x86_64))
+ void __cdecl _disable(void);
+ void __cdecl _enable(void);
+#endif
+
+#ifndef NO_OLDNAMES
+#define diskfree_t _diskfree_t
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/errno.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/errno.h
new file mode 100644
index 00000000..c2df0158
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/errno.h
@@ -0,0 +1,75 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_ERRNO
+#define _INC_ERRNO
+
+#include <_mingw.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _CRT_ERRNO_DEFINED
+#define _CRT_ERRNO_DEFINED
+ _CRTIMP extern int *__cdecl _errno(void);
+#define errno (*_errno())
+
+ errno_t __cdecl _set_errno(int _Value);
+ errno_t __cdecl _get_errno(int *_Value);
+#endif
+
+#define EPERM 1
+#define ENOENT 2
+#define ESRCH 3
+#define EINTR 4
+#define EIO 5
+#define ENXIO 6
+#define E2BIG 7
+#define ENOEXEC 8
+#define EBADF 9
+#define ECHILD 10
+#define EAGAIN 11
+#define ENOMEM 12
+#define EACCES 13
+#define EFAULT 14
+#define EBUSY 16
+#define EEXIST 17
+#define EXDEV 18
+#define ENODEV 19
+#define ENOTDIR 20
+#define EISDIR 21
+#define ENFILE 23
+#define EMFILE 24
+#define ENOTTY 25
+#define EFBIG 27
+#define ENOSPC 28
+#define ESPIPE 29
+#define EROFS 30
+#define EMLINK 31
+#define EPIPE 32
+#define EDOM 33
+#define EDEADLK 36
+#define ENAMETOOLONG 38
+#define ENOLCK 39
+#define ENOSYS 40
+#define ENOTEMPTY 41
+
+#ifndef RC_INVOKED
+#if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED)
+#define _SECURECRT_ERRCODE_VALUES_DEFINED
+#define EINVAL 22
+#define ERANGE 34
+#define EILSEQ 42
+#define STRUNCATE 80
+#endif
+#endif
+
+#define EDEADLOCK EDEADLK
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/excpt.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/excpt.h
new file mode 100644
index 00000000..26cc9437
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/excpt.h
@@ -0,0 +1,123 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_EXCPT
+#define _INC_EXCPT
+
+#include <_mingw.h>
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ struct _EXCEPTION_POINTERS;
+
+#ifndef EXCEPTION_DISPOSITION
+#define EXCEPTION_DISPOSITION int
+#endif
+#define ExceptionContinueExecution 0
+#define ExceptionContinueSearch 1
+#define ExceptionNestedException 2
+#define ExceptionCollidedUnwind 3
+
+#if (defined(_X86_) && !defined(__x86_64))
+ struct _EXCEPTION_RECORD;
+ struct _CONTEXT;
+
+ EXCEPTION_DISPOSITION __cdecl _except_handler(struct _EXCEPTION_RECORD *_ExceptionRecord,void *_EstablisherFrame,struct _CONTEXT *_ContextRecord,void *_DispatcherContext);
+#elif defined(__ia64__)
+
+ typedef struct _EXCEPTION_POINTERS *Exception_info_ptr;
+ struct _EXCEPTION_RECORD;
+ struct _CONTEXT;
+ struct _DISPATCHER_CONTEXT;
+
+ _CRTIMP EXCEPTION_DISPOSITION __cdecl __C_specific_handler (struct _EXCEPTION_RECORD *_ExceptionRecord,unsigned __int64 _MemoryStackFp,unsigned __int64 _BackingStoreFp,struct _CONTEXT *_ContextRecord,struct _DISPATCHER_CONTEXT *_DispatcherContext,unsigned __int64 _GlobalPointer);
+#elif defined(__x86_64)
+
+ struct _EXCEPTION_RECORD;
+ struct _CONTEXT;
+#endif
+
+#define GetExceptionCode _exception_code
+#define exception_code _exception_code
+#define GetExceptionInformation (struct _EXCEPTION_POINTERS *)_exception_info
+#define exception_info (struct _EXCEPTION_POINTERS *)_exception_info
+#define AbnormalTermination _abnormal_termination
+#define abnormal_termination _abnormal_termination
+
+ unsigned long __cdecl _exception_code(void);
+ void *__cdecl _exception_info(void);
+ int __cdecl _abnormal_termination(void);
+
+#define EXCEPTION_EXECUTE_HANDLER 1
+#define EXCEPTION_CONTINUE_SEARCH 0
+#define EXCEPTION_CONTINUE_EXECUTION -1
+
+ /* CRT stuff */
+ typedef void (__cdecl * _PHNDLR)(int);
+
+ struct _XCPT_ACTION {
+ unsigned long XcptNum;
+ int SigNum;
+ _PHNDLR XcptAction;
+ };
+
+ extern struct _XCPT_ACTION _XcptActTab[];
+ extern int _XcptActTabCount;
+ extern int _XcptActTabSize;
+ extern int _First_FPE_Indx;
+ extern int _Num_FPE;
+
+ int __cdecl __CppXcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr);
+ int __cdecl _XcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr);
+
+ /*
+ * The type of function that is expected as an exception handler to be
+ * installed with _try1.
+ */
+ typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
+
+#ifndef HAVE_NO_SEH
+ /*
+ * This is not entirely necessary, but it is the structure installed by
+ * the _try1 primitive below.
+ */
+ typedef struct _EXCEPTION_REGISTRATION {
+ struct _EXCEPTION_REGISTRATION *prev;
+ EXCEPTION_DISPOSITION (*handler)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
+ } EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
+
+ typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
+ typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
+#endif
+
+#if (defined(_X86_) && !defined(__x86_64))
+#define __try1(pHandler) \
+ __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
+
+#define __except1 \
+ __asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
+ : : : "%eax");
+#elif defined(__x86_64)
+#define __try1(pHandler) \
+ __asm__ ("pushq %0;pushq %%gs:0;movq %%rsp,%%gs:0;" : : "g" (pHandler));
+
+#define __except1 \
+ __asm__ ("movq (%%rsp),%%rax;movq %%rax,%%gs:0;addq $16,%%rsp;" \
+ : : : "%rax");
+#else
+#define __try1(pHandler)
+#define __except1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/fcntl.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/fcntl.h
new file mode 100644
index 00000000..9202b08c
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/fcntl.h
@@ -0,0 +1,52 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#include <_mingw.h>
+
+#include
+
+#ifndef _INC_FCNTL
+#define _INC_FCNTL
+
+#define _O_RDONLY 0x0000
+#define _O_WRONLY 0x0001
+#define _O_RDWR 0x0002
+#define _O_APPEND 0x0008
+#define _O_CREAT 0x0100
+#define _O_TRUNC 0x0200
+#define _O_EXCL 0x0400
+#define _O_TEXT 0x4000
+#define _O_BINARY 0x8000
+#define _O_WTEXT 0x10000
+#define _O_U16TEXT 0x20000
+#define _O_U8TEXT 0x40000
+#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
+
+#define _O_RAW _O_BINARY
+#define _O_NOINHERIT 0x0080
+#define _O_TEMPORARY 0x0040
+#define _O_SHORT_LIVED 0x1000
+
+#define _O_SEQUENTIAL 0x0020
+#define _O_RANDOM 0x0010
+
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+#define O_RDONLY _O_RDONLY
+#define O_WRONLY _O_WRONLY
+#define O_RDWR _O_RDWR
+#define O_APPEND _O_APPEND
+#define O_CREAT _O_CREAT
+#define O_TRUNC _O_TRUNC
+#define O_EXCL _O_EXCL
+#define O_TEXT _O_TEXT
+#define O_BINARY _O_BINARY
+#define O_RAW _O_BINARY
+#define O_TEMPORARY _O_TEMPORARY
+#define O_NOINHERIT _O_NOINHERIT
+#define O_SEQUENTIAL _O_SEQUENTIAL
+#define O_RANDOM _O_RANDOM
+#define O_ACCMODE _O_ACCMODE
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/fenv.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/fenv.h
new file mode 100644
index 00000000..258f3a5d
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/fenv.h
@@ -0,0 +1,108 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _FENV_H_
+#define _FENV_H_
+
+#include <_mingw.h>
+
+/* FPU status word exception flags */
+#define FE_INVALID 0x01
+#define FE_DENORMAL 0x02
+#define FE_DIVBYZERO 0x04
+#define FE_OVERFLOW 0x08
+#define FE_UNDERFLOW 0x10
+#define FE_INEXACT 0x20
+#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
+ | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
+
+/* FPU control word rounding flags */
+#define FE_TONEAREST 0x0000
+#define FE_DOWNWARD 0x0400
+#define FE_UPWARD 0x0800
+#define FE_TOWARDZERO 0x0c00
+
+/* The MXCSR exception flags are the same as the
+ FE flags. */
+#define __MXCSR_EXCEPT_FLAG_SHIFT 0
+
+/* How much to shift FE status word exception flags
+ to get MXCSR rounding flags, */
+#define __MXCSR_ROUND_FLAG_SHIFT 3
+
+#ifndef RC_INVOKED
+/*
+ For now, support only for the basic abstraction of flags that are
+ either set or clear. fexcept_t could be structure that holds more
+ info about the fp environment.
+*/
+typedef unsigned short fexcept_t;
+
+/* This 32-byte struct represents the entire floating point
+ environment as stored by fnstenv or fstenv, augmented by
+ the contents of the MXCSR register, as stored by stmxcsr
+ (if CPU supports it). */
+typedef struct
+{
+ unsigned short __control_word;
+ unsigned short __unused0;
+ unsigned short __status_word;
+ unsigned short __unused1;
+ unsigned short __tag_word;
+ unsigned short __unused2;
+ unsigned int __ip_offset; /* instruction pointer offset */
+ unsigned short __ip_selector;
+ unsigned short __opcode;
+ unsigned int __data_offset;
+ unsigned short __data_selector;
+ unsigned short __unused3;
+ unsigned int __mxcsr; /* contents of the MXCSR register */
+} fenv_t;
+
+
+/*The C99 standard (7.6.9) allows us to define implementation-specific macros for
+ different fp environments */
+
+/* The default Intel x87 floating point environment (64-bit mantissa) */
+#define FE_PC64_ENV ((const fenv_t *)-1)
+
+/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */
+#define FE_PC53_ENV ((const fenv_t *)-2)
+
+/* The FE_DFL_ENV macro is required by standard.
+ fesetenv will use the environment set at app startup.*/
+#define FE_DFL_ENV ((const fenv_t *) 0)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*TODO: Some of these could be inlined */
+/* 7.6.2 Exception */
+
+extern int __cdecl feclearexcept (int);
+extern int __cdecl fegetexceptflag (fexcept_t * flagp, int excepts);
+extern int __cdecl feraiseexcept (int excepts );
+extern int __cdecl fesetexceptflag (const fexcept_t *, int);
+extern int __cdecl fetestexcept (int excepts);
+
+/* 7.6.3 Rounding */
+
+extern int __cdecl fegetround (void);
+extern int __cdecl fesetround (int mode);
+
+/* 7.6.4 Environment */
+
+extern int __cdecl fegetenv(fenv_t * envp);
+extern int __cdecl fesetenv(const fenv_t * );
+extern int __cdecl feupdateenv(const fenv_t *);
+extern int __cdecl feholdexcept(fenv_t *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* Not RC_INVOKED */
+
+#endif /* ndef _FENV_H */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/float.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/float.h
new file mode 100644
index 00000000..f16f1f0c
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/float.h
@@ -0,0 +1,57 @@
+#ifndef _FLOAT_H_
+#define _FLOAT_H_
+
+#define FLT_RADIX 2
+
+/* IEEE float */
+#define FLT_MANT_DIG 24
+#define FLT_DIG 6
+#define FLT_ROUNDS 1
+#define FLT_EPSILON 1.19209290e-07F
+#define FLT_MIN_EXP (-125)
+#define FLT_MIN 1.17549435e-38F
+#define FLT_MIN_10_EXP (-37)
+#define FLT_MAX_EXP 128
+#define FLT_MAX 3.40282347e+38F
+#define FLT_MAX_10_EXP 38
+
+/* IEEE double */
+#define DBL_MANT_DIG 53
+#define DBL_DIG 15
+#define DBL_EPSILON 2.2204460492503131e-16
+#define DBL_MIN_EXP (-1021)
+#define DBL_MIN 2.2250738585072014e-308
+#define DBL_MIN_10_EXP (-307)
+#define DBL_MAX_EXP 1024
+#define DBL_MAX 1.7976931348623157e+308
+#define DBL_MAX_10_EXP 308
+
+/* horrible intel long double */
+#if defined __i386__ || defined __x86_64__
+
+#define LDBL_MANT_DIG 64
+#define LDBL_DIG 18
+#define LDBL_EPSILON 1.08420217248550443401e-19L
+#define LDBL_MIN_EXP (-16381)
+#define LDBL_MIN 3.36210314311209350626e-4932L
+#define LDBL_MIN_10_EXP (-4931)
+#define LDBL_MAX_EXP 16384
+#define LDBL_MAX 1.18973149535723176502e+4932L
+#define LDBL_MAX_10_EXP 4932
+
+#else
+
+/* same as IEEE double */
+#define LDBL_MANT_DIG 53
+#define LDBL_DIG 15
+#define LDBL_EPSILON 2.2204460492503131e-16
+#define LDBL_MIN_EXP (-1021)
+#define LDBL_MIN 2.2250738585072014e-308
+#define LDBL_MIN_10_EXP (-307)
+#define LDBL_MAX_EXP 1024
+#define LDBL_MAX 1.7976931348623157e+308
+#define LDBL_MAX_10_EXP 308
+
+#endif
+
+#endif /* _FLOAT_H_ */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/inttypes.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/inttypes.h
new file mode 100644
index 00000000..73600919
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/inttypes.h
@@ -0,0 +1,297 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+/* 7.8 Format conversion of integer types */
+
+#ifndef _INTTYPES_H_
+#define _INTTYPES_H_
+
+#include <_mingw.h>
+#include
+#define __need_wchar_t
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ intmax_t quot;
+ intmax_t rem;
+ } imaxdiv_t;
+
+#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
+
+/* 7.8.1 Macros for format specifiers
+ *
+ * MS runtime does not yet understand C9x standard "ll"
+ * length specifier. It appears to treat "ll" as "l".
+ * The non-standard I64 length specifier causes warning in GCC,
+ * but understood by MS runtime functions.
+ */
+
+/* fprintf macros for signed types */
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "I64d"
+
+#define PRIdLEAST8 "d"
+#define PRIdLEAST16 "d"
+#define PRIdLEAST32 "d"
+#define PRIdLEAST64 "I64d"
+
+#define PRIdFAST8 "d"
+#define PRIdFAST16 "d"
+#define PRIdFAST32 "d"
+#define PRIdFAST64 "I64d"
+
+#define PRIdMAX "I64d"
+
+#define PRIi8 "i"
+#define PRIi16 "i"
+#define PRIi32 "i"
+#define PRIi64 "I64i"
+
+#define PRIiLEAST8 "i"
+#define PRIiLEAST16 "i"
+#define PRIiLEAST32 "i"
+#define PRIiLEAST64 "I64i"
+
+#define PRIiFAST8 "i"
+#define PRIiFAST16 "i"
+#define PRIiFAST32 "i"
+#define PRIiFAST64 "I64i"
+
+#define PRIiMAX "I64i"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "I64o"
+
+#define PRIoLEAST8 "o"
+#define PRIoLEAST16 "o"
+#define PRIoLEAST32 "o"
+#define PRIoLEAST64 "I64o"
+
+#define PRIoFAST8 "o"
+#define PRIoFAST16 "o"
+#define PRIoFAST32 "o"
+#define PRIoFAST64 "I64o"
+
+#define PRIoMAX "I64o"
+
+/* fprintf macros for unsigned types */
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "I64u"
+
+
+#define PRIuLEAST8 "u"
+#define PRIuLEAST16 "u"
+#define PRIuLEAST32 "u"
+#define PRIuLEAST64 "I64u"
+
+#define PRIuFAST8 "u"
+#define PRIuFAST16 "u"
+#define PRIuFAST32 "u"
+#define PRIuFAST64 "I64u"
+
+#define PRIuMAX "I64u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "I64x"
+
+#define PRIxLEAST8 "x"
+#define PRIxLEAST16 "x"
+#define PRIxLEAST32 "x"
+#define PRIxLEAST64 "I64x"
+
+#define PRIxFAST8 "x"
+#define PRIxFAST16 "x"
+#define PRIxFAST32 "x"
+#define PRIxFAST64 "I64x"
+
+#define PRIxMAX "I64x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "I64X"
+
+#define PRIXLEAST8 "X"
+#define PRIXLEAST16 "X"
+#define PRIXLEAST32 "X"
+#define PRIXLEAST64 "I64X"
+
+#define PRIXFAST8 "X"
+#define PRIXFAST16 "X"
+#define PRIXFAST32 "X"
+#define PRIXFAST64 "I64X"
+
+#define PRIXMAX "I64X"
+
+/*
+ * fscanf macros for signed int types
+ * NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
+ * (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
+ * no length identifiers
+ */
+
+#define SCNd16 "hd"
+#define SCNd32 "d"
+#define SCNd64 "I64d"
+
+#define SCNdLEAST16 "hd"
+#define SCNdLEAST32 "d"
+#define SCNdLEAST64 "I64d"
+
+#define SCNdFAST16 "hd"
+#define SCNdFAST32 "d"
+#define SCNdFAST64 "I64d"
+
+#define SCNdMAX "I64d"
+
+#define SCNi16 "hi"
+#define SCNi32 "i"
+#define SCNi64 "I64i"
+
+#define SCNiLEAST16 "hi"
+#define SCNiLEAST32 "i"
+#define SCNiLEAST64 "I64i"
+
+#define SCNiFAST16 "hi"
+#define SCNiFAST32 "i"
+#define SCNiFAST64 "I64i"
+
+#define SCNiMAX "I64i"
+
+#define SCNo16 "ho"
+#define SCNo32 "o"
+#define SCNo64 "I64o"
+
+#define SCNoLEAST16 "ho"
+#define SCNoLEAST32 "o"
+#define SCNoLEAST64 "I64o"
+
+#define SCNoFAST16 "ho"
+#define SCNoFAST32 "o"
+#define SCNoFAST64 "I64o"
+
+#define SCNoMAX "I64o"
+
+#define SCNx16 "hx"
+#define SCNx32 "x"
+#define SCNx64 "I64x"
+
+#define SCNxLEAST16 "hx"
+#define SCNxLEAST32 "x"
+#define SCNxLEAST64 "I64x"
+
+#define SCNxFAST16 "hx"
+#define SCNxFAST32 "x"
+#define SCNxFAST64 "I64x"
+
+#define SCNxMAX "I64x"
+
+/* fscanf macros for unsigned int types */
+
+#define SCNu16 "hu"
+#define SCNu32 "u"
+#define SCNu64 "I64u"
+
+#define SCNuLEAST16 "hu"
+#define SCNuLEAST32 "u"
+#define SCNuLEAST64 "I64u"
+
+#define SCNuFAST16 "hu"
+#define SCNuFAST32 "u"
+#define SCNuFAST64 "I64u"
+
+#define SCNuMAX "I64u"
+
+#ifdef _WIN64
+#define PRIdPTR "I64d"
+#define PRIiPTR "I64i"
+#define PRIoPTR "I64o"
+#define PRIuPTR "I64u"
+#define PRIxPTR "I64x"
+#define PRIXPTR "I64X"
+#define SCNdPTR "I64d"
+#define SCNiPTR "I64i"
+#define SCNoPTR "I64o"
+#define SCNxPTR "I64x"
+#define SCNuPTR "I64u"
+#else
+#define PRIdPTR "d"
+#define PRIiPTR "i"
+#define PRIoPTR "o"
+#define PRIuPTR "u"
+#define PRIxPTR "x"
+#define PRIXPTR "X"
+#define SCNdPTR "d"
+#define SCNiPTR "i"
+#define SCNoPTR "o"
+#define SCNxPTR "x"
+#define SCNuPTR "u"
+#endif
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+/*
+ * no length modifier for char types prior to C9x
+ * MS runtime scanf appears to treat "hh" as "h"
+ */
+
+/* signed char */
+#define SCNd8 "hhd"
+#define SCNdLEAST8 "hhd"
+#define SCNdFAST8 "hhd"
+
+#define SCNi8 "hhi"
+#define SCNiLEAST8 "hhi"
+#define SCNiFAST8 "hhi"
+
+#define SCNo8 "hho"
+#define SCNoLEAST8 "hho"
+#define SCNoFAST8 "hho"
+
+#define SCNx8 "hhx"
+#define SCNxLEAST8 "hhx"
+#define SCNxFAST8 "hhx"
+
+/* unsigned char */
+#define SCNu8 "hhu"
+#define SCNuLEAST8 "hhu"
+#define SCNuFAST8 "hhu"
+#endif /* __STDC_VERSION__ >= 199901 */
+
+#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
+
+intmax_t __cdecl imaxabs (intmax_t j);
+__CRT_INLINE intmax_t __cdecl imaxabs (intmax_t j)
+ {return (j >= 0 ? j : -j);}
+imaxdiv_t __cdecl imaxdiv (intmax_t numer, intmax_t denom);
+
+/* 7.8.2 Conversion functions for greatest-width integer types */
+
+intmax_t __cdecl strtoimax (const char* __restrict__ nptr,
+ char** __restrict__ endptr, int base);
+uintmax_t __cdecl strtoumax (const char* __restrict__ nptr,
+ char** __restrict__ endptr, int base);
+
+intmax_t __cdecl wcstoimax (const wchar_t* __restrict__ nptr,
+ wchar_t** __restrict__ endptr, int base);
+uintmax_t __cdecl wcstoumax (const wchar_t* __restrict__ nptr,
+ wchar_t** __restrict__ endptr, int base);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ndef _INTTYPES_H */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/io.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/io.h
new file mode 100644
index 00000000..e2aeec3d
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/io.h
@@ -0,0 +1,418 @@
+
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _IO_H_
+#define _IO_H_
+
+#include <_mingw.h>
+#include
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifndef _POSIX_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_CRTIMP char* __cdecl _getcwd (char*, int);
+#ifndef _FSIZE_T_DEFINED
+ typedef unsigned long _fsize_t;
+#define _FSIZE_T_DEFINED
+#endif
+
+#ifndef _FINDDATA_T_DEFINED
+
+ struct _finddata32_t {
+ unsigned attrib;
+ __time32_t time_create;
+ __time32_t time_access;
+ __time32_t time_write;
+ _fsize_t size;
+ char name[260];
+ };
+
+/*#if _INTEGRAL_MAX_BITS >= 64*/
+
+ struct _finddata32i64_t {
+ unsigned attrib;
+ __time32_t time_create;
+ __time32_t time_access;
+ __time32_t time_write;
+ __int64 size;
+ char name[260];
+ };
+
+ struct _finddata64i32_t {
+ unsigned attrib;
+ __time64_t time_create;
+ __time64_t time_access;
+ __time64_t time_write;
+ _fsize_t size;
+ char name[260];
+ };
+
+ struct __finddata64_t {
+ unsigned attrib;
+ __time64_t time_create;
+ __time64_t time_access;
+ __time64_t time_write;
+ __int64 size;
+ char name[260];
+ };
+/* #endif */
+
+#ifdef _USE_32BIT_TIME_T
+#define _finddata_t _finddata32_t
+#define _finddatai64_t _finddata32i64_t
+
+#ifdef _WIN64
+#define _findfirst _findfirst32
+#define _findnext _findnext32
+#else
+#define _findfirst32 _findfirst
+#define _findnext32 _findnext
+#endif
+#define _findfirsti64 _findfirst32i64
+#define _findnexti64 _findnext32i64
+#else
+#define _finddata_t _finddata64i32_t
+#define _finddatai64_t __finddata64_t
+
+#define _findfirst _findfirst64i32
+#define _findnext _findnext64i32
+#define _findfirsti64 _findfirst64
+#define _findnexti64 _findnext64
+#endif
+
+#define _FINDDATA_T_DEFINED
+#endif
+
+#ifndef _WFINDDATA_T_DEFINED
+
+ struct _wfinddata32_t {
+ unsigned attrib;
+ __time32_t time_create;
+ __time32_t time_access;
+ __time32_t time_write;
+ _fsize_t size;
+ wchar_t name[260];
+ };
+
+/* #if _INTEGRAL_MAX_BITS >= 64 */
+
+ struct _wfinddata32i64_t {
+ unsigned attrib;
+ __time32_t time_create;
+ __time32_t time_access;
+ __time32_t time_write;
+ __int64 size;
+ wchar_t name[260];
+ };
+
+ struct _wfinddata64i32_t {
+ unsigned attrib;
+ __time64_t time_create;
+ __time64_t time_access;
+ __time64_t time_write;
+ _fsize_t size;
+ wchar_t name[260];
+ };
+
+ struct _wfinddata64_t {
+ unsigned attrib;
+ __time64_t time_create;
+ __time64_t time_access;
+ __time64_t time_write;
+ __int64 size;
+ wchar_t name[260];
+ };
+/* #endif */
+
+#ifdef _USE_32BIT_TIME_T
+#define _wfinddata_t _wfinddata32_t
+#define _wfinddatai64_t _wfinddata32i64_t
+
+#define _wfindfirst _wfindfirst32
+#define _wfindnext _wfindnext32
+#define _wfindfirsti64 _wfindfirst32i64
+#define _wfindnexti64 _wfindnext32i64
+#else
+#define _wfinddata_t _wfinddata64i32_t
+#define _wfinddatai64_t _wfinddata64_t
+
+#define _wfindfirst _wfindfirst64i32
+#define _wfindnext _wfindnext64i32
+#define _wfindfirsti64 _wfindfirst64
+#define _wfindnexti64 _wfindnext64
+#endif
+
+#define _WFINDDATA_T_DEFINED
+#endif
+
+#define _A_NORMAL 0x00
+#define _A_RDONLY 0x01
+#define _A_HIDDEN 0x02
+#define _A_SYSTEM 0x04
+#define _A_SUBDIR 0x10
+#define _A_ARCH 0x20
+
+#ifndef _SIZE_T_DEFINED
+#define _SIZE_T_DEFINED
+#undef size_t
+#ifdef _WIN64
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+ typedef unsigned int size_t __attribute__ ((mode (DI)));
+#else
+ typedef unsigned __int64 size_t;
+#endif
+#else
+ typedef unsigned int size_t;
+#endif
+#endif
+
+#ifndef _SSIZE_T_DEFINED
+#define _SSIZE_T_DEFINED
+#undef ssize_t
+#ifdef _WIN64
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+ typedef int ssize_t __attribute__ ((mode (DI)));
+#else
+ typedef __int64 ssize_t;
+#endif
+#else
+ typedef int ssize_t;
+#endif
+#endif
+
+#ifndef _OFF_T_DEFINED
+#define _OFF_T_DEFINED
+#ifndef _OFF_T_
+#define _OFF_T_
+ typedef long _off_t;
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+ typedef long off_t;
+#endif
+#endif
+#endif
+
+#ifndef _OFF64_T_DEFINED
+#define _OFF64_T_DEFINED
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+ typedef int _off64_t __attribute__ ((mode (DI)));
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+ typedef int off64_t __attribute__ ((mode (DI)));
+#endif
+#else
+ typedef long long _off64_t;
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+ typedef long long off64_t;
+#endif
+#endif
+#endif
+
+ /* Some defines for _access nAccessMode (MS doesn't define them, but
+ * it doesn't seem to hurt to add them). */
+#define F_OK 0 /* Check for file existence */
+#define X_OK 1 /* Check for execute permission. */
+#define W_OK 2 /* Check for write permission */
+#define R_OK 4 /* Check for read permission */
+
+ _CRTIMP int __cdecl _access(const char *_Filename,int _AccessMode);
+ _CRTIMP int __cdecl _chmod(const char *_Filename,int _Mode);
+ _CRTIMP int __cdecl _chsize(int _FileHandle,long _Size);
+ _CRTIMP int __cdecl _close(int _FileHandle);
+ _CRTIMP int __cdecl _commit(int _FileHandle);
+ _CRTIMP int __cdecl _creat(const char *_Filename,int _PermissionMode);
+ _CRTIMP int __cdecl _dup(int _FileHandle);
+ _CRTIMP int __cdecl _dup2(int _FileHandleSrc,int _FileHandleDst);
+ _CRTIMP int __cdecl _eof(int _FileHandle);
+ _CRTIMP long __cdecl _filelength(int _FileHandle);
+ _CRTIMP intptr_t __cdecl _findfirst32(const char *_Filename,struct _finddata32_t *_FindData);
+ _CRTIMP int __cdecl _findnext32(intptr_t _FindHandle,struct _finddata32_t *_FindData);
+ _CRTIMP int __cdecl _findclose(intptr_t _FindHandle);
+ _CRTIMP int __cdecl _isatty(int _FileHandle);
+ _CRTIMP int __cdecl _locking(int _FileHandle,int _LockMode,long _NumOfBytes);
+ _CRTIMP long __cdecl _lseek(int _FileHandle,long _Offset,int _Origin);
+ _off64_t lseek64(int fd,_off64_t offset, int whence);
+ _CRTIMP char *__cdecl _mktemp(char *_TemplateName);
+ _CRTIMP int __cdecl _pipe(int *_PtHandles,unsigned int _PipeSize,int _TextMode);
+ _CRTIMP int __cdecl _read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
+
+#ifndef _CRT_DIRECTORY_DEFINED
+#define _CRT_DIRECTORY_DEFINED
+ int __cdecl remove(const char *_Filename);
+ int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
+ _CRTIMP int __cdecl _unlink(const char *_Filename);
+#ifndef NO_OLDNAMES
+ int __cdecl unlink(const char *_Filename);
+#endif
+#endif
+
+ _CRTIMP int __cdecl _setmode(int _FileHandle,int _Mode);
+ _CRTIMP long __cdecl _tell(int _FileHandle);
+ _CRTIMP int __cdecl _umask(int _Mode);
+ _CRTIMP int __cdecl _write(int _FileHandle,const void *_Buf,unsigned int _MaxCharCount);
+
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP __int64 __cdecl _filelengthi64(int _FileHandle);
+ _CRTIMP intptr_t __cdecl _findfirst32i64(const char *_Filename,struct _finddata32i64_t *_FindData);
+ _CRTIMP intptr_t __cdecl _findfirst64(const char *_Filename,struct __finddata64_t *_FindData);
+#ifdef __cplusplus
+#include
+#endif
+ intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData);
+ __CRT_INLINE intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData)
+ {
+ struct __finddata64_t fd;
+ intptr_t ret = _findfirst64(_Filename,&fd);
+ _FindData->attrib=fd.attrib;
+ _FindData->time_create=fd.time_create;
+ _FindData->time_access=fd.time_access;
+ _FindData->time_write=fd.time_write;
+ _FindData->size=(_fsize_t) fd.size;
+ strncpy(_FindData->name,fd.name,260);
+ return ret;
+ }
+ _CRTIMP int __cdecl _findnext32i64(intptr_t _FindHandle,struct _finddata32i64_t *_FindData);
+ _CRTIMP int __cdecl _findnext64(intptr_t _FindHandle,struct __finddata64_t *_FindData);
+ int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData);
+ __CRT_INLINE int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData)
+ {
+ struct __finddata64_t fd;
+ int ret = _findnext64(_FindHandle,&fd);
+ _FindData->attrib=fd.attrib;
+ _FindData->time_create=fd.time_create;
+ _FindData->time_access=fd.time_access;
+ _FindData->time_write=fd.time_write;
+ _FindData->size=(_fsize_t) fd.size;
+ strncpy(_FindData->name,fd.name,260);
+ return ret;
+ }
+ __int64 __cdecl _lseeki64(int _FileHandle,__int64 _Offset,int _Origin);
+ __int64 __cdecl _telli64(int _FileHandle);
+#endif
+#ifndef NO_OLDNAMES
+
+#ifndef _UWIN
+ int __cdecl chdir (const char *);
+ char *__cdecl getcwd (char *, int);
+ int __cdecl mkdir (const char *);
+ char *__cdecl mktemp(char *);
+ int __cdecl rmdir (const char*);
+ int __cdecl chmod (const char *, int);
+#endif /* _UWIN */
+
+#endif /* Not NO_OLDNAMES */
+
+ _CRTIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode);
+
+#ifndef __cplusplus
+ _CRTIMP int __cdecl _open(const char *_Filename,int _OpenFlag,...);
+ _CRTIMP int __cdecl _sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...);
+#else
+ extern "C++" _CRTIMP int __cdecl _open(const char *_Filename,int _Openflag,int _PermissionMode = 0);
+ extern "C++" _CRTIMP int __cdecl _sopen(const char *_Filename,int _Openflag,int _ShareFlag,int _PermissionMode = 0);
+#endif
+
+#ifndef _WIO_DEFINED
+#define _WIO_DEFINED
+ _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
+ _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
+ _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode);
+ _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
+ _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
+ _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
+ _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename);
+ _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName);
+
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
+ intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
+ _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
+ _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
+ int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
+ _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
+#endif
+
+ _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
+
+#if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
+ _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
+ _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
+#else
+ extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
+ extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
+#endif
+
+#endif
+
+ int __cdecl __lock_fhandle(int _Filehandle);
+ void __cdecl _unlock_fhandle(int _Filehandle);
+ _CRTIMP intptr_t __cdecl _get_osfhandle(int _FileHandle);
+ _CRTIMP int __cdecl _open_osfhandle(intptr_t _OSFileHandle,int _Flags);
+
+#ifndef NO_OLDNAMES
+ int __cdecl access(const char *_Filename,int _AccessMode);
+ int __cdecl chmod(const char *_Filename,int _AccessMode);
+ int __cdecl chsize(int _FileHandle,long _Size);
+ int __cdecl close(int _FileHandle);
+ int __cdecl creat(const char *_Filename,int _PermissionMode);
+ int __cdecl dup(int _FileHandle);
+ int __cdecl dup2(int _FileHandleSrc,int _FileHandleDst);
+ int __cdecl eof(int _FileHandle);
+ long __cdecl filelength(int _FileHandle);
+ int __cdecl isatty(int _FileHandle);
+ int __cdecl locking(int _FileHandle,int _LockMode,long _NumOfBytes);
+ long __cdecl lseek(int _FileHandle,long _Offset,int _Origin);
+ char *__cdecl mktemp(char *_TemplateName);
+ int __cdecl open(const char *_Filename,int _OpenFlag,...);
+ int __cdecl read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
+ int __cdecl setmode(int _FileHandle,int _Mode);
+ int __cdecl sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...);
+ long __cdecl tell(int _FileHandle);
+ int __cdecl umask(int _Mode);
+ int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Misc stuff */
+char *getlogin(void);
+#ifdef __USE_MINGW_ALARM
+unsigned int alarm(unsigned int seconds);
+#endif
+
+#ifdef __USE_MINGW_ACCESS
+/* Old versions of MSVCRT access() just ignored X_OK, while the version
+ shipped with Vista, returns an error code. This will restore the
+ old behaviour */
+static inline int __mingw_access (const char *__fname, int __mode) {
+ return _access (__fname, __mode & ~X_OK);
+}
+
+#define access(__f,__m) __mingw_access (__f, __m)
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#pragma pack(pop)
+
+#include
+
+#endif /* End _IO_H_ */
+
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/limits.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/limits.h
new file mode 100644
index 00000000..fafb04a4
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/limits.h
@@ -0,0 +1,111 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#include <_mingw.h>
+
+#ifndef _INC_LIMITS
+#define _INC_LIMITS
+
+/*
+* File system limits
+*
+* TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
+* same as FILENAME_MAX and FOPEN_MAX from stdio.h?
+* NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
+* required for the NUL. TODO: Test?
+*/
+#define PATH_MAX (259)
+
+#define CHAR_BIT 8
+#define SCHAR_MIN (-128)
+#define SCHAR_MAX 127
+#define UCHAR_MAX 0xff
+
+#define CHAR_MIN SCHAR_MIN
+#define CHAR_MAX SCHAR_MAX
+
+#define MB_LEN_MAX 5
+#define SHRT_MIN (-32768)
+#define SHRT_MAX 32767
+#define USHRT_MAX 0xffff
+#define INT_MIN (-2147483647 - 1)
+#define INT_MAX 2147483647
+#define UINT_MAX 0xffffffff
+#define LONG_MIN (-2147483647L - 1)
+#define LONG_MAX 2147483647L
+#define ULONG_MAX 0xffffffffUL
+#define LLONG_MAX 9223372036854775807ll
+#define LLONG_MIN (-9223372036854775807ll - 1)
+#define ULLONG_MAX 0xffffffffffffffffull
+
+#if _INTEGRAL_MAX_BITS >= 8
+#define _I8_MIN (-127 - 1)
+#define _I8_MAX 127i8
+#define _UI8_MAX 0xffu
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 16
+#define _I16_MIN (-32767 - 1)
+#define _I16_MAX 32767i16
+#define _UI16_MAX 0xffffu
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 32
+#define _I32_MIN (-2147483647 - 1)
+#define _I32_MAX 2147483647
+#define _UI32_MAX 0xffffffffu
+#endif
+
+#if defined(__GNUC__)
+#undef LONG_LONG_MAX
+#define LONG_LONG_MAX 9223372036854775807ll
+#undef LONG_LONG_MIN
+#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
+#undef ULONG_LONG_MAX
+#define ULONG_LONG_MAX (2ull * LONG_LONG_MAX + 1ull)
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 64
+#define _I64_MIN (-9223372036854775807ll - 1)
+#define _I64_MAX 9223372036854775807ll
+#define _UI64_MAX 0xffffffffffffffffull
+#endif
+
+#ifndef SIZE_MAX
+#ifdef _WIN64
+#define SIZE_MAX _UI64_MAX
+#else
+#define SIZE_MAX UINT_MAX
+#endif
+#endif
+
+#ifdef _POSIX_
+#define _POSIX_ARG_MAX 4096
+#define _POSIX_CHILD_MAX 6
+#define _POSIX_LINK_MAX 8
+#define _POSIX_MAX_CANON 255
+#define _POSIX_MAX_INPUT 255
+#define _POSIX_NAME_MAX 14
+#define _POSIX_NGROUPS_MAX 0
+#define _POSIX_OPEN_MAX 16
+#define _POSIX_PATH_MAX 255
+#define _POSIX_PIPE_BUF 512
+#define _POSIX_SSIZE_MAX 32767
+#define _POSIX_STREAM_MAX 8
+#define _POSIX_TZNAME_MAX 3
+#define ARG_MAX 14500
+#define LINK_MAX 1024
+#define MAX_CANON _POSIX_MAX_CANON
+#define MAX_INPUT _POSIX_MAX_INPUT
+#define NAME_MAX 255
+#define NGROUPS_MAX 16
+#define OPEN_MAX 32
+#define PATH_MAX 512
+#define PIPE_BUF _POSIX_PIPE_BUF
+#define SSIZE_MAX _POSIX_SSIZE_MAX
+#define STREAM_MAX 20
+#define TZNAME_MAX 10
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/locale.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/locale.h
new file mode 100644
index 00000000..686aa9ba
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/locale.h
@@ -0,0 +1,91 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_LOCALE
+#define _INC_LOCALE
+
+#include <_mingw.h>
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#define LC_ALL 0
+#define LC_COLLATE 1
+#define LC_CTYPE 2
+#define LC_MONETARY 3
+#define LC_NUMERIC 4
+#define LC_TIME 5
+
+#define LC_MIN LC_ALL
+#define LC_MAX LC_TIME
+
+#ifndef _LCONV_DEFINED
+#define _LCONV_DEFINED
+ struct lconv {
+ char *decimal_point;
+ char *thousands_sep;
+ char *grouping;
+ char *int_curr_symbol;
+ char *currency_symbol;
+ char *mon_decimal_point;
+ char *mon_thousands_sep;
+ char *mon_grouping;
+ char *positive_sign;
+ char *negative_sign;
+ char int_frac_digits;
+ char frac_digits;
+ char p_cs_precedes;
+ char p_sep_by_space;
+ char n_cs_precedes;
+ char n_sep_by_space;
+ char p_sign_posn;
+ char n_sign_posn;
+ };
+#endif
+
+#ifndef _CONFIG_LOCALE_SWT
+#define _CONFIG_LOCALE_SWT
+
+#define _ENABLE_PER_THREAD_LOCALE 0x1
+#define _DISABLE_PER_THREAD_LOCALE 0x2
+#define _ENABLE_PER_THREAD_LOCALE_GLOBAL 0x10
+#define _DISABLE_PER_THREAD_LOCALE_GLOBAL 0x20
+#define _ENABLE_PER_THREAD_LOCALE_NEW 0x100
+#define _DISABLE_PER_THREAD_LOCALE_NEW 0x200
+
+#endif
+
+ int __cdecl _configthreadlocale(int _Flag);
+ char *__cdecl setlocale(int _Category,const char *_Locale);
+ _CRTIMP struct lconv *__cdecl localeconv(void);
+ _locale_t __cdecl _get_current_locale(void);
+ _locale_t __cdecl _create_locale(int _Category,const char *_Locale);
+ void __cdecl _free_locale(_locale_t _Locale);
+ _locale_t __cdecl __get_current_locale(void);
+ _locale_t __cdecl __create_locale(int _Category,const char *_Locale);
+ void __cdecl __free_locale(_locale_t _Locale);
+
+#ifndef _WLOCALE_DEFINED
+#define _WLOCALE_DEFINED
+ _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/malloc.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/malloc.h
new file mode 100644
index 00000000..fc783a8e
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/malloc.h
@@ -0,0 +1,181 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _MALLOC_H_
+#define _MALLOC_H_
+
+#include <_mingw.h>
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifndef _MM_MALLOC_H_INCLUDED
+#define _MM_MALLOC_H_INCLUDED
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef _WIN64
+#define _HEAP_MAXREQ 0xFFFFFFFFFFFFFFE0
+#else
+#define _HEAP_MAXREQ 0xFFFFFFE0
+#endif
+
+#ifndef _STATIC_ASSERT
+#define _STATIC_ASSERT(expr) extern void __static_assert_t(int [(expr)?1:-1])
+#endif
+
+/* Return codes for _heapwalk() */
+#define _HEAPEMPTY (-1)
+#define _HEAPOK (-2)
+#define _HEAPBADBEGIN (-3)
+#define _HEAPBADNODE (-4)
+#define _HEAPEND (-5)
+#define _HEAPBADPTR (-6)
+
+/* Values for _heapinfo.useflag */
+#define _FREEENTRY 0
+#define _USEDENTRY 1
+
+#ifndef _HEAPINFO_DEFINED
+#define _HEAPINFO_DEFINED
+ /* The structure used to walk through the heap with _heapwalk. */
+ typedef struct _heapinfo {
+ int *_pentry;
+ size_t _size;
+ int _useflag;
+ } _HEAPINFO;
+#endif
+
+ extern unsigned int _amblksiz;
+
+#define _mm_free(a) _aligned_free(a)
+#define _mm_malloc(a,b) _aligned_malloc(a,b)
+
+#ifndef _CRT_ALLOCATION_DEFINED
+#define _CRT_ALLOCATION_DEFINED
+ void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
+ void __cdecl free(void *_Memory);
+ void *__cdecl malloc(size_t _Size);
+ void *__cdecl realloc(void *_Memory,size_t _NewSize);
+ _CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size);
+ /* _CRTIMP void __cdecl _aligned_free(void *_Memory);
+ _CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment); */
+ _CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset);
+ _CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);
+ _CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment);
+ _CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset);
+ _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset);
+#endif
+
+#define _MAX_WAIT_MALLOC_CRT 60000
+
+ _CRTIMP int __cdecl _resetstkoflw (void);
+ _CRTIMP unsigned long __cdecl _set_malloc_crt_max_wait(unsigned long _NewValue);
+
+ _CRTIMP void *__cdecl _expand(void *_Memory,size_t _NewSize);
+ _CRTIMP size_t __cdecl _msize(void *_Memory);
+#ifdef __GNUC__
+#undef _alloca
+#define _alloca(x) __builtin_alloca((x))
+#else
+ /* tcc implements alloca internally and exposes it (since commit d778bde7).
+ /* alloca is declared at include/stddef.h (which is distributed with tcc).
+ */
+#ifdef _alloca
+#undef _alloca
+#endif
+#define _alloca(x) alloca((x))
+#endif
+ _CRTIMP size_t __cdecl _get_sbh_threshold(void);
+ _CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue);
+ _CRTIMP errno_t __cdecl _set_amblksiz(size_t _Value);
+ _CRTIMP errno_t __cdecl _get_amblksiz(size_t *_Value);
+ _CRTIMP int __cdecl _heapadd(void *_Memory,size_t _Size);
+ _CRTIMP int __cdecl _heapchk(void);
+ _CRTIMP int __cdecl _heapmin(void);
+ _CRTIMP int __cdecl _heapset(unsigned int _Fill);
+ _CRTIMP int __cdecl _heapwalk(_HEAPINFO *_EntryInfo);
+ _CRTIMP size_t __cdecl _heapused(size_t *_Used,size_t *_Commit);
+ _CRTIMP intptr_t __cdecl _get_heap_handle(void);
+
+#define _ALLOCA_S_THRESHOLD 1024
+#define _ALLOCA_S_STACK_MARKER 0xCCCC
+#define _ALLOCA_S_HEAP_MARKER 0xDDDD
+
+#if(defined(_X86_) && !defined(__x86_64))
+#define _ALLOCA_S_MARKER_SIZE 8
+#elif defined(__ia64__) || defined(__x86_64)
+#define _ALLOCA_S_MARKER_SIZE 16
+#endif
+
+#if !defined(RC_INVOKED)
+ static __inline void *_MarkAllocaS(void *_Ptr,unsigned int _Marker) {
+ if(_Ptr) {
+ *((unsigned int*)_Ptr) = _Marker;
+ _Ptr = (char*)_Ptr + _ALLOCA_S_MARKER_SIZE;
+ }
+ return _Ptr;
+ }
+#endif
+
+#undef _malloca
+#define _malloca(size) \
+ ((((size) + _ALLOCA_S_MARKER_SIZE) <= _ALLOCA_S_THRESHOLD) ? \
+ _MarkAllocaS(_alloca((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_STACK_MARKER) : \
+ _MarkAllocaS(malloc((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_HEAP_MARKER))
+#undef _FREEA_INLINE
+#define _FREEA_INLINE
+
+#ifndef RC_INVOKED
+#undef _freea
+ static __inline void __cdecl _freea(void *_Memory) {
+ unsigned int _Marker;
+ if(_Memory) {
+ _Memory = (char*)_Memory - _ALLOCA_S_MARKER_SIZE;
+ _Marker = *(unsigned int *)_Memory;
+ if(_Marker==_ALLOCA_S_HEAP_MARKER) {
+ free(_Memory);
+ }
+#ifdef _ASSERTE
+ else if(_Marker!=_ALLOCA_S_STACK_MARKER) {
+ _ASSERTE(("Corrupted pointer passed to _freea",0));
+ }
+#endif
+ }
+ }
+#endif /* RC_INVOKED */
+
+#ifndef NO_OLDNAMES
+#ifdef __GNUC__
+#undef alloca
+#define alloca(x) __builtin_alloca((x))
+#endif
+#endif
+
+#ifdef HEAPHOOK
+#ifndef _HEAPHOOK_DEFINED
+#define _HEAPHOOK_DEFINED
+ typedef int (__cdecl *_HEAPHOOK)(int,size_t,void *,void **);
+#endif
+
+ _CRTIMP _HEAPHOOK __cdecl _setheaphook(_HEAPHOOK _NewHook);
+
+#define _HEAP_MALLOC 1
+#define _HEAP_CALLOC 2
+#define _HEAP_FREE 3
+#define _HEAP_REALLOC 4
+#define _HEAP_MSIZE 5
+#define _HEAP_EXPAND 6
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+
+#endif /* _MALLOC_H_ */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/math.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/math.h
new file mode 100644
index 00000000..74add20e
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/math.h
@@ -0,0 +1,737 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _MATH_H_
+#define _MATH_H_
+
+#if __GNUC__ >= 3
+#pragma GCC system_header
+#endif
+
+#include <_mingw.h>
+
+struct exception;
+
+#pragma pack(push,_CRT_PACKING)
+
+#define _DOMAIN 1
+#define _SING 2
+#define _OVERFLOW 3
+#define _UNDERFLOW 4
+#define _TLOSS 5
+#define _PLOSS 6
+
+#ifndef __STRICT_ANSI__
+#ifndef NO_OLDNAMES
+#define DOMAIN _DOMAIN
+#define SING _SING
+#define OVERFLOW _OVERFLOW
+#define UNDERFLOW _UNDERFLOW
+#define TLOSS _TLOSS
+#define PLOSS _PLOSS
+#endif
+#endif
+
+#ifndef __STRICT_ANSI__
+#define M_E 2.71828182845904523536
+#define M_LOG2E 1.44269504088896340736
+#define M_LOG10E 0.434294481903251827651
+#define M_LN2 0.693147180559945309417
+#define M_LN10 2.30258509299404568402
+#define M_PI 3.14159265358979323846
+#define M_PI_2 1.57079632679489661923
+#define M_PI_4 0.785398163397448309616
+#define M_1_PI 0.318309886183790671538
+#define M_2_PI 0.636619772367581343076
+#define M_2_SQRTPI 1.12837916709551257390
+#define M_SQRT2 1.41421356237309504880
+#define M_SQRT1_2 0.707106781186547524401
+#endif
+
+#ifndef __STRICT_ANSI__
+/* See also float.h */
+#ifndef __MINGW_FPCLASS_DEFINED
+#define __MINGW_FPCLASS_DEFINED 1
+#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
+#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
+#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
+#define _FPCLASS_NN 0x0008 /* Negative Normal */
+#define _FPCLASS_ND 0x0010 /* Negative Denormal */
+#define _FPCLASS_NZ 0x0020 /* Negative Zero */
+#define _FPCLASS_PZ 0x0040 /* Positive Zero */
+#define _FPCLASS_PD 0x0080 /* Positive Denormal */
+#define _FPCLASS_PN 0x0100 /* Positive Normal */
+#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _EXCEPTION_DEFINED
+#define _EXCEPTION_DEFINED
+ struct _exception {
+ int type;
+ char *name;
+ double arg1;
+ double arg2;
+ double retval;
+ };
+#endif
+
+#ifndef _COMPLEX_DEFINED
+#define _COMPLEX_DEFINED
+ struct _complex {
+ double x,y;
+ };
+#endif
+
+#define EDOM 33
+#define ERANGE 34
+
+#ifndef _HUGE
+#ifdef _MSVCRT_
+ extern double *_HUGE;
+#else
+ extern double *_imp___HUGE;
+#define _HUGE (*_imp___HUGE)
+#endif
+#endif
+
+#define HUGE_VAL _HUGE
+
+#ifndef _CRT_ABS_DEFINED
+#define _CRT_ABS_DEFINED
+ int __cdecl abs(int _X);
+ long __cdecl labs(long _X);
+#endif
+ double __cdecl acos(double _X);
+ double __cdecl asin(double _X);
+ double __cdecl atan(double _X);
+ double __cdecl atan2(double _Y,double _X);
+#ifndef _SIGN_DEFINED
+#define _SIGN_DEFINED
+ _CRTIMP double __cdecl _copysign (double _Number,double _Sign);
+ _CRTIMP double __cdecl _chgsign (double _X);
+#endif
+ double __cdecl cos(double _X);
+ double __cdecl cosh(double _X);
+ double __cdecl exp(double _X);
+ double __cdecl expm1(double _X);
+ double __cdecl fabs(double _X);
+ double __cdecl fmod(double _X,double _Y);
+ double __cdecl log(double _X);
+ double __cdecl log10(double _X);
+ double __cdecl pow(double _X,double _Y);
+ double __cdecl sin(double _X);
+ double __cdecl sinh(double _X);
+ double __cdecl tan(double _X);
+ double __cdecl tanh(double _X);
+ double __cdecl sqrt(double _X);
+#ifndef _CRT_ATOF_DEFINED
+#define _CRT_ATOF_DEFINED
+ double __cdecl atof(const char *_String);
+ double __cdecl _atof_l(const char *_String,_locale_t _Locale);
+#endif
+
+ _CRTIMP double __cdecl _cabs(struct _complex _ComplexA);
+ double __cdecl ceil(double _X);
+ double __cdecl floor(double _X);
+ double __cdecl frexp(double _X,int *_Y);
+ double __cdecl _hypot(double _X,double _Y);
+ _CRTIMP double __cdecl _j0(double _X);
+ _CRTIMP double __cdecl _j1(double _X);
+ _CRTIMP double __cdecl _jn(int _X,double _Y);
+ double __cdecl ldexp(double _X,int _Y);
+#ifndef _CRT_MATHERR_DEFINED
+#define _CRT_MATHERR_DEFINED
+ int __cdecl _matherr(struct _exception *_Except);
+#endif
+ double __cdecl modf(double _X,double *_Y);
+ _CRTIMP double __cdecl _y0(double _X);
+ _CRTIMP double __cdecl _y1(double _X);
+ _CRTIMP double __cdecl _yn(int _X,double _Y);
+
+#if(defined(_X86_) && !defined(__x86_64))
+ _CRTIMP int __cdecl _set_SSE2_enable(int _Flag);
+ /* from libmingwex */
+ float __cdecl _hypotf(float _X,float _Y);
+#endif
+
+ float frexpf(float _X,int *_Y);
+ float __cdecl ldexpf(float _X,int _Y);
+ long double __cdecl ldexpl(long double _X,int _Y);
+ float __cdecl acosf(float _X);
+ float __cdecl asinf(float _X);
+ float __cdecl atanf(float _X);
+ float __cdecl atan2f(float _X,float _Y);
+ float __cdecl cosf(float _X);
+ float __cdecl sinf(float _X);
+ float __cdecl tanf(float _X);
+ float __cdecl coshf(float _X);
+ float __cdecl sinhf(float _X);
+ float __cdecl tanhf(float _X);
+ float __cdecl expf(float _X);
+ float __cdecl expm1f(float _X);
+ float __cdecl logf(float _X);
+ float __cdecl log10f(float _X);
+ float __cdecl modff(float _X,float *_Y);
+ float __cdecl powf(float _X,float _Y);
+ float __cdecl sqrtf(float _X);
+ float __cdecl ceilf(float _X);
+ float __cdecl floorf(float _X);
+ float __cdecl fmodf(float _X,float _Y);
+ float __cdecl _hypotf(float _X,float _Y);
+ float __cdecl fabsf(float _X);
+#if !defined(__ia64__)
+ /* from libmingwex */
+ float __cdecl _copysignf (float _Number,float _Sign);
+ float __cdecl _chgsignf (float _X);
+ float __cdecl _logbf(float _X);
+ float __cdecl _nextafterf(float _X,float _Y);
+ int __cdecl _finitef(float _X);
+ int __cdecl _isnanf(float _X);
+ int __cdecl _fpclassf(float _X);
+#endif
+
+#ifndef __cplusplus
+ __CRT_INLINE long double __cdecl fabsl (long double x)
+ {
+ long double res;
+ __asm__ ("fabs;" : "=t" (res) : "0" (x));
+ return res;
+ }
+#define _hypotl(x,y) ((long double)_hypot((double)(x),(double)(y)))
+#define _matherrl _matherr
+ __CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign((double)(_Number)); }
+ __CRT_INLINE long double _copysignl(long double _Number,long double _Sign) { return _copysign((double)(_Number),(double)(_Sign)); }
+ __CRT_INLINE float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); }
+
+#if !defined (__ia64__)
+ __CRT_INLINE float __cdecl fabsf (float x)
+ {
+ float res;
+ __asm__ ("fabs;" : "=t" (res) : "0" (x));
+ return res;
+ }
+
+ __CRT_INLINE float __cdecl ldexpf (float x, int expn) { return (float) ldexp (x, expn); }
+#endif
+#else
+ // cplusplus
+ __CRT_INLINE long double __cdecl fabsl (long double x)
+ {
+ long double res;
+ __asm__ ("fabs;" : "=t" (res) : "0" (x));
+ return res;
+ }
+ __CRT_INLINE long double modfl(long double _X,long double *_Y) {
+ double _Di,_Df = modf((double)_X,&_Di);
+ *_Y = (long double)_Di;
+ return (_Df);
+ }
+ __CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign(static_cast(_Number)); }
+ __CRT_INLINE long double _copysignl(long double _Number,long double _Sign) { return _copysign(static_cast(_Number),static_cast(_Sign)); }
+ __CRT_INLINE float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); }
+#ifndef __ia64__
+ __CRT_INLINE float __cdecl fabsf (float x)
+ {
+ float res;
+ __asm__ ("fabs;" : "=t" (res) : "0" (x));
+ return res;
+ }
+ __CRT_INLINE float __cdecl ldexpf (float x, int expn) { return (float) ldexp (x, expn); }
+#ifndef __x86_64
+ __CRT_INLINE float acosf(float _X) { return ((float)acos((double)_X)); }
+ __CRT_INLINE float asinf(float _X) { return ((float)asin((double)_X)); }
+ __CRT_INLINE float atanf(float _X) { return ((float)atan((double)_X)); }
+ __CRT_INLINE float atan2f(float _X,float _Y) { return ((float)atan2((double)_X,(double)_Y)); }
+ __CRT_INLINE float ceilf(float _X) { return ((float)ceil((double)_X)); }
+ __CRT_INLINE float cosf(float _X) { return ((float)cos((double)_X)); }
+ __CRT_INLINE float coshf(float _X) { return ((float)cosh((double)_X)); }
+ __CRT_INLINE float expf(float _X) { return ((float)exp((double)_X)); }
+ __CRT_INLINE float floorf(float _X) { return ((float)floor((double)_X)); }
+ __CRT_INLINE float fmodf(float _X,float _Y) { return ((float)fmod((double)_X,(double)_Y)); }
+ __CRT_INLINE float logf(float _X) { return ((float)log((double)_X)); }
+ __CRT_INLINE float log10f(float _X) { return ((float)log10((double)_X)); }
+ __CRT_INLINE float modff(float _X,float *_Y) {
+ double _Di,_Df = modf((double)_X,&_Di);
+ *_Y = (float)_Di;
+ return ((float)_Df);
+ }
+ __CRT_INLINE float powf(float _X,float _Y) { return ((float)pow((double)_X,(double)_Y)); }
+ __CRT_INLINE float sinf(float _X) { return ((float)sin((double)_X)); }
+ __CRT_INLINE float sinhf(float _X) { return ((float)sinh((double)_X)); }
+ __CRT_INLINE float sqrtf(float _X) { return ((float)sqrt((double)_X)); }
+ __CRT_INLINE float tanf(float _X) { return ((float)tan((double)_X)); }
+ __CRT_INLINE float tanhf(float _X) { return ((float)tanh((double)_X)); }
+#endif
+#endif
+#endif
+
+#ifndef NO_OLDNAMES
+#define matherr _matherr
+
+#define HUGE _HUGE
+ /* double __cdecl cabs(struct _complex _X); */
+ double __cdecl hypot(double _X,double _Y);
+ _CRTIMP double __cdecl j0(double _X);
+ _CRTIMP double __cdecl j1(double _X);
+ _CRTIMP double __cdecl jn(int _X,double _Y);
+ _CRTIMP double __cdecl y0(double _X);
+ _CRTIMP double __cdecl y1(double _X);
+ _CRTIMP double __cdecl yn(int _X,double _Y);
+#endif
+
+#ifndef __NO_ISOCEXT
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined __STRICT_ANSI__ || defined __GLIBCPP__
+
+#define NAN (0.0F/0.0F)
+#define HUGE_VALF (1.0F/0.0F)
+#define HUGE_VALL (1.0L/0.0L)
+#define INFINITY (1.0F/0.0F)
+
+
+#define FP_NAN 0x0100
+#define FP_NORMAL 0x0400
+#define FP_INFINITE (FP_NAN | FP_NORMAL)
+#define FP_ZERO 0x4000
+#define FP_SUBNORMAL (FP_NORMAL | FP_ZERO)
+ /* 0x0200 is signbit mask */
+
+
+ /*
+ We can't __CRT_INLINE float or double, because we want to ensure truncation
+ to semantic type before classification.
+ (A normal long double value might become subnormal when
+ converted to double, and zero when converted to float.)
+ */
+
+ extern int __cdecl __fpclassifyf (float);
+ extern int __cdecl __fpclassify (double);
+ extern int __cdecl __fpclassifyl (long double);
+
+/* Implemented at tcc/tcc_libm.h */
+#define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) \
+ : sizeof (x) == sizeof (double) ? __fpclassify (x) \
+ : __fpclassifyl (x))
+
+ /* 7.12.3.2 */
+#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
+
+ /* 7.12.3.3 */
+#define isinf(x) (fpclassify(x) == FP_INFINITE)
+
+ /* 7.12.3.4 */
+ /* We don't need to worry about truncation here:
+ A NaN stays a NaN. */
+#define isnan(x) (fpclassify(x) == FP_NAN)
+
+ /* 7.12.3.5 */
+#define isnormal(x) (fpclassify(x) == FP_NORMAL)
+
+ /* 7.12.3.6 The signbit macro */
+
+ extern int __cdecl __signbitf (float);
+ extern int __cdecl __signbit (double);
+ extern int __cdecl __signbitl (long double);
+
+/* Implemented at tcc/tcc_libm.h */
+#define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) \
+ : sizeof (x) == sizeof (double) ? __signbit (x) \
+ : __signbitl (x))
+
+ extern double __cdecl exp2(double);
+ extern float __cdecl exp2f(float);
+ extern long double __cdecl exp2l(long double);
+
+#define FP_ILOGB0 ((int)0x80000000)
+#define FP_ILOGBNAN ((int)0x80000000)
+ extern int __cdecl ilogb (double);
+ extern int __cdecl ilogbf (float);
+ extern int __cdecl ilogbl (long double);
+
+ extern double __cdecl log1p(double);
+ extern float __cdecl log1pf(float);
+ extern long double __cdecl log1pl(long double);
+
+ extern double __cdecl log2 (double);
+ extern float __cdecl log2f (float);
+ extern long double __cdecl log2l (long double);
+
+ extern double __cdecl logb (double);
+ extern float __cdecl logbf (float);
+ extern long double __cdecl logbl (long double);
+
+ __CRT_INLINE double __cdecl logb (double x)
+ {
+ double res;
+ __asm__ ("fxtract\n\t"
+ "fstp %%st" : "=t" (res) : "0" (x));
+ return res;
+ }
+
+ __CRT_INLINE float __cdecl logbf (float x)
+ {
+ float res;
+ __asm__ ("fxtract\n\t"
+ "fstp %%st" : "=t" (res) : "0" (x));
+ return res;
+ }
+
+ __CRT_INLINE long double __cdecl logbl (long double x)
+ {
+ long double res;
+ __asm__ ("fxtract\n\t"
+ "fstp %%st" : "=t" (res) : "0" (x));
+ return res;
+ }
+
+ extern long double __cdecl modfl (long double, long double*);
+
+ /* 7.12.6.13 */
+ extern double __cdecl scalbn (double, int);
+ extern float __cdecl scalbnf (float, int);
+ extern long double __cdecl scalbnl (long double, int);
+
+ extern double __cdecl scalbln (double, long);
+ extern float __cdecl scalblnf (float, long);
+ extern long double __cdecl scalblnl (long double, long);
+
+ /* 7.12.7.1 */
+ /* Implementations adapted from Cephes versions */
+ extern double __cdecl cbrt (double);
+ extern float __cdecl cbrtf (float);
+ extern long double __cdecl cbrtl (long double);
+
+ __CRT_INLINE float __cdecl hypotf (float x, float y)
+ { return (float) hypot (x, y);}
+ extern long double __cdecl hypotl (long double, long double);
+
+ extern long double __cdecl powl (long double, long double);
+ extern long double __cdecl expl(long double);
+ extern long double __cdecl expm1l(long double);
+ extern long double __cdecl coshl(long double);
+ extern long double __cdecl fabsl (long double);
+ extern long double __cdecl acosl(long double);
+ extern long double __cdecl asinl(long double);
+ extern long double __cdecl atanl(long double);
+ extern long double __cdecl atan2l(long double,long double);
+ extern long double __cdecl sinhl(long double);
+ extern long double __cdecl tanhl(long double);
+
+ /* 7.12.8.1 The erf functions */
+ extern double __cdecl erf (double);
+ extern float __cdecl erff (float);
+ /* TODO
+ extern long double __cdecl erfl (long double);
+ */
+
+ /* 7.12.8.2 The erfc functions */
+ extern double __cdecl erfc (double);
+ extern float __cdecl erfcf (float);
+ /* TODO
+ extern long double __cdecl erfcl (long double);
+ */
+
+ /* 7.12.8.3 The lgamma functions */
+ extern double __cdecl lgamma (double);
+ extern float __cdecl lgammaf (float);
+ extern long double __cdecl lgammal (long double);
+
+ /* 7.12.8.4 The tgamma functions */
+ extern double __cdecl tgamma (double);
+ extern float __cdecl tgammaf (float);
+ extern long double __cdecl tgammal (long double);
+
+ extern long double __cdecl ceill (long double);
+ extern long double __cdecl floorl (long double);
+ extern long double __cdecl frexpl(long double,int *);
+ extern long double __cdecl log10l(long double);
+ extern long double __cdecl logl(long double);
+ extern long double __cdecl cosl(long double);
+ extern long double __cdecl sinl(long double);
+ extern long double __cdecl tanl(long double);
+ extern long double sqrtl(long double);
+
+ /* 7.12.9.3 */
+ extern double __cdecl nearbyint ( double);
+ extern float __cdecl nearbyintf (float);
+ extern long double __cdecl nearbyintl (long double);
+
+ /* 7.12.9.4 */
+ /* round, using fpu control word settings */
+ __CRT_INLINE double __cdecl rint (double x)
+ {
+ double retval;
+ __asm__ (
+ "fldl %1\n"
+ "frndint \n"
+ "fstl %0\n" : "=m" (retval) : "m" (x));
+ return retval;
+ }
+
+ __CRT_INLINE float __cdecl rintf (float x)
+ {
+ float retval;
+ __asm__ (
+ "flds %1\n"
+ "frndint \n"
+ "fsts %0\n" : "=m" (retval) : "m" (x));
+ return retval;
+ }
+
+ __CRT_INLINE long double __cdecl rintl (long double x)
+ {
+ long double retval;
+ __asm__ (
+ "fldt %1\n"
+ "frndint \n"
+ "fstt %0\n" : "=m" (retval) : "m" (x));
+ return retval;
+ }
+
+ /* 7.12.9.5 */
+ __CRT_INLINE long __cdecl lrint (double x)
+ {
+ long retval;
+ __asm__ __volatile__ \
+ ("fldl %1\n" \
+ "fistpl %0" : "=m" (retval) : "m" (x)); \
+ return retval;
+ }
+
+ __CRT_INLINE long __cdecl lrintf (float x)
+ {
+ long retval;
+ __asm__ __volatile__ \
+ ("flds %1\n" \
+ "fistpl %0" : "=m" (retval) : "m" (x)); \
+ return retval;
+ }
+
+ __CRT_INLINE long __cdecl lrintl (long double x)
+ {
+ long retval;
+ __asm__ __volatile__ \
+ ("fldt %1\n" \
+ "fistpl %0" : "=m" (retval) : "m" (x)); \
+ return retval;
+ }
+
+ __CRT_INLINE long long __cdecl llrint (double x)
+ {
+ long long retval;
+ __asm__ __volatile__ \
+ ("fldl %1\n" \
+ "fistpll %0" : "=m" (retval) : "m" (x)); \
+ return retval;
+ }
+
+ __CRT_INLINE long long __cdecl llrintf (float x)
+ {
+ long long retval;
+ __asm__ __volatile__ \
+ ("flds %1\n" \
+ "fistpll %0" : "=m" (retval) : "m" (x)); \
+ return retval;
+ }
+
+ __CRT_INLINE long long __cdecl llrintl (long double x)
+ {
+ long long retval;
+ __asm__ __volatile__ \
+ ("fldt %1\n" \
+ "fistpll %0" : "=m" (retval) : "m" (x)); \
+ return retval;
+ }
+
+ #define FE_TONEAREST 0x0000
+ #define FE_DOWNWARD 0x0400
+ #define FE_UPWARD 0x0800
+ #define FE_TOWARDZERO 0x0c00
+
+ __CRT_INLINE double trunc (double _x)
+ {
+ double retval;
+ unsigned short saved_cw;
+ unsigned short tmp_cw;
+ __asm__ ("fnstcw %0;" : "=m" (saved_cw)); /* save FPU control word */
+ tmp_cw = (saved_cw & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO))
+ | FE_TOWARDZERO;
+ __asm__ ("fldcw %0;" : : "m" (tmp_cw));
+ __asm__ ("fldl %1;"
+ "frndint;"
+ "fstl %0;" : "=m" (retval) : "m" (_x)); /* round towards zero */
+ __asm__ ("fldcw %0;" : : "m" (saved_cw) ); /* restore saved control word */
+ return retval;
+ }
+
+ /* 7.12.9.6 */
+ /* round away from zero, regardless of fpu control word settings */
+ extern double __cdecl round (double);
+ extern float __cdecl roundf (float);
+ extern long double __cdecl roundl (long double);
+
+ /* 7.12.9.7 */
+ extern long __cdecl lround (double);
+ extern long __cdecl lroundf (float);
+ extern long __cdecl lroundl (long double);
+
+ extern long long __cdecl llround (double);
+ extern long long __cdecl llroundf (float);
+ extern long long __cdecl llroundl (long double);
+
+ /* 7.12.9.8 */
+ /* round towards zero, regardless of fpu control word settings */
+ extern double __cdecl trunc (double);
+ extern float __cdecl truncf (float);
+ extern long double __cdecl truncl (long double);
+
+ extern long double __cdecl fmodl (long double, long double);
+
+ /* 7.12.10.2 */
+ extern double __cdecl remainder (double, double);
+ extern float __cdecl remainderf (float, float);
+ extern long double __cdecl remainderl (long double, long double);
+
+ /* 7.12.10.3 */
+ extern double __cdecl remquo(double, double, int *);
+ extern float __cdecl remquof(float, float, int *);
+ extern long double __cdecl remquol(long double, long double, int *);
+
+ /* 7.12.11.1 */
+ extern double __cdecl copysign (double, double); /* in libmoldname.a */
+ extern float __cdecl copysignf (float, float);
+ extern long double __cdecl copysignl (long double, long double);
+
+ /* 7.12.11.2 Return a NaN */
+ extern double __cdecl nan(const char *tagp);
+ extern float __cdecl nanf(const char *tagp);
+ extern long double __cdecl nanl(const char *tagp);
+
+#ifndef __STRICT_ANSI__
+#define _nan() nan("")
+#define _nanf() nanf("")
+#define _nanl() nanl("")
+#endif
+
+ /* 7.12.11.3 */
+ extern double __cdecl nextafter (double, double); /* in libmoldname.a */
+ extern float __cdecl nextafterf (float, float);
+ extern long double __cdecl nextafterl (long double, long double);
+
+ /* 7.12.11.4 The nexttoward functions: TODO */
+
+ /* 7.12.12.1 */
+ /* x > y ? (x - y) : 0.0 */
+ extern double __cdecl fdim (double x, double y);
+ extern float __cdecl fdimf (float x, float y);
+ extern long double __cdecl fdiml (long double x, long double y);
+
+ /* fmax and fmin.
+ NaN arguments are treated as missing data: if one argument is a NaN
+ and the other numeric, then these functions choose the numeric
+ value. */
+
+ /* 7.12.12.2 */
+ extern double __cdecl fmax (double, double);
+ extern float __cdecl fmaxf (float, float);
+ extern long double __cdecl fmaxl (long double, long double);
+
+ /* 7.12.12.3 */
+ extern double __cdecl fmin (double, double);
+ extern float __cdecl fminf (float, float);
+ extern long double __cdecl fminl (long double, long double);
+
+ /* 7.12.13.1 */
+ /* return x * y + z as a ternary op */
+ extern double __cdecl fma (double, double, double);
+ extern float __cdecl fmaf (float, float, float);
+ extern long double __cdecl fmal (long double, long double, long double);
+
+
+#if 0 // gr: duplicate, see below
+ /* 7.12.14 */
+ /*
+ * With these functions, comparisons involving quiet NaNs set the FP
+ * condition code to "unordered". The IEEE floating-point spec
+ * dictates that the result of floating-point comparisons should be
+ * false whenever a NaN is involved, with the exception of the != op,
+ * which always returns true: yes, (NaN != NaN) is true).
+ */
+
+#if __GNUC__ >= 3
+
+#define isgreater(x, y) __builtin_isgreater(x, y)
+#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
+#define isless(x, y) __builtin_isless(x, y)
+#define islessequal(x, y) __builtin_islessequal(x, y)
+#define islessgreater(x, y) __builtin_islessgreater(x, y)
+#define isunordered(x, y) __builtin_isunordered(x, y)
+
+#else
+ /* helper */
+ __CRT_INLINE int __cdecl
+ __fp_unordered_compare (long double x, long double y){
+ unsigned short retval;
+ __asm__ ("fucom %%st(1);"
+ "fnstsw;": "=a" (retval) : "t" (x), "u" (y));
+ return retval;
+ }
+
+#define isgreater(x, y) ((__fp_unordered_compare(x, y) \
+ & 0x4500) == 0)
+#define isless(x, y) ((__fp_unordered_compare (y, x) \
+ & 0x4500) == 0)
+#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
+ & FP_INFINITE) == 0)
+#define islessequal(x, y) ((__fp_unordered_compare(y, x) \
+ & FP_INFINITE) == 0)
+#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
+ & FP_SUBNORMAL) == 0)
+#define isunordered(x, y) ((__fp_unordered_compare(x, y) \
+ & 0x4500) == 0x4500)
+
+#endif
+#endif //0
+
+
+#endif /* __STDC_VERSION__ >= 199901L */
+#endif /* __NO_ISOCEXT */
+
+#ifdef __cplusplus
+}
+extern "C++" {
+ template inline _Ty _Pow_int(_Ty _X,int _Y) {
+ unsigned int _N;
+ if(_Y >= 0) _N = (unsigned int)_Y;
+ else _N = (unsigned int)(-_Y);
+ for(_Ty _Z = _Ty(1);;_X *= _X) {
+ if((_N & 1)!=0) _Z *= _X;
+ if((_N >>= 1)==0) return (_Y < 0 ? _Ty(1) / _Z : _Z);
+ }
+ }
+}
+#endif
+
+#pragma pack(pop)
+
+/* 7.12.14 */
+/*
+ * With these functions, comparisons involving quiet NaNs set the FP
+ * condition code to "unordered". The IEEE floating-point spec
+ * dictates that the result of floating-point comparisons should be
+ * false whenever a NaN is involved, with the exception of the != op,
+ * which always returns true: yes, (NaN != NaN) is true).
+ */
+
+/* Mini libm (inline __fpclassify*, __signbit* and variants) */
+#include "tcc/tcc_libm.h"
+
+#endif /* End _MATH_H_ */
+
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/mem.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/mem.h
new file mode 100644
index 00000000..25520235
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/mem.h
@@ -0,0 +1,13 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+/*
+ * This file is part of the Mingw32 package.
+ *
+ * mem.h maps to string.h
+ */
+#ifndef __STRICT_ANSI__
+#include
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/memory.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/memory.h
new file mode 100644
index 00000000..90d88aed
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/memory.h
@@ -0,0 +1,40 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_MEMORY
+#define _INC_MEMORY
+
+#include <_mingw.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _CONST_RETURN
+#define _CONST_RETURN
+#endif
+
+#define _WConst_return _CONST_RETURN
+
+#ifndef _CRT_MEMORY_DEFINED
+#define _CRT_MEMORY_DEFINED
+ _CRTIMP void *__cdecl _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount);
+ _CONST_RETURN void *__cdecl memchr(const void *_Buf ,int _Val,size_t _MaxCount);
+ _CRTIMP int __cdecl _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
+ _CRTIMP int __cdecl _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale);
+ int __cdecl memcmp(const void *_Buf1,const void *_Buf2,size_t _Size);
+ void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _Size);
+ void *__cdecl memset(void *_Dst,int _Val,size_t _Size);
+
+#ifndef NO_OLDNAMES
+ void *__cdecl memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size);
+ int __cdecl memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/process.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/process.h
new file mode 100644
index 00000000..dadaf2b7
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/process.h
@@ -0,0 +1,176 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_PROCESS
+#define _INC_PROCESS
+
+#include <_mingw.h>
+
+/* Includes a definition of _pid_t and pid_t */
+#include
+
+#ifndef _POSIX_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define _P_WAIT 0
+#define _P_NOWAIT 1
+#define _OLD_P_OVERLAY 2
+#define _P_NOWAITO 3
+#define _P_DETACH 4
+#define _P_OVERLAY 2
+
+#define _WAIT_CHILD 0
+#define _WAIT_GRANDCHILD 1
+
+ _CRTIMP uintptr_t __cdecl _beginthread(void (__cdecl *_StartAddress) (void *),unsigned _StackSize,void *_ArgList);
+ _CRTIMP void __cdecl _endthread(void);
+ _CRTIMP uintptr_t __cdecl _beginthreadex(void *_Security,unsigned _StackSize,unsigned (__stdcall *_StartAddress) (void *),void *_ArgList,unsigned _InitFlag,unsigned *_ThrdAddr);
+ _CRTIMP void __cdecl _endthreadex(unsigned _Retval);
+
+#ifndef _CRT_TERMINATE_DEFINED
+#define _CRT_TERMINATE_DEFINED
+ void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
+ _CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
+
+#pragma push_macro("abort")
+#undef abort
+ void __cdecl __declspec(noreturn) abort(void);
+#pragma pop_macro("abort")
+
+#endif
+
+ _CRTIMP void __cdecl __MINGW_NOTHROW _cexit(void);
+ _CRTIMP void __cdecl __MINGW_NOTHROW _c_exit(void);
+ _CRTIMP int __cdecl _getpid(void);
+ _CRTIMP intptr_t __cdecl _cwait(int *_TermStat,intptr_t _ProcHandle,int _Action);
+ _CRTIMP intptr_t __cdecl _execl(const char *_Filename,const char *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _execle(const char *_Filename,const char *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _execlp(const char *_Filename,const char *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _execlpe(const char *_Filename,const char *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _execv(const char *_Filename,const char *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _execve(const char *_Filename,const char *const *_ArgList,const char *const *_Env);
+ _CRTIMP intptr_t __cdecl _execvp(const char *_Filename,const char *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _execvpe(const char *_Filename,const char *const *_ArgList,const char *const *_Env);
+ _CRTIMP intptr_t __cdecl _spawnl(int _Mode,const char *_Filename,const char *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _spawnle(int _Mode,const char *_Filename,const char *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _spawnlp(int _Mode,const char *_Filename,const char *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _spawnlpe(int _Mode,const char *_Filename,const char *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
+ _CRTIMP intptr_t __cdecl _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
+
+#ifndef _CRT_SYSTEM_DEFINED
+#define _CRT_SYSTEM_DEFINED
+ int __cdecl system(const char *_Command);
+#endif
+
+#ifndef _WPROCESS_DEFINED
+#define _WPROCESS_DEFINED
+ _CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
+ _CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
+ _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
+ _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
+#ifndef _CRT_WSYSTEM_DEFINED
+#define _CRT_WSYSTEM_DEFINED
+ _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
+#endif
+#endif
+
+ void __cdecl __security_init_cookie(void);
+#if (defined(_X86_) && !defined(__x86_64))
+ void __fastcall __security_check_cookie(uintptr_t _StackCookie);
+ __declspec(noreturn) void __cdecl __report_gsfailure(void);
+#else
+ void __cdecl __security_check_cookie(uintptr_t _StackCookie);
+ __declspec(noreturn) void __cdecl __report_gsfailure(uintptr_t _StackCookie);
+#endif
+ extern uintptr_t __security_cookie;
+
+ intptr_t __cdecl _loaddll(char *_Filename);
+ int __cdecl _unloaddll(intptr_t _Handle);
+ int (__cdecl *__cdecl _getdllprocaddr(intptr_t _Handle,char *_ProcedureName,intptr_t _Ordinal))(void);
+
+#ifdef _DECL_DLLMAIN
+#ifdef _WINDOWS_
+ WINBOOL WINAPI DllMain(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved);
+ WINBOOL WINAPI _CRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved);
+ WINBOOL WINAPI _wCRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved);
+ extern WINBOOL (WINAPI *const _pRawDllMain)(HANDLE,DWORD,LPVOID);
+#else
+ int __stdcall DllMain(void *_HDllHandle,unsigned _Reason,void *_Reserved);
+ int __stdcall _CRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved);
+ int __stdcall _wCRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved);
+ extern int (__stdcall *const _pRawDllMain)(void *,unsigned,void *);
+#endif
+#endif
+
+#ifndef NO_OLDNAMES
+#define P_WAIT _P_WAIT
+#define P_NOWAIT _P_NOWAIT
+#define P_OVERLAY _P_OVERLAY
+#define OLD_P_OVERLAY _OLD_P_OVERLAY
+#define P_NOWAITO _P_NOWAITO
+#define P_DETACH _P_DETACH
+#define WAIT_CHILD _WAIT_CHILD
+#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
+
+ intptr_t __cdecl cwait(int *_TermStat,intptr_t _ProcHandle,int _Action);
+#ifdef __GNUC__
+ int __cdecl execl(const char *_Filename,const char *_ArgList,...);
+ int __cdecl execle(const char *_Filename,const char *_ArgList,...);
+ int __cdecl execlp(const char *_Filename,const char *_ArgList,...);
+ int __cdecl execlpe(const char *_Filename,const char *_ArgList,...);
+#else
+ intptr_t __cdecl execl(const char *_Filename,const char *_ArgList,...);
+ intptr_t __cdecl execle(const char *_Filename,const char *_ArgList,...);
+ intptr_t __cdecl execlp(const char *_Filename,const char *_ArgList,...);
+ intptr_t __cdecl execlpe(const char *_Filename,const char *_ArgList,...);
+#endif
+ intptr_t __cdecl spawnl(int,const char *_Filename,const char *_ArgList,...);
+ intptr_t __cdecl spawnle(int,const char *_Filename,const char *_ArgList,...);
+ intptr_t __cdecl spawnlp(int,const char *_Filename,const char *_ArgList,...);
+ intptr_t __cdecl spawnlpe(int,const char *_Filename,const char *_ArgList,...);
+ int __cdecl getpid(void);
+#ifdef __GNUC__
+ /* Those methods are predefined by gcc builtins to return int. So to prevent
+ stupid warnings, define them in POSIX way. This is save, because those
+ methods do not return in success case, so that the return value is not
+ really dependent to its scalar width. */
+ int __cdecl execv(const char *_Filename,const char *const _ArgList[]);
+ int __cdecl execve(const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
+ int __cdecl execvp(const char *_Filename,const char *const _ArgList[]);
+ int __cdecl execvpe(const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
+#else
+ intptr_t __cdecl execv(const char *_Filename,const char *const _ArgList[]);
+ intptr_t __cdecl execve(const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
+ intptr_t __cdecl execvp(const char *_Filename,const char *const _ArgList[]);
+ intptr_t __cdecl execvpe(const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
+#endif
+ intptr_t __cdecl spawnv(int,const char *_Filename,const char *const _ArgList[]);
+ intptr_t __cdecl spawnve(int,const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
+ intptr_t __cdecl spawnvp(int,const char *_Filename,const char *const _ArgList[]);
+ intptr_t __cdecl spawnvpe(int,const char *_Filename,const char *const _ArgList[],char *const _Env[]);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/conio_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/conio_s.h
new file mode 100644
index 00000000..98d97ba2
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/conio_s.h
@@ -0,0 +1,42 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#ifndef _INC_CONIO_S
+#define _INC_CONIO_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ _CRTIMP errno_t __cdecl _cgets_s(char *_Buffer,size_t _Size,size_t *_SizeRead);
+ _CRTIMP int __cdecl _cprintf_s(const char *_Format,...);
+ _CRTIMP int __cdecl _cscanf_s(const char *_Format,...);
+ _CRTIMP int __cdecl _cscanf_s_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcprintf_s(const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _cprintf_s_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
+
+#ifndef _WCONIO_DEFINED_S
+#define _WCONIO_DEFINED_S
+ _CRTIMP errno_t __cdecl _cgetws_s(wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead);
+ _CRTIMP int __cdecl _cwprintf_s(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _cwscanf_s(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf_s(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _cwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/crtdbg_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/crtdbg_s.h
new file mode 100644
index 00000000..4598b4f7
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/crtdbg_s.h
@@ -0,0 +1,19 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#ifndef _INC_CRTDBG_S
+#define _INC_CRTDBG_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#define _dupenv_s_dbg(ps1,size,s2,t,f,l) _dupenv_s(ps1,size,s2)
+#define _wdupenv_s_dbg(ps1,size,s2,t,f,l) _wdupenv_s(ps1,size,s2)
+
+#endif
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/io_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/io_s.h
new file mode 100644
index 00000000..ec565a61
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/io_s.h
@@ -0,0 +1,33 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_IO_S
+#define _INC_IO_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ _CRTIMP errno_t __cdecl _access_s(const char *_Filename,int _AccessMode);
+ _CRTIMP errno_t __cdecl _chsize_s(int _FileHandle,__int64 _Size);
+ _CRTIMP errno_t __cdecl _mktemp_s(char *_TemplateName,size_t _Size);
+ _CRTIMP errno_t __cdecl _umask_s(int _NewMode,int *_OldMode);
+
+#ifndef _WIO_S_DEFINED
+#define _WIO_S_DEFINED
+ _CRTIMP errno_t __cdecl _waccess_s(const wchar_t *_Filename,int _AccessMode);
+ _CRTIMP errno_t __cdecl _wmktemp_s(wchar_t *_TemplateName,size_t _SizeInWords);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/mbstring_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/mbstring_s.h
new file mode 100644
index 00000000..6b2b188f
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/mbstring_s.h
@@ -0,0 +1,52 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_MBSTRING_S
+#define _INC_MBSTRING_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _MBSTRING_S_DEFINED
+#define _MBSTRING_S_DEFINED
+ _CRTIMP errno_t __cdecl _mbscat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src);
+ _CRTIMP errno_t __cdecl _mbscat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbscpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src);
+ _CRTIMP errno_t __cdecl _mbscpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbslwr_s(unsigned char *_Str,size_t _SizeInBytes);
+ _CRTIMP errno_t __cdecl _mbslwr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbsnbcat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _mbsnbcat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbsnbcpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _mbsnbcpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbsnbset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _mbsnbset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbsncat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _mbsncat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbsncpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _mbsncpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbsnset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _mbsnset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbsset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val);
+ _CRTIMP errno_t __cdecl _mbsset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,_locale_t _Locale);
+ _CRTIMP unsigned char *__cdecl _mbstok_s(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context);
+ _CRTIMP unsigned char *__cdecl _mbstok_s_l(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbsupr_s(unsigned char *_Str,size_t _SizeInBytes);
+ _CRTIMP errno_t __cdecl _mbsupr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _mbccpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src);
+ _CRTIMP errno_t __cdecl _mbccpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src,_locale_t _Locale);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/search_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/search_s.h
new file mode 100644
index 00000000..cae89989
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/search_s.h
@@ -0,0 +1,25 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_SEARCH_S
+#define _INC_SEARCH_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ _CRTIMP void *__cdecl _lfind_s(const void *_Key,const void *_Base,unsigned int *_NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(void *,const void *,const void *),void *_Context);
+ _CRTIMP void *__cdecl _lsearch_s(const void *_Key,void *_Base,unsigned int *_NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(void *,const void *,const void *),void *_Context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/stdio_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/stdio_s.h
new file mode 100644
index 00000000..c9b803b1
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/stdio_s.h
@@ -0,0 +1,145 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_STDIO_S
+#define _INC_STDIO_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _STDIO_S_DEFINED
+#define _STDIO_S_DEFINED
+ _CRTIMP errno_t __cdecl clearerr_s(FILE *_File);
+ int __cdecl fprintf_s(FILE *_File,const char *_Format,...);
+ size_t __cdecl fread_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File);
+ _CRTIMP int __cdecl _fscanf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
+ int __cdecl printf_s(const char *_Format,...);
+ _CRTIMP int __cdecl _scanf_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _scanf_s_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _snprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,...);
+ _CRTIMP int __cdecl _snprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,...);
+ _CRTIMP int __cdecl _vsnprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
+ int __cdecl sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...);
+ _CRTIMP int __cdecl _fscanf_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _sscanf_l(const char *_Src,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _sscanf_s_l(const char *_Src,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _snscanf_s(const char *_Src,size_t _MaxCount,const char *_Format,...);
+ _CRTIMP int __cdecl _snscanf_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _snscanf_s_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
+ int __cdecl vfprintf_s(FILE *_File,const char *_Format,va_list _ArgList);
+ int __cdecl vprintf_s(const char *_Format,va_list _ArgList);
+ int __cdecl vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList);
+ int __cdecl vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _fprintf_p(FILE *_File,const char *_Format,...);
+ _CRTIMP int __cdecl _printf_p(const char *_Format,...);
+ _CRTIMP int __cdecl _sprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,...);
+ _CRTIMP int __cdecl _vfprintf_p(FILE *_File,const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _vprintf_p(const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _vsprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _scprintf_p(const char *_Format,...);
+ _CRTIMP int __cdecl _vscprintf_p(const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _printf_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _printf_p_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _fprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _fprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vfprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vfprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _sprintf_l(char *_DstBuf,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _sprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vsprintf_l(char *_DstBuf,const char *_Format,_locale_t,va_list _ArgList);
+ _CRTIMP int __cdecl _vsprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _scprintf_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _scprintf_p_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vscprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vscprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _printf_s_l(const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _fprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vfprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _sprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vsprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _snprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vsnprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _snprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _snprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vsnprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vsnprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *,_locale_t _Locale,va_list _ArgList);
+
+#ifndef _WSTDIO_S_DEFINED
+#define _WSTDIO_S_DEFINED
+ _CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords);
+ int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...);
+ int __cdecl wprintf_s(const wchar_t *_Format,...);
+ int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList);
+ int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...);
+ int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode);
+ _CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
+ _CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords);
+ _CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...);
+ _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args);
+ _CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
+#endif
+#endif
+
+ _CRTIMP size_t __cdecl _fread_nolock_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/stdlib_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/stdlib_s.h
new file mode 100644
index 00000000..f98262cc
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/stdlib_s.h
@@ -0,0 +1,67 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_STDLIB_S
+#define _INC_STDLIB_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ _CRTIMP errno_t __cdecl _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName);
+ _CRTIMP errno_t __cdecl _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP errno_t __cdecl _i64toa_s(__int64 _Val,char *_DstBuf,size_t _Size,int _Radix);
+ _CRTIMP errno_t __cdecl _ui64toa_s(unsigned __int64 _Val,char *_DstBuf,size_t _Size,int _Radix);
+#endif
+ _CRTIMP errno_t __cdecl _ltoa_s(long _Val,char *_DstBuf,size_t _Size,int _Radix);
+ _CRTIMP errno_t __cdecl mbstowcs_s(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _mbstowcs_s_l(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _ultoa_s(unsigned long _Val,char *_DstBuf,size_t _Size,int _Radix);
+ _CRTIMP errno_t __cdecl _wctomb_s_l(int *_SizeConverted,char *_MbCh,size_t _SizeInBytes,wchar_t _WCh,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl wcstombs_s(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes);
+ _CRTIMP errno_t __cdecl _wcstombs_s_l(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes,_locale_t _Locale);
+
+#ifndef _WSTDLIB_S_DEFINED
+#define _WSTDLIB_S_DEFINED
+ _CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+ _CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+ _CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+ _CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName);
+ _CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+ _CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+#endif
+#endif
+
+#ifndef _POSIX_
+ _CRTIMP errno_t __cdecl _ecvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDights,int *_PtDec,int *_PtSign);
+ _CRTIMP errno_t __cdecl _fcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
+ _CRTIMP errno_t __cdecl _gcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDigits);
+ _CRTIMP errno_t __cdecl _makepath_s(char *_PathResult,size_t _Size,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext);
+ _CRTIMP errno_t __cdecl _putenv_s(const char *_Name,const char *_Value);
+ _CRTIMP errno_t __cdecl _searchenv_s(const char *_Filename,const char *_EnvVar,char *_ResultPath,size_t _SizeInBytes);
+ _CRTIMP errno_t __cdecl _splitpath_s(const char *_FullPath,char *_Drive,size_t _DriveSize,char *_Dir,size_t _DirSize,char *_Filename,size_t _FilenameSize,char *_Ext,size_t _ExtSize);
+
+#ifndef _WSTDLIBP_S_DEFINED
+#define _WSTDLIBP_S_DEFINED
+ _CRTIMP errno_t __cdecl _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
+ _CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value);
+ _CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords);
+ _CRTIMP errno_t __cdecl _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords);
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/stralign_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/stralign_s.h
new file mode 100644
index 00000000..5b78f586
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/stralign_s.h
@@ -0,0 +1,30 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef __STRALIGN_H_S_
+#define __STRALIGN_H_S_
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(I_X86_) && defined(_WSTRING_S_DEFINED)
+#if defined(__cplusplus) && defined(_WConst_Return)
+ static __inline PUWSTR ua_wcscpy_s(PUWSTR Destination,size_t DestinationSize,PCUWSTR Source) {
+ if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return (wcscpy_s((PWSTR)Destination,DestinationSize,(PCWSTR)Source)==0 ? Destination : NULL);
+ return uaw_wcscpy((PCUWSTR)String,Character);
+ }
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/string_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/string_s.h
new file mode 100644
index 00000000..9db70e77
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/string_s.h
@@ -0,0 +1,41 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_STRING_S
+#define _INC_STRING_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ _CRTIMP errno_t __cdecl _strset_s(char *_Dst,size_t _DstSize,int _Value);
+ _CRTIMP errno_t __cdecl _strerror_s(char *_Buf,size_t _SizeInBytes,const char *_ErrMsg);
+ _CRTIMP errno_t __cdecl _strlwr_s(char *_Str,size_t _Size);
+ _CRTIMP errno_t __cdecl _strlwr_s_l(char *_Str,size_t _Size,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _strnset_s(char *_Str,size_t _Size,int _Val,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _strupr_s(char *_Str,size_t _Size);
+ _CRTIMP errno_t __cdecl _strupr_s_l(char *_Str,size_t _Size,_locale_t _Locale);
+#ifndef _WSTRING_S_DEFINED
+#define _WSTRING_S_DEFINED
+ _CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context);
+ _CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum);
+ _CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg);
+ _CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val);
+ _CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords);
+ _CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size);
+ _CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/sys/timeb_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/sys/timeb_s.h
new file mode 100644
index 00000000..af5ef098
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/sys/timeb_s.h
@@ -0,0 +1,34 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#ifndef _TIMEB_H_S
+#define _TIMEB_H_S
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef _USE_32BIT_TIME_T
+#define _ftime_s _ftime32_s
+#else
+#define _ftime_s _ftime64_s
+#endif
+
+ _CRTIMP errno_t __cdecl _ftime32_s(struct __timeb32 *_Time);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP errno_t __cdecl _ftime64_s(struct __timeb64 *_Time);
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/tchar_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/tchar_s.h
new file mode 100644
index 00000000..343d348e
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/tchar_s.h
@@ -0,0 +1,266 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_TCHAR_S
+#define _INC_TCHAR_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef _UNICODE
+
+#define _tprintf_s wprintf_s
+#define _tprintf_s_l _wprintf_s_l
+#define _tcprintf_s _cwprintf_s
+#define _tcprintf_s_l _cwprintf_s_l
+#define _vtcprintf_s _vcwprintf_s
+#define _vtcprintf_s_l _vcwprintf_s_l
+#define _ftprintf_s fwprintf_s
+#define _ftprintf_s_l _fwprintf_s_l
+#define _stprintf_s swprintf_s
+#define _stprintf_s_l _swprintf_s_l
+#define _sntprintf_s _snwprintf_s
+#define _sntprintf_s_l _snwprintf_s_l
+#define _vtprintf_s vwprintf_s
+#define _vtprintf_s_l _vwprintf_s_l
+#define _vftprintf_s vfwprintf_s
+#define _vftprintf_s_l _vfwprintf_s_l
+#define _vstprintf_s vswprintf_s
+#define _vstprintf_s_l _vswprintf_s_l
+#define _vsntprintf_s _vsnwprintf_s
+#define _vsntprintf_s_l _vsnwprintf_s_l
+
+#define _tscanf_s wscanf_s
+#define _tscanf_s_l _wscanf_s_l
+#define _tcscanf_s _cwscanf_s
+#define _tcscanf_s_l _cwscanf_s_l
+#define _ftscanf_s fwscanf_s
+#define _ftscanf_s_l _fwscanf_s_l
+#define _stscanf_s swscanf_s
+#define _stscanf_s_l _swscanf_s_l
+#define _sntscanf_s _snwscanf_s
+#define _sntscanf_s_l _snwscanf_s_l
+
+#define _cgetts_s _cgetws_s
+#define _getts_s _getws_s
+
+#define _itot_s _itow_s
+#define _ltot_s _ltow_s
+#define _ultot_s _ultow_s
+#define _i64tot_s _i64tow_s
+#define _ui64tot_s _ui64tow_s
+
+#define _tcscat_s wcscat_s
+#define _tcscpy_s wcscpy_s
+#define _tcsncat_s wcsncat_s
+#define _tcsncat_s_l _wcsncat_s_l
+#define _tcsncpy_s wcsncpy_s
+#define _tcsncpy_s_l _wcsncpy_s_l
+#define _tcstok_s wcstok_s
+#define _tcstok_s_l _wcstok_s_l
+#define _tcserror_s _wcserror_s
+#define __tcserror_s __wcserror_s
+
+#define _tcsnset_s _wcsnset_s
+#define _tcsnset_s_l _wcsnset_s_l
+#define _tcsset_s _wcsset_s
+#define _tcsset_s_l _wcsset_s_l
+
+#define _tasctime_s _wasctime_s
+#define _tctime_s _wctime_s
+#define _tctime32_s _wctime32_s
+#define _tctime64_s _wctime64_s
+#define _tstrdate_s _wstrdate_s
+#define _tstrtime_s _wstrtime_s
+
+#define _tgetenv_s _wgetenv_s
+#define _tdupenv_s _wdupenv_s
+#define _tmakepath_s _wmakepath_s
+#define _tputenv_s _wputenv_s
+#define _tsearchenv_s _wsearchenv_s
+#define _tsplitpath_s _wsplitpath_s
+
+#define _tfopen_s _wfopen_s
+#define _tfreopen_s _wfreopen_s
+#define _ttmpnam_s _wtmpnam_s
+#define _taccess_s _waccess_s
+#define _tmktemp_s _wmktemp_s
+
+#define _tcsnccat_s wcsncat_s
+#define _tcsnccat_s_l _wcsncat_s_l
+#define _tcsnccpy_s wcsncpy_s
+#define _tcsnccpy_s_l _wcsncpy_s_l
+
+#define _tcslwr_s _wcslwr_s
+#define _tcslwr_s_l _wcslwr_s_l
+#define _tcsupr_s _wcsupr_s
+#define _tcsupr_s_l _wcsupr_s_l
+
+#define _wcstok_s_l(_String,_Delimiters,_Current_position,_Locale) (wcstok_s(_String,_Delimiters,_Current_position))
+#define _wcsnset_s_l(_Destination,_Destination_size_chars,_Value,_Count,_Locale) (_wcsnset_s(_Destination,_Destination_size_chars,_Value,_Count))
+#define _wcsset_s_l(_Destination,_Destination_size_chars,_Value,_Locale) (_wcsset_s(_Destination,_Destination_size_chars,_Value))
+
+#else
+
+#define _tprintf_s printf_s
+#define _tprintf_s_l _printf_s_l
+#define _tcprintf_s _cprintf_s
+#define _tcprintf_s_l _cprintf_s_l
+#define _vtcprintf_s _vcprintf_s
+#define _vtcprintf_s_l _vcprintf_s_l
+#define _ftprintf_s fprintf_s
+#define _ftprintf_s_l _fprintf_s_l
+#define _stprintf_s sprintf_s
+#define _stprintf_s_l _sprintf_s_l
+#define _sntprintf_s _snprintf_s
+#define _sntprintf_s_l _snprintf_s_l
+#define _vtprintf_s vprintf_s
+#define _vtprintf_s_l _vprintf_s_l
+#define _vftprintf_s vfprintf_s
+#define _vftprintf_s_l _vfprintf_s_l
+#define _vstprintf_s vsprintf_s
+#define _vstprintf_s_l _vsprintf_s_l
+#define _vsntprintf_s _vsnprintf_s
+#define _vsntprintf_s_l _vsnprintf_s_l
+#define _tscanf_s scanf_s
+#define _tscanf_s_l _scanf_s_l
+#define _tcscanf_s _cscanf_s
+#define _tcscanf_s_l _cscanf_s_l
+#define _ftscanf_s fscanf_s
+#define _ftscanf_s_l _fscanf_s_l
+#define _stscanf_s sscanf_s
+#define _stscanf_s_l _sscanf_s_l
+#define _sntscanf_s _snscanf_s
+#define _sntscanf_s_l _snscanf_s_l
+
+#define _getts_s gets_s
+#define _cgetts_s _cgets_s
+#define _itot_s _itoa_s
+#define _ltot_s _ltoa_s
+#define _ultot_s _ultoa_s
+#define _i64tot_s _i64toa_s
+#define _ui64tot_s _ui64toa_s
+
+#define _tcscat_s strcat_s
+#define _tcscpy_s strcpy_s
+#define _tcserror_s strerror_s
+#define __tcserror_s _strerror_s
+
+#define _tasctime_s asctime_s
+#define _tctime_s ctime_s
+#define _tctime32_s _ctime32_s
+#define _tctime64_s _ctime64_s
+#define _tstrdate_s _strdate_s
+#define _tstrtime_s _strtime_s
+
+#define _tgetenv_s getenv_s
+#define _tdupenv_s _dupenv_s
+#define _tmakepath_s _makepath_s
+#define _tputenv_s _putenv_s
+#define _tsearchenv_s _searchenv_s
+#define _tsplitpath_s _splitpath_s
+
+#define _tfopen_s fopen_s
+#define _tfreopen_s freopen_s
+#define _ttmpnam_s tmpnam_s
+#define _tmktemp_s _mktemp_s
+
+#ifndef _POSIX_
+#define _taccess_s _access_s
+#endif
+
+#define _tsopen_s _sopen_s
+
+#ifdef _MBCS
+
+#ifdef _MB_MAP_DIRECT
+
+#define _tcsncat_s _mbsnbcat_s
+#define _tcsncat_s_l _mbsnbcat_s_l
+#define _tcsncpy_s _mbsnbcpy_s
+#define _tcsncpy_s_l _mbsnbcpy_s_l
+#define _tcstok_s _mbstok_s
+#define _tcstok_s_l _mbstok_s_l
+
+#define _tcsnset_s _mbsnbset_s
+#define _tcsnset_s_l _mbsnbset_s_l
+#define _tcsset_s _mbsset_s
+#define _tcsset_s_l _mbsset_s_l
+
+#define _tcsnccat_s _mbsncat_s
+#define _tcsnccat_s_l _mbsncat_s_l
+#define _tcsnccpy_s _mbsncpy_s
+#define _tcsnccpy_s_l _mbsncpy_s_l
+#define _tcsncset_s _mbsnset_s
+#define _tcsncset_s_l _mbsnset_s_l
+
+#define _tcslwr_s _mbslwr_s
+#define _tcslwr_s_l _mbslwr_s_l
+#define _tcsupr_s _mbsupr_s
+#define _tcsupr_s_l _mbsupr_s_l
+
+#define _tccpy_s _mbccpy_s
+#define _tccpy_s_l _mbccpy_s_l
+#else
+
+ _CRTIMP char *__cdecl _tcsncat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsncat_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsncpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsncpy_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcstok_s(char *_Str,const char *_Delim,char **_Context);
+ _CRTIMP char *__cdecl _tcstok_s_l(char *_Str,const char *_Delim,char **_Context,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _tcsset_s(char *_Str,size_t _SizeInChars,unsigned int _Val);
+ _CRTIMP errno_t __cdecl _tcsset_s_l(char *_Str,size_t _SizeInChars,unsigned int,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsnccat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsnccat_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsnccpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsnccpy_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcslwr_s(char *_Str,size_t _SizeInChars);
+ _CRTIMP char *__cdecl _tcslwr_s_l(char *_Str,size_t _SizeInChars,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsupr_s(char *_Str,size_t _SizeInChars);
+ _CRTIMP char *__cdecl _tcsupr_s_l(char *_Str,size_t _SizeInChars,_locale_t _Locale);
+
+#endif
+
+#else
+
+#define _tcsncat_s strncat_s
+#define _tcsncat_s_l _strncat_s_l
+#define _tcsncpy_s strncpy_s
+#define _tcsncpy_s_l _strncpy_s_l
+#define _tcstok_s strtok_s
+#define _tcstok_s_l _strtok_s_l
+
+#define _tcsnset_s _strnset_s
+#define _tcsnset_s_l _strnset_s_l
+#define _tcsset_s _strset_s
+#define _tcsset_s _strset_s
+#define _tcsset_s_l _strset_s_l
+
+#define _tcsnccat_s strncat_s
+#define _tcsnccat_s_l _strncat_s_l
+#define _tcsnccpy_s strncpy_s
+#define _tcsnccpy_s_l _strncpy_s_l
+
+#define _tcslwr_s _strlwr_s
+#define _tcslwr_s_l _strlwr_s_l
+#define _tcsupr_s _strupr_s
+#define _tcsupr_s_l _strupr_s_l
+
+#define _strnset_s_l(_Destination,_Destination_size_chars,_Value,_Count,_Locale) (_strnset_s(_Destination,_Destination_size_chars,_Value,_Count))
+#define _strset_s_l(_Destination,_Destination_size_chars,_Value,_Locale) (_strset_s(_Destination,_Destination_size_chars,_Value))
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/time_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/time_s.h
new file mode 100644
index 00000000..9603b94f
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/time_s.h
@@ -0,0 +1,61 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _TIME_H__S
+#define _TIME_H__S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ _CRTIMP errno_t __cdecl _ctime32_s(char *_Buf,size_t _SizeInBytes,const __time32_t *_Time);
+ _CRTIMP errno_t __cdecl _gmtime32_s(struct tm *_Tm,const __time32_t *_Time);
+ _CRTIMP errno_t __cdecl _localtime32_s(struct tm *_Tm,const __time32_t *_Time);
+ _CRTIMP errno_t __cdecl _strdate_s(char *_Buf,size_t _SizeInBytes);
+ _CRTIMP errno_t __cdecl _strtime_s(char *_Buf ,size_t _SizeInBytes);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP errno_t __cdecl _ctime64_s(char *_Buf,size_t _SizeInBytes,const __time64_t *_Time);
+ _CRTIMP errno_t __cdecl _gmtime64_s(struct tm *_Tm,const __time64_t *_Time);
+ _CRTIMP errno_t __cdecl _localtime64_s(struct tm *_Tm,const __time64_t *_Time);
+#endif
+
+#ifndef _WTIME_S_DEFINED
+#define _WTIME_S_DEFINED
+ _CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
+ _CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
+ _CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords);
+ _CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
+#endif
+
+#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
+#define _INC_WTIME_S_INL
+#ifdef _USE_32BIT_TIME_T
+__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s(_Buffer,_SizeInWords,_Time); }
+#else
+__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); }
+#endif
+#endif
+#endif
+
+#ifndef RC_INVOKED
+#ifdef _USE_32BIT_TIME_T
+__CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime32_s(_Tm,_Time); }
+#else
+__CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime64_s(_Tm,_Time); }
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/wchar_s.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/wchar_s.h
new file mode 100644
index 00000000..94251aa8
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sec_api/wchar_s.h
@@ -0,0 +1,128 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_WCHAR_S
+#define _INC_WCHAR_S
+
+#include
+
+#if defined(MINGW_HAS_SECURE_API)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _WIO_S_DEFINED
+#define _WIO_S_DEFINED
+ _CRTIMP errno_t __cdecl _waccess_s(const wchar_t *_Filename,int _AccessMode);
+ _CRTIMP errno_t __cdecl _wmktemp_s(wchar_t *_TemplateName,size_t _SizeInWords);
+#endif
+
+#ifndef _WCONIO_S_DEFINED
+#define _WCONIO_S_DEFINED
+ _CRTIMP errno_t __cdecl _cgetws_s(wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead);
+ _CRTIMP int __cdecl _cwprintf_s(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _cwscanf_s(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf_s(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _cwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+#endif
+
+#ifndef _WSTDIO_S_DEFINED
+#define _WSTDIO_S_DEFINED
+ _CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords);
+ int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...);
+ int __cdecl wprintf_s(const wchar_t *_Format,...);
+ int __cdecl vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList);
+ int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList);
+ int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...);
+ int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode);
+ _CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
+ _CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords);
+#endif
+
+#ifndef _WSTDLIB_S_DEFINED
+#define _WSTDLIB_S_DEFINED
+ _CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+ _CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+ _CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+ _CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName);
+ _CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+ _CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
+#endif
+#endif
+
+#ifndef _POSIX_
+#ifndef _WSTDLIBP_S_DEFINED
+#define _WSTDLIBP_S_DEFINED
+ _CRTIMP errno_t __cdecl _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
+ _CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value);
+ _CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords);
+ _CRTIMP errno_t __cdecl _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords);
+#endif
+#endif
+
+#ifndef _WSTRING_S_DEFINED
+#define _WSTRING_S_DEFINED
+ _CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context);
+ _CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum);
+ _CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg);
+ _CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount);
+ _CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val);
+ _CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords);
+ _CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale);
+ _CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size);
+ _CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale);
+#endif
+
+#ifndef _WTIME_S_DEFINED
+#define _WTIME_S_DEFINED
+ _CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
+ _CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
+ _CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords);
+ _CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
+#endif
+
+#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
+#define _INC_WTIME_S_INL
+#ifdef _USE_32BIT_TIME_T
+__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s(_Buffer,_SizeInWords,_Time); }
+#else
+__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); }
+#endif
+#endif
+#endif
+
+ _CRTIMP errno_t __cdecl mbsrtowcs_s(size_t *_Retval,wchar_t *_Dst,size_t _SizeInWords,const char **_PSrc,size_t _N,mbstate_t *_State);
+ _CRTIMP errno_t __cdecl wcrtomb_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,wchar_t _Ch,mbstate_t *_State);
+ _CRTIMP errno_t __cdecl wcsrtombs_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,const wchar_t **_Src,size_t _Size,mbstate_t *_State);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/setjmp.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/setjmp.h
new file mode 100644
index 00000000..e4f142a3
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/setjmp.h
@@ -0,0 +1,160 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_SETJMP
+#define _INC_SETJMP
+
+#include <_mingw.h>
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if (defined(_X86_) && !defined(__x86_64))
+
+#define _JBLEN 16
+#define _JBTYPE int
+
+ typedef struct __JUMP_BUFFER {
+ unsigned long Ebp;
+ unsigned long Ebx;
+ unsigned long Edi;
+ unsigned long Esi;
+ unsigned long Esp;
+ unsigned long Eip;
+ unsigned long Registration;
+ unsigned long TryLevel;
+ unsigned long Cookie;
+ unsigned long UnwindFunc;
+ unsigned long UnwindData[6];
+ } _JUMP_BUFFER;
+#elif defined(__ia64__)
+ typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
+ __int64 LowPart;
+ __int64 HighPart;
+ } SETJMP_FLOAT128;
+
+#define _JBLEN 33
+ typedef SETJMP_FLOAT128 _JBTYPE;
+
+ typedef struct __JUMP_BUFFER {
+
+ unsigned long iAReserved[6];
+
+ unsigned long Registration;
+ unsigned long TryLevel;
+ unsigned long Cookie;
+ unsigned long UnwindFunc;
+
+ unsigned long UnwindData[6];
+
+ SETJMP_FLOAT128 FltS0;
+ SETJMP_FLOAT128 FltS1;
+ SETJMP_FLOAT128 FltS2;
+ SETJMP_FLOAT128 FltS3;
+ SETJMP_FLOAT128 FltS4;
+ SETJMP_FLOAT128 FltS5;
+ SETJMP_FLOAT128 FltS6;
+ SETJMP_FLOAT128 FltS7;
+ SETJMP_FLOAT128 FltS8;
+ SETJMP_FLOAT128 FltS9;
+ SETJMP_FLOAT128 FltS10;
+ SETJMP_FLOAT128 FltS11;
+ SETJMP_FLOAT128 FltS12;
+ SETJMP_FLOAT128 FltS13;
+ SETJMP_FLOAT128 FltS14;
+ SETJMP_FLOAT128 FltS15;
+ SETJMP_FLOAT128 FltS16;
+ SETJMP_FLOAT128 FltS17;
+ SETJMP_FLOAT128 FltS18;
+ SETJMP_FLOAT128 FltS19;
+ __int64 FPSR;
+ __int64 StIIP;
+ __int64 BrS0;
+ __int64 BrS1;
+ __int64 BrS2;
+ __int64 BrS3;
+ __int64 BrS4;
+ __int64 IntS0;
+ __int64 IntS1;
+ __int64 IntS2;
+ __int64 IntS3;
+ __int64 RsBSP;
+ __int64 RsPFS;
+ __int64 ApUNAT;
+ __int64 ApLC;
+ __int64 IntSp;
+ __int64 IntNats;
+ __int64 Preds;
+
+ } _JUMP_BUFFER;
+#elif defined(__x86_64)
+ typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
+ unsigned __int64 Part[2];
+ } SETJMP_FLOAT128;
+
+#define _JBLEN 16
+ typedef SETJMP_FLOAT128 _JBTYPE;
+
+ typedef struct _JUMP_BUFFER {
+ unsigned __int64 Frame;
+ unsigned __int64 Rbx;
+ unsigned __int64 Rsp;
+ unsigned __int64 Rbp;
+ unsigned __int64 Rsi;
+ unsigned __int64 Rdi;
+ unsigned __int64 R12;
+ unsigned __int64 R13;
+ unsigned __int64 R14;
+ unsigned __int64 R15;
+ unsigned __int64 Rip;
+ unsigned __int64 Spare;
+ SETJMP_FLOAT128 Xmm6;
+ SETJMP_FLOAT128 Xmm7;
+ SETJMP_FLOAT128 Xmm8;
+ SETJMP_FLOAT128 Xmm9;
+ SETJMP_FLOAT128 Xmm10;
+ SETJMP_FLOAT128 Xmm11;
+ SETJMP_FLOAT128 Xmm12;
+ SETJMP_FLOAT128 Xmm13;
+ SETJMP_FLOAT128 Xmm14;
+ SETJMP_FLOAT128 Xmm15;
+ } _JUMP_BUFFER;
+#endif
+#ifndef _JMP_BUF_DEFINED
+ typedef _JBTYPE jmp_buf[_JBLEN];
+#define _JMP_BUF_DEFINED
+#endif
+
+ void * __cdecl __attribute__ ((__nothrow__)) mingw_getsp(void);
+
+#ifdef USE_MINGW_SETJMP_TWO_ARGS
+#ifndef _INC_SETJMPEX
+#define setjmp(BUF) _setjmp((BUF),mingw_getsp())
+ int __cdecl __attribute__ ((__nothrow__)) _setjmp(jmp_buf _Buf,void *_Ctx);
+#else
+#undef setjmp
+#define setjmp(BUF) _setjmpex((BUF),mingw_getsp())
+#define setjmpex(BUF) _setjmpex((BUF),mingw_getsp())
+ int __cdecl __attribute__ ((__nothrow__)) _setjmpex(jmp_buf _Buf,void *_Ctx);
+#endif
+#else
+#ifndef _INC_SETJMPEX
+#define setjmp _setjmp
+#endif
+ int __cdecl __attribute__ ((__nothrow__)) setjmp(jmp_buf _Buf);
+#endif
+
+ __declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl ms_longjmp(jmp_buf _Buf,int _Value)/* throw(...)*/;
+ __declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl longjmp(jmp_buf _Buf,int _Value);
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/share.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/share.h
new file mode 100644
index 00000000..358855fe
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/share.h
@@ -0,0 +1,28 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_SHARE
+#define _INC_SHARE
+
+#ifndef _WIN32
+#error Only Win32 target is supported!
+#endif
+
+#define _SH_COMPAT 0x00
+#define _SH_DENYRW 0x10
+#define _SH_DENYWR 0x20
+#define _SH_DENYRD 0x30
+#define _SH_DENYNO 0x40
+#define _SH_SECURE 0x80
+
+#ifndef NO_OLDNAMES
+#define SH_COMPAT _SH_COMPAT
+#define SH_DENYRW _SH_DENYRW
+#define SH_DENYWR _SH_DENYWR
+#define SH_DENYRD _SH_DENYRD
+#define SH_DENYNO _SH_DENYNO
+#endif
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/signal.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/signal.h
new file mode 100644
index 00000000..a518f6b3
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/signal.h
@@ -0,0 +1,63 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_SIGNAL
+#define _INC_SIGNAL
+
+#include <_mingw.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _SIG_ATOMIC_T_DEFINED
+#define _SIG_ATOMIC_T_DEFINED
+ typedef int sig_atomic_t;
+#endif
+
+#define NSIG 23
+
+#define SIGHUP 1 /* hangup */
+#define SIGINT 2
+#define SIGQUIT 3 /* quit */
+#define SIGILL 4
+#define SIGTRAP 5 /* trace trap (not reset when caught) */
+#define SIGIOT 6 /* IOT instruction */
+#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
+#define SIGEMT 7 /* EMT instruction */
+#define SIGFPE 8
+#define SIGKILL 9 /* kill (cannot be caught or ignored) */
+#define SIGBUS 10 /* bus error */
+#define SIGSEGV 11
+#define SIGSYS 12 /* bad argument to system call */
+#define SIGPIPE 13 /* write on a pipe with no one to read it */
+#ifdef __USE_MINGW_ALARM
+#define SIGALRM 14 /* alarm clock */
+#endif
+#define SIGTERM 15
+#define SIGBREAK 21
+#define SIGABRT2 22
+
+#define SIGABRT_COMPAT 6
+
+ typedef void (*__p_sig_fn_t)(int);
+
+#define SIG_DFL (__p_sig_fn_t)0
+#define SIG_IGN (__p_sig_fn_t)1
+#define SIG_GET (__p_sig_fn_t)2
+#define SIG_SGE (__p_sig_fn_t)3
+#define SIG_ACK (__p_sig_fn_t)4
+#define SIG_ERR (__p_sig_fn_t)-1
+
+ extern void **__cdecl __pxcptinfoptrs(void);
+#define _pxcptinfoptrs (*__pxcptinfoptrs())
+
+ __p_sig_fn_t __cdecl signal(int _SigNum,__p_sig_fn_t _Func);
+ int __cdecl raise(int _SigNum);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/stdarg.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdarg.h
new file mode 100644
index 00000000..10ce733b
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdarg.h
@@ -0,0 +1,79 @@
+#ifndef _STDARG_H
+#define _STDARG_H
+
+#ifdef __x86_64__
+#ifndef _WIN64
+
+//This should be in sync with the declaration on our lib/libtcc1.c
+/* GCC compatible definition of va_list. */
+typedef struct {
+ unsigned int gp_offset;
+ unsigned int fp_offset;
+ union {
+ unsigned int overflow_offset;
+ char *overflow_arg_area;
+ };
+ char *reg_save_area;
+} __va_list_struct;
+
+typedef __va_list_struct va_list[1];
+
+void __va_start(__va_list_struct *ap, void *fp);
+void *__va_arg(__va_list_struct *ap, int arg_type, int size, int align);
+
+#define va_start(ap, last) __va_start(ap, __builtin_frame_address(0))
+#define va_arg(ap, type) \
+ (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type), __alignof__(type))))
+#define va_copy(dest, src) (*(dest) = *(src))
+#define va_end(ap)
+
+/* avoid conflicting definition for va_list on Macs. */
+#define _VA_LIST_T
+
+#else /* _WIN64 */
+typedef char *va_list;
+#define va_start(ap,last) __builtin_va_start(ap,last)
+#define va_arg(ap, t) ((sizeof(t) > 8 || (sizeof(t) & (sizeof(t) - 1))) \
+ ? **(t **)((ap += 8) - 8) : *(t *)((ap += 8) - 8))
+#define va_copy(dest, src) ((dest) = (src))
+#define va_end(ap)
+#endif
+
+#elif __arm__
+typedef char *va_list;
+#define _tcc_alignof(type) ((int)&((struct {char c;type x;} *)0)->x)
+#define _tcc_align(addr,type) (((unsigned)addr + _tcc_alignof(type) - 1) \
+ & ~(_tcc_alignof(type) - 1))
+#define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)
+#define va_arg(ap,type) (ap = (void *) ((_tcc_align(ap,type)+sizeof(type)+3) \
+ &~3), *(type *)(ap - ((sizeof(type)+3)&~3)))
+#define va_copy(dest, src) (dest) = (src)
+#define va_end(ap)
+
+#elif defined(__aarch64__)
+typedef struct {
+ void *__stack;
+ void *__gr_top;
+ void *__vr_top;
+ int __gr_offs;
+ int __vr_offs;
+} va_list;
+#define va_start(ap, last) __va_start(ap, last)
+#define va_arg(ap, type) __va_arg(ap, type)
+#define va_end(ap)
+#define va_copy(dest, src) ((dest) = (src))
+
+#else /* __i386__ */
+typedef char *va_list;
+/* only correct for i386 */
+#define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)
+#define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3)))
+#define va_copy(dest, src) (dest) = (src)
+#define va_end(ap)
+#endif
+
+/* fix a buggy dependency on GCC in libio.h */
+typedef va_list __gnuc_va_list;
+#define _VA_LIST_DEFINED
+
+#endif /* _STDARG_H */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/stdbool.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdbool.h
new file mode 100644
index 00000000..d2ee446e
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdbool.h
@@ -0,0 +1,11 @@
+#ifndef _STDBOOL_H
+#define _STDBOOL_H
+
+/* ISOC99 boolean */
+
+#define bool _Bool
+#define true 1
+#define false 0
+#define __bool_true_false_are_defined 1
+
+#endif /* _STDBOOL_H */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/stddef.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/stddef.h
new file mode 100644
index 00000000..694d5037
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/stddef.h
@@ -0,0 +1,54 @@
+#ifndef _STDDEF_H
+#define _STDDEF_H
+
+typedef __SIZE_TYPE__ size_t;
+typedef __PTRDIFF_TYPE__ ssize_t;
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __PTRDIFF_TYPE__ ptrdiff_t;
+typedef __PTRDIFF_TYPE__ intptr_t;
+typedef __SIZE_TYPE__ uintptr_t;
+
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef signed char int8_t;
+typedef signed short int int16_t;
+typedef signed int int32_t;
+#ifdef __LP64__
+typedef signed long int int64_t;
+#else
+typedef signed long long int int64_t;
+#endif
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+#ifdef __LP64__
+typedef unsigned long int uint64_t;
+#else
+typedef unsigned long long int uint64_t;
+#endif
+#endif
+
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
+
+#define offsetof(type, field) ((size_t)&((type *)0)->field)
+
+void *alloca(size_t size);
+
+#endif
+
+/* Older glibc require a wint_t from (when requested
+ by __need_wint_t, as otherwise stddef.h isn't allowed to
+ define this type). Note that this must be outside the normal
+ _STDDEF_H guard, so that it works even when we've included the file
+ already (without requiring wint_t). Some other libs define _WINT_T
+ if they've already provided that type, so we can use that as guard.
+ TCC defines __WINT_TYPE__ for us. */
+#if defined (__need_wint_t)
+#ifndef _WINT_T
+#define _WINT_T
+typedef __WINT_TYPE__ wint_t;
+#endif
+#undef __need_wint_t
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/stdint.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdint.h
new file mode 100644
index 00000000..cde32b6e
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdint.h
@@ -0,0 +1,212 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+/* ISO C9x 7.18 Integer types
+ * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * Contributor: Danny Smith
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Date: 2000-12-02
+ */
+
+
+#ifndef _STDINT_H
+#define _STDINT_H
+
+#include <_mingw.h>
+
+#define __need_wint_t
+#define __need_wchar_t
+#include "stddef.h"
+
+#ifndef __int8_t_defined
+#define __int8_t_defined
+/* 7.18.1.1 Exact-width integer types */
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef short int16_t;
+typedef unsigned short uint16_t;
+typedef int int32_t;
+typedef unsigned uint32_t;
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#endif
+
+/* 7.18.1.2 Minimum-width integer types */
+typedef signed char int_least8_t;
+typedef unsigned char uint_least8_t;
+typedef short int_least16_t;
+typedef unsigned short uint_least16_t;
+typedef int int_least32_t;
+typedef unsigned uint_least32_t;
+typedef long long int_least64_t;
+typedef unsigned long long uint_least64_t;
+
+/* 7.18.1.3 Fastest minimum-width integer types
+ * Not actually guaranteed to be fastest for all purposes
+ * Here we use the exact-width types for 8 and 16-bit ints.
+ */
+typedef char int_fast8_t;
+typedef unsigned char uint_fast8_t;
+typedef short int_fast16_t;
+typedef unsigned short uint_fast16_t;
+typedef int int_fast32_t;
+typedef unsigned int uint_fast32_t;
+typedef long long int_fast64_t;
+typedef unsigned long long uint_fast64_t;
+
+/* 7.18.1.5 Greatest-width integer types */
+typedef long long intmax_t;
+typedef unsigned long long uintmax_t;
+
+/* 7.18.2 Limits of specified-width integer types */
+#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
+
+/* 7.18.2.1 Limits of exact-width integer types */
+#define INT8_MIN (-128)
+#define INT16_MIN (-32768)
+#define INT32_MIN (-2147483647 - 1)
+#define INT64_MIN (-9223372036854775807LL - 1)
+
+#define INT8_MAX 127
+#define INT16_MAX 32767
+#define INT32_MAX 2147483647
+#define INT64_MAX 9223372036854775807LL
+
+#define UINT8_MAX 0xff /* 255U */
+#define UINT16_MAX 0xffff /* 65535U */
+#define UINT32_MAX 0xffffffff /* 4294967295U */
+#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
+
+/* 7.18.2.2 Limits of minimum-width integer types */
+#define INT_LEAST8_MIN INT8_MIN
+#define INT_LEAST16_MIN INT16_MIN
+#define INT_LEAST32_MIN INT32_MIN
+#define INT_LEAST64_MIN INT64_MIN
+
+#define INT_LEAST8_MAX INT8_MAX
+#define INT_LEAST16_MAX INT16_MAX
+#define INT_LEAST32_MAX INT32_MAX
+#define INT_LEAST64_MAX INT64_MAX
+
+#define UINT_LEAST8_MAX UINT8_MAX
+#define UINT_LEAST16_MAX UINT16_MAX
+#define UINT_LEAST32_MAX UINT32_MAX
+#define UINT_LEAST64_MAX UINT64_MAX
+
+/* 7.18.2.3 Limits of fastest minimum-width integer types */
+#define INT_FAST8_MIN INT8_MIN
+#define INT_FAST16_MIN INT16_MIN
+#define INT_FAST32_MIN INT32_MIN
+#define INT_FAST64_MIN INT64_MIN
+
+#define INT_FAST8_MAX INT8_MAX
+#define INT_FAST16_MAX INT16_MAX
+#define INT_FAST32_MAX INT32_MAX
+#define INT_FAST64_MAX INT64_MAX
+
+#define UINT_FAST8_MAX UINT8_MAX
+#define UINT_FAST16_MAX UINT16_MAX
+#define UINT_FAST32_MAX UINT32_MAX
+#define UINT_FAST64_MAX UINT64_MAX
+
+/* 7.18.2.4 Limits of integer types capable of holding
+ object pointers */
+#ifdef _WIN64
+#define INTPTR_MIN INT64_MIN
+#define INTPTR_MAX INT64_MAX
+#define UINTPTR_MAX UINT64_MAX
+#else
+#define INTPTR_MIN INT32_MIN
+#define INTPTR_MAX INT32_MAX
+#define UINTPTR_MAX UINT32_MAX
+#endif
+
+/* 7.18.2.5 Limits of greatest-width integer types */
+#define INTMAX_MIN INT64_MIN
+#define INTMAX_MAX INT64_MAX
+#define UINTMAX_MAX UINT64_MAX
+
+/* 7.18.3 Limits of other integer types */
+#ifdef _WIN64
+#define PTRDIFF_MIN INT64_MIN
+#define PTRDIFF_MAX INT64_MAX
+#else
+#define PTRDIFF_MIN INT32_MIN
+#define PTRDIFF_MAX INT32_MAX
+#endif
+
+#define SIG_ATOMIC_MIN INT32_MIN
+#define SIG_ATOMIC_MAX INT32_MAX
+
+#ifndef SIZE_MAX
+#ifdef _WIN64
+#define SIZE_MAX UINT64_MAX
+#else
+#define SIZE_MAX UINT32_MAX
+#endif
+#endif
+
+#ifndef WCHAR_MIN /* also in wchar.h */
+#define WCHAR_MIN 0
+#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
+#endif
+
+/*
+ * wint_t is unsigned short for compatibility with MS runtime
+ */
+#define WINT_MIN 0
+#define WINT_MAX ((wint_t)-1) /* UINT16_MAX */
+
+#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
+
+
+/* 7.18.4 Macros for integer constants */
+#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
+
+/* 7.18.4.1 Macros for minimum-width integer constants
+
+ According to Douglas Gwyn :
+ "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
+ 9899:1999 as initially published, the expansion was required
+ to be an integer constant of precisely matching type, which
+ is impossible to accomplish for the shorter types on most
+ platforms, because C99 provides no standard way to designate
+ an integer constant with width less than that of type int.
+ TC1 changed this to require just an integer constant
+ *expression* with *promoted* type."
+
+ The trick used here is from Clive D W Feather.
+*/
+
+#define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val))
+#define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val))
+#define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val))
+/* The 'trick' doesn't work in C89 for long long because, without
+ suffix, (val) will be evaluated as int, not intmax_t */
+#define INT64_C(val) val##LL
+
+#define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val))
+#define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val))
+#define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val))
+#define UINT64_C(val) val##ULL
+
+/* 7.18.4.2 Macros for greatest-width integer constants */
+#define INTMAX_C(val) val##LL
+#define UINTMAX_C(val) val##ULL
+
+#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/stdio.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdio.h
new file mode 100644
index 00000000..da887936
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdio.h
@@ -0,0 +1,429 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_STDIO
+#define _INC_STDIO
+
+#include <_mingw.h>
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define BUFSIZ 512
+#define _NFILE _NSTREAM_
+#define _NSTREAM_ 512
+#define _IOB_ENTRIES 20
+#define EOF (-1)
+
+#ifndef _FILE_DEFINED
+ struct _iobuf {
+ char *_ptr;
+ int _cnt;
+ char *_base;
+ int _flag;
+ int _file;
+ int _charbuf;
+ int _bufsiz;
+ char *_tmpfname;
+ };
+ typedef struct _iobuf FILE;
+#define _FILE_DEFINED
+#endif
+
+#ifdef _POSIX_
+#define _P_tmpdir "/"
+#define _wP_tmpdir L"/"
+#else
+#define _P_tmpdir "\\"
+#define _wP_tmpdir L"\\"
+#endif
+
+#define L_tmpnam (sizeof(_P_tmpdir) + 12)
+
+#ifdef _POSIX_
+#define L_ctermid 9
+#define L_cuserid 32
+#endif
+
+#define SEEK_CUR 1
+#define SEEK_END 2
+#define SEEK_SET 0
+
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+#define FILENAME_MAX 260
+#define FOPEN_MAX 20
+#define _SYS_OPEN 20
+#define TMP_MAX 32767
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#ifndef _OFF_T_DEFINED
+#define _OFF_T_DEFINED
+#ifndef _OFF_T_
+#define _OFF_T_
+ typedef long _off_t;
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+ typedef long off_t;
+#endif
+#endif
+#endif
+
+#ifndef _OFF64_T_DEFINED
+#define _OFF64_T_DEFINED
+ typedef long long _off64_t;
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+ typedef long long off64_t;
+#endif
+#endif
+
+#ifndef _STDIO_DEFINED
+#ifdef _WIN64
+ _CRTIMP FILE *__cdecl __iob_func(void);
+#else
+#ifdef _MSVCRT_
+extern FILE _iob[]; /* A pointer to an array of FILE */
+#define __iob_func() (_iob)
+#else
+extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
+#define __iob_func() (*_imp___iob)
+#define _iob __iob_func()
+#endif
+#endif
+#endif
+
+#ifndef _FPOS_T_DEFINED
+#define _FPOS_T_DEFINED
+#undef _FPOSOFF
+
+#if (!defined(NO_OLDNAMES) || defined(__GNUC__)) && _INTEGRAL_MAX_BITS >= 64
+ typedef __int64 fpos_t;
+#define _FPOSOFF(fp) ((long)(fp))
+#else
+ typedef long long fpos_t;
+#define _FPOSOFF(fp) ((long)(fp))
+#endif
+
+#endif
+
+#ifndef _STDSTREAM_DEFINED
+#define _STDSTREAM_DEFINED
+
+#define stdin (&__iob_func()[0])
+#define stdout (&__iob_func()[1])
+#define stderr (&__iob_func()[2])
+#endif
+
+#define _IOREAD 0x0001
+#define _IOWRT 0x0002
+
+#define _IOFBF 0x0000
+#define _IOLBF 0x0040
+#define _IONBF 0x0004
+
+#define _IOMYBUF 0x0008
+#define _IOEOF 0x0010
+#define _IOERR 0x0020
+#define _IOSTRG 0x0040
+#define _IORW 0x0080
+#ifdef _POSIX_
+#define _IOAPPEND 0x0200
+#endif
+
+#define _TWO_DIGIT_EXPONENT 0x1
+
+#ifndef _STDIO_DEFINED
+
+ _CRTIMP int __cdecl _filbuf(FILE *_File);
+ _CRTIMP int __cdecl _flsbuf(int _Ch,FILE *_File);
+#ifdef _POSIX_
+ _CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode);
+#else
+ _CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode,int _ShFlag);
+#endif
+ void __cdecl clearerr(FILE *_File);
+ int __cdecl fclose(FILE *_File);
+ _CRTIMP int __cdecl _fcloseall(void);
+#ifdef _POSIX_
+ FILE *__cdecl fdopen(int _FileHandle,const char *_Mode);
+#else
+ _CRTIMP FILE *__cdecl _fdopen(int _FileHandle,const char *_Mode);
+#endif
+ int __cdecl feof(FILE *_File);
+ int __cdecl ferror(FILE *_File);
+ int __cdecl fflush(FILE *_File);
+ int __cdecl fgetc(FILE *_File);
+ _CRTIMP int __cdecl _fgetchar(void);
+ int __cdecl fgetpos(FILE *_File ,fpos_t *_Pos);
+ char *__cdecl fgets(char *_Buf,int _MaxCount,FILE *_File);
+#ifdef _POSIX_
+ int __cdecl fileno(FILE *_File);
+#else
+ _CRTIMP int __cdecl _fileno(FILE *_File);
+#endif
+ _CRTIMP char *__cdecl _tempnam(const char *_DirName,const char *_FilePrefix);
+ _CRTIMP int __cdecl _flushall(void);
+ FILE *__cdecl fopen(const char *_Filename,const char *_Mode);
+ FILE *fopen64(const char *filename,const char *mode);
+ int __cdecl fprintf(FILE *_File,const char *_Format,...);
+ int __cdecl fputc(int _Ch,FILE *_File);
+ _CRTIMP int __cdecl _fputchar(int _Ch);
+ int __cdecl fputs(const char *_Str,FILE *_File);
+ size_t __cdecl fread(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File);
+ FILE *__cdecl freopen(const char *_Filename,const char *_Mode,FILE *_File);
+ int __cdecl fscanf(FILE *_File,const char *_Format,...);
+ int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos);
+ int __cdecl fseek(FILE *_File,long _Offset,int _Origin);
+ int fseeko64(FILE* stream, _off64_t offset, int whence);
+ long __cdecl ftell(FILE *_File);
+ _off64_t ftello64(FILE * stream);
+ int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
+ __int64 __cdecl _ftelli64(FILE *_File);
+ size_t __cdecl fwrite(const void *_Str,size_t _Size,size_t _Count,FILE *_File);
+ int __cdecl getc(FILE *_File);
+ int __cdecl getchar(void);
+ _CRTIMP int __cdecl _getmaxstdio(void);
+ char *__cdecl gets(char *_Buffer);
+ int __cdecl _getw(FILE *_File);
+#ifndef _CRT_PERROR_DEFINED
+#define _CRT_PERROR_DEFINED
+ void __cdecl perror(const char *_ErrMsg);
+#endif
+ _CRTIMP int __cdecl _pclose(FILE *_File);
+ _CRTIMP FILE *__cdecl _popen(const char *_Command,const char *_Mode);
+#if !defined(NO_OLDNAMES) && !defined(popen)
+#define popen _popen
+#define pclose _pclose
+#endif
+ int __cdecl printf(const char *_Format,...);
+ int __cdecl putc(int _Ch,FILE *_File);
+ int __cdecl putchar(int _Ch);
+ int __cdecl puts(const char *_Str);
+ _CRTIMP int __cdecl _putw(int _Word,FILE *_File);
+#ifndef _CRT_DIRECTORY_DEFINED
+#define _CRT_DIRECTORY_DEFINED
+ int __cdecl remove(const char *_Filename);
+ int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
+ _CRTIMP int __cdecl _unlink(const char *_Filename);
+#ifndef NO_OLDNAMES
+ int __cdecl unlink(const char *_Filename);
+#endif
+#endif
+ void __cdecl rewind(FILE *_File);
+ _CRTIMP int __cdecl _rmtmp(void);
+ int __cdecl scanf(const char *_Format,...);
+ void __cdecl setbuf(FILE *_File,char *_Buffer);
+ _CRTIMP int __cdecl _setmaxstdio(int _Max);
+ _CRTIMP unsigned int __cdecl _set_output_format(unsigned int _Format);
+ _CRTIMP unsigned int __cdecl _get_output_format(void);
+ int __cdecl setvbuf(FILE *_File,char *_Buf,int _Mode,size_t _Size);
+ _CRTIMP int __cdecl _scprintf(const char *_Format,...);
+ int __cdecl sscanf(const char *_Src,const char *_Format,...);
+ _CRTIMP int __cdecl _snscanf(const char *_Src,size_t _MaxCount,const char *_Format,...);
+ FILE *__cdecl tmpfile(void);
+ char *__cdecl tmpnam(char *_Buffer);
+ int __cdecl ungetc(int _Ch,FILE *_File);
+ int __cdecl vfprintf(FILE *_File,const char *_Format,va_list _ArgList);
+ int __cdecl vprintf(const char *_Format,va_list _ArgList);
+ /* Make sure macros are not defined. */
+#pragma push_macro("vsnprintf")
+#pragma push_macro("snprintf")
+# undef vsnprintf
+# undef snprintf
+ extern
+ __attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3)))
+ int __mingw_vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
+ extern
+ __attribute__((format(gnu_printf, 3, 4))) __attribute__((nonnull (3)))
+ int __mingw_snprintf(char* s, size_t n, const char* format, ...);
+ int __cdecl vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _snprintf(char *_Dest,size_t _Count,const char *_Format,...);
+ _CRTIMP int __cdecl _vsnprintf(char *_Dest,size_t _Count,const char *_Format,va_list _Args);
+ int __cdecl sprintf(char *_Dest,const char *_Format,...);
+ int __cdecl vsprintf(char *_Dest,const char *_Format,va_list _Args);
+#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
+ int __cdecl snprintf(char* s, size_t n, const char* format, ...);
+ __CRT_INLINE int __cdecl vsnprintf (char* s, size_t n, const char* format,va_list arg) {
+ return _vsnprintf ( s, n, format, arg);
+ }
+ int __cdecl vscanf(const char * Format, va_list argp);
+ int __cdecl vfscanf (FILE * fp, const char * Format,va_list argp);
+ int __cdecl vsscanf (const char * _Str,const char * Format,va_list argp);
+#endif
+/* Restore may prior defined macros snprintf/vsnprintf. */
+#pragma pop_macro("snprintf")
+#pragma pop_macro("vsnprintf")
+/* Check if vsnprintf and snprintf are defaulting to gnu-style. */
+# if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF
+# ifndef vsnprint
+# define vsnprintf __mingw_vsnprintf
+# endif
+# ifndef snprintf
+# define snprintf __mingw_snprintf
+# endif
+# endif
+ _CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _set_printf_count_output(int _Value);
+ _CRTIMP int __cdecl _get_printf_count_output(void);
+
+#ifndef _WSTDIO_DEFINED
+
+#ifndef WEOF
+#define WEOF (wint_t)(0xFFFF)
+#endif
+
+#ifdef _POSIX_
+ _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
+#else
+ _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
+#endif
+ wint_t __cdecl fgetwc(FILE *_File);
+ _CRTIMP wint_t __cdecl _fgetwchar(void);
+ wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
+ _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
+ wint_t __cdecl getwc(FILE *_File);
+ wint_t __cdecl getwchar(void);
+ wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
+ wint_t __cdecl putwchar(wchar_t _Ch);
+ wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
+ wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
+ int __cdecl fputws(const wchar_t *_Str,FILE *_File);
+ _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String);
+ _CRTIMP int __cdecl _putws(const wchar_t *_Str);
+ int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...);
+ int __cdecl wprintf(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...);
+ int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
+ int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...);
+ _CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list);
+ _CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
+#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
+ int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
+ __CRT_INLINE int __cdecl vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
+ int __cdecl vwscanf (const wchar_t *, va_list);
+ int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
+ int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
+#endif
+ _CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args);
+
+#ifndef RC_INVOKED
+#include
+#endif
+
+#ifdef _CRT_NON_CONFORMING_SWPRINTFS
+#ifndef __cplusplus
+#define swprintf _swprintf
+#define vswprintf _vswprintf
+#define _swprintf_l __swprintf_l
+#define _vswprintf_l __vswprintf_l
+#endif
+#endif
+
+ _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
+ _CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList);
+ int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...);
+ int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
+ int __cdecl wscanf(const wchar_t *_Format,...);
+ _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
+ _CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode);
+ _CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
+#ifndef _CRT_WPERROR_DEFINED
+#define _CRT_WPERROR_DEFINED
+ _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
+#endif
+ _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
+#if !defined(NO_OLDNAMES) && !defined(wpopen)
+#define wpopen _wpopen
+#endif
+ _CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
+ _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
+ _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
+ _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
+ _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
+
+#undef _CRT_GETPUTWCHAR_NOINLINE
+
+#if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
+#define getwchar() fgetwc(stdin)
+#define putwchar(_c) fputwc((_c),stdout)
+#else
+ __CRT_INLINE wint_t __cdecl getwchar() { return (fgetwc(stdin)); }
+ __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) { return (fputwc(_C,stdout)); }
+#endif
+
+#define getwc(_stm) fgetwc(_stm)
+#define putwc(_c,_stm) fputwc(_c,_stm)
+#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
+#define _getwc_nolock(_stm) _fgetwc_nolock(_stm)
+
+#define _WSTDIO_DEFINED
+#endif
+
+#define _STDIO_DEFINED
+#endif
+
+#define _fgetc_nolock(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream))
+#define _fputc_nolock(_c,_stream) (--(_stream)->_cnt >= 0 ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream)))
+#define _getc_nolock(_stream) _fgetc_nolock(_stream)
+#define _putc_nolock(_c,_stream) _fputc_nolock(_c,_stream)
+#define _getchar_nolock() _getc_nolock(stdin)
+#define _putchar_nolock(_c) _putc_nolock((_c),stdout)
+#define _getwchar_nolock() _getwc_nolock(stdin)
+#define _putwchar_nolock(_c) _putwc_nolock((_c),stdout)
+
+ _CRTIMP void __cdecl _lock_file(FILE *_File);
+ _CRTIMP void __cdecl _unlock_file(FILE *_File);
+ _CRTIMP int __cdecl _fclose_nolock(FILE *_File);
+ _CRTIMP int __cdecl _fflush_nolock(FILE *_File);
+ _CRTIMP size_t __cdecl _fread_nolock(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File);
+ _CRTIMP int __cdecl _fseek_nolock(FILE *_File,long _Offset,int _Origin);
+ _CRTIMP long __cdecl _ftell_nolock(FILE *_File);
+ _CRTIMP int __cdecl _fseeki64_nolock(FILE *_File,__int64 _Offset,int _Origin);
+ _CRTIMP __int64 __cdecl _ftelli64_nolock(FILE *_File);
+ _CRTIMP size_t __cdecl _fwrite_nolock(const void *_DstBuf,size_t _Size,size_t _Count,FILE *_File);
+ _CRTIMP int __cdecl _ungetc_nolock(int _Ch,FILE *_File);
+
+#if !defined(NO_OLDNAMES) || !defined(_POSIX)
+#define P_tmpdir _P_tmpdir
+#define SYS_OPEN _SYS_OPEN
+
+ char *__cdecl tempnam(const char *_Directory,const char *_FilePrefix);
+ int __cdecl fcloseall(void);
+ FILE *__cdecl fdopen(int _FileHandle,const char *_Format);
+ int __cdecl fgetchar(void);
+ int __cdecl fileno(FILE *_File);
+ int __cdecl flushall(void);
+ int __cdecl fputchar(int _Ch);
+ int __cdecl getw(FILE *_File);
+ int __cdecl putw(int _Ch,FILE *_File);
+ int __cdecl rmtmp(void);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+
+#include
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/stdlib.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdlib.h
new file mode 100644
index 00000000..96765b29
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/stdlib.h
@@ -0,0 +1,580 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_STDLIB
+#define _INC_STDLIB
+
+#include <_mingw.h>
+#include
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+
+#ifndef _ONEXIT_T_DEFINED
+#define _ONEXIT_T_DEFINED
+
+ typedef int (__cdecl *_onexit_t)(void);
+
+#ifndef NO_OLDNAMES
+#define onexit_t _onexit_t
+#endif
+#endif
+
+#ifndef _DIV_T_DEFINED
+#define _DIV_T_DEFINED
+
+ typedef struct _div_t {
+ int quot;
+ int rem;
+ } div_t;
+
+ typedef struct _ldiv_t {
+ long quot;
+ long rem;
+ } ldiv_t;
+#endif
+
+#ifndef _CRT_DOUBLE_DEC
+#define _CRT_DOUBLE_DEC
+
+#pragma pack(4)
+ typedef struct {
+ unsigned char ld[10];
+ } _LDOUBLE;
+#pragma pack()
+
+#define _PTR_LD(x) ((unsigned char *)(&(x)->ld))
+
+ typedef struct {
+ double x;
+ } _CRT_DOUBLE;
+
+ typedef struct {
+ float f;
+ } _CRT_FLOAT;
+
+#pragma push_macro("long")
+#undef long
+
+ typedef struct {
+ long double x;
+ } _LONGDOUBLE;
+
+#pragma pop_macro("long")
+
+#pragma pack(4)
+ typedef struct {
+ unsigned char ld12[12];
+ } _LDBL12;
+#pragma pack()
+#endif
+
+#define RAND_MAX 0x7fff
+
+#ifndef MB_CUR_MAX
+#define MB_CUR_MAX ___mb_cur_max_func()
+#ifndef __mb_cur_max
+#ifdef _MSVCRT_
+ extern int __mb_cur_max;
+#else
+#define __mb_cur_max (*_imp____mb_cur_max)
+ extern int *_imp____mb_cur_max;
+#endif
+#endif
+#ifdef _MSVCRT_
+ extern int __mbcur_max;
+#define ___mb_cur_max_func() (__mb_cur_max)
+#else
+ extern int* _imp____mbcur_max;
+#define ___mb_cur_max_func() (*_imp____mb_cur_max)
+#endif
+#endif
+
+#define __max(a,b) (((a) > (b)) ? (a) : (b))
+#define __min(a,b) (((a) < (b)) ? (a) : (b))
+
+#define _MAX_PATH 260
+#define _MAX_DRIVE 3
+#define _MAX_DIR 256
+#define _MAX_FNAME 256
+#define _MAX_EXT 256
+
+#define _OUT_TO_DEFAULT 0
+#define _OUT_TO_STDERR 1
+#define _OUT_TO_MSGBOX 2
+#define _REPORT_ERRMODE 3
+
+#define _WRITE_ABORT_MSG 0x1
+#define _CALL_REPORTFAULT 0x2
+
+#define _MAX_ENV 32767
+
+ typedef void (__cdecl *_purecall_handler)(void);
+
+ _CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler _Handler);
+ _CRTIMP _purecall_handler __cdecl _get_purecall_handler(void);
+
+ typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t);
+ _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler _Handler);
+ _invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void);
+
+#ifndef _CRT_ERRNO_DEFINED
+#define _CRT_ERRNO_DEFINED
+ _CRTIMP extern int *__cdecl _errno(void);
+#define errno (*_errno())
+ errno_t __cdecl _set_errno(int _Value);
+ errno_t __cdecl _get_errno(int *_Value);
+#endif
+ _CRTIMP unsigned long *__cdecl __doserrno(void);
+#define _doserrno (*__doserrno())
+ errno_t __cdecl _set_doserrno(unsigned long _Value);
+ errno_t __cdecl _get_doserrno(unsigned long *_Value);
+#ifdef _MSVCRT_
+ extern char *_sys_errlist[];
+ extern int _sys_nerr;
+#else
+ _CRTIMP char *_sys_errlist[1];
+ _CRTIMP int _sys_nerr;
+#endif
+#if (defined(_X86_) && !defined(__x86_64))
+ _CRTIMP int *__cdecl __p___argc(void);
+ _CRTIMP char ***__cdecl __p___argv(void);
+ _CRTIMP wchar_t ***__cdecl __p___wargv(void);
+ _CRTIMP char ***__cdecl __p__environ(void);
+ _CRTIMP wchar_t ***__cdecl __p__wenviron(void);
+ _CRTIMP char **__cdecl __p__pgmptr(void);
+ _CRTIMP wchar_t **__cdecl __p__wpgmptr(void);
+#endif
+#ifndef __argc
+#ifdef _MSVCRT_
+ extern int __argc;
+#else
+#define __argc (*_imp____argc)
+ extern int *_imp____argc;
+#endif
+#endif
+#ifndef __argv
+#ifdef _MSVCRT_
+ extern char **__argv;
+#else
+#define __argv (*_imp____argv)
+ extern char ***_imp____argv;
+#endif
+#endif
+#ifndef __wargv
+#ifdef _MSVCRT_
+ extern wchar_t **__wargv;
+#else
+#define __wargv (*_imp____wargv)
+ extern wchar_t ***_imp____wargv;
+#endif
+#endif
+
+#ifdef _POSIX_
+ extern char **environ;
+#else
+#ifndef _environ
+#ifdef _MSVCRT_
+ extern char **_environ;
+#else
+#define _environ (*_imp___environ)
+ extern char ***_imp___environ;
+#endif
+#endif
+
+#ifndef _wenviron
+#ifdef _MSVCRT_
+ extern wchar_t **_wenviron;
+#else
+#define _wenviron (*_imp___wenviron)
+ extern wchar_t ***_imp___wenviron;
+#endif
+#endif
+#endif
+#ifndef _pgmptr
+#ifdef _MSVCRT_
+ extern char *_pgmptr;
+#else
+#define _pgmptr (*_imp___pgmptr)
+ extern char **_imp___pgmptr;
+#endif
+#endif
+
+#ifndef _wpgmptr
+#ifdef _MSVCRT_
+ extern wchar_t *_wpgmptr;
+#else
+#define _wpgmptr (*_imp___wpgmptr)
+ extern wchar_t **_imp___wpgmptr;
+#endif
+#endif
+ errno_t __cdecl _get_pgmptr(char **_Value);
+ errno_t __cdecl _get_wpgmptr(wchar_t **_Value);
+#ifndef _fmode
+#ifdef _MSVCRT_
+ extern int _fmode;
+#else
+#define _fmode (*_imp___fmode)
+ extern int *_imp___fmode;
+#endif
+#endif
+ _CRTIMP errno_t __cdecl _set_fmode(int _Mode);
+ _CRTIMP errno_t __cdecl _get_fmode(int *_PMode);
+
+#ifndef _osplatform
+#ifdef _MSVCRT_
+ extern unsigned int _osplatform;
+#else
+#define _osplatform (*_imp___osplatform)
+ extern unsigned int *_imp___osplatform;
+#endif
+#endif
+
+#ifndef _osver
+#ifdef _MSVCRT_
+ extern unsigned int _osver;
+#else
+#define _osver (*_imp___osver)
+ extern unsigned int *_imp___osver;
+#endif
+#endif
+
+#ifndef _winver
+#ifdef _MSVCRT_
+ extern unsigned int _winver;
+#else
+#define _winver (*_imp___winver)
+ extern unsigned int *_imp___winver;
+#endif
+#endif
+
+#ifndef _winmajor
+#ifdef _MSVCRT_
+ extern unsigned int _winmajor;
+#else
+#define _winmajor (*_imp___winmajor)
+ extern unsigned int *_imp___winmajor;
+#endif
+#endif
+
+#ifndef _winminor
+#ifdef _MSVCRT_
+ extern unsigned int _winminor;
+#else
+#define _winminor (*_imp___winminor)
+ extern unsigned int *_imp___winminor;
+#endif
+#endif
+
+ errno_t __cdecl _get_osplatform(unsigned int *_Value);
+ errno_t __cdecl _get_osver(unsigned int *_Value);
+ errno_t __cdecl _get_winver(unsigned int *_Value);
+ errno_t __cdecl _get_winmajor(unsigned int *_Value);
+ errno_t __cdecl _get_winminor(unsigned int *_Value);
+#ifndef _countof
+#ifndef __cplusplus
+#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
+#else
+ extern "C++" {
+ template char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
+#define _countof(_Array) sizeof(*__countof_helper(_Array))
+ }
+#endif
+#endif
+
+#ifndef _CRT_TERMINATE_DEFINED
+#define _CRT_TERMINATE_DEFINED
+ void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
+ _CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
+#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
+ /* C99 function name */
+ void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
+ __CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
+ { _exit(status); }
+#endif
+
+#pragma push_macro("abort")
+#undef abort
+ void __cdecl __declspec(noreturn) abort(void);
+#pragma pop_macro("abort")
+
+#endif
+
+ _CRTIMP unsigned int __cdecl _set_abort_behavior(unsigned int _Flags,unsigned int _Mask);
+
+#ifndef _CRT_ABS_DEFINED
+#define _CRT_ABS_DEFINED
+ int __cdecl abs(int _X);
+ long __cdecl labs(long _X);
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 64
+ __int64 __cdecl _abs64(__int64);
+#endif
+ int __cdecl atexit(void (__cdecl *)(void));
+#ifndef _CRT_ATOF_DEFINED
+#define _CRT_ATOF_DEFINED
+ double __cdecl atof(const char *_String);
+ double __cdecl _atof_l(const char *_String,_locale_t _Locale);
+#endif
+ int __cdecl atoi(const char *_Str);
+ _CRTIMP int __cdecl _atoi_l(const char *_Str,_locale_t _Locale);
+ long __cdecl atol(const char *_Str);
+ _CRTIMP long __cdecl _atol_l(const char *_Str,_locale_t _Locale);
+#ifndef _CRT_ALGO_DEFINED
+#define _CRT_ALGO_DEFINED
+ void *__cdecl bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
+ void __cdecl qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
+#endif
+ unsigned short __cdecl _byteswap_ushort(unsigned short _Short);
+ /*unsigned long __cdecl _byteswap_ulong (unsigned long _Long); */
+#if _INTEGRAL_MAX_BITS >= 64
+ unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 _Int64);
+#endif
+ div_t __cdecl div(int _Numerator,int _Denominator);
+ char *__cdecl getenv(const char *_VarName);
+ _CRTIMP char *__cdecl _itoa(int _Value,char *_Dest,int _Radix);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP char *__cdecl _i64toa(__int64 _Val,char *_DstBuf,int _Radix);
+ _CRTIMP char *__cdecl _ui64toa(unsigned __int64 _Val,char *_DstBuf,int _Radix);
+ _CRTIMP __int64 __cdecl _atoi64(const char *_String);
+ _CRTIMP __int64 __cdecl _atoi64_l(const char *_String,_locale_t _Locale);
+ _CRTIMP __int64 __cdecl _strtoi64(const char *_String,char **_EndPtr,int _Radix);
+ _CRTIMP __int64 __cdecl _strtoi64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
+ _CRTIMP unsigned __int64 __cdecl _strtoui64(const char *_String,char **_EndPtr,int _Radix);
+ _CRTIMP unsigned __int64 __cdecl _strtoui64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
+#endif
+ ldiv_t __cdecl ldiv(long _Numerator,long _Denominator);
+ _CRTIMP char *__cdecl _ltoa(long _Value,char *_Dest,int _Radix);
+ int __cdecl mblen(const char *_Ch,size_t _MaxCount);
+ _CRTIMP int __cdecl _mblen_l(const char *_Ch,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP size_t __cdecl _mbstrlen(const char *_Str);
+ _CRTIMP size_t __cdecl _mbstrlen_l(const char *_Str,_locale_t _Locale);
+ _CRTIMP size_t __cdecl _mbstrnlen(const char *_Str,size_t _MaxCount);
+ _CRTIMP size_t __cdecl _mbstrnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale);
+ int __cdecl mbtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes);
+ _CRTIMP int __cdecl _mbtowc_l(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes,_locale_t _Locale);
+ size_t __cdecl mbstowcs(wchar_t *_Dest,const char *_Source,size_t _MaxCount);
+ _CRTIMP size_t __cdecl _mbstowcs_l(wchar_t *_Dest,const char *_Source,size_t _MaxCount,_locale_t _Locale);
+ int __cdecl rand(void);
+ _CRTIMP int __cdecl _set_error_mode(int _Mode);
+ void __cdecl srand(unsigned int _Seed);
+ double __cdecl strtod(const char *_Str,char **_EndPtr);
+ float __cdecl strtof(const char *nptr, char **endptr);
+#if !defined __NO_ISOCEXT /* in libmingwex.a */
+ float __cdecl strtof (const char * __restrict__, char ** __restrict__);
+ long double __cdecl strtold(const char * __restrict__, char ** __restrict__);
+#endif /* __NO_ISOCEXT */
+ _CRTIMP double __cdecl _strtod_l(const char *_Str,char **_EndPtr,_locale_t _Locale);
+ long __cdecl strtol(const char *_Str,char **_EndPtr,int _Radix);
+ _CRTIMP long __cdecl _strtol_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
+ unsigned long __cdecl strtoul(const char *_Str,char **_EndPtr,int _Radix);
+ _CRTIMP unsigned long __cdecl _strtoul_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
+#ifndef _CRT_SYSTEM_DEFINED
+#define _CRT_SYSTEM_DEFINED
+ int __cdecl system(const char *_Command);
+#endif
+ _CRTIMP char *__cdecl _ultoa(unsigned long _Value,char *_Dest,int _Radix);
+ int __cdecl wctomb(char *_MbCh,wchar_t _WCh);
+ _CRTIMP int __cdecl _wctomb_l(char *_MbCh,wchar_t _WCh,_locale_t _Locale);
+ size_t __cdecl wcstombs(char *_Dest,const wchar_t *_Source,size_t _MaxCount);
+ _CRTIMP size_t __cdecl _wcstombs_l(char *_Dest,const wchar_t *_Source,size_t _MaxCount,_locale_t _Locale);
+
+#ifndef _CRT_ALLOCATION_DEFINED
+#define _CRT_ALLOCATION_DEFINED
+ void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
+ void __cdecl free(void *_Memory);
+ void *__cdecl malloc(size_t _Size);
+ void *__cdecl realloc(void *_Memory,size_t _NewSize);
+ _CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size);
+ //_CRTIMP void __cdecl _aligned_free(void *_Memory);
+ //_CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment);
+ _CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset);
+ _CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);
+ _CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment);
+ _CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset);
+ _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset);
+#endif
+
+#ifndef _WSTDLIB_DEFINED
+#define _WSTDLIB_DEFINED
+
+ _CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix);
+ _CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix);
+ _CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix);
+ double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr);
+ float __cdecl wcstof(const wchar_t *nptr, wchar_t **endptr);
+#if !defined __NO_ISOCEXT /* in libmingwex.a */
+ float __cdecl wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__);
+ long double __cdecl wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__);
+#endif /* __NO_ISOCEXT */
+ _CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale);
+ long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
+ _CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
+ unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
+ _CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
+ _CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName);
+#ifndef _CRT_WSYSTEM_DEFINED
+#define _CRT_WSYSTEM_DEFINED
+ _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
+#endif
+ _CRTIMP double __cdecl _wtof(const wchar_t *_Str);
+ _CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
+ _CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
+ _CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
+ _CRTIMP long __cdecl _wtol(const wchar_t *_Str);
+ _CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
+
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix);
+ _CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
+ _CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
+ _CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
+ _CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
+ _CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
+ _CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
+ _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str ,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
+#endif
+#endif
+
+#ifndef _POSIX_
+#define _CVTBUFSIZE (309+40)
+ _CRTIMP char *__cdecl _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes);
+ _CRTIMP char *__cdecl _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
+ _CRTIMP char *__cdecl _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
+ _CRTIMP char *__cdecl _gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
+ _CRTIMP int __cdecl _atodbl(_CRT_DOUBLE *_Result,char *_Str);
+ _CRTIMP int __cdecl _atoldbl(_LDOUBLE *_Result,char *_Str);
+ _CRTIMP int __cdecl _atoflt(_CRT_FLOAT *_Result,char *_Str);
+ _CRTIMP int __cdecl _atodbl_l(_CRT_DOUBLE *_Result,char *_Str,_locale_t _Locale);
+ _CRTIMP int __cdecl _atoldbl_l(_LDOUBLE *_Result,char *_Str,_locale_t _Locale);
+ _CRTIMP int __cdecl _atoflt_l(_CRT_FLOAT *_Result,char *_Str,_locale_t _Locale);
+ unsigned long __cdecl _lrotl(unsigned long _Val,int _Shift);
+ unsigned long __cdecl _lrotr(unsigned long _Val,int _Shift);
+ _CRTIMP void __cdecl _makepath(char *_Path,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext);
+ _onexit_t __cdecl _onexit(_onexit_t _Func);
+
+#ifndef _CRT_PERROR_DEFINED
+#define _CRT_PERROR_DEFINED
+ void __cdecl perror(const char *_ErrMsg);
+#endif
+ _CRTIMP int __cdecl _putenv(const char *_EnvString);
+ unsigned int __cdecl _rotl(unsigned int _Val,int _Shift);
+#if _INTEGRAL_MAX_BITS >= 64
+ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift);
+#endif
+ unsigned int __cdecl _rotr(unsigned int _Val,int _Shift);
+#if _INTEGRAL_MAX_BITS >= 64
+ unsigned __int64 __cdecl _rotr64(unsigned __int64 _Val,int _Shift);
+#endif
+ _CRTIMP void __cdecl _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath);
+ _CRTIMP void __cdecl _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext);
+ _CRTIMP void __cdecl _swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
+
+#ifndef _WSTDLIBP_DEFINED
+#define _WSTDLIBP_DEFINED
+ _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
+ _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
+#ifndef _CRT_WPERROR_DEFINED
+#define _CRT_WPERROR_DEFINED
+ _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
+#endif
+ _CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
+ _CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath);
+ _CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
+#endif
+
+ _CRTIMP void __cdecl _beep(unsigned _Frequency,unsigned _Duration) __MINGW_ATTRIB_DEPRECATED;
+ /* Not to be confused with _set_error_mode (int). */
+ _CRTIMP void __cdecl _seterrormode(int _Mode) __MINGW_ATTRIB_DEPRECATED;
+ _CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED;
+#endif
+
+#ifndef NO_OLDNAMES
+#ifndef _POSIX_
+#if 0
+#ifndef __cplusplus
+#ifndef NOMINMAX
+#ifndef max
+#define max(a,b) (((a) > (b)) ? (a) : (b))
+#endif
+#ifndef min
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#endif
+#endif
+#endif
+#endif
+
+#define sys_errlist _sys_errlist
+#define sys_nerr _sys_nerr
+#define environ _environ
+ char *__cdecl ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
+ char *__cdecl fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
+ char *__cdecl gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
+ char *__cdecl itoa(int _Val,char *_DstBuf,int _Radix);
+ char *__cdecl ltoa(long _Val,char *_DstBuf,int _Radix);
+ int __cdecl putenv(const char *_EnvString);
+ void __cdecl swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
+ char *__cdecl ultoa(unsigned long _Val,char *_Dstbuf,int _Radix);
+ onexit_t __cdecl onexit(onexit_t _Func);
+#endif
+#endif
+
+#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
+
+ typedef struct { long long quot, rem; } lldiv_t;
+
+ lldiv_t __cdecl lldiv(long long, long long);
+
+ __CRT_INLINE long long __cdecl llabs(long long _j) { return (_j >= 0 ? _j : -_j); }
+
+ long long __cdecl strtoll(const char* __restrict__, char** __restrict, int);
+ unsigned long long __cdecl strtoull(const char* __restrict__, char** __restrict__, int);
+
+ /* these are stubs for MS _i64 versions */
+ long long __cdecl atoll (const char *);
+
+#ifndef __STRICT_ANSI__
+ long long __cdecl wtoll (const wchar_t *);
+ char *__cdecl lltoa (long long, char *, int);
+ char *__cdecl ulltoa (unsigned long long , char *, int);
+ wchar_t *__cdecl lltow (long long, wchar_t *, int);
+ wchar_t *__cdecl ulltow (unsigned long long, wchar_t *, int);
+
+ /* __CRT_INLINE using non-ansi functions */
+ __CRT_INLINE long long __cdecl atoll (const char * _c) { return _atoi64 (_c); }
+ __CRT_INLINE char *__cdecl lltoa (long long _n, char * _c, int _i) { return _i64toa (_n, _c, _i); }
+ __CRT_INLINE char *__cdecl ulltoa (unsigned long long _n, char * _c, int _i) { return _ui64toa (_n, _c, _i); }
+ __CRT_INLINE long long __cdecl wtoll (const wchar_t * _w) { return _wtoi64 (_w); }
+ __CRT_INLINE wchar_t *__cdecl lltow (long long _n, wchar_t * _w, int _i) { return _i64tow (_n, _w, _i); }
+ __CRT_INLINE wchar_t *__cdecl ulltow (unsigned long long _n, wchar_t * _w, int _i) { return _ui64tow (_n, _w, _i); }
+#endif /* (__STRICT_ANSI__) */
+
+#endif /* !__NO_ISOCEXT */
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+
+#include
+#include
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/string.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/string.h
new file mode 100644
index 00000000..3249dc3b
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/string.h
@@ -0,0 +1,164 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_STRING
+#define _INC_STRING
+
+#include <_mingw.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _NLSCMP_DEFINED
+#define _NLSCMP_DEFINED
+#define _NLSCMPERROR 2147483647
+#endif
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#define _WConst_return _CONST_RETURN
+
+#ifndef _CRT_MEMORY_DEFINED
+#define _CRT_MEMORY_DEFINED
+ _CRTIMP void *__cdecl _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount);
+ _CONST_RETURN void *__cdecl memchr(const void *_Buf ,int _Val,size_t _MaxCount);
+ _CRTIMP int __cdecl _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
+ _CRTIMP int __cdecl _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale);
+ int __cdecl memcmp(const void *_Buf1,const void *_Buf2,size_t _Size);
+ void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _Size);
+ void *__cdecl memset(void *_Dst,int _Val,size_t _Size);
+#ifndef NO_OLDNAMES
+ void *__cdecl memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size);
+ int __cdecl memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
+#endif
+#endif
+ char *__cdecl _strset(char *_Str,int _Val);
+ char *__cdecl strcpy(char *_Dest,const char *_Source);
+ char *__cdecl strcat(char *_Dest,const char *_Source);
+ int __cdecl strcmp(const char *_Str1,const char *_Str2);
+ size_t __cdecl strlen(const char *_Str);
+#if 0
+ size_t __cdecl strnlen(const char *_Str,size_t _MaxCount);
+#endif
+ void *__cdecl memmove(void *_Dst,const void *_Src,size_t _Size);
+ _CRTIMP char *__cdecl _strdup(const char *_Src);
+ _CONST_RETURN char *__cdecl strchr(const char *_Str,int _Val);
+ _CRTIMP int __cdecl _stricmp(const char *_Str1,const char *_Str2);
+ _CRTIMP int __cdecl _strcmpi(const char *_Str1,const char *_Str2);
+ _CRTIMP int __cdecl _stricmp_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
+ int __cdecl strcoll(const char *_Str1,const char *_Str2);
+ _CRTIMP int __cdecl _strcoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _stricoll(const char *_Str1,const char *_Str2);
+ _CRTIMP int __cdecl _stricoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _strncoll (const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _strncoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP int __cdecl _strnicoll (const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _strnicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
+ size_t __cdecl strcspn(const char *_Str,const char *_Control);
+ _CRTIMP char *__cdecl _strerror(const char *_ErrMsg);
+ char *__cdecl strerror(int);
+ _CRTIMP char *__cdecl _strlwr(char *_String);
+ char *strlwr_l(char *_String,_locale_t _Locale);
+ char *__cdecl strncat(char *_Dest,const char *_Source,size_t _Count);
+ int __cdecl strncmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _strnicmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _strnicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
+ char *strncpy(char *_Dest,const char *_Source,size_t _Count);
+ _CRTIMP char *__cdecl _strnset(char *_Str,int _Val,size_t _MaxCount);
+ _CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char *_Control);
+ _CONST_RETURN char *__cdecl strrchr(const char *_Str,int _Ch);
+ _CRTIMP char *__cdecl _strrev(char *_Str);
+ size_t __cdecl strspn(const char *_Str,const char *_Control);
+ _CONST_RETURN char *__cdecl strstr(const char *_Str,const char *_SubStr);
+ char *__cdecl strtok(char *_Str,const char *_Delim);
+ _CRTIMP char *__cdecl _strupr(char *_String);
+ _CRTIMP char *_strupr_l(char *_String,_locale_t _Locale);
+ size_t __cdecl strxfrm(char *_Dst,const char *_Src,size_t _MaxCount);
+ _CRTIMP size_t __cdecl _strxfrm_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
+
+#ifndef NO_OLDNAMES
+ char *__cdecl strdup(const char *_Src);
+ int __cdecl strcmpi(const char *_Str1,const char *_Str2);
+ int __cdecl stricmp(const char *_Str1,const char *_Str2);
+ char *__cdecl strlwr(char *_Str);
+ int __cdecl strnicmp(const char *_Str1,const char *_Str,size_t _MaxCount);
+ __CRT_INLINE int __cdecl strncasecmp (const char *__sz1, const char *__sz2, size_t __sizeMaxCompare) { return _strnicmp (__sz1, __sz2, __sizeMaxCompare); }
+ __CRT_INLINE int __cdecl strcasecmp (const char *__sz1, const char *__sz2) { return _stricmp (__sz1, __sz2); }
+ char *__cdecl strnset(char *_Str,int _Val,size_t _MaxCount);
+ char *__cdecl strrev(char *_Str);
+ char *__cdecl strset(char *_Str,int _Val);
+ char *__cdecl strupr(char *_Str);
+#endif
+
+#ifndef _WSTRING_DEFINED
+#define _WSTRING_DEFINED
+
+ _CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str);
+ wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source);
+ _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
+ int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
+ wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source);
+ size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
+ size_t __cdecl wcslen(const wchar_t *_Str);
+ size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
+ wchar_t *wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
+ int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ wchar_t *wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
+ _CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
+ _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
+ size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
+ _CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
+ wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim);
+ _CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum);
+ _CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str);
+ _CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
+ _CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
+ _CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str);
+ _CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val);
+ _CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String);
+ _CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale);
+ _CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String);
+ _CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale);
+ size_t __cdecl wcsxfrm(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount);
+ _CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale);
+ int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2);
+ _CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
+ _CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
+
+#ifndef NO_OLDNAMES
+ wchar_t *__cdecl wcsdup(const wchar_t *_Str);
+#define wcswcs wcsstr
+ int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
+ int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
+ wchar_t *__cdecl wcsrev(wchar_t *_Str);
+ wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val);
+ wchar_t *__cdecl wcslwr(wchar_t *_Str);
+ wchar_t *__cdecl wcsupr(wchar_t *_Str);
+ int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#include
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/fcntl.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/fcntl.h
new file mode 100644
index 00000000..29fd55a1
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/fcntl.h
@@ -0,0 +1,13 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+/*
+ * This file is part of the Mingw32 package.
+ *
+ * This fcntl.h maps to the root fcntl.h
+ */
+#ifndef __STRICT_ANSI__
+#include
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/file.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/file.h
new file mode 100644
index 00000000..370f352d
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/file.h
@@ -0,0 +1,14 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+/*
+ * This file is part of the Mingw32 package.
+ *
+ * This file.h maps to the root fcntl.h
+ * TODO?
+ */
+#ifndef __STRICT_ANSI__
+#include
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/locking.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/locking.h
new file mode 100644
index 00000000..e3fc85b3
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/locking.h
@@ -0,0 +1,30 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_LOCKING
+#define _INC_LOCKING
+
+#ifndef _WIN32
+#error Only Win32 target is supported!
+#endif
+
+/* All the headers include this file. */
+#include <_mingw.h>
+
+#define _LK_UNLCK 0
+#define _LK_LOCK 1
+#define _LK_NBLCK 2
+#define _LK_RLCK 3
+#define _LK_NBRLCK 4
+
+#ifndef NO_OLDNAMES
+#define LK_UNLCK _LK_UNLCK
+#define LK_LOCK _LK_LOCK
+#define LK_NBLCK _LK_NBLCK
+#define LK_RLCK _LK_RLCK
+#define LK_NBRLCK _LK_NBRLCK
+#endif
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/stat.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/stat.h
new file mode 100644
index 00000000..344d4a24
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/stat.h
@@ -0,0 +1,290 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_STAT
+#define _INC_STAT
+
+#ifndef _WIN32
+#error Only Win32 target is supported!
+#endif
+
+#include <_mingw.h>
+#include
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _CRTIMP
+#define _CRTIMP __declspec(dllimport)
+#endif
+
+#include
+
+#ifndef __TINYC__ /* gr */
+#ifdef _USE_32BIT_TIME_T
+#ifdef _WIN64
+#undef _USE_32BIT_TIME_T
+#endif
+#else
+#if _INTEGRAL_MAX_BITS < 64
+#define _USE_32BIT_TIME_T
+#endif
+#endif
+#endif
+
+#ifndef _TIME32_T_DEFINED
+ typedef long __time32_t;
+#define _TIME32_T_DEFINED
+#endif
+
+#ifndef _TIME64_T_DEFINED
+#if _INTEGRAL_MAX_BITS >= 64
+ typedef __int64 __time64_t;
+#endif
+#define _TIME64_T_DEFINED
+#endif
+
+#ifndef _TIME_T_DEFINED
+#ifdef _USE_32BIT_TIME_T
+ typedef __time32_t time_t;
+#else
+ typedef __time64_t time_t;
+#endif
+#define _TIME_T_DEFINED
+#endif
+
+#ifndef _WCHAR_T_DEFINED
+ typedef unsigned short wchar_t;
+#define _WCHAR_T_DEFINED
+#endif
+
+#ifndef _STAT_DEFINED
+
+#ifdef _USE_32BIT_TIME_T
+#ifndef _WIN64
+#define _fstat32 _fstat
+#define _stat32 _stat
+#define _wstat32 _wstat
+#else
+#define _fstat _fstat32
+#define _stat _stat32
+#define _wstat _wstat32
+#endif
+#define _fstati64 _fstat32i64
+#define _stati64 _stat32i64
+#define _wstati64 _wstat32i64
+#else
+#define _fstat _fstat64i32
+#define _fstati64 _fstat64
+#define _stat _stat64i32
+#define _stati64 _stat64
+#define _wstat _wstat64i32
+#define _wstati64 _wstat64
+#endif
+
+ struct _stat32 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ _off_t st_size;
+ __time32_t st_atime;
+ __time32_t st_mtime;
+ __time32_t st_ctime;
+ };
+
+#ifndef NO_OLDNAMES
+ struct stat {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ _off_t st_size;
+ time_t st_atime;
+ time_t st_mtime;
+ time_t st_ctime;
+ };
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 64
+ struct _stat32i64 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ __int64 st_size;
+ __time32_t st_atime;
+ __time32_t st_mtime;
+ __time32_t st_ctime;
+ };
+
+ struct _stat64i32 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ _off_t st_size;
+ __time64_t st_atime;
+ __time64_t st_mtime;
+ __time64_t st_ctime;
+ };
+
+ struct _stat64 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ __int64 st_size;
+ __time64_t st_atime;
+ __time64_t st_mtime;
+ __time64_t st_ctime;
+ };
+#endif
+
+#define __stat64 _stat64
+
+#define _STAT_DEFINED
+#endif
+
+#define _S_IFMT 0xF000
+#define _S_IFDIR 0x4000
+#define _S_IFCHR 0x2000
+#define _S_IFIFO 0x1000
+#define _S_IFREG 0x8000
+#define _S_IREAD 0x0100
+#define _S_IWRITE 0x0080
+#define _S_IEXEC 0x0040
+
+ _CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat);
+ _CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat);
+ _CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat);
+ int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
+ __CRT_INLINE int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat)
+ {
+ struct _stat64 st;
+ int ret=_fstat64(_FileDes,&st);
+ _Stat->st_dev=st.st_dev;
+ _Stat->st_ino=st.st_ino;
+ _Stat->st_mode=st.st_mode;
+ _Stat->st_nlink=st.st_nlink;
+ _Stat->st_uid=st.st_uid;
+ _Stat->st_gid=st.st_gid;
+ _Stat->st_rdev=st.st_rdev;
+ _Stat->st_size=(_off_t) st.st_size;
+ _Stat->st_atime=st.st_atime;
+ _Stat->st_mtime=st.st_mtime;
+ _Stat->st_ctime=st.st_ctime;
+ return ret;
+ }
+ _CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat);
+ _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat);
+ int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
+ __CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat)
+ {
+ struct _stat64 st;
+ int ret=_stat64(_Name,&st);
+ _Stat->st_dev=st.st_dev;
+ _Stat->st_ino=st.st_ino;
+ _Stat->st_mode=st.st_mode;
+ _Stat->st_nlink=st.st_nlink;
+ _Stat->st_uid=st.st_uid;
+ _Stat->st_gid=st.st_gid;
+ _Stat->st_rdev=st.st_rdev;
+ _Stat->st_size=(_off_t) st.st_size;
+ _Stat->st_atime=st.st_atime;
+ _Stat->st_mtime=st.st_mtime;
+ _Stat->st_ctime=st.st_ctime;
+ return ret;
+ }
+#endif
+
+#ifndef _WSTAT_DEFINED
+#define _WSTAT_DEFINED
+ _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
+ int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
+ _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
+#endif
+#endif
+
+#ifndef NO_OLDNAMES
+#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
+
+#define S_IFMT _S_IFMT
+#define S_IFDIR _S_IFDIR
+#define S_IFCHR _S_IFCHR
+#define S_IFREG _S_IFREG
+#define S_IREAD _S_IREAD
+#define S_IWRITE _S_IWRITE
+#define S_IEXEC _S_IEXEC
+#define S_IFIFO _S_IFIFO
+#define S_IFBLK _S_IFBLK
+
+#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
+#define _S_IXUSR _S_IEXEC
+#define _S_IWUSR _S_IWRITE
+
+#define S_IRWXU _S_IRWXU
+#define S_IXUSR _S_IXUSR
+#define S_IWUSR _S_IWUSR
+#define S_IRUSR _S_IRUSR
+#define _S_IRUSR _S_IREAD
+
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+
+#endif
+
+#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
+int __cdecl stat(const char *_Filename,struct stat *_Stat);
+int __cdecl fstat(int _Desc,struct stat *_Stat);
+int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
+#ifdef _USE_32BIT_TIME_T
+__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
+ return _fstat32(_Desc,(struct _stat32 *)_Stat);
+}
+__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
+ return _stat32(_Filename,(struct _stat32 *)_Stat);
+}
+#else
+__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
+ return _fstat64i32(_Desc,(struct _stat64i32 *)_Stat);
+}
+__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
+ return _stat64i32(_Filename,(struct _stat64i32 *)_Stat);
+}
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/time.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/time.h
new file mode 100644
index 00000000..8ccab831
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/time.h
@@ -0,0 +1,69 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#ifndef _SYS_TIME_H_
+#define _SYS_TIME_H_
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __STRICT_ANSI__
+#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
+#define _TIMEVAL_DEFINED
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+};
+#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
+#define timercmp(tvp, uvp, cmp) \
+ (((tvp)->tv_sec != (uvp)->tv_sec) ? \
+ ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
+ ((tvp)->tv_usec cmp (uvp)->tv_usec))
+#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
+#endif /* _TIMEVAL_DEFINED */
+
+#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
+#define _TIMEZONE_DEFINED
+/* Provided for compatibility with code that assumes that
+ the presence of gettimeofday function implies a definition
+ of struct timezone. */
+struct timezone
+{
+ int tz_minuteswest; /* of Greenwich */
+ int tz_dsttime; /* type of dst correction to apply */
+};
+
+ extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
+
+#endif
+
+/*
+ Implementation as per:
+ The Open Group Base Specifications, Issue 6
+ IEEE Std 1003.1, 2004 Edition
+
+ The timezone pointer arg is ignored. Errors are ignored.
+*/
+#ifndef _GETTIMEOFDAY_DEFINED
+#define _GETTIMEOFDAY_DEFINED
+int __cdecl gettimeofday(struct timeval *__restrict__,
+ void *__restrict__ /* tzp (unused) */);
+#endif
+
+#endif /* __STRICT_ANSI__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Adding timespec definition. */
+#include
+
+
+#endif /* _SYS_TIME_H_ */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/timeb.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/timeb.h
new file mode 100644
index 00000000..34837738
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/timeb.h
@@ -0,0 +1,133 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _TIMEB_H_
+#define _TIMEB_H_
+
+#include <_mingw.h>
+
+#ifndef _WIN32
+#error Only Win32 target is supported!
+#endif
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _CRTIMP
+#define _CRTIMP __declspec(dllimport)
+#endif
+
+#ifndef __TINYC__ /* gr */
+#ifdef _USE_32BIT_TIME_T
+#ifdef _WIN64
+#undef _USE_32BIT_TIME_T
+#endif
+#else
+#if _INTEGRAL_MAX_BITS < 64
+#define _USE_32BIT_TIME_T
+#endif
+#endif
+#endif
+
+#ifndef _TIME32_T_DEFINED
+ typedef long __time32_t;
+#define _TIME32_T_DEFINED
+#endif
+
+#ifndef _TIME64_T_DEFINED
+#if _INTEGRAL_MAX_BITS >= 64
+ typedef __int64 __time64_t;
+#endif
+#define _TIME64_T_DEFINED
+#endif
+
+#ifndef _TIME_T_DEFINED
+#ifdef _USE_32BIT_TIME_T
+ typedef __time32_t time_t;
+#else
+ typedef __time64_t time_t;
+#endif
+#define _TIME_T_DEFINED
+#endif
+
+#ifndef _TIMEB_DEFINED
+#define _TIMEB_DEFINED
+
+ struct __timeb32 {
+ __time32_t time;
+ unsigned short millitm;
+ short timezone;
+ short dstflag;
+ };
+
+#ifndef NO_OLDNAMES
+ struct timeb {
+ time_t time;
+ unsigned short millitm;
+ short timezone;
+ short dstflag;
+ };
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 64
+ struct __timeb64 {
+ __time64_t time;
+ unsigned short millitm;
+ short timezone;
+ short dstflag;
+ };
+#endif
+
+#ifdef _USE_32BIT_TIME_T
+#define _timeb __timeb32
+//gr #define _ftime _ftime32
+#define _ftime32 _ftime
+#else
+#define _timeb __timeb64
+#define _ftime _ftime64
+#endif
+#endif
+
+ _CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time);
+#endif
+
+#ifndef _TIMESPEC_DEFINED
+#define _TIMESPEC_DEFINED
+struct timespec {
+ time_t tv_sec; /* Seconds */
+ long tv_nsec; /* Nanoseconds */
+};
+
+struct itimerspec {
+ struct timespec it_interval; /* Timer period */
+ struct timespec it_value; /* Timer expiration */
+};
+#endif
+
+#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
+#ifdef _USE_32BIT_TIME_T
+__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
+ _ftime32((struct __timeb32 *)_Tmb);
+}
+#else
+__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
+ _ftime64((struct __timeb64 *)_Tmb);
+}
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+
+#include
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/types.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/types.h
new file mode 100644
index 00000000..7379b0f1
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/types.h
@@ -0,0 +1,118 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_TYPES
+#define _INC_TYPES
+
+#ifndef _WIN32
+#error Only Win32 target is supported!
+#endif
+
+#include <_mingw.h>
+
+#ifndef __TINYC__ /* gr */
+#ifdef _USE_32BIT_TIME_T
+#ifdef _WIN64
+#undef _USE_32BIT_TIME_T
+#endif
+#else
+#if _INTEGRAL_MAX_BITS < 64
+#define _USE_32BIT_TIME_T
+#endif
+#endif
+#endif
+
+#ifndef _TIME32_T_DEFINED
+#define _TIME32_T_DEFINED
+typedef long __time32_t;
+#endif
+
+#ifndef _TIME64_T_DEFINED
+#define _TIME64_T_DEFINED
+#if _INTEGRAL_MAX_BITS >= 64
+typedef __int64 __time64_t;
+#endif
+#endif
+
+#ifndef _TIME_T_DEFINED
+#define _TIME_T_DEFINED
+#ifdef _USE_32BIT_TIME_T
+typedef __time32_t time_t;
+#else
+typedef __time64_t time_t;
+#endif
+#endif
+
+#ifndef _INO_T_DEFINED
+#define _INO_T_DEFINED
+typedef unsigned short _ino_t;
+#ifndef NO_OLDNAMES
+typedef unsigned short ino_t;
+#endif
+#endif
+
+#ifndef _DEV_T_DEFINED
+#define _DEV_T_DEFINED
+typedef unsigned int _dev_t;
+#ifndef NO_OLDNAMES
+typedef unsigned int dev_t;
+#endif
+#endif
+
+#ifndef _PID_T_
+#define _PID_T_
+#ifndef _WIN64
+typedef int _pid_t;
+#else
+typedef __int64 _pid_t;
+#endif
+
+#ifndef NO_OLDNAMES
+typedef _pid_t pid_t;
+#endif
+#endif /* Not _PID_T_ */
+
+#ifndef _MODE_T_
+#define _MODE_T_
+typedef unsigned short _mode_t;
+
+#ifndef NO_OLDNAMES
+typedef _mode_t mode_t;
+#endif
+#endif /* Not _MODE_T_ */
+
+#ifndef _OFF_T_DEFINED
+#define _OFF_T_DEFINED
+#ifndef _OFF_T_
+#define _OFF_T_
+ typedef long _off_t;
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+ typedef long off_t;
+#endif
+#endif
+#endif
+
+#ifndef _OFF64_T_DEFINED
+#define _OFF64_T_DEFINED
+ typedef long long _off64_t;
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+ typedef long long off64_t;
+#endif
+#endif
+
+#ifndef _TIMESPEC_DEFINED
+#define _TIMESPEC_DEFINED
+struct timespec {
+ time_t tv_sec; /* Seconds */
+ long tv_nsec; /* Nanoseconds */
+};
+
+struct itimerspec {
+ struct timespec it_interval; /* Timer period */
+ struct timespec it_value; /* Timer expiration */
+};
+#endif
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/unistd.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/unistd.h
new file mode 100644
index 00000000..31006d32
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/unistd.h
@@ -0,0 +1,14 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+/*
+ * This file is part of the Mingw32 package.
+ *
+ * unistd.h maps (roughly) to io.h
+ */
+#ifndef __STRICT_ANSI__
+#include
+#endif
+
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/utime.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/utime.h
new file mode 100644
index 00000000..fec8304f
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/sys/utime.h
@@ -0,0 +1,146 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_UTIME
+#define _INC_UTIME
+
+#ifndef _WIN32
+#error Only Win32 target is supported!
+#endif
+
+#include <_mingw.h>
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _CRTIMP
+#define _CRTIMP __declspec(dllimport)
+#endif
+
+#ifndef _WCHAR_T_DEFINED
+ typedef unsigned short wchar_t;
+#define _WCHAR_T_DEFINED
+#endif
+
+#ifndef __TINYC__ /* gr */
+#ifdef _USE_32BIT_TIME_T
+#ifdef _WIN64
+#undef _USE_32BIT_TIME_T
+#endif
+#else
+#if _INTEGRAL_MAX_BITS < 64
+#define _USE_32BIT_TIME_T
+#endif
+#endif
+#endif
+
+#ifndef _TIME32_T_DEFINED
+#define _TIME32_T_DEFINED
+ typedef long __time32_t;
+#endif
+
+#ifndef _TIME64_T_DEFINED
+#define _TIME64_T_DEFINED
+#if _INTEGRAL_MAX_BITS >= 64
+ typedef __int64 __time64_t;
+#endif
+#endif
+
+#ifndef _TIME_T_DEFINED
+#define _TIME_T_DEFINED
+#ifdef _USE_32BIT_TIME_T
+ typedef __time32_t time_t;
+#else
+ typedef __time64_t time_t;
+#endif
+#endif
+
+#ifndef _UTIMBUF_DEFINED
+#define _UTIMBUF_DEFINED
+
+ struct _utimbuf {
+ time_t actime;
+ time_t modtime;
+ };
+
+ struct __utimbuf32 {
+ __time32_t actime;
+ __time32_t modtime;
+ };
+
+#if _INTEGRAL_MAX_BITS >= 64
+ struct __utimbuf64 {
+ __time64_t actime;
+ __time64_t modtime;
+ };
+#endif
+
+#ifndef NO_OLDNAMES
+ struct utimbuf {
+ time_t actime;
+ time_t modtime;
+ };
+
+ struct utimbuf32 {
+ __time32_t actime;
+ __time32_t modtime;
+ };
+#endif
+#endif
+
+ _CRTIMP int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Time);
+ _CRTIMP int __cdecl _futime32(int _FileDes,struct __utimbuf32 *_Time);
+ _CRTIMP int __cdecl _wutime32(const wchar_t *_Filename,struct __utimbuf32 *_Time);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP int __cdecl _utime64(const char *_Filename,struct __utimbuf64 *_Time);
+ _CRTIMP int __cdecl _futime64(int _FileDes,struct __utimbuf64 *_Time);
+ _CRTIMP int __cdecl _wutime64(const wchar_t *_Filename,struct __utimbuf64 *_Time);
+#endif
+
+#ifndef RC_INVOKED
+#ifdef _USE_32BIT_TIME_T
+__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
+ return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
+}
+__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
+ return _futime32(_Desc,(struct __utimbuf32 *)_Utimbuf);
+}
+__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
+ return _wutime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
+}
+#else
+__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
+ return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
+}
+__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
+ return _futime64(_Desc,(struct __utimbuf64 *)_Utimbuf);
+}
+__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
+ return _wutime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
+}
+#endif
+
+#ifndef NO_OLDNAMES
+#ifdef _USE_32BIT_TIME_T
+__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
+ return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
+}
+#else
+__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
+ return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
+}
+#endif
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/tcc/tcc_libm.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/tcc/tcc_libm.h
new file mode 100644
index 00000000..0a62e6fb
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/tcc/tcc_libm.h
@@ -0,0 +1,201 @@
+#ifndef _TCC_LIBM_H_
+#define _TCC_LIBM_H_
+
+#include "../math.h"
+
+/* TCC uses 8 bytes for double and long double, so effectively the l variants
+ * are never used. For now, they just run the normal (double) variant.
+ */
+
+/*
+ * most of the code in this file is taken from MUSL rs-1.0 (MIT license)
+ * - musl-libc: http://git.musl-libc.org/cgit/musl/tree/src/math?h=rs-1.0
+ * - License: http://git.musl-libc.org/cgit/musl/tree/COPYRIGHT?h=rs-1.0
+ */
+
+/*******************************************************************************
+ Start of code based on MUSL
+*******************************************************************************/
+/*
+musl as a whole is licensed under the following standard MIT license:
+
+----------------------------------------------------------------------
+Copyright © 2005-2014 Rich Felker, et al.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+----------------------------------------------------------------------
+*/
+
+/* fpclassify */
+
+__CRT_INLINE int __cdecl __fpclassify (double x) {
+ union {double f; uint64_t i;} u = {x};
+ int e = u.i>>52 & 0x7ff;
+ if (!e) return u.i<<1 ? FP_SUBNORMAL : FP_ZERO;
+ if (e==0x7ff) return u.i<<12 ? FP_NAN : FP_INFINITE;
+ return FP_NORMAL;
+}
+
+__CRT_INLINE int __cdecl __fpclassifyf (float x) {
+ union {float f; uint32_t i;} u = {x};
+ int e = u.i>>23 & 0xff;
+ if (!e) return u.i<<1 ? FP_SUBNORMAL : FP_ZERO;
+ if (e==0xff) return u.i<<9 ? FP_NAN : FP_INFINITE;
+ return FP_NORMAL;
+}
+
+__CRT_INLINE int __cdecl __fpclassifyl (long double x) {
+ return __fpclassify(x);
+}
+
+
+/* signbit */
+
+__CRT_INLINE int __cdecl __signbit (double x) {
+ union {double d; uint64_t i;} y = { x };
+ return y.i>>63;
+}
+
+__CRT_INLINE int __cdecl __signbitf (float x) {
+ union {float f; uint32_t i; } y = { x };
+ return y.i>>31;
+}
+
+__CRT_INLINE int __cdecl __signbitl (long double x) {
+ return __signbit(x);
+}
+
+
+/* fmin*, fmax* */
+
+#define TCCFP_FMIN_EVAL (isnan(x) ? y : \
+ isnan(y) ? x : \
+ (signbit(x) != signbit(y)) ? (signbit(x) ? x : y) : \
+ x < y ? x : y)
+
+__CRT_INLINE double __cdecl fmin (double x, double y) {
+ return TCCFP_FMIN_EVAL;
+}
+
+__CRT_INLINE float __cdecl fminf (float x, float y) {
+ return TCCFP_FMIN_EVAL;
+}
+
+__CRT_INLINE long double __cdecl fminl (long double x, long double y) {
+ return TCCFP_FMIN_EVAL;
+}
+
+#define TCCFP_FMAX_EVAL (isnan(x) ? y : \
+ isnan(y) ? x : \
+ (signbit(x) != signbit(y)) ? (signbit(x) ? y : x) : \
+ x < y ? y : x)
+
+__CRT_INLINE double __cdecl fmax (double x, double y) {
+ return TCCFP_FMAX_EVAL;
+}
+
+__CRT_INLINE float __cdecl fmaxf (float x, float y) {
+ return TCCFP_FMAX_EVAL;
+}
+
+__CRT_INLINE long double __cdecl fmaxl (long double x, long double y) {
+ return TCCFP_FMAX_EVAL;
+}
+
+
+/* *round* */
+
+#define TCCFP_FORCE_EVAL(x) do { \
+if (sizeof(x) == sizeof(float)) { \
+ volatile float __x; \
+ __x = (x); \
+} else if (sizeof(x) == sizeof(double)) { \
+ volatile double __x; \
+ __x = (x); \
+} else { \
+ volatile long double __x; \
+ __x = (x); \
+} \
+} while(0)
+
+__CRT_INLINE double __cdecl round (double x) {
+ union {double f; uint64_t i;} u = {x};
+ int e = u.i >> 52 & 0x7ff;
+ double y;
+
+ if (e >= 0x3ff+52)
+ return x;
+ if (u.i >> 63)
+ x = -x;
+ if (e < 0x3ff-1) {
+ /* raise inexact if x!=0 */
+ TCCFP_FORCE_EVAL(x + 0x1p52);
+ return 0*u.f;
+ }
+ y = (double)(x + 0x1p52) - 0x1p52 - x;
+ if (y > 0.5)
+ y = y + x - 1;
+ else if (y <= -0.5)
+ y = y + x + 1;
+ else
+ y = y + x;
+ if (u.i >> 63)
+ y = -y;
+ return y;
+}
+
+__CRT_INLINE long __cdecl lround (double x) {
+ return round(x);
+}
+
+__CRT_INLINE long long __cdecl llround (double x) {
+ return round(x);
+}
+
+__CRT_INLINE float __cdecl roundf (float x) {
+ return round(x);
+}
+
+__CRT_INLINE long __cdecl lroundf (float x) {
+ return round(x);
+}
+
+__CRT_INLINE long long __cdecl llroundf (float x) {
+ return round(x);
+}
+
+__CRT_INLINE long double __cdecl roundl (long double x) {
+ return round(x);
+}
+
+__CRT_INLINE long __cdecl lroundl (long double x) {
+ return round(x);
+}
+
+__CRT_INLINE long long __cdecl llroundl (long double x) {
+ return round(x);
+}
+
+
+/*******************************************************************************
+ End of code based on MUSL
+*******************************************************************************/
+
+#endif /* _TCC_LIBM_H_ */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/tcclib.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/tcclib.h
new file mode 100644
index 00000000..8d59e4c9
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/tcclib.h
@@ -0,0 +1,80 @@
+/* Simple libc header for TCC
+ *
+ * Add any function you want from the libc there. This file is here
+ * only for your convenience so that you do not need to put the whole
+ * glibc include files on your floppy disk
+ */
+#ifndef _TCCLIB_H
+#define _TCCLIB_H
+
+#include
+#include
+
+/* stdlib.h */
+void *calloc(size_t nmemb, size_t size);
+void *malloc(size_t size);
+void free(void *ptr);
+void *realloc(void *ptr, size_t size);
+int atoi(const char *nptr);
+long int strtol(const char *nptr, char **endptr, int base);
+unsigned long int strtoul(const char *nptr, char **endptr, int base);
+void exit(int);
+
+/* stdio.h */
+typedef struct __FILE FILE;
+#define EOF (-1)
+extern FILE *stdin;
+extern FILE *stdout;
+extern FILE *stderr;
+FILE *fopen(const char *path, const char *mode);
+FILE *fdopen(int fildes, const char *mode);
+FILE *freopen(const char *path, const char *mode, FILE *stream);
+int fclose(FILE *stream);
+size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
+size_t fwrite(void *ptr, size_t size, size_t nmemb, FILE *stream);
+int fgetc(FILE *stream);
+char *fgets(char *s, int size, FILE *stream);
+int getc(FILE *stream);
+int getchar(void);
+char *gets(char *s);
+int ungetc(int c, FILE *stream);
+int fflush(FILE *stream);
+int putchar (int c);
+
+int printf(const char *format, ...);
+int fprintf(FILE *stream, const char *format, ...);
+int sprintf(char *str, const char *format, ...);
+int snprintf(char *str, size_t size, const char *format, ...);
+int asprintf(char **strp, const char *format, ...);
+int dprintf(int fd, const char *format, ...);
+int vprintf(const char *format, va_list ap);
+int vfprintf(FILE *stream, const char *format, va_list ap);
+int vsprintf(char *str, const char *format, va_list ap);
+int vsnprintf(char *str, size_t size, const char *format, va_list ap);
+int vasprintf(char **strp, const char *format, va_list ap);
+int vdprintf(int fd, const char *format, va_list ap);
+
+void perror(const char *s);
+
+/* string.h */
+char *strcat(char *dest, const char *src);
+char *strchr(const char *s, int c);
+char *strrchr(const char *s, int c);
+char *strcpy(char *dest, const char *src);
+void *memcpy(void *dest, const void *src, size_t n);
+void *memmove(void *dest, const void *src, size_t n);
+void *memset(void *s, int c, size_t n);
+char *strdup(const char *s);
+size_t strlen(const char *s);
+
+/* dlfcn.h */
+#define RTLD_LAZY 0x001
+#define RTLD_NOW 0x002
+#define RTLD_GLOBAL 0x100
+
+void *dlopen(const char *filename, int flag);
+const char *dlerror(void);
+void *dlsym(void *handle, char *symbol);
+int dlclose(void *handle);
+
+#endif /* _TCCLIB_H */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/tchar.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/tchar.h
new file mode 100644
index 00000000..cd44beca
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/tchar.h
@@ -0,0 +1,1102 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#include <_mingw.h>
+
+#ifndef _INC_TCHAR
+#define _INC_TCHAR
+
+#ifdef _STRSAFE_H_INCLUDED_
+#error Need to include strsafe.h after tchar.h
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define _ftcscat _tcscat
+#define _ftcschr _tcschr
+#define _ftcscpy _tcscpy
+#define _ftcscspn _tcscspn
+#define _ftcslen _tcslen
+#define _ftcsncat _tcsncat
+#define _ftcsncpy _tcsncpy
+#define _ftcspbrk _tcspbrk
+#define _ftcsrchr _tcsrchr
+#define _ftcsspn _tcsspn
+#define _ftcsstr _tcsstr
+#define _ftcstok _tcstok
+
+#define _ftcsdup _tcsdup
+#define _ftcsnset _tcsnset
+#define _ftcsrev _tcsrev
+#define _ftcsset _tcsset
+
+#define _ftcscmp _tcscmp
+#define _ftcsicmp _tcsicmp
+#define _ftcsnccmp _tcsnccmp
+#define _ftcsncmp _tcsncmp
+#define _ftcsncicmp _tcsncicmp
+#define _ftcsnicmp _tcsnicmp
+
+#define _ftcscoll _tcscoll
+#define _ftcsicoll _tcsicoll
+#define _ftcsnccoll _tcsnccoll
+#define _ftcsncoll _tcsncoll
+#define _ftcsncicoll _tcsncicoll
+#define _ftcsnicoll _tcsnicoll
+
+#define _ftcsclen _tcsclen
+#define _ftcsnccat _tcsnccat
+#define _ftcsnccpy _tcsnccpy
+#define _ftcsncset _tcsncset
+
+#define _ftcsdec _tcsdec
+#define _ftcsinc _tcsinc
+#define _ftcsnbcnt _tcsnbcnt
+#define _ftcsnccnt _tcsnccnt
+#define _ftcsnextc _tcsnextc
+#define _ftcsninc _tcsninc
+#define _ftcsspnp _tcsspnp
+
+#define _ftcslwr _tcslwr
+#define _ftcsupr _tcsupr
+
+#define _ftclen _tclen
+#define _ftccpy _tccpy
+#define _ftccmp _tccmp
+
+#ifndef _CONST_RETURN
+#ifdef __cplusplus
+#define _CONST_RETURN const
+#define _CRT_CONST_CORRECT_OVERLOADS
+#else
+#define _CONST_RETURN
+#endif
+#endif
+
+#define _WConst_return _CONST_RETURN
+
+#ifdef _UNICODE
+
+#ifdef __cplusplus
+}
+#endif
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _WCTYPE_T_DEFINED
+#define _WCTYPE_T_DEFINED
+ typedef unsigned short wint_t;
+ typedef unsigned short wctype_t;
+#endif
+
+#ifndef __TCHAR_DEFINED
+#define __TCHAR_DEFINED
+ typedef wchar_t _TCHAR;
+ typedef wchar_t _TSCHAR;
+ typedef wchar_t _TUCHAR;
+ typedef wchar_t _TXCHAR;
+ typedef wint_t _TINT;
+#endif
+
+#ifndef _TCHAR_DEFINED
+#define _TCHAR_DEFINED
+#ifndef NO_OLDNAMES
+ typedef wchar_t TCHAR;
+#endif
+#endif
+
+#define _TEOF WEOF
+
+#define __T(x) L##x
+
+#define _tmain wmain
+#define _tWinMain wWinMain
+#define _tenviron _wenviron
+#define __targv __wargv
+
+#define _tprintf wprintf
+#define _tprintf_l _wprintf_l
+#define _tprintf_p _wprintf_p
+#define _tprintf_p_l _wprintf_p_l
+#define _tcprintf _cwprintf
+#define _tcprintf_l _cwprintf_l
+#define _tcprintf_p _cwprintf_p
+#define _tcprintf_p_l _cwprintf_p_l
+#define _vtcprintf _vcwprintf
+#define _vtcprintf_l _vcwprintf_l
+#define _vtcprintf_p _vcwprintf_p
+#define _vtcprintf_p_l _vcwprintf_p_l
+#define _ftprintf fwprintf
+#define _ftprintf_l _fwprintf_l
+#define _ftprintf_p _fwprintf_p
+#define _ftprintf_p_l _fwprintf_p_l
+#define _stprintf swprintf
+#define _stprintf_l __swprintf_l
+#define _stprintf_p _swprintf_p
+#define _stprintf_p_l _swprintf_p_l
+#define _sctprintf _scwprintf
+#define _sctprintf_l _scwprintf_l
+#define _sctprintf_p _scwprintf_p
+#define _sctprintf_p_l _scwprintf_p_l
+#define _sntprintf _snwprintf
+#define _sntprintf_l _snwprintf_l
+#define _vtprintf vwprintf
+#define _vtprintf_l _vwprintf_l
+#define _vtprintf_p _vwprintf_p
+#define _vtprintf_p_l _vwprintf_p_l
+#define _vftprintf vfwprintf
+#define _vftprintf_l _vfwprintf_l
+#define _vftprintf_p _vfwprintf_p
+#define _vftprintf_p_l _vfwprintf_p_l
+#define _vstprintf vswprintf
+#define _vstprintf_l _vswprintf_l
+#define _vstprintf_p _vswprintf_p
+#define _vstprintf_p_l _vswprintf_p_l
+#define _vsctprintf _vscwprintf
+#define _vsctprintf_l _vscwprintf_l
+#define _vsctprintf_p _vscwprintf_p
+#define _vsctprintf_p_l _vscwprintf_p_l
+#define _vsntprintf _vsnwprintf
+#define _vsntprintf_l _vsnwprintf_l
+
+#define _tscanf wscanf
+#define _tscanf_l _wscanf_l
+#define _tcscanf _cwscanf
+#define _tcscanf_l _cwscanf_l
+#define _ftscanf fwscanf
+#define _ftscanf_l _fwscanf_l
+#define _stscanf swscanf
+#define _stscanf_l _swscanf_l
+#define _sntscanf _snwscanf
+#define _sntscanf_l _snwscanf_l
+
+#define _fgettc fgetwc
+#define _fgettc_nolock _fgetwc_nolock
+#define _fgettchar _fgetwchar
+#define _fgetts fgetws
+#define _fputtc fputwc
+#define _fputtc_nolock _fputwc_nolock
+#define _fputtchar _fputwchar
+#define _fputts fputws
+#define _cputts _cputws
+#define _cgetts _cgetws
+#define _gettc getwc
+#define _gettc_nolock _getwc_nolock
+#define _gettch _getwch
+#define _gettch_nolock _getwch_nolock
+#define _gettche _getwche
+#define _gettche_nolock _getwche_nolock
+#define _gettchar getwchar
+#define _gettchar_nolock _getwchar_nolock
+#define _getts _getws
+#define _puttc putwc
+#define _puttc_nolock _putwc_nolock
+#define _puttchar putwchar
+#define _puttchar_nolock _putwchar_nolock
+#define _puttch _putwch
+#define _puttch_nolock _putwch_nolock
+#define _putts _putws
+#define _ungettc ungetwc
+#define _ungettc_nolock _ungetwc_nolock
+#define _ungettch _ungetwch
+#define _ungettch_nolock _ungetwch_nolock
+
+#define _tcstod wcstod
+#define _tcstol wcstol
+#define _tcstoul wcstoul
+#define _tcstoi64 _wcstoi64
+#define _tcstoui64 _wcstoui64
+#define _tstof _wtof
+#define _tstol _wtol
+#define _tstoi _wtoi
+#define _tstoi64 _wtoi64
+#define _tcstod_l _wcstod_l
+#define _tcstol_l _wcstol_l
+#define _tcstoul_l _wcstoul_l
+#define _tcstoi64_l _wcstoi64_l
+#define _tcstoui64_l _wcstoui64_l
+#define _tstof_l _wtof_l
+#define _tstol_l _wtol_l
+#define _tstoi_l _wtoi_l
+#define _tstoi64_l _wtoi64_l
+
+#define _itot _itow
+#define _ltot _ltow
+#define _ultot _ultow
+#define _ttoi _wtoi
+#define _ttol _wtol
+
+#define _ttoi64 _wtoi64
+#define _i64tot _i64tow
+#define _ui64tot _ui64tow
+
+#define _tcscat wcscat
+#define _tcschr wcschr
+#define _tcscpy wcscpy
+#define _tcscspn wcscspn
+#define _tcslen wcslen
+#define _tcsnlen wcsnlen
+#define _tcsncat wcsncat
+#define _tcsncat_l _wcsncat_l
+#define _tcsncpy wcsncpy
+#define _tcsncpy_l _wcsncpy_l
+#define _tcspbrk wcspbrk
+#define _tcsrchr wcsrchr
+#define _tcsspn wcsspn
+#define _tcsstr wcsstr
+#define _tcstok wcstok
+#define _tcstok_l _wcstok_l
+#define _tcserror _wcserror
+#define __tcserror __wcserror
+
+#define _tcsdup _wcsdup
+#define _tcsnset _wcsnset
+#define _tcsnset_l _wcsnset_l
+#define _tcsrev _wcsrev
+#define _tcsset _wcsset
+#define _tcsset_l _wcsset_l
+
+#define _tcscmp wcscmp
+#define _tcsicmp _wcsicmp
+#define _tcsicmp_l _wcsicmp_l
+#define _tcsnccmp wcsncmp
+#define _tcsncmp wcsncmp
+#define _tcsncicmp _wcsnicmp
+#define _tcsncicmp_l _wcsnicmp_l
+#define _tcsnicmp _wcsnicmp
+#define _tcsnicmp_l _wcsnicmp_l
+
+#define _tcscoll wcscoll
+#define _tcscoll_l _wcscoll_l
+#define _tcsicoll _wcsicoll
+#define _tcsicoll_l _wcsicoll_l
+#define _tcsnccoll _wcsncoll
+#define _tcsnccoll_l _wcsncoll_l
+#define _tcsncoll _wcsncoll
+#define _tcsncoll_l _wcsncoll_l
+#define _tcsncicoll _wcsnicoll
+#define _tcsncicoll_l _wcsnicoll_l
+#define _tcsnicoll _wcsnicoll
+#define _tcsnicoll_l _wcsnicoll_l
+
+#define _texecl _wexecl
+#define _texecle _wexecle
+#define _texeclp _wexeclp
+#define _texeclpe _wexeclpe
+#define _texecv _wexecv
+#define _texecve _wexecve
+#define _texecvp _wexecvp
+#define _texecvpe _wexecvpe
+
+#define _tspawnl _wspawnl
+#define _tspawnle _wspawnle
+#define _tspawnlp _wspawnlp
+#define _tspawnlpe _wspawnlpe
+#define _tspawnv _wspawnv
+#define _tspawnve _wspawnve
+#define _tspawnvp _wspawnvp
+#define _tspawnvp _wspawnvp
+#define _tspawnvpe _wspawnvpe
+
+#define _tsystem _wsystem
+
+#define _tasctime _wasctime
+#define _tctime _wctime
+#define _tctime32 _wctime32
+#define _tctime64 _wctime64
+#define _tstrdate _wstrdate
+#define _tstrtime _wstrtime
+#define _tutime _wutime
+#define _tutime32 _wutime32
+#define _tutime64 _wutime64
+#define _tcsftime wcsftime
+#define _tcsftime_l _wcsftime_l
+
+#define _tchdir _wchdir
+#define _tgetcwd _wgetcwd
+#define _tgetdcwd _wgetdcwd
+#define _tgetdcwd_nolock _wgetdcwd_nolock
+#define _tmkdir _wmkdir
+#define _trmdir _wrmdir
+
+#define _tfullpath _wfullpath
+#define _tgetenv _wgetenv
+#define _tmakepath _wmakepath
+#define _tpgmptr _wpgmptr
+#define _get_tpgmptr _get_wpgmptr
+#define _tputenv _wputenv
+#define _tsearchenv _wsearchenv
+#define _tsplitpath _wsplitpath
+
+#define _tfdopen _wfdopen
+#define _tfsopen _wfsopen
+#define _tfopen _wfopen
+#define _tfreopen _wfreopen
+#define _tperror _wperror
+#define _tpopen _wpopen
+#define _ttempnam _wtempnam
+#define _ttmpnam _wtmpnam
+
+#define _taccess _waccess
+#define _tchmod _wchmod
+#define _tcreat _wcreat
+#define _tfindfirst _wfindfirst
+#define _tfindfirst32 _wfindfirst32
+#define _tfindfirst64 _wfindfirst64
+#define _tfindfirsti64 _wfindfirsti64
+#define _tfindfirst32i64 _wfindfirst32i64
+#define _tfindfirst64i32 _wfindfirst64i32
+#define _tfindnext _wfindnext
+#define _tfindnext32 _wfindnext32
+#define _tfindnext64 _wfindnext64
+#define _tfindnexti64 _wfindnexti64
+#define _tfindnext32i64 _wfindnext32i64
+#define _tfindnext64i32 _wfindnext64i32
+#define _tmktemp _wmktemp
+#define _topen _wopen
+#define _tremove _wremove
+#define _trename _wrename
+#define _tsopen _wsopen
+#define _tunlink _wunlink
+
+#define _tfinddata_t _wfinddata_t
+#define _tfinddata32_t _wfinddata32_t
+#define _tfinddata64_t _wfinddata64_t
+#define _tfinddatai64_t _wfinddatai64_t
+#define _tfinddata32i64_t _wfinddata32i64_t
+#define _tfinddata64i32_t _wfinddata64i32_t
+
+#define _tstat _wstat
+#define _tstat32 _wstat32
+#define _tstat32i64 _wstat32i64
+#define _tstat64 _wstat64
+#define _tstat64i32 _wstat64i32
+#define _tstati64 _wstati64
+
+#define _tsetlocale _wsetlocale
+
+#define _tcsclen wcslen
+#define _tcscnlen wcsnlen
+#define _tcsclen_l(_String,_Locale) wcslen(_String)
+#define _tcscnlen_l(_String,_Max_count,_Locale) wcsnlen_l((_String),(_Max_count))
+#define _tcsnccat wcsncat
+#define _tcsnccat_l _wcsncat_l
+#define _tcsnccpy wcsncpy
+#define _tcsnccpy_l _wcsncpy_l
+#define _tcsncset _wcsnset
+
+#define _tcsdec _wcsdec
+#define _tcsinc _wcsinc
+#define _tcsnbcnt _wcsncnt
+#define _tcsnccnt _wcsncnt
+#define _tcsnextc _wcsnextc
+#define _tcsninc _wcsninc
+#define _tcsspnp _wcsspnp
+
+#define _tcslwr _wcslwr
+#define _tcslwr_l _wcslwr_l
+#define _tcsupr _wcsupr
+#define _tcsupr_l _wcsupr_l
+#define _tcsxfrm wcsxfrm
+#define _tcsxfrm_l _wcsxfrm_l
+
+#define _tclen(_pc) (1)
+#define _tccpy(_pc1,_cpc2) ((*(_pc1) = *(_cpc2)))
+#define _tccmp(_cpc1,_cpc2) ((*(_cpc1))-(*(_cpc2)))
+
+#define _istalnum iswalnum
+#define _istalnum_l _iswalnum_l
+#define _istalpha iswalpha
+#define _istalpha_l _iswalpha_l
+#define _istascii iswascii
+#define _istcntrl iswcntrl
+#define _istcntrl_l _iswcntrl_l
+#define _istdigit iswdigit
+#define _istdigit_l _iswdigit_l
+#define _istgraph iswgraph
+#define _istgraph_l _iswgraph_l
+#define _istlower iswlower
+#define _istlower_l _iswlower_l
+#define _istprint iswprint
+#define _istprint_l _iswprint_l
+#define _istpunct iswpunct
+#define _istpunct_l _iswpunct_l
+#define _istspace iswspace
+#define _istspace_l _iswspace_l
+#define _istupper iswupper
+#define _istupper_l _iswupper_l
+#define _istxdigit iswxdigit
+#define _istxdigit_l _iswxdigit_l
+
+#define _totupper towupper
+#define _totupper_l _towupper_l
+#define _totlower towlower
+#define _totlower_l _towlower_l
+
+#define _istlegal(_Char) (1)
+#define _istlead(_Char) (0)
+#define _istleadbyte(_Char) (0)
+#define _istleadbyte_l(_Char,_Locale) (0)
+
+#define _wcsdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1)
+#define _wcsinc(_pc) ((_pc)+1)
+#define _wcsnextc(_cpc) ((unsigned int) *(_cpc))
+#define _wcsninc(_pc,_sz) (((_pc)+(_sz)))
+ _CRTIMP size_t __cdecl __wcsncnt(const wchar_t *_Str,size_t _MaxCount);
+#define _wcsncnt(_cpc,_sz) (__wcsncnt(_cpc,_sz))
+#define _wcsspnp(_cpc1,_cpc2) (!_cpc1 ? NULL : ((*((_cpc1)+wcsspn(_cpc1,_cpc2))) ? ((_cpc1)+wcsspn(_cpc1,_cpc2)) : NULL))
+#define _wcsncpy_l(_Destination,_Source,_Count,_Locale) (wcsncpy(_Destination,_Source,_Count))
+#define _wcsncat_l(_Destination,_Source,_Count,_Locale) (wcsncat(_Destination,_Source,_Count))
+#define _wcstok_l(_String,_Delimiters,_Locale) (wcstok(_String,_Delimiters))
+#define _wcsnset_l(_Destination,_Value,_Count,_Locale) (_wcsnset(_Destination,_Value,_Count))
+#define _wcsset_l(_Destination,_Value,_Locale) (_wcsset(_Destination,_Value))
+
+ /* dirent structures and functions */
+#define _tdirent _wdirent
+#define _TDIR _WDIR
+#define _topendir _wopendir
+#define _tclosedir _wclosedir
+#define _treaddir _wreaddir
+#define _trewinddir _wrewinddir
+#define _ttelldir _wtelldir
+#define _tseekdir _wseekdir
+
+#else
+
+#ifdef __cplusplus
+}
+#endif
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define _TEOF EOF
+
+#define __T(x) x
+
+#define _tmain main
+#define _tWinMain WinMain
+#ifdef _POSIX_
+#define _tenviron environ
+#else
+#define _tenviron _environ
+#endif
+#define __targv __argv
+
+#define _tprintf printf
+#define _tprintf_l _printf_l
+#define _tprintf_p _printf_p
+#define _tprintf_p_l _printf_p_l
+#define _tcprintf _cprintf
+#define _tcprintf_l _cprintf_l
+#define _tcprintf_p _cprintf_p
+#define _tcprintf_p_l _cprintf_p_l
+#define _vtcprintf _vcprintf
+#define _vtcprintf_l _vcprintf_l
+#define _vtcprintf_p _vcprintf_p
+#define _vtcprintf_p_l _vcprintf_p_l
+#define _ftprintf fprintf
+#define _ftprintf_l _fprintf_l
+#define _ftprintf_p _fprintf_p
+#define _ftprintf_p_l _fprintf_p_l
+#define _stprintf sprintf
+#define _stprintf_l _sprintf_l
+#define _stprintf_p _sprintf_p
+#define _stprintf_p_l _sprintf_p_l
+#define _sctprintf _scprintf
+#define _sctprintf_l _scprintf_l
+#define _sctprintf_p _scprintf_p
+#define _sctprintf_p_l _scprintf_p_l
+#define _sntprintf _snprintf
+#define _sntprintf_l _snprintf_l
+#define _vtprintf vprintf
+#define _vtprintf_l _vprintf_l
+#define _vtprintf_p _vprintf_p
+#define _vtprintf_p_l _vprintf_p_l
+#define _vftprintf vfprintf
+#define _vftprintf_l _vfprintf_l
+#define _vftprintf_p _vfprintf_p
+#define _vftprintf_p_l _vfprintf_p_l
+#define _vstprintf vsprintf
+#define _vstprintf_l _vsprintf_l
+#define _vstprintf_p _vsprintf_p
+#define _vstprintf_p_l _vsprintf_p_l
+#define _vsctprintf _vscprintf
+#define _vsctprintf_l _vscprintf_l
+#define _vsctprintf_p _vscprintf_p
+#define _vsctprintf_p_l _vscprintf_p_l
+#define _vsntprintf _vsnprintf
+#define _vsntprintf_l _vsnprintf_l
+
+#define _tscanf scanf
+#define _tscanf_l _scanf_l
+#define _tcscanf _cscanf
+#define _tcscanf_l _cscanf_l
+#define _ftscanf fscanf
+#define _ftscanf_l _fscanf_l
+#define _stscanf sscanf
+#define _stscanf_l _sscanf_l
+#define _sntscanf _snscanf
+#define _sntscanf_l _snscanf_l
+
+#define _fgettc fgetc
+#define _fgettc_nolock _fgetc_nolock
+#define _fgettchar _fgetchar
+#define _fgetts fgets
+#define _fputtc fputc
+#define _fputtc_nolock _fputc_nolock
+#define _fputtchar _fputchar
+#define _fputts fputs
+#define _cputts _cputs
+#define _gettc getc
+#define _gettc_nolock _getc_nolock
+#define _gettch _getch
+#define _gettch_nolock _getch_nolock
+#define _gettche _getche
+#define _gettche_nolock _getche_nolock
+#define _gettchar getchar
+#define _gettchar_nolock _getchar_nolock
+#define _getts gets
+#define _cgetts _cgets
+#define _puttc putc
+#define _puttc_nolock _putc_nolock
+#define _puttchar putchar
+#define _puttchar_nolock _putchar_nolock
+#define _puttch _putch
+#define _puttch_nolock _putch_nolock
+#define _putts puts
+#define _ungettc ungetc
+#define _ungettc_nolock _ungetc_nolock
+#define _ungettch _ungetch
+#define _ungettch_nolock _ungetch_nolock
+
+#define _tcstod strtod
+#define _tcstol strtol
+#define _tcstoul strtoul
+#define _tstof atof
+#define _tstol atol
+#define _tstoi atoi
+#define _tstoi64 _atoi64
+#define _tcstod_l _strtod_l
+#define _tcstol_l _strtol_l
+#define _tcstoul_l _strtoul_l
+#define _tstof_l _atof_l
+#define _tstol_l _atol_l
+#define _tstoi_l _atoi_l
+#define _tstoi64_l _atoi64_l
+
+#define _itot _itoa
+#define _ltot _ltoa
+#define _ultot _ultoa
+#define _ttoi atoi
+#define _ttol atol
+
+#define _ttoi64 _atoi64
+#define _tcstoi64 _strtoi64
+#define _tcstoi64_l _strtoi64_l
+#define _tcstoui64 _strtoui64
+#define _tcstoui64_l _strtoui64_l
+#define _i64tot _i64toa
+#define _ui64tot _ui64toa
+
+#define _tcscat strcat
+#define _tcscpy strcpy
+#define _tcsdup _strdup
+#define _tcslen strlen
+#if 0
+#define _tcsnlen strnlen
+#endif
+#define _tcsxfrm strxfrm
+#define _tcsxfrm_l _strxfrm_l
+#define _tcserror strerror
+#define __tcserror _strerror
+
+#define _texecl _execl
+#define _texecle _execle
+#define _texeclp _execlp
+#define _texeclpe _execlpe
+#define _texecv _execv
+#define _texecve _execve
+#define _texecvp _execvp
+#define _texecvpe _execvpe
+
+#define _tspawnl _spawnl
+#define _tspawnle _spawnle
+#define _tspawnlp _spawnlp
+#define _tspawnlpe _spawnlpe
+#define _tspawnv _spawnv
+#define _tspawnve _spawnve
+#define _tspawnvp _spawnvp
+#define _tspawnvpe _spawnvpe
+
+#define _tsystem system
+
+#define _tasctime asctime
+#define _tctime ctime
+#define _tctime32 _ctime32
+#define _tctime64 _ctime64
+#define _tstrdate _strdate
+#define _tstrtime _strtime
+#define _tutime _utime
+#define _tutime32 _utime32
+#define _tutime64 _utime64
+#define _tcsftime strftime
+#define _tcsftime_l _strftime_l
+
+#define _tchdir _chdir
+#define _tgetcwd _getcwd
+#define _tgetdcwd _getdcwd
+#define _tgetdcwd_nolock _getdcwd_nolock
+#define _tmkdir _mkdir
+#define _trmdir _rmdir
+
+#define _tfullpath _fullpath
+#define _tgetenv getenv
+#define _tmakepath _makepath
+#define _tpgmptr _pgmptr
+#define _get_tpgmptr _get_pgmptr
+#define _tputenv _putenv
+#define _tsearchenv _searchenv
+#define _tsplitpath _splitpath
+
+#ifdef _POSIX_
+#define _tfdopen fdopen
+#else
+#define _tfdopen _fdopen
+#endif
+#define _tfsopen _fsopen
+#define _tfopen fopen
+#define _tfreopen freopen
+#define _tperror perror
+#define _tpopen _popen
+#define _ttempnam _tempnam
+#define _ttmpnam tmpnam
+
+#define _tchmod _chmod
+#define _tcreat _creat
+#define _tfindfirst _findfirst
+#define _tfindfirst32 _findfirst32
+#define _tfindfirst64 _findfirst64
+#define _tfindfirsti64 _findfirsti64
+#define _tfindfirst32i64 _findfirst32i64
+#define _tfindfirst64i32 _findfirst64i32
+#define _tfindnext _findnext
+#define _tfindnext32 _findnext32
+#define _tfindnext64 _findnext64
+#define _tfindnexti64 _findnexti64
+#define _tfindnext32i64 _findnext32i64
+#define _tfindnext64i32 _findnext64i32
+#define _tmktemp _mktemp
+
+#ifdef _POSIX_
+#define _topen open
+#define _taccess access
+#else
+#define _topen _open
+#define _taccess _access
+#endif
+
+#define _tremove remove
+#define _trename rename
+#define _tsopen _sopen
+#define _tunlink _unlink
+
+#define _tfinddata_t _finddata_t
+#define _tfinddata32_t _finddata32_t
+#define _tfinddata64_t __finddata64_t
+#define _tfinddatai64_t _finddatai64_t
+#define _tfinddata32i64_t _finddata32i64_t
+#define _tfinddata64i32_t _finddata64i32_t
+
+#define _istascii __isascii
+#define _istcntrl iscntrl
+#define _istcntrl_l _iscntrl_l
+#define _istxdigit isxdigit
+#define _istxdigit_l _isxdigit_l
+
+#define _tstat _stat
+#define _tstat32 _stat32
+#define _tstat32i64 _stat32i64
+#define _tstat64 _stat64
+#define _tstat64i32 _stat64i32
+#define _tstati64 _stati64
+
+#define _tsetlocale setlocale
+
+#ifdef _MBCS
+
+#ifdef __cplusplus
+}
+#endif
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __TCHAR_DEFINED
+ typedef char _TCHAR;
+ typedef signed char _TSCHAR;
+ typedef unsigned char _TUCHAR;
+ typedef unsigned char _TXCHAR;
+ typedef unsigned int _TINT;
+#define __TCHAR_DEFINED
+#endif
+
+#ifndef _TCHAR_DEFINED
+#ifndef NO_OLDNAMES
+ typedef char TCHAR;
+#endif
+#define _TCHAR_DEFINED
+#endif
+
+#ifdef _MB_MAP_DIRECT
+
+#define _tcschr _mbschr
+#define _tcscspn _mbscspn
+#define _tcsncat _mbsnbcat
+#define _tcsncat_l _mbsnbcat_l
+#define _tcsncpy _mbsnbcpy
+#define _tcsncpy_l _mbsnbcpy_l
+#define _tcspbrk _mbspbrk
+#define _tcsrchr _mbsrchr
+#define _tcsspn _mbsspn
+#define _tcsstr _mbsstr
+#define _tcstok _mbstok
+#define _tcstok_l _mbstok_l
+
+#define _tcsnset _mbsnbset
+#define _tcsnset_l _mbsnbset_l
+#define _tcsrev _mbsrev
+#define _tcsset _mbsset
+#define _tcsset_l _mbsset_l
+
+#define _tcscmp _mbscmp
+#define _tcsicmp _mbsicmp
+#define _tcsicmp_l _mbsicmp_l
+#define _tcsnccmp _mbsncmp
+#define _tcsncmp _mbsnbcmp
+#define _tcsncicmp _mbsnicmp
+#define _tcsncicmp_l _mbsnicmp_l
+#define _tcsnicmp _mbsnbicmp
+#define _tcsnicmp_l _mbsnbicmp_l
+
+#define _tcscoll _mbscoll
+#define _tcscoll_l _mbscoll_l
+#define _tcsicoll _mbsicoll
+#define _tcsicoll_l _mbsicoll_l
+#define _tcsnccoll _mbsncoll
+#define _tcsnccoll_l _mbsncoll_l
+#define _tcsncoll _mbsnbcoll
+#define _tcsncoll_l _mbsnbcoll_l
+#define _tcsncicoll _mbsnicoll
+#define _tcsncicoll_l _mbsnicoll_l
+#define _tcsnicoll _mbsnbicoll
+#define _tcsnicoll_l _mbsnbicoll_l
+
+#define _tcsclen _mbslen
+#define _tcscnlen _mbsnlen
+#define _tcsclen_l _mbslen_l
+#define _tcscnlen_l _mbsnlen_l
+#define _tcsnccat _mbsncat
+#define _tcsnccat_l _mbsncat_l
+#define _tcsnccpy _mbsncpy
+#define _tcsnccpy_l _mbsncpy_l
+#define _tcsncset _mbsnset
+#define _tcsncset_l _mbsnset_l
+
+#define _tcsdec _mbsdec
+#define _tcsinc _mbsinc
+#define _tcsnbcnt _mbsnbcnt
+#define _tcsnccnt _mbsnccnt
+#define _tcsnextc _mbsnextc
+#define _tcsninc _mbsninc
+#define _tcsspnp _mbsspnp
+
+#define _tcslwr _mbslwr
+#define _tcslwr_l _mbslwr_l
+#define _tcsupr _mbsupr
+#define _tcsupr_l _mbsupr_l
+
+#define _tclen _mbclen
+#define _tccpy _mbccpy
+#define _tccpy_l _mbccpy_l
+#else
+
+ _CRTIMP _CONST_RETURN char *__cdecl _tcschr(const char *_Str,unsigned int _Val);
+ _CRTIMP size_t __cdecl _tcscspn(const char *_Str,const char *_Control);
+ _CRTIMP char *__cdecl _tcsncat(char *_Dst,const char *_Src,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsncat_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsncpy(char *_Dst,const char *_Src,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsncpy_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP _CONST_RETURN char *__cdecl _tcspbrk(const char *_Str,const char *_Control);
+ _CRTIMP _CONST_RETURN char *__cdecl _tcsrchr(const char *_Str,unsigned int _Ch);
+ _CRTIMP size_t __cdecl _tcsspn(const char *_Str,const char *_Control);
+ _CRTIMP _CONST_RETURN char *__cdecl _tcsstr(const char *_Str,const char *_Substr);
+ _CRTIMP char *__cdecl _tcstok(char *_Str,const char *_Delim);
+ _CRTIMP char *__cdecl _tcstok_l(char *_Str,const char *_Delim,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsnset(char *_Str,unsigned int _Val,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsrev(char *_Str);
+ _CRTIMP char *__cdecl _tcsset(char *_Str,unsigned int _Val);
+ _CRTIMP char *__cdecl _tcsset_l(char *_Str,unsigned int _Val,_locale_t _Locale);
+ _CRTIMP int __cdecl _tcscmp(const char *_Str1,const char *_Str);
+ _CRTIMP int __cdecl _tcsicmp(const char *_Str1,const char *_Str2);
+ _CRTIMP int __cdecl _tcsicmp_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _tcsnccmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _tcsncmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _tcsncicmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _tcsncicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP int __cdecl _tcsnicmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _tcsnicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP int __cdecl _tcscoll(const char *_Str1,const char *_Str2);
+ _CRTIMP int __cdecl _tcscoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _tcsicoll(const char *_Str1,const char *_Str2);
+ _CRTIMP int __cdecl _tcsicoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _tcsnccoll(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _tcsnccoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP int __cdecl _tcsncoll(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _tcsncoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP int __cdecl _tcsncicoll(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _tcsncicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP int __cdecl _tcsnicoll(const char *_Str1,const char *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _tcsnicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP size_t __cdecl _tcsclen(const char *_Str);
+ _CRTIMP size_t __cdecl _tcscnlen(const char *_Str,size_t _MaxCount);
+ _CRTIMP size_t __cdecl _tcsclen_l(const char *_Str,_locale_t _Locale);
+ _CRTIMP size_t __cdecl _tcscnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsnccat(char *_Dst,const char *_Src,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsnccat_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsnccpy(char *_Dst,const char *_Src,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsnccpy_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsncset(char *_Str,unsigned int _Val,size_t _MaxCount);
+ _CRTIMP char *__cdecl _tcsdec(const char *_Start,const char *_Pos);
+ _CRTIMP char *__cdecl _tcsinc(const char *_Ptr);
+ _CRTIMP size_t __cdecl _tcsnbcnt(const char *_Str,size_t _MaxCount);
+ _CRTIMP size_t __cdecl _tcsnccnt(const char *_Str,size_t _MaxCount);
+ _CRTIMP unsigned int __cdecl _tcsnextc (const char *_Str);
+ _CRTIMP char *__cdecl _tcsninc(const char *_Ptr,size_t _Count);
+ _CRTIMP char *__cdecl _tcsspnp(const char *_Str1,const char *_Str2);
+ _CRTIMP char *__cdecl _tcslwr(char *_Str);
+ _CRTIMP char *__cdecl _tcslwr_l(char *_Str,_locale_t _Locale);
+ _CRTIMP char *__cdecl _tcsupr(char *_Str);
+ _CRTIMP char *__cdecl _tcsupr_l(char *_Str,_locale_t _Locale);
+ _CRTIMP size_t __cdecl _tclen(const char *_Str);
+ _CRTIMP void __cdecl _tccpy(char *_DstCh,const char *_SrcCh);
+
+#ifdef __cplusplus
+#ifndef _CPP_TCHAR_INLINES_DEFINED
+#define _CPP_TCHAR_INLINES_DEFINED
+ extern "C++" {
+ extern inline char *__cdecl _tcschr(char *_S,unsigned int _C) { return ((char *)_tcschr((const char *)_S,_C)); }
+ extern inline char *__cdecl _tcspbrk(char *_S,const char *_P) { return ((char *)_tcspbrk((const char *)_S,_P)); }
+ extern inline char *__cdecl _tcsrchr(char *_S,unsigned int _C) { return ((char *)_tcsrchr((const char *)_S,_C)); }
+ extern inline char *__cdecl _tcsstr(char *_S,const char *_P) { return ((char *)_tcsstr((const char *)_S,_P)); }
+ }
+#endif
+#endif
+#endif
+
+#define _tccmp(_cp1,_cp2) _tcsnccmp(_cp1,_cp2,1)
+
+#define _istalnum _ismbcalnum
+#define _istalnum_l _ismbcalnum_l
+#define _istalpha _ismbcalpha
+#define _istalpha_l _ismbcalpha_l
+#define _istdigit _ismbcdigit
+#define _istdigit_l _ismbcdigit_l
+#define _istgraph _ismbcgraph
+#define _istgraph_l _ismbcgraph_l
+#define _istlegal _ismbclegal
+#define _istlegal_l _ismbclegal_l
+#define _istlower _ismbclower
+#define _istlower_l _ismbclower_l
+#define _istprint _ismbcprint
+#define _istprint_l _ismbcprint_l
+#define _istpunct _ismbcpunct
+#define _istpunct_l _ismbcpunct_l
+#define _istspace _ismbcspace
+#define _istspace_l _ismbcspace_l
+#define _istupper _ismbcupper
+#define _istupper_l _ismbcupper_l
+
+#define _totupper _mbctoupper
+#define _totupper_l _mbctoupper_l
+#define _totlower _mbctolower
+#define _totlower_l _mbctolower_l
+
+#define _istlead _ismbblead
+#define _istleadbyte isleadbyte
+#define _istleadbyte_l _isleadbyte_l
+#else
+
+#ifndef __TCHAR_DEFINED
+#define __TCHAR_DEFINED
+ typedef char _TCHAR;
+ typedef signed char _TSCHAR;
+ typedef unsigned char _TUCHAR;
+ typedef char _TXCHAR;
+ typedef int _TINT;
+#endif
+
+#ifndef _TCHAR_DEFINED
+#define _TCHAR_DEFINED
+#ifndef NO_OLDNAMES
+ typedef char TCHAR;
+#endif
+#endif
+
+#define _tcschr strchr
+#define _tcscspn strcspn
+#define _tcsncat strncat
+#define _tcsncat_l _strncat_l
+#define _tcsncpy strncpy
+#define _tcsncpy_l _strncpy_l
+#define _tcspbrk strpbrk
+#define _tcsrchr strrchr
+#define _tcsspn strspn
+#define _tcsstr strstr
+#define _tcstok strtok
+#define _tcstok_l _strtok_l
+
+#define _tcsnset _strnset
+#define _tcsnset_l _strnset_l
+#define _tcsrev _strrev
+#define _tcsset _strset
+
+#define _tcscmp strcmp
+#define _tcsicmp _stricmp
+#define _tcsicmp_l _stricmp_l
+#define _tcsnccmp strncmp
+#define _tcsncmp strncmp
+#define _tcsncicmp _strnicmp
+#define _tcsncicmp_l _strnicmp_l
+#define _tcsnicmp _strnicmp
+#define _tcsnicmp_l _strnicmp_l
+
+#define _tcscoll strcoll
+#define _tcscoll_l _strcoll_l
+#define _tcsicoll _stricoll
+#define _tcsicoll_l _stricoll_l
+#define _tcsnccoll _strncoll
+#define _tcsnccoll_l _strncoll_l
+#define _tcsncoll _strncoll
+#define _tcsncoll_l _strncoll_l
+#define _tcsncicoll _strnicoll
+#define _tcsncicoll_l _strnicoll_l
+#define _tcsnicoll _strnicoll
+#define _tcsnicoll_l _strnicoll_l
+
+#define _tcsclen strlen
+#define _tcscnlen strnlen
+#define _tcsclen_l(_String,_Locale) strlen(_String)
+#define _tcscnlen_l(_String,_Max_count,_Locale) strnlen_l((_String),(_Max_count))
+#define _tcsnccat strncat
+#define _tcsnccat_l _strncat_l
+#define _tcsnccpy strncpy
+#define _tcsnccpy_l _strncpy_l
+#define _tcsncset _strnset
+
+#define _tcsdec _strdec
+#define _tcsinc _strinc
+#define _tcsnbcnt _strncnt
+#define _tcsnccnt _strncnt
+#define _tcsnextc _strnextc
+#define _tcsninc _strninc
+#define _tcsspnp _strspnp
+
+#define _tcslwr _strlwr
+#define _tcslwr_l _strlwr_l
+#define _tcsupr _strupr
+#define _tcsupr_l _strupr_l
+#define _tcsxfrm strxfrm
+#define _tcsxfrm_l _strxfrm_l
+
+#define _istlead(_Char) (0)
+#define _istleadbyte(_Char) (0)
+#define _istleadbyte_l(_Char,_Locale) (0)
+
+#define _tclen(_pc) (1)
+#define _tccpy(_pc1,_cpc2) (*(_pc1) = *(_cpc2))
+#define _tccmp(_cpc1,_cpc2) (((unsigned char)*(_cpc1))-((unsigned char)*(_cpc2)))
+
+ /* dirent structures and functions */
+#define _tdirent dirent
+#define _TDIR DIR
+#define _topendir opendir
+#define _tclosedir closedir
+#define _treaddir readdir
+#define _trewinddir rewinddir
+#define _ttelldir telldir
+#define _tseekdir seekdir
+
+#define _istalnum isalnum
+#define _istalnum_l _isalnum_l
+#define _istalpha isalpha
+#define _istalpha_l _isalpha_l
+#define _istdigit isdigit
+#define _istdigit_l _isdigit_l
+#define _istgraph isgraph
+#define _istgraph_l _isgraph_l
+#define _istlower islower
+#define _istlower_l _islower_l
+#define _istprint isprint
+#define _istprint_l _isprint_l
+#define _istpunct ispunct
+#define _istpunct_l _ispunct_l
+#define _istspace isspace
+#define _istspace_l _isspace_l
+#define _istupper isupper
+#define _istupper_l _isupper_l
+
+#define _totupper toupper
+#define _totupper_l _toupper_l
+#define _totlower tolower
+#define _totlower_l _tolower_l
+
+#define _istlegal(_c) (1)
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#define _strdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1)
+#define _strinc(_pc) ((_pc)+1)
+#define _strnextc(_cpc) ((unsigned int) *(const unsigned char *)(_cpc))
+#define _strninc(_pc,_sz) (((_pc)+(_sz)))
+ _CRTIMP size_t __cdecl __strncnt(const char *_Str,size_t _Cnt);
+#define _strncnt(_cpc,_sz) (__strncnt(_cpc,_sz))
+#define _strspnp(_cpc1,_cpc2) (!_cpc1 ? NULL : ((*((_cpc1)+strspn(_cpc1,_cpc2))) ? ((_cpc1)+strspn(_cpc1,_cpc2)) : NULL))
+
+#define _strncpy_l(_Destination,_Source,_Count,_Locale) (strncpy(_Destination,_Source,_Count))
+#define _strncat_l(_Destination,_Source,_Count,_Locale) (strncat(_Destination,_Source,_Count))
+#define _strtok_l(_String,_Delimiters,_Locale) (strtok(_String,_Delimiters))
+#define _strnset_l(_Destination,_Value,_Count,_Locale) (_strnset(_Destination,_Value,_Count))
+#define _strset_l(_Destination,_Value,_Locale) (_strset(_Destination,_Value))
+#endif
+#endif
+
+#define _T(x) __T(x)
+#define _TEXT(x) __T(x)
+
+#ifdef __cplusplus
+}
+#endif
+
+#include
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/time.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/time.h
new file mode 100644
index 00000000..6c72e266
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/time.h
@@ -0,0 +1,287 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _TIME_H_
+#define _TIME_H_
+
+#include <_mingw.h>
+
+#ifndef _WIN32
+#error Only Win32 target is supported!
+#endif
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _CRTIMP
+#define _CRTIMP __declspec(dllimport)
+#endif
+
+#ifndef _WCHAR_T_DEFINED
+#define _WCHAR_T_DEFINED
+ typedef unsigned short wchar_t;
+#endif
+
+#ifndef _TIME32_T_DEFINED
+#define _TIME32_T_DEFINED
+ typedef long __time32_t;
+#endif
+
+#ifndef _TIME64_T_DEFINED
+#define _TIME64_T_DEFINED
+#if _INTEGRAL_MAX_BITS >= 64
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+ typedef int _time64_t __attribute__ ((mode (DI)));
+#else
+ typedef __int64 __time64_t;
+#endif
+#endif
+#endif
+
+#ifndef _TIME_T_DEFINED
+#define _TIME_T_DEFINED
+#ifdef _USE_32BIT_TIME_T
+ typedef __time32_t time_t;
+#else
+ typedef __time64_t time_t;
+#endif
+#endif
+
+#ifndef _CLOCK_T_DEFINED
+#define _CLOCK_T_DEFINED
+ typedef long clock_t;
+#endif
+
+#ifndef _SIZE_T_DEFINED
+#define _SIZE_T_DEFINED
+#undef size_t
+#ifdef _WIN64
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+ typedef unsigned int size_t __attribute__ ((mode (DI)));
+#else
+ typedef unsigned __int64 size_t;
+#endif
+#else
+ typedef unsigned int size_t;
+#endif
+#endif
+
+#ifndef _SSIZE_T_DEFINED
+#define _SSIZE_T_DEFINED
+#undef ssize_t
+#ifdef _WIN64
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+ typedef int ssize_t __attribute__ ((mode (DI)));
+#else
+ typedef __int64 ssize_t;
+#endif
+#else
+ typedef int ssize_t;
+#endif
+#endif
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#ifdef _USE_32BIT_TIME_T
+#define _localtime32 localtime
+#define _difftime32 difftime
+#define _ctime32 ctime
+#define _gmtime32 gmtime
+#define _mktime32 mktime
+#define _time32 time
+#endif
+
+#ifndef _TM_DEFINED
+#define _TM_DEFINED
+ struct tm {
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+ };
+#endif
+
+#define CLOCKS_PER_SEC 1000
+
+ __MINGW_IMPORT int _daylight;
+ __MINGW_IMPORT long _dstbias;
+ __MINGW_IMPORT long _timezone;
+ __MINGW_IMPORT char * _tzname[2];
+ _CRTIMP errno_t __cdecl _get_daylight(int *_Daylight);
+ _CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias);
+ _CRTIMP errno_t __cdecl _get_timezone(long *_Timezone);
+ _CRTIMP errno_t __cdecl _get_tzname(size_t *_ReturnValue,char *_Buffer,size_t _SizeInBytes,int _Index);
+ char *__cdecl asctime(const struct tm *_Tm);
+ _CRTIMP char *__cdecl _ctime32(const __time32_t *_Time);
+ clock_t __cdecl clock(void);
+ _CRTIMP double __cdecl _difftime32(__time32_t _Time1,__time32_t _Time2);
+ _CRTIMP struct tm *__cdecl _gmtime32(const __time32_t *_Time);
+ _CRTIMP struct tm *__cdecl _localtime32(const __time32_t *_Time);
+ size_t __cdecl strftime(char *_Buf,size_t _SizeInBytes,const char *_Format,const struct tm *_Tm);
+ _CRTIMP size_t __cdecl _strftime_l(char *_Buf,size_t _Max_size,const char *_Format,const struct tm *_Tm,_locale_t _Locale);
+ _CRTIMP char *__cdecl _strdate(char *_Buffer);
+ _CRTIMP char *__cdecl _strtime(char *_Buffer);
+ _CRTIMP __time32_t __cdecl _time32(__time32_t *_Time);
+ _CRTIMP __time32_t __cdecl _mktime32(struct tm *_Tm);
+ _CRTIMP __time32_t __cdecl _mkgmtime32(struct tm *_Tm);
+#if defined (_POSIX_) || defined(__GNUC__)
+ void __cdecl tzset(void);
+#else
+ _CRTIMP void __cdecl _tzset(void);
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 64
+ double __cdecl _difftime64(__time64_t _Time1,__time64_t _Time2);
+ _CRTIMP char *__cdecl _ctime64(const __time64_t *_Time);
+ _CRTIMP struct tm *__cdecl _gmtime64(const __time64_t *_Time);
+ _CRTIMP struct tm *__cdecl _localtime64(const __time64_t *_Time);
+ _CRTIMP __time64_t __cdecl _mktime64(struct tm *_Tm);
+ _CRTIMP __time64_t __cdecl _mkgmtime64(struct tm *_Tm);
+ _CRTIMP __time64_t __cdecl _time64(__time64_t *_Time);
+#endif
+ unsigned __cdecl _getsystime(struct tm *_Tm);
+ unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec);
+
+#ifndef _SIZE_T_DEFINED
+#define _SIZE_T_DEFINED
+#ifdef _WIN64
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+ typedef unsigned int size_t __attribute__ ((mode (DI)));
+#else
+ typedef unsigned __int64 size_t;
+#endif
+#else
+ typedef unsigned long size_t;
+#endif
+#endif
+
+#ifndef _SSIZE_T_DEFINED
+#define _SSIZE_T_DEFINED
+#ifdef _WIN64
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)
+ typedef int ssize_t __attribute__ ((mode (DI)));
+#else
+ typedef __int64 ssize_t;
+#endif
+#else
+ typedef long ssize_t;
+#endif
+#endif
+
+#ifndef _WTIME_DEFINED
+ _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
+ _CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time);
+ size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm);
+ _CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale);
+ _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer);
+ _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time);
+#endif
+
+#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
+#define _INC_WTIME_INL
+#ifdef _USE_32BIT_TIME_T
+__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
+#else
+__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
+#endif
+#endif
+
+#define _WTIME_DEFINED
+#endif
+
+#ifndef RC_INVOKED
+double __cdecl difftime(time_t _Time1,time_t _Time2);
+char *__cdecl ctime(const time_t *_Time);
+struct tm *__cdecl gmtime(const time_t *_Time);
+struct tm *__cdecl localtime(const time_t *_Time);
+struct tm *__cdecl localtime_r(const time_t *_Time,struct tm *);
+
+time_t __cdecl mktime(struct tm *_Tm);
+time_t __cdecl _mkgmtime(struct tm *_Tm);
+time_t __cdecl time(time_t *_Time);
+
+#ifdef _USE_32BIT_TIME_T
+#if 0
+__CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime32(_Time1,_Time2); }
+__CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime32(_Time); }
+__CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime32(_Time); }
+__CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime32(_Time); }
+__CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime32(_Tm); }
+__CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime32(_Tm); }
+__CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time32(_Time); }
+#endif
+#else
+__CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime64(_Time1,_Time2); }
+__CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime64(_Time); }
+__CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime64(_Time); }
+__CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime64(_Time); }
+__CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime64(_Tm); }
+__CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime64(_Tm); }
+__CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); }
+#endif
+#endif
+
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+#define CLK_TCK CLOCKS_PER_SEC
+
+ __MINGW_IMPORT int daylight;
+ __MINGW_IMPORT long dstbias;
+ __MINGW_IMPORT long timezone;
+ __MINGW_IMPORT char *tzname[2];
+ void __cdecl tzset(void);
+#endif
+
+#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
+#define _TIMEVAL_DEFINED
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+};
+#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
+#define timercmp(tvp,uvp,cmp) ((tvp)->tv_sec cmp (uvp)->tv_sec || (tvp)->tv_sec==(uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
+#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
+#endif /* _TIMEVAL_DEFINED */
+
+#ifndef __STRICT_ANSI__
+#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
+#define _TIMEZONE_DEFINED
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+
+ extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
+#endif
+#endif /* __STRICT_ANSI__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+
+#include
+
+/* Adding timespec definition. */
+#include
+
+#endif /* End _TIME_H_ */
+
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/vadefs.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/vadefs.h
new file mode 100644
index 00000000..749b0bdd
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/vadefs.h
@@ -0,0 +1,11 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_VADEFS
+#define _INC_VADEFS
+
+//!__TINYC__: GNUC specific stuff removed
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/values.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/values.h
new file mode 100644
index 00000000..1cd643ce
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/values.h
@@ -0,0 +1,4 @@
+/*
+ * TODO: Nothing here yet. Should provide UNIX compatibility constants
+ * comparable to those in limits.h and float.h.
+ */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/varargs.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/varargs.h
new file mode 100644
index 00000000..d614366e
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/varargs.h
@@ -0,0 +1,12 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _VARARGS_H
+#define _VARARGS_H
+
+#error "TinyCC no longer implements ."
+#error "Revise your code to use ."
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/wchar.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/wchar.h
new file mode 100644
index 00000000..389196fa
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/wchar.h
@@ -0,0 +1,873 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_WCHAR
+#define _INC_WCHAR
+
+#include <_mingw.h>
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef WCHAR_MIN /* also at stdint.h */
+#define WCHAR_MIN 0
+#define WCHAR_MAX ((wchar_t) -1) /* UINT16_MAX */
+#endif
+
+#ifndef __GNUC_VA_LIST
+#define __GNUC_VA_LIST
+ typedef __builtin_va_list __gnuc_va_list;
+#endif
+
+#ifndef _VA_LIST_DEFINED
+#define _VA_LIST_DEFINED
+ typedef __gnuc_va_list va_list;
+#endif
+
+#ifndef WEOF
+#define WEOF (wint_t)(0xFFFF)
+#endif
+
+#ifndef _FILE_DEFINED
+ struct _iobuf {
+ char *_ptr;
+ int _cnt;
+ char *_base;
+ int _flag;
+ int _file;
+ int _charbuf;
+ int _bufsiz;
+ char *_tmpfname;
+ };
+ typedef struct _iobuf FILE;
+#define _FILE_DEFINED
+#endif
+
+#ifndef _STDIO_DEFINED
+#ifdef _WIN64
+ _CRTIMP FILE *__cdecl __iob_func(void);
+#else
+#ifdef _MSVCRT_
+extern FILE _iob[]; /* A pointer to an array of FILE */
+#define __iob_func() (_iob)
+#else
+extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
+#define __iob_func() (*_imp___iob)
+#define _iob __iob_func()
+#endif
+#endif
+
+#define _iob __iob_func()
+#endif
+
+#ifndef _STDSTREAM_DEFINED
+#define stdin (&__iob_func()[0])
+#define stdout (&__iob_func()[1])
+#define stderr (&__iob_func()[2])
+#define _STDSTREAM_DEFINED
+#endif
+
+#ifndef _FSIZE_T_DEFINED
+ typedef unsigned long _fsize_t;
+#define _FSIZE_T_DEFINED
+#endif
+
+#ifndef _WFINDDATA_T_DEFINED
+ struct _wfinddata32_t {
+ unsigned attrib;
+ __time32_t time_create;
+ __time32_t time_access;
+ __time32_t time_write;
+ _fsize_t size;
+ wchar_t name[260];
+ };
+
+/* #if _INTEGRAL_MAX_BITS >= 64 */
+
+ struct _wfinddata32i64_t {
+ unsigned attrib;
+ __time32_t time_create;
+ __time32_t time_access;
+ __time32_t time_write;
+ __int64 size;
+ wchar_t name[260];
+ };
+
+ struct _wfinddata64i32_t {
+ unsigned attrib;
+ __time64_t time_create;
+ __time64_t time_access;
+ __time64_t time_write;
+ _fsize_t size;
+ wchar_t name[260];
+ };
+
+ struct _wfinddata64_t {
+ unsigned attrib;
+ __time64_t time_create;
+ __time64_t time_access;
+ __time64_t time_write;
+ __int64 size;
+ wchar_t name[260];
+ };
+/* #endif */
+
+#ifdef _USE_32BIT_TIME_T
+#define _wfinddata_t _wfinddata32_t
+#define _wfinddatai64_t _wfinddata32i64_t
+
+#define _wfindfirst _wfindfirst32
+#define _wfindnext _wfindnext32
+#define _wfindfirsti64 _wfindfirst32i64
+#define _wfindnexti64 _wfindnext32i64
+#else
+#define _wfinddata_t _wfinddata64i32_t
+#define _wfinddatai64_t _wfinddata64_t
+
+#define _wfindfirst _wfindfirst64i32
+#define _wfindnext _wfindnext64i32
+#define _wfindfirsti64 _wfindfirst64
+#define _wfindnexti64 _wfindnext64
+#endif
+
+#define _WFINDDATA_T_DEFINED
+#endif
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#ifndef _CONST_RETURN
+#define _CONST_RETURN
+#endif
+
+#define _WConst_return _CONST_RETURN
+
+#ifndef _CRT_CTYPEDATA_DEFINED
+#define _CRT_CTYPEDATA_DEFINED
+#ifndef _CTYPE_DISABLE_MACROS
+
+#ifndef __PCTYPE_FUNC
+#define __PCTYPE_FUNC __pctype_func()
+#ifdef _MSVCRT_
+#define __pctype_func() (_pctype)
+#else
+#define __pctype_func() (*_imp___pctype)
+#endif
+#endif
+
+#ifndef _pctype
+#ifdef _MSVCRT_
+ extern unsigned short *_pctype;
+#else
+ extern unsigned short **_imp___pctype;
+#define _pctype (*_imp___pctype)
+#endif
+#endif
+#endif
+#endif
+
+#ifndef _CRT_WCTYPEDATA_DEFINED
+#define _CRT_WCTYPEDATA_DEFINED
+#ifndef _CTYPE_DISABLE_MACROS
+#ifndef _wctype
+#ifdef _MSVCRT_
+ extern unsigned short *_wctype;
+#else
+ extern unsigned short **_imp___wctype;
+#define _wctype (*_imp___wctype)
+#endif
+#endif
+
+#ifdef _MSVCRT_
+#define __pwctype_func() (_pwctype)
+#else
+#define __pwctype_func() (*_imp___pwctype)
+#endif
+
+#ifndef _pwctype
+#ifdef _MSVCRT_
+ extern unsigned short *_pwctype;
+#else
+ extern unsigned short **_imp___pwctype;
+#define _pwctype (*_imp___pwctype)
+#endif
+#endif
+
+#endif
+#endif
+
+#define _UPPER 0x1
+#define _LOWER 0x2
+#define _DIGIT 0x4
+#define _SPACE 0x8
+
+#define _PUNCT 0x10
+#define _CONTROL 0x20
+#define _BLANK 0x40
+#define _HEX 0x80
+
+#define _LEADBYTE 0x8000
+#define _ALPHA (0x0100|_UPPER|_LOWER)
+
+#ifndef _WCTYPE_DEFINED
+#define _WCTYPE_DEFINED
+
+ int __cdecl iswalpha(wint_t _C);
+ _CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswupper(wint_t _C);
+ _CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswlower(wint_t _C);
+ _CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswdigit(wint_t _C);
+ _CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswxdigit(wint_t _C);
+ _CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswspace(wint_t _C);
+ _CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswpunct(wint_t _C);
+ _CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswalnum(wint_t _C);
+ _CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswprint(wint_t _C);
+ _CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswgraph(wint_t _C);
+ _CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswcntrl(wint_t _C);
+ _CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswascii(wint_t _C);
+ int __cdecl isleadbyte(int _C);
+ _CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale);
+ wint_t __cdecl towupper(wint_t _C);
+ _CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale);
+ wint_t __cdecl towlower(wint_t _C);
+ _CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale);
+ int __cdecl iswctype(wint_t _C,wctype_t _Type);
+ _CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale);
+ _CRTIMP int __cdecl __iswcsymf(wint_t _C);
+ _CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale);
+ _CRTIMP int __cdecl __iswcsym(wint_t _C);
+ _CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale);
+ int __cdecl is_wctype(wint_t _C,wctype_t _Type);
+#endif
+
+#ifndef _WDIRECT_DEFINED
+#define _WDIRECT_DEFINED
+
+ _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
+ _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
+ wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
+ _CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
+ _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
+ _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
+#endif
+
+#ifndef _WIO_DEFINED
+#define _WIO_DEFINED
+
+ _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
+ _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
+ _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode);
+ _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
+ _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
+ _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
+ _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename);
+ _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
+ intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
+ _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
+ _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
+ int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
+ _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
+#endif
+ _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
+#if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
+ _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
+ _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
+#else
+ extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
+ extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
+#endif
+#endif
+
+#ifndef _WLOCALE_DEFINED
+#define _WLOCALE_DEFINED
+ _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
+#endif
+
+#ifndef _WPROCESS_DEFINED
+#define _WPROCESS_DEFINED
+
+ _CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
+ _CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
+ _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
+ _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
+ _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
+ _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
+#ifndef _CRT_WSYSTEM_DEFINED
+#define _CRT_WSYSTEM_DEFINED
+ _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
+#endif
+#endif
+
+#ifndef _WCTYPE_INLINE_DEFINED
+#undef _CRT_WCTYPE_NOINLINE
+#if !defined(__cplusplus) || defined(_CRT_WCTYPE_NOINLINE)
+#define iswalpha(_c) (iswctype(_c,_ALPHA))
+#define iswupper(_c) (iswctype(_c,_UPPER))
+#define iswlower(_c) (iswctype(_c,_LOWER))
+#define iswdigit(_c) (iswctype(_c,_DIGIT))
+#define iswxdigit(_c) (iswctype(_c,_HEX))
+#define iswspace(_c) (iswctype(_c,_SPACE))
+#define iswpunct(_c) (iswctype(_c,_PUNCT))
+#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
+#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
+#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
+#define iswcntrl(_c) (iswctype(_c,_CONTROL))
+#define iswascii(_c) ((unsigned)(_c) < 0x80)
+
+#define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
+#define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
+#define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
+#define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
+#define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
+#define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
+#define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
+#define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
+#define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
+#define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
+#define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
+#ifndef _CTYPE_DISABLE_MACROS
+#define isleadbyte(_c) (__PCTYPE_FUNC[(unsigned char)(_c)] & _LEADBYTE)
+#endif
+#endif
+#define _WCTYPE_INLINE_DEFINED
+#endif
+
+#if !defined(_POSIX_) || defined(__GNUC__)
+#ifndef _INO_T_DEFINED
+#define _INO_T_DEFINED
+ typedef unsigned short _ino_t;
+#ifndef NO_OLDNAMES
+ typedef unsigned short ino_t;
+#endif
+#endif
+
+#ifndef _DEV_T_DEFINED
+#define _DEV_T_DEFINED
+ typedef unsigned int _dev_t;
+#ifndef NO_OLDNAMES
+ typedef unsigned int dev_t;
+#endif
+#endif
+
+#ifndef _OFF_T_DEFINED
+#define _OFF_T_DEFINED
+#ifndef _OFF_T_
+#define _OFF_T_
+ typedef long _off_t;
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+ typedef long off_t;
+#endif
+#endif
+#endif
+
+#ifndef _OFF64_T_DEFINED
+#define _OFF64_T_DEFINED
+ typedef long long _off64_t;
+#if !defined(NO_OLDNAMES) || defined(_POSIX)
+ typedef long long off64_t;
+#endif
+#endif
+
+#ifndef _STAT_DEFINED
+#define _STAT_DEFINED
+
+#ifdef _USE_32BIT_TIME_T
+#ifdef WIN64
+#define _fstat _fstat32
+#define _stat _stat32
+#define _wstat _wstat32
+#else
+#define _fstat32 _fstat
+#define _stat32 _stat
+#define _wstat32 _wstat
+#endif
+#define _fstati64 _fstat32i64
+#define _stati64 _stat32i64
+#define _wstati64 _wstat32i64
+#else
+#define _fstat _fstat64i32
+#define _fstati64 _fstat64
+#define _stat _stat64i32
+#define _stati64 _stat64
+#define _wstat _wstat64i32
+#define _wstati64 _wstat64
+#endif
+
+ struct _stat32 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ _off_t st_size;
+ __time32_t st_atime;
+ __time32_t st_mtime;
+ __time32_t st_ctime;
+ };
+
+#ifndef NO_OLDNAMES
+ struct stat {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ _off_t st_size;
+ time_t st_atime;
+ time_t st_mtime;
+ time_t st_ctime;
+ };
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 64
+
+ struct _stat32i64 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ __int64 st_size;
+ __time32_t st_atime;
+ __time32_t st_mtime;
+ __time32_t st_ctime;
+ };
+
+ struct _stat64i32 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ _off_t st_size;
+ __time64_t st_atime;
+ __time64_t st_mtime;
+ __time64_t st_ctime;
+ };
+
+ struct _stat64 {
+ _dev_t st_dev;
+ _ino_t st_ino;
+ unsigned short st_mode;
+ short st_nlink;
+ short st_uid;
+ short st_gid;
+ _dev_t st_rdev;
+ __int64 st_size;
+ __time64_t st_atime;
+ __time64_t st_mtime;
+ __time64_t st_ctime;
+ };
+#endif
+
+#define __stat64 _stat64
+
+#endif
+
+#ifndef _WSTAT_DEFINED
+#define _WSTAT_DEFINED
+
+ _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
+ int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
+ _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
+#endif
+#endif
+#endif
+
+#ifndef _WCONIO_DEFINED
+#define _WCONIO_DEFINED
+
+#ifndef WEOF
+#define WEOF (wint_t)(0xFFFF)
+#endif
+
+ _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
+ _CRTIMP wint_t __cdecl _getwch(void);
+ _CRTIMP wint_t __cdecl _getwche(void);
+ _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
+ _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
+ _CRTIMP int __cdecl _cputws(const wchar_t *_String);
+ _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
+
+ _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ wint_t __cdecl _putwch_nolock(wchar_t _WCh);
+ wint_t __cdecl _getwch_nolock(void);
+ wint_t __cdecl _getwche_nolock(void);
+ wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
+#endif
+
+#ifndef _WSTDIO_DEFINED
+#define _WSTDIO_DEFINED
+
+#ifndef WEOF
+#define WEOF (wint_t)(0xFFFF)
+#endif
+
+#ifdef _POSIX_
+ _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
+#else
+ _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
+#endif
+
+ wint_t __cdecl fgetwc(FILE *_File);
+ _CRTIMP wint_t __cdecl _fgetwchar(void);
+ wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
+ _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
+ wint_t __cdecl getwc(FILE *_File);
+ wint_t __cdecl getwchar(void);
+ wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
+ wint_t __cdecl putwchar(wchar_t _Ch);
+ wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
+ wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
+ int __cdecl fputws(const wchar_t *_Str,FILE *_File);
+ _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String);
+ _CRTIMP int __cdecl _putws(const wchar_t *_Str);
+ int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...);
+ int __cdecl wprintf(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...);
+ int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
+ int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...);
+ _CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list);
+ _CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
+#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
+ int __cdecl snwprintf (wchar_t *s, size_t n, const wchar_t * format, ...);
+ __CRT_INLINE int __cdecl vsnwprintf (wchar_t *s, size_t n, const wchar_t *format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
+ int __cdecl vwscanf (const wchar_t *, va_list);
+ int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
+ int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
+#endif
+ _CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ _CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args);
+ _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...);
+ _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args);
+#ifndef RC_INVOKED
+#include
+#endif
+
+#ifdef _CRT_NON_CONFORMING_SWPRINTFS
+#ifndef __cplusplus
+#define swprintf _swprintf
+#define vswprintf _vswprintf
+#define _swprintf_l __swprintf_l
+#define _vswprintf_l __vswprintf_l
+#endif
+#endif
+
+ _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
+ _CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList);
+ _CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
+ int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
+ int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
+ int __cdecl wscanf(const wchar_t *_Format,...);
+ _CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
+ _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
+ _CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode);
+ _CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
+
+#ifndef _CRT_WPERROR_DEFINED
+#define _CRT_WPERROR_DEFINED
+ _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
+#endif
+ _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
+#if !defined(NO_OLDNAMES) && !defined(wpopen)
+#define wpopen _wpopen
+#endif
+ _CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
+ _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
+ _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
+ _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
+ _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
+
+#undef _CRT_GETPUTWCHAR_NOINLINE
+
+#if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
+#define getwchar() fgetwc(stdin)
+#define putwchar(_c) fputwc((_c),stdout)
+#else
+ __CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); }
+ __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) {return (fputwc(_C,stdout)); }
+#endif
+
+#define getwc(_stm) fgetwc(_stm)
+#define putwc(_c,_stm) fputwc(_c,_stm)
+#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
+#define _getwc_nolock(_c) _fgetwc_nolock(_c)
+#endif
+
+#ifndef _WSTDLIB_DEFINED
+#define _WSTDLIB_DEFINED
+
+ _CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix);
+ _CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix);
+ _CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix);
+ double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr);
+ _CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale);
+ float __cdecl wcstof( const wchar_t *nptr, wchar_t **endptr);
+#if !defined __NO_ISOCEXT /* in libmingwex.a */
+ float __cdecl wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
+ long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
+#endif /* __NO_ISOCEXT */
+ long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
+ _CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
+ unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
+ _CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
+ _CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName);
+#ifndef _CRT_WSYSTEM_DEFINED
+#define _CRT_WSYSTEM_DEFINED
+ _CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
+#endif
+ _CRTIMP double __cdecl _wtof(const wchar_t *_Str);
+ _CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
+ _CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
+ _CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
+ _CRTIMP long __cdecl _wtol(const wchar_t *_Str);
+ _CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
+
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix);
+ _CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
+ _CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
+ _CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
+ _CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
+ _CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
+ _CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
+ _CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
+#endif
+#endif
+
+#ifndef _POSIX_
+#ifndef _WSTDLIBP_DEFINED
+#define _WSTDLIBP_DEFINED
+ _CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
+ _CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
+#ifndef _CRT_WPERROR_DEFINED
+#define _CRT_WPERROR_DEFINED
+ _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
+#endif
+ _CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
+ _CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath);
+ _CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
+#endif
+#endif
+
+#ifndef _WSTRING_DEFINED
+#define _WSTRING_DEFINED
+ _CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str);
+ wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source);
+ _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
+ int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
+ wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source);
+ size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
+ size_t __cdecl wcslen(const wchar_t *_Str);
+ size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
+ wchar_t *__cdecl wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
+ int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ wchar_t *__cdecl wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
+ _CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
+ _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
+ size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
+ _CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
+ wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim);
+ _CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum);
+ _CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str);
+ _CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
+ _CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
+ _CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str);
+ _CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val);
+ _CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String);
+ _CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale);
+ _CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String);
+ _CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale);
+ size_t __cdecl wcsxfrm(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount);
+ _CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale);
+ int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2);
+ _CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
+ _CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
+ _CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
+ _CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ _CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
+
+#ifndef NO_OLDNAMES
+ wchar_t *__cdecl wcsdup(const wchar_t *_Str);
+#define wcswcs wcsstr
+ int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
+ int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
+ wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
+ wchar_t *__cdecl wcsrev(wchar_t *_Str);
+ wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val);
+ wchar_t *__cdecl wcslwr(wchar_t *_Str);
+ wchar_t *__cdecl wcsupr(wchar_t *_Str);
+ int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
+#endif
+#endif
+
+#ifndef _TM_DEFINED
+#define _TM_DEFINED
+ struct tm {
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+ };
+#endif
+
+#ifndef _WTIME_DEFINED
+#define _WTIME_DEFINED
+
+ _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
+ _CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time);
+ size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm);
+ _CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale);
+ _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer);
+ _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer);
+#if _INTEGRAL_MAX_BITS >= 64
+ _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time);
+#endif
+
+#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
+#define _INC_WTIME_INL
+#ifdef _USE_32BIT_TIME_T
+__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
+#else
+__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
+#endif
+#endif
+#endif
+
+ typedef int mbstate_t;
+ typedef wchar_t _Wint_t;
+
+ wint_t __cdecl btowc(int);
+ size_t __cdecl mbrlen(const char *_Ch,size_t _SizeInBytes,mbstate_t *_State);
+ size_t __cdecl mbrtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SizeInBytes,mbstate_t *_State);
+ size_t __cdecl mbsrtowcs(wchar_t *_Dest,const char **_PSrc,size_t _Count,mbstate_t *_State);
+ size_t __cdecl wcrtomb(char *_Dest,wchar_t _Source,mbstate_t *_State);
+ size_t __cdecl wcsrtombs(char *_Dest,const wchar_t **_PSource,size_t _Count,mbstate_t *_State);
+ int __cdecl wctob(wint_t _WCh);
+
+#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
+ wchar_t *__cdecl wmemset(wchar_t *s, wchar_t c, size_t n);
+ _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *s, wchar_t c, size_t n);
+ int wmemcmp(const wchar_t *s1, const wchar_t *s2,size_t n);
+ wchar_t *__cdecl wmemcpy(wchar_t *s1,const wchar_t *s2,size_t n);
+ wchar_t *__cdecl wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);
+ long long __cdecl wcstoll(const wchar_t *nptr,wchar_t **endptr, int base);
+ unsigned long long __cdecl wcstoull(const wchar_t *nptr,wchar_t **endptr, int base);
+#endif /* __NO_ISOCEXT */
+
+ void *__cdecl memmove(void *_Dst,const void *_Src,size_t _MaxCount);
+ void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _MaxCount);
+ __CRT_INLINE int __cdecl fwide(FILE *_F,int _M) { (void)_F; return (_M); }
+ __CRT_INLINE int __cdecl mbsinit(const mbstate_t *_P) { return (!_P || *_P==0); }
+ __CRT_INLINE _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *_S,wchar_t _C,size_t _N) { for (;0<_N;++_S,--_N) if (*_S==_C) return (_CONST_RETURN wchar_t *)(_S); return (0); }
+ __CRT_INLINE int __cdecl wmemcmp(const wchar_t *_S1,const wchar_t *_S2,size_t _N) { for (; 0 < _N; ++_S1,++_S2,--_N) if (*_S1!=*_S2) return (*_S1 < *_S2 ? -1 : +1); return (0); }
+ __CRT_INLINE wchar_t *__cdecl wmemcpy(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memcpy(_S1,_S2,_N*sizeof(wchar_t)); }
+ __CRT_INLINE wchar_t *__cdecl wmemmove(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memmove(_S1,_S2,_N*sizeof(wchar_t)); }
+ __CRT_INLINE wchar_t *__cdecl wmemset(wchar_t *_S,wchar_t _C,size_t _N) {
+ wchar_t *_Su = _S;
+ for (;0<_N;++_Su,--_N) {
+ *_Su = _C;
+ }
+ return (_S);
+ }
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+
+#include
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/wctype.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/wctype.h
new file mode 100644
index 00000000..a44cb384
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/wctype.h
@@ -0,0 +1,172 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _INC_WCTYPE
+#define _INC_WCTYPE
+
+#ifndef _WIN32
+#error Only Win32 target is supported!
+#endif
+
+#include <_mingw.h>
+
+#pragma pack(push,_CRT_PACKING)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _CRTIMP
+#define _CRTIMP __declspec(dllimport)
+#endif
+
+#ifndef _WCHAR_T_DEFINED
+ typedef unsigned short wchar_t;
+#define _WCHAR_T_DEFINED
+#endif
+
+#ifndef _WCTYPE_T_DEFINED
+ typedef unsigned short wint_t;
+ typedef unsigned short wctype_t;
+#define _WCTYPE_T_DEFINED
+#endif
+
+#ifndef WEOF
+#define WEOF (wint_t)(0xFFFF)
+#endif
+
+#ifndef _CRT_CTYPEDATA_DEFINED
+#define _CRT_CTYPEDATA_DEFINED
+#ifndef _CTYPE_DISABLE_MACROS
+
+#ifndef __PCTYPE_FUNC
+#define __PCTYPE_FUNC __pctype_func()
+#ifdef _MSVCRT_
+#define __pctype_func() (_pctype)
+#else
+#define __pctype_func() (*_imp___pctype)
+#endif
+#endif
+
+#ifndef _pctype
+#ifdef _MSVCRT_
+ extern unsigned short *_pctype;
+#else
+ extern unsigned short **_imp___pctype;
+#define _pctype (*_imp___pctype)
+#endif
+#endif
+
+#endif
+#endif
+
+#ifndef _CRT_WCTYPEDATA_DEFINED
+#define _CRT_WCTYPEDATA_DEFINED
+#ifndef _CTYPE_DISABLE_MACROS
+#ifndef _wctype
+#ifdef _MSVCRT_
+ extern unsigned short *_wctype;
+#else
+ extern unsigned short **_imp___wctype;
+#define _wctype (*_imp___wctype)
+#endif
+#endif
+
+#ifndef _pwctype
+#ifdef _MSVCRT_
+ extern unsigned short *_pwctype;
+#else
+ extern unsigned short **_imp___pwctype;
+#define _pwctype (*_imp___pwctype)
+#define __pwctype_func() (*_imp___pwctype)
+#endif
+#endif
+#endif
+#endif
+
+#define _UPPER 0x1
+#define _LOWER 0x2
+#define _DIGIT 0x4
+#define _SPACE 0x8
+
+#define _PUNCT 0x10
+#define _CONTROL 0x20
+#define _BLANK 0x40
+#define _HEX 0x80
+
+#define _LEADBYTE 0x8000
+#define _ALPHA (0x0100|_UPPER|_LOWER)
+
+#ifndef _WCTYPE_DEFINED
+#define _WCTYPE_DEFINED
+
+ int __cdecl iswalpha(wint_t);
+ int __cdecl iswupper(wint_t);
+ int __cdecl iswlower(wint_t);
+ int __cdecl iswdigit(wint_t);
+ int __cdecl iswxdigit(wint_t);
+ int __cdecl iswspace(wint_t);
+ int __cdecl iswpunct(wint_t);
+ int __cdecl iswalnum(wint_t);
+ int __cdecl iswprint(wint_t);
+ int __cdecl iswgraph(wint_t);
+ int __cdecl iswcntrl(wint_t);
+ int __cdecl iswascii(wint_t);
+ int __cdecl isleadbyte(int);
+ wint_t __cdecl towupper(wint_t);
+ wint_t __cdecl towlower(wint_t);
+ int __cdecl iswctype(wint_t,wctype_t);
+ _CRTIMP int __cdecl __iswcsymf(wint_t);
+ _CRTIMP int __cdecl __iswcsym(wint_t);
+ int __cdecl is_wctype(wint_t,wctype_t);
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
+int __cdecl isblank(int _C);
+#endif
+#endif
+
+#ifndef _WCTYPE_INLINE_DEFINED
+#define _WCTYPE_INLINE_DEFINED
+#ifndef __cplusplus
+#define iswalpha(_c) (iswctype(_c,_ALPHA))
+#define iswupper(_c) (iswctype(_c,_UPPER))
+#define iswlower(_c) (iswctype(_c,_LOWER))
+#define iswdigit(_c) (iswctype(_c,_DIGIT))
+#define iswxdigit(_c) (iswctype(_c,_HEX))
+#define iswspace(_c) (iswctype(_c,_SPACE))
+#define iswpunct(_c) (iswctype(_c,_PUNCT))
+#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
+#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
+#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
+#define iswcntrl(_c) (iswctype(_c,_CONTROL))
+#define iswascii(_c) ((unsigned)(_c) < 0x80)
+#define isleadbyte(c) (__pctype_func()[(unsigned char)(c)] & _LEADBYTE)
+#else
+ __CRT_INLINE int __cdecl iswalpha(wint_t _C) {return (iswctype(_C,_ALPHA)); }
+ __CRT_INLINE int __cdecl iswupper(wint_t _C) {return (iswctype(_C,_UPPER)); }
+ __CRT_INLINE int __cdecl iswlower(wint_t _C) {return (iswctype(_C,_LOWER)); }
+ __CRT_INLINE int __cdecl iswdigit(wint_t _C) {return (iswctype(_C,_DIGIT)); }
+ __CRT_INLINE int __cdecl iswxdigit(wint_t _C) {return (iswctype(_C,_HEX)); }
+ __CRT_INLINE int __cdecl iswspace(wint_t _C) {return (iswctype(_C,_SPACE)); }
+ __CRT_INLINE int __cdecl iswpunct(wint_t _C) {return (iswctype(_C,_PUNCT)); }
+ __CRT_INLINE int __cdecl iswalnum(wint_t _C) {return (iswctype(_C,_ALPHA|_DIGIT)); }
+ __CRT_INLINE int __cdecl iswprint(wint_t _C) {return (iswctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT)); }
+ __CRT_INLINE int __cdecl iswgraph(wint_t _C) {return (iswctype(_C,_PUNCT|_ALPHA|_DIGIT)); }
+ __CRT_INLINE int __cdecl iswcntrl(wint_t _C) {return (iswctype(_C,_CONTROL)); }
+ __CRT_INLINE int __cdecl iswascii(wint_t _C) {return ((unsigned)(_C) < 0x80); }
+ __CRT_INLINE int __cdecl isleadbyte(int _C) {return (__pctype_func()[(unsigned char)(_C)] & _LEADBYTE); }
+#endif
+#endif
+
+ typedef wchar_t wctrans_t;
+ wint_t __cdecl towctrans(wint_t,wctrans_t);
+ wctrans_t __cdecl wctrans(const char *);
+ wctype_t __cdecl wctype(const char *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#pragma pack(pop)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/basetsd.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/basetsd.h
new file mode 100644
index 00000000..47d78c4c
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/basetsd.h
@@ -0,0 +1,149 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _BASETSD_H_
+#define _BASETSD_H_
+
+#if (defined(__x86_64) || defined(__ia64__)) && !defined(RC_INVOKED)
+typedef unsigned __int64 POINTER_64_INT;
+#else
+typedef unsigned long POINTER_64_INT;
+#endif
+
+#define POINTER_32
+#define POINTER_64
+#define FIRMWARE_PTR
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ typedef signed char INT8,*PINT8;
+ typedef signed short INT16,*PINT16;
+ typedef signed int INT32,*PINT32;
+ typedef signed __int64 INT64,*PINT64;
+ typedef unsigned char UINT8,*PUINT8;
+ typedef unsigned short UINT16,*PUINT16;
+ typedef unsigned int UINT32,*PUINT32;
+ typedef unsigned __int64 UINT64,*PUINT64;
+ typedef signed int LONG32,*PLONG32;
+ typedef unsigned int ULONG32,*PULONG32;
+ typedef unsigned int DWORD32,*PDWORD32;
+
+#ifndef _W64
+#define _W64
+#endif
+
+#ifdef _WIN64
+ typedef __int64 INT_PTR,*PINT_PTR;
+ typedef unsigned __int64 UINT_PTR,*PUINT_PTR;
+ typedef __int64 LONG_PTR,*PLONG_PTR;
+ typedef unsigned __int64 ULONG_PTR,*PULONG_PTR;
+#define __int3264 __int64
+#else
+ typedef int INT_PTR,*PINT_PTR;
+ typedef unsigned int UINT_PTR,*PUINT_PTR;
+ typedef long LONG_PTR,*PLONG_PTR;
+ typedef unsigned long ULONG_PTR,*PULONG_PTR;
+#define __int3264 __int32
+#endif
+
+#ifdef _WIN64
+#define ADDRESS_TAG_BIT 0x40000000000ULL
+ typedef __int64 SHANDLE_PTR;
+ typedef unsigned __int64 HANDLE_PTR;
+ typedef unsigned int UHALF_PTR,*PUHALF_PTR;
+ typedef int HALF_PTR,*PHALF_PTR;
+
+ static __inline unsigned long HandleToULong(const void *h) { return((unsigned long) (ULONG_PTR) h); }
+ static __inline long HandleToLong(const void *h) { return((long) (LONG_PTR) h); }
+ static __inline void *ULongToHandle(const unsigned long h) { return((void *) (UINT_PTR) h); }
+ static __inline void *LongToHandle(const long h) { return((void *) (INT_PTR) h); }
+ static __inline unsigned long PtrToUlong(const void *p) { return((unsigned long) (ULONG_PTR) p); }
+ static __inline unsigned int PtrToUint(const void *p) { return((unsigned int) (UINT_PTR) p); }
+ static __inline unsigned short PtrToUshort(const void *p) { return((unsigned short) (unsigned long) (ULONG_PTR) p); }
+ static __inline long PtrToLong(const void *p) { return((long) (LONG_PTR) p); }
+ static __inline int PtrToInt(const void *p) { return((int) (INT_PTR) p); }
+ static __inline short PtrToShort(const void *p) { return((short) (long) (LONG_PTR) p); }
+ static __inline void *IntToPtr(const int i) { return((void *)(INT_PTR)i); }
+ static __inline void *UIntToPtr(const unsigned int ui) { return((void *)(UINT_PTR)ui); }
+ static __inline void *LongToPtr(const long l) { return((void *)(LONG_PTR)l); }
+ static __inline void *ULongToPtr(const unsigned long ul) { return((void *)(ULONG_PTR)ul); }
+
+#define PtrToPtr64(p) ((void *) p)
+#define Ptr64ToPtr(p) ((void *) p)
+#define HandleToHandle64(h) (PtrToPtr64(h))
+#define Handle64ToHandle(h) (Ptr64ToPtr(h))
+
+ static __inline void *Ptr32ToPtr(const void *p) { return (void *)p; }
+ static __inline void *Handle32ToHandle(const void *h) { return((void *) h); }
+ static __inline void *PtrToPtr32(const void *p) { return((void *) (ULONG_PTR) p); }
+
+#define HandleToHandle32(h) (PtrToPtr32(h))
+#else
+
+#define ADDRESS_TAG_BIT 0x80000000UL
+
+ typedef unsigned short UHALF_PTR,*PUHALF_PTR;
+ typedef short HALF_PTR,*PHALF_PTR;
+ typedef long SHANDLE_PTR;
+ typedef unsigned long HANDLE_PTR;
+
+#define HandleToULong(h) ((ULONG)(ULONG_PTR)(h))
+#define HandleToLong(h) ((LONG)(LONG_PTR) (h))
+#define ULongToHandle(ul) ((HANDLE)(ULONG_PTR) (ul))
+#define LongToHandle(h) ((HANDLE)(LONG_PTR) (h))
+#define PtrToUlong(p) ((ULONG)(ULONG_PTR) (p))
+#define PtrToLong(p) ((LONG)(LONG_PTR) (p))
+#define PtrToUint(p) ((UINT)(UINT_PTR) (p))
+#define PtrToInt(p) ((INT)(INT_PTR) (p))
+#define PtrToUshort(p) ((unsigned short)(ULONG_PTR)(p))
+#define PtrToShort(p) ((short)(LONG_PTR)(p))
+#define IntToPtr(i) ((VOID *)(INT_PTR)((int)i))
+#define UIntToPtr(ui) ((VOID *)(UINT_PTR)((unsigned int)ui))
+#define LongToPtr(l) ((VOID *)(LONG_PTR)((long)l))
+#define ULongToPtr(ul) ((VOID *)(ULONG_PTR)((unsigned long)ul))
+
+ static __inline void *PtrToPtr64(const void *p) { return((void *) (ULONG_PTR)p); }
+ static __inline void *Ptr64ToPtr(const void *p) { return((void *) (ULONG_PTR) p); }
+ static __inline void *HandleToHandle64(const void *h) { return((void *) h); }
+ static __inline void *Handle64ToHandle(const void *h) { return((void *) (ULONG_PTR) h); }
+
+#define Ptr32ToPtr(p) ((void *) p)
+#define Handle32ToHandle(h) (Ptr32ToPtr(h))
+#define PtrToPtr32(p) ((void *) p)
+#define HandleToHandle32(h) (PtrToPtr32(h))
+#endif
+
+#define HandleToUlong(h) HandleToULong(h)
+#define UlongToHandle(ul) ULongToHandle(ul)
+#define UlongToPtr(ul) ULongToPtr(ul)
+#define UintToPtr(ui) UIntToPtr(ui)
+
+#define MAXUINT_PTR (~((UINT_PTR)0))
+#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
+#define MININT_PTR (~MAXINT_PTR)
+
+#define MAXULONG_PTR (~((ULONG_PTR)0))
+#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
+#define MINLONG_PTR (~MAXLONG_PTR)
+
+#define MAXUHALF_PTR ((UHALF_PTR)~0)
+#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
+#define MINHALF_PTR (~MAXHALF_PTR)
+
+ typedef ULONG_PTR SIZE_T,*PSIZE_T;
+ typedef LONG_PTR SSIZE_T,*PSSIZE_T;
+ typedef ULONG_PTR DWORD_PTR,*PDWORD_PTR;
+ typedef __int64 LONG64,*PLONG64;
+ typedef unsigned __int64 ULONG64,*PULONG64;
+ typedef unsigned __int64 DWORD64,*PDWORD64;
+ typedef ULONG_PTR KAFFINITY;
+ typedef KAFFINITY *PKAFFINITY;
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/basetyps.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/basetyps.h
new file mode 100644
index 00000000..376665e7
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/basetyps.h
@@ -0,0 +1,85 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#if !defined(_BASETYPS_H_)
+#define _BASETYPS_H_
+
+#ifdef __cplusplus
+#define EXTERN_C extern "C"
+#else
+#define EXTERN_C extern
+#endif
+
+#define STDMETHODCALLTYPE WINAPI
+#define STDMETHODVCALLTYPE __cdecl
+
+#define STDAPICALLTYPE WINAPI
+#define STDAPIVCALLTYPE __cdecl
+
+#define STDAPI EXTERN_C HRESULT WINAPI
+#define STDAPI_(type) EXTERN_C type WINAPI
+
+#define STDMETHODIMP HRESULT WINAPI
+#define STDMETHODIMP_(type) type WINAPI
+
+#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
+#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
+
+#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
+#define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+#define __STRUCT__ struct
+#define STDMETHOD(method) virtual HRESULT WINAPI method
+#define STDMETHOD_(type,method) virtual type WINAPI method
+#define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method
+#define STDMETHODV_(type,method) virtual type STDMETHODVCALLTYPE method
+#define PURE = 0
+#define THIS_
+#define THIS void
+#define DECLARE_INTERFACE(iface) __STRUCT__ iface
+#define DECLARE_INTERFACE_(iface,baseiface) __STRUCT__ iface : public baseiface
+#else
+
+#ifndef __OBJC__
+#define interface struct
+#endif
+
+#define STDMETHOD(method) HRESULT (WINAPI *method)
+#define STDMETHOD_(type,method) type (WINAPI *method)
+#define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method)
+#define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE *method)
+
+#define PURE
+#define THIS_ INTERFACE *This,
+#define THIS INTERFACE *This
+#ifdef CONST_VTABLE
+#define DECLARE_INTERFACE(iface) typedef struct iface { \
+ const struct iface##Vtbl *lpVtbl; } iface; \
+ typedef const struct iface##Vtbl iface##Vtbl; \
+ const struct iface##Vtbl
+#else
+#define DECLARE_INTERFACE(iface) typedef struct iface { \
+ struct iface##Vtbl *lpVtbl; \
+ } iface; \
+ typedef struct iface##Vtbl iface##Vtbl; \
+ struct iface##Vtbl
+#endif
+#define DECLARE_INTERFACE_(iface,baseiface) DECLARE_INTERFACE(iface)
+#endif
+
+#include
+
+#ifndef _ERROR_STATUS_T_DEFINED
+#define _ERROR_STATUS_T_DEFINED
+typedef unsigned long error_status_t;
+#endif
+
+#ifndef _WCHAR_T_DEFINED
+typedef unsigned short wchar_t;
+#define _WCHAR_T_DEFINED
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/guiddef.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/guiddef.h
new file mode 100644
index 00000000..4e7909a9
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/guiddef.h
@@ -0,0 +1,156 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef GUID_DEFINED
+#define GUID_DEFINED
+typedef struct _GUID {
+ unsigned long Data1;
+ unsigned short Data2;
+ unsigned short Data3;
+ unsigned char Data4[8 ];
+} GUID;
+#endif
+
+#ifndef UUID_DEFINED
+#define UUID_DEFINED
+typedef GUID UUID;
+#endif
+
+#ifndef FAR
+#define FAR
+#endif
+
+#ifndef DECLSPEC_SELECTANY
+#define DECLSPEC_SELECTANY __declspec(selectany)
+#endif
+
+#ifndef EXTERN_C
+#ifdef __cplusplus
+#define EXTERN_C extern "C"
+#else
+#define EXTERN_C extern
+#endif
+#endif
+
+#ifdef DEFINE_GUID
+#undef DEFINE_GUID
+#endif
+
+#ifdef INITGUID
+#ifdef __cplusplus
+#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID DECLSPEC_SELECTANY name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } }
+#else
+#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID DECLSPEC_SELECTANY name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } }
+#endif
+#else
+#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID name
+#endif
+
+#define DEFINE_OLEGUID(name,l,w1,w2) DEFINE_GUID(name,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
+
+#ifndef _GUIDDEF_H_
+#define _GUIDDEF_H_
+
+#ifndef __LPGUID_DEFINED__
+#define __LPGUID_DEFINED__
+typedef GUID *LPGUID;
+#endif
+
+#ifndef __LPCGUID_DEFINED__
+#define __LPCGUID_DEFINED__
+typedef const GUID *LPCGUID;
+#endif
+
+#ifndef __IID_DEFINED__
+#define __IID_DEFINED__
+
+typedef GUID IID;
+typedef IID *LPIID;
+#define IID_NULL GUID_NULL
+#define IsEqualIID(riid1,riid2) IsEqualGUID(riid1,riid2)
+typedef GUID CLSID;
+typedef CLSID *LPCLSID;
+#define CLSID_NULL GUID_NULL
+#define IsEqualCLSID(rclsid1,rclsid2) IsEqualGUID(rclsid1,rclsid2)
+typedef GUID FMTID;
+typedef FMTID *LPFMTID;
+#define FMTID_NULL GUID_NULL
+#define IsEqualFMTID(rfmtid1,rfmtid2) IsEqualGUID(rfmtid1,rfmtid2)
+
+#ifdef __midl_proxy
+#define __MIDL_CONST
+#else
+#define __MIDL_CONST const
+#endif
+
+#ifndef _REFGUID_DEFINED
+#define _REFGUID_DEFINED
+#ifdef __cplusplus
+#define REFGUID const GUID &
+#else
+#define REFGUID const GUID *__MIDL_CONST
+#endif
+#endif
+
+#ifndef _REFIID_DEFINED
+#define _REFIID_DEFINED
+#ifdef __cplusplus
+#define REFIID const IID &
+#else
+#define REFIID const IID *__MIDL_CONST
+#endif
+#endif
+
+#ifndef _REFCLSID_DEFINED
+#define _REFCLSID_DEFINED
+#ifdef __cplusplus
+#define REFCLSID const IID &
+#else
+#define REFCLSID const IID *__MIDL_CONST
+#endif
+#endif
+
+#ifndef _REFFMTID_DEFINED
+#define _REFFMTID_DEFINED
+#ifdef __cplusplus
+#define REFFMTID const IID &
+#else
+#define REFFMTID const IID *__MIDL_CONST
+#endif
+#endif
+#endif
+
+#ifndef _SYS_GUID_OPERATORS_
+#define _SYS_GUID_OPERATORS_
+#include
+
+#ifdef __cplusplus
+__inline int InlineIsEqualGUID(REFGUID rguid1,REFGUID rguid2) {
+ return (((unsigned long *) &rguid1)[0]==((unsigned long *) &rguid2)[0] && ((unsigned long *) &rguid1)[1]==((unsigned long *) &rguid2)[1] &&
+ ((unsigned long *) &rguid1)[2]==((unsigned long *) &rguid2)[2] && ((unsigned long *) &rguid1)[3]==((unsigned long *) &rguid2)[3]);
+}
+__inline int IsEqualGUID(REFGUID rguid1,REFGUID rguid2) { return !memcmp(&rguid1,&rguid2,sizeof(GUID)); }
+#else
+#define InlineIsEqualGUID(rguid1,rguid2) (((unsigned long *) rguid1)[0]==((unsigned long *) rguid2)[0] && ((unsigned long *) rguid1)[1]==((unsigned long *) rguid2)[1] && ((unsigned long *) rguid1)[2]==((unsigned long *) rguid2)[2] && ((unsigned long *) rguid1)[3]==((unsigned long *) rguid2)[3])
+#define IsEqualGUID(rguid1,rguid2) (!memcmp(rguid1,rguid2,sizeof(GUID)))
+#endif
+
+#ifdef __INLINE_ISEQUAL_GUID
+#undef IsEqualGUID
+#define IsEqualGUID(rguid1,rguid2) InlineIsEqualGUID(rguid1,rguid2)
+#endif
+
+#define IsEqualIID(riid1,riid2) IsEqualGUID(riid1,riid2)
+#define IsEqualCLSID(rclsid1,rclsid2) IsEqualGUID(rclsid1,rclsid2)
+
+#if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_
+#define _SYS_GUID_OPERATOR_EQ_
+#ifdef __cplusplus
+__inline int operator==(REFGUID guidOne,REFGUID guidOther) { return IsEqualGUID(guidOne,guidOther); }
+__inline int operator!=(REFGUID guidOne,REFGUID guidOther) { return !(guidOne==guidOther); }
+#endif
+#endif
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/poppack.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/poppack.h
new file mode 100644
index 00000000..b08cba22
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/poppack.h
@@ -0,0 +1,8 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#if !(defined(lint) || defined(RC_INVOKED))
+#pragma pack(pop)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack1.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack1.h
new file mode 100644
index 00000000..d18d9e85
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack1.h
@@ -0,0 +1,8 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#if !(defined(lint) || defined(RC_INVOKED))
+#pragma pack(push,1)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack2.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack2.h
new file mode 100644
index 00000000..7de16fd3
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack2.h
@@ -0,0 +1,8 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#if !(defined(lint) || defined(RC_INVOKED))
+#pragma pack(push,2)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack4.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack4.h
new file mode 100644
index 00000000..1c8e61d7
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack4.h
@@ -0,0 +1,8 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#if !(defined(lint) || defined(RC_INVOKED))
+#pragma pack(push,4)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack8.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack8.h
new file mode 100644
index 00000000..70a3c7f7
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/pshpack8.h
@@ -0,0 +1,8 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#if !(defined(lint) || defined(RC_INVOKED))
+#pragma pack(push,8)
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winbase.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winbase.h
new file mode 100644
index 00000000..4a38006e
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winbase.h
@@ -0,0 +1,2951 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINBASE_
+#define _WINBASE_
+
+#define WINADVAPI DECLSPEC_IMPORT
+#define WINBASEAPI DECLSPEC_IMPORT
+#define ZAWPROXYAPI DECLSPEC_IMPORT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DefineHandleTable(w) ((w),TRUE)
+#define LimitEmsPages(dw)
+#define SetSwapAreaSize(w) (w)
+#define LockSegment(w) GlobalFix((HANDLE)(w))
+#define UnlockSegment(w) GlobalUnfix((HANDLE)(w))
+#define GetCurrentTime() GetTickCount()
+
+#define Yield()
+
+#define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1)
+#define INVALID_FILE_SIZE ((DWORD)0xffffffff)
+#define INVALID_SET_FILE_POINTER ((DWORD)-1)
+#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+
+#define FILE_BEGIN 0
+#define FILE_CURRENT 1
+#define FILE_END 2
+
+#define TIME_ZONE_ID_INVALID ((DWORD)0xffffffff)
+
+#define WAIT_FAILED ((DWORD)0xffffffff)
+#define WAIT_OBJECT_0 ((STATUS_WAIT_0) + 0)
+#define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0) + 0)
+#define WAIT_ABANDONED_0 ((STATUS_ABANDONED_WAIT_0) + 0)
+#define WAIT_IO_COMPLETION STATUS_USER_APC
+#define STILL_ACTIVE STATUS_PENDING
+#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
+#define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
+#define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
+#define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
+#define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
+#define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
+#define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
+#define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
+#define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
+#define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
+#define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
+#define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
+#define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
+#define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
+#define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
+#define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
+#define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
+#define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
+#define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
+#define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
+#define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
+#define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
+#define EXCEPTION_POSSIBLE_DEADLOCK STATUS_POSSIBLE_DEADLOCK
+#define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
+#define MoveMemory RtlMoveMemory
+#define CopyMemory RtlCopyMemory
+#define FillMemory RtlFillMemory
+#define ZeroMemory RtlZeroMemory
+#define SecureZeroMemory RtlSecureZeroMemory
+
+#define FILE_FLAG_WRITE_THROUGH 0x80000000
+#define FILE_FLAG_OVERLAPPED 0x40000000
+#define FILE_FLAG_NO_BUFFERING 0x20000000
+#define FILE_FLAG_RANDOM_ACCESS 0x10000000
+#define FILE_FLAG_SEQUENTIAL_SCAN 0x8000000
+#define FILE_FLAG_DELETE_ON_CLOSE 0x4000000
+#define FILE_FLAG_BACKUP_SEMANTICS 0x2000000
+#define FILE_FLAG_POSIX_SEMANTICS 0x1000000
+#define FILE_FLAG_OPEN_REPARSE_POINT 0x200000
+#define FILE_FLAG_OPEN_NO_RECALL 0x100000
+#define FILE_FLAG_FIRST_PIPE_INSTANCE 0x80000
+
+#define CREATE_NEW 1
+#define CREATE_ALWAYS 2
+#define OPEN_EXISTING 3
+#define OPEN_ALWAYS 4
+#define TRUNCATE_EXISTING 5
+
+#define PROGRESS_CONTINUE 0
+#define PROGRESS_CANCEL 1
+#define PROGRESS_STOP 2
+#define PROGRESS_QUIET 3
+
+#define CALLBACK_CHUNK_FINISHED 0x0
+#define CALLBACK_STREAM_SWITCH 0x1
+
+#define COPY_FILE_FAIL_IF_EXISTS 0x1
+#define COPY_FILE_RESTARTABLE 0x2
+#define COPY_FILE_OPEN_SOURCE_FOR_WRITE 0x4
+#define COPY_FILE_ALLOW_DECRYPTED_DESTINATION 0x8
+
+#define REPLACEFILE_WRITE_THROUGH 0x1
+#define REPLACEFILE_IGNORE_MERGE_ERRORS 0x2
+
+#define PIPE_ACCESS_INBOUND 0x1
+#define PIPE_ACCESS_OUTBOUND 0x2
+#define PIPE_ACCESS_DUPLEX 0x3
+
+#define PIPE_CLIENT_END 0x0
+#define PIPE_SERVER_END 0x1
+
+#define PIPE_WAIT 0x0
+#define PIPE_NOWAIT 0x1
+#define PIPE_READMODE_BYTE 0x0
+#define PIPE_READMODE_MESSAGE 0x2
+#define PIPE_TYPE_BYTE 0x0
+#define PIPE_TYPE_MESSAGE 0x4
+
+#define PIPE_UNLIMITED_INSTANCES 255
+
+#define SECURITY_ANONYMOUS (SecurityAnonymous << 16)
+#define SECURITY_IDENTIFICATION (SecurityIdentification << 16)
+#define SECURITY_IMPERSONATION (SecurityImpersonation << 16)
+#define SECURITY_DELEGATION (SecurityDelegation << 16)
+
+#define SECURITY_CONTEXT_TRACKING 0x40000
+#define SECURITY_EFFECTIVE_ONLY 0x80000
+
+#define SECURITY_SQOS_PRESENT 0x100000
+#define SECURITY_VALID_SQOS_FLAGS 0x1f0000
+
+ typedef struct _OVERLAPPED {
+ ULONG_PTR Internal;
+ ULONG_PTR InternalHigh;
+ union {
+ struct {
+ DWORD Offset;
+ DWORD OffsetHigh;
+ };
+ PVOID Pointer;
+ };
+ HANDLE hEvent;
+ } OVERLAPPED,*LPOVERLAPPED;
+
+ typedef struct _SECURITY_ATTRIBUTES {
+ DWORD nLength;
+ LPVOID lpSecurityDescriptor;
+ WINBOOL bInheritHandle;
+ } SECURITY_ATTRIBUTES,*PSECURITY_ATTRIBUTES,*LPSECURITY_ATTRIBUTES;
+
+ typedef struct _PROCESS_INFORMATION {
+ HANDLE hProcess;
+ HANDLE hThread;
+ DWORD dwProcessId;
+ DWORD dwThreadId;
+ } PROCESS_INFORMATION,*PPROCESS_INFORMATION,*LPPROCESS_INFORMATION;
+
+#ifndef _FILETIME_
+#define _FILETIME_
+ typedef struct _FILETIME {
+ DWORD dwLowDateTime;
+ DWORD dwHighDateTime;
+ } FILETIME,*PFILETIME,*LPFILETIME;
+#endif
+
+ typedef struct _SYSTEMTIME {
+ WORD wYear;
+ WORD wMonth;
+ WORD wDayOfWeek;
+ WORD wDay;
+ WORD wHour;
+ WORD wMinute;
+ WORD wSecond;
+ WORD wMilliseconds;
+ } SYSTEMTIME,*PSYSTEMTIME,*LPSYSTEMTIME;
+
+ typedef DWORD (WINAPI *PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter);
+ typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
+ typedef VOID (WINAPI *PFIBER_START_ROUTINE)(LPVOID lpFiberParameter);
+ typedef PFIBER_START_ROUTINE LPFIBER_START_ROUTINE;
+
+ typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;
+ typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;
+ typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;
+ typedef RTL_CRITICAL_SECTION_DEBUG CRITICAL_SECTION_DEBUG;
+ typedef PRTL_CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
+ typedef PRTL_CRITICAL_SECTION_DEBUG LPCRITICAL_SECTION_DEBUG;
+
+ WINBASEAPI PVOID WINAPI EncodePointer(PVOID Ptr);
+ WINBASEAPI PVOID WINAPI DecodePointer(PVOID Ptr);
+ WINBASEAPI PVOID WINAPI EncodeSystemPointer(PVOID Ptr);
+ WINBASEAPI PVOID WINAPI DecodeSystemPointer(PVOID Ptr);
+
+#ifdef I_X86_
+ typedef PLDT_ENTRY LPLDT_ENTRY;
+#else
+ typedef LPVOID LPLDT_ENTRY;
+#endif
+
+#define MUTEX_MODIFY_STATE MUTANT_QUERY_STATE
+#define MUTEX_ALL_ACCESS MUTANT_ALL_ACCESS
+
+#define SP_SERIALCOMM ((DWORD)0x1)
+
+#define PST_UNSPECIFIED ((DWORD)0x0)
+#define PST_RS232 ((DWORD)0x1)
+#define PST_PARALLELPORT ((DWORD)0x2)
+#define PST_RS422 ((DWORD)0x3)
+#define PST_RS423 ((DWORD)0x4)
+#define PST_RS449 ((DWORD)0x5)
+#define PST_MODEM ((DWORD)0x6)
+#define PST_FAX ((DWORD)0x21)
+#define PST_SCANNER ((DWORD)0x22)
+#define PST_NETWORK_BRIDGE ((DWORD)0x100)
+#define PST_LAT ((DWORD)0x101)
+#define PST_TCPIP_TELNET ((DWORD)0x102)
+#define PST_X25 ((DWORD)0x103)
+
+#define PCF_DTRDSR ((DWORD)0x1)
+#define PCF_RTSCTS ((DWORD)0x2)
+#define PCF_RLSD ((DWORD)0x4)
+#define PCF_PARITY_CHECK ((DWORD)0x8)
+#define PCF_XONXOFF ((DWORD)0x10)
+#define PCF_SETXCHAR ((DWORD)0x20)
+#define PCF_TOTALTIMEOUTS ((DWORD)0x40)
+#define PCF_INTTIMEOUTS ((DWORD)0x80)
+#define PCF_SPECIALCHARS ((DWORD)0x100)
+#define PCF_16BITMODE ((DWORD)0x200)
+
+#define SP_PARITY ((DWORD)0x1)
+#define SP_BAUD ((DWORD)0x2)
+#define SP_DATABITS ((DWORD)0x4)
+#define SP_STOPBITS ((DWORD)0x8)
+#define SP_HANDSHAKING ((DWORD)0x10)
+#define SP_PARITY_CHECK ((DWORD)0x20)
+#define SP_RLSD ((DWORD)0x40)
+
+#define BAUD_075 ((DWORD)0x1)
+#define BAUD_110 ((DWORD)0x2)
+#define BAUD_134_5 ((DWORD)0x4)
+#define BAUD_150 ((DWORD)0x8)
+#define BAUD_300 ((DWORD)0x10)
+#define BAUD_600 ((DWORD)0x20)
+#define BAUD_1200 ((DWORD)0x40)
+#define BAUD_1800 ((DWORD)0x80)
+#define BAUD_2400 ((DWORD)0x100)
+#define BAUD_4800 ((DWORD)0x200)
+#define BAUD_7200 ((DWORD)0x400)
+#define BAUD_9600 ((DWORD)0x800)
+#define BAUD_14400 ((DWORD)0x1000)
+#define BAUD_19200 ((DWORD)0x2000)
+#define BAUD_38400 ((DWORD)0x4000)
+#define BAUD_56K ((DWORD)0x8000)
+#define BAUD_128K ((DWORD)0x10000)
+#define BAUD_115200 ((DWORD)0x20000)
+#define BAUD_57600 ((DWORD)0x40000)
+#define BAUD_USER ((DWORD)0x10000000)
+
+#define DATABITS_5 ((WORD)0x1)
+#define DATABITS_6 ((WORD)0x2)
+#define DATABITS_7 ((WORD)0x4)
+#define DATABITS_8 ((WORD)0x8)
+#define DATABITS_16 ((WORD)0x10)
+#define DATABITS_16X ((WORD)0x20)
+
+#define STOPBITS_10 ((WORD)0x1)
+#define STOPBITS_15 ((WORD)0x2)
+#define STOPBITS_20 ((WORD)0x4)
+#define PARITY_NONE ((WORD)0x100)
+#define PARITY_ODD ((WORD)0x200)
+#define PARITY_EVEN ((WORD)0x400)
+#define PARITY_MARK ((WORD)0x800)
+#define PARITY_SPACE ((WORD)0x1000)
+
+ typedef struct _COMMPROP {
+ WORD wPacketLength;
+ WORD wPacketVersion;
+ DWORD dwServiceMask;
+ DWORD dwReserved1;
+ DWORD dwMaxTxQueue;
+ DWORD dwMaxRxQueue;
+ DWORD dwMaxBaud;
+ DWORD dwProvSubType;
+ DWORD dwProvCapabilities;
+ DWORD dwSettableParams;
+ DWORD dwSettableBaud;
+ WORD wSettableData;
+ WORD wSettableStopParity;
+ DWORD dwCurrentTxQueue;
+ DWORD dwCurrentRxQueue;
+ DWORD dwProvSpec1;
+ DWORD dwProvSpec2;
+ WCHAR wcProvChar[1];
+ } COMMPROP,*LPCOMMPROP;
+
+#define COMMPROP_INITIALIZED ((DWORD)0xE73CF52E)
+
+ typedef struct _COMSTAT {
+ DWORD fCtsHold : 1;
+ DWORD fDsrHold : 1;
+ DWORD fRlsdHold : 1;
+ DWORD fXoffHold : 1;
+ DWORD fXoffSent : 1;
+ DWORD fEof : 1;
+ DWORD fTxim : 1;
+ DWORD fReserved : 25;
+ DWORD cbInQue;
+ DWORD cbOutQue;
+ } COMSTAT,*LPCOMSTAT;
+
+#define DTR_CONTROL_DISABLE 0x0
+#define DTR_CONTROL_ENABLE 0x1
+#define DTR_CONTROL_HANDSHAKE 0x2
+
+#define RTS_CONTROL_DISABLE 0x0
+#define RTS_CONTROL_ENABLE 0x1
+#define RTS_CONTROL_HANDSHAKE 0x2
+#define RTS_CONTROL_TOGGLE 0x3
+
+ typedef struct _DCB {
+ DWORD DCBlength;
+ DWORD BaudRate;
+ DWORD fBinary: 1;
+ DWORD fParity: 1;
+ DWORD fOutxCtsFlow:1;
+ DWORD fOutxDsrFlow:1;
+ DWORD fDtrControl:2;
+ DWORD fDsrSensitivity:1;
+ DWORD fTXContinueOnXoff: 1;
+ DWORD fOutX: 1;
+ DWORD fInX: 1;
+ DWORD fErrorChar: 1;
+ DWORD fNull: 1;
+ DWORD fRtsControl:2;
+ DWORD fAbortOnError:1;
+ DWORD fDummy2:17;
+ WORD wReserved;
+ WORD XonLim;
+ WORD XoffLim;
+ BYTE ByteSize;
+ BYTE Parity;
+ BYTE StopBits;
+ char XonChar;
+ char XoffChar;
+ char ErrorChar;
+ char EofChar;
+ char EvtChar;
+ WORD wReserved1;
+ } DCB,*LPDCB;
+
+ typedef struct _COMMTIMEOUTS {
+ DWORD ReadIntervalTimeout;
+ DWORD ReadTotalTimeoutMultiplier;
+ DWORD ReadTotalTimeoutConstant;
+ DWORD WriteTotalTimeoutMultiplier;
+ DWORD WriteTotalTimeoutConstant;
+ } COMMTIMEOUTS,*LPCOMMTIMEOUTS;
+
+ typedef struct _COMMCONFIG {
+ DWORD dwSize;
+ WORD wVersion;
+ WORD wReserved;
+ DCB dcb;
+ DWORD dwProviderSubType;
+ DWORD dwProviderOffset;
+ DWORD dwProviderSize;
+ WCHAR wcProviderData[1];
+ } COMMCONFIG,*LPCOMMCONFIG;
+
+ typedef struct _SYSTEM_INFO {
+ union {
+ DWORD dwOemId;
+ struct {
+ WORD wProcessorArchitecture;
+ WORD wReserved;
+ };
+ };
+ DWORD dwPageSize;
+ LPVOID lpMinimumApplicationAddress;
+ LPVOID lpMaximumApplicationAddress;
+ DWORD_PTR dwActiveProcessorMask;
+ DWORD dwNumberOfProcessors;
+ DWORD dwProcessorType;
+ DWORD dwAllocationGranularity;
+ WORD wProcessorLevel;
+ WORD wProcessorRevision;
+ } SYSTEM_INFO,*LPSYSTEM_INFO;
+
+#define FreeModule(hLibModule) FreeLibrary((hLibModule))
+#define MakeProcInstance(lpProc,hInstance) (lpProc)
+#define FreeProcInstance(lpProc) (lpProc)
+
+#define GMEM_FIXED 0x0
+#define GMEM_MOVEABLE 0x2
+#define GMEM_NOCOMPACT 0x10
+#define GMEM_NODISCARD 0x20
+#define GMEM_ZEROINIT 0x40
+#define GMEM_MODIFY 0x80
+#define GMEM_DISCARDABLE 0x100
+#define GMEM_NOT_BANKED 0x1000
+#define GMEM_SHARE 0x2000
+#define GMEM_DDESHARE 0x2000
+#define GMEM_NOTIFY 0x4000
+#define GMEM_LOWER GMEM_NOT_BANKED
+#define GMEM_VALID_FLAGS 0x7F72
+#define GMEM_INVALID_HANDLE 0x8000
+
+#define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
+#define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
+
+#define GlobalLRUNewest(h) ((HANDLE)(h))
+#define GlobalLRUOldest(h) ((HANDLE)(h))
+#define GlobalDiscard(h) GlobalReAlloc((h),0,GMEM_MOVEABLE)
+
+#define GMEM_DISCARDED 0x4000
+#define GMEM_LOCKCOUNT 0xff
+
+ typedef struct _MEMORYSTATUS {
+ DWORD dwLength;
+ DWORD dwMemoryLoad;
+ SIZE_T dwTotalPhys;
+ SIZE_T dwAvailPhys;
+ SIZE_T dwTotalPageFile;
+ SIZE_T dwAvailPageFile;
+ SIZE_T dwTotalVirtual;
+ SIZE_T dwAvailVirtual;
+ } MEMORYSTATUS,*LPMEMORYSTATUS;
+
+#define LMEM_FIXED 0x0
+#define LMEM_MOVEABLE 0x2
+#define LMEM_NOCOMPACT 0x10
+#define LMEM_NODISCARD 0x20
+#define LMEM_ZEROINIT 0x40
+#define LMEM_MODIFY 0x80
+#define LMEM_DISCARDABLE 0xf00
+#define LMEM_VALID_FLAGS 0xf72
+#define LMEM_INVALID_HANDLE 0x8000
+
+#define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
+#define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
+
+#define NONZEROLHND (LMEM_MOVEABLE)
+#define NONZEROLPTR (LMEM_FIXED)
+
+#define LocalDiscard(h) LocalReAlloc((h),0,LMEM_MOVEABLE)
+
+#define LMEM_DISCARDED 0x4000
+#define LMEM_LOCKCOUNT 0xff
+
+#define DEBUG_PROCESS 0x1
+#define DEBUG_ONLY_THIS_PROCESS 0x2
+#define CREATE_SUSPENDED 0x4
+#define DETACHED_PROCESS 0x8
+#define CREATE_NEW_CONSOLE 0x10
+#define NORMAL_PRIORITY_CLASS 0x20
+#define IDLE_PRIORITY_CLASS 0x40
+#define HIGH_PRIORITY_CLASS 0x80
+#define REALTIME_PRIORITY_CLASS 0x100
+#define CREATE_NEW_PROCESS_GROUP 0x200
+#define CREATE_UNICODE_ENVIRONMENT 0x400
+#define CREATE_SEPARATE_WOW_VDM 0x800
+#define CREATE_SHARED_WOW_VDM 0x1000
+#define CREATE_FORCEDOS 0x2000
+#define BELOW_NORMAL_PRIORITY_CLASS 0x4000
+#define ABOVE_NORMAL_PRIORITY_CLASS 0x8000
+#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x10000
+
+#define CREATE_BREAKAWAY_FROM_JOB 0x1000000
+#define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x2000000
+
+#define CREATE_DEFAULT_ERROR_MODE 0x4000000
+#define CREATE_NO_WINDOW 0x8000000
+
+#define PROFILE_USER 0x10000000
+#define PROFILE_KERNEL 0x20000000
+#define PROFILE_SERVER 0x40000000
+
+#define CREATE_IGNORE_SYSTEM_DEFAULT 0x80000000
+
+#define THREAD_PRIORITY_LOWEST THREAD_BASE_PRIORITY_MIN
+#define THREAD_PRIORITY_BELOW_NORMAL (THREAD_PRIORITY_LOWEST+1)
+#define THREAD_PRIORITY_NORMAL 0
+#define THREAD_PRIORITY_HIGHEST THREAD_BASE_PRIORITY_MAX
+#define THREAD_PRIORITY_ABOVE_NORMAL (THREAD_PRIORITY_HIGHEST-1)
+#define THREAD_PRIORITY_ERROR_RETURN (MAXLONG)
+
+#define THREAD_PRIORITY_TIME_CRITICAL THREAD_BASE_PRIORITY_LOWRT
+#define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
+
+#define EXCEPTION_DEBUG_EVENT 1
+#define CREATE_THREAD_DEBUG_EVENT 2
+#define CREATE_PROCESS_DEBUG_EVENT 3
+#define EXIT_THREAD_DEBUG_EVENT 4
+#define EXIT_PROCESS_DEBUG_EVENT 5
+#define LOAD_DLL_DEBUG_EVENT 6
+#define UNLOAD_DLL_DEBUG_EVENT 7
+#define OUTPUT_DEBUG_STRING_EVENT 8
+#define RIP_EVENT 9
+
+ typedef struct _EXCEPTION_DEBUG_INFO {
+ EXCEPTION_RECORD ExceptionRecord;
+ DWORD dwFirstChance;
+ } EXCEPTION_DEBUG_INFO,*LPEXCEPTION_DEBUG_INFO;
+
+ typedef struct _CREATE_THREAD_DEBUG_INFO {
+ HANDLE hThread;
+ LPVOID lpThreadLocalBase;
+ LPTHREAD_START_ROUTINE lpStartAddress;
+ } CREATE_THREAD_DEBUG_INFO,*LPCREATE_THREAD_DEBUG_INFO;
+
+ typedef struct _CREATE_PROCESS_DEBUG_INFO {
+ HANDLE hFile;
+ HANDLE hProcess;
+ HANDLE hThread;
+ LPVOID lpBaseOfImage;
+ DWORD dwDebugInfoFileOffset;
+ DWORD nDebugInfoSize;
+ LPVOID lpThreadLocalBase;
+ LPTHREAD_START_ROUTINE lpStartAddress;
+ LPVOID lpImageName;
+ WORD fUnicode;
+ } CREATE_PROCESS_DEBUG_INFO,*LPCREATE_PROCESS_DEBUG_INFO;
+
+ typedef struct _EXIT_THREAD_DEBUG_INFO {
+ DWORD dwExitCode;
+ } EXIT_THREAD_DEBUG_INFO,*LPEXIT_THREAD_DEBUG_INFO;
+
+ typedef struct _EXIT_PROCESS_DEBUG_INFO {
+ DWORD dwExitCode;
+ } EXIT_PROCESS_DEBUG_INFO,*LPEXIT_PROCESS_DEBUG_INFO;
+
+ typedef struct _LOAD_DLL_DEBUG_INFO {
+ HANDLE hFile;
+ LPVOID lpBaseOfDll;
+ DWORD dwDebugInfoFileOffset;
+ DWORD nDebugInfoSize;
+ LPVOID lpImageName;
+ WORD fUnicode;
+ } LOAD_DLL_DEBUG_INFO,*LPLOAD_DLL_DEBUG_INFO;
+
+ typedef struct _UNLOAD_DLL_DEBUG_INFO {
+ LPVOID lpBaseOfDll;
+ } UNLOAD_DLL_DEBUG_INFO,*LPUNLOAD_DLL_DEBUG_INFO;
+
+ typedef struct _OUTPUT_DEBUG_STRING_INFO {
+ LPSTR lpDebugStringData;
+ WORD fUnicode;
+ WORD nDebugStringLength;
+ } OUTPUT_DEBUG_STRING_INFO,*LPOUTPUT_DEBUG_STRING_INFO;
+
+ typedef struct _RIP_INFO {
+ DWORD dwError;
+ DWORD dwType;
+ } RIP_INFO,*LPRIP_INFO;
+
+ typedef struct _DEBUG_EVENT {
+ DWORD dwDebugEventCode;
+ DWORD dwProcessId;
+ DWORD dwThreadId;
+ union {
+ EXCEPTION_DEBUG_INFO Exception;
+ CREATE_THREAD_DEBUG_INFO CreateThread;
+ CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
+ EXIT_THREAD_DEBUG_INFO ExitThread;
+ EXIT_PROCESS_DEBUG_INFO ExitProcess;
+ LOAD_DLL_DEBUG_INFO LoadDll;
+ UNLOAD_DLL_DEBUG_INFO UnloadDll;
+ OUTPUT_DEBUG_STRING_INFO DebugString;
+ RIP_INFO RipInfo;
+ } u;
+ } DEBUG_EVENT,*LPDEBUG_EVENT;
+
+ typedef PCONTEXT LPCONTEXT;
+ typedef PEXCEPTION_RECORD LPEXCEPTION_RECORD;
+ typedef PEXCEPTION_POINTERS LPEXCEPTION_POINTERS;
+
+#define DRIVE_UNKNOWN 0
+#define DRIVE_NO_ROOT_DIR 1
+#define DRIVE_REMOVABLE 2
+#define DRIVE_FIXED 3
+#define DRIVE_REMOTE 4
+#define DRIVE_CDROM 5
+#define DRIVE_RAMDISK 6
+
+#define GetFreeSpace(w) (0x100000L)
+#define FILE_TYPE_UNKNOWN 0x0
+#define FILE_TYPE_DISK 0x1
+#define FILE_TYPE_CHAR 0x2
+#define FILE_TYPE_PIPE 0x3
+#define FILE_TYPE_REMOTE 0x8000
+
+#define STD_INPUT_HANDLE ((DWORD)-10)
+#define STD_OUTPUT_HANDLE ((DWORD)-11)
+#define STD_ERROR_HANDLE ((DWORD)-12)
+
+#define NOPARITY 0
+#define ODDPARITY 1
+#define EVENPARITY 2
+#define MARKPARITY 3
+#define SPACEPARITY 4
+
+#define ONESTOPBIT 0
+#define ONE5STOPBITS 1
+#define TWOSTOPBITS 2
+
+#define IGNORE 0
+#define INFINITE 0xffffffff
+
+#define CBR_110 110
+#define CBR_300 300
+#define CBR_600 600
+#define CBR_1200 1200
+#define CBR_2400 2400
+#define CBR_4800 4800
+#define CBR_9600 9600
+#define CBR_14400 14400
+#define CBR_19200 19200
+#define CBR_38400 38400
+#define CBR_56000 56000
+#define CBR_57600 57600
+#define CBR_115200 115200
+#define CBR_128000 128000
+#define CBR_256000 256000
+
+#define CE_RXOVER 0x1
+#define CE_OVERRUN 0x2
+#define CE_RXPARITY 0x4
+#define CE_FRAME 0x8
+#define CE_BREAK 0x10
+#define CE_TXFULL 0x100
+#define CE_PTO 0x200
+#define CE_IOE 0x400
+#define CE_DNS 0x800
+#define CE_OOP 0x1000
+#define CE_MODE 0x8000
+
+#define IE_BADID (-1)
+#define IE_OPEN (-2)
+#define IE_NOPEN (-3)
+#define IE_MEMORY (-4)
+#define IE_DEFAULT (-5)
+#define IE_HARDWARE (-10)
+#define IE_BYTESIZE (-11)
+#define IE_BAUDRATE (-12)
+
+#define EV_RXCHAR 0x1
+#define EV_RXFLAG 0x2
+#define EV_TXEMPTY 0x4
+#define EV_CTS 0x8
+#define EV_DSR 0x10
+#define EV_RLSD 0x20
+#define EV_BREAK 0x40
+#define EV_ERR 0x80
+#define EV_RING 0x100
+#define EV_PERR 0x200
+#define EV_RX80FULL 0x400
+#define EV_EVENT1 0x800
+#define EV_EVENT2 0x1000
+
+#define SETXOFF 1
+#define SETXON 2
+#define SETRTS 3
+#define CLRRTS 4
+#define SETDTR 5
+#define CLRDTR 6
+#define RESETDEV 7
+#define SETBREAK 8
+#define CLRBREAK 9
+
+#define PURGE_TXABORT 0x1
+#define PURGE_RXABORT 0x2
+#define PURGE_TXCLEAR 0x4
+#define PURGE_RXCLEAR 0x8
+
+#define LPTx 0x80
+
+#define MS_CTS_ON ((DWORD)0x10)
+#define MS_DSR_ON ((DWORD)0x20)
+#define MS_RING_ON ((DWORD)0x40)
+#define MS_RLSD_ON ((DWORD)0x80)
+
+#define S_QUEUEEMPTY 0
+#define S_THRESHOLD 1
+#define S_ALLTHRESHOLD 2
+
+#define S_NORMAL 0
+#define S_LEGATO 1
+#define S_STACCATO 2
+
+#define S_PERIOD512 0
+#define S_PERIOD1024 1
+#define S_PERIOD2048 2
+#define S_PERIODVOICE 3
+#define S_WHITE512 4
+#define S_WHITE1024 5
+#define S_WHITE2048 6
+#define S_WHITEVOICE 7
+
+#define S_SERDVNA (-1)
+#define S_SEROFM (-2)
+#define S_SERMACT (-3)
+#define S_SERQFUL (-4)
+#define S_SERBDNT (-5)
+#define S_SERDLN (-6)
+#define S_SERDCC (-7)
+#define S_SERDTP (-8)
+#define S_SERDVL (-9)
+#define S_SERDMD (-10)
+#define S_SERDSH (-11)
+#define S_SERDPT (-12)
+#define S_SERDFQ (-13)
+#define S_SERDDR (-14)
+#define S_SERDSR (-15)
+#define S_SERDST (-16)
+
+#define NMPWAIT_WAIT_FOREVER 0xffffffff
+#define NMPWAIT_NOWAIT 0x1
+#define NMPWAIT_USE_DEFAULT_WAIT 0x0
+
+#define FS_CASE_IS_PRESERVED FILE_CASE_PRESERVED_NAMES
+#define FS_CASE_SENSITIVE FILE_CASE_SENSITIVE_SEARCH
+#define FS_UNICODE_STORED_ON_DISK FILE_UNICODE_ON_DISK
+#define FS_PERSISTENT_ACLS FILE_PERSISTENT_ACLS
+#define FS_VOL_IS_COMPRESSED FILE_VOLUME_IS_COMPRESSED
+#define FS_FILE_COMPRESSION FILE_FILE_COMPRESSION
+#define FS_FILE_ENCRYPTION FILE_SUPPORTS_ENCRYPTION
+
+#define FILE_MAP_COPY SECTION_QUERY
+#define FILE_MAP_WRITE SECTION_MAP_WRITE
+#define FILE_MAP_READ SECTION_MAP_READ
+#define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS
+#define FILE_MAP_EXECUTE SECTION_MAP_EXECUTE_EXPLICIT
+
+#define OF_READ 0x0
+#define OF_WRITE 0x1
+#define OF_READWRITE 0x2
+#define OF_SHARE_COMPAT 0x0
+#define OF_SHARE_EXCLUSIVE 0x10
+#define OF_SHARE_DENY_WRITE 0x20
+#define OF_SHARE_DENY_READ 0x30
+#define OF_SHARE_DENY_NONE 0x40
+#define OF_PARSE 0x100
+#define OF_DELETE 0x200
+#define OF_VERIFY 0x400
+#define OF_CANCEL 0x800
+#define OF_CREATE 0x1000
+#define OF_PROMPT 0x2000
+#define OF_EXIST 0x4000
+#define OF_REOPEN 0x8000
+
+#define OFS_MAXPATHNAME 128
+ typedef struct _OFSTRUCT {
+ BYTE cBytes;
+ BYTE fFixedDisk;
+ WORD nErrCode;
+ WORD Reserved1;
+ WORD Reserved2;
+ CHAR szPathName[OFS_MAXPATHNAME];
+ } OFSTRUCT,*LPOFSTRUCT,*POFSTRUCT;
+
+#ifndef NOWINBASEINTERLOCK
+
+#ifndef _NTOS_
+
+#if defined(__ia64__) && !defined(RC_INVOKED)
+
+#define InterlockedIncrement _InterlockedIncrement
+#define InterlockedIncrementAcquire _InterlockedIncrement_acq
+#define InterlockedIncrementRelease _InterlockedIncrement_rel
+#define InterlockedDecrement _InterlockedDecrement
+#define InterlockedDecrementAcquire _InterlockedDecrement_acq
+#define InterlockedDecrementRelease _InterlockedDecrement_rel
+#define InterlockedExchange _InterlockedExchange
+#define InterlockedExchangeAdd _InterlockedExchangeAdd
+#define InterlockedCompareExchange _InterlockedCompareExchange
+#define InterlockedCompareExchangeAcquire _InterlockedCompareExchange_acq
+#define InterlockedCompareExchangeRelease _InterlockedCompareExchange_rel
+#define InterlockedExchangePointer _InterlockedExchangePointer
+#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
+#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer_rel
+#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer_acq
+
+#define InterlockedIncrement64 _InterlockedIncrement64
+#define InterlockedDecrement64 _InterlockedDecrement64
+#define InterlockedExchange64 _InterlockedExchange64
+#define InterlockedExchangeAcquire64 _InterlockedExchange64_acq
+#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
+#define InterlockedCompareExchange64 _InterlockedCompareExchange64
+#define InterlockedCompareExchangeAcquire64 _InterlockedCompareExchange64_acq
+#define InterlockedCompareExchangeRelease64 _InterlockedCompareExchange64_rel
+
+ LONGLONG __cdecl InterlockedIncrement64(LONGLONG volatile *Addend);
+ LONGLONG __cdecl InterlockedDecrement64(LONGLONG volatile *Addend);
+ LONG __cdecl InterlockedIncrementAcquire(LONG volatile *Addend);
+ LONG __cdecl InterlockedDecrementAcquire(LONG volatile *Addend);
+ LONG __cdecl InterlockedIncrementRelease(LONG volatile *Addend);
+ LONG __cdecl InterlockedDecrementRelease(LONG volatile *Addend);
+ LONGLONG __cdecl InterlockedExchange64 (LONGLONG volatile *Target,LONGLONG Value);
+ LONGLONG __cdecl InterlockedExchangeAcquire64 (LONGLONG volatile *Target,LONGLONG Value);
+ LONGLONG __cdecl InterlockedExchangeAdd64 (LONGLONG volatile *Addend,LONGLONG Value);
+ LONGLONG __cdecl InterlockedCompareExchange64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand);
+ LONGLONG __cdecl InterlockedCompareExchangeAcquire64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand);
+ LONGLONG __cdecl InterlockedCompareExchangeRelease64 (LONGLONG volatile *Destination,LONGLONG ExChange,LONGLONG Comperand);
+ LONG __cdecl InterlockedIncrement(LONG volatile *lpAddend);
+ LONG __cdecl InterlockedDecrement(LONG volatile *lpAddend);
+ LONG __cdecl InterlockedExchange(LONG volatile *Target,LONG Value);
+ LONG __cdecl InterlockedExchangeAdd(LONG volatile *Addend,LONG Value);
+ LONG __cdecl InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand);
+ LONG __cdecl InterlockedCompareExchangeRelease(LONG volatile *Destination,LONG ExChange,LONG Comperand);
+ LONG __cdecl InterlockedCompareExchangeAcquire(LONG volatile *Destination,LONG ExChange,LONG Comperand);
+ PVOID __cdecl InterlockedExchangePointer(PVOID volatile *Target,PVOID Value);
+ PVOID __cdecl InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand);
+ PVOID __cdecl InterlockedCompareExchangePointerAcquire(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand);
+ PVOID __cdecl InterlockedCompareExchangePointerRelease(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand);
+
+#ifndef InterlockedAnd
+#define InterlockedAnd InterlockedAnd_Inline
+ __CRT_INLINE LONG InterlockedAnd_Inline(LONG volatile *Target,LONG Set) {
+ LONG i;
+ LONG j;
+ j = *Target;
+ do {
+ i = j;
+ j = InterlockedCompareExchange(Target,i & Set,i);
+ } while(i!=j);
+ return j;
+ }
+#endif
+
+#ifndef InterlockedOr
+#define InterlockedOr InterlockedOr_Inline
+
+ __CRT_INLINE LONG InterlockedOr_Inline(LONG volatile *Target,LONG Set) {
+ LONG i;
+ LONG j;
+ j = *Target;
+ do {
+ i = j;
+ j = InterlockedCompareExchange(Target,i | Set,i);
+ } while(i!=j);
+ return j;
+ }
+#endif
+
+#ifndef InterlockedXor
+#define InterlockedXor InterlockedXor_Inline
+
+ __CRT_INLINE LONG InterlockedXor_Inline(LONG volatile *Target,LONG Set) {
+ LONG i;
+ LONG j;
+ j = *Target;
+ do {
+ i = j;
+ j = InterlockedCompareExchange(Target,i ^ Set,i);
+ } while(i!=j);
+ return j;
+ }
+#endif
+
+#ifndef !defined (InterlockedAnd64)
+#define InterlockedAnd64 InterlockedAnd64_Inline
+
+ __CRT_INLINE LONGLONG InterlockedAnd64_Inline (LONGLONG volatile *Destination,LONGLONG Value) {
+ LONGLONG Old;
+ do {
+ Old = *Destination;
+ } while(InterlockedCompareExchange64(Destination,Old & Value,Old)!=Old);
+ return Old;
+ }
+#endif
+
+#ifndef InterlockedOr64
+#define InterlockedOr64 InterlockedOr64_Inline
+
+ __CRT_INLINE LONGLONG InterlockedOr64_Inline (LONGLONG volatile *Destination,LONGLONG Value) {
+ LONGLONG Old;
+ do {
+ Old = *Destination;
+ } while(InterlockedCompareExchange64(Destination,Old | Value,Old)!=Old);
+ return Old;
+ }
+#endif
+
+#ifndef InterlockedXor64
+#define InterlockedXor64 InterlockedXor64_Inline
+
+ __CRT_INLINE LONGLONG InterlockedXor64_Inline (LONGLONG volatile *Destination,LONGLONG Value) {
+ LONGLONG Old;
+ do {
+ Old = *Destination;
+ } while(InterlockedCompareExchange64(Destination,Old ^ Value,Old)!=Old);
+ return Old;
+ }
+#endif
+
+#ifndef InterlockedBitTestAndSet
+#define InterlockedBitTestAndSet InterlockedBitTestAndSet_Inline
+
+ __CRT_INLINE BOOLEAN InterlockedBitTestAndSet_Inline(LONG *Base,LONG Bit) {
+ LONG tBit;
+ tBit = 1<<(Bit & (sizeof (*Base)*8-1));
+ return (BOOLEAN)((InterlockedOr(&Base[Bit/(sizeof(*Base)*8)],tBit)&tBit)!=0);
+ }
+#endif
+
+#ifndef InterlockedBitTestAndReset
+#define InterlockedBitTestAndReset InterlockedBitTestAndReset_Inline
+
+ __CRT_INLINE BOOLEAN InterlockedBitTestAndReset_Inline(LONG *Base,LONG Bit) {
+ LONG tBit;
+ tBit = 1<<(Bit & (sizeof (*Base)*8-1));
+ return (BOOLEAN)((InterlockedAnd(&Base[Bit/(sizeof(*Base)*8)],~tBit)&tBit)!=0);
+ }
+#endif
+
+#ifndef InterlockedBitTestAndComplement
+#define InterlockedBitTestAndComplement InterlockedBitTestAndComplement_Inline
+
+ __CRT_INLINE BOOLEAN InterlockedBitTestAndComplement_Inline(LONG *Base,LONG Bit) {
+ LONG tBit;
+ tBit = 1<<(Bit & (sizeof (*Base)*8-1));
+ return (BOOLEAN)((InterlockedXor(&Base[Bit/(sizeof(*Base)*8)],tBit)&tBit)!=0);
+ }
+#endif
+#elif defined(__x86_64) && !defined(RC_INVOKED)
+
+#define InterlockedIncrement _InterlockedIncrement
+#define InterlockedIncrementAcquire InterlockedIncrement
+#define InterlockedIncrementRelease InterlockedIncrement
+#define InterlockedDecrement _InterlockedDecrement
+#define InterlockedDecrementAcquire InterlockedDecrement
+#define InterlockedDecrementRelease InterlockedDecrement
+#define InterlockedExchange _InterlockedExchange
+#define InterlockedExchangeAdd _InterlockedExchangeAdd
+#define InterlockedCompareExchange _InterlockedCompareExchange
+#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
+#define InterlockedCompareExchangeRelease InterlockedCompareExchange
+#define InterlockedExchangePointer _InterlockedExchangePointer
+#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
+#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer
+#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer
+#define InterlockedAnd64 _InterlockedAnd64
+#define InterlockedOr64 _InterlockedOr64
+#define InterlockedXor64 _InterlockedXor64
+#define InterlockedIncrement64 _InterlockedIncrement64
+#define InterlockedDecrement64 _InterlockedDecrement64
+#define InterlockedExchange64 _InterlockedExchange64
+#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
+#define InterlockedCompareExchange64 _InterlockedCompareExchange64
+#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
+#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
+
+ LONG InterlockedIncrement(LONG volatile *Addend);
+ LONG InterlockedDecrement(LONG volatile *Addend);
+ LONG InterlockedExchange(LONG volatile *Target,LONG Value);
+ LONG InterlockedExchangeAdd(LONG volatile *Addend,LONG Value);
+ LONG InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand);
+ PVOID InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID Exchange,PVOID Comperand);
+ PVOID InterlockedExchangePointer(PVOID volatile *Target,PVOID Value);
+ LONG64 InterlockedAnd64(LONG64 volatile *Destination,LONG64 Value);
+ LONG64 InterlockedOr64(LONG64 volatile *Destination,LONG64 Value);
+ LONG64 InterlockedXor64(LONG64 volatile *Destination,LONG64 Value);
+ LONG64 InterlockedIncrement64(LONG64 volatile *Addend);
+ LONG64 InterlockedDecrement64(LONG64 volatile *Addend);
+ LONG64 InterlockedExchange64(LONG64 volatile *Target,LONG64 Value);
+ LONG64 InterlockedExchangeAdd64(LONG64 volatile *Addend,LONG64 Value);
+ LONG64 InterlockedCompareExchange64(LONG64 volatile *Destination,LONG64 ExChange,LONG64 Comperand);
+#else
+ LONG WINAPI InterlockedIncrement(LONG volatile *lpAddend);
+ LONG WINAPI InterlockedDecrement(LONG volatile *lpAddend);
+ LONG WINAPI InterlockedExchange(LONG volatile *Target,LONG Value);
+
+#define InterlockedExchangePointer(Target,Value) (PVOID)InterlockedExchange((PLONG)(Target),(LONG)(Value))
+
+ LONG WINAPI InterlockedExchangeAdd(LONG volatile *Addend,LONG Value);
+ LONG WINAPI InterlockedCompareExchange(LONG volatile *Destination,LONG Exchange,LONG Comperand);
+ LONGLONG WINAPI InterlockedCompareExchange64(LONGLONG volatile *Destination,LONGLONG Exchange,LONGLONG Comperand);
+
+ __CRT_INLINE LONGLONG InterlockedAnd64 (LONGLONG volatile *Destination,LONGLONG Value) {
+ LONGLONG Old;
+ do {
+ Old = *Destination;
+ } while(InterlockedCompareExchange64(Destination,Old & Value,Old)!=Old);
+ return Old;
+ }
+
+ __CRT_INLINE LONGLONG InterlockedOr64 (LONGLONG volatile *Destination,LONGLONG Value) {
+ LONGLONG Old;
+ do {
+ Old = *Destination;
+ } while(InterlockedCompareExchange64(Destination,Old | Value,Old)!=Old);
+ return Old;
+ }
+
+ __CRT_INLINE LONGLONG InterlockedXor64 (LONGLONG volatile *Destination,LONGLONG Value) {
+ LONGLONG Old;
+ do {
+ Old = *Destination;
+ } while(InterlockedCompareExchange64(Destination,Old ^ Value,Old)!=Old);
+
+ return Old;
+ }
+
+ __CRT_INLINE LONGLONG InterlockedIncrement64(LONGLONG volatile *Addend) {
+ LONGLONG Old;
+ do {
+ Old = *Addend;
+ } while(InterlockedCompareExchange64(Addend,Old + 1,Old)!=Old);
+ return Old + 1;
+ }
+
+ __CRT_INLINE LONGLONG InterlockedDecrement64(LONGLONG volatile *Addend) {
+ LONGLONG Old;
+ do {
+ Old = *Addend;
+ } while(InterlockedCompareExchange64(Addend,Old - 1,Old)!=Old);
+ return Old - 1;
+ }
+
+ __CRT_INLINE LONGLONG InterlockedExchange64(LONGLONG volatile *Target,LONGLONG Value) {
+ LONGLONG Old;
+ do {
+ Old = *Target;
+ } while(InterlockedCompareExchange64(Target,Value,Old)!=Old);
+ return Old;
+ }
+
+ __CRT_INLINE LONGLONG InterlockedExchangeAdd64(LONGLONG volatile *Addend,LONGLONG Value) {
+ LONGLONG Old;
+ do {
+ Old = *Addend;
+ } while(InterlockedCompareExchange64(Addend,Old + Value,Old)!=Old);
+ return Old;
+ }
+
+#ifdef __cplusplus
+ __CRT_INLINE PVOID __cdecl __InlineInterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand) {
+ return((PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)Destination,(LONG)(LONG_PTR)ExChange,(LONG)(LONG_PTR)Comperand));
+ }
+#define InterlockedCompareExchangePointer __InlineInterlockedCompareExchangePointer
+#else
+#define InterlockedCompareExchangePointer(Destination,ExChange,Comperand)(PVOID)(LONG_PTR)InterlockedCompareExchange((LONG volatile *)(Destination),(LONG)(LONG_PTR)(ExChange),(LONG)(LONG_PTR)(Comperand))
+#endif
+
+#define InterlockedIncrementAcquire InterlockedIncrement
+#define InterlockedIncrementRelease InterlockedIncrement
+#define InterlockedDecrementAcquire InterlockedDecrement
+#define InterlockedDecrementRelease InterlockedDecrement
+#define InterlockedIncrementAcquire InterlockedIncrement
+#define InterlockedIncrementRelease InterlockedIncrement
+#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
+#define InterlockedCompareExchangeRelease InterlockedCompareExchange
+#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
+#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
+#define InterlockedCompareExchangePointerAcquire InterlockedCompareExchangePointer
+#define InterlockedCompareExchangePointerRelease InterlockedCompareExchangePointer
+#endif
+
+#if defined(_SLIST_HEADER_) && !defined(_NTOSP_)
+ WINBASEAPI VOID WINAPI InitializeSListHead(PSLIST_HEADER ListHead);
+ WINBASEAPI PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER ListHead);
+ WINBASEAPI PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER ListHead,PSLIST_ENTRY ListEntry);
+ WINBASEAPI PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER ListHead);
+ WINBASEAPI USHORT WINAPI QueryDepthSList(PSLIST_HEADER ListHead);
+#endif
+#endif
+#endif
+
+ WINBASEAPI WINBOOL WINAPI FreeResource(HGLOBAL hResData);
+ WINBASEAPI LPVOID WINAPI LockResource(HGLOBAL hResData);
+
+#define UnlockResource(hResData) ((hResData),0)
+#define MAXINTATOM 0xC000
+#define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
+#define INVALID_ATOM ((ATOM)0)
+
+ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd);
+ WINBASEAPI WINBOOL WINAPI FreeLibrary(HMODULE hLibModule);
+ WINBASEAPI DECLSPEC_NORETURN VOID WINAPI FreeLibraryAndExitThread(HMODULE hLibModule,DWORD dwExitCode);
+ WINBASEAPI WINBOOL WINAPI DisableThreadLibraryCalls(HMODULE hLibModule);
+ WINBASEAPI FARPROC WINAPI GetProcAddress(HMODULE hModule,LPCSTR lpProcName);
+ WINBASEAPI DWORD WINAPI GetVersion(VOID);
+ WINBASEAPI HGLOBAL WINAPI GlobalAlloc(UINT uFlags,SIZE_T dwBytes);
+ WINBASEAPI HGLOBAL WINAPI GlobalReAlloc(HGLOBAL hMem,SIZE_T dwBytes,UINT uFlags);
+ WINBASEAPI SIZE_T WINAPI GlobalSize(HGLOBAL hMem);
+ WINBASEAPI UINT WINAPI GlobalFlags(HGLOBAL hMem);
+ WINBASEAPI LPVOID WINAPI GlobalLock(HGLOBAL hMem);
+ WINBASEAPI HGLOBAL WINAPI GlobalHandle(LPCVOID pMem);
+ WINBASEAPI WINBOOL WINAPI GlobalUnlock(HGLOBAL hMem);
+ WINBASEAPI HGLOBAL WINAPI GlobalFree(HGLOBAL hMem);
+ WINBASEAPI SIZE_T WINAPI GlobalCompact(DWORD dwMinFree);
+ WINBASEAPI VOID WINAPI GlobalFix(HGLOBAL hMem);
+ WINBASEAPI VOID WINAPI GlobalUnfix(HGLOBAL hMem);
+ WINBASEAPI LPVOID WINAPI GlobalWire(HGLOBAL hMem);
+ WINBASEAPI WINBOOL WINAPI GlobalUnWire(HGLOBAL hMem);
+ WINBASEAPI VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer);
+
+ typedef struct _MEMORYSTATUSEX {
+ DWORD dwLength;
+ DWORD dwMemoryLoad;
+ DWORDLONG ullTotalPhys;
+ DWORDLONG ullAvailPhys;
+ DWORDLONG ullTotalPageFile;
+ DWORDLONG ullAvailPageFile;
+ DWORDLONG ullTotalVirtual;
+ DWORDLONG ullAvailVirtual;
+ DWORDLONG ullAvailExtendedVirtual;
+ } MEMORYSTATUSEX,*LPMEMORYSTATUSEX;
+
+ WINBASEAPI WINBOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer);
+ WINBASEAPI HLOCAL WINAPI LocalAlloc(UINT uFlags,SIZE_T uBytes);
+ WINBASEAPI HLOCAL WINAPI LocalReAlloc(HLOCAL hMem,SIZE_T uBytes,UINT uFlags);
+ WINBASEAPI LPVOID WINAPI LocalLock(HLOCAL hMem);
+ WINBASEAPI HLOCAL WINAPI LocalHandle(LPCVOID pMem);
+ WINBASEAPI WINBOOL WINAPI LocalUnlock(HLOCAL hMem);
+ WINBASEAPI SIZE_T WINAPI LocalSize(HLOCAL hMem);
+ WINBASEAPI UINT WINAPI LocalFlags(HLOCAL hMem);
+ WINBASEAPI HLOCAL WINAPI LocalFree(HLOCAL hMem);
+ WINBASEAPI SIZE_T WINAPI LocalShrink(HLOCAL hMem,UINT cbNewSize);
+ WINBASEAPI SIZE_T WINAPI LocalCompact(UINT uMinFree);
+ WINBASEAPI WINBOOL WINAPI FlushInstructionCache(HANDLE hProcess,LPCVOID lpBaseAddress,SIZE_T dwSize);
+ WINBASEAPI LPVOID WINAPI VirtualAlloc(LPVOID lpAddress,SIZE_T dwSize,DWORD flAllocationType,DWORD flProtect);
+ WINBASEAPI WINBOOL WINAPI VirtualFree(LPVOID lpAddress,SIZE_T dwSize,DWORD dwFreeType);
+ WINBASEAPI WINBOOL WINAPI VirtualProtect(LPVOID lpAddress,SIZE_T dwSize,DWORD flNewProtect,PDWORD lpflOldProtect);
+ WINBASEAPI SIZE_T WINAPI VirtualQuery(LPCVOID lpAddress,PMEMORY_BASIC_INFORMATION lpBuffer,SIZE_T dwLength);
+ WINBASEAPI LPVOID WINAPI VirtualAllocEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD flAllocationType,DWORD flProtect);
+ WINBASEAPI UINT WINAPI GetWriteWatch(DWORD dwFlags,PVOID lpBaseAddress,SIZE_T dwRegionSize,PVOID *lpAddresses,ULONG_PTR *lpdwCount,PULONG lpdwGranularity);
+ WINBASEAPI UINT WINAPI ResetWriteWatch(LPVOID lpBaseAddress,SIZE_T dwRegionSize);
+ WINBASEAPI SIZE_T WINAPI GetLargePageMinimum(VOID);
+ WINBASEAPI UINT WINAPI EnumSystemFirmwareTables(DWORD FirmwareTableProviderSignature,PVOID pFirmwareTableEnumBuffer,DWORD BufferSize);
+ WINBASEAPI UINT WINAPI GetSystemFirmwareTable(DWORD FirmwareTableProviderSignature,DWORD FirmwareTableID,PVOID pFirmwareTableBuffer,DWORD BufferSize);
+ WINBASEAPI WINBOOL WINAPI VirtualFreeEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD dwFreeType);
+ WINBASEAPI WINBOOL WINAPI VirtualProtectEx(HANDLE hProcess,LPVOID lpAddress,SIZE_T dwSize,DWORD flNewProtect,PDWORD lpflOldProtect);
+ WINBASEAPI SIZE_T WINAPI VirtualQueryEx(HANDLE hProcess,LPCVOID lpAddress,PMEMORY_BASIC_INFORMATION lpBuffer,SIZE_T dwLength);
+ WINBASEAPI HANDLE WINAPI HeapCreate(DWORD flOptions,SIZE_T dwInitialSize,SIZE_T dwMaximumSize);
+ WINBASEAPI WINBOOL WINAPI HeapDestroy(HANDLE hHeap);
+ WINBASEAPI LPVOID WINAPI HeapAlloc(HANDLE hHeap,DWORD dwFlags,SIZE_T dwBytes);
+ WINBASEAPI LPVOID WINAPI HeapReAlloc(HANDLE hHeap,DWORD dwFlags,LPVOID lpMem,SIZE_T dwBytes);
+ WINBASEAPI WINBOOL WINAPI HeapFree(HANDLE hHeap,DWORD dwFlags,LPVOID lpMem);
+ WINBASEAPI SIZE_T WINAPI HeapSize(HANDLE hHeap,DWORD dwFlags,LPCVOID lpMem);
+ WINBASEAPI WINBOOL WINAPI HeapValidate(HANDLE hHeap,DWORD dwFlags,LPCVOID lpMem);
+ WINBASEAPI SIZE_T WINAPI HeapCompact(HANDLE hHeap,DWORD dwFlags);
+ WINBASEAPI HANDLE WINAPI GetProcessHeap(VOID);
+ WINBASEAPI DWORD WINAPI GetProcessHeaps(DWORD NumberOfHeaps,PHANDLE ProcessHeaps);
+
+ typedef struct _PROCESS_HEAP_ENTRY {
+ PVOID lpData;
+ DWORD cbData;
+ BYTE cbOverhead;
+ BYTE iRegionIndex;
+ WORD wFlags;
+ union {
+ struct {
+ HANDLE hMem;
+ DWORD dwReserved[3];
+ } Block;
+ struct {
+ DWORD dwCommittedSize;
+ DWORD dwUnCommittedSize;
+ LPVOID lpFirstBlock;
+ LPVOID lpLastBlock;
+ } Region;
+ };
+ } PROCESS_HEAP_ENTRY,*LPPROCESS_HEAP_ENTRY,*PPROCESS_HEAP_ENTRY;
+
+#define PROCESS_HEAP_REGION 0x1
+#define PROCESS_HEAP_UNCOMMITTED_RANGE 0x2
+#define PROCESS_HEAP_ENTRY_BUSY 0x4
+#define PROCESS_HEAP_ENTRY_MOVEABLE 0x10
+#define PROCESS_HEAP_ENTRY_DDESHARE 0x20
+
+ WINBASEAPI WINBOOL WINAPI HeapLock(HANDLE hHeap);
+ WINBASEAPI WINBOOL WINAPI HeapUnlock(HANDLE hHeap);
+ WINBASEAPI WINBOOL WINAPI HeapWalk(HANDLE hHeap,LPPROCESS_HEAP_ENTRY lpEntry);
+ WINBASEAPI WINBOOL WINAPI HeapSetInformation(HANDLE HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength);
+ WINBASEAPI WINBOOL WINAPI HeapQueryInformation(HANDLE HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength,PSIZE_T ReturnLength);
+
+#define SCS_32BIT_BINARY 0
+#define SCS_DOS_BINARY 1
+#define SCS_WOW_BINARY 2
+#define SCS_PIF_BINARY 3
+#define SCS_POSIX_BINARY 4
+#define SCS_OS216_BINARY 5
+#define SCS_64BIT_BINARY 6
+
+#ifdef UNICODE
+#define GetBinaryType GetBinaryTypeW
+#define GetShortPathName GetShortPathNameW
+#define GetLongPathName GetLongPathNameW
+#define GetEnvironmentStrings GetEnvironmentStringsW
+#define SetEnvironmentStrings SetEnvironmentStringsW
+#define FreeEnvironmentStrings FreeEnvironmentStringsW
+#else
+#define GetBinaryType GetBinaryTypeA
+#define GetShortPathName GetShortPathNameA
+#define GetLongPathName GetLongPathNameA
+#define GetEnvironmentStringsA GetEnvironmentStrings
+#define SetEnvironmentStrings SetEnvironmentStringsA
+#define FreeEnvironmentStrings FreeEnvironmentStringsA
+#endif
+
+#ifdef _WIN64
+#define SCS_THIS_PLATFORM_BINARY SCS_64BIT_BINARY
+#else
+#define SCS_THIS_PLATFORM_BINARY SCS_32BIT_BINARY
+#endif
+
+ WINBASEAPI WINBOOL WINAPI GetBinaryTypeA(LPCSTR lpApplicationName,LPDWORD lpBinaryType);
+ WINBASEAPI WINBOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName,LPDWORD lpBinaryType);
+ WINBASEAPI DWORD WINAPI GetShortPathNameA(LPCSTR lpszLongPath,LPSTR lpszShortPath,DWORD cchBuffer);
+ WINBASEAPI DWORD WINAPI GetShortPathNameW(LPCWSTR lpszLongPath,LPWSTR lpszShortPath,DWORD cchBuffer);
+ WINBASEAPI DWORD WINAPI GetLongPathNameA(LPCSTR lpszShortPath,LPSTR lpszLongPath,DWORD cchBuffer);
+ WINBASEAPI DWORD WINAPI GetLongPathNameW(LPCWSTR lpszShortPath,LPWSTR lpszLongPath,DWORD cchBuffer);
+ WINBASEAPI WINBOOL WINAPI GetProcessAffinityMask(HANDLE hProcess,PDWORD_PTR lpProcessAffinityMask,PDWORD_PTR lpSystemAffinityMask);
+ WINBASEAPI WINBOOL WINAPI SetProcessAffinityMask(HANDLE hProcess,DWORD_PTR dwProcessAffinityMask);
+ WINBASEAPI WINBOOL WINAPI GetProcessHandleCount(HANDLE hProcess,PDWORD pdwHandleCount);
+ WINBASEAPI WINBOOL WINAPI GetProcessTimes(HANDLE hProcess,LPFILETIME lpCreationTime,LPFILETIME lpExitTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime);
+ WINBASEAPI WINBOOL WINAPI GetProcessIoCounters(HANDLE hProcess,PIO_COUNTERS lpIoCounters);
+ WINBASEAPI WINBOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess,PSIZE_T lpMinimumWorkingSetSize,PSIZE_T lpMaximumWorkingSetSize);
+ WINBASEAPI WINBOOL WINAPI GetProcessWorkingSetSizeEx(HANDLE hProcess,PSIZE_T lpMinimumWorkingSetSize,PSIZE_T lpMaximumWorkingSetSize,PDWORD Flags);
+ WINBASEAPI WINBOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,SIZE_T dwMinimumWorkingSetSize,SIZE_T dwMaximumWorkingSetSize);
+ WINBASEAPI WINBOOL WINAPI SetProcessWorkingSetSizeEx(HANDLE hProcess,SIZE_T dwMinimumWorkingSetSize,SIZE_T dwMaximumWorkingSetSize,DWORD Flags);
+ WINBASEAPI HANDLE WINAPI OpenProcess(DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwProcessId);
+ WINBASEAPI HANDLE WINAPI GetCurrentProcess(VOID);
+ WINBASEAPI DWORD WINAPI GetCurrentProcessId(VOID);
+ WINBASEAPI DECLSPEC_NORETURN VOID WINAPI ExitProcess(UINT uExitCode);
+ WINBASEAPI WINBOOL WINAPI TerminateProcess(HANDLE hProcess,UINT uExitCode);
+ WINBASEAPI WINBOOL WINAPI GetExitCodeProcess(HANDLE hProcess,LPDWORD lpExitCode);
+ WINBASEAPI VOID WINAPI FatalExit(int ExitCode);
+ /* WINBASEAPI LPCH WINAPI GetEnvironmentStrings(VOID); */
+ WINBASEAPI LPWCH WINAPI GetEnvironmentStringsW(VOID);
+ WINBASEAPI WINBOOL WINAPI SetEnvironmentStringsA(LPCH NewEnvironment);
+ WINBASEAPI WINBOOL WINAPI SetEnvironmentStringsW(LPWCH NewEnvironment);
+ WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsA(LPCH);
+ WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsW(LPWCH);
+ WINBASEAPI VOID WINAPI RaiseException(DWORD dwExceptionCode,DWORD dwExceptionFlags,DWORD nNumberOfArguments,CONST ULONG_PTR *lpArguments);
+ WINBASEAPI LONG WINAPI UnhandledExceptionFilter(struct _EXCEPTION_POINTERS *ExceptionInfo);
+
+ typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)(struct _EXCEPTION_POINTERS *ExceptionInfo);
+ typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
+
+ WINBASEAPI LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
+
+#define FIBER_FLAG_FLOAT_SWITCH 0x1
+
+ WINBASEAPI LPVOID WINAPI CreateFiber(SIZE_T dwStackSize,LPFIBER_START_ROUTINE lpStartAddress,LPVOID lpParameter);
+ WINBASEAPI LPVOID WINAPI CreateFiberEx(SIZE_T dwStackCommitSize,SIZE_T dwStackReserveSize,DWORD dwFlags,LPFIBER_START_ROUTINE lpStartAddress,LPVOID lpParameter);
+ WINBASEAPI VOID WINAPI DeleteFiber(LPVOID lpFiber);
+ WINBASEAPI LPVOID WINAPI ConvertThreadToFiber(LPVOID lpParameter);
+ WINBASEAPI LPVOID WINAPI ConvertThreadToFiberEx(LPVOID lpParameter,DWORD dwFlags);
+ WINBASEAPI WINBOOL WINAPI ConvertFiberToThread(VOID);
+ WINBASEAPI VOID WINAPI SwitchToFiber(LPVOID lpFiber);
+ WINBASEAPI WINBOOL WINAPI SwitchToThread(VOID);
+ WINBASEAPI HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes,SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress,LPVOID lpParameter,DWORD dwCreationFlags,LPDWORD lpThreadId);
+ WINBASEAPI HANDLE WINAPI CreateRemoteThread(HANDLE hProcess,LPSECURITY_ATTRIBUTES lpThreadAttributes,SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress,LPVOID lpParameter,DWORD dwCreationFlags,LPDWORD lpThreadId);
+ WINBASEAPI HANDLE WINAPI GetCurrentThread(VOID);
+ WINBASEAPI DWORD WINAPI GetCurrentThreadId(VOID);
+ WINBASEAPI WINBOOL WINAPI SetThreadStackGuarantee (PULONG StackSizeInBytes);
+ WINBASEAPI DWORD WINAPI GetProcessIdOfThread(HANDLE Thread);
+ WINBASEAPI DWORD WINAPI GetThreadId(HANDLE Thread);
+ WINBASEAPI DWORD WINAPI GetProcessId(HANDLE Process);
+ WINBASEAPI DWORD WINAPI GetCurrentProcessorNumber(VOID);
+ WINBASEAPI DWORD_PTR WINAPI SetThreadAffinityMask(HANDLE hThread,DWORD_PTR dwThreadAffinityMask);
+ WINBASEAPI DWORD WINAPI SetThreadIdealProcessor(HANDLE hThread,DWORD dwIdealProcessor);
+ WINBASEAPI WINBOOL WINAPI SetProcessPriorityBoost(HANDLE hProcess,WINBOOL bDisablePriorityBoost);
+ WINBASEAPI WINBOOL WINAPI GetProcessPriorityBoost(HANDLE hProcess,PBOOL pDisablePriorityBoost);
+ WINBASEAPI WINBOOL WINAPI RequestWakeupLatency(LATENCY_TIME latency);
+ WINBASEAPI WINBOOL WINAPI IsSystemResumeAutomatic(VOID);
+ WINBASEAPI HANDLE WINAPI OpenThread(DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwThreadId);
+ WINBASEAPI WINBOOL WINAPI SetThreadPriority(HANDLE hThread,int nPriority);
+ WINBASEAPI WINBOOL WINAPI SetThreadPriorityBoost(HANDLE hThread,WINBOOL bDisablePriorityBoost);
+ WINBASEAPI WINBOOL WINAPI GetThreadPriorityBoost(HANDLE hThread,PBOOL pDisablePriorityBoost);
+ WINBASEAPI int WINAPI GetThreadPriority(HANDLE hThread);
+ WINBASEAPI WINBOOL WINAPI GetThreadTimes(HANDLE hThread,LPFILETIME lpCreationTime,LPFILETIME lpExitTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime);
+ WINBASEAPI WINBOOL WINAPI GetThreadIOPendingFlag(HANDLE hThread,PBOOL lpIOIsPending);
+ WINBASEAPI DECLSPEC_NORETURN VOID WINAPI ExitThread(DWORD dwExitCode);
+ WINBASEAPI WINBOOL WINAPI TerminateThread(HANDLE hThread,DWORD dwExitCode);
+ WINBASEAPI WINBOOL WINAPI GetExitCodeThread(HANDLE hThread,LPDWORD lpExitCode);
+ WINBASEAPI WINBOOL WINAPI GetThreadSelectorEntry(HANDLE hThread,DWORD dwSelector,LPLDT_ENTRY lpSelectorEntry);
+ WINBASEAPI EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE esFlags);
+ WINBASEAPI DWORD WINAPI GetLastError(VOID);
+ WINBASEAPI VOID WINAPI SetLastError(DWORD dwErrCode);
+
+#ifndef RC_INVOKED
+#ifdef WINBASE_DECLARE_RESTORE_LAST_ERROR
+ WINBASEAPI VOID WINAPI RestoreLastError(DWORD dwErrCode);
+
+ typedef VOID (WINAPI *PRESTORE_LAST_ERROR)(DWORD);
+
+#define RESTORE_LAST_ERROR_NAME_A "RestoreLastError"
+#define RESTORE_LAST_ERROR_NAME_W L"RestoreLastError"
+#define RESTORE_LAST_ERROR_NAME TEXT("RestoreLastError")
+#endif
+#endif
+
+#define HasOverlappedIoCompleted(lpOverlapped) (((DWORD)(lpOverlapped)->Internal)!=STATUS_PENDING)
+
+ WINBASEAPI WINBOOL WINAPI GetOverlappedResult(HANDLE hFile,LPOVERLAPPED lpOverlapped,LPDWORD lpNumberOfBytesTransferred,WINBOOL bWait);
+ WINBASEAPI HANDLE WINAPI CreateIoCompletionPort(HANDLE FileHandle,HANDLE ExistingCompletionPort,ULONG_PTR CompletionKey,DWORD NumberOfConcurrentThreads);
+ WINBASEAPI WINBOOL WINAPI GetQueuedCompletionStatus(HANDLE CompletionPort,LPDWORD lpNumberOfBytesTransferred,PULONG_PTR lpCompletionKey,LPOVERLAPPED *lpOverlapped,DWORD dwMilliseconds);
+ WINBASEAPI WINBOOL WINAPI PostQueuedCompletionStatus(HANDLE CompletionPort,DWORD dwNumberOfBytesTransferred,ULONG_PTR dwCompletionKey,LPOVERLAPPED lpOverlapped);
+
+#define SEM_FAILCRITICALERRORS 0x1
+#define SEM_NOGPFAULTERRORBOX 0x2
+#define SEM_NOALIGNMENTFAULTEXCEPT 0x4
+#define SEM_NOOPENFILEERRORBOX 0x8000
+
+ WINBASEAPI UINT WINAPI SetErrorMode(UINT uMode);
+ WINBASEAPI WINBOOL WINAPI ReadProcessMemory(HANDLE hProcess,LPCVOID lpBaseAddress,LPVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesRead);
+ WINBASEAPI WINBOOL WINAPI WriteProcessMemory(HANDLE hProcess,LPVOID lpBaseAddress,LPCVOID lpBuffer,SIZE_T nSize,SIZE_T *lpNumberOfBytesWritten);
+ WINBASEAPI WINBOOL WINAPI GetThreadContext(HANDLE hThread,LPCONTEXT lpContext);
+ WINBASEAPI WINBOOL WINAPI SetThreadContext(HANDLE hThread,CONST CONTEXT *lpContext);
+ WINBASEAPI DWORD WINAPI SuspendThread(HANDLE hThread);
+ WINBASEAPI DWORD WINAPI ResumeThread(HANDLE hThread);
+
+ typedef VOID (WINAPI *PAPCFUNC)(ULONG_PTR dwParam);
+
+ WINBASEAPI DWORD WINAPI QueueUserAPC(PAPCFUNC pfnAPC,HANDLE hThread,ULONG_PTR dwData);
+ WINBASEAPI WINBOOL WINAPI IsDebuggerPresent(VOID);
+ WINBASEAPI WINBOOL WINAPI CheckRemoteDebuggerPresent(HANDLE hProcess,PBOOL pbDebuggerPresent);
+ WINBASEAPI VOID WINAPI DebugBreak(VOID);
+ WINBASEAPI WINBOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT lpDebugEvent,DWORD dwMilliseconds);
+ WINBASEAPI WINBOOL WINAPI ContinueDebugEvent(DWORD dwProcessId,DWORD dwThreadId,DWORD dwContinueStatus);
+ WINBASEAPI WINBOOL WINAPI DebugActiveProcess(DWORD dwProcessId);
+ WINBASEAPI WINBOOL WINAPI DebugActiveProcessStop(DWORD dwProcessId);
+ WINBASEAPI WINBOOL WINAPI DebugSetProcessKillOnExit(WINBOOL KillOnExit);
+ WINBASEAPI WINBOOL WINAPI DebugBreakProcess(HANDLE Process);
+ WINBASEAPI VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
+ WINBASEAPI VOID WINAPI EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
+ WINBASEAPI VOID WINAPI LeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
+ WINBASEAPI WINBOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION lpCriticalSection,DWORD dwSpinCount);
+ WINBASEAPI DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION lpCriticalSection,DWORD dwSpinCount);
+ WINBASEAPI WINBOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
+ WINBASEAPI VOID WINAPI DeleteCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
+ WINBASEAPI WINBOOL WINAPI SetEvent(HANDLE hEvent);
+ WINBASEAPI WINBOOL WINAPI ResetEvent(HANDLE hEvent);
+ WINBASEAPI WINBOOL WINAPI PulseEvent(HANDLE hEvent);
+ WINBASEAPI WINBOOL WINAPI ReleaseSemaphore(HANDLE hSemaphore,LONG lReleaseCount,LPLONG lpPreviousCount);
+ WINBASEAPI WINBOOL WINAPI ReleaseMutex(HANDLE hMutex);
+ WINBASEAPI DWORD WINAPI WaitForSingleObject(HANDLE hHandle,DWORD dwMilliseconds);
+ WINBASEAPI DWORD WINAPI WaitForMultipleObjects(DWORD nCount,CONST HANDLE *lpHandles,WINBOOL bWaitAll,DWORD dwMilliseconds);
+ WINBASEAPI VOID WINAPI Sleep(DWORD dwMilliseconds);
+ WINBASEAPI HGLOBAL WINAPI LoadResource(HMODULE hModule,HRSRC hResInfo);
+ WINBASEAPI DWORD WINAPI SizeofResource(HMODULE hModule,HRSRC hResInfo);
+ WINBASEAPI ATOM WINAPI GlobalDeleteAtom(ATOM nAtom);
+ WINBASEAPI WINBOOL WINAPI InitAtomTable(DWORD nSize);
+ WINBASEAPI ATOM WINAPI DeleteAtom(ATOM nAtom);
+ WINBASEAPI UINT WINAPI SetHandleCount(UINT uNumber);
+ WINBASEAPI DWORD WINAPI GetLogicalDrives(VOID);
+ WINBASEAPI WINBOOL WINAPI LockFile(HANDLE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh);
+ WINBASEAPI WINBOOL WINAPI UnlockFile(HANDLE hFile,DWORD dwFileOffsetLow,DWORD dwFileOffsetHigh,DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh);
+ WINBASEAPI WINBOOL WINAPI LockFileEx(HANDLE hFile,DWORD dwFlags,DWORD dwReserved,DWORD nNumberOfBytesToLockLow,DWORD nNumberOfBytesToLockHigh,LPOVERLAPPED lpOverlapped);
+
+#define LOCKFILE_FAIL_IMMEDIATELY 0x1
+#define LOCKFILE_EXCLUSIVE_LOCK 0x2
+
+ WINBASEAPI WINBOOL WINAPI UnlockFileEx(HANDLE hFile,DWORD dwReserved,DWORD nNumberOfBytesToUnlockLow,DWORD nNumberOfBytesToUnlockHigh,LPOVERLAPPED lpOverlapped);
+
+ typedef struct _BY_HANDLE_FILE_INFORMATION {
+ DWORD dwFileAttributes;
+ FILETIME ftCreationTime;
+ FILETIME ftLastAccessTime;
+ FILETIME ftLastWriteTime;
+ DWORD dwVolumeSerialNumber;
+ DWORD nFileSizeHigh;
+ DWORD nFileSizeLow;
+ DWORD nNumberOfLinks;
+ DWORD nFileIndexHigh;
+ DWORD nFileIndexLow;
+ } BY_HANDLE_FILE_INFORMATION,*PBY_HANDLE_FILE_INFORMATION,*LPBY_HANDLE_FILE_INFORMATION;
+
+#ifdef UNICODE
+#define SetFileShortName SetFileShortNameW
+#else
+#define SetFileShortName SetFileShortNameA
+#endif
+
+ WINBASEAPI WINBOOL WINAPI GetFileInformationByHandle(HANDLE hFile,LPBY_HANDLE_FILE_INFORMATION lpFileInformation);
+ WINBASEAPI DWORD WINAPI GetFileType(HANDLE hFile);
+ WINBASEAPI DWORD WINAPI GetFileSize(HANDLE hFile,LPDWORD lpFileSizeHigh);
+ WINBASEAPI WINBOOL WINAPI GetFileSizeEx(HANDLE hFile,PLARGE_INTEGER lpFileSize);
+ WINBASEAPI HANDLE WINAPI GetStdHandle(DWORD nStdHandle);
+ WINBASEAPI WINBOOL WINAPI SetStdHandle(DWORD nStdHandle,HANDLE hHandle);
+ WINBASEAPI WINBOOL WINAPI WriteFile(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,LPOVERLAPPED lpOverlapped);
+ WINBASEAPI WINBOOL WINAPI ReadFile(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,LPOVERLAPPED lpOverlapped);
+ WINBASEAPI WINBOOL WINAPI FlushFileBuffers(HANDLE hFile);
+ WINBASEAPI WINBOOL WINAPI DeviceIoControl(HANDLE hDevice,DWORD dwIoControlCode,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesReturned,LPOVERLAPPED lpOverlapped);
+ WINBASEAPI WINBOOL WINAPI RequestDeviceWakeup(HANDLE hDevice);
+ WINBASEAPI WINBOOL WINAPI CancelDeviceWakeupRequest(HANDLE hDevice);
+ WINBASEAPI WINBOOL WINAPI GetDevicePowerState(HANDLE hDevice,WINBOOL *pfOn);
+ WINBASEAPI WINBOOL WINAPI SetMessageWaitingIndicator(HANDLE hMsgIndicator,ULONG ulMsgCount);
+ WINBASEAPI WINBOOL WINAPI SetEndOfFile(HANDLE hFile);
+ WINBASEAPI DWORD WINAPI SetFilePointer(HANDLE hFile,LONG lDistanceToMove,PLONG lpDistanceToMoveHigh,DWORD dwMoveMethod);
+ WINBASEAPI WINBOOL WINAPI SetFilePointerEx(HANDLE hFile,LARGE_INTEGER liDistanceToMove,PLARGE_INTEGER lpNewFilePointer,DWORD dwMoveMethod);
+ WINBASEAPI WINBOOL WINAPI FindClose(HANDLE hFindFile);
+ WINBASEAPI WINBOOL WINAPI GetFileTime(HANDLE hFile,LPFILETIME lpCreationTime,LPFILETIME lpLastAccessTime,LPFILETIME lpLastWriteTime);
+ WINBASEAPI WINBOOL WINAPI SetFileTime(HANDLE hFile,CONST FILETIME *lpCreationTime,CONST FILETIME *lpLastAccessTime,CONST FILETIME *lpLastWriteTime);
+ WINBASEAPI WINBOOL WINAPI SetFileValidData(HANDLE hFile,LONGLONG ValidDataLength);
+ WINBASEAPI WINBOOL WINAPI SetFileShortNameA(HANDLE hFile,LPCSTR lpShortName);
+ WINBASEAPI WINBOOL WINAPI SetFileShortNameW(HANDLE hFile,LPCWSTR lpShortName);
+ WINBASEAPI WINBOOL WINAPI CloseHandle(HANDLE hObject);
+ WINBASEAPI WINBOOL WINAPI DuplicateHandle(HANDLE hSourceProcessHandle,HANDLE hSourceHandle,HANDLE hTargetProcessHandle,LPHANDLE lpTargetHandle,DWORD dwDesiredAccess,WINBOOL bInheritHandle,DWORD dwOptions);
+ WINBASEAPI WINBOOL WINAPI GetHandleInformation(HANDLE hObject,LPDWORD lpdwFlags);
+ WINBASEAPI WINBOOL WINAPI SetHandleInformation(HANDLE hObject,DWORD dwMask,DWORD dwFlags);
+
+#define HANDLE_FLAG_INHERIT 0x1
+#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x2
+
+#define HINSTANCE_ERROR 32
+
+ WINBASEAPI DWORD WINAPI LoadModule(LPCSTR lpModuleName,LPVOID lpParameterBlock);
+ WINBASEAPI UINT WINAPI WinExec(LPCSTR lpCmdLine,UINT uCmdShow);
+ WINBASEAPI WINBOOL WINAPI ClearCommBreak(HANDLE hFile);
+ WINBASEAPI WINBOOL WINAPI ClearCommError(HANDLE hFile,LPDWORD lpErrors,LPCOMSTAT lpStat);
+ WINBASEAPI WINBOOL WINAPI SetupComm(HANDLE hFile,DWORD dwInQueue,DWORD dwOutQueue);
+ WINBASEAPI WINBOOL WINAPI EscapeCommFunction(HANDLE hFile,DWORD dwFunc);
+ WINBASEAPI WINBOOL WINAPI GetCommConfig(HANDLE hCommDev,LPCOMMCONFIG lpCC,LPDWORD lpdwSize);
+ WINBASEAPI WINBOOL WINAPI GetCommMask(HANDLE hFile,LPDWORD lpEvtMask);
+ WINBASEAPI WINBOOL WINAPI GetCommProperties(HANDLE hFile,LPCOMMPROP lpCommProp);
+ WINBASEAPI WINBOOL WINAPI GetCommModemStatus(HANDLE hFile,LPDWORD lpModemStat);
+ WINBASEAPI WINBOOL WINAPI GetCommState(HANDLE hFile,LPDCB lpDCB);
+ WINBASEAPI WINBOOL WINAPI GetCommTimeouts(HANDLE hFile,LPCOMMTIMEOUTS lpCommTimeouts);
+ WINBASEAPI WINBOOL WINAPI PurgeComm(HANDLE hFile,DWORD dwFlags);
+ WINBASEAPI WINBOOL WINAPI SetCommBreak(HANDLE hFile);
+ WINBASEAPI WINBOOL WINAPI SetCommConfig(HANDLE hCommDev,LPCOMMCONFIG lpCC,DWORD dwSize);
+ WINBASEAPI WINBOOL WINAPI SetCommMask(HANDLE hFile,DWORD dwEvtMask);
+ WINBASEAPI WINBOOL WINAPI SetCommState(HANDLE hFile,LPDCB lpDCB);
+ WINBASEAPI WINBOOL WINAPI SetCommTimeouts(HANDLE hFile,LPCOMMTIMEOUTS lpCommTimeouts);
+ WINBASEAPI WINBOOL WINAPI TransmitCommChar(HANDLE hFile,char cChar);
+ WINBASEAPI WINBOOL WINAPI WaitCommEvent(HANDLE hFile,LPDWORD lpEvtMask,LPOVERLAPPED lpOverlapped);
+ WINBASEAPI DWORD WINAPI SetTapePosition(HANDLE hDevice,DWORD dwPositionMethod,DWORD dwPartition,DWORD dwOffsetLow,DWORD dwOffsetHigh,WINBOOL bImmediate);
+ WINBASEAPI DWORD WINAPI GetTapePosition(HANDLE hDevice,DWORD dwPositionType,LPDWORD lpdwPartition,LPDWORD lpdwOffsetLow,LPDWORD lpdwOffsetHigh);
+ WINBASEAPI DWORD WINAPI PrepareTape(HANDLE hDevice,DWORD dwOperation,WINBOOL bImmediate);
+ WINBASEAPI DWORD WINAPI EraseTape(HANDLE hDevice,DWORD dwEraseType,WINBOOL bImmediate);
+ WINBASEAPI DWORD WINAPI CreateTapePartition(HANDLE hDevice,DWORD dwPartitionMethod,DWORD dwCount,DWORD dwSize);
+ WINBASEAPI DWORD WINAPI WriteTapemark(HANDLE hDevice,DWORD dwTapemarkType,DWORD dwTapemarkCount,WINBOOL bImmediate);
+ WINBASEAPI DWORD WINAPI GetTapeStatus(HANDLE hDevice);
+ WINBASEAPI DWORD WINAPI GetTapeParameters(HANDLE hDevice,DWORD dwOperation,LPDWORD lpdwSize,LPVOID lpTapeInformation);
+
+#define GET_TAPE_MEDIA_INFORMATION 0
+#define GET_TAPE_DRIVE_INFORMATION 1
+
+ WINBASEAPI DWORD WINAPI SetTapeParameters(HANDLE hDevice,DWORD dwOperation,LPVOID lpTapeInformation);
+
+#define SET_TAPE_MEDIA_INFORMATION 0
+#define SET_TAPE_DRIVE_INFORMATION 1
+
+ WINBASEAPI WINBOOL WINAPI Beep(DWORD dwFreq,DWORD dwDuration);
+ WINBASEAPI int WINAPI MulDiv(int nNumber,int nNumerator,int nDenominator);
+ WINBASEAPI VOID WINAPI GetSystemTime(LPSYSTEMTIME lpSystemTime);
+ WINBASEAPI VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime);
+ WINBASEAPI WINBOOL WINAPI SetSystemTime(CONST SYSTEMTIME *lpSystemTime);
+ WINBASEAPI VOID WINAPI GetLocalTime(LPSYSTEMTIME lpSystemTime);
+ WINBASEAPI WINBOOL WINAPI SetLocalTime(CONST SYSTEMTIME *lpSystemTime);
+ WINBASEAPI VOID WINAPI GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
+ WINBASEAPI WINBOOL WINAPI SetSystemFileCacheSize(SIZE_T MinimumFileCacheSize,SIZE_T MaximumFileCacheSize,DWORD Flags);
+ WINBASEAPI WINBOOL WINAPI GetSystemFileCacheSize(PSIZE_T lpMinimumFileCacheSize,PSIZE_T lpMaximumFileCacheSize,PDWORD lpFlags);
+ WINBASEAPI WINBOOL WINAPI GetSystemRegistryQuota(PDWORD pdwQuotaAllowed,PDWORD pdwQuotaUsed);
+ WINBOOL WINAPI GetSystemTimes(LPFILETIME lpIdleTime,LPFILETIME lpKernelTime,LPFILETIME lpUserTime);
+ WINBASEAPI VOID WINAPI GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo);
+ WINBASEAPI WINBOOL WINAPI IsProcessorFeaturePresent(DWORD ProcessorFeature);
+
+ typedef struct _TIME_ZONE_INFORMATION {
+ LONG Bias;
+ WCHAR StandardName[32];
+ SYSTEMTIME StandardDate;
+ LONG StandardBias;
+ WCHAR DaylightName[32];
+ SYSTEMTIME DaylightDate;
+ LONG DaylightBias;
+ } TIME_ZONE_INFORMATION,*PTIME_ZONE_INFORMATION,*LPTIME_ZONE_INFORMATION;
+
+#ifdef UNICODE
+#define FormatMessage FormatMessageW
+#else
+#define FormatMessage FormatMessageA
+#endif
+
+ WINBASEAPI WINBOOL WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION lpTimeZoneInformation,LPSYSTEMTIME lpUniversalTime,LPSYSTEMTIME lpLocalTime);
+ WINBASEAPI WINBOOL WINAPI TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION lpTimeZoneInformation,LPSYSTEMTIME lpLocalTime,LPSYSTEMTIME lpUniversalTime);
+ WINBASEAPI DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation);
+ WINBASEAPI WINBOOL WINAPI SetTimeZoneInformation(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation);
+ WINBASEAPI WINBOOL WINAPI SystemTimeToFileTime(CONST SYSTEMTIME *lpSystemTime,LPFILETIME lpFileTime);
+ WINBASEAPI WINBOOL WINAPI FileTimeToLocalFileTime(CONST FILETIME *lpFileTime,LPFILETIME lpLocalFileTime);
+ WINBASEAPI WINBOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *lpLocalFileTime,LPFILETIME lpFileTime);
+ WINBASEAPI WINBOOL WINAPI FileTimeToSystemTime(CONST FILETIME *lpFileTime,LPSYSTEMTIME lpSystemTime);
+ WINBASEAPI LONG WINAPI CompareFileTime(CONST FILETIME *lpFileTime1,CONST FILETIME *lpFileTime2);
+ WINBASEAPI WINBOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *lpFileTime,LPWORD lpFatDate,LPWORD lpFatTime);
+ WINBASEAPI WINBOOL WINAPI DosDateTimeToFileTime(WORD wFatDate,WORD wFatTime,LPFILETIME lpFileTime);
+ WINBASEAPI DWORD WINAPI GetTickCount(VOID);
+ WINBASEAPI WINBOOL WINAPI SetSystemTimeAdjustment(DWORD dwTimeAdjustment,WINBOOL bTimeAdjustmentDisabled);
+ WINBASEAPI WINBOOL WINAPI GetSystemTimeAdjustment(PDWORD lpTimeAdjustment,PDWORD lpTimeIncrement,PBOOL lpTimeAdjustmentDisabled);
+ WINBASEAPI DWORD WINAPI FormatMessageA(DWORD dwFlags,LPCVOID lpSource,DWORD dwMessageId,DWORD dwLanguageId,LPSTR lpBuffer,DWORD nSize,va_list *Arguments);
+ WINBASEAPI DWORD WINAPI FormatMessageW(DWORD dwFlags,LPCVOID lpSource,DWORD dwMessageId,DWORD dwLanguageId,LPWSTR lpBuffer,DWORD nSize,va_list *Arguments);
+
+#define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x100
+#define FORMAT_MESSAGE_IGNORE_INSERTS 0x200
+#define FORMAT_MESSAGE_FROM_STRING 0x400
+#define FORMAT_MESSAGE_FROM_HMODULE 0x800
+#define FORMAT_MESSAGE_FROM_SYSTEM 0x1000
+#define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x2000
+#define FORMAT_MESSAGE_MAX_WIDTH_MASK 0xff
+
+#ifdef UNICODE
+#define CreateMailslot CreateMailslotW
+#define EncryptFile EncryptFileW
+#define DecryptFile DecryptFileW
+#define FileEncryptionStatus FileEncryptionStatusW
+#else
+#define CreateMailslot CreateMailslotA
+#define EncryptFile EncryptFileA
+#define DecryptFile DecryptFileA
+#define FileEncryptionStatus FileEncryptionStatusA
+#endif
+
+ WINBASEAPI WINBOOL WINAPI CreatePipe(PHANDLE hReadPipe,PHANDLE hWritePipe,LPSECURITY_ATTRIBUTES lpPipeAttributes,DWORD nSize);
+ WINBASEAPI WINBOOL WINAPI ConnectNamedPipe(HANDLE hNamedPipe,LPOVERLAPPED lpOverlapped);
+ WINBASEAPI WINBOOL WINAPI DisconnectNamedPipe(HANDLE hNamedPipe);
+ WINBASEAPI WINBOOL WINAPI SetNamedPipeHandleState(HANDLE hNamedPipe,LPDWORD lpMode,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout);
+ WINBASEAPI WINBOOL WINAPI GetNamedPipeInfo(HANDLE hNamedPipe,LPDWORD lpFlags,LPDWORD lpOutBufferSize,LPDWORD lpInBufferSize,LPDWORD lpMaxInstances);
+ WINBASEAPI WINBOOL WINAPI PeekNamedPipe(HANDLE hNamedPipe,LPVOID lpBuffer,DWORD nBufferSize,LPDWORD lpBytesRead,LPDWORD lpTotalBytesAvail,LPDWORD lpBytesLeftThisMessage);
+ WINBASEAPI WINBOOL WINAPI TransactNamedPipe(HANDLE hNamedPipe,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,LPOVERLAPPED lpOverlapped);
+ WINBASEAPI HANDLE WINAPI CreateMailslotA(LPCSTR lpName,DWORD nMaxMessageSize,DWORD lReadTimeout,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINBASEAPI HANDLE WINAPI CreateMailslotW(LPCWSTR lpName,DWORD nMaxMessageSize,DWORD lReadTimeout,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINBASEAPI WINBOOL WINAPI GetMailslotInfo(HANDLE hMailslot,LPDWORD lpMaxMessageSize,LPDWORD lpNextSize,LPDWORD lpMessageCount,LPDWORD lpReadTimeout);
+ WINBASEAPI WINBOOL WINAPI SetMailslotInfo(HANDLE hMailslot,DWORD lReadTimeout);
+ WINBASEAPI LPVOID WINAPI MapViewOfFile(HANDLE hFileMappingObject,DWORD dwDesiredAccess,DWORD dwFileOffsetHigh,DWORD dwFileOffsetLow,SIZE_T dwNumberOfBytesToMap);
+ WINBASEAPI WINBOOL WINAPI FlushViewOfFile(LPCVOID lpBaseAddress,SIZE_T dwNumberOfBytesToFlush);
+ WINBASEAPI WINBOOL WINAPI UnmapViewOfFile(LPCVOID lpBaseAddress);
+ WINADVAPI WINBOOL WINAPI EncryptFileA(LPCSTR lpFileName);
+ WINADVAPI WINBOOL WINAPI EncryptFileW(LPCWSTR lpFileName);
+ WINADVAPI WINBOOL WINAPI DecryptFileA(LPCSTR lpFileName,DWORD dwReserved);
+ WINADVAPI WINBOOL WINAPI DecryptFileW(LPCWSTR lpFileName,DWORD dwReserved);
+
+#define FILE_ENCRYPTABLE 0
+#define FILE_IS_ENCRYPTED 1
+#define FILE_SYSTEM_ATTR 2
+#define FILE_ROOT_DIR 3
+#define FILE_SYSTEM_DIR 4
+#define FILE_UNKNOWN 5
+#define FILE_SYSTEM_NOT_SUPPORT 6
+#define FILE_USER_DISALLOWED 7
+#define FILE_READ_ONLY 8
+#define FILE_DIR_DISALLOWED 9
+
+ WINADVAPI WINBOOL WINAPI FileEncryptionStatusA(LPCSTR lpFileName,LPDWORD lpStatus);
+ WINADVAPI WINBOOL WINAPI FileEncryptionStatusW(LPCWSTR lpFileName,LPDWORD lpStatus);
+
+#define EFS_USE_RECOVERY_KEYS (0x1)
+
+ typedef DWORD (WINAPI *PFE_EXPORT_FUNC)(PBYTE pbData,PVOID pvCallbackContext,ULONG ulLength);
+ typedef DWORD (WINAPI *PFE_IMPORT_FUNC)(PBYTE pbData,PVOID pvCallbackContext,PULONG ulLength);
+
+#define CREATE_FOR_IMPORT (1)
+#define CREATE_FOR_DIR (2)
+#define OVERWRITE_HIDDEN (4)
+
+#ifdef UNICODE
+#define OpenEncryptedFileRaw OpenEncryptedFileRawW
+#define lstrcmp lstrcmpW
+#define lstrcmpi lstrcmpiW
+#define lstrcpyn lstrcpynW
+#define lstrcpy lstrcpyW
+#define lstrcat lstrcatW
+#define lstrlen lstrlenW
+#else
+#define OpenEncryptedFileRaw OpenEncryptedFileRawA
+#define lstrcmp lstrcmpA
+#define lstrcmpi lstrcmpiA
+#define lstrcpyn lstrcpynA
+#define lstrcpy lstrcpyA
+#define lstrcat lstrcatA
+#define lstrlen lstrlenA
+#endif
+
+ WINADVAPI DWORD WINAPI OpenEncryptedFileRawA(LPCSTR lpFileName,ULONG ulFlags,PVOID *pvContext);
+ WINADVAPI DWORD WINAPI OpenEncryptedFileRawW(LPCWSTR lpFileName,ULONG ulFlags,PVOID *pvContext);
+ WINADVAPI DWORD WINAPI ReadEncryptedFileRaw(PFE_EXPORT_FUNC pfExportCallback,PVOID pvCallbackContext,PVOID pvContext);
+ WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC pfImportCallback,PVOID pvCallbackContext,PVOID pvContext);
+ WINADVAPI VOID WINAPI CloseEncryptedFileRaw(PVOID pvContext);
+ WINBASEAPI int WINAPI lstrcmpA(LPCSTR lpString1,LPCSTR lpString2);
+ WINBASEAPI int WINAPI lstrcmpW(LPCWSTR lpString1,LPCWSTR lpString2);
+ WINBASEAPI int WINAPI lstrcmpiA(LPCSTR lpString1,LPCSTR lpString2);
+ WINBASEAPI int WINAPI lstrcmpiW(LPCWSTR lpString1,LPCWSTR lpString2);
+ WINBASEAPI LPSTR WINAPI lstrcpynA(LPSTR lpString1,LPCSTR lpString2,int iMaxLength);
+ WINBASEAPI LPWSTR WINAPI lstrcpynW(LPWSTR lpString1,LPCWSTR lpString2,int iMaxLength);
+ WINBASEAPI LPSTR WINAPI lstrcpyA(LPSTR lpString1,LPCSTR lpString2);
+ WINBASEAPI LPWSTR WINAPI lstrcpyW(LPWSTR lpString1,LPCWSTR lpString2);
+ WINBASEAPI LPSTR WINAPI lstrcatA(LPSTR lpString1,LPCSTR lpString2);
+ WINBASEAPI LPWSTR WINAPI lstrcatW(LPWSTR lpString1,LPCWSTR lpString2);
+ WINBASEAPI int WINAPI lstrlenA(LPCSTR lpString);
+ WINBASEAPI int WINAPI lstrlenW(LPCWSTR lpString);
+ WINBASEAPI HFILE WINAPI OpenFile(LPCSTR lpFileName,LPOFSTRUCT lpReOpenBuff,UINT uStyle);
+ WINBASEAPI HFILE WINAPI _lopen(LPCSTR lpPathName,int iReadWrite);
+ WINBASEAPI HFILE WINAPI _lcreat(LPCSTR lpPathName,int iAttribute);
+ WINBASEAPI UINT WINAPI _lread(HFILE hFile,LPVOID lpBuffer,UINT uBytes);
+ WINBASEAPI UINT WINAPI _lwrite(HFILE hFile,LPCCH lpBuffer,UINT uBytes);
+ WINBASEAPI long WINAPI _hread(HFILE hFile,LPVOID lpBuffer,long lBytes);
+ WINBASEAPI long WINAPI _hwrite(HFILE hFile,LPCCH lpBuffer,long lBytes);
+ WINBASEAPI HFILE WINAPI _lclose(HFILE hFile);
+ WINBASEAPI LONG WINAPI _llseek(HFILE hFile,LONG lOffset,int iOrigin);
+ WINADVAPI WINBOOL WINAPI IsTextUnicode(CONST VOID *lpv,int iSize,LPINT lpiResult);
+
+#define FLS_OUT_OF_INDEXES ((DWORD)0xffffffff)
+
+ WINBASEAPI DWORD WINAPI FlsAlloc(PFLS_CALLBACK_FUNCTION lpCallback);
+ WINBASEAPI PVOID WINAPI FlsGetValue(DWORD dwFlsIndex);
+ WINBASEAPI WINBOOL WINAPI FlsSetValue(DWORD dwFlsIndex,PVOID lpFlsData);
+ WINBASEAPI WINBOOL WINAPI FlsFree(DWORD dwFlsIndex);
+
+#define TLS_OUT_OF_INDEXES ((DWORD)0xffffffff)
+
+ WINBASEAPI DWORD WINAPI TlsAlloc(VOID);
+ WINBASEAPI LPVOID WINAPI TlsGetValue(DWORD dwTlsIndex);
+ WINBASEAPI WINBOOL WINAPI TlsSetValue(DWORD dwTlsIndex,LPVOID lpTlsValue);
+ WINBASEAPI WINBOOL WINAPI TlsFree(DWORD dwTlsIndex);
+
+ typedef VOID (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode,DWORD dwNumberOfBytesTransfered,LPOVERLAPPED lpOverlapped);
+
+ WINBASEAPI DWORD WINAPI SleepEx(DWORD dwMilliseconds,WINBOOL bAlertable);
+ WINBASEAPI DWORD WINAPI WaitForSingleObjectEx(HANDLE hHandle,DWORD dwMilliseconds,WINBOOL bAlertable);
+ WINBASEAPI DWORD WINAPI WaitForMultipleObjectsEx(DWORD nCount,CONST HANDLE *lpHandles,WINBOOL bWaitAll,DWORD dwMilliseconds,WINBOOL bAlertable);
+ WINBASEAPI DWORD WINAPI SignalObjectAndWait(HANDLE hObjectToSignal,HANDLE hObjectToWaitOn,DWORD dwMilliseconds,WINBOOL bAlertable);
+ WINBASEAPI WINBOOL WINAPI ReadFileEx(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
+ WINBASEAPI WINBOOL WINAPI WriteFileEx(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
+ WINBASEAPI WINBOOL WINAPI BackupRead(HANDLE hFile,LPBYTE lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,WINBOOL bAbort,WINBOOL bProcessSecurity,LPVOID *lpContext);
+ WINBASEAPI WINBOOL WINAPI BackupSeek(HANDLE hFile,DWORD dwLowBytesToSeek,DWORD dwHighBytesToSeek,LPDWORD lpdwLowByteSeeked,LPDWORD lpdwHighByteSeeked,LPVOID *lpContext);
+ WINBASEAPI WINBOOL WINAPI BackupWrite(HANDLE hFile,LPBYTE lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,WINBOOL bAbort,WINBOOL bProcessSecurity,LPVOID *lpContext);
+
+ typedef struct _WIN32_STREAM_ID {
+ DWORD dwStreamId;
+ DWORD dwStreamAttributes;
+ LARGE_INTEGER Size;
+ DWORD dwStreamNameSize;
+ WCHAR cStreamName[ANYSIZE_ARRAY];
+ } WIN32_STREAM_ID,*LPWIN32_STREAM_ID;
+
+#define BACKUP_INVALID 0x0
+#define BACKUP_DATA 0x1
+#define BACKUP_EA_DATA 0x2
+#define BACKUP_SECURITY_DATA 0x3
+#define BACKUP_ALTERNATE_DATA 0x4
+#define BACKUP_LINK 0x5
+#define BACKUP_PROPERTY_DATA 0x6
+#define BACKUP_OBJECT_ID 0x7
+#define BACKUP_REPARSE_DATA 0x8
+#define BACKUP_SPARSE_BLOCK 0x9
+
+#define STREAM_NORMAL_ATTRIBUTE 0x0
+#define STREAM_MODIFIED_WHEN_READ 0x1
+#define STREAM_CONTAINS_SECURITY 0x2
+#define STREAM_CONTAINS_PROPERTIES 0x4
+#define STREAM_SPARSE_ATTRIBUTE 0x8
+
+ WINBASEAPI WINBOOL WINAPI ReadFileScatter(HANDLE hFile,FILE_SEGMENT_ELEMENT aSegmentArray[],DWORD nNumberOfBytesToRead,LPDWORD lpReserved,LPOVERLAPPED lpOverlapped);
+ WINBASEAPI WINBOOL WINAPI WriteFileGather(HANDLE hFile,FILE_SEGMENT_ELEMENT aSegmentArray[],DWORD nNumberOfBytesToWrite,LPDWORD lpReserved,LPOVERLAPPED lpOverlapped);
+
+#define STARTF_USESHOWWINDOW 0x1
+#define STARTF_USESIZE 0x2
+#define STARTF_USEPOSITION 0x4
+#define STARTF_USECOUNTCHARS 0x8
+#define STARTF_USEFILLATTRIBUTE 0x10
+#define STARTF_RUNFULLSCREEN 0x20
+#define STARTF_FORCEONFEEDBACK 0x40
+#define STARTF_FORCEOFFFEEDBACK 0x80
+#define STARTF_USESTDHANDLES 0x100
+
+#define STARTF_USEHOTKEY 0x200
+
+ typedef struct _STARTUPINFOA {
+ DWORD cb;
+ LPSTR lpReserved;
+ LPSTR lpDesktop;
+ LPSTR lpTitle;
+ DWORD dwX;
+ DWORD dwY;
+ DWORD dwXSize;
+ DWORD dwYSize;
+ DWORD dwXCountChars;
+ DWORD dwYCountChars;
+ DWORD dwFillAttribute;
+ DWORD dwFlags;
+ WORD wShowWindow;
+ WORD cbReserved2;
+ LPBYTE lpReserved2;
+ HANDLE hStdInput;
+ HANDLE hStdOutput;
+ HANDLE hStdError;
+ } STARTUPINFOA,*LPSTARTUPINFOA;
+
+ typedef struct _STARTUPINFOW {
+ DWORD cb;
+ LPWSTR lpReserved;
+ LPWSTR lpDesktop;
+ LPWSTR lpTitle;
+ DWORD dwX;
+ DWORD dwY;
+ DWORD dwXSize;
+ DWORD dwYSize;
+ DWORD dwXCountChars;
+ DWORD dwYCountChars;
+ DWORD dwFillAttribute;
+ DWORD dwFlags;
+ WORD wShowWindow;
+ WORD cbReserved2;
+ LPBYTE lpReserved2;
+ HANDLE hStdInput;
+ HANDLE hStdOutput;
+ HANDLE hStdError;
+ } STARTUPINFOW,*LPSTARTUPINFOW;
+
+#ifdef UNICODE
+ typedef STARTUPINFOW STARTUPINFO;
+ typedef LPSTARTUPINFOW LPSTARTUPINFO;
+#else
+ typedef STARTUPINFOA STARTUPINFO;
+ typedef LPSTARTUPINFOA LPSTARTUPINFO;
+#endif
+
+#define SHUTDOWN_NORETRY 0x1
+
+ typedef struct _WIN32_FIND_DATAA {
+ DWORD dwFileAttributes;
+ FILETIME ftCreationTime;
+ FILETIME ftLastAccessTime;
+ FILETIME ftLastWriteTime;
+ DWORD nFileSizeHigh;
+ DWORD nFileSizeLow;
+ DWORD dwReserved0;
+ DWORD dwReserved1;
+ CHAR cFileName[MAX_PATH];
+ CHAR cAlternateFileName[14];
+ } WIN32_FIND_DATAA,*PWIN32_FIND_DATAA,*LPWIN32_FIND_DATAA;
+
+ typedef struct _WIN32_FIND_DATAW {
+ DWORD dwFileAttributes;
+ FILETIME ftCreationTime;
+ FILETIME ftLastAccessTime;
+ FILETIME ftLastWriteTime;
+ DWORD nFileSizeHigh;
+ DWORD nFileSizeLow;
+ DWORD dwReserved0;
+ DWORD dwReserved1;
+ WCHAR cFileName[MAX_PATH];
+ WCHAR cAlternateFileName[14];
+ } WIN32_FIND_DATAW,*PWIN32_FIND_DATAW,*LPWIN32_FIND_DATAW;
+
+#ifdef UNICODE
+ typedef WIN32_FIND_DATAW WIN32_FIND_DATA;
+ typedef PWIN32_FIND_DATAW PWIN32_FIND_DATA;
+ typedef LPWIN32_FIND_DATAW LPWIN32_FIND_DATA;
+#else
+ typedef WIN32_FIND_DATAA WIN32_FIND_DATA;
+ typedef PWIN32_FIND_DATAA PWIN32_FIND_DATA;
+ typedef LPWIN32_FIND_DATAA LPWIN32_FIND_DATA;
+#endif
+
+ typedef struct _WIN32_FILE_ATTRIBUTE_DATA {
+ DWORD dwFileAttributes;
+ FILETIME ftCreationTime;
+ FILETIME ftLastAccessTime;
+ FILETIME ftLastWriteTime;
+ DWORD nFileSizeHigh;
+ DWORD nFileSizeLow;
+ } WIN32_FILE_ATTRIBUTE_DATA,*LPWIN32_FILE_ATTRIBUTE_DATA;
+
+#ifdef UNICODE
+#define CreateMutex CreateMutexW
+#define OpenMutex OpenMutexW
+#define CreateEvent CreateEventW
+#define OpenEvent OpenEventW
+#define CreateSemaphore CreateSemaphoreW
+#define OpenSemaphore OpenSemaphoreW
+#else
+#define CreateMutex CreateMutexA
+#define OpenMutex OpenMutexA
+#define CreateEvent CreateEventA
+#define OpenEvent OpenEventA
+#define CreateSemaphore CreateSemaphoreA
+#define OpenSemaphore OpenSemaphoreA
+#endif
+
+ WINBASEAPI HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES lpMutexAttributes,WINBOOL bInitialOwner,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES lpMutexAttributes,WINBOOL bInitialOwner,LPCWSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenMutexA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenMutexW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
+ WINBASEAPI HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES lpEventAttributes,WINBOOL bManualReset,WINBOOL bInitialState,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES lpEventAttributes,WINBOOL bManualReset,WINBOOL bInitialState,LPCWSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenEventA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenEventW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
+ WINBASEAPI HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,LONG lInitialCount,LONG lMaximumCount,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,LONG lInitialCount,LONG lMaximumCount,LPCWSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenSemaphoreA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenSemaphoreW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
+
+ typedef VOID (WINAPI *PTIMERAPCROUTINE)(LPVOID lpArgToCompletionRoutine,DWORD dwTimerLowValue,DWORD dwTimerHighValue);
+
+#ifdef UNICODE
+#define CreateWaitableTimer CreateWaitableTimerW
+#define OpenWaitableTimer OpenWaitableTimerW
+#define CreateFileMapping CreateFileMappingW
+#define OpenFileMapping OpenFileMappingW
+#define GetLogicalDriveStrings GetLogicalDriveStringsW
+#define LoadLibrary LoadLibraryW
+#define LoadLibraryEx LoadLibraryExW
+#define GetModuleFileName GetModuleFileNameW
+#define GetModuleHandle GetModuleHandleW
+#else
+#define CreateWaitableTimer CreateWaitableTimerA
+#define OpenWaitableTimer OpenWaitableTimerA
+#define CreateFileMapping CreateFileMappingA
+#define OpenFileMapping OpenFileMappingA
+#define GetLogicalDriveStrings GetLogicalDriveStringsA
+#define LoadLibrary LoadLibraryA
+#define LoadLibraryEx LoadLibraryExA
+#define GetModuleFileName GetModuleFileNameA
+#define GetModuleHandle GetModuleHandleA
+#endif
+
+ WINBASEAPI HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES lpTimerAttributes,WINBOOL bManualReset,LPCSTR lpTimerName);
+ WINBASEAPI HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES lpTimerAttributes,WINBOOL bManualReset,LPCWSTR lpTimerName);
+ WINBASEAPI HANDLE WINAPI OpenWaitableTimerA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpTimerName);
+ WINBASEAPI HANDLE WINAPI OpenWaitableTimerW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpTimerName);
+ WINBASEAPI WINBOOL WINAPI SetWaitableTimer(HANDLE hTimer,const LARGE_INTEGER *lpDueTime,LONG lPeriod,PTIMERAPCROUTINE pfnCompletionRoutine,LPVOID lpArgToCompletionRoutine,WINBOOL fResume);
+ WINBASEAPI WINBOOL WINAPI CancelWaitableTimer(HANDLE hTimer);
+ WINBASEAPI HANDLE WINAPI CreateFileMappingA(HANDLE hFile,LPSECURITY_ATTRIBUTES lpFileMappingAttributes,DWORD flProtect,DWORD dwMaximumSizeHigh,DWORD dwMaximumSizeLow,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI CreateFileMappingW(HANDLE hFile,LPSECURITY_ATTRIBUTES lpFileMappingAttributes,DWORD flProtect,DWORD dwMaximumSizeHigh,DWORD dwMaximumSizeLow,LPCWSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenFileMappingA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenFileMappingW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
+ WINBASEAPI DWORD WINAPI GetLogicalDriveStringsA(DWORD nBufferLength,LPSTR lpBuffer);
+ WINBASEAPI DWORD WINAPI GetLogicalDriveStringsW(DWORD nBufferLength,LPWSTR lpBuffer);
+
+ typedef enum _MEMORY_RESOURCE_NOTIFICATION_TYPE {
+ LowMemoryResourceNotification,HighMemoryResourceNotification
+ } MEMORY_RESOURCE_NOTIFICATION_TYPE;
+
+ WINBASEAPI HANDLE WINAPI CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE NotificationType);
+ WINBASEAPI WINBOOL WINAPI QueryMemoryResourceNotification(HANDLE ResourceNotificationHandle,PBOOL ResourceState);
+ WINBASEAPI HMODULE WINAPI LoadLibraryA(LPCSTR lpLibFileName);
+ WINBASEAPI HMODULE WINAPI LoadLibraryW(LPCWSTR lpLibFileName);
+ WINBASEAPI HMODULE WINAPI LoadLibraryExA(LPCSTR lpLibFileName,HANDLE hFile,DWORD dwFlags);
+ WINBASEAPI HMODULE WINAPI LoadLibraryExW(LPCWSTR lpLibFileName,HANDLE hFile,DWORD dwFlags);
+
+#define DONT_RESOLVE_DLL_REFERENCES 0x1
+#define LOAD_LIBRARY_AS_DATAFILE 0x2
+#define LOAD_WITH_ALTERED_SEARCH_PATH 0x8
+#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x10
+#define LOAD_LINRARY_AS_IMAGE_RESOURCE 0x20
+#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x40
+
+ WINBASEAPI DWORD WINAPI GetModuleFileNameA(HMODULE hModule,LPCH lpFilename,DWORD nSize);
+ WINBASEAPI DWORD WINAPI GetModuleFileNameW(HMODULE hModule,LPWCH lpFilename,DWORD nSize);
+ WINBASEAPI HMODULE WINAPI GetModuleHandleA(LPCSTR lpModuleName);
+ WINBASEAPI HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName);
+
+#ifndef RC_INVOKED
+#define GET_MODULE_HANDLE_EX_FLAG_PIN (0x1)
+#define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT (0x2)
+#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS (0x4)
+
+ typedef WINBOOL (WINAPI *PGET_MODULE_HANDLE_EXA)(DWORD dwFlags,LPCSTR lpModuleName,HMODULE *phModule);
+ typedef WINBOOL (WINAPI *PGET_MODULE_HANDLE_EXW)(DWORD dwFlags,LPCWSTR lpModuleName,HMODULE *phModule);
+
+#ifdef UNICODE
+#define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXW
+#define GetModuleHandleEx GetModuleHandleExW
+#else
+#define PGET_MODULE_HANDLE_EX PGET_MODULE_HANDLE_EXA
+#define GetModuleHandleEx GetModuleHandleExA
+#endif
+
+ WINBASEAPI WINBOOL WINAPI GetModuleHandleExA(DWORD dwFlags,LPCSTR lpModuleName,HMODULE *phModule);
+ WINBASEAPI WINBOOL WINAPI GetModuleHandleExW(DWORD dwFlags,LPCWSTR lpModuleName,HMODULE *phModule);
+#endif
+
+#ifdef UNICODE
+#define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathW
+#define CreateProcess CreateProcessW
+#define FatalAppExit FatalAppExitW
+#define GetStartupInfo GetStartupInfoW
+#define GetCommandLine GetCommandLineW
+#define GetEnvironmentVariable GetEnvironmentVariableW
+#define SetEnvironmentVariable SetEnvironmentVariableW
+#define ExpandEnvironmentStrings ExpandEnvironmentStringsW
+#define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableW
+#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW
+#define OutputDebugString OutputDebugStringW
+#define FindResource FindResourceW
+#define FindResourceEx FindResourceExW
+#else
+#define NeedCurrentDirectoryForExePath NeedCurrentDirectoryForExePathA
+#define CreateProcess CreateProcessA
+#define FatalAppExit FatalAppExitA
+#define GetStartupInfo GetStartupInfoA
+#define GetCommandLine GetCommandLineA
+#define GetEnvironmentVariable GetEnvironmentVariableA
+#define SetEnvironmentVariable SetEnvironmentVariableA
+#define ExpandEnvironmentStrings ExpandEnvironmentStringsA
+#define GetFirmwareEnvironmentVariable GetFirmwareEnvironmentVariableA
+#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA
+#define OutputDebugString OutputDebugStringA
+#define FindResource FindResourceA
+#define FindResourceEx FindResourceExA
+#endif
+
+ WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathA(LPCSTR ExeName);
+ WINBASEAPI WINBOOL WINAPI NeedCurrentDirectoryForExePathW(LPCWSTR ExeName);
+ WINBASEAPI WINBOOL WINAPI CreateProcessA(LPCSTR lpApplicationName,LPSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCSTR lpCurrentDirectory,LPSTARTUPINFOA lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
+ WINBASEAPI WINBOOL WINAPI CreateProcessW(LPCWSTR lpApplicationName,LPWSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
+ WINBASEAPI DWORD WINAPI AddLocalAlternateComputerNameA(LPCSTR lpDnsFQHostname,ULONG ulFlags);
+ WINBASEAPI DWORD WINAPI AddLocalAlternateComputerNameW(LPCWSTR lpDnsFQHostname,ULONG ulFlags);
+ WINBASEAPI WINBOOL WINAPI SetProcessShutdownParameters(DWORD dwLevel,DWORD dwFlags);
+ WINBASEAPI WINBOOL WINAPI GetProcessShutdownParameters(LPDWORD lpdwLevel,LPDWORD lpdwFlags);
+ WINBASEAPI DWORD WINAPI GetProcessVersion(DWORD ProcessId);
+ WINBASEAPI VOID WINAPI FatalAppExitA(UINT uAction,LPCSTR lpMessageText);
+ WINBASEAPI VOID WINAPI FatalAppExitW(UINT uAction,LPCWSTR lpMessageText);
+ WINBASEAPI VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo);
+ WINBASEAPI VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo);
+ WINBASEAPI LPSTR WINAPI GetCommandLineA(VOID);
+ WINBASEAPI LPWSTR WINAPI GetCommandLineW(VOID);
+ WINBASEAPI DWORD WINAPI GetEnvironmentVariableA(LPCSTR lpName,LPSTR lpBuffer,DWORD nSize);
+ WINBASEAPI DWORD WINAPI GetEnvironmentVariableW(LPCWSTR lpName,LPWSTR lpBuffer,DWORD nSize);
+ WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableA(LPCSTR lpName,LPCSTR lpValue);
+ WINBASEAPI WINBOOL WINAPI SetEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpValue);
+ WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR lpSrc,LPSTR lpDst,DWORD nSize);
+ WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR lpSrc,LPWSTR lpDst,DWORD nSize);
+ WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableA(LPCSTR lpName,LPCSTR lpGuid,PVOID pBuffer,DWORD nSize);
+ WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpGuid,PVOID pBuffer,DWORD nSize);
+ WINBASEAPI WINBOOL WINAPI SetFirmwareEnvironmentVariableA(LPCSTR lpName,LPCSTR lpGuid,PVOID pValue,DWORD nSize);
+ WINBASEAPI WINBOOL WINAPI SetFirmwareEnvironmentVariableW(LPCWSTR lpName,LPCWSTR lpGuid,PVOID pValue,DWORD nSize);
+ WINBASEAPI VOID WINAPI OutputDebugStringA(LPCSTR lpOutputString);
+ WINBASEAPI VOID WINAPI OutputDebugStringW(LPCWSTR lpOutputString);
+ WINBASEAPI HRSRC WINAPI FindResourceA(HMODULE hModule,LPCSTR lpName,LPCSTR lpType);
+ WINBASEAPI HRSRC WINAPI FindResourceW(HMODULE hModule,LPCWSTR lpName,LPCWSTR lpType);
+ WINBASEAPI HRSRC WINAPI FindResourceExA(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,WORD wLanguage);
+ WINBASEAPI HRSRC WINAPI FindResourceExW(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage);
+
+#ifdef UNICODE
+#define ENUMRESTYPEPROC ENUMRESTYPEPROCW
+#define ENUMRESNAMEPROC ENUMRESNAMEPROCW
+#define ENUMRESLANGPROC ENUMRESLANGPROCW
+#define EnumResourceTypes EnumResourceTypesW
+#define EnumResourceNames EnumResourceNamesW
+#define EnumResourceLanguages EnumResourceLanguagesW
+#define BeginUpdateResource BeginUpdateResourceW
+#define UpdateResource UpdateResourceW
+#define EndUpdateResource EndUpdateResourceW
+#define GlobalAddAtom GlobalAddAtomW
+#define GlobalFindAtom GlobalFindAtomW
+#define GlobalGetAtomName GlobalGetAtomNameW
+#define AddAtom AddAtomW
+#define FindAtom FindAtomW
+#define GetAtomName GetAtomNameW
+#define GetProfileInt GetProfileIntW
+#define GetProfileString GetProfileStringW
+#define WriteProfileString WriteProfileStringW
+#define GetProfileSection GetProfileSectionW
+#define WriteProfileSection WriteProfileSectionW
+#define GetPrivateProfileInt GetPrivateProfileIntW
+#define GetPrivateProfileString GetPrivateProfileStringW
+#define WritePrivateProfileString WritePrivateProfileStringW
+#define GetPrivateProfileSection GetPrivateProfileSectionW
+#define WritePrivateProfileSection WritePrivateProfileSectionW
+#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW
+#define GetPrivateProfileStruct GetPrivateProfileStructW
+#define WritePrivateProfileStruct WritePrivateProfileStructW
+#define GetDriveType GetDriveTypeW
+#define GetSystemDirectory GetSystemDirectoryW
+#define GetTempPath GetTempPathW
+#define GetTempFileName GetTempFileNameW
+#define GetWindowsDirectory GetWindowsDirectoryW
+#define GetSystemWindowsDirectory GetSystemWindowsDirectoryW
+#define AddLocalAlternateComputerName AddLocalAlternateComputerNameW
+#else
+#define ENUMRESTYPEPROC ENUMRESTYPEPROCA
+#define ENUMRESNAMEPROC ENUMRESNAMEPROCA
+#define ENUMRESLANGPROC ENUMRESLANGPROCA
+#define EnumResourceTypes EnumResourceTypesA
+#define EnumResourceNames EnumResourceNamesA
+#define EnumResourceLanguages EnumResourceLanguagesA
+#define BeginUpdateResource BeginUpdateResourceA
+#define UpdateResource UpdateResourceA
+#define EndUpdateResource EndUpdateResourceA
+#define GlobalAddAtom GlobalAddAtomA
+#define GlobalFindAtom GlobalFindAtomA
+#define GlobalGetAtomName GlobalGetAtomNameA
+#define AddAtom AddAtomA
+#define FindAtom FindAtomA
+#define GetAtomName GetAtomNameA
+#define GetProfileInt GetProfileIntA
+#define GetProfileString GetProfileStringA
+#define WriteProfileString WriteProfileStringA
+#define GetProfileSection GetProfileSectionA
+#define WriteProfileSection WriteProfileSectionA
+#define GetPrivateProfileInt GetPrivateProfileIntA
+#define GetPrivateProfileString GetPrivateProfileStringA
+#define WritePrivateProfileString WritePrivateProfileStringA
+#define GetPrivateProfileSection GetPrivateProfileSectionA
+#define WritePrivateProfileSection WritePrivateProfileSectionA
+#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA
+#define GetPrivateProfileStruct GetPrivateProfileStructA
+#define WritePrivateProfileStruct WritePrivateProfileStructA
+#define GetDriveType GetDriveTypeA
+#define GetSystemDirectory GetSystemDirectoryA
+#define GetTempPath GetTempPathA
+#define GetTempFileName GetTempFileNameA
+#define GetWindowsDirectory GetWindowsDirectoryA
+#define GetSystemWindowsDirectory GetSystemWindowsDirectoryA
+#define AddLocalAlternateComputerName AddLocalAlternateComputerNameA
+#endif
+
+ typedef WINBOOL (CALLBACK *ENUMRESTYPEPROCA)(HMODULE hModule,LPSTR lpType,LONG_PTR lParam);
+ typedef WINBOOL (CALLBACK *ENUMRESTYPEPROCW)(HMODULE hModule,LPWSTR lpType,LONG_PTR lParam);
+ typedef WINBOOL (CALLBACK *ENUMRESNAMEPROCA)(HMODULE hModule,LPCSTR lpType,LPSTR lpName,LONG_PTR lParam);
+ typedef WINBOOL (CALLBACK *ENUMRESNAMEPROCW)(HMODULE hModule,LPCWSTR lpType,LPWSTR lpName,LONG_PTR lParam);
+ typedef WINBOOL (CALLBACK *ENUMRESLANGPROCA)(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,WORD wLanguage,LONG_PTR lParam);
+ typedef WINBOOL (CALLBACK *ENUMRESLANGPROCW)(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage,LONG_PTR lParam);
+
+ WINBASEAPI WINBOOL WINAPI EnumResourceTypesA(HMODULE hModule,ENUMRESTYPEPROCA lpEnumFunc,LONG_PTR lParam);
+ WINBASEAPI WINBOOL WINAPI EnumResourceTypesW(HMODULE hModule,ENUMRESTYPEPROCW lpEnumFunc,LONG_PTR lParam);
+ WINBASEAPI WINBOOL WINAPI EnumResourceNamesA(HMODULE hModule,LPCSTR lpType,ENUMRESNAMEPROCA lpEnumFunc,LONG_PTR lParam);
+ WINBASEAPI WINBOOL WINAPI EnumResourceNamesW(HMODULE hModule,LPCWSTR lpType,ENUMRESNAMEPROCW lpEnumFunc,LONG_PTR lParam);
+ WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesA(HMODULE hModule,LPCSTR lpType,LPCSTR lpName,ENUMRESLANGPROCA lpEnumFunc,LONG_PTR lParam);
+ WINBASEAPI WINBOOL WINAPI EnumResourceLanguagesW(HMODULE hModule,LPCWSTR lpType,LPCWSTR lpName,ENUMRESLANGPROCW lpEnumFunc,LONG_PTR lParam);
+ WINBASEAPI HANDLE WINAPI BeginUpdateResourceA(LPCSTR pFileName,WINBOOL bDeleteExistingResources);
+ WINBASEAPI HANDLE WINAPI BeginUpdateResourceW(LPCWSTR pFileName,WINBOOL bDeleteExistingResources);
+ WINBASEAPI WINBOOL WINAPI UpdateResourceA(HANDLE hUpdate,LPCSTR lpType,LPCSTR lpName,WORD wLanguage,LPVOID lpData,DWORD cb);
+ WINBASEAPI WINBOOL WINAPI UpdateResourceW(HANDLE hUpdate,LPCWSTR lpType,LPCWSTR lpName,WORD wLanguage,LPVOID lpData,DWORD cb);
+ WINBASEAPI WINBOOL WINAPI EndUpdateResourceA(HANDLE hUpdate,WINBOOL fDiscard);
+ WINBASEAPI WINBOOL WINAPI EndUpdateResourceW(HANDLE hUpdate,WINBOOL fDiscard);
+ WINBASEAPI ATOM WINAPI GlobalAddAtomA(LPCSTR lpString);
+ WINBASEAPI ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString);
+ WINBASEAPI ATOM WINAPI GlobalFindAtomA(LPCSTR lpString);
+ WINBASEAPI ATOM WINAPI GlobalFindAtomW(LPCWSTR lpString);
+ WINBASEAPI UINT WINAPI GlobalGetAtomNameA(ATOM nAtom,LPSTR lpBuffer,int nSize);
+ WINBASEAPI UINT WINAPI GlobalGetAtomNameW(ATOM nAtom,LPWSTR lpBuffer,int nSize);
+ WINBASEAPI ATOM WINAPI AddAtomA(LPCSTR lpString);
+ WINBASEAPI ATOM WINAPI AddAtomW(LPCWSTR lpString);
+ WINBASEAPI ATOM WINAPI FindAtomA(LPCSTR lpString);
+ WINBASEAPI ATOM WINAPI FindAtomW(LPCWSTR lpString);
+ WINBASEAPI UINT WINAPI GetAtomNameA(ATOM nAtom,LPSTR lpBuffer,int nSize);
+ WINBASEAPI UINT WINAPI GetAtomNameW(ATOM nAtom,LPWSTR lpBuffer,int nSize);
+ WINBASEAPI UINT WINAPI GetProfileIntA(LPCSTR lpAppName,LPCSTR lpKeyName,INT nDefault);
+ WINBASEAPI UINT WINAPI GetProfileIntW(LPCWSTR lpAppName,LPCWSTR lpKeyName,INT nDefault);
+ WINBASEAPI DWORD WINAPI GetProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpDefault,LPSTR lpReturnedString,DWORD nSize);
+ WINBASEAPI DWORD WINAPI GetProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpDefault,LPWSTR lpReturnedString,DWORD nSize);
+ WINBASEAPI WINBOOL WINAPI WriteProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpString);
+ WINBASEAPI WINBOOL WINAPI WriteProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpString);
+ WINBASEAPI DWORD WINAPI GetProfileSectionA(LPCSTR lpAppName,LPSTR lpReturnedString,DWORD nSize);
+ WINBASEAPI DWORD WINAPI GetProfileSectionW(LPCWSTR lpAppName,LPWSTR lpReturnedString,DWORD nSize);
+ WINBASEAPI WINBOOL WINAPI WriteProfileSectionA(LPCSTR lpAppName,LPCSTR lpString);
+ WINBASEAPI WINBOOL WINAPI WriteProfileSectionW(LPCWSTR lpAppName,LPCWSTR lpString);
+ WINBASEAPI UINT WINAPI GetPrivateProfileIntA(LPCSTR lpAppName,LPCSTR lpKeyName,INT nDefault,LPCSTR lpFileName);
+ WINBASEAPI UINT WINAPI GetPrivateProfileIntW(LPCWSTR lpAppName,LPCWSTR lpKeyName,INT nDefault,LPCWSTR lpFileName);
+ WINBASEAPI DWORD WINAPI GetPrivateProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpDefault,LPSTR lpReturnedString,DWORD nSize,LPCSTR lpFileName);
+ WINBASEAPI DWORD WINAPI GetPrivateProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpDefault,LPWSTR lpReturnedString,DWORD nSize,LPCWSTR lpFileName);
+ WINBASEAPI WINBOOL WINAPI WritePrivateProfileStringA(LPCSTR lpAppName,LPCSTR lpKeyName,LPCSTR lpString,LPCSTR lpFileName);
+ WINBASEAPI WINBOOL WINAPI WritePrivateProfileStringW(LPCWSTR lpAppName,LPCWSTR lpKeyName,LPCWSTR lpString,LPCWSTR lpFileName);
+ WINBASEAPI DWORD WINAPI GetPrivateProfileSectionA(LPCSTR lpAppName,LPSTR lpReturnedString,DWORD nSize,LPCSTR lpFileName);
+ WINBASEAPI DWORD WINAPI GetPrivateProfileSectionW(LPCWSTR lpAppName,LPWSTR lpReturnedString,DWORD nSize,LPCWSTR lpFileName);
+ WINBASEAPI WINBOOL WINAPI WritePrivateProfileSectionA(LPCSTR lpAppName,LPCSTR lpString,LPCSTR lpFileName);
+ WINBASEAPI WINBOOL WINAPI WritePrivateProfileSectionW(LPCWSTR lpAppName,LPCWSTR lpString,LPCWSTR lpFileName);
+ WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR lpszReturnBuffer,DWORD nSize,LPCSTR lpFileName);
+ WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR lpszReturnBuffer,DWORD nSize,LPCWSTR lpFileName);
+ WINBASEAPI WINBOOL WINAPI GetPrivateProfileStructA(LPCSTR lpszSection,LPCSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCSTR szFile);
+ WINBASEAPI WINBOOL WINAPI GetPrivateProfileStructW(LPCWSTR lpszSection,LPCWSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCWSTR szFile);
+ WINBASEAPI WINBOOL WINAPI WritePrivateProfileStructA(LPCSTR lpszSection,LPCSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCSTR szFile);
+ WINBASEAPI WINBOOL WINAPI WritePrivateProfileStructW(LPCWSTR lpszSection,LPCWSTR lpszKey,LPVOID lpStruct,UINT uSizeStruct,LPCWSTR szFile);
+ WINBASEAPI UINT WINAPI GetDriveTypeA(LPCSTR lpRootPathName);
+ WINBASEAPI UINT WINAPI GetDriveTypeW(LPCWSTR lpRootPathName);
+ WINBASEAPI UINT WINAPI GetSystemDirectoryA(LPSTR lpBuffer,UINT uSize);
+ WINBASEAPI UINT WINAPI GetSystemDirectoryW(LPWSTR lpBuffer,UINT uSize);
+ WINBASEAPI DWORD WINAPI GetTempPathA(DWORD nBufferLength,LPSTR lpBuffer);
+ WINBASEAPI DWORD WINAPI GetTempPathW(DWORD nBufferLength,LPWSTR lpBuffer);
+ WINBASEAPI UINT WINAPI GetTempFileNameA(LPCSTR lpPathName,LPCSTR lpPrefixString,UINT uUnique,LPSTR lpTempFileName);
+ WINBASEAPI UINT WINAPI GetTempFileNameW(LPCWSTR lpPathName,LPCWSTR lpPrefixString,UINT uUnique,LPWSTR lpTempFileName);
+ WINBASEAPI UINT WINAPI GetWindowsDirectoryA(LPSTR lpBuffer,UINT uSize);
+ WINBASEAPI UINT WINAPI GetWindowsDirectoryW(LPWSTR lpBuffer,UINT uSize);
+ WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryA(LPSTR lpBuffer,UINT uSize);
+ WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR lpBuffer,UINT uSize);
+
+#ifndef RC_INVOKED
+#ifdef UNICODE
+#define GetSystemWow64Directory GetSystemWow64DirectoryW
+#else
+#define GetSystemWow64Directory GetSystemWow64DirectoryA
+#endif
+
+ WINBASEAPI UINT WINAPI GetSystemWow64DirectoryA(LPSTR lpBuffer,UINT uSize);
+ WINBASEAPI UINT WINAPI GetSystemWow64DirectoryW(LPWSTR lpBuffer,UINT uSize);
+ WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN Wow64FsEnableRedirection);
+ WINBASEAPI WINBOOL WINAPI Wow64DisableWow64FsRedirection(PVOID *OldValue);
+ WINBASEAPI WINBOOL WINAPI Wow64RevertWow64FsRedirection(PVOID OlValue);
+
+ typedef UINT (WINAPI *PGET_SYSTEM_WOW64_DIRECTORY_A)(LPSTR lpBuffer,UINT uSize);
+ typedef UINT (WINAPI *PGET_SYSTEM_WOW64_DIRECTORY_W)(LPWSTR lpBuffer,UINT uSize);
+
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A "GetSystemWow64DirectoryA"
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W L"GetSystemWow64DirectoryA"
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T TEXT("GetSystemWow64DirectoryA")
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A "GetSystemWow64DirectoryW"
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W L"GetSystemWow64DirectoryW"
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T TEXT("GetSystemWow64DirectoryW")
+
+#ifdef UNICODE
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T
+#else
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W
+#define GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T
+#endif
+#endif
+
+#ifdef UNICODE
+#define SetCurrentDirectory SetCurrentDirectoryW
+#define GetCurrentDirectory GetCurrentDirectoryW
+#define SetDllDirectory SetDllDirectoryW
+#define GetDllDirectory GetDllDirectoryW
+#define GetDiskFreeSpace GetDiskFreeSpaceW
+#define GetDiskFreeSpaceEx GetDiskFreeSpaceExW
+#define CreateDirectory CreateDirectoryW
+#define CreateDirectoryEx CreateDirectoryExW
+#define RemoveDirectory RemoveDirectoryW
+#define GetFullPathName GetFullPathNameW
+#define DefineDosDevice DefineDosDeviceW
+#define QueryDosDevice QueryDosDeviceW
+#define CreateFile CreateFileW
+#define SetFileAttributes SetFileAttributesW
+#define GetFileAttributes GetFileAttributesW
+#else
+#define SetCurrentDirectory SetCurrentDirectoryA
+#define GetCurrentDirectory GetCurrentDirectoryA
+#define SetDllDirectory SetDllDirectoryA
+#define GetDllDirectory GetDllDirectoryA
+#define GetDiskFreeSpace GetDiskFreeSpaceA
+#define GetDiskFreeSpaceEx GetDiskFreeSpaceExA
+#define CreateDirectory CreateDirectoryA
+#define CreateDirectoryEx CreateDirectoryExA
+#define RemoveDirectory RemoveDirectoryA
+#define GetFullPathName GetFullPathNameA
+#define DefineDosDevice DefineDosDeviceA
+#define QueryDosDevice QueryDosDeviceA
+#define CreateFile CreateFileA
+#define SetFileAttributes SetFileAttributesA
+#define GetFileAttributes GetFileAttributesA
+#endif
+
+ WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryA(LPCSTR lpPathName);
+ WINBASEAPI WINBOOL WINAPI SetCurrentDirectoryW(LPCWSTR lpPathName);
+ WINBASEAPI DWORD WINAPI GetCurrentDirectoryA(DWORD nBufferLength,LPSTR lpBuffer);
+ WINBASEAPI DWORD WINAPI GetCurrentDirectoryW(DWORD nBufferLength,LPWSTR lpBuffer);
+ WINBASEAPI WINBOOL WINAPI SetDllDirectoryA(LPCSTR lpPathName);
+ WINBASEAPI WINBOOL WINAPI SetDllDirectoryW(LPCWSTR lpPathName);
+ WINBASEAPI DWORD WINAPI GetDllDirectoryA(DWORD nBufferLength,LPSTR lpBuffer);
+ WINBASEAPI DWORD WINAPI GetDllDirectoryW(DWORD nBufferLength,LPWSTR lpBuffer);
+ WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceA(LPCSTR lpRootPathName,LPDWORD lpSectorsPerCluster,LPDWORD lpBytesPerSector,LPDWORD lpNumberOfFreeClusters,LPDWORD lpTotalNumberOfClusters);
+ WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceW(LPCWSTR lpRootPathName,LPDWORD lpSectorsPerCluster,LPDWORD lpBytesPerSector,LPDWORD lpNumberOfFreeClusters,LPDWORD lpTotalNumberOfClusters);
+ WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceExA(LPCSTR lpDirectoryName,PULARGE_INTEGER lpFreeBytesAvailableToCaller,PULARGE_INTEGER lpTotalNumberOfBytes,PULARGE_INTEGER lpTotalNumberOfFreeBytes);
+ WINBASEAPI WINBOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR lpDirectoryName,PULARGE_INTEGER lpFreeBytesAvailableToCaller,PULARGE_INTEGER lpTotalNumberOfBytes,PULARGE_INTEGER lpTotalNumberOfFreeBytes);
+ WINBASEAPI WINBOOL WINAPI CreateDirectoryA(LPCSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINBASEAPI WINBOOL WINAPI CreateDirectoryW(LPCWSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINBASEAPI WINBOOL WINAPI CreateDirectoryExA(LPCSTR lpTemplateDirectory,LPCSTR lpNewDirectory,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINBASEAPI WINBOOL WINAPI CreateDirectoryExW(LPCWSTR lpTemplateDirectory,LPCWSTR lpNewDirectory,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINBASEAPI WINBOOL WINAPI RemoveDirectoryA(LPCSTR lpPathName);
+ WINBASEAPI WINBOOL WINAPI RemoveDirectoryW(LPCWSTR lpPathName);
+ WINBASEAPI DWORD WINAPI GetFullPathNameA(LPCSTR lpFileName,DWORD nBufferLength,LPSTR lpBuffer,LPSTR *lpFilePart);
+ WINBASEAPI DWORD WINAPI GetFullPathNameW(LPCWSTR lpFileName,DWORD nBufferLength,LPWSTR lpBuffer,LPWSTR *lpFilePart);
+
+#define DDD_RAW_TARGET_PATH 0x1
+#define DDD_REMOVE_DEFINITION 0x2
+#define DDD_EXACT_MATCH_ON_REMOVE 0x4
+#define DDD_NO_BROADCAST_SYSTEM 0x8
+#define DDD_LUID_BROADCAST_DRIVE 0x10
+
+ WINBASEAPI WINBOOL WINAPI DefineDosDeviceA(DWORD dwFlags,LPCSTR lpDeviceName,LPCSTR lpTargetPath);
+ WINBASEAPI WINBOOL WINAPI DefineDosDeviceW(DWORD dwFlags,LPCWSTR lpDeviceName,LPCWSTR lpTargetPath);
+ WINBASEAPI DWORD WINAPI QueryDosDeviceA(LPCSTR lpDeviceName,LPSTR lpTargetPath,DWORD ucchMax);
+ WINBASEAPI DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName,LPWSTR lpTargetPath,DWORD ucchMax);
+
+#define EXPAND_LOCAL_DRIVES
+
+ WINBASEAPI HANDLE WINAPI CreateFileA(LPCSTR lpFileName,DWORD dwDesiredAccess,DWORD dwShareMode,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD dwCreationDisposition,DWORD dwFlagsAndAttributes,HANDLE hTemplateFile);
+ WINBASEAPI HANDLE WINAPI CreateFileW(LPCWSTR lpFileName,DWORD dwDesiredAccess,DWORD dwShareMode,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD dwCreationDisposition,DWORD dwFlagsAndAttributes,HANDLE hTemplateFile);
+ WINBASEAPI HANDLE WINAPI ReOpenFile(HANDLE hOriginalFile,DWORD dwDesiredAccess,DWORD dwShareMode,DWORD dwFlagsAndAttributes);
+ WINBASEAPI WINBOOL WINAPI SetFileAttributesA(LPCSTR lpFileName,DWORD dwFileAttributes);
+ WINBASEAPI WINBOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName,DWORD dwFileAttributes);
+ WINBASEAPI DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName);
+ WINBASEAPI DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName);
+
+ typedef enum _GET_FILEEX_INFO_LEVELS {
+ GetFileExInfoStandard,GetFileExMaxInfoLevel
+ } GET_FILEEX_INFO_LEVELS;
+
+#ifdef UNICODE
+#define GetFileAttributesEx GetFileAttributesExW
+#define GetCompressedFileSize GetCompressedFileSizeW
+#define DeleteFile DeleteFileW
+#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
+#else
+#define GetFileAttributesEx GetFileAttributesExA
+#define GetCompressedFileSize GetCompressedFileSizeA
+#define DeleteFile DeleteFileA
+#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
+#endif
+
+ WINBASEAPI WINBOOL WINAPI GetFileAttributesExA(LPCSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation);
+ WINBASEAPI WINBOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation);
+ WINBASEAPI DWORD WINAPI GetCompressedFileSizeA(LPCSTR lpFileName,LPDWORD lpFileSizeHigh);
+ WINBASEAPI DWORD WINAPI GetCompressedFileSizeW(LPCWSTR lpFileName,LPDWORD lpFileSizeHigh);
+ WINBASEAPI WINBOOL WINAPI DeleteFileA(LPCSTR lpFileName);
+ WINBASEAPI WINBOOL WINAPI DeleteFileW(LPCWSTR lpFileName);
+ WINBASEAPI WINBOOL WINAPI CheckNameLegalDOS8Dot3A(LPCSTR lpName,LPSTR lpOemName,DWORD OemNameSize,PBOOL pbNameContainsSpaces,PBOOL pbNameLegal);
+ WINBASEAPI WINBOOL WINAPI CheckNameLegalDOS8Dot3W(LPCWSTR lpName,LPSTR lpOemName,DWORD OemNameSize,PBOOL pbNameContainsSpaces,PBOOL pbNameLegal);
+
+ typedef enum _FINDEX_INFO_LEVELS {
+ FindExInfoStandard,FindExInfoMaxInfoLevel
+ } FINDEX_INFO_LEVELS;
+
+ typedef enum _FINDEX_SEARCH_OPS {
+ FindExSearchNameMatch,FindExSearchLimitToDirectories,FindExSearchLimitToDevices,FindExSearchMaxSearchOp
+ } FINDEX_SEARCH_OPS;
+
+#define FIND_FIRST_EX_CASE_SENSITIVE 0x1
+
+#ifdef UNICODE
+#define FindFirstFileEx FindFirstFileExW
+#define FindFirstFile FindFirstFileW
+#define FindNextFile FindNextFileW
+#define SearchPath SearchPathW
+#define CopyFile CopyFileW
+#define CopyFileEx CopyFileExW
+#define MoveFile MoveFileW
+#define MoveFileEx MoveFileExW
+#define MoveFileWithProgress MoveFileWithProgressW
+#define ReplaceFile ReplaceFileW
+#define CreateHardLink CreateHardLinkW
+#define CreateNamedPipe CreateNamedPipeW
+#define GetNamedPipeHandleState GetNamedPipeHandleStateW
+#define CallNamedPipe CallNamedPipeW
+#define WaitNamedPipe WaitNamedPipeW
+#define SetVolumeLabel SetVolumeLabelW
+#define GetVolumeInformation GetVolumeInformationW
+#define ClearEventLog ClearEventLogW
+#define BackupEventLog BackupEventLogW
+#define OpenEventLog OpenEventLogW
+#define RegisterEventSource RegisterEventSourceW
+#define OpenBackupEventLog OpenBackupEventLogW
+#define ReadEventLog ReadEventLogW
+#define ReportEvent ReportEventW
+#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW
+#define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmW
+#define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmW
+#define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleW
+#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW
+#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW
+#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW
+#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmW
+#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW
+#define SetFileSecurity SetFileSecurityW
+#define GetFileSecurity GetFileSecurityW
+#define FindFirstChangeNotification FindFirstChangeNotificationW
+#define IsBadStringPtr IsBadStringPtrW
+#define LookupAccountSid LookupAccountSidW
+#define LookupAccountName LookupAccountNameW
+#define LookupPrivilegeValue LookupPrivilegeValueW
+#define LookupPrivilegeName LookupPrivilegeNameW
+#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
+#define BuildCommDCB BuildCommDCBW
+#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW
+#define CommConfigDialog CommConfigDialogW
+#define GetDefaultCommConfig GetDefaultCommConfigW
+#define SetDefaultCommConfig SetDefaultCommConfigW
+#define GetComputerName GetComputerNameW
+#define SetComputerName SetComputerNameW
+#define GetComputerNameEx GetComputerNameExW
+#define SetComputerNameEx SetComputerNameExW
+#define DnsHostnameToComputerName DnsHostnameToComputerNameW
+#define GetUserName GetUserNameW
+#else
+#define FindFirstFileEx FindFirstFileExA
+#define FindFirstFile FindFirstFileA
+#define FindNextFile FindNextFileA
+#define SearchPath SearchPathA
+#define CopyFile CopyFileA
+#define CopyFileEx CopyFileExA
+#define MoveFile MoveFileA
+#define MoveFileEx MoveFileExA
+#define MoveFileWithProgress MoveFileWithProgressA
+#define ReplaceFile ReplaceFileA
+#define CreateHardLink CreateHardLinkA
+#define CreateNamedPipe CreateNamedPipeA
+#define GetNamedPipeHandleState GetNamedPipeHandleStateA
+#define CallNamedPipe CallNamedPipeA
+#define WaitNamedPipe WaitNamedPipeA
+#define SetVolumeLabel SetVolumeLabelA
+#define GetVolumeInformation GetVolumeInformationA
+#define ClearEventLog ClearEventLogA
+#define BackupEventLog BackupEventLogA
+#define OpenEventLog OpenEventLogA
+#define RegisterEventSource RegisterEventSourceA
+#define OpenBackupEventLog OpenBackupEventLogA
+#define ReadEventLog ReadEventLogA
+#define ReportEvent ReportEventA
+#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
+#define AccessCheckByTypeAndAuditAlarm AccessCheckByTypeAndAuditAlarmA
+#define AccessCheckByTypeResultListAndAuditAlarm AccessCheckByTypeResultListAndAuditAlarmA
+#define AccessCheckByTypeResultListAndAuditAlarmByHandle AccessCheckByTypeResultListAndAuditAlarmByHandleA
+#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA
+#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA
+#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA
+#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA
+#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA
+#define SetFileSecurity SetFileSecurityA
+#define GetFileSecurity GetFileSecurityA
+#define FindFirstChangeNotification FindFirstChangeNotificationA
+#define IsBadStringPtr IsBadStringPtrA
+#define LookupAccountSid LookupAccountSidA
+#define LookupAccountName LookupAccountNameA
+#define LookupPrivilegeValue LookupPrivilegeValueA
+#define LookupPrivilegeName LookupPrivilegeNameA
+#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA
+#define BuildCommDCB BuildCommDCBA
+#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA
+#define CommConfigDialog CommConfigDialogA
+#define GetDefaultCommConfig GetDefaultCommConfigA
+#define SetDefaultCommConfig SetDefaultCommConfigA
+#define GetComputerName GetComputerNameA
+#define SetComputerName SetComputerNameA
+#define GetComputerNameEx GetComputerNameExA
+#define SetComputerNameEx SetComputerNameExA
+#define DnsHostnameToComputerName DnsHostnameToComputerNameA
+#define GetUserName GetUserNameA
+#endif
+
+ WINBASEAPI HANDLE WINAPI FindFirstFileExA(LPCSTR lpFileName,FINDEX_INFO_LEVELS fInfoLevelId,LPVOID lpFindFileData,FINDEX_SEARCH_OPS fSearchOp,LPVOID lpSearchFilter,DWORD dwAdditionalFlags);
+ WINBASEAPI HANDLE WINAPI FindFirstFileExW(LPCWSTR lpFileName,FINDEX_INFO_LEVELS fInfoLevelId,LPVOID lpFindFileData,FINDEX_SEARCH_OPS fSearchOp,LPVOID lpSearchFilter,DWORD dwAdditionalFlags);
+ WINBASEAPI HANDLE WINAPI FindFirstFileA(LPCSTR lpFileName,LPWIN32_FIND_DATAA lpFindFileData);
+ WINBASEAPI HANDLE WINAPI FindFirstFileW(LPCWSTR lpFileName,LPWIN32_FIND_DATAW lpFindFileData);
+ WINBASEAPI WINBOOL WINAPI FindNextFileA(HANDLE hFindFile,LPWIN32_FIND_DATAA lpFindFileData);
+ WINBASEAPI WINBOOL WINAPI FindNextFileW(HANDLE hFindFile,LPWIN32_FIND_DATAW lpFindFileData);
+ WINBASEAPI DWORD WINAPI SearchPathA(LPCSTR lpPath,LPCSTR lpFileName,LPCSTR lpExtension,DWORD nBufferLength,LPSTR lpBuffer,LPSTR *lpFilePart);
+ WINBASEAPI DWORD WINAPI SearchPathW(LPCWSTR lpPath,LPCWSTR lpFileName,LPCWSTR lpExtension,DWORD nBufferLength,LPWSTR lpBuffer,LPWSTR *lpFilePart);
+ WINBASEAPI WINBOOL WINAPI CopyFileA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,WINBOOL bFailIfExists);
+ WINBASEAPI WINBOOL WINAPI CopyFileW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,WINBOOL bFailIfExists);
+
+ typedef DWORD (WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER TotalFileSize,LARGE_INTEGER TotalBytesTransferred,LARGE_INTEGER StreamSize,LARGE_INTEGER StreamBytesTransferred,DWORD dwStreamNumber,DWORD dwCallbackReason,HANDLE hSourceFile,HANDLE hDestinationFile,LPVOID lpData);
+
+ WINBASEAPI WINBOOL WINAPI CopyFileExA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,LPBOOL pbCancel,DWORD dwCopyFlags);
+ WINBASEAPI WINBOOL WINAPI CopyFileExW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,LPBOOL pbCancel,DWORD dwCopyFlags);
+ WINBASEAPI WINBOOL WINAPI MoveFileA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName);
+ WINBASEAPI WINBOOL WINAPI MoveFileW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName);
+ WINBASEAPI WINBOOL WINAPI MoveFileExA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,DWORD dwFlags);
+ WINBASEAPI WINBOOL WINAPI MoveFileExW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,DWORD dwFlags);
+ WINBASEAPI WINBOOL WINAPI MoveFileWithProgressA(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,DWORD dwFlags);
+ WINBASEAPI WINBOOL WINAPI MoveFileWithProgressW(LPCWSTR lpExistingFileName,LPCWSTR lpNewFileName,LPPROGRESS_ROUTINE lpProgressRoutine,LPVOID lpData,DWORD dwFlags);
+
+#define MOVEFILE_REPLACE_EXISTING 0x1
+#define MOVEFILE_COPY_ALLOWED 0x2
+#define MOVEFILE_DELAY_UNTIL_REBOOT 0x4
+#define MOVEFILE_WRITE_THROUGH 0x8
+#define MOVEFILE_CREATE_HARDLINK 0x10
+#define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x20
+
+ WINBASEAPI WINBOOL WINAPI ReplaceFileA(LPCSTR lpReplacedFileName,LPCSTR lpReplacementFileName,LPCSTR lpBackupFileName,DWORD dwReplaceFlags,LPVOID lpExclude,LPVOID lpReserved);
+ WINBASEAPI WINBOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName,LPCWSTR lpReplacementFileName,LPCWSTR lpBackupFileName,DWORD dwReplaceFlags,LPVOID lpExclude,LPVOID lpReserved);
+ WINBASEAPI WINBOOL WINAPI CreateHardLinkA(LPCSTR lpFileName,LPCSTR lpExistingFileName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINBASEAPI WINBOOL WINAPI CreateHardLinkW(LPCWSTR lpFileName,LPCWSTR lpExistingFileName,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+
+ typedef enum _STREAM_INFO_LEVELS {
+ FindStreamInfoStandard,FindStreamInfoMaxInfoLevel
+ } STREAM_INFO_LEVELS;
+
+ typedef struct _WIN32_FIND_STREAM_DATA {
+ LARGE_INTEGER StreamSize;
+ WCHAR cStreamName[MAX_PATH + 36];
+ } WIN32_FIND_STREAM_DATA,*PWIN32_FIND_STREAM_DATA;
+
+ HANDLE WINAPI FindFirstStreamW(LPCWSTR lpFileName,STREAM_INFO_LEVELS InfoLevel,LPVOID lpFindStreamData,DWORD dwFlags);
+ WINBOOL WINAPI FindNextStreamW(HANDLE hFindStream,LPVOID lpFindStreamData);
+ WINBASEAPI HANDLE WINAPI CreateNamedPipeA(LPCSTR lpName,DWORD dwOpenMode,DWORD dwPipeMode,DWORD nMaxInstances,DWORD nOutBufferSize,DWORD nInBufferSize,DWORD nDefaultTimeOut,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINBASEAPI HANDLE WINAPI CreateNamedPipeW(LPCWSTR lpName,DWORD dwOpenMode,DWORD dwPipeMode,DWORD nMaxInstances,DWORD nOutBufferSize,DWORD nInBufferSize,DWORD nDefaultTimeOut,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINBASEAPI WINBOOL WINAPI GetNamedPipeHandleStateA(HANDLE hNamedPipe,LPDWORD lpState,LPDWORD lpCurInstances,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout,LPSTR lpUserName,DWORD nMaxUserNameSize);
+ WINBASEAPI WINBOOL WINAPI GetNamedPipeHandleStateW(HANDLE hNamedPipe,LPDWORD lpState,LPDWORD lpCurInstances,LPDWORD lpMaxCollectionCount,LPDWORD lpCollectDataTimeout,LPWSTR lpUserName,DWORD nMaxUserNameSize);
+ WINBASEAPI WINBOOL WINAPI CallNamedPipeA(LPCSTR lpNamedPipeName,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,DWORD nTimeOut);
+ WINBASEAPI WINBOOL WINAPI CallNamedPipeW(LPCWSTR lpNamedPipeName,LPVOID lpInBuffer,DWORD nInBufferSize,LPVOID lpOutBuffer,DWORD nOutBufferSize,LPDWORD lpBytesRead,DWORD nTimeOut);
+ WINBASEAPI WINBOOL WINAPI WaitNamedPipeA(LPCSTR lpNamedPipeName,DWORD nTimeOut);
+ WINBASEAPI WINBOOL WINAPI WaitNamedPipeW(LPCWSTR lpNamedPipeName,DWORD nTimeOut);
+ WINBASEAPI WINBOOL WINAPI SetVolumeLabelA(LPCSTR lpRootPathName,LPCSTR lpVolumeName);
+ WINBASEAPI WINBOOL WINAPI SetVolumeLabelW(LPCWSTR lpRootPathName,LPCWSTR lpVolumeName);
+ WINBASEAPI VOID WINAPI SetFileApisToOEM(VOID);
+ WINBASEAPI VOID WINAPI SetFileApisToANSI(VOID);
+ WINBASEAPI WINBOOL WINAPI AreFileApisANSI(VOID);
+ WINBASEAPI WINBOOL WINAPI GetVolumeInformationA(LPCSTR lpRootPathName,LPSTR lpVolumeNameBuffer,DWORD nVolumeNameSize,LPDWORD lpVolumeSerialNumber,LPDWORD lpMaximumComponentLength,LPDWORD lpFileSystemFlags,LPSTR lpFileSystemNameBuffer,DWORD nFileSystemNameSize);
+ WINBASEAPI WINBOOL WINAPI GetVolumeInformationW(LPCWSTR lpRootPathName,LPWSTR lpVolumeNameBuffer,DWORD nVolumeNameSize,LPDWORD lpVolumeSerialNumber,LPDWORD lpMaximumComponentLength,LPDWORD lpFileSystemFlags,LPWSTR lpFileSystemNameBuffer,DWORD nFileSystemNameSize);
+ WINBASEAPI WINBOOL WINAPI CancelIo(HANDLE hFile);
+ WINADVAPI WINBOOL WINAPI ClearEventLogA(HANDLE hEventLog,LPCSTR lpBackupFileName);
+ WINADVAPI WINBOOL WINAPI ClearEventLogW(HANDLE hEventLog,LPCWSTR lpBackupFileName);
+ WINADVAPI WINBOOL WINAPI BackupEventLogA(HANDLE hEventLog,LPCSTR lpBackupFileName);
+ WINADVAPI WINBOOL WINAPI BackupEventLogW(HANDLE hEventLog,LPCWSTR lpBackupFileName);
+ WINADVAPI WINBOOL WINAPI CloseEventLog(HANDLE hEventLog);
+ WINADVAPI WINBOOL WINAPI DeregisterEventSource(HANDLE hEventLog);
+ WINADVAPI WINBOOL WINAPI NotifyChangeEventLog(HANDLE hEventLog,HANDLE hEvent);
+ WINADVAPI WINBOOL WINAPI GetNumberOfEventLogRecords(HANDLE hEventLog,PDWORD NumberOfRecords);
+ WINADVAPI WINBOOL WINAPI GetOldestEventLogRecord(HANDLE hEventLog,PDWORD OldestRecord);
+ WINADVAPI HANDLE WINAPI OpenEventLogA(LPCSTR lpUNCServerName,LPCSTR lpSourceName);
+ WINADVAPI HANDLE WINAPI OpenEventLogW(LPCWSTR lpUNCServerName,LPCWSTR lpSourceName);
+ WINADVAPI HANDLE WINAPI RegisterEventSourceA(LPCSTR lpUNCServerName,LPCSTR lpSourceName);
+ WINADVAPI HANDLE WINAPI RegisterEventSourceW(LPCWSTR lpUNCServerName,LPCWSTR lpSourceName);
+ WINADVAPI HANDLE WINAPI OpenBackupEventLogA(LPCSTR lpUNCServerName,LPCSTR lpFileName);
+ WINADVAPI HANDLE WINAPI OpenBackupEventLogW(LPCWSTR lpUNCServerName,LPCWSTR lpFileName);
+ WINADVAPI WINBOOL WINAPI ReadEventLogA(HANDLE hEventLog,DWORD dwReadFlags,DWORD dwRecordOffset,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,DWORD *pnBytesRead,DWORD *pnMinNumberOfBytesNeeded);
+ WINADVAPI WINBOOL WINAPI ReadEventLogW(HANDLE hEventLog,DWORD dwReadFlags,DWORD dwRecordOffset,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,DWORD *pnBytesRead,DWORD *pnMinNumberOfBytesNeeded);
+ WINADVAPI WINBOOL WINAPI ReportEventA(HANDLE hEventLog,WORD wType,WORD wCategory,DWORD dwEventID,PSID lpUserSid,WORD wNumStrings,DWORD dwDataSize,LPCSTR *lpStrings,LPVOID lpRawData);
+ WINADVAPI WINBOOL WINAPI ReportEventW(HANDLE hEventLog,WORD wType,WORD wCategory,DWORD dwEventID,PSID lpUserSid,WORD wNumStrings,DWORD dwDataSize,LPCWSTR *lpStrings,LPVOID lpRawData);
+
+#define EVENTLOG_FULL_INFO 0
+
+ typedef struct _EVENTLOG_FULL_INFORMATION {
+ DWORD dwFull;
+ } EVENTLOG_FULL_INFORMATION,*LPEVENTLOG_FULL_INFORMATION;
+
+ WINADVAPI WINBOOL WINAPI GetEventLogInformation(HANDLE hEventLog,DWORD dwInfoLevel,LPVOID lpBuffer,DWORD cbBufSize,LPDWORD pcbBytesNeeded);
+ WINADVAPI WINBOOL WINAPI DuplicateToken(HANDLE ExistingTokenHandle,SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,PHANDLE DuplicateTokenHandle);
+ WINADVAPI WINBOOL WINAPI GetKernelObjectSecurity(HANDLE Handle,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded);
+ WINADVAPI WINBOOL WINAPI ImpersonateNamedPipeClient(HANDLE hNamedPipe);
+ WINADVAPI WINBOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel);
+ WINADVAPI WINBOOL WINAPI RevertToSelf(VOID);
+ WINADVAPI WINBOOL WINAPI SetThreadToken (PHANDLE Thread,HANDLE Token);
+ WINADVAPI WINBOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccess,LPBOOL AccessStatus);
+ WINADVAPI WINBOOL WINAPI AccessCheckByType(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID PrincipalSelfSid,HANDLE ClientToken,DWORD DesiredAccess,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccess,LPBOOL AccessStatus);
+ WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultList(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID PrincipalSelfSid,HANDLE ClientToken,DWORD DesiredAccess,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,PPRIVILEGE_SET PrivilegeSet,LPDWORD PrivilegeSetLength,LPDWORD GrantedAccessList,LPDWORD AccessStatusList);
+ WINADVAPI WINBOOL WINAPI OpenProcessToken(HANDLE ProcessHandle,DWORD DesiredAccess,PHANDLE TokenHandle);
+ WINADVAPI WINBOOL WINAPI OpenThreadToken(HANDLE ThreadHandle,DWORD DesiredAccess,WINBOOL OpenAsSelf,PHANDLE TokenHandle);
+ WINADVAPI WINBOOL WINAPI GetTokenInformation(HANDLE TokenHandle,TOKEN_INFORMATION_CLASS TokenInformationClass,LPVOID TokenInformation,DWORD TokenInformationLength,PDWORD ReturnLength);
+ WINADVAPI WINBOOL WINAPI SetTokenInformation(HANDLE TokenHandle,TOKEN_INFORMATION_CLASS TokenInformationClass,LPVOID TokenInformation,DWORD TokenInformationLength);
+ WINADVAPI WINBOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle,WINBOOL DisableAllPrivileges,PTOKEN_PRIVILEGES NewState,DWORD BufferLength,PTOKEN_PRIVILEGES PreviousState,PDWORD ReturnLength);
+ WINADVAPI WINBOOL WINAPI AdjustTokenGroups(HANDLE TokenHandle,WINBOOL ResetToDefault,PTOKEN_GROUPS NewState,DWORD BufferLength,PTOKEN_GROUPS PreviousState,PDWORD ReturnLength);
+ WINADVAPI WINBOOL WINAPI PrivilegeCheck(HANDLE ClientToken,PPRIVILEGE_SET RequiredPrivileges,LPBOOL pfResult);
+ WINADVAPI WINBOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPSTR ObjectTypeName,LPSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose);
+ WINADVAPI WINBOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPWSTR ObjectTypeName,LPWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,DWORD DesiredAccess,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose);
+ WINADVAPI WINBOOL WINAPI AccessCheckByTypeAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose);
+ WINADVAPI WINBOOL WINAPI AccessCheckByTypeAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPBOOL AccessStatus,LPBOOL pfGenerateOnClose);
+ WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose);
+ WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose);
+ WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmByHandleA(LPCSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,LPCSTR ObjectTypeName,LPCSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose);
+ WINADVAPI WINBOOL WINAPI AccessCheckByTypeResultListAndAuditAlarmByHandleW(LPCWSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,LPCWSTR ObjectTypeName,LPCWSTR ObjectName,PSECURITY_DESCRIPTOR SecurityDescriptor,PSID PrincipalSelfSid,DWORD DesiredAccess,AUDIT_EVENT_TYPE AuditType,DWORD Flags,POBJECT_TYPE_LIST ObjectTypeList,DWORD ObjectTypeListLength,PGENERIC_MAPPING GenericMapping,WINBOOL ObjectCreation,LPDWORD GrantedAccess,LPDWORD AccessStatusList,LPBOOL pfGenerateOnClose);
+ WINADVAPI WINBOOL WINAPI ObjectOpenAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,LPSTR ObjectTypeName,LPSTR ObjectName,PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,DWORD GrantedAccess,PPRIVILEGE_SET Privileges,WINBOOL ObjectCreation,WINBOOL AccessGranted,LPBOOL GenerateOnClose);
+ WINADVAPI WINBOOL WINAPI ObjectOpenAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,LPWSTR ObjectTypeName,LPWSTR ObjectName,PSECURITY_DESCRIPTOR pSecurityDescriptor,HANDLE ClientToken,DWORD DesiredAccess,DWORD GrantedAccess,PPRIVILEGE_SET Privileges,WINBOOL ObjectCreation,WINBOOL AccessGranted,LPBOOL GenerateOnClose);
+ WINADVAPI WINBOOL WINAPI ObjectPrivilegeAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,DWORD DesiredAccess,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted);
+ WINADVAPI WINBOOL WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,HANDLE ClientToken,DWORD DesiredAccess,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted);
+ WINADVAPI WINBOOL WINAPI ObjectCloseAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose);
+ WINADVAPI WINBOOL WINAPI ObjectCloseAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose);
+ WINADVAPI WINBOOL WINAPI ObjectDeleteAuditAlarmA(LPCSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose);
+ WINADVAPI WINBOOL WINAPI ObjectDeleteAuditAlarmW(LPCWSTR SubsystemName,LPVOID HandleId,WINBOOL GenerateOnClose);
+ WINADVAPI WINBOOL WINAPI PrivilegedServiceAuditAlarmA(LPCSTR SubsystemName,LPCSTR ServiceName,HANDLE ClientToken,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted);
+ WINADVAPI WINBOOL WINAPI PrivilegedServiceAuditAlarmW(LPCWSTR SubsystemName,LPCWSTR ServiceName,HANDLE ClientToken,PPRIVILEGE_SET Privileges,WINBOOL AccessGranted);
+ WINADVAPI WINBOOL WINAPI IsWellKnownSid(PSID pSid,WELL_KNOWN_SID_TYPE WellKnownSidType);
+ WINADVAPI WINBOOL WINAPI CreateWellKnownSid(WELL_KNOWN_SID_TYPE WellKnownSidType,PSID DomainSid,PSID pSid,DWORD *cbSid);
+ WINADVAPI WINBOOL WINAPI EqualDomainSid(PSID pSid1,PSID pSid2,WINBOOL *pfEqual);
+ WINADVAPI WINBOOL WINAPI GetWindowsAccountDomainSid(PSID pSid,PSID pDomainSid,DWORD *cbDomainSid);
+ WINADVAPI WINBOOL WINAPI IsValidSid(PSID pSid);
+ WINADVAPI WINBOOL WINAPI EqualSid(PSID pSid1,PSID pSid2);
+ WINADVAPI WINBOOL WINAPI EqualPrefixSid(PSID pSid1,PSID pSid2);
+ WINADVAPI DWORD WINAPI GetSidLengthRequired (UCHAR nSubAuthorityCount);
+ WINADVAPI WINBOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,BYTE nSubAuthorityCount,DWORD nSubAuthority0,DWORD nSubAuthority1,DWORD nSubAuthority2,DWORD nSubAuthority3,DWORD nSubAuthority4,DWORD nSubAuthority5,DWORD nSubAuthority6,DWORD nSubAuthority7,PSID *pSid);
+ WINADVAPI PVOID WINAPI FreeSid(PSID pSid);
+ WINADVAPI WINBOOL WINAPI InitializeSid(PSID Sid,PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,BYTE nSubAuthorityCount);
+ WINADVAPI PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID pSid);
+ WINADVAPI PDWORD WINAPI GetSidSubAuthority(PSID pSid,DWORD nSubAuthority);
+ WINADVAPI PUCHAR WINAPI GetSidSubAuthorityCount(PSID pSid);
+ WINADVAPI DWORD WINAPI GetLengthSid(PSID pSid);
+ WINADVAPI WINBOOL WINAPI CopySid(DWORD nDestinationSidLength,PSID pDestinationSid,PSID pSourceSid);
+ WINADVAPI WINBOOL WINAPI AreAllAccessesGranted(DWORD GrantedAccess,DWORD DesiredAccess);
+ WINADVAPI WINBOOL WINAPI AreAnyAccessesGranted(DWORD GrantedAccess,DWORD DesiredAccess);
+ WINADVAPI VOID WINAPI MapGenericMask(PDWORD AccessMask,PGENERIC_MAPPING GenericMapping);
+ WINADVAPI WINBOOL WINAPI IsValidAcl(PACL pAcl);
+ WINADVAPI WINBOOL WINAPI InitializeAcl(PACL pAcl,DWORD nAclLength,DWORD dwAclRevision);
+ WINADVAPI WINBOOL WINAPI GetAclInformation(PACL pAcl,LPVOID pAclInformation,DWORD nAclInformationLength,ACL_INFORMATION_CLASS dwAclInformationClass);
+ WINADVAPI WINBOOL WINAPI SetAclInformation(PACL pAcl,LPVOID pAclInformation,DWORD nAclInformationLength,ACL_INFORMATION_CLASS dwAclInformationClass);
+ WINADVAPI WINBOOL WINAPI AddAce(PACL pAcl,DWORD dwAceRevision,DWORD dwStartingAceIndex,LPVOID pAceList,DWORD nAceListLength);
+ WINADVAPI WINBOOL WINAPI DeleteAce(PACL pAcl,DWORD dwAceIndex);
+ WINADVAPI WINBOOL WINAPI GetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce);
+ WINADVAPI WINBOOL WINAPI AddAccessAllowedAce(PACL pAcl,DWORD dwAceRevision,DWORD AccessMask,PSID pSid);
+ WINADVAPI WINBOOL WINAPI AddAccessAllowedAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,PSID pSid);
+ WINADVAPI WINBOOL WINAPI AddAccessDeniedAce(PACL pAcl,DWORD dwAceRevision,DWORD AccessMask,PSID pSid);
+ WINADVAPI WINBOOL WINAPI AddAccessDeniedAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,PSID pSid);
+ WINADVAPI WINBOOL WINAPI AddAuditAccessAce(PACL pAcl,DWORD dwAceRevision,DWORD dwAccessMask,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure);
+ WINADVAPI WINBOOL WINAPI AddAuditAccessAceEx(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD dwAccessMask,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure);
+ WINADVAPI WINBOOL WINAPI AddAccessAllowedObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid);
+ WINADVAPI WINBOOL WINAPI AddAccessDeniedObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid);
+ WINADVAPI WINBOOL WINAPI AddAuditAccessObjectAce(PACL pAcl,DWORD dwAceRevision,DWORD AceFlags,DWORD AccessMask,GUID *ObjectTypeGuid,GUID *InheritedObjectTypeGuid,PSID pSid,WINBOOL bAuditSuccess,WINBOOL bAuditFailure);
+ WINADVAPI WINBOOL WINAPI FindFirstFreeAce(PACL pAcl,LPVOID *pAce);
+ WINADVAPI WINBOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD dwRevision);
+ WINADVAPI WINBOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor);
+ WINADVAPI DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor);
+ WINADVAPI WINBOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSECURITY_DESCRIPTOR_CONTROL pControl,LPDWORD lpdwRevision);
+ WINADVAPI WINBOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR pSecurityDescriptor,SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest,SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet);
+ WINADVAPI WINBOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,WINBOOL bDaclPresent,PACL pDacl,WINBOOL bDaclDefaulted);
+ WINADVAPI WINBOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,LPBOOL lpbDaclPresent,PACL *pDacl,LPBOOL lpbDaclDefaulted);
+ WINADVAPI WINBOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,WINBOOL bSaclPresent,PACL pSacl,WINBOOL bSaclDefaulted);
+ WINADVAPI WINBOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,LPBOOL lpbSaclPresent,PACL *pSacl,LPBOOL lpbSaclDefaulted);
+ WINADVAPI WINBOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID pOwner,WINBOOL bOwnerDefaulted);
+ WINADVAPI WINBOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID *pOwner,LPBOOL lpbOwnerDefaulted);
+ WINADVAPI WINBOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID pGroup,WINBOOL bGroupDefaulted);
+ WINADVAPI WINBOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR pSecurityDescriptor,PSID *pGroup,LPBOOL lpbGroupDefaulted);
+ WINADVAPI DWORD WINAPI SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,PUCHAR RMControl);
+ WINADVAPI DWORD WINAPI GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor,PUCHAR RMControl);
+ WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,WINBOOL IsDirectoryObject,HANDLE Token,PGENERIC_MAPPING GenericMapping);
+ WINADVAPI WINBOOL WINAPI ConvertToAutoInheritPrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CurrentSecurityDescriptor,PSECURITY_DESCRIPTOR *NewSecurityDescriptor,GUID *ObjectType,BOOLEAN IsDirectoryObject,PGENERIC_MAPPING GenericMapping);
+ WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurityEx(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,GUID *ObjectType,WINBOOL IsContainerObject,ULONG AutoInheritFlags,HANDLE Token,PGENERIC_MAPPING GenericMapping);
+ WINADVAPI WINBOOL WINAPI CreatePrivateObjectSecurityWithMultipleInheritance(PSECURITY_DESCRIPTOR ParentDescriptor,PSECURITY_DESCRIPTOR CreatorDescriptor,PSECURITY_DESCRIPTOR *NewDescriptor,GUID **ObjectTypes,ULONG GuidCount,WINBOOL IsContainerObject,ULONG AutoInheritFlags,HANDLE Token,PGENERIC_MAPPING GenericMapping);
+ WINADVAPI WINBOOL WINAPI SetPrivateObjectSecurity (SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ModificationDescriptor,PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,PGENERIC_MAPPING GenericMapping,HANDLE Token);
+ WINADVAPI WINBOOL WINAPI SetPrivateObjectSecurityEx (SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ModificationDescriptor,PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,ULONG AutoInheritFlags,PGENERIC_MAPPING GenericMapping,HANDLE Token);
+ WINADVAPI WINBOOL WINAPI GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR ObjectDescriptor,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR ResultantDescriptor,DWORD DescriptorLength,PDWORD ReturnLength);
+ WINADVAPI WINBOOL WINAPI DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR *ObjectDescriptor);
+ WINADVAPI WINBOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,LPDWORD lpdwBufferLength);
+ WINADVAPI WINBOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,LPDWORD lpdwAbsoluteSecurityDescriptorSize,PACL pDacl,LPDWORD lpdwDaclSize,PACL pSacl,LPDWORD lpdwSaclSize,PSID pOwner,LPDWORD lpdwOwnerSize,PSID pPrimaryGroup,LPDWORD lpdwPrimaryGroupSize);
+ WINADVAPI WINBOOL WINAPI MakeAbsoluteSD2(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,LPDWORD lpdwBufferSize);
+ WINADVAPI WINBOOL WINAPI SetFileSecurityA(LPCSTR lpFileName,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor);
+ WINADVAPI WINBOOL WINAPI SetFileSecurityW(LPCWSTR lpFileName,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor);
+ WINADVAPI WINBOOL WINAPI GetFileSecurityA(LPCSTR lpFileName,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded);
+ WINADVAPI WINBOOL WINAPI GetFileSecurityW(LPCWSTR lpFileName,SECURITY_INFORMATION RequestedInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,DWORD nLength,LPDWORD lpnLengthNeeded);
+ WINADVAPI WINBOOL WINAPI SetKernelObjectSecurity(HANDLE Handle,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR SecurityDescriptor);
+ WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR lpPathName,WINBOOL bWatchSubtree,DWORD dwNotifyFilter);
+ WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR lpPathName,WINBOOL bWatchSubtree,DWORD dwNotifyFilter);
+ WINBASEAPI WINBOOL WINAPI FindNextChangeNotification(HANDLE hChangeHandle);
+ WINBASEAPI WINBOOL WINAPI FindCloseChangeNotification(HANDLE hChangeHandle);
+ WINBASEAPI WINBOOL WINAPI ReadDirectoryChangesW(HANDLE hDirectory,LPVOID lpBuffer,DWORD nBufferLength,WINBOOL bWatchSubtree,DWORD dwNotifyFilter,LPDWORD lpBytesReturned,LPOVERLAPPED lpOverlapped,LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine);
+ WINBASEAPI WINBOOL WINAPI VirtualLock(LPVOID lpAddress,SIZE_T dwSize);
+ WINBASEAPI WINBOOL WINAPI VirtualUnlock(LPVOID lpAddress,SIZE_T dwSize);
+ WINBASEAPI LPVOID WINAPI MapViewOfFileEx(HANDLE hFileMappingObject,DWORD dwDesiredAccess,DWORD dwFileOffsetHigh,DWORD dwFileOffsetLow,SIZE_T dwNumberOfBytesToMap,LPVOID lpBaseAddress);
+ WINBASEAPI WINBOOL WINAPI SetPriorityClass(HANDLE hProcess,DWORD dwPriorityClass);
+ WINBASEAPI DWORD WINAPI GetPriorityClass(HANDLE hProcess);
+ WINBASEAPI WINBOOL WINAPI IsBadReadPtr(CONST VOID *lp,UINT_PTR ucb);
+ WINBASEAPI WINBOOL WINAPI IsBadWritePtr(LPVOID lp,UINT_PTR ucb);
+ WINBASEAPI WINBOOL WINAPI IsBadHugeReadPtr(CONST VOID *lp,UINT_PTR ucb);
+ WINBASEAPI WINBOOL WINAPI IsBadHugeWritePtr(LPVOID lp,UINT_PTR ucb);
+ WINBASEAPI WINBOOL WINAPI IsBadCodePtr(FARPROC lpfn);
+ WINBASEAPI WINBOOL WINAPI IsBadStringPtrA(LPCSTR lpsz,UINT_PTR ucchMax);
+ WINBASEAPI WINBOOL WINAPI IsBadStringPtrW(LPCWSTR lpsz,UINT_PTR ucchMax);
+ WINADVAPI WINBOOL WINAPI LookupAccountSidA(LPCSTR lpSystemName,PSID Sid,LPSTR Name,LPDWORD cchName,LPSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse);
+ WINADVAPI WINBOOL WINAPI LookupAccountSidW(LPCWSTR lpSystemName,PSID Sid,LPWSTR Name,LPDWORD cchName,LPWSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse);
+ WINADVAPI WINBOOL WINAPI LookupAccountNameA(LPCSTR lpSystemName,LPCSTR lpAccountName,PSID Sid,LPDWORD cbSid,LPSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse);
+ WINADVAPI WINBOOL WINAPI LookupAccountNameW(LPCWSTR lpSystemName,LPCWSTR lpAccountName,PSID Sid,LPDWORD cbSid,LPWSTR ReferencedDomainName,LPDWORD cchReferencedDomainName,PSID_NAME_USE peUse);
+ WINADVAPI WINBOOL WINAPI LookupPrivilegeValueA(LPCSTR lpSystemName,LPCSTR lpName,PLUID lpLuid);
+ WINADVAPI WINBOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName,LPCWSTR lpName,PLUID lpLuid);
+ WINADVAPI WINBOOL WINAPI LookupPrivilegeNameA(LPCSTR lpSystemName,PLUID lpLuid,LPSTR lpName,LPDWORD cchName);
+ WINADVAPI WINBOOL WINAPI LookupPrivilegeNameW(LPCWSTR lpSystemName,PLUID lpLuid,LPWSTR lpName,LPDWORD cchName);
+ WINADVAPI WINBOOL WINAPI LookupPrivilegeDisplayNameA(LPCSTR lpSystemName,LPCSTR lpName,LPSTR lpDisplayName,LPDWORD cchDisplayName,LPDWORD lpLanguageId);
+ WINADVAPI WINBOOL WINAPI LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName,LPCWSTR lpName,LPWSTR lpDisplayName,LPDWORD cchDisplayName,LPDWORD lpLanguageId);
+ WINADVAPI WINBOOL WINAPI AllocateLocallyUniqueId(PLUID Luid);
+ WINBASEAPI WINBOOL WINAPI BuildCommDCBA(LPCSTR lpDef,LPDCB lpDCB);
+ WINBASEAPI WINBOOL WINAPI BuildCommDCBW(LPCWSTR lpDef,LPDCB lpDCB);
+ WINBASEAPI WINBOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR lpDef,LPDCB lpDCB,LPCOMMTIMEOUTS lpCommTimeouts);
+ WINBASEAPI WINBOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR lpDef,LPDCB lpDCB,LPCOMMTIMEOUTS lpCommTimeouts);
+ WINBASEAPI WINBOOL WINAPI CommConfigDialogA(LPCSTR lpszName,HWND hWnd,LPCOMMCONFIG lpCC);
+ WINBASEAPI WINBOOL WINAPI CommConfigDialogW(LPCWSTR lpszName,HWND hWnd,LPCOMMCONFIG lpCC);
+ WINBASEAPI WINBOOL WINAPI GetDefaultCommConfigA(LPCSTR lpszName,LPCOMMCONFIG lpCC,LPDWORD lpdwSize);
+ WINBASEAPI WINBOOL WINAPI GetDefaultCommConfigW(LPCWSTR lpszName,LPCOMMCONFIG lpCC,LPDWORD lpdwSize);
+ WINBASEAPI WINBOOL WINAPI SetDefaultCommConfigA(LPCSTR lpszName,LPCOMMCONFIG lpCC,DWORD dwSize);
+ WINBASEAPI WINBOOL WINAPI SetDefaultCommConfigW(LPCWSTR lpszName,LPCOMMCONFIG lpCC,DWORD dwSize);
+
+#define MAX_COMPUTERNAME_LENGTH 15
+
+ WINBASEAPI WINBOOL WINAPI GetComputerNameA(LPSTR lpBuffer,LPDWORD nSize);
+ WINBASEAPI WINBOOL WINAPI GetComputerNameW(LPWSTR lpBuffer,LPDWORD nSize);
+ WINBASEAPI WINBOOL WINAPI SetComputerNameA(LPCSTR lpComputerName);
+ WINBASEAPI WINBOOL WINAPI SetComputerNameW(LPCWSTR lpComputerName);
+
+ typedef enum _COMPUTER_NAME_FORMAT {
+ ComputerNameNetBIOS,ComputerNameDnsHostname,ComputerNameDnsDomain,ComputerNameDnsFullyQualified,ComputerNamePhysicalNetBIOS,ComputerNamePhysicalDnsHostname,ComputerNamePhysicalDnsDomain,ComputerNamePhysicalDnsFullyQualified,ComputerNameMax
+ } COMPUTER_NAME_FORMAT;
+
+ WINBASEAPI WINBOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT NameType,LPSTR lpBuffer,LPDWORD nSize);
+ WINBASEAPI WINBOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT NameType,LPWSTR lpBuffer,LPDWORD nSize);
+ WINBASEAPI WINBOOL WINAPI SetComputerNameExA(COMPUTER_NAME_FORMAT NameType,LPCSTR lpBuffer);
+ WINBASEAPI WINBOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT NameType,LPCWSTR lpBuffer);
+ WINBASEAPI WINBOOL WINAPI DnsHostnameToComputerNameA(LPCSTR Hostname,LPSTR ComputerName,LPDWORD nSize);
+ WINBASEAPI WINBOOL WINAPI DnsHostnameToComputerNameW(LPCWSTR Hostname,LPWSTR ComputerName,LPDWORD nSize);
+ WINADVAPI WINBOOL WINAPI GetUserNameA(LPSTR lpBuffer,LPDWORD pcbBuffer);
+ WINADVAPI WINBOOL WINAPI GetUserNameW(LPWSTR lpBuffer,LPDWORD pcbBuffer);
+
+#define LOGON32_LOGON_INTERACTIVE 2
+#define LOGON32_LOGON_NETWORK 3
+#define LOGON32_LOGON_BATCH 4
+#define LOGON32_LOGON_SERVICE 5
+#define LOGON32_LOGON_UNLOCK 7
+#define LOGON32_LOGON_NETWORK_CLEARTEXT 8
+#define LOGON32_LOGON_NEW_CREDENTIALS 9
+
+#define LOGON32_PROVIDER_DEFAULT 0
+#define LOGON32_PROVIDER_WINNT35 1
+#define LOGON32_PROVIDER_WINNT40 2
+#define LOGON32_PROVIDER_WINNT50 3
+
+#ifdef UNICODE
+#define LogonUser LogonUserW
+#define LogonUserEx LogonUserExW
+#define CreateProcessAsUser CreateProcessAsUserW
+#else
+#define LogonUser LogonUserA
+#define LogonUserEx LogonUserExA
+#define CreateProcessAsUser CreateProcessAsUserA
+#endif
+
+ WINADVAPI WINBOOL WINAPI LogonUserA(LPCSTR lpszUsername,LPCSTR lpszDomain,LPCSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken);
+ WINADVAPI WINBOOL WINAPI LogonUserW(LPCWSTR lpszUsername,LPCWSTR lpszDomain,LPCWSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken);
+ WINADVAPI WINBOOL WINAPI LogonUserExA(LPCSTR lpszUsername,LPCSTR lpszDomain,LPCSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken,PSID *ppLogonSid,PVOID *ppProfileBuffer,LPDWORD pdwProfileLength,PQUOTA_LIMITS pQuotaLimits);
+ WINADVAPI WINBOOL WINAPI LogonUserExW(LPCWSTR lpszUsername,LPCWSTR lpszDomain,LPCWSTR lpszPassword,DWORD dwLogonType,DWORD dwLogonProvider,PHANDLE phToken,PSID *ppLogonSid,PVOID *ppProfileBuffer,LPDWORD pdwProfileLength,PQUOTA_LIMITS pQuotaLimits);
+ WINADVAPI WINBOOL WINAPI ImpersonateLoggedOnUser(HANDLE hToken);
+ WINADVAPI WINBOOL WINAPI CreateProcessAsUserA(HANDLE hToken,LPCSTR lpApplicationName,LPSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCSTR lpCurrentDirectory,LPSTARTUPINFOA lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
+ WINADVAPI WINBOOL WINAPI CreateProcessAsUserW(HANDLE hToken,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,WINBOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
+
+#define LOGON_WITH_PROFILE 0x1
+#define LOGON_NETCREDENTIALS_ONLY 0x2
+#define LOGON_ZERO_PASSWORD_BUFFER 0x80000000
+
+ WINADVAPI WINBOOL WINAPI CreateProcessWithLogonW(LPCWSTR lpUsername,LPCWSTR lpDomain,LPCWSTR lpPassword,DWORD dwLogonFlags,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
+ WINADVAPI WINBOOL WINAPI CreateProcessWithTokenW(HANDLE hToken,DWORD dwLogonFlags,LPCWSTR lpApplicationName,LPWSTR lpCommandLine,DWORD dwCreationFlags,LPVOID lpEnvironment,LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,LPPROCESS_INFORMATION lpProcessInformation);
+ WINADVAPI WINBOOL WINAPI ImpersonateAnonymousToken(HANDLE ThreadHandle);
+ WINADVAPI WINBOOL WINAPI DuplicateTokenEx(HANDLE hExistingToken,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpTokenAttributes,SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,TOKEN_TYPE TokenType,PHANDLE phNewToken);
+ WINADVAPI WINBOOL WINAPI CreateRestrictedToken(HANDLE ExistingTokenHandle,DWORD Flags,DWORD DisableSidCount,PSID_AND_ATTRIBUTES SidsToDisable,DWORD DeletePrivilegeCount,PLUID_AND_ATTRIBUTES PrivilegesToDelete,DWORD RestrictedSidCount,PSID_AND_ATTRIBUTES SidsToRestrict,PHANDLE NewTokenHandle);
+ WINADVAPI WINBOOL WINAPI IsTokenRestricted(HANDLE TokenHandle);
+ WINADVAPI WINBOOL WINAPI IsTokenUntrusted(HANDLE TokenHandle);
+ WINADVAPI WINBOOL WINAPI CheckTokenMembership(HANDLE TokenHandle,PSID SidToCheck,PBOOL IsMember);
+
+ typedef WAITORTIMERCALLBACKFUNC WAITORTIMERCALLBACK;
+
+ WINBASEAPI WINBOOL WINAPI RegisterWaitForSingleObject(PHANDLE phNewWaitObject,HANDLE hObject,WAITORTIMERCALLBACK Callback,PVOID Context,ULONG dwMilliseconds,ULONG dwFlags);
+ WINBASEAPI HANDLE WINAPI RegisterWaitForSingleObjectEx(HANDLE hObject,WAITORTIMERCALLBACK Callback,PVOID Context,ULONG dwMilliseconds,ULONG dwFlags);
+ WINBASEAPI WINBOOL WINAPI UnregisterWait(HANDLE WaitHandle);
+ WINBASEAPI WINBOOL WINAPI UnregisterWaitEx(HANDLE WaitHandle,HANDLE CompletionEvent);
+ WINBASEAPI WINBOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE Function,PVOID Context,ULONG Flags);
+ WINBASEAPI WINBOOL WINAPI BindIoCompletionCallback(HANDLE FileHandle,LPOVERLAPPED_COMPLETION_ROUTINE Function,ULONG Flags);
+ WINBASEAPI HANDLE WINAPI CreateTimerQueue(VOID);
+ WINBASEAPI WINBOOL WINAPI CreateTimerQueueTimer(PHANDLE phNewTimer,HANDLE TimerQueue,WAITORTIMERCALLBACK Callback,PVOID Parameter,DWORD DueTime,DWORD Period,ULONG Flags);
+ WINBASEAPI WINBOOL WINAPI ChangeTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer,ULONG DueTime,ULONG Period);
+ WINBASEAPI WINBOOL WINAPI DeleteTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer,HANDLE CompletionEvent);
+ WINBASEAPI WINBOOL WINAPI DeleteTimerQueueEx(HANDLE TimerQueue,HANDLE CompletionEvent);
+ WINBASEAPI HANDLE WINAPI SetTimerQueueTimer(HANDLE TimerQueue,WAITORTIMERCALLBACK Callback,PVOID Parameter,DWORD DueTime,DWORD Period,WINBOOL PreferIo);
+ WINBASEAPI WINBOOL WINAPI CancelTimerQueueTimer(HANDLE TimerQueue,HANDLE Timer);
+ WINBASEAPI WINBOOL WINAPI DeleteTimerQueue(HANDLE TimerQueue);
+
+#define HW_PROFILE_GUIDLEN 39
+#define MAX_PROFILE_LEN 80
+
+#define DOCKINFO_UNDOCKED (0x1)
+#define DOCKINFO_DOCKED (0x2)
+#define DOCKINFO_USER_SUPPLIED (0x4)
+#define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED)
+#define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED)
+
+ typedef struct tagHW_PROFILE_INFOA {
+ DWORD dwDockInfo;
+ CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
+ CHAR szHwProfileName[MAX_PROFILE_LEN];
+ } HW_PROFILE_INFOA,*LPHW_PROFILE_INFOA;
+
+ typedef struct tagHW_PROFILE_INFOW {
+ DWORD dwDockInfo;
+ WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
+ WCHAR szHwProfileName[MAX_PROFILE_LEN];
+ } HW_PROFILE_INFOW,*LPHW_PROFILE_INFOW;
+
+#ifdef UNICODE
+ typedef HW_PROFILE_INFOW HW_PROFILE_INFO;
+ typedef LPHW_PROFILE_INFOW LPHW_PROFILE_INFO;
+#else
+ typedef HW_PROFILE_INFOA HW_PROFILE_INFO;
+ typedef LPHW_PROFILE_INFOA LPHW_PROFILE_INFO;
+#endif
+
+#ifdef UNICODE
+#define GetCurrentHwProfile GetCurrentHwProfileW
+#define GetVersionEx GetVersionExW
+#define VerifyVersionInfo VerifyVersionInfoW
+#else
+#define GetCurrentHwProfile GetCurrentHwProfileA
+#define GetVersionEx GetVersionExA
+#define VerifyVersionInfo VerifyVersionInfoA
+#endif
+
+ WINADVAPI WINBOOL WINAPI GetCurrentHwProfileA (LPHW_PROFILE_INFOA lpHwProfileInfo);
+ WINADVAPI WINBOOL WINAPI GetCurrentHwProfileW (LPHW_PROFILE_INFOW lpHwProfileInfo);
+ WINBASEAPI WINBOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount);
+ WINBASEAPI WINBOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency);
+ WINBASEAPI WINBOOL WINAPI GetVersionExA(LPOSVERSIONINFOA lpVersionInformation);
+ WINBASEAPI WINBOOL WINAPI GetVersionExW(LPOSVERSIONINFOW lpVersionInformation);
+ WINBASEAPI WINBOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA lpVersionInformation,DWORD dwTypeMask,DWORDLONG dwlConditionMask);
+ WINBASEAPI WINBOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW lpVersionInformation,DWORD dwTypeMask,DWORDLONG dwlConditionMask);
+
+#include
+
+#define TC_NORMAL 0
+#define TC_HARDERR 1
+#define TC_GP_TRAP 2
+#define TC_SIGNAL 3
+
+#define AC_LINE_OFFLINE 0x0
+#define AC_LINE_ONLINE 0x1
+#define AC_LINE_BACKUP_POWER 0x2
+#define AC_LINE_UNKNOWN 0xff
+
+#define BATTERY_FLAG_HIGH 0x1
+#define BATTERY_FLAG_LOW 0x2
+#define BATTERY_FLAG_CRITICAL 0x4
+#define BATTERY_FLAG_CHARGING 0x8
+#define BATTERY_FLAG_NO_BATTERY 0x80
+#define BATTERY_FLAG_UNKNOWN 0xff
+
+#define BATTERY_PERCENTAGE_UNKNOWN 0xff
+
+#define BATTERY_LIFE_UNKNOWN 0xffffffff
+
+ typedef struct _SYSTEM_POWER_STATUS {
+ BYTE ACLineStatus;
+ BYTE BatteryFlag;
+ BYTE BatteryLifePercent;
+ BYTE Reserved1;
+ DWORD BatteryLifeTime;
+ DWORD BatteryFullLifeTime;
+ } SYSTEM_POWER_STATUS,*LPSYSTEM_POWER_STATUS;
+
+#ifdef UNICODE
+#define CreateJobObject CreateJobObjectW
+#define OpenJobObject OpenJobObjectW
+#define FindFirstVolume FindFirstVolumeW
+#define FindNextVolume FindNextVolumeW
+#define FindFirstVolumeMountPoint FindFirstVolumeMountPointW
+#define FindNextVolumeMountPoint FindNextVolumeMountPointW
+#define SetVolumeMountPoint SetVolumeMountPointW
+#define DeleteVolumeMountPoint DeleteVolumeMountPointW
+#define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointW
+#define GetVolumePathName GetVolumePathNameW
+#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameW
+#else
+#define CreateJobObject CreateJobObjectA
+#define OpenJobObject OpenJobObjectA
+#define FindFirstVolume FindFirstVolumeA
+#define FindNextVolume FindNextVolumeA
+#define FindFirstVolumeMountPoint FindFirstVolumeMountPointA
+#define FindNextVolumeMountPoint FindNextVolumeMountPointA
+#define SetVolumeMountPoint SetVolumeMountPointA
+#define DeleteVolumeMountPoint DeleteVolumeMountPointA
+#define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointA
+#define GetVolumePathName GetVolumePathNameA
+#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA
+#endif
+
+ WINBOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS lpSystemPowerStatus);
+ WINBOOL WINAPI SetSystemPowerState(WINBOOL fSuspend,WINBOOL fForce);
+ WINBASEAPI WINBOOL WINAPI AllocateUserPhysicalPages(HANDLE hProcess,PULONG_PTR NumberOfPages,PULONG_PTR PageArray);
+ WINBASEAPI WINBOOL WINAPI FreeUserPhysicalPages(HANDLE hProcess,PULONG_PTR NumberOfPages,PULONG_PTR PageArray);
+ WINBASEAPI WINBOOL WINAPI MapUserPhysicalPages(PVOID VirtualAddress,ULONG_PTR NumberOfPages,PULONG_PTR PageArray);
+ WINBASEAPI WINBOOL WINAPI MapUserPhysicalPagesScatter(PVOID *VirtualAddresses,ULONG_PTR NumberOfPages,PULONG_PTR PageArray);
+ WINBASEAPI HANDLE WINAPI CreateJobObjectA(LPSECURITY_ATTRIBUTES lpJobAttributes,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI CreateJobObjectW(LPSECURITY_ATTRIBUTES lpJobAttributes,LPCWSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenJobObjectA(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCSTR lpName);
+ WINBASEAPI HANDLE WINAPI OpenJobObjectW(DWORD dwDesiredAccess,WINBOOL bInheritHandle,LPCWSTR lpName);
+ WINBASEAPI WINBOOL WINAPI AssignProcessToJobObject(HANDLE hJob,HANDLE hProcess);
+ WINBASEAPI WINBOOL WINAPI TerminateJobObject(HANDLE hJob,UINT uExitCode);
+ WINBASEAPI WINBOOL WINAPI QueryInformationJobObject(HANDLE hJob,JOBOBJECTINFOCLASS JobObjectInformationClass,LPVOID lpJobObjectInformation,DWORD cbJobObjectInformationLength,LPDWORD lpReturnLength);
+ WINBASEAPI WINBOOL WINAPI SetInformationJobObject(HANDLE hJob,JOBOBJECTINFOCLASS JobObjectInformationClass,LPVOID lpJobObjectInformation,DWORD cbJobObjectInformationLength);
+ WINBASEAPI WINBOOL WINAPI IsProcessInJob(HANDLE ProcessHandle,HANDLE JobHandle,PBOOL Result);
+ WINBASEAPI WINBOOL WINAPI CreateJobSet(ULONG NumJob,PJOB_SET_ARRAY UserJobSet,ULONG Flags);
+ WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler (ULONG First,PVECTORED_EXCEPTION_HANDLER Handler);
+ WINBASEAPI ULONG WINAPI RemoveVectoredExceptionHandler(PVOID Handle);
+ WINBASEAPI PVOID WINAPI AddVectoredContinueHandler (ULONG First,PVECTORED_EXCEPTION_HANDLER Handler);
+ WINBASEAPI ULONG WINAPI RemoveVectoredContinueHandler(PVOID Handle);
+ WINBASEAPI HANDLE WINAPI FindFirstVolumeA(LPSTR lpszVolumeName,DWORD cchBufferLength);
+ WINBASEAPI HANDLE WINAPI FindFirstVolumeW(LPWSTR lpszVolumeName,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI FindNextVolumeA(HANDLE hFindVolume,LPSTR lpszVolumeName,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI FindNextVolumeW(HANDLE hFindVolume,LPWSTR lpszVolumeName,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI FindVolumeClose(HANDLE hFindVolume);
+ WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointA(LPCSTR lpszRootPathName,LPSTR lpszVolumeMountPoint,DWORD cchBufferLength);
+ WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointW(LPCWSTR lpszRootPathName,LPWSTR lpszVolumeMountPoint,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI FindNextVolumeMountPointA(HANDLE hFindVolumeMountPoint,LPSTR lpszVolumeMountPoint,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI FindNextVolumeMountPointW(HANDLE hFindVolumeMountPoint,LPWSTR lpszVolumeMountPoint,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI FindVolumeMountPointClose(HANDLE hFindVolumeMountPoint);
+ WINBASEAPI WINBOOL WINAPI SetVolumeMountPointA(LPCSTR lpszVolumeMountPoint,LPCSTR lpszVolumeName);
+ WINBASEAPI WINBOOL WINAPI SetVolumeMountPointW(LPCWSTR lpszVolumeMountPoint,LPCWSTR lpszVolumeName);
+ WINBASEAPI WINBOOL WINAPI DeleteVolumeMountPointA(LPCSTR lpszVolumeMountPoint);
+ WINBASEAPI WINBOOL WINAPI DeleteVolumeMountPointW(LPCWSTR lpszVolumeMountPoint);
+ WINBASEAPI WINBOOL WINAPI GetVolumeNameForVolumeMountPointA(LPCSTR lpszVolumeMountPoint,LPSTR lpszVolumeName,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI GetVolumeNameForVolumeMountPointW(LPCWSTR lpszVolumeMountPoint,LPWSTR lpszVolumeName,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI GetVolumePathNameA(LPCSTR lpszFileName,LPSTR lpszVolumePathName,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI GetVolumePathNameW(LPCWSTR lpszFileName,LPWSTR lpszVolumePathName,DWORD cchBufferLength);
+ WINBASEAPI WINBOOL WINAPI GetVolumePathNamesForVolumeNameA(LPCSTR lpszVolumeName,LPCH lpszVolumePathNames,DWORD cchBufferLength,PDWORD lpcchReturnLength);
+ WINBASEAPI WINBOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR lpszVolumeName,LPWCH lpszVolumePathNames,DWORD cchBufferLength,PDWORD lpcchReturnLength);
+
+#define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID 0x1
+#define ACTCTX_FLAG_LANGID_VALID 0x2
+#define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID 0x4
+#define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x8
+#define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x10
+#define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x20
+#define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF 0x40
+#define ACTCTX_FLAG_HMODULE_VALID 0x80
+
+ typedef struct tagACTCTXA {
+ ULONG cbSize;
+ DWORD dwFlags;
+ LPCSTR lpSource;
+ USHORT wProcessorArchitecture;
+ LANGID wLangId;
+ LPCSTR lpAssemblyDirectory;
+ LPCSTR lpResourceName;
+ LPCSTR lpApplicationName;
+ HMODULE hModule;
+ } ACTCTXA,*PACTCTXA;
+
+ typedef struct tagACTCTXW {
+ ULONG cbSize;
+ DWORD dwFlags;
+ LPCWSTR lpSource;
+ USHORT wProcessorArchitecture;
+ LANGID wLangId;
+ LPCWSTR lpAssemblyDirectory;
+ LPCWSTR lpResourceName;
+ LPCWSTR lpApplicationName;
+ HMODULE hModule;
+ } ACTCTXW,*PACTCTXW;
+
+ typedef const ACTCTXA *PCACTCTXA;
+ typedef const ACTCTXW *PCACTCTXW;
+
+#ifdef UNICODE
+ typedef ACTCTXW ACTCTX;
+ typedef PACTCTXW PACTCTX;
+ typedef PCACTCTXW PCACTCTX;
+#else
+ typedef ACTCTXA ACTCTX;
+ typedef PACTCTXA PACTCTX;
+ typedef PCACTCTXA PCACTCTX;
+#endif
+
+#ifdef UNICODE
+#define CreateActCtx CreateActCtxW
+#else
+#define CreateActCtx CreateActCtxA
+#endif
+
+ WINBASEAPI HANDLE WINAPI CreateActCtxA(PCACTCTXA pActCtx);
+ WINBASEAPI HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx);
+ WINBASEAPI VOID WINAPI AddRefActCtx(HANDLE hActCtx);
+ WINBASEAPI VOID WINAPI ReleaseActCtx(HANDLE hActCtx);
+ WINBASEAPI WINBOOL WINAPI ZombifyActCtx(HANDLE hActCtx);
+ WINBASEAPI WINBOOL WINAPI ActivateActCtx(HANDLE hActCtx,ULONG_PTR *lpCookie);
+
+#define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION (0x1)
+
+ WINBASEAPI WINBOOL WINAPI DeactivateActCtx(DWORD dwFlags,ULONG_PTR ulCookie);
+ WINBASEAPI WINBOOL WINAPI GetCurrentActCtx(HANDLE *lphActCtx);
+
+ typedef struct tagACTCTX_SECTION_KEYED_DATA_2600 {
+ ULONG cbSize;
+ ULONG ulDataFormatVersion;
+ PVOID lpData;
+ ULONG ulLength;
+ PVOID lpSectionGlobalData;
+ ULONG ulSectionGlobalDataLength;
+ PVOID lpSectionBase;
+ ULONG ulSectionTotalLength;
+ HANDLE hActCtx;
+ ULONG ulAssemblyRosterIndex;
+ } ACTCTX_SECTION_KEYED_DATA_2600,*PACTCTX_SECTION_KEYED_DATA_2600;
+
+ typedef const ACTCTX_SECTION_KEYED_DATA_2600 *PCACTCTX_SECTION_KEYED_DATA_2600;
+
+ typedef struct tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA {
+ PVOID lpInformation;
+ PVOID lpSectionBase;
+ ULONG ulSectionLength;
+ PVOID lpSectionGlobalDataBase;
+ ULONG ulSectionGlobalDataLength;
+ } ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA,*PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
+
+ typedef const ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA *PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
+
+ typedef struct tagACTCTX_SECTION_KEYED_DATA {
+ ULONG cbSize;
+ ULONG ulDataFormatVersion;
+ PVOID lpData;
+ ULONG ulLength;
+ PVOID lpSectionGlobalData;
+ ULONG ulSectionGlobalDataLength;
+ PVOID lpSectionBase;
+ ULONG ulSectionTotalLength;
+ HANDLE hActCtx;
+ ULONG ulAssemblyRosterIndex;
+
+ ULONG ulFlags;
+ ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA AssemblyMetadata;
+ } ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA;
+
+ typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
+
+#define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x1
+#define FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS 0x2
+#define FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA 0x4
+
+#ifdef UNICODE
+#define FindActCtxSectionString FindActCtxSectionStringW
+#else
+#define FindActCtxSectionString FindActCtxSectionStringA
+#endif
+
+ WINBASEAPI WINBOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,LPCSTR lpStringToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData);
+ WINBASEAPI WINBOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,LPCWSTR lpStringToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData);
+ WINBASEAPI WINBOOL WINAPI FindActCtxSectionGuid(DWORD dwFlags,const GUID *lpExtensionGuid,ULONG ulSectionId,const GUID *lpGuidToFind,PACTCTX_SECTION_KEYED_DATA ReturnedData);
+
+#ifndef RC_INVOKED
+#ifndef ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED
+
+ typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
+ HANDLE hActCtx;
+ DWORD dwFlags;
+ } ACTIVATION_CONTEXT_BASIC_INFORMATION,*PACTIVATION_CONTEXT_BASIC_INFORMATION;
+
+ typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
+
+#define ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED 1
+#endif
+#endif
+
+#define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX 0x4
+#define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE 0x8
+#define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS 0x10
+#define QUERY_ACTCTX_FLAG_NO_ADDREF 0x80000000
+
+ WINBASEAPI WINBOOL WINAPI QueryActCtxW(DWORD dwFlags,HANDLE hActCtx,PVOID pvSubInstance,ULONG ulInfoClass,PVOID pvBuffer,SIZE_T cbBuffer,SIZE_T *pcbWrittenOrRequired);
+
+ typedef WINBOOL (WINAPI *PQUERYACTCTXW_FUNC)(DWORD dwFlags,HANDLE hActCtx,PVOID pvSubInstance,ULONG ulInfoClass,PVOID pvBuffer,SIZE_T cbBuffer,SIZE_T *pcbWrittenOrRequired);
+
+ WINBASEAPI WINBOOL WINAPI ProcessIdToSessionId(DWORD dwProcessId,DWORD *pSessionId);
+ WINBASEAPI DWORD WINAPI WTSGetActiveConsoleSessionId();
+ WINBASEAPI WINBOOL WINAPI IsWow64Process(HANDLE hProcess,PBOOL Wow64Process);
+ WINBASEAPI WINBOOL WINAPI GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,PDWORD ReturnedLength);
+ WINBASEAPI WINBOOL WINAPI GetNumaHighestNodeNumber(PULONG HighestNodeNumber);
+ WINBASEAPI WINBOOL WINAPI GetNumaProcessorNode(UCHAR Processor,PUCHAR NodeNumber);
+ WINBASEAPI WINBOOL WINAPI GetNumaNodeProcessorMask(UCHAR Node,PULONGLONG ProcessorMask);
+ WINBASEAPI WINBOOL WINAPI GetNumaAvailableMemoryNode(UCHAR Node,PULONGLONG AvailableBytes);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/wincon.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/wincon.h
new file mode 100644
index 00000000..a3501ee7
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/wincon.h
@@ -0,0 +1,301 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINCON_
+#define _WINCON_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ typedef struct _COORD {
+ SHORT X;
+ SHORT Y;
+ } COORD,*PCOORD;
+
+ typedef struct _SMALL_RECT {
+ SHORT Left;
+ SHORT Top;
+ SHORT Right;
+ SHORT Bottom;
+ } SMALL_RECT,*PSMALL_RECT;
+
+ typedef struct _KEY_EVENT_RECORD {
+ WINBOOL bKeyDown;
+ WORD wRepeatCount;
+ WORD wVirtualKeyCode;
+ WORD wVirtualScanCode;
+ union {
+ WCHAR UnicodeChar;
+ CHAR AsciiChar;
+ } uChar;
+ DWORD dwControlKeyState;
+ } KEY_EVENT_RECORD,*PKEY_EVENT_RECORD;
+
+#define RIGHT_ALT_PRESSED 0x1
+#define LEFT_ALT_PRESSED 0x2
+#define RIGHT_CTRL_PRESSED 0x4
+#define LEFT_CTRL_PRESSED 0x8
+#define SHIFT_PRESSED 0x10
+#define NUMLOCK_ON 0x20
+#define SCROLLLOCK_ON 0x40
+#define CAPSLOCK_ON 0x80
+#define ENHANCED_KEY 0x100
+#define NLS_DBCSCHAR 0x10000
+#define NLS_ALPHANUMERIC 0x0
+#define NLS_KATAKANA 0x20000
+#define NLS_HIRAGANA 0x40000
+#define NLS_ROMAN 0x400000
+#define NLS_IME_CONVERSION 0x800000
+#define NLS_IME_DISABLE 0x20000000
+
+ typedef struct _MOUSE_EVENT_RECORD {
+ COORD dwMousePosition;
+ DWORD dwButtonState;
+ DWORD dwControlKeyState;
+ DWORD dwEventFlags;
+ } MOUSE_EVENT_RECORD,*PMOUSE_EVENT_RECORD;
+
+#define FROM_LEFT_1ST_BUTTON_PRESSED 0x1
+#define RIGHTMOST_BUTTON_PRESSED 0x2
+#define FROM_LEFT_2ND_BUTTON_PRESSED 0x4
+#define FROM_LEFT_3RD_BUTTON_PRESSED 0x8
+#define FROM_LEFT_4TH_BUTTON_PRESSED 0x10
+
+#define MOUSE_MOVED 0x1
+#define DOUBLE_CLICK 0x2
+#define MOUSE_WHEELED 0x4
+
+ typedef struct _WINDOW_BUFFER_SIZE_RECORD {
+ COORD dwSize;
+ } WINDOW_BUFFER_SIZE_RECORD,*PWINDOW_BUFFER_SIZE_RECORD;
+
+ typedef struct _MENU_EVENT_RECORD {
+ UINT dwCommandId;
+ } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD;
+
+ typedef struct _FOCUS_EVENT_RECORD {
+ WINBOOL bSetFocus;
+ } FOCUS_EVENT_RECORD,*PFOCUS_EVENT_RECORD;
+
+ typedef struct _INPUT_RECORD {
+ WORD EventType;
+ union {
+ KEY_EVENT_RECORD KeyEvent;
+ MOUSE_EVENT_RECORD MouseEvent;
+ WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
+ MENU_EVENT_RECORD MenuEvent;
+ FOCUS_EVENT_RECORD FocusEvent;
+ } Event;
+ } INPUT_RECORD,*PINPUT_RECORD;
+
+#define KEY_EVENT 0x1
+#define MOUSE_EVENT 0x2
+#define WINDOW_BUFFER_SIZE_EVENT 0x4
+#define MENU_EVENT 0x8
+#define FOCUS_EVENT 0x10
+
+ typedef struct _CHAR_INFO {
+ union {
+ WCHAR UnicodeChar;
+ CHAR AsciiChar;
+ } Char;
+ WORD Attributes;
+ } CHAR_INFO,*PCHAR_INFO;
+
+#define FOREGROUND_BLUE 0x1
+#define FOREGROUND_GREEN 0x2
+#define FOREGROUND_RED 0x4
+#define FOREGROUND_INTENSITY 0x8
+#define BACKGROUND_BLUE 0x10
+#define BACKGROUND_GREEN 0x20
+#define BACKGROUND_RED 0x40
+#define BACKGROUND_INTENSITY 0x80
+#define COMMON_LVB_LEADING_BYTE 0x100
+#define COMMON_LVB_TRAILING_BYTE 0x200
+#define COMMON_LVB_GRID_HORIZONTAL 0x400
+#define COMMON_LVB_GRID_LVERTICAL 0x800
+#define COMMON_LVB_GRID_RVERTICAL 0x1000
+#define COMMON_LVB_REVERSE_VIDEO 0x4000
+#define COMMON_LVB_UNDERSCORE 0x8000
+
+#define COMMON_LVB_SBCSDBCS 0x300
+
+ typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
+ COORD dwSize;
+ COORD dwCursorPosition;
+ WORD wAttributes;
+ SMALL_RECT srWindow;
+ COORD dwMaximumWindowSize;
+ } CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO;
+
+ typedef struct _CONSOLE_CURSOR_INFO {
+ DWORD dwSize;
+ WINBOOL bVisible;
+ } CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO;
+
+ typedef struct _CONSOLE_FONT_INFO {
+ DWORD nFont;
+ COORD dwFontSize;
+ } CONSOLE_FONT_INFO,*PCONSOLE_FONT_INFO;
+
+ typedef struct _CONSOLE_SELECTION_INFO {
+ DWORD dwFlags;
+ COORD dwSelectionAnchor;
+ SMALL_RECT srSelection;
+ } CONSOLE_SELECTION_INFO,*PCONSOLE_SELECTION_INFO;
+
+#define CONSOLE_NO_SELECTION 0x0
+#define CONSOLE_SELECTION_IN_PROGRESS 0x1
+#define CONSOLE_SELECTION_NOT_EMPTY 0x2
+#define CONSOLE_MOUSE_SELECTION 0x4
+#define CONSOLE_MOUSE_DOWN 0x8
+
+ typedef WINBOOL (WINAPI *PHANDLER_ROUTINE)(DWORD CtrlType);
+
+#define CTRL_C_EVENT 0
+#define CTRL_BREAK_EVENT 1
+#define CTRL_CLOSE_EVENT 2
+
+#define CTRL_LOGOFF_EVENT 5
+#define CTRL_SHUTDOWN_EVENT 6
+
+#define ENABLE_PROCESSED_INPUT 0x1
+#define ENABLE_LINE_INPUT 0x2
+#define ENABLE_ECHO_INPUT 0x4
+#define ENABLE_WINDOW_INPUT 0x8
+#define ENABLE_MOUSE_INPUT 0x10
+
+#define ENABLE_PROCESSED_OUTPUT 0x1
+#define ENABLE_WRAP_AT_EOL_OUTPUT 0x2
+
+#ifdef UNICODE
+#define PeekConsoleInput PeekConsoleInputW
+#define ReadConsoleInput ReadConsoleInputW
+#define WriteConsoleInput WriteConsoleInputW
+#define ReadConsoleOutput ReadConsoleOutputW
+#define WriteConsoleOutput WriteConsoleOutputW
+#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
+#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
+#define FillConsoleOutputCharacter FillConsoleOutputCharacterW
+#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
+#define GetConsoleTitle GetConsoleTitleW
+#define SetConsoleTitle SetConsoleTitleW
+#define ReadConsole ReadConsoleW
+#define WriteConsole WriteConsoleW
+#define AddConsoleAlias AddConsoleAliasW
+#define GetConsoleAlias GetConsoleAliasW
+#define GetConsoleAliasesLength GetConsoleAliasesLengthW
+#define GetConsoleAliasExesLength GetConsoleAliasExesLengthW
+#define GetConsoleAliases GetConsoleAliasesW
+#define GetConsoleAliasExes GetConsoleAliasExesW
+#else
+#define PeekConsoleInput PeekConsoleInputA
+#define ReadConsoleInput ReadConsoleInputA
+#define WriteConsoleInput WriteConsoleInputA
+#define ReadConsoleOutput ReadConsoleOutputA
+#define WriteConsoleOutput WriteConsoleOutputA
+#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
+#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
+#define FillConsoleOutputCharacter FillConsoleOutputCharacterA
+#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
+#define GetConsoleTitle GetConsoleTitleA
+#define SetConsoleTitle SetConsoleTitleA
+#define ReadConsole ReadConsoleA
+#define WriteConsole WriteConsoleA
+#define AddConsoleAlias AddConsoleAliasA
+#define GetConsoleAlias GetConsoleAliasA
+#define GetConsoleAliasesLength GetConsoleAliasesLengthA
+#define GetConsoleAliasExesLength GetConsoleAliasExesLengthA
+#define GetConsoleAliases GetConsoleAliasesA
+#define GetConsoleAliasExes GetConsoleAliasExesA
+#endif
+
+ WINBASEAPI WINBOOL WINAPI PeekConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
+ WINBASEAPI WINBOOL WINAPI PeekConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
+ WINBASEAPI WINBOOL WINAPI ReadConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
+ WINBASEAPI WINBOOL WINAPI ReadConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
+ WINBASEAPI WINBOOL WINAPI WriteConsoleInputA(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten);
+ WINBASEAPI WINBOOL WINAPI WriteConsoleInputW(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten);
+ WINBASEAPI WINBOOL WINAPI ReadConsoleOutputA(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion);
+ WINBASEAPI WINBOOL WINAPI ReadConsoleOutputW(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion);
+ WINBASEAPI WINBOOL WINAPI WriteConsoleOutputA(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion);
+ WINBASEAPI WINBOOL WINAPI WriteConsoleOutputW(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion);
+ WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterA(HANDLE hConsoleOutput,LPSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead);
+ WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterW(HANDLE hConsoleOutput,LPWSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead);
+ WINBASEAPI WINBOOL WINAPI ReadConsoleOutputAttribute(HANDLE hConsoleOutput,LPWORD lpAttribute,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfAttrsRead);
+ WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterA(HANDLE hConsoleOutput,LPCSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
+ WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterW(HANDLE hConsoleOutput,LPCWSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
+ WINBASEAPI WINBOOL WINAPI WriteConsoleOutputAttribute(HANDLE hConsoleOutput,CONST WORD *lpAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten);
+ WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterA(HANDLE hConsoleOutput,CHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
+ WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterW(HANDLE hConsoleOutput,WCHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
+ WINBASEAPI WINBOOL WINAPI FillConsoleOutputAttribute(HANDLE hConsoleOutput,WORD wAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten);
+ WINBASEAPI WINBOOL WINAPI GetConsoleMode(HANDLE hConsoleHandle,LPDWORD lpMode);
+ WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE hConsoleInput,LPDWORD lpNumberOfEvents);
+ WINBASEAPI WINBOOL WINAPI GetConsoleScreenBufferInfo(HANDLE hConsoleOutput,PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
+ WINBASEAPI COORD WINAPI GetLargestConsoleWindowSize(HANDLE hConsoleOutput);
+ WINBASEAPI WINBOOL WINAPI GetConsoleCursorInfo(HANDLE hConsoleOutput,PCONSOLE_CURSOR_INFO lpConsoleCursorInfo);
+ WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFont(HANDLE hConsoleOutput,WINBOOL bMaximumWindow,PCONSOLE_FONT_INFO lpConsoleCurrentFont);
+ WINBASEAPI COORD WINAPI GetConsoleFontSize(HANDLE hConsoleOutput,DWORD nFont);
+ WINBASEAPI WINBOOL WINAPI GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo);
+ WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleMouseButtons(LPDWORD lpNumberOfMouseButtons);
+ WINBASEAPI WINBOOL WINAPI SetConsoleMode(HANDLE hConsoleHandle,DWORD dwMode);
+ WINBASEAPI WINBOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput);
+ WINBASEAPI WINBOOL WINAPI FlushConsoleInputBuffer(HANDLE hConsoleInput);
+ WINBASEAPI WINBOOL WINAPI SetConsoleScreenBufferSize(HANDLE hConsoleOutput,COORD dwSize);
+ WINBASEAPI WINBOOL WINAPI SetConsoleCursorPosition(HANDLE hConsoleOutput,COORD dwCursorPosition);
+ WINBASEAPI WINBOOL WINAPI SetConsoleCursorInfo(HANDLE hConsoleOutput,CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo);
+ WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferA(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill);
+ WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferW(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill);
+ WINBASEAPI WINBOOL WINAPI SetConsoleWindowInfo(HANDLE hConsoleOutput,WINBOOL bAbsolute,CONST SMALL_RECT *lpConsoleWindow);
+ WINBASEAPI WINBOOL WINAPI SetConsoleTextAttribute(HANDLE hConsoleOutput,WORD wAttributes);
+ WINBASEAPI WINBOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine,WINBOOL Add);
+ WINBASEAPI WINBOOL WINAPI GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,DWORD dwProcessGroupId);
+ WINBASEAPI WINBOOL WINAPI AllocConsole(VOID);
+ WINBASEAPI WINBOOL WINAPI FreeConsole(VOID);
+ WINBASEAPI WINBOOL WINAPI AttachConsole(DWORD dwProcessId);
+
+#define ATTACH_PARENT_PROCESS ((DWORD)-1)
+
+ WINBASEAPI DWORD WINAPI GetConsoleTitleA(LPSTR lpConsoleTitle,DWORD nSize);
+ WINBASEAPI DWORD WINAPI GetConsoleTitleW(LPWSTR lpConsoleTitle,DWORD nSize);
+ WINBASEAPI WINBOOL WINAPI SetConsoleTitleA(LPCSTR lpConsoleTitle);
+ WINBASEAPI WINBOOL WINAPI SetConsoleTitleW(LPCWSTR lpConsoleTitle);
+ WINBASEAPI WINBOOL WINAPI ReadConsoleA(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved);
+ WINBASEAPI WINBOOL WINAPI ReadConsoleW(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved);
+ WINBASEAPI WINBOOL WINAPI WriteConsoleA(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved);
+ WINBASEAPI WINBOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved);
+
+#define CONSOLE_TEXTMODE_BUFFER 1
+
+ WINBASEAPI HANDLE WINAPI CreateConsoleScreenBuffer(DWORD dwDesiredAccess,DWORD dwShareMode,CONST SECURITY_ATTRIBUTES *lpSecurityAttributes,DWORD dwFlags,LPVOID lpScreenBufferData);
+ WINBASEAPI UINT WINAPI GetConsoleCP(VOID);
+ WINBASEAPI WINBOOL WINAPI SetConsoleCP(UINT wCodePageID);
+ WINBASEAPI UINT WINAPI GetConsoleOutputCP(VOID);
+ WINBASEAPI WINBOOL WINAPI SetConsoleOutputCP(UINT wCodePageID);
+
+#define CONSOLE_FULLSCREEN 1
+#define CONSOLE_FULLSCREEN_HARDWARE 2
+
+ WINBASEAPI WINBOOL WINAPI GetConsoleDisplayMode(LPDWORD lpModeFlags);
+ WINBASEAPI HWND WINAPI GetConsoleWindow(VOID);
+ WINBASEAPI DWORD WINAPI GetConsoleProcessList(LPDWORD lpdwProcessList,DWORD dwProcessCount);
+ WINBASEAPI WINBOOL WINAPI AddConsoleAliasA(LPSTR Source,LPSTR Target,LPSTR ExeName);
+ WINBASEAPI WINBOOL WINAPI AddConsoleAliasW(LPWSTR Source,LPWSTR Target,LPWSTR ExeName);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasA(LPSTR Source,LPSTR TargetBuffer,DWORD TargetBufferLength,LPSTR ExeName);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasW(LPWSTR Source,LPWSTR TargetBuffer,DWORD TargetBufferLength,LPWSTR ExeName);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthA(LPSTR ExeName);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthW(LPWSTR ExeName);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthA(VOID);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthW(VOID);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasesA(LPSTR AliasBuffer,DWORD AliasBufferLength,LPSTR ExeName);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasesW(LPWSTR AliasBuffer,DWORD AliasBufferLength,LPWSTR ExeName);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasExesA(LPSTR ExeNameBuffer,DWORD ExeNameBufferLength);
+ WINBASEAPI DWORD WINAPI GetConsoleAliasExesW(LPWSTR ExeNameBuffer,DWORD ExeNameBufferLength);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/windef.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/windef.h
new file mode 100644
index 00000000..d63bdef1
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/windef.h
@@ -0,0 +1,293 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINDEF_
+#define _WINDEF_
+
+#ifndef STRICT
+#define STRICT 1
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0502
+#endif
+
+#ifndef BASETYPES
+#define BASETYPES
+ typedef unsigned long ULONG;
+ typedef ULONG *PULONG;
+ typedef unsigned short USHORT;
+ typedef USHORT *PUSHORT;
+ typedef unsigned char UCHAR;
+ typedef UCHAR *PUCHAR;
+ typedef char *PSZ;
+#endif
+
+#define MAX_PATH 260
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef IN
+#define IN
+#endif
+
+#ifndef OUT
+#define OUT
+#endif
+
+#ifndef OPTIONAL
+#define OPTIONAL
+#endif
+
+#undef far
+#undef near
+#undef pascal
+
+#define far
+#define near
+#define pascal __stdcall
+
+#define cdecl
+#ifndef CDECL
+#define CDECL
+#endif
+#ifndef CALLBACK
+#define CALLBACK __stdcall
+#endif
+#ifndef WINAPI
+#define WINAPI __stdcall
+#endif
+#define WINAPIV __cdecl
+#define APIENTRY WINAPI
+#define APIPRIVATE WINAPI
+#define PASCAL WINAPI
+#define WINAPI_INLINE WINAPI
+
+#undef FAR
+#undef NEAR
+#define FAR
+#define NEAR
+#ifndef CONST
+#define CONST const
+#endif
+
+ typedef unsigned long DWORD;
+ typedef int WINBOOL;
+#define BOOL WINBOOL
+ typedef unsigned char BYTE;
+ typedef unsigned short WORD;
+ typedef float FLOAT;
+ typedef FLOAT *PFLOAT;
+ typedef WINBOOL *PBOOL;
+ typedef WINBOOL *LPBOOL;
+ typedef BYTE *PBYTE;
+ typedef BYTE *LPBYTE;
+ typedef int *PINT;
+ typedef int *LPINT;
+ typedef WORD *PWORD;
+ typedef WORD *LPWORD;
+ typedef long *LPLONG;
+ typedef DWORD *PDWORD;
+ typedef DWORD *LPDWORD;
+ typedef void *LPVOID;
+# ifndef _LPCVOID_DEFINED
+#define _LPCVOID_DEFINED
+typedef CONST void *LPCVOID;
+#endif
+ typedef int INT;
+ typedef unsigned int UINT;
+ typedef unsigned int *PUINT;
+
+#ifndef NT_INCLUDED
+#include
+#endif
+
+//gr #include
+
+ typedef UINT_PTR WPARAM;
+ typedef LONG_PTR LPARAM;
+ typedef LONG_PTR LRESULT;
+
+#ifndef __cplusplus
+#ifndef NOMINMAX
+#ifndef max
+#define max(a,b) (((a) > (b)) ? (a) : (b))
+#endif
+
+#ifndef min
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#endif
+#endif
+#endif
+
+#define MAKEWORD(a,b) ((WORD)(((BYTE)((DWORD_PTR)(a) & 0xff)) | ((WORD)((BYTE)((DWORD_PTR)(b) & 0xff))) << 8))
+#define MAKELONG(a,b) ((LONG)(((WORD)((DWORD_PTR)(a) & 0xffff)) | ((DWORD)((WORD)((DWORD_PTR)(b) & 0xffff))) << 16))
+#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xffff))
+#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
+#define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xff))
+#define HIBYTE(w) ((BYTE)((DWORD_PTR)(w) >> 8))
+
+#ifndef WIN_INTERNAL
+ DECLARE_HANDLE (HWND);
+ DECLARE_HANDLE (HHOOK);
+#ifdef WINABLE
+ DECLARE_HANDLE (HEVENT);
+#endif
+#endif
+
+ typedef WORD ATOM;
+
+ typedef HANDLE *SPHANDLE;
+ typedef HANDLE *LPHANDLE;
+ typedef HANDLE HGLOBAL;
+ typedef HANDLE HLOCAL;
+ typedef HANDLE GLOBALHANDLE;
+ typedef HANDLE LOCALHANDLE;
+#ifdef _WIN64
+ typedef INT_PTR (WINAPI *FARPROC)();
+ typedef INT_PTR (WINAPI *NEARPROC)();
+ typedef INT_PTR (WINAPI *PROC)();
+#else
+ typedef int (WINAPI *FARPROC)();
+ typedef int (WINAPI *NEARPROC)();
+ typedef int (WINAPI *PROC)();
+#endif
+
+ typedef void *HGDIOBJ;
+
+ DECLARE_HANDLE(HKEY);
+ typedef HKEY *PHKEY;
+
+ DECLARE_HANDLE(HACCEL);
+ DECLARE_HANDLE(HBITMAP);
+ DECLARE_HANDLE(HBRUSH);
+ DECLARE_HANDLE(HCOLORSPACE);
+ DECLARE_HANDLE(HDC);
+ DECLARE_HANDLE(HGLRC);
+ DECLARE_HANDLE(HDESK);
+ DECLARE_HANDLE(HENHMETAFILE);
+ DECLARE_HANDLE(HFONT);
+ DECLARE_HANDLE(HICON);
+ DECLARE_HANDLE(HMENU);
+ DECLARE_HANDLE(HMETAFILE);
+ DECLARE_HANDLE(HINSTANCE);
+ typedef HINSTANCE HMODULE;
+ DECLARE_HANDLE(HPALETTE);
+ DECLARE_HANDLE(HPEN);
+ DECLARE_HANDLE(HRGN);
+ DECLARE_HANDLE(HRSRC);
+ DECLARE_HANDLE(HSTR);
+ DECLARE_HANDLE(HTASK);
+ DECLARE_HANDLE(HWINSTA);
+ DECLARE_HANDLE(HKL);
+ DECLARE_HANDLE(HMONITOR);
+ DECLARE_HANDLE(HWINEVENTHOOK);
+ DECLARE_HANDLE(HUMPD);
+
+ typedef int HFILE;
+ typedef HICON HCURSOR;
+ typedef DWORD COLORREF;
+ typedef DWORD *LPCOLORREF;
+
+#define HFILE_ERROR ((HFILE)-1)
+
+ typedef struct tagRECT {
+ LONG left;
+ LONG top;
+ LONG right;
+ LONG bottom;
+ } RECT,*PRECT,*NPRECT,*LPRECT;
+
+ typedef const RECT *LPCRECT;
+
+ typedef struct _RECTL {
+ LONG left;
+ LONG top;
+ LONG right;
+ LONG bottom;
+ } RECTL,*PRECTL,*LPRECTL;
+
+ typedef const RECTL *LPCRECTL;
+
+ typedef struct tagPOINT {
+ LONG x;
+ LONG y;
+ } POINT,*PPOINT,*NPPOINT,*LPPOINT;
+
+ typedef struct _POINTL {
+ LONG x;
+ LONG y;
+ } POINTL,*PPOINTL;
+
+ typedef struct tagSIZE {
+ LONG cx;
+ LONG cy;
+ } SIZE,*PSIZE,*LPSIZE;
+
+ typedef SIZE SIZEL;
+ typedef SIZE *PSIZEL,*LPSIZEL;
+
+ typedef struct tagPOINTS {
+ SHORT x;
+ SHORT y;
+ } POINTS,*PPOINTS,*LPPOINTS;
+
+ typedef struct _FILETIME {
+ DWORD dwLowDateTime;
+ DWORD dwHighDateTime;
+ } FILETIME,*PFILETIME,*LPFILETIME;
+#define _FILETIME_
+
+#define DM_UPDATE 1
+#define DM_COPY 2
+#define DM_PROMPT 4
+#define DM_MODIFY 8
+
+#define DM_IN_BUFFER DM_MODIFY
+#define DM_IN_PROMPT DM_PROMPT
+#define DM_OUT_BUFFER DM_COPY
+#define DM_OUT_DEFAULT DM_UPDATE
+
+#define DC_FIELDS 1
+#define DC_PAPERS 2
+#define DC_PAPERSIZE 3
+#define DC_MINEXTENT 4
+#define DC_MAXEXTENT 5
+#define DC_BINS 6
+#define DC_DUPLEX 7
+#define DC_SIZE 8
+#define DC_EXTRA 9
+#define DC_VERSION 10
+#define DC_DRIVER 11
+#define DC_BINNAMES 12
+#define DC_ENUMRESOLUTIONS 13
+#define DC_FILEDEPENDENCIES 14
+#define DC_TRUETYPE 15
+#define DC_PAPERNAMES 16
+#define DC_ORIENTATION 17
+#define DC_COPIES 18
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/windows.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/windows.h
new file mode 100644
index 00000000..2660d7f0
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/windows.h
@@ -0,0 +1,127 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINDOWS_
+#define _WINDOWS_
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0502
+#endif
+
+#include <_mingw.h>
+
+#ifndef _INC_WINDOWS
+#define _INC_WINDOWS
+
+#if defined(RC_INVOKED) && !defined(NOWINRES)
+
+#include
+#else
+
+#ifdef RC_INVOKED
+#define NOATOM
+#define NOGDI
+#define NOGDICAPMASKS
+#define NOMETAFILE
+#define NOMINMAX
+#define NOMSG
+#define NOOPENFILE
+#define NORASTEROPS
+#define NOSCROLL
+#define NOSOUND
+#define NOSYSMETRICS
+#define NOTEXTMETRIC
+#define NOWH
+#define NOCOMM
+#define NOKANJI
+#define NOCRYPT
+#define NOMCX
+#endif
+
+#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && (defined(_X86_) && !defined(__x86_64))
+#define I_X86_
+#endif
+
+#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(__x86_64)
+#define _AMD64_
+#endif
+
+#if !defined(I_X86_) && !(defined(_X86_) && !defined(__x86_64)) && !defined(_AMD64_) && defined(__ia64__)
+#if !defined(_IA64_)
+#define _IA64_
+#endif
+#endif
+
+#ifndef RC_INVOKED
+#include
+#include
+#endif
+
+#include
+#include
+#include
+#include
+//gr #include
+#include
+#include
+#include
+//gr #include
+
+#ifndef WIN32_LEAN_AND_MEAN
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#ifndef NOCRYPT
+#include
+#include
+#include
+#endif
+
+#ifndef NOUSER
+#ifndef NOGDI
+#include
+#ifdef INC_OLE1
+#include
+#else
+#include
+#endif
+#include
+#endif
+#endif
+#endif
+
+//gr #include
+
+#ifdef INC_OLE2
+#include
+#endif
+
+#ifndef NOSERVICE
+#include
+#endif
+
+#ifndef NOMCX
+#include
+#endif
+
+#ifndef NOIME
+#include
+#endif
+
+#endif
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winerror.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winerror.h
new file mode 100644
index 00000000..77d85edc
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winerror.h
@@ -0,0 +1,3166 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINERROR_
+#define _WINERROR_
+
+#define FACILITY_WINDOWSUPDATE 36
+#define FACILITY_WINDOWS_CE 24
+#define FACILITY_WINDOWS 8
+#define FACILITY_URT 19
+#define FACILITY_UMI 22
+#define FACILITY_SXS 23
+#define FACILITY_STORAGE 3
+#define FACILITY_STATE_MANAGEMENT 34
+#define FACILITY_SSPI 9
+#define FACILITY_SCARD 16
+#define FACILITY_SETUPAPI 15
+#define FACILITY_SECURITY 9
+#define FACILITY_RPC 1
+#define FACILITY_WIN32 7
+#define FACILITY_CONTROL 10
+#define FACILITY_NULL 0
+#define FACILITY_METADIRECTORY 35
+#define FACILITY_MSMQ 14
+#define FACILITY_MEDIASERVER 13
+#define FACILITY_INTERNET 12
+#define FACILITY_ITF 4
+#define FACILITY_HTTP 25
+#define FACILITY_DPLAY 21
+#define FACILITY_DISPATCH 2
+#define FACILITY_DIRECTORYSERVICE 37
+#define FACILITY_CONFIGURATION 33
+#define FACILITY_COMPLUS 17
+#define FACILITY_CERT 11
+#define FACILITY_BACKGROUNDCOPY 32
+#define FACILITY_ACS 20
+#define FACILITY_AAF 18
+#define ERROR_SUCCESS 0L
+#define NO_ERROR 0L
+#define SEC_E_OK ((HRESULT)0x00000000L)
+#define ERROR_INVALID_FUNCTION 1L
+#define ERROR_FILE_NOT_FOUND 2L
+#define ERROR_PATH_NOT_FOUND 3L
+#define ERROR_TOO_MANY_OPEN_FILES 4L
+#define ERROR_ACCESS_DENIED 5L
+#define ERROR_INVALID_HANDLE 6L
+#define ERROR_ARENA_TRASHED 7L
+#define ERROR_NOT_ENOUGH_MEMORY 8L
+#define ERROR_INVALID_BLOCK 9L
+#define ERROR_BAD_ENVIRONMENT 10L
+#define ERROR_BAD_FORMAT 11L
+#define ERROR_INVALID_ACCESS 12L
+#define ERROR_INVALID_DATA 13L
+#define ERROR_OUTOFMEMORY 14L
+#define ERROR_INVALID_DRIVE 15L
+#define ERROR_CURRENT_DIRECTORY 16L
+#define ERROR_NOT_SAME_DEVICE 17L
+#define ERROR_NO_MORE_FILES 18L
+#define ERROR_WRITE_PROTECT 19L
+#define ERROR_BAD_UNIT 20L
+#define ERROR_NOT_READY 21L
+#define ERROR_BAD_COMMAND 22L
+#define ERROR_CRC 23L
+#define ERROR_BAD_LENGTH 24L
+#define ERROR_SEEK 25L
+#define ERROR_NOT_DOS_DISK 26L
+#define ERROR_SECTOR_NOT_FOUND 27L
+#define ERROR_OUT_OF_PAPER 28L
+#define ERROR_WRITE_FAULT 29L
+#define ERROR_READ_FAULT 30L
+#define ERROR_GEN_FAILURE 31L
+#define ERROR_SHARING_VIOLATION 32L
+#define ERROR_LOCK_VIOLATION 33L
+#define ERROR_WRONG_DISK 34L
+#define ERROR_SHARING_BUFFER_EXCEEDED 36L
+#define ERROR_HANDLE_EOF 38L
+#define ERROR_HANDLE_DISK_FULL 39L
+#define ERROR_NOT_SUPPORTED 50L
+#define ERROR_REM_NOT_LIST 51L
+#define ERROR_DUP_NAME 52L
+#define ERROR_BAD_NETPATH 53L
+#define ERROR_NETWORK_BUSY 54L
+#define ERROR_DEV_NOT_EXIST 55L
+#define ERROR_TOO_MANY_CMDS 56L
+#define ERROR_ADAP_HDW_ERR 57L
+#define ERROR_BAD_NET_RESP 58L
+#define ERROR_UNEXP_NET_ERR 59L
+#define ERROR_BAD_REM_ADAP 60L
+#define ERROR_PRINTQ_FULL 61L
+#define ERROR_NO_SPOOL_SPACE 62L
+#define ERROR_PRINT_CANCELLED 63L
+#define ERROR_NETNAME_DELETED 64L
+#define ERROR_NETWORK_ACCESS_DENIED 65L
+#define ERROR_BAD_DEV_TYPE 66L
+#define ERROR_BAD_NET_NAME 67L
+#define ERROR_TOO_MANY_NAMES 68L
+#define ERROR_TOO_MANY_SESS 69L
+#define ERROR_SHARING_PAUSED 70L
+#define ERROR_REQ_NOT_ACCEP 71L
+#define ERROR_REDIR_PAUSED 72L
+#define ERROR_FILE_EXISTS 80L
+#define ERROR_CANNOT_MAKE 82L
+#define ERROR_FAIL_I24 83L
+#define ERROR_OUT_OF_STRUCTURES 84L
+#define ERROR_ALREADY_ASSIGNED 85L
+#define ERROR_INVALID_PASSWORD 86L
+#define ERROR_INVALID_PARAMETER 87L
+#define ERROR_NET_WRITE_FAULT 88L
+#define ERROR_NO_PROC_SLOTS 89L
+#define ERROR_TOO_MANY_SEMAPHORES 100L
+#define ERROR_EXCL_SEM_ALREADY_OWNED 101L
+#define ERROR_SEM_IS_SET 102L
+#define ERROR_TOO_MANY_SEM_REQUESTS 103L
+#define ERROR_INVALID_AT_INTERRUPT_TIME 104L
+#define ERROR_SEM_OWNER_DIED 105L
+#define ERROR_SEM_USER_LIMIT 106L
+#define ERROR_DISK_CHANGE 107L
+#define ERROR_DRIVE_LOCKED 108L
+#define ERROR_BROKEN_PIPE 109L
+#define ERROR_OPEN_FAILED 110L
+#define ERROR_BUFFER_OVERFLOW 111L
+#define ERROR_DISK_FULL 112L
+#define ERROR_NO_MORE_SEARCH_HANDLES 113L
+#define ERROR_INVALID_TARGET_HANDLE 114L
+#define ERROR_INVALID_CATEGORY 117L
+#define ERROR_INVALID_VERIFY_SWITCH 118L
+#define ERROR_BAD_DRIVER_LEVEL 119L
+#define ERROR_CALL_NOT_IMPLEMENTED 120L
+#define ERROR_SEM_TIMEOUT 121L
+#define ERROR_INSUFFICIENT_BUFFER 122L
+#define ERROR_INVALID_NAME 123L
+#define ERROR_INVALID_LEVEL 124L
+#define ERROR_NO_VOLUME_LABEL 125L
+#define ERROR_MOD_NOT_FOUND 126L
+#define ERROR_PROC_NOT_FOUND 127L
+#define ERROR_WAIT_NO_CHILDREN 128L
+#define ERROR_CHILD_NOT_COMPLETE 129L
+#define ERROR_DIRECT_ACCESS_HANDLE 130L
+#define ERROR_NEGATIVE_SEEK 131L
+#define ERROR_SEEK_ON_DEVICE 132L
+#define ERROR_IS_JOIN_TARGET 133L
+#define ERROR_IS_JOINED 134L
+#define ERROR_IS_SUBSTED 135L
+#define ERROR_NOT_JOINED 136L
+#define ERROR_NOT_SUBSTED 137L
+#define ERROR_JOIN_TO_JOIN 138L
+#define ERROR_SUBST_TO_SUBST 139L
+#define ERROR_JOIN_TO_SUBST 140L
+#define ERROR_SUBST_TO_JOIN 141L
+#define ERROR_BUSY_DRIVE 142L
+#define ERROR_SAME_DRIVE 143L
+#define ERROR_DIR_NOT_ROOT 144L
+#define ERROR_DIR_NOT_EMPTY 145L
+#define ERROR_IS_SUBST_PATH 146L
+#define ERROR_IS_JOIN_PATH 147L
+#define ERROR_PATH_BUSY 148L
+#define ERROR_IS_SUBST_TARGET 149L
+#define ERROR_SYSTEM_TRACE 150L
+#define ERROR_INVALID_EVENT_COUNT 151L
+#define ERROR_TOO_MANY_MUXWAITERS 152L
+#define ERROR_INVALID_LIST_FORMAT 153L
+#define ERROR_LABEL_TOO_LONG 154L
+#define ERROR_TOO_MANY_TCBS 155L
+#define ERROR_SIGNAL_REFUSED 156L
+#define ERROR_DISCARDED 157L
+#define ERROR_NOT_LOCKED 158L
+#define ERROR_BAD_THREADID_ADDR 159L
+#define ERROR_BAD_ARGUMENTS 160L
+#define ERROR_BAD_PATHNAME 161L
+#define ERROR_SIGNAL_PENDING 162L
+#define ERROR_MAX_THRDS_REACHED 164L
+#define ERROR_LOCK_FAILED 167L
+#define ERROR_BUSY 170L
+#define ERROR_CANCEL_VIOLATION 173L
+#define ERROR_ATOMIC_LOCKS_NOT_SUPPORTED 174L
+#define ERROR_INVALID_SEGMENT_NUMBER 180L
+#define ERROR_INVALID_ORDINAL 182L
+#define ERROR_ALREADY_EXISTS 183L
+#define ERROR_INVALID_FLAG_NUMBER 186L
+#define ERROR_SEM_NOT_FOUND 187L
+#define ERROR_INVALID_STARTING_CODESEG 188L
+#define ERROR_INVALID_STACKSEG 189L
+#define ERROR_INVALID_MODULETYPE 190L
+#define ERROR_INVALID_EXE_SIGNATURE 191L
+#define ERROR_EXE_MARKED_INVALID 192L
+#define ERROR_BAD_EXE_FORMAT 193L
+#define ERROR_ITERATED_DATA_EXCEEDS_64k 194L
+#define ERROR_INVALID_MINALLOCSIZE 195L
+#define ERROR_DYNLINK_FROM_INVALID_RING 196L
+#define ERROR_IOPL_NOT_ENABLED 197L
+#define ERROR_INVALID_SEGDPL 198L
+#define ERROR_AUTODATASEG_EXCEEDS_64k 199L
+#define ERROR_RING2SEG_MUST_BE_MOVABLE 200L
+#define ERROR_RELOC_CHAIN_XEEDS_SEGLIM 201L
+#define ERROR_INFLOOP_IN_RELOC_CHAIN 202L
+#define ERROR_ENVVAR_NOT_FOUND 203L
+#define ERROR_NO_SIGNAL_SENT 205L
+#define ERROR_FILENAME_EXCED_RANGE 206L
+#define ERROR_RING2_STACK_IN_USE 207L
+#define ERROR_META_EXPANSION_TOO_LONG 208L
+#define ERROR_INVALID_SIGNAL_NUMBER 209L
+#define ERROR_THREAD_1_INACTIVE 210L
+#define ERROR_LOCKED 212L
+#define ERROR_TOO_MANY_MODULES 214L
+#define ERROR_NESTING_NOT_ALLOWED 215L
+#define ERROR_EXE_MACHINE_TYPE_MISMATCH 216L
+#define ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY 217L
+#define ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY 218L
+#define ERROR_BAD_PIPE 230L
+#define ERROR_PIPE_BUSY 231L
+#define ERROR_NO_DATA 232L
+#define ERROR_PIPE_NOT_CONNECTED 233L
+#define ERROR_MORE_DATA 234L
+#define ERROR_VC_DISCONNECTED 240L
+#define ERROR_INVALID_EA_NAME 254L
+#define ERROR_EA_LIST_INCONSISTENT 255L
+#define WAIT_TIMEOUT 258L
+#define ERROR_NO_MORE_ITEMS 259L
+#define ERROR_CANNOT_COPY 266L
+#define ERROR_DIRECTORY 267L
+#define ERROR_EAS_DIDNT_FIT 275L
+#define ERROR_EA_FILE_CORRUPT 276L
+#define ERROR_EA_TABLE_FULL 277L
+#define ERROR_INVALID_EA_HANDLE 278L
+#define ERROR_EAS_NOT_SUPPORTED 282L
+#define ERROR_NOT_OWNER 288L
+#define ERROR_TOO_MANY_POSTS 298L
+#define ERROR_PARTIAL_COPY 299L
+#define ERROR_OPLOCK_NOT_GRANTED 300L
+#define ERROR_INVALID_OPLOCK_PROTOCOL 301L
+#define ERROR_DISK_TOO_FRAGMENTED 302L
+#define ERROR_DELETE_PENDING 303L
+#define ERROR_MR_MID_NOT_FOUND 317L
+#define ERROR_SCOPE_NOT_FOUND 318L
+#define ERROR_INVALID_ADDRESS 487L
+#define ERROR_ARITHMETIC_OVERFLOW 534L
+#define ERROR_PIPE_CONNECTED 535L
+#define ERROR_PIPE_LISTENING 536L
+#define ERROR_EA_ACCESS_DENIED 994L
+#define ERROR_OPERATION_ABORTED 995L
+#define ERROR_IO_INCOMPLETE 996L
+#define ERROR_IO_PENDING 997L
+#define ERROR_NOACCESS 998L
+#define ERROR_SWAPERROR 999L
+#define ERROR_STACK_OVERFLOW 1001L
+#define ERROR_INVALID_MESSAGE 1002L
+#define ERROR_CAN_NOT_COMPLETE 1003L
+#define ERROR_INVALID_FLAGS 1004L
+#define ERROR_UNRECOGNIZED_VOLUME 1005L
+#define ERROR_FILE_INVALID 1006L
+#define ERROR_FULLSCREEN_MODE 1007L
+#define ERROR_NO_TOKEN 1008L
+#define ERROR_BADDB 1009L
+#define ERROR_BADKEY 1010L
+#define ERROR_CANTOPEN 1011L
+#define ERROR_CANTREAD 1012L
+#define ERROR_CANTWRITE 1013L
+#define ERROR_REGISTRY_RECOVERED 1014L
+#define ERROR_REGISTRY_CORRUPT 1015L
+#define ERROR_REGISTRY_IO_FAILED 1016L
+#define ERROR_NOT_REGISTRY_FILE 1017L
+#define ERROR_KEY_DELETED 1018L
+#define ERROR_NO_LOG_SPACE 1019L
+#define ERROR_KEY_HAS_CHILDREN 1020L
+#define ERROR_CHILD_MUST_BE_VOLATILE 1021L
+#define ERROR_NOTIFY_ENUM_DIR 1022L
+#define ERROR_DEPENDENT_SERVICES_RUNNING 1051L
+#define ERROR_INVALID_SERVICE_CONTROL 1052L
+#define ERROR_SERVICE_REQUEST_TIMEOUT 1053L
+#define ERROR_SERVICE_NO_THREAD 1054L
+#define ERROR_SERVICE_DATABASE_LOCKED 1055L
+#define ERROR_SERVICE_ALREADY_RUNNING 1056L
+#define ERROR_INVALID_SERVICE_ACCOUNT 1057L
+#define ERROR_SERVICE_DISABLED 1058L
+#define ERROR_CIRCULAR_DEPENDENCY 1059L
+#define ERROR_SERVICE_DOES_NOT_EXIST 1060L
+#define ERROR_SERVICE_CANNOT_ACCEPT_CTRL 1061L
+#define ERROR_SERVICE_NOT_ACTIVE 1062L
+#define ERROR_FAILED_SERVICE_CONTROLLER_CONNECT 1063L
+#define ERROR_EXCEPTION_IN_SERVICE 1064L
+#define ERROR_DATABASE_DOES_NOT_EXIST 1065L
+#define ERROR_SERVICE_SPECIFIC_ERROR 1066L
+#define ERROR_PROCESS_ABORTED 1067L
+#define ERROR_SERVICE_DEPENDENCY_FAIL 1068L
+#define ERROR_SERVICE_LOGON_FAILED 1069L
+#define ERROR_SERVICE_START_HANG 1070L
+#define ERROR_INVALID_SERVICE_LOCK 1071L
+#define ERROR_SERVICE_MARKED_FOR_DELETE 1072L
+#define ERROR_SERVICE_EXISTS 1073L
+#define ERROR_ALREADY_RUNNING_LKG 1074L
+#define ERROR_SERVICE_DEPENDENCY_DELETED 1075L
+#define ERROR_BOOT_ALREADY_ACCEPTED 1076L
+#define ERROR_SERVICE_NEVER_STARTED 1077L
+#define ERROR_DUPLICATE_SERVICE_NAME 1078L
+#define ERROR_DIFFERENT_SERVICE_ACCOUNT 1079L
+#define ERROR_CANNOT_DETECT_DRIVER_FAILURE 1080L
+#define ERROR_CANNOT_DETECT_PROCESS_ABORT 1081L
+#define ERROR_NO_RECOVERY_PROGRAM 1082L
+#define ERROR_SERVICE_NOT_IN_EXE 1083L
+#define ERROR_NOT_SAFEBOOT_SERVICE 1084L
+#define ERROR_END_OF_MEDIA 1100L
+#define ERROR_FILEMARK_DETECTED 1101L
+#define ERROR_BEGINNING_OF_MEDIA 1102L
+#define ERROR_SETMARK_DETECTED 1103L
+#define ERROR_NO_DATA_DETECTED 1104L
+#define ERROR_PARTITION_FAILURE 1105L
+#define ERROR_INVALID_BLOCK_LENGTH 1106L
+#define ERROR_DEVICE_NOT_PARTITIONED 1107L
+#define ERROR_UNABLE_TO_LOCK_MEDIA 1108L
+#define ERROR_UNABLE_TO_UNLOAD_MEDIA 1109L
+#define ERROR_MEDIA_CHANGED 1110L
+#define ERROR_BUS_RESET 1111L
+#define ERROR_NO_MEDIA_IN_DRIVE 1112L
+#define ERROR_NO_UNICODE_TRANSLATION 1113L
+#define ERROR_DLL_INIT_FAILED 1114L
+#define ERROR_SHUTDOWN_IN_PROGRESS 1115L
+#define ERROR_NO_SHUTDOWN_IN_PROGRESS 1116L
+#define ERROR_IO_DEVICE 1117L
+#define ERROR_SERIAL_NO_DEVICE 1118L
+#define ERROR_IRQ_BUSY 1119L
+#define ERROR_MORE_WRITES 1120L
+#define ERROR_COUNTER_TIMEOUT 1121L
+#define ERROR_FLOPPY_ID_MARK_NOT_FOUND 1122L
+#define ERROR_FLOPPY_WRONG_CYLINDER 1123L
+#define ERROR_FLOPPY_UNKNOWN_ERROR 1124L
+#define ERROR_FLOPPY_BAD_REGISTERS 1125L
+#define ERROR_DISK_RECALIBRATE_FAILED 1126L
+#define ERROR_DISK_OPERATION_FAILED 1127L
+#define ERROR_DISK_RESET_FAILED 1128L
+#define ERROR_EOM_OVERFLOW 1129L
+#define ERROR_NOT_ENOUGH_SERVER_MEMORY 1130L
+#define ERROR_POSSIBLE_DEADLOCK 1131L
+#define ERROR_MAPPED_ALIGNMENT 1132L
+#define ERROR_SET_POWER_STATE_VETOED 1140L
+#define ERROR_SET_POWER_STATE_FAILED 1141L
+#define ERROR_TOO_MANY_LINKS 1142L
+#define ERROR_OLD_WIN_VERSION 1150L
+#define ERROR_APP_WRONG_OS 1151L
+#define ERROR_SINGLE_INSTANCE_APP 1152L
+#define ERROR_RMODE_APP 1153L
+#define ERROR_INVALID_DLL 1154L
+#define ERROR_NO_ASSOCIATION 1155L
+#define ERROR_DDE_FAIL 1156L
+#define ERROR_DLL_NOT_FOUND 1157L
+#define ERROR_NO_MORE_USER_HANDLES 1158L
+#define ERROR_MESSAGE_SYNC_ONLY 1159L
+#define ERROR_SOURCE_ELEMENT_EMPTY 1160L
+#define ERROR_DESTINATION_ELEMENT_FULL 1161L
+#define ERROR_ILLEGAL_ELEMENT_ADDRESS 1162L
+#define ERROR_MAGAZINE_NOT_PRESENT 1163L
+#define ERROR_DEVICE_REINITIALIZATION_NEEDED 1164L
+#define ERROR_DEVICE_REQUIRES_CLEANING 1165L
+#define ERROR_DEVICE_DOOR_OPEN 1166L
+#define ERROR_DEVICE_NOT_CONNECTED 1167L
+#define ERROR_NOT_FOUND 1168L
+#define ERROR_NO_MATCH 1169L
+#define ERROR_SET_NOT_FOUND 1170L
+#define ERROR_POINT_NOT_FOUND 1171L
+#define ERROR_NO_TRACKING_SERVICE 1172L
+#define ERROR_NO_VOLUME_ID 1173L
+#define ERROR_UNABLE_TO_REMOVE_REPLACED 1175L
+#define ERROR_UNABLE_TO_MOVE_REPLACEMENT 1176L
+#define ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 1177L
+#define ERROR_JOURNAL_DELETE_IN_PROGRESS 1178L
+#define ERROR_JOURNAL_NOT_ACTIVE 1179L
+#define ERROR_POTENTIAL_FILE_FOUND 1180L
+#define ERROR_JOURNAL_ENTRY_DELETED 1181L
+#define ERROR_BAD_DEVICE 1200L
+#define ERROR_CONNECTION_UNAVAIL 1201L
+#define ERROR_DEVICE_ALREADY_REMEMBERED 1202L
+#define ERROR_NO_NET_OR_BAD_PATH 1203L
+#define ERROR_BAD_PROVIDER 1204L
+#define ERROR_CANNOT_OPEN_PROFILE 1205L
+#define ERROR_BAD_PROFILE 1206L
+#define ERROR_NOT_CONTAINER 1207L
+#define ERROR_EXTENDED_ERROR 1208L
+#define ERROR_INVALID_GROUPNAME 1209L
+#define ERROR_INVALID_COMPUTERNAME 1210L
+#define ERROR_INVALID_EVENTNAME 1211L
+#define ERROR_INVALID_DOMAINNAME 1212L
+#define ERROR_INVALID_SERVICENAME 1213L
+#define ERROR_INVALID_NETNAME 1214L
+#define ERROR_INVALID_SHARENAME 1215L
+#define ERROR_INVALID_PASSWORDNAME 1216L
+#define ERROR_INVALID_MESSAGENAME 1217L
+#define ERROR_INVALID_MESSAGEDEST 1218L
+#define ERROR_SESSION_CREDENTIAL_CONFLICT 1219L
+#define ERROR_REMOTE_SESSION_LIMIT_EXCEEDED 1220L
+#define ERROR_DUP_DOMAINNAME 1221L
+#define ERROR_NO_NETWORK 1222L
+#define ERROR_CANCELLED 1223L
+#define ERROR_USER_MAPPED_FILE 1224L
+#define ERROR_CONNECTION_REFUSED 1225L
+#define ERROR_GRACEFUL_DISCONNECT 1226L
+#define ERROR_ADDRESS_ALREADY_ASSOCIATED 1227L
+#define ERROR_ADDRESS_NOT_ASSOCIATED 1228L
+#define ERROR_CONNECTION_INVALID 1229L
+#define ERROR_CONNECTION_ACTIVE 1230L
+#define ERROR_NETWORK_UNREACHABLE 1231L
+#define ERROR_HOST_UNREACHABLE 1232L
+#define ERROR_PROTOCOL_UNREACHABLE 1233L
+#define ERROR_PORT_UNREACHABLE 1234L
+#define ERROR_REQUEST_ABORTED 1235L
+#define ERROR_CONNECTION_ABORTED 1236L
+#define ERROR_RETRY 1237L
+#define ERROR_CONNECTION_COUNT_LIMIT 1238L
+#define ERROR_LOGIN_TIME_RESTRICTION 1239L
+#define ERROR_LOGIN_WKSTA_RESTRICTION 1240L
+#define ERROR_INCORRECT_ADDRESS 1241L
+#define ERROR_ALREADY_REGISTERED 1242L
+#define ERROR_SERVICE_NOT_FOUND 1243L
+#define ERROR_NOT_AUTHENTICATED 1244L
+#define ERROR_NOT_LOGGED_ON 1245L
+#define ERROR_CONTINUE 1246L
+#define ERROR_ALREADY_INITIALIZED 1247L
+#define ERROR_NO_MORE_DEVICES 1248L
+#define ERROR_NO_SUCH_SITE 1249L
+#define ERROR_DOMAIN_CONTROLLER_EXISTS 1250L
+#define ERROR_ONLY_IF_CONNECTED 1251L
+#define ERROR_OVERRIDE_NOCHANGES 1252L
+#define ERROR_BAD_USER_PROFILE 1253L
+#define ERROR_NOT_SUPPORTED_ON_SBS 1254L
+#define ERROR_SERVER_SHUTDOWN_IN_PROGRESS 1255L
+#define ERROR_HOST_DOWN 1256L
+#define ERROR_NON_ACCOUNT_SID 1257L
+#define ERROR_NON_DOMAIN_SID 1258L
+#define ERROR_APPHELP_BLOCK 1259L
+#define ERROR_ACCESS_DISABLED_BY_POLICY 1260L
+#define ERROR_REG_NAT_CONSUMPTION 1261L
+#define ERROR_CSCSHARE_OFFLINE 1262L
+#define ERROR_PKINIT_FAILURE 1263L
+#define ERROR_SMARTCARD_SUBSYSTEM_FAILURE 1264L
+#define ERROR_DOWNGRADE_DETECTED 1265L
+#define ERROR_MACHINE_LOCKED 1271L
+#define ERROR_CALLBACK_SUPPLIED_INVALID_DATA 1273L
+#define ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED 1274L
+#define ERROR_DRIVER_BLOCKED 1275L
+#define ERROR_INVALID_IMPORT_OF_NON_DLL 1276L
+#define ERROR_ACCESS_DISABLED_WEBBLADE 1277L
+#define ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER 1278L
+#define ERROR_RECOVERY_FAILURE 1279L
+#define ERROR_ALREADY_FIBER 1280L
+#define ERROR_ALREADY_THREAD 1281L
+#define ERROR_STACK_BUFFER_OVERRUN 1282L
+#define ERROR_PARAMETER_QUOTA_EXCEEDED 1283L
+#define ERROR_DEBUGGER_INACTIVE 1284L
+#define ERROR_DELAY_LOAD_FAILED 1285L
+#define ERROR_VDM_DISALLOWED 1286L
+#define ERROR_UNIDENTIFIED_ERROR 1287L
+#define ERROR_NOT_ALL_ASSIGNED 1300L
+#define ERROR_SOME_NOT_MAPPED 1301L
+#define ERROR_NO_QUOTAS_FOR_ACCOUNT 1302L
+#define ERROR_LOCAL_USER_SESSION_KEY 1303L
+#define ERROR_NULL_LM_PASSWORD 1304L
+#define ERROR_UNKNOWN_REVISION 1305L
+#define ERROR_REVISION_MISMATCH 1306L
+#define ERROR_INVALID_OWNER 1307L
+#define ERROR_INVALID_PRIMARY_GROUP 1308L
+#define ERROR_NO_IMPERSONATION_TOKEN 1309L
+#define ERROR_CANT_DISABLE_MANDATORY 1310L
+#define ERROR_NO_LOGON_SERVERS 1311L
+#define ERROR_NO_SUCH_LOGON_SESSION 1312L
+#define ERROR_NO_SUCH_PRIVILEGE 1313L
+#define ERROR_PRIVILEGE_NOT_HELD 1314L
+#define ERROR_INVALID_ACCOUNT_NAME 1315L
+#define ERROR_USER_EXISTS 1316L
+#define ERROR_NO_SUCH_USER 1317L
+#define ERROR_GROUP_EXISTS 1318L
+#define ERROR_NO_SUCH_GROUP 1319L
+#define ERROR_MEMBER_IN_GROUP 1320L
+#define ERROR_MEMBER_NOT_IN_GROUP 1321L
+#define ERROR_LAST_ADMIN 1322L
+#define ERROR_WRONG_PASSWORD 1323L
+#define ERROR_ILL_FORMED_PASSWORD 1324L
+#define ERROR_PASSWORD_RESTRICTION 1325L
+#define ERROR_LOGON_FAILURE 1326L
+#define ERROR_ACCOUNT_RESTRICTION 1327L
+#define ERROR_INVALID_LOGON_HOURS 1328L
+#define ERROR_INVALID_WORKSTATION 1329L
+#define ERROR_PASSWORD_EXPIRED 1330L
+#define ERROR_ACCOUNT_DISABLED 1331L
+#define ERROR_NONE_MAPPED 1332L
+#define ERROR_TOO_MANY_LUIDS_REQUESTED 1333L
+#define ERROR_LUIDS_EXHAUSTED 1334L
+#define ERROR_INVALID_SUB_AUTHORITY 1335L
+#define ERROR_INVALID_ACL 1336L
+#define ERROR_INVALID_SID 1337L
+#define ERROR_INVALID_SECURITY_DESCR 1338L
+#define ERROR_BAD_INHERITANCE_ACL 1340L
+#define ERROR_SERVER_DISABLED 1341L
+#define ERROR_SERVER_NOT_DISABLED 1342L
+#define ERROR_INVALID_ID_AUTHORITY 1343L
+#define ERROR_ALLOTTED_SPACE_EXCEEDED 1344L
+#define ERROR_INVALID_GROUP_ATTRIBUTES 1345L
+#define ERROR_BAD_IMPERSONATION_LEVEL 1346L
+#define ERROR_CANT_OPEN_ANONYMOUS 1347L
+#define ERROR_BAD_VALIDATION_CLASS 1348L
+#define ERROR_BAD_TOKEN_TYPE 1349L
+#define ERROR_NO_SECURITY_ON_OBJECT 1350L
+#define ERROR_CANT_ACCESS_DOMAIN_INFO 1351L
+#define ERROR_INVALID_SERVER_STATE 1352L
+#define ERROR_INVALID_DOMAIN_STATE 1353L
+#define ERROR_INVALID_DOMAIN_ROLE 1354L
+#define ERROR_NO_SUCH_DOMAIN 1355L
+#define ERROR_DOMAIN_EXISTS 1356L
+#define ERROR_DOMAIN_LIMIT_EXCEEDED 1357L
+#define ERROR_INTERNAL_DB_CORRUPTION 1358L
+#define ERROR_INTERNAL_ERROR 1359L
+#define ERROR_GENERIC_NOT_MAPPED 1360L
+#define ERROR_BAD_DESCRIPTOR_FORMAT 1361L
+#define ERROR_NOT_LOGON_PROCESS 1362L
+#define ERROR_LOGON_SESSION_EXISTS 1363L
+#define ERROR_NO_SUCH_PACKAGE 1364L
+#define ERROR_BAD_LOGON_SESSION_STATE 1365L
+#define ERROR_LOGON_SESSION_COLLISION 1366L
+#define ERROR_INVALID_LOGON_TYPE 1367L
+#define ERROR_CANNOT_IMPERSONATE 1368L
+#define ERROR_RXACT_INVALID_STATE 1369L
+#define ERROR_RXACT_COMMIT_FAILURE 1370L
+#define ERROR_SPECIAL_ACCOUNT 1371L
+#define ERROR_SPECIAL_GROUP 1372L
+#define ERROR_SPECIAL_USER 1373L
+#define ERROR_MEMBERS_PRIMARY_GROUP 1374L
+#define ERROR_TOKEN_ALREADY_IN_USE 1375L
+#define ERROR_NO_SUCH_ALIAS 1376L
+#define ERROR_MEMBER_NOT_IN_ALIAS 1377L
+#define ERROR_MEMBER_IN_ALIAS 1378L
+#define ERROR_ALIAS_EXISTS 1379L
+#define ERROR_LOGON_NOT_GRANTED 1380L
+#define ERROR_TOO_MANY_SECRETS 1381L
+#define ERROR_SECRET_TOO_LONG 1382L
+#define ERROR_INTERNAL_DB_ERROR 1383L
+#define ERROR_TOO_MANY_CONTEXT_IDS 1384L
+#define ERROR_LOGON_TYPE_NOT_GRANTED 1385L
+#define ERROR_NT_CROSS_ENCRYPTION_REQUIRED 1386L
+#define ERROR_NO_SUCH_MEMBER 1387L
+#define ERROR_INVALID_MEMBER 1388L
+#define ERROR_TOO_MANY_SIDS 1389L
+#define ERROR_LM_CROSS_ENCRYPTION_REQUIRED 1390L
+#define ERROR_NO_INHERITANCE 1391L
+#define ERROR_FILE_CORRUPT 1392L
+#define ERROR_DISK_CORRUPT 1393L
+#define ERROR_NO_USER_SESSION_KEY 1394L
+#define ERROR_LICENSE_QUOTA_EXCEEDED 1395L
+#define ERROR_WRONG_TARGET_NAME 1396L
+#define ERROR_MUTUAL_AUTH_FAILED 1397L
+#define ERROR_TIME_SKEW 1398L
+#define ERROR_CURRENT_DOMAIN_NOT_ALLOWED 1399L
+#define ERROR_INVALID_WINDOW_HANDLE 1400L
+#define ERROR_INVALID_MENU_HANDLE 1401L
+#define ERROR_INVALID_CURSOR_HANDLE 1402L
+#define ERROR_INVALID_ACCEL_HANDLE 1403L
+#define ERROR_INVALID_HOOK_HANDLE 1404L
+#define ERROR_INVALID_DWP_HANDLE 1405L
+#define ERROR_TLW_WITH_WSCHILD 1406L
+#define ERROR_CANNOT_FIND_WND_CLASS 1407L
+#define ERROR_WINDOW_OF_OTHER_THREAD 1408L
+#define ERROR_HOTKEY_ALREADY_REGISTERED 1409L
+#define ERROR_CLASS_ALREADY_EXISTS 1410L
+#define ERROR_CLASS_DOES_NOT_EXIST 1411L
+#define ERROR_CLASS_HAS_WINDOWS 1412L
+#define ERROR_INVALID_INDEX 1413L
+#define ERROR_INVALID_ICON_HANDLE 1414L
+#define ERROR_PRIVATE_DIALOG_INDEX 1415L
+#define ERROR_LISTBOX_ID_NOT_FOUND 1416L
+#define ERROR_NO_WILDCARD_CHARACTERS 1417L
+#define ERROR_CLIPBOARD_NOT_OPEN 1418L
+#define ERROR_HOTKEY_NOT_REGISTERED 1419L
+#define ERROR_WINDOW_NOT_DIALOG 1420L
+#define ERROR_CONTROL_ID_NOT_FOUND 1421L
+#define ERROR_INVALID_COMBOBOX_MESSAGE 1422L
+#define ERROR_WINDOW_NOT_COMBOBOX 1423L
+#define ERROR_INVALID_EDIT_HEIGHT 1424L
+#define ERROR_DC_NOT_FOUND 1425L
+#define ERROR_INVALID_HOOK_FILTER 1426L
+#define ERROR_INVALID_FILTER_PROC 1427L
+#define ERROR_HOOK_NEEDS_HMOD 1428L
+#define ERROR_GLOBAL_ONLY_HOOK 1429L
+#define ERROR_JOURNAL_HOOK_SET 1430L
+#define ERROR_HOOK_NOT_INSTALLED 1431L
+#define ERROR_INVALID_LB_MESSAGE 1432L
+#define ERROR_SETCOUNT_ON_BAD_LB 1433L
+#define ERROR_LB_WITHOUT_TABSTOPS 1434L
+#define ERROR_DESTROY_OBJECT_OF_OTHER_THREAD 1435L
+#define ERROR_CHILD_WINDOW_MENU 1436L
+#define ERROR_NO_SYSTEM_MENU 1437L
+#define ERROR_INVALID_MSGBOX_STYLE 1438L
+#define ERROR_INVALID_SPI_VALUE 1439L
+#define ERROR_SCREEN_ALREADY_LOCKED 1440L
+#define ERROR_HWNDS_HAVE_DIFF_PARENT 1441L
+#define ERROR_NOT_CHILD_WINDOW 1442L
+#define ERROR_INVALID_GW_COMMAND 1443L
+#define ERROR_INVALID_THREAD_ID 1444L
+#define ERROR_NON_MDICHILD_WINDOW 1445L
+#define ERROR_POPUP_ALREADY_ACTIVE 1446L
+#define ERROR_NO_SCROLLBARS 1447L
+#define ERROR_INVALID_SCROLLBAR_RANGE 1448L
+#define ERROR_INVALID_SHOWWIN_COMMAND 1449L
+#define ERROR_NO_SYSTEM_RESOURCES 1450L
+#define ERROR_NONPAGED_SYSTEM_RESOURCES 1451L
+#define ERROR_PAGED_SYSTEM_RESOURCES 1452L
+#define ERROR_WORKING_SET_QUOTA 1453L
+#define ERROR_PAGEFILE_QUOTA 1454L
+#define ERROR_COMMITMENT_LIMIT 1455L
+#define ERROR_MENU_ITEM_NOT_FOUND 1456L
+#define ERROR_INVALID_KEYBOARD_HANDLE 1457L
+#define ERROR_HOOK_TYPE_NOT_ALLOWED 1458L
+#define ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION 1459L
+#define ERROR_TIMEOUT 1460L
+#define ERROR_INVALID_MONITOR_HANDLE 1461L
+#define ERROR_INCORRECT_SIZE 1462L
+#define ERROR_EVENTLOG_FILE_CORRUPT 1500L
+#define ERROR_EVENTLOG_CANT_START 1501L
+#define ERROR_LOG_FILE_FULL 1502L
+#define ERROR_EVENTLOG_FILE_CHANGED 1503L
+#define ERROR_INSTALL_SERVICE_FAILURE 1601L
+#define ERROR_INSTALL_USEREXIT 1602L
+#define ERROR_INSTALL_FAILURE 1603L
+#define ERROR_INSTALL_SUSPEND 1604L
+#define ERROR_UNKNOWN_PRODUCT 1605L
+#define ERROR_UNKNOWN_FEATURE 1606L
+#define ERROR_UNKNOWN_COMPONENT 1607L
+#define ERROR_UNKNOWN_PROPERTY 1608L
+#define ERROR_INVALID_HANDLE_STATE 1609L
+#define ERROR_BAD_CONFIGURATION 1610L
+#define ERROR_INDEX_ABSENT 1611L
+#define ERROR_INSTALL_SOURCE_ABSENT 1612L
+#define ERROR_INSTALL_PACKAGE_VERSION 1613L
+#define ERROR_PRODUCT_UNINSTALLED 1614L
+#define ERROR_BAD_QUERY_SYNTAX 1615L
+#define ERROR_INVALID_FIELD 1616L
+#define ERROR_DEVICE_REMOVED 1617L
+#define ERROR_INSTALL_ALREADY_RUNNING 1618L
+#define ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619L
+#define ERROR_INSTALL_PACKAGE_INVALID 1620L
+#define ERROR_INSTALL_UI_FAILURE 1621L
+#define ERROR_INSTALL_LOG_FAILURE 1622L
+#define ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623L
+#define ERROR_INSTALL_TRANSFORM_FAILURE 1624L
+#define ERROR_INSTALL_PACKAGE_REJECTED 1625L
+#define ERROR_FUNCTION_NOT_CALLED 1626L
+#define ERROR_FUNCTION_FAILED 1627L
+#define ERROR_INVALID_TABLE 1628L
+#define ERROR_DATATYPE_MISMATCH 1629L
+#define ERROR_UNSUPPORTED_TYPE 1630L
+#define ERROR_CREATE_FAILED 1631L
+#define ERROR_INSTALL_TEMP_UNWRITABLE 1632L
+#define ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633L
+#define ERROR_INSTALL_NOTUSED 1634L
+#define ERROR_PATCH_PACKAGE_OPEN_FAILED 1635L
+#define ERROR_PATCH_PACKAGE_INVALID 1636L
+#define ERROR_PATCH_PACKAGE_UNSUPPORTED 1637L
+#define ERROR_PRODUCT_VERSION 1638L
+#define ERROR_INVALID_COMMAND_LINE 1639L
+#define ERROR_INSTALL_REMOTE_DISALLOWED 1640L
+#define ERROR_SUCCESS_REBOOT_INITIATED 1641L
+#define ERROR_PATCH_TARGET_NOT_FOUND 1642L
+#define ERROR_PATCH_PACKAGE_REJECTED 1643L
+#define ERROR_INSTALL_TRANSFORM_REJECTED 1644L
+#define ERROR_INSTALL_REMOTE_PROHIBITED 1645L
+#define RPC_S_INVALID_STRING_BINDING 1700L
+#define RPC_S_WRONG_KIND_OF_BINDING 1701L
+#define RPC_S_INVALID_BINDING 1702L
+#define RPC_S_PROTSEQ_NOT_SUPPORTED 1703L
+#define RPC_S_INVALID_RPC_PROTSEQ 1704L
+#define RPC_S_INVALID_STRING_UUID 1705L
+#define RPC_S_INVALID_ENDPOINT_FORMAT 1706L
+#define RPC_S_INVALID_NET_ADDR 1707L
+#define RPC_S_NO_ENDPOINT_FOUND 1708L
+#define RPC_S_INVALID_TIMEOUT 1709L
+#define RPC_S_OBJECT_NOT_FOUND 1710L
+#define RPC_S_ALREADY_REGISTERED 1711L
+#define RPC_S_TYPE_ALREADY_REGISTERED 1712L
+#define RPC_S_ALREADY_LISTENING 1713L
+#define RPC_S_NO_PROTSEQS_REGISTERED 1714L
+#define RPC_S_NOT_LISTENING 1715L
+#define RPC_S_UNKNOWN_MGR_TYPE 1716L
+#define RPC_S_UNKNOWN_IF 1717L
+#define RPC_S_NO_BINDINGS 1718L
+#define RPC_S_NO_PROTSEQS 1719L
+#define RPC_S_CANT_CREATE_ENDPOINT 1720L
+#define RPC_S_OUT_OF_RESOURCES 1721L
+#define RPC_S_SERVER_UNAVAILABLE 1722L
+#define RPC_S_SERVER_TOO_BUSY 1723L
+#define RPC_S_INVALID_NETWORK_OPTIONS 1724L
+#define RPC_S_NO_CALL_ACTIVE 1725L
+#define RPC_S_CALL_FAILED 1726L
+#define RPC_S_CALL_FAILED_DNE 1727L
+#define RPC_S_PROTOCOL_ERROR 1728L
+#define RPC_S_UNSUPPORTED_TRANS_SYN 1730L
+#define RPC_S_UNSUPPORTED_TYPE 1732L
+#define RPC_S_INVALID_TAG 1733L
+#define RPC_S_INVALID_BOUND 1734L
+#define RPC_S_NO_ENTRY_NAME 1735L
+#define RPC_S_INVALID_NAME_SYNTAX 1736L
+#define RPC_S_UNSUPPORTED_NAME_SYNTAX 1737L
+#define RPC_S_UUID_NO_ADDRESS 1739L
+#define RPC_S_DUPLICATE_ENDPOINT 1740L
+#define RPC_S_UNKNOWN_AUTHN_TYPE 1741L
+#define RPC_S_MAX_CALLS_TOO_SMALL 1742L
+#define RPC_S_STRING_TOO_LONG 1743L
+#define RPC_S_PROTSEQ_NOT_FOUND 1744L
+#define RPC_S_PROCNUM_OUT_OF_RANGE 1745L
+#define RPC_S_BINDING_HAS_NO_AUTH 1746L
+#define RPC_S_UNKNOWN_AUTHN_SERVICE 1747L
+#define RPC_S_UNKNOWN_AUTHN_LEVEL 1748L
+#define RPC_S_INVALID_AUTH_IDENTITY 1749L
+#define RPC_S_UNKNOWN_AUTHZ_SERVICE 1750L
+#define EPT_S_INVALID_ENTRY 1751L
+#define EPT_S_CANT_PERFORM_OP 1752L
+#define EPT_S_NOT_REGISTERED 1753L
+#define RPC_S_NOTHING_TO_EXPORT 1754L
+#define RPC_S_INCOMPLETE_NAME 1755L
+#define RPC_S_INVALID_VERS_OPTION 1756L
+#define RPC_S_NO_MORE_MEMBERS 1757L
+#define RPC_S_NOT_ALL_OBJS_UNEXPORTED 1758L
+#define RPC_S_INTERFACE_NOT_FOUND 1759L
+#define RPC_S_ENTRY_ALREADY_EXISTS 1760L
+#define RPC_S_ENTRY_NOT_FOUND 1761L
+#define RPC_S_NAME_SERVICE_UNAVAILABLE 1762L
+#define RPC_S_INVALID_NAF_ID 1763L
+#define RPC_S_CANNOT_SUPPORT 1764L
+#define RPC_S_NO_CONTEXT_AVAILABLE 1765L
+#define RPC_S_INTERNAL_ERROR 1766L
+#define RPC_S_ZERO_DIVIDE 1767L
+#define RPC_S_ADDRESS_ERROR 1768L
+#define RPC_S_FP_DIV_ZERO 1769L
+#define RPC_S_FP_UNDERFLOW 1770L
+#define RPC_S_FP_OVERFLOW 1771L
+#define RPC_X_NO_MORE_ENTRIES 1772L
+#define RPC_X_SS_CHAR_TRANS_OPEN_FAIL 1773L
+#define RPC_X_SS_CHAR_TRANS_SHORT_FILE 1774L
+#define RPC_X_SS_IN_NULL_CONTEXT 1775L
+#define RPC_X_SS_CONTEXT_DAMAGED 1777L
+#define RPC_X_SS_HANDLES_MISMATCH 1778L
+#define RPC_X_SS_CANNOT_GET_CALL_HANDLE 1779L
+#define RPC_X_NULL_REF_POINTER 1780L
+#define RPC_X_ENUM_VALUE_OUT_OF_RANGE 1781L
+#define RPC_X_BYTE_COUNT_TOO_SMALL 1782L
+#define RPC_X_BAD_STUB_DATA 1783L
+#define ERROR_INVALID_USER_BUFFER 1784L
+#define ERROR_UNRECOGNIZED_MEDIA 1785L
+#define ERROR_NO_TRUST_LSA_SECRET 1786L
+#define ERROR_NO_TRUST_SAM_ACCOUNT 1787L
+#define ERROR_TRUSTED_DOMAIN_FAILURE 1788L
+#define ERROR_TRUSTED_RELATIONSHIP_FAILURE 1789L
+#define ERROR_TRUST_FAILURE 1790L
+#define RPC_S_CALL_IN_PROGRESS 1791L
+#define ERROR_NETLOGON_NOT_STARTED 1792L
+#define ERROR_ACCOUNT_EXPIRED 1793L
+#define ERROR_REDIRECTOR_HAS_OPEN_HANDLES 1794L
+#define ERROR_PRINTER_DRIVER_ALREADY_INSTALLED 1795L
+#define ERROR_UNKNOWN_PORT 1796L
+#define ERROR_UNKNOWN_PRINTER_DRIVER 1797L
+#define ERROR_UNKNOWN_PRINTPROCESSOR 1798L
+#define ERROR_INVALID_SEPARATOR_FILE 1799L
+#define ERROR_INVALID_PRIORITY 1800L
+#define ERROR_INVALID_PRINTER_NAME 1801L
+#define ERROR_PRINTER_ALREADY_EXISTS 1802L
+#define ERROR_INVALID_PRINTER_COMMAND 1803L
+#define ERROR_INVALID_DATATYPE 1804L
+#define ERROR_INVALID_ENVIRONMENT 1805L
+#define RPC_S_NO_MORE_BINDINGS 1806L
+#define ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT 1807L
+#define ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT 1808L
+#define ERROR_NOLOGON_SERVER_TRUST_ACCOUNT 1809L
+#define ERROR_DOMAIN_TRUST_INCONSISTENT 1810L
+#define ERROR_SERVER_HAS_OPEN_HANDLES 1811L
+#define ERROR_RESOURCE_DATA_NOT_FOUND 1812L
+#define ERROR_RESOURCE_TYPE_NOT_FOUND 1813L
+#define ERROR_RESOURCE_NAME_NOT_FOUND 1814L
+#define ERROR_RESOURCE_LANG_NOT_FOUND 1815L
+#define ERROR_NOT_ENOUGH_QUOTA 1816L
+#define RPC_S_NO_INTERFACES 1817L
+#define RPC_S_CALL_CANCELLED 1818L
+#define RPC_S_BINDING_INCOMPLETE 1819L
+#define RPC_S_COMM_FAILURE 1820L
+#define RPC_S_UNSUPPORTED_AUTHN_LEVEL 1821L
+#define RPC_S_NO_PRINC_NAME 1822L
+#define RPC_S_NOT_RPC_ERROR 1823L
+#define RPC_S_UUID_LOCAL_ONLY 1824L
+#define RPC_S_SEC_PKG_ERROR 1825L
+#define RPC_S_NOT_CANCELLED 1826L
+#define RPC_X_INVALID_ES_ACTION 1827L
+#define RPC_X_WRONG_ES_VERSION 1828L
+#define RPC_X_WRONG_STUB_VERSION 1829L
+#define RPC_X_INVALID_PIPE_OBJECT 1830L
+#define RPC_X_WRONG_PIPE_ORDER 1831L
+#define RPC_X_WRONG_PIPE_VERSION 1832L
+#define RPC_S_GROUP_MEMBER_NOT_FOUND 1898L
+#define EPT_S_CANT_CREATE 1899L
+#define RPC_S_INVALID_OBJECT 1900L
+#define ERROR_INVALID_TIME 1901L
+#define ERROR_INVALID_FORM_NAME 1902L
+#define ERROR_INVALID_FORM_SIZE 1903L
+#define ERROR_ALREADY_WAITING 1904L
+#define ERROR_PRINTER_DELETED 1905L
+#define ERROR_INVALID_PRINTER_STATE 1906L
+#define ERROR_PASSWORD_MUST_CHANGE 1907L
+#define ERROR_DOMAIN_CONTROLLER_NOT_FOUND 1908L
+#define ERROR_ACCOUNT_LOCKED_OUT 1909L
+#define OR_INVALID_OXID 1910L
+#define OR_INVALID_OID 1911L
+#define OR_INVALID_SET 1912L
+#define RPC_S_SEND_INCOMPLETE 1913L
+#define RPC_S_INVALID_ASYNC_HANDLE 1914L
+#define RPC_S_INVALID_ASYNC_CALL 1915L
+#define RPC_X_PIPE_CLOSED 1916L
+#define RPC_X_PIPE_DISCIPLINE_ERROR 1917L
+#define RPC_X_PIPE_EMPTY 1918L
+#define ERROR_NO_SITENAME 1919L
+#define ERROR_CANT_ACCESS_FILE 1920L
+#define ERROR_CANT_RESOLVE_FILENAME 1921L
+#define RPC_S_ENTRY_TYPE_MISMATCH 1922L
+#define RPC_S_NOT_ALL_OBJS_EXPORTED 1923L
+#define RPC_S_INTERFACE_NOT_EXPORTED 1924L
+#define RPC_S_PROFILE_NOT_ADDED 1925L
+#define RPC_S_PRF_ELT_NOT_ADDED 1926L
+#define RPC_S_PRF_ELT_NOT_REMOVED 1927L
+#define RPC_S_GRP_ELT_NOT_ADDED 1928L
+#define RPC_S_GRP_ELT_NOT_REMOVED 1929L
+#define ERROR_KM_DRIVER_BLOCKED 1930L
+#define ERROR_CONTEXT_EXPIRED 1931L
+#define ERROR_PER_USER_TRUST_QUOTA_EXCEEDED 1932L
+#define ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED 1933L
+#define ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED 1934L
+#define ERROR_AUTHENTICATION_FIREWALL_FAILED 1935L
+#define ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED 1936L
+#define ERROR_INVALID_PIXEL_FORMAT 2000L
+#define ERROR_BAD_DRIVER 2001L
+#define ERROR_INVALID_WINDOW_STYLE 2002L
+#define ERROR_METAFILE_NOT_SUPPORTED 2003L
+#define ERROR_TRANSFORM_NOT_SUPPORTED 2004L
+#define ERROR_CLIPPING_NOT_SUPPORTED 2005L
+#define ERROR_INVALID_CMM 2010L
+#define ERROR_INVALID_PROFILE 2011L
+#define ERROR_TAG_NOT_FOUND 2012L
+#define ERROR_TAG_NOT_PRESENT 2013L
+#define ERROR_DUPLICATE_TAG 2014L
+#define ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE 2015L
+#define ERROR_PROFILE_NOT_FOUND 2016L
+#define ERROR_INVALID_COLORSPACE 2017L
+#define ERROR_ICM_NOT_ENABLED 2018L
+#define ERROR_DELETING_ICM_XFORM 2019L
+#define ERROR_INVALID_TRANSFORM 2020L
+#define ERROR_COLORSPACE_MISMATCH 2021L
+#define ERROR_INVALID_COLORINDEX 2022L
+#define ERROR_CONNECTED_OTHER_PASSWORD 2108L
+#define ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT 2109L
+#define ERROR_BAD_USERNAME 2202L
+#define ERROR_NOT_CONNECTED 2250L
+#define ERROR_OPEN_FILES 2401L
+#define ERROR_ACTIVE_CONNECTIONS 2402L
+#define ERROR_DEVICE_IN_USE 2404L
+#define ERROR_UNKNOWN_PRINT_MONITOR 3000L
+#define ERROR_PRINTER_DRIVER_IN_USE 3001L
+#define ERROR_SPOOL_FILE_NOT_FOUND 3002L
+#define ERROR_SPL_NO_STARTDOC 3003L
+#define ERROR_SPL_NO_ADDJOB 3004L
+#define ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED 3005L
+#define ERROR_PRINT_MONITOR_ALREADY_INSTALLED 3006L
+#define ERROR_INVALID_PRINT_MONITOR 3007L
+#define ERROR_PRINT_MONITOR_IN_USE 3008L
+#define ERROR_PRINTER_HAS_JOBS_QUEUED 3009L
+#define ERROR_SUCCESS_REBOOT_REQUIRED 3010L
+#define ERROR_SUCCESS_RESTART_REQUIRED 3011L
+#define ERROR_PRINTER_NOT_FOUND 3012L
+#define ERROR_PRINTER_DRIVER_WARNED 3013L
+#define ERROR_PRINTER_DRIVER_BLOCKED 3014L
+#define ERROR_WINS_INTERNAL 4000L
+#define ERROR_CAN_NOT_DEL_LOCAL_WINS 4001L
+#define ERROR_STATIC_INIT 4002L
+#define ERROR_INC_BACKUP 4003L
+#define ERROR_FULL_BACKUP 4004L
+#define ERROR_REC_NON_EXISTENT 4005L
+#define ERROR_RPL_NOT_ALLOWED 4006L
+#define ERROR_DHCP_ADDRESS_CONFLICT 4100L
+#define ERROR_WMI_GUID_NOT_FOUND 4200L
+#define ERROR_WMI_INSTANCE_NOT_FOUND 4201L
+#define ERROR_WMI_ITEMID_NOT_FOUND 4202L
+#define ERROR_WMI_TRY_AGAIN 4203L
+#define ERROR_WMI_DP_NOT_FOUND 4204L
+#define ERROR_WMI_UNRESOLVED_INSTANCE_REF 4205L
+#define ERROR_WMI_ALREADY_ENABLED 4206L
+#define ERROR_WMI_GUID_DISCONNECTED 4207L
+#define ERROR_WMI_SERVER_UNAVAILABLE 4208L
+#define ERROR_WMI_DP_FAILED 4209L
+#define ERROR_WMI_INVALID_MOF 4210L
+#define ERROR_WMI_INVALID_REGINFO 4211L
+#define ERROR_WMI_ALREADY_DISABLED 4212L
+#define ERROR_WMI_READ_ONLY 4213L
+#define ERROR_WMI_SET_FAILURE 4214L
+#define ERROR_INVALID_MEDIA 4300L
+#define ERROR_INVALID_LIBRARY 4301L
+#define ERROR_INVALID_MEDIA_POOL 4302L
+#define ERROR_DRIVE_MEDIA_MISMATCH 4303L
+#define ERROR_MEDIA_OFFLINE 4304L
+#define ERROR_LIBRARY_OFFLINE 4305L
+#define ERROR_EMPTY 4306L
+#define ERROR_NOT_EMPTY 4307L
+#define ERROR_MEDIA_UNAVAILABLE 4308L
+#define ERROR_RESOURCE_DISABLED 4309L
+#define ERROR_INVALID_CLEANER 4310L
+#define ERROR_UNABLE_TO_CLEAN 4311L
+#define ERROR_OBJECT_NOT_FOUND 4312L
+#define ERROR_DATABASE_FAILURE 4313L
+#define ERROR_DATABASE_FULL 4314L
+#define ERROR_MEDIA_INCOMPATIBLE 4315L
+#define ERROR_RESOURCE_NOT_PRESENT 4316L
+#define ERROR_INVALID_OPERATION 4317L
+#define ERROR_MEDIA_NOT_AVAILABLE 4318L
+#define ERROR_DEVICE_NOT_AVAILABLE 4319L
+#define ERROR_REQUEST_REFUSED 4320L
+#define ERROR_INVALID_DRIVE_OBJECT 4321L
+#define ERROR_LIBRARY_FULL 4322L
+#define ERROR_MEDIUM_NOT_ACCESSIBLE 4323L
+#define ERROR_UNABLE_TO_LOAD_MEDIUM 4324L
+#define ERROR_UNABLE_TO_INVENTORY_DRIVE 4325L
+#define ERROR_UNABLE_TO_INVENTORY_SLOT 4326L
+#define ERROR_UNABLE_TO_INVENTORY_TRANSPORT 4327L
+#define ERROR_TRANSPORT_FULL 4328L
+#define ERROR_CONTROLLING_IEPORT 4329L
+#define ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA 4330L
+#define ERROR_CLEANER_SLOT_SET 4331L
+#define ERROR_CLEANER_SLOT_NOT_SET 4332L
+#define ERROR_CLEANER_CARTRIDGE_SPENT 4333L
+#define ERROR_UNEXPECTED_OMID 4334L
+#define ERROR_CANT_DELETE_LAST_ITEM 4335L
+#define ERROR_MESSAGE_EXCEEDS_MAX_SIZE 4336L
+#define ERROR_VOLUME_CONTAINS_SYS_FILES 4337L
+#define ERROR_INDIGENOUS_TYPE 4338L
+#define ERROR_NO_SUPPORTING_DRIVES 4339L
+#define ERROR_CLEANER_CARTRIDGE_INSTALLED 4340L
+#define ERROR_IEPORT_FULL 4341L
+#define ERROR_FILE_OFFLINE 4350L
+#define ERROR_REMOTE_STORAGE_NOT_ACTIVE 4351L
+#define ERROR_REMOTE_STORAGE_MEDIA_ERROR 4352L
+#define ERROR_NOT_A_REPARSE_POINT 4390L
+#define ERROR_REPARSE_ATTRIBUTE_CONFLICT 4391L
+#define ERROR_INVALID_REPARSE_DATA 4392L
+#define ERROR_REPARSE_TAG_INVALID 4393L
+#define ERROR_REPARSE_TAG_MISMATCH 4394L
+#define ERROR_VOLUME_NOT_SIS_ENABLED 4500L
+#define ERROR_DEPENDENT_RESOURCE_EXISTS 5001L
+#define ERROR_DEPENDENCY_NOT_FOUND 5002L
+#define ERROR_DEPENDENCY_ALREADY_EXISTS 5003L
+#define ERROR_RESOURCE_NOT_ONLINE 5004L
+#define ERROR_HOST_NODE_NOT_AVAILABLE 5005L
+#define ERROR_RESOURCE_NOT_AVAILABLE 5006L
+#define ERROR_RESOURCE_NOT_FOUND 5007L
+#define ERROR_SHUTDOWN_CLUSTER 5008L
+#define ERROR_CANT_EVICT_ACTIVE_NODE 5009L
+#define ERROR_OBJECT_ALREADY_EXISTS 5010L
+#define ERROR_OBJECT_IN_LIST 5011L
+#define ERROR_GROUP_NOT_AVAILABLE 5012L
+#define ERROR_GROUP_NOT_FOUND 5013L
+#define ERROR_GROUP_NOT_ONLINE 5014L
+#define ERROR_HOST_NODE_NOT_RESOURCE_OWNER 5015L
+#define ERROR_HOST_NODE_NOT_GROUP_OWNER 5016L
+#define ERROR_RESMON_CREATE_FAILED 5017L
+#define ERROR_RESMON_ONLINE_FAILED 5018L
+#define ERROR_RESOURCE_ONLINE 5019L
+#define ERROR_QUORUM_RESOURCE 5020L
+#define ERROR_NOT_QUORUM_CAPABLE 5021L
+#define ERROR_CLUSTER_SHUTTING_DOWN 5022L
+#define ERROR_INVALID_STATE 5023L
+#define ERROR_RESOURCE_PROPERTIES_STORED 5024L
+#define ERROR_NOT_QUORUM_CLASS 5025L
+#define ERROR_CORE_RESOURCE 5026L
+#define ERROR_QUORUM_RESOURCE_ONLINE_FAILED 5027L
+#define ERROR_QUORUMLOG_OPEN_FAILED 5028L
+#define ERROR_CLUSTERLOG_CORRUPT 5029L
+#define ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE 5030L
+#define ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE 5031L
+#define ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND 5032L
+#define ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE 5033L
+#define ERROR_QUORUM_OWNER_ALIVE 5034L
+#define ERROR_NETWORK_NOT_AVAILABLE 5035L
+#define ERROR_NODE_NOT_AVAILABLE 5036L
+#define ERROR_ALL_NODES_NOT_AVAILABLE 5037L
+#define ERROR_RESOURCE_FAILED 5038L
+#define ERROR_CLUSTER_INVALID_NODE 5039L
+#define ERROR_CLUSTER_NODE_EXISTS 5040L
+#define ERROR_CLUSTER_JOIN_IN_PROGRESS 5041L
+#define ERROR_CLUSTER_NODE_NOT_FOUND 5042L
+#define ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND 5043L
+#define ERROR_CLUSTER_NETWORK_EXISTS 5044L
+#define ERROR_CLUSTER_NETWORK_NOT_FOUND 5045L
+#define ERROR_CLUSTER_NETINTERFACE_EXISTS 5046L
+#define ERROR_CLUSTER_NETINTERFACE_NOT_FOUND 5047L
+#define ERROR_CLUSTER_INVALID_REQUEST 5048L
+#define ERROR_CLUSTER_INVALID_NETWORK_PROVIDER 5049L
+#define ERROR_CLUSTER_NODE_DOWN 5050L
+#define ERROR_CLUSTER_NODE_UNREACHABLE 5051L
+#define ERROR_CLUSTER_NODE_NOT_MEMBER 5052L
+#define ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS 5053L
+#define ERROR_CLUSTER_INVALID_NETWORK 5054L
+#define ERROR_CLUSTER_NODE_UP 5056L
+#define ERROR_CLUSTER_IPADDR_IN_USE 5057L
+#define ERROR_CLUSTER_NODE_NOT_PAUSED 5058L
+#define ERROR_CLUSTER_NO_SECURITY_CONTEXT 5059L
+#define ERROR_CLUSTER_NETWORK_NOT_INTERNAL 5060L
+#define ERROR_CLUSTER_NODE_ALREADY_UP 5061L
+#define ERROR_CLUSTER_NODE_ALREADY_DOWN 5062L
+#define ERROR_CLUSTER_NETWORK_ALREADY_ONLINE 5063L
+#define ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE 5064L
+#define ERROR_CLUSTER_NODE_ALREADY_MEMBER 5065L
+#define ERROR_CLUSTER_LAST_INTERNAL_NETWORK 5066L
+#define ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS 5067L
+#define ERROR_INVALID_OPERATION_ON_QUORUM 5068L
+#define ERROR_DEPENDENCY_NOT_ALLOWED 5069L
+#define ERROR_CLUSTER_NODE_PAUSED 5070L
+#define ERROR_NODE_CANT_HOST_RESOURCE 5071L
+#define ERROR_CLUSTER_NODE_NOT_READY 5072L
+#define ERROR_CLUSTER_NODE_SHUTTING_DOWN 5073L
+#define ERROR_CLUSTER_JOIN_ABORTED 5074L
+#define ERROR_CLUSTER_INCOMPATIBLE_VERSIONS 5075L
+#define ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED 5076L
+#define ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED 5077L
+#define ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND 5078L
+#define ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED 5079L
+#define ERROR_CLUSTER_RESNAME_NOT_FOUND 5080L
+#define ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED 5081L
+#define ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST 5082L
+#define ERROR_CLUSTER_DATABASE_SEQMISMATCH 5083L
+#define ERROR_RESMON_INVALID_STATE 5084L
+#define ERROR_CLUSTER_GUM_NOT_LOCKER 5085L
+#define ERROR_QUORUM_DISK_NOT_FOUND 5086L
+#define ERROR_DATABASE_BACKUP_CORRUPT 5087L
+#define ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT 5088L
+#define ERROR_RESOURCE_PROPERTY_UNCHANGEABLE 5089L
+#define ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE 5890L
+#define ERROR_CLUSTER_QUORUMLOG_NOT_FOUND 5891L
+#define ERROR_CLUSTER_MEMBERSHIP_HALT 5892L
+#define ERROR_CLUSTER_INSTANCE_ID_MISMATCH 5893L
+#define ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP 5894L
+#define ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH 5895L
+#define ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP 5896L
+#define ERROR_CLUSTER_PARAMETER_MISMATCH 5897L
+#define ERROR_NODE_CANNOT_BE_CLUSTERED 5898L
+#define ERROR_CLUSTER_WRONG_OS_VERSION 5899L
+#define ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME 5900L
+#define ERROR_CLUSCFG_ALREADY_COMMITTED 5901L
+#define ERROR_CLUSCFG_ROLLBACK_FAILED 5902L
+#define ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT 5903L
+#define ERROR_CLUSTER_OLD_VERSION 5904L
+#define ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME 5905L
+#define ERROR_ENCRYPTION_FAILED 6000L
+#define ERROR_DECRYPTION_FAILED 6001L
+#define ERROR_FILE_ENCRYPTED 6002L
+#define ERROR_NO_RECOVERY_POLICY 6003L
+#define ERROR_NO_EFS 6004L
+#define ERROR_WRONG_EFS 6005L
+#define ERROR_NO_USER_KEYS 6006L
+#define ERROR_FILE_NOT_ENCRYPTED 6007L
+#define ERROR_NOT_EXPORT_FORMAT 6008L
+#define ERROR_FILE_READ_ONLY 6009L
+#define ERROR_DIR_EFS_DISALLOWED 6010L
+#define ERROR_EFS_SERVER_NOT_TRUSTED 6011L
+#define ERROR_BAD_RECOVERY_POLICY 6012L
+#define ERROR_EFS_ALG_BLOB_TOO_BIG 6013L
+#define ERROR_VOLUME_NOT_SUPPORT_EFS 6014L
+#define ERROR_EFS_DISABLED 6015L
+#define ERROR_EFS_VERSION_NOT_SUPPORT 6016L
+#define ERROR_NO_BROWSER_SERVERS_FOUND 6118L
+#define SCHED_E_SERVICE_NOT_LOCALSYSTEM 6200L
+#define ERROR_CTX_WINSTATION_NAME_INVALID 7001L
+#define ERROR_CTX_INVALID_PD 7002L
+#define ERROR_CTX_PD_NOT_FOUND 7003L
+#define ERROR_CTX_WD_NOT_FOUND 7004L
+#define ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY 7005L
+#define ERROR_CTX_SERVICE_NAME_COLLISION 7006L
+#define ERROR_CTX_CLOSE_PENDING 7007L
+#define ERROR_CTX_NO_OUTBUF 7008L
+#define ERROR_CTX_MODEM_INF_NOT_FOUND 7009L
+#define ERROR_CTX_INVALID_MODEMNAME 7010L
+#define ERROR_CTX_MODEM_RESPONSE_ERROR 7011L
+#define ERROR_CTX_MODEM_RESPONSE_TIMEOUT 7012L
+#define ERROR_CTX_MODEM_RESPONSE_NO_CARRIER 7013L
+#define ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE 7014L
+#define ERROR_CTX_MODEM_RESPONSE_BUSY 7015L
+#define ERROR_CTX_MODEM_RESPONSE_VOICE 7016L
+#define ERROR_CTX_TD_ERROR 7017L
+#define ERROR_CTX_WINSTATION_NOT_FOUND 7022L
+#define ERROR_CTX_WINSTATION_ALREADY_EXISTS 7023L
+#define ERROR_CTX_WINSTATION_BUSY 7024L
+#define ERROR_CTX_BAD_VIDEO_MODE 7025L
+#define ERROR_CTX_GRAPHICS_INVALID 7035L
+#define ERROR_CTX_LOGON_DISABLED 7037L
+#define ERROR_CTX_NOT_CONSOLE 7038L
+#define ERROR_CTX_CLIENT_QUERY_TIMEOUT 7040L
+#define ERROR_CTX_CONSOLE_DISCONNECT 7041L
+#define ERROR_CTX_CONSOLE_CONNECT 7042L
+#define ERROR_CTX_SHADOW_DENIED 7044L
+#define ERROR_CTX_WINSTATION_ACCESS_DENIED 7045L
+#define ERROR_CTX_INVALID_WD 7049L
+#define ERROR_CTX_SHADOW_INVALID 7050L
+#define ERROR_CTX_SHADOW_DISABLED 7051L
+#define ERROR_CTX_CLIENT_LICENSE_IN_USE 7052L
+#define ERROR_CTX_CLIENT_LICENSE_NOT_SET 7053L
+#define ERROR_CTX_LICENSE_NOT_AVAILABLE 7054L
+#define ERROR_CTX_LICENSE_CLIENT_INVALID 7055L
+#define ERROR_CTX_LICENSE_EXPIRED 7056L
+#define ERROR_CTX_SHADOW_NOT_RUNNING 7057L
+#define ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE 7058L
+#define ERROR_ACTIVATION_COUNT_EXCEEDED 7059L
+#define FRS_ERR_INVALID_API_SEQUENCE 8001L
+#define FRS_ERR_STARTING_SERVICE 8002L
+#define FRS_ERR_STOPPING_SERVICE 8003L
+#define FRS_ERR_INTERNAL_API 8004L
+#define FRS_ERR_INTERNAL 8005L
+#define FRS_ERR_SERVICE_COMM 8006L
+#define FRS_ERR_INSUFFICIENT_PRIV 8007L
+#define FRS_ERR_AUTHENTICATION 8008L
+#define FRS_ERR_PARENT_INSUFFICIENT_PRIV 8009L
+#define FRS_ERR_PARENT_AUTHENTICATION 8010L
+#define FRS_ERR_CHILD_TO_PARENT_COMM 8011L
+#define FRS_ERR_PARENT_TO_CHILD_COMM 8012L
+#define FRS_ERR_SYSVOL_POPULATE 8013L
+#define FRS_ERR_SYSVOL_POPULATE_TIMEOUT 8014L
+#define FRS_ERR_SYSVOL_IS_BUSY 8015L
+#define FRS_ERR_SYSVOL_DEMOTE 8016L
+#define FRS_ERR_INVALID_SERVICE_PARAMETER 8017L
+#define DS_S_SUCCESS NO_ERROR
+#define ERROR_DS_NOT_INSTALLED 8200L
+#define ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY 8201L
+#define ERROR_DS_NO_ATTRIBUTE_OR_VALUE 8202L
+#define ERROR_DS_INVALID_ATTRIBUTE_SYNTAX 8203L
+#define ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED 8204L
+#define ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS 8205L
+#define ERROR_DS_BUSY 8206L
+#define ERROR_DS_UNAVAILABLE 8207L
+#define ERROR_DS_NO_RIDS_ALLOCATED 8208L
+#define ERROR_DS_NO_MORE_RIDS 8209L
+#define ERROR_DS_INCORRECT_ROLE_OWNER 8210L
+#define ERROR_DS_RIDMGR_INIT_ERROR 8211L
+#define ERROR_DS_OBJ_CLASS_VIOLATION 8212L
+#define ERROR_DS_CANT_ON_NON_LEAF 8213L
+#define ERROR_DS_CANT_ON_RDN 8214L
+#define ERROR_DS_CANT_MOD_OBJ_CLASS 8215L
+#define ERROR_DS_CROSS_DOM_MOVE_ERROR 8216L
+#define ERROR_DS_GC_NOT_AVAILABLE 8217L
+#define ERROR_SHARED_POLICY 8218L
+#define ERROR_POLICY_OBJECT_NOT_FOUND 8219L
+#define ERROR_POLICY_ONLY_IN_DS 8220L
+#define ERROR_PROMOTION_ACTIVE 8221L
+#define ERROR_NO_PROMOTION_ACTIVE 8222L
+#define ERROR_DS_OPERATIONS_ERROR 8224L
+#define ERROR_DS_PROTOCOL_ERROR 8225L
+#define ERROR_DS_TIMELIMIT_EXCEEDED 8226L
+#define ERROR_DS_SIZELIMIT_EXCEEDED 8227L
+#define ERROR_DS_ADMIN_LIMIT_EXCEEDED 8228L
+#define ERROR_DS_COMPARE_FALSE 8229L
+#define ERROR_DS_COMPARE_TRUE 8230L
+#define ERROR_DS_AUTH_METHOD_NOT_SUPPORTED 8231L
+#define ERROR_DS_STRONG_AUTH_REQUIRED 8232L
+#define ERROR_DS_INAPPROPRIATE_AUTH 8233L
+#define ERROR_DS_AUTH_UNKNOWN 8234L
+#define ERROR_DS_REFERRAL 8235L
+#define ERROR_DS_UNAVAILABLE_CRIT_EXTENSION 8236L
+#define ERROR_DS_CONFIDENTIALITY_REQUIRED 8237L
+#define ERROR_DS_INAPPROPRIATE_MATCHING 8238L
+#define ERROR_DS_CONSTRAINT_VIOLATION 8239L
+#define ERROR_DS_NO_SUCH_OBJECT 8240L
+#define ERROR_DS_ALIAS_PROBLEM 8241L
+#define ERROR_DS_INVALID_DN_SYNTAX 8242L
+#define ERROR_DS_IS_LEAF 8243L
+#define ERROR_DS_ALIAS_DEREF_PROBLEM 8244L
+#define ERROR_DS_UNWILLING_TO_PERFORM 8245L
+#define ERROR_DS_LOOP_DETECT 8246L
+#define ERROR_DS_NAMING_VIOLATION 8247L
+#define ERROR_DS_OBJECT_RESULTS_TOO_LARGE 8248L
+#define ERROR_DS_AFFECTS_MULTIPLE_DSAS 8249L
+#define ERROR_DS_SERVER_DOWN 8250L
+#define ERROR_DS_LOCAL_ERROR 8251L
+#define ERROR_DS_ENCODING_ERROR 8252L
+#define ERROR_DS_DECODING_ERROR 8253L
+#define ERROR_DS_FILTER_UNKNOWN 8254L
+#define ERROR_DS_PARAM_ERROR 8255L
+#define ERROR_DS_NOT_SUPPORTED 8256L
+#define ERROR_DS_NO_RESULTS_RETURNED 8257L
+#define ERROR_DS_CONTROL_NOT_FOUND 8258L
+#define ERROR_DS_CLIENT_LOOP 8259L
+#define ERROR_DS_REFERRAL_LIMIT_EXCEEDED 8260L
+#define ERROR_DS_SORT_CONTROL_MISSING 8261L
+#define ERROR_DS_OFFSET_RANGE_ERROR 8262L
+#define ERROR_DS_ROOT_MUST_BE_NC 8301L
+#define ERROR_DS_ADD_REPLICA_INHIBITED 8302L
+#define ERROR_DS_ATT_NOT_DEF_IN_SCHEMA 8303L
+#define ERROR_DS_MAX_OBJ_SIZE_EXCEEDED 8304L
+#define ERROR_DS_OBJ_STRING_NAME_EXISTS 8305L
+#define ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA 8306L
+#define ERROR_DS_RDN_DOESNT_MATCH_SCHEMA 8307L
+#define ERROR_DS_NO_REQUESTED_ATTS_FOUND 8308L
+#define ERROR_DS_USER_BUFFER_TO_SMALL 8309L
+#define ERROR_DS_ATT_IS_NOT_ON_OBJ 8310L
+#define ERROR_DS_ILLEGAL_MOD_OPERATION 8311L
+#define ERROR_DS_OBJ_TOO_LARGE 8312L
+#define ERROR_DS_BAD_INSTANCE_TYPE 8313L
+#define ERROR_DS_MASTERDSA_REQUIRED 8314L
+#define ERROR_DS_OBJECT_CLASS_REQUIRED 8315L
+#define ERROR_DS_MISSING_REQUIRED_ATT 8316L
+#define ERROR_DS_ATT_NOT_DEF_FOR_CLASS 8317L
+#define ERROR_DS_ATT_ALREADY_EXISTS 8318L
+#define ERROR_DS_CANT_ADD_ATT_VALUES 8320L
+#define ERROR_DS_SINGLE_VALUE_CONSTRAINT 8321L
+#define ERROR_DS_RANGE_CONSTRAINT 8322L
+#define ERROR_DS_ATT_VAL_ALREADY_EXISTS 8323L
+#define ERROR_DS_CANT_REM_MISSING_ATT 8324L
+#define ERROR_DS_CANT_REM_MISSING_ATT_VAL 8325L
+#define ERROR_DS_ROOT_CANT_BE_SUBREF 8326L
+#define ERROR_DS_NO_CHAINING 8327L
+#define ERROR_DS_NO_CHAINED_EVAL 8328L
+#define ERROR_DS_NO_PARENT_OBJECT 8329L
+#define ERROR_DS_PARENT_IS_AN_ALIAS 8330L
+#define ERROR_DS_CANT_MIX_MASTER_AND_REPS 8331L
+#define ERROR_DS_CHILDREN_EXIST 8332L
+#define ERROR_DS_OBJ_NOT_FOUND 8333L
+#define ERROR_DS_ALIASED_OBJ_MISSING 8334L
+#define ERROR_DS_BAD_NAME_SYNTAX 8335L
+#define ERROR_DS_ALIAS_POINTS_TO_ALIAS 8336L
+#define ERROR_DS_CANT_DEREF_ALIAS 8337L
+#define ERROR_DS_OUT_OF_SCOPE 8338L
+#define ERROR_DS_OBJECT_BEING_REMOVED 8339L
+#define ERROR_DS_CANT_DELETE_DSA_OBJ 8340L
+#define ERROR_DS_GENERIC_ERROR 8341L
+#define ERROR_DS_DSA_MUST_BE_INT_MASTER 8342L
+#define ERROR_DS_CLASS_NOT_DSA 8343L
+#define ERROR_DS_INSUFF_ACCESS_RIGHTS 8344L
+#define ERROR_DS_ILLEGAL_SUPERIOR 8345L
+#define ERROR_DS_ATTRIBUTE_OWNED_BY_SAM 8346L
+#define ERROR_DS_NAME_TOO_MANY_PARTS 8347L
+#define ERROR_DS_NAME_TOO_LONG 8348L
+#define ERROR_DS_NAME_VALUE_TOO_LONG 8349L
+#define ERROR_DS_NAME_UNPARSEABLE 8350L
+#define ERROR_DS_NAME_TYPE_UNKNOWN 8351L
+#define ERROR_DS_NOT_AN_OBJECT 8352L
+#define ERROR_DS_SEC_DESC_TOO_SHORT 8353L
+#define ERROR_DS_SEC_DESC_INVALID 8354L
+#define ERROR_DS_NO_DELETED_NAME 8355L
+#define ERROR_DS_SUBREF_MUST_HAVE_PARENT 8356L
+#define ERROR_DS_NCNAME_MUST_BE_NC 8357L
+#define ERROR_DS_CANT_ADD_SYSTEM_ONLY 8358L
+#define ERROR_DS_CLASS_MUST_BE_CONCRETE 8359L
+#define ERROR_DS_INVALID_DMD 8360L
+#define ERROR_DS_OBJ_GUID_EXISTS 8361L
+#define ERROR_DS_NOT_ON_BACKLINK 8362L
+#define ERROR_DS_NO_CROSSREF_FOR_NC 8363L
+#define ERROR_DS_SHUTTING_DOWN 8364L
+#define ERROR_DS_UNKNOWN_OPERATION 8365L
+#define ERROR_DS_INVALID_ROLE_OWNER 8366L
+#define ERROR_DS_COULDNT_CONTACT_FSMO 8367L
+#define ERROR_DS_CROSS_NC_DN_RENAME 8368L
+#define ERROR_DS_CANT_MOD_SYSTEM_ONLY 8369L
+#define ERROR_DS_REPLICATOR_ONLY 8370L
+#define ERROR_DS_OBJ_CLASS_NOT_DEFINED 8371L
+#define ERROR_DS_OBJ_CLASS_NOT_SUBCLASS 8372L
+#define ERROR_DS_NAME_REFERENCE_INVALID 8373L
+#define ERROR_DS_CROSS_REF_EXISTS 8374L
+#define ERROR_DS_CANT_DEL_MASTER_CROSSREF 8375L
+#define ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD 8376L
+#define ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX 8377L
+#define ERROR_DS_DUP_RDN 8378L
+#define ERROR_DS_DUP_OID 8379L
+#define ERROR_DS_DUP_MAPI_ID 8380L
+#define ERROR_DS_DUP_SCHEMA_ID_GUID 8381L
+#define ERROR_DS_DUP_LDAP_DISPLAY_NAME 8382L
+#define ERROR_DS_SEMANTIC_ATT_TEST 8383L
+#define ERROR_DS_SYNTAX_MISMATCH 8384L
+#define ERROR_DS_EXISTS_IN_MUST_HAVE 8385L
+#define ERROR_DS_EXISTS_IN_MAY_HAVE 8386L
+#define ERROR_DS_NONEXISTENT_MAY_HAVE 8387L
+#define ERROR_DS_NONEXISTENT_MUST_HAVE 8388L
+#define ERROR_DS_AUX_CLS_TEST_FAIL 8389L
+#define ERROR_DS_NONEXISTENT_POSS_SUP 8390L
+#define ERROR_DS_SUB_CLS_TEST_FAIL 8391L
+#define ERROR_DS_BAD_RDN_ATT_ID_SYNTAX 8392L
+#define ERROR_DS_EXISTS_IN_AUX_CLS 8393L
+#define ERROR_DS_EXISTS_IN_SUB_CLS 8394L
+#define ERROR_DS_EXISTS_IN_POSS_SUP 8395L
+#define ERROR_DS_RECALCSCHEMA_FAILED 8396L
+#define ERROR_DS_TREE_DELETE_NOT_FINISHED 8397L
+#define ERROR_DS_CANT_DELETE 8398L
+#define ERROR_DS_ATT_SCHEMA_REQ_ID 8399L
+#define ERROR_DS_BAD_ATT_SCHEMA_SYNTAX 8400L
+#define ERROR_DS_CANT_CACHE_ATT 8401L
+#define ERROR_DS_CANT_CACHE_CLASS 8402L
+#define ERROR_DS_CANT_REMOVE_ATT_CACHE 8403L
+#define ERROR_DS_CANT_REMOVE_CLASS_CACHE 8404L
+#define ERROR_DS_CANT_RETRIEVE_DN 8405L
+#define ERROR_DS_MISSING_SUPREF 8406L
+#define ERROR_DS_CANT_RETRIEVE_INSTANCE 8407L
+#define ERROR_DS_CODE_INCONSISTENCY 8408L
+#define ERROR_DS_DATABASE_ERROR 8409L
+#define ERROR_DS_GOVERNSID_MISSING 8410L
+#define ERROR_DS_MISSING_EXPECTED_ATT 8411L
+#define ERROR_DS_NCNAME_MISSING_CR_REF 8412L
+#define ERROR_DS_SECURITY_CHECKING_ERROR 8413L
+#define ERROR_DS_SCHEMA_NOT_LOADED 8414L
+#define ERROR_DS_SCHEMA_ALLOC_FAILED 8415L
+#define ERROR_DS_ATT_SCHEMA_REQ_SYNTAX 8416L
+#define ERROR_DS_GCVERIFY_ERROR 8417L
+#define ERROR_DS_DRA_SCHEMA_MISMATCH 8418L
+#define ERROR_DS_CANT_FIND_DSA_OBJ 8419L
+#define ERROR_DS_CANT_FIND_EXPECTED_NC 8420L
+#define ERROR_DS_CANT_FIND_NC_IN_CACHE 8421L
+#define ERROR_DS_CANT_RETRIEVE_CHILD 8422L
+#define ERROR_DS_SECURITY_ILLEGAL_MODIFY 8423L
+#define ERROR_DS_CANT_REPLACE_HIDDEN_REC 8424L
+#define ERROR_DS_BAD_HIERARCHY_FILE 8425L
+#define ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED 8426L
+#define ERROR_DS_CONFIG_PARAM_MISSING 8427L
+#define ERROR_DS_COUNTING_AB_INDICES_FAILED 8428L
+#define ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED 8429L
+#define ERROR_DS_INTERNAL_FAILURE 8430L
+#define ERROR_DS_UNKNOWN_ERROR 8431L
+#define ERROR_DS_ROOT_REQUIRES_CLASS_TOP 8432L
+#define ERROR_DS_REFUSING_FSMO_ROLES 8433L
+#define ERROR_DS_MISSING_FSMO_SETTINGS 8434L
+#define ERROR_DS_UNABLE_TO_SURRENDER_ROLES 8435L
+#define ERROR_DS_DRA_GENERIC 8436L
+#define ERROR_DS_DRA_INVALID_PARAMETER 8437L
+#define ERROR_DS_DRA_BUSY 8438L
+#define ERROR_DS_DRA_BAD_DN 8439L
+#define ERROR_DS_DRA_BAD_NC 8440L
+#define ERROR_DS_DRA_DN_EXISTS 8441L
+#define ERROR_DS_DRA_INTERNAL_ERROR 8442L
+#define ERROR_DS_DRA_INCONSISTENT_DIT 8443L
+#define ERROR_DS_DRA_CONNECTION_FAILED 8444L
+#define ERROR_DS_DRA_BAD_INSTANCE_TYPE 8445L
+#define ERROR_DS_DRA_OUT_OF_MEM 8446L
+#define ERROR_DS_DRA_MAIL_PROBLEM 8447L
+#define ERROR_DS_DRA_REF_ALREADY_EXISTS 8448L
+#define ERROR_DS_DRA_REF_NOT_FOUND 8449L
+#define ERROR_DS_DRA_OBJ_IS_REP_SOURCE 8450L
+#define ERROR_DS_DRA_DB_ERROR 8451L
+#define ERROR_DS_DRA_NO_REPLICA 8452L
+#define ERROR_DS_DRA_ACCESS_DENIED 8453L
+#define ERROR_DS_DRA_NOT_SUPPORTED 8454L
+#define ERROR_DS_DRA_RPC_CANCELLED 8455L
+#define ERROR_DS_DRA_SOURCE_DISABLED 8456L
+#define ERROR_DS_DRA_SINK_DISABLED 8457L
+#define ERROR_DS_DRA_NAME_COLLISION 8458L
+#define ERROR_DS_DRA_SOURCE_REINSTALLED 8459L
+#define ERROR_DS_DRA_MISSING_PARENT 8460L
+#define ERROR_DS_DRA_PREEMPTED 8461L
+#define ERROR_DS_DRA_ABANDON_SYNC 8462L
+#define ERROR_DS_DRA_SHUTDOWN 8463L
+#define ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET 8464L
+#define ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA 8465L
+#define ERROR_DS_DRA_EXTN_CONNECTION_FAILED 8466L
+#define ERROR_DS_INSTALL_SCHEMA_MISMATCH 8467L
+#define ERROR_DS_DUP_LINK_ID 8468L
+#define ERROR_DS_NAME_ERROR_RESOLVING 8469L
+#define ERROR_DS_NAME_ERROR_NOT_FOUND 8470L
+#define ERROR_DS_NAME_ERROR_NOT_UNIQUE 8471L
+#define ERROR_DS_NAME_ERROR_NO_MAPPING 8472L
+#define ERROR_DS_NAME_ERROR_DOMAIN_ONLY 8473L
+#define ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING 8474L
+#define ERROR_DS_CONSTRUCTED_ATT_MOD 8475L
+#define ERROR_DS_WRONG_OM_OBJ_CLASS 8476L
+#define ERROR_DS_DRA_REPL_PENDING 8477L
+#define ERROR_DS_DS_REQUIRED 8478L
+#define ERROR_DS_INVALID_LDAP_DISPLAY_NAME 8479L
+#define ERROR_DS_NON_BASE_SEARCH 8480L
+#define ERROR_DS_CANT_RETRIEVE_ATTS 8481L
+#define ERROR_DS_BACKLINK_WITHOUT_LINK 8482L
+#define ERROR_DS_EPOCH_MISMATCH 8483L
+#define ERROR_DS_SRC_NAME_MISMATCH 8484L
+#define ERROR_DS_SRC_AND_DST_NC_IDENTICAL 8485L
+#define ERROR_DS_DST_NC_MISMATCH 8486L
+#define ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC 8487L
+#define ERROR_DS_SRC_GUID_MISMATCH 8488L
+#define ERROR_DS_CANT_MOVE_DELETED_OBJECT 8489L
+#define ERROR_DS_PDC_OPERATION_IN_PROGRESS 8490L
+#define ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD 8491L
+#define ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION 8492L
+#define ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS 8493L
+#define ERROR_DS_NC_MUST_HAVE_NC_PARENT 8494L
+#define ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE 8495L
+#define ERROR_DS_DST_DOMAIN_NOT_NATIVE 8496L
+#define ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER 8497L
+#define ERROR_DS_CANT_MOVE_ACCOUNT_GROUP 8498L
+#define ERROR_DS_CANT_MOVE_RESOURCE_GROUP 8499L
+#define ERROR_DS_INVALID_SEARCH_FLAG 8500L
+#define ERROR_DS_NO_TREE_DELETE_ABOVE_NC 8501L
+#define ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE 8502L
+#define ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE 8503L
+#define ERROR_DS_SAM_INIT_FAILURE 8504L
+#define ERROR_DS_SENSITIVE_GROUP_VIOLATION 8505L
+#define ERROR_DS_CANT_MOD_PRIMARYGROUPID 8506L
+#define ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD 8507L
+#define ERROR_DS_NONSAFE_SCHEMA_CHANGE 8508L
+#define ERROR_DS_SCHEMA_UPDATE_DISALLOWED 8509L
+#define ERROR_DS_CANT_CREATE_UNDER_SCHEMA 8510L
+#define ERROR_DS_INSTALL_NO_SRC_SCH_VERSION 8511L
+#define ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE 8512L
+#define ERROR_DS_INVALID_GROUP_TYPE 8513L
+#define ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN 8514L
+#define ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN 8515L
+#define ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER 8516L
+#define ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER 8517L
+#define ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER 8518L
+#define ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER 8519L
+#define ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER 8520L
+#define ERROR_DS_HAVE_PRIMARY_MEMBERS 8521L
+#define ERROR_DS_STRING_SD_CONVERSION_FAILED 8522L
+#define ERROR_DS_NAMING_MASTER_GC 8523L
+#define ERROR_DS_DNS_LOOKUP_FAILURE 8524L
+#define ERROR_DS_COULDNT_UPDATE_SPNS 8525L
+#define ERROR_DS_CANT_RETRIEVE_SD 8526L
+#define ERROR_DS_KEY_NOT_UNIQUE 8527L
+#define ERROR_DS_WRONG_LINKED_ATT_SYNTAX 8528L
+#define ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD 8529L
+#define ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY 8530L
+#define ERROR_DS_CANT_START 8531L
+#define ERROR_DS_INIT_FAILURE 8532L
+#define ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION 8533L
+#define ERROR_DS_SOURCE_DOMAIN_IN_FOREST 8534L
+#define ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST 8535L
+#define ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED 8536L
+#define ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN 8537L
+#define ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER 8538L
+#define ERROR_DS_SRC_SID_EXISTS_IN_FOREST 8539L
+#define ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH 8540L
+#define ERROR_SAM_INIT_FAILURE 8541L
+#define ERROR_DS_DRA_SCHEMA_INFO_SHIP 8542L
+#define ERROR_DS_DRA_SCHEMA_CONFLICT 8543L
+#define ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT 8544L
+#define ERROR_DS_DRA_OBJ_NC_MISMATCH 8545L
+#define ERROR_DS_NC_STILL_HAS_DSAS 8546L
+#define ERROR_DS_GC_REQUIRED 8547L
+#define ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY 8548L
+#define ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS 8549L
+#define ERROR_DS_CANT_ADD_TO_GC 8550L
+#define ERROR_DS_NO_CHECKPOINT_WITH_PDC 8551L
+#define ERROR_DS_SOURCE_AUDITING_NOT_ENABLED 8552L
+#define ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC 8553L
+#define ERROR_DS_INVALID_NAME_FOR_SPN 8554L
+#define ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS 8555L
+#define ERROR_DS_UNICODEPWD_NOT_IN_QUOTES 8556L
+#define ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED 8557L
+#define ERROR_DS_MUST_BE_RUN_ON_DST_DC 8558L
+#define ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER 8559L
+#define ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ 8560L
+#define ERROR_DS_INIT_FAILURE_CONSOLE 8561L
+#define ERROR_DS_SAM_INIT_FAILURE_CONSOLE 8562L
+#define ERROR_DS_FOREST_VERSION_TOO_HIGH 8563L
+#define ERROR_DS_DOMAIN_VERSION_TOO_HIGH 8564L
+#define ERROR_DS_FOREST_VERSION_TOO_LOW 8565L
+#define ERROR_DS_DOMAIN_VERSION_TOO_LOW 8566L
+#define ERROR_DS_INCOMPATIBLE_VERSION 8567L
+#define ERROR_DS_LOW_DSA_VERSION 8568L
+#define ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN 8569L
+#define ERROR_DS_NOT_SUPPORTED_SORT_ORDER 8570L
+#define ERROR_DS_NAME_NOT_UNIQUE 8571L
+#define ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 8572L
+#define ERROR_DS_OUT_OF_VERSION_STORE 8573L
+#define ERROR_DS_INCOMPATIBLE_CONTROLS_USED 8574L
+#define ERROR_DS_NO_REF_DOMAIN 8575L
+#define ERROR_DS_RESERVED_LINK_ID 8576L
+#define ERROR_DS_LINK_ID_NOT_AVAILABLE 8577L
+#define ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER 8578L
+#define ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE 8579L
+#define ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC 8580L
+#define ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG 8581L
+#define ERROR_DS_MODIFYDN_WRONG_GRANDPARENT 8582L
+#define ERROR_DS_NAME_ERROR_TRUST_REFERRAL 8583L
+#define ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER 8584L
+#define ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD 8585L
+#define ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 8586L
+#define ERROR_DS_THREAD_LIMIT_EXCEEDED 8587L
+#define ERROR_DS_NOT_CLOSEST 8588L
+#define ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF 8589L
+#define ERROR_DS_SINGLE_USER_MODE_FAILED 8590L
+#define ERROR_DS_NTDSCRIPT_SYNTAX_ERROR 8591L
+#define ERROR_DS_NTDSCRIPT_PROCESS_ERROR 8592L
+#define ERROR_DS_DIFFERENT_REPL_EPOCHS 8593L
+#define ERROR_DS_DRS_EXTENSIONS_CHANGED 8594L
+#define ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR 8595L
+#define ERROR_DS_NO_MSDS_INTID 8596L
+#define ERROR_DS_DUP_MSDS_INTID 8597L
+#define ERROR_DS_EXISTS_IN_RDNATTID 8598L
+#define ERROR_DS_AUTHORIZATION_FAILED 8599L
+#define ERROR_DS_INVALID_SCRIPT 8600L
+#define ERROR_DS_REMOTE_CROSSREF_OP_FAILED 8601L
+#define ERROR_DS_CROSS_REF_BUSY 8602L
+#define ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN 8603L
+#define ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC 8604L
+#define ERROR_DS_DUPLICATE_ID_FOUND 8605L
+#define ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT 8606L
+#define ERROR_DS_GROUP_CONVERSION_ERROR 8607L
+#define ERROR_DS_CANT_MOVE_APP_BASIC_GROUP 8608L
+#define ERROR_DS_CANT_MOVE_APP_QUERY_GROUP 8609L
+#define ERROR_DS_ROLE_NOT_VERIFIED 8610L
+#define ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL 8611L
+#define ERROR_DS_DOMAIN_RENAME_IN_PROGRESS 8612L
+#define ERROR_DS_EXISTING_AD_CHILD_NC 8613L
+#define ERROR_DS_REPL_LIFETIME_EXCEEDED 8614L
+#define ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER 8615L
+#define ERROR_DS_LDAP_SEND_QUEUE_FULL 8616L
+#define ERROR_DS_DRA_OUT_SCHEDULE_WINDOW 8617L
+#define DNS_ERROR_RESPONSE_CODES_BASE 9000
+#define DNS_ERROR_RCODE_NO_ERROR NO_ERROR
+#define DNS_ERROR_MASK 0x00002328
+#define DNS_ERROR_RCODE_FORMAT_ERROR 9001L
+#define DNS_ERROR_RCODE_SERVER_FAILURE 9002L
+#define DNS_ERROR_RCODE_NAME_ERROR 9003L
+#define DNS_ERROR_RCODE_NOT_IMPLEMENTED 9004L
+#define DNS_ERROR_RCODE_REFUSED 9005L
+#define DNS_ERROR_RCODE_YXDOMAIN 9006L
+#define DNS_ERROR_RCODE_YXRRSET 9007L
+#define DNS_ERROR_RCODE_NXRRSET 9008L
+#define DNS_ERROR_RCODE_NOTAUTH 9009L
+#define DNS_ERROR_RCODE_NOTZONE 9010L
+#define DNS_ERROR_RCODE_BADSIG 9016L
+#define DNS_ERROR_RCODE_BADKEY 9017L
+#define DNS_ERROR_RCODE_BADTIME 9018L
+#define DNS_ERROR_RCODE_LAST DNS_ERROR_RCODE_BADTIME
+#define DNS_ERROR_PACKET_FMT_BASE 9500
+#define DNS_INFO_NO_RECORDS 9501L
+#define DNS_ERROR_BAD_PACKET 9502L
+#define DNS_ERROR_NO_PACKET 9503L
+#define DNS_ERROR_RCODE 9504L
+#define DNS_ERROR_UNSECURE_PACKET 9505L
+#define DNS_STATUS_PACKET_UNSECURE DNS_ERROR_UNSECURE_PACKET
+#define DNS_ERROR_NO_MEMORY ERROR_OUTOFMEMORY
+#define DNS_ERROR_INVALID_NAME ERROR_INVALID_NAME
+#define DNS_ERROR_INVALID_DATA ERROR_INVALID_DATA
+#define DNS_ERROR_GENERAL_API_BASE 9550
+#define DNS_ERROR_INVALID_TYPE 9551L
+#define DNS_ERROR_INVALID_IP_ADDRESS 9552L
+#define DNS_ERROR_INVALID_PROPERTY 9553L
+#define DNS_ERROR_TRY_AGAIN_LATER 9554L
+#define DNS_ERROR_NOT_UNIQUE 9555L
+#define DNS_ERROR_NON_RFC_NAME 9556L
+#define DNS_STATUS_FQDN 9557L
+#define DNS_STATUS_DOTTED_NAME 9558L
+#define DNS_STATUS_SINGLE_PART_NAME 9559L
+#define DNS_ERROR_INVALID_NAME_CHAR 9560L
+#define DNS_ERROR_NUMERIC_NAME 9561L
+#define DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER 9562L
+#define DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION 9563L
+#define DNS_ERROR_CANNOT_FIND_ROOT_HINTS 9564L
+#define DNS_ERROR_INCONSISTENT_ROOT_HINTS 9565L
+#define DNS_ERROR_ZONE_BASE 9600
+#define DNS_ERROR_ZONE_DOES_NOT_EXIST 9601L
+#define DNS_ERROR_NO_ZONE_INFO 9602L
+#define DNS_ERROR_INVALID_ZONE_OPERATION 9603L
+#define DNS_ERROR_ZONE_CONFIGURATION_ERROR 9604L
+#define DNS_ERROR_ZONE_HAS_NO_SOA_RECORD 9605L
+#define DNS_ERROR_ZONE_HAS_NO_NS_RECORDS 9606L
+#define DNS_ERROR_ZONE_LOCKED 9607L
+#define DNS_ERROR_ZONE_CREATION_FAILED 9608L
+#define DNS_ERROR_ZONE_ALREADY_EXISTS 9609L
+#define DNS_ERROR_AUTOZONE_ALREADY_EXISTS 9610L
+#define DNS_ERROR_INVALID_ZONE_TYPE 9611L
+#define DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP 9612L
+#define DNS_ERROR_ZONE_NOT_SECONDARY 9613L
+#define DNS_ERROR_NEED_SECONDARY_ADDRESSES 9614L
+#define DNS_ERROR_WINS_INIT_FAILED 9615L
+#define DNS_ERROR_NEED_WINS_SERVERS 9616L
+#define DNS_ERROR_NBSTAT_INIT_FAILED 9617L
+#define DNS_ERROR_SOA_DELETE_INVALID 9618L
+#define DNS_ERROR_FORWARDER_ALREADY_EXISTS 9619L
+#define DNS_ERROR_ZONE_REQUIRES_MASTER_IP 9620L
+#define DNS_ERROR_ZONE_IS_SHUTDOWN 9621L
+#define DNS_ERROR_DATAFILE_BASE 9650
+#define DNS_ERROR_PRIMARY_REQUIRES_DATAFILE 9651L
+#define DNS_ERROR_INVALID_DATAFILE_NAME 9652L
+#define DNS_ERROR_DATAFILE_OPEN_FAILURE 9653L
+#define DNS_ERROR_FILE_WRITEBACK_FAILED 9654L
+#define DNS_ERROR_DATAFILE_PARSING 9655L
+#define DNS_ERROR_DATABASE_BASE 9700
+#define DNS_ERROR_RECORD_DOES_NOT_EXIST 9701L
+#define DNS_ERROR_RECORD_FORMAT 9702L
+#define DNS_ERROR_NODE_CREATION_FAILED 9703L
+#define DNS_ERROR_UNKNOWN_RECORD_TYPE 9704L
+#define DNS_ERROR_RECORD_TIMED_OUT 9705L
+#define DNS_ERROR_NAME_NOT_IN_ZONE 9706L
+#define DNS_ERROR_CNAME_LOOP 9707L
+#define DNS_ERROR_NODE_IS_CNAME 9708L
+#define DNS_ERROR_CNAME_COLLISION 9709L
+#define DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT 9710L
+#define DNS_ERROR_RECORD_ALREADY_EXISTS 9711L
+#define DNS_ERROR_SECONDARY_DATA 9712L
+#define DNS_ERROR_NO_CREATE_CACHE_DATA 9713L
+#define DNS_ERROR_NAME_DOES_NOT_EXIST 9714L
+#define DNS_WARNING_PTR_CREATE_FAILED 9715L
+#define DNS_WARNING_DOMAIN_UNDELETED 9716L
+#define DNS_ERROR_DS_UNAVAILABLE 9717L
+#define DNS_ERROR_DS_ZONE_ALREADY_EXISTS 9718L
+#define DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE 9719L
+#define DNS_ERROR_OPERATION_BASE 9750
+#define DNS_INFO_AXFR_COMPLETE 9751L
+#define DNS_ERROR_AXFR 9752L
+#define DNS_INFO_ADDED_LOCAL_WINS 9753L
+#define DNS_ERROR_SECURE_BASE 9800
+#define DNS_STATUS_CONTINUE_NEEDED 9801L
+#define DNS_ERROR_SETUP_BASE 9850
+#define DNS_ERROR_NO_TCPIP 9851L
+#define DNS_ERROR_NO_DNS_SERVERS 9852L
+#define DNS_ERROR_DP_BASE 9900
+#define DNS_ERROR_DP_DOES_NOT_EXIST 9901L
+#define DNS_ERROR_DP_ALREADY_EXISTS 9902L
+#define DNS_ERROR_DP_NOT_ENLISTED 9903L
+#define DNS_ERROR_DP_ALREADY_ENLISTED 9904L
+#define DNS_ERROR_DP_NOT_AVAILABLE 9905L
+#define DNS_ERROR_DP_FSMO_ERROR 9906L
+
+#ifndef WSABASEERR
+#define WSABASEERR 10000
+#define WSAEINTR 10004L
+#define WSAEBADF 10009L
+#define WSAEACCES 10013L
+#define WSAEFAULT 10014L
+#define WSAEINVAL 10022L
+#define WSAEMFILE 10024L
+#define WSAEWOULDBLOCK 10035L
+#define WSAEINPROGRESS 10036L
+#define WSAEALREADY 10037L
+#define WSAENOTSOCK 10038L
+#define WSAEDESTADDRREQ 10039L
+#define WSAEMSGSIZE 10040L
+#define WSAEPROTOTYPE 10041L
+#define WSAENOPROTOOPT 10042L
+#define WSAEPROTONOSUPPORT 10043L
+#define WSAESOCKTNOSUPPORT 10044L
+#define WSAEOPNOTSUPP 10045L
+#define WSAEPFNOSUPPORT 10046L
+#define WSAEAFNOSUPPORT 10047L
+#define WSAEADDRINUSE 10048L
+#define WSAEADDRNOTAVAIL 10049L
+#define WSAENETDOWN 10050L
+#define WSAENETUNREACH 10051L
+#define WSAENETRESET 10052L
+#define WSAECONNABORTED 10053L
+#define WSAECONNRESET 10054L
+#define WSAENOBUFS 10055L
+#define WSAEISCONN 10056L
+#define WSAENOTCONN 10057L
+#define WSAESHUTDOWN 10058L
+#define WSAETOOMANYREFS 10059L
+#define WSAETIMEDOUT 10060L
+#define WSAECONNREFUSED 10061L
+#define WSAELOOP 10062L
+#define WSAENAMETOOLONG 10063L
+#define WSAEHOSTDOWN 10064L
+#define WSAEHOSTUNREACH 10065L
+#define WSAENOTEMPTY 10066L
+#define WSAEPROCLIM 10067L
+#define WSAEUSERS 10068L
+#define WSAEDQUOT 10069L
+#define WSAESTALE 10070L
+#define WSAEREMOTE 10071L
+#define WSASYSNOTREADY 10091L
+#define WSAVERNOTSUPPORTED 10092L
+#define WSANOTINITIALISED 10093L
+#define WSAEDISCON 10101L
+#define WSAENOMORE 10102L
+#define WSAECANCELLED 10103L
+#define WSAEINVALIDPROCTABLE 10104L
+#define WSAEINVALIDPROVIDER 10105L
+#define WSAEPROVIDERFAILEDINIT 10106L
+#define WSASYSCALLFAILURE 10107L
+#define WSASERVICE_NOT_FOUND 10108L
+#define WSATYPE_NOT_FOUND 10109L
+#define WSA_E_NO_MORE 10110L
+#define WSA_E_CANCELLED 10111L
+#define WSAEREFUSED 10112L
+#ifndef WSAHOST_NOT_FOUND
+#define WSAHOST_NOT_FOUND 11001L
+#endif
+#ifndef WSATRY_AGAIN
+#define WSATRY_AGAIN 11002L
+#endif
+#ifndef WSANO_RECOVERY
+#define WSANO_RECOVERY 11003L
+#endif
+#ifndef WSANO_DATA
+#define WSANO_DATA 11004L
+#endif
+#ifndef WSA_QOS_RECEIVERS
+#define WSA_QOS_RECEIVERS 11005L
+#endif
+#ifndef WSA_QOS_SENDERS
+#define WSA_QOS_SENDERS 11006L
+#endif
+#ifndef WSA_QOS_NO_SENDERS
+#define WSA_QOS_NO_SENDERS 11007L
+#endif
+#ifndef WSA_QOS_NO_RECEIVERS
+#define WSA_QOS_NO_RECEIVERS 11008L
+#endif
+#ifndef WSA_QOS_REQUEST_CONFIRMED
+#define WSA_QOS_REQUEST_CONFIRMED 11009L
+#endif
+#ifndef WSA_QOS_ADMISSION_FAILURE
+#define WSA_QOS_ADMISSION_FAILURE 11010L
+#endif
+#ifndef WSA_QOS_POLICY_FAILURE
+#define WSA_QOS_POLICY_FAILURE 11011L
+#endif
+#ifndef WSA_QOS_BAD_STYLE
+#define WSA_QOS_BAD_STYLE 11012L
+#endif
+#ifndef WSA_QOS_BAD_OBJECT
+#define WSA_QOS_BAD_OBJECT 11013L
+#endif
+#ifndef WSA_QOS_TRAFFIC_CTRL_ERROR
+#define WSA_QOS_TRAFFIC_CTRL_ERROR 11014L
+#endif
+#ifndef WSA_QOS_GENERIC_ERROR
+#define WSA_QOS_GENERIC_ERROR 11015L
+#endif
+#ifndef WSA_QOS_ESERVICETYPE
+#define WSA_QOS_ESERVICETYPE 11016L
+#endif
+#ifndef WSA_QOS_EFLOWSPEC
+#define WSA_QOS_EFLOWSPEC 11017L
+#endif
+#ifndef WSA_QOS_EPROVSPECBUF
+#define WSA_QOS_EPROVSPECBUF 11018L
+#endif
+#ifndef WSA_QOS_EFILTERSTYLE
+#define WSA_QOS_EFILTERSTYLE 11019L
+#endif
+#ifndef WSA_QOS_EFILTERTYPE
+#define WSA_QOS_EFILTERTYPE 11020L
+#endif
+#ifndef WSA_QOS_EFILTERCOUNT
+#define WSA_QOS_EFILTERCOUNT 11021L
+#endif
+#ifndef WSA_QOS_EOBJLENGTH
+#define WSA_QOS_EOBJLENGTH 11022L
+#endif
+#ifndef WSA_QOS_EFLOWCOUNT
+#define WSA_QOS_EFLOWCOUNT 11023L
+#endif
+#ifndef WSA_QOS_EUNKNOWNPSOBJ
+#define WSA_QOS_EUNKNOWNPSOBJ 11024L
+#endif
+#ifndef WSA_QOS_EPOLICYOBJ
+#define WSA_QOS_EPOLICYOBJ 11025L
+#endif
+#ifndef WSA_QOS_EFLOWDESC
+#define WSA_QOS_EFLOWDESC 11026L
+#endif
+#ifndef WSA_QOS_EPSFLOWSPEC
+#define WSA_QOS_EPSFLOWSPEC 11027L
+#endif
+#ifndef WSA_QOS_EPSFILTERSPEC
+#define WSA_QOS_EPSFILTERSPEC 11028L
+#endif
+#ifndef WSA_QOS_ESDMODEOBJ
+#define WSA_QOS_ESDMODEOBJ 11029L
+#endif
+#ifndef WSA_QOS_ESHAPERATEOBJ
+#define WSA_QOS_ESHAPERATEOBJ 11030L
+#endif
+#ifndef WSA_QOS_RESERVED_PETYPE
+#define WSA_QOS_RESERVED_PETYPE 11031L
+#endif
+#endif /* WSABASEERR */
+
+#define ERROR_SXS_SECTION_NOT_FOUND 14000L
+#define ERROR_SXS_CANT_GEN_ACTCTX 14001L
+#define ERROR_SXS_INVALID_ACTCTXDATA_FORMAT 14002L
+#define ERROR_SXS_ASSEMBLY_NOT_FOUND 14003L
+#define ERROR_SXS_MANIFEST_FORMAT_ERROR 14004L
+#define ERROR_SXS_MANIFEST_PARSE_ERROR 14005L
+#define ERROR_SXS_ACTIVATION_CONTEXT_DISABLED 14006L
+#define ERROR_SXS_KEY_NOT_FOUND 14007L
+#define ERROR_SXS_VERSION_CONFLICT 14008L
+#define ERROR_SXS_WRONG_SECTION_TYPE 14009L
+#define ERROR_SXS_THREAD_QUERIES_DISABLED 14010L
+#define ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET 14011L
+#define ERROR_SXS_UNKNOWN_ENCODING_GROUP 14012L
+#define ERROR_SXS_UNKNOWN_ENCODING 14013L
+#define ERROR_SXS_INVALID_XML_NAMESPACE_URI 14014L
+#define ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED 14015L
+#define ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED 14016L
+#define ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE 14017L
+#define ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE 14018L
+#define ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE 14019L
+#define ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT 14020L
+#define ERROR_SXS_DUPLICATE_DLL_NAME 14021L
+#define ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME 14022L
+#define ERROR_SXS_DUPLICATE_CLSID 14023L
+#define ERROR_SXS_DUPLICATE_IID 14024L
+#define ERROR_SXS_DUPLICATE_TLBID 14025L
+#define ERROR_SXS_DUPLICATE_PROGID 14026L
+#define ERROR_SXS_DUPLICATE_ASSEMBLY_NAME 14027L
+#define ERROR_SXS_FILE_HASH_MISMATCH 14028L
+#define ERROR_SXS_POLICY_PARSE_ERROR 14029L
+#define ERROR_SXS_XML_E_MISSINGQUOTE 14030L
+#define ERROR_SXS_XML_E_COMMENTSYNTAX 14031L
+#define ERROR_SXS_XML_E_BADSTARTNAMECHAR 14032L
+#define ERROR_SXS_XML_E_BADNAMECHAR 14033L
+#define ERROR_SXS_XML_E_BADCHARINSTRING 14034L
+#define ERROR_SXS_XML_E_XMLDECLSYNTAX 14035L
+#define ERROR_SXS_XML_E_BADCHARDATA 14036L
+#define ERROR_SXS_XML_E_MISSINGWHITESPACE 14037L
+#define ERROR_SXS_XML_E_EXPECTINGTAGEND 14038L
+#define ERROR_SXS_XML_E_MISSINGSEMICOLON 14039L
+#define ERROR_SXS_XML_E_UNBALANCEDPAREN 14040L
+#define ERROR_SXS_XML_E_INTERNALERROR 14041L
+#define ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE 14042L
+#define ERROR_SXS_XML_E_INCOMPLETE_ENCODING 14043L
+#define ERROR_SXS_XML_E_MISSING_PAREN 14044L
+#define ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE 14045L
+#define ERROR_SXS_XML_E_MULTIPLE_COLONS 14046L
+#define ERROR_SXS_XML_E_INVALID_DECIMAL 14047L
+#define ERROR_SXS_XML_E_INVALID_HEXIDECIMAL 14048L
+#define ERROR_SXS_XML_E_INVALID_UNICODE 14049L
+#define ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK 14050L
+#define ERROR_SXS_XML_E_UNEXPECTEDENDTAG 14051L
+#define ERROR_SXS_XML_E_UNCLOSEDTAG 14052L
+#define ERROR_SXS_XML_E_DUPLICATEATTRIBUTE 14053L
+#define ERROR_SXS_XML_E_MULTIPLEROOTS 14054L
+#define ERROR_SXS_XML_E_INVALIDATROOTLEVEL 14055L
+#define ERROR_SXS_XML_E_BADXMLDECL 14056L
+#define ERROR_SXS_XML_E_MISSINGROOT 14057L
+#define ERROR_SXS_XML_E_UNEXPECTEDEOF 14058L
+#define ERROR_SXS_XML_E_BADPEREFINSUBSET 14059L
+#define ERROR_SXS_XML_E_UNCLOSEDSTARTTAG 14060L
+#define ERROR_SXS_XML_E_UNCLOSEDENDTAG 14061L
+#define ERROR_SXS_XML_E_UNCLOSEDSTRING 14062L
+#define ERROR_SXS_XML_E_UNCLOSEDCOMMENT 14063L
+#define ERROR_SXS_XML_E_UNCLOSEDDECL 14064L
+#define ERROR_SXS_XML_E_UNCLOSEDCDATA 14065L
+#define ERROR_SXS_XML_E_RESERVEDNAMESPACE 14066L
+#define ERROR_SXS_XML_E_INVALIDENCODING 14067L
+#define ERROR_SXS_XML_E_INVALIDSWITCH 14068L
+#define ERROR_SXS_XML_E_BADXMLCASE 14069L
+#define ERROR_SXS_XML_E_INVALID_STANDALONE 14070L
+#define ERROR_SXS_XML_E_UNEXPECTED_STANDALONE 14071L
+#define ERROR_SXS_XML_E_INVALID_VERSION 14072L
+#define ERROR_SXS_XML_E_MISSINGEQUALS 14073L
+#define ERROR_SXS_PROTECTION_RECOVERY_FAILED 14074L
+#define ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT 14075L
+#define ERROR_SXS_PROTECTION_CATALOG_NOT_VALID 14076L
+#define ERROR_SXS_UNTRANSLATABLE_HRESULT 14077L
+#define ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING 14078L
+#define ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE 14079L
+#define ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME 14080L
+#define ERROR_IPSEC_QM_POLICY_EXISTS 13000L
+#define ERROR_IPSEC_QM_POLICY_NOT_FOUND 13001L
+#define ERROR_IPSEC_QM_POLICY_IN_USE 13002L
+#define ERROR_IPSEC_MM_POLICY_EXISTS 13003L
+#define ERROR_IPSEC_MM_POLICY_NOT_FOUND 13004L
+#define ERROR_IPSEC_MM_POLICY_IN_USE 13005L
+#define ERROR_IPSEC_MM_FILTER_EXISTS 13006L
+#define ERROR_IPSEC_MM_FILTER_NOT_FOUND 13007L
+#define ERROR_IPSEC_TRANSPORT_FILTER_EXISTS 13008L
+#define ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND 13009L
+#define ERROR_IPSEC_MM_AUTH_EXISTS 13010L
+#define ERROR_IPSEC_MM_AUTH_NOT_FOUND 13011L
+#define ERROR_IPSEC_MM_AUTH_IN_USE 13012L
+#define ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND 13013L
+#define ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND 13014L
+#define ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND 13015L
+#define ERROR_IPSEC_TUNNEL_FILTER_EXISTS 13016L
+#define ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND 13017L
+#define ERROR_IPSEC_MM_FILTER_PENDING_DELETION 13018L
+#define ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION 13019L
+#define ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION 13020L
+#define ERROR_IPSEC_MM_POLICY_PENDING_DELETION 13021L
+#define ERROR_IPSEC_MM_AUTH_PENDING_DELETION 13022L
+#define ERROR_IPSEC_QM_POLICY_PENDING_DELETION 13023L
+#define WARNING_IPSEC_MM_POLICY_PRUNED 13024L
+#define WARNING_IPSEC_QM_POLICY_PRUNED 13025L
+#define ERROR_IPSEC_IKE_NEG_STATUS_BEGIN 13800L
+#define ERROR_IPSEC_IKE_AUTH_FAIL 13801L
+#define ERROR_IPSEC_IKE_ATTRIB_FAIL 13802L
+#define ERROR_IPSEC_IKE_NEGOTIATION_PENDING 13803L
+#define ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR 13804L
+#define ERROR_IPSEC_IKE_TIMED_OUT 13805L
+#define ERROR_IPSEC_IKE_NO_CERT 13806L
+#define ERROR_IPSEC_IKE_SA_DELETED 13807L
+#define ERROR_IPSEC_IKE_SA_REAPED 13808L
+#define ERROR_IPSEC_IKE_MM_ACQUIRE_DROP 13809L
+#define ERROR_IPSEC_IKE_QM_ACQUIRE_DROP 13810L
+#define ERROR_IPSEC_IKE_QUEUE_DROP_MM 13811L
+#define ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM 13812L
+#define ERROR_IPSEC_IKE_DROP_NO_RESPONSE 13813L
+#define ERROR_IPSEC_IKE_MM_DELAY_DROP 13814L
+#define ERROR_IPSEC_IKE_QM_DELAY_DROP 13815L
+#define ERROR_IPSEC_IKE_ERROR 13816L
+#define ERROR_IPSEC_IKE_CRL_FAILED 13817L
+#define ERROR_IPSEC_IKE_INVALID_KEY_USAGE 13818L
+#define ERROR_IPSEC_IKE_INVALID_CERT_TYPE 13819L
+#define ERROR_IPSEC_IKE_NO_PRIVATE_KEY 13820L
+#define ERROR_IPSEC_IKE_DH_FAIL 13822L
+#define ERROR_IPSEC_IKE_INVALID_HEADER 13824L
+#define ERROR_IPSEC_IKE_NO_POLICY 13825L
+#define ERROR_IPSEC_IKE_INVALID_SIGNATURE 13826L
+#define ERROR_IPSEC_IKE_KERBEROS_ERROR 13827L
+#define ERROR_IPSEC_IKE_NO_PUBLIC_KEY 13828L
+#define ERROR_IPSEC_IKE_PROCESS_ERR 13829L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_SA 13830L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_PROP 13831L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_TRANS 13832L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_KE 13833L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_ID 13834L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_CERT 13835L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ 13836L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_HASH 13837L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_SIG 13838L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_NONCE 13839L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY 13840L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_DELETE 13841L
+#define ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR 13842L
+#define ERROR_IPSEC_IKE_INVALID_PAYLOAD 13843L
+#define ERROR_IPSEC_IKE_LOAD_SOFT_SA 13844L
+#define ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN 13845L
+#define ERROR_IPSEC_IKE_INVALID_COOKIE 13846L
+#define ERROR_IPSEC_IKE_NO_PEER_CERT 13847L
+#define ERROR_IPSEC_IKE_PEER_CRL_FAILED 13848L
+#define ERROR_IPSEC_IKE_POLICY_CHANGE 13849L
+#define ERROR_IPSEC_IKE_NO_MM_POLICY 13850L
+#define ERROR_IPSEC_IKE_NOTCBPRIV 13851L
+#define ERROR_IPSEC_IKE_SECLOADFAIL 13852L
+#define ERROR_IPSEC_IKE_FAILSSPINIT 13853L
+#define ERROR_IPSEC_IKE_FAILQUERYSSP 13854L
+#define ERROR_IPSEC_IKE_SRVACQFAIL 13855L
+#define ERROR_IPSEC_IKE_SRVQUERYCRED 13856L
+#define ERROR_IPSEC_IKE_GETSPIFAIL 13857L
+#define ERROR_IPSEC_IKE_INVALID_FILTER 13858L
+#define ERROR_IPSEC_IKE_OUT_OF_MEMORY 13859L
+#define ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED 13860L
+#define ERROR_IPSEC_IKE_INVALID_POLICY 13861L
+#define ERROR_IPSEC_IKE_UNKNOWN_DOI 13862L
+#define ERROR_IPSEC_IKE_INVALID_SITUATION 13863L
+#define ERROR_IPSEC_IKE_DH_FAILURE 13864L
+#define ERROR_IPSEC_IKE_INVALID_GROUP 13865L
+#define ERROR_IPSEC_IKE_ENCRYPT 13866L
+#define ERROR_IPSEC_IKE_DECRYPT 13867L
+#define ERROR_IPSEC_IKE_POLICY_MATCH 13868L
+#define ERROR_IPSEC_IKE_UNSUPPORTED_ID 13869L
+#define ERROR_IPSEC_IKE_INVALID_HASH 13870L
+#define ERROR_IPSEC_IKE_INVALID_HASH_ALG 13871L
+#define ERROR_IPSEC_IKE_INVALID_HASH_SIZE 13872L
+#define ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG 13873L
+#define ERROR_IPSEC_IKE_INVALID_AUTH_ALG 13874L
+#define ERROR_IPSEC_IKE_INVALID_SIG 13875L
+#define ERROR_IPSEC_IKE_LOAD_FAILED 13876L
+#define ERROR_IPSEC_IKE_RPC_DELETE 13877L
+#define ERROR_IPSEC_IKE_BENIGN_REINIT 13878L
+#define ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY 13879L
+#define ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN 13881L
+#define ERROR_IPSEC_IKE_MM_LIMIT 13882L
+#define ERROR_IPSEC_IKE_NEGOTIATION_DISABLED 13883L
+#define ERROR_IPSEC_IKE_NEG_STATUS_END 13884L
+#define SEVERITY_SUCCESS 0
+#define SEVERITY_ERROR 1
+#define SUCCEEDED(hr) ((HRESULT)(hr) >= 0)
+#define FAILED(hr) ((HRESULT)(hr) < 0)
+#define IS_ERROR(Status) ((unsigned long)(Status) >> 31==SEVERITY_ERROR)
+#define HRESULT_CODE(hr) ((hr) & 0xFFFF)
+#define SCODE_CODE(sc) ((sc) & 0xFFFF)
+#define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1fff)
+#define SCODE_FACILITY(sc) (((sc) >> 16) & 0x1fff)
+#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1)
+#define SCODE_SEVERITY(sc) (((sc) >> 31) & 0x1)
+#define MAKE_HRESULT(sev,fac,code) ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))))
+#define MAKE_SCODE(sev,fac,code) ((SCODE) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))))
+#define FACILITY_NT_BIT 0x10000000
+#define __HRESULT_FROM_WIN32(x) ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000)))
+#ifdef INLINE_HRESULT_FROM_WIN32
+#ifndef _HRESULT_DEFINED
+#define _HRESULT_DEFINED
+typedef long HRESULT;
+#endif
+__CRT_INLINE HRESULT HRESULT_FROM_WIN32(long x) { return x <= 0 ? (HRESULT)x : (HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000);}
+#else
+#define HRESULT_FROM_WIN32(x) __HRESULT_FROM_WIN32(x)
+#endif
+#define HRESULT_FROM_NT(x) ((HRESULT) ((x) | FACILITY_NT_BIT))
+#define GetScode(hr) ((SCODE) (hr))
+#define ResultFromScode(sc) ((HRESULT) (sc))
+#define PropagateResult(hrPrevious,scBase) ((HRESULT) scBase)
+#ifdef RC_INVOKED
+#define _HRESULT_TYPEDEF_(_sc) _sc
+#else
+#define _HRESULT_TYPEDEF_(_sc) ((HRESULT)_sc)
+#endif
+#define NOERROR 0
+#define E_UNEXPECTED _HRESULT_TYPEDEF_(0x8000FFFFL)
+#define E_NOTIMPL _HRESULT_TYPEDEF_(0x80004001L)
+#define E_OUTOFMEMORY _HRESULT_TYPEDEF_(0x8007000EL)
+#define E_INVALIDARG _HRESULT_TYPEDEF_(0x80070057L)
+#define E_NOINTERFACE _HRESULT_TYPEDEF_(0x80004002L)
+#define E_POINTER _HRESULT_TYPEDEF_(0x80004003L)
+#define E_HANDLE _HRESULT_TYPEDEF_(0x80070006L)
+#define E_ABORT _HRESULT_TYPEDEF_(0x80004004L)
+#define E_FAIL _HRESULT_TYPEDEF_(0x80004005L)
+#define E_ACCESSDENIED _HRESULT_TYPEDEF_(0x80070005L)
+#define E_PENDING _HRESULT_TYPEDEF_(0x8000000AL)
+#define CO_E_INIT_TLS _HRESULT_TYPEDEF_(0x80004006L)
+#define CO_E_INIT_SHARED_ALLOCATOR _HRESULT_TYPEDEF_(0x80004007L)
+#define CO_E_INIT_MEMORY_ALLOCATOR _HRESULT_TYPEDEF_(0x80004008L)
+#define CO_E_INIT_CLASS_CACHE _HRESULT_TYPEDEF_(0x80004009L)
+#define CO_E_INIT_RPC_CHANNEL _HRESULT_TYPEDEF_(0x8000400AL)
+#define CO_E_INIT_TLS_SET_CHANNEL_CONTROL _HRESULT_TYPEDEF_(0x8000400BL)
+#define CO_E_INIT_TLS_CHANNEL_CONTROL _HRESULT_TYPEDEF_(0x8000400CL)
+#define CO_E_INIT_UNACCEPTED_USER_ALLOCATOR _HRESULT_TYPEDEF_(0x8000400DL)
+#define CO_E_INIT_SCM_MUTEX_EXISTS _HRESULT_TYPEDEF_(0x8000400EL)
+#define CO_E_INIT_SCM_FILE_MAPPING_EXISTS _HRESULT_TYPEDEF_(0x8000400FL)
+#define CO_E_INIT_SCM_MAP_VIEW_OF_FILE _HRESULT_TYPEDEF_(0x80004010L)
+#define CO_E_INIT_SCM_EXEC_FAILURE _HRESULT_TYPEDEF_(0x80004011L)
+#define CO_E_INIT_ONLY_SINGLE_THREADED _HRESULT_TYPEDEF_(0x80004012L)
+#define CO_E_CANT_REMOTE _HRESULT_TYPEDEF_(0x80004013L)
+#define CO_E_BAD_SERVER_NAME _HRESULT_TYPEDEF_(0x80004014L)
+#define CO_E_WRONG_SERVER_IDENTITY _HRESULT_TYPEDEF_(0x80004015L)
+#define CO_E_OLE1DDE_DISABLED _HRESULT_TYPEDEF_(0x80004016L)
+#define CO_E_RUNAS_SYNTAX _HRESULT_TYPEDEF_(0x80004017L)
+#define CO_E_CREATEPROCESS_FAILURE _HRESULT_TYPEDEF_(0x80004018L)
+#define CO_E_RUNAS_CREATEPROCESS_FAILURE _HRESULT_TYPEDEF_(0x80004019L)
+#define CO_E_RUNAS_LOGON_FAILURE _HRESULT_TYPEDEF_(0x8000401AL)
+#define CO_E_LAUNCH_PERMSSION_DENIED _HRESULT_TYPEDEF_(0x8000401BL)
+#define CO_E_START_SERVICE_FAILURE _HRESULT_TYPEDEF_(0x8000401CL)
+#define CO_E_REMOTE_COMMUNICATION_FAILURE _HRESULT_TYPEDEF_(0x8000401DL)
+#define CO_E_SERVER_START_TIMEOUT _HRESULT_TYPEDEF_(0x8000401EL)
+#define CO_E_CLSREG_INCONSISTENT _HRESULT_TYPEDEF_(0x8000401FL)
+#define CO_E_IIDREG_INCONSISTENT _HRESULT_TYPEDEF_(0x80004020L)
+#define CO_E_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x80004021L)
+#define CO_E_RELOAD_DLL _HRESULT_TYPEDEF_(0x80004022L)
+#define CO_E_MSI_ERROR _HRESULT_TYPEDEF_(0x80004023L)
+#define CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT _HRESULT_TYPEDEF_(0x80004024L)
+#define CO_E_SERVER_PAUSED _HRESULT_TYPEDEF_(0x80004025L)
+#define CO_E_SERVER_NOT_PAUSED _HRESULT_TYPEDEF_(0x80004026L)
+#define CO_E_CLASS_DISABLED _HRESULT_TYPEDEF_(0x80004027L)
+#define CO_E_CLRNOTAVAILABLE _HRESULT_TYPEDEF_(0x80004028L)
+#define CO_E_ASYNC_WORK_REJECTED _HRESULT_TYPEDEF_(0x80004029L)
+#define CO_E_SERVER_INIT_TIMEOUT _HRESULT_TYPEDEF_(0x8000402AL)
+#define CO_E_NO_SECCTX_IN_ACTIVATE _HRESULT_TYPEDEF_(0x8000402BL)
+#define CO_E_TRACKER_CONFIG _HRESULT_TYPEDEF_(0x80004030L)
+#define CO_E_THREADPOOL_CONFIG _HRESULT_TYPEDEF_(0x80004031L)
+#define CO_E_SXS_CONFIG _HRESULT_TYPEDEF_(0x80004032L)
+#define CO_E_MALFORMED_SPN _HRESULT_TYPEDEF_(0x80004033L)
+#define S_OK ((HRESULT)0x00000000L)
+#define S_FALSE ((HRESULT)0x00000001L)
+#define OLE_E_FIRST ((HRESULT)0x80040000L)
+#define OLE_E_LAST ((HRESULT)0x800400FFL)
+#define OLE_S_FIRST ((HRESULT)0x00040000L)
+#define OLE_S_LAST ((HRESULT)0x000400FFL)
+#define OLE_E_OLEVERB _HRESULT_TYPEDEF_(0x80040000L)
+#define OLE_E_ADVF _HRESULT_TYPEDEF_(0x80040001L)
+#define OLE_E_ENUM_NOMORE _HRESULT_TYPEDEF_(0x80040002L)
+#define OLE_E_ADVISENOTSUPPORTED _HRESULT_TYPEDEF_(0x80040003L)
+#define OLE_E_NOCONNECTION _HRESULT_TYPEDEF_(0x80040004L)
+#define OLE_E_NOTRUNNING _HRESULT_TYPEDEF_(0x80040005L)
+#define OLE_E_NOCACHE _HRESULT_TYPEDEF_(0x80040006L)
+#define OLE_E_BLANK _HRESULT_TYPEDEF_(0x80040007L)
+#define OLE_E_CLASSDIFF _HRESULT_TYPEDEF_(0x80040008L)
+#define OLE_E_CANT_GETMONIKER _HRESULT_TYPEDEF_(0x80040009L)
+#define OLE_E_CANT_BINDTOSOURCE _HRESULT_TYPEDEF_(0x8004000AL)
+#define OLE_E_STATIC _HRESULT_TYPEDEF_(0x8004000BL)
+#define OLE_E_PROMPTSAVECANCELLED _HRESULT_TYPEDEF_(0x8004000CL)
+#define OLE_E_INVALIDRECT _HRESULT_TYPEDEF_(0x8004000DL)
+#define OLE_E_WRONGCOMPOBJ _HRESULT_TYPEDEF_(0x8004000EL)
+#define OLE_E_INVALIDHWND _HRESULT_TYPEDEF_(0x8004000FL)
+#define OLE_E_NOT_INPLACEACTIVE _HRESULT_TYPEDEF_(0x80040010L)
+#define OLE_E_CANTCONVERT _HRESULT_TYPEDEF_(0x80040011L)
+#define OLE_E_NOSTORAGE _HRESULT_TYPEDEF_(0x80040012L)
+#define DV_E_FORMATETC _HRESULT_TYPEDEF_(0x80040064L)
+#define DV_E_DVTARGETDEVICE _HRESULT_TYPEDEF_(0x80040065L)
+#define DV_E_STGMEDIUM _HRESULT_TYPEDEF_(0x80040066L)
+#define DV_E_STATDATA _HRESULT_TYPEDEF_(0x80040067L)
+#define DV_E_LINDEX _HRESULT_TYPEDEF_(0x80040068L)
+#define DV_E_TYMED _HRESULT_TYPEDEF_(0x80040069L)
+#define DV_E_CLIPFORMAT _HRESULT_TYPEDEF_(0x8004006AL)
+#define DV_E_DVASPECT _HRESULT_TYPEDEF_(0x8004006BL)
+#define DV_E_DVTARGETDEVICE_SIZE _HRESULT_TYPEDEF_(0x8004006CL)
+#define DV_E_NOIVIEWOBJECT _HRESULT_TYPEDEF_(0x8004006DL)
+#define DRAGDROP_E_FIRST 0x80040100L
+#define DRAGDROP_E_LAST 0x8004010FL
+#define DRAGDROP_S_FIRST 0x00040100L
+#define DRAGDROP_S_LAST 0x0004010FL
+#define DRAGDROP_E_NOTREGISTERED _HRESULT_TYPEDEF_(0x80040100L)
+#define DRAGDROP_E_ALREADYREGISTERED _HRESULT_TYPEDEF_(0x80040101L)
+#define DRAGDROP_E_INVALIDHWND _HRESULT_TYPEDEF_(0x80040102L)
+#define CLASSFACTORY_E_FIRST 0x80040110L
+#define CLASSFACTORY_E_LAST 0x8004011FL
+#define CLASSFACTORY_S_FIRST 0x00040110L
+#define CLASSFACTORY_S_LAST 0x0004011FL
+#define CLASS_E_NOAGGREGATION _HRESULT_TYPEDEF_(0x80040110L)
+#define CLASS_E_CLASSNOTAVAILABLE _HRESULT_TYPEDEF_(0x80040111L)
+#define CLASS_E_NOTLICENSED _HRESULT_TYPEDEF_(0x80040112L)
+#define MARSHAL_E_FIRST 0x80040120L
+#define MARSHAL_E_LAST 0x8004012FL
+#define MARSHAL_S_FIRST 0x00040120L
+#define MARSHAL_S_LAST 0x0004012FL
+#define DATA_E_FIRST 0x80040130L
+#define DATA_E_LAST 0x8004013FL
+#define DATA_S_FIRST 0x00040130L
+#define DATA_S_LAST 0x0004013FL
+#define VIEW_E_FIRST 0x80040140L
+#define VIEW_E_LAST 0x8004014FL
+#define VIEW_S_FIRST 0x00040140L
+#define VIEW_S_LAST 0x0004014FL
+#define VIEW_E_DRAW _HRESULT_TYPEDEF_(0x80040140L)
+#define REGDB_E_FIRST 0x80040150L
+#define REGDB_E_LAST 0x8004015FL
+#define REGDB_S_FIRST 0x00040150L
+#define REGDB_S_LAST 0x0004015FL
+#define REGDB_E_READREGDB _HRESULT_TYPEDEF_(0x80040150L)
+#define REGDB_E_WRITEREGDB _HRESULT_TYPEDEF_(0x80040151L)
+#define REGDB_E_KEYMISSING _HRESULT_TYPEDEF_(0x80040152L)
+#define REGDB_E_INVALIDVALUE _HRESULT_TYPEDEF_(0x80040153L)
+#define REGDB_E_CLASSNOTREG _HRESULT_TYPEDEF_(0x80040154L)
+#define REGDB_E_IIDNOTREG _HRESULT_TYPEDEF_(0x80040155L)
+#define REGDB_E_BADTHREADINGMODEL _HRESULT_TYPEDEF_(0x80040156L)
+#define CAT_E_FIRST 0x80040160L
+#define CAT_E_LAST 0x80040161L
+#define CAT_E_CATIDNOEXIST _HRESULT_TYPEDEF_(0x80040160L)
+#define CAT_E_NODESCRIPTION _HRESULT_TYPEDEF_(0x80040161L)
+#define CS_E_FIRST 0x80040164L
+#define CS_E_LAST 0x8004016FL
+#define CS_E_PACKAGE_NOTFOUND _HRESULT_TYPEDEF_(0x80040164L)
+#define CS_E_NOT_DELETABLE _HRESULT_TYPEDEF_(0x80040165L)
+#define CS_E_CLASS_NOTFOUND _HRESULT_TYPEDEF_(0x80040166L)
+#define CS_E_INVALID_VERSION _HRESULT_TYPEDEF_(0x80040167L)
+#define CS_E_NO_CLASSSTORE _HRESULT_TYPEDEF_(0x80040168L)
+#define CS_E_OBJECT_NOTFOUND _HRESULT_TYPEDEF_(0x80040169L)
+#define CS_E_OBJECT_ALREADY_EXISTS _HRESULT_TYPEDEF_(0x8004016AL)
+#define CS_E_INVALID_PATH _HRESULT_TYPEDEF_(0x8004016BL)
+#define CS_E_NETWORK_ERROR _HRESULT_TYPEDEF_(0x8004016CL)
+#define CS_E_ADMIN_LIMIT_EXCEEDED _HRESULT_TYPEDEF_(0x8004016DL)
+#define CS_E_SCHEMA_MISMATCH _HRESULT_TYPEDEF_(0x8004016EL)
+#define CS_E_INTERNAL_ERROR _HRESULT_TYPEDEF_(0x8004016FL)
+#define CACHE_E_FIRST 0x80040170L
+#define CACHE_E_LAST 0x8004017FL
+#define CACHE_S_FIRST 0x00040170L
+#define CACHE_S_LAST 0x0004017FL
+#define CACHE_E_NOCACHE_UPDATED _HRESULT_TYPEDEF_(0x80040170L)
+#define OLEOBJ_E_FIRST 0x80040180L
+#define OLEOBJ_E_LAST 0x8004018FL
+#define OLEOBJ_S_FIRST 0x00040180L
+#define OLEOBJ_S_LAST 0x0004018FL
+#define OLEOBJ_E_NOVERBS _HRESULT_TYPEDEF_(0x80040180L)
+#define OLEOBJ_E_INVALIDVERB _HRESULT_TYPEDEF_(0x80040181L)
+#define CLIENTSITE_E_FIRST 0x80040190L
+#define CLIENTSITE_E_LAST 0x8004019FL
+#define CLIENTSITE_S_FIRST 0x00040190L
+#define CLIENTSITE_S_LAST 0x0004019FL
+#define INPLACE_E_NOTUNDOABLE _HRESULT_TYPEDEF_(0x800401A0L)
+#define INPLACE_E_NOTOOLSPACE _HRESULT_TYPEDEF_(0x800401A1L)
+#define INPLACE_E_FIRST 0x800401A0L
+#define INPLACE_E_LAST 0x800401AFL
+#define INPLACE_S_FIRST 0x000401A0L
+#define INPLACE_S_LAST 0x000401AFL
+#define ENUM_E_FIRST 0x800401B0L
+#define ENUM_E_LAST 0x800401BFL
+#define ENUM_S_FIRST 0x000401B0L
+#define ENUM_S_LAST 0x000401BFL
+#define CONVERT10_E_FIRST 0x800401C0L
+#define CONVERT10_E_LAST 0x800401CFL
+#define CONVERT10_S_FIRST 0x000401C0L
+#define CONVERT10_S_LAST 0x000401CFL
+#define CONVERT10_E_OLESTREAM_GET _HRESULT_TYPEDEF_(0x800401C0L)
+#define CONVERT10_E_OLESTREAM_PUT _HRESULT_TYPEDEF_(0x800401C1L)
+#define CONVERT10_E_OLESTREAM_FMT _HRESULT_TYPEDEF_(0x800401C2L)
+#define CONVERT10_E_OLESTREAM_BITMAP_TO_DIB _HRESULT_TYPEDEF_(0x800401C3L)
+#define CONVERT10_E_STG_FMT _HRESULT_TYPEDEF_(0x800401C4L)
+#define CONVERT10_E_STG_NO_STD_STREAM _HRESULT_TYPEDEF_(0x800401C5L)
+#define CONVERT10_E_STG_DIB_TO_BITMAP _HRESULT_TYPEDEF_(0x800401C6L)
+#define CLIPBRD_E_FIRST 0x800401D0L
+#define CLIPBRD_E_LAST 0x800401DFL
+#define CLIPBRD_S_FIRST 0x000401D0L
+#define CLIPBRD_S_LAST 0x000401DFL
+#define CLIPBRD_E_CANT_OPEN _HRESULT_TYPEDEF_(0x800401D0L)
+#define CLIPBRD_E_CANT_EMPTY _HRESULT_TYPEDEF_(0x800401D1L)
+#define CLIPBRD_E_CANT_SET _HRESULT_TYPEDEF_(0x800401D2L)
+#define CLIPBRD_E_BAD_DATA _HRESULT_TYPEDEF_(0x800401D3L)
+#define CLIPBRD_E_CANT_CLOSE _HRESULT_TYPEDEF_(0x800401D4L)
+#define MK_E_FIRST 0x800401E0L
+#define MK_E_LAST 0x800401EFL
+#define MK_S_FIRST 0x000401E0L
+#define MK_S_LAST 0x000401EFL
+#define MK_E_CONNECTMANUALLY _HRESULT_TYPEDEF_(0x800401E0L)
+#define MK_E_EXCEEDEDDEADLINE _HRESULT_TYPEDEF_(0x800401E1L)
+#define MK_E_NEEDGENERIC _HRESULT_TYPEDEF_(0x800401E2L)
+#define MK_E_UNAVAILABLE _HRESULT_TYPEDEF_(0x800401E3L)
+#define MK_E_SYNTAX _HRESULT_TYPEDEF_(0x800401E4L)
+#define MK_E_NOOBJECT _HRESULT_TYPEDEF_(0x800401E5L)
+#define MK_E_INVALIDEXTENSION _HRESULT_TYPEDEF_(0x800401E6L)
+#define MK_E_INTERMEDIATEINTERFACENOTSUPPORTED _HRESULT_TYPEDEF_(0x800401E7L)
+#define MK_E_NOTBINDABLE _HRESULT_TYPEDEF_(0x800401E8L)
+#define MK_E_NOTBOUND _HRESULT_TYPEDEF_(0x800401E9L)
+#define MK_E_CANTOPENFILE _HRESULT_TYPEDEF_(0x800401EAL)
+#define MK_E_MUSTBOTHERUSER _HRESULT_TYPEDEF_(0x800401EBL)
+#define MK_E_NOINVERSE _HRESULT_TYPEDEF_(0x800401ECL)
+#define MK_E_NOSTORAGE _HRESULT_TYPEDEF_(0x800401EDL)
+#define MK_E_NOPREFIX _HRESULT_TYPEDEF_(0x800401EEL)
+#define MK_E_ENUMERATION_FAILED _HRESULT_TYPEDEF_(0x800401EFL)
+#define CO_E_FIRST 0x800401F0L
+#define CO_E_LAST 0x800401FFL
+#define CO_S_FIRST 0x000401F0L
+#define CO_S_LAST 0x000401FFL
+#define CO_E_NOTINITIALIZED _HRESULT_TYPEDEF_(0x800401F0L)
+#define CO_E_ALREADYINITIALIZED _HRESULT_TYPEDEF_(0x800401F1L)
+#define CO_E_CANTDETERMINECLASS _HRESULT_TYPEDEF_(0x800401F2L)
+#define CO_E_CLASSSTRING _HRESULT_TYPEDEF_(0x800401F3L)
+#define CO_E_IIDSTRING _HRESULT_TYPEDEF_(0x800401F4L)
+#define CO_E_APPNOTFOUND _HRESULT_TYPEDEF_(0x800401F5L)
+#define CO_E_APPSINGLEUSE _HRESULT_TYPEDEF_(0x800401F6L)
+#define CO_E_ERRORINAPP _HRESULT_TYPEDEF_(0x800401F7L)
+#define CO_E_DLLNOTFOUND _HRESULT_TYPEDEF_(0x800401F8L)
+#define CO_E_ERRORINDLL _HRESULT_TYPEDEF_(0x800401F9L)
+#define CO_E_WRONGOSFORAPP _HRESULT_TYPEDEF_(0x800401FAL)
+#define CO_E_OBJNOTREG _HRESULT_TYPEDEF_(0x800401FBL)
+#define CO_E_OBJISREG _HRESULT_TYPEDEF_(0x800401FCL)
+#define CO_E_OBJNOTCONNECTED _HRESULT_TYPEDEF_(0x800401FDL)
+#define CO_E_APPDIDNTREG _HRESULT_TYPEDEF_(0x800401FEL)
+#define CO_E_RELEASED _HRESULT_TYPEDEF_(0x800401FFL)
+#define EVENT_E_FIRST 0x80040200L
+#define EVENT_E_LAST 0x8004021FL
+#define EVENT_S_FIRST 0x00040200L
+#define EVENT_S_LAST 0x0004021FL
+#define EVENT_S_SOME_SUBSCRIBERS_FAILED _HRESULT_TYPEDEF_(0x00040200L)
+#define EVENT_E_ALL_SUBSCRIBERS_FAILED _HRESULT_TYPEDEF_(0x80040201L)
+#define EVENT_S_NOSUBSCRIBERS _HRESULT_TYPEDEF_(0x00040202L)
+#define EVENT_E_QUERYSYNTAX _HRESULT_TYPEDEF_(0x80040203L)
+#define EVENT_E_QUERYFIELD _HRESULT_TYPEDEF_(0x80040204L)
+#define EVENT_E_INTERNALEXCEPTION _HRESULT_TYPEDEF_(0x80040205L)
+#define EVENT_E_INTERNALERROR _HRESULT_TYPEDEF_(0x80040206L)
+#define EVENT_E_INVALID_PER_USER_SID _HRESULT_TYPEDEF_(0x80040207L)
+#define EVENT_E_USER_EXCEPTION _HRESULT_TYPEDEF_(0x80040208L)
+#define EVENT_E_TOO_MANY_METHODS _HRESULT_TYPEDEF_(0x80040209L)
+#define EVENT_E_MISSING_EVENTCLASS _HRESULT_TYPEDEF_(0x8004020AL)
+#define EVENT_E_NOT_ALL_REMOVED _HRESULT_TYPEDEF_(0x8004020BL)
+#define EVENT_E_COMPLUS_NOT_INSTALLED _HRESULT_TYPEDEF_(0x8004020CL)
+#define EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT _HRESULT_TYPEDEF_(0x8004020DL)
+#define EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT _HRESULT_TYPEDEF_(0x8004020EL)
+#define EVENT_E_INVALID_EVENT_CLASS_PARTITION _HRESULT_TYPEDEF_(0x8004020FL)
+#define EVENT_E_PER_USER_SID_NOT_LOGGED_ON _HRESULT_TYPEDEF_(0x80040210L)
+#define XACT_E_FIRST 0x8004D000
+#define XACT_E_LAST 0x8004D029
+#define XACT_S_FIRST 0x0004D000
+#define XACT_S_LAST 0x0004D010
+#define XACT_E_ALREADYOTHERSINGLEPHASE _HRESULT_TYPEDEF_(0x8004D000L)
+#define XACT_E_CANTRETAIN _HRESULT_TYPEDEF_(0x8004D001L)
+#define XACT_E_COMMITFAILED _HRESULT_TYPEDEF_(0x8004D002L)
+#define XACT_E_COMMITPREVENTED _HRESULT_TYPEDEF_(0x8004D003L)
+#define XACT_E_HEURISTICABORT _HRESULT_TYPEDEF_(0x8004D004L)
+#define XACT_E_HEURISTICCOMMIT _HRESULT_TYPEDEF_(0x8004D005L)
+#define XACT_E_HEURISTICDAMAGE _HRESULT_TYPEDEF_(0x8004D006L)
+#define XACT_E_HEURISTICDANGER _HRESULT_TYPEDEF_(0x8004D007L)
+#define XACT_E_ISOLATIONLEVEL _HRESULT_TYPEDEF_(0x8004D008L)
+#define XACT_E_NOASYNC _HRESULT_TYPEDEF_(0x8004D009L)
+#define XACT_E_NOENLIST _HRESULT_TYPEDEF_(0x8004D00AL)
+#define XACT_E_NOISORETAIN _HRESULT_TYPEDEF_(0x8004D00BL)
+#define XACT_E_NORESOURCE _HRESULT_TYPEDEF_(0x8004D00CL)
+#define XACT_E_NOTCURRENT _HRESULT_TYPEDEF_(0x8004D00DL)
+#define XACT_E_NOTRANSACTION _HRESULT_TYPEDEF_(0x8004D00EL)
+#define XACT_E_NOTSUPPORTED _HRESULT_TYPEDEF_(0x8004D00FL)
+#define XACT_E_UNKNOWNRMGRID _HRESULT_TYPEDEF_(0x8004D010L)
+#define XACT_E_WRONGSTATE _HRESULT_TYPEDEF_(0x8004D011L)
+#define XACT_E_WRONGUOW _HRESULT_TYPEDEF_(0x8004D012L)
+#define XACT_E_XTIONEXISTS _HRESULT_TYPEDEF_(0x8004D013L)
+#define XACT_E_NOIMPORTOBJECT _HRESULT_TYPEDEF_(0x8004D014L)
+#define XACT_E_INVALIDCOOKIE _HRESULT_TYPEDEF_(0x8004D015L)
+#define XACT_E_INDOUBT _HRESULT_TYPEDEF_(0x8004D016L)
+#define XACT_E_NOTIMEOUT _HRESULT_TYPEDEF_(0x8004D017L)
+#define XACT_E_ALREADYINPROGRESS _HRESULT_TYPEDEF_(0x8004D018L)
+#define XACT_E_ABORTED _HRESULT_TYPEDEF_(0x8004D019L)
+#define XACT_E_LOGFULL _HRESULT_TYPEDEF_(0x8004D01AL)
+#define XACT_E_TMNOTAVAILABLE _HRESULT_TYPEDEF_(0x8004D01BL)
+#define XACT_E_CONNECTION_DOWN _HRESULT_TYPEDEF_(0x8004D01CL)
+#define XACT_E_CONNECTION_DENIED _HRESULT_TYPEDEF_(0x8004D01DL)
+#define XACT_E_REENLISTTIMEOUT _HRESULT_TYPEDEF_(0x8004D01EL)
+#define XACT_E_TIP_CONNECT_FAILED _HRESULT_TYPEDEF_(0x8004D01FL)
+#define XACT_E_TIP_PROTOCOL_ERROR _HRESULT_TYPEDEF_(0x8004D020L)
+#define XACT_E_TIP_PULL_FAILED _HRESULT_TYPEDEF_(0x8004D021L)
+#define XACT_E_DEST_TMNOTAVAILABLE _HRESULT_TYPEDEF_(0x8004D022L)
+#define XACT_E_TIP_DISABLED _HRESULT_TYPEDEF_(0x8004D023L)
+#define XACT_E_NETWORK_TX_DISABLED _HRESULT_TYPEDEF_(0x8004D024L)
+#define XACT_E_PARTNER_NETWORK_TX_DISABLED _HRESULT_TYPEDEF_(0x8004D025L)
+#define XACT_E_XA_TX_DISABLED _HRESULT_TYPEDEF_(0x8004D026L)
+#define XACT_E_UNABLE_TO_READ_DTC_CONFIG _HRESULT_TYPEDEF_(0x8004D027L)
+#define XACT_E_UNABLE_TO_LOAD_DTC_PROXY _HRESULT_TYPEDEF_(0x8004D028L)
+#define XACT_E_ABORTING _HRESULT_TYPEDEF_(0x8004D029L)
+#define XACT_E_CLERKNOTFOUND _HRESULT_TYPEDEF_(0x8004D080L)
+#define XACT_E_CLERKEXISTS _HRESULT_TYPEDEF_(0x8004D081L)
+#define XACT_E_RECOVERYINPROGRESS _HRESULT_TYPEDEF_(0x8004D082L)
+#define XACT_E_TRANSACTIONCLOSED _HRESULT_TYPEDEF_(0x8004D083L)
+#define XACT_E_INVALIDLSN _HRESULT_TYPEDEF_(0x8004D084L)
+#define XACT_E_REPLAYREQUEST _HRESULT_TYPEDEF_(0x8004D085L)
+#define XACT_S_ASYNC _HRESULT_TYPEDEF_(0x0004D000L)
+#define XACT_S_DEFECT _HRESULT_TYPEDEF_(0x0004D001L)
+#define XACT_S_READONLY _HRESULT_TYPEDEF_(0x0004D002L)
+#define XACT_S_SOMENORETAIN _HRESULT_TYPEDEF_(0x0004D003L)
+#define XACT_S_OKINFORM _HRESULT_TYPEDEF_(0x0004D004L)
+#define XACT_S_MADECHANGESCONTENT _HRESULT_TYPEDEF_(0x0004D005L)
+#define XACT_S_MADECHANGESINFORM _HRESULT_TYPEDEF_(0x0004D006L)
+#define XACT_S_ALLNORETAIN _HRESULT_TYPEDEF_(0x0004D007L)
+#define XACT_S_ABORTING _HRESULT_TYPEDEF_(0x0004D008L)
+#define XACT_S_SINGLEPHASE _HRESULT_TYPEDEF_(0x0004D009L)
+#define XACT_S_LOCALLY_OK _HRESULT_TYPEDEF_(0x0004D00AL)
+#define XACT_S_LASTRESOURCEMANAGER _HRESULT_TYPEDEF_(0x0004D010L)
+#define CONTEXT_E_FIRST 0x8004E000L
+#define CONTEXT_E_LAST 0x8004E02FL
+#define CONTEXT_S_FIRST 0x0004E000L
+#define CONTEXT_S_LAST 0x0004E02FL
+#define CONTEXT_E_ABORTED _HRESULT_TYPEDEF_(0x8004E002L)
+#define CONTEXT_E_ABORTING _HRESULT_TYPEDEF_(0x8004E003L)
+#define CONTEXT_E_NOCONTEXT _HRESULT_TYPEDEF_(0x8004E004L)
+#define CONTEXT_E_WOULD_DEADLOCK _HRESULT_TYPEDEF_(0x8004E005L)
+#define CONTEXT_E_SYNCH_TIMEOUT _HRESULT_TYPEDEF_(0x8004E006L)
+#define CONTEXT_E_OLDREF _HRESULT_TYPEDEF_(0x8004E007L)
+#define CONTEXT_E_ROLENOTFOUND _HRESULT_TYPEDEF_(0x8004E00CL)
+#define CONTEXT_E_TMNOTAVAILABLE _HRESULT_TYPEDEF_(0x8004E00FL)
+#define CO_E_ACTIVATIONFAILED _HRESULT_TYPEDEF_(0x8004E021L)
+#define CO_E_ACTIVATIONFAILED_EVENTLOGGED _HRESULT_TYPEDEF_(0x8004E022L)
+#define CO_E_ACTIVATIONFAILED_CATALOGERROR _HRESULT_TYPEDEF_(0x8004E023L)
+#define CO_E_ACTIVATIONFAILED_TIMEOUT _HRESULT_TYPEDEF_(0x8004E024L)
+#define CO_E_INITIALIZATIONFAILED _HRESULT_TYPEDEF_(0x8004E025L)
+#define CONTEXT_E_NOJIT _HRESULT_TYPEDEF_(0x8004E026L)
+#define CONTEXT_E_NOTRANSACTION _HRESULT_TYPEDEF_(0x8004E027L)
+#define CO_E_THREADINGMODEL_CHANGED _HRESULT_TYPEDEF_(0x8004E028L)
+#define CO_E_NOIISINTRINSICS _HRESULT_TYPEDEF_(0x8004E029L)
+#define CO_E_NOCOOKIES _HRESULT_TYPEDEF_(0x8004E02AL)
+#define CO_E_DBERROR _HRESULT_TYPEDEF_(0x8004E02BL)
+#define CO_E_NOTPOOLED _HRESULT_TYPEDEF_(0x8004E02CL)
+#define CO_E_NOTCONSTRUCTED _HRESULT_TYPEDEF_(0x8004E02DL)
+#define CO_E_NOSYNCHRONIZATION _HRESULT_TYPEDEF_(0x8004E02EL)
+#define CO_E_ISOLEVELMISMATCH _HRESULT_TYPEDEF_(0x8004E02FL)
+#define OLE_S_USEREG _HRESULT_TYPEDEF_(0x00040000L)
+#define OLE_S_STATIC _HRESULT_TYPEDEF_(0x00040001L)
+#define OLE_S_MAC_CLIPFORMAT _HRESULT_TYPEDEF_(0x00040002L)
+#define DRAGDROP_S_DROP _HRESULT_TYPEDEF_(0x00040100L)
+#define DRAGDROP_S_CANCEL _HRESULT_TYPEDEF_(0x00040101L)
+#define DRAGDROP_S_USEDEFAULTCURSORS _HRESULT_TYPEDEF_(0x00040102L)
+#define DATA_S_SAMEFORMATETC _HRESULT_TYPEDEF_(0x00040130L)
+#define VIEW_S_ALREADY_FROZEN _HRESULT_TYPEDEF_(0x00040140L)
+#define CACHE_S_FORMATETC_NOTSUPPORTED _HRESULT_TYPEDEF_(0x00040170L)
+#define CACHE_S_SAMECACHE _HRESULT_TYPEDEF_(0x00040171L)
+#define CACHE_S_SOMECACHES_NOTUPDATED _HRESULT_TYPEDEF_(0x00040172L)
+#define OLEOBJ_S_INVALIDVERB _HRESULT_TYPEDEF_(0x00040180L)
+#define OLEOBJ_S_CANNOT_DOVERB_NOW _HRESULT_TYPEDEF_(0x00040181L)
+#define OLEOBJ_S_INVALIDHWND _HRESULT_TYPEDEF_(0x00040182L)
+#define INPLACE_S_TRUNCATED _HRESULT_TYPEDEF_(0x000401A0L)
+#define CONVERT10_S_NO_PRESENTATION _HRESULT_TYPEDEF_(0x000401C0L)
+#define MK_S_REDUCED_TO_SELF _HRESULT_TYPEDEF_(0x000401E2L)
+#define MK_S_ME _HRESULT_TYPEDEF_(0x000401E4L)
+#define MK_S_HIM _HRESULT_TYPEDEF_(0x000401E5L)
+#define MK_S_US _HRESULT_TYPEDEF_(0x000401E6L)
+#define MK_S_MONIKERALREADYREGISTERED _HRESULT_TYPEDEF_(0x000401E7L)
+#define SCHED_S_TASK_READY _HRESULT_TYPEDEF_(0x00041300L)
+#define SCHED_S_TASK_RUNNING _HRESULT_TYPEDEF_(0x00041301L)
+#define SCHED_S_TASK_DISABLED _HRESULT_TYPEDEF_(0x00041302L)
+#define SCHED_S_TASK_HAS_NOT_RUN _HRESULT_TYPEDEF_(0x00041303L)
+#define SCHED_S_TASK_NO_MORE_RUNS _HRESULT_TYPEDEF_(0x00041304L)
+#define SCHED_S_TASK_NOT_SCHEDULED _HRESULT_TYPEDEF_(0x00041305L)
+#define SCHED_S_TASK_TERMINATED _HRESULT_TYPEDEF_(0x00041306L)
+#define SCHED_S_TASK_NO_VALID_TRIGGERS _HRESULT_TYPEDEF_(0x00041307L)
+#define SCHED_S_EVENT_TRIGGER _HRESULT_TYPEDEF_(0x00041308L)
+#define SCHED_E_TRIGGER_NOT_FOUND _HRESULT_TYPEDEF_(0x80041309L)
+#define SCHED_E_TASK_NOT_READY _HRESULT_TYPEDEF_(0x8004130AL)
+#define SCHED_E_TASK_NOT_RUNNING _HRESULT_TYPEDEF_(0x8004130BL)
+#define SCHED_E_SERVICE_NOT_INSTALLED _HRESULT_TYPEDEF_(0x8004130CL)
+#define SCHED_E_CANNOT_OPEN_TASK _HRESULT_TYPEDEF_(0x8004130DL)
+#define SCHED_E_INVALID_TASK _HRESULT_TYPEDEF_(0x8004130EL)
+#define SCHED_E_ACCOUNT_INFORMATION_NOT_SET _HRESULT_TYPEDEF_(0x8004130FL)
+#define SCHED_E_ACCOUNT_NAME_NOT_FOUND _HRESULT_TYPEDEF_(0x80041310L)
+#define SCHED_E_ACCOUNT_DBASE_CORRUPT _HRESULT_TYPEDEF_(0x80041311L)
+#define SCHED_E_NO_SECURITY_SERVICES _HRESULT_TYPEDEF_(0x80041312L)
+#define SCHED_E_UNKNOWN_OBJECT_VERSION _HRESULT_TYPEDEF_(0x80041313L)
+#define SCHED_E_UNSUPPORTED_ACCOUNT_OPTION _HRESULT_TYPEDEF_(0x80041314L)
+#define SCHED_E_SERVICE_NOT_RUNNING _HRESULT_TYPEDEF_(0x80041315L)
+#define CO_E_CLASS_CREATE_FAILED _HRESULT_TYPEDEF_(0x80080001L)
+#define CO_E_SCM_ERROR _HRESULT_TYPEDEF_(0x80080002L)
+#define CO_E_SCM_RPC_FAILURE _HRESULT_TYPEDEF_(0x80080003L)
+#define CO_E_BAD_PATH _HRESULT_TYPEDEF_(0x80080004L)
+#define CO_E_SERVER_EXEC_FAILURE _HRESULT_TYPEDEF_(0x80080005L)
+#define CO_E_OBJSRV_RPC_FAILURE _HRESULT_TYPEDEF_(0x80080006L)
+#define MK_E_NO_NORMALIZED _HRESULT_TYPEDEF_(0x80080007L)
+#define CO_E_SERVER_STOPPING _HRESULT_TYPEDEF_(0x80080008L)
+#define MEM_E_INVALID_ROOT _HRESULT_TYPEDEF_(0x80080009L)
+#define MEM_E_INVALID_LINK _HRESULT_TYPEDEF_(0x80080010L)
+#define MEM_E_INVALID_SIZE _HRESULT_TYPEDEF_(0x80080011L)
+#define CO_S_NOTALLINTERFACES _HRESULT_TYPEDEF_(0x00080012L)
+#define CO_S_MACHINENAMENOTFOUND _HRESULT_TYPEDEF_(0x00080013L)
+#define DISP_E_UNKNOWNINTERFACE _HRESULT_TYPEDEF_(0x80020001L)
+#define DISP_E_MEMBERNOTFOUND _HRESULT_TYPEDEF_(0x80020003L)
+#define DISP_E_PARAMNOTFOUND _HRESULT_TYPEDEF_(0x80020004L)
+#define DISP_E_TYPEMISMATCH _HRESULT_TYPEDEF_(0x80020005L)
+#define DISP_E_UNKNOWNNAME _HRESULT_TYPEDEF_(0x80020006L)
+#define DISP_E_NONAMEDARGS _HRESULT_TYPEDEF_(0x80020007L)
+#define DISP_E_BADVARTYPE _HRESULT_TYPEDEF_(0x80020008L)
+#define DISP_E_EXCEPTION _HRESULT_TYPEDEF_(0x80020009L)
+#define DISP_E_OVERFLOW _HRESULT_TYPEDEF_(0x8002000AL)
+#define DISP_E_BADINDEX _HRESULT_TYPEDEF_(0x8002000BL)
+#define DISP_E_UNKNOWNLCID _HRESULT_TYPEDEF_(0x8002000CL)
+#define DISP_E_ARRAYISLOCKED _HRESULT_TYPEDEF_(0x8002000DL)
+#define DISP_E_BADPARAMCOUNT _HRESULT_TYPEDEF_(0x8002000EL)
+#define DISP_E_PARAMNOTOPTIONAL _HRESULT_TYPEDEF_(0x8002000FL)
+#define DISP_E_BADCALLEE _HRESULT_TYPEDEF_(0x80020010L)
+#define DISP_E_NOTACOLLECTION _HRESULT_TYPEDEF_(0x80020011L)
+#define DISP_E_DIVBYZERO _HRESULT_TYPEDEF_(0x80020012L)
+#define DISP_E_BUFFERTOOSMALL _HRESULT_TYPEDEF_(0x80020013L)
+#define TYPE_E_BUFFERTOOSMALL _HRESULT_TYPEDEF_(0x80028016L)
+#define TYPE_E_FIELDNOTFOUND _HRESULT_TYPEDEF_(0x80028017L)
+#define TYPE_E_INVDATAREAD _HRESULT_TYPEDEF_(0x80028018L)
+#define TYPE_E_UNSUPFORMAT _HRESULT_TYPEDEF_(0x80028019L)
+#define TYPE_E_REGISTRYACCESS _HRESULT_TYPEDEF_(0x8002801CL)
+#define TYPE_E_LIBNOTREGISTERED _HRESULT_TYPEDEF_(0x8002801DL)
+#define TYPE_E_UNDEFINEDTYPE _HRESULT_TYPEDEF_(0x80028027L)
+#define TYPE_E_QUALIFIEDNAMEDISALLOWED _HRESULT_TYPEDEF_(0x80028028L)
+#define TYPE_E_INVALIDSTATE _HRESULT_TYPEDEF_(0x80028029L)
+#define TYPE_E_WRONGTYPEKIND _HRESULT_TYPEDEF_(0x8002802AL)
+#define TYPE_E_ELEMENTNOTFOUND _HRESULT_TYPEDEF_(0x8002802BL)
+#define TYPE_E_AMBIGUOUSNAME _HRESULT_TYPEDEF_(0x8002802CL)
+#define TYPE_E_NAMECONFLICT _HRESULT_TYPEDEF_(0x8002802DL)
+#define TYPE_E_UNKNOWNLCID _HRESULT_TYPEDEF_(0x8002802EL)
+#define TYPE_E_DLLFUNCTIONNOTFOUND _HRESULT_TYPEDEF_(0x8002802FL)
+#define TYPE_E_BADMODULEKIND _HRESULT_TYPEDEF_(0x800288BDL)
+#define TYPE_E_SIZETOOBIG _HRESULT_TYPEDEF_(0x800288C5L)
+#define TYPE_E_DUPLICATEID _HRESULT_TYPEDEF_(0x800288C6L)
+#define TYPE_E_INVALIDID _HRESULT_TYPEDEF_(0x800288CFL)
+#define TYPE_E_TYPEMISMATCH _HRESULT_TYPEDEF_(0x80028CA0L)
+#define TYPE_E_OUTOFBOUNDS _HRESULT_TYPEDEF_(0x80028CA1L)
+#define TYPE_E_IOERROR _HRESULT_TYPEDEF_(0x80028CA2L)
+#define TYPE_E_CANTCREATETMPFILE _HRESULT_TYPEDEF_(0x80028CA3L)
+#define TYPE_E_CANTLOADLIBRARY _HRESULT_TYPEDEF_(0x80029C4AL)
+#define TYPE_E_INCONSISTENTPROPFUNCS _HRESULT_TYPEDEF_(0x80029C83L)
+#define TYPE_E_CIRCULARTYPE _HRESULT_TYPEDEF_(0x80029C84L)
+#define STG_E_INVALIDFUNCTION _HRESULT_TYPEDEF_(0x80030001L)
+#define STG_E_FILENOTFOUND _HRESULT_TYPEDEF_(0x80030002L)
+#define STG_E_PATHNOTFOUND _HRESULT_TYPEDEF_(0x80030003L)
+#define STG_E_TOOMANYOPENFILES _HRESULT_TYPEDEF_(0x80030004L)
+#define STG_E_ACCESSDENIED _HRESULT_TYPEDEF_(0x80030005L)
+#define STG_E_INVALIDHANDLE _HRESULT_TYPEDEF_(0x80030006L)
+#define STG_E_INSUFFICIENTMEMORY _HRESULT_TYPEDEF_(0x80030008L)
+#define STG_E_INVALIDPOINTER _HRESULT_TYPEDEF_(0x80030009L)
+#define STG_E_NOMOREFILES _HRESULT_TYPEDEF_(0x80030012L)
+#define STG_E_DISKISWRITEPROTECTED _HRESULT_TYPEDEF_(0x80030013L)
+#define STG_E_SEEKERROR _HRESULT_TYPEDEF_(0x80030019L)
+#define STG_E_WRITEFAULT _HRESULT_TYPEDEF_(0x8003001DL)
+#define STG_E_READFAULT _HRESULT_TYPEDEF_(0x8003001EL)
+#define STG_E_SHAREVIOLATION _HRESULT_TYPEDEF_(0x80030020L)
+#define STG_E_LOCKVIOLATION _HRESULT_TYPEDEF_(0x80030021L)
+#define STG_E_FILEALREADYEXISTS _HRESULT_TYPEDEF_(0x80030050L)
+#define STG_E_INVALIDPARAMETER _HRESULT_TYPEDEF_(0x80030057L)
+#define STG_E_MEDIUMFULL _HRESULT_TYPEDEF_(0x80030070L)
+#define STG_E_PROPSETMISMATCHED _HRESULT_TYPEDEF_(0x800300F0L)
+#define STG_E_ABNORMALAPIEXIT _HRESULT_TYPEDEF_(0x800300FAL)
+#define STG_E_INVALIDHEADER _HRESULT_TYPEDEF_(0x800300FBL)
+#define STG_E_INVALIDNAME _HRESULT_TYPEDEF_(0x800300FCL)
+#define STG_E_UNKNOWN _HRESULT_TYPEDEF_(0x800300FDL)
+#define STG_E_UNIMPLEMENTEDFUNCTION _HRESULT_TYPEDEF_(0x800300FEL)
+#define STG_E_INVALIDFLAG _HRESULT_TYPEDEF_(0x800300FFL)
+#define STG_E_INUSE _HRESULT_TYPEDEF_(0x80030100L)
+#define STG_E_NOTCURRENT _HRESULT_TYPEDEF_(0x80030101L)
+#define STG_E_REVERTED _HRESULT_TYPEDEF_(0x80030102L)
+#define STG_E_CANTSAVE _HRESULT_TYPEDEF_(0x80030103L)
+#define STG_E_OLDFORMAT _HRESULT_TYPEDEF_(0x80030104L)
+#define STG_E_OLDDLL _HRESULT_TYPEDEF_(0x80030105L)
+#define STG_E_SHAREREQUIRED _HRESULT_TYPEDEF_(0x80030106L)
+#define STG_E_NOTFILEBASEDSTORAGE _HRESULT_TYPEDEF_(0x80030107L)
+#define STG_E_EXTANTMARSHALLINGS _HRESULT_TYPEDEF_(0x80030108L)
+#define STG_E_DOCFILECORRUPT _HRESULT_TYPEDEF_(0x80030109L)
+#define STG_E_BADBASEADDRESS _HRESULT_TYPEDEF_(0x80030110L)
+#define STG_E_DOCFILETOOLARGE _HRESULT_TYPEDEF_(0x80030111L)
+#define STG_E_NOTSIMPLEFORMAT _HRESULT_TYPEDEF_(0x80030112L)
+#define STG_E_INCOMPLETE _HRESULT_TYPEDEF_(0x80030201L)
+#define STG_E_TERMINATED _HRESULT_TYPEDEF_(0x80030202L)
+#define STG_S_CONVERTED _HRESULT_TYPEDEF_(0x00030200L)
+#define STG_S_BLOCK _HRESULT_TYPEDEF_(0x00030201L)
+#define STG_S_RETRYNOW _HRESULT_TYPEDEF_(0x00030202L)
+#define STG_S_MONITORING _HRESULT_TYPEDEF_(0x00030203L)
+#define STG_S_MULTIPLEOPENS _HRESULT_TYPEDEF_(0x00030204L)
+#define STG_S_CONSOLIDATIONFAILED _HRESULT_TYPEDEF_(0x00030205L)
+#define STG_S_CANNOTCONSOLIDATE _HRESULT_TYPEDEF_(0x00030206L)
+#define STG_E_STATUS_COPY_PROTECTION_FAILURE _HRESULT_TYPEDEF_(0x80030305L)
+#define STG_E_CSS_AUTHENTICATION_FAILURE _HRESULT_TYPEDEF_(0x80030306L)
+#define STG_E_CSS_KEY_NOT_PRESENT _HRESULT_TYPEDEF_(0x80030307L)
+#define STG_E_CSS_KEY_NOT_ESTABLISHED _HRESULT_TYPEDEF_(0x80030308L)
+#define STG_E_CSS_SCRAMBLED_SECTOR _HRESULT_TYPEDEF_(0x80030309L)
+#define STG_E_CSS_REGION_MISMATCH _HRESULT_TYPEDEF_(0x8003030AL)
+#define STG_E_RESETS_EXHAUSTED _HRESULT_TYPEDEF_(0x8003030BL)
+#define RPC_E_CALL_REJECTED _HRESULT_TYPEDEF_(0x80010001L)
+#define RPC_E_CALL_CANCELED _HRESULT_TYPEDEF_(0x80010002L)
+#define RPC_E_CANTPOST_INSENDCALL _HRESULT_TYPEDEF_(0x80010003L)
+#define RPC_E_CANTCALLOUT_INASYNCCALL _HRESULT_TYPEDEF_(0x80010004L)
+#define RPC_E_CANTCALLOUT_INEXTERNALCALL _HRESULT_TYPEDEF_(0x80010005L)
+#define RPC_E_CONNECTION_TERMINATED _HRESULT_TYPEDEF_(0x80010006L)
+#define RPC_E_SERVER_DIED _HRESULT_TYPEDEF_(0x80010007L)
+#define RPC_E_CLIENT_DIED _HRESULT_TYPEDEF_(0x80010008L)
+#define RPC_E_INVALID_DATAPACKET _HRESULT_TYPEDEF_(0x80010009L)
+#define RPC_E_CANTTRANSMIT_CALL _HRESULT_TYPEDEF_(0x8001000AL)
+#define RPC_E_CLIENT_CANTMARSHAL_DATA _HRESULT_TYPEDEF_(0x8001000BL)
+#define RPC_E_CLIENT_CANTUNMARSHAL_DATA _HRESULT_TYPEDEF_(0x8001000CL)
+#define RPC_E_SERVER_CANTMARSHAL_DATA _HRESULT_TYPEDEF_(0x8001000DL)
+#define RPC_E_SERVER_CANTUNMARSHAL_DATA _HRESULT_TYPEDEF_(0x8001000EL)
+#define RPC_E_INVALID_DATA _HRESULT_TYPEDEF_(0x8001000FL)
+#define RPC_E_INVALID_PARAMETER _HRESULT_TYPEDEF_(0x80010010L)
+#define RPC_E_CANTCALLOUT_AGAIN _HRESULT_TYPEDEF_(0x80010011L)
+#define RPC_E_SERVER_DIED_DNE _HRESULT_TYPEDEF_(0x80010012L)
+#define RPC_E_SYS_CALL_FAILED _HRESULT_TYPEDEF_(0x80010100L)
+#define RPC_E_OUT_OF_RESOURCES _HRESULT_TYPEDEF_(0x80010101L)
+#define RPC_E_ATTEMPTED_MULTITHREAD _HRESULT_TYPEDEF_(0x80010102L)
+#define RPC_E_NOT_REGISTERED _HRESULT_TYPEDEF_(0x80010103L)
+#define RPC_E_FAULT _HRESULT_TYPEDEF_(0x80010104L)
+#define RPC_E_SERVERFAULT _HRESULT_TYPEDEF_(0x80010105L)
+#define RPC_E_CHANGED_MODE _HRESULT_TYPEDEF_(0x80010106L)
+#define RPC_E_INVALIDMETHOD _HRESULT_TYPEDEF_(0x80010107L)
+#define RPC_E_DISCONNECTED _HRESULT_TYPEDEF_(0x80010108L)
+#define RPC_E_RETRY _HRESULT_TYPEDEF_(0x80010109L)
+#define RPC_E_SERVERCALL_RETRYLATER _HRESULT_TYPEDEF_(0x8001010AL)
+#define RPC_E_SERVERCALL_REJECTED _HRESULT_TYPEDEF_(0x8001010BL)
+#define RPC_E_INVALID_CALLDATA _HRESULT_TYPEDEF_(0x8001010CL)
+#define RPC_E_CANTCALLOUT_ININPUTSYNCCALL _HRESULT_TYPEDEF_(0x8001010DL)
+#define RPC_E_WRONG_THREAD _HRESULT_TYPEDEF_(0x8001010EL)
+#define RPC_E_THREAD_NOT_INIT _HRESULT_TYPEDEF_(0x8001010FL)
+#define RPC_E_VERSION_MISMATCH _HRESULT_TYPEDEF_(0x80010110L)
+#define RPC_E_INVALID_HEADER _HRESULT_TYPEDEF_(0x80010111L)
+#define RPC_E_INVALID_EXTENSION _HRESULT_TYPEDEF_(0x80010112L)
+#define RPC_E_INVALID_IPID _HRESULT_TYPEDEF_(0x80010113L)
+#define RPC_E_INVALID_OBJECT _HRESULT_TYPEDEF_(0x80010114L)
+#define RPC_S_CALLPENDING _HRESULT_TYPEDEF_(0x80010115L)
+#define RPC_S_WAITONTIMER _HRESULT_TYPEDEF_(0x80010116L)
+#define RPC_E_CALL_COMPLETE _HRESULT_TYPEDEF_(0x80010117L)
+#define RPC_E_UNSECURE_CALL _HRESULT_TYPEDEF_(0x80010118L)
+#define RPC_E_TOO_LATE _HRESULT_TYPEDEF_(0x80010119L)
+#define RPC_E_NO_GOOD_SECURITY_PACKAGES _HRESULT_TYPEDEF_(0x8001011AL)
+#define RPC_E_ACCESS_DENIED _HRESULT_TYPEDEF_(0x8001011BL)
+#define RPC_E_REMOTE_DISABLED _HRESULT_TYPEDEF_(0x8001011CL)
+#define RPC_E_INVALID_OBJREF _HRESULT_TYPEDEF_(0x8001011DL)
+#define RPC_E_NO_CONTEXT _HRESULT_TYPEDEF_(0x8001011EL)
+#define RPC_E_TIMEOUT _HRESULT_TYPEDEF_(0x8001011FL)
+#define RPC_E_NO_SYNC _HRESULT_TYPEDEF_(0x80010120L)
+#define RPC_E_FULLSIC_REQUIRED _HRESULT_TYPEDEF_(0x80010121L)
+#define RPC_E_INVALID_STD_NAME _HRESULT_TYPEDEF_(0x80010122L)
+#define CO_E_FAILEDTOIMPERSONATE _HRESULT_TYPEDEF_(0x80010123L)
+#define CO_E_FAILEDTOGETSECCTX _HRESULT_TYPEDEF_(0x80010124L)
+#define CO_E_FAILEDTOOPENTHREADTOKEN _HRESULT_TYPEDEF_(0x80010125L)
+#define CO_E_FAILEDTOGETTOKENINFO _HRESULT_TYPEDEF_(0x80010126L)
+#define CO_E_TRUSTEEDOESNTMATCHCLIENT _HRESULT_TYPEDEF_(0x80010127L)
+#define CO_E_FAILEDTOQUERYCLIENTBLANKET _HRESULT_TYPEDEF_(0x80010128L)
+#define CO_E_FAILEDTOSETDACL _HRESULT_TYPEDEF_(0x80010129L)
+#define CO_E_ACCESSCHECKFAILED _HRESULT_TYPEDEF_(0x8001012AL)
+#define CO_E_NETACCESSAPIFAILED _HRESULT_TYPEDEF_(0x8001012BL)
+#define CO_E_WRONGTRUSTEENAMESYNTAX _HRESULT_TYPEDEF_(0x8001012CL)
+#define CO_E_INVALIDSID _HRESULT_TYPEDEF_(0x8001012DL)
+#define CO_E_CONVERSIONFAILED _HRESULT_TYPEDEF_(0x8001012EL)
+#define CO_E_NOMATCHINGSIDFOUND _HRESULT_TYPEDEF_(0x8001012FL)
+#define CO_E_LOOKUPACCSIDFAILED _HRESULT_TYPEDEF_(0x80010130L)
+#define CO_E_NOMATCHINGNAMEFOUND _HRESULT_TYPEDEF_(0x80010131L)
+#define CO_E_LOOKUPACCNAMEFAILED _HRESULT_TYPEDEF_(0x80010132L)
+#define CO_E_SETSERLHNDLFAILED _HRESULT_TYPEDEF_(0x80010133L)
+#define CO_E_FAILEDTOGETWINDIR _HRESULT_TYPEDEF_(0x80010134L)
+#define CO_E_PATHTOOLONG _HRESULT_TYPEDEF_(0x80010135L)
+#define CO_E_FAILEDTOGENUUID _HRESULT_TYPEDEF_(0x80010136L)
+#define CO_E_FAILEDTOCREATEFILE _HRESULT_TYPEDEF_(0x80010137L)
+#define CO_E_FAILEDTOCLOSEHANDLE _HRESULT_TYPEDEF_(0x80010138L)
+#define CO_E_EXCEEDSYSACLLIMIT _HRESULT_TYPEDEF_(0x80010139L)
+#define CO_E_ACESINWRONGORDER _HRESULT_TYPEDEF_(0x8001013AL)
+#define CO_E_INCOMPATIBLESTREAMVERSION _HRESULT_TYPEDEF_(0x8001013BL)
+#define CO_E_FAILEDTOOPENPROCESSTOKEN _HRESULT_TYPEDEF_(0x8001013CL)
+#define CO_E_DECODEFAILED _HRESULT_TYPEDEF_(0x8001013DL)
+#define CO_E_ACNOTINITIALIZED _HRESULT_TYPEDEF_(0x8001013FL)
+#define CO_E_CANCEL_DISABLED _HRESULT_TYPEDEF_(0x80010140L)
+#define RPC_E_UNEXPECTED _HRESULT_TYPEDEF_(0x8001FFFFL)
+#define ERROR_AUDITING_DISABLED _HRESULT_TYPEDEF_(0xC0090001L)
+#define ERROR_ALL_SIDS_FILTERED _HRESULT_TYPEDEF_(0xC0090002L)
+#define NTE_BAD_UID _HRESULT_TYPEDEF_(0x80090001L)
+#define NTE_BAD_HASH _HRESULT_TYPEDEF_(0x80090002L)
+#define NTE_BAD_KEY _HRESULT_TYPEDEF_(0x80090003L)
+#define NTE_BAD_LEN _HRESULT_TYPEDEF_(0x80090004L)
+#define NTE_BAD_DATA _HRESULT_TYPEDEF_(0x80090005L)
+#define NTE_BAD_SIGNATURE _HRESULT_TYPEDEF_(0x80090006L)
+#define NTE_BAD_VER _HRESULT_TYPEDEF_(0x80090007L)
+#define NTE_BAD_ALGID _HRESULT_TYPEDEF_(0x80090008L)
+#define NTE_BAD_FLAGS _HRESULT_TYPEDEF_(0x80090009L)
+#define NTE_BAD_TYPE _HRESULT_TYPEDEF_(0x8009000AL)
+#define NTE_BAD_KEY_STATE _HRESULT_TYPEDEF_(0x8009000BL)
+#define NTE_BAD_HASH_STATE _HRESULT_TYPEDEF_(0x8009000CL)
+#define NTE_NO_KEY _HRESULT_TYPEDEF_(0x8009000DL)
+#define NTE_NO_MEMORY _HRESULT_TYPEDEF_(0x8009000EL)
+#define NTE_EXISTS _HRESULT_TYPEDEF_(0x8009000FL)
+#define NTE_PERM _HRESULT_TYPEDEF_(0x80090010L)
+#define NTE_NOT_FOUND _HRESULT_TYPEDEF_(0x80090011L)
+#define NTE_DOUBLE_ENCRYPT _HRESULT_TYPEDEF_(0x80090012L)
+#define NTE_BAD_PROVIDER _HRESULT_TYPEDEF_(0x80090013L)
+#define NTE_BAD_PROV_TYPE _HRESULT_TYPEDEF_(0x80090014L)
+#define NTE_BAD_PUBLIC_KEY _HRESULT_TYPEDEF_(0x80090015L)
+#define NTE_BAD_KEYSET _HRESULT_TYPEDEF_(0x80090016L)
+#define NTE_PROV_TYPE_NOT_DEF _HRESULT_TYPEDEF_(0x80090017L)
+#define NTE_PROV_TYPE_ENTRY_BAD _HRESULT_TYPEDEF_(0x80090018L)
+#define NTE_KEYSET_NOT_DEF _HRESULT_TYPEDEF_(0x80090019L)
+#define NTE_KEYSET_ENTRY_BAD _HRESULT_TYPEDEF_(0x8009001AL)
+#define NTE_PROV_TYPE_NO_MATCH _HRESULT_TYPEDEF_(0x8009001BL)
+#define NTE_SIGNATURE_FILE_BAD _HRESULT_TYPEDEF_(0x8009001CL)
+#define NTE_PROVIDER_DLL_FAIL _HRESULT_TYPEDEF_(0x8009001DL)
+#define NTE_PROV_DLL_NOT_FOUND _HRESULT_TYPEDEF_(0x8009001EL)
+#define NTE_BAD_KEYSET_PARAM _HRESULT_TYPEDEF_(0x8009001FL)
+#define NTE_FAIL _HRESULT_TYPEDEF_(0x80090020L)
+#define NTE_SYS_ERR _HRESULT_TYPEDEF_(0x80090021L)
+#define NTE_SILENT_CONTEXT _HRESULT_TYPEDEF_(0x80090022L)
+#define NTE_TOKEN_KEYSET_STORAGE_FULL _HRESULT_TYPEDEF_(0x80090023L)
+#define NTE_TEMPORARY_PROFILE _HRESULT_TYPEDEF_(0x80090024L)
+#define NTE_FIXEDPARAMETER _HRESULT_TYPEDEF_(0x80090025L)
+#define SEC_E_INSUFFICIENT_MEMORY _HRESULT_TYPEDEF_(0x80090300L)
+#define SEC_E_INVALID_HANDLE _HRESULT_TYPEDEF_(0x80090301L)
+#define SEC_E_UNSUPPORTED_FUNCTION _HRESULT_TYPEDEF_(0x80090302L)
+#define SEC_E_TARGET_UNKNOWN _HRESULT_TYPEDEF_(0x80090303L)
+#define SEC_E_INTERNAL_ERROR _HRESULT_TYPEDEF_(0x80090304L)
+#define SEC_E_SECPKG_NOT_FOUND _HRESULT_TYPEDEF_(0x80090305L)
+#define SEC_E_NOT_OWNER _HRESULT_TYPEDEF_(0x80090306L)
+#define SEC_E_CANNOT_INSTALL _HRESULT_TYPEDEF_(0x80090307L)
+#define SEC_E_INVALID_TOKEN _HRESULT_TYPEDEF_(0x80090308L)
+#define SEC_E_CANNOT_PACK _HRESULT_TYPEDEF_(0x80090309L)
+#define SEC_E_QOP_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8009030AL)
+#define SEC_E_NO_IMPERSONATION _HRESULT_TYPEDEF_(0x8009030BL)
+#define SEC_E_LOGON_DENIED _HRESULT_TYPEDEF_(0x8009030CL)
+#define SEC_E_UNKNOWN_CREDENTIALS _HRESULT_TYPEDEF_(0x8009030DL)
+#define SEC_E_NO_CREDENTIALS _HRESULT_TYPEDEF_(0x8009030EL)
+#define SEC_E_MESSAGE_ALTERED _HRESULT_TYPEDEF_(0x8009030FL)
+#define SEC_E_OUT_OF_SEQUENCE _HRESULT_TYPEDEF_(0x80090310L)
+#define SEC_E_NO_AUTHENTICATING_AUTHORITY _HRESULT_TYPEDEF_(0x80090311L)
+#define SEC_I_CONTINUE_NEEDED _HRESULT_TYPEDEF_(0x00090312L)
+#define SEC_I_COMPLETE_NEEDED _HRESULT_TYPEDEF_(0x00090313L)
+#define SEC_I_COMPLETE_AND_CONTINUE _HRESULT_TYPEDEF_(0x00090314L)
+#define SEC_I_LOCAL_LOGON _HRESULT_TYPEDEF_(0x00090315L)
+#define SEC_E_BAD_PKGID _HRESULT_TYPEDEF_(0x80090316L)
+#define SEC_E_CONTEXT_EXPIRED _HRESULT_TYPEDEF_(0x80090317L)
+#define SEC_I_CONTEXT_EXPIRED _HRESULT_TYPEDEF_(0x00090317L)
+#define SEC_E_INCOMPLETE_MESSAGE _HRESULT_TYPEDEF_(0x80090318L)
+#define SEC_E_INCOMPLETE_CREDENTIALS _HRESULT_TYPEDEF_(0x80090320L)
+#define SEC_E_BUFFER_TOO_SMALL _HRESULT_TYPEDEF_(0x80090321L)
+#define SEC_I_INCOMPLETE_CREDENTIALS _HRESULT_TYPEDEF_(0x00090320L)
+#define SEC_I_RENEGOTIATE _HRESULT_TYPEDEF_(0x00090321L)
+#define SEC_E_WRONG_PRINCIPAL _HRESULT_TYPEDEF_(0x80090322L)
+#define SEC_I_NO_LSA_CONTEXT _HRESULT_TYPEDEF_(0x00090323L)
+#define SEC_E_TIME_SKEW _HRESULT_TYPEDEF_(0x80090324L)
+#define SEC_E_UNTRUSTED_ROOT _HRESULT_TYPEDEF_(0x80090325L)
+#define SEC_E_ILLEGAL_MESSAGE _HRESULT_TYPEDEF_(0x80090326L)
+#define SEC_E_CERT_UNKNOWN _HRESULT_TYPEDEF_(0x80090327L)
+#define SEC_E_CERT_EXPIRED _HRESULT_TYPEDEF_(0x80090328L)
+#define SEC_E_ENCRYPT_FAILURE _HRESULT_TYPEDEF_(0x80090329L)
+#define SEC_E_DECRYPT_FAILURE _HRESULT_TYPEDEF_(0x80090330L)
+#define SEC_E_ALGORITHM_MISMATCH _HRESULT_TYPEDEF_(0x80090331L)
+#define SEC_E_SECURITY_QOS_FAILED _HRESULT_TYPEDEF_(0x80090332L)
+#define SEC_E_UNFINISHED_CONTEXT_DELETED _HRESULT_TYPEDEF_(0x80090333L)
+#define SEC_E_NO_TGT_REPLY _HRESULT_TYPEDEF_(0x80090334L)
+#define SEC_E_NO_IP_ADDRESSES _HRESULT_TYPEDEF_(0x80090335L)
+#define SEC_E_WRONG_CREDENTIAL_HANDLE _HRESULT_TYPEDEF_(0x80090336L)
+#define SEC_E_CRYPTO_SYSTEM_INVALID _HRESULT_TYPEDEF_(0x80090337L)
+#define SEC_E_MAX_REFERRALS_EXCEEDED _HRESULT_TYPEDEF_(0x80090338L)
+#define SEC_E_MUST_BE_KDC _HRESULT_TYPEDEF_(0x80090339L)
+#define SEC_E_STRONG_CRYPTO_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8009033AL)
+#define SEC_E_TOO_MANY_PRINCIPALS _HRESULT_TYPEDEF_(0x8009033BL)
+#define SEC_E_NO_PA_DATA _HRESULT_TYPEDEF_(0x8009033CL)
+#define SEC_E_PKINIT_NAME_MISMATCH _HRESULT_TYPEDEF_(0x8009033DL)
+#define SEC_E_SMARTCARD_LOGON_REQUIRED _HRESULT_TYPEDEF_(0x8009033EL)
+#define SEC_E_SHUTDOWN_IN_PROGRESS _HRESULT_TYPEDEF_(0x8009033FL)
+#define SEC_E_KDC_INVALID_REQUEST _HRESULT_TYPEDEF_(0x80090340L)
+#define SEC_E_KDC_UNABLE_TO_REFER _HRESULT_TYPEDEF_(0x80090341L)
+#define SEC_E_KDC_UNKNOWN_ETYPE _HRESULT_TYPEDEF_(0x80090342L)
+#define SEC_E_UNSUPPORTED_PREAUTH _HRESULT_TYPEDEF_(0x80090343L)
+#define SEC_E_DELEGATION_REQUIRED _HRESULT_TYPEDEF_(0x80090345L)
+#define SEC_E_BAD_BINDINGS _HRESULT_TYPEDEF_(0x80090346L)
+#define SEC_E_MULTIPLE_ACCOUNTS _HRESULT_TYPEDEF_(0x80090347L)
+#define SEC_E_NO_KERB_KEY _HRESULT_TYPEDEF_(0x80090348L)
+#define SEC_E_CERT_WRONG_USAGE _HRESULT_TYPEDEF_(0x80090349L)
+#define SEC_E_DOWNGRADE_DETECTED _HRESULT_TYPEDEF_(0x80090350L)
+#define SEC_E_SMARTCARD_CERT_REVOKED _HRESULT_TYPEDEF_(0x80090351L)
+#define SEC_E_ISSUING_CA_UNTRUSTED _HRESULT_TYPEDEF_(0x80090352L)
+#define SEC_E_REVOCATION_OFFLINE_C _HRESULT_TYPEDEF_(0x80090353L)
+#define SEC_E_PKINIT_CLIENT_FAILURE _HRESULT_TYPEDEF_(0x80090354L)
+#define SEC_E_SMARTCARD_CERT_EXPIRED _HRESULT_TYPEDEF_(0x80090355L)
+#define SEC_E_NO_S4U_PROT_SUPPORT _HRESULT_TYPEDEF_(0x80090356L)
+#define SEC_E_CROSSREALM_DELEGATION_FAILURE _HRESULT_TYPEDEF_(0x80090357L)
+#define SEC_E_REVOCATION_OFFLINE_KDC _HRESULT_TYPEDEF_(0x80090358L)
+#define SEC_E_ISSUING_CA_UNTRUSTED_KDC _HRESULT_TYPEDEF_(0x80090359L)
+#define SEC_E_KDC_CERT_EXPIRED _HRESULT_TYPEDEF_(0x8009035AL)
+#define SEC_E_KDC_CERT_REVOKED _HRESULT_TYPEDEF_(0x8009035BL)
+#define SEC_E_NO_SPM SEC_E_INTERNAL_ERROR
+#define SEC_E_NOT_SUPPORTED SEC_E_UNSUPPORTED_FUNCTION
+#define CRYPT_E_MSG_ERROR _HRESULT_TYPEDEF_(0x80091001L)
+#define CRYPT_E_UNKNOWN_ALGO _HRESULT_TYPEDEF_(0x80091002L)
+#define CRYPT_E_OID_FORMAT _HRESULT_TYPEDEF_(0x80091003L)
+#define CRYPT_E_INVALID_MSG_TYPE _HRESULT_TYPEDEF_(0x80091004L)
+#define CRYPT_E_UNEXPECTED_ENCODING _HRESULT_TYPEDEF_(0x80091005L)
+#define CRYPT_E_AUTH_ATTR_MISSING _HRESULT_TYPEDEF_(0x80091006L)
+#define CRYPT_E_HASH_VALUE _HRESULT_TYPEDEF_(0x80091007L)
+#define CRYPT_E_INVALID_INDEX _HRESULT_TYPEDEF_(0x80091008L)
+#define CRYPT_E_ALREADY_DECRYPTED _HRESULT_TYPEDEF_(0x80091009L)
+#define CRYPT_E_NOT_DECRYPTED _HRESULT_TYPEDEF_(0x8009100AL)
+#define CRYPT_E_RECIPIENT_NOT_FOUND _HRESULT_TYPEDEF_(0x8009100BL)
+#define CRYPT_E_CONTROL_TYPE _HRESULT_TYPEDEF_(0x8009100CL)
+#define CRYPT_E_ISSUER_SERIALNUMBER _HRESULT_TYPEDEF_(0x8009100DL)
+#define CRYPT_E_SIGNER_NOT_FOUND _HRESULT_TYPEDEF_(0x8009100EL)
+#define CRYPT_E_ATTRIBUTES_MISSING _HRESULT_TYPEDEF_(0x8009100FL)
+#define CRYPT_E_STREAM_MSG_NOT_READY _HRESULT_TYPEDEF_(0x80091010L)
+#define CRYPT_E_STREAM_INSUFFICIENT_DATA _HRESULT_TYPEDEF_(0x80091011L)
+#define CRYPT_I_NEW_PROTECTION_REQUIRED _HRESULT_TYPEDEF_(0x00091012L)
+#define CRYPT_E_BAD_LEN _HRESULT_TYPEDEF_(0x80092001L)
+#define CRYPT_E_BAD_ENCODE _HRESULT_TYPEDEF_(0x80092002L)
+#define CRYPT_E_FILE_ERROR _HRESULT_TYPEDEF_(0x80092003L)
+#define CRYPT_E_NOT_FOUND _HRESULT_TYPEDEF_(0x80092004L)
+#define CRYPT_E_EXISTS _HRESULT_TYPEDEF_(0x80092005L)
+#define CRYPT_E_NO_PROVIDER _HRESULT_TYPEDEF_(0x80092006L)
+#define CRYPT_E_SELF_SIGNED _HRESULT_TYPEDEF_(0x80092007L)
+#define CRYPT_E_DELETED_PREV _HRESULT_TYPEDEF_(0x80092008L)
+#define CRYPT_E_NO_MATCH _HRESULT_TYPEDEF_(0x80092009L)
+#define CRYPT_E_UNEXPECTED_MSG_TYPE _HRESULT_TYPEDEF_(0x8009200AL)
+#define CRYPT_E_NO_KEY_PROPERTY _HRESULT_TYPEDEF_(0x8009200BL)
+#define CRYPT_E_NO_DECRYPT_CERT _HRESULT_TYPEDEF_(0x8009200CL)
+#define CRYPT_E_BAD_MSG _HRESULT_TYPEDEF_(0x8009200DL)
+#define CRYPT_E_NO_SIGNER _HRESULT_TYPEDEF_(0x8009200EL)
+#define CRYPT_E_PENDING_CLOSE _HRESULT_TYPEDEF_(0x8009200FL)
+#define CRYPT_E_REVOKED _HRESULT_TYPEDEF_(0x80092010L)
+#define CRYPT_E_NO_REVOCATION_DLL _HRESULT_TYPEDEF_(0x80092011L)
+#define CRYPT_E_NO_REVOCATION_CHECK _HRESULT_TYPEDEF_(0x80092012L)
+#define CRYPT_E_REVOCATION_OFFLINE _HRESULT_TYPEDEF_(0x80092013L)
+#define CRYPT_E_NOT_IN_REVOCATION_DATABASE _HRESULT_TYPEDEF_(0x80092014L)
+#define CRYPT_E_INVALID_NUMERIC_STRING _HRESULT_TYPEDEF_(0x80092020L)
+#define CRYPT_E_INVALID_PRINTABLE_STRING _HRESULT_TYPEDEF_(0x80092021L)
+#define CRYPT_E_INVALID_IA5_STRING _HRESULT_TYPEDEF_(0x80092022L)
+#define CRYPT_E_INVALID_X500_STRING _HRESULT_TYPEDEF_(0x80092023L)
+#define CRYPT_E_NOT_CHAR_STRING _HRESULT_TYPEDEF_(0x80092024L)
+#define CRYPT_E_FILERESIZED _HRESULT_TYPEDEF_(0x80092025L)
+#define CRYPT_E_SECURITY_SETTINGS _HRESULT_TYPEDEF_(0x80092026L)
+#define CRYPT_E_NO_VERIFY_USAGE_DLL _HRESULT_TYPEDEF_(0x80092027L)
+#define CRYPT_E_NO_VERIFY_USAGE_CHECK _HRESULT_TYPEDEF_(0x80092028L)
+#define CRYPT_E_VERIFY_USAGE_OFFLINE _HRESULT_TYPEDEF_(0x80092029L)
+#define CRYPT_E_NOT_IN_CTL _HRESULT_TYPEDEF_(0x8009202AL)
+#define CRYPT_E_NO_TRUSTED_SIGNER _HRESULT_TYPEDEF_(0x8009202BL)
+#define CRYPT_E_MISSING_PUBKEY_PARA _HRESULT_TYPEDEF_(0x8009202CL)
+#define CRYPT_E_OSS_ERROR _HRESULT_TYPEDEF_(0x80093000L)
+#define OSS_MORE_BUF _HRESULT_TYPEDEF_(0x80093001L)
+#define OSS_NEGATIVE_UINTEGER _HRESULT_TYPEDEF_(0x80093002L)
+#define OSS_PDU_RANGE _HRESULT_TYPEDEF_(0x80093003L)
+#define OSS_MORE_INPUT _HRESULT_TYPEDEF_(0x80093004L)
+#define OSS_DATA_ERROR _HRESULT_TYPEDEF_(0x80093005L)
+#define OSS_BAD_ARG _HRESULT_TYPEDEF_(0x80093006L)
+#define OSS_BAD_VERSION _HRESULT_TYPEDEF_(0x80093007L)
+#define OSS_OUT_MEMORY _HRESULT_TYPEDEF_(0x80093008L)
+#define OSS_PDU_MISMATCH _HRESULT_TYPEDEF_(0x80093009L)
+#define OSS_LIMITED _HRESULT_TYPEDEF_(0x8009300AL)
+#define OSS_BAD_PTR _HRESULT_TYPEDEF_(0x8009300BL)
+#define OSS_BAD_TIME _HRESULT_TYPEDEF_(0x8009300CL)
+#define OSS_INDEFINITE_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8009300DL)
+#define OSS_MEM_ERROR _HRESULT_TYPEDEF_(0x8009300EL)
+#define OSS_BAD_TABLE _HRESULT_TYPEDEF_(0x8009300FL)
+#define OSS_TOO_LONG _HRESULT_TYPEDEF_(0x80093010L)
+#define OSS_CONSTRAINT_VIOLATED _HRESULT_TYPEDEF_(0x80093011L)
+#define OSS_FATAL_ERROR _HRESULT_TYPEDEF_(0x80093012L)
+#define OSS_ACCESS_SERIALIZATION_ERROR _HRESULT_TYPEDEF_(0x80093013L)
+#define OSS_NULL_TBL _HRESULT_TYPEDEF_(0x80093014L)
+#define OSS_NULL_FCN _HRESULT_TYPEDEF_(0x80093015L)
+#define OSS_BAD_ENCRULES _HRESULT_TYPEDEF_(0x80093016L)
+#define OSS_UNAVAIL_ENCRULES _HRESULT_TYPEDEF_(0x80093017L)
+#define OSS_CANT_OPEN_TRACE_WINDOW _HRESULT_TYPEDEF_(0x80093018L)
+#define OSS_UNIMPLEMENTED _HRESULT_TYPEDEF_(0x80093019L)
+#define OSS_OID_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x8009301AL)
+#define OSS_CANT_OPEN_TRACE_FILE _HRESULT_TYPEDEF_(0x8009301BL)
+#define OSS_TRACE_FILE_ALREADY_OPEN _HRESULT_TYPEDEF_(0x8009301CL)
+#define OSS_TABLE_MISMATCH _HRESULT_TYPEDEF_(0x8009301DL)
+#define OSS_TYPE_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x8009301EL)
+#define OSS_REAL_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x8009301FL)
+#define OSS_REAL_CODE_NOT_LINKED _HRESULT_TYPEDEF_(0x80093020L)
+#define OSS_OUT_OF_RANGE _HRESULT_TYPEDEF_(0x80093021L)
+#define OSS_COPIER_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093022L)
+#define OSS_CONSTRAINT_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093023L)
+#define OSS_COMPARATOR_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093024L)
+#define OSS_COMPARATOR_CODE_NOT_LINKED _HRESULT_TYPEDEF_(0x80093025L)
+#define OSS_MEM_MGR_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093026L)
+#define OSS_PDV_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093027L)
+#define OSS_PDV_CODE_NOT_LINKED _HRESULT_TYPEDEF_(0x80093028L)
+#define OSS_API_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x80093029L)
+#define OSS_BERDER_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x8009302AL)
+#define OSS_PER_DLL_NOT_LINKED _HRESULT_TYPEDEF_(0x8009302BL)
+#define OSS_OPEN_TYPE_ERROR _HRESULT_TYPEDEF_(0x8009302CL)
+#define OSS_MUTEX_NOT_CREATED _HRESULT_TYPEDEF_(0x8009302DL)
+#define OSS_CANT_CLOSE_TRACE_FILE _HRESULT_TYPEDEF_(0x8009302EL)
+#define CRYPT_E_ASN1_ERROR _HRESULT_TYPEDEF_(0x80093100L)
+#define CRYPT_E_ASN1_INTERNAL _HRESULT_TYPEDEF_(0x80093101L)
+#define CRYPT_E_ASN1_EOD _HRESULT_TYPEDEF_(0x80093102L)
+#define CRYPT_E_ASN1_CORRUPT _HRESULT_TYPEDEF_(0x80093103L)
+#define CRYPT_E_ASN1_LARGE _HRESULT_TYPEDEF_(0x80093104L)
+#define CRYPT_E_ASN1_CONSTRAINT _HRESULT_TYPEDEF_(0x80093105L)
+#define CRYPT_E_ASN1_MEMORY _HRESULT_TYPEDEF_(0x80093106L)
+#define CRYPT_E_ASN1_OVERFLOW _HRESULT_TYPEDEF_(0x80093107L)
+#define CRYPT_E_ASN1_BADPDU _HRESULT_TYPEDEF_(0x80093108L)
+#define CRYPT_E_ASN1_BADARGS _HRESULT_TYPEDEF_(0x80093109L)
+#define CRYPT_E_ASN1_BADREAL _HRESULT_TYPEDEF_(0x8009310AL)
+#define CRYPT_E_ASN1_BADTAG _HRESULT_TYPEDEF_(0x8009310BL)
+#define CRYPT_E_ASN1_CHOICE _HRESULT_TYPEDEF_(0x8009310CL)
+#define CRYPT_E_ASN1_RULE _HRESULT_TYPEDEF_(0x8009310DL)
+#define CRYPT_E_ASN1_UTF8 _HRESULT_TYPEDEF_(0x8009310EL)
+#define CRYPT_E_ASN1_PDU_TYPE _HRESULT_TYPEDEF_(0x80093133L)
+#define CRYPT_E_ASN1_NYI _HRESULT_TYPEDEF_(0x80093134L)
+#define CRYPT_E_ASN1_EXTENDED _HRESULT_TYPEDEF_(0x80093201L)
+#define CRYPT_E_ASN1_NOEOD _HRESULT_TYPEDEF_(0x80093202L)
+#define CERTSRV_E_BAD_REQUESTSUBJECT _HRESULT_TYPEDEF_(0x80094001L)
+#define CERTSRV_E_NO_REQUEST _HRESULT_TYPEDEF_(0x80094002L)
+#define CERTSRV_E_BAD_REQUESTSTATUS _HRESULT_TYPEDEF_(0x80094003L)
+#define CERTSRV_E_PROPERTY_EMPTY _HRESULT_TYPEDEF_(0x80094004L)
+#define CERTSRV_E_INVALID_CA_CERTIFICATE _HRESULT_TYPEDEF_(0x80094005L)
+#define CERTSRV_E_SERVER_SUSPENDED _HRESULT_TYPEDEF_(0x80094006L)
+#define CERTSRV_E_ENCODING_LENGTH _HRESULT_TYPEDEF_(0x80094007L)
+#define CERTSRV_E_ROLECONFLICT _HRESULT_TYPEDEF_(0x80094008L)
+#define CERTSRV_E_RESTRICTEDOFFICER _HRESULT_TYPEDEF_(0x80094009L)
+#define CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED _HRESULT_TYPEDEF_(0x8009400AL)
+#define CERTSRV_E_NO_VALID_KRA _HRESULT_TYPEDEF_(0x8009400BL)
+#define CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL _HRESULT_TYPEDEF_(0x8009400CL)
+#define CERTSRV_E_NO_CAADMIN_DEFINED _HRESULT_TYPEDEF_(0x8009400DL)
+#define CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE _HRESULT_TYPEDEF_(0x8009400EL)
+#define CERTSRV_E_NO_DB_SESSIONS _HRESULT_TYPEDEF_(0x8009400FL)
+#define CERTSRV_E_ALIGNMENT_FAULT _HRESULT_TYPEDEF_(0x80094010L)
+#define CERTSRV_E_ENROLL_DENIED _HRESULT_TYPEDEF_(0x80094011L)
+#define CERTSRV_E_TEMPLATE_DENIED _HRESULT_TYPEDEF_(0x80094012L)
+#define CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE _HRESULT_TYPEDEF_(0x80094013L)
+#define CERTSRV_E_UNSUPPORTED_CERT_TYPE _HRESULT_TYPEDEF_(0x80094800L)
+#define CERTSRV_E_NO_CERT_TYPE _HRESULT_TYPEDEF_(0x80094801L)
+#define CERTSRV_E_TEMPLATE_CONFLICT _HRESULT_TYPEDEF_(0x80094802L)
+#define CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED _HRESULT_TYPEDEF_(0x80094803L)
+#define CERTSRV_E_ARCHIVED_KEY_REQUIRED _HRESULT_TYPEDEF_(0x80094804L)
+#define CERTSRV_E_SMIME_REQUIRED _HRESULT_TYPEDEF_(0x80094805L)
+#define CERTSRV_E_BAD_RENEWAL_SUBJECT _HRESULT_TYPEDEF_(0x80094806L)
+#define CERTSRV_E_BAD_TEMPLATE_VERSION _HRESULT_TYPEDEF_(0x80094807L)
+#define CERTSRV_E_TEMPLATE_POLICY_REQUIRED _HRESULT_TYPEDEF_(0x80094808L)
+#define CERTSRV_E_SIGNATURE_POLICY_REQUIRED _HRESULT_TYPEDEF_(0x80094809L)
+#define CERTSRV_E_SIGNATURE_COUNT _HRESULT_TYPEDEF_(0x8009480AL)
+#define CERTSRV_E_SIGNATURE_REJECTED _HRESULT_TYPEDEF_(0x8009480BL)
+#define CERTSRV_E_ISSUANCE_POLICY_REQUIRED _HRESULT_TYPEDEF_(0x8009480CL)
+#define CERTSRV_E_SUBJECT_UPN_REQUIRED _HRESULT_TYPEDEF_(0x8009480DL)
+#define CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED _HRESULT_TYPEDEF_(0x8009480EL)
+#define CERTSRV_E_SUBJECT_DNS_REQUIRED _HRESULT_TYPEDEF_(0x8009480FL)
+#define CERTSRV_E_ARCHIVED_KEY_UNEXPECTED _HRESULT_TYPEDEF_(0x80094810L)
+#define CERTSRV_E_KEY_LENGTH _HRESULT_TYPEDEF_(0x80094811L)
+#define CERTSRV_E_SUBJECT_EMAIL_REQUIRED _HRESULT_TYPEDEF_(0x80094812L)
+#define CERTSRV_E_UNKNOWN_CERT_TYPE _HRESULT_TYPEDEF_(0x80094813L)
+#define CERTSRV_E_CERT_TYPE_OVERLAP _HRESULT_TYPEDEF_(0x80094814L)
+#define XENROLL_E_KEY_NOT_EXPORTABLE _HRESULT_TYPEDEF_(0x80095000L)
+#define XENROLL_E_CANNOT_ADD_ROOT_CERT _HRESULT_TYPEDEF_(0x80095001L)
+#define XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND _HRESULT_TYPEDEF_(0x80095002L)
+#define XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH _HRESULT_TYPEDEF_(0x80095003L)
+#define XENROLL_E_RESPONSE_KA_HASH_MISMATCH _HRESULT_TYPEDEF_(0x80095004L)
+#define XENROLL_E_KEYSPEC_SMIME_MISMATCH _HRESULT_TYPEDEF_(0x80095005L)
+#define TRUST_E_SYSTEM_ERROR _HRESULT_TYPEDEF_(0x80096001L)
+#define TRUST_E_NO_SIGNER_CERT _HRESULT_TYPEDEF_(0x80096002L)
+#define TRUST_E_COUNTER_SIGNER _HRESULT_TYPEDEF_(0x80096003L)
+#define TRUST_E_CERT_SIGNATURE _HRESULT_TYPEDEF_(0x80096004L)
+#define TRUST_E_TIME_STAMP _HRESULT_TYPEDEF_(0x80096005L)
+#define TRUST_E_BAD_DIGEST _HRESULT_TYPEDEF_(0x80096010L)
+#define TRUST_E_BASIC_CONSTRAINTS _HRESULT_TYPEDEF_(0x80096019L)
+#define TRUST_E_FINANCIAL_CRITERIA _HRESULT_TYPEDEF_(0x8009601EL)
+#define MSSIPOTF_E_OUTOFMEMRANGE _HRESULT_TYPEDEF_(0x80097001L)
+#define MSSIPOTF_E_CANTGETOBJECT _HRESULT_TYPEDEF_(0x80097002L)
+#define MSSIPOTF_E_NOHEADTABLE _HRESULT_TYPEDEF_(0x80097003L)
+#define MSSIPOTF_E_BAD_MAGICNUMBER _HRESULT_TYPEDEF_(0x80097004L)
+#define MSSIPOTF_E_BAD_OFFSET_TABLE _HRESULT_TYPEDEF_(0x80097005L)
+#define MSSIPOTF_E_TABLE_TAGORDER _HRESULT_TYPEDEF_(0x80097006L)
+#define MSSIPOTF_E_TABLE_LONGWORD _HRESULT_TYPEDEF_(0x80097007L)
+#define MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT _HRESULT_TYPEDEF_(0x80097008L)
+#define MSSIPOTF_E_TABLES_OVERLAP _HRESULT_TYPEDEF_(0x80097009L)
+#define MSSIPOTF_E_TABLE_PADBYTES _HRESULT_TYPEDEF_(0x8009700AL)
+#define MSSIPOTF_E_FILETOOSMALL _HRESULT_TYPEDEF_(0x8009700BL)
+#define MSSIPOTF_E_TABLE_CHECKSUM _HRESULT_TYPEDEF_(0x8009700CL)
+#define MSSIPOTF_E_FILE_CHECKSUM _HRESULT_TYPEDEF_(0x8009700DL)
+#define MSSIPOTF_E_FAILED_POLICY _HRESULT_TYPEDEF_(0x80097010L)
+#define MSSIPOTF_E_FAILED_HINTS_CHECK _HRESULT_TYPEDEF_(0x80097011L)
+#define MSSIPOTF_E_NOT_OPENTYPE _HRESULT_TYPEDEF_(0x80097012L)
+#define MSSIPOTF_E_FILE _HRESULT_TYPEDEF_(0x80097013L)
+#define MSSIPOTF_E_CRYPT _HRESULT_TYPEDEF_(0x80097014L)
+#define MSSIPOTF_E_BADVERSION _HRESULT_TYPEDEF_(0x80097015L)
+#define MSSIPOTF_E_DSIG_STRUCTURE _HRESULT_TYPEDEF_(0x80097016L)
+#define MSSIPOTF_E_PCONST_CHECK _HRESULT_TYPEDEF_(0x80097017L)
+#define MSSIPOTF_E_STRUCTURE _HRESULT_TYPEDEF_(0x80097018L)
+#define NTE_OP_OK 0
+#define TRUST_E_PROVIDER_UNKNOWN _HRESULT_TYPEDEF_(0x800B0001L)
+#define TRUST_E_ACTION_UNKNOWN _HRESULT_TYPEDEF_(0x800B0002L)
+#define TRUST_E_SUBJECT_FORM_UNKNOWN _HRESULT_TYPEDEF_(0x800B0003L)
+#define TRUST_E_SUBJECT_NOT_TRUSTED _HRESULT_TYPEDEF_(0x800B0004L)
+#define DIGSIG_E_ENCODE _HRESULT_TYPEDEF_(0x800B0005L)
+#define DIGSIG_E_DECODE _HRESULT_TYPEDEF_(0x800B0006L)
+#define DIGSIG_E_EXTENSIBILITY _HRESULT_TYPEDEF_(0x800B0007L)
+#define DIGSIG_E_CRYPTO _HRESULT_TYPEDEF_(0x800B0008L)
+#define PERSIST_E_SIZEDEFINITE _HRESULT_TYPEDEF_(0x800B0009L)
+#define PERSIST_E_SIZEINDEFINITE _HRESULT_TYPEDEF_(0x800B000AL)
+#define PERSIST_E_NOTSELFSIZING _HRESULT_TYPEDEF_(0x800B000BL)
+#define TRUST_E_NOSIGNATURE _HRESULT_TYPEDEF_(0x800B0100L)
+#define CERT_E_EXPIRED _HRESULT_TYPEDEF_(0x800B0101L)
+#define CERT_E_VALIDITYPERIODNESTING _HRESULT_TYPEDEF_(0x800B0102L)
+#define CERT_E_ROLE _HRESULT_TYPEDEF_(0x800B0103L)
+#define CERT_E_PATHLENCONST _HRESULT_TYPEDEF_(0x800B0104L)
+#define CERT_E_CRITICAL _HRESULT_TYPEDEF_(0x800B0105L)
+#define CERT_E_PURPOSE _HRESULT_TYPEDEF_(0x800B0106L)
+#define CERT_E_ISSUERCHAINING _HRESULT_TYPEDEF_(0x800B0107L)
+#define CERT_E_MALFORMED _HRESULT_TYPEDEF_(0x800B0108L)
+#define CERT_E_UNTRUSTEDROOT _HRESULT_TYPEDEF_(0x800B0109L)
+#define CERT_E_CHAINING _HRESULT_TYPEDEF_(0x800B010AL)
+#define TRUST_E_FAIL _HRESULT_TYPEDEF_(0x800B010BL)
+#define CERT_E_REVOKED _HRESULT_TYPEDEF_(0x800B010CL)
+#define CERT_E_UNTRUSTEDTESTROOT _HRESULT_TYPEDEF_(0x800B010DL)
+#define CERT_E_REVOCATION_FAILURE _HRESULT_TYPEDEF_(0x800B010EL)
+#define CERT_E_CN_NO_MATCH _HRESULT_TYPEDEF_(0x800B010FL)
+#define CERT_E_WRONG_USAGE _HRESULT_TYPEDEF_(0x800B0110L)
+#define TRUST_E_EXPLICIT_DISTRUST _HRESULT_TYPEDEF_(0x800B0111L)
+#define CERT_E_UNTRUSTEDCA _HRESULT_TYPEDEF_(0x800B0112L)
+#define CERT_E_INVALID_POLICY _HRESULT_TYPEDEF_(0x800B0113L)
+#define CERT_E_INVALID_NAME _HRESULT_TYPEDEF_(0x800B0114L)
+#define HRESULT_FROM_SETUPAPI(x) ((((x) & (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR))==(APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR)) ? ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_SETUPAPI << 16) | 0x80000000)) : HRESULT_FROM_WIN32(x))
+#define SPAPI_E_EXPECTED_SECTION_NAME _HRESULT_TYPEDEF_(0x800F0000L)
+#define SPAPI_E_BAD_SECTION_NAME_LINE _HRESULT_TYPEDEF_(0x800F0001L)
+#define SPAPI_E_SECTION_NAME_TOO_LONG _HRESULT_TYPEDEF_(0x800F0002L)
+#define SPAPI_E_GENERAL_SYNTAX _HRESULT_TYPEDEF_(0x800F0003L)
+#define SPAPI_E_WRONG_INF_STYLE _HRESULT_TYPEDEF_(0x800F0100L)
+#define SPAPI_E_SECTION_NOT_FOUND _HRESULT_TYPEDEF_(0x800F0101L)
+#define SPAPI_E_LINE_NOT_FOUND _HRESULT_TYPEDEF_(0x800F0102L)
+#define SPAPI_E_NO_BACKUP _HRESULT_TYPEDEF_(0x800F0103L)
+#define SPAPI_E_NO_ASSOCIATED_CLASS _HRESULT_TYPEDEF_(0x800F0200L)
+#define SPAPI_E_CLASS_MISMATCH _HRESULT_TYPEDEF_(0x800F0201L)
+#define SPAPI_E_DUPLICATE_FOUND _HRESULT_TYPEDEF_(0x800F0202L)
+#define SPAPI_E_NO_DRIVER_SELECTED _HRESULT_TYPEDEF_(0x800F0203L)
+#define SPAPI_E_KEY_DOES_NOT_EXIST _HRESULT_TYPEDEF_(0x800F0204L)
+#define SPAPI_E_INVALID_DEVINST_NAME _HRESULT_TYPEDEF_(0x800F0205L)
+#define SPAPI_E_INVALID_CLASS _HRESULT_TYPEDEF_(0x800F0206L)
+#define SPAPI_E_DEVINST_ALREADY_EXISTS _HRESULT_TYPEDEF_(0x800F0207L)
+#define SPAPI_E_DEVINFO_NOT_REGISTERED _HRESULT_TYPEDEF_(0x800F0208L)
+#define SPAPI_E_INVALID_REG_PROPERTY _HRESULT_TYPEDEF_(0x800F0209L)
+#define SPAPI_E_NO_INF _HRESULT_TYPEDEF_(0x800F020AL)
+#define SPAPI_E_NO_SUCH_DEVINST _HRESULT_TYPEDEF_(0x800F020BL)
+#define SPAPI_E_CANT_LOAD_CLASS_ICON _HRESULT_TYPEDEF_(0x800F020CL)
+#define SPAPI_E_INVALID_CLASS_INSTALLER _HRESULT_TYPEDEF_(0x800F020DL)
+#define SPAPI_E_DI_DO_DEFAULT _HRESULT_TYPEDEF_(0x800F020EL)
+#define SPAPI_E_DI_NOFILECOPY _HRESULT_TYPEDEF_(0x800F020FL)
+#define SPAPI_E_INVALID_HWPROFILE _HRESULT_TYPEDEF_(0x800F0210L)
+#define SPAPI_E_NO_DEVICE_SELECTED _HRESULT_TYPEDEF_(0x800F0211L)
+#define SPAPI_E_DEVINFO_LIST_LOCKED _HRESULT_TYPEDEF_(0x800F0212L)
+#define SPAPI_E_DEVINFO_DATA_LOCKED _HRESULT_TYPEDEF_(0x800F0213L)
+#define SPAPI_E_DI_BAD_PATH _HRESULT_TYPEDEF_(0x800F0214L)
+#define SPAPI_E_NO_CLASSINSTALL_PARAMS _HRESULT_TYPEDEF_(0x800F0215L)
+#define SPAPI_E_FILEQUEUE_LOCKED _HRESULT_TYPEDEF_(0x800F0216L)
+#define SPAPI_E_BAD_SERVICE_INSTALLSECT _HRESULT_TYPEDEF_(0x800F0217L)
+#define SPAPI_E_NO_CLASS_DRIVER_LIST _HRESULT_TYPEDEF_(0x800F0218L)
+#define SPAPI_E_NO_ASSOCIATED_SERVICE _HRESULT_TYPEDEF_(0x800F0219L)
+#define SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE _HRESULT_TYPEDEF_(0x800F021AL)
+#define SPAPI_E_DEVICE_INTERFACE_ACTIVE _HRESULT_TYPEDEF_(0x800F021BL)
+#define SPAPI_E_DEVICE_INTERFACE_REMOVED _HRESULT_TYPEDEF_(0x800F021CL)
+#define SPAPI_E_BAD_INTERFACE_INSTALLSECT _HRESULT_TYPEDEF_(0x800F021DL)
+#define SPAPI_E_NO_SUCH_INTERFACE_CLASS _HRESULT_TYPEDEF_(0x800F021EL)
+#define SPAPI_E_INVALID_REFERENCE_STRING _HRESULT_TYPEDEF_(0x800F021FL)
+#define SPAPI_E_INVALID_MACHINENAME _HRESULT_TYPEDEF_(0x800F0220L)
+#define SPAPI_E_REMOTE_COMM_FAILURE _HRESULT_TYPEDEF_(0x800F0221L)
+#define SPAPI_E_MACHINE_UNAVAILABLE _HRESULT_TYPEDEF_(0x800F0222L)
+#define SPAPI_E_NO_CONFIGMGR_SERVICES _HRESULT_TYPEDEF_(0x800F0223L)
+#define SPAPI_E_INVALID_PROPPAGE_PROVIDER _HRESULT_TYPEDEF_(0x800F0224L)
+#define SPAPI_E_NO_SUCH_DEVICE_INTERFACE _HRESULT_TYPEDEF_(0x800F0225L)
+#define SPAPI_E_DI_POSTPROCESSING_REQUIRED _HRESULT_TYPEDEF_(0x800F0226L)
+#define SPAPI_E_INVALID_COINSTALLER _HRESULT_TYPEDEF_(0x800F0227L)
+#define SPAPI_E_NO_COMPAT_DRIVERS _HRESULT_TYPEDEF_(0x800F0228L)
+#define SPAPI_E_NO_DEVICE_ICON _HRESULT_TYPEDEF_(0x800F0229L)
+#define SPAPI_E_INVALID_INF_LOGCONFIG _HRESULT_TYPEDEF_(0x800F022AL)
+#define SPAPI_E_DI_DONT_INSTALL _HRESULT_TYPEDEF_(0x800F022BL)
+#define SPAPI_E_INVALID_FILTER_DRIVER _HRESULT_TYPEDEF_(0x800F022CL)
+#define SPAPI_E_NON_WINDOWS_NT_DRIVER _HRESULT_TYPEDEF_(0x800F022DL)
+#define SPAPI_E_NON_WINDOWS_DRIVER _HRESULT_TYPEDEF_(0x800F022EL)
+#define SPAPI_E_NO_CATALOG_FOR_OEM_INF _HRESULT_TYPEDEF_(0x800F022FL)
+#define SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE _HRESULT_TYPEDEF_(0x800F0230L)
+#define SPAPI_E_NOT_DISABLEABLE _HRESULT_TYPEDEF_(0x800F0231L)
+#define SPAPI_E_CANT_REMOVE_DEVINST _HRESULT_TYPEDEF_(0x800F0232L)
+#define SPAPI_E_INVALID_TARGET _HRESULT_TYPEDEF_(0x800F0233L)
+#define SPAPI_E_DRIVER_NONNATIVE _HRESULT_TYPEDEF_(0x800F0234L)
+#define SPAPI_E_IN_WOW64 _HRESULT_TYPEDEF_(0x800F0235L)
+#define SPAPI_E_SET_SYSTEM_RESTORE_POINT _HRESULT_TYPEDEF_(0x800F0236L)
+#define SPAPI_E_INCORRECTLY_COPIED_INF _HRESULT_TYPEDEF_(0x800F0237L)
+#define SPAPI_E_SCE_DISABLED _HRESULT_TYPEDEF_(0x800F0238L)
+#define SPAPI_E_UNKNOWN_EXCEPTION _HRESULT_TYPEDEF_(0x800F0239L)
+#define SPAPI_E_PNP_REGISTRY_ERROR _HRESULT_TYPEDEF_(0x800F023AL)
+#define SPAPI_E_REMOTE_REQUEST_UNSUPPORTED _HRESULT_TYPEDEF_(0x800F023BL)
+#define SPAPI_E_NOT_AN_INSTALLED_OEM_INF _HRESULT_TYPEDEF_(0x800F023CL)
+#define SPAPI_E_INF_IN_USE_BY_DEVICES _HRESULT_TYPEDEF_(0x800F023DL)
+#define SPAPI_E_DI_FUNCTION_OBSOLETE _HRESULT_TYPEDEF_(0x800F023EL)
+#define SPAPI_E_NO_AUTHENTICODE_CATALOG _HRESULT_TYPEDEF_(0x800F023FL)
+#define SPAPI_E_AUTHENTICODE_DISALLOWED _HRESULT_TYPEDEF_(0x800F0240L)
+#define SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER _HRESULT_TYPEDEF_(0x800F0241L)
+#define SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED _HRESULT_TYPEDEF_(0x800F0242L)
+#define SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED _HRESULT_TYPEDEF_(0x800F0243L)
+#define SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH _HRESULT_TYPEDEF_(0x800F0244L)
+#define SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE _HRESULT_TYPEDEF_(0x800F0245L)
+#define SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW _HRESULT_TYPEDEF_(0x800F0300L)
+#define SPAPI_E_ERROR_NOT_INSTALLED _HRESULT_TYPEDEF_(0x800F1000L)
+#define SCARD_S_SUCCESS NO_ERROR
+#define SCARD_F_INTERNAL_ERROR _HRESULT_TYPEDEF_(0x80100001L)
+#define SCARD_E_CANCELLED _HRESULT_TYPEDEF_(0x80100002L)
+#define SCARD_E_INVALID_HANDLE _HRESULT_TYPEDEF_(0x80100003L)
+#define SCARD_E_INVALID_PARAMETER _HRESULT_TYPEDEF_(0x80100004L)
+#define SCARD_E_INVALID_TARGET _HRESULT_TYPEDEF_(0x80100005L)
+#define SCARD_E_NO_MEMORY _HRESULT_TYPEDEF_(0x80100006L)
+#define SCARD_F_WAITED_TOO_LONG _HRESULT_TYPEDEF_(0x80100007L)
+#define SCARD_E_INSUFFICIENT_BUFFER _HRESULT_TYPEDEF_(0x80100008L)
+#define SCARD_E_UNKNOWN_READER _HRESULT_TYPEDEF_(0x80100009L)
+#define SCARD_E_TIMEOUT _HRESULT_TYPEDEF_(0x8010000AL)
+#define SCARD_E_SHARING_VIOLATION _HRESULT_TYPEDEF_(0x8010000BL)
+#define SCARD_E_NO_SMARTCARD _HRESULT_TYPEDEF_(0x8010000CL)
+#define SCARD_E_UNKNOWN_CARD _HRESULT_TYPEDEF_(0x8010000DL)
+#define SCARD_E_CANT_DISPOSE _HRESULT_TYPEDEF_(0x8010000EL)
+#define SCARD_E_PROTO_MISMATCH _HRESULT_TYPEDEF_(0x8010000FL)
+#define SCARD_E_NOT_READY _HRESULT_TYPEDEF_(0x80100010L)
+#define SCARD_E_INVALID_VALUE _HRESULT_TYPEDEF_(0x80100011L)
+#define SCARD_E_SYSTEM_CANCELLED _HRESULT_TYPEDEF_(0x80100012L)
+#define SCARD_F_COMM_ERROR _HRESULT_TYPEDEF_(0x80100013L)
+#define SCARD_F_UNKNOWN_ERROR _HRESULT_TYPEDEF_(0x80100014L)
+#define SCARD_E_INVALID_ATR _HRESULT_TYPEDEF_(0x80100015L)
+#define SCARD_E_NOT_TRANSACTED _HRESULT_TYPEDEF_(0x80100016L)
+#define SCARD_E_READER_UNAVAILABLE _HRESULT_TYPEDEF_(0x80100017L)
+#define SCARD_P_SHUTDOWN _HRESULT_TYPEDEF_(0x80100018L)
+#define SCARD_E_PCI_TOO_SMALL _HRESULT_TYPEDEF_(0x80100019L)
+#define SCARD_E_READER_UNSUPPORTED _HRESULT_TYPEDEF_(0x8010001AL)
+#define SCARD_E_DUPLICATE_READER _HRESULT_TYPEDEF_(0x8010001BL)
+#define SCARD_E_CARD_UNSUPPORTED _HRESULT_TYPEDEF_(0x8010001CL)
+#define SCARD_E_NO_SERVICE _HRESULT_TYPEDEF_(0x8010001DL)
+#define SCARD_E_SERVICE_STOPPED _HRESULT_TYPEDEF_(0x8010001EL)
+#define SCARD_E_UNEXPECTED _HRESULT_TYPEDEF_(0x8010001FL)
+#define SCARD_E_ICC_INSTALLATION _HRESULT_TYPEDEF_(0x80100020L)
+#define SCARD_E_ICC_CREATEORDER _HRESULT_TYPEDEF_(0x80100021L)
+#define SCARD_E_UNSUPPORTED_FEATURE _HRESULT_TYPEDEF_(0x80100022L)
+#define SCARD_E_DIR_NOT_FOUND _HRESULT_TYPEDEF_(0x80100023L)
+#define SCARD_E_FILE_NOT_FOUND _HRESULT_TYPEDEF_(0x80100024L)
+#define SCARD_E_NO_DIR _HRESULT_TYPEDEF_(0x80100025L)
+#define SCARD_E_NO_FILE _HRESULT_TYPEDEF_(0x80100026L)
+#define SCARD_E_NO_ACCESS _HRESULT_TYPEDEF_(0x80100027L)
+#define SCARD_E_WRITE_TOO_MANY _HRESULT_TYPEDEF_(0x80100028L)
+#define SCARD_E_BAD_SEEK _HRESULT_TYPEDEF_(0x80100029L)
+#define SCARD_E_INVALID_CHV _HRESULT_TYPEDEF_(0x8010002AL)
+#define SCARD_E_UNKNOWN_RES_MNG _HRESULT_TYPEDEF_(0x8010002BL)
+#define SCARD_E_NO_SUCH_CERTIFICATE _HRESULT_TYPEDEF_(0x8010002CL)
+#define SCARD_E_CERTIFICATE_UNAVAILABLE _HRESULT_TYPEDEF_(0x8010002DL)
+#define SCARD_E_NO_READERS_AVAILABLE _HRESULT_TYPEDEF_(0x8010002EL)
+#define SCARD_E_COMM_DATA_LOST _HRESULT_TYPEDEF_(0x8010002FL)
+#define SCARD_E_NO_KEY_CONTAINER _HRESULT_TYPEDEF_(0x80100030L)
+#define SCARD_E_SERVER_TOO_BUSY _HRESULT_TYPEDEF_(0x80100031L)
+#define SCARD_W_UNSUPPORTED_CARD _HRESULT_TYPEDEF_(0x80100065L)
+#define SCARD_W_UNRESPONSIVE_CARD _HRESULT_TYPEDEF_(0x80100066L)
+#define SCARD_W_UNPOWERED_CARD _HRESULT_TYPEDEF_(0x80100067L)
+#define SCARD_W_RESET_CARD _HRESULT_TYPEDEF_(0x80100068L)
+#define SCARD_W_REMOVED_CARD _HRESULT_TYPEDEF_(0x80100069L)
+#define SCARD_W_SECURITY_VIOLATION _HRESULT_TYPEDEF_(0x8010006AL)
+#define SCARD_W_WRONG_CHV _HRESULT_TYPEDEF_(0x8010006BL)
+#define SCARD_W_CHV_BLOCKED _HRESULT_TYPEDEF_(0x8010006CL)
+#define SCARD_W_EOF _HRESULT_TYPEDEF_(0x8010006DL)
+#define SCARD_W_CANCELLED_BY_USER _HRESULT_TYPEDEF_(0x8010006EL)
+#define SCARD_W_CARD_NOT_AUTHENTICATED _HRESULT_TYPEDEF_(0x8010006FL)
+#define COMADMIN_E_OBJECTERRORS _HRESULT_TYPEDEF_(0x80110401L)
+#define COMADMIN_E_OBJECTINVALID _HRESULT_TYPEDEF_(0x80110402L)
+#define COMADMIN_E_KEYMISSING _HRESULT_TYPEDEF_(0x80110403L)
+#define COMADMIN_E_ALREADYINSTALLED _HRESULT_TYPEDEF_(0x80110404L)
+#define COMADMIN_E_APP_FILE_WRITEFAIL _HRESULT_TYPEDEF_(0x80110407L)
+#define COMADMIN_E_APP_FILE_READFAIL _HRESULT_TYPEDEF_(0x80110408L)
+#define COMADMIN_E_APP_FILE_VERSION _HRESULT_TYPEDEF_(0x80110409L)
+#define COMADMIN_E_BADPATH _HRESULT_TYPEDEF_(0x8011040AL)
+#define COMADMIN_E_APPLICATIONEXISTS _HRESULT_TYPEDEF_(0x8011040BL)
+#define COMADMIN_E_ROLEEXISTS _HRESULT_TYPEDEF_(0x8011040CL)
+#define COMADMIN_E_CANTCOPYFILE _HRESULT_TYPEDEF_(0x8011040DL)
+#define COMADMIN_E_NOUSER _HRESULT_TYPEDEF_(0x8011040FL)
+#define COMADMIN_E_INVALIDUSERIDS _HRESULT_TYPEDEF_(0x80110410L)
+#define COMADMIN_E_NOREGISTRYCLSID _HRESULT_TYPEDEF_(0x80110411L)
+#define COMADMIN_E_BADREGISTRYPROGID _HRESULT_TYPEDEF_(0x80110412L)
+#define COMADMIN_E_AUTHENTICATIONLEVEL _HRESULT_TYPEDEF_(0x80110413L)
+#define COMADMIN_E_USERPASSWDNOTVALID _HRESULT_TYPEDEF_(0x80110414L)
+#define COMADMIN_E_CLSIDORIIDMISMATCH _HRESULT_TYPEDEF_(0x80110418L)
+#define COMADMIN_E_REMOTEINTERFACE _HRESULT_TYPEDEF_(0x80110419L)
+#define COMADMIN_E_DLLREGISTERSERVER _HRESULT_TYPEDEF_(0x8011041AL)
+#define COMADMIN_E_NOSERVERSHARE _HRESULT_TYPEDEF_(0x8011041BL)
+#define COMADMIN_E_DLLLOADFAILED _HRESULT_TYPEDEF_(0x8011041DL)
+#define COMADMIN_E_BADREGISTRYLIBID _HRESULT_TYPEDEF_(0x8011041EL)
+#define COMADMIN_E_APPDIRNOTFOUND _HRESULT_TYPEDEF_(0x8011041FL)
+#define COMADMIN_E_REGISTRARFAILED _HRESULT_TYPEDEF_(0x80110423L)
+#define COMADMIN_E_COMPFILE_DOESNOTEXIST _HRESULT_TYPEDEF_(0x80110424L)
+#define COMADMIN_E_COMPFILE_LOADDLLFAIL _HRESULT_TYPEDEF_(0x80110425L)
+#define COMADMIN_E_COMPFILE_GETCLASSOBJ _HRESULT_TYPEDEF_(0x80110426L)
+#define COMADMIN_E_COMPFILE_CLASSNOTAVAIL _HRESULT_TYPEDEF_(0x80110427L)
+#define COMADMIN_E_COMPFILE_BADTLB _HRESULT_TYPEDEF_(0x80110428L)
+#define COMADMIN_E_COMPFILE_NOTINSTALLABLE _HRESULT_TYPEDEF_(0x80110429L)
+#define COMADMIN_E_NOTCHANGEABLE _HRESULT_TYPEDEF_(0x8011042AL)
+#define COMADMIN_E_NOTDELETEABLE _HRESULT_TYPEDEF_(0x8011042BL)
+#define COMADMIN_E_SESSION _HRESULT_TYPEDEF_(0x8011042CL)
+#define COMADMIN_E_COMP_MOVE_LOCKED _HRESULT_TYPEDEF_(0x8011042DL)
+#define COMADMIN_E_COMP_MOVE_BAD_DEST _HRESULT_TYPEDEF_(0x8011042EL)
+#define COMADMIN_E_REGISTERTLB _HRESULT_TYPEDEF_(0x80110430L)
+#define COMADMIN_E_SYSTEMAPP _HRESULT_TYPEDEF_(0x80110433L)
+#define COMADMIN_E_COMPFILE_NOREGISTRAR _HRESULT_TYPEDEF_(0x80110434L)
+#define COMADMIN_E_COREQCOMPINSTALLED _HRESULT_TYPEDEF_(0x80110435L)
+#define COMADMIN_E_SERVICENOTINSTALLED _HRESULT_TYPEDEF_(0x80110436L)
+#define COMADMIN_E_PROPERTYSAVEFAILED _HRESULT_TYPEDEF_(0x80110437L)
+#define COMADMIN_E_OBJECTEXISTS _HRESULT_TYPEDEF_(0x80110438L)
+#define COMADMIN_E_COMPONENTEXISTS _HRESULT_TYPEDEF_(0x80110439L)
+#define COMADMIN_E_REGFILE_CORRUPT _HRESULT_TYPEDEF_(0x8011043BL)
+#define COMADMIN_E_PROPERTY_OVERFLOW _HRESULT_TYPEDEF_(0x8011043CL)
+#define COMADMIN_E_NOTINREGISTRY _HRESULT_TYPEDEF_(0x8011043EL)
+#define COMADMIN_E_OBJECTNOTPOOLABLE _HRESULT_TYPEDEF_(0x8011043FL)
+#define COMADMIN_E_APPLID_MATCHES_CLSID _HRESULT_TYPEDEF_(0x80110446L)
+#define COMADMIN_E_ROLE_DOES_NOT_EXIST _HRESULT_TYPEDEF_(0x80110447L)
+#define COMADMIN_E_START_APP_NEEDS_COMPONENTS _HRESULT_TYPEDEF_(0x80110448L)
+#define COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM _HRESULT_TYPEDEF_(0x80110449L)
+#define COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY _HRESULT_TYPEDEF_(0x8011044AL)
+#define COMADMIN_E_CAN_NOT_START_APP _HRESULT_TYPEDEF_(0x8011044BL)
+#define COMADMIN_E_CAN_NOT_EXPORT_SYS_APP _HRESULT_TYPEDEF_(0x8011044CL)
+#define COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT _HRESULT_TYPEDEF_(0x8011044DL)
+#define COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER _HRESULT_TYPEDEF_(0x8011044EL)
+#define COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE _HRESULT_TYPEDEF_(0x8011044FL)
+#define COMADMIN_E_BASE_PARTITION_ONLY _HRESULT_TYPEDEF_(0x80110450L)
+#define COMADMIN_E_START_APP_DISABLED _HRESULT_TYPEDEF_(0x80110451L)
+#define COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME _HRESULT_TYPEDEF_(0x80110457L)
+#define COMADMIN_E_CAT_INVALID_PARTITION_NAME _HRESULT_TYPEDEF_(0x80110458L)
+#define COMADMIN_E_CAT_PARTITION_IN_USE _HRESULT_TYPEDEF_(0x80110459L)
+#define COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES _HRESULT_TYPEDEF_(0x8011045AL)
+#define COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED _HRESULT_TYPEDEF_(0x8011045BL)
+#define COMADMIN_E_AMBIGUOUS_APPLICATION_NAME _HRESULT_TYPEDEF_(0x8011045CL)
+#define COMADMIN_E_AMBIGUOUS_PARTITION_NAME _HRESULT_TYPEDEF_(0x8011045DL)
+#define COMADMIN_E_REGDB_NOTINITIALIZED _HRESULT_TYPEDEF_(0x80110472L)
+#define COMADMIN_E_REGDB_NOTOPEN _HRESULT_TYPEDEF_(0x80110473L)
+#define COMADMIN_E_REGDB_SYSTEMERR _HRESULT_TYPEDEF_(0x80110474L)
+#define COMADMIN_E_REGDB_ALREADYRUNNING _HRESULT_TYPEDEF_(0x80110475L)
+#define COMADMIN_E_MIG_VERSIONNOTSUPPORTED _HRESULT_TYPEDEF_(0x80110480L)
+#define COMADMIN_E_MIG_SCHEMANOTFOUND _HRESULT_TYPEDEF_(0x80110481L)
+#define COMADMIN_E_CAT_BITNESSMISMATCH _HRESULT_TYPEDEF_(0x80110482L)
+#define COMADMIN_E_CAT_UNACCEPTABLEBITNESS _HRESULT_TYPEDEF_(0x80110483L)
+#define COMADMIN_E_CAT_WRONGAPPBITNESS _HRESULT_TYPEDEF_(0x80110484L)
+#define COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x80110485L)
+#define COMADMIN_E_CAT_SERVERFAULT _HRESULT_TYPEDEF_(0x80110486L)
+#define COMQC_E_APPLICATION_NOT_QUEUED _HRESULT_TYPEDEF_(0x80110600L)
+#define COMQC_E_NO_QUEUEABLE_INTERFACES _HRESULT_TYPEDEF_(0x80110601L)
+#define COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE _HRESULT_TYPEDEF_(0x80110602L)
+#define COMQC_E_NO_IPERSISTSTREAM _HRESULT_TYPEDEF_(0x80110603L)
+#define COMQC_E_BAD_MESSAGE _HRESULT_TYPEDEF_(0x80110604L)
+#define COMQC_E_UNAUTHENTICATED _HRESULT_TYPEDEF_(0x80110605L)
+#define COMQC_E_UNTRUSTED_ENQUEUER _HRESULT_TYPEDEF_(0x80110606L)
+#define MSDTC_E_DUPLICATE_RESOURCE _HRESULT_TYPEDEF_(0x80110701L)
+#define COMADMIN_E_OBJECT_PARENT_MISSING _HRESULT_TYPEDEF_(0x80110808L)
+#define COMADMIN_E_OBJECT_DOES_NOT_EXIST _HRESULT_TYPEDEF_(0x80110809L)
+#define COMADMIN_E_APP_NOT_RUNNING _HRESULT_TYPEDEF_(0x8011080AL)
+#define COMADMIN_E_INVALID_PARTITION _HRESULT_TYPEDEF_(0x8011080BL)
+#define COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE _HRESULT_TYPEDEF_(0x8011080DL)
+#define COMADMIN_E_USER_IN_SET _HRESULT_TYPEDEF_(0x8011080EL)
+#define COMADMIN_E_CANTRECYCLELIBRARYAPPS _HRESULT_TYPEDEF_(0x8011080FL)
+#define COMADMIN_E_CANTRECYCLESERVICEAPPS _HRESULT_TYPEDEF_(0x80110811L)
+#define COMADMIN_E_PROCESSALREADYRECYCLED _HRESULT_TYPEDEF_(0x80110812L)
+#define COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED _HRESULT_TYPEDEF_(0x80110813L)
+#define COMADMIN_E_CANTMAKEINPROCSERVICE _HRESULT_TYPEDEF_(0x80110814L)
+#define COMADMIN_E_PROGIDINUSEBYCLSID _HRESULT_TYPEDEF_(0x80110815L)
+#define COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET _HRESULT_TYPEDEF_(0x80110816L)
+#define COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED _HRESULT_TYPEDEF_(0x80110817L)
+#define COMADMIN_E_PARTITION_ACCESSDENIED _HRESULT_TYPEDEF_(0x80110818L)
+#define COMADMIN_E_PARTITION_MSI_ONLY _HRESULT_TYPEDEF_(0x80110819L)
+#define COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT _HRESULT_TYPEDEF_(0x8011081AL)
+#define COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS _HRESULT_TYPEDEF_(0x8011081BL)
+#define COMADMIN_E_COMP_MOVE_SOURCE _HRESULT_TYPEDEF_(0x8011081CL)
+#define COMADMIN_E_COMP_MOVE_DEST _HRESULT_TYPEDEF_(0x8011081DL)
+#define COMADMIN_E_COMP_MOVE_PRIVATE _HRESULT_TYPEDEF_(0x8011081EL)
+#define COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET _HRESULT_TYPEDEF_(0x8011081FL)
+#define COMADMIN_E_CANNOT_ALIAS_EVENTCLASS _HRESULT_TYPEDEF_(0x80110820L)
+#define COMADMIN_E_PRIVATE_ACCESSDENIED _HRESULT_TYPEDEF_(0x80110821L)
+#define COMADMIN_E_SAFERINVALID _HRESULT_TYPEDEF_(0x80110822L)
+#define COMADMIN_E_REGISTRY_ACCESSDENIED _HRESULT_TYPEDEF_(0x80110823L)
+#define COMADMIN_E_PARTITIONS_DISABLED _HRESULT_TYPEDEF_(0x80110824L)
+#endif /* _WINERROR_ */
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/wingdi.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/wingdi.h
new file mode 100644
index 00000000..63d38917
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/wingdi.h
@@ -0,0 +1,4080 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINGDI_
+#define _WINGDI_
+
+#define WINGDIAPI DECLSPEC_IMPORT
+#define WINSPOOLAPI DECLSPEC_IMPORT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0502
+#endif
+
+#ifndef NOGDI
+#ifndef NORASTEROPS
+#define R2_BLACK 1
+#define R2_NOTMERGEPEN 2
+#define R2_MASKNOTPEN 3
+#define R2_NOTCOPYPEN 4
+#define R2_MASKPENNOT 5
+#define R2_NOT 6
+#define R2_XORPEN 7
+#define R2_NOTMASKPEN 8
+#define R2_MASKPEN 9
+#define R2_NOTXORPEN 10
+#define R2_NOP 11
+#define R2_MERGENOTPEN 12
+#define R2_COPYPEN 13
+#define R2_MERGEPENNOT 14
+#define R2_MERGEPEN 15
+#define R2_WHITE 16
+#define R2_LAST 16
+
+#define SRCCOPY (DWORD)0x00CC0020
+#define SRCPAINT (DWORD)0x00EE0086
+#define SRCAND (DWORD)0x008800C6
+#define SRCINVERT (DWORD)0x00660046
+#define SRCERASE (DWORD)0x00440328
+#define NOTSRCCOPY (DWORD)0x00330008
+#define NOTSRCERASE (DWORD)0x001100A6
+#define MERGECOPY (DWORD)0x00C000CA
+#define MERGEPAINT (DWORD)0x00BB0226
+#define PATCOPY (DWORD)0x00F00021
+#define PATPAINT (DWORD)0x00FB0A09
+#define PATINVERT (DWORD)0x005A0049
+#define DSTINVERT (DWORD)0x00550009
+#define BLACKNESS (DWORD)0x00000042
+#define WHITENESS (DWORD)0x00FF0062
+#define NOMIRRORBITMAP (DWORD)0x80000000
+#define CAPTUREBLT (DWORD)0x40000000
+#define MAKEROP4(fore,back) (DWORD)((((back) << 8) & 0xFF000000) | (fore))
+#endif
+
+#define GDI_ERROR (0xFFFFFFFFL)
+#define HGDI_ERROR (LongToHandle(0xFFFFFFFFL))
+
+#define ERROR 0
+#define NULLREGION 1
+#define SIMPLEREGION 2
+#define COMPLEXREGION 3
+#define RGN_ERROR ERROR
+
+#define RGN_AND 1
+#define RGN_OR 2
+#define RGN_XOR 3
+#define RGN_DIFF 4
+#define RGN_COPY 5
+#define RGN_MIN RGN_AND
+#define RGN_MAX RGN_COPY
+
+#define BLACKONWHITE 1
+#define WHITEONBLACK 2
+#define COLORONCOLOR 3
+#define HALFTONE 4
+#define MAXSTRETCHBLTMODE 4
+
+#define STRETCH_ANDSCANS BLACKONWHITE
+#define STRETCH_ORSCANS WHITEONBLACK
+#define STRETCH_DELETESCANS COLORONCOLOR
+#define STRETCH_HALFTONE HALFTONE
+
+#define ALTERNATE 1
+#define WINDING 2
+#define POLYFILL_LAST 2
+
+#define LAYOUT_RTL 0x00000001
+#define LAYOUT_BTT 0x00000002
+#define LAYOUT_VBH 0x00000004
+#define LAYOUT_ORIENTATIONMASK (LAYOUT_RTL | LAYOUT_BTT | LAYOUT_VBH)
+#define LAYOUT_BITMAPORIENTATIONPRESERVED 0x00000008
+
+#define TA_NOUPDATECP 0
+#define TA_UPDATECP 1
+
+#define TA_LEFT 0
+#define TA_RIGHT 2
+#define TA_CENTER 6
+
+#define TA_TOP 0
+#define TA_BOTTOM 8
+#define TA_BASELINE 24
+#define TA_RTLREADING 256
+#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING)
+
+#define VTA_BASELINE TA_BASELINE
+#define VTA_LEFT TA_BOTTOM
+#define VTA_RIGHT TA_TOP
+#define VTA_CENTER TA_CENTER
+#define VTA_BOTTOM TA_RIGHT
+#define VTA_TOP TA_LEFT
+
+#define ETO_OPAQUE 0x0002
+#define ETO_CLIPPED 0x0004
+#define ETO_GLYPH_INDEX 0x0010
+#define ETO_RTLREADING 0x0080
+#define ETO_NUMERICSLOCAL 0x0400
+#define ETO_NUMERICSLATIN 0x0800
+#define ETO_IGNORELANGUAGE 0x1000
+#define ETO_PDY 0x2000
+
+#define ASPECT_FILTERING 0x0001
+
+#define DCB_RESET 0x0001
+#define DCB_ACCUMULATE 0x0002
+#define DCB_DIRTY DCB_ACCUMULATE
+#define DCB_SET (DCB_RESET | DCB_ACCUMULATE)
+#define DCB_ENABLE 0x0004
+#define DCB_DISABLE 0x0008
+
+#ifndef NOMETAFILE
+
+#define META_SETBKCOLOR 0x0201
+#define META_SETBKMODE 0x0102
+#define META_SETMAPMODE 0x0103
+#define META_SETROP2 0x0104
+#define META_SETRELABS 0x0105
+#define META_SETPOLYFILLMODE 0x0106
+#define META_SETSTRETCHBLTMODE 0x0107
+#define META_SETTEXTCHAREXTRA 0x0108
+#define META_SETTEXTCOLOR 0x0209
+#define META_SETTEXTJUSTIFICATION 0x020A
+#define META_SETWINDOWORG 0x020B
+#define META_SETWINDOWEXT 0x020C
+#define META_SETVIEWPORTORG 0x020D
+#define META_SETVIEWPORTEXT 0x020E
+#define META_OFFSETWINDOWORG 0x020F
+#define META_SCALEWINDOWEXT 0x0410
+#define META_OFFSETVIEWPORTORG 0x0211
+#define META_SCALEVIEWPORTEXT 0x0412
+#define META_LINETO 0x0213
+#define META_MOVETO 0x0214
+#define META_EXCLUDECLIPRECT 0x0415
+#define META_INTERSECTCLIPRECT 0x0416
+#define META_ARC 0x0817
+#define META_ELLIPSE 0x0418
+#define META_FLOODFILL 0x0419
+#define META_PIE 0x081A
+#define META_RECTANGLE 0x041B
+#define META_ROUNDRECT 0x061C
+#define META_PATBLT 0x061D
+#define META_SAVEDC 0x001E
+#define META_SETPIXEL 0x041F
+#define META_OFFSETCLIPRGN 0x0220
+#define META_TEXTOUT 0x0521
+#define META_BITBLT 0x0922
+#define META_STRETCHBLT 0x0B23
+#define META_POLYGON 0x0324
+#define META_POLYLINE 0x0325
+#define META_ESCAPE 0x0626
+#define META_RESTOREDC 0x0127
+#define META_FILLREGION 0x0228
+#define META_FRAMEREGION 0x0429
+#define META_INVERTREGION 0x012A
+#define META_PAINTREGION 0x012B
+#define META_SELECTCLIPREGION 0x012C
+#define META_SELECTOBJECT 0x012D
+#define META_SETTEXTALIGN 0x012E
+#define META_CHORD 0x0830
+#define META_SETMAPPERFLAGS 0x0231
+#define META_EXTTEXTOUT 0x0a32
+#define META_SETDIBTODEV 0x0d33
+#define META_SELECTPALETTE 0x0234
+#define META_REALIZEPALETTE 0x0035
+#define META_ANIMATEPALETTE 0x0436
+#define META_SETPALENTRIES 0x0037
+#define META_POLYPOLYGON 0x0538
+#define META_RESIZEPALETTE 0x0139
+#define META_DIBBITBLT 0x0940
+#define META_DIBSTRETCHBLT 0x0b41
+#define META_DIBCREATEPATTERNBRUSH 0x0142
+#define META_STRETCHDIB 0x0f43
+#define META_EXTFLOODFILL 0x0548
+#define META_SETLAYOUT 0x0149
+#define META_DELETEOBJECT 0x01f0
+#define META_CREATEPALETTE 0x00f7
+#define META_CREATEPATTERNBRUSH 0x01F9
+#define META_CREATEPENINDIRECT 0x02FA
+#define META_CREATEFONTINDIRECT 0x02FB
+#define META_CREATEBRUSHINDIRECT 0x02FC
+#define META_CREATEREGION 0x06FF
+
+ typedef struct _DRAWPATRECT {
+ POINT ptPosition;
+ POINT ptSize;
+ WORD wStyle;
+ WORD wPattern;
+ } DRAWPATRECT,*PDRAWPATRECT;
+#endif
+
+#define NEWFRAME 1
+#define ABORTDOC 2
+#define NEXTBAND 3
+#define SETCOLORTABLE 4
+#define GETCOLORTABLE 5
+#define FLUSHOUTPUT 6
+#define DRAFTMODE 7
+#define QUERYESCSUPPORT 8
+#define SETABORTPROC 9
+#define STARTDOC 10
+#define ENDDOC 11
+#define GETPHYSPAGESIZE 12
+#define GETPRINTINGOFFSET 13
+#define GETSCALINGFACTOR 14
+#define MFCOMMENT 15
+#define GETPENWIDTH 16
+#define SETCOPYCOUNT 17
+#define SELECTPAPERSOURCE 18
+#define DEVICEDATA 19
+#define PASSTHROUGH 19
+#define GETTECHNOLGY 20
+#define GETTECHNOLOGY 20
+#define SETLINECAP 21
+#define SETLINEJOIN 22
+#define SETMITERLIMIT 23
+#define BANDINFO 24
+#define DRAWPATTERNRECT 25
+#define GETVECTORPENSIZE 26
+#define GETVECTORBRUSHSIZE 27
+#define ENABLEDUPLEX 28
+#define GETSETPAPERBINS 29
+#define GETSETPRINTORIENT 30
+#define ENUMPAPERBINS 31
+#define SETDIBSCALING 32
+#define EPSPRINTING 33
+#define ENUMPAPERMETRICS 34
+#define GETSETPAPERMETRICS 35
+#define POSTSCRIPT_DATA 37
+#define POSTSCRIPT_IGNORE 38
+#define MOUSETRAILS 39
+#define GETDEVICEUNITS 42
+
+#define GETEXTENDEDTEXTMETRICS 256
+#define GETEXTENTTABLE 257
+#define GETPAIRKERNTABLE 258
+#define GETTRACKKERNTABLE 259
+#define EXTTEXTOUT 512
+#define GETFACENAME 513
+#define DOWNLOADFACE 514
+#define ENABLERELATIVEWIDTHS 768
+#define ENABLEPAIRKERNING 769
+#define SETKERNTRACK 770
+#define SETALLJUSTVALUES 771
+#define SETCHARSET 772
+
+#define STRETCHBLT 2048
+#define METAFILE_DRIVER 2049
+#define GETSETSCREENPARAMS 3072
+#define QUERYDIBSUPPORT 3073
+#define BEGIN_PATH 4096
+#define CLIP_TO_PATH 4097
+#define END_PATH 4098
+#define EXT_DEVICE_CAPS 4099
+#define RESTORE_CTM 4100
+#define SAVE_CTM 4101
+#define SET_ARC_DIRECTION 4102
+#define SET_BACKGROUND_COLOR 4103
+#define SET_POLY_MODE 4104
+#define SET_SCREEN_ANGLE 4105
+#define SET_SPREAD 4106
+#define TRANSFORM_CTM 4107
+#define SET_CLIP_BOX 4108
+#define SET_BOUNDS 4109
+#define SET_MIRROR_MODE 4110
+#define OPENCHANNEL 4110
+#define DOWNLOADHEADER 4111
+#define CLOSECHANNEL 4112
+#define POSTSCRIPT_PASSTHROUGH 4115
+#define ENCAPSULATED_POSTSCRIPT 4116
+
+#define POSTSCRIPT_IDENTIFY 4117
+#define POSTSCRIPT_INJECTION 4118
+
+#define CHECKJPEGFORMAT 4119
+#define CHECKPNGFORMAT 4120
+
+#define GET_PS_FEATURESETTING 4121
+
+#define SPCLPASSTHROUGH2 4568
+
+#define PSIDENT_GDICENTRIC 0
+#define PSIDENT_PSCENTRIC 1
+
+ typedef struct _PSINJECTDATA {
+ DWORD DataBytes;
+ WORD InjectionPoint;
+ WORD PageNumber;
+ } PSINJECTDATA,*PPSINJECTDATA;
+
+#define PSINJECT_BEGINSTREAM 1
+#define PSINJECT_PSADOBE 2
+#define PSINJECT_PAGESATEND 3
+#define PSINJECT_PAGES 4
+
+#define PSINJECT_DOCNEEDEDRES 5
+#define PSINJECT_DOCSUPPLIEDRES 6
+#define PSINJECT_PAGEORDER 7
+#define PSINJECT_ORIENTATION 8
+#define PSINJECT_BOUNDINGBOX 9
+#define PSINJECT_DOCUMENTPROCESSCOLORS 10
+
+#define PSINJECT_COMMENTS 11
+#define PSINJECT_BEGINDEFAULTS 12
+#define PSINJECT_ENDDEFAULTS 13
+#define PSINJECT_BEGINPROLOG 14
+#define PSINJECT_ENDPROLOG 15
+#define PSINJECT_BEGINSETUP 16
+#define PSINJECT_ENDSETUP 17
+#define PSINJECT_TRAILER 18
+#define PSINJECT_EOF 19
+#define PSINJECT_ENDSTREAM 20
+#define PSINJECT_DOCUMENTPROCESSCOLORSATEND 21
+
+#define PSINJECT_PAGENUMBER 100
+#define PSINJECT_BEGINPAGESETUP 101
+#define PSINJECT_ENDPAGESETUP 102
+#define PSINJECT_PAGETRAILER 103
+#define PSINJECT_PLATECOLOR 104
+
+#define PSINJECT_SHOWPAGE 105
+#define PSINJECT_PAGEBBOX 106
+#define PSINJECT_ENDPAGECOMMENTS 107
+
+#define PSINJECT_VMSAVE 200
+#define PSINJECT_VMRESTORE 201
+
+#define FEATURESETTING_NUP 0
+#define FEATURESETTING_OUTPUT 1
+#define FEATURESETTING_PSLEVEL 2
+#define FEATURESETTING_CUSTPAPER 3
+#define FEATURESETTING_MIRROR 4
+#define FEATURESETTING_NEGATIVE 5
+#define FEATURESETTING_PROTOCOL 6
+
+#define FEATURESETTING_PRIVATE_BEGIN 0x1000
+#define FEATURESETTING_PRIVATE_END 0x1FFF
+
+ typedef struct _PSFEATURE_OUTPUT {
+ WINBOOL bPageIndependent;
+ WINBOOL bSetPageDevice;
+ } PSFEATURE_OUTPUT,*PPSFEATURE_OUTPUT;
+
+ typedef struct _PSFEATURE_CUSTPAPER {
+ LONG lOrientation;
+ LONG lWidth;
+ LONG lHeight;
+ LONG lWidthOffset;
+ LONG lHeightOffset;
+ } PSFEATURE_CUSTPAPER,*PPSFEATURE_CUSTPAPER;
+
+#define PSPROTOCOL_ASCII 0
+#define PSPROTOCOL_BCP 1
+#define PSPROTOCOL_TBCP 2
+#define PSPROTOCOL_BINARY 3
+
+#define QDI_SETDIBITS 1
+#define QDI_GETDIBITS 2
+#define QDI_DIBTOSCREEN 4
+#define QDI_STRETCHDIB 8
+
+#define SP_NOTREPORTED 0x4000
+#define SP_ERROR (-1)
+#define SP_APPABORT (-2)
+#define SP_USERABORT (-3)
+#define SP_OUTOFDISK (-4)
+#define SP_OUTOFMEMORY (-5)
+
+#define PR_JOBSTATUS 0x0000
+
+#define OBJ_PEN 1
+#define OBJ_BRUSH 2
+#define OBJ_DC 3
+#define OBJ_METADC 4
+#define OBJ_PAL 5
+#define OBJ_FONT 6
+#define OBJ_BITMAP 7
+#define OBJ_REGION 8
+#define OBJ_METAFILE 9
+#define OBJ_MEMDC 10
+#define OBJ_EXTPEN 11
+#define OBJ_ENHMETADC 12
+#define OBJ_ENHMETAFILE 13
+#define OBJ_COLORSPACE 14
+
+#define MWT_IDENTITY 1
+#define MWT_LEFTMULTIPLY 2
+#define MWT_RIGHTMULTIPLY 3
+
+#define MWT_MIN MWT_IDENTITY
+#define MWT_MAX MWT_RIGHTMULTIPLY
+
+#define _XFORM_
+ typedef struct tagXFORM {
+ FLOAT eM11;
+ FLOAT eM12;
+ FLOAT eM21;
+ FLOAT eM22;
+ FLOAT eDx;
+ FLOAT eDy;
+ } XFORM,*PXFORM,*LPXFORM;
+
+ typedef struct tagBITMAP {
+ LONG bmType;
+ LONG bmWidth;
+ LONG bmHeight;
+ LONG bmWidthBytes;
+ WORD bmPlanes;
+ WORD bmBitsPixel;
+ LPVOID bmBits;
+ } BITMAP,*PBITMAP,*NPBITMAP,*LPBITMAP;
+
+#include
+ typedef struct tagRGBTRIPLE {
+ BYTE rgbtBlue;
+ BYTE rgbtGreen;
+ BYTE rgbtRed;
+ } RGBTRIPLE;
+#include
+
+ typedef struct tagRGBQUAD {
+ BYTE rgbBlue;
+ BYTE rgbGreen;
+ BYTE rgbRed;
+ BYTE rgbReserved;
+ } RGBQUAD;
+ typedef RGBQUAD *LPRGBQUAD;
+
+#define CS_ENABLE 0x00000001L
+#define CS_DISABLE 0x00000002L
+#define CS_DELETE_TRANSFORM 0x00000003L
+
+//!__TINYC__: #define LCS_SIGNATURE 'PSOC'
+//!__TINYC__: #define LCS_sRGB 'sRGB'
+//!__TINYC__: #define LCS_WINDOWS_COLOR_SPACE 'Win '
+
+ typedef LONG LCSCSTYPE;
+#define LCS_CALIBRATED_RGB 0x00000000L
+
+ typedef LONG LCSGAMUTMATCH;
+#define LCS_GM_BUSINESS 0x00000001L
+#define LCS_GM_GRAPHICS 0x00000002L
+#define LCS_GM_IMAGES 0x00000004L
+#define LCS_GM_ABS_COLORIMETRIC 0x00000008L
+
+#define CM_OUT_OF_GAMUT 255
+#define CM_IN_GAMUT 0
+
+#define ICM_ADDPROFILE 1
+#define ICM_DELETEPROFILE 2
+#define ICM_QUERYPROFILE 3
+#define ICM_SETDEFAULTPROFILE 4
+#define ICM_REGISTERICMATCHER 5
+#define ICM_UNREGISTERICMATCHER 6
+#define ICM_QUERYMATCH 7
+
+#define GetKValue(cmyk) ((BYTE)(cmyk))
+#define GetYValue(cmyk) ((BYTE)((cmyk)>> 8))
+#define GetMValue(cmyk) ((BYTE)((cmyk)>>16))
+#define GetCValue(cmyk) ((BYTE)((cmyk)>>24))
+
+#define CMYK(c,m,y,k) ((COLORREF)((((BYTE)(k)|((WORD)((BYTE)(y))<<8))|(((DWORD)(BYTE)(m))<<16))|(((DWORD)(BYTE)(c))<<24)))
+
+ typedef long FXPT16DOT16,*LPFXPT16DOT16;
+ typedef long FXPT2DOT30,*LPFXPT2DOT30;
+
+ typedef struct tagCIEXYZ {
+ FXPT2DOT30 ciexyzX;
+ FXPT2DOT30 ciexyzY;
+ FXPT2DOT30 ciexyzZ;
+ } CIEXYZ;
+ typedef CIEXYZ *LPCIEXYZ;
+
+ typedef struct tagICEXYZTRIPLE {
+ CIEXYZ ciexyzRed;
+ CIEXYZ ciexyzGreen;
+ CIEXYZ ciexyzBlue;
+ } CIEXYZTRIPLE;
+
+ typedef CIEXYZTRIPLE *LPCIEXYZTRIPLE;
+
+ typedef struct tagLOGCOLORSPACEA {
+ DWORD lcsSignature;
+ DWORD lcsVersion;
+ DWORD lcsSize;
+ LCSCSTYPE lcsCSType;
+ LCSGAMUTMATCH lcsIntent;
+ CIEXYZTRIPLE lcsEndpoints;
+ DWORD lcsGammaRed;
+ DWORD lcsGammaGreen;
+ DWORD lcsGammaBlue;
+ CHAR lcsFilename[MAX_PATH];
+ } LOGCOLORSPACEA,*LPLOGCOLORSPACEA;
+
+ typedef struct tagLOGCOLORSPACEW {
+ DWORD lcsSignature;
+ DWORD lcsVersion;
+ DWORD lcsSize;
+ LCSCSTYPE lcsCSType;
+ LCSGAMUTMATCH lcsIntent;
+ CIEXYZTRIPLE lcsEndpoints;
+ DWORD lcsGammaRed;
+ DWORD lcsGammaGreen;
+ DWORD lcsGammaBlue;
+ WCHAR lcsFilename[MAX_PATH];
+ } LOGCOLORSPACEW,*LPLOGCOLORSPACEW;
+
+#ifdef UNICODE
+ typedef LOGCOLORSPACEW LOGCOLORSPACE;
+ typedef LPLOGCOLORSPACEW LPLOGCOLORSPACE;
+#else
+ typedef LOGCOLORSPACEA LOGCOLORSPACE;
+ typedef LPLOGCOLORSPACEA LPLOGCOLORSPACE;
+#endif
+
+ typedef struct tagBITMAPCOREHEADER {
+ DWORD bcSize;
+ WORD bcWidth;
+ WORD bcHeight;
+ WORD bcPlanes;
+ WORD bcBitCount;
+ } BITMAPCOREHEADER,*LPBITMAPCOREHEADER,*PBITMAPCOREHEADER;
+
+ typedef struct tagBITMAPINFOHEADER {
+ DWORD biSize;
+ LONG biWidth;
+ LONG biHeight;
+ WORD biPlanes;
+ WORD biBitCount;
+ DWORD biCompression;
+ DWORD biSizeImage;
+ LONG biXPelsPerMeter;
+ LONG biYPelsPerMeter;
+ DWORD biClrUsed;
+ DWORD biClrImportant;
+ } BITMAPINFOHEADER,*LPBITMAPINFOHEADER,*PBITMAPINFOHEADER;
+
+ typedef struct {
+ DWORD bV4Size;
+ LONG bV4Width;
+ LONG bV4Height;
+ WORD bV4Planes;
+ WORD bV4BitCount;
+ DWORD bV4V4Compression;
+ DWORD bV4SizeImage;
+ LONG bV4XPelsPerMeter;
+ LONG bV4YPelsPerMeter;
+ DWORD bV4ClrUsed;
+ DWORD bV4ClrImportant;
+ DWORD bV4RedMask;
+ DWORD bV4GreenMask;
+ DWORD bV4BlueMask;
+ DWORD bV4AlphaMask;
+ DWORD bV4CSType;
+ CIEXYZTRIPLE bV4Endpoints;
+ DWORD bV4GammaRed;
+ DWORD bV4GammaGreen;
+ DWORD bV4GammaBlue;
+ } BITMAPV4HEADER,*LPBITMAPV4HEADER,*PBITMAPV4HEADER;
+
+ typedef struct {
+ DWORD bV5Size;
+ LONG bV5Width;
+ LONG bV5Height;
+ WORD bV5Planes;
+ WORD bV5BitCount;
+ DWORD bV5Compression;
+ DWORD bV5SizeImage;
+ LONG bV5XPelsPerMeter;
+ LONG bV5YPelsPerMeter;
+ DWORD bV5ClrUsed;
+ DWORD bV5ClrImportant;
+ DWORD bV5RedMask;
+ DWORD bV5GreenMask;
+ DWORD bV5BlueMask;
+ DWORD bV5AlphaMask;
+ DWORD bV5CSType;
+ CIEXYZTRIPLE bV5Endpoints;
+ DWORD bV5GammaRed;
+ DWORD bV5GammaGreen;
+ DWORD bV5GammaBlue;
+ DWORD bV5Intent;
+ DWORD bV5ProfileData;
+ DWORD bV5ProfileSize;
+ DWORD bV5Reserved;
+ } BITMAPV5HEADER,*LPBITMAPV5HEADER,*PBITMAPV5HEADER;
+
+//!__TINYC__: #define PROFILE_LINKED 'LINK'
+//!__TINYC__: #define PROFILE_EMBEDDED 'MBED'
+
+#define BI_RGB 0L
+#define BI_RLE8 1L
+#define BI_RLE4 2L
+#define BI_BITFIELDS 3L
+#define BI_JPEG 4L
+#define BI_PNG 5L
+
+ typedef struct tagBITMAPINFO {
+ BITMAPINFOHEADER bmiHeader;
+ RGBQUAD bmiColors[1];
+ } BITMAPINFO,*LPBITMAPINFO,*PBITMAPINFO;
+
+ typedef struct tagBITMAPCOREINFO {
+ BITMAPCOREHEADER bmciHeader;
+ RGBTRIPLE bmciColors[1];
+ } BITMAPCOREINFO,*LPBITMAPCOREINFO,*PBITMAPCOREINFO;
+
+#include
+ typedef struct tagBITMAPFILEHEADER {
+ WORD bfType;
+ DWORD bfSize;
+ WORD bfReserved1;
+ WORD bfReserved2;
+ DWORD bfOffBits;
+ } BITMAPFILEHEADER,*LPBITMAPFILEHEADER,*PBITMAPFILEHEADER;
+#include
+
+#define MAKEPOINTS(l) (*((POINTS *)&(l)))
+
+#ifndef NOFONTSIG
+ typedef struct tagFONTSIGNATURE {
+ DWORD fsUsb[4];
+ DWORD fsCsb[2];
+ } FONTSIGNATURE,*PFONTSIGNATURE,*LPFONTSIGNATURE;
+
+ typedef struct tagCHARSETINFO {
+ UINT ciCharset;
+ UINT ciACP;
+ FONTSIGNATURE fs;
+ } CHARSETINFO,*PCHARSETINFO,*NPCHARSETINFO,*LPCHARSETINFO;
+
+#define TCI_SRCCHARSET 1
+#define TCI_SRCCODEPAGE 2
+#define TCI_SRCFONTSIG 3
+#define TCI_SRCLOCALE 0x1000
+
+ typedef struct tagLOCALESIGNATURE {
+ DWORD lsUsb[4];
+ DWORD lsCsbDefault[2];
+ DWORD lsCsbSupported[2];
+ } LOCALESIGNATURE,*PLOCALESIGNATURE,*LPLOCALESIGNATURE;
+#endif
+
+
+#ifndef NOMETAFILE
+ typedef struct tagHANDLETABLE {
+ HGDIOBJ objectHandle[1];
+ } HANDLETABLE,*PHANDLETABLE,*LPHANDLETABLE;
+
+ typedef struct tagMETARECORD {
+ DWORD rdSize;
+ WORD rdFunction;
+ WORD rdParm[1];
+ } METARECORD;
+ typedef struct tagMETARECORD UNALIGNED *PMETARECORD;
+ typedef struct tagMETARECORD UNALIGNED *LPMETARECORD;
+
+ typedef struct tagMETAFILEPICT {
+ LONG mm;
+ LONG xExt;
+ LONG yExt;
+ HMETAFILE hMF;
+ } METAFILEPICT,*LPMETAFILEPICT;
+
+#include
+ typedef struct tagMETAHEADER {
+ WORD mtType;
+ WORD mtHeaderSize;
+ WORD mtVersion;
+ DWORD mtSize;
+ WORD mtNoObjects;
+ DWORD mtMaxRecord;
+ WORD mtNoParameters;
+ } METAHEADER;
+ typedef struct tagMETAHEADER UNALIGNED *PMETAHEADER;
+ typedef struct tagMETAHEADER UNALIGNED *LPMETAHEADER;
+
+#include
+
+ typedef struct tagENHMETARECORD {
+ DWORD iType;
+ DWORD nSize;
+ DWORD dParm[1];
+ } ENHMETARECORD,*PENHMETARECORD,*LPENHMETARECORD;
+
+ typedef struct tagENHMETAHEADER {
+ DWORD iType;
+ DWORD nSize;
+ RECTL rclBounds;
+ RECTL rclFrame;
+ DWORD dSignature;
+ DWORD nVersion;
+ DWORD nBytes;
+ DWORD nRecords;
+ WORD nHandles;
+ WORD sReserved;
+ DWORD nDescription;
+ DWORD offDescription;
+ DWORD nPalEntries;
+ SIZEL szlDevice;
+ SIZEL szlMillimeters;
+ DWORD cbPixelFormat;
+ DWORD offPixelFormat;
+ DWORD bOpenGL;
+ SIZEL szlMicrometers;
+ } ENHMETAHEADER,*PENHMETAHEADER,*LPENHMETAHEADER;
+#endif
+
+#ifndef NOTEXTMETRIC
+#define TMPF_FIXED_PITCH 0x01
+#define TMPF_VECTOR 0x02
+#define TMPF_DEVICE 0x08
+#define TMPF_TRUETYPE 0x04
+
+#ifdef UNICODE
+ typedef WCHAR BCHAR;
+#else
+ typedef BYTE BCHAR;
+#endif
+
+#ifndef _TEXTMETRIC_DEFINED
+#define _TEXTMETRIC_DEFINED
+ typedef struct tagTEXTMETRICA {
+ LONG tmHeight;
+ LONG tmAscent;
+ LONG tmDescent;
+ LONG tmInternalLeading;
+ LONG tmExternalLeading;
+ LONG tmAveCharWidth;
+ LONG tmMaxCharWidth;
+ LONG tmWeight;
+ LONG tmOverhang;
+ LONG tmDigitizedAspectX;
+ LONG tmDigitizedAspectY;
+ BYTE tmFirstChar;
+ BYTE tmLastChar;
+ BYTE tmDefaultChar;
+ BYTE tmBreakChar;
+ BYTE tmItalic;
+ BYTE tmUnderlined;
+ BYTE tmStruckOut;
+ BYTE tmPitchAndFamily;
+ BYTE tmCharSet;
+ } TEXTMETRICA,*PTEXTMETRICA,*NPTEXTMETRICA,*LPTEXTMETRICA;
+
+ typedef struct tagTEXTMETRICW {
+ LONG tmHeight;
+ LONG tmAscent;
+ LONG tmDescent;
+ LONG tmInternalLeading;
+ LONG tmExternalLeading;
+ LONG tmAveCharWidth;
+ LONG tmMaxCharWidth;
+ LONG tmWeight;
+ LONG tmOverhang;
+ LONG tmDigitizedAspectX;
+ LONG tmDigitizedAspectY;
+ WCHAR tmFirstChar;
+ WCHAR tmLastChar;
+ WCHAR tmDefaultChar;
+ WCHAR tmBreakChar;
+ BYTE tmItalic;
+ BYTE tmUnderlined;
+ BYTE tmStruckOut;
+ BYTE tmPitchAndFamily;
+ BYTE tmCharSet;
+ } TEXTMETRICW,*PTEXTMETRICW,*NPTEXTMETRICW,*LPTEXTMETRICW;
+#ifdef UNICODE
+ typedef TEXTMETRICW TEXTMETRIC;
+ typedef PTEXTMETRICW PTEXTMETRIC;
+ typedef NPTEXTMETRICW NPTEXTMETRIC;
+ typedef LPTEXTMETRICW LPTEXTMETRIC;
+#else
+ typedef TEXTMETRICA TEXTMETRIC;
+ typedef PTEXTMETRICA PTEXTMETRIC;
+ typedef NPTEXTMETRICA NPTEXTMETRIC;
+ typedef LPTEXTMETRICA LPTEXTMETRIC;
+#endif
+#endif
+
+#define NTM_REGULAR 0x00000040L
+#define NTM_BOLD 0x00000020L
+#define NTM_ITALIC 0x00000001L
+
+#define NTM_NONNEGATIVE_AC 0x00010000
+#define NTM_PS_OPENTYPE 0x00020000
+#define NTM_TT_OPENTYPE 0x00040000
+#define NTM_MULTIPLEMASTER 0x00080000
+#define NTM_TYPE1 0x00100000
+#define NTM_DSIG 0x00200000
+
+#include
+ typedef struct tagNEWTEXTMETRICA {
+ LONG tmHeight;
+ LONG tmAscent;
+ LONG tmDescent;
+ LONG tmInternalLeading;
+ LONG tmExternalLeading;
+ LONG tmAveCharWidth;
+ LONG tmMaxCharWidth;
+ LONG tmWeight;
+ LONG tmOverhang;
+ LONG tmDigitizedAspectX;
+ LONG tmDigitizedAspectY;
+ BYTE tmFirstChar;
+ BYTE tmLastChar;
+ BYTE tmDefaultChar;
+ BYTE tmBreakChar;
+ BYTE tmItalic;
+ BYTE tmUnderlined;
+ BYTE tmStruckOut;
+ BYTE tmPitchAndFamily;
+ BYTE tmCharSet;
+ DWORD ntmFlags;
+ UINT ntmSizeEM;
+ UINT ntmCellHeight;
+ UINT ntmAvgWidth;
+ } NEWTEXTMETRICA,*PNEWTEXTMETRICA,*NPNEWTEXTMETRICA,*LPNEWTEXTMETRICA;
+
+ typedef struct tagNEWTEXTMETRICW {
+ LONG tmHeight;
+ LONG tmAscent;
+ LONG tmDescent;
+ LONG tmInternalLeading;
+ LONG tmExternalLeading;
+ LONG tmAveCharWidth;
+ LONG tmMaxCharWidth;
+ LONG tmWeight;
+ LONG tmOverhang;
+ LONG tmDigitizedAspectX;
+ LONG tmDigitizedAspectY;
+ WCHAR tmFirstChar;
+ WCHAR tmLastChar;
+ WCHAR tmDefaultChar;
+ WCHAR tmBreakChar;
+ BYTE tmItalic;
+ BYTE tmUnderlined;
+ BYTE tmStruckOut;
+ BYTE tmPitchAndFamily;
+ BYTE tmCharSet;
+ DWORD ntmFlags;
+ UINT ntmSizeEM;
+ UINT ntmCellHeight;
+ UINT ntmAvgWidth;
+ } NEWTEXTMETRICW,*PNEWTEXTMETRICW,*NPNEWTEXTMETRICW,*LPNEWTEXTMETRICW;
+#ifdef UNICODE
+ typedef NEWTEXTMETRICW NEWTEXTMETRIC;
+ typedef PNEWTEXTMETRICW PNEWTEXTMETRIC;
+ typedef NPNEWTEXTMETRICW NPNEWTEXTMETRIC;
+ typedef LPNEWTEXTMETRICW LPNEWTEXTMETRIC;
+#else
+ typedef NEWTEXTMETRICA NEWTEXTMETRIC;
+ typedef PNEWTEXTMETRICA PNEWTEXTMETRIC;
+ typedef NPNEWTEXTMETRICA NPNEWTEXTMETRIC;
+ typedef LPNEWTEXTMETRICA LPNEWTEXTMETRIC;
+#endif
+#include
+
+ typedef struct tagNEWTEXTMETRICEXA {
+ NEWTEXTMETRICA ntmTm;
+ FONTSIGNATURE ntmFontSig;
+ } NEWTEXTMETRICEXA;
+
+ typedef struct tagNEWTEXTMETRICEXW {
+ NEWTEXTMETRICW ntmTm;
+ FONTSIGNATURE ntmFontSig;
+ } NEWTEXTMETRICEXW;
+#ifdef UNICODE
+ typedef NEWTEXTMETRICEXW NEWTEXTMETRICEX;
+#else
+ typedef NEWTEXTMETRICEXA NEWTEXTMETRICEX;
+#endif
+#endif
+
+ typedef struct tagPELARRAY {
+ LONG paXCount;
+ LONG paYCount;
+ LONG paXExt;
+ LONG paYExt;
+ BYTE paRGBs;
+ } PELARRAY,*PPELARRAY,*NPPELARRAY,*LPPELARRAY;
+
+ typedef struct tagLOGBRUSH {
+ UINT lbStyle;
+ COLORREF lbColor;
+ ULONG_PTR lbHatch;
+ } LOGBRUSH,*PLOGBRUSH,*NPLOGBRUSH,*LPLOGBRUSH;
+
+ typedef struct tagLOGBRUSH32 {
+ UINT lbStyle;
+ COLORREF lbColor;
+ ULONG lbHatch;
+ } LOGBRUSH32,*PLOGBRUSH32,*NPLOGBRUSH32,*LPLOGBRUSH32;
+
+ typedef LOGBRUSH PATTERN;
+ typedef PATTERN *PPATTERN;
+ typedef PATTERN *NPPATTERN;
+ typedef PATTERN *LPPATTERN;
+
+ typedef struct tagLOGPEN {
+ UINT lopnStyle;
+ POINT lopnWidth;
+ COLORREF lopnColor;
+ } LOGPEN,*PLOGPEN,*NPLOGPEN,*LPLOGPEN;
+
+ typedef struct tagEXTLOGPEN {
+ DWORD elpPenStyle;
+ DWORD elpWidth;
+ UINT elpBrushStyle;
+ COLORREF elpColor;
+ ULONG_PTR elpHatch;
+ DWORD elpNumEntries;
+ DWORD elpStyleEntry[1];
+ } EXTLOGPEN,*PEXTLOGPEN,*NPEXTLOGPEN,*LPEXTLOGPEN;
+
+#ifndef _PALETTEENTRY_DEFINED
+#define _PALETTEENTRY_DEFINED
+ typedef struct tagPALETTEENTRY {
+ BYTE peRed;
+ BYTE peGreen;
+ BYTE peBlue;
+ BYTE peFlags;
+ } PALETTEENTRY,*PPALETTEENTRY,*LPPALETTEENTRY;
+#endif
+
+#ifndef _LOGPALETTE_DEFINED
+#define _LOGPALETTE_DEFINED
+
+ typedef struct tagLOGPALETTE {
+ WORD palVersion;
+ WORD palNumEntries;
+ PALETTEENTRY palPalEntry[1];
+ } LOGPALETTE,*PLOGPALETTE,*NPLOGPALETTE,*LPLOGPALETTE;
+#endif
+
+#define LF_FACESIZE 32
+
+ typedef struct tagLOGFONTA {
+ LONG lfHeight;
+ LONG lfWidth;
+ LONG lfEscapement;
+ LONG lfOrientation;
+ LONG lfWeight;
+ BYTE lfItalic;
+ BYTE lfUnderline;
+ BYTE lfStrikeOut;
+ BYTE lfCharSet;
+ BYTE lfOutPrecision;
+ BYTE lfClipPrecision;
+ BYTE lfQuality;
+ BYTE lfPitchAndFamily;
+ CHAR lfFaceName[LF_FACESIZE];
+ } LOGFONTA,*PLOGFONTA,*NPLOGFONTA,*LPLOGFONTA;
+
+ typedef struct tagLOGFONTW {
+ LONG lfHeight;
+ LONG lfWidth;
+ LONG lfEscapement;
+ LONG lfOrientation;
+ LONG lfWeight;
+ BYTE lfItalic;
+ BYTE lfUnderline;
+ BYTE lfStrikeOut;
+ BYTE lfCharSet;
+ BYTE lfOutPrecision;
+ BYTE lfClipPrecision;
+ BYTE lfQuality;
+ BYTE lfPitchAndFamily;
+ WCHAR lfFaceName[LF_FACESIZE];
+ } LOGFONTW,*PLOGFONTW,*NPLOGFONTW,*LPLOGFONTW;
+#ifdef UNICODE
+ typedef LOGFONTW LOGFONT;
+ typedef PLOGFONTW PLOGFONT;
+ typedef NPLOGFONTW NPLOGFONT;
+ typedef LPLOGFONTW LPLOGFONT;
+#else
+ typedef LOGFONTA LOGFONT;
+ typedef PLOGFONTA PLOGFONT;
+ typedef NPLOGFONTA NPLOGFONT;
+ typedef LPLOGFONTA LPLOGFONT;
+#endif
+
+#define LF_FULLFACESIZE 64
+
+ typedef struct tagENUMLOGFONTA {
+ LOGFONTA elfLogFont;
+ BYTE elfFullName[LF_FULLFACESIZE];
+ BYTE elfStyle[LF_FACESIZE];
+ } ENUMLOGFONTA,*LPENUMLOGFONTA;
+
+ typedef struct tagENUMLOGFONTW {
+ LOGFONTW elfLogFont;
+ WCHAR elfFullName[LF_FULLFACESIZE];
+ WCHAR elfStyle[LF_FACESIZE];
+ } ENUMLOGFONTW,*LPENUMLOGFONTW;
+#ifdef UNICODE
+ typedef ENUMLOGFONTW ENUMLOGFONT;
+ typedef LPENUMLOGFONTW LPENUMLOGFONT;
+#else
+ typedef ENUMLOGFONTA ENUMLOGFONT;
+ typedef LPENUMLOGFONTA LPENUMLOGFONT;
+#endif
+
+ typedef struct tagENUMLOGFONTEXA {
+ LOGFONTA elfLogFont;
+ BYTE elfFullName[LF_FULLFACESIZE];
+ BYTE elfStyle[LF_FACESIZE];
+ BYTE elfScript[LF_FACESIZE];
+ } ENUMLOGFONTEXA,*LPENUMLOGFONTEXA;
+
+ typedef struct tagENUMLOGFONTEXW {
+ LOGFONTW elfLogFont;
+ WCHAR elfFullName[LF_FULLFACESIZE];
+ WCHAR elfStyle[LF_FACESIZE];
+ WCHAR elfScript[LF_FACESIZE];
+ } ENUMLOGFONTEXW,*LPENUMLOGFONTEXW;
+#ifdef UNICODE
+ typedef ENUMLOGFONTEXW ENUMLOGFONTEX;
+ typedef LPENUMLOGFONTEXW LPENUMLOGFONTEX;
+#else
+ typedef ENUMLOGFONTEXA ENUMLOGFONTEX;
+ typedef LPENUMLOGFONTEXA LPENUMLOGFONTEX;
+#endif
+
+#define OUT_DEFAULT_PRECIS 0
+#define OUT_STRING_PRECIS 1
+#define OUT_CHARACTER_PRECIS 2
+#define OUT_STROKE_PRECIS 3
+#define OUT_TT_PRECIS 4
+#define OUT_DEVICE_PRECIS 5
+#define OUT_RASTER_PRECIS 6
+#define OUT_TT_ONLY_PRECIS 7
+#define OUT_OUTLINE_PRECIS 8
+#define OUT_SCREEN_OUTLINE_PRECIS 9
+#define OUT_PS_ONLY_PRECIS 10
+
+#define CLIP_DEFAULT_PRECIS 0
+#define CLIP_CHARACTER_PRECIS 1
+#define CLIP_STROKE_PRECIS 2
+#define CLIP_MASK 0xf
+#define CLIP_LH_ANGLES (1<<4)
+#define CLIP_TT_ALWAYS (2<<4)
+#define CLIP_DFA_DISABLE (4<<4)
+#define CLIP_EMBEDDED (8<<4)
+
+#define DEFAULT_QUALITY 0
+#define DRAFT_QUALITY 1
+#define PROOF_QUALITY 2
+#define NONANTIALIASED_QUALITY 3
+#define ANTIALIASED_QUALITY 4
+
+#define CLEARTYPE_QUALITY 5
+#define CLEARTYPE_NATURAL_QUALITY 6
+
+#define DEFAULT_PITCH 0
+#define FIXED_PITCH 1
+#define VARIABLE_PITCH 2
+#define MONO_FONT 8
+
+#define ANSI_CHARSET 0
+#define DEFAULT_CHARSET 1
+#define SYMBOL_CHARSET 2
+#define SHIFTJIS_CHARSET 128
+#define HANGEUL_CHARSET 129
+#define HANGUL_CHARSET 129
+#define GB2312_CHARSET 134
+#define CHINESEBIG5_CHARSET 136
+#define OEM_CHARSET 255
+#define JOHAB_CHARSET 130
+#define HEBREW_CHARSET 177
+#define ARABIC_CHARSET 178
+#define GREEK_CHARSET 161
+#define TURKISH_CHARSET 162
+#define VIETNAMESE_CHARSET 163
+#define THAI_CHARSET 222
+#define EASTEUROPE_CHARSET 238
+#define RUSSIAN_CHARSET 204
+
+#define MAC_CHARSET 77
+#define BALTIC_CHARSET 186
+
+#define FS_LATIN1 0x00000001L
+#define FS_LATIN2 0x00000002L
+#define FS_CYRILLIC 0x00000004L
+#define FS_GREEK 0x00000008L
+#define FS_TURKISH 0x00000010L
+#define FS_HEBREW 0x00000020L
+#define FS_ARABIC 0x00000040L
+#define FS_BALTIC 0x00000080L
+#define FS_VIETNAMESE 0x00000100L
+#define FS_THAI 0x00010000L
+#define FS_JISJAPAN 0x00020000L
+#define FS_CHINESESIMP 0x00040000L
+#define FS_WANSUNG 0x00080000L
+#define FS_CHINESETRAD 0x00100000L
+#define FS_JOHAB 0x00200000L
+#define FS_SYMBOL 0x80000000L
+
+#define FF_DONTCARE (0<<4)
+#define FF_ROMAN (1<<4)
+
+#define FF_SWISS (2<<4)
+
+#define FF_MODERN (3<<4)
+
+#define FF_SCRIPT (4<<4)
+#define FF_DECORATIVE (5<<4)
+
+#define FW_DONTCARE 0
+#define FW_THIN 100
+#define FW_EXTRALIGHT 200
+#define FW_LIGHT 300
+#define FW_NORMAL 400
+#define FW_MEDIUM 500
+#define FW_SEMIBOLD 600
+#define FW_BOLD 700
+#define FW_EXTRABOLD 800
+#define FW_HEAVY 900
+
+#define FW_ULTRALIGHT FW_EXTRALIGHT
+#define FW_REGULAR FW_NORMAL
+#define FW_DEMIBOLD FW_SEMIBOLD
+#define FW_ULTRABOLD FW_EXTRABOLD
+#define FW_BLACK FW_HEAVY
+
+#define PANOSE_COUNT 10
+#define PAN_FAMILYTYPE_INDEX 0
+#define PAN_SERIFSTYLE_INDEX 1
+#define PAN_WEIGHT_INDEX 2
+#define PAN_PROPORTION_INDEX 3
+#define PAN_CONTRAST_INDEX 4
+#define PAN_STROKEVARIATION_INDEX 5
+#define PAN_ARMSTYLE_INDEX 6
+#define PAN_LETTERFORM_INDEX 7
+#define PAN_MIDLINE_INDEX 8
+#define PAN_XHEIGHT_INDEX 9
+
+#define PAN_CULTURE_LATIN 0
+
+ typedef struct tagPANOSE {
+ BYTE bFamilyType;
+ BYTE bSerifStyle;
+ BYTE bWeight;
+ BYTE bProportion;
+ BYTE bContrast;
+ BYTE bStrokeVariation;
+ BYTE bArmStyle;
+ BYTE bLetterform;
+ BYTE bMidline;
+ BYTE bXHeight;
+ } PANOSE,*LPPANOSE;
+
+#define PAN_ANY 0
+#define PAN_NO_FIT 1
+
+#define PAN_FAMILY_TEXT_DISPLAY 2
+#define PAN_FAMILY_SCRIPT 3
+#define PAN_FAMILY_DECORATIVE 4
+#define PAN_FAMILY_PICTORIAL 5
+
+#define PAN_SERIF_COVE 2
+#define PAN_SERIF_OBTUSE_COVE 3
+#define PAN_SERIF_SQUARE_COVE 4
+#define PAN_SERIF_OBTUSE_SQUARE_COVE 5
+#define PAN_SERIF_SQUARE 6
+#define PAN_SERIF_THIN 7
+#define PAN_SERIF_BONE 8
+#define PAN_SERIF_EXAGGERATED 9
+#define PAN_SERIF_TRIANGLE 10
+#define PAN_SERIF_NORMAL_SANS 11
+#define PAN_SERIF_OBTUSE_SANS 12
+#define PAN_SERIF_PERP_SANS 13
+#define PAN_SERIF_FLARED 14
+#define PAN_SERIF_ROUNDED 15
+
+#define PAN_WEIGHT_VERY_LIGHT 2
+#define PAN_WEIGHT_LIGHT 3
+#define PAN_WEIGHT_THIN 4
+#define PAN_WEIGHT_BOOK 5
+#define PAN_WEIGHT_MEDIUM 6
+#define PAN_WEIGHT_DEMI 7
+#define PAN_WEIGHT_BOLD 8
+#define PAN_WEIGHT_HEAVY 9
+#define PAN_WEIGHT_BLACK 10
+#define PAN_WEIGHT_NORD 11
+
+#define PAN_PROP_OLD_STYLE 2
+#define PAN_PROP_MODERN 3
+#define PAN_PROP_EVEN_WIDTH 4
+#define PAN_PROP_EXPANDED 5
+#define PAN_PROP_CONDENSED 6
+#define PAN_PROP_VERY_EXPANDED 7
+#define PAN_PROP_VERY_CONDENSED 8
+#define PAN_PROP_MONOSPACED 9
+
+#define PAN_CONTRAST_NONE 2
+#define PAN_CONTRAST_VERY_LOW 3
+#define PAN_CONTRAST_LOW 4
+#define PAN_CONTRAST_MEDIUM_LOW 5
+#define PAN_CONTRAST_MEDIUM 6
+#define PAN_CONTRAST_MEDIUM_HIGH 7
+#define PAN_CONTRAST_HIGH 8
+#define PAN_CONTRAST_VERY_HIGH 9
+
+#define PAN_STROKE_GRADUAL_DIAG 2
+#define PAN_STROKE_GRADUAL_TRAN 3
+#define PAN_STROKE_GRADUAL_VERT 4
+#define PAN_STROKE_GRADUAL_HORZ 5
+#define PAN_STROKE_RAPID_VERT 6
+#define PAN_STROKE_RAPID_HORZ 7
+#define PAN_STROKE_INSTANT_VERT 8
+
+#define PAN_STRAIGHT_ARMS_HORZ 2
+#define PAN_STRAIGHT_ARMS_WEDGE 3
+#define PAN_STRAIGHT_ARMS_VERT 4
+#define PAN_STRAIGHT_ARMS_SINGLE_SERIF 5
+#define PAN_STRAIGHT_ARMS_DOUBLE_SERIF 6
+#define PAN_BENT_ARMS_HORZ 7
+#define PAN_BENT_ARMS_WEDGE 8
+#define PAN_BENT_ARMS_VERT 9
+#define PAN_BENT_ARMS_SINGLE_SERIF 10
+#define PAN_BENT_ARMS_DOUBLE_SERIF 11
+
+#define PAN_LETT_NORMAL_CONTACT 2
+#define PAN_LETT_NORMAL_WEIGHTED 3
+#define PAN_LETT_NORMAL_BOXED 4
+#define PAN_LETT_NORMAL_FLATTENED 5
+#define PAN_LETT_NORMAL_ROUNDED 6
+#define PAN_LETT_NORMAL_OFF_CENTER 7
+#define PAN_LETT_NORMAL_SQUARE 8
+#define PAN_LETT_OBLIQUE_CONTACT 9
+#define PAN_LETT_OBLIQUE_WEIGHTED 10
+#define PAN_LETT_OBLIQUE_BOXED 11
+#define PAN_LETT_OBLIQUE_FLATTENED 12
+#define PAN_LETT_OBLIQUE_ROUNDED 13
+#define PAN_LETT_OBLIQUE_OFF_CENTER 14
+#define PAN_LETT_OBLIQUE_SQUARE 15
+
+#define PAN_MIDLINE_STANDARD_TRIMMED 2
+#define PAN_MIDLINE_STANDARD_POINTED 3
+#define PAN_MIDLINE_STANDARD_SERIFED 4
+#define PAN_MIDLINE_HIGH_TRIMMED 5
+#define PAN_MIDLINE_HIGH_POINTED 6
+#define PAN_MIDLINE_HIGH_SERIFED 7
+#define PAN_MIDLINE_CONSTANT_TRIMMED 8
+#define PAN_MIDLINE_CONSTANT_POINTED 9
+#define PAN_MIDLINE_CONSTANT_SERIFED 10
+#define PAN_MIDLINE_LOW_TRIMMED 11
+#define PAN_MIDLINE_LOW_POINTED 12
+#define PAN_MIDLINE_LOW_SERIFED 13
+
+#define PAN_XHEIGHT_CONSTANT_SMALL 2
+#define PAN_XHEIGHT_CONSTANT_STD 3
+#define PAN_XHEIGHT_CONSTANT_LARGE 4
+#define PAN_XHEIGHT_DUCKING_SMALL 5
+#define PAN_XHEIGHT_DUCKING_STD 6
+#define PAN_XHEIGHT_DUCKING_LARGE 7
+
+#define ELF_VENDOR_SIZE 4
+
+ typedef struct tagEXTLOGFONTA {
+ LOGFONTA elfLogFont;
+ BYTE elfFullName[LF_FULLFACESIZE];
+ BYTE elfStyle[LF_FACESIZE];
+ DWORD elfVersion;
+ DWORD elfStyleSize;
+ DWORD elfMatch;
+ DWORD elfReserved;
+ BYTE elfVendorId[ELF_VENDOR_SIZE];
+ DWORD elfCulture;
+ PANOSE elfPanose;
+ } EXTLOGFONTA,*PEXTLOGFONTA,*NPEXTLOGFONTA,*LPEXTLOGFONTA;
+
+ typedef struct tagEXTLOGFONTW {
+ LOGFONTW elfLogFont;
+ WCHAR elfFullName[LF_FULLFACESIZE];
+ WCHAR elfStyle[LF_FACESIZE];
+ DWORD elfVersion;
+ DWORD elfStyleSize;
+ DWORD elfMatch;
+ DWORD elfReserved;
+ BYTE elfVendorId[ELF_VENDOR_SIZE];
+ DWORD elfCulture;
+ PANOSE elfPanose;
+ } EXTLOGFONTW,*PEXTLOGFONTW,*NPEXTLOGFONTW,*LPEXTLOGFONTW;
+#ifdef UNICODE
+ typedef EXTLOGFONTW EXTLOGFONT;
+ typedef PEXTLOGFONTW PEXTLOGFONT;
+ typedef NPEXTLOGFONTW NPEXTLOGFONT;
+ typedef LPEXTLOGFONTW LPEXTLOGFONT;
+#else
+ typedef EXTLOGFONTA EXTLOGFONT;
+ typedef PEXTLOGFONTA PEXTLOGFONT;
+ typedef NPEXTLOGFONTA NPEXTLOGFONT;
+ typedef LPEXTLOGFONTA LPEXTLOGFONT;
+#endif
+
+#define ELF_VERSION 0
+#define ELF_CULTURE_LATIN 0
+
+#define RASTER_FONTTYPE 0x0001
+#define DEVICE_FONTTYPE 0x002
+#define TRUETYPE_FONTTYPE 0x004
+
+#define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
+#define PALETTERGB(r,g,b) (0x02000000 | RGB(r,g,b))
+#define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (DWORD)(WORD)(i)))
+
+#define PC_RESERVED 0x01
+#define PC_EXPLICIT 0x02
+#define PC_NOCOLLAPSE 0x04
+
+#define GetRValue(rgb) (LOBYTE(rgb))
+#define GetGValue(rgb) (LOBYTE(((WORD)(rgb)) >> 8))
+#define GetBValue(rgb) (LOBYTE((rgb)>>16))
+
+#define TRANSPARENT 1
+#define OPAQUE 2
+#define BKMODE_LAST 2
+
+#define GM_COMPATIBLE 1
+#define GM_ADVANCED 2
+#define GM_LAST 2
+
+#define PT_CLOSEFIGURE 0x01
+#define PT_LINETO 0x02
+#define PT_BEZIERTO 0x04
+#define PT_MOVETO 0x06
+
+#define MM_TEXT 1
+#define MM_LOMETRIC 2
+#define MM_HIMETRIC 3
+#define MM_LOENGLISH 4
+#define MM_HIENGLISH 5
+#define MM_TWIPS 6
+#define MM_ISOTROPIC 7
+#define MM_ANISOTROPIC 8
+
+#define MM_MIN MM_TEXT
+#define MM_MAX MM_ANISOTROPIC
+#define MM_MAX_FIXEDSCALE MM_TWIPS
+
+#define ABSOLUTE 1
+#define RELATIVE 2
+
+#define WHITE_BRUSH 0
+#define LTGRAY_BRUSH 1
+#define GRAY_BRUSH 2
+#define DKGRAY_BRUSH 3
+#define BLACK_BRUSH 4
+#define NULL_BRUSH 5
+#define HOLLOW_BRUSH NULL_BRUSH
+#define WHITE_PEN 6
+#define BLACK_PEN 7
+#define NULL_PEN 8
+#define OEM_FIXED_FONT 10
+#define ANSI_FIXED_FONT 11
+#define ANSI_VAR_FONT 12
+#define SYSTEM_FONT 13
+#define DEVICE_DEFAULT_FONT 14
+#define DEFAULT_PALETTE 15
+#define SYSTEM_FIXED_FONT 16
+
+#define DEFAULT_GUI_FONT 17
+
+#define DC_BRUSH 18
+#define DC_PEN 19
+
+#define STOCK_LAST 19
+
+#define CLR_INVALID 0xFFFFFFFF
+
+#define BS_SOLID 0
+#define BS_NULL 1
+#define BS_HOLLOW BS_NULL
+#define BS_HATCHED 2
+#define BS_PATTERN 3
+#define BS_INDEXED 4
+#define BS_DIBPATTERN 5
+#define BS_DIBPATTERNPT 6
+#define BS_PATTERN8X8 7
+#define BS_DIBPATTERN8X8 8
+#define BS_MONOPATTERN 9
+
+#define HS_HORIZONTAL 0
+#define HS_VERTICAL 1
+#define HS_FDIAGONAL 2
+#define HS_BDIAGONAL 3
+#define HS_CROSS 4
+#define HS_DIAGCROSS 5
+
+#define PS_SOLID 0
+#define PS_DASH 1
+#define PS_DOT 2
+#define PS_DASHDOT 3
+#define PS_DASHDOTDOT 4
+#define PS_NULL 5
+#define PS_INSIDEFRAME 6
+#define PS_USERSTYLE 7
+#define PS_ALTERNATE 8
+#define PS_STYLE_MASK 0x0000000F
+
+#define PS_ENDCAP_ROUND 0x00000000
+#define PS_ENDCAP_SQUARE 0x00000100
+#define PS_ENDCAP_FLAT 0x00000200
+#define PS_ENDCAP_MASK 0x00000F00
+
+#define PS_JOIN_ROUND 0x00000000
+#define PS_JOIN_BEVEL 0x00001000
+#define PS_JOIN_MITER 0x00002000
+#define PS_JOIN_MASK 0x0000F000
+
+#define PS_COSMETIC 0x00000000
+#define PS_GEOMETRIC 0x00010000
+#define PS_TYPE_MASK 0x000F0000
+
+#define AD_COUNTERCLOCKWISE 1
+#define AD_CLOCKWISE 2
+
+#define DRIVERVERSION 0
+#define TECHNOLOGY 2
+#define HORZSIZE 4
+#define VERTSIZE 6
+#define HORZRES 8
+#define VERTRES 10
+#define BITSPIXEL 12
+#define PLANES 14
+#define NUMBRUSHES 16
+#define NUMPENS 18
+#define NUMMARKERS 20
+#define NUMFONTS 22
+#define NUMCOLORS 24
+#define PDEVICESIZE 26
+#define CURVECAPS 28
+#define LINECAPS 30
+#define POLYGONALCAPS 32
+#define TEXTCAPS 34
+#define CLIPCAPS 36
+#define RASTERCAPS 38
+#define ASPECTX 40
+#define ASPECTY 42
+#define ASPECTXY 44
+
+#define LOGPIXELSX 88
+#define LOGPIXELSY 90
+
+#define SIZEPALETTE 104
+#define NUMRESERVED 106
+#define COLORRES 108
+
+#define PHYSICALWIDTH 110
+#define PHYSICALHEIGHT 111
+#define PHYSICALOFFSETX 112
+#define PHYSICALOFFSETY 113
+#define SCALINGFACTORX 114
+#define SCALINGFACTORY 115
+
+#define VREFRESH 116
+
+#define DESKTOPVERTRES 117
+
+#define DESKTOPHORZRES 118
+
+#define BLTALIGNMENT 119
+
+#define SHADEBLENDCAPS 120
+#define COLORMGMTCAPS 121
+
+#ifndef NOGDICAPMASKS
+#define DT_PLOTTER 0
+#define DT_RASDISPLAY 1
+#define DT_RASPRINTER 2
+#define DT_RASCAMERA 3
+#define DT_CHARSTREAM 4
+#define DT_METAFILE 5
+#define DT_DISPFILE 6
+
+#define CC_NONE 0
+#define CC_CIRCLES 1
+#define CC_PIE 2
+#define CC_CHORD 4
+#define CC_ELLIPSES 8
+#define CC_WIDE 16
+#define CC_STYLED 32
+#define CC_WIDESTYLED 64
+#define CC_INTERIORS 128
+#define CC_ROUNDRECT 256
+
+#define LC_NONE 0
+#define LC_POLYLINE 2
+#define LC_MARKER 4
+#define LC_POLYMARKER 8
+#define LC_WIDE 16
+#define LC_STYLED 32
+#define LC_WIDESTYLED 64
+#define LC_INTERIORS 128
+
+#define PC_NONE 0
+#define PC_POLYGON 1
+#define PC_RECTANGLE 2
+#define PC_WINDPOLYGON 4
+#define PC_TRAPEZOID 4
+#define PC_SCANLINE 8
+#define PC_WIDE 16
+#define PC_STYLED 32
+#define PC_WIDESTYLED 64
+#define PC_INTERIORS 128
+#define PC_POLYPOLYGON 256
+#define PC_PATHS 512
+
+#define CP_NONE 0
+#define CP_RECTANGLE 1
+#define CP_REGION 2
+
+#define TC_OP_CHARACTER 0x00000001
+#define TC_OP_STROKE 0x00000002
+#define TC_CP_STROKE 0x00000004
+#define TC_CR_90 0x00000008
+#define TC_CR_ANY 0x00000010
+#define TC_SF_X_YINDEP 0x00000020
+#define TC_SA_DOUBLE 0x00000040
+#define TC_SA_INTEGER 0x00000080
+#define TC_SA_CONTIN 0x00000100
+#define TC_EA_DOUBLE 0x00000200
+#define TC_IA_ABLE 0x00000400
+#define TC_UA_ABLE 0x00000800
+#define TC_SO_ABLE 0x00001000
+#define TC_RA_ABLE 0x00002000
+#define TC_VA_ABLE 0x00004000
+#define TC_RESERVED 0x00008000
+#define TC_SCROLLBLT 0x00010000
+#endif
+
+#define RC_NONE
+#define RC_BITBLT 1
+#define RC_BANDING 2
+#define RC_SCALING 4
+#define RC_BITMAP64 8
+#define RC_GDI20_OUTPUT 0x0010
+#define RC_GDI20_STATE 0x0020
+#define RC_SAVEBITMAP 0x0040
+#define RC_DI_BITMAP 0x0080
+#define RC_PALETTE 0x0100
+#define RC_DIBTODEV 0x0200
+#define RC_BIGFONT 0x0400
+#define RC_STRETCHBLT 0x0800
+#define RC_FLOODFILL 0x1000
+#define RC_STRETCHDIB 0x2000
+#define RC_OP_DX_OUTPUT 0x4000
+#define RC_DEVBITS 0x8000
+
+#define SB_NONE 0x00000000
+#define SB_CONST_ALPHA 0x00000001
+#define SB_PIXEL_ALPHA 0x00000002
+#define SB_PREMULT_ALPHA 0x00000004
+
+#define SB_GRAD_RECT 0x00000010
+#define SB_GRAD_TRI 0x00000020
+
+#define CM_NONE 0x00000000
+#define CM_DEVICE_ICM 0x00000001
+#define CM_GAMMA_RAMP 0x00000002
+#define CM_CMYK_COLOR 0x00000004
+
+#define DIB_RGB_COLORS 0
+#define DIB_PAL_COLORS 1
+
+#define SYSPAL_ERROR 0
+#define SYSPAL_STATIC 1
+#define SYSPAL_NOSTATIC 2
+#define SYSPAL_NOSTATIC256 3
+
+#define CBM_INIT 0x04L
+
+#define FLOODFILLBORDER 0
+#define FLOODFILLSURFACE 1
+
+#define CCHDEVICENAME 32
+
+#define CCHFORMNAME 32
+
+ typedef struct _devicemodeA {
+ BYTE dmDeviceName[CCHDEVICENAME];
+ WORD dmSpecVersion;
+ WORD dmDriverVersion;
+ WORD dmSize;
+ WORD dmDriverExtra;
+ DWORD dmFields;
+ union {
+ struct {
+ short dmOrientation;
+ short dmPaperSize;
+ short dmPaperLength;
+ short dmPaperWidth;
+ short dmScale;
+ short dmCopies;
+ short dmDefaultSource;
+ short dmPrintQuality;
+ };
+ struct {
+ POINTL dmPosition;
+ DWORD dmDisplayOrientation;
+ DWORD dmDisplayFixedOutput;
+ };
+ };
+ short dmColor;
+ short dmDuplex;
+ short dmYResolution;
+ short dmTTOption;
+ short dmCollate;
+ BYTE dmFormName[CCHFORMNAME];
+ WORD dmLogPixels;
+ DWORD dmBitsPerPel;
+ DWORD dmPelsWidth;
+ DWORD dmPelsHeight;
+ union {
+ DWORD dmDisplayFlags;
+ DWORD dmNup;
+ };
+ DWORD dmDisplayFrequency;
+ DWORD dmICMMethod;
+ DWORD dmICMIntent;
+ DWORD dmMediaType;
+ DWORD dmDitherType;
+ DWORD dmReserved1;
+ DWORD dmReserved2;
+ DWORD dmPanningWidth;
+ DWORD dmPanningHeight;
+ } DEVMODEA,*PDEVMODEA,*NPDEVMODEA,*LPDEVMODEA;
+
+ typedef struct _devicemodeW {
+ WCHAR dmDeviceName[CCHDEVICENAME];
+ WORD dmSpecVersion;
+ WORD dmDriverVersion;
+ WORD dmSize;
+ WORD dmDriverExtra;
+ DWORD dmFields;
+ union {
+ struct {
+ short dmOrientation;
+ short dmPaperSize;
+ short dmPaperLength;
+ short dmPaperWidth;
+ short dmScale;
+ short dmCopies;
+ short dmDefaultSource;
+ short dmPrintQuality;
+ };
+ struct {
+ POINTL dmPosition;
+ DWORD dmDisplayOrientation;
+ DWORD dmDisplayFixedOutput;
+ };
+ };
+ short dmColor;
+ short dmDuplex;
+ short dmYResolution;
+ short dmTTOption;
+ short dmCollate;
+ WCHAR dmFormName[CCHFORMNAME];
+ WORD dmLogPixels;
+ DWORD dmBitsPerPel;
+ DWORD dmPelsWidth;
+ DWORD dmPelsHeight;
+ union {
+ DWORD dmDisplayFlags;
+ DWORD dmNup;
+ };
+ DWORD dmDisplayFrequency;
+ DWORD dmICMMethod;
+ DWORD dmICMIntent;
+ DWORD dmMediaType;
+ DWORD dmDitherType;
+ DWORD dmReserved1;
+ DWORD dmReserved2;
+ DWORD dmPanningWidth;
+ DWORD dmPanningHeight;
+ } DEVMODEW,*PDEVMODEW,*NPDEVMODEW,*LPDEVMODEW;
+#ifdef UNICODE
+ typedef DEVMODEW DEVMODE;
+ typedef PDEVMODEW PDEVMODE;
+ typedef NPDEVMODEW NPDEVMODE;
+ typedef LPDEVMODEW LPDEVMODE;
+#else
+ typedef DEVMODEA DEVMODE;
+ typedef PDEVMODEA PDEVMODE;
+ typedef NPDEVMODEA NPDEVMODE;
+ typedef LPDEVMODEA LPDEVMODE;
+#endif
+
+#define DM_SPECVERSION 0x0401
+
+#define DM_ORIENTATION 0x00000001L
+#define DM_PAPERSIZE 0x00000002L
+#define DM_PAPERLENGTH 0x00000004L
+#define DM_PAPERWIDTH 0x00000008L
+#define DM_SCALE 0x00000010L
+#define DM_POSITION 0x00000020L
+#define DM_NUP 0x00000040L
+#define DM_DISPLAYORIENTATION 0x00000080L
+#define DM_COPIES 0x00000100L
+#define DM_DEFAULTSOURCE 0x00000200L
+#define DM_PRINTQUALITY 0x00000400L
+#define DM_COLOR 0x00000800L
+#define DM_DUPLEX 0x00001000L
+#define DM_YRESOLUTION 0x00002000L
+#define DM_TTOPTION 0x00004000L
+#define DM_COLLATE 0x00008000L
+#define DM_FORMNAME 0x00010000L
+#define DM_LOGPIXELS 0x00020000L
+#define DM_BITSPERPEL 0x00040000L
+#define DM_PELSWIDTH 0x00080000L
+#define DM_PELSHEIGHT 0x00100000L
+#define DM_DISPLAYFLAGS 0x00200000L
+#define DM_DISPLAYFREQUENCY 0x00400000L
+#define DM_ICMMETHOD 0x00800000L
+#define DM_ICMINTENT 0x01000000L
+#define DM_MEDIATYPE 0x02000000L
+#define DM_DITHERTYPE 0x04000000L
+#define DM_PANNINGWIDTH 0x08000000L
+#define DM_PANNINGHEIGHT 0x10000000L
+#define DM_DISPLAYFIXEDOUTPUT 0x20000000L
+
+#define DMORIENT_PORTRAIT 1
+#define DMORIENT_LANDSCAPE 2
+
+#define DMPAPER_FIRST DMPAPER_LETTER
+#define DMPAPER_LETTER 1
+#define DMPAPER_LETTERSMALL 2
+#define DMPAPER_TABLOID 3
+#define DMPAPER_LEDGER 4
+#define DMPAPER_LEGAL 5
+#define DMPAPER_STATEMENT 6
+#define DMPAPER_EXECUTIVE 7
+#define DMPAPER_A3 8
+#define DMPAPER_A4 9
+#define DMPAPER_A4SMALL 10
+#define DMPAPER_A5 11
+#define DMPAPER_B4 12
+#define DMPAPER_B5 13
+#define DMPAPER_FOLIO 14
+#define DMPAPER_QUARTO 15
+#define DMPAPER_10X14 16
+#define DMPAPER_11X17 17
+#define DMPAPER_NOTE 18
+#define DMPAPER_ENV_9 19
+#define DMPAPER_ENV_10 20
+#define DMPAPER_ENV_11 21
+#define DMPAPER_ENV_12 22
+#define DMPAPER_ENV_14 23
+#define DMPAPER_CSHEET 24
+#define DMPAPER_DSHEET 25
+#define DMPAPER_ESHEET 26
+#define DMPAPER_ENV_DL 27
+#define DMPAPER_ENV_C5 28
+#define DMPAPER_ENV_C3 29
+#define DMPAPER_ENV_C4 30
+#define DMPAPER_ENV_C6 31
+#define DMPAPER_ENV_C65 32
+#define DMPAPER_ENV_B4 33
+#define DMPAPER_ENV_B5 34
+#define DMPAPER_ENV_B6 35
+#define DMPAPER_ENV_ITALY 36
+#define DMPAPER_ENV_MONARCH 37
+#define DMPAPER_ENV_PERSONAL 38
+#define DMPAPER_FANFOLD_US 39
+#define DMPAPER_FANFOLD_STD_GERMAN 40
+#define DMPAPER_FANFOLD_LGL_GERMAN 41
+#define DMPAPER_ISO_B4 42
+#define DMPAPER_JAPANESE_POSTCARD 43
+#define DMPAPER_9X11 44
+#define DMPAPER_10X11 45
+#define DMPAPER_15X11 46
+#define DMPAPER_ENV_INVITE 47
+#define DMPAPER_RESERVED_48 48
+#define DMPAPER_RESERVED_49 49
+#define DMPAPER_LETTER_EXTRA 50
+#define DMPAPER_LEGAL_EXTRA 51
+#define DMPAPER_TABLOID_EXTRA 52
+#define DMPAPER_A4_EXTRA 53
+#define DMPAPER_LETTER_TRANSVERSE 54
+#define DMPAPER_A4_TRANSVERSE 55
+#define DMPAPER_LETTER_EXTRA_TRANSVERSE 56
+#define DMPAPER_A_PLUS 57
+#define DMPAPER_B_PLUS 58
+#define DMPAPER_LETTER_PLUS 59
+#define DMPAPER_A4_PLUS 60
+#define DMPAPER_A5_TRANSVERSE 61
+#define DMPAPER_B5_TRANSVERSE 62
+#define DMPAPER_A3_EXTRA 63
+#define DMPAPER_A5_EXTRA 64
+#define DMPAPER_B5_EXTRA 65
+#define DMPAPER_A2 66
+#define DMPAPER_A3_TRANSVERSE 67
+#define DMPAPER_A3_EXTRA_TRANSVERSE 68
+#define DMPAPER_DBL_JAPANESE_POSTCARD 69
+#define DMPAPER_A6 70
+#define DMPAPER_JENV_KAKU2 71
+#define DMPAPER_JENV_KAKU3 72
+#define DMPAPER_JENV_CHOU3 73
+#define DMPAPER_JENV_CHOU4 74
+#define DMPAPER_LETTER_ROTATED 75
+#define DMPAPER_A3_ROTATED 76
+#define DMPAPER_A4_ROTATED 77
+#define DMPAPER_A5_ROTATED 78
+#define DMPAPER_B4_JIS_ROTATED 79
+#define DMPAPER_B5_JIS_ROTATED 80
+#define DMPAPER_JAPANESE_POSTCARD_ROTATED 81
+#define DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED 82
+#define DMPAPER_A6_ROTATED 83
+#define DMPAPER_JENV_KAKU2_ROTATED 84
+#define DMPAPER_JENV_KAKU3_ROTATED 85
+#define DMPAPER_JENV_CHOU3_ROTATED 86
+#define DMPAPER_JENV_CHOU4_ROTATED 87
+#define DMPAPER_B6_JIS 88
+#define DMPAPER_B6_JIS_ROTATED 89
+#define DMPAPER_12X11 90
+#define DMPAPER_JENV_YOU4 91
+#define DMPAPER_JENV_YOU4_ROTATED 92
+#define DMPAPER_P16K 93
+#define DMPAPER_P32K 94
+#define DMPAPER_P32KBIG 95
+#define DMPAPER_PENV_1 96
+#define DMPAPER_PENV_2 97
+#define DMPAPER_PENV_3 98
+#define DMPAPER_PENV_4 99
+#define DMPAPER_PENV_5 100
+#define DMPAPER_PENV_6 101
+#define DMPAPER_PENV_7 102
+#define DMPAPER_PENV_8 103
+#define DMPAPER_PENV_9 104
+#define DMPAPER_PENV_10 105
+#define DMPAPER_P16K_ROTATED 106
+#define DMPAPER_P32K_ROTATED 107
+#define DMPAPER_P32KBIG_ROTATED 108
+#define DMPAPER_PENV_1_ROTATED 109
+#define DMPAPER_PENV_2_ROTATED 110
+#define DMPAPER_PENV_3_ROTATED 111
+#define DMPAPER_PENV_4_ROTATED 112
+#define DMPAPER_PENV_5_ROTATED 113
+#define DMPAPER_PENV_6_ROTATED 114
+#define DMPAPER_PENV_7_ROTATED 115
+#define DMPAPER_PENV_8_ROTATED 116
+#define DMPAPER_PENV_9_ROTATED 117
+#define DMPAPER_PENV_10_ROTATED 118
+
+#define DMPAPER_LAST DMPAPER_PENV_10_ROTATED
+
+#define DMPAPER_USER 256
+
+#define DMBIN_FIRST DMBIN_UPPER
+#define DMBIN_UPPER 1
+#define DMBIN_ONLYONE 1
+#define DMBIN_LOWER 2
+#define DMBIN_MIDDLE 3
+#define DMBIN_MANUAL 4
+#define DMBIN_ENVELOPE 5
+#define DMBIN_ENVMANUAL 6
+#define DMBIN_AUTO 7
+#define DMBIN_TRACTOR 8
+#define DMBIN_SMALLFMT 9
+#define DMBIN_LARGEFMT 10
+#define DMBIN_LARGECAPACITY 11
+#define DMBIN_CASSETTE 14
+#define DMBIN_FORMSOURCE 15
+#define DMBIN_LAST DMBIN_FORMSOURCE
+
+#define DMBIN_USER 256
+
+#define DMRES_DRAFT (-1)
+#define DMRES_LOW (-2)
+#define DMRES_MEDIUM (-3)
+#define DMRES_HIGH (-4)
+
+#define DMCOLOR_MONOCHROME 1
+#define DMCOLOR_COLOR 2
+
+#define DMDUP_SIMPLEX 1
+#define DMDUP_VERTICAL 2
+#define DMDUP_HORIZONTAL 3
+
+#define DMTT_BITMAP 1
+#define DMTT_DOWNLOAD 2
+#define DMTT_SUBDEV 3
+#define DMTT_DOWNLOAD_OUTLINE 4
+
+#define DMCOLLATE_FALSE 0
+#define DMCOLLATE_TRUE 1
+
+#define DMDO_DEFAULT 0
+#define DMDO_90 1
+#define DMDO_180 2
+#define DMDO_270 3
+
+#define DMDFO_DEFAULT 0
+#define DMDFO_STRETCH 1
+#define DMDFO_CENTER 2
+
+#define DMDISPLAYFLAGS_TEXTMODE 0x00000004
+
+#define DMNUP_SYSTEM 1
+#define DMNUP_ONEUP 2
+
+#define DMICMMETHOD_NONE 1
+#define DMICMMETHOD_SYSTEM 2
+#define DMICMMETHOD_DRIVER 3
+#define DMICMMETHOD_DEVICE 4
+
+#define DMICMMETHOD_USER 256
+
+#define DMICM_SATURATE 1
+#define DMICM_CONTRAST 2
+#define DMICM_COLORIMETRIC 3
+#define DMICM_ABS_COLORIMETRIC 4
+
+#define DMICM_USER 256
+
+#define DMMEDIA_STANDARD 1
+#define DMMEDIA_TRANSPARENCY 2
+#define DMMEDIA_GLOSSY 3
+
+#define DMMEDIA_USER 256
+
+#define DMDITHER_NONE 1
+#define DMDITHER_COARSE 2
+#define DMDITHER_FINE 3
+#define DMDITHER_LINEART 4
+#define DMDITHER_ERRORDIFFUSION 5
+#define DMDITHER_RESERVED6 6
+#define DMDITHER_RESERVED7 7
+#define DMDITHER_RESERVED8 8
+#define DMDITHER_RESERVED9 9
+#define DMDITHER_GRAYSCALE 10
+
+#define DMDITHER_USER 256
+
+ typedef struct _DISPLAY_DEVICEA {
+ DWORD cb;
+ CHAR DeviceName[32];
+ CHAR DeviceString[128];
+ DWORD StateFlags;
+ CHAR DeviceID[128];
+ CHAR DeviceKey[128];
+ } DISPLAY_DEVICEA,*PDISPLAY_DEVICEA,*LPDISPLAY_DEVICEA;
+ typedef struct _DISPLAY_DEVICEW {
+ DWORD cb;
+ WCHAR DeviceName[32];
+ WCHAR DeviceString[128];
+ DWORD StateFlags;
+ WCHAR DeviceID[128];
+ WCHAR DeviceKey[128];
+ } DISPLAY_DEVICEW,*PDISPLAY_DEVICEW,*LPDISPLAY_DEVICEW;
+#ifdef UNICODE
+ typedef DISPLAY_DEVICEW DISPLAY_DEVICE;
+ typedef PDISPLAY_DEVICEW PDISPLAY_DEVICE;
+ typedef LPDISPLAY_DEVICEW LPDISPLAY_DEVICE;
+#else
+ typedef DISPLAY_DEVICEA DISPLAY_DEVICE;
+ typedef PDISPLAY_DEVICEA PDISPLAY_DEVICE;
+ typedef LPDISPLAY_DEVICEA LPDISPLAY_DEVICE;
+#endif
+
+#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001
+#define DISPLAY_DEVICE_MULTI_DRIVER 0x00000002
+#define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004
+#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008
+#define DISPLAY_DEVICE_VGA_COMPATIBLE 0x00000010
+#define DISPLAY_DEVICE_REMOVABLE 0x00000020
+#define DISPLAY_DEVICE_MODESPRUNED 0x08000000
+#define DISPLAY_DEVICE_REMOTE 0x04000000
+#define DISPLAY_DEVICE_DISCONNECT 0x02000000
+
+#define DISPLAY_DEVICE_ACTIVE 0x00000001
+#define DISPLAY_DEVICE_ATTACHED 0x00000002
+
+#define RDH_RECTANGLES 1
+
+ typedef struct _RGNDATAHEADER {
+ DWORD dwSize;
+ DWORD iType;
+ DWORD nCount;
+ DWORD nRgnSize;
+ RECT rcBound;
+ } RGNDATAHEADER,*PRGNDATAHEADER;
+
+ typedef struct _RGNDATA {
+ RGNDATAHEADER rdh;
+ char Buffer[1];
+ } RGNDATA,*PRGNDATA,*NPRGNDATA,*LPRGNDATA;
+
+#define SYSRGN 4
+
+ typedef struct _ABC {
+ int abcA;
+ UINT abcB;
+ int abcC;
+ } ABC,*PABC,*NPABC,*LPABC;
+
+ typedef struct _ABCFLOAT {
+ FLOAT abcfA;
+ FLOAT abcfB;
+ FLOAT abcfC;
+ } ABCFLOAT,*PABCFLOAT,*NPABCFLOAT,*LPABCFLOAT;
+
+#ifndef NOTEXTMETRIC
+
+ typedef struct _OUTLINETEXTMETRICA {
+ UINT otmSize;
+ TEXTMETRICA otmTextMetrics;
+ BYTE otmFiller;
+ PANOSE otmPanoseNumber;
+ UINT otmfsSelection;
+ UINT otmfsType;
+ int otmsCharSlopeRise;
+ int otmsCharSlopeRun;
+ int otmItalicAngle;
+ UINT otmEMSquare;
+ int otmAscent;
+ int otmDescent;
+ UINT otmLineGap;
+ UINT otmsCapEmHeight;
+ UINT otmsXHeight;
+ RECT otmrcFontBox;
+ int otmMacAscent;
+ int otmMacDescent;
+ UINT otmMacLineGap;
+ UINT otmusMinimumPPEM;
+ POINT otmptSubscriptSize;
+ POINT otmptSubscriptOffset;
+ POINT otmptSuperscriptSize;
+ POINT otmptSuperscriptOffset;
+ UINT otmsStrikeoutSize;
+ int otmsStrikeoutPosition;
+ int otmsUnderscoreSize;
+ int otmsUnderscorePosition;
+ PSTR otmpFamilyName;
+ PSTR otmpFaceName;
+ PSTR otmpStyleName;
+ PSTR otmpFullName;
+ } OUTLINETEXTMETRICA,*POUTLINETEXTMETRICA,*NPOUTLINETEXTMETRICA,*LPOUTLINETEXTMETRICA;
+
+ typedef struct _OUTLINETEXTMETRICW {
+ UINT otmSize;
+ TEXTMETRICW otmTextMetrics;
+ BYTE otmFiller;
+ PANOSE otmPanoseNumber;
+ UINT otmfsSelection;
+ UINT otmfsType;
+ int otmsCharSlopeRise;
+ int otmsCharSlopeRun;
+ int otmItalicAngle;
+ UINT otmEMSquare;
+ int otmAscent;
+ int otmDescent;
+ UINT otmLineGap;
+ UINT otmsCapEmHeight;
+ UINT otmsXHeight;
+ RECT otmrcFontBox;
+ int otmMacAscent;
+ int otmMacDescent;
+ UINT otmMacLineGap;
+ UINT otmusMinimumPPEM;
+ POINT otmptSubscriptSize;
+ POINT otmptSubscriptOffset;
+ POINT otmptSuperscriptSize;
+ POINT otmptSuperscriptOffset;
+ UINT otmsStrikeoutSize;
+ int otmsStrikeoutPosition;
+ int otmsUnderscoreSize;
+ int otmsUnderscorePosition;
+ PSTR otmpFamilyName;
+ PSTR otmpFaceName;
+ PSTR otmpStyleName;
+ PSTR otmpFullName;
+ } OUTLINETEXTMETRICW,*POUTLINETEXTMETRICW,*NPOUTLINETEXTMETRICW,*LPOUTLINETEXTMETRICW;
+#ifdef UNICODE
+ typedef OUTLINETEXTMETRICW OUTLINETEXTMETRIC;
+ typedef POUTLINETEXTMETRICW POUTLINETEXTMETRIC;
+ typedef NPOUTLINETEXTMETRICW NPOUTLINETEXTMETRIC;
+ typedef LPOUTLINETEXTMETRICW LPOUTLINETEXTMETRIC;
+#else
+ typedef OUTLINETEXTMETRICA OUTLINETEXTMETRIC;
+ typedef POUTLINETEXTMETRICA POUTLINETEXTMETRIC;
+ typedef NPOUTLINETEXTMETRICA NPOUTLINETEXTMETRIC;
+ typedef LPOUTLINETEXTMETRICA LPOUTLINETEXTMETRIC;
+#endif
+#endif
+
+ typedef struct tagPOLYTEXTA {
+ int x;
+ int y;
+ UINT n;
+ LPCSTR lpstr;
+ UINT uiFlags;
+ RECT rcl;
+ int *pdx;
+ } POLYTEXTA,*PPOLYTEXTA,*NPPOLYTEXTA,*LPPOLYTEXTA;
+
+ typedef struct tagPOLYTEXTW {
+ int x;
+ int y;
+ UINT n;
+ LPCWSTR lpstr;
+ UINT uiFlags;
+ RECT rcl;
+ int *pdx;
+ } POLYTEXTW,*PPOLYTEXTW,*NPPOLYTEXTW,*LPPOLYTEXTW;
+#ifdef UNICODE
+ typedef POLYTEXTW POLYTEXT;
+ typedef PPOLYTEXTW PPOLYTEXT;
+ typedef NPPOLYTEXTW NPPOLYTEXT;
+ typedef LPPOLYTEXTW LPPOLYTEXT;
+#else
+ typedef POLYTEXTA POLYTEXT;
+ typedef PPOLYTEXTA PPOLYTEXT;
+ typedef NPPOLYTEXTA NPPOLYTEXT;
+ typedef LPPOLYTEXTA LPPOLYTEXT;
+#endif
+
+ typedef struct _FIXED {
+ WORD fract;
+ short value;
+ } FIXED;
+
+ typedef struct _MAT2 {
+ FIXED eM11;
+ FIXED eM12;
+ FIXED eM21;
+ FIXED eM22;
+ } MAT2,*LPMAT2;
+
+ typedef struct _GLYPHMETRICS {
+ UINT gmBlackBoxX;
+ UINT gmBlackBoxY;
+ POINT gmptGlyphOrigin;
+ short gmCellIncX;
+ short gmCellIncY;
+ } GLYPHMETRICS,*LPGLYPHMETRICS;
+
+#define GGO_METRICS 0
+#define GGO_BITMAP 1
+#define GGO_NATIVE 2
+#define GGO_BEZIER 3
+
+#define GGO_GRAY2_BITMAP 4
+#define GGO_GRAY4_BITMAP 5
+#define GGO_GRAY8_BITMAP 6
+#define GGO_GLYPH_INDEX 0x0080
+#define GGO_UNHINTED 0x0100
+
+#define TT_POLYGON_TYPE 24
+
+#define TT_PRIM_LINE 1
+#define TT_PRIM_QSPLINE 2
+#define TT_PRIM_CSPLINE 3
+
+ typedef struct tagPOINTFX {
+ FIXED x;
+ FIXED y;
+ } POINTFX,*LPPOINTFX;
+
+ typedef struct tagTTPOLYCURVE {
+ WORD wType;
+ WORD cpfx;
+ POINTFX apfx[1];
+ } TTPOLYCURVE,*LPTTPOLYCURVE;
+
+ typedef struct tagTTPOLYGONHEADER {
+ DWORD cb;
+ DWORD dwType;
+ POINTFX pfxStart;
+ } TTPOLYGONHEADER,*LPTTPOLYGONHEADER;
+
+#define GCP_DBCS 0x0001
+#define GCP_REORDER 0x0002
+#define GCP_USEKERNING 0x0008
+#define GCP_GLYPHSHAPE 0x0010
+#define GCP_LIGATE 0x0020
+
+#define GCP_DIACRITIC 0x0100
+#define GCP_KASHIDA 0x0400
+#define GCP_ERROR 0x8000
+#define FLI_MASK 0x103B
+
+#define GCP_JUSTIFY 0x00010000L
+
+#define FLI_GLYPHS 0x00040000L
+#define GCP_CLASSIN 0x00080000L
+#define GCP_MAXEXTENT 0x00100000L
+#define GCP_JUSTIFYIN 0x00200000L
+#define GCP_DISPLAYZWG 0x00400000L
+#define GCP_SYMSWAPOFF 0x00800000L
+#define GCP_NUMERICOVERRIDE 0x01000000L
+#define GCP_NEUTRALOVERRIDE 0x02000000L
+#define GCP_NUMERICSLATIN 0x04000000L
+#define GCP_NUMERICSLOCAL 0x08000000L
+
+#define GCPCLASS_LATIN 1
+#define GCPCLASS_HEBREW 2
+#define GCPCLASS_ARABIC 2
+#define GCPCLASS_NEUTRAL 3
+#define GCPCLASS_LOCALNUMBER 4
+#define GCPCLASS_LATINNUMBER 5
+#define GCPCLASS_LATINNUMERICTERMINATOR 6
+#define GCPCLASS_LATINNUMERICSEPARATOR 7
+#define GCPCLASS_NUMERICSEPARATOR 8
+#define GCPCLASS_PREBOUNDLTR 0x80
+#define GCPCLASS_PREBOUNDRTL 0x40
+#define GCPCLASS_POSTBOUNDLTR 0x20
+#define GCPCLASS_POSTBOUNDRTL 0x10
+
+#define GCPGLYPH_LINKBEFORE 0x8000
+#define GCPGLYPH_LINKAFTER 0x4000
+
+ typedef struct tagGCP_RESULTSA {
+ DWORD lStructSize;
+ LPSTR lpOutString;
+ UINT *lpOrder;
+ int *lpDx;
+ int *lpCaretPos;
+ LPSTR lpClass;
+ LPWSTR lpGlyphs;
+ UINT nGlyphs;
+ int nMaxFit;
+ } GCP_RESULTSA,*LPGCP_RESULTSA;
+ typedef struct tagGCP_RESULTSW {
+ DWORD lStructSize;
+ LPWSTR lpOutString;
+ UINT *lpOrder;
+ int *lpDx;
+ int *lpCaretPos;
+ LPSTR lpClass;
+ LPWSTR lpGlyphs;
+ UINT nGlyphs;
+ int nMaxFit;
+ } GCP_RESULTSW,*LPGCP_RESULTSW;
+#ifdef UNICODE
+ typedef GCP_RESULTSW GCP_RESULTS;
+ typedef LPGCP_RESULTSW LPGCP_RESULTS;
+#else
+ typedef GCP_RESULTSA GCP_RESULTS;
+ typedef LPGCP_RESULTSA LPGCP_RESULTS;
+#endif
+
+ typedef struct _RASTERIZER_STATUS {
+ short nSize;
+ short wFlags;
+ short nLanguageID;
+ } RASTERIZER_STATUS,*LPRASTERIZER_STATUS;
+
+#define TT_AVAILABLE 0x0001
+#define TT_ENABLED 0x0002
+
+ typedef struct tagPIXELFORMATDESCRIPTOR {
+ WORD nSize;
+ WORD nVersion;
+ DWORD dwFlags;
+ BYTE iPixelType;
+ BYTE cColorBits;
+ BYTE cRedBits;
+ BYTE cRedShift;
+ BYTE cGreenBits;
+ BYTE cGreenShift;
+ BYTE cBlueBits;
+ BYTE cBlueShift;
+ BYTE cAlphaBits;
+ BYTE cAlphaShift;
+ BYTE cAccumBits;
+ BYTE cAccumRedBits;
+ BYTE cAccumGreenBits;
+ BYTE cAccumBlueBits;
+ BYTE cAccumAlphaBits;
+ BYTE cDepthBits;
+ BYTE cStencilBits;
+ BYTE cAuxBuffers;
+ BYTE iLayerType;
+ BYTE bReserved;
+ DWORD dwLayerMask;
+ DWORD dwVisibleMask;
+ DWORD dwDamageMask;
+ } PIXELFORMATDESCRIPTOR,*PPIXELFORMATDESCRIPTOR,*LPPIXELFORMATDESCRIPTOR;
+
+#define PFD_TYPE_RGBA 0
+#define PFD_TYPE_COLORINDEX 1
+
+#define PFD_MAIN_PLANE 0
+#define PFD_OVERLAY_PLANE 1
+#define PFD_UNDERLAY_PLANE (-1)
+
+#define PFD_DOUBLEBUFFER 0x00000001
+#define PFD_STEREO 0x00000002
+#define PFD_DRAW_TO_WINDOW 0x00000004
+#define PFD_DRAW_TO_BITMAP 0x00000008
+#define PFD_SUPPORT_GDI 0x00000010
+#define PFD_SUPPORT_OPENGL 0x00000020
+#define PFD_GENERIC_FORMAT 0x00000040
+#define PFD_NEED_PALETTE 0x00000080
+#define PFD_NEED_SYSTEM_PALETTE 0x00000100
+#define PFD_SWAP_EXCHANGE 0x00000200
+#define PFD_SWAP_COPY 0x00000400
+#define PFD_SWAP_LAYER_BUFFERS 0x00000800
+#define PFD_GENERIC_ACCELERATED 0x00001000
+#define PFD_SUPPORT_DIRECTDRAW 0x00002000
+
+#define PFD_DEPTH_DONTCARE 0x20000000
+#define PFD_DOUBLEBUFFER_DONTCARE 0x40000000
+#define PFD_STEREO_DONTCARE 0x80000000
+
+#ifndef NOTEXTMETRIC
+ typedef int (CALLBACK *OLDFONTENUMPROCA)(CONST LOGFONTA *,CONST TEXTMETRICA *,DWORD,LPARAM);
+ typedef int (CALLBACK *OLDFONTENUMPROCW)(CONST LOGFONTW *,CONST TEXTMETRICW *,DWORD,LPARAM);
+#ifdef UNICODE
+#define OLDFONTENUMPROC OLDFONTENUMPROCW
+#else
+#define OLDFONTENUMPROC OLDFONTENUMPROCA
+#endif
+#else
+ typedef int (CALLBACK *OLDFONTENUMPROCA)(CONST LOGFONTA *,CONST VOID *,DWORD,LPARAM);
+ typedef int (CALLBACK *OLDFONTENUMPROCW)(CONST LOGFONTW *,CONST VOID *,DWORD,LPARAM);
+#ifdef UNICODE
+#define OLDFONTENUMPROC OLDFONTENUMPROCW
+#else
+#define OLDFONTENUMPROC OLDFONTENUMPROCA
+#endif
+#endif
+
+ typedef OLDFONTENUMPROCA FONTENUMPROCA;
+ typedef OLDFONTENUMPROCW FONTENUMPROCW;
+#ifdef UNICODE
+ typedef FONTENUMPROCW FONTENUMPROC;
+#else
+ typedef FONTENUMPROCA FONTENUMPROC;
+#endif
+
+ typedef int (CALLBACK *GOBJENUMPROC)(LPVOID,LPARAM);
+ typedef VOID (CALLBACK *LINEDDAPROC)(int,int,LPARAM);
+
+#ifdef UNICODE
+#define AddFontResource AddFontResourceW
+#define CopyMetaFile CopyMetaFileW
+#define CreateDC CreateDCW
+#define CreateFontIndirect CreateFontIndirectW
+#define CreateFont CreateFontW
+#define CreateIC CreateICW
+#define CreateMetaFile CreateMetaFileW
+#define CreateScalableFontResource CreateScalableFontResourceW
+#else
+#define AddFontResource AddFontResourceA
+#define CopyMetaFile CopyMetaFileA
+#define CreateDC CreateDCA
+#define CreateFontIndirect CreateFontIndirectA
+#define CreateFont CreateFontA
+#define CreateIC CreateICA
+#define CreateMetaFile CreateMetaFileA
+#define CreateScalableFontResource CreateScalableFontResourceA
+#endif
+
+ WINGDIAPI int WINAPI AddFontResourceA(LPCSTR);
+ WINGDIAPI int WINAPI AddFontResourceW(LPCWSTR);
+ WINGDIAPI WINBOOL WINAPI AnimatePalette(HPALETTE hPal,UINT iStartIndex,UINT cEntries,CONST PALETTEENTRY *ppe);
+ WINGDIAPI WINBOOL WINAPI Arc(HDC hdc,int x1,int y1,int x2,int y2,int x3,int y3,int x4,int y4);
+ WINGDIAPI WINBOOL WINAPI BitBlt(HDC hdc,int x,int y,int cx,int cy,HDC hdcSrc,int x1,int y1,DWORD rop);
+ WINGDIAPI WINBOOL WINAPI CancelDC(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI Chord(HDC hdc,int x1,int y1,int x2,int y2,int x3,int y3,int x4,int y4);
+ WINGDIAPI int WINAPI ChoosePixelFormat(HDC hdc,CONST PIXELFORMATDESCRIPTOR *ppfd);
+ WINGDIAPI HMETAFILE WINAPI CloseMetaFile(HDC hdc);
+ WINGDIAPI int WINAPI CombineRgn(HRGN hrgnDst,HRGN hrgnSrc1,HRGN hrgnSrc2,int iMode);
+ WINGDIAPI HMETAFILE WINAPI CopyMetaFileA(HMETAFILE,LPCSTR);
+ WINGDIAPI HMETAFILE WINAPI CopyMetaFileW(HMETAFILE,LPCWSTR);
+ WINGDIAPI HBITMAP WINAPI CreateBitmap(int nWidth,int nHeight,UINT nPlanes,UINT nBitCount,CONST VOID *lpBits);
+ WINGDIAPI HBITMAP WINAPI CreateBitmapIndirect(CONST BITMAP *pbm);
+ WINGDIAPI HBRUSH WINAPI CreateBrushIndirect(CONST LOGBRUSH *plbrush);
+ WINGDIAPI HBITMAP WINAPI CreateCompatibleBitmap(HDC hdc,int cx,int cy);
+ WINGDIAPI HBITMAP WINAPI CreateDiscardableBitmap(HDC hdc,int cx,int cy);
+ WINGDIAPI HDC WINAPI CreateCompatibleDC(HDC hdc);
+ WINGDIAPI HDC WINAPI CreateDCA(LPCSTR pwszDriver,LPCSTR pwszDevice,LPCSTR pszPort,CONST DEVMODEA *pdm);
+ WINGDIAPI HDC WINAPI CreateDCW(LPCWSTR pwszDriver,LPCWSTR pwszDevice,LPCWSTR pszPort,CONST DEVMODEW *pdm);
+ WINGDIAPI HBITMAP WINAPI CreateDIBitmap(HDC hdc,CONST BITMAPINFOHEADER *pbmih,DWORD flInit,CONST VOID *pjBits,CONST BITMAPINFO *pbmi,UINT iUsage);
+ WINGDIAPI HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL h,UINT iUsage);
+ WINGDIAPI HBRUSH WINAPI CreateDIBPatternBrushPt(CONST VOID *lpPackedDIB,UINT iUsage);
+ WINGDIAPI HRGN WINAPI CreateEllipticRgn(int x1,int y1,int x2,int y2);
+ WINGDIAPI HRGN WINAPI CreateEllipticRgnIndirect(CONST RECT *lprect);
+ WINGDIAPI HFONT WINAPI CreateFontIndirectA(CONST LOGFONTA *lplf);
+ WINGDIAPI HFONT WINAPI CreateFontIndirectW(CONST LOGFONTW *lplf);
+ WINGDIAPI HFONT WINAPI CreateFontA(int cHeight,int cWidth,int cEscapement,int cOrientation,int cWeight,DWORD bItalic,DWORD bUnderline,DWORD bStrikeOut,DWORD iCharSet,DWORD iOutPrecision,DWORD iClipPrecision,DWORD iQuality,DWORD iPitchAndFamily,LPCSTR pszFaceName);
+ WINGDIAPI HFONT WINAPI CreateFontW(int cHeight,int cWidth,int cEscapement,int cOrientation,int cWeight,DWORD bItalic,DWORD bUnderline,DWORD bStrikeOut,DWORD iCharSet,DWORD iOutPrecision,DWORD iClipPrecision,DWORD iQuality,DWORD iPitchAndFamily,LPCWSTR pszFaceName);
+ WINGDIAPI HBRUSH WINAPI CreateHatchBrush(int iHatch,COLORREF color);
+ WINGDIAPI HDC WINAPI CreateICA(LPCSTR pszDriver,LPCSTR pszDevice,LPCSTR pszPort,CONST DEVMODEA *pdm);
+ WINGDIAPI HDC WINAPI CreateICW(LPCWSTR pszDriver,LPCWSTR pszDevice,LPCWSTR pszPort,CONST DEVMODEW *pdm);
+ WINGDIAPI HDC WINAPI CreateMetaFileA(LPCSTR pszFile);
+ WINGDIAPI HDC WINAPI CreateMetaFileW(LPCWSTR pszFile);
+ WINGDIAPI HPALETTE WINAPI CreatePalette(CONST LOGPALETTE *plpal);
+ WINGDIAPI HPEN WINAPI CreatePen(int iStyle,int cWidth,COLORREF color);
+ WINGDIAPI HPEN WINAPI CreatePenIndirect(CONST LOGPEN *plpen);
+ WINGDIAPI HRGN WINAPI CreatePolyPolygonRgn(CONST POINT *pptl,CONST INT *pc,int cPoly,int iMode);
+ WINGDIAPI HBRUSH WINAPI CreatePatternBrush(HBITMAP hbm);
+ WINGDIAPI HRGN WINAPI CreateRectRgn(int x1,int y1,int x2,int y2);
+ WINGDIAPI HRGN WINAPI CreateRectRgnIndirect(CONST RECT *lprect);
+ WINGDIAPI HRGN WINAPI CreateRoundRectRgn(int x1,int y1,int x2,int y2,int w,int h);
+ WINGDIAPI WINBOOL WINAPI CreateScalableFontResourceA(DWORD fdwHidden,LPCSTR lpszFont,LPCSTR lpszFile,LPCSTR lpszPath);
+ WINGDIAPI WINBOOL WINAPI CreateScalableFontResourceW(DWORD fdwHidden,LPCWSTR lpszFont,LPCWSTR lpszFile,LPCWSTR lpszPath);
+ WINGDIAPI HBRUSH WINAPI CreateSolidBrush(COLORREF color);
+ WINGDIAPI WINBOOL WINAPI DeleteDC(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI DeleteMetaFile(HMETAFILE hmf);
+ WINGDIAPI WINBOOL WINAPI DeleteObject(HGDIOBJ ho);
+ WINGDIAPI int WINAPI DescribePixelFormat(HDC hdc,int iPixelFormat,UINT nBytes,LPPIXELFORMATDESCRIPTOR ppfd);
+
+ typedef UINT (CALLBACK *LPFNDEVMODE)(HWND,HMODULE,LPDEVMODE,LPSTR,LPSTR,LPDEVMODE,LPSTR,UINT);
+ typedef DWORD (CALLBACK *LPFNDEVCAPS)(LPSTR,LPSTR,UINT,LPSTR,LPDEVMODE);
+
+#define DM_UPDATE 1
+#define DM_COPY 2
+#define DM_PROMPT 4
+#define DM_MODIFY 8
+
+#define DM_IN_BUFFER DM_MODIFY
+#define DM_IN_PROMPT DM_PROMPT
+#define DM_OUT_BUFFER DM_COPY
+#define DM_OUT_DEFAULT DM_UPDATE
+
+#define DC_FIELDS 1
+#define DC_PAPERS 2
+#define DC_PAPERSIZE 3
+#define DC_MINEXTENT 4
+#define DC_MAXEXTENT 5
+#define DC_BINS 6
+#define DC_DUPLEX 7
+#define DC_SIZE 8
+#define DC_EXTRA 9
+#define DC_VERSION 10
+#define DC_DRIVER 11
+#define DC_BINNAMES 12
+#define DC_ENUMRESOLUTIONS 13
+#define DC_FILEDEPENDENCIES 14
+#define DC_TRUETYPE 15
+#define DC_PAPERNAMES 16
+#define DC_ORIENTATION 17
+#define DC_COPIES 18
+#define DC_BINADJUST 19
+#define DC_EMF_COMPLIANT 20
+#define DC_DATATYPE_PRODUCED 21
+#define DC_COLLATE 22
+#define DC_MANUFACTURER 23
+#define DC_MODEL 24
+#define DC_PERSONALITY 25
+#define DC_PRINTRATE 26
+#define DC_PRINTRATEUNIT 27
+#define PRINTRATEUNIT_PPM 1
+#define PRINTRATEUNIT_CPS 2
+#define PRINTRATEUNIT_LPM 3
+#define PRINTRATEUNIT_IPM 4
+#define DC_PRINTERMEM 28
+#define DC_MEDIAREADY 29
+#define DC_STAPLE 30
+#define DC_PRINTRATEPPM 31
+#define DC_COLORDEVICE 32
+#define DC_NUP 33
+#define DC_MEDIATYPENAMES 34
+#define DC_MEDIATYPES 35
+
+#define DCTT_BITMAP 0x0000001L
+#define DCTT_DOWNLOAD 0x0000002L
+#define DCTT_SUBDEV 0x0000004L
+#define DCTT_DOWNLOAD_OUTLINE 0x0000008L
+
+#define DCBA_FACEUPNONE 0x0000
+#define DCBA_FACEUPCENTER 0x0001
+#define DCBA_FACEUPLEFT 0x0002
+#define DCBA_FACEUPRIGHT 0x0003
+#define DCBA_FACEDOWNNONE 0x0100
+#define DCBA_FACEDOWNCENTER 0x0101
+#define DCBA_FACEDOWNLEFT 0x0102
+#define DCBA_FACEDOWNRIGHT 0x0103
+
+#ifdef UNICODE
+#define DeviceCapabilities DeviceCapabilitiesW
+#define EnumFontFamiliesEx EnumFontFamiliesExW
+#define EnumFontFamilies EnumFontFamiliesW
+#define EnumFonts EnumFontsW
+#define GetCharWidth GetCharWidthW
+#define GetCharWidth32 GetCharWidth32W
+#define GetCharWidthFloat GetCharWidthFloatW
+#define GetCharABCWidths GetCharABCWidthsW
+#define GetCharABCWidthsFloat GetCharABCWidthsFloatW
+#define GetGlyphOutline GetGlyphOutlineW
+#define GetMetaFile GetMetaFileW
+#else
+#define DeviceCapabilities DeviceCapabilitiesA
+#define EnumFontFamiliesEx EnumFontFamiliesExA
+#define EnumFontFamilies EnumFontFamiliesA
+#define EnumFonts EnumFontsA
+#define GetCharWidth GetCharWidthA
+#define GetCharWidth32 GetCharWidth32A
+#define GetCharWidthFloat GetCharWidthFloatA
+#define GetCharABCWidths GetCharABCWidthsA
+#define GetCharABCWidthsFloat GetCharABCWidthsFloatA
+#define GetGlyphOutline GetGlyphOutlineA
+#define GetMetaFile GetMetaFileA
+#endif
+
+ WINSPOOLAPI int WINAPI DeviceCapabilitiesA(LPCSTR pDevice,LPCSTR pPort,WORD fwCapability,LPSTR pOutput,CONST DEVMODEA *pDevMode);
+ WINSPOOLAPI int WINAPI DeviceCapabilitiesW(LPCWSTR pDevice,LPCWSTR pPort,WORD fwCapability,LPWSTR pOutput,CONST DEVMODEW *pDevMode);
+ WINGDIAPI int WINAPI DrawEscape(HDC hdc,int iEscape,int cjIn,LPCSTR lpIn);
+ WINGDIAPI WINBOOL WINAPI Ellipse(HDC hdc,int left,int top,int right,int bottom);
+ WINGDIAPI int WINAPI EnumFontFamiliesExA(HDC hdc,LPLOGFONTA lpLogfont,FONTENUMPROCA lpProc,LPARAM lParam,DWORD dwFlags);
+ WINGDIAPI int WINAPI EnumFontFamiliesExW(HDC hdc,LPLOGFONTW lpLogfont,FONTENUMPROCW lpProc,LPARAM lParam,DWORD dwFlags);
+ WINGDIAPI int WINAPI EnumFontFamiliesA(HDC hdc,LPCSTR lpLogfont,FONTENUMPROCA lpProc,LPARAM lParam);
+ WINGDIAPI int WINAPI EnumFontFamiliesW(HDC hdc,LPCWSTR lpLogfont,FONTENUMPROCW lpProc,LPARAM lParam);
+ WINGDIAPI int WINAPI EnumFontsA(HDC hdc,LPCSTR lpLogfont,FONTENUMPROCA lpProc,LPARAM lParam);
+ WINGDIAPI int WINAPI EnumFontsW(HDC hdc,LPCWSTR lpLogfont,FONTENUMPROCW lpProc,LPARAM lParam);
+ WINGDIAPI int WINAPI EnumObjects(HDC hdc,int nType,GOBJENUMPROC lpFunc,LPARAM lParam);
+ WINGDIAPI WINBOOL WINAPI EqualRgn(HRGN hrgn1,HRGN hrgn2);
+ WINGDIAPI int WINAPI Escape(HDC hdc,int iEscape,int cjIn,LPCSTR pvIn,LPVOID pvOut);
+ WINGDIAPI int WINAPI ExtEscape(HDC hdc,int iEscape,int cjInput,LPCSTR lpInData,int cjOutput,LPSTR lpOutData);
+ WINGDIAPI int WINAPI ExcludeClipRect(HDC hdc,int left,int top,int right,int bottom);
+ WINGDIAPI HRGN WINAPI ExtCreateRegion(CONST XFORM *lpx,DWORD nCount,CONST RGNDATA *lpData);
+ WINGDIAPI WINBOOL WINAPI ExtFloodFill(HDC hdc,int x,int y,COLORREF color,UINT type);
+ WINGDIAPI WINBOOL WINAPI FillRgn(HDC hdc,HRGN hrgn,HBRUSH hbr);
+ WINGDIAPI WINBOOL WINAPI FloodFill(HDC hdc,int x,int y,COLORREF color);
+ WINGDIAPI WINBOOL WINAPI FrameRgn(HDC hdc,HRGN hrgn,HBRUSH hbr,int w,int h);
+ WINGDIAPI int WINAPI GetROP2(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI GetAspectRatioFilterEx(HDC hdc,LPSIZE lpsize);
+ WINGDIAPI COLORREF WINAPI GetBkColor(HDC hdc);
+ WINGDIAPI COLORREF WINAPI GetDCBrushColor(HDC hdc);
+ WINGDIAPI COLORREF WINAPI GetDCPenColor(HDC hdc);
+ WINGDIAPI int WINAPI GetBkMode(HDC hdc);
+ WINGDIAPI LONG WINAPI GetBitmapBits(HBITMAP hbit,LONG cb,LPVOID lpvBits);
+ WINGDIAPI WINBOOL WINAPI GetBitmapDimensionEx(HBITMAP hbit,LPSIZE lpsize);
+ WINGDIAPI UINT WINAPI GetBoundsRect(HDC hdc,LPRECT lprect,UINT flags);
+ WINGDIAPI WINBOOL WINAPI GetBrushOrgEx(HDC hdc,LPPOINT lppt);
+ WINGDIAPI WINBOOL WINAPI GetCharWidthA(HDC hdc,UINT iFirst,UINT iLast,LPINT lpBuffer);
+ WINGDIAPI WINBOOL WINAPI GetCharWidthW(HDC hdc,UINT iFirst,UINT iLast,LPINT lpBuffer);
+ WINGDIAPI WINBOOL WINAPI GetCharWidth32A(HDC hdc,UINT iFirst,UINT iLast,LPINT lpBuffer);
+ WINGDIAPI WINBOOL WINAPI GetCharWidth32W(HDC hdc,UINT iFirst,UINT iLast,LPINT lpBuffer);
+ WINGDIAPI WINBOOL WINAPI GetCharWidthFloatA(HDC hdc,UINT iFirst,UINT iLast,PFLOAT lpBuffer);
+ WINGDIAPI WINBOOL WINAPI GetCharWidthFloatW(HDC hdc,UINT iFirst,UINT iLast,PFLOAT lpBuffer);
+ WINGDIAPI WINBOOL WINAPI GetCharABCWidthsA(HDC hdc,UINT wFirst,UINT wLast,LPABC lpABC);
+ WINGDIAPI WINBOOL WINAPI GetCharABCWidthsW(HDC hdc,UINT wFirst,UINT wLast,LPABC lpABC);
+ WINGDIAPI WINBOOL WINAPI GetCharABCWidthsFloatA(HDC hdc,UINT iFirst,UINT iLast,LPABCFLOAT lpABC);
+ WINGDIAPI WINBOOL WINAPI GetCharABCWidthsFloatW(HDC hdc,UINT iFirst,UINT iLast,LPABCFLOAT lpABC);
+ WINGDIAPI int WINAPI GetClipBox(HDC hdc,LPRECT lprect);
+ WINGDIAPI int WINAPI GetClipRgn(HDC hdc,HRGN hrgn);
+ WINGDIAPI int WINAPI GetMetaRgn(HDC hdc,HRGN hrgn);
+ WINGDIAPI HGDIOBJ WINAPI GetCurrentObject(HDC hdc,UINT type);
+ WINGDIAPI WINBOOL WINAPI GetCurrentPositionEx(HDC hdc,LPPOINT lppt);
+ WINGDIAPI int WINAPI GetDeviceCaps(HDC hdc,int index);
+ WINGDIAPI int WINAPI GetDIBits(HDC hdc,HBITMAP hbm,UINT start,UINT cLines,LPVOID lpvBits,LPBITMAPINFO lpbmi,UINT usage);
+ WINGDIAPI DWORD WINAPI GetFontData (HDC hdc,DWORD dwTable,DWORD dwOffset,PVOID pvBuffer,DWORD cjBuffer);
+ WINGDIAPI DWORD WINAPI GetGlyphOutlineA(HDC hdc,UINT uChar,UINT fuFormat,LPGLYPHMETRICS lpgm,DWORD cjBuffer,LPVOID pvBuffer,CONST MAT2 *lpmat2);
+ WINGDIAPI DWORD WINAPI GetGlyphOutlineW(HDC hdc,UINT uChar,UINT fuFormat,LPGLYPHMETRICS lpgm,DWORD cjBuffer,LPVOID pvBuffer,CONST MAT2 *lpmat2);
+ WINGDIAPI int WINAPI GetGraphicsMode(HDC hdc);
+ WINGDIAPI int WINAPI GetMapMode(HDC hdc);
+ WINGDIAPI UINT WINAPI GetMetaFileBitsEx(HMETAFILE hMF,UINT cbBuffer,LPVOID lpData);
+ WINGDIAPI HMETAFILE WINAPI GetMetaFileA(LPCSTR lpName);
+ WINGDIAPI HMETAFILE WINAPI GetMetaFileW(LPCWSTR lpName);
+ WINGDIAPI COLORREF WINAPI GetNearestColor(HDC hdc,COLORREF color);
+ WINGDIAPI UINT WINAPI GetNearestPaletteIndex(HPALETTE h,COLORREF color);
+ WINGDIAPI DWORD WINAPI GetObjectType(HGDIOBJ h);
+
+#ifndef NOTEXTMETRIC
+#ifdef UNICODE
+#define GetOutlineTextMetrics GetOutlineTextMetricsW
+#else
+#define GetOutlineTextMetrics GetOutlineTextMetricsA
+#endif
+
+ WINGDIAPI UINT WINAPI GetOutlineTextMetricsA(HDC hdc,UINT cjCopy,LPOUTLINETEXTMETRICA potm);
+ WINGDIAPI UINT WINAPI GetOutlineTextMetricsW(HDC hdc,UINT cjCopy,LPOUTLINETEXTMETRICW potm);
+#endif
+
+#ifdef UNICODE
+#define GetTextExtentPoint GetTextExtentPointW
+#define GetTextExtentPoint32 GetTextExtentPoint32W
+#define GetTextExtentExPoint GetTextExtentExPointW
+#define GetCharacterPlacement GetCharacterPlacementW
+#else
+#define GetTextExtentPoint GetTextExtentPointA
+#define GetTextExtentPoint32 GetTextExtentPoint32A
+#define GetTextExtentExPoint GetTextExtentExPointA
+#define GetCharacterPlacement GetCharacterPlacementA
+#endif
+
+ WINGDIAPI UINT WINAPI GetPaletteEntries(HPALETTE hpal,UINT iStart,UINT cEntries,LPPALETTEENTRY pPalEntries);
+ WINGDIAPI COLORREF WINAPI GetPixel(HDC hdc,int x,int y);
+ WINGDIAPI int WINAPI GetPixelFormat(HDC hdc);
+ WINGDIAPI int WINAPI GetPolyFillMode(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI GetRasterizerCaps(LPRASTERIZER_STATUS lpraststat,UINT cjBytes);
+ WINGDIAPI int WINAPI GetRandomRgn (HDC hdc,HRGN hrgn,INT i);
+ WINGDIAPI DWORD WINAPI GetRegionData(HRGN hrgn,DWORD nCount,LPRGNDATA lpRgnData);
+ WINGDIAPI int WINAPI GetRgnBox(HRGN hrgn,LPRECT lprc);
+ WINGDIAPI HGDIOBJ WINAPI GetStockObject(int i);
+ WINGDIAPI int WINAPI GetStretchBltMode(HDC hdc);
+ WINGDIAPI UINT WINAPI GetSystemPaletteEntries(HDC hdc,UINT iStart,UINT cEntries,LPPALETTEENTRY pPalEntries);
+ WINGDIAPI UINT WINAPI GetSystemPaletteUse(HDC hdc);
+ WINGDIAPI int WINAPI GetTextCharacterExtra(HDC hdc);
+ WINGDIAPI UINT WINAPI GetTextAlign(HDC hdc);
+ WINGDIAPI COLORREF WINAPI GetTextColor(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI GetTextExtentPointA(HDC hdc,LPCSTR lpString,int c,LPSIZE lpsz);
+ WINGDIAPI WINBOOL WINAPI GetTextExtentPointW(HDC hdc,LPCWSTR lpString,int c,LPSIZE lpsz);
+ WINGDIAPI WINBOOL WINAPI GetTextExtentPoint32A(HDC hdc,LPCSTR lpString,int c,LPSIZE psizl);
+ WINGDIAPI WINBOOL WINAPI GetTextExtentPoint32W(HDC hdc,LPCWSTR lpString,int c,LPSIZE psizl);
+ WINGDIAPI WINBOOL WINAPI GetTextExtentExPointA(HDC hdc,LPCSTR lpszString,int cchString,int nMaxExtent,LPINT lpnFit,LPINT lpnDx,LPSIZE lpSize);
+ WINGDIAPI WINBOOL WINAPI GetTextExtentExPointW(HDC hdc,LPCWSTR lpszString,int cchString,int nMaxExtent,LPINT lpnFit,LPINT lpnDx,LPSIZE lpSize);
+ WINGDIAPI int WINAPI GetTextCharset(HDC hdc);
+ WINGDIAPI int WINAPI GetTextCharsetInfo(HDC hdc,LPFONTSIGNATURE lpSig,DWORD dwFlags);
+ WINGDIAPI WINBOOL WINAPI TranslateCharsetInfo(DWORD *lpSrc,LPCHARSETINFO lpCs,DWORD dwFlags);
+ WINGDIAPI DWORD WINAPI GetFontLanguageInfo(HDC hdc);
+ WINGDIAPI DWORD WINAPI GetCharacterPlacementA(HDC hdc,LPCSTR lpString,int nCount,int nMexExtent,LPGCP_RESULTSA lpResults,DWORD dwFlags);
+ WINGDIAPI DWORD WINAPI GetCharacterPlacementW(HDC hdc,LPCWSTR lpString,int nCount,int nMexExtent,LPGCP_RESULTSW lpResults,DWORD dwFlags);
+
+ typedef struct tagWCRANGE {
+ WCHAR wcLow;
+ USHORT cGlyphs;
+ } WCRANGE,*PWCRANGE,*LPWCRANGE;
+
+ typedef struct tagGLYPHSET {
+ DWORD cbThis;
+ DWORD flAccel;
+ DWORD cGlyphsSupported;
+ DWORD cRanges;
+ WCRANGE ranges[1];
+ } GLYPHSET,*PGLYPHSET,*LPGLYPHSET;
+
+#define GS_8BIT_INDICES 0x00000001
+
+#define GGI_MARK_NONEXISTING_GLYPHS 0X0001
+
+#ifdef UNICODE
+#define GetGlyphIndices GetGlyphIndicesW
+#else
+#define GetGlyphIndices GetGlyphIndicesA
+#endif
+
+ WINGDIAPI DWORD WINAPI GetFontUnicodeRanges(HDC hdc,LPGLYPHSET lpgs);
+ WINGDIAPI DWORD WINAPI GetGlyphIndicesA(HDC hdc,LPCSTR lpstr,int c,LPWORD pgi,DWORD fl);
+ WINGDIAPI DWORD WINAPI GetGlyphIndicesW(HDC hdc,LPCWSTR lpstr,int c,LPWORD pgi,DWORD fl);
+ WINGDIAPI WINBOOL WINAPI GetTextExtentPointI(HDC hdc,LPWORD pgiIn,int cgi,LPSIZE psize);
+ WINGDIAPI WINBOOL WINAPI GetTextExtentExPointI (HDC hdc,LPWORD lpwszString,int cwchString,int nMaxExtent,LPINT lpnFit,LPINT lpnDx,LPSIZE lpSize);
+ WINGDIAPI WINBOOL WINAPI GetCharWidthI(HDC hdc,UINT giFirst,UINT cgi,LPWORD pgi,LPINT piWidths);
+ WINGDIAPI WINBOOL WINAPI GetCharABCWidthsI(HDC hdc,UINT giFirst,UINT cgi,LPWORD pgi,LPABC pabc);
+
+#define STAMP_DESIGNVECTOR (0x8000000 + 'd' + ('v' << 8))
+#define STAMP_AXESLIST (0x8000000 + 'a' + ('l' << 8))
+#define MM_MAX_NUMAXES 16
+
+ typedef struct tagDESIGNVECTOR {
+ DWORD dvReserved;
+ DWORD dvNumAxes;
+ LONG dvValues[MM_MAX_NUMAXES];
+ } DESIGNVECTOR,*PDESIGNVECTOR,*LPDESIGNVECTOR;
+
+#ifdef UNICODE
+#define AddFontResourceEx AddFontResourceExW
+#define RemoveFontResourceEx RemoveFontResourceExW
+#else
+#define AddFontResourceEx AddFontResourceExA
+#define RemoveFontResourceEx RemoveFontResourceExA
+#endif
+
+ WINGDIAPI int WINAPI AddFontResourceExA(LPCSTR name,DWORD fl,PVOID res);
+ WINGDIAPI int WINAPI AddFontResourceExW(LPCWSTR name,DWORD fl,PVOID res);
+ WINGDIAPI WINBOOL WINAPI RemoveFontResourceExA(LPCSTR name,DWORD fl,PVOID pdv);
+ WINGDIAPI WINBOOL WINAPI RemoveFontResourceExW(LPCWSTR name,DWORD fl,PVOID pdv);
+ WINGDIAPI HANDLE WINAPI AddFontMemResourceEx(PVOID pFileView,DWORD cjSize,PVOID pvResrved,DWORD *pNumFonts);
+ WINGDIAPI WINBOOL WINAPI RemoveFontMemResourceEx(HANDLE h);
+
+#define FR_PRIVATE 0x10
+#define FR_NOT_ENUM 0x20
+
+#define MM_MAX_AXES_NAMELEN 16
+
+ typedef struct tagAXISINFOA {
+ LONG axMinValue;
+ LONG axMaxValue;
+ BYTE axAxisName[MM_MAX_AXES_NAMELEN];
+ } AXISINFOA,*PAXISINFOA,*LPAXISINFOA;
+
+ typedef struct tagAXISINFOW {
+ LONG axMinValue;
+ LONG axMaxValue;
+ WCHAR axAxisName[MM_MAX_AXES_NAMELEN];
+ } AXISINFOW,*PAXISINFOW,*LPAXISINFOW;
+#ifdef UNICODE
+ typedef AXISINFOW AXISINFO;
+ typedef PAXISINFOW PAXISINFO;
+ typedef LPAXISINFOW LPAXISINFO;
+#else
+ typedef AXISINFOA AXISINFO;
+ typedef PAXISINFOA PAXISINFO;
+ typedef LPAXISINFOA LPAXISINFO;
+#endif
+
+ typedef struct tagAXESLISTA {
+ DWORD axlReserved;
+ DWORD axlNumAxes;
+ AXISINFOA axlAxisInfo[MM_MAX_NUMAXES];
+ } AXESLISTA,*PAXESLISTA,*LPAXESLISTA;
+
+ typedef struct tagAXESLISTW {
+ DWORD axlReserved;
+ DWORD axlNumAxes;
+ AXISINFOW axlAxisInfo[MM_MAX_NUMAXES];
+ } AXESLISTW,*PAXESLISTW,*LPAXESLISTW;
+#ifdef UNICODE
+ typedef AXESLISTW AXESLIST;
+ typedef PAXESLISTW PAXESLIST;
+ typedef LPAXESLISTW LPAXESLIST;
+#else
+ typedef AXESLISTA AXESLIST;
+ typedef PAXESLISTA PAXESLIST;
+ typedef LPAXESLISTA LPAXESLIST;
+#endif
+
+ typedef struct tagENUMLOGFONTEXDVA {
+ ENUMLOGFONTEXA elfEnumLogfontEx;
+ DESIGNVECTOR elfDesignVector;
+ } ENUMLOGFONTEXDVA,*PENUMLOGFONTEXDVA,*LPENUMLOGFONTEXDVA;
+
+ typedef struct tagENUMLOGFONTEXDVW {
+ ENUMLOGFONTEXW elfEnumLogfontEx;
+ DESIGNVECTOR elfDesignVector;
+ } ENUMLOGFONTEXDVW,*PENUMLOGFONTEXDVW,*LPENUMLOGFONTEXDVW;
+#ifdef UNICODE
+ typedef ENUMLOGFONTEXDVW ENUMLOGFONTEXDV;
+ typedef PENUMLOGFONTEXDVW PENUMLOGFONTEXDV;
+ typedef LPENUMLOGFONTEXDVW LPENUMLOGFONTEXDV;
+#else
+ typedef ENUMLOGFONTEXDVA ENUMLOGFONTEXDV;
+ typedef PENUMLOGFONTEXDVA PENUMLOGFONTEXDV;
+ typedef LPENUMLOGFONTEXDVA LPENUMLOGFONTEXDV;
+#endif
+
+#ifdef UNICODE
+#define CreateFontIndirectEx CreateFontIndirectExW
+#else
+#define CreateFontIndirectEx CreateFontIndirectExA
+#endif
+
+ WINGDIAPI HFONT WINAPI CreateFontIndirectExA(CONST ENUMLOGFONTEXDVA *);
+ WINGDIAPI HFONT WINAPI CreateFontIndirectExW(CONST ENUMLOGFONTEXDVW *);
+
+#ifndef NOTEXTMETRIC
+ typedef struct tagENUMTEXTMETRICA {
+ NEWTEXTMETRICEXA etmNewTextMetricEx;
+ AXESLISTA etmAxesList;
+ } ENUMTEXTMETRICA,*PENUMTEXTMETRICA,*LPENUMTEXTMETRICA;
+ typedef struct tagENUMTEXTMETRICW
+ {
+ NEWTEXTMETRICEXW etmNewTextMetricEx;
+ AXESLISTW etmAxesList;
+ } ENUMTEXTMETRICW,*PENUMTEXTMETRICW,*LPENUMTEXTMETRICW;
+#ifdef UNICODE
+ typedef ENUMTEXTMETRICW ENUMTEXTMETRIC;
+ typedef PENUMTEXTMETRICW PENUMTEXTMETRIC;
+ typedef LPENUMTEXTMETRICW LPENUMTEXTMETRIC;
+#else
+ typedef ENUMTEXTMETRICA ENUMTEXTMETRIC;
+ typedef PENUMTEXTMETRICA PENUMTEXTMETRIC;
+ typedef LPENUMTEXTMETRICA LPENUMTEXTMETRIC;
+#endif
+#endif
+
+#ifdef UNICODE
+#define ResetDC ResetDCW
+#define RemoveFontResource RemoveFontResourceW
+#else
+#define ResetDC ResetDCA
+#define RemoveFontResource RemoveFontResourceA
+#endif
+
+ WINGDIAPI WINBOOL WINAPI GetViewportExtEx(HDC hdc,LPSIZE lpsize);
+ WINGDIAPI WINBOOL WINAPI GetViewportOrgEx(HDC hdc,LPPOINT lppoint);
+ WINGDIAPI WINBOOL WINAPI GetWindowExtEx(HDC hdc,LPSIZE lpsize);
+ WINGDIAPI WINBOOL WINAPI GetWindowOrgEx(HDC hdc,LPPOINT lppoint);
+ WINGDIAPI int WINAPI IntersectClipRect(HDC hdc,int left,int top,int right,int bottom);
+ WINGDIAPI WINBOOL WINAPI InvertRgn(HDC hdc,HRGN hrgn);
+ WINGDIAPI WINBOOL WINAPI LineDDA(int xStart,int yStart,int xEnd,int yEnd,LINEDDAPROC lpProc,LPARAM data);
+ WINGDIAPI WINBOOL WINAPI LineTo(HDC hdc,int x,int y);
+ WINGDIAPI WINBOOL WINAPI MaskBlt(HDC hdcDest,int xDest,int yDest,int width,int height,HDC hdcSrc,int xSrc,int ySrc,HBITMAP hbmMask,int xMask,int yMask,DWORD rop);
+ WINGDIAPI WINBOOL WINAPI PlgBlt(HDC hdcDest,CONST POINT *lpPoint,HDC hdcSrc,int xSrc,int ySrc,int width,int height,HBITMAP hbmMask,int xMask,int yMask);
+ WINGDIAPI int WINAPI OffsetClipRgn(HDC hdc,int x,int y);
+ WINGDIAPI int WINAPI OffsetRgn(HRGN hrgn,int x,int y);
+ WINGDIAPI WINBOOL WINAPI PatBlt(HDC hdc,int x,int y,int w,int h,DWORD rop);
+ WINGDIAPI WINBOOL WINAPI Pie(HDC hdc,int left,int top,int right,int bottom,int xr1,int yr1,int xr2,int yr2);
+ WINGDIAPI WINBOOL WINAPI PlayMetaFile(HDC hdc,HMETAFILE hmf);
+ WINGDIAPI WINBOOL WINAPI PaintRgn(HDC hdc,HRGN hrgn);
+ WINGDIAPI WINBOOL WINAPI PolyPolygon(HDC hdc,CONST POINT *apt,CONST INT *asz,int csz);
+ WINGDIAPI WINBOOL WINAPI PtInRegion(HRGN hrgn,int x,int y);
+ WINGDIAPI WINBOOL WINAPI PtVisible(HDC hdc,int x,int y);
+ WINGDIAPI WINBOOL WINAPI RectInRegion(HRGN hrgn,CONST RECT *lprect);
+ WINGDIAPI WINBOOL WINAPI RectVisible(HDC hdc,CONST RECT *lprect);
+ WINGDIAPI WINBOOL WINAPI Rectangle(HDC hdc,int left,int top,int right,int bottom);
+ WINGDIAPI WINBOOL WINAPI RestoreDC(HDC hdc,int nSavedDC);
+ WINGDIAPI HDC WINAPI ResetDCA(HDC hdc,CONST DEVMODEA *lpdm);
+ WINGDIAPI HDC WINAPI ResetDCW(HDC hdc,CONST DEVMODEW *lpdm);
+ WINGDIAPI UINT WINAPI RealizePalette(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI RemoveFontResourceA(LPCSTR lpFileName);
+ WINGDIAPI WINBOOL WINAPI RemoveFontResourceW(LPCWSTR lpFileName);
+ WINGDIAPI WINBOOL WINAPI RoundRect(HDC hdc,int left,int top,int right,int bottom,int width,int height);
+ WINGDIAPI WINBOOL WINAPI ResizePalette(HPALETTE hpal,UINT n);
+ WINGDIAPI int WINAPI SaveDC(HDC hdc);
+ WINGDIAPI int WINAPI SelectClipRgn(HDC hdc,HRGN hrgn);
+ WINGDIAPI int WINAPI ExtSelectClipRgn(HDC hdc,HRGN hrgn,int mode);
+ WINGDIAPI int WINAPI SetMetaRgn(HDC hdc);
+ WINGDIAPI HGDIOBJ WINAPI SelectObject(HDC hdc,HGDIOBJ h);
+ WINGDIAPI HPALETTE WINAPI SelectPalette(HDC hdc,HPALETTE hPal,WINBOOL bForceBkgd);
+ WINGDIAPI COLORREF WINAPI SetBkColor(HDC hdc,COLORREF color);
+ WINGDIAPI COLORREF WINAPI SetDCBrushColor(HDC hdc,COLORREF color);
+ WINGDIAPI COLORREF WINAPI SetDCPenColor(HDC hdc,COLORREF color);
+ WINGDIAPI int WINAPI SetBkMode(HDC hdc,int mode);
+ WINGDIAPI LONG WINAPI SetBitmapBits(HBITMAP hbm,DWORD cb,CONST VOID *pvBits);
+ WINGDIAPI UINT WINAPI SetBoundsRect(HDC hdc,CONST RECT *lprect,UINT flags);
+ WINGDIAPI int WINAPI SetDIBits(HDC hdc,HBITMAP hbm,UINT start,UINT cLines,CONST VOID *lpBits,CONST BITMAPINFO *lpbmi,UINT ColorUse);
+ WINGDIAPI int WINAPI SetDIBitsToDevice(HDC hdc,int xDest,int yDest,DWORD w,DWORD h,int xSrc,int ySrc,UINT StartScan,UINT cLines,CONST VOID *lpvBits,CONST BITMAPINFO *lpbmi,UINT ColorUse);
+ WINGDIAPI DWORD WINAPI SetMapperFlags(HDC hdc,DWORD flags);
+ WINGDIAPI int WINAPI SetGraphicsMode(HDC hdc,int iMode);
+ WINGDIAPI int WINAPI SetMapMode(HDC hdc,int iMode);
+ WINGDIAPI DWORD WINAPI SetLayout(HDC hdc,DWORD l);
+ WINGDIAPI DWORD WINAPI GetLayout(HDC hdc);
+ WINGDIAPI HMETAFILE WINAPI SetMetaFileBitsEx(UINT cbBuffer,CONST BYTE *lpData);
+ WINGDIAPI UINT WINAPI SetPaletteEntries(HPALETTE hpal,UINT iStart,UINT cEntries,CONST PALETTEENTRY *pPalEntries);
+ WINGDIAPI COLORREF WINAPI SetPixel(HDC hdc,int x,int y,COLORREF color);
+ WINGDIAPI WINBOOL WINAPI SetPixelV(HDC hdc,int x,int y,COLORREF color);
+ WINGDIAPI WINBOOL WINAPI SetPixelFormat(HDC hdc,int format,CONST PIXELFORMATDESCRIPTOR *ppfd);
+ WINGDIAPI int WINAPI SetPolyFillMode(HDC hdc,int mode);
+ WINGDIAPI WINBOOL WINAPI StretchBlt(HDC hdcDest,int xDest,int yDest,int wDest,int hDest,HDC hdcSrc,int xSrc,int ySrc,int wSrc,int hSrc,DWORD rop);
+ WINGDIAPI WINBOOL WINAPI SetRectRgn(HRGN hrgn,int left,int top,int right,int bottom);
+ WINGDIAPI int WINAPI StretchDIBits(HDC hdc,int xDest,int yDest,int DestWidth,int DestHeight,int xSrc,int ySrc,int SrcWidth,int SrcHeight,CONST VOID *lpBits,CONST BITMAPINFO *lpbmi,UINT iUsage,DWORD rop);
+ WINGDIAPI int WINAPI SetROP2(HDC hdc,int rop2);
+ WINGDIAPI int WINAPI SetStretchBltMode(HDC hdc,int mode);
+ WINGDIAPI UINT WINAPI SetSystemPaletteUse(HDC hdc,UINT use);
+ WINGDIAPI int WINAPI SetTextCharacterExtra(HDC hdc,int extra);
+ WINGDIAPI COLORREF WINAPI SetTextColor(HDC hdc,COLORREF color);
+ WINGDIAPI UINT WINAPI SetTextAlign(HDC hdc,UINT align);
+ WINGDIAPI WINBOOL WINAPI SetTextJustification(HDC hdc,int extra,int count);
+ WINGDIAPI WINBOOL WINAPI UpdateColors(HDC hdc);
+
+ typedef USHORT COLOR16;
+
+ typedef struct _TRIVERTEX {
+ LONG x;
+ LONG y;
+ COLOR16 Red;
+ COLOR16 Green;
+ COLOR16 Blue;
+ COLOR16 Alpha;
+ } TRIVERTEX,*PTRIVERTEX,*LPTRIVERTEX;
+
+ typedef struct _GRADIENT_TRIANGLE {
+ ULONG Vertex1;
+ ULONG Vertex2;
+ ULONG Vertex3;
+ } GRADIENT_TRIANGLE,*PGRADIENT_TRIANGLE,*LPGRADIENT_TRIANGLE;
+
+ typedef struct _GRADIENT_RECT {
+ ULONG UpperLeft;
+ ULONG LowerRight;
+ } GRADIENT_RECT,*PGRADIENT_RECT,*LPGRADIENT_RECT;
+
+ typedef struct _BLENDFUNCTION {
+ BYTE BlendOp;
+ BYTE BlendFlags;
+ BYTE SourceConstantAlpha;
+ BYTE AlphaFormat;
+ } BLENDFUNCTION,*PBLENDFUNCTION;
+
+#define AC_SRC_OVER 0x00
+#define AC_SRC_ALPHA 0x01
+
+ WINGDIAPI WINBOOL WINAPI AlphaBlend(HDC hdcDest,int xoriginDest,int yoriginDest,int wDest,int hDest,HDC hdcSrc,int xoriginSrc,int yoriginSrc,int wSrc,int hSrc,BLENDFUNCTION ftn);
+ WINGDIAPI WINBOOL WINAPI TransparentBlt(HDC hdcDest,int xoriginDest,int yoriginDest,int wDest,int hDest,HDC hdcSrc,int xoriginSrc,int yoriginSrc,int wSrc,int hSrc,UINT crTransparent);
+
+#define GRADIENT_FILL_RECT_H 0x00000000
+#define GRADIENT_FILL_RECT_V 0x00000001
+#define GRADIENT_FILL_TRIANGLE 0x00000002
+#define GRADIENT_FILL_OP_FLAG 0x000000ff
+
+ WINGDIAPI WINBOOL WINAPI GradientFill(HDC hdc,PTRIVERTEX pVertex,ULONG nVertex,PVOID pMesh,ULONG nMesh,ULONG ulMode);
+
+#ifndef NOMETAFILE
+
+#ifdef UNICODE
+#define CopyEnhMetaFile CopyEnhMetaFileW
+#define CreateEnhMetaFile CreateEnhMetaFileW
+#define GetEnhMetaFile GetEnhMetaFileW
+#define GetEnhMetaFileDescription GetEnhMetaFileDescriptionW
+#else
+#define CopyEnhMetaFile CopyEnhMetaFileA
+#define CreateEnhMetaFile CreateEnhMetaFileA
+#define GetEnhMetaFile GetEnhMetaFileA
+#define GetEnhMetaFileDescription GetEnhMetaFileDescriptionA
+#endif
+
+ WINGDIAPI WINBOOL WINAPI PlayMetaFileRecord(HDC hdc,LPHANDLETABLE lpHandleTable,LPMETARECORD lpMR,UINT noObjs);
+
+ typedef int (CALLBACK *MFENUMPROC)(HDC hdc,HANDLETABLE *lpht,METARECORD *lpMR,int nObj,LPARAM param);
+
+ WINGDIAPI WINBOOL WINAPI EnumMetaFile(HDC hdc,HMETAFILE hmf,MFENUMPROC proc,LPARAM param);
+
+ typedef int (CALLBACK *ENHMFENUMPROC)(HDC hdc,HANDLETABLE *lpht,CONST ENHMETARECORD *lpmr,int hHandles,LPARAM data);
+
+ WINGDIAPI HENHMETAFILE WINAPI CloseEnhMetaFile(HDC hdc);
+ WINGDIAPI HENHMETAFILE WINAPI CopyEnhMetaFileA(HENHMETAFILE hEnh,LPCSTR lpFileName);
+ WINGDIAPI HENHMETAFILE WINAPI CopyEnhMetaFileW(HENHMETAFILE hEnh,LPCWSTR lpFileName);
+ WINGDIAPI HDC WINAPI CreateEnhMetaFileA(HDC hdc,LPCSTR lpFilename,CONST RECT *lprc,LPCSTR lpDesc);
+ WINGDIAPI HDC WINAPI CreateEnhMetaFileW(HDC hdc,LPCWSTR lpFilename,CONST RECT *lprc,LPCWSTR lpDesc);
+ WINGDIAPI WINBOOL WINAPI DeleteEnhMetaFile(HENHMETAFILE hmf);
+ WINGDIAPI WINBOOL WINAPI EnumEnhMetaFile(HDC hdc,HENHMETAFILE hmf,ENHMFENUMPROC proc,LPVOID param,CONST RECT *lpRect);
+ WINGDIAPI HENHMETAFILE WINAPI GetEnhMetaFileA(LPCSTR lpName);
+ WINGDIAPI HENHMETAFILE WINAPI GetEnhMetaFileW(LPCWSTR lpName);
+ WINGDIAPI UINT WINAPI GetEnhMetaFileBits(HENHMETAFILE hEMF,UINT nSize,LPBYTE lpData);
+ WINGDIAPI UINT WINAPI GetEnhMetaFileDescriptionA(HENHMETAFILE hemf,UINT cchBuffer,LPSTR lpDescription);
+ WINGDIAPI UINT WINAPI GetEnhMetaFileDescriptionW(HENHMETAFILE hemf,UINT cchBuffer,LPWSTR lpDescription);
+ WINGDIAPI UINT WINAPI GetEnhMetaFileHeader(HENHMETAFILE hemf,UINT nSize,LPENHMETAHEADER lpEnhMetaHeader);
+ WINGDIAPI UINT WINAPI GetEnhMetaFilePaletteEntries(HENHMETAFILE hemf,UINT nNumEntries,LPPALETTEENTRY lpPaletteEntries);
+ WINGDIAPI UINT WINAPI GetEnhMetaFilePixelFormat(HENHMETAFILE hemf,UINT cbBuffer,PIXELFORMATDESCRIPTOR *ppfd);
+ WINGDIAPI UINT WINAPI GetWinMetaFileBits(HENHMETAFILE hemf,UINT cbData16,LPBYTE pData16,INT iMapMode,HDC hdcRef);
+ WINGDIAPI WINBOOL WINAPI PlayEnhMetaFile(HDC hdc,HENHMETAFILE hmf,CONST RECT *lprect);
+ WINGDIAPI WINBOOL WINAPI PlayEnhMetaFileRecord(HDC hdc,LPHANDLETABLE pht,CONST ENHMETARECORD *pmr,UINT cht);
+ WINGDIAPI HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT nSize,CONST BYTE *pb);
+ WINGDIAPI HENHMETAFILE WINAPI SetWinMetaFileBits(UINT nSize,CONST BYTE *lpMeta16Data,HDC hdcRef,CONST METAFILEPICT *lpMFP);
+ WINGDIAPI WINBOOL WINAPI GdiComment(HDC hdc,UINT nSize,CONST BYTE *lpData);
+#endif
+
+#ifndef NOTEXTMETRIC
+#ifdef UNICODE
+#define GetTextMetrics GetTextMetricsW
+#else
+#define GetTextMetrics GetTextMetricsA
+#endif
+
+ WINGDIAPI WINBOOL WINAPI GetTextMetricsA(HDC hdc,LPTEXTMETRICA lptm);
+ WINGDIAPI WINBOOL WINAPI GetTextMetricsW(HDC hdc,LPTEXTMETRICW lptm);
+#endif
+
+ typedef struct tagDIBSECTION {
+ BITMAP dsBm;
+ BITMAPINFOHEADER dsBmih;
+ DWORD dsBitfields[3];
+ HANDLE dshSection;
+ DWORD dsOffset;
+ } DIBSECTION,*LPDIBSECTION,*PDIBSECTION;
+
+ WINGDIAPI WINBOOL WINAPI AngleArc(HDC hdc,int x,int y,DWORD r,FLOAT StartAngle,FLOAT SweepAngle);
+ WINGDIAPI WINBOOL WINAPI PolyPolyline(HDC hdc,CONST POINT *apt,CONST DWORD *asz,DWORD csz);
+ WINGDIAPI WINBOOL WINAPI GetWorldTransform(HDC hdc,LPXFORM lpxf);
+ WINGDIAPI WINBOOL WINAPI SetWorldTransform(HDC hdc,CONST XFORM *lpxf);
+ WINGDIAPI WINBOOL WINAPI ModifyWorldTransform(HDC hdc,CONST XFORM *lpxf,DWORD mode);
+ WINGDIAPI WINBOOL WINAPI CombineTransform(LPXFORM lpxfOut,CONST XFORM *lpxf1,CONST XFORM *lpxf2);
+ WINGDIAPI HBITMAP WINAPI CreateDIBSection(HDC hdc,CONST BITMAPINFO *lpbmi,UINT usage,VOID **ppvBits,HANDLE hSection,DWORD offset);
+ WINGDIAPI UINT WINAPI GetDIBColorTable(HDC hdc,UINT iStart,UINT cEntries,RGBQUAD *prgbq);
+ WINGDIAPI UINT WINAPI SetDIBColorTable(HDC hdc,UINT iStart,UINT cEntries,CONST RGBQUAD *prgbq);
+
+#define CA_NEGATIVE 0x0001
+#define CA_LOG_FILTER 0x0002
+
+#define ILLUMINANT_DEVICE_DEFAULT 0
+#define ILLUMINANT_A 1
+#define ILLUMINANT_B 2
+#define ILLUMINANT_C 3
+#define ILLUMINANT_D50 4
+#define ILLUMINANT_D55 5
+#define ILLUMINANT_D65 6
+#define ILLUMINANT_D75 7
+#define ILLUMINANT_F2 8
+#define ILLUMINANT_MAX_INDEX ILLUMINANT_F2
+
+#define ILLUMINANT_TUNGSTEN ILLUMINANT_A
+#define ILLUMINANT_DAYLIGHT ILLUMINANT_C
+#define ILLUMINANT_FLUORESCENT ILLUMINANT_F2
+#define ILLUMINANT_NTSC ILLUMINANT_C
+
+#define RGB_GAMMA_MIN (WORD)02500
+#define RGB_GAMMA_MAX (WORD)65000
+
+#define REFERENCE_WHITE_MIN (WORD)6000
+#define REFERENCE_WHITE_MAX (WORD)10000
+#define REFERENCE_BLACK_MIN (WORD)0
+#define REFERENCE_BLACK_MAX (WORD)4000
+
+#define COLOR_ADJ_MIN (SHORT)-100
+#define COLOR_ADJ_MAX (SHORT)100
+
+ typedef struct tagCOLORADJUSTMENT {
+ WORD caSize;
+ WORD caFlags;
+ WORD caIlluminantIndex;
+ WORD caRedGamma;
+ WORD caGreenGamma;
+ WORD caBlueGamma;
+ WORD caReferenceBlack;
+ WORD caReferenceWhite;
+ SHORT caContrast;
+ SHORT caBrightness;
+ SHORT caColorfulness;
+ SHORT caRedGreenTint;
+ } COLORADJUSTMENT,*PCOLORADJUSTMENT,*LPCOLORADJUSTMENT;
+
+ WINGDIAPI WINBOOL WINAPI SetColorAdjustment(HDC hdc,CONST COLORADJUSTMENT *lpca);
+ WINGDIAPI WINBOOL WINAPI GetColorAdjustment(HDC hdc,LPCOLORADJUSTMENT lpca);
+ WINGDIAPI HPALETTE WINAPI CreateHalftonePalette(HDC hdc);
+
+ typedef WINBOOL (CALLBACK *ABORTPROC)(HDC,int);
+
+ typedef struct _DOCINFOA {
+ int cbSize;
+ LPCSTR lpszDocName;
+ LPCSTR lpszOutput;
+ LPCSTR lpszDatatype;
+ DWORD fwType;
+ } DOCINFOA,*LPDOCINFOA;
+
+ typedef struct _DOCINFOW {
+ int cbSize;
+ LPCWSTR lpszDocName;
+ LPCWSTR lpszOutput;
+ LPCWSTR lpszDatatype;
+ DWORD fwType;
+ } DOCINFOW,*LPDOCINFOW;
+
+#ifdef UNICODE
+ typedef DOCINFOW DOCINFO;
+ typedef LPDOCINFOW LPDOCINFO;
+#else
+ typedef DOCINFOA DOCINFO;
+ typedef LPDOCINFOA LPDOCINFO;
+#endif
+
+#define DI_APPBANDING 0x00000001
+#define DI_ROPS_READ_DESTINATION 0x00000002
+
+#ifdef UNICODE
+#define StartDoc StartDocW
+#define GetObject GetObjectW
+#define TextOut TextOutW
+#define ExtTextOut ExtTextOutW
+#define PolyTextOut PolyTextOutW
+#define GetTextFace GetTextFaceW
+#else
+#define StartDoc StartDocA
+#define GetObject GetObjectA
+#define TextOut TextOutA
+#define ExtTextOut ExtTextOutA
+#define PolyTextOut PolyTextOutA
+#define GetTextFace GetTextFaceA
+#endif
+
+ WINGDIAPI int WINAPI StartDocA(HDC hdc,CONST DOCINFOA *lpdi);
+ WINGDIAPI int WINAPI StartDocW(HDC hdc,CONST DOCINFOW *lpdi);
+ WINGDIAPI int WINAPI EndDoc(HDC hdc);
+ WINGDIAPI int WINAPI StartPage(HDC hdc);
+ WINGDIAPI int WINAPI EndPage(HDC hdc);
+ WINGDIAPI int WINAPI AbortDoc(HDC hdc);
+ WINGDIAPI int WINAPI SetAbortProc(HDC hdc,ABORTPROC proc);
+ WINGDIAPI WINBOOL WINAPI AbortPath(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI ArcTo(HDC hdc,int left,int top,int right,int bottom,int xr1,int yr1,int xr2,int yr2);
+ WINGDIAPI WINBOOL WINAPI BeginPath(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI CloseFigure(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI EndPath(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI FillPath(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI FlattenPath(HDC hdc);
+ WINGDIAPI int WINAPI GetPath(HDC hdc,LPPOINT apt,LPBYTE aj,int cpt);
+ WINGDIAPI HRGN WINAPI PathToRegion(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI PolyDraw(HDC hdc,CONST POINT *apt,CONST BYTE *aj,int cpt);
+ WINGDIAPI WINBOOL WINAPI SelectClipPath(HDC hdc,int mode);
+ WINGDIAPI int WINAPI SetArcDirection(HDC hdc,int dir);
+ WINGDIAPI WINBOOL WINAPI SetMiterLimit(HDC hdc,FLOAT limit,PFLOAT old);
+ WINGDIAPI WINBOOL WINAPI StrokeAndFillPath(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI StrokePath(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI WidenPath(HDC hdc);
+ WINGDIAPI HPEN WINAPI ExtCreatePen(DWORD iPenStyle,DWORD cWidth,CONST LOGBRUSH *plbrush,DWORD cStyle,CONST DWORD *pstyle);
+ WINGDIAPI WINBOOL WINAPI GetMiterLimit(HDC hdc,PFLOAT plimit);
+ WINGDIAPI int WINAPI GetArcDirection(HDC hdc);
+ WINGDIAPI int WINAPI GetObjectA(HANDLE h,int c,LPVOID pv);
+ WINGDIAPI int WINAPI GetObjectW(HANDLE h,int c,LPVOID pv);
+ WINGDIAPI WINBOOL WINAPI MoveToEx(HDC hdc,int x,int y,LPPOINT lppt);
+ WINGDIAPI WINBOOL WINAPI TextOutA(HDC hdc,int x,int y,LPCSTR lpString,int c);
+ WINGDIAPI WINBOOL WINAPI TextOutW(HDC hdc,int x,int y,LPCWSTR lpString,int c);
+ WINGDIAPI WINBOOL WINAPI ExtTextOutA(HDC hdc,int x,int y,UINT options,CONST RECT *lprect,LPCSTR lpString,UINT c,CONST INT *lpDx);
+ WINGDIAPI WINBOOL WINAPI ExtTextOutW(HDC hdc,int x,int y,UINT options,CONST RECT *lprect,LPCWSTR lpString,UINT c,CONST INT *lpDx);
+ WINGDIAPI WINBOOL WINAPI PolyTextOutA(HDC hdc,CONST POLYTEXTA *ppt,int nstrings);
+ WINGDIAPI WINBOOL WINAPI PolyTextOutW(HDC hdc,CONST POLYTEXTW *ppt,int nstrings);
+ WINGDIAPI HRGN WINAPI CreatePolygonRgn(CONST POINT *pptl,int cPoint,int iMode);
+ WINGDIAPI WINBOOL WINAPI DPtoLP(HDC hdc,LPPOINT lppt,int c);
+ WINGDIAPI WINBOOL WINAPI LPtoDP(HDC hdc,LPPOINT lppt,int c);
+ WINGDIAPI WINBOOL WINAPI Polygon(HDC hdc,CONST POINT *apt,int cpt);
+ WINGDIAPI WINBOOL WINAPI Polyline(HDC hdc,CONST POINT *apt,int cpt);
+ WINGDIAPI WINBOOL WINAPI PolyBezier(HDC hdc,CONST POINT *apt,DWORD cpt);
+ WINGDIAPI WINBOOL WINAPI PolyBezierTo(HDC hdc,CONST POINT *apt,DWORD cpt);
+ WINGDIAPI WINBOOL WINAPI PolylineTo(HDC hdc,CONST POINT *apt,DWORD cpt);
+ WINGDIAPI WINBOOL WINAPI SetViewportExtEx(HDC hdc,int x,int y,LPSIZE lpsz);
+ WINGDIAPI WINBOOL WINAPI SetViewportOrgEx(HDC hdc,int x,int y,LPPOINT lppt);
+ WINGDIAPI WINBOOL WINAPI SetWindowExtEx(HDC hdc,int x,int y,LPSIZE lpsz);
+ WINGDIAPI WINBOOL WINAPI SetWindowOrgEx(HDC hdc,int x,int y,LPPOINT lppt);
+ WINGDIAPI WINBOOL WINAPI OffsetViewportOrgEx(HDC hdc,int x,int y,LPPOINT lppt);
+ WINGDIAPI WINBOOL WINAPI OffsetWindowOrgEx(HDC hdc,int x,int y,LPPOINT lppt);
+ WINGDIAPI WINBOOL WINAPI ScaleViewportExtEx(HDC hdc,int xn,int dx,int yn,int yd,LPSIZE lpsz);
+ WINGDIAPI WINBOOL WINAPI ScaleWindowExtEx(HDC hdc,int xn,int xd,int yn,int yd,LPSIZE lpsz);
+ WINGDIAPI WINBOOL WINAPI SetBitmapDimensionEx(HBITMAP hbm,int w,int h,LPSIZE lpsz);
+ WINGDIAPI WINBOOL WINAPI SetBrushOrgEx(HDC hdc,int x,int y,LPPOINT lppt);
+ WINGDIAPI int WINAPI GetTextFaceA(HDC hdc,int c,LPSTR lpName);
+ WINGDIAPI int WINAPI GetTextFaceW(HDC hdc,int c,LPWSTR lpName);
+
+#define FONTMAPPER_MAX 10
+
+ typedef struct tagKERNINGPAIR {
+ WORD wFirst;
+ WORD wSecond;
+ int iKernAmount;
+ } KERNINGPAIR,*LPKERNINGPAIR;
+
+#ifdef UNICODE
+#define GetKerningPairs GetKerningPairsW
+#else
+#define GetKerningPairs GetKerningPairsA
+#endif
+
+ WINGDIAPI DWORD WINAPI GetKerningPairsA(HDC hdc,DWORD nPairs,LPKERNINGPAIR lpKernPair);
+ WINGDIAPI DWORD WINAPI GetKerningPairsW(HDC hdc,DWORD nPairs,LPKERNINGPAIR lpKernPair);
+ WINGDIAPI WINBOOL WINAPI GetDCOrgEx(HDC hdc,LPPOINT lppt);
+ WINGDIAPI WINBOOL WINAPI FixBrushOrgEx(HDC hdc,int x,int y,LPPOINT ptl);
+ WINGDIAPI WINBOOL WINAPI UnrealizeObject(HGDIOBJ h);
+ WINGDIAPI WINBOOL WINAPI GdiFlush();
+ WINGDIAPI DWORD WINAPI GdiSetBatchLimit(DWORD dw);
+ WINGDIAPI DWORD WINAPI GdiGetBatchLimit();
+
+#define ICM_OFF 1
+#define ICM_ON 2
+#define ICM_QUERY 3
+#define ICM_DONE_OUTSIDEDC 4
+
+ typedef int (CALLBACK *ICMENUMPROCA)(LPSTR,LPARAM);
+ typedef int (CALLBACK *ICMENUMPROCW)(LPWSTR,LPARAM);
+
+#ifdef UNICODE
+#define ICMENUMPROC ICMENUMPROCW
+#define EnumICMProfiles EnumICMProfilesW
+#define UpdateICMRegKey UpdateICMRegKeyW
+#define GetLogColorSpace GetLogColorSpaceW
+#define CreateColorSpace CreateColorSpaceW
+#define GetICMProfile GetICMProfileW
+#define SetICMProfile SetICMProfileW
+#else
+#define ICMENUMPROC ICMENUMPROCA
+#define EnumICMProfiles EnumICMProfilesA
+#define UpdateICMRegKey UpdateICMRegKeyA
+#define GetLogColorSpace GetLogColorSpaceA
+#define CreateColorSpace CreateColorSpaceA
+#define GetICMProfile GetICMProfileA
+#define SetICMProfile SetICMProfileA
+#endif
+
+ WINGDIAPI int WINAPI SetICMMode(HDC hdc,int mode);
+ WINGDIAPI WINBOOL WINAPI CheckColorsInGamut(HDC hdc,LPVOID lpRGBTriple,LPVOID dlpBuffer,DWORD nCount);
+ WINGDIAPI HCOLORSPACE WINAPI GetColorSpace(HDC hdc);
+ WINGDIAPI WINBOOL WINAPI GetLogColorSpaceA(HCOLORSPACE hColorSpace,LPLOGCOLORSPACEA lpBuffer,DWORD nSize);
+ WINGDIAPI WINBOOL WINAPI GetLogColorSpaceW(HCOLORSPACE hColorSpace,LPLOGCOLORSPACEW lpBuffer,DWORD nSize);
+ WINGDIAPI HCOLORSPACE WINAPI CreateColorSpaceA(LPLOGCOLORSPACEA lplcs);
+ WINGDIAPI HCOLORSPACE WINAPI CreateColorSpaceW(LPLOGCOLORSPACEW lplcs);
+ WINGDIAPI HCOLORSPACE WINAPI SetColorSpace(HDC hdc,HCOLORSPACE hcs);
+ WINGDIAPI WINBOOL WINAPI DeleteColorSpace(HCOLORSPACE hcs);
+ WINGDIAPI WINBOOL WINAPI GetICMProfileA(HDC hdc,LPDWORD pBufSize,LPSTR pszFilename);
+ WINGDIAPI WINBOOL WINAPI GetICMProfileW(HDC hdc,LPDWORD pBufSize,LPWSTR pszFilename);
+ WINGDIAPI WINBOOL WINAPI SetICMProfileA(HDC hdc,LPSTR lpFileName);
+ WINGDIAPI WINBOOL WINAPI SetICMProfileW(HDC hdc,LPWSTR lpFileName);
+ WINGDIAPI WINBOOL WINAPI GetDeviceGammaRamp(HDC hdc,LPVOID lpRamp);
+ WINGDIAPI WINBOOL WINAPI SetDeviceGammaRamp(HDC hdc,LPVOID lpRamp);
+ WINGDIAPI WINBOOL WINAPI ColorMatchToTarget(HDC hdc,HDC hdcTarget,DWORD action);
+ WINGDIAPI int WINAPI EnumICMProfilesA(HDC hdc,ICMENUMPROCA proc,LPARAM param);
+ WINGDIAPI int WINAPI EnumICMProfilesW(HDC hdc,ICMENUMPROCW proc,LPARAM param);
+ WINGDIAPI WINBOOL WINAPI UpdateICMRegKeyA(DWORD reserved,LPSTR lpszCMID,LPSTR lpszFileName,UINT command);
+ WINGDIAPI WINBOOL WINAPI UpdateICMRegKeyW(DWORD reserved,LPWSTR lpszCMID,LPWSTR lpszFileName,UINT command);
+ WINGDIAPI WINBOOL WINAPI ColorCorrectPalette(HDC hdc,HPALETTE hPal,DWORD deFirst,DWORD num);
+
+#ifndef NOMETAFILE
+
+#define ENHMETA_SIGNATURE 0x464D4520
+#define ENHMETA_STOCK_OBJECT 0x80000000
+
+#define EMR_HEADER 1
+#define EMR_POLYBEZIER 2
+#define EMR_POLYGON 3
+#define EMR_POLYLINE 4
+#define EMR_POLYBEZIERTO 5
+#define EMR_POLYLINETO 6
+#define EMR_POLYPOLYLINE 7
+#define EMR_POLYPOLYGON 8
+#define EMR_SETWINDOWEXTEX 9
+#define EMR_SETWINDOWORGEX 10
+#define EMR_SETVIEWPORTEXTEX 11
+#define EMR_SETVIEWPORTORGEX 12
+#define EMR_SETBRUSHORGEX 13
+#define EMR_EOF 14
+#define EMR_SETPIXELV 15
+#define EMR_SETMAPPERFLAGS 16
+#define EMR_SETMAPMODE 17
+#define EMR_SETBKMODE 18
+#define EMR_SETPOLYFILLMODE 19
+#define EMR_SETROP2 20
+#define EMR_SETSTRETCHBLTMODE 21
+#define EMR_SETTEXTALIGN 22
+#define EMR_SETCOLORADJUSTMENT 23
+#define EMR_SETTEXTCOLOR 24
+#define EMR_SETBKCOLOR 25
+#define EMR_OFFSETCLIPRGN 26
+#define EMR_MOVETOEX 27
+#define EMR_SETMETARGN 28
+#define EMR_EXCLUDECLIPRECT 29
+#define EMR_INTERSECTCLIPRECT 30
+#define EMR_SCALEVIEWPORTEXTEX 31
+#define EMR_SCALEWINDOWEXTEX 32
+#define EMR_SAVEDC 33
+#define EMR_RESTOREDC 34
+#define EMR_SETWORLDTRANSFORM 35
+#define EMR_MODIFYWORLDTRANSFORM 36
+#define EMR_SELECTOBJECT 37
+#define EMR_CREATEPEN 38
+#define EMR_CREATEBRUSHINDIRECT 39
+#define EMR_DELETEOBJECT 40
+#define EMR_ANGLEARC 41
+#define EMR_ELLIPSE 42
+#define EMR_RECTANGLE 43
+#define EMR_ROUNDRECT 44
+#define EMR_ARC 45
+#define EMR_CHORD 46
+#define EMR_PIE 47
+#define EMR_SELECTPALETTE 48
+#define EMR_CREATEPALETTE 49
+#define EMR_SETPALETTEENTRIES 50
+#define EMR_RESIZEPALETTE 51
+#define EMR_REALIZEPALETTE 52
+#define EMR_EXTFLOODFILL 53
+#define EMR_LINETO 54
+#define EMR_ARCTO 55
+#define EMR_POLYDRAW 56
+#define EMR_SETARCDIRECTION 57
+#define EMR_SETMITERLIMIT 58
+#define EMR_BEGINPATH 59
+#define EMR_ENDPATH 60
+#define EMR_CLOSEFIGURE 61
+#define EMR_FILLPATH 62
+#define EMR_STROKEANDFILLPATH 63
+#define EMR_STROKEPATH 64
+#define EMR_FLATTENPATH 65
+#define EMR_WIDENPATH 66
+#define EMR_SELECTCLIPPATH 67
+#define EMR_ABORTPATH 68
+
+#define EMR_GDICOMMENT 70
+#define EMR_FILLRGN 71
+#define EMR_FRAMERGN 72
+#define EMR_INVERTRGN 73
+#define EMR_PAINTRGN 74
+#define EMR_EXTSELECTCLIPRGN 75
+#define EMR_BITBLT 76
+#define EMR_STRETCHBLT 77
+#define EMR_MASKBLT 78
+#define EMR_PLGBLT 79
+#define EMR_SETDIBITSTODEVICE 80
+#define EMR_STRETCHDIBITS 81
+#define EMR_EXTCREATEFONTINDIRECTW 82
+#define EMR_EXTTEXTOUTA 83
+#define EMR_EXTTEXTOUTW 84
+#define EMR_POLYBEZIER16 85
+#define EMR_POLYGON16 86
+#define EMR_POLYLINE16 87
+#define EMR_POLYBEZIERTO16 88
+#define EMR_POLYLINETO16 89
+#define EMR_POLYPOLYLINE16 90
+#define EMR_POLYPOLYGON16 91
+#define EMR_POLYDRAW16 92
+#define EMR_CREATEMONOBRUSH 93
+#define EMR_CREATEDIBPATTERNBRUSHPT 94
+#define EMR_EXTCREATEPEN 95
+#define EMR_POLYTEXTOUTA 96
+#define EMR_POLYTEXTOUTW 97
+
+#define EMR_SETICMMODE 98
+#define EMR_CREATECOLORSPACE 99
+#define EMR_SETCOLORSPACE 100
+#define EMR_DELETECOLORSPACE 101
+#define EMR_GLSRECORD 102
+#define EMR_GLSBOUNDEDRECORD 103
+#define EMR_PIXELFORMAT 104
+#define EMR_RESERVED_105 105
+#define EMR_RESERVED_106 106
+#define EMR_RESERVED_107 107
+#define EMR_RESERVED_108 108
+#define EMR_RESERVED_109 109
+#define EMR_RESERVED_110 110
+#define EMR_COLORCORRECTPALETTE 111
+#define EMR_SETICMPROFILEA 112
+#define EMR_SETICMPROFILEW 113
+#define EMR_ALPHABLEND 114
+#define EMR_SETLAYOUT 115
+#define EMR_TRANSPARENTBLT 116
+#define EMR_RESERVED_117 117
+#define EMR_GRADIENTFILL 118
+#define EMR_RESERVED_119 119
+#define EMR_RESERVED_120 120
+#define EMR_COLORMATCHTOTARGETW 121
+#define EMR_CREATECOLORSPACEW 122
+
+#define EMR_MIN 1
+
+#define EMR_MAX 122
+
+ typedef struct tagEMR {
+ DWORD iType;
+ DWORD nSize;
+ } EMR,*PEMR;
+
+ typedef struct tagEMRTEXT {
+ POINTL ptlReference;
+ DWORD nChars;
+ DWORD offString;
+ DWORD fOptions;
+ RECTL rcl;
+ DWORD offDx;
+ } EMRTEXT,*PEMRTEXT;
+
+ typedef struct tagABORTPATH {
+ EMR emr;
+ } EMRABORTPATH,*PEMRABORTPATH,EMRBEGINPATH,*PEMRBEGINPATH,EMRENDPATH,*PEMRENDPATH,EMRCLOSEFIGURE,*PEMRCLOSEFIGURE,EMRFLATTENPATH,*PEMRFLATTENPATH,EMRWIDENPATH,*PEMRWIDENPATH,EMRSETMETARGN,*PEMRSETMETARGN,EMRSAVEDC,*PEMRSAVEDC,EMRREALIZEPALETTE,*PEMRREALIZEPALETTE;
+
+ typedef struct tagEMRSELECTCLIPPATH {
+ EMR emr;
+ DWORD iMode;
+ } EMRSELECTCLIPPATH,*PEMRSELECTCLIPPATH,EMRSETBKMODE,*PEMRSETBKMODE,EMRSETMAPMODE,*PEMRSETMAPMODE,EMRSETLAYOUT,*PEMRSETLAYOUT,
+ EMRSETPOLYFILLMODE,*PEMRSETPOLYFILLMODE,EMRSETROP2,*PEMRSETROP2,EMRSETSTRETCHBLTMODE,*PEMRSETSTRETCHBLTMODE,EMRSETICMMODE,
+ *PEMRSETICMMODE,EMRSETTEXTALIGN,*PEMRSETTEXTALIGN;
+
+ typedef struct tagEMRSETMITERLIMIT {
+ EMR emr;
+ FLOAT eMiterLimit;
+ } EMRSETMITERLIMIT,*PEMRSETMITERLIMIT;
+
+ typedef struct tagEMRRESTOREDC {
+ EMR emr;
+ LONG iRelative;
+ } EMRRESTOREDC,*PEMRRESTOREDC;
+
+ typedef struct tagEMRSETARCDIRECTION {
+ EMR emr;
+ DWORD iArcDirection;
+
+ } EMRSETARCDIRECTION,*PEMRSETARCDIRECTION;
+
+ typedef struct tagEMRSETMAPPERFLAGS {
+ EMR emr;
+ DWORD dwFlags;
+ } EMRSETMAPPERFLAGS,*PEMRSETMAPPERFLAGS;
+
+ typedef struct tagEMRSETTEXTCOLOR {
+ EMR emr;
+ COLORREF crColor;
+ } EMRSETBKCOLOR,*PEMRSETBKCOLOR,EMRSETTEXTCOLOR,*PEMRSETTEXTCOLOR;
+
+ typedef struct tagEMRSELECTOBJECT {
+ EMR emr;
+ DWORD ihObject;
+ } EMRSELECTOBJECT,*PEMRSELECTOBJECT,EMRDELETEOBJECT,*PEMRDELETEOBJECT;
+
+ typedef struct tagEMRSELECTPALETTE {
+ EMR emr;
+ DWORD ihPal;
+ } EMRSELECTPALETTE,*PEMRSELECTPALETTE;
+
+ typedef struct tagEMRRESIZEPALETTE {
+ EMR emr;
+ DWORD ihPal;
+ DWORD cEntries;
+ } EMRRESIZEPALETTE,*PEMRRESIZEPALETTE;
+
+ typedef struct tagEMRSETPALETTEENTRIES {
+ EMR emr;
+ DWORD ihPal;
+ DWORD iStart;
+ DWORD cEntries;
+ PALETTEENTRY aPalEntries[1];
+ } EMRSETPALETTEENTRIES,*PEMRSETPALETTEENTRIES;
+
+ typedef struct tagEMRSETCOLORADJUSTMENT {
+ EMR emr;
+ COLORADJUSTMENT ColorAdjustment;
+ } EMRSETCOLORADJUSTMENT,*PEMRSETCOLORADJUSTMENT;
+
+ typedef struct tagEMRGDICOMMENT {
+ EMR emr;
+ DWORD cbData;
+ BYTE Data[1];
+ } EMRGDICOMMENT,*PEMRGDICOMMENT;
+
+ typedef struct tagEMREOF {
+ EMR emr;
+ DWORD nPalEntries;
+ DWORD offPalEntries;
+ DWORD nSizeLast;
+ } EMREOF,*PEMREOF;
+
+ typedef struct tagEMRLINETO {
+ EMR emr;
+ POINTL ptl;
+ } EMRLINETO,*PEMRLINETO,EMRMOVETOEX,*PEMRMOVETOEX;
+
+ typedef struct tagEMROFFSETCLIPRGN {
+ EMR emr;
+ POINTL ptlOffset;
+ } EMROFFSETCLIPRGN,*PEMROFFSETCLIPRGN;
+
+ typedef struct tagEMRFILLPATH {
+ EMR emr;
+ RECTL rclBounds;
+ } EMRFILLPATH,*PEMRFILLPATH,EMRSTROKEANDFILLPATH,*PEMRSTROKEANDFILLPATH,EMRSTROKEPATH,*PEMRSTROKEPATH;
+
+ typedef struct tagEMREXCLUDECLIPRECT {
+ EMR emr;
+ RECTL rclClip;
+ } EMREXCLUDECLIPRECT,*PEMREXCLUDECLIPRECT,EMRINTERSECTCLIPRECT,*PEMRINTERSECTCLIPRECT;
+
+ typedef struct tagEMRSETVIEWPORTORGEX {
+ EMR emr;
+ POINTL ptlOrigin;
+ } EMRSETVIEWPORTORGEX,*PEMRSETVIEWPORTORGEX,EMRSETWINDOWORGEX,*PEMRSETWINDOWORGEX,EMRSETBRUSHORGEX,*PEMRSETBRUSHORGEX;
+
+ typedef struct tagEMRSETVIEWPORTEXTEX {
+ EMR emr;
+ SIZEL szlExtent;
+ } EMRSETVIEWPORTEXTEX,*PEMRSETVIEWPORTEXTEX,EMRSETWINDOWEXTEX,*PEMRSETWINDOWEXTEX;
+
+ typedef struct tagEMRSCALEVIEWPORTEXTEX {
+ EMR emr;
+ LONG xNum;
+ LONG xDenom;
+ LONG yNum;
+ LONG yDenom;
+ } EMRSCALEVIEWPORTEXTEX,*PEMRSCALEVIEWPORTEXTEX,EMRSCALEWINDOWEXTEX,*PEMRSCALEWINDOWEXTEX;
+
+ typedef struct tagEMRSETWORLDTRANSFORM {
+ EMR emr;
+ XFORM xform;
+ } EMRSETWORLDTRANSFORM,*PEMRSETWORLDTRANSFORM;
+
+ typedef struct tagEMRMODIFYWORLDTRANSFORM {
+ EMR emr;
+ XFORM xform;
+ DWORD iMode;
+ } EMRMODIFYWORLDTRANSFORM,*PEMRMODIFYWORLDTRANSFORM;
+
+ typedef struct tagEMRSETPIXELV {
+ EMR emr;
+ POINTL ptlPixel;
+ COLORREF crColor;
+ } EMRSETPIXELV,*PEMRSETPIXELV;
+
+ typedef struct tagEMREXTFLOODFILL {
+ EMR emr;
+ POINTL ptlStart;
+ COLORREF crColor;
+ DWORD iMode;
+ } EMREXTFLOODFILL,*PEMREXTFLOODFILL;
+
+ typedef struct tagEMRELLIPSE {
+ EMR emr;
+ RECTL rclBox;
+ } EMRELLIPSE,*PEMRELLIPSE,EMRRECTANGLE,*PEMRRECTANGLE;
+
+ typedef struct tagEMRROUNDRECT {
+ EMR emr;
+ RECTL rclBox;
+ SIZEL szlCorner;
+ } EMRROUNDRECT,*PEMRROUNDRECT;
+
+ typedef struct tagEMRARC {
+ EMR emr;
+ RECTL rclBox;
+ POINTL ptlStart;
+ POINTL ptlEnd;
+ } EMRARC,*PEMRARC,EMRARCTO,*PEMRARCTO,EMRCHORD,*PEMRCHORD,EMRPIE,*PEMRPIE;
+
+ typedef struct tagEMRANGLEARC {
+ EMR emr;
+ POINTL ptlCenter;
+ DWORD nRadius;
+ FLOAT eStartAngle;
+ FLOAT eSweepAngle;
+ } EMRANGLEARC,*PEMRANGLEARC;
+
+ typedef struct tagEMRPOLYLINE {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD cptl;
+ POINTL aptl[1];
+ } EMRPOLYLINE,*PEMRPOLYLINE,EMRPOLYBEZIER,*PEMRPOLYBEZIER,EMRPOLYGON,*PEMRPOLYGON,EMRPOLYBEZIERTO,*PEMRPOLYBEZIERTO,EMRPOLYLINETO,*PEMRPOLYLINETO;
+
+ typedef struct tagEMRPOLYLINE16 {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD cpts;
+ POINTS apts[1];
+ } EMRPOLYLINE16,*PEMRPOLYLINE16,EMRPOLYBEZIER16,*PEMRPOLYBEZIER16,EMRPOLYGON16,*PEMRPOLYGON16,EMRPOLYBEZIERTO16,*PEMRPOLYBEZIERTO16,EMRPOLYLINETO16,*PEMRPOLYLINETO16;
+
+ typedef struct tagEMRPOLYDRAW {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD cptl;
+ POINTL aptl[1];
+ BYTE abTypes[1];
+ } EMRPOLYDRAW,*PEMRPOLYDRAW;
+
+ typedef struct tagEMRPOLYDRAW16 {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD cpts;
+ POINTS apts[1];
+ BYTE abTypes[1];
+ } EMRPOLYDRAW16,*PEMRPOLYDRAW16;
+
+ typedef struct tagEMRPOLYPOLYLINE {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD nPolys;
+ DWORD cptl;
+ DWORD aPolyCounts[1];
+ POINTL aptl[1];
+ } EMRPOLYPOLYLINE,*PEMRPOLYPOLYLINE,EMRPOLYPOLYGON,*PEMRPOLYPOLYGON;
+
+ typedef struct tagEMRPOLYPOLYLINE16 {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD nPolys;
+ DWORD cpts;
+ DWORD aPolyCounts[1];
+ POINTS apts[1];
+ } EMRPOLYPOLYLINE16,*PEMRPOLYPOLYLINE16,EMRPOLYPOLYGON16,*PEMRPOLYPOLYGON16;
+
+ typedef struct tagEMRINVERTRGN {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD cbRgnData;
+ BYTE RgnData[1];
+ } EMRINVERTRGN,*PEMRINVERTRGN,EMRPAINTRGN,*PEMRPAINTRGN;
+
+ typedef struct tagEMRFILLRGN {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD cbRgnData;
+ DWORD ihBrush;
+ BYTE RgnData[1];
+ } EMRFILLRGN,*PEMRFILLRGN;
+
+ typedef struct tagEMRFRAMERGN {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD cbRgnData;
+ DWORD ihBrush;
+ SIZEL szlStroke;
+ BYTE RgnData[1];
+ } EMRFRAMERGN,*PEMRFRAMERGN;
+
+ typedef struct tagEMREXTSELECTCLIPRGN {
+ EMR emr;
+ DWORD cbRgnData;
+ DWORD iMode;
+ BYTE RgnData[1];
+ } EMREXTSELECTCLIPRGN,*PEMREXTSELECTCLIPRGN;
+
+ typedef struct tagEMREXTTEXTOUTA {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD iGraphicsMode;
+ FLOAT exScale;
+ FLOAT eyScale;
+ EMRTEXT emrtext;
+ } EMREXTTEXTOUTA,*PEMREXTTEXTOUTA,EMREXTTEXTOUTW,*PEMREXTTEXTOUTW;
+
+ typedef struct tagEMRPOLYTEXTOUTA {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD iGraphicsMode;
+ FLOAT exScale;
+ FLOAT eyScale;
+ LONG cStrings;
+ EMRTEXT aemrtext[1];
+ } EMRPOLYTEXTOUTA,*PEMRPOLYTEXTOUTA,EMRPOLYTEXTOUTW,*PEMRPOLYTEXTOUTW;
+
+ typedef struct tagEMRBITBLT {
+ EMR emr;
+ RECTL rclBounds;
+ LONG xDest;
+ LONG yDest;
+ LONG cxDest;
+ LONG cyDest;
+ DWORD dwRop;
+ LONG xSrc;
+ LONG ySrc;
+ XFORM xformSrc;
+ COLORREF crBkColorSrc;
+ DWORD iUsageSrc;
+ DWORD offBmiSrc;
+ DWORD cbBmiSrc;
+ DWORD offBitsSrc;
+ DWORD cbBitsSrc;
+ } EMRBITBLT,*PEMRBITBLT;
+
+ typedef struct tagEMRSTRETCHBLT {
+ EMR emr;
+ RECTL rclBounds;
+ LONG xDest;
+ LONG yDest;
+ LONG cxDest;
+ LONG cyDest;
+ DWORD dwRop;
+ LONG xSrc;
+ LONG ySrc;
+ XFORM xformSrc;
+ COLORREF crBkColorSrc;
+ DWORD iUsageSrc;
+ DWORD offBmiSrc;
+ DWORD cbBmiSrc;
+ DWORD offBitsSrc;
+ DWORD cbBitsSrc;
+ LONG cxSrc;
+ LONG cySrc;
+ } EMRSTRETCHBLT,*PEMRSTRETCHBLT;
+
+ typedef struct tagEMRMASKBLT {
+ EMR emr;
+ RECTL rclBounds;
+ LONG xDest;
+ LONG yDest;
+ LONG cxDest;
+ LONG cyDest;
+ DWORD dwRop;
+ LONG xSrc;
+ LONG ySrc;
+ XFORM xformSrc;
+ COLORREF crBkColorSrc;
+ DWORD iUsageSrc;
+ DWORD offBmiSrc;
+ DWORD cbBmiSrc;
+ DWORD offBitsSrc;
+ DWORD cbBitsSrc;
+ LONG xMask;
+ LONG yMask;
+ DWORD iUsageMask;
+ DWORD offBmiMask;
+ DWORD cbBmiMask;
+ DWORD offBitsMask;
+ DWORD cbBitsMask;
+ } EMRMASKBLT,*PEMRMASKBLT;
+
+ typedef struct tagEMRPLGBLT {
+ EMR emr;
+ RECTL rclBounds;
+ POINTL aptlDest[3];
+ LONG xSrc;
+ LONG ySrc;
+ LONG cxSrc;
+ LONG cySrc;
+ XFORM xformSrc;
+ COLORREF crBkColorSrc;
+ DWORD iUsageSrc;
+ DWORD offBmiSrc;
+ DWORD cbBmiSrc;
+ DWORD offBitsSrc;
+ DWORD cbBitsSrc;
+ LONG xMask;
+ LONG yMask;
+ DWORD iUsageMask;
+ DWORD offBmiMask;
+ DWORD cbBmiMask;
+ DWORD offBitsMask;
+ DWORD cbBitsMask;
+ } EMRPLGBLT,*PEMRPLGBLT;
+
+ typedef struct tagEMRSETDIBITSTODEVICE {
+ EMR emr;
+ RECTL rclBounds;
+ LONG xDest;
+ LONG yDest;
+ LONG xSrc;
+ LONG ySrc;
+ LONG cxSrc;
+ LONG cySrc;
+ DWORD offBmiSrc;
+ DWORD cbBmiSrc;
+ DWORD offBitsSrc;
+ DWORD cbBitsSrc;
+ DWORD iUsageSrc;
+ DWORD iStartScan;
+ DWORD cScans;
+ } EMRSETDIBITSTODEVICE,*PEMRSETDIBITSTODEVICE;
+
+ typedef struct tagEMRSTRETCHDIBITS {
+ EMR emr;
+ RECTL rclBounds;
+ LONG xDest;
+ LONG yDest;
+ LONG xSrc;
+ LONG ySrc;
+ LONG cxSrc;
+ LONG cySrc;
+ DWORD offBmiSrc;
+ DWORD cbBmiSrc;
+ DWORD offBitsSrc;
+ DWORD cbBitsSrc;
+ DWORD iUsageSrc;
+ DWORD dwRop;
+ LONG cxDest;
+ LONG cyDest;
+ } EMRSTRETCHDIBITS,*PEMRSTRETCHDIBITS;
+
+ typedef struct tagEMREXTCREATEFONTINDIRECTW {
+ EMR emr;
+ DWORD ihFont;
+ EXTLOGFONTW elfw;
+ } EMREXTCREATEFONTINDIRECTW,*PEMREXTCREATEFONTINDIRECTW;
+
+ typedef struct tagEMRCREATEPALETTE {
+ EMR emr;
+ DWORD ihPal;
+ LOGPALETTE lgpl;
+ } EMRCREATEPALETTE,*PEMRCREATEPALETTE;
+
+ typedef struct tagEMRCREATEPEN {
+ EMR emr;
+ DWORD ihPen;
+ LOGPEN lopn;
+ } EMRCREATEPEN,*PEMRCREATEPEN;
+
+ typedef struct tagEMREXTCREATEPEN {
+ EMR emr;
+ DWORD ihPen;
+ DWORD offBmi;
+ DWORD cbBmi;
+ DWORD offBits;
+ DWORD cbBits;
+ EXTLOGPEN elp;
+ } EMREXTCREATEPEN,*PEMREXTCREATEPEN;
+
+ typedef struct tagEMRCREATEBRUSHINDIRECT {
+ EMR emr;
+ DWORD ihBrush;
+ LOGBRUSH32 lb;
+ } EMRCREATEBRUSHINDIRECT,*PEMRCREATEBRUSHINDIRECT;
+
+ typedef struct tagEMRCREATEMONOBRUSH {
+ EMR emr;
+ DWORD ihBrush;
+ DWORD iUsage;
+ DWORD offBmi;
+ DWORD cbBmi;
+ DWORD offBits;
+ DWORD cbBits;
+ } EMRCREATEMONOBRUSH,*PEMRCREATEMONOBRUSH;
+
+ typedef struct tagEMRCREATEDIBPATTERNBRUSHPT {
+ EMR emr;
+ DWORD ihBrush;
+ DWORD iUsage;
+ DWORD offBmi;
+ DWORD cbBmi;
+ DWORD offBits;
+ DWORD cbBits;
+ } EMRCREATEDIBPATTERNBRUSHPT,*PEMRCREATEDIBPATTERNBRUSHPT;
+
+ typedef struct tagEMRFORMAT {
+ DWORD dSignature;
+ DWORD nVersion;
+ DWORD cbData;
+ DWORD offData;
+ } EMRFORMAT,*PEMRFORMAT;
+
+ typedef struct tagEMRGLSRECORD {
+ EMR emr;
+ DWORD cbData;
+ BYTE Data[1];
+ } EMRGLSRECORD,*PEMRGLSRECORD;
+
+ typedef struct tagEMRGLSBOUNDEDRECORD {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD cbData;
+ BYTE Data[1];
+ } EMRGLSBOUNDEDRECORD,*PEMRGLSBOUNDEDRECORD;
+
+ typedef struct tagEMRPIXELFORMAT {
+ EMR emr;
+ PIXELFORMATDESCRIPTOR pfd;
+ } EMRPIXELFORMAT,*PEMRPIXELFORMAT;
+
+ typedef struct tagEMRCREATECOLORSPACE {
+ EMR emr;
+ DWORD ihCS;
+ LOGCOLORSPACEA lcs;
+ } EMRCREATECOLORSPACE,*PEMRCREATECOLORSPACE;
+
+ typedef struct tagEMRSETCOLORSPACE {
+ EMR emr;
+ DWORD ihCS;
+ } EMRSETCOLORSPACE,*PEMRSETCOLORSPACE,EMRSELECTCOLORSPACE,*PEMRSELECTCOLORSPACE,EMRDELETECOLORSPACE,*PEMRDELETECOLORSPACE;
+
+ typedef struct tagEMREXTESCAPE {
+ EMR emr;
+ INT iEscape;
+ INT cbEscData;
+ BYTE EscData[1];
+ } EMREXTESCAPE,*PEMREXTESCAPE,EMRDRAWESCAPE,*PEMRDRAWESCAPE;
+
+ typedef struct tagEMRNAMEDESCAPE {
+ EMR emr;
+ INT iEscape;
+ INT cbDriver;
+ INT cbEscData;
+ BYTE EscData[1];
+ } EMRNAMEDESCAPE,*PEMRNAMEDESCAPE;
+
+#define SETICMPROFILE_EMBEDED 0x00000001
+
+ typedef struct tagEMRSETICMPROFILE {
+ EMR emr;
+ DWORD dwFlags;
+ DWORD cbName;
+ DWORD cbData;
+ BYTE Data[1];
+ } EMRSETICMPROFILE,*PEMRSETICMPROFILE,EMRSETICMPROFILEA,*PEMRSETICMPROFILEA,EMRSETICMPROFILEW,*PEMRSETICMPROFILEW;
+
+#define CREATECOLORSPACE_EMBEDED 0x00000001
+
+ typedef struct tagEMRCREATECOLORSPACEW {
+ EMR emr;
+ DWORD ihCS;
+ LOGCOLORSPACEW lcs;
+ DWORD dwFlags;
+ DWORD cbData;
+ BYTE Data[1];
+ } EMRCREATECOLORSPACEW,*PEMRCREATECOLORSPACEW;
+
+#define COLORMATCHTOTARGET_EMBEDED 0x00000001
+
+ typedef struct tagCOLORMATCHTOTARGET {
+ EMR emr;
+ DWORD dwAction;
+ DWORD dwFlags;
+ DWORD cbName;
+ DWORD cbData;
+ BYTE Data[1];
+ } EMRCOLORMATCHTOTARGET,*PEMRCOLORMATCHTOTARGET;
+
+ typedef struct tagCOLORCORRECTPALETTE {
+ EMR emr;
+ DWORD ihPalette;
+ DWORD nFirstEntry;
+ DWORD nPalEntries;
+ DWORD nReserved;
+ } EMRCOLORCORRECTPALETTE,*PEMRCOLORCORRECTPALETTE;
+
+ typedef struct tagEMRALPHABLEND {
+ EMR emr;
+ RECTL rclBounds;
+ LONG xDest;
+ LONG yDest;
+ LONG cxDest;
+ LONG cyDest;
+ DWORD dwRop;
+ LONG xSrc;
+ LONG ySrc;
+ XFORM xformSrc;
+ COLORREF crBkColorSrc;
+ DWORD iUsageSrc;
+ DWORD offBmiSrc;
+ DWORD cbBmiSrc;
+ DWORD offBitsSrc;
+ DWORD cbBitsSrc;
+ LONG cxSrc;
+ LONG cySrc;
+ } EMRALPHABLEND,*PEMRALPHABLEND;
+
+ typedef struct tagEMRGRADIENTFILL {
+ EMR emr;
+ RECTL rclBounds;
+ DWORD nVer;
+ DWORD nTri;
+ ULONG ulMode;
+ TRIVERTEX Ver[1];
+ } EMRGRADIENTFILL,*PEMRGRADIENTFILL;
+
+ typedef struct tagEMRTRANSPARENTBLT {
+ EMR emr;
+ RECTL rclBounds;
+ LONG xDest;
+ LONG yDest;
+ LONG cxDest;
+ LONG cyDest;
+ DWORD dwRop;
+ LONG xSrc;
+ LONG ySrc;
+ XFORM xformSrc;
+ COLORREF crBkColorSrc;
+ DWORD iUsageSrc;
+ DWORD offBmiSrc;
+ DWORD cbBmiSrc;
+ DWORD offBitsSrc;
+ DWORD cbBitsSrc;
+ LONG cxSrc;
+ LONG cySrc;
+ } EMRTRANSPARENTBLT,*PEMRTRANSPARENTBLT;
+
+#define GDICOMMENT_IDENTIFIER 0x43494447
+#define GDICOMMENT_WINDOWS_METAFILE 0x80000001
+#define GDICOMMENT_BEGINGROUP 0x00000002
+#define GDICOMMENT_ENDGROUP 0x00000003
+#define GDICOMMENT_MULTIFORMATS 0x40000004
+#define EPS_SIGNATURE 0x46535045
+#define GDICOMMENT_UNICODE_STRING 0x00000040
+#define GDICOMMENT_UNICODE_END 0x00000080
+#endif
+
+#ifdef UNICODE
+#define wglUseFontBitmaps wglUseFontBitmapsW
+#else
+#define wglUseFontBitmaps wglUseFontBitmapsA
+#endif
+
+ WINGDIAPI WINBOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
+ WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
+ WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC,int);
+ WINGDIAPI WINBOOL WINAPI wglDeleteContext(HGLRC);
+ WINGDIAPI HGLRC WINAPI wglGetCurrentContext(VOID);
+ WINGDIAPI HDC WINAPI wglGetCurrentDC(VOID);
+ WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR);
+ WINGDIAPI WINBOOL WINAPI wglMakeCurrent(HDC,HGLRC);
+ WINGDIAPI WINBOOL WINAPI wglShareLists(HGLRC,HGLRC);
+ WINGDIAPI WINBOOL WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD);
+ WINGDIAPI WINBOOL WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD);
+ WINGDIAPI WINBOOL WINAPI SwapBuffers(HDC);
+
+ typedef struct _POINTFLOAT {
+ FLOAT x;
+ FLOAT y;
+ } POINTFLOAT,*PPOINTFLOAT;
+
+ typedef struct _GLYPHMETRICSFLOAT {
+ FLOAT gmfBlackBoxX;
+ FLOAT gmfBlackBoxY;
+ POINTFLOAT gmfptGlyphOrigin;
+ FLOAT gmfCellIncX;
+ FLOAT gmfCellIncY;
+ } GLYPHMETRICSFLOAT,*PGLYPHMETRICSFLOAT,*LPGLYPHMETRICSFLOAT;
+
+#define WGL_FONT_LINES 0
+#define WGL_FONT_POLYGONS 1
+
+#ifdef UNICODE
+#define wglUseFontOutlines wglUseFontOutlinesW
+#else
+#define wglUseFontOutlines wglUseFontOutlinesA
+#endif
+
+ WINGDIAPI WINBOOL WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
+ WINGDIAPI WINBOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
+
+ typedef struct tagLAYERPLANEDESCRIPTOR {
+ WORD nSize;
+ WORD nVersion;
+ DWORD dwFlags;
+ BYTE iPixelType;
+ BYTE cColorBits;
+ BYTE cRedBits;
+ BYTE cRedShift;
+ BYTE cGreenBits;
+ BYTE cGreenShift;
+ BYTE cBlueBits;
+ BYTE cBlueShift;
+ BYTE cAlphaBits;
+ BYTE cAlphaShift;
+ BYTE cAccumBits;
+ BYTE cAccumRedBits;
+ BYTE cAccumGreenBits;
+ BYTE cAccumBlueBits;
+ BYTE cAccumAlphaBits;
+ BYTE cDepthBits;
+ BYTE cStencilBits;
+ BYTE cAuxBuffers;
+ BYTE iLayerPlane;
+ BYTE bReserved;
+ COLORREF crTransparent;
+ } LAYERPLANEDESCRIPTOR,*PLAYERPLANEDESCRIPTOR,*LPLAYERPLANEDESCRIPTOR;
+
+#define LPD_DOUBLEBUFFER 0x00000001
+#define LPD_STEREO 0x00000002
+#define LPD_SUPPORT_GDI 0x00000010
+#define LPD_SUPPORT_OPENGL 0x00000020
+#define LPD_SHARE_DEPTH 0x00000040
+#define LPD_SHARE_STENCIL 0x00000080
+#define LPD_SHARE_ACCUM 0x00000100
+#define LPD_SWAP_EXCHANGE 0x00000200
+#define LPD_SWAP_COPY 0x00000400
+#define LPD_TRANSPARENT 0x00001000
+
+#define LPD_TYPE_RGBA 0
+#define LPD_TYPE_COLORINDEX 1
+
+#define WGL_SWAP_MAIN_PLANE 0x00000001
+#define WGL_SWAP_OVERLAY1 0x00000002
+#define WGL_SWAP_OVERLAY2 0x00000004
+#define WGL_SWAP_OVERLAY3 0x00000008
+#define WGL_SWAP_OVERLAY4 0x00000010
+#define WGL_SWAP_OVERLAY5 0x00000020
+#define WGL_SWAP_OVERLAY6 0x00000040
+#define WGL_SWAP_OVERLAY7 0x00000080
+#define WGL_SWAP_OVERLAY8 0x00000100
+#define WGL_SWAP_OVERLAY9 0x00000200
+#define WGL_SWAP_OVERLAY10 0x00000400
+#define WGL_SWAP_OVERLAY11 0x00000800
+#define WGL_SWAP_OVERLAY12 0x00001000
+#define WGL_SWAP_OVERLAY13 0x00002000
+#define WGL_SWAP_OVERLAY14 0x00004000
+#define WGL_SWAP_OVERLAY15 0x00008000
+#define WGL_SWAP_UNDERLAY1 0x00010000
+#define WGL_SWAP_UNDERLAY2 0x00020000
+#define WGL_SWAP_UNDERLAY3 0x00040000
+#define WGL_SWAP_UNDERLAY4 0x00080000
+#define WGL_SWAP_UNDERLAY5 0x00100000
+#define WGL_SWAP_UNDERLAY6 0x00200000
+#define WGL_SWAP_UNDERLAY7 0x00400000
+#define WGL_SWAP_UNDERLAY8 0x00800000
+#define WGL_SWAP_UNDERLAY9 0x01000000
+#define WGL_SWAP_UNDERLAY10 0x02000000
+#define WGL_SWAP_UNDERLAY11 0x04000000
+#define WGL_SWAP_UNDERLAY12 0x08000000
+#define WGL_SWAP_UNDERLAY13 0x10000000
+#define WGL_SWAP_UNDERLAY14 0x20000000
+#define WGL_SWAP_UNDERLAY15 0x40000000
+
+ WINGDIAPI WINBOOL WINAPI wglDescribeLayerPlane(HDC,int,int,UINT,LPLAYERPLANEDESCRIPTOR);
+ WINGDIAPI int WINAPI wglSetLayerPaletteEntries(HDC,int,int,int,CONST COLORREF *);
+ WINGDIAPI int WINAPI wglGetLayerPaletteEntries(HDC,int,int,int,COLORREF *);
+ WINGDIAPI WINBOOL WINAPI wglRealizeLayerPalette(HDC,int,WINBOOL);
+ WINGDIAPI WINBOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
+
+ typedef struct _WGLSWAP {
+ HDC hdc;
+ UINT uiFlags;
+ } WGLSWAP,*PWGLSWAP,*LPWGLSWAP;
+
+#define WGL_SWAPMULTIPLE_MAX 16
+
+ WINGDIAPI DWORD WINAPI wglSwapMultipleBuffers(UINT,CONST WGLSWAP *);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winnt.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winnt.h
new file mode 100644
index 00000000..4cf685d2
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winnt.h
@@ -0,0 +1,5835 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINNT_
+#define _WINNT_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#define ANYSIZE_ARRAY 1
+
+//gr #include
+
+#define RESTRICTED_POINTER
+
+#ifndef __CRT_UNALIGNED
+#define __CRT_UNALIGNED
+#endif
+
+#if defined(__ia64__) || defined(__x86_64)
+#define UNALIGNED __CRT_UNALIGNED
+#ifdef _WIN64
+#define UNALIGNED64 __CRT_UNALIGNED
+#else
+#define UNALIGNED64
+#endif
+#else
+#define UNALIGNED
+#define UNALIGNED64
+#endif
+
+#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && (defined(_X86_) && !defined(__x86_64))
+#define I_X86_
+#endif
+
+#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(__x86_64)
+#define _AMD64_
+#endif
+
+#if !defined(I_X86_) && !(defined(_X86_) && !defined(__x86_64)) && !defined(_AMD64_) && defined(__ia64__)
+#if !defined(_IA64_)
+#define _IA64_
+#endif
+#endif
+
+
+#ifdef _WIN64
+#define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG)
+#define MEMORY_ALLOCATION_ALIGNMENT 16
+#else
+#define MAX_NATURAL_ALIGNMENT sizeof(DWORD)
+#define MEMORY_ALLOCATION_ALIGNMENT 8
+#endif
+
+#ifdef __cplusplus
+#define TYPE_ALIGNMENT(t) __alignof__ (t)
+#else
+#define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; },test)
+#endif
+
+#ifdef _WIN64
+#ifdef _AMD64_
+#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(DWORD)
+#elif defined(_IA64_)
+#define PROBE_ALIGNMENT(_s) (TYPE_ALIGNMENT(_s) > TYPE_ALIGNMENT(DWORD) ? TYPE_ALIGNMENT(_s) : TYPE_ALIGNMENT(DWORD))
+#else
+#error No Target Architecture
+#endif
+#define PROBE_ALIGNMENT32(_s) TYPE_ALIGNMENT(DWORD)
+#else
+#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(DWORD)
+#endif
+
+#define C_ASSERT(e) typedef char __C_ASSERT__[(e)?1:-1]
+
+#include
+
+#if defined(_X86_) || defined(__ia64__) || defined(__x86_64)
+#define DECLSPEC_IMPORT __declspec(dllimport)
+#else
+#define DECLSPEC_IMPORT
+#endif
+
+#ifndef DECLSPEC_NORETURN
+#define DECLSPEC_NORETURN __declspec(noreturn)
+#endif
+
+#ifndef DECLSPEC_ALIGN
+#define DECLSPEC_ALIGN(x) __attribute__ ((aligned(x)))
+#endif
+
+#ifndef SYSTEM_CACHE_ALIGNMENT_SIZE
+#if defined(_AMD64_) || defined(I_X86_)
+#define SYSTEM_CACHE_ALIGNMENT_SIZE 64
+#else
+#define SYSTEM_CACHE_ALIGNMENT_SIZE 128
+#endif
+#endif
+
+#ifndef DECLSPEC_CACHEALIGN
+#define DECLSPEC_CACHEALIGN DECLSPEC_ALIGN(SYSTEM_CACHE_ALIGNMENT_SIZE)
+#endif
+
+#ifndef DECLSPEC_UUID
+#define DECLSPEC_UUID(x)
+#endif
+
+#ifndef DECLSPEC_NOVTABLE
+#define DECLSPEC_NOVTABLE
+#endif
+
+#ifndef DECLSPEC_SELECTANY
+#define DECLSPEC_SELECTANY __declspec(selectany)
+#endif
+
+#ifndef NOP_FUNCTION
+#define NOP_FUNCTION (void)0
+#endif
+
+#ifndef DECLSPEC_NOINLINE
+#define DECLSPEC_NOINLINE
+#endif
+
+#ifndef FORCEINLINE
+#define FORCEINLINE static __inline__
+#endif
+
+#ifndef DECLSPEC_DEPRECATED
+#define DECLSPEC_DEPRECATED __declspec(deprecated)
+#define DEPRECATE_SUPPORTED
+#endif
+
+#define DECLSPEC_DEPRECATED_DDK
+#define PRAGMA_DEPRECATED_DDK 0
+
+ typedef void *PVOID;
+ typedef void *PVOID64;
+
+#define NTAPI __stdcall
+#define NTSYSAPI DECLSPEC_IMPORT
+#define NTSYSCALLAPI DECLSPEC_IMPORT
+
+#ifndef VOID
+#define VOID void
+ typedef char CHAR;
+ typedef short SHORT;
+ typedef long LONG;
+#endif
+
+ typedef wchar_t WCHAR;
+ typedef WCHAR *PWCHAR,*LPWCH,*PWCH;
+ typedef CONST WCHAR *LPCWCH,*PCWCH;
+ typedef WCHAR *NWPSTR,*LPWSTR,*PWSTR;
+ typedef PWSTR *PZPWSTR;
+ typedef CONST PWSTR *PCZPWSTR;
+ typedef WCHAR UNALIGNED *LPUWSTR,*PUWSTR;
+ typedef CONST WCHAR *LPCWSTR,*PCWSTR;
+ typedef PCWSTR *PZPCWSTR;
+ typedef CONST WCHAR UNALIGNED *LPCUWSTR,*PCUWSTR;
+ typedef CHAR *PCHAR,*LPCH,*PCH;
+ typedef CONST CHAR *LPCCH,*PCCH;
+ typedef CHAR *NPSTR,*LPSTR,*PSTR;
+ typedef PSTR *PZPSTR;
+ typedef CONST PSTR *PCZPSTR;
+ typedef CONST CHAR *LPCSTR,*PCSTR;
+ typedef PCSTR *PZPCSTR;
+
+#ifdef UNICODE
+#ifndef _TCHAR_DEFINED
+#define _TCHAR_DEFINED
+ typedef WCHAR TCHAR,*PTCHAR;
+ typedef WCHAR TBYTE ,*PTBYTE;
+#endif
+
+ typedef LPWSTR LPTCH,PTCH;
+ typedef LPWSTR PTSTR,LPTSTR;
+ typedef LPCWSTR PCTSTR,LPCTSTR;
+ typedef LPUWSTR PUTSTR,LPUTSTR;
+ typedef LPCUWSTR PCUTSTR,LPCUTSTR;
+ typedef LPWSTR LP;
+#define __TEXT(quote) L##quote
+#else
+#ifndef _TCHAR_DEFINED
+#define _TCHAR_DEFINED
+ typedef char TCHAR,*PTCHAR;
+ typedef unsigned char TBYTE ,*PTBYTE;
+#endif
+
+ typedef LPSTR LPTCH,PTCH;
+ typedef LPSTR PTSTR,LPTSTR,PUTSTR,LPUTSTR;
+ typedef LPCSTR PCTSTR,LPCTSTR,PCUTSTR,LPCUTSTR;
+#define __TEXT(quote) quote
+#endif
+
+#define TEXT(quote) __TEXT(quote)
+
+ typedef SHORT *PSHORT;
+ typedef LONG *PLONG;
+
+ typedef void *HANDLE;
+#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
+ typedef HANDLE *PHANDLE;
+
+ typedef BYTE FCHAR;
+ typedef WORD FSHORT;
+ typedef DWORD FLONG;
+
+#ifndef _HRESULT_DEFINED
+#define _HRESULT_DEFINED
+ typedef LONG HRESULT;
+#endif
+
+#ifdef __cplusplus
+#define EXTERN_C extern "C"
+#else
+#define EXTERN_C extern
+#endif
+
+#define STDMETHODCALLTYPE WINAPI
+#define STDMETHODVCALLTYPE __cdecl
+#define STDAPICALLTYPE WINAPI
+#define STDAPIVCALLTYPE __cdecl
+#define STDAPI EXTERN_C HRESULT WINAPI
+#define STDAPI_(type) EXTERN_C type WINAPI
+#define STDMETHODIMP HRESULT WINAPI
+#define STDMETHODIMP_(type) type WINAPI
+#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
+#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
+#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
+#define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
+
+ typedef char CCHAR;
+#ifndef _LCID_DEFINED
+#define _LCID_DEFINED
+typedef DWORD LCID;
+#endif
+ typedef PDWORD PLCID;
+#ifndef _LANGID_DEFINED
+#define _LANGID_DEFINED
+ typedef WORD LANGID;
+#endif
+#define APPLICATION_ERROR_MASK 0x20000000
+#define ERROR_SEVERITY_SUCCESS 0x00000000
+#define ERROR_SEVERITY_INFORMATIONAL 0x40000000
+#define ERROR_SEVERITY_WARNING 0x80000000
+#define ERROR_SEVERITY_ERROR 0xC0000000
+
+#ifdef __ia64__
+ __declspec(align(16))
+#endif
+ typedef struct _FLOAT128 {
+ __int64 LowPart;
+ __int64 HighPart;
+ } FLOAT128;
+
+ typedef FLOAT128 *PFLOAT128;
+
+#define _ULONGLONG_
+#if((!(defined(_X86_) && !defined(__x86_64)) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)))
+ typedef __int64 LONGLONG;
+ typedef unsigned __int64 ULONGLONG;
+
+#define MAXLONGLONG (0x7fffffffffffffff)
+#else
+
+ typedef double LONGLONG;
+ typedef double ULONGLONG;
+#endif
+
+ typedef LONGLONG *PLONGLONG;
+ typedef ULONGLONG *PULONGLONG;
+
+ typedef LONGLONG USN;
+
+ typedef union _LARGE_INTEGER {
+ struct {
+ DWORD LowPart;
+ LONG HighPart;
+ };
+ struct {
+ DWORD LowPart;
+ LONG HighPart;
+ } u;
+ LONGLONG QuadPart;
+ } LARGE_INTEGER;
+
+ typedef LARGE_INTEGER *PLARGE_INTEGER;
+
+ typedef union _ULARGE_INTEGER {
+ struct {
+ DWORD LowPart;
+ DWORD HighPart;
+ };
+ struct {
+ DWORD LowPart;
+ DWORD HighPart;
+ } u;
+ ULONGLONG QuadPart;
+ } ULARGE_INTEGER;
+
+ typedef ULARGE_INTEGER *PULARGE_INTEGER;
+
+ typedef struct _LUID {
+ DWORD LowPart;
+ LONG HighPart;
+ } LUID,*PLUID;
+
+#define _DWORDLONG_
+ typedef ULONGLONG DWORDLONG;
+ typedef DWORDLONG *PDWORDLONG;
+
+#ifdef RC_INVOKED
+#define Int32x32To64(a,b) ((LONGLONG)((LONG)(a)) *(LONGLONG)((LONG)(b)))
+#define UInt32x32To64(a,b) ((ULONGLONG)((DWORD)(a)) *(ULONGLONG)((DWORD)(b)))
+#define Int64ShrlMod32(a,b) ((ULONGLONG)(a) >> (b))
+#elif (defined(_X86_) && !defined(__x86_64))
+#define Int32x32To64(a,b) (LONGLONG)((LONGLONG)(LONG)(a) *(LONG)(b))
+#define UInt32x32To64(a,b) (ULONGLONG)((ULONGLONG)(DWORD)(a) *(DWORD)(b))
+#define Int64ShrlMod32(a,b) ((DWORDLONG)(a)>>(b))
+#elif defined(__ia64__) || defined(__x86_64)
+#define Int32x32To64(a,b) ((LONGLONG)((LONG)(a)) *(LONGLONG)((LONG)(b)))
+#define UInt32x32To64(a,b) ((ULONGLONG)((DWORD)(a)) *(ULONGLONG)((DWORD)(b)))
+#define Int64ShrlMod32(a,b) ((ULONGLONG)(a) >> (b))
+#else
+#error Must define a target architecture.
+#endif
+
+#define Int64ShraMod32(a,b) ((LONGLONG)(a) >> (b))
+#define Int64ShllMod32(a,b) ((ULONGLONG)(a) << (b))
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#ifdef __x86_64
+
+#define RotateLeft8 _rotl8
+#define RotateLeft16 _rotl16
+#define RotateRight8 _rotr8
+#define RotateRight16 _rotr16
+
+ unsigned char __cdecl _rotl8(unsigned char Value,unsigned char Shift);
+ unsigned short __cdecl _rotl16(unsigned short Value,unsigned char Shift);
+ unsigned char __cdecl _rotr8(unsigned char Value,unsigned char Shift);
+ unsigned short __cdecl _rotr16(unsigned short Value,unsigned char Shift);
+#endif
+
+#define RotateLeft32 _rotl
+#define RotateLeft64 _rotl64
+#define RotateRight32 _rotr
+#define RotateRight64 _rotr64
+
+ unsigned int __cdecl _rotl(unsigned int Value,int Shift);
+ unsigned __int64 __cdecl _rotl64(unsigned __int64 Value,int Shift);
+ unsigned int __cdecl _rotr(unsigned int Value,int Shift);
+ unsigned __int64 __cdecl _rotr64(unsigned __int64 Value,int Shift);
+#ifdef __cplusplus
+ }
+#endif
+
+#define ANSI_NULL ((CHAR)0)
+#define UNICODE_NULL ((WCHAR)0)
+#define UNICODE_STRING_MAX_BYTES ((WORD) 65534)
+#define UNICODE_STRING_MAX_CHARS (32767)
+
+#ifndef _BOOLEAN_
+#define _BOOLEAN_
+ typedef BYTE BOOLEAN;
+#endif
+ typedef BOOLEAN *PBOOLEAN;
+
+ typedef struct _LIST_ENTRY {
+ struct _LIST_ENTRY *Flink;
+ struct _LIST_ENTRY *Blink;
+ } LIST_ENTRY,*PLIST_ENTRY,*RESTRICTED_POINTER PRLIST_ENTRY;
+
+ typedef struct _SINGLE_LIST_ENTRY {
+ struct _SINGLE_LIST_ENTRY *Next;
+ } SINGLE_LIST_ENTRY,*PSINGLE_LIST_ENTRY;
+
+ typedef struct LIST_ENTRY32 {
+ DWORD Flink;
+ DWORD Blink;
+ } LIST_ENTRY32;
+ typedef LIST_ENTRY32 *PLIST_ENTRY32;
+
+ typedef struct LIST_ENTRY64 {
+ ULONGLONG Flink;
+ ULONGLONG Blink;
+ } LIST_ENTRY64;
+ typedef LIST_ENTRY64 *PLIST_ENTRY64;
+
+#include
+
+#ifndef __OBJECTID_DEFINED
+#define __OBJECTID_DEFINED
+ typedef struct _OBJECTID {
+ GUID Lineage;
+ DWORD Uniquifier;
+ } OBJECTID;
+#endif
+
+#define MINCHAR 0x80
+#define MAXCHAR 0x7f
+#define MINSHORT 0x8000
+#define MAXSHORT 0x7fff
+#define MINLONG 0x80000000
+#define MAXLONG 0x7fffffff
+#define MAXBYTE 0xff
+#define MAXWORD 0xffff
+#define MAXDWORD 0xffffffff
+
+#define FIELD_OFFSET(type,field) ((LONG)(LONG_PTR)&(((type *)0)->field))
+#define RTL_FIELD_SIZE(type,field) (sizeof(((type *)0)->field))
+#define RTL_SIZEOF_THROUGH_FIELD(type,field) (FIELD_OFFSET(type,field) + RTL_FIELD_SIZE(type,field))
+#define RTL_CONTAINS_FIELD(Struct,Size,Field) ((((PCHAR)(&(Struct)->Field)) + sizeof((Struct)->Field)) <= (((PCHAR)(Struct))+(Size)))
+#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))
+#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
+
+#ifdef ENABLE_RTL_NUMBER_OF_V2
+#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A)
+#else
+#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A)
+#endif
+
+#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)
+#define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A)
+
+#define RTL_FIELD_TYPE(type,field) (((type*)0)->field)
+#define RTL_NUMBER_OF_FIELD(type,field) (RTL_NUMBER_OF(RTL_FIELD_TYPE(type,field)))
+#define RTL_PADDING_BETWEEN_FIELDS(T,F1,F2) ((FIELD_OFFSET(T,F2) > FIELD_OFFSET(T,F1)) ? (FIELD_OFFSET(T,F2) - FIELD_OFFSET(T,F1) - RTL_FIELD_SIZE(T,F1)) : (FIELD_OFFSET(T,F1) - FIELD_OFFSET(T,F2) - RTL_FIELD_SIZE(T,F2)))
+
+#ifdef __cplusplus
+#define RTL_CONST_CAST(type) const_cast
+#else
+#define RTL_CONST_CAST(type) (type)
+#endif
+
+#define RTL_BITS_OF(sizeOfArg) (sizeof(sizeOfArg) *8)
+#define RTL_BITS_OF_FIELD(type,field) (RTL_BITS_OF(RTL_FIELD_TYPE(type,field)))
+#define CONTAINING_RECORD(address,type,field) ((type *)((PCHAR)(address) - (ULONG_PTR)(&((type *)0)->field)))
+
+#define VER_SERVER_NT 0x80000000
+#define VER_WORKSTATION_NT 0x40000000
+#define VER_SUITE_SMALLBUSINESS 0x00000001
+#define VER_SUITE_ENTERPRISE 0x00000002
+#define VER_SUITE_BACKOFFICE 0x00000004
+#define VER_SUITE_COMMUNICATIONS 0x00000008
+#define VER_SUITE_TERMINAL 0x00000010
+#define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020
+#define VER_SUITE_EMBEDDEDNT 0x00000040
+#define VER_SUITE_DATACENTER 0x00000080
+#define VER_SUITE_SINGLEUSERTS 0x00000100
+#define VER_SUITE_PERSONAL 0x00000200
+#define VER_SUITE_BLADE 0x00000400
+#define VER_SUITE_EMBEDDED_RESTRICTED 0x00000800
+#define VER_SUITE_SECURITY_APPLIANCE 0x00001000
+#define VER_SUITE_STORAGE_SERVER 0x00002000
+#define VER_SUITE_COMPUTE_SERVER 0x00004000
+
+#define PRODUCT_UNDEFINED 0x0
+
+#define PRODUCT_ULTIMATE 0x1
+#define PRODUCT_HOME_BASIC 0x2
+#define PRODUCT_HOME_PREMIUM 0x3
+#define PRODUCT_ENTERPRISE 0x4
+#define PRODUCT_HOME_BASIC_N 0x5
+#define PRODUCT_BUSINESS 0x6
+#define PRODUCT_STANDARD_SERVER 0x7
+#define PRODUCT_DATACENTER_SERVER 0x8
+#define PRODUCT_SMALLBUSINESS_SERVER 0x9
+#define PRODUCT_ENTERPRISE_SERVER 0xa
+#define PRODUCT_STARTER 0xb
+#define PRODUCT_DATACENTER_SERVER_CORE 0xc
+#define PRODUCT_STANDARD_SERVER_CORE 0xd
+#define PRODUCT_ENTERPRISE_SERVER_CORE 0xe
+#define PRODUCT_ENTERPRISE_SERVER_IA64 0xf
+#define PRODUCT_BUSINESS_N 0x10
+#define PRODUCT_WEB_SERVER 0x11
+#define PRODUCT_CLUSTER_SERVER 0x12
+#define PRODUCT_HOME_SERVER 0x13
+#define PRODUCT_STORAGE_EXPRESS_SERVER 0x14
+#define PRODUCT_STORAGE_STANDARD_SERVER 0x15
+#define PRODUCT_STORAGE_WORKGROUP_SERVER 0x16
+#define PRODUCT_STORAGE_ENTERPRISE_SERVER 0x17
+#define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x18
+#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x19
+
+#define PRODUCT_UNLICENSED 0xabcdabcd
+
+#define LANG_NEUTRAL 0x00
+#define LANG_INVARIANT 0x7f
+
+#define LANG_AFRIKAANS 0x36
+#define LANG_ALBANIAN 0x1c
+#define LANG_ALSATIAN 0x84
+#define LANG_AMHARIC 0x5e
+#define LANG_ARABIC 0x01
+#define LANG_ARMENIAN 0x2b
+#define LANG_ASSAMESE 0x4d
+#define LANG_AZERI 0x2c
+#define LANG_BASHKIR 0x6d
+#define LANG_BASQUE 0x2d
+#define LANG_BELARUSIAN 0x23
+#define LANG_BENGALI 0x45
+#define LANG_BRETON 0x7e
+#define LANG_BOSNIAN 0x1a
+#define LANG_BOSNIAN_NEUTRAL 0x781a
+#define LANG_BULGARIAN 0x02
+#define LANG_CATALAN 0x03
+#define LANG_CHINESE 0x04
+#define LANG_CHINESE_SIMPLIFIED 0x04
+#define LANG_CHINESE_TRADITIONAL 0x7c04
+#define LANG_CORSICAN 0x83
+#define LANG_CROATIAN 0x1a
+#define LANG_CZECH 0x05
+#define LANG_DANISH 0x06
+#define LANG_DARI 0x8c
+#define LANG_DIVEHI 0x65
+#define LANG_DUTCH 0x13
+#define LANG_ENGLISH 0x09
+#define LANG_ESTONIAN 0x25
+#define LANG_FAEROESE 0x38
+#define LANG_FARSI 0x29
+#define LANG_FILIPINO 0x64
+#define LANG_FINNISH 0x0b
+#define LANG_FRENCH 0x0c
+#define LANG_FRISIAN 0x62
+#define LANG_GALICIAN 0x56
+#define LANG_GEORGIAN 0x37
+#define LANG_GERMAN 0x07
+#define LANG_GREEK 0x08
+#define LANG_GREENLANDIC 0x6f
+#define LANG_GUJARATI 0x47
+#define LANG_HAUSA 0x68
+#define LANG_HEBREW 0x0d
+#define LANG_HINDI 0x39
+#define LANG_HUNGARIAN 0x0e
+#define LANG_ICELANDIC 0x0f
+#define LANG_IGBO 0x70
+#define LANG_INDONESIAN 0x21
+#define LANG_INUKTITUT 0x5d
+#define LANG_IRISH 0x3c
+#define LANG_ITALIAN 0x10
+#define LANG_JAPANESE 0x11
+#define LANG_KANNADA 0x4b
+#define LANG_KASHMIRI 0x60
+#define LANG_KAZAK 0x3f
+#define LANG_KHMER 0x53
+#define LANG_KICHE 0x86
+#define LANG_KINYARWANDA 0x87
+#define LANG_KONKANI 0x57
+#define LANG_KOREAN 0x12
+#define LANG_KYRGYZ 0x40
+#define LANG_LAO 0x54
+#define LANG_LATVIAN 0x26
+#define LANG_LITHUANIAN 0x27
+#define LANG_LOWER_SORBIAN 0x2e
+#define LANG_LUXEMBOURGISH 0x6e
+#define LANG_MACEDONIAN 0x2f
+#define LANG_MALAY 0x3e
+#define LANG_MALAYALAM 0x4c
+#define LANG_MALTESE 0x3a
+#define LANG_MANIPURI 0x58
+#define LANG_MAORI 0x81
+#define LANG_MAPUDUNGUN 0x7a
+#define LANG_MARATHI 0x4e
+#define LANG_MOHAWK 0x7c
+#define LANG_MONGOLIAN 0x50
+#define LANG_NEPALI 0x61
+#define LANG_NORWEGIAN 0x14
+#define LANG_OCCITAN 0x82
+#define LANG_ORIYA 0x48
+#define LANG_PASHTO 0x63
+#define LANG_PERSIAN 0x29
+#define LANG_POLISH 0x15
+#define LANG_PORTUGUESE 0x16
+#define LANG_PUNJABI 0x46
+#define LANG_QUECHUA 0x6b
+#define LANG_ROMANIAN 0x18
+#define LANG_RUSSIAN 0x19
+#define LANG_SAMI 0x3b
+#define LANG_ROMANSH 0x17
+#define LANG_SANSKRIT 0x4f
+#define LANG_SERBIAN 0x1a
+#define LANG_SERBIAN_NEUTRAL 0x7c1a
+#define LANG_SINDHI 0x59
+#define LANG_SINHALESE 0x5b
+#define LANG_SLOVAK 0x1b
+#define LANG_SLOVENIAN 0x24
+#define LANG_SOTHO 0x6c
+#define LANG_SPANISH 0x0a
+#define LANG_SWAHILI 0x41
+#define LANG_SWEDISH 0x1d
+#define LANG_SYRIAC 0x5a
+#define LANG_TAJIK 0x28
+#define LANG_TAMAZIGHT 0x5f
+#define LANG_TAMIL 0x49
+#define LANG_TATAR 0x44
+#define LANG_TELUGU 0x4a
+#define LANG_THAI 0x1e
+#define LANG_TIBETAN 0x51
+#define LANG_TIGRIGNA 0x73
+#define LANG_TSWANA 0x32
+#define LANG_TURKISH 0x1f
+#define LANG_TURKMEN 0x42
+#define LANG_UIGHUR 0x80
+#define LANG_UKRAINIAN 0x22
+#define LANG_UPPER_SORBIAN 0x2e
+#define LANG_URDU 0x20
+#define LANG_UZBEK 0x43
+#define LANG_VIETNAMESE 0x2a
+#define LANG_WELSH 0x52
+#define LANG_WOLOF 0x88
+#define LANG_XHOSA 0x34
+#define LANG_YAKUT 0x85
+#define LANG_YI 0x78
+#define LANG_YORUBA 0x6a
+#define LANG_ZULU 0x35
+
+#define SUBLANG_NEUTRAL 0x0
+#define SUBLANG_DEFAULT 0x1
+#define SUBLANG_SYS_DEFAULT 0x2
+#define SUBLANG_CUSTOM_DEFAULT 0x3
+#define SUBLANG_CUSTOM_UNSPECIFIED 0x4
+#define SUBLANG_UI_CUSTOM_DEFAULT 0x5
+
+#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
+#define SUBLANG_ARABIC_IRAQ 0x02
+#define SUBLANG_ARABIC_EGYPT 0x03
+#define SUBLANG_ARABIC_LIBYA 0x04
+#define SUBLANG_ARABIC_ALGERIA 0x05
+#define SUBLANG_ARABIC_MOROCCO 0x06
+#define SUBLANG_ARABIC_TUNISIA 0x07
+#define SUBLANG_ARABIC_OMAN 0x08
+#define SUBLANG_ARABIC_YEMEN 0x09
+#define SUBLANG_ARABIC_SYRIA 0x0a
+#define SUBLANG_ARABIC_JORDAN 0x0b
+#define SUBLANG_ARABIC_LEBANON 0x0c
+#define SUBLANG_ARABIC_KUWAIT 0x0d
+#define SUBLANG_ARABIC_UAE 0x0e
+#define SUBLANG_ARABIC_BAHRAIN 0x0f
+#define SUBLANG_ARABIC_QATAR 0x10
+#define SUBLANG_AZERI_LATIN 0x01
+#define SUBLANG_AZERI_CYRILLIC 0x02
+#define SUBLANG_CHINESE_TRADITIONAL 0x01
+#define SUBLANG_CHINESE_SIMPLIFIED 0x02
+#define SUBLANG_CHINESE_HONGKONG 0x03
+#define SUBLANG_CHINESE_SINGAPORE 0x04
+#define SUBLANG_CHINESE_MACAU 0x05
+#define SUBLANG_DUTCH 0x01
+#define SUBLANG_DUTCH_BELGIAN 0x02
+#define SUBLANG_ENGLISH_US 0x01
+#define SUBLANG_ENGLISH_UK 0x02
+#define SUBLANG_ENGLISH_AUS 0x03
+#define SUBLANG_ENGLISH_CAN 0x04
+#define SUBLANG_ENGLISH_NZ 0x05
+#define SUBLANG_ENGLISH_EIRE 0x06
+#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
+#define SUBLANG_ENGLISH_JAMAICA 0x08
+#define SUBLANG_ENGLISH_CARIBBEAN 0x09
+#define SUBLANG_ENGLISH_BELIZE 0x0a
+#define SUBLANG_ENGLISH_TRINIDAD 0x0b
+#define SUBLANG_ENGLISH_ZIMBABWE 0x0c
+#define SUBLANG_ENGLISH_PHILIPPINES 0x0d
+#define SUBLANG_FRENCH 0x01
+#define SUBLANG_FRENCH_BELGIAN 0x02
+#define SUBLANG_FRENCH_CANADIAN 0x03
+#define SUBLANG_FRENCH_SWISS 0x04
+#define SUBLANG_FRENCH_LUXEMBOURG 0x05
+#define SUBLANG_FRENCH_MONACO 0x06
+#define SUBLANG_GERMAN 0x01
+#define SUBLANG_GERMAN_SWISS 0x02
+#define SUBLANG_GERMAN_AUSTRIAN 0x03
+#define SUBLANG_GERMAN_LUXEMBOURG 0x04
+#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
+#define SUBLANG_ITALIAN 0x01
+#define SUBLANG_ITALIAN_SWISS 0x02
+#define SUBLANG_KASHMIRI_SASIA 0x02
+#define SUBLANG_KASHMIRI_INDIA 0x02
+#define SUBLANG_KOREAN 0x01
+#define SUBLANG_LITHUANIAN 0x01
+#define SUBLANG_MALAY_MALAYSIA 0x01
+#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
+#define SUBLANG_NEPALI_INDIA 0x02
+#define SUBLANG_NORWEGIAN_BOKMAL 0x01
+#define SUBLANG_NORWEGIAN_NYNORSK 0x02
+#define SUBLANG_PORTUGUESE 0x02
+#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01
+#define SUBLANG_SERBIAN_LATIN 0x02
+#define SUBLANG_SERBIAN_CYRILLIC 0x03
+#define SUBLANG_SPANISH 0x01
+#define SUBLANG_SPANISH_MEXICAN 0x02
+#define SUBLANG_SPANISH_MODERN 0x03
+#define SUBLANG_SPANISH_GUATEMALA 0x04
+#define SUBLANG_SPANISH_COSTA_RICA 0x05
+#define SUBLANG_SPANISH_PANAMA 0x06
+#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
+#define SUBLANG_SPANISH_VENEZUELA 0x08
+#define SUBLANG_SPANISH_COLOMBIA 0x09
+#define SUBLANG_SPANISH_PERU 0x0a
+#define SUBLANG_SPANISH_ARGENTINA 0x0b
+#define SUBLANG_SPANISH_ECUADOR 0x0c
+#define SUBLANG_SPANISH_CHILE 0x0d
+#define SUBLANG_SPANISH_URUGUAY 0x0e
+#define SUBLANG_SPANISH_PARAGUAY 0x0f
+#define SUBLANG_SPANISH_BOLIVIA 0x10
+#define SUBLANG_SPANISH_EL_SALVADOR 0x11
+#define SUBLANG_SPANISH_HONDURAS 0x12
+#define SUBLANG_SPANISH_NICARAGUA 0x13
+#define SUBLANG_SPANISH_PUERTO_RICO 0x14
+#define SUBLANG_SWEDISH 0x01
+#define SUBLANG_SWEDISH_FINLAND 0x02
+#define SUBLANG_URDU_PAKISTAN 0x01
+#define SUBLANG_URDU_INDIA 0x02
+#define SUBLANG_UZBEK_LATIN 0x01
+#define SUBLANG_UZBEK_CYRILLIC 0x02
+
+#define SORT_DEFAULT 0x0
+#define SORT_INVARIANT_MATH 0x1
+
+#define SORT_JAPANESE_XJIS 0x0
+#define SORT_JAPANESE_UNICODE 0x1
+#define SORT_JAPANESE_RADICALSTROKE 0x4
+
+#define SORT_CHINESE_BIG5 0x0
+#define SORT_CHINESE_PRCP 0x0
+#define SORT_CHINESE_UNICODE 0x1
+#define SORT_CHINESE_PRC 0x2
+#define SORT_CHINESE_BOPOMOFO 0x3
+
+#define SORT_KOREAN_KSC 0x0
+#define SORT_KOREAN_UNICODE 0x1
+
+#define SORT_GERMAN_PHONE_BOOK 0x1
+
+#define SORT_HUNGARIAN_DEFAULT 0x0
+#define SORT_HUNGARIAN_TECHNICAL 0x1
+
+#define SORT_GEORGIAN_TRADITIONAL 0x0
+#define SORT_GEORGIAN_MODERN 0x1
+
+#define MAKELANGID(p,s) ((((WORD)(s)) << 10) | (WORD)(p))
+#define PRIMARYLANGID(lgid) ((WORD)(lgid) & 0x3ff)
+#define SUBLANGID(lgid) ((WORD)(lgid) >> 10)
+
+#define NLS_VALID_LOCALE_MASK 0x000fffff
+
+#define MAKELCID(lgid,srtid) ((DWORD)((((DWORD)((WORD)(srtid))) << 16) | ((DWORD)((WORD)(lgid)))))
+#define MAKESORTLCID(lgid,srtid,ver) ((DWORD)((MAKELCID(lgid,srtid)) | (((DWORD)((WORD)(ver))) << 20)))
+#define LANGIDFROMLCID(lcid) ((WORD)(lcid))
+#define SORTIDFROMLCID(lcid) ((WORD)((((DWORD)(lcid)) >> 16) & 0xf))
+#define SORTVERSIONFROMLCID(lcid) ((WORD)((((DWORD)(lcid)) >> 20) & 0xf))
+
+#define LOCALE_NAME_MAX_LENGTH 85
+#define LANG_SYSTEM_DEFAULT (MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT))
+#define LANG_USER_DEFAULT (MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT))
+
+#define LOCALE_SYSTEM_DEFAULT (MAKELCID(LANG_SYSTEM_DEFAULT,SORT_DEFAULT))
+#define LOCALE_USER_DEFAULT (MAKELCID(LANG_USER_DEFAULT,SORT_DEFAULT))
+
+#define LOCALE_NEUTRAL (MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT))
+
+#define LOCALE_CUSTOM_DEFAULT (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_DEFAULT), SORT_DEFAULT))
+#define LOCALE_CUSTOM_UNSPECIFIED (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_UNSPECIFIED), SORT_DEFAULT))
+#define LOCALE_CUSTOM_UI_DEFAULT (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_UI_CUSTOM_DEFAULT), SORT_DEFAULT))
+
+#define LOCALE_INVARIANT (MAKELCID(MAKELANGID(LANG_INVARIANT,SUBLANG_NEUTRAL),SORT_DEFAULT))
+
+#define UNREFERENCED_PARAMETER(P) (P)
+#define DBG_UNREFERENCED_PARAMETER(P) (P)
+#define DBG_UNREFERENCED_LOCAL_VARIABLE(V) (V)
+
+#define DEFAULT_UNREACHABLE
+
+#ifndef WIN32_NO_STATUS
+#define STATUS_WAIT_0 ((DWORD)0x00000000L)
+#define STATUS_ABANDONED_WAIT_0 ((DWORD)0x00000080L)
+#define STATUS_USER_APC ((DWORD)0x000000C0L)
+#define STATUS_TIMEOUT ((DWORD)0x00000102L)
+#define STATUS_PENDING ((DWORD)0x00000103L)
+#define DBG_EXCEPTION_HANDLED ((DWORD)0x00010001L)
+#define DBG_CONTINUE ((DWORD)0x00010002L)
+#define STATUS_SEGMENT_NOTIFICATION ((DWORD)0x40000005L)
+#define DBG_TERMINATE_THREAD ((DWORD)0x40010003L)
+#define DBG_TERMINATE_PROCESS ((DWORD)0x40010004L)
+#define DBG_CONTROL_C ((DWORD)0x40010005L)
+#define DBG_CONTROL_BREAK ((DWORD)0x40010008L)
+#define DBG_COMMAND_EXCEPTION ((DWORD)0x40010009L)
+#define STATUS_GUARD_PAGE_VIOLATION ((DWORD)0x80000001L)
+#define STATUS_DATATYPE_MISALIGNMENT ((DWORD)0x80000002L)
+#define STATUS_BREAKPOINT ((DWORD)0x80000003L)
+#define STATUS_SINGLE_STEP ((DWORD)0x80000004L)
+#define DBG_EXCEPTION_NOT_HANDLED ((DWORD)0x80010001L)
+#define STATUS_ACCESS_VIOLATION ((DWORD)0xC0000005L)
+#define STATUS_IN_PAGE_ERROR ((DWORD)0xC0000006L)
+#define STATUS_INVALID_HANDLE ((DWORD)0xC0000008L)
+#define STATUS_NO_MEMORY ((DWORD)0xC0000017L)
+#define STATUS_ILLEGAL_INSTRUCTION ((DWORD)0xC000001DL)
+#define STATUS_NONCONTINUABLE_EXCEPTION ((DWORD)0xC0000025L)
+#define STATUS_INVALID_DISPOSITION ((DWORD)0xC0000026L)
+#define STATUS_ARRAY_BOUNDS_EXCEEDED ((DWORD)0xC000008CL)
+#define STATUS_FLOAT_DENORMAL_OPERAND ((DWORD)0xC000008DL)
+#define STATUS_FLOAT_DIVIDE_BY_ZERO ((DWORD)0xC000008EL)
+#define STATUS_FLOAT_INEXACT_RESULT ((DWORD)0xC000008FL)
+#define STATUS_FLOAT_INVALID_OPERATION ((DWORD)0xC0000090L)
+#define STATUS_FLOAT_OVERFLOW ((DWORD)0xC0000091L)
+#define STATUS_FLOAT_STACK_CHECK ((DWORD)0xC0000092L)
+#define STATUS_FLOAT_UNDERFLOW ((DWORD)0xC0000093L)
+#define STATUS_INTEGER_DIVIDE_BY_ZERO ((DWORD)0xC0000094L)
+#define STATUS_INTEGER_OVERFLOW ((DWORD)0xC0000095L)
+#define STATUS_PRIVILEGED_INSTRUCTION ((DWORD)0xC0000096L)
+#define STATUS_STACK_OVERFLOW ((DWORD)0xC00000FDL)
+#define STATUS_CONTROL_C_EXIT ((DWORD)0xC000013AL)
+#define STATUS_FLOAT_MULTIPLE_FAULTS ((DWORD)0xC00002B4L)
+#define STATUS_FLOAT_MULTIPLE_TRAPS ((DWORD)0xC00002B5L)
+#define STATUS_REG_NAT_CONSUMPTION ((DWORD)0xC00002C9L)
+#define STATUS_SXS_EARLY_DEACTIVATION ((DWORD)0xC015000FL)
+#define STATUS_SXS_INVALID_DEACTIVATION ((DWORD)0xC0150010L)
+#endif
+
+#define MAXIMUM_WAIT_OBJECTS 64
+#define MAXIMUM_SUSPEND_COUNT MAXCHAR
+
+ typedef ULONG_PTR KSPIN_LOCK;
+ typedef KSPIN_LOCK *PKSPIN_LOCK;
+
+#ifdef _AMD64_
+
+#if defined(__x86_64) && !defined(RC_INVOKED)
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#define BitTest _bittest
+#define BitTestAndComplement _bittestandcomplement
+#define BitTestAndSet _bittestandset
+#define BitTestAndReset _bittestandreset
+#define InterlockedBitTestAndSet _interlockedbittestandset
+#define InterlockedBitTestAndReset _interlockedbittestandreset
+#define BitTest64 _bittest64
+#define BitTestAndComplement64 _bittestandcomplement64
+#define BitTestAndSet64 _bittestandset64
+#define BitTestAndReset64 _bittestandreset64
+#define InterlockedBitTestAndSet64 _interlockedbittestandset64
+#define InterlockedBitTestAndReset64 _interlockedbittestandreset64
+
+ __CRT_INLINE BOOLEAN _bittest(LONG const *Base,LONG Offset) {
+ int old = 0;
+ __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _bittestandcomplement(LONG *Base,LONG Offset) {
+ int old = 0;
+ __asm__ __volatile__("btcl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN InterlockedBitTestAndComplement(LONG *Base,LONG Bit) {
+ int old = 0;
+ __asm__ __volatile__("lock ; btcl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Bit));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _bittestandset(LONG *Base,LONG Offset) {
+ int old = 0;
+ __asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _bittestandreset(LONG *Base,LONG Offset) {
+ int old = 0;
+ __asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _interlockedbittestandset(LONG *Base,LONG Offset) {
+ int old = 0;
+ __asm__ __volatile__("lock ; btsl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _interlockedbittestandreset(LONG *Base,LONG Offset) {
+ int old = 0;
+ __asm__ __volatile__("lock ; btrl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _bittest64(LONG64 const *Base,LONG64 Offset) {
+ int old = 0;
+ __asm__ __volatile__("btq %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _bittestandcomplement64(LONG64 *Base,LONG64 Offset) {
+ int old = 0;
+ __asm__ __volatile__("btcq %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _bittestandset64(LONG64 *Base,LONG64 Offset) {
+ int old = 0;
+ __asm__ __volatile__("btsq %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _bittestandreset64(LONG64 *Base,LONG64 Offset) {
+ int old = 0;
+ __asm__ __volatile__("btrq %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _interlockedbittestandset64(LONG64 *Base,LONG64 Offset) {
+ int old = 0;
+ __asm__ __volatile__("lock ; btsq %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+ __CRT_INLINE BOOLEAN _interlockedbittestandreset64(LONG64 *Base,LONG64 Offset) {
+ int old = 0;
+ __asm__ __volatile__("lock ; btrq %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long long *) Base))
+ :"Ir" (Offset));
+ return (BOOLEAN) (old!=0);
+ }
+#define BitScanForward _BitScanForward
+#define BitScanReverse _BitScanReverse
+#define BitScanForward64 _BitScanForward64
+#define BitScanReverse64 _BitScanReverse64
+
+ __CRT_INLINE BOOLEAN _BitScanForward(DWORD *Index,DWORD Mask) {
+ __asm__ __volatile__("bsfl %1,%0" : "=r" (Mask),"=m" ((*(volatile long *)Index)));
+ return Mask!=0;
+ }
+ __CRT_INLINE BOOLEAN _BitScanReverse(DWORD *Index,DWORD Mask) {
+ __asm__ __volatile__("bsrl %1,%0" : "=r" (Mask),"=m" ((*(volatile long *)Index)));
+ return Mask!=0;
+ }
+ __CRT_INLINE BOOLEAN _BitScanForward64(DWORD *Index,DWORD64 Mask) {
+ __asm__ __volatile__("bsfq %1,%0" : "=r" (Mask),"=m" ((*(volatile long long *)Index)));
+ return Mask!=0;
+ }
+ __CRT_INLINE BOOLEAN _BitScanReverse64(DWORD *Index,DWORD64 Mask) {
+ __asm__ __volatile__("bsrq %1,%0" : "=r" (Mask),"=m" ((*(volatile long long *)Index)));
+ return Mask!=0;
+ }
+
+#define InterlockedIncrement16 _InterlockedIncrement16
+#define InterlockedDecrement16 _InterlockedDecrement16
+#define InterlockedCompareExchange16 _InterlockedCompareExchange16
+
+#define InterlockedAnd _InterlockedAnd
+#define InterlockedOr _InterlockedOr
+#define InterlockedXor _InterlockedXor
+#define InterlockedIncrement _InterlockedIncrement
+#define InterlockedIncrementAcquire InterlockedIncrement
+#define InterlockedIncrementRelease InterlockedIncrement
+#define InterlockedDecrement _InterlockedDecrement
+#define InterlockedDecrementAcquire InterlockedDecrement
+#define InterlockedDecrementRelease InterlockedDecrement
+#define InterlockedAdd _InterlockedAdd
+#define InterlockedExchange _InterlockedExchange
+#define InterlockedExchangeAdd _InterlockedExchangeAdd
+#define InterlockedCompareExchange _InterlockedCompareExchange
+#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
+#define InterlockedCompareExchangeRelease InterlockedCompareExchange
+
+#define InterlockedAnd64 _InterlockedAnd64
+#define InterlockedAndAffinity InterlockedAnd64
+#define InterlockedOr64 _InterlockedOr64
+#define InterlockedOrAffinity InterlockedOr64
+#define InterlockedXor64 _InterlockedXor64
+#define InterlockedIncrement64 _InterlockedIncrement64
+#define InterlockedDecrement64 _InterlockedDecrement64
+#define InterlockedAdd64 _InterlockedAdd64
+#define InterlockedExchange64 _InterlockedExchange64
+#define InterlockedExchangeAcquire64 InterlockedExchange64
+#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
+#define InterlockedCompareExchange64 _InterlockedCompareExchange64
+#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
+#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
+
+#define InterlockedExchangePointer _InterlockedExchangePointer
+#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
+#define InterlockedCompareExchangePointerAcquire _InterlockedCompareExchangePointer
+#define InterlockedCompareExchangePointerRelease _InterlockedCompareExchangePointer
+
+#define InterlockedExchangeAddSizeT(a,b) InterlockedExchangeAdd64((LONG64 *)a,b)
+#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONG64 *)a)
+#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONG64 *)a)
+
+ __CRT_INLINE SHORT InterlockedIncrement16(SHORT volatile *Addend) {
+ unsigned char c;
+ unsigned char s;
+ __asm__ __volatile__(
+ "lock ; addw $1,%0; sete %1 ; sets %2"
+ :"=m" (*Addend), "=qm" (c), "=qm" (s)
+ :"m" (*Addend) : "memory");
+ return (c != 0 ? 0 : (s != 0 ? -1 : 1));
+ }
+ __CRT_INLINE SHORT InterlockedDecrement16(SHORT volatile *Addend) {
+ unsigned char c;
+ unsigned char s;
+ __asm__ __volatile__(
+ "lock ; subw $1,%0; sete %1 ; sets %2"
+ :"=m" (*Addend), "=qm" (c), "=qm" (s)
+ :"m" (*Addend) : "memory");
+ return (c != 0 ? 0 : (s != 0 ? -1 : 1));
+ }
+ __CRT_INLINE SHORT InterlockedCompareExchange16(SHORT volatile *Destination,SHORT ExChange,SHORT Comperand) {
+ SHORT prev;
+ __asm__ __volatile__("lock ; cmpxchgw %w1,%2"
+ :"=a"(prev)
+ :"q"(ExChange), "m"(*Destination), "0"(Comperand)
+ : "memory");
+ return prev;
+ }
+ __CRT_INLINE LONG InterlockedAnd(LONG volatile *Destination,LONG Value) {
+ __asm__ __volatile__("lock ; andl %0,%1"
+ : :"r"(Value),"m"(*Destination)
+ : "memory");
+ return *Destination;
+ }
+ __CRT_INLINE LONG InterlockedOr(LONG volatile *Destination,LONG Value) {
+ __asm__ __volatile__("lock ; orl %0,%1"
+ : : "r"(Value),"m"(*Destination) : "memory");
+ return *Destination;
+ }
+ __CRT_INLINE LONG InterlockedXor(LONG volatile *Destination,LONG Value) {
+ __asm__ __volatile__("lock ; xorl %0,%1"
+ : : "r"(Value),"m"(*Destination) : "memory");
+ return *Destination;
+ }
+ // $$$$
+ __CRT_INLINE LONG64 InterlockedAnd64(LONG64 volatile *Destination,LONG64 Value) {
+ __asm__ __volatile__("lock ; andq %0,%1"
+ : : "r"(Value),"m"(*Destination) : "memory");
+ return *Destination;
+ }
+ __CRT_INLINE LONG64 InterlockedOr64(LONG64 volatile *Destination,LONG64 Value) {
+ __asm__ __volatile__("lock ; orq %0,%1"
+ : : "r"(Value),"m"(*Destination) : "memory");
+ return *Destination;
+ }
+ __CRT_INLINE LONG64 InterlockedXor64(LONG64 volatile *Destination,LONG64 Value) {
+ __asm__ __volatile__("lock ; xorq %0,%1"
+ : : "r"(Value),"m"(*Destination) : "memory");
+ return *Destination;
+ }
+ __CRT_INLINE LONG InterlockedIncrement(LONG volatile *Addend) {
+ unsigned char c;
+ unsigned char s;
+ __asm__ __volatile__(
+ "lock ; addl $1,%0; sete %1 ; sets %2"
+ :"=m" (*Addend), "=qm" (c), "=qm" (s)
+ :"m" (*Addend) : "memory");
+ return (c != 0 ? 0 : (s != 0 ? -1 : 1));
+ }
+ __CRT_INLINE LONG InterlockedDecrement(LONG volatile *Addend) {
+ unsigned char c;
+ unsigned char s;
+ __asm__ __volatile__(
+ "lock ; subl $1,%0; sete %1 ; sets %2"
+ :"=m" (*Addend), "=qm" (c), "=qm" (s)
+ :"m" (*Addend) : "memory");
+ return (c != 0 ? 0 : (s != 0 ? -1 : 1));
+ }
+ __CRT_INLINE LONG InterlockedExchange(LONG volatile *Target,LONG Value) {
+ __asm__ __volatile("lock ; xchgl %0,%1"
+ : "=r"(Value)
+ : "m"(*Target),"0"(Value)
+ : "memory");
+ return Value;
+ }
+ LONG InterlockedExchangeAdd(LONG volatile *Addend,LONG Value);
+
+#ifndef _X86AMD64_
+ __CRT_INLINE LONG InterlockedAdd(LONG volatile *Addend,LONG Value) { return InterlockedExchangeAdd(Addend,Value) + Value; }
+#endif
+ __CRT_INLINE LONG InterlockedCompareExchange(LONG volatile *Destination,LONG ExChange,LONG Comperand) {
+ LONG prev;
+ __asm__ __volatile__("lock ; cmpxchgl %1,%2" : "=a" (prev) : "q" (ExChange),"m" (*Destination), "0" (Comperand) : "memory");
+ return prev;
+ }
+ __CRT_INLINE LONG64 InterlockedIncrement64(LONG64 volatile *Addend) {
+ unsigned char c;
+ unsigned char s;
+ __asm__ __volatile__(
+ "lock ; addq $1,%0; sete %1 ; sets %2"
+ :"=m" (*Addend), "=qm" (c), "=qm" (s)
+ :"m" (*Addend) : "memory");
+ return (c != 0 ? 0 : (s != 0 ? -1 : 1));
+ }
+ __CRT_INLINE LONG64 InterlockedDecrement64(LONG64 volatile *Addend) {
+ unsigned char c;
+ unsigned char s;
+ __asm__ __volatile__(
+ "lock ; subq $1,%0; sete %1 ; sets %2"
+ :"=m" (*Addend), "=qm" (c), "=qm" (s)
+ :"m" (*Addend) : "memory");
+ return (c != 0 ? 0 : (s != 0 ? -1 : 1));
+ }
+ __CRT_INLINE LONG64 InterlockedExchange64(LONG64 volatile *Target,LONG64 Value) {
+ __asm__ __volatile("lock ; xchgq %0,%1"
+ : "=r"(Value)
+ : "m"(*Target),"0"(Value)
+ : "memory");
+ return Value;
+ }
+ LONG64 InterlockedExchangeAdd64(LONG64 volatile *Addend,LONG64 Value);
+
+#ifndef _X86AMD64_
+ __CRT_INLINE LONG64 InterlockedAdd64(LONG64 volatile *Addend,LONG64 Value) { return InterlockedExchangeAdd64(Addend,Value) + Value; }
+#endif
+
+ __CRT_INLINE LONG64 InterlockedCompareExchange64(LONG64 volatile *Destination,LONG64 ExChange,LONG64 Comperand) {
+ LONG64 prev;
+ __asm__ __volatile__("lock ; cmpxchgq %1,%2" : "=a" (prev) : "q" (ExChange),"m" (*Destination), "0" (Comperand) : "memory");
+ return prev;
+ }
+ __CRT_INLINE PVOID InterlockedCompareExchangePointer(PVOID volatile *Destination,PVOID ExChange,PVOID Comperand) {
+ PVOID prev;
+ __asm__ __volatile__("lock ; cmpxchgq %1,%2" : "=a" (prev) : "q" (ExChange),"m" (*Destination), "0" (Comperand) : "memory");
+ return prev;
+ }
+ __CRT_INLINE PVOID InterlockedExchangePointer(PVOID volatile *Target,PVOID Value) {
+ __asm__ __volatile("lock ; xchgq %0,%1"
+ : "=r"(Value)
+ : "m"(*Target),"0"(Value)
+ : "memory");
+ return Value;
+ }
+
+#define CacheLineFlush(Address) _mm_clflush(Address)
+
+ VOID _ReadWriteBarrier(VOID);
+
+#define FastFence __faststorefence
+#define LoadFence _mm_lfence
+#define MemoryFence _mm_mfence
+#define StoreFence _mm_sfence
+
+ VOID __faststorefence(VOID);
+ VOID _m_prefetchw(volatile CONST VOID *Source);
+
+//!__TINYC__: #include
+
+#define YieldProcessor _mm_pause
+#define MemoryBarrier __faststorefence
+#define PreFetchCacheLine(l,a) _mm_prefetch((CHAR CONST *) a,l)
+#define PrefetchForWrite(p) _m_prefetchw(p)
+#define ReadForWriteAccess(p) (_m_prefetchw(p),*(p))
+
+#define PF_TEMPORAL_LEVEL_1 _MM_HINT_T0
+#define PF_TEMPORAL_LEVEL_2 _MM_HINT_T1
+#define PF_TEMPORAL_LEVEL_3 _MM_HINT_T2
+#define PF_NON_TEMPORAL_LEVEL_ALL _MM_HINT_NTA
+
+#define ReadMxCsr _mm_getcsr
+#define WriteMxCsr _mm_setcsr
+
+ VOID __int2c(VOID);
+
+#define DbgRaiseAssertionFailure() __int2c()
+#define GetCallersEflags() __getcallerseflags()
+
+ unsigned __int32 __getcallerseflags(VOID);
+
+#define GetSegmentLimit __segmentlimit
+
+ DWORD __segmentlimit(DWORD Selector);
+
+#define ReadTimeStampCounter() __rdtsc()
+
+ DWORD64 __rdtsc(VOID);
+ VOID __movsb(PBYTE Destination,BYTE const *Source,SIZE_T Count);
+ VOID __movsw(PWORD Destination,WORD const *Source,SIZE_T Count);
+ VOID __movsd(PDWORD Destination,DWORD const *Source,SIZE_T Count);
+ VOID __movsq(PDWORD64 Destination,DWORD64 const *Source,SIZE_T Count);
+ VOID __stosb(PBYTE Destination,BYTE Value,SIZE_T Count);
+ VOID __stosw(PWORD Destination,WORD Value,SIZE_T Count);
+ VOID __stosd(PDWORD Destination,DWORD Value,SIZE_T Count);
+ VOID __stosq(PDWORD64 Destination,DWORD64 Value,SIZE_T Count);
+
+#define MultiplyHigh __mulh
+#define UnsignedMultiplyHigh __umulh
+
+ LONGLONG MultiplyHigh(LONGLONG Multiplier,LONGLONG Multiplicand);
+ ULONGLONG UnsignedMultiplyHigh(ULONGLONG Multiplier,ULONGLONG Multiplicand);
+
+#define ShiftLeft128 __shiftleft128
+#define ShiftRight128 __shiftright128
+
+ DWORD64 ShiftLeft128(DWORD64 LowPart,DWORD64 HighPart,BYTE Shift);
+ DWORD64 ShiftRight128(DWORD64 LowPart,DWORD64 HighPart,BYTE Shift);
+
+#define Multiply128 _mul128
+
+ LONG64 Multiply128(LONG64 Multiplier,LONG64 Multiplicand,LONG64 *HighProduct);
+
+#define UnsignedMultiply128 _umul128
+
+ DWORD64 UnsignedMultiply128(DWORD64 Multiplier,DWORD64 Multiplicand,DWORD64 *HighProduct);
+
+ __CRT_INLINE LONG64 MultiplyExtract128(LONG64 Multiplier,LONG64 Multiplicand,BYTE Shift) {
+ LONG64 extractedProduct;
+ LONG64 highProduct;
+ LONG64 lowProduct;
+ lowProduct = Multiply128(Multiplier,Multiplicand,&highProduct);
+ extractedProduct = (LONG64)ShiftRight128((LONG64)lowProduct,(LONG64)highProduct,Shift);
+ return extractedProduct;
+ }
+
+ __CRT_INLINE DWORD64 UnsignedMultiplyExtract128(DWORD64 Multiplier,DWORD64 Multiplicand,BYTE Shift) {
+ DWORD64 extractedProduct;
+ DWORD64 highProduct;
+ DWORD64 lowProduct;
+ lowProduct = UnsignedMultiply128(Multiplier,Multiplicand,&highProduct);
+ extractedProduct = ShiftRight128(lowProduct,highProduct,Shift);
+ return extractedProduct;
+ }
+
+ __CRT_INLINE BYTE __readgsbyte(DWORD Offset) {
+ BYTE ret;
+ __asm__ volatile ("movb %%gs:%1,%0"
+ : "=r" (ret) ,"=m" ((*(volatile long *) (DWORD64) Offset)));
+ return ret;
+ }
+ __CRT_INLINE WORD __readgsword(DWORD Offset) {
+ WORD ret;
+ __asm__ volatile ("movw %%gs:%1,%0"
+ : "=r" (ret) ,"=m" ((*(volatile long *) (DWORD64) Offset)));
+ return ret;
+ }
+ __CRT_INLINE DWORD __readgsdword(DWORD Offset) {
+ DWORD ret;
+ __asm__ volatile ("movl %%gs:%1,%0"
+ : "=r" (ret) ,"=m" ((*(volatile long *) (DWORD64) Offset)));
+ return ret;
+ }
+ __CRT_INLINE DWORD64 __readgsqword(DWORD Offset) {
+ void *ret;
+ __asm__ volatile ("movq %%gs:%1,%0"
+ : "=r" (ret) ,"=m" ((*(volatile long *) (DWORD64) Offset)));
+ return (DWORD64) ret;
+ }
+ __CRT_INLINE VOID __writegsbyte(DWORD Offset,BYTE Data) {
+ __asm__ volatile ("movb %0,%%gs:%1"
+ : "=r" (Data) ,"=m" ((*(volatile long *) (DWORD64) Offset)));
+ }
+ __CRT_INLINE VOID __writegsword(DWORD Offset,WORD Data) {
+ __asm__ volatile ("movw %0,%%gs:%1"
+ : "=r" (Data) ,"=m" ((*(volatile long *) (DWORD64) Offset)));
+ }
+ __CRT_INLINE VOID __writegsdword(DWORD Offset,DWORD Data) {
+ __asm__ volatile ("movl %0,%%gs:%1"
+ : "=r" (Data) ,"=m" ((*(volatile long *) (DWORD64) Offset)));
+ }
+ __CRT_INLINE VOID __writegsqword(DWORD Offset,DWORD64 Data) {
+ __asm__ volatile ("movq %0,%%gs:%1"
+ : "=r" (Data) ,"=m" ((*(volatile long *) (DWORD64) Offset)));
+ }
+
+#ifdef __cplusplus
+ }
+#endif
+#endif
+
+#define EXCEPTION_READ_FAULT 0
+#define EXCEPTION_WRITE_FAULT 1
+#define EXCEPTION_EXECUTE_FAULT 8
+
+#if !defined(RC_INVOKED)
+
+#define CONTEXT_AMD64 0x100000
+
+#define CONTEXT_CONTROL (CONTEXT_AMD64 | 0x1L)
+#define CONTEXT_INTEGER (CONTEXT_AMD64 | 0x2L)
+#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x4L)
+#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x8L)
+#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x10L)
+
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
+#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS)
+
+#define CONTEXT_EXCEPTION_ACTIVE 0x8000000
+#define CONTEXT_SERVICE_ACTIVE 0x10000000
+#define CONTEXT_EXCEPTION_REQUEST 0x40000000
+#define CONTEXT_EXCEPTION_REPORTING 0x80000000
+#endif
+
+#define INITIAL_MXCSR 0x1f80
+#define INITIAL_FPCSR 0x027f
+
+ typedef DECLSPEC_ALIGN(16) struct _M128A {
+ ULONGLONG Low;
+ LONGLONG High;
+ } M128A,*PM128A;
+
+ typedef struct _XMM_SAVE_AREA32 {
+ WORD ControlWord;
+ WORD StatusWord;
+ BYTE TagWord;
+ BYTE Reserved1;
+ WORD ErrorOpcode;
+ DWORD ErrorOffset;
+ WORD ErrorSelector;
+ WORD Reserved2;
+ DWORD DataOffset;
+ WORD DataSelector;
+ WORD Reserved3;
+ DWORD MxCsr;
+ DWORD MxCsr_Mask;
+ M128A FloatRegisters[8];
+ M128A XmmRegisters[16];
+ BYTE Reserved4[96];
+ } XMM_SAVE_AREA32,*PXMM_SAVE_AREA32;
+
+#define LEGACY_SAVE_AREA_LENGTH sizeof(XMM_SAVE_AREA32)
+
+ typedef DECLSPEC_ALIGN(16) struct _CONTEXT {
+ DWORD64 P1Home;
+ DWORD64 P2Home;
+ DWORD64 P3Home;
+ DWORD64 P4Home;
+ DWORD64 P5Home;
+ DWORD64 P6Home;
+ DWORD ContextFlags;
+ DWORD MxCsr;
+ WORD SegCs;
+ WORD SegDs;
+ WORD SegEs;
+ WORD SegFs;
+ WORD SegGs;
+ WORD SegSs;
+ DWORD EFlags;
+ DWORD64 Dr0;
+ DWORD64 Dr1;
+ DWORD64 Dr2;
+ DWORD64 Dr3;
+ DWORD64 Dr6;
+ DWORD64 Dr7;
+ DWORD64 Rax;
+ DWORD64 Rcx;
+ DWORD64 Rdx;
+ DWORD64 Rbx;
+ DWORD64 Rsp;
+ DWORD64 Rbp;
+ DWORD64 Rsi;
+ DWORD64 Rdi;
+ DWORD64 R8;
+ DWORD64 R9;
+ DWORD64 R10;
+ DWORD64 R11;
+ DWORD64 R12;
+ DWORD64 R13;
+ DWORD64 R14;
+ DWORD64 R15;
+ DWORD64 Rip;
+ union {
+ XMM_SAVE_AREA32 FltSave;
+ XMM_SAVE_AREA32 FloatSave;
+ struct {
+ M128A Header[2];
+ M128A Legacy[8];
+ M128A Xmm0;
+ M128A Xmm1;
+ M128A Xmm2;
+ M128A Xmm3;
+ M128A Xmm4;
+ M128A Xmm5;
+ M128A Xmm6;
+ M128A Xmm7;
+ M128A Xmm8;
+ M128A Xmm9;
+ M128A Xmm10;
+ M128A Xmm11;
+ M128A Xmm12;
+ M128A Xmm13;
+ M128A Xmm14;
+ M128A Xmm15;
+ };
+ };
+ M128A VectorRegister[26];
+ DWORD64 VectorControl;
+ DWORD64 DebugControl;
+ DWORD64 LastBranchToRip;
+ DWORD64 LastBranchFromRip;
+ DWORD64 LastExceptionToRip;
+ DWORD64 LastExceptionFromRip;
+ } CONTEXT,*PCONTEXT;
+
+#define RUNTIME_FUNCTION_INDIRECT 0x1
+
+ typedef struct _RUNTIME_FUNCTION {
+ DWORD BeginAddress;
+ DWORD EndAddress;
+ DWORD UnwindData;
+ } RUNTIME_FUNCTION,*PRUNTIME_FUNCTION;
+
+ typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context);
+ typedef DWORD (*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(HANDLE Process,PVOID TableAddress,PDWORD Entries,PRUNTIME_FUNCTION *Functions);
+
+#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
+
+ NTSYSAPI VOID __cdecl RtlRestoreContext (PCONTEXT ContextRecord,struct _EXCEPTION_RECORD *ExceptionRecord);
+ NTSYSAPI BOOLEAN __cdecl RtlAddFunctionTable(PRUNTIME_FUNCTION FunctionTable,DWORD EntryCount,DWORD64 BaseAddress);
+ NTSYSAPI BOOLEAN __cdecl RtlInstallFunctionTableCallback(DWORD64 TableIdentifier,DWORD64 BaseAddress,DWORD Length,PGET_RUNTIME_FUNCTION_CALLBACK Callback,PVOID Context,PCWSTR OutOfProcessCallbackDll);
+ NTSYSAPI BOOLEAN __cdecl RtlDeleteFunctionTable(PRUNTIME_FUNCTION FunctionTable);
+#endif
+
+#ifdef I_X86_
+#if(defined(_X86_) && !defined(__x86_64)) && !defined(RC_INVOKED)
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+ __CRT_INLINE BOOLEAN InterlockedBitTestAndSet(LONG *Base,LONG Bit) {
+ int old = 0;
+ __asm__ __volatile__("lock ; btsl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Bit));
+ return (BOOLEAN) (old!=0);
+ }
+
+ __CRT_INLINE BOOLEAN InterlockedBitTestAndReset(LONG *Base,LONG Bit) {
+ int old = 0;
+ __asm__ __volatile__("lock ; btrl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Bit));
+ return (BOOLEAN) (old!=0);
+ }
+
+ __CRT_INLINE BOOLEAN InterlockedBitTestAndComplement(LONG *Base,LONG Bit) {
+ int old = 0;
+ __asm__ __volatile__("lock ; btcl %2,%1\n\tsbbl %0,%0 "
+ :"=r" (old),"=m" ((*(volatile long *) Base))
+ :"Ir" (Bit));
+ return (BOOLEAN) (old!=0);
+ }
+
+#ifdef _PREFIX_
+ BYTE __readfsbyte(DWORD Offset);
+ WORD __readfsword(DWORD Offset);
+ DWORD __readfsdword(DWORD Offset);
+ VOID __writefsbyte(DWORD Offset,BYTE Data);
+ VOID __writefsword(DWORD Offset,WORD Data);
+ VOID __writefsdword(DWORD Offset,DWORD Data);
+#endif
+
+#ifdef __cplusplus
+ }
+#endif
+#endif
+
+#if(defined(_X86_) && !defined(__x86_64))
+ __CRT_INLINE VOID MemoryBarrier(VOID) {
+ LONG Barrier;
+ __asm__ __volatile__("xchgl %eax,%0 "
+ :"=r" (Barrier));
+ }
+#define YieldProcessor() __asm__ __volatile__("rep nop ");
+
+#define PreFetchCacheLine(l,a)
+#define ReadForWriteAccess(p) (*(p))
+
+#define PF_TEMPORAL_LEVEL_1
+#define PF_NON_TEMPORAL_LEVEL_ALL
+
+ __CRT_INLINE VOID DbgRaiseAssertionFailure(void) {
+ __asm__ __volatile__("int 0x2c ");
+ }
+ PVOID GetCurrentFiber(void);
+ __CRT_INLINE PVOID GetCurrentFiber(void)
+ {
+ void *ret;
+ __asm__ volatile ("movl %%fs:0x10,%0"
+ : "=r" (ret));
+ return ret;
+ }
+ PVOID GetFiberData(void);
+ __CRT_INLINE PVOID GetFiberData(void)
+ {
+ void *ret;
+ __asm__ volatile ("movl %%fs:0x10,%0\n"
+ "movl (%0),%0"
+ : "=r" (ret));
+ return ret;
+ }
+#endif
+
+#define EXCEPTION_READ_FAULT 0
+#define EXCEPTION_WRITE_FAULT 1
+#define EXCEPTION_EXECUTE_FAULT 8
+
+#define SIZE_OF_80387_REGISTERS 80
+
+#if !defined(RC_INVOKED)
+
+#define CONTEXT_i386 0x00010000
+#define CONTEXT_i486 0x00010000
+
+#define CONTEXT_CONTROL (CONTEXT_i386 | 0x00000001L)
+#define CONTEXT_INTEGER (CONTEXT_i386 | 0x00000002L)
+#define CONTEXT_SEGMENTS (CONTEXT_i386 | 0x00000004L)
+#define CONTEXT_FLOATING_POINT (CONTEXT_i386 | 0x00000008L)
+#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | 0x00000010L)
+#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386 | 0x00000020L)
+
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS)
+
+#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | CONTEXT_EXTENDED_REGISTERS)
+#endif
+
+#define MAXIMUM_SUPPORTED_EXTENSION 512
+
+ typedef struct _FLOATING_SAVE_AREA {
+ DWORD ControlWord;
+ DWORD StatusWord;
+ DWORD TagWord;
+ DWORD ErrorOffset;
+ DWORD ErrorSelector;
+ DWORD DataOffset;
+ DWORD DataSelector;
+ BYTE RegisterArea[SIZE_OF_80387_REGISTERS];
+ DWORD Cr0NpxState;
+ } FLOATING_SAVE_AREA;
+
+ typedef FLOATING_SAVE_AREA *PFLOATING_SAVE_AREA;
+
+ typedef struct _CONTEXT {
+ DWORD ContextFlags;
+ DWORD Dr0;
+ DWORD Dr1;
+ DWORD Dr2;
+ DWORD Dr3;
+ DWORD Dr6;
+ DWORD Dr7;
+ FLOATING_SAVE_AREA FloatSave;
+ DWORD SegGs;
+ DWORD SegFs;
+ DWORD SegEs;
+ DWORD SegDs;
+
+ DWORD Edi;
+ DWORD Esi;
+ DWORD Ebx;
+ DWORD Edx;
+ DWORD Ecx;
+ DWORD Eax;
+ DWORD Ebp;
+ DWORD Eip;
+ DWORD SegCs;
+ DWORD EFlags;
+ DWORD Esp;
+ DWORD SegSs;
+ BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
+ } CONTEXT;
+
+ typedef CONTEXT *PCONTEXT;
+#endif
+
+#ifndef _LDT_ENTRY_DEFINED
+#define _LDT_ENTRY_DEFINED
+
+ typedef struct _LDT_ENTRY {
+ WORD LimitLow;
+ WORD BaseLow;
+ union {
+ struct {
+ BYTE BaseMid;
+ BYTE Flags1;
+ BYTE Flags2;
+ BYTE BaseHi;
+ } Bytes;
+ struct {
+ DWORD BaseMid : 8;
+ DWORD Type : 5;
+ DWORD Dpl : 2;
+ DWORD Pres : 1;
+ DWORD LimitHi : 4;
+ DWORD Sys : 1;
+ DWORD Reserved_0 : 1;
+ DWORD Default_Big : 1;
+ DWORD Granularity : 1;
+ DWORD BaseHi : 8;
+ } Bits;
+ } HighWord;
+ } LDT_ENTRY,*PLDT_ENTRY;
+#endif
+
+#if defined(__ia64__) && !defined(RC_INVOKED)
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+ BOOLEAN BitScanForward64(DWORD *Index,DWORD64 Mask);
+ BOOLEAN BitScanReverse64(DWORD *Index,DWORD64 Mask);
+
+#ifdef __cplusplus
+ }
+#endif
+#endif
+
+#if !defined(GENUTIL) && !defined(_GENIA64_) && defined(_IA64_)
+
+ void *_cdecl _rdteb(void);
+#ifdef __ia64__
+
+#define NtCurrentTeb() ((struct _TEB *)_rdteb())
+#define GetCurrentFiber() (((PNT_TIB)NtCurrentTeb())->FiberData)
+#define GetFiberData() (*(PVOID *)(GetCurrentFiber()))
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+ void __break(int);
+ void __yield(void);
+ void __mf(void);
+ void __lfetch(int Level,VOID CONST *Address);
+ void __lfetchfault(int Level,VOID CONST *Address);
+ void __lfetch_excl(int Level,VOID CONST *Address);
+ void __lfetchfault_excl(int Level,VOID CONST *Address);
+
+#define MD_LFHINT_NONE 0x00
+#define MD_LFHINT_NT1 0x01
+#define MD_LFHINT_NT2 0x02
+#define MD_LFHINT_NTA 0x03
+
+#ifdef __cplusplus
+ }
+#endif
+
+#define YieldProcessor __yield
+#define MemoryBarrier __mf
+#define PreFetchCacheLine __lfetch
+#define ReadForWriteAccess(p) (*(p))
+#define DbgRaiseAssertionFailure() __break(ASSERT_BREAKPOINT)
+
+#define PF_TEMPORAL_LEVEL_1 MD_LFHINT_NONE
+#define PF_NON_TEMPORAL_LEVEL_ALL MD_LFHINT_NTA
+
+#define UnsignedMultiplyHigh __UMULH
+
+ ULONGLONG UnsignedMultiplyHigh(ULONGLONG Multiplier,ULONGLONG Multiplicand);
+#else
+ struct _TEB *NtCurrentTeb(void);
+#endif
+#endif
+
+#ifdef _IA64_
+
+#define EXCEPTION_READ_FAULT 0
+#define EXCEPTION_WRITE_FAULT 1
+#define EXCEPTION_EXECUTE_FAULT 2
+
+#if !defined(RC_INVOKED)
+
+#define CONTEXT_IA64 0x00080000
+
+#define CONTEXT_CONTROL (CONTEXT_IA64 | 0x00000001L)
+#define CONTEXT_LOWER_FLOATING_POINT (CONTEXT_IA64 | 0x00000002L)
+#define CONTEXT_HIGHER_FLOATING_POINT (CONTEXT_IA64 | 0x00000004L)
+#define CONTEXT_INTEGER (CONTEXT_IA64 | 0x00000008L)
+#define CONTEXT_DEBUG (CONTEXT_IA64 | 0x00000010L)
+#define CONTEXT_IA32_CONTROL (CONTEXT_IA64 | 0x00000020L)
+
+#define CONTEXT_FLOATING_POINT (CONTEXT_LOWER_FLOATING_POINT | CONTEXT_HIGHER_FLOATING_POINT)
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER | CONTEXT_IA32_CONTROL)
+#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER | CONTEXT_DEBUG | CONTEXT_IA32_CONTROL)
+
+#define CONTEXT_EXCEPTION_ACTIVE 0x8000000
+#define CONTEXT_SERVICE_ACTIVE 0x10000000
+#define CONTEXT_EXCEPTION_REQUEST 0x40000000
+#define CONTEXT_EXCEPTION_REPORTING 0x80000000
+#endif
+
+ typedef struct _CONTEXT {
+ DWORD ContextFlags;
+ DWORD Fill1[3];
+ ULONGLONG DbI0;
+ ULONGLONG DbI1;
+ ULONGLONG DbI2;
+ ULONGLONG DbI3;
+ ULONGLONG DbI4;
+ ULONGLONG DbI5;
+ ULONGLONG DbI6;
+ ULONGLONG DbI7;
+ ULONGLONG DbD0;
+ ULONGLONG DbD1;
+ ULONGLONG DbD2;
+ ULONGLONG DbD3;
+ ULONGLONG DbD4;
+ ULONGLONG DbD5;
+ ULONGLONG DbD6;
+ ULONGLONG DbD7;
+ FLOAT128 FltS0;
+ FLOAT128 FltS1;
+ FLOAT128 FltS2;
+ FLOAT128 FltS3;
+ FLOAT128 FltT0;
+ FLOAT128 FltT1;
+ FLOAT128 FltT2;
+ FLOAT128 FltT3;
+ FLOAT128 FltT4;
+ FLOAT128 FltT5;
+ FLOAT128 FltT6;
+ FLOAT128 FltT7;
+ FLOAT128 FltT8;
+ FLOAT128 FltT9;
+ FLOAT128 FltS4;
+ FLOAT128 FltS5;
+ FLOAT128 FltS6;
+ FLOAT128 FltS7;
+ FLOAT128 FltS8;
+ FLOAT128 FltS9;
+ FLOAT128 FltS10;
+ FLOAT128 FltS11;
+ FLOAT128 FltS12;
+ FLOAT128 FltS13;
+ FLOAT128 FltS14;
+ FLOAT128 FltS15;
+ FLOAT128 FltS16;
+ FLOAT128 FltS17;
+ FLOAT128 FltS18;
+ FLOAT128 FltS19;
+ FLOAT128 FltF32;
+ FLOAT128 FltF33;
+ FLOAT128 FltF34;
+ FLOAT128 FltF35;
+ FLOAT128 FltF36;
+ FLOAT128 FltF37;
+ FLOAT128 FltF38;
+ FLOAT128 FltF39;
+ FLOAT128 FltF40;
+ FLOAT128 FltF41;
+ FLOAT128 FltF42;
+ FLOAT128 FltF43;
+ FLOAT128 FltF44;
+ FLOAT128 FltF45;
+ FLOAT128 FltF46;
+ FLOAT128 FltF47;
+ FLOAT128 FltF48;
+ FLOAT128 FltF49;
+ FLOAT128 FltF50;
+ FLOAT128 FltF51;
+ FLOAT128 FltF52;
+ FLOAT128 FltF53;
+ FLOAT128 FltF54;
+ FLOAT128 FltF55;
+ FLOAT128 FltF56;
+ FLOAT128 FltF57;
+ FLOAT128 FltF58;
+ FLOAT128 FltF59;
+ FLOAT128 FltF60;
+ FLOAT128 FltF61;
+ FLOAT128 FltF62;
+ FLOAT128 FltF63;
+ FLOAT128 FltF64;
+ FLOAT128 FltF65;
+ FLOAT128 FltF66;
+ FLOAT128 FltF67;
+ FLOAT128 FltF68;
+ FLOAT128 FltF69;
+ FLOAT128 FltF70;
+ FLOAT128 FltF71;
+ FLOAT128 FltF72;
+ FLOAT128 FltF73;
+ FLOAT128 FltF74;
+ FLOAT128 FltF75;
+ FLOAT128 FltF76;
+ FLOAT128 FltF77;
+ FLOAT128 FltF78;
+ FLOAT128 FltF79;
+ FLOAT128 FltF80;
+ FLOAT128 FltF81;
+ FLOAT128 FltF82;
+ FLOAT128 FltF83;
+ FLOAT128 FltF84;
+ FLOAT128 FltF85;
+ FLOAT128 FltF86;
+ FLOAT128 FltF87;
+ FLOAT128 FltF88;
+ FLOAT128 FltF89;
+ FLOAT128 FltF90;
+ FLOAT128 FltF91;
+ FLOAT128 FltF92;
+ FLOAT128 FltF93;
+ FLOAT128 FltF94;
+ FLOAT128 FltF95;
+ FLOAT128 FltF96;
+ FLOAT128 FltF97;
+ FLOAT128 FltF98;
+ FLOAT128 FltF99;
+ FLOAT128 FltF100;
+ FLOAT128 FltF101;
+ FLOAT128 FltF102;
+ FLOAT128 FltF103;
+ FLOAT128 FltF104;
+ FLOAT128 FltF105;
+ FLOAT128 FltF106;
+ FLOAT128 FltF107;
+ FLOAT128 FltF108;
+ FLOAT128 FltF109;
+ FLOAT128 FltF110;
+ FLOAT128 FltF111;
+ FLOAT128 FltF112;
+ FLOAT128 FltF113;
+ FLOAT128 FltF114;
+ FLOAT128 FltF115;
+ FLOAT128 FltF116;
+ FLOAT128 FltF117;
+ FLOAT128 FltF118;
+ FLOAT128 FltF119;
+ FLOAT128 FltF120;
+ FLOAT128 FltF121;
+ FLOAT128 FltF122;
+ FLOAT128 FltF123;
+ FLOAT128 FltF124;
+ FLOAT128 FltF125;
+ FLOAT128 FltF126;
+ FLOAT128 FltF127;
+ ULONGLONG StFPSR;
+ ULONGLONG IntGp;
+ ULONGLONG IntT0;
+ ULONGLONG IntT1;
+ ULONGLONG IntS0;
+ ULONGLONG IntS1;
+ ULONGLONG IntS2;
+ ULONGLONG IntS3;
+ ULONGLONG IntV0;
+ ULONGLONG IntT2;
+ ULONGLONG IntT3;
+ ULONGLONG IntT4;
+ ULONGLONG IntSp;
+ ULONGLONG IntTeb;
+ ULONGLONG IntT5;
+ ULONGLONG IntT6;
+ ULONGLONG IntT7;
+ ULONGLONG IntT8;
+ ULONGLONG IntT9;
+ ULONGLONG IntT10;
+ ULONGLONG IntT11;
+ ULONGLONG IntT12;
+ ULONGLONG IntT13;
+ ULONGLONG IntT14;
+ ULONGLONG IntT15;
+ ULONGLONG IntT16;
+ ULONGLONG IntT17;
+ ULONGLONG IntT18;
+ ULONGLONG IntT19;
+ ULONGLONG IntT20;
+ ULONGLONG IntT21;
+ ULONGLONG IntT22;
+ ULONGLONG IntNats;
+ ULONGLONG Preds;
+ ULONGLONG BrRp;
+ ULONGLONG BrS0;
+ ULONGLONG BrS1;
+ ULONGLONG BrS2;
+ ULONGLONG BrS3;
+ ULONGLONG BrS4;
+ ULONGLONG BrT0;
+ ULONGLONG BrT1;
+ ULONGLONG ApUNAT;
+ ULONGLONG ApLC;
+ ULONGLONG ApEC;
+ ULONGLONG ApCCV;
+ ULONGLONG ApDCR;
+ ULONGLONG RsPFS;
+ ULONGLONG RsBSP;
+ ULONGLONG RsBSPSTORE;
+ ULONGLONG RsRSC;
+ ULONGLONG RsRNAT;
+ ULONGLONG StIPSR;
+ ULONGLONG StIIP;
+ ULONGLONG StIFS;
+ ULONGLONG StFCR;
+ ULONGLONG Eflag;
+ ULONGLONG SegCSD;
+ ULONGLONG SegSSD;
+ ULONGLONG Cflag;
+ ULONGLONG StFSR;
+ ULONGLONG StFIR;
+ ULONGLONG StFDR;
+ ULONGLONG UNUSEDPACK;
+ } CONTEXT,*PCONTEXT;
+
+ typedef struct _PLABEL_DESCRIPTOR {
+ ULONGLONG EntryPoint;
+ ULONGLONG GlobalPointer;
+ } PLABEL_DESCRIPTOR,*PPLABEL_DESCRIPTOR;
+
+ typedef struct _RUNTIME_FUNCTION {
+ DWORD BeginAddress;
+ DWORD EndAddress;
+ DWORD UnwindInfoAddress;
+ } RUNTIME_FUNCTION,*PRUNTIME_FUNCTION;
+
+ typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context);
+ typedef DWORD (*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(HANDLE Process,PVOID TableAddress,PDWORD Entries,PRUNTIME_FUNCTION *Functions);
+
+#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
+
+ BOOLEAN RtlAddFunctionTable(PRUNTIME_FUNCTION FunctionTable,DWORD EntryCount,ULONGLONG BaseAddress,ULONGLONG TargetGp);
+ BOOLEAN RtlInstallFunctionTableCallback(DWORD64 TableIdentifier,DWORD64 BaseAddress,DWORD Length,DWORD64 TargetGp,PGET_RUNTIME_FUNCTION_CALLBACK Callback,PVOID Context,PCWSTR OutOfProcessCallbackDll);
+ BOOLEAN RtlDeleteFunctionTable(PRUNTIME_FUNCTION FunctionTable);
+ VOID RtlRestoreContext (PCONTEXT ContextRecord,struct _EXCEPTION_RECORD *ExceptionRecord);
+ VOID __jump_unwind(ULONGLONG TargetMsFrame,ULONGLONG TargetBsFrame,ULONGLONG TargetPc);
+#endif
+
+#define EXCEPTION_NONCONTINUABLE 0x1
+#define EXCEPTION_MAXIMUM_PARAMETERS 15
+
+ typedef struct _EXCEPTION_RECORD {
+ DWORD ExceptionCode;
+ DWORD ExceptionFlags;
+ struct _EXCEPTION_RECORD *ExceptionRecord;
+ PVOID ExceptionAddress;
+ DWORD NumberParameters;
+ ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
+ } EXCEPTION_RECORD;
+
+ typedef EXCEPTION_RECORD *PEXCEPTION_RECORD;
+
+ typedef struct _EXCEPTION_RECORD32 {
+ DWORD ExceptionCode;
+ DWORD ExceptionFlags;
+ DWORD ExceptionRecord;
+ DWORD ExceptionAddress;
+ DWORD NumberParameters;
+ DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
+ } EXCEPTION_RECORD32,*PEXCEPTION_RECORD32;
+
+ typedef struct _EXCEPTION_RECORD64 {
+ DWORD ExceptionCode;
+ DWORD ExceptionFlags;
+ DWORD64 ExceptionRecord;
+ DWORD64 ExceptionAddress;
+ DWORD NumberParameters;
+ DWORD __unusedAlignment;
+ DWORD64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
+ } EXCEPTION_RECORD64,*PEXCEPTION_RECORD64;
+
+ typedef struct _EXCEPTION_POINTERS {
+ PEXCEPTION_RECORD ExceptionRecord;
+ PCONTEXT ContextRecord;
+ } EXCEPTION_POINTERS,*PEXCEPTION_POINTERS;
+
+#ifdef __x86_64
+
+ typedef EXCEPTION_DISPOSITION NTAPI EXCEPTION_ROUTINE (struct _EXCEPTION_RECORD *ExceptionRecord, PVOID EstablisherFrame, struct _CONTEXT *ContextRecord, PVOID DispatcherContext);
+#ifndef __PEXCEPTION_ROUTINE_DEFINED
+#define __PEXCEPTION_ROUTINE_DEFINED
+ typedef EXCEPTION_ROUTINE *PEXCEPTION_ROUTINE;
+#endif
+
+ /* http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx */
+
+#define UNWIND_HISTORY_TABLE_SIZE 12
+
+ typedef struct _UNWIND_HISTORY_TABLE_ENTRY {
+ ULONG64 ImageBase;
+ PRUNTIME_FUNCTION FunctionEntry;
+ } UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
+
+#define UNWIND_HISTORY_TABLE_NONE 0
+#define UNWIND_HISTORY_TABLE_GLOBAL 1
+#define UNWIND_HISTORY_TABLE_LOCAL 2
+
+ typedef struct _UNWIND_HISTORY_TABLE {
+ ULONG Count;
+ UCHAR Search;
+ ULONG64 LowAddress;
+ ULONG64 HighAddress;
+ UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
+ } UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
+
+ /* http://msdn.microsoft.com/en-us/library/b6sf5kbd(VS.80).aspx */
+
+ struct _DISPATCHER_CONTEXT;
+ typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT;
+ typedef struct _DISPATCHER_CONTEXT *PDISPATCHER_CONTEXT;
+
+ struct _DISPATCHER_CONTEXT {
+ ULONG64 ControlPc;
+ ULONG64 ImageBase;
+ PRUNTIME_FUNCTION FunctionEntry;
+ ULONG64 EstablisherFrame;
+ ULONG64 TargetIp;
+ PCONTEXT ContextRecord;
+ PEXCEPTION_ROUTINE LanguageHandler;
+ PVOID HandlerData;
+ /* http://www.nynaeve.net/?p=99 */
+ PUNWIND_HISTORY_TABLE HistoryTable;
+ ULONG ScopeIndex;
+ ULONG Fill0;
+ };
+
+ /* http://msdn.microsoft.com/en-us/library/ms680617(VS.85).aspx */
+
+ typedef struct _KNONVOLATILE_CONTEXT_POINTERS
+ {
+ PM128A FloatingContext[16];
+ PULONG64 IntegerContext[16];
+ } KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
+#endif /* defined(__x86_64) */
+
+ typedef PVOID PACCESS_TOKEN;
+ typedef PVOID PSECURITY_DESCRIPTOR;
+ typedef PVOID PSID;
+
+ typedef DWORD ACCESS_MASK;
+ typedef ACCESS_MASK *PACCESS_MASK;
+
+#define DELETE (0x00010000L)
+#define READ_CONTROL (0x00020000L)
+#define WRITE_DAC (0x00040000L)
+#define WRITE_OWNER (0x00080000L)
+#define SYNCHRONIZE (0x00100000L)
+
+#define STANDARD_RIGHTS_REQUIRED (0x000F0000L)
+#define STANDARD_RIGHTS_READ (READ_CONTROL)
+#define STANDARD_RIGHTS_WRITE (READ_CONTROL)
+#define STANDARD_RIGHTS_EXECUTE (READ_CONTROL)
+#define STANDARD_RIGHTS_ALL (0x001F0000L)
+
+#define SPECIFIC_RIGHTS_ALL (0x0000FFFFL)
+
+#define ACCESS_SYSTEM_SECURITY (0x01000000L)
+
+#define MAXIMUM_ALLOWED (0x02000000L)
+
+#define GENERIC_READ (0x80000000L)
+#define GENERIC_WRITE (0x40000000L)
+#define GENERIC_EXECUTE (0x20000000L)
+#define GENERIC_ALL (0x10000000L)
+
+ typedef struct _GENERIC_MAPPING {
+ ACCESS_MASK GenericRead;
+ ACCESS_MASK GenericWrite;
+ ACCESS_MASK GenericExecute;
+ ACCESS_MASK GenericAll;
+ } GENERIC_MAPPING;
+ typedef GENERIC_MAPPING *PGENERIC_MAPPING;
+
+#include
+
+ typedef struct _LUID_AND_ATTRIBUTES {
+ LUID Luid;
+ DWORD Attributes;
+ } LUID_AND_ATTRIBUTES,*PLUID_AND_ATTRIBUTES;
+ typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
+ typedef LUID_AND_ATTRIBUTES_ARRAY *PLUID_AND_ATTRIBUTES_ARRAY;
+
+#include
+
+#ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
+#define SID_IDENTIFIER_AUTHORITY_DEFINED
+ typedef struct _SID_IDENTIFIER_AUTHORITY {
+ BYTE Value[6];
+ } SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY;
+#endif
+
+#ifndef SID_DEFINED
+#define SID_DEFINED
+ typedef struct _SID {
+ BYTE Revision;
+ BYTE SubAuthorityCount;
+ SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
+ DWORD SubAuthority[ANYSIZE_ARRAY];
+ } SID,*PISID;
+#endif
+
+#define SID_REVISION (1)
+#define SID_MAX_SUB_AUTHORITIES (15)
+#define SID_RECOMMENDED_SUB_AUTHORITIES (1)
+
+#define SECURITY_MAX_SID_SIZE (sizeof(SID) - sizeof(DWORD) + (SID_MAX_SUB_AUTHORITIES *sizeof(DWORD)))
+
+ typedef enum _SID_NAME_USE {
+ SidTypeUser = 1,SidTypeGroup,SidTypeDomain,SidTypeAlias,SidTypeWellKnownGroup,SidTypeDeletedAccount,SidTypeInvalid,SidTypeUnknown,SidTypeComputer
+ } SID_NAME_USE,*PSID_NAME_USE;
+
+ typedef struct _SID_AND_ATTRIBUTES {
+ PSID Sid;
+ DWORD Attributes;
+ } SID_AND_ATTRIBUTES,*PSID_AND_ATTRIBUTES;
+
+ typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
+ typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY;
+
+#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
+#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
+#define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
+#define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
+#define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
+#define SECURITY_RESOURCE_MANAGER_AUTHORITY {0,0,0,0,0,9}
+
+#define SECURITY_NULL_RID (0x00000000L)
+#define SECURITY_WORLD_RID (0x00000000L)
+#define SECURITY_LOCAL_RID (0x00000000L)
+
+#define SECURITY_CREATOR_OWNER_RID (0x00000000L)
+#define SECURITY_CREATOR_GROUP_RID (0x00000001L)
+
+#define SECURITY_CREATOR_OWNER_SERVER_RID (0x00000002L)
+#define SECURITY_CREATOR_GROUP_SERVER_RID (0x00000003L)
+
+#define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
+
+#define SECURITY_DIALUP_RID (0x00000001L)
+#define SECURITY_NETWORK_RID (0x00000002L)
+#define SECURITY_BATCH_RID (0x00000003L)
+#define SECURITY_INTERACTIVE_RID (0x00000004L)
+#define SECURITY_LOGON_IDS_RID (0x00000005L)
+#define SECURITY_LOGON_IDS_RID_COUNT (3L)
+#define SECURITY_SERVICE_RID (0x00000006L)
+#define SECURITY_ANONYMOUS_LOGON_RID (0x00000007L)
+#define SECURITY_PROXY_RID (0x00000008L)
+#define SECURITY_ENTERPRISE_CONTROLLERS_RID (0x00000009L)
+#define SECURITY_SERVER_LOGON_RID SECURITY_ENTERPRISE_CONTROLLERS_RID
+#define SECURITY_PRINCIPAL_SELF_RID (0x0000000AL)
+#define SECURITY_AUTHENTICATED_USER_RID (0x0000000BL)
+#define SECURITY_RESTRICTED_CODE_RID (0x0000000CL)
+#define SECURITY_TERMINAL_SERVER_RID (0x0000000DL)
+#define SECURITY_REMOTE_LOGON_RID (0x0000000EL)
+#define SECURITY_THIS_ORGANIZATION_RID (0x0000000FL)
+#define SECURITY_IUSER_RID (0x00000011L)
+
+#define SECURITY_LOCAL_SYSTEM_RID (0x00000012L)
+#define SECURITY_LOCAL_SERVICE_RID (0x00000013L)
+#define SECURITY_NETWORK_SERVICE_RID (0x00000014L)
+
+#define SECURITY_NT_NON_UNIQUE (0x00000015L)
+#define SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT (3L)
+
+#define SECURITY_ENTERPRISE_READONLY_CONTROLLERS_RID (0x00000016L)
+
+#define SECURITY_BUILTIN_DOMAIN_RID (0x00000020L)
+#define SECURITY_WRITE_RESTRICTED_CODE_RID (0x00000021L)
+
+#define SECURITY_PACKAGE_BASE_RID (0x00000040L)
+#define SECURITY_PACKAGE_RID_COUNT (2L)
+#define SECURITY_PACKAGE_NTLM_RID (0x0000000AL)
+#define SECURITY_PACKAGE_SCHANNEL_RID (0x0000000EL)
+#define SECURITY_PACKAGE_DIGEST_RID (0x00000015L)
+
+#define SECURITY_SERVICE_ID_BASE_RID (0x00000050L)
+#define SECURITY_SERVICE_ID_RID_COUNT (6L)
+
+#define SECURITY_RESERVED_ID_BASE_RID (0x00000051L)
+
+#define SECURITY_MAX_ALWAYS_FILTERED (0x000003E7L)
+#define SECURITY_MIN_NEVER_FILTERED (0x000003E8L)
+
+#define SECURITY_OTHER_ORGANIZATION_RID (0x000003E8L)
+
+#define FOREST_USER_RID_MAX (0x000001F3L)
+
+#define DOMAIN_USER_RID_ADMIN (0x000001F4L)
+#define DOMAIN_USER_RID_GUEST (0x000001F5L)
+#define DOMAIN_USER_RID_KRBTGT (0x000001F6L)
+
+#define DOMAIN_USER_RID_MAX (0x000003E7L)
+
+#define DOMAIN_GROUP_RID_ADMINS (0x00000200L)
+#define DOMAIN_GROUP_RID_USERS (0x00000201L)
+#define DOMAIN_GROUP_RID_GUESTS (0x00000202L)
+#define DOMAIN_GROUP_RID_COMPUTERS (0x00000203L)
+#define DOMAIN_GROUP_RID_CONTROLLERS (0x00000204L)
+#define DOMAIN_GROUP_RID_CERT_ADMINS (0x00000205L)
+#define DOMAIN_GROUP_RID_SCHEMA_ADMINS (0x00000206L)
+#define DOMAIN_GROUP_RID_ENTERPRISE_ADMINS (0x00000207L)
+#define DOMAIN_GROUP_RID_POLICY_ADMINS (0x00000208L)
+#define DOMAIN_GROUP_RID_READONLY_CONTROLLERS (0x00000209L)
+
+#define DOMAIN_ALIAS_RID_ADMINS (0x00000220L)
+#define DOMAIN_ALIAS_RID_USERS (0x00000221L)
+#define DOMAIN_ALIAS_RID_GUESTS (0x00000222L)
+#define DOMAIN_ALIAS_RID_POWER_USERS (0x00000223L)
+
+#define DOMAIN_ALIAS_RID_ACCOUNT_OPS (0x00000224L)
+#define DOMAIN_ALIAS_RID_SYSTEM_OPS (0x00000225L)
+#define DOMAIN_ALIAS_RID_PRINT_OPS (0x00000226L)
+#define DOMAIN_ALIAS_RID_BACKUP_OPS (0x00000227L)
+
+#define DOMAIN_ALIAS_RID_REPLICATOR (0x00000228L)
+#define DOMAIN_ALIAS_RID_RAS_SERVERS (0x00000229L)
+#define DOMAIN_ALIAS_RID_PREW2KCOMPACCESS (0x0000022AL)
+#define DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS (0x0000022BL)
+#define DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS (0x0000022CL)
+#define DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS (0x0000022DL)
+
+#define DOMAIN_ALIAS_RID_MONITORING_USERS (0x0000022EL)
+#define DOMAIN_ALIAS_RID_LOGGING_USERS (0x0000022FL)
+#define DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS (0x00000230L)
+#define DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS (0x00000231L)
+#define DOMAIN_ALIAS_RID_DCOM_USERS (0x00000232L)
+
+#define DOMAIN_ALIAS_RID_IUSERS (0x00000238L)
+#define DOMAIN_ALIAS_RID_CRYPTO_OPERATORS (0x00000239L)
+#define DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP (0x0000023BL)
+#define DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP (0x0000023CL)
+#define DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP (0x0000023DL)
+
+#define SECURITY_MANDATORY_LABEL_AUTHORITY {0,0,0,0,0,16}
+#define SECURITY_MANDATORY_UNTRUSTED_RID (0x00000000L)
+#define SECURITY_MANDATORY_LOW_RID (0x00001000L)
+#define SECURITY_MANDATORY_MEDIUM_RID (0x00002000L)
+#define SECURITY_MANDATORY_HIGH_RID (0x00003000L)
+#define SECURITY_MANDATORY_SYSTEM_RID (0x00004000L)
+#define SECURITY_MANDATORY_PROTECTED_PROCESS_RID (0x00005000L)
+
+#define SECURITY_MANDATORY_MAXIMUM_USER_RID SECURITY_MANDATORY_SYSTEM_RID
+
+#define MANDATORY_LEVEL_TO_MANDATORY_RID(IL) (IL * 0x1000)
+
+ typedef enum {
+ WinNullSid = 0,WinWorldSid = 1,WinLocalSid = 2,WinCreatorOwnerSid = 3,WinCreatorGroupSid = 4,WinCreatorOwnerServerSid = 5,WinCreatorGroupServerSid = 6,WinNtAuthoritySid = 7,WinDialupSid = 8,WinNetworkSid = 9,WinBatchSid = 10,WinInteractiveSid = 11,WinServiceSid = 12,WinAnonymousSid = 13,WinProxySid = 14,WinEnterpriseControllersSid = 15,WinSelfSid = 16,WinAuthenticatedUserSid = 17,WinRestrictedCodeSid = 18,WinTerminalServerSid = 19,WinRemoteLogonIdSid = 20,WinLogonIdsSid = 21,WinLocalSystemSid = 22,WinLocalServiceSid = 23,WinNetworkServiceSid = 24,WinBuiltinDomainSid = 25,WinBuiltinAdministratorsSid = 26,WinBuiltinUsersSid = 27,WinBuiltinGuestsSid = 28,WinBuiltinPowerUsersSid = 29,WinBuiltinAccountOperatorsSid = 30,WinBuiltinSystemOperatorsSid = 31,WinBuiltinPrintOperatorsSid = 32,WinBuiltinBackupOperatorsSid = 33,WinBuiltinReplicatorSid = 34,WinBuiltinPreWindows2000CompatibleAccessSid = 35,WinBuiltinRemoteDesktopUsersSid = 36,WinBuiltinNetworkConfigurationOperatorsSid = 37,WinAccountAdministratorSid = 38,WinAccountGuestSid = 39,WinAccountKrbtgtSid = 40,WinAccountDomainAdminsSid = 41,WinAccountDomainUsersSid = 42,WinAccountDomainGuestsSid = 43,WinAccountComputersSid = 44,WinAccountControllersSid = 45,WinAccountCertAdminsSid = 46,WinAccountSchemaAdminsSid = 47,WinAccountEnterpriseAdminsSid = 48,WinAccountPolicyAdminsSid = 49,WinAccountRasAndIasServersSid = 50,WinNTLMAuthenticationSid = 51,WinDigestAuthenticationSid = 52,WinSChannelAuthenticationSid = 53,WinThisOrganizationSid = 54,WinOtherOrganizationSid = 55,WinBuiltinIncomingForestTrustBuildersSid = 56,WinBuiltinPerfMonitoringUsersSid = 57,WinBuiltinPerfLoggingUsersSid = 58,WinBuiltinAuthorizationAccessSid = 59,WinBuiltinTerminalServerLicenseServersSid = 60,WinBuiltinDCOMUsersSid = 61
+ } WELL_KNOWN_SID_TYPE;
+
+#define SYSTEM_LUID { 0x3E7,0x0 }
+#define ANONYMOUS_LOGON_LUID { 0x3e6,0x0 }
+#define LOCALSERVICE_LUID { 0x3e5,0x0 }
+#define NETWORKSERVICE_LUID { 0x3e4,0x0 }
+#define IUSER_LUID { 0x3e3, 0x0 }
+
+#define SE_GROUP_MANDATORY (0x00000001L)
+#define SE_GROUP_ENABLED_BY_DEFAULT (0x00000002L)
+#define SE_GROUP_ENABLED (0x00000004L)
+#define SE_GROUP_OWNER (0x00000008L)
+#define SE_GROUP_USE_FOR_DENY_ONLY (0x00000010L)
+#define SE_GROUP_INTEGRITY (0x00000020L)
+#define SE_GROUP_INTEGRITY_ENABLED (0x00000040L)
+#define SE_GROUP_LOGON_ID (0xC0000000L)
+#define SE_GROUP_RESOURCE (0x20000000L)
+
+#define ACL_REVISION (2)
+#define ACL_REVISION_DS (4)
+
+#define ACL_REVISION1 (1)
+#define MIN_ACL_REVISION ACL_REVISION2
+#define ACL_REVISION2 (2)
+#define ACL_REVISION3 (3)
+#define ACL_REVISION4 (4)
+#define MAX_ACL_REVISION ACL_REVISION4
+
+ typedef struct _ACL {
+ BYTE AclRevision;
+ BYTE Sbz1;
+ WORD AclSize;
+ WORD AceCount;
+ WORD Sbz2;
+ } ACL;
+ typedef ACL *PACL;
+
+ typedef struct _ACE_HEADER {
+ BYTE AceType;
+ BYTE AceFlags;
+ WORD AceSize;
+ } ACE_HEADER;
+ typedef ACE_HEADER *PACE_HEADER;
+
+#define ACCESS_MIN_MS_ACE_TYPE (0x0)
+#define ACCESS_ALLOWED_ACE_TYPE (0x0)
+#define ACCESS_DENIED_ACE_TYPE (0x1)
+#define SYSTEM_AUDIT_ACE_TYPE (0x2)
+#define SYSTEM_ALARM_ACE_TYPE (0x3)
+#define ACCESS_MAX_MS_V2_ACE_TYPE (0x3)
+
+#define ACCESS_ALLOWED_COMPOUND_ACE_TYPE (0x4)
+#define ACCESS_MAX_MS_V3_ACE_TYPE (0x4)
+
+#define ACCESS_MIN_MS_OBJECT_ACE_TYPE (0x5)
+#define ACCESS_ALLOWED_OBJECT_ACE_TYPE (0x5)
+#define ACCESS_DENIED_OBJECT_ACE_TYPE (0x6)
+#define SYSTEM_AUDIT_OBJECT_ACE_TYPE (0x7)
+#define SYSTEM_ALARM_OBJECT_ACE_TYPE (0x8)
+#define ACCESS_MAX_MS_OBJECT_ACE_TYPE (0x8)
+
+#define ACCESS_MAX_MS_V4_ACE_TYPE (0x8)
+#define ACCESS_MAX_MS_ACE_TYPE (0x8)
+
+#define ACCESS_ALLOWED_CALLBACK_ACE_TYPE (0x9)
+#define ACCESS_DENIED_CALLBACK_ACE_TYPE (0xA)
+#define ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE (0xB)
+#define ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE (0xC)
+#define SYSTEM_AUDIT_CALLBACK_ACE_TYPE (0xD)
+#define SYSTEM_ALARM_CALLBACK_ACE_TYPE (0xE)
+#define SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE (0xF)
+#define SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE (0x10)
+
+#define SYSTEM_MANDATORY_LABEL_ACE_TYPE (0x11)
+#define ACCESS_MAX_MS_V5_ACE_TYPE (0x11)
+
+#define OBJECT_INHERIT_ACE (0x1)
+#define CONTAINER_INHERIT_ACE (0x2)
+#define NO_PROPAGATE_INHERIT_ACE (0x4)
+#define INHERIT_ONLY_ACE (0x8)
+#define INHERITED_ACE (0x10)
+#define VALID_INHERIT_FLAGS (0x1F)
+
+#define SUCCESSFUL_ACCESS_ACE_FLAG (0x40)
+#define FAILED_ACCESS_ACE_FLAG (0x80)
+
+ typedef struct _ACCESS_ALLOWED_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD SidStart;
+ } ACCESS_ALLOWED_ACE;
+
+ typedef ACCESS_ALLOWED_ACE *PACCESS_ALLOWED_ACE;
+
+ typedef struct _ACCESS_DENIED_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD SidStart;
+ } ACCESS_DENIED_ACE;
+ typedef ACCESS_DENIED_ACE *PACCESS_DENIED_ACE;
+
+ typedef struct _SYSTEM_AUDIT_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD SidStart;
+ } SYSTEM_AUDIT_ACE;
+ typedef SYSTEM_AUDIT_ACE *PSYSTEM_AUDIT_ACE;
+
+ typedef struct _SYSTEM_ALARM_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD SidStart;
+ } SYSTEM_ALARM_ACE;
+ typedef SYSTEM_ALARM_ACE *PSYSTEM_ALARM_ACE;
+
+ typedef struct _ACCESS_ALLOWED_OBJECT_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD Flags;
+ GUID ObjectType;
+ GUID InheritedObjectType;
+ DWORD SidStart;
+ } ACCESS_ALLOWED_OBJECT_ACE,*PACCESS_ALLOWED_OBJECT_ACE;
+
+ typedef struct _ACCESS_DENIED_OBJECT_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD Flags;
+ GUID ObjectType;
+ GUID InheritedObjectType;
+ DWORD SidStart;
+ } ACCESS_DENIED_OBJECT_ACE,*PACCESS_DENIED_OBJECT_ACE;
+
+ typedef struct _SYSTEM_AUDIT_OBJECT_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD Flags;
+ GUID ObjectType;
+ GUID InheritedObjectType;
+ DWORD SidStart;
+ } SYSTEM_AUDIT_OBJECT_ACE,*PSYSTEM_AUDIT_OBJECT_ACE;
+
+ typedef struct _SYSTEM_ALARM_OBJECT_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD Flags;
+ GUID ObjectType;
+ GUID InheritedObjectType;
+ DWORD SidStart;
+ } SYSTEM_ALARM_OBJECT_ACE,*PSYSTEM_ALARM_OBJECT_ACE;
+
+ typedef struct _ACCESS_ALLOWED_CALLBACK_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD SidStart;
+
+ } ACCESS_ALLOWED_CALLBACK_ACE,*PACCESS_ALLOWED_CALLBACK_ACE;
+
+ typedef struct _ACCESS_DENIED_CALLBACK_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD SidStart;
+
+ } ACCESS_DENIED_CALLBACK_ACE,*PACCESS_DENIED_CALLBACK_ACE;
+
+ typedef struct _SYSTEM_AUDIT_CALLBACK_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD SidStart;
+
+ } SYSTEM_AUDIT_CALLBACK_ACE,*PSYSTEM_AUDIT_CALLBACK_ACE;
+
+ typedef struct _SYSTEM_ALARM_CALLBACK_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD SidStart;
+
+ } SYSTEM_ALARM_CALLBACK_ACE,*PSYSTEM_ALARM_CALLBACK_ACE;
+
+ typedef struct _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD Flags;
+ GUID ObjectType;
+ GUID InheritedObjectType;
+ DWORD SidStart;
+
+ } ACCESS_ALLOWED_CALLBACK_OBJECT_ACE,*PACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
+
+ typedef struct _ACCESS_DENIED_CALLBACK_OBJECT_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD Flags;
+ GUID ObjectType;
+ GUID InheritedObjectType;
+ DWORD SidStart;
+
+ } ACCESS_DENIED_CALLBACK_OBJECT_ACE,*PACCESS_DENIED_CALLBACK_OBJECT_ACE;
+
+ typedef struct _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD Flags;
+ GUID ObjectType;
+ GUID InheritedObjectType;
+ DWORD SidStart;
+
+ } SYSTEM_AUDIT_CALLBACK_OBJECT_ACE,*PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
+
+ typedef struct _SYSTEM_ALARM_CALLBACK_OBJECT_ACE {
+ ACE_HEADER Header;
+ ACCESS_MASK Mask;
+ DWORD Flags;
+ GUID ObjectType;
+ GUID InheritedObjectType;
+ DWORD SidStart;
+
+ } SYSTEM_ALARM_CALLBACK_OBJECT_ACE,*PSYSTEM_ALARM_CALLBACK_OBJECT_ACE;
+
+#define ACE_OBJECT_TYPE_PRESENT 0x1
+#define ACE_INHERITED_OBJECT_TYPE_PRESENT 0x2
+
+ typedef enum _ACL_INFORMATION_CLASS {
+ AclRevisionInformation = 1,AclSizeInformation
+ } ACL_INFORMATION_CLASS;
+
+ typedef struct _ACL_REVISION_INFORMATION {
+ DWORD AclRevision;
+ } ACL_REVISION_INFORMATION;
+ typedef ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION;
+
+ typedef struct _ACL_SIZE_INFORMATION {
+ DWORD AceCount;
+ DWORD AclBytesInUse;
+ DWORD AclBytesFree;
+ } ACL_SIZE_INFORMATION;
+ typedef ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION;
+
+#define SECURITY_DESCRIPTOR_REVISION (1)
+#define SECURITY_DESCRIPTOR_REVISION1 (1)
+
+#define SECURITY_DESCRIPTOR_MIN_LENGTH (sizeof(SECURITY_DESCRIPTOR))
+
+ typedef WORD SECURITY_DESCRIPTOR_CONTROL,*PSECURITY_DESCRIPTOR_CONTROL;
+
+#define SE_OWNER_DEFAULTED (0x0001)
+#define SE_GROUP_DEFAULTED (0x0002)
+#define SE_DACL_PRESENT (0x0004)
+#define SE_DACL_DEFAULTED (0x0008)
+#define SE_SACL_PRESENT (0x0010)
+#define SE_SACL_DEFAULTED (0x0020)
+#define SE_DACL_AUTO_INHERIT_REQ (0x0100)
+#define SE_SACL_AUTO_INHERIT_REQ (0x0200)
+#define SE_DACL_AUTO_INHERITED (0x0400)
+#define SE_SACL_AUTO_INHERITED (0x0800)
+#define SE_DACL_PROTECTED (0x1000)
+#define SE_SACL_PROTECTED (0x2000)
+#define SE_RM_CONTROL_VALID (0x4000)
+#define SE_SELF_RELATIVE (0x8000)
+
+ typedef struct _SECURITY_DESCRIPTOR_RELATIVE {
+ BYTE Revision;
+ BYTE Sbz1;
+ SECURITY_DESCRIPTOR_CONTROL Control;
+ DWORD Owner;
+ DWORD Group;
+ DWORD Sacl;
+ DWORD Dacl;
+ } SECURITY_DESCRIPTOR_RELATIVE,*PISECURITY_DESCRIPTOR_RELATIVE;
+
+ typedef struct _SECURITY_DESCRIPTOR {
+ BYTE Revision;
+ BYTE Sbz1;
+ SECURITY_DESCRIPTOR_CONTROL Control;
+ PSID Owner;
+ PSID Group;
+ PACL Sacl;
+ PACL Dacl;
+
+ } SECURITY_DESCRIPTOR,*PISECURITY_DESCRIPTOR;
+
+ typedef struct _OBJECT_TYPE_LIST {
+ WORD Level;
+ WORD Sbz;
+ GUID *ObjectType;
+ } OBJECT_TYPE_LIST,*POBJECT_TYPE_LIST;
+
+#define ACCESS_OBJECT_GUID 0
+#define ACCESS_PROPERTY_SET_GUID 1
+#define ACCESS_PROPERTY_GUID 2
+
+#define ACCESS_MAX_LEVEL 4
+
+ typedef enum _AUDIT_EVENT_TYPE {
+ AuditEventObjectAccess,AuditEventDirectoryServiceAccess
+ } AUDIT_EVENT_TYPE,*PAUDIT_EVENT_TYPE;
+
+#define AUDIT_ALLOW_NO_PRIVILEGE 0x1
+
+#define ACCESS_DS_SOURCE_A "DS"
+#define ACCESS_DS_SOURCE_W L"DS"
+#define ACCESS_DS_OBJECT_TYPE_NAME_A "Directory Service Object"
+#define ACCESS_DS_OBJECT_TYPE_NAME_W L"Directory Service Object"
+
+#define SE_PRIVILEGE_ENABLED_BY_DEFAULT (0x00000001L)
+#define SE_PRIVILEGE_ENABLED (0x00000002L)
+#define SE_PRIVILEGE_REMOVED (0X00000004L)
+#define SE_PRIVILEGE_USED_FOR_ACCESS (0x80000000L)
+
+#define PRIVILEGE_SET_ALL_NECESSARY (1)
+
+ typedef struct _PRIVILEGE_SET {
+ DWORD PrivilegeCount;
+ DWORD Control;
+ LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY];
+ } PRIVILEGE_SET,*PPRIVILEGE_SET;
+
+#define SE_CREATE_TOKEN_NAME TEXT("SeCreateTokenPrivilege")
+#define SE_ASSIGNPRIMARYTOKEN_NAME TEXT("SeAssignPrimaryTokenPrivilege")
+#define SE_LOCK_MEMORY_NAME TEXT("SeLockMemoryPrivilege")
+#define SE_INCREASE_QUOTA_NAME TEXT("SeIncreaseQuotaPrivilege")
+#define SE_UNSOLICITED_INPUT_NAME TEXT("SeUnsolicitedInputPrivilege")
+#define SE_MACHINE_ACCOUNT_NAME TEXT("SeMachineAccountPrivilege")
+#define SE_TCB_NAME TEXT("SeTcbPrivilege")
+#define SE_SECURITY_NAME TEXT("SeSecurityPrivilege")
+#define SE_TAKE_OWNERSHIP_NAME TEXT("SeTakeOwnershipPrivilege")
+#define SE_LOAD_DRIVER_NAME TEXT("SeLoadDriverPrivilege")
+#define SE_SYSTEM_PROFILE_NAME TEXT("SeSystemProfilePrivilege")
+#define SE_SYSTEMTIME_NAME TEXT("SeSystemtimePrivilege")
+#define SE_PROF_SINGLE_PROCESS_NAME TEXT("SeProfileSingleProcessPrivilege")
+#define SE_INC_BASE_PRIORITY_NAME TEXT("SeIncreaseBasePriorityPrivilege")
+#define SE_CREATE_PAGEFILE_NAME TEXT("SeCreatePagefilePrivilege")
+#define SE_CREATE_PERMANENT_NAME TEXT("SeCreatePermanentPrivilege")
+#define SE_BACKUP_NAME TEXT("SeBackupPrivilege")
+#define SE_RESTORE_NAME TEXT("SeRestorePrivilege")
+#define SE_SHUTDOWN_NAME TEXT("SeShutdownPrivilege")
+#define SE_DEBUG_NAME TEXT("SeDebugPrivilege")
+#define SE_AUDIT_NAME TEXT("SeAuditPrivilege")
+#define SE_SYSTEM_ENVIRONMENT_NAME TEXT("SeSystemEnvironmentPrivilege")
+#define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege")
+#define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege")
+#define SE_UNDOCK_NAME TEXT("SeUndockPrivilege")
+#define SE_SYNC_AGENT_NAME TEXT("SeSyncAgentPrivilege")
+#define SE_ENABLE_DELEGATION_NAME TEXT("SeEnableDelegationPrivilege")
+#define SE_MANAGE_VOLUME_NAME TEXT("SeManageVolumePrivilege")
+#define SE_IMPERSONATE_NAME TEXT("SeImpersonatePrivilege")
+#define SE_CREATE_GLOBAL_NAME TEXT("SeCreateGlobalPrivilege")
+
+ typedef enum _SECURITY_IMPERSONATION_LEVEL {
+ SecurityAnonymous,SecurityIdentification,SecurityImpersonation,SecurityDelegation
+ } SECURITY_IMPERSONATION_LEVEL,*PSECURITY_IMPERSONATION_LEVEL;
+
+#define SECURITY_MAX_IMPERSONATION_LEVEL SecurityDelegation
+#define SECURITY_MIN_IMPERSONATION_LEVEL SecurityAnonymous
+#define DEFAULT_IMPERSONATION_LEVEL SecurityImpersonation
+#define VALID_IMPERSONATION_LEVEL(L) (((L) >= SECURITY_MIN_IMPERSONATION_LEVEL) && ((L) <= SECURITY_MAX_IMPERSONATION_LEVEL))
+
+#define TOKEN_ASSIGN_PRIMARY (0x0001)
+#define TOKEN_DUPLICATE (0x0002)
+#define TOKEN_IMPERSONATE (0x0004)
+#define TOKEN_QUERY (0x0008)
+#define TOKEN_QUERY_SOURCE (0x0010)
+#define TOKEN_ADJUST_PRIVILEGES (0x0020)
+#define TOKEN_ADJUST_GROUPS (0x0040)
+#define TOKEN_ADJUST_DEFAULT (0x0080)
+#define TOKEN_ADJUST_SESSIONID (0x0100)
+
+#define TOKEN_ALL_ACCESS_P (STANDARD_RIGHTS_REQUIRED | TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_QUERY_SOURCE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT)
+#define TOKEN_ALL_ACCESS (TOKEN_ALL_ACCESS_P | TOKEN_ADJUST_SESSIONID)
+#define TOKEN_READ (STANDARD_RIGHTS_READ | TOKEN_QUERY)
+
+#define TOKEN_WRITE (STANDARD_RIGHTS_WRITE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT)
+
+#define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE)
+
+ typedef enum _TOKEN_TYPE {
+ TokenPrimary = 1,TokenImpersonation
+ } TOKEN_TYPE;
+ typedef TOKEN_TYPE *PTOKEN_TYPE;
+
+ typedef enum _TOKEN_INFORMATION_CLASS {
+ TokenUser = 1,TokenGroups,TokenPrivileges,TokenOwner,TokenPrimaryGroup,TokenDefaultDacl,TokenSource,TokenType,TokenImpersonationLevel,
+ TokenStatistics,TokenRestrictedSids,TokenSessionId,TokenGroupsAndPrivileges,TokenSessionReference,TokenSandBoxInert,TokenAuditPolicy,
+ TokenOrigin,MaxTokenInfoClass
+ } TOKEN_INFORMATION_CLASS,*PTOKEN_INFORMATION_CLASS;
+
+ typedef struct _TOKEN_USER {
+ SID_AND_ATTRIBUTES User;
+ } TOKEN_USER,*PTOKEN_USER;
+
+ typedef struct _TOKEN_GROUPS {
+ DWORD GroupCount;
+ SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
+ } TOKEN_GROUPS,*PTOKEN_GROUPS;
+
+ typedef struct _TOKEN_PRIVILEGES {
+ DWORD PrivilegeCount;
+ LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
+ } TOKEN_PRIVILEGES,*PTOKEN_PRIVILEGES;
+
+ typedef struct _TOKEN_OWNER {
+ PSID Owner;
+ } TOKEN_OWNER,*PTOKEN_OWNER;
+
+ typedef struct _TOKEN_PRIMARY_GROUP {
+ PSID PrimaryGroup;
+ } TOKEN_PRIMARY_GROUP,*PTOKEN_PRIMARY_GROUP;
+
+ typedef struct _TOKEN_DEFAULT_DACL {
+ PACL DefaultDacl;
+ } TOKEN_DEFAULT_DACL,*PTOKEN_DEFAULT_DACL;
+
+ typedef struct _TOKEN_GROUPS_AND_PRIVILEGES {
+ DWORD SidCount;
+ DWORD SidLength;
+ PSID_AND_ATTRIBUTES Sids;
+ DWORD RestrictedSidCount;
+ DWORD RestrictedSidLength;
+ PSID_AND_ATTRIBUTES RestrictedSids;
+ DWORD PrivilegeCount;
+ DWORD PrivilegeLength;
+ PLUID_AND_ATTRIBUTES Privileges;
+ LUID AuthenticationId;
+ } TOKEN_GROUPS_AND_PRIVILEGES,*PTOKEN_GROUPS_AND_PRIVILEGES;
+
+#define TOKEN_AUDIT_SUCCESS_INCLUDE 0x1
+#define TOKEN_AUDIT_SUCCESS_EXCLUDE 0x2
+#define TOKEN_AUDIT_FAILURE_INCLUDE 0x4
+#define TOKEN_AUDIT_FAILURE_EXCLUDE 0x8
+
+#define VALID_AUDIT_POLICY_BITS (TOKEN_AUDIT_SUCCESS_INCLUDE | TOKEN_AUDIT_SUCCESS_EXCLUDE | TOKEN_AUDIT_FAILURE_INCLUDE | TOKEN_AUDIT_FAILURE_EXCLUDE)
+#define VALID_TOKEN_AUDIT_POLICY_ELEMENT(P) ((((P).PolicyMask & ~VALID_AUDIT_POLICY_BITS)==0) && ((P).Category <= AuditEventMaxType))
+
+ typedef struct _TOKEN_AUDIT_POLICY_ELEMENT {
+ DWORD Category;
+ DWORD PolicyMask;
+ } TOKEN_AUDIT_POLICY_ELEMENT,*PTOKEN_AUDIT_POLICY_ELEMENT;
+
+ typedef struct _TOKEN_AUDIT_POLICY {
+ DWORD PolicyCount;
+ TOKEN_AUDIT_POLICY_ELEMENT Policy[ANYSIZE_ARRAY];
+ } TOKEN_AUDIT_POLICY,*PTOKEN_AUDIT_POLICY;
+
+#define PER_USER_AUDITING_POLICY_SIZE(p) (sizeof(TOKEN_AUDIT_POLICY) + (((p)->PolicyCount > ANYSIZE_ARRAY) ? (sizeof(TOKEN_AUDIT_POLICY_ELEMENT) *((p)->PolicyCount - ANYSIZE_ARRAY)) : 0))
+#define PER_USER_AUDITING_POLICY_SIZE_BY_COUNT(C) (sizeof(TOKEN_AUDIT_POLICY) + (((C) > ANYSIZE_ARRAY) ? (sizeof(TOKEN_AUDIT_POLICY_ELEMENT) *((C) - ANYSIZE_ARRAY)) : 0))
+
+#define TOKEN_SOURCE_LENGTH 8
+
+ typedef struct _TOKEN_SOURCE {
+ CHAR SourceName[TOKEN_SOURCE_LENGTH];
+ LUID SourceIdentifier;
+ } TOKEN_SOURCE,*PTOKEN_SOURCE;
+
+ typedef struct _TOKEN_STATISTICS {
+ LUID TokenId;
+ LUID AuthenticationId;
+ LARGE_INTEGER ExpirationTime;
+ TOKEN_TYPE TokenType;
+ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
+ DWORD DynamicCharged;
+ DWORD DynamicAvailable;
+ DWORD GroupCount;
+ DWORD PrivilegeCount;
+ LUID ModifiedId;
+ } TOKEN_STATISTICS,*PTOKEN_STATISTICS;
+
+ typedef struct _TOKEN_CONTROL {
+ LUID TokenId;
+ LUID AuthenticationId;
+ LUID ModifiedId;
+ TOKEN_SOURCE TokenSource;
+ } TOKEN_CONTROL,*PTOKEN_CONTROL;
+
+ typedef struct _TOKEN_ORIGIN {
+ LUID OriginatingLogonSession;
+ } TOKEN_ORIGIN,*PTOKEN_ORIGIN;
+
+#define SECURITY_DYNAMIC_TRACKING (TRUE)
+#define SECURITY_STATIC_TRACKING (FALSE)
+
+ typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,*PSECURITY_CONTEXT_TRACKING_MODE;
+
+ typedef struct _SECURITY_QUALITY_OF_SERVICE {
+ DWORD Length;
+ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
+ SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
+ BOOLEAN EffectiveOnly;
+ } SECURITY_QUALITY_OF_SERVICE,*PSECURITY_QUALITY_OF_SERVICE;
+
+ typedef struct _SE_IMPERSONATION_STATE {
+ PACCESS_TOKEN Token;
+ BOOLEAN CopyOnOpen;
+ BOOLEAN EffectiveOnly;
+ SECURITY_IMPERSONATION_LEVEL Level;
+ } SE_IMPERSONATION_STATE,*PSE_IMPERSONATION_STATE;
+
+#define DISABLE_MAX_PRIVILEGE 0x1
+#define SANDBOX_INERT 0x2
+
+ typedef DWORD SECURITY_INFORMATION,*PSECURITY_INFORMATION;
+
+#define OWNER_SECURITY_INFORMATION (0x00000001L)
+#define GROUP_SECURITY_INFORMATION (0x00000002L)
+#define DACL_SECURITY_INFORMATION (0x00000004L)
+#define SACL_SECURITY_INFORMATION (0x00000008L)
+
+#define PROTECTED_DACL_SECURITY_INFORMATION (0x80000000L)
+#define PROTECTED_SACL_SECURITY_INFORMATION (0x40000000L)
+#define UNPROTECTED_DACL_SECURITY_INFORMATION (0x20000000L)
+#define UNPROTECTED_SACL_SECURITY_INFORMATION (0x10000000L)
+
+#define PROCESS_TERMINATE (0x0001)
+#define PROCESS_CREATE_THREAD (0x0002)
+#define PROCESS_SET_SESSIONID (0x0004)
+#define PROCESS_VM_OPERATION (0x0008)
+#define PROCESS_VM_READ (0x0010)
+#define PROCESS_VM_WRITE (0x0020)
+#define PROCESS_DUP_HANDLE (0x0040)
+#define PROCESS_CREATE_PROCESS (0x0080)
+#define PROCESS_SET_QUOTA (0x0100)
+#define PROCESS_SET_INFORMATION (0x0200)
+#define PROCESS_QUERY_INFORMATION (0x0400)
+#define PROCESS_SUSPEND_RESUME (0x0800)
+#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF)
+
+#ifdef _WIN64
+#define MAXIMUM_PROCESSORS 64
+#else
+#define MAXIMUM_PROCESSORS 32
+#endif
+
+#define THREAD_TERMINATE (0x0001)
+#define THREAD_SUSPEND_RESUME (0x0002)
+#define THREAD_GET_CONTEXT (0x0008)
+#define THREAD_SET_CONTEXT (0x0010)
+#define THREAD_SET_INFORMATION (0x0020)
+#define THREAD_QUERY_INFORMATION (0x0040)
+#define THREAD_SET_THREAD_TOKEN (0x0080)
+#define THREAD_IMPERSONATE (0x0100)
+#define THREAD_DIRECT_IMPERSONATION (0x0200)
+
+#define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3FF)
+
+#define JOB_OBJECT_ASSIGN_PROCESS (0x0001)
+#define JOB_OBJECT_SET_ATTRIBUTES (0x0002)
+#define JOB_OBJECT_QUERY (0x0004)
+#define JOB_OBJECT_TERMINATE (0x0008)
+#define JOB_OBJECT_SET_SECURITY_ATTRIBUTES (0x0010)
+#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1F)
+
+ typedef struct _JOB_SET_ARRAY {
+ HANDLE JobHandle;
+ DWORD MemberLevel;
+ DWORD Flags;
+ } JOB_SET_ARRAY,*PJOB_SET_ARRAY;
+
+#define FLS_MAXIMUM_AVAILABLE 128
+#define TLS_MINIMUM_AVAILABLE 64
+
+#ifndef _NT_TIB_DEFINED
+#define _NT_TIB_DEFINED
+ typedef struct _NT_TIB {
+ struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
+ PVOID StackBase;
+ PVOID StackLimit;
+ PVOID SubSystemTib;
+ union {
+ PVOID FiberData;
+ DWORD Version;
+ };
+ PVOID ArbitraryUserPointer;
+ struct _NT_TIB *Self;
+ } NT_TIB;
+ typedef NT_TIB *PNT_TIB;
+#endif
+
+ typedef struct _NT_TIB32 {
+ DWORD ExceptionList;
+ DWORD StackBase;
+ DWORD StackLimit;
+ DWORD SubSystemTib;
+ union {
+ DWORD FiberData;
+ DWORD Version;
+ };
+ DWORD ArbitraryUserPointer;
+ DWORD Self;
+ } NT_TIB32,*PNT_TIB32;
+
+ typedef struct _NT_TIB64 {
+ DWORD64 ExceptionList;
+ DWORD64 StackBase;
+ DWORD64 StackLimit;
+ DWORD64 SubSystemTib;
+ union {
+ DWORD64 FiberData;
+ DWORD Version;
+ };
+ DWORD64 ArbitraryUserPointer;
+ DWORD64 Self;
+ } NT_TIB64,*PNT_TIB64;
+
+#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_)
+#define WX86
+#endif
+
+#define THREAD_BASE_PRIORITY_LOWRT 15
+#define THREAD_BASE_PRIORITY_MAX 2
+#define THREAD_BASE_PRIORITY_MIN (-2)
+#define THREAD_BASE_PRIORITY_IDLE (-15)
+
+ typedef struct _QUOTA_LIMITS {
+ SIZE_T PagedPoolLimit;
+ SIZE_T NonPagedPoolLimit;
+ SIZE_T MinimumWorkingSetSize;
+ SIZE_T MaximumWorkingSetSize;
+ SIZE_T PagefileLimit;
+ LARGE_INTEGER TimeLimit;
+ } QUOTA_LIMITS,*PQUOTA_LIMITS;
+
+#define QUOTA_LIMITS_HARDWS_MIN_ENABLE 0x00000001
+#define QUOTA_LIMITS_HARDWS_MIN_DISABLE 0x00000002
+#define QUOTA_LIMITS_HARDWS_MAX_ENABLE 0x00000004
+#define QUOTA_LIMITS_HARDWS_MAX_DISABLE 0x00000008
+
+ typedef struct _QUOTA_LIMITS_EX {
+ SIZE_T PagedPoolLimit;
+ SIZE_T NonPagedPoolLimit;
+ SIZE_T MinimumWorkingSetSize;
+ SIZE_T MaximumWorkingSetSize;
+ SIZE_T PagefileLimit;
+ LARGE_INTEGER TimeLimit;
+ SIZE_T Reserved1;
+ SIZE_T Reserved2;
+ SIZE_T Reserved3;
+ SIZE_T Reserved4;
+ DWORD Flags;
+ DWORD Reserved5;
+ } QUOTA_LIMITS_EX,*PQUOTA_LIMITS_EX;
+
+ typedef struct _IO_COUNTERS {
+ ULONGLONG ReadOperationCount;
+ ULONGLONG WriteOperationCount;
+ ULONGLONG OtherOperationCount;
+ ULONGLONG ReadTransferCount;
+ ULONGLONG WriteTransferCount;
+ ULONGLONG OtherTransferCount;
+ } IO_COUNTERS;
+ typedef IO_COUNTERS *PIO_COUNTERS;
+
+ typedef struct _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION {
+ LARGE_INTEGER TotalUserTime;
+ LARGE_INTEGER TotalKernelTime;
+ LARGE_INTEGER ThisPeriodTotalUserTime;
+ LARGE_INTEGER ThisPeriodTotalKernelTime;
+ DWORD TotalPageFaultCount;
+ DWORD TotalProcesses;
+ DWORD ActiveProcesses;
+ DWORD TotalTerminatedProcesses;
+ } JOBOBJECT_BASIC_ACCOUNTING_INFORMATION,*PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
+
+ typedef struct _JOBOBJECT_BASIC_LIMIT_INFORMATION {
+ LARGE_INTEGER PerProcessUserTimeLimit;
+ LARGE_INTEGER PerJobUserTimeLimit;
+ DWORD LimitFlags;
+ SIZE_T MinimumWorkingSetSize;
+ SIZE_T MaximumWorkingSetSize;
+ DWORD ActiveProcessLimit;
+ ULONG_PTR Affinity;
+ DWORD PriorityClass;
+ DWORD SchedulingClass;
+ } JOBOBJECT_BASIC_LIMIT_INFORMATION,*PJOBOBJECT_BASIC_LIMIT_INFORMATION;
+
+ typedef struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION {
+ JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
+ IO_COUNTERS IoInfo;
+ SIZE_T ProcessMemoryLimit;
+ SIZE_T JobMemoryLimit;
+ SIZE_T PeakProcessMemoryUsed;
+ SIZE_T PeakJobMemoryUsed;
+ } JOBOBJECT_EXTENDED_LIMIT_INFORMATION,*PJOBOBJECT_EXTENDED_LIMIT_INFORMATION;
+
+ typedef struct _JOBOBJECT_BASIC_PROCESS_ID_LIST {
+ DWORD NumberOfAssignedProcesses;
+ DWORD NumberOfProcessIdsInList;
+ ULONG_PTR ProcessIdList[1];
+ } JOBOBJECT_BASIC_PROCESS_ID_LIST,*PJOBOBJECT_BASIC_PROCESS_ID_LIST;
+
+ typedef struct _JOBOBJECT_BASIC_UI_RESTRICTIONS {
+ DWORD UIRestrictionsClass;
+ } JOBOBJECT_BASIC_UI_RESTRICTIONS,*PJOBOBJECT_BASIC_UI_RESTRICTIONS;
+
+ typedef struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION {
+ DWORD SecurityLimitFlags;
+ HANDLE JobToken;
+ PTOKEN_GROUPS SidsToDisable;
+ PTOKEN_PRIVILEGES PrivilegesToDelete;
+ PTOKEN_GROUPS RestrictedSids;
+ } JOBOBJECT_SECURITY_LIMIT_INFORMATION,*PJOBOBJECT_SECURITY_LIMIT_INFORMATION;
+
+ typedef struct _JOBOBJECT_END_OF_JOB_TIME_INFORMATION {
+ DWORD EndOfJobTimeAction;
+ } JOBOBJECT_END_OF_JOB_TIME_INFORMATION,*PJOBOBJECT_END_OF_JOB_TIME_INFORMATION;
+
+ typedef struct _JOBOBJECT_ASSOCIATE_COMPLETION_PORT {
+ PVOID CompletionKey;
+ HANDLE CompletionPort;
+ } JOBOBJECT_ASSOCIATE_COMPLETION_PORT,*PJOBOBJECT_ASSOCIATE_COMPLETION_PORT;
+
+ typedef struct _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION {
+ JOBOBJECT_BASIC_ACCOUNTING_INFORMATION BasicInfo;
+ IO_COUNTERS IoInfo;
+ } JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION,*PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
+
+ typedef struct _JOBOBJECT_JOBSET_INFORMATION {
+ DWORD MemberLevel;
+ } JOBOBJECT_JOBSET_INFORMATION,*PJOBOBJECT_JOBSET_INFORMATION;
+
+#define JOB_OBJECT_TERMINATE_AT_END_OF_JOB 0
+#define JOB_OBJECT_POST_AT_END_OF_JOB 1
+
+#define JOB_OBJECT_MSG_END_OF_JOB_TIME 1
+#define JOB_OBJECT_MSG_END_OF_PROCESS_TIME 2
+#define JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT 3
+#define JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO 4
+#define JOB_OBJECT_MSG_NEW_PROCESS 6
+#define JOB_OBJECT_MSG_EXIT_PROCESS 7
+#define JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS 8
+#define JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT 9
+#define JOB_OBJECT_MSG_JOB_MEMORY_LIMIT 10
+
+#define JOB_OBJECT_LIMIT_WORKINGSET 0x00000001
+#define JOB_OBJECT_LIMIT_PROCESS_TIME 0x00000002
+#define JOB_OBJECT_LIMIT_JOB_TIME 0x00000004
+#define JOB_OBJECT_LIMIT_ACTIVE_PROCESS 0x00000008
+#define JOB_OBJECT_LIMIT_AFFINITY 0x00000010
+#define JOB_OBJECT_LIMIT_PRIORITY_CLASS 0x00000020
+#define JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME 0x00000040
+#define JOB_OBJECT_LIMIT_SCHEDULING_CLASS 0x00000080
+
+#define JOB_OBJECT_LIMIT_PROCESS_MEMORY 0x00000100
+#define JOB_OBJECT_LIMIT_JOB_MEMORY 0x00000200
+#define JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION 0x00000400
+#define JOB_OBJECT_LIMIT_BREAKAWAY_OK 0x00000800
+#define JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK 0x00001000
+#define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE 0x00002000
+
+#define JOB_OBJECT_LIMIT_RESERVED2 0x00004000
+#define JOB_OBJECT_LIMIT_RESERVED3 0x00008000
+#define JOB_OBJECT_LIMIT_RESERVED4 0x00010000
+#define JOB_OBJECT_LIMIT_RESERVED5 0x00020000
+#define JOB_OBJECT_LIMIT_RESERVED6 0x00040000
+
+#define JOB_OBJECT_LIMIT_VALID_FLAGS 0x0007ffff
+
+#define JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS 0x000000ff
+#define JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS 0x00003fff
+#define JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS 0x0007ffff
+
+#define JOB_OBJECT_UILIMIT_NONE 0x00000000
+
+#define JOB_OBJECT_UILIMIT_HANDLES 0x00000001
+#define JOB_OBJECT_UILIMIT_READCLIPBOARD 0x00000002
+#define JOB_OBJECT_UILIMIT_WRITECLIPBOARD 0x00000004
+#define JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS 0x00000008
+#define JOB_OBJECT_UILIMIT_DISPLAYSETTINGS 0x00000010
+#define JOB_OBJECT_UILIMIT_GLOBALATOMS 0x00000020
+#define JOB_OBJECT_UILIMIT_DESKTOP 0x00000040
+#define JOB_OBJECT_UILIMIT_EXITWINDOWS 0x00000080
+
+#define JOB_OBJECT_UILIMIT_ALL 0x000000FF
+
+#define JOB_OBJECT_UI_VALID_FLAGS 0x000000FF
+
+#define JOB_OBJECT_SECURITY_NO_ADMIN 0x00000001
+#define JOB_OBJECT_SECURITY_RESTRICTED_TOKEN 0x00000002
+#define JOB_OBJECT_SECURITY_ONLY_TOKEN 0x00000004
+#define JOB_OBJECT_SECURITY_FILTER_TOKENS 0x00000008
+
+#define JOB_OBJECT_SECURITY_VALID_FLAGS 0x0000000f
+
+ typedef enum _JOBOBJECTINFOCLASS {
+ JobObjectBasicAccountingInformation = 1,JobObjectBasicLimitInformation,JobObjectBasicProcessIdList,JobObjectBasicUIRestrictions,
+ JobObjectSecurityLimitInformation,JobObjectEndOfJobTimeInformation,JobObjectAssociateCompletionPortInformation,
+ JobObjectBasicAndIoAccountingInformation,JobObjectExtendedLimitInformation,JobObjectJobSetInformation,MaxJobObjectInfoClass
+ } JOBOBJECTINFOCLASS;
+
+#define EVENT_MODIFY_STATE 0x0002
+#define EVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
+
+#define MUTANT_QUERY_STATE 0x0001
+
+#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE| MUTANT_QUERY_STATE)
+#define SEMAPHORE_MODIFY_STATE 0x0002
+#define SEMAPHORE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
+
+#define TIMER_QUERY_STATE 0x0001
+#define TIMER_MODIFY_STATE 0x0002
+
+#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE| TIMER_QUERY_STATE|TIMER_MODIFY_STATE)
+
+#define TIME_ZONE_ID_UNKNOWN 0
+#define TIME_ZONE_ID_STANDARD 1
+#define TIME_ZONE_ID_DAYLIGHT 2
+
+ typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP {
+ RelationProcessorCore,RelationNumaNode,RelationCache
+ } LOGICAL_PROCESSOR_RELATIONSHIP;
+
+#define LTP_PC_SMT 0x1
+
+ typedef enum _PROCESSOR_CACHE_TYPE {
+ CacheUnified,CacheInstruction,CacheData,CacheTrace
+ } PROCESSOR_CACHE_TYPE;
+
+#define CACHE_FULLY_ASSOCIATIVE 0xFF
+
+ typedef struct _CACHE_DESCRIPTOR {
+ BYTE Level;
+ BYTE Associativity;
+ WORD LineSize;
+ DWORD Size;
+ PROCESSOR_CACHE_TYPE Type;
+ } CACHE_DESCRIPTOR,*PCACHE_DESCRIPTOR;
+
+ typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION {
+ ULONG_PTR ProcessorMask;
+ LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
+ union {
+ struct {
+ BYTE Flags;
+ } ProcessorCore;
+ struct {
+ DWORD NodeNumber;
+ } NumaNode;
+ CACHE_DESCRIPTOR Cache;
+ ULONGLONG Reserved[2];
+ };
+ } SYSTEM_LOGICAL_PROCESSOR_INFORMATION,*PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
+
+#define PROCESSOR_INTEL_386 386
+#define PROCESSOR_INTEL_486 486
+#define PROCESSOR_INTEL_PENTIUM 586
+#define PROCESSOR_INTEL_IA64 2200
+#define PROCESSOR_AMD_X8664 8664
+#define PROCESSOR_MIPS_R4000 4000
+#define PROCESSOR_ALPHA_21064 21064
+#define PROCESSOR_PPC_601 601
+#define PROCESSOR_PPC_603 603
+#define PROCESSOR_PPC_604 604
+#define PROCESSOR_PPC_620 620
+#define PROCESSOR_HITACHI_SH3 10003
+#define PROCESSOR_HITACHI_SH3E 10004
+#define PROCESSOR_HITACHI_SH4 10005
+#define PROCESSOR_MOTOROLA_821 821
+#define PROCESSOR_SHx_SH3 103
+#define PROCESSOR_SHx_SH4 104
+#define PROCESSOR_STRONGARM 2577
+#define PROCESSOR_ARM720 1824
+#define PROCESSOR_ARM820 2080
+#define PROCESSOR_ARM920 2336
+#define PROCESSOR_ARM_7TDMI 70001
+#define PROCESSOR_OPTIL 0x494f
+
+#define PROCESSOR_ARCHITECTURE_INTEL 0
+#define PROCESSOR_ARCHITECTURE_MIPS 1
+#define PROCESSOR_ARCHITECTURE_ALPHA 2
+#define PROCESSOR_ARCHITECTURE_PPC 3
+#define PROCESSOR_ARCHITECTURE_SHX 4
+#define PROCESSOR_ARCHITECTURE_ARM 5
+#define PROCESSOR_ARCHITECTURE_IA64 6
+#define PROCESSOR_ARCHITECTURE_ALPHA64 7
+#define PROCESSOR_ARCHITECTURE_MSIL 8
+#define PROCESSOR_ARCHITECTURE_AMD64 9
+#define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 10
+
+#define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
+
+#define PF_FLOATING_POINT_PRECISION_ERRATA 0
+#define PF_FLOATING_POINT_EMULATED 1
+#define PF_COMPARE_EXCHANGE_DOUBLE 2
+#define PF_MMX_INSTRUCTIONS_AVAILABLE 3
+#define PF_PPC_MOVEMEM_64BIT_OK 4
+#define PF_ALPHA_BYTE_INSTRUCTIONS 5
+#define PF_XMMI_INSTRUCTIONS_AVAILABLE 6
+#define PF_3DNOW_INSTRUCTIONS_AVAILABLE 7
+#define PF_RDTSC_INSTRUCTION_AVAILABLE 8
+#define PF_PAE_ENABLED 9
+#define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10
+#define PF_SSE_DAZ_MODE_AVAILABLE 11
+#define PF_NX_ENABLED 12
+
+ typedef struct _MEMORY_BASIC_INFORMATION {
+ PVOID BaseAddress;
+ PVOID AllocationBase;
+ DWORD AllocationProtect;
+ SIZE_T RegionSize;
+ DWORD State;
+ DWORD Protect;
+ DWORD Type;
+ } MEMORY_BASIC_INFORMATION,*PMEMORY_BASIC_INFORMATION;
+
+ typedef struct _MEMORY_BASIC_INFORMATION32 {
+ DWORD BaseAddress;
+ DWORD AllocationBase;
+ DWORD AllocationProtect;
+ DWORD RegionSize;
+ DWORD State;
+ DWORD Protect;
+ DWORD Type;
+ } MEMORY_BASIC_INFORMATION32,*PMEMORY_BASIC_INFORMATION32;
+
+ typedef DECLSPEC_ALIGN(16) struct _MEMORY_BASIC_INFORMATION64 {
+ ULONGLONG BaseAddress;
+ ULONGLONG AllocationBase;
+ DWORD AllocationProtect;
+ DWORD __alignment1;
+ ULONGLONG RegionSize;
+ DWORD State;
+ DWORD Protect;
+ DWORD Type;
+ DWORD __alignment2;
+ } MEMORY_BASIC_INFORMATION64,*PMEMORY_BASIC_INFORMATION64;
+
+#define SECTION_QUERY 0x0001
+#define SECTION_MAP_WRITE 0x0002
+#define SECTION_MAP_READ 0x0004
+#define SECTION_MAP_EXECUTE 0x0008
+#define SECTION_EXTEND_SIZE 0x0010
+#define SECTION_MAP_EXECUTE_EXPLICIT 0x0020
+
+#define SECTION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SECTION_QUERY| SECTION_MAP_WRITE | SECTION_MAP_READ | SECTION_MAP_EXECUTE | SECTION_EXTEND_SIZE)
+#define PAGE_NOACCESS 0x01
+#define PAGE_READONLY 0x02
+#define PAGE_READWRITE 0x04
+#define PAGE_WRITECOPY 0x08
+#define PAGE_EXECUTE 0x10
+#define PAGE_EXECUTE_READ 0x20
+#define PAGE_EXECUTE_READWRITE 0x40
+#define PAGE_EXECUTE_WRITECOPY 0x80
+#define PAGE_GUARD 0x100
+#define PAGE_NOCACHE 0x200
+#define PAGE_WRITECOMBINE 0x400
+#define MEM_COMMIT 0x1000
+#define MEM_RESERVE 0x2000
+#define MEM_DECOMMIT 0x4000
+#define MEM_RELEASE 0x8000
+#define MEM_FREE 0x10000
+#define MEM_PRIVATE 0x20000
+#define MEM_MAPPED 0x40000
+#define MEM_RESET 0x80000
+#define MEM_TOP_DOWN 0x100000
+#define MEM_WRITE_WATCH 0x200000
+#define MEM_PHYSICAL 0x400000
+#define MEM_LARGE_PAGES 0x20000000
+#define MEM_4MB_PAGES 0x80000000
+#define SEC_FILE 0x800000
+#define SEC_IMAGE 0x1000000
+#define SEC_RESERVE 0x4000000
+#define SEC_COMMIT 0x8000000
+#define SEC_NOCACHE 0x10000000
+#define SEC_LARGE_PAGES 0x80000000
+#define MEM_IMAGE SEC_IMAGE
+#define WRITE_WATCH_FLAG_RESET 0x01
+
+#define FILE_READ_DATA (0x0001)
+#define FILE_LIST_DIRECTORY (0x0001)
+
+#define FILE_WRITE_DATA (0x0002)
+#define FILE_ADD_FILE (0x0002)
+
+#define FILE_APPEND_DATA (0x0004)
+#define FILE_ADD_SUBDIRECTORY (0x0004)
+#define FILE_CREATE_PIPE_INSTANCE (0x0004)
+
+#define FILE_READ_EA (0x0008)
+
+#define FILE_WRITE_EA (0x0010)
+
+#define FILE_EXECUTE (0x0020)
+#define FILE_TRAVERSE (0x0020)
+
+#define FILE_DELETE_CHILD (0x0040)
+
+#define FILE_READ_ATTRIBUTES (0x0080)
+
+#define FILE_WRITE_ATTRIBUTES (0x0100)
+
+#define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
+#define FILE_GENERIC_READ (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE)
+#define FILE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE)
+#define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE)
+
+#define FILE_SHARE_READ 0x00000001
+#define FILE_SHARE_WRITE 0x00000002
+#define FILE_SHARE_DELETE 0x00000004
+#define FILE_ATTRIBUTE_READONLY 0x00000001
+#define FILE_ATTRIBUTE_HIDDEN 0x00000002
+#define FILE_ATTRIBUTE_SYSTEM 0x00000004
+#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
+#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
+#define FILE_ATTRIBUTE_DEVICE 0x00000040
+#define FILE_ATTRIBUTE_NORMAL 0x00000080
+#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
+#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
+#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
+#define FILE_ATTRIBUTE_COMPRESSED 0x00000800
+#define FILE_ATTRIBUTE_OFFLINE 0x00001000
+#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
+#define FILE_ATTRIBUTE_ENCRYPTED 0x00004000
+#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
+#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
+#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
+#define FILE_NOTIFY_CHANGE_SIZE 0x00000008
+#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
+#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
+#define FILE_NOTIFY_CHANGE_CREATION 0x00000040
+#define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
+#define FILE_ACTION_ADDED 0x00000001
+#define FILE_ACTION_REMOVED 0x00000002
+#define FILE_ACTION_MODIFIED 0x00000003
+#define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
+#define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
+#define MAILSLOT_NO_MESSAGE ((DWORD)-1)
+#define MAILSLOT_WAIT_FOREVER ((DWORD)-1)
+#define FILE_CASE_SENSITIVE_SEARCH 0x00000001
+#define FILE_CASE_PRESERVED_NAMES 0x00000002
+#define FILE_UNICODE_ON_DISK 0x00000004
+#define FILE_PERSISTENT_ACLS 0x00000008
+#define FILE_FILE_COMPRESSION 0x00000010
+#define FILE_VOLUME_QUOTAS 0x00000020
+#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
+#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
+#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
+#define FILE_VOLUME_IS_COMPRESSED 0x00008000
+#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
+#define FILE_SUPPORTS_ENCRYPTION 0x00020000
+#define FILE_NAMED_STREAMS 0x00040000
+#define FILE_READ_ONLY_VOLUME 0x00080000
+
+ typedef struct _FILE_NOTIFY_INFORMATION {
+ DWORD NextEntryOffset;
+ DWORD Action;
+ DWORD FileNameLength;
+ WCHAR FileName[1];
+ } FILE_NOTIFY_INFORMATION,*PFILE_NOTIFY_INFORMATION;
+
+ typedef union _FILE_SEGMENT_ELEMENT {
+ PVOID64 Buffer;
+ ULONGLONG Alignment;
+ }FILE_SEGMENT_ELEMENT,*PFILE_SEGMENT_ELEMENT;
+
+ typedef struct _REPARSE_GUID_DATA_BUFFER {
+ DWORD ReparseTag;
+ WORD ReparseDataLength;
+ WORD Reserved;
+ GUID ReparseGuid;
+ struct {
+ BYTE DataBuffer[1];
+ } GenericReparseBuffer;
+ } REPARSE_GUID_DATA_BUFFER,*PREPARSE_GUID_DATA_BUFFER;
+
+#define REPARSE_GUID_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_GUID_DATA_BUFFER,GenericReparseBuffer)
+
+#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE (16 *1024)
+
+#define IO_REPARSE_TAG_RESERVED_ZERO (0)
+#define IO_REPARSE_TAG_RESERVED_ONE (1)
+
+#define IO_REPARSE_TAG_RESERVED_RANGE IO_REPARSE_TAG_RESERVED_ONE
+
+#define IsReparseTagMicrosoft(_tag) (((_tag) & 0x80000000))
+#define IsReparseTagNameSurrogate(_tag) (((_tag) & 0x20000000))
+
+#define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
+#define IO_REPARSE_TAG_HSM (0xC0000004L)
+#define IO_REPARSE_TAG_SIS (0x80000007L)
+#define IO_REPARSE_TAG_DFS (0x8000000AL)
+#define IO_REPARSE_TAG_FILTER_MANAGER (0x8000000BL)
+#define IO_COMPLETION_MODIFY_STATE 0x0002
+#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
+#define DUPLICATE_CLOSE_SOURCE 0x00000001
+#define DUPLICATE_SAME_ACCESS 0x00000002
+
+ typedef enum _SYSTEM_POWER_STATE {
+ PowerSystemUnspecified = 0,PowerSystemWorking = 1,PowerSystemSleeping1 = 2,PowerSystemSleeping2 = 3,PowerSystemSleeping3 = 4,PowerSystemHibernate = 5,PowerSystemShutdown = 6,PowerSystemMaximum = 7
+ } SYSTEM_POWER_STATE,*PSYSTEM_POWER_STATE;
+
+#define POWER_SYSTEM_MAXIMUM 7
+
+ typedef enum {
+ PowerActionNone = 0,PowerActionReserved,PowerActionSleep,PowerActionHibernate,PowerActionShutdown,PowerActionShutdownReset,PowerActionShutdownOff,PowerActionWarmEject
+ } POWER_ACTION,*PPOWER_ACTION;
+
+ typedef enum _DEVICE_POWER_STATE {
+ PowerDeviceUnspecified = 0,PowerDeviceD0,PowerDeviceD1,PowerDeviceD2,PowerDeviceD3,PowerDeviceMaximum
+ } DEVICE_POWER_STATE,*PDEVICE_POWER_STATE;
+
+#define ES_SYSTEM_REQUIRED ((DWORD)0x00000001)
+#define ES_DISPLAY_REQUIRED ((DWORD)0x00000002)
+#define ES_USER_PRESENT ((DWORD)0x00000004)
+#define ES_CONTINUOUS ((DWORD)0x80000000)
+
+ typedef DWORD EXECUTION_STATE;
+
+ typedef enum {
+ LT_DONT_CARE,LT_LOWEST_LATENCY
+ } LATENCY_TIME;
+
+#define PDCAP_D0_SUPPORTED 0x00000001
+#define PDCAP_D1_SUPPORTED 0x00000002
+#define PDCAP_D2_SUPPORTED 0x00000004
+#define PDCAP_D3_SUPPORTED 0x00000008
+#define PDCAP_WAKE_FROM_D0_SUPPORTED 0x00000010
+#define PDCAP_WAKE_FROM_D1_SUPPORTED 0x00000020
+#define PDCAP_WAKE_FROM_D2_SUPPORTED 0x00000040
+#define PDCAP_WAKE_FROM_D3_SUPPORTED 0x00000080
+#define PDCAP_WARM_EJECT_SUPPORTED 0x00000100
+
+ typedef struct CM_Power_Data_s {
+ DWORD PD_Size;
+ DEVICE_POWER_STATE PD_MostRecentPowerState;
+ DWORD PD_Capabilities;
+ DWORD PD_D1Latency;
+ DWORD PD_D2Latency;
+ DWORD PD_D3Latency;
+ DEVICE_POWER_STATE PD_PowerStateMapping[POWER_SYSTEM_MAXIMUM];
+ SYSTEM_POWER_STATE PD_DeepestSystemWake;
+ } CM_POWER_DATA,*PCM_POWER_DATA;
+
+ typedef enum {
+ SystemPowerPolicyAc,SystemPowerPolicyDc,VerifySystemPolicyAc,VerifySystemPolicyDc,SystemPowerCapabilities,SystemBatteryState,SystemPowerStateHandler,ProcessorStateHandler,SystemPowerPolicyCurrent,AdministratorPowerPolicy,SystemReserveHiberFile,ProcessorInformation,SystemPowerInformation,ProcessorStateHandler2,LastWakeTime,LastSleepTime,SystemExecutionState,SystemPowerStateNotifyHandler,ProcessorPowerPolicyAc,ProcessorPowerPolicyDc,VerifyProcessorPowerPolicyAc,VerifyProcessorPowerPolicyDc,ProcessorPowerPolicyCurrent,SystemPowerStateLogging,SystemPowerLoggingEntry
+ } POWER_INFORMATION_LEVEL;
+
+ typedef struct {
+ DWORD Granularity;
+ DWORD Capacity;
+ } BATTERY_REPORTING_SCALE,*PBATTERY_REPORTING_SCALE;
+
+ typedef struct {
+ POWER_ACTION Action;
+ DWORD Flags;
+ DWORD EventCode;
+ } POWER_ACTION_POLICY,*PPOWER_ACTION_POLICY;
+
+#define POWER_ACTION_QUERY_ALLOWED 0x00000001
+#define POWER_ACTION_UI_ALLOWED 0x00000002
+#define POWER_ACTION_OVERRIDE_APPS 0x00000004
+#define POWER_ACTION_LIGHTEST_FIRST 0x10000000
+#define POWER_ACTION_LOCK_CONSOLE 0x20000000
+#define POWER_ACTION_DISABLE_WAKES 0x40000000
+#define POWER_ACTION_CRITICAL 0x80000000
+
+#define POWER_LEVEL_USER_NOTIFY_TEXT 0x00000001
+#define POWER_LEVEL_USER_NOTIFY_SOUND 0x00000002
+#define POWER_LEVEL_USER_NOTIFY_EXEC 0x00000004
+#define POWER_USER_NOTIFY_BUTTON 0x00000008
+#define POWER_USER_NOTIFY_SHUTDOWN 0x00000010
+#define POWER_FORCE_TRIGGER_RESET 0x80000000
+
+ typedef struct {
+ BOOLEAN Enable;
+ BYTE Spare[3];
+ DWORD BatteryLevel;
+ POWER_ACTION_POLICY PowerPolicy;
+ SYSTEM_POWER_STATE MinSystemState;
+ } SYSTEM_POWER_LEVEL,*PSYSTEM_POWER_LEVEL;
+
+#define NUM_DISCHARGE_POLICIES 4
+#define DISCHARGE_POLICY_CRITICAL 0
+#define DISCHARGE_POLICY_LOW 1
+
+#define PO_THROTTLE_NONE 0
+#define PO_THROTTLE_CONSTANT 1
+#define PO_THROTTLE_DEGRADE 2
+#define PO_THROTTLE_ADAPTIVE 3
+#define PO_THROTTLE_MAXIMUM 4
+
+ typedef struct _SYSTEM_POWER_POLICY {
+ DWORD Revision;
+ POWER_ACTION_POLICY PowerButton;
+ POWER_ACTION_POLICY SleepButton;
+ POWER_ACTION_POLICY LidClose;
+ SYSTEM_POWER_STATE LidOpenWake;
+ DWORD Reserved;
+ POWER_ACTION_POLICY Idle;
+ DWORD IdleTimeout;
+ BYTE IdleSensitivity;
+ BYTE DynamicThrottle;
+ BYTE Spare2[2];
+ SYSTEM_POWER_STATE MinSleep;
+ SYSTEM_POWER_STATE MaxSleep;
+ SYSTEM_POWER_STATE ReducedLatencySleep;
+ DWORD WinLogonFlags;
+ DWORD Spare3;
+ DWORD DozeS4Timeout;
+ DWORD BroadcastCapacityResolution;
+ SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES];
+ DWORD VideoTimeout;
+ BOOLEAN VideoDimDisplay;
+ DWORD VideoReserved[3];
+ DWORD SpindownTimeout;
+ BOOLEAN OptimizeForPower;
+ BYTE FanThrottleTolerance;
+ BYTE ForcedThrottle;
+ BYTE MinThrottle;
+ POWER_ACTION_POLICY OverThrottled;
+ } SYSTEM_POWER_POLICY,*PSYSTEM_POWER_POLICY;
+
+ typedef struct _PROCESSOR_POWER_POLICY_INFO {
+ DWORD TimeCheck;
+ DWORD DemoteLimit;
+ DWORD PromoteLimit;
+ BYTE DemotePercent;
+ BYTE PromotePercent;
+ BYTE Spare[2];
+ DWORD AllowDemotion:1;
+ DWORD AllowPromotion:1;
+ DWORD Reserved:30;
+ } PROCESSOR_POWER_POLICY_INFO,*PPROCESSOR_POWER_POLICY_INFO;
+
+ typedef struct _PROCESSOR_POWER_POLICY {
+ DWORD Revision;
+ BYTE DynamicThrottle;
+ BYTE Spare[3];
+ DWORD DisableCStates:1;
+ DWORD Reserved:31;
+ DWORD PolicyCount;
+ PROCESSOR_POWER_POLICY_INFO Policy[3];
+ } PROCESSOR_POWER_POLICY,*PPROCESSOR_POWER_POLICY;
+
+ typedef struct _ADMINISTRATOR_POWER_POLICY {
+ SYSTEM_POWER_STATE MinSleep;
+ SYSTEM_POWER_STATE MaxSleep;
+ DWORD MinVideoTimeout;
+ DWORD MaxVideoTimeout;
+ DWORD MinSpindownTimeout;
+ DWORD MaxSpindownTimeout;
+ } ADMINISTRATOR_POWER_POLICY,*PADMINISTRATOR_POWER_POLICY;
+
+ typedef struct {
+ BOOLEAN PowerButtonPresent;
+ BOOLEAN SleepButtonPresent;
+ BOOLEAN LidPresent;
+ BOOLEAN SystemS1;
+ BOOLEAN SystemS2;
+ BOOLEAN SystemS3;
+ BOOLEAN SystemS4;
+ BOOLEAN SystemS5;
+ BOOLEAN HiberFilePresent;
+ BOOLEAN FullWake;
+ BOOLEAN VideoDimPresent;
+ BOOLEAN ApmPresent;
+ BOOLEAN UpsPresent;
+ BOOLEAN ThermalControl;
+ BOOLEAN ProcessorThrottle;
+ BYTE ProcessorMinThrottle;
+ BYTE ProcessorMaxThrottle;
+ BYTE spare2[4];
+ BOOLEAN DiskSpinDown;
+ BYTE spare3[8];
+ BOOLEAN SystemBatteriesPresent;
+ BOOLEAN BatteriesAreShortTerm;
+ BATTERY_REPORTING_SCALE BatteryScale[3];
+ SYSTEM_POWER_STATE AcOnLineWake;
+ SYSTEM_POWER_STATE SoftLidWake;
+ SYSTEM_POWER_STATE RtcWake;
+ SYSTEM_POWER_STATE MinDeviceWakeState;
+ SYSTEM_POWER_STATE DefaultLowLatencyWake;
+ } SYSTEM_POWER_CAPABILITIES,*PSYSTEM_POWER_CAPABILITIES;
+
+ typedef struct {
+ BOOLEAN AcOnLine;
+ BOOLEAN BatteryPresent;
+ BOOLEAN Charging;
+ BOOLEAN Discharging;
+ BOOLEAN Spare1[4];
+ DWORD MaxCapacity;
+ DWORD RemainingCapacity;
+ DWORD Rate;
+ DWORD EstimatedTime;
+ DWORD DefaultAlert1;
+ DWORD DefaultAlert2;
+ } SYSTEM_BATTERY_STATE,*PSYSTEM_BATTERY_STATE;
+
+#include "pshpack4.h"
+
+#define IMAGE_DOS_SIGNATURE 0x5A4D
+#define IMAGE_OS2_SIGNATURE 0x454E
+#define IMAGE_OS2_SIGNATURE_LE 0x454C
+#define IMAGE_VXD_SIGNATURE 0x454C
+#define IMAGE_NT_SIGNATURE 0x00004550
+
+#include "pshpack2.h"
+
+ typedef struct _IMAGE_DOS_HEADER {
+ WORD e_magic;
+ WORD e_cblp;
+ WORD e_cp;
+ WORD e_crlc;
+ WORD e_cparhdr;
+ WORD e_minalloc;
+ WORD e_maxalloc;
+ WORD e_ss;
+ WORD e_sp;
+ WORD e_csum;
+ WORD e_ip;
+ WORD e_cs;
+ WORD e_lfarlc;
+ WORD e_ovno;
+ WORD e_res[4];
+ WORD e_oemid;
+ WORD e_oeminfo;
+ WORD e_res2[10];
+ LONG e_lfanew;
+ } IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
+
+ typedef struct _IMAGE_OS2_HEADER {
+ WORD ne_magic;
+ CHAR ne_ver;
+ CHAR ne_rev;
+ WORD ne_enttab;
+ WORD ne_cbenttab;
+ LONG ne_crc;
+ WORD ne_flags;
+ WORD ne_autodata;
+ WORD ne_heap;
+ WORD ne_stack;
+ LONG ne_csip;
+ LONG ne_sssp;
+ WORD ne_cseg;
+ WORD ne_cmod;
+ WORD ne_cbnrestab;
+ WORD ne_segtab;
+ WORD ne_rsrctab;
+ WORD ne_restab;
+ WORD ne_modtab;
+ WORD ne_imptab;
+ LONG ne_nrestab;
+ WORD ne_cmovent;
+ WORD ne_align;
+ WORD ne_cres;
+ BYTE ne_exetyp;
+ BYTE ne_flagsothers;
+ WORD ne_pretthunks;
+ WORD ne_psegrefbytes;
+ WORD ne_swaparea;
+ WORD ne_expver;
+ } IMAGE_OS2_HEADER,*PIMAGE_OS2_HEADER;
+
+ typedef struct _IMAGE_VXD_HEADER {
+ WORD e32_magic;
+ BYTE e32_border;
+ BYTE e32_worder;
+ DWORD e32_level;
+ WORD e32_cpu;
+ WORD e32_os;
+ DWORD e32_ver;
+ DWORD e32_mflags;
+ DWORD e32_mpages;
+ DWORD e32_startobj;
+ DWORD e32_eip;
+ DWORD e32_stackobj;
+ DWORD e32_esp;
+ DWORD e32_pagesize;
+ DWORD e32_lastpagesize;
+ DWORD e32_fixupsize;
+ DWORD e32_fixupsum;
+ DWORD e32_ldrsize;
+ DWORD e32_ldrsum;
+ DWORD e32_objtab;
+ DWORD e32_objcnt;
+ DWORD e32_objmap;
+ DWORD e32_itermap;
+ DWORD e32_rsrctab;
+ DWORD e32_rsrccnt;
+ DWORD e32_restab;
+ DWORD e32_enttab;
+ DWORD e32_dirtab;
+ DWORD e32_dircnt;
+ DWORD e32_fpagetab;
+ DWORD e32_frectab;
+ DWORD e32_impmod;
+ DWORD e32_impmodcnt;
+ DWORD e32_impproc;
+ DWORD e32_pagesum;
+ DWORD e32_datapage;
+ DWORD e32_preload;
+ DWORD e32_nrestab;
+ DWORD e32_cbnrestab;
+ DWORD e32_nressum;
+ DWORD e32_autodata;
+ DWORD e32_debuginfo;
+ DWORD e32_debuglen;
+ DWORD e32_instpreload;
+ DWORD e32_instdemand;
+ DWORD e32_heapsize;
+ BYTE e32_res3[12];
+ DWORD e32_winresoff;
+ DWORD e32_winreslen;
+ WORD e32_devid;
+ WORD e32_ddkver;
+ } IMAGE_VXD_HEADER,*PIMAGE_VXD_HEADER;
+
+#include "poppack.h"
+
+ typedef struct _IMAGE_FILE_HEADER {
+ WORD Machine;
+ WORD NumberOfSections;
+ DWORD TimeDateStamp;
+ DWORD PointerToSymbolTable;
+ DWORD NumberOfSymbols;
+ WORD SizeOfOptionalHeader;
+ WORD Characteristics;
+ } IMAGE_FILE_HEADER,*PIMAGE_FILE_HEADER;
+
+#define IMAGE_SIZEOF_FILE_HEADER 20
+
+#define IMAGE_FILE_RELOCS_STRIPPED 0x0001
+#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
+#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
+#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
+#define IMAGE_FILE_AGGRESIVE_WS_TRIM 0x0010
+#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020
+#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
+#define IMAGE_FILE_32BIT_MACHINE 0x0100
+#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
+#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400
+#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800
+#define IMAGE_FILE_SYSTEM 0x1000
+#define IMAGE_FILE_DLL 0x2000
+#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
+#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
+
+#define IMAGE_FILE_MACHINE_UNKNOWN 0
+#define IMAGE_FILE_MACHINE_I386 0x014c
+#define IMAGE_FILE_MACHINE_R3000 0x0162
+#define IMAGE_FILE_MACHINE_R4000 0x0166
+#define IMAGE_FILE_MACHINE_R10000 0x0168
+#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169
+#define IMAGE_FILE_MACHINE_ALPHA 0x0184
+#define IMAGE_FILE_MACHINE_SH3 0x01a2
+#define IMAGE_FILE_MACHINE_SH3DSP 0x01a3
+#define IMAGE_FILE_MACHINE_SH3E 0x01a4
+#define IMAGE_FILE_MACHINE_SH4 0x01a6
+#define IMAGE_FILE_MACHINE_SH5 0x01a8
+#define IMAGE_FILE_MACHINE_ARM 0x01c0
+#define IMAGE_FILE_MACHINE_THUMB 0x01c2
+#define IMAGE_FILE_MACHINE_AM33 0x01d3
+#define IMAGE_FILE_MACHINE_POWERPC 0x01F0
+#define IMAGE_FILE_MACHINE_POWERPCFP 0x01f1
+#define IMAGE_FILE_MACHINE_IA64 0x0200
+#define IMAGE_FILE_MACHINE_MIPS16 0x0266
+#define IMAGE_FILE_MACHINE_ALPHA64 0x0284
+#define IMAGE_FILE_MACHINE_MIPSFPU 0x0366
+#define IMAGE_FILE_MACHINE_MIPSFPU16 0x0466
+#define IMAGE_FILE_MACHINE_AXP64 IMAGE_FILE_MACHINE_ALPHA64
+#define IMAGE_FILE_MACHINE_TRICORE 0x0520
+#define IMAGE_FILE_MACHINE_CEF 0x0CEF
+#define IMAGE_FILE_MACHINE_EBC 0x0EBC
+#define IMAGE_FILE_MACHINE_AMD64 0x8664
+#define IMAGE_FILE_MACHINE_M32R 0x9041
+#define IMAGE_FILE_MACHINE_CEE 0xC0EE
+
+ typedef struct _IMAGE_DATA_DIRECTORY {
+ DWORD VirtualAddress;
+ DWORD Size;
+ } IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY;
+
+#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
+
+ typedef struct _IMAGE_OPTIONAL_HEADER {
+
+ WORD Magic;
+ BYTE MajorLinkerVersion;
+ BYTE MinorLinkerVersion;
+ DWORD SizeOfCode;
+ DWORD SizeOfInitializedData;
+ DWORD SizeOfUninitializedData;
+ DWORD AddressOfEntryPoint;
+ DWORD BaseOfCode;
+ DWORD BaseOfData;
+ DWORD ImageBase;
+ DWORD SectionAlignment;
+ DWORD FileAlignment;
+ WORD MajorOperatingSystemVersion;
+ WORD MinorOperatingSystemVersion;
+ WORD MajorImageVersion;
+ WORD MinorImageVersion;
+ WORD MajorSubsystemVersion;
+ WORD MinorSubsystemVersion;
+ DWORD Win32VersionValue;
+ DWORD SizeOfImage;
+ DWORD SizeOfHeaders;
+ DWORD CheckSum;
+ WORD Subsystem;
+ WORD DllCharacteristics;
+ DWORD SizeOfStackReserve;
+ DWORD SizeOfStackCommit;
+ DWORD SizeOfHeapReserve;
+ DWORD SizeOfHeapCommit;
+ DWORD LoaderFlags;
+ DWORD NumberOfRvaAndSizes;
+ IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+ } IMAGE_OPTIONAL_HEADER32,*PIMAGE_OPTIONAL_HEADER32;
+
+ typedef struct _IMAGE_ROM_OPTIONAL_HEADER {
+ WORD Magic;
+ BYTE MajorLinkerVersion;
+ BYTE MinorLinkerVersion;
+ DWORD SizeOfCode;
+ DWORD SizeOfInitializedData;
+ DWORD SizeOfUninitializedData;
+ DWORD AddressOfEntryPoint;
+ DWORD BaseOfCode;
+ DWORD BaseOfData;
+ DWORD BaseOfBss;
+ DWORD GprMask;
+ DWORD CprMask[4];
+ DWORD GpValue;
+ } IMAGE_ROM_OPTIONAL_HEADER,*PIMAGE_ROM_OPTIONAL_HEADER;
+
+ typedef struct _IMAGE_OPTIONAL_HEADER64 {
+ WORD Magic;
+ BYTE MajorLinkerVersion;
+ BYTE MinorLinkerVersion;
+ DWORD SizeOfCode;
+ DWORD SizeOfInitializedData;
+ DWORD SizeOfUninitializedData;
+ DWORD AddressOfEntryPoint;
+ DWORD BaseOfCode;
+ ULONGLONG ImageBase;
+ DWORD SectionAlignment;
+ DWORD FileAlignment;
+ WORD MajorOperatingSystemVersion;
+ WORD MinorOperatingSystemVersion;
+ WORD MajorImageVersion;
+ WORD MinorImageVersion;
+ WORD MajorSubsystemVersion;
+ WORD MinorSubsystemVersion;
+ DWORD Win32VersionValue;
+ DWORD SizeOfImage;
+ DWORD SizeOfHeaders;
+ DWORD CheckSum;
+ WORD Subsystem;
+ WORD DllCharacteristics;
+ ULONGLONG SizeOfStackReserve;
+ ULONGLONG SizeOfStackCommit;
+ ULONGLONG SizeOfHeapReserve;
+ ULONGLONG SizeOfHeapCommit;
+ DWORD LoaderFlags;
+ DWORD NumberOfRvaAndSizes;
+ IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+ } IMAGE_OPTIONAL_HEADER64,*PIMAGE_OPTIONAL_HEADER64;
+
+#define IMAGE_SIZEOF_ROM_OPTIONAL_HEADER 56
+#define IMAGE_SIZEOF_STD_OPTIONAL_HEADER 28
+#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER 224
+#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER 240
+
+#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
+#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
+#define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
+
+#ifdef _WIN64
+ typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER;
+ typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER;
+#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL64_HEADER
+#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC
+#else
+ typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER;
+ typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER;
+#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL32_HEADER
+#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC
+#endif
+
+ typedef struct _IMAGE_NT_HEADERS64 {
+ DWORD Signature;
+ IMAGE_FILE_HEADER FileHeader;
+ IMAGE_OPTIONAL_HEADER64 OptionalHeader;
+ } IMAGE_NT_HEADERS64,*PIMAGE_NT_HEADERS64;
+
+ typedef struct _IMAGE_NT_HEADERS {
+ DWORD Signature;
+ IMAGE_FILE_HEADER FileHeader;
+ IMAGE_OPTIONAL_HEADER32 OptionalHeader;
+ } IMAGE_NT_HEADERS32,*PIMAGE_NT_HEADERS32;
+
+ typedef struct _IMAGE_ROM_HEADERS {
+ IMAGE_FILE_HEADER FileHeader;
+ IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
+ } IMAGE_ROM_HEADERS,*PIMAGE_ROM_HEADERS;
+
+#ifdef _WIN64
+ typedef IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS;
+ typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS;
+#else
+ typedef IMAGE_NT_HEADERS32 IMAGE_NT_HEADERS;
+ typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS;
+#endif
+
+#define IMAGE_FIRST_SECTION(ntheader) ((PIMAGE_SECTION_HEADER) ((ULONG_PTR)ntheader + FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader) + ((PIMAGE_NT_HEADERS)(ntheader))->FileHeader.SizeOfOptionalHeader))
+
+#define IMAGE_SUBSYSTEM_UNKNOWN 0
+#define IMAGE_SUBSYSTEM_NATIVE 1
+#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
+#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
+#define IMAGE_SUBSYSTEM_OS2_CUI 5
+#define IMAGE_SUBSYSTEM_POSIX_CUI 7
+#define IMAGE_SUBSYSTEM_NATIVE_WINDOWS 8
+#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9
+#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
+#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
+#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
+#define IMAGE_SUBSYSTEM_EFI_ROM 13
+#define IMAGE_SUBSYSTEM_XBOX 14
+
+#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200
+#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400
+#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800
+#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000
+#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000
+
+#define IMAGE_DIRECTORY_ENTRY_EXPORT 0
+#define IMAGE_DIRECTORY_ENTRY_IMPORT 1
+#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
+#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
+#define IMAGE_DIRECTORY_ENTRY_SECURITY 4
+#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5
+#define IMAGE_DIRECTORY_ENTRY_DEBUG 6
+
+#define IMAGE_DIRECTORY_ENTRY_ARCHITECTURE 7
+#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
+#define IMAGE_DIRECTORY_ENTRY_TLS 9
+#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
+#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11
+#define IMAGE_DIRECTORY_ENTRY_IAT 12
+#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13
+#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14
+
+ typedef struct ANON_OBJECT_HEADER {
+ WORD Sig1;
+ WORD Sig2;
+ WORD Version;
+ WORD Machine;
+ DWORD TimeDateStamp;
+ CLSID ClassID;
+ DWORD SizeOfData;
+ } ANON_OBJECT_HEADER;
+
+#define IMAGE_SIZEOF_SHORT_NAME 8
+
+ typedef struct _IMAGE_SECTION_HEADER {
+ BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
+ union {
+ DWORD PhysicalAddress;
+ DWORD VirtualSize;
+ } Misc;
+ DWORD VirtualAddress;
+ DWORD SizeOfRawData;
+ DWORD PointerToRawData;
+ DWORD PointerToRelocations;
+ DWORD PointerToLinenumbers;
+ WORD NumberOfRelocations;
+ WORD NumberOfLinenumbers;
+ DWORD Characteristics;
+ } IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER;
+
+#define IMAGE_SIZEOF_SECTION_HEADER 40
+
+#define IMAGE_SCN_TYPE_NO_PAD 0x00000008
+
+#define IMAGE_SCN_CNT_CODE 0x00000020
+#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040
+#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080
+#define IMAGE_SCN_LNK_OTHER 0x00000100
+#define IMAGE_SCN_LNK_INFO 0x00000200
+#define IMAGE_SCN_LNK_REMOVE 0x00000800
+#define IMAGE_SCN_LNK_COMDAT 0x00001000
+#define IMAGE_SCN_NO_DEFER_SPEC_EXC 0x00004000
+#define IMAGE_SCN_GPREL 0x00008000
+#define IMAGE_SCN_MEM_FARDATA 0x00008000
+#define IMAGE_SCN_MEM_PURGEABLE 0x00020000
+#define IMAGE_SCN_MEM_16BIT 0x00020000
+#define IMAGE_SCN_MEM_LOCKED 0x00040000
+#define IMAGE_SCN_MEM_PRELOAD 0x00080000
+
+#define IMAGE_SCN_ALIGN_1BYTES 0x00100000
+#define IMAGE_SCN_ALIGN_2BYTES 0x00200000
+#define IMAGE_SCN_ALIGN_4BYTES 0x00300000
+#define IMAGE_SCN_ALIGN_8BYTES 0x00400000
+#define IMAGE_SCN_ALIGN_16BYTES 0x00500000
+#define IMAGE_SCN_ALIGN_32BYTES 0x00600000
+#define IMAGE_SCN_ALIGN_64BYTES 0x00700000
+#define IMAGE_SCN_ALIGN_128BYTES 0x00800000
+#define IMAGE_SCN_ALIGN_256BYTES 0x00900000
+#define IMAGE_SCN_ALIGN_512BYTES 0x00A00000
+#define IMAGE_SCN_ALIGN_1024BYTES 0x00B00000
+#define IMAGE_SCN_ALIGN_2048BYTES 0x00C00000
+#define IMAGE_SCN_ALIGN_4096BYTES 0x00D00000
+#define IMAGE_SCN_ALIGN_8192BYTES 0x00E00000
+
+#define IMAGE_SCN_ALIGN_MASK 0x00F00000
+
+#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000
+#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
+#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000
+#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000
+#define IMAGE_SCN_MEM_SHARED 0x10000000
+#define IMAGE_SCN_MEM_EXECUTE 0x20000000
+#define IMAGE_SCN_MEM_READ 0x40000000
+#define IMAGE_SCN_MEM_WRITE 0x80000000
+
+#define IMAGE_SCN_SCALE_INDEX 0x00000001
+
+#include "pshpack2.h"
+
+ typedef struct _IMAGE_SYMBOL {
+ union {
+ BYTE ShortName[8];
+ struct {
+ DWORD Short;
+ DWORD Long;
+ } Name;
+ DWORD LongName[2];
+ } N;
+ DWORD Value;
+ SHORT SectionNumber;
+ WORD Type;
+ BYTE StorageClass;
+ BYTE NumberOfAuxSymbols;
+ } IMAGE_SYMBOL;
+ typedef IMAGE_SYMBOL UNALIGNED *PIMAGE_SYMBOL;
+
+#define IMAGE_SIZEOF_SYMBOL 18
+
+#define IMAGE_SYM_UNDEFINED (SHORT)0
+#define IMAGE_SYM_ABSOLUTE (SHORT)-1
+#define IMAGE_SYM_DEBUG (SHORT)-2
+#define IMAGE_SYM_SECTION_MAX 0xFEFF
+
+#define IMAGE_SYM_TYPE_NULL 0x0000
+#define IMAGE_SYM_TYPE_VOID 0x0001
+#define IMAGE_SYM_TYPE_CHAR 0x0002
+#define IMAGE_SYM_TYPE_SHORT 0x0003
+#define IMAGE_SYM_TYPE_INT 0x0004
+#define IMAGE_SYM_TYPE_LONG 0x0005
+#define IMAGE_SYM_TYPE_FLOAT 0x0006
+#define IMAGE_SYM_TYPE_DOUBLE 0x0007
+#define IMAGE_SYM_TYPE_STRUCT 0x0008
+#define IMAGE_SYM_TYPE_UNION 0x0009
+#define IMAGE_SYM_TYPE_ENUM 0x000A
+#define IMAGE_SYM_TYPE_MOE 0x000B
+#define IMAGE_SYM_TYPE_BYTE 0x000C
+#define IMAGE_SYM_TYPE_WORD 0x000D
+#define IMAGE_SYM_TYPE_UINT 0x000E
+#define IMAGE_SYM_TYPE_DWORD 0x000F
+#define IMAGE_SYM_TYPE_PCODE 0x8000
+
+#define IMAGE_SYM_DTYPE_NULL 0
+#define IMAGE_SYM_DTYPE_POINTER 1
+#define IMAGE_SYM_DTYPE_FUNCTION 2
+#define IMAGE_SYM_DTYPE_ARRAY 3
+
+#define IMAGE_SYM_CLASS_END_OF_FUNCTION (BYTE)-1
+#define IMAGE_SYM_CLASS_NULL 0x0000
+#define IMAGE_SYM_CLASS_AUTOMATIC 0x0001
+#define IMAGE_SYM_CLASS_EXTERNAL 0x0002
+#define IMAGE_SYM_CLASS_STATIC 0x0003
+#define IMAGE_SYM_CLASS_REGISTER 0x0004
+#define IMAGE_SYM_CLASS_EXTERNAL_DEF 0x0005
+#define IMAGE_SYM_CLASS_LABEL 0x0006
+#define IMAGE_SYM_CLASS_UNDEFINED_LABEL 0x0007
+#define IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 0x0008
+#define IMAGE_SYM_CLASS_ARGUMENT 0x0009
+#define IMAGE_SYM_CLASS_STRUCT_TAG 0x000A
+#define IMAGE_SYM_CLASS_MEMBER_OF_UNION 0x000B
+#define IMAGE_SYM_CLASS_UNION_TAG 0x000C
+#define IMAGE_SYM_CLASS_TYPE_DEFINITION 0x000D
+#define IMAGE_SYM_CLASS_UNDEFINED_STATIC 0x000E
+#define IMAGE_SYM_CLASS_ENUM_TAG 0x000F
+#define IMAGE_SYM_CLASS_MEMBER_OF_ENUM 0x0010
+#define IMAGE_SYM_CLASS_REGISTER_PARAM 0x0011
+#define IMAGE_SYM_CLASS_BIT_FIELD 0x0012
+#define IMAGE_SYM_CLASS_FAR_EXTERNAL 0x0044
+#define IMAGE_SYM_CLASS_BLOCK 0x0064
+#define IMAGE_SYM_CLASS_FUNCTION 0x0065
+#define IMAGE_SYM_CLASS_END_OF_STRUCT 0x0066
+#define IMAGE_SYM_CLASS_FILE 0x0067
+#define IMAGE_SYM_CLASS_SECTION 0x0068
+#define IMAGE_SYM_CLASS_WEAK_EXTERNAL 0x0069
+#define IMAGE_SYM_CLASS_CLR_TOKEN 0x006B
+
+#define N_BTMASK 0x000F
+#define N_TMASK 0x0030
+#define N_TMASK1 0x00C0
+#define N_TMASK2 0x00F0
+#define N_BTSHFT 4
+#define N_TSHIFT 2
+
+#define BTYPE(x) ((x) & N_BTMASK)
+
+#ifndef ISPTR
+#define ISPTR(x) (((x) & N_TMASK)==(IMAGE_SYM_DTYPE_POINTER << N_BTSHFT))
+#endif
+
+#ifndef ISFCN
+#define ISFCN(x) (((x) & N_TMASK)==(IMAGE_SYM_DTYPE_FUNCTION << N_BTSHFT))
+#endif
+
+#ifndef ISARY
+#define ISARY(x) (((x) & N_TMASK)==(IMAGE_SYM_DTYPE_ARRAY << N_BTSHFT))
+#endif
+
+#ifndef ISTAG
+#define ISTAG(x) ((x)==IMAGE_SYM_CLASS_STRUCT_TAG || (x)==IMAGE_SYM_CLASS_UNION_TAG || (x)==IMAGE_SYM_CLASS_ENUM_TAG)
+#endif
+
+#ifndef INCREF
+#define INCREF(x) ((((x)&~N_BTMASK)<>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
+#endif
+
+ typedef union _IMAGE_AUX_SYMBOL {
+ struct {
+ DWORD TagIndex;
+ union {
+ struct {
+ WORD Linenumber;
+ WORD Size;
+ } LnSz;
+ DWORD TotalSize;
+ } Misc;
+ union {
+ struct {
+ DWORD PointerToLinenumber;
+ DWORD PointerToNextFunction;
+ } Function;
+ struct {
+ WORD Dimension[4];
+ } Array;
+ } FcnAry;
+ WORD TvIndex;
+ } Sym;
+ struct {
+ BYTE Name[IMAGE_SIZEOF_SYMBOL];
+ } File;
+ struct {
+ DWORD Length;
+ WORD NumberOfRelocations;
+ WORD NumberOfLinenumbers;
+ DWORD CheckSum;
+ SHORT Number;
+ BYTE Selection;
+ } Section;
+ } IMAGE_AUX_SYMBOL;
+ typedef IMAGE_AUX_SYMBOL UNALIGNED *PIMAGE_AUX_SYMBOL;
+
+#define IMAGE_SIZEOF_AUX_SYMBOL 18
+
+ typedef enum IMAGE_AUX_SYMBOL_TYPE {
+ IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1
+ } IMAGE_AUX_SYMBOL_TYPE;
+
+#include
+
+ typedef struct IMAGE_AUX_SYMBOL_TOKEN_DEF {
+ BYTE bAuxType;
+ BYTE bReserved;
+ DWORD SymbolTableIndex;
+ BYTE rgbReserved[12];
+ } IMAGE_AUX_SYMBOL_TOKEN_DEF;
+
+ typedef IMAGE_AUX_SYMBOL_TOKEN_DEF UNALIGNED *PIMAGE_AUX_SYMBOL_TOKEN_DEF;
+
+#include
+
+#define IMAGE_COMDAT_SELECT_NODUPLICATES 1
+#define IMAGE_COMDAT_SELECT_ANY 2
+#define IMAGE_COMDAT_SELECT_SAME_SIZE 3
+#define IMAGE_COMDAT_SELECT_EXACT_MATCH 4
+#define IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
+#define IMAGE_COMDAT_SELECT_LARGEST 6
+#define IMAGE_COMDAT_SELECT_NEWEST 7
+
+#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
+#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
+#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
+
+ typedef struct _IMAGE_RELOCATION {
+ union {
+ DWORD VirtualAddress;
+ DWORD RelocCount;
+ };
+ DWORD SymbolTableIndex;
+ WORD Type;
+ } IMAGE_RELOCATION;
+ typedef IMAGE_RELOCATION UNALIGNED *PIMAGE_RELOCATION;
+
+#define IMAGE_SIZEOF_RELOCATION 10
+
+#define IMAGE_REL_I386_ABSOLUTE 0x0000
+#define IMAGE_REL_I386_DIR16 0x0001
+#define IMAGE_REL_I386_REL16 0x0002
+#define IMAGE_REL_I386_DIR32 0x0006
+#define IMAGE_REL_I386_DIR32NB 0x0007
+#define IMAGE_REL_I386_SEG12 0x0009
+#define IMAGE_REL_I386_SECTION 0x000A
+#define IMAGE_REL_I386_SECREL 0x000B
+#define IMAGE_REL_I386_TOKEN 0x000C
+#define IMAGE_REL_I386_SECREL7 0x000D
+#define IMAGE_REL_I386_REL32 0x0014
+
+#define IMAGE_REL_MIPS_ABSOLUTE 0x0000
+#define IMAGE_REL_MIPS_REFHALF 0x0001
+#define IMAGE_REL_MIPS_REFWORD 0x0002
+#define IMAGE_REL_MIPS_JMPADDR 0x0003
+#define IMAGE_REL_MIPS_REFHI 0x0004
+#define IMAGE_REL_MIPS_REFLO 0x0005
+#define IMAGE_REL_MIPS_GPREL 0x0006
+#define IMAGE_REL_MIPS_LITERAL 0x0007
+#define IMAGE_REL_MIPS_SECTION 0x000A
+#define IMAGE_REL_MIPS_SECREL 0x000B
+#define IMAGE_REL_MIPS_SECRELLO 0x000C
+#define IMAGE_REL_MIPS_SECRELHI 0x000D
+#define IMAGE_REL_MIPS_TOKEN 0x000E
+#define IMAGE_REL_MIPS_JMPADDR16 0x0010
+#define IMAGE_REL_MIPS_REFWORDNB 0x0022
+#define IMAGE_REL_MIPS_PAIR 0x0025
+
+#define IMAGE_REL_ALPHA_ABSOLUTE 0x0000
+#define IMAGE_REL_ALPHA_REFLONG 0x0001
+#define IMAGE_REL_ALPHA_REFQUAD 0x0002
+#define IMAGE_REL_ALPHA_GPREL32 0x0003
+#define IMAGE_REL_ALPHA_LITERAL 0x0004
+#define IMAGE_REL_ALPHA_LITUSE 0x0005
+#define IMAGE_REL_ALPHA_GPDISP 0x0006
+#define IMAGE_REL_ALPHA_BRADDR 0x0007
+#define IMAGE_REL_ALPHA_HINT 0x0008
+#define IMAGE_REL_ALPHA_INLINE_REFLONG 0x0009
+#define IMAGE_REL_ALPHA_REFHI 0x000A
+#define IMAGE_REL_ALPHA_REFLO 0x000B
+#define IMAGE_REL_ALPHA_PAIR 0x000C
+#define IMAGE_REL_ALPHA_MATCH 0x000D
+#define IMAGE_REL_ALPHA_SECTION 0x000E
+#define IMAGE_REL_ALPHA_SECREL 0x000F
+#define IMAGE_REL_ALPHA_REFLONGNB 0x0010
+#define IMAGE_REL_ALPHA_SECRELLO 0x0011
+#define IMAGE_REL_ALPHA_SECRELHI 0x0012
+#define IMAGE_REL_ALPHA_REFQ3 0x0013
+#define IMAGE_REL_ALPHA_REFQ2 0x0014
+#define IMAGE_REL_ALPHA_REFQ1 0x0015
+#define IMAGE_REL_ALPHA_GPRELLO 0x0016
+#define IMAGE_REL_ALPHA_GPRELHI 0x0017
+
+#define IMAGE_REL_PPC_ABSOLUTE 0x0000
+#define IMAGE_REL_PPC_ADDR64 0x0001
+#define IMAGE_REL_PPC_ADDR32 0x0002
+#define IMAGE_REL_PPC_ADDR24 0x0003
+#define IMAGE_REL_PPC_ADDR16 0x0004
+#define IMAGE_REL_PPC_ADDR14 0x0005
+#define IMAGE_REL_PPC_REL24 0x0006
+#define IMAGE_REL_PPC_REL14 0x0007
+#define IMAGE_REL_PPC_TOCREL16 0x0008
+#define IMAGE_REL_PPC_TOCREL14 0x0009
+#define IMAGE_REL_PPC_ADDR32NB 0x000A
+#define IMAGE_REL_PPC_SECREL 0x000B
+#define IMAGE_REL_PPC_SECTION 0x000C
+#define IMAGE_REL_PPC_IFGLUE 0x000D
+#define IMAGE_REL_PPC_IMGLUE 0x000E
+#define IMAGE_REL_PPC_SECREL16 0x000F
+#define IMAGE_REL_PPC_REFHI 0x0010
+#define IMAGE_REL_PPC_REFLO 0x0011
+#define IMAGE_REL_PPC_PAIR 0x0012
+#define IMAGE_REL_PPC_SECRELLO 0x0013
+#define IMAGE_REL_PPC_SECRELHI 0x0014
+#define IMAGE_REL_PPC_GPREL 0x0015
+#define IMAGE_REL_PPC_TOKEN 0x0016
+#define IMAGE_REL_PPC_TYPEMASK 0x00FF
+#define IMAGE_REL_PPC_NEG 0x0100
+#define IMAGE_REL_PPC_BRTAKEN 0x0200
+#define IMAGE_REL_PPC_BRNTAKEN 0x0400
+#define IMAGE_REL_PPC_TOCDEFN 0x0800
+
+#define IMAGE_REL_SH3_ABSOLUTE 0x0000
+#define IMAGE_REL_SH3_DIRECT16 0x0001
+#define IMAGE_REL_SH3_DIRECT32 0x0002
+#define IMAGE_REL_SH3_DIRECT8 0x0003
+#define IMAGE_REL_SH3_DIRECT8_WORD 0x0004
+#define IMAGE_REL_SH3_DIRECT8_LONG 0x0005
+#define IMAGE_REL_SH3_DIRECT4 0x0006
+#define IMAGE_REL_SH3_DIRECT4_WORD 0x0007
+#define IMAGE_REL_SH3_DIRECT4_LONG 0x0008
+#define IMAGE_REL_SH3_PCREL8_WORD 0x0009
+#define IMAGE_REL_SH3_PCREL8_LONG 0x000A
+#define IMAGE_REL_SH3_PCREL12_WORD 0x000B
+#define IMAGE_REL_SH3_STARTOF_SECTION 0x000C
+#define IMAGE_REL_SH3_SIZEOF_SECTION 0x000D
+#define IMAGE_REL_SH3_SECTION 0x000E
+#define IMAGE_REL_SH3_SECREL 0x000F
+#define IMAGE_REL_SH3_DIRECT32_NB 0x0010
+#define IMAGE_REL_SH3_GPREL4_LONG 0x0011
+#define IMAGE_REL_SH3_TOKEN 0x0012
+
+#define IMAGE_REL_SHM_PCRELPT 0x0013
+#define IMAGE_REL_SHM_REFLO 0x0014
+#define IMAGE_REL_SHM_REFHALF 0x0015
+#define IMAGE_REL_SHM_RELLO 0x0016
+#define IMAGE_REL_SHM_RELHALF 0x0017
+#define IMAGE_REL_SHM_PAIR 0x0018
+
+#define IMAGE_REL_SH_NOMODE 0x8000
+
+#define IMAGE_REL_ARM_ABSOLUTE 0x0000
+#define IMAGE_REL_ARM_ADDR32 0x0001
+#define IMAGE_REL_ARM_ADDR32NB 0x0002
+#define IMAGE_REL_ARM_BRANCH24 0x0003
+#define IMAGE_REL_ARM_BRANCH11 0x0004
+#define IMAGE_REL_ARM_TOKEN 0x0005
+#define IMAGE_REL_ARM_GPREL12 0x0006
+#define IMAGE_REL_ARM_GPREL7 0x0007
+#define IMAGE_REL_ARM_BLX24 0x0008
+#define IMAGE_REL_ARM_BLX11 0x0009
+#define IMAGE_REL_ARM_SECTION 0x000E
+#define IMAGE_REL_ARM_SECREL 0x000F
+
+#define IMAGE_REL_AM_ABSOLUTE 0x0000
+#define IMAGE_REL_AM_ADDR32 0x0001
+#define IMAGE_REL_AM_ADDR32NB 0x0002
+#define IMAGE_REL_AM_CALL32 0x0003
+#define IMAGE_REL_AM_FUNCINFO 0x0004
+#define IMAGE_REL_AM_REL32_1 0x0005
+#define IMAGE_REL_AM_REL32_2 0x0006
+#define IMAGE_REL_AM_SECREL 0x0007
+#define IMAGE_REL_AM_SECTION 0x0008
+#define IMAGE_REL_AM_TOKEN 0x0009
+
+#define IMAGE_REL_AMD64_ABSOLUTE 0x0000
+#define IMAGE_REL_AMD64_ADDR64 0x0001
+#define IMAGE_REL_AMD64_ADDR32 0x0002
+#define IMAGE_REL_AMD64_ADDR32NB 0x0003
+#define IMAGE_REL_AMD64_REL32 0x0004
+#define IMAGE_REL_AMD64_REL32_1 0x0005
+#define IMAGE_REL_AMD64_REL32_2 0x0006
+#define IMAGE_REL_AMD64_REL32_3 0x0007
+#define IMAGE_REL_AMD64_REL32_4 0x0008
+#define IMAGE_REL_AMD64_REL32_5 0x0009
+#define IMAGE_REL_AMD64_SECTION 0x000A
+#define IMAGE_REL_AMD64_SECREL 0x000B
+#define IMAGE_REL_AMD64_SECREL7 0x000C
+#define IMAGE_REL_AMD64_TOKEN 0x000D
+#define IMAGE_REL_AMD64_SREL32 0x000E
+#define IMAGE_REL_AMD64_PAIR 0x000F
+#define IMAGE_REL_AMD64_SSPAN32 0x0010
+
+#define IMAGE_REL_IA64_ABSOLUTE 0x0000
+#define IMAGE_REL_IA64_IMM14 0x0001
+#define IMAGE_REL_IA64_IMM22 0x0002
+#define IMAGE_REL_IA64_IMM64 0x0003
+#define IMAGE_REL_IA64_DIR32 0x0004
+#define IMAGE_REL_IA64_DIR64 0x0005
+#define IMAGE_REL_IA64_PCREL21B 0x0006
+#define IMAGE_REL_IA64_PCREL21M 0x0007
+#define IMAGE_REL_IA64_PCREL21F 0x0008
+#define IMAGE_REL_IA64_GPREL22 0x0009
+#define IMAGE_REL_IA64_LTOFF22 0x000A
+#define IMAGE_REL_IA64_SECTION 0x000B
+#define IMAGE_REL_IA64_SECREL22 0x000C
+#define IMAGE_REL_IA64_SECREL64I 0x000D
+#define IMAGE_REL_IA64_SECREL32 0x000E
+
+#define IMAGE_REL_IA64_DIR32NB 0x0010
+#define IMAGE_REL_IA64_SREL14 0x0011
+#define IMAGE_REL_IA64_SREL22 0x0012
+#define IMAGE_REL_IA64_SREL32 0x0013
+#define IMAGE_REL_IA64_UREL32 0x0014
+#define IMAGE_REL_IA64_PCREL60X 0x0015
+#define IMAGE_REL_IA64_PCREL60B 0x0016
+#define IMAGE_REL_IA64_PCREL60F 0x0017
+#define IMAGE_REL_IA64_PCREL60I 0x0018
+#define IMAGE_REL_IA64_PCREL60M 0x0019
+#define IMAGE_REL_IA64_IMMGPREL64 0x001A
+#define IMAGE_REL_IA64_TOKEN 0x001B
+#define IMAGE_REL_IA64_GPREL32 0x001C
+#define IMAGE_REL_IA64_ADDEND 0x001F
+
+#define IMAGE_REL_CEF_ABSOLUTE 0x0000
+#define IMAGE_REL_CEF_ADDR32 0x0001
+#define IMAGE_REL_CEF_ADDR64 0x0002
+#define IMAGE_REL_CEF_ADDR32NB 0x0003
+#define IMAGE_REL_CEF_SECTION 0x0004
+#define IMAGE_REL_CEF_SECREL 0x0005
+#define IMAGE_REL_CEF_TOKEN 0x0006
+
+#define IMAGE_REL_CEE_ABSOLUTE 0x0000
+#define IMAGE_REL_CEE_ADDR32 0x0001
+#define IMAGE_REL_CEE_ADDR64 0x0002
+#define IMAGE_REL_CEE_ADDR32NB 0x0003
+#define IMAGE_REL_CEE_SECTION 0x0004
+#define IMAGE_REL_CEE_SECREL 0x0005
+#define IMAGE_REL_CEE_TOKEN 0x0006
+
+#define IMAGE_REL_M32R_ABSOLUTE 0x0000
+#define IMAGE_REL_M32R_ADDR32 0x0001
+#define IMAGE_REL_M32R_ADDR32NB 0x0002
+#define IMAGE_REL_M32R_ADDR24 0x0003
+#define IMAGE_REL_M32R_GPREL16 0x0004
+#define IMAGE_REL_M32R_PCREL24 0x0005
+#define IMAGE_REL_M32R_PCREL16 0x0006
+#define IMAGE_REL_M32R_PCREL8 0x0007
+#define IMAGE_REL_M32R_REFHALF 0x0008
+#define IMAGE_REL_M32R_REFHI 0x0009
+#define IMAGE_REL_M32R_REFLO 0x000A
+#define IMAGE_REL_M32R_PAIR 0x000B
+#define IMAGE_REL_M32R_SECTION 0x000C
+#define IMAGE_REL_M32R_SECREL32 0x000D
+#define IMAGE_REL_M32R_TOKEN 0x000E
+
+#define EXT_IMM64(Value,Address,Size,InstPos,ValPos) Value |= (((ULONGLONG)((*(Address) >> InstPos) & (((ULONGLONG)1 << Size) - 1))) << ValPos)
+#define INS_IMM64(Value,Address,Size,InstPos,ValPos) *(PDWORD)Address = (*(PDWORD)Address & ~(((1 << Size) - 1) << InstPos)) | ((DWORD)((((ULONGLONG)Value >> ValPos) & (((ULONGLONG)1 << Size) - 1))) << InstPos)
+
+#define EMARCH_ENC_I17_IMM7B_INST_WORD_X 3
+#define EMARCH_ENC_I17_IMM7B_SIZE_X 7
+#define EMARCH_ENC_I17_IMM7B_INST_WORD_POS_X 4
+#define EMARCH_ENC_I17_IMM7B_VAL_POS_X 0
+
+#define EMARCH_ENC_I17_IMM9D_INST_WORD_X 3
+#define EMARCH_ENC_I17_IMM9D_SIZE_X 9
+#define EMARCH_ENC_I17_IMM9D_INST_WORD_POS_X 18
+#define EMARCH_ENC_I17_IMM9D_VAL_POS_X 7
+
+#define EMARCH_ENC_I17_IMM5C_INST_WORD_X 3
+#define EMARCH_ENC_I17_IMM5C_SIZE_X 5
+#define EMARCH_ENC_I17_IMM5C_INST_WORD_POS_X 13
+#define EMARCH_ENC_I17_IMM5C_VAL_POS_X 16
+
+#define EMARCH_ENC_I17_IC_INST_WORD_X 3
+#define EMARCH_ENC_I17_IC_SIZE_X 1
+#define EMARCH_ENC_I17_IC_INST_WORD_POS_X 12
+#define EMARCH_ENC_I17_IC_VAL_POS_X 21
+
+#define EMARCH_ENC_I17_IMM41a_INST_WORD_X 1
+#define EMARCH_ENC_I17_IMM41a_SIZE_X 10
+#define EMARCH_ENC_I17_IMM41a_INST_WORD_POS_X 14
+#define EMARCH_ENC_I17_IMM41a_VAL_POS_X 22
+
+#define EMARCH_ENC_I17_IMM41b_INST_WORD_X 1
+#define EMARCH_ENC_I17_IMM41b_SIZE_X 8
+#define EMARCH_ENC_I17_IMM41b_INST_WORD_POS_X 24
+#define EMARCH_ENC_I17_IMM41b_VAL_POS_X 32
+
+#define EMARCH_ENC_I17_IMM41c_INST_WORD_X 2
+#define EMARCH_ENC_I17_IMM41c_SIZE_X 23
+#define EMARCH_ENC_I17_IMM41c_INST_WORD_POS_X 0
+#define EMARCH_ENC_I17_IMM41c_VAL_POS_X 40
+
+#define EMARCH_ENC_I17_SIGN_INST_WORD_X 3
+#define EMARCH_ENC_I17_SIGN_SIZE_X 1
+#define EMARCH_ENC_I17_SIGN_INST_WORD_POS_X 27
+#define EMARCH_ENC_I17_SIGN_VAL_POS_X 63
+
+#define X3_OPCODE_INST_WORD_X 3
+#define X3_OPCODE_SIZE_X 4
+#define X3_OPCODE_INST_WORD_POS_X 28
+#define X3_OPCODE_SIGN_VAL_POS_X 0
+
+#define X3_I_INST_WORD_X 3
+#define X3_I_SIZE_X 1
+#define X3_I_INST_WORD_POS_X 27
+#define X3_I_SIGN_VAL_POS_X 59
+
+#define X3_D_WH_INST_WORD_X 3
+#define X3_D_WH_SIZE_X 3
+#define X3_D_WH_INST_WORD_POS_X 24
+#define X3_D_WH_SIGN_VAL_POS_X 0
+
+#define X3_IMM20_INST_WORD_X 3
+#define X3_IMM20_SIZE_X 20
+#define X3_IMM20_INST_WORD_POS_X 4
+#define X3_IMM20_SIGN_VAL_POS_X 0
+
+#define X3_IMM39_1_INST_WORD_X 2
+#define X3_IMM39_1_SIZE_X 23
+#define X3_IMM39_1_INST_WORD_POS_X 0
+#define X3_IMM39_1_SIGN_VAL_POS_X 36
+
+#define X3_IMM39_2_INST_WORD_X 1
+#define X3_IMM39_2_SIZE_X 16
+#define X3_IMM39_2_INST_WORD_POS_X 16
+#define X3_IMM39_2_SIGN_VAL_POS_X 20
+
+#define X3_P_INST_WORD_X 3
+#define X3_P_SIZE_X 4
+#define X3_P_INST_WORD_POS_X 0
+#define X3_P_SIGN_VAL_POS_X 0
+
+#define X3_TMPLT_INST_WORD_X 0
+#define X3_TMPLT_SIZE_X 4
+#define X3_TMPLT_INST_WORD_POS_X 0
+#define X3_TMPLT_SIGN_VAL_POS_X 0
+
+#define X3_BTYPE_QP_INST_WORD_X 2
+#define X3_BTYPE_QP_SIZE_X 9
+#define X3_BTYPE_QP_INST_WORD_POS_X 23
+#define X3_BTYPE_QP_INST_VAL_POS_X 0
+
+#define X3_EMPTY_INST_WORD_X 1
+#define X3_EMPTY_SIZE_X 2
+#define X3_EMPTY_INST_WORD_POS_X 14
+#define X3_EMPTY_INST_VAL_POS_X 0
+
+ typedef struct _IMAGE_LINENUMBER {
+ union {
+ DWORD SymbolTableIndex;
+ DWORD VirtualAddress;
+ } Type;
+ WORD Linenumber;
+ } IMAGE_LINENUMBER;
+ typedef IMAGE_LINENUMBER UNALIGNED *PIMAGE_LINENUMBER;
+
+#define IMAGE_SIZEOF_LINENUMBER 6
+
+#include "poppack.h"
+
+ typedef struct _IMAGE_BASE_RELOCATION {
+ DWORD VirtualAddress;
+ DWORD SizeOfBlock;
+
+ } IMAGE_BASE_RELOCATION;
+ typedef IMAGE_BASE_RELOCATION UNALIGNED *PIMAGE_BASE_RELOCATION;
+
+#define IMAGE_SIZEOF_BASE_RELOCATION 8
+
+#define IMAGE_REL_BASED_ABSOLUTE 0
+#define IMAGE_REL_BASED_HIGH 1
+#define IMAGE_REL_BASED_LOW 2
+#define IMAGE_REL_BASED_HIGHLOW 3
+#define IMAGE_REL_BASED_HIGHADJ 4
+#define IMAGE_REL_BASED_MIPS_JMPADDR 5
+#define IMAGE_REL_BASED_MIPS_JMPADDR16 9
+#define IMAGE_REL_BASED_IA64_IMM64 9
+#define IMAGE_REL_BASED_DIR64 10
+
+#define IMAGE_ARCHIVE_START_SIZE 8
+#define IMAGE_ARCHIVE_START "!\n"
+#define IMAGE_ARCHIVE_END "`\n"
+#define IMAGE_ARCHIVE_PAD "\n"
+#define IMAGE_ARCHIVE_LINKER_MEMBER "/ "
+#define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
+
+ typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER {
+ BYTE Name[16];
+ BYTE Date[12];
+ BYTE UserID[6];
+ BYTE GroupID[6];
+ BYTE Mode[8];
+ BYTE Size[10];
+ BYTE EndHeader[2];
+ } IMAGE_ARCHIVE_MEMBER_HEADER,*PIMAGE_ARCHIVE_MEMBER_HEADER;
+
+#define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
+
+ typedef struct _IMAGE_EXPORT_DIRECTORY {
+ DWORD Characteristics;
+ DWORD TimeDateStamp;
+ WORD MajorVersion;
+ WORD MinorVersion;
+ DWORD Name;
+ DWORD Base;
+ DWORD NumberOfFunctions;
+ DWORD NumberOfNames;
+ DWORD AddressOfFunctions;
+ DWORD AddressOfNames;
+ DWORD AddressOfNameOrdinals;
+ } IMAGE_EXPORT_DIRECTORY,*PIMAGE_EXPORT_DIRECTORY;
+
+ typedef struct _IMAGE_IMPORT_BY_NAME {
+ WORD Hint;
+ BYTE Name[1];
+ } IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME;
+
+#include "pshpack8.h"
+
+ typedef struct _IMAGE_THUNK_DATA64 {
+ union {
+ ULONGLONG ForwarderString;
+ ULONGLONG Function;
+ ULONGLONG Ordinal;
+ ULONGLONG AddressOfData;
+ } u1;
+ } IMAGE_THUNK_DATA64;
+ typedef IMAGE_THUNK_DATA64 *PIMAGE_THUNK_DATA64;
+
+#include "poppack.h"
+
+ typedef struct _IMAGE_THUNK_DATA32 {
+ union {
+ DWORD ForwarderString;
+ DWORD Function;
+ DWORD Ordinal;
+ DWORD AddressOfData;
+ } u1;
+ } IMAGE_THUNK_DATA32;
+ typedef IMAGE_THUNK_DATA32 *PIMAGE_THUNK_DATA32;
+
+#define IMAGE_ORDINAL_FLAG64 0x8000000000000000ull
+#define IMAGE_ORDINAL_FLAG32 0x80000000
+#define IMAGE_ORDINAL64(Ordinal) (Ordinal & 0xffffull)
+#define IMAGE_ORDINAL32(Ordinal) (Ordinal & 0xffff)
+#define IMAGE_SNAP_BY_ORDINAL64(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG64)!=0)
+#define IMAGE_SNAP_BY_ORDINAL32(Ordinal) ((Ordinal & IMAGE_ORDINAL_FLAG32)!=0)
+
+ typedef VOID
+ (NTAPI *PIMAGE_TLS_CALLBACK)(PVOID DllHandle,DWORD Reason,PVOID Reserved);
+
+ typedef struct _IMAGE_TLS_DIRECTORY64 {
+ ULONGLONG StartAddressOfRawData;
+ ULONGLONG EndAddressOfRawData;
+ ULONGLONG AddressOfIndex;
+ ULONGLONG AddressOfCallBacks;
+ DWORD SizeOfZeroFill;
+ DWORD Characteristics;
+ } IMAGE_TLS_DIRECTORY64;
+ typedef IMAGE_TLS_DIRECTORY64 *PIMAGE_TLS_DIRECTORY64;
+
+ typedef struct _IMAGE_TLS_DIRECTORY32 {
+ DWORD StartAddressOfRawData;
+ DWORD EndAddressOfRawData;
+ DWORD AddressOfIndex;
+ DWORD AddressOfCallBacks;
+ DWORD SizeOfZeroFill;
+ DWORD Characteristics;
+ } IMAGE_TLS_DIRECTORY32;
+ typedef IMAGE_TLS_DIRECTORY32 *PIMAGE_TLS_DIRECTORY32;
+
+#ifdef _WIN64
+#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG64
+#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL64(Ordinal)
+ typedef IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA;
+ typedef PIMAGE_THUNK_DATA64 PIMAGE_THUNK_DATA;
+#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL64(Ordinal)
+ typedef IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY;
+ typedef PIMAGE_TLS_DIRECTORY64 PIMAGE_TLS_DIRECTORY;
+#else
+#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG32
+#define IMAGE_ORDINAL(Ordinal) IMAGE_ORDINAL32(Ordinal)
+ typedef IMAGE_THUNK_DATA32 IMAGE_THUNK_DATA;
+ typedef PIMAGE_THUNK_DATA32 PIMAGE_THUNK_DATA;
+#define IMAGE_SNAP_BY_ORDINAL(Ordinal) IMAGE_SNAP_BY_ORDINAL32(Ordinal)
+ typedef IMAGE_TLS_DIRECTORY32 IMAGE_TLS_DIRECTORY;
+ typedef PIMAGE_TLS_DIRECTORY32 PIMAGE_TLS_DIRECTORY;
+#endif
+
+ typedef struct _IMAGE_IMPORT_DESCRIPTOR {
+ union {
+ DWORD Characteristics;
+ DWORD OriginalFirstThunk;
+ };
+ DWORD TimeDateStamp;
+
+ DWORD ForwarderChain;
+ DWORD Name;
+ DWORD FirstThunk;
+ } IMAGE_IMPORT_DESCRIPTOR;
+ typedef IMAGE_IMPORT_DESCRIPTOR UNALIGNED *PIMAGE_IMPORT_DESCRIPTOR;
+
+ typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR {
+ DWORD TimeDateStamp;
+ WORD OffsetModuleName;
+ WORD NumberOfModuleForwarderRefs;
+ } IMAGE_BOUND_IMPORT_DESCRIPTOR,*PIMAGE_BOUND_IMPORT_DESCRIPTOR;
+
+ typedef struct _IMAGE_BOUND_FORWARDER_REF {
+ DWORD TimeDateStamp;
+ WORD OffsetModuleName;
+ WORD Reserved;
+ } IMAGE_BOUND_FORWARDER_REF,*PIMAGE_BOUND_FORWARDER_REF;
+
+ typedef struct _IMAGE_RESOURCE_DIRECTORY {
+ DWORD Characteristics;
+ DWORD TimeDateStamp;
+ WORD MajorVersion;
+ WORD MinorVersion;
+ WORD NumberOfNamedEntries;
+ WORD NumberOfIdEntries;
+ } IMAGE_RESOURCE_DIRECTORY,*PIMAGE_RESOURCE_DIRECTORY;
+
+#define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000
+#define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000
+
+ typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
+ union {
+ struct {
+ DWORD NameOffset:31;
+ DWORD NameIsString:1;
+ };
+ DWORD Name;
+ WORD Id;
+ };
+ union {
+ DWORD OffsetToData;
+ struct {
+ DWORD OffsetToDirectory:31;
+ DWORD DataIsDirectory:1;
+ };
+ };
+ } IMAGE_RESOURCE_DIRECTORY_ENTRY,*PIMAGE_RESOURCE_DIRECTORY_ENTRY;
+
+ typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
+ WORD Length;
+ CHAR NameString[1];
+ } IMAGE_RESOURCE_DIRECTORY_STRING,*PIMAGE_RESOURCE_DIRECTORY_STRING;
+
+ typedef struct _IMAGE_RESOURCE_DIR_STRING_U {
+ WORD Length;
+ WCHAR NameString[1];
+ } IMAGE_RESOURCE_DIR_STRING_U,*PIMAGE_RESOURCE_DIR_STRING_U;
+
+ typedef struct _IMAGE_RESOURCE_DATA_ENTRY {
+ DWORD OffsetToData;
+ DWORD Size;
+ DWORD CodePage;
+ DWORD Reserved;
+ } IMAGE_RESOURCE_DATA_ENTRY,*PIMAGE_RESOURCE_DATA_ENTRY;
+
+ typedef struct {
+ DWORD Size;
+ DWORD TimeDateStamp;
+ WORD MajorVersion;
+ WORD MinorVersion;
+ DWORD GlobalFlagsClear;
+ DWORD GlobalFlagsSet;
+ DWORD CriticalSectionDefaultTimeout;
+ DWORD DeCommitFreeBlockThreshold;
+ DWORD DeCommitTotalFreeThreshold;
+ DWORD LockPrefixTable;
+ DWORD MaximumAllocationSize;
+ DWORD VirtualMemoryThreshold;
+ DWORD ProcessHeapFlags;
+ DWORD ProcessAffinityMask;
+ WORD CSDVersion;
+ WORD Reserved1;
+ DWORD EditList;
+ DWORD SecurityCookie;
+ DWORD SEHandlerTable;
+ DWORD SEHandlerCount;
+ } IMAGE_LOAD_CONFIG_DIRECTORY32,*PIMAGE_LOAD_CONFIG_DIRECTORY32;
+
+ typedef struct {
+ DWORD Size;
+ DWORD TimeDateStamp;
+ WORD MajorVersion;
+ WORD MinorVersion;
+ DWORD GlobalFlagsClear;
+ DWORD GlobalFlagsSet;
+ DWORD CriticalSectionDefaultTimeout;
+ ULONGLONG DeCommitFreeBlockThreshold;
+ ULONGLONG DeCommitTotalFreeThreshold;
+ ULONGLONG LockPrefixTable;
+ ULONGLONG MaximumAllocationSize;
+ ULONGLONG VirtualMemoryThreshold;
+ ULONGLONG ProcessAffinityMask;
+ DWORD ProcessHeapFlags;
+ WORD CSDVersion;
+ WORD Reserved1;
+ ULONGLONG EditList;
+ ULONGLONG SecurityCookie;
+ ULONGLONG SEHandlerTable;
+ ULONGLONG SEHandlerCount;
+ } IMAGE_LOAD_CONFIG_DIRECTORY64,*PIMAGE_LOAD_CONFIG_DIRECTORY64;
+
+#ifdef _WIN64
+ typedef IMAGE_LOAD_CONFIG_DIRECTORY64 IMAGE_LOAD_CONFIG_DIRECTORY;
+ typedef PIMAGE_LOAD_CONFIG_DIRECTORY64 PIMAGE_LOAD_CONFIG_DIRECTORY;
+#else
+ typedef IMAGE_LOAD_CONFIG_DIRECTORY32 IMAGE_LOAD_CONFIG_DIRECTORY;
+ typedef PIMAGE_LOAD_CONFIG_DIRECTORY32 PIMAGE_LOAD_CONFIG_DIRECTORY;
+#endif
+
+ typedef struct _IMAGE_CE_RUNTIME_FUNCTION_ENTRY {
+ DWORD FuncStart;
+ DWORD PrologLen : 8;
+ DWORD FuncLen : 22;
+ DWORD ThirtyTwoBit : 1;
+ DWORD ExceptionFlag : 1;
+ } IMAGE_CE_RUNTIME_FUNCTION_ENTRY,*PIMAGE_CE_RUNTIME_FUNCTION_ENTRY;
+
+ typedef struct _IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY {
+ ULONGLONG BeginAddress;
+ ULONGLONG EndAddress;
+ ULONGLONG ExceptionHandler;
+ ULONGLONG HandlerData;
+ ULONGLONG PrologEndAddress;
+ } IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY,*PIMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY;
+
+ typedef struct _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY {
+ DWORD BeginAddress;
+ DWORD EndAddress;
+ DWORD ExceptionHandler;
+ DWORD HandlerData;
+ DWORD PrologEndAddress;
+ } IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY,*PIMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY;
+
+ typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
+ DWORD BeginAddress;
+ DWORD EndAddress;
+ DWORD UnwindInfoAddress;
+ } _IMAGE_RUNTIME_FUNCTION_ENTRY,*_PIMAGE_RUNTIME_FUNCTION_ENTRY;
+
+ typedef _IMAGE_RUNTIME_FUNCTION_ENTRY IMAGE_IA64_RUNTIME_FUNCTION_ENTRY;
+ typedef _PIMAGE_RUNTIME_FUNCTION_ENTRY PIMAGE_IA64_RUNTIME_FUNCTION_ENTRY;
+
+ typedef _IMAGE_RUNTIME_FUNCTION_ENTRY IMAGE_RUNTIME_FUNCTION_ENTRY;
+ typedef _PIMAGE_RUNTIME_FUNCTION_ENTRY PIMAGE_RUNTIME_FUNCTION_ENTRY;
+
+ typedef struct _IMAGE_DEBUG_DIRECTORY {
+ DWORD Characteristics;
+ DWORD TimeDateStamp;
+ WORD MajorVersion;
+ WORD MinorVersion;
+ DWORD Type;
+ DWORD SizeOfData;
+ DWORD AddressOfRawData;
+ DWORD PointerToRawData;
+ } IMAGE_DEBUG_DIRECTORY,*PIMAGE_DEBUG_DIRECTORY;
+
+#define IMAGE_DEBUG_TYPE_UNKNOWN 0
+#define IMAGE_DEBUG_TYPE_COFF 1
+#define IMAGE_DEBUG_TYPE_CODEVIEW 2
+#define IMAGE_DEBUG_TYPE_FPO 3
+#define IMAGE_DEBUG_TYPE_MISC 4
+#define IMAGE_DEBUG_TYPE_EXCEPTION 5
+#define IMAGE_DEBUG_TYPE_FIXUP 6
+#define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
+#define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
+#define IMAGE_DEBUG_TYPE_BORLAND 9
+#define IMAGE_DEBUG_TYPE_RESERVED10 10
+#define IMAGE_DEBUG_TYPE_CLSID 11
+
+ typedef struct _IMAGE_COFF_SYMBOLS_HEADER {
+ DWORD NumberOfSymbols;
+ DWORD LvaToFirstSymbol;
+ DWORD NumberOfLinenumbers;
+ DWORD LvaToFirstLinenumber;
+ DWORD RvaToFirstByteOfCode;
+ DWORD RvaToLastByteOfCode;
+ DWORD RvaToFirstByteOfData;
+ DWORD RvaToLastByteOfData;
+ } IMAGE_COFF_SYMBOLS_HEADER,*PIMAGE_COFF_SYMBOLS_HEADER;
+
+#define FRAME_FPO 0
+#define FRAME_TRAP 1
+#define FRAME_TSS 2
+#define FRAME_NONFPO 3
+
+ typedef struct _FPO_DATA {
+ DWORD ulOffStart;
+ DWORD cbProcSize;
+ DWORD cdwLocals;
+ WORD cdwParams;
+ WORD cbProlog : 8;
+ WORD cbRegs : 3;
+ WORD fHasSEH : 1;
+ WORD fUseBP : 1;
+ WORD reserved : 1;
+ WORD cbFrame : 2;
+ } FPO_DATA,*PFPO_DATA;
+#define SIZEOF_RFPO_DATA 16
+
+#define IMAGE_DEBUG_MISC_EXENAME 1
+
+ typedef struct _IMAGE_DEBUG_MISC {
+ DWORD DataType;
+ DWORD Length;
+ BOOLEAN Unicode;
+ BYTE Reserved[3];
+ BYTE Data[1];
+ } IMAGE_DEBUG_MISC,*PIMAGE_DEBUG_MISC;
+
+ typedef struct _IMAGE_FUNCTION_ENTRY {
+ DWORD StartingAddress;
+ DWORD EndingAddress;
+ DWORD EndOfPrologue;
+ } IMAGE_FUNCTION_ENTRY,*PIMAGE_FUNCTION_ENTRY;
+
+ typedef struct _IMAGE_FUNCTION_ENTRY64 {
+ ULONGLONG StartingAddress;
+ ULONGLONG EndingAddress;
+ union {
+ ULONGLONG EndOfPrologue;
+ ULONGLONG UnwindInfoAddress;
+ };
+ } IMAGE_FUNCTION_ENTRY64,*PIMAGE_FUNCTION_ENTRY64;
+
+ typedef struct _IMAGE_SEPARATE_DEBUG_HEADER {
+ WORD Signature;
+ WORD Flags;
+ WORD Machine;
+ WORD Characteristics;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD ImageBase;
+ DWORD SizeOfImage;
+ DWORD NumberOfSections;
+ DWORD ExportedNamesSize;
+ DWORD DebugDirectorySize;
+ DWORD SectionAlignment;
+ DWORD Reserved[2];
+ } IMAGE_SEPARATE_DEBUG_HEADER,*PIMAGE_SEPARATE_DEBUG_HEADER;
+
+ typedef struct _NON_PAGED_DEBUG_INFO {
+ WORD Signature;
+ WORD Flags;
+ DWORD Size;
+ WORD Machine;
+ WORD Characteristics;
+ DWORD TimeDateStamp;
+ DWORD CheckSum;
+ DWORD SizeOfImage;
+ ULONGLONG ImageBase;
+
+ } NON_PAGED_DEBUG_INFO,*PNON_PAGED_DEBUG_INFO;
+
+#define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944
+#define NON_PAGED_DEBUG_SIGNATURE 0x494E
+
+#define IMAGE_SEPARATE_DEBUG_FLAGS_MASK 0x8000
+#define IMAGE_SEPARATE_DEBUG_MISMATCH 0x8000
+
+ typedef struct _ImageArchitectureHeader {
+ unsigned int AmaskValue: 1;
+ int Adummy1 :7;
+ unsigned int AmaskShift: 8;
+ int Adummy2 :16;
+ DWORD FirstEntryRVA;
+ } IMAGE_ARCHITECTURE_HEADER,*PIMAGE_ARCHITECTURE_HEADER;
+
+ typedef struct _ImageArchitectureEntry {
+ DWORD FixupInstRVA;
+ DWORD NewInst;
+ } IMAGE_ARCHITECTURE_ENTRY,*PIMAGE_ARCHITECTURE_ENTRY;
+
+#include "poppack.h"
+
+#define IMPORT_OBJECT_HDR_SIG2 0xffff
+
+ typedef struct IMPORT_OBJECT_HEADER {
+ WORD Sig1;
+ WORD Sig2;
+ WORD Version;
+ WORD Machine;
+ DWORD TimeDateStamp;
+ DWORD SizeOfData;
+ union {
+ WORD Ordinal;
+ WORD Hint;
+ };
+ WORD Type : 2;
+ WORD NameType : 3;
+ WORD Reserved : 11;
+ } IMPORT_OBJECT_HEADER;
+
+ typedef enum IMPORT_OBJECT_TYPE {
+ IMPORT_OBJECT_CODE = 0,IMPORT_OBJECT_DATA = 1,IMPORT_OBJECT_CONST = 2
+ } IMPORT_OBJECT_TYPE;
+
+ typedef enum IMPORT_OBJECT_NAME_TYPE {
+ IMPORT_OBJECT_ORDINAL = 0,IMPORT_OBJECT_NAME = 1,IMPORT_OBJECT_NAME_NO_PREFIX = 2,IMPORT_OBJECT_NAME_UNDECORATE = 3
+ } IMPORT_OBJECT_NAME_TYPE;
+
+#ifndef __IMAGE_COR20_HEADER_DEFINED__
+#define __IMAGE_COR20_HEADER_DEFINED__
+ typedef enum ReplacesCorHdrNumericDefines {
+ COMIMAGE_FLAGS_ILONLY =0x00000001,COMIMAGE_FLAGS_32BITREQUIRED =0x00000002,COMIMAGE_FLAGS_IL_LIBRARY =0x00000004,
+ COMIMAGE_FLAGS_STRONGNAMESIGNED =0x00000008,COMIMAGE_FLAGS_TRACKDEBUGDATA =0x00010000,COR_VERSION_MAJOR_V2 =2,
+ COR_VERSION_MAJOR =COR_VERSION_MAJOR_V2,COR_VERSION_MINOR =0,COR_DELETED_NAME_LENGTH =8,COR_VTABLEGAP_NAME_LENGTH =8,
+ NATIVE_TYPE_MAX_CB =1,COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE=0xFF,IMAGE_COR_MIH_METHODRVA =0x01,IMAGE_COR_MIH_EHRVA =0x02,
+ IMAGE_COR_MIH_BASICBLOCK =0x08,COR_VTABLE_32BIT =0x01,COR_VTABLE_64BIT =0x02,COR_VTABLE_FROM_UNMANAGED =0x04,
+ COR_VTABLE_CALL_MOST_DERIVED =0x10,IMAGE_COR_EATJ_THUNK_SIZE =32,MAX_CLASS_NAME =1024,MAX_PACKAGE_NAME =1024
+ } ReplacesCorHdrNumericDefines;
+
+ typedef struct IMAGE_COR20_HEADER {
+ DWORD cb;
+ WORD MajorRuntimeVersion;
+ WORD MinorRuntimeVersion;
+ IMAGE_DATA_DIRECTORY MetaData;
+ DWORD Flags;
+ DWORD EntryPointToken;
+ IMAGE_DATA_DIRECTORY Resources;
+ IMAGE_DATA_DIRECTORY StrongNameSignature;
+ IMAGE_DATA_DIRECTORY CodeManagerTable;
+ IMAGE_DATA_DIRECTORY VTableFixups;
+ IMAGE_DATA_DIRECTORY ExportAddressTableJumps;
+ IMAGE_DATA_DIRECTORY ManagedNativeHeader;
+ } IMAGE_COR20_HEADER,*PIMAGE_COR20_HEADER;
+#endif
+
+#if defined (__x86_64)
+ NTSYSAPI PRUNTIME_FUNCTION NTAPI RtlLookupFunctionEntry (DWORD64 ControlPc, PDWORD64 ImageBase, PUNWIND_HISTORY_TABLE HistoryTable);
+ NTSYSAPI VOID NTAPI RtlUnwindEx (PVOID TargetFrame, PVOID TargetIp, PEXCEPTION_RECORD ExceptionRecord, PVOID ReturnValue, PCONTEXT ContextRecord, PUNWIND_HISTORY_TABLE HistoryTable);
+#endif
+
+#include
+
+#ifndef _SLIST_HEADER_
+#define _SLIST_HEADER_
+
+#ifdef _WIN64
+ typedef struct _SLIST_ENTRY *PSLIST_ENTRY;
+ typedef DECLSPEC_ALIGN(16) struct _SLIST_ENTRY {
+ PSLIST_ENTRY Next;
+ } SLIST_ENTRY;
+#else
+
+#define SLIST_ENTRY SINGLE_LIST_ENTRY
+#define _SLIST_ENTRY _SINGLE_LIST_ENTRY
+#define PSLIST_ENTRY PSINGLE_LIST_ENTRY
+#endif
+
+#if defined(_WIN64)
+
+ typedef DECLSPEC_ALIGN(16) struct _SLIST_HEADER {
+ ULONGLONG Alignment;
+ ULONGLONG Region;
+ } SLIST_HEADER;
+
+ typedef struct _SLIST_HEADER *PSLIST_HEADER;
+#else
+
+ typedef union _SLIST_HEADER {
+ ULONGLONG Alignment;
+ struct {
+ SLIST_ENTRY Next;
+ WORD Depth;
+ WORD Sequence;
+ };
+ } SLIST_HEADER,*PSLIST_HEADER;
+#endif
+#endif
+
+ NTSYSAPI VOID NTAPI RtlInitializeSListHead(PSLIST_HEADER ListHead);
+ NTSYSAPI PSLIST_ENTRY NTAPI RtlFirstEntrySList(const SLIST_HEADER *ListHead);
+ NTSYSAPI PSLIST_ENTRY NTAPI RtlInterlockedPopEntrySList(PSLIST_HEADER ListHead);
+ NTSYSAPI PSLIST_ENTRY NTAPI RtlInterlockedPushEntrySList(PSLIST_HEADER ListHead,PSLIST_ENTRY ListEntry);
+ NTSYSAPI PSLIST_ENTRY NTAPI RtlInterlockedFlushSList(PSLIST_HEADER ListHead);
+ NTSYSAPI WORD NTAPI RtlQueryDepthSList(PSLIST_HEADER ListHead);
+
+#define HEAP_NO_SERIALIZE 0x00000001
+#define HEAP_GROWABLE 0x00000002
+#define HEAP_GENERATE_EXCEPTIONS 0x00000004
+#define HEAP_ZERO_MEMORY 0x00000008
+#define HEAP_REALLOC_IN_PLACE_ONLY 0x00000010
+#define HEAP_TAIL_CHECKING_ENABLED 0x00000020
+#define HEAP_FREE_CHECKING_ENABLED 0x00000040
+#define HEAP_DISABLE_COALESCE_ON_FREE 0x00000080
+#define HEAP_CREATE_ALIGN_16 0x00010000
+#define HEAP_CREATE_ENABLE_TRACING 0x00020000
+#define HEAP_CREATE_ENABLE_EXECUTE 0x00040000
+#define HEAP_MAXIMUM_TAG 0x0FFF
+#define HEAP_PSEUDO_TAG_FLAG 0x8000
+#define HEAP_TAG_SHIFT 18
+#define HEAP_MAKE_TAG_FLAGS(b,o) ((DWORD)((b) + ((o) << 18)))
+
+ NTSYSAPI VOID NTAPI RtlCaptureContext(PCONTEXT ContextRecord);
+
+#define IS_TEXT_UNICODE_ASCII16 0x0001
+#define IS_TEXT_UNICODE_REVERSE_ASCII16 0x0010
+
+#define IS_TEXT_UNICODE_STATISTICS 0x0002
+#define IS_TEXT_UNICODE_REVERSE_STATISTICS 0x0020
+
+#define IS_TEXT_UNICODE_CONTROLS 0x0004
+#define IS_TEXT_UNICODE_REVERSE_CONTROLS 0x0040
+
+#define IS_TEXT_UNICODE_SIGNATURE 0x0008
+#define IS_TEXT_UNICODE_REVERSE_SIGNATURE 0x0080
+
+#define IS_TEXT_UNICODE_ILLEGAL_CHARS 0x0100
+#define IS_TEXT_UNICODE_ODD_LENGTH 0x0200
+#define IS_TEXT_UNICODE_DBCS_LEADBYTE 0x0400
+#define IS_TEXT_UNICODE_NULL_BYTES 0x1000
+
+#define IS_TEXT_UNICODE_UNICODE_MASK 0x000F
+#define IS_TEXT_UNICODE_REVERSE_MASK 0x00F0
+#define IS_TEXT_UNICODE_NOT_UNICODE_MASK 0x0F00
+#define IS_TEXT_UNICODE_NOT_ASCII_MASK 0xF000
+
+#define COMPRESSION_FORMAT_NONE (0x0000)
+#define COMPRESSION_FORMAT_DEFAULT (0x0001)
+#define COMPRESSION_FORMAT_LZNT1 (0x0002)
+#define COMPRESSION_ENGINE_STANDARD (0x0000)
+#define COMPRESSION_ENGINE_MAXIMUM (0x0100)
+#define COMPRESSION_ENGINE_HIBER (0x0200)
+
+#if _DBG_MEMCPY_INLINE_ && !defined(_MEMCPY_INLINE_) && !defined(_CRTBLD)
+#define _MEMCPY_INLINE_
+ __CRT_INLINE PVOID __cdecl memcpy_inline(void *dst,const void *src,size_t size) {
+ if(((char *)dst > (char *)src) && ((char *)dst < ((char *)src + size))) {
+ __debugbreak();
+ }
+ return memcpy(dst,src,size);
+ }
+#define memcpy memcpy_inline
+#endif
+
+ NTSYSAPI SIZE_T NTAPI RtlCompareMemory(const VOID *Source1,const VOID *Source2,SIZE_T Length);
+
+#define RtlEqualMemory(Destination,Source,Length) (!memcmp((Destination),(Source),(Length)))
+#define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
+#define RtlCopyMemory(Destination,Source,Length) memcpy((Destination),(Source),(Length))
+#define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
+#define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
+
+ __CRT_INLINE PVOID RtlSecureZeroMemory(PVOID ptr,SIZE_T cnt) {
+ volatile char *vptr =(volatile char *)ptr;
+#ifdef __x86_64
+ __stosb((PBYTE)((DWORD64)vptr),0,cnt);
+#else
+ while(cnt) {
+ *vptr = 0;
+ vptr++;
+ cnt--;
+ }
+#endif
+ return ptr;
+ }
+
+ typedef struct _MESSAGE_RESOURCE_ENTRY {
+ WORD Length;
+ WORD Flags;
+ BYTE Text[1];
+ } MESSAGE_RESOURCE_ENTRY,*PMESSAGE_RESOURCE_ENTRY;
+
+#define MESSAGE_RESOURCE_UNICODE 0x0001
+
+ typedef struct _MESSAGE_RESOURCE_BLOCK {
+ DWORD LowId;
+ DWORD HighId;
+ DWORD OffsetToEntries;
+ } MESSAGE_RESOURCE_BLOCK,*PMESSAGE_RESOURCE_BLOCK;
+
+ typedef struct _MESSAGE_RESOURCE_DATA {
+ DWORD NumberOfBlocks;
+ MESSAGE_RESOURCE_BLOCK Blocks[1];
+ } MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA;
+
+ typedef struct _OSVERSIONINFOA {
+ DWORD dwOSVersionInfoSize;
+ DWORD dwMajorVersion;
+ DWORD dwMinorVersion;
+ DWORD dwBuildNumber;
+ DWORD dwPlatformId;
+ CHAR szCSDVersion[128];
+ } OSVERSIONINFOA,*POSVERSIONINFOA,*LPOSVERSIONINFOA;
+
+ typedef struct _OSVERSIONINFOW {
+ DWORD dwOSVersionInfoSize;
+ DWORD dwMajorVersion;
+ DWORD dwMinorVersion;
+ DWORD dwBuildNumber;
+ DWORD dwPlatformId;
+ WCHAR szCSDVersion[128];
+ } OSVERSIONINFOW,*POSVERSIONINFOW,*LPOSVERSIONINFOW,RTL_OSVERSIONINFOW,*PRTL_OSVERSIONINFOW;
+
+#ifdef UNICODE
+ typedef OSVERSIONINFOW OSVERSIONINFO;
+ typedef POSVERSIONINFOW POSVERSIONINFO;
+ typedef LPOSVERSIONINFOW LPOSVERSIONINFO;
+#else
+ typedef OSVERSIONINFOA OSVERSIONINFO;
+ typedef POSVERSIONINFOA POSVERSIONINFO;
+ typedef LPOSVERSIONINFOA LPOSVERSIONINFO;
+#endif
+
+ typedef struct _OSVERSIONINFOEXA {
+ DWORD dwOSVersionInfoSize;
+ DWORD dwMajorVersion;
+ DWORD dwMinorVersion;
+ DWORD dwBuildNumber;
+ DWORD dwPlatformId;
+ CHAR szCSDVersion[128];
+ WORD wServicePackMajor;
+ WORD wServicePackMinor;
+ WORD wSuiteMask;
+ BYTE wProductType;
+ BYTE wReserved;
+ } OSVERSIONINFOEXA,*POSVERSIONINFOEXA,*LPOSVERSIONINFOEXA;
+
+ typedef struct _OSVERSIONINFOEXW {
+ DWORD dwOSVersionInfoSize;
+ DWORD dwMajorVersion;
+ DWORD dwMinorVersion;
+ DWORD dwBuildNumber;
+ DWORD dwPlatformId;
+ WCHAR szCSDVersion[128];
+ WORD wServicePackMajor;
+ WORD wServicePackMinor;
+ WORD wSuiteMask;
+ BYTE wProductType;
+ BYTE wReserved;
+ } OSVERSIONINFOEXW,*POSVERSIONINFOEXW,*LPOSVERSIONINFOEXW,RTL_OSVERSIONINFOEXW,*PRTL_OSVERSIONINFOEXW;
+#ifdef UNICODE
+ typedef OSVERSIONINFOEXW OSVERSIONINFOEX;
+ typedef POSVERSIONINFOEXW POSVERSIONINFOEX;
+ typedef LPOSVERSIONINFOEXW LPOSVERSIONINFOEX;
+#else
+ typedef OSVERSIONINFOEXA OSVERSIONINFOEX;
+ typedef POSVERSIONINFOEXA POSVERSIONINFOEX;
+ typedef LPOSVERSIONINFOEXA LPOSVERSIONINFOEX;
+#endif
+
+#define VER_EQUAL 1
+#define VER_GREATER 2
+#define VER_GREATER_EQUAL 3
+#define VER_LESS 4
+#define VER_LESS_EQUAL 5
+#define VER_AND 6
+#define VER_OR 7
+
+#define VER_CONDITION_MASK 7
+#define VER_NUM_BITS_PER_CONDITION_MASK 3
+
+#define VER_MINORVERSION 0x0000001
+#define VER_MAJORVERSION 0x0000002
+#define VER_BUILDNUMBER 0x0000004
+#define VER_PLATFORMID 0x0000008
+#define VER_SERVICEPACKMINOR 0x0000010
+#define VER_SERVICEPACKMAJOR 0x0000020
+#define VER_SUITENAME 0x0000040
+#define VER_PRODUCT_TYPE 0x0000080
+
+#define VER_NT_WORKSTATION 0x0000001
+#define VER_NT_DOMAIN_CONTROLLER 0x0000002
+#define VER_NT_SERVER 0x0000003
+
+#define VER_PLATFORM_WIN32s 0
+#define VER_PLATFORM_WIN32_WINDOWS 1
+#define VER_PLATFORM_WIN32_NT 2
+
+#define VER_SET_CONDITION(_m_,_t_,_c_) ((_m_)=VerSetConditionMask((_m_),(_t_),(_c_)))
+
+ NTSYSAPI ULONGLONG NTAPI VerSetConditionMask(ULONGLONG ConditionMask,DWORD TypeMask,BYTE Condition);
+
+ typedef struct _RTL_CRITICAL_SECTION_DEBUG {
+ WORD Type;
+ WORD CreatorBackTraceIndex;
+ struct _RTL_CRITICAL_SECTION *CriticalSection;
+ LIST_ENTRY ProcessLocksList;
+ DWORD EntryCount;
+ DWORD ContentionCount;
+ DWORD Spare[2];
+ } RTL_CRITICAL_SECTION_DEBUG,*PRTL_CRITICAL_SECTION_DEBUG,RTL_RESOURCE_DEBUG,*PRTL_RESOURCE_DEBUG;
+
+#define RTL_CRITSECT_TYPE 0
+#define RTL_RESOURCE_TYPE 1
+
+ typedef struct _RTL_CRITICAL_SECTION {
+ PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
+ LONG LockCount;
+ LONG RecursionCount;
+ HANDLE OwningThread;
+ HANDLE LockSemaphore;
+ ULONG_PTR SpinCount;
+ } RTL_CRITICAL_SECTION,*PRTL_CRITICAL_SECTION;
+
+ typedef VOID (NTAPI *RTL_VERIFIER_DLL_LOAD_CALLBACK) (PWSTR DllName,PVOID DllBase,SIZE_T DllSize,PVOID Reserved);
+ typedef VOID (NTAPI *RTL_VERIFIER_DLL_UNLOAD_CALLBACK) (PWSTR DllName,PVOID DllBase,SIZE_T DllSize,PVOID Reserved);
+ typedef VOID (NTAPI *RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK)(PVOID AllocationBase,SIZE_T AllocationSize);
+
+ typedef struct _RTL_VERIFIER_THUNK_DESCRIPTOR {
+ PCHAR ThunkName;
+ PVOID ThunkOldAddress;
+ PVOID ThunkNewAddress;
+ } RTL_VERIFIER_THUNK_DESCRIPTOR,*PRTL_VERIFIER_THUNK_DESCRIPTOR;
+
+ typedef struct _RTL_VERIFIER_DLL_DESCRIPTOR {
+ PWCHAR DllName;
+ DWORD DllFlags;
+ PVOID DllAddress;
+ PRTL_VERIFIER_THUNK_DESCRIPTOR DllThunks;
+ } RTL_VERIFIER_DLL_DESCRIPTOR,*PRTL_VERIFIER_DLL_DESCRIPTOR;
+
+ typedef struct _RTL_VERIFIER_PROVIDER_DESCRIPTOR {
+ DWORD Length;
+ PRTL_VERIFIER_DLL_DESCRIPTOR ProviderDlls;
+ RTL_VERIFIER_DLL_LOAD_CALLBACK ProviderDllLoadCallback;
+ RTL_VERIFIER_DLL_UNLOAD_CALLBACK ProviderDllUnloadCallback;
+ PWSTR VerifierImage;
+ DWORD VerifierFlags;
+ DWORD VerifierDebug;
+ PVOID RtlpGetStackTraceAddress;
+ PVOID RtlpDebugPageHeapCreate;
+ PVOID RtlpDebugPageHeapDestroy;
+ RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK ProviderNtdllHeapFreeCallback;
+ } RTL_VERIFIER_PROVIDER_DESCRIPTOR,*PRTL_VERIFIER_PROVIDER_DESCRIPTOR;
+
+#define RTL_VRF_FLG_FULL_PAGE_HEAP 0x00000001
+#define RTL_VRF_FLG_RESERVED_DONOTUSE 0x00000002
+#define RTL_VRF_FLG_HANDLE_CHECKS 0x00000004
+#define RTL_VRF_FLG_STACK_CHECKS 0x00000008
+#define RTL_VRF_FLG_APPCOMPAT_CHECKS 0x00000010
+#define RTL_VRF_FLG_TLS_CHECKS 0x00000020
+#define RTL_VRF_FLG_DIRTY_STACKS 0x00000040
+#define RTL_VRF_FLG_RPC_CHECKS 0x00000080
+#define RTL_VRF_FLG_COM_CHECKS 0x00000100
+#define RTL_VRF_FLG_DANGEROUS_APIS 0x00000200
+#define RTL_VRF_FLG_RACE_CHECKS 0x00000400
+#define RTL_VRF_FLG_DEADLOCK_CHECKS 0x00000800
+#define RTL_VRF_FLG_FIRST_CHANCE_EXCEPTION_CHECKS 0x00001000
+#define RTL_VRF_FLG_VIRTUAL_MEM_CHECKS 0x00002000
+#define RTL_VRF_FLG_ENABLE_LOGGING 0x00004000
+#define RTL_VRF_FLG_FAST_FILL_HEAP 0x00008000
+#define RTL_VRF_FLG_VIRTUAL_SPACE_TRACKING 0x00010000
+#define RTL_VRF_FLG_ENABLED_SYSTEM_WIDE 0x00020000
+#define RTL_VRF_FLG_MISCELLANEOUS_CHECKS 0x00020000
+#define RTL_VRF_FLG_LOCK_CHECKS 0x00040000
+
+#define APPLICATION_VERIFIER_INTERNAL_ERROR 0x80000000
+#define APPLICATION_VERIFIER_INTERNAL_WARNING 0x40000000
+#define APPLICATION_VERIFIER_NO_BREAK 0x20000000
+#define APPLICATION_VERIFIER_CONTINUABLE_BREAK 0x10000000
+
+#define APPLICATION_VERIFIER_UNKNOWN_ERROR 0x0001
+#define APPLICATION_VERIFIER_ACCESS_VIOLATION 0x0002
+#define APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS 0x0003
+#define APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST 0x0004
+#define APPLICATION_VERIFIER_BAD_HEAP_HANDLE 0x0005
+#define APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE 0x0006
+#define APPLICATION_VERIFIER_DOUBLE_FREE 0x0007
+#define APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK 0x0008
+#define APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP 0x0009
+#define APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION 0x000A
+#define APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_HEADER 0x000B
+#define APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_PROBING 0x000C
+#define APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_HEADER 0x000D
+#define APPLICATION_VERIFIER_CORRUPTED_FREED_HEAP_BLOCK 0x000E
+#define APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_SUFFIX 0x000F
+#define APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_START_STAMP 0x0010
+#define APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_END_STAMP 0x0011
+#define APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_PREFIX 0x0012
+#define APPLICATION_VERIFIER_FIRST_CHANCE_ACCESS_VIOLATION 0x0013
+#define APPLICATION_VERIFIER_CORRUPTED_HEAP_LIST 0x0014
+
+#define APPLICATION_VERIFIER_TERMINATE_THREAD_CALL 0x0100
+#define APPLICATION_VERIFIER_STACK_OVERFLOW 0x0101
+#define APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL 0x0102
+
+#define APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK 0x0200
+#define APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL 0x0201
+#define APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP 0x0202
+#define APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE 0x0203
+#define APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY 0x0204
+#define APPLICATION_VERIFIER_LOCK_CORRUPTED 0x0205
+#define APPLICATION_VERIFIER_LOCK_INVALID_OWNER 0x0206
+#define APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT 0x0207
+#define APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT 0x0208
+#define APPLICATION_VERIFIER_LOCK_OVER_RELEASED 0x0209
+#define APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED 0x0210
+#define APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED 0x0211
+#define APPLICATION_VERIFIER_LOCK_IN_FREED_VMEM 0x0212
+#define APPLICATION_VERIFIER_LOCK_IN_UNMAPPED_MEM 0x0213
+#define APPLICATION_VERIFIER_THREAD_NOT_LOCK_OWNER 0x0214
+
+#define APPLICATION_VERIFIER_INVALID_HANDLE 0x0300
+#define APPLICATION_VERIFIER_INVALID_TLS_VALUE 0x0301
+#define APPLICATION_VERIFIER_INCORRECT_WAIT_CALL 0x0302
+#define APPLICATION_VERIFIER_NULL_HANDLE 0x0303
+#define APPLICATION_VERIFIER_WAIT_IN_DLLMAIN 0x0304
+
+#define APPLICATION_VERIFIER_COM_ERROR 0x0400
+#define APPLICATION_VERIFIER_COM_API_IN_DLLMAIN 0x0401
+#define APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION 0x0402
+#define APPLICATION_VERIFIER_COM_UNBALANCED_COINIT 0x0403
+#define APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT 0x0404
+#define APPLICATION_VERIFIER_COM_UNBALANCED_SWC 0x0405
+#define APPLICATION_VERIFIER_COM_NULL_DACL 0x0406
+#define APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION 0x0407
+#define APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER 0x0408
+#define APPLICATION_VERIFIER_COM_SMUGGLED_PROXY 0x0409
+#define APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL 0x040A
+#define APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL 0x040B
+#define APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY 0x040C
+#define APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL 0x040D
+#define APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY 0x040E
+#define APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL 0x040F
+#define APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL 0x0410
+
+#define APPLICATION_VERIFIER_RPC_ERROR 0x0500
+
+#define APPLICATION_VERIFIER_INVALID_FREEMEM 0x0600
+#define APPLICATION_VERIFIER_INVALID_ALLOCMEM 0x0601
+#define APPLICATION_VERIFIER_INVALID_MAPVIEW 0x0602
+#define APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS 0x0603
+#define APPLICATION_VERIFIER_PROBE_FREE_MEM 0x0604
+#define APPLICATION_VERIFIER_PROBE_GUARD_PAGE 0x0605
+#define APPLICATION_VERIFIER_PROBE_NULL 0x0606
+#define APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE 0x0607
+#define APPLICATION_VERIFIER_SIZE_HEAP_UNEXPECTED_EXCEPTION 0x0618
+
+#define VERIFIER_STOP(Code,Msg,P1,S1,P2,S2,P3,S3,P4,S4) { RtlApplicationVerifierStop ((Code),(Msg),(ULONG_PTR)(P1),(S1),(ULONG_PTR)(P2),(S2),(ULONG_PTR)(P3),(S3),(ULONG_PTR)(P4),(S4)); }
+
+ VOID NTAPI RtlApplicationVerifierStop(ULONG_PTR Code,PSTR Message,ULONG_PTR Param1,PSTR Description1,ULONG_PTR Param2,PSTR Description2,ULONG_PTR Param3,PSTR Description3,ULONG_PTR Param4,PSTR Description4);
+
+ typedef LONG (NTAPI *PVECTORED_EXCEPTION_HANDLER)(struct _EXCEPTION_POINTERS *ExceptionInfo);
+#define SEF_DACL_AUTO_INHERIT 0x01
+#define SEF_SACL_AUTO_INHERIT 0x02
+#define SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT 0x04
+#define SEF_AVOID_PRIVILEGE_CHECK 0x08
+#define SEF_AVOID_OWNER_CHECK 0x10
+#define SEF_DEFAULT_OWNER_FROM_PARENT 0x20
+#define SEF_DEFAULT_GROUP_FROM_PARENT 0x40
+
+ typedef enum _HEAP_INFORMATION_CLASS {
+ HeapCompatibilityInformation
+ } HEAP_INFORMATION_CLASS;
+
+ NTSYSAPI DWORD NTAPI RtlSetHeapInformation(PVOID HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength);
+ NTSYSAPI DWORD NTAPI RtlQueryHeapInformation(PVOID HeapHandle,HEAP_INFORMATION_CLASS HeapInformationClass,PVOID HeapInformation,SIZE_T HeapInformationLength,PSIZE_T ReturnLength);
+ DWORD NTAPI RtlMultipleAllocateHeap(PVOID HeapHandle,DWORD Flags,SIZE_T Size,DWORD Count,PVOID *Array);
+ DWORD NTAPI RtlMultipleFreeHeap(PVOID HeapHandle,DWORD Flags,DWORD Count,PVOID *Array);
+
+#define WT_EXECUTEDEFAULT 0x00000000
+#define WT_EXECUTEINIOTHREAD 0x00000001
+#define WT_EXECUTEINUITHREAD 0x00000002
+#define WT_EXECUTEINWAITTHREAD 0x00000004
+#define WT_EXECUTEONLYONCE 0x00000008
+#define WT_EXECUTEINTIMERTHREAD 0x00000020
+#define WT_EXECUTELONGFUNCTION 0x00000010
+#define WT_EXECUTEINPERSISTENTIOTHREAD 0x00000040
+#define WT_EXECUTEINPERSISTENTTHREAD 0x00000080
+#define WT_TRANSFER_IMPERSONATION 0x00000100
+#define WT_SET_MAX_THREADPOOL_THREADS(Flags,Limit) ((Flags) |= (Limit)<<16)
+ typedef VOID (NTAPI *WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN);
+ typedef VOID (NTAPI *WORKERCALLBACKFUNC)(PVOID);
+ typedef VOID (NTAPI *APC_CALLBACK_FUNCTION)(DWORD ,PVOID,PVOID);
+ typedef
+ VOID
+ (NTAPI *PFLS_CALLBACK_FUNCTION)(PVOID lpFlsData);
+#define WT_EXECUTEINLONGTHREAD 0x00000010
+#define WT_EXECUTEDELETEWAIT 0x00000008
+
+ typedef enum _ACTIVATION_CONTEXT_INFO_CLASS {
+ ActivationContextBasicInformation = 1,ActivationContextDetailedInformation = 2,AssemblyDetailedInformationInActivationContext = 3,FileInformationInAssemblyOfAssemblyInActivationContext = 4,MaxActivationContextInfoClass,AssemblyDetailedInformationInActivationContxt = 3,FileInformationInAssemblyOfAssemblyInActivationContxt = 4
+ } ACTIVATION_CONTEXT_INFO_CLASS;
+
+#define ACTIVATIONCONTEXTINFOCLASS ACTIVATION_CONTEXT_INFO_CLASS
+
+ typedef struct _ACTIVATION_CONTEXT_QUERY_INDEX {
+ DWORD ulAssemblyIndex;
+ DWORD ulFileIndexInAssembly;
+ } ACTIVATION_CONTEXT_QUERY_INDEX,*PACTIVATION_CONTEXT_QUERY_INDEX;
+
+ typedef const struct _ACTIVATION_CONTEXT_QUERY_INDEX *PCACTIVATION_CONTEXT_QUERY_INDEX;
+
+#define ACTIVATION_CONTEXT_PATH_TYPE_NONE (1)
+#define ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE (2)
+#define ACTIVATION_CONTEXT_PATH_TYPE_URL (3)
+#define ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF (4)
+
+ typedef struct _ASSEMBLY_FILE_DETAILED_INFORMATION {
+ DWORD ulFlags;
+ DWORD ulFilenameLength;
+ DWORD ulPathLength;
+
+ PCWSTR lpFileName;
+ PCWSTR lpFilePath;
+ } ASSEMBLY_FILE_DETAILED_INFORMATION,*PASSEMBLY_FILE_DETAILED_INFORMATION;
+ typedef const ASSEMBLY_FILE_DETAILED_INFORMATION *PCASSEMBLY_FILE_DETAILED_INFORMATION;
+
+#define _ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION _ASSEMBLY_FILE_DETAILED_INFORMATION
+#define ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION ASSEMBLY_FILE_DETAILED_INFORMATION
+#define PASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION PASSEMBLY_FILE_DETAILED_INFORMATION
+#define PCASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION PCASSEMBLY_FILE_DETAILED_INFORMATION
+
+ typedef struct _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION {
+ DWORD ulFlags;
+ DWORD ulEncodedAssemblyIdentityLength;
+ DWORD ulManifestPathType;
+ DWORD ulManifestPathLength;
+ LARGE_INTEGER liManifestLastWriteTime;
+ DWORD ulPolicyPathType;
+ DWORD ulPolicyPathLength;
+ LARGE_INTEGER liPolicyLastWriteTime;
+ DWORD ulMetadataSatelliteRosterIndex;
+ DWORD ulManifestVersionMajor;
+ DWORD ulManifestVersionMinor;
+ DWORD ulPolicyVersionMajor;
+ DWORD ulPolicyVersionMinor;
+ DWORD ulAssemblyDirectoryNameLength;
+ PCWSTR lpAssemblyEncodedAssemblyIdentity;
+ PCWSTR lpAssemblyManifestPath;
+ PCWSTR lpAssemblyPolicyPath;
+ PCWSTR lpAssemblyDirectoryName;
+ DWORD ulFileCount;
+ } ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION,*PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
+
+ typedef const struct _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
+
+ typedef struct _ACTIVATION_CONTEXT_DETAILED_INFORMATION {
+ DWORD dwFlags;
+ DWORD ulFormatVersion;
+ DWORD ulAssemblyCount;
+ DWORD ulRootManifestPathType;
+ DWORD ulRootManifestPathChars;
+ DWORD ulRootConfigurationPathType;
+ DWORD ulRootConfigurationPathChars;
+ DWORD ulAppDirPathType;
+ DWORD ulAppDirPathChars;
+ PCWSTR lpRootManifestPath;
+ PCWSTR lpRootConfigurationPath;
+ PCWSTR lpAppDirPath;
+ } ACTIVATION_CONTEXT_DETAILED_INFORMATION,*PACTIVATION_CONTEXT_DETAILED_INFORMATION;
+
+ typedef const struct _ACTIVATION_CONTEXT_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_DETAILED_INFORMATION;
+
+#define DLL_PROCESS_ATTACH 1
+#define DLL_THREAD_ATTACH 2
+#define DLL_THREAD_DETACH 3
+#define DLL_PROCESS_DETACH 0
+#define DLL_PROCESS_VERIFIER 4
+
+#define EVENTLOG_SEQUENTIAL_READ 0x0001
+#define EVENTLOG_SEEK_READ 0x0002
+#define EVENTLOG_FORWARDS_READ 0x0004
+#define EVENTLOG_BACKWARDS_READ 0x0008
+
+#define EVENTLOG_SUCCESS 0x0000
+#define EVENTLOG_ERROR_TYPE 0x0001
+#define EVENTLOG_WARNING_TYPE 0x0002
+#define EVENTLOG_INFORMATION_TYPE 0x0004
+#define EVENTLOG_AUDIT_SUCCESS 0x0008
+#define EVENTLOG_AUDIT_FAILURE 0x0010
+
+#define EVENTLOG_START_PAIRED_EVENT 0x0001
+#define EVENTLOG_END_PAIRED_EVENT 0x0002
+#define EVENTLOG_END_ALL_PAIRED_EVENTS 0x0004
+#define EVENTLOG_PAIRED_EVENT_ACTIVE 0x0008
+#define EVENTLOG_PAIRED_EVENT_INACTIVE 0x0010
+
+ typedef struct _EVENTLOGRECORD {
+ DWORD Length;
+ DWORD Reserved;
+ DWORD RecordNumber;
+ DWORD TimeGenerated;
+ DWORD TimeWritten;
+ DWORD EventID;
+ WORD EventType;
+ WORD NumStrings;
+ WORD EventCategory;
+ WORD ReservedFlags;
+ DWORD ClosingRecordNumber;
+ DWORD StringOffset;
+ DWORD UserSidLength;
+ DWORD UserSidOffset;
+ DWORD DataLength;
+ DWORD DataOffset;
+ } EVENTLOGRECORD,*PEVENTLOGRECORD;
+
+#define MAXLOGICALLOGNAMESIZE 256
+
+ typedef struct _EVENTSFORLOGFILE{
+ DWORD ulSize;
+ WCHAR szLogicalLogFile[MAXLOGICALLOGNAMESIZE];
+ DWORD ulNumRecords;
+ EVENTLOGRECORD pEventLogRecords[];
+ } EVENTSFORLOGFILE,*PEVENTSFORLOGFILE;
+
+ typedef struct _PACKEDEVENTINFO{
+ DWORD ulSize;
+ DWORD ulNumEventsForLogFile;
+ DWORD ulOffsets[];
+ } PACKEDEVENTINFO,*PPACKEDEVENTINFO;
+
+#define KEY_QUERY_VALUE (0x0001)
+#define KEY_SET_VALUE (0x0002)
+#define KEY_CREATE_SUB_KEY (0x0004)
+#define KEY_ENUMERATE_SUB_KEYS (0x0008)
+#define KEY_NOTIFY (0x0010)
+#define KEY_CREATE_LINK (0x0020)
+#define KEY_WOW64_32KEY (0x0200)
+#define KEY_WOW64_64KEY (0x0100)
+#define KEY_WOW64_RES (0x0300)
+
+#define KEY_READ ((STANDARD_RIGHTS_READ | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY) & (~SYNCHRONIZE))
+#define KEY_WRITE ((STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY) & (~SYNCHRONIZE))
+#define KEY_EXECUTE ((KEY_READ) & (~SYNCHRONIZE))
+#define KEY_ALL_ACCESS ((STANDARD_RIGHTS_ALL | KEY_QUERY_VALUE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY | KEY_ENUMERATE_SUB_KEYS | KEY_NOTIFY | KEY_CREATE_LINK) & (~SYNCHRONIZE))
+#define REG_OPTION_RESERVED (0x00000000L)
+
+#define REG_OPTION_NON_VOLATILE (0x00000000L)
+#define REG_OPTION_VOLATILE (0x00000001L)
+#define REG_OPTION_CREATE_LINK (0x00000002L)
+#define REG_OPTION_BACKUP_RESTORE (0x00000004L)
+#define REG_OPTION_OPEN_LINK (0x00000008L)
+#define REG_LEGAL_OPTION (REG_OPTION_RESERVED | REG_OPTION_NON_VOLATILE | REG_OPTION_VOLATILE | REG_OPTION_CREATE_LINK | REG_OPTION_BACKUP_RESTORE | REG_OPTION_OPEN_LINK)
+#define REG_CREATED_NEW_KEY (0x00000001L)
+#define REG_OPENED_EXISTING_KEY (0x00000002L)
+#define REG_STANDARD_FORMAT 1
+#define REG_LATEST_FORMAT 2
+#define REG_NO_COMPRESSION 4
+#define REG_WHOLE_HIVE_VOLATILE (0x00000001L)
+#define REG_REFRESH_HIVE (0x00000002L)
+#define REG_NO_LAZY_FLUSH (0x00000004L)
+#define REG_FORCE_RESTORE (0x00000008L)
+#define REG_FORCE_UNLOAD 1
+
+#define REG_NOTIFY_CHANGE_NAME (0x00000001L)
+#define REG_NOTIFY_CHANGE_ATTRIBUTES (0x00000002L)
+#define REG_NOTIFY_CHANGE_LAST_SET (0x00000004L)
+#define REG_NOTIFY_CHANGE_SECURITY (0x00000008L)
+
+#define REG_LEGAL_CHANGE_FILTER (REG_NOTIFY_CHANGE_NAME | REG_NOTIFY_CHANGE_ATTRIBUTES | REG_NOTIFY_CHANGE_LAST_SET | REG_NOTIFY_CHANGE_SECURITY)
+
+#define REG_NONE (0)
+#define REG_SZ (1)
+#define REG_EXPAND_SZ (2)
+
+#define REG_BINARY (3)
+#define REG_DWORD (4)
+#define REG_DWORD_LITTLE_ENDIAN (4)
+#define REG_DWORD_BIG_ENDIAN (5)
+#define REG_LINK (6)
+#define REG_MULTI_SZ (7)
+#define REG_RESOURCE_LIST (8)
+#define REG_FULL_RESOURCE_DESCRIPTOR (9)
+#define REG_RESOURCE_REQUIREMENTS_LIST (10)
+#define REG_QWORD (11)
+#define REG_QWORD_LITTLE_ENDIAN (11)
+
+#define SERVICE_KERNEL_DRIVER 0x00000001
+#define SERVICE_FILE_SYSTEM_DRIVER 0x00000002
+#define SERVICE_ADAPTER 0x00000004
+#define SERVICE_RECOGNIZER_DRIVER 0x00000008
+
+#define SERVICE_DRIVER (SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER)
+
+#define SERVICE_WIN32_OWN_PROCESS 0x00000010
+#define SERVICE_WIN32_SHARE_PROCESS 0x00000020
+#define SERVICE_WIN32 (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS)
+
+#define SERVICE_INTERACTIVE_PROCESS 0x00000100
+
+#define SERVICE_TYPE_ALL (SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS)
+
+#define SERVICE_BOOT_START 0x00000000
+#define SERVICE_SYSTEM_START 0x00000001
+#define SERVICE_AUTO_START 0x00000002
+#define SERVICE_DEMAND_START 0x00000003
+#define SERVICE_DISABLED 0x00000004
+
+#define SERVICE_ERROR_IGNORE 0x00000000
+#define SERVICE_ERROR_NORMAL 0x00000001
+#define SERVICE_ERROR_SEVERE 0x00000002
+#define SERVICE_ERROR_CRITICAL 0x00000003
+
+ typedef enum _CM_SERVICE_NODE_TYPE {
+ DriverType = SERVICE_KERNEL_DRIVER,FileSystemType = SERVICE_FILE_SYSTEM_DRIVER,Win32ServiceOwnProcess = SERVICE_WIN32_OWN_PROCESS,
+ Win32ServiceShareProcess = SERVICE_WIN32_SHARE_PROCESS,AdapterType = SERVICE_ADAPTER,RecognizerType = SERVICE_RECOGNIZER_DRIVER
+ } SERVICE_NODE_TYPE;
+
+ typedef enum _CM_SERVICE_LOAD_TYPE {
+ BootLoad = SERVICE_BOOT_START,SystemLoad = SERVICE_SYSTEM_START,AutoLoad = SERVICE_AUTO_START,DemandLoad = SERVICE_DEMAND_START,
+ DisableLoad = SERVICE_DISABLED
+ } SERVICE_LOAD_TYPE;
+
+ typedef enum _CM_ERROR_CONTROL_TYPE {
+ IgnoreError = SERVICE_ERROR_IGNORE,NormalError = SERVICE_ERROR_NORMAL,SevereError = SERVICE_ERROR_SEVERE,CriticalError = SERVICE_ERROR_CRITICAL
+ } SERVICE_ERROR_TYPE;
+
+#define TAPE_ERASE_SHORT 0L
+#define TAPE_ERASE_LONG 1L
+
+ typedef struct _TAPE_ERASE {
+ DWORD Type;
+ BOOLEAN Immediate;
+ } TAPE_ERASE,*PTAPE_ERASE;
+
+#define TAPE_LOAD 0L
+#define TAPE_UNLOAD 1L
+#define TAPE_TENSION 2L
+#define TAPE_LOCK 3L
+#define TAPE_UNLOCK 4L
+#define TAPE_FORMAT 5L
+
+ typedef struct _TAPE_PREPARE {
+ DWORD Operation;
+ BOOLEAN Immediate;
+ } TAPE_PREPARE,*PTAPE_PREPARE;
+
+#define TAPE_SETMARKS 0L
+#define TAPE_FILEMARKS 1L
+#define TAPE_SHORT_FILEMARKS 2L
+#define TAPE_LONG_FILEMARKS 3L
+
+ typedef struct _TAPE_WRITE_MARKS {
+ DWORD Type;
+ DWORD Count;
+ BOOLEAN Immediate;
+ } TAPE_WRITE_MARKS,*PTAPE_WRITE_MARKS;
+
+#define TAPE_ABSOLUTE_POSITION 0L
+#define TAPE_LOGICAL_POSITION 1L
+#define TAPE_PSEUDO_LOGICAL_POSITION 2L
+
+ typedef struct _TAPE_GET_POSITION {
+ DWORD Type;
+ DWORD Partition;
+ LARGE_INTEGER Offset;
+ } TAPE_GET_POSITION,*PTAPE_GET_POSITION;
+
+#define TAPE_REWIND 0L
+#define TAPE_ABSOLUTE_BLOCK 1L
+#define TAPE_LOGICAL_BLOCK 2L
+#define TAPE_PSEUDO_LOGICAL_BLOCK 3L
+#define TAPE_SPACE_END_OF_DATA 4L
+#define TAPE_SPACE_RELATIVE_BLOCKS 5L
+#define TAPE_SPACE_FILEMARKS 6L
+#define TAPE_SPACE_SEQUENTIAL_FMKS 7L
+#define TAPE_SPACE_SETMARKS 8L
+#define TAPE_SPACE_SEQUENTIAL_SMKS 9L
+
+ typedef struct _TAPE_SET_POSITION {
+ DWORD Method;
+ DWORD Partition;
+ LARGE_INTEGER Offset;
+ BOOLEAN Immediate;
+ } TAPE_SET_POSITION,*PTAPE_SET_POSITION;
+
+#define TAPE_DRIVE_FIXED 0x00000001
+#define TAPE_DRIVE_SELECT 0x00000002
+#define TAPE_DRIVE_INITIATOR 0x00000004
+
+#define TAPE_DRIVE_ERASE_SHORT 0x00000010
+#define TAPE_DRIVE_ERASE_LONG 0x00000020
+#define TAPE_DRIVE_ERASE_BOP_ONLY 0x00000040
+#define TAPE_DRIVE_ERASE_IMMEDIATE 0x00000080
+
+#define TAPE_DRIVE_TAPE_CAPACITY 0x00000100
+#define TAPE_DRIVE_TAPE_REMAINING 0x00000200
+#define TAPE_DRIVE_FIXED_BLOCK 0x00000400
+#define TAPE_DRIVE_VARIABLE_BLOCK 0x00000800
+
+#define TAPE_DRIVE_WRITE_PROTECT 0x00001000
+#define TAPE_DRIVE_EOT_WZ_SIZE 0x00002000
+
+#define TAPE_DRIVE_ECC 0x00010000
+#define TAPE_DRIVE_COMPRESSION 0x00020000
+#define TAPE_DRIVE_PADDING 0x00040000
+#define TAPE_DRIVE_REPORT_SMKS 0x00080000
+
+#define TAPE_DRIVE_GET_ABSOLUTE_BLK 0x00100000
+#define TAPE_DRIVE_GET_LOGICAL_BLK 0x00200000
+#define TAPE_DRIVE_SET_EOT_WZ_SIZE 0x00400000
+
+#define TAPE_DRIVE_EJECT_MEDIA 0x01000000
+#define TAPE_DRIVE_CLEAN_REQUESTS 0x02000000
+#define TAPE_DRIVE_SET_CMP_BOP_ONLY 0x04000000
+
+#define TAPE_DRIVE_RESERVED_BIT 0x80000000
+
+#define TAPE_DRIVE_LOAD_UNLOAD 0x80000001
+#define TAPE_DRIVE_TENSION 0x80000002
+#define TAPE_DRIVE_LOCK_UNLOCK 0x80000004
+#define TAPE_DRIVE_REWIND_IMMEDIATE 0x80000008
+
+#define TAPE_DRIVE_SET_BLOCK_SIZE 0x80000010
+#define TAPE_DRIVE_LOAD_UNLD_IMMED 0x80000020
+#define TAPE_DRIVE_TENSION_IMMED 0x80000040
+#define TAPE_DRIVE_LOCK_UNLK_IMMED 0x80000080
+
+#define TAPE_DRIVE_SET_ECC 0x80000100
+#define TAPE_DRIVE_SET_COMPRESSION 0x80000200
+#define TAPE_DRIVE_SET_PADDING 0x80000400
+#define TAPE_DRIVE_SET_REPORT_SMKS 0x80000800
+
+#define TAPE_DRIVE_ABSOLUTE_BLK 0x80001000
+#define TAPE_DRIVE_ABS_BLK_IMMED 0x80002000
+#define TAPE_DRIVE_LOGICAL_BLK 0x80004000
+#define TAPE_DRIVE_LOG_BLK_IMMED 0x80008000
+
+#define TAPE_DRIVE_END_OF_DATA 0x80010000
+#define TAPE_DRIVE_RELATIVE_BLKS 0x80020000
+#define TAPE_DRIVE_FILEMARKS 0x80040000
+#define TAPE_DRIVE_SEQUENTIAL_FMKS 0x80080000
+
+#define TAPE_DRIVE_SETMARKS 0x80100000
+#define TAPE_DRIVE_SEQUENTIAL_SMKS 0x80200000
+#define TAPE_DRIVE_REVERSE_POSITION 0x80400000
+#define TAPE_DRIVE_SPACE_IMMEDIATE 0x80800000
+
+#define TAPE_DRIVE_WRITE_SETMARKS 0x81000000
+#define TAPE_DRIVE_WRITE_FILEMARKS 0x82000000
+#define TAPE_DRIVE_WRITE_SHORT_FMKS 0x84000000
+#define TAPE_DRIVE_WRITE_LONG_FMKS 0x88000000
+
+#define TAPE_DRIVE_WRITE_MARK_IMMED 0x90000000
+#define TAPE_DRIVE_FORMAT 0xA0000000
+#define TAPE_DRIVE_FORMAT_IMMEDIATE 0xC0000000
+#define TAPE_DRIVE_HIGH_FEATURES 0x80000000
+
+ typedef struct _TAPE_GET_DRIVE_PARAMETERS {
+ BOOLEAN ECC;
+ BOOLEAN Compression;
+ BOOLEAN DataPadding;
+ BOOLEAN ReportSetmarks;
+ DWORD DefaultBlockSize;
+ DWORD MaximumBlockSize;
+ DWORD MinimumBlockSize;
+ DWORD MaximumPartitionCount;
+ DWORD FeaturesLow;
+ DWORD FeaturesHigh;
+ DWORD EOTWarningZoneSize;
+ } TAPE_GET_DRIVE_PARAMETERS,*PTAPE_GET_DRIVE_PARAMETERS;
+
+ typedef struct _TAPE_SET_DRIVE_PARAMETERS {
+ BOOLEAN ECC;
+ BOOLEAN Compression;
+ BOOLEAN DataPadding;
+ BOOLEAN ReportSetmarks;
+ DWORD EOTWarningZoneSize;
+ } TAPE_SET_DRIVE_PARAMETERS,*PTAPE_SET_DRIVE_PARAMETERS;
+
+ typedef struct _TAPE_GET_MEDIA_PARAMETERS {
+ LARGE_INTEGER Capacity;
+ LARGE_INTEGER Remaining;
+ DWORD BlockSize;
+ DWORD PartitionCount;
+ BOOLEAN WriteProtected;
+ } TAPE_GET_MEDIA_PARAMETERS,*PTAPE_GET_MEDIA_PARAMETERS;
+
+ typedef struct _TAPE_SET_MEDIA_PARAMETERS {
+ DWORD BlockSize;
+ } TAPE_SET_MEDIA_PARAMETERS,*PTAPE_SET_MEDIA_PARAMETERS;
+
+#define TAPE_FIXED_PARTITIONS 0L
+#define TAPE_SELECT_PARTITIONS 1L
+#define TAPE_INITIATOR_PARTITIONS 2L
+
+ typedef struct _TAPE_CREATE_PARTITION {
+ DWORD Method;
+ DWORD Count;
+ DWORD Size;
+ } TAPE_CREATE_PARTITION,*PTAPE_CREATE_PARTITION;
+
+#define TAPE_QUERY_DRIVE_PARAMETERS 0L
+#define TAPE_QUERY_MEDIA_CAPACITY 1L
+#define TAPE_CHECK_FOR_DRIVE_PROBLEM 2L
+#define TAPE_QUERY_IO_ERROR_DATA 3L
+#define TAPE_QUERY_DEVICE_ERROR_DATA 4L
+
+ typedef struct _TAPE_WMI_OPERATIONS {
+ DWORD Method;
+ DWORD DataBufferSize;
+ PVOID DataBuffer;
+ } TAPE_WMI_OPERATIONS,*PTAPE_WMI_OPERATIONS;
+
+ typedef enum _TAPE_DRIVE_PROBLEM_TYPE {
+ TapeDriveProblemNone,TapeDriveReadWriteWarning,TapeDriveReadWriteError,TapeDriveReadWarning,TapeDriveWriteWarning,TapeDriveReadError,TapeDriveWriteError,TapeDriveHardwareError,TapeDriveUnsupportedMedia,TapeDriveScsiConnectionError,TapeDriveTimetoClean,TapeDriveCleanDriveNow,TapeDriveMediaLifeExpired,TapeDriveSnappedTape
+ } TAPE_DRIVE_PROBLEM_TYPE;
+
+#if defined(__x86_64)
+ __CRT_INLINE struct _TEB *NtCurrentTeb(VOID) { return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB,Self)); }
+ __CRT_INLINE PVOID GetCurrentFiber(VOID) { return(PVOID)__readgsqword(FIELD_OFFSET(NT_TIB,FiberData)); }
+ __CRT_INLINE PVOID GetFiberData(VOID) {
+ return *(PVOID *)GetCurrentFiber();
+ }
+#endif
+
+#if(defined(_X86_) && !defined(__x86_64))
+#define PcTeb 0x18
+ __CRT_INLINE struct _TEB *NtCurrentTeb(void) {
+ struct _TEB *ret;
+ __asm__ volatile ("movl %%fs:0x18,%0"
+ : "=r" (ret));
+ return ret;
+ }
+#endif
+
+#define ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION (1)
+#define ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION (2)
+#define ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION (3)
+#define ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION (4)
+#define ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION (5)
+#define ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION (6)
+#define ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION (7)
+#define ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE (8)
+#define ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES (9)
+#define ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS (10)
+
+#ifdef __cplusplus
+ }
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winreg.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winreg.h
new file mode 100644
index 00000000..f158d282
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winreg.h
@@ -0,0 +1,272 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINREG_
+#define _WINREG_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0502
+#endif
+
+#define RRF_RT_REG_NONE 0x00000001
+#define RRF_RT_REG_SZ 0x00000002
+#define RRF_RT_REG_EXPAND_SZ 0x00000004
+#define RRF_RT_REG_BINARY 0x00000008
+#define RRF_RT_REG_DWORD 0x00000010
+#define RRF_RT_REG_MULTI_SZ 0x00000020
+#define RRF_RT_REG_QWORD 0x00000040
+
+#define RRF_RT_DWORD (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD)
+#define RRF_RT_QWORD (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD)
+#define RRF_RT_ANY 0x0000ffff
+
+#define RRF_NOEXPAND 0x10000000
+#define RRF_ZEROONFAILURE 0x20000000
+
+ typedef ACCESS_MASK REGSAM;
+
+#define HKEY_CLASSES_ROOT ((HKEY) (ULONG_PTR)((LONG)0x80000000))
+#define HKEY_CURRENT_USER ((HKEY) (ULONG_PTR)((LONG)0x80000001))
+#define HKEY_LOCAL_MACHINE ((HKEY) (ULONG_PTR)((LONG)0x80000002))
+#define HKEY_USERS ((HKEY) (ULONG_PTR)((LONG)0x80000003))
+#define HKEY_PERFORMANCE_DATA ((HKEY) (ULONG_PTR)((LONG)0x80000004))
+#define HKEY_PERFORMANCE_TEXT ((HKEY) (ULONG_PTR)((LONG)0x80000050))
+#define HKEY_PERFORMANCE_NLSTEXT ((HKEY) (ULONG_PTR)((LONG)0x80000060))
+#define HKEY_CURRENT_CONFIG ((HKEY) (ULONG_PTR)((LONG)0x80000005))
+#define HKEY_DYN_DATA ((HKEY) (ULONG_PTR)((LONG)0x80000006))
+
+#define REG_SECURE_CONNECTION 1
+
+#ifndef _PROVIDER_STRUCTS_DEFINED
+#define _PROVIDER_STRUCTS_DEFINED
+
+#define PROVIDER_KEEPS_VALUE_LENGTH 0x1
+ struct val_context {
+ int valuelen;
+ LPVOID value_context;
+ LPVOID val_buff_ptr;
+ };
+
+ typedef struct val_context *PVALCONTEXT;
+
+ typedef struct pvalueA {
+ LPSTR pv_valuename;
+ int pv_valuelen;
+ LPVOID pv_value_context;
+ DWORD pv_type;
+ }PVALUEA,*PPVALUEA;
+
+ typedef struct pvalueW {
+ LPWSTR pv_valuename;
+ int pv_valuelen;
+ LPVOID pv_value_context;
+ DWORD pv_type;
+ }PVALUEW,*PPVALUEW;
+
+#ifdef UNICODE
+ typedef PVALUEW PVALUE;
+ typedef PPVALUEW PPVALUE;
+#else
+ typedef PVALUEA PVALUE;
+ typedef PPVALUEA PPVALUE;
+#endif
+
+ typedef DWORD __cdecl QUERYHANDLER(LPVOID keycontext,PVALCONTEXT val_list,DWORD num_vals,LPVOID outputbuffer,DWORD *total_outlen,DWORD input_blen);
+
+ typedef QUERYHANDLER *PQUERYHANDLER;
+
+ typedef struct provider_info {
+ PQUERYHANDLER pi_R0_1val;
+ PQUERYHANDLER pi_R0_allvals;
+ PQUERYHANDLER pi_R3_1val;
+ PQUERYHANDLER pi_R3_allvals;
+ DWORD pi_flags;
+ LPVOID pi_key_context;
+ } REG_PROVIDER;
+
+ typedef struct provider_info *PPROVIDER;
+
+ typedef struct value_entA {
+ LPSTR ve_valuename;
+ DWORD ve_valuelen;
+ DWORD_PTR ve_valueptr;
+ DWORD ve_type;
+ } VALENTA,*PVALENTA;
+
+ typedef struct value_entW {
+ LPWSTR ve_valuename;
+ DWORD ve_valuelen;
+ DWORD_PTR ve_valueptr;
+ DWORD ve_type;
+ } VALENTW,*PVALENTW;
+
+#ifdef UNICODE
+ typedef VALENTW VALENT;
+ typedef PVALENTW PVALENT;
+#else
+ typedef VALENTA VALENT;
+ typedef PVALENTA PVALENT;
+#endif
+#endif
+
+#define WIN31_CLASS NULL
+
+#ifdef UNICODE
+#define RegConnectRegistry RegConnectRegistryW
+#define RegConnectRegistryEx RegConnectRegistryExW
+#define RegCreateKey RegCreateKeyW
+#define RegCreateKeyEx RegCreateKeyExW
+#define RegDeleteKey RegDeleteKeyW
+#define RegDeleteKeyEx RegDeleteKeyExW
+#define RegDeleteValue RegDeleteValueW
+#define RegEnumKey RegEnumKeyW
+#define RegEnumKeyEx RegEnumKeyExW
+#define RegEnumValue RegEnumValueW
+#define RegLoadKey RegLoadKeyW
+#define RegOpenKey RegOpenKeyW
+#define RegOpenKeyEx RegOpenKeyExW
+#define RegQueryInfoKey RegQueryInfoKeyW
+#define RegQueryValue RegQueryValueW
+#define RegQueryMultipleValues RegQueryMultipleValuesW
+#define RegQueryValueEx RegQueryValueExW
+#define RegReplaceKey RegReplaceKeyW
+#define RegRestoreKey RegRestoreKeyW
+#define RegSaveKey RegSaveKeyW
+#define RegSetValue RegSetValueW
+#define RegSetValueEx RegSetValueExW
+#define RegUnLoadKey RegUnLoadKeyW
+#define RegGetValue RegGetValueW
+#define InitiateSystemShutdown InitiateSystemShutdownW
+#define AbortSystemShutdown AbortSystemShutdownW
+#else
+#define RegConnectRegistry RegConnectRegistryA
+#define RegConnectRegistryEx RegConnectRegistryExA
+#define RegCreateKey RegCreateKeyA
+#define RegCreateKeyEx RegCreateKeyExA
+#define RegDeleteKey RegDeleteKeyA
+#define RegDeleteKeyEx RegDeleteKeyExA
+#define RegDeleteValue RegDeleteValueA
+#define RegEnumKey RegEnumKeyA
+#define RegEnumKeyEx RegEnumKeyExA
+#define RegEnumValue RegEnumValueA
+#define RegLoadKey RegLoadKeyA
+#define RegOpenKey RegOpenKeyA
+#define RegOpenKeyEx RegOpenKeyExA
+#define RegQueryInfoKey RegQueryInfoKeyA
+#define RegQueryValue RegQueryValueA
+#define RegQueryMultipleValues RegQueryMultipleValuesA
+#define RegQueryValueEx RegQueryValueExA
+#define RegReplaceKey RegReplaceKeyA
+#define RegRestoreKey RegRestoreKeyA
+#define RegSaveKey RegSaveKeyA
+#define RegSetValue RegSetValueA
+#define RegSetValueEx RegSetValueExA
+#define RegUnLoadKey RegUnLoadKeyA
+#define RegGetValue RegGetValueA
+#define InitiateSystemShutdown InitiateSystemShutdownA
+#define AbortSystemShutdown AbortSystemShutdownA
+#endif
+
+ WINADVAPI LONG WINAPI RegCloseKey(HKEY hKey);
+ WINADVAPI LONG WINAPI RegOverridePredefKey(HKEY hKey,HKEY hNewHKey);
+ WINADVAPI LONG WINAPI RegOpenUserClassesRoot(HANDLE hToken,DWORD dwOptions,REGSAM samDesired,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegOpenCurrentUser(REGSAM samDesired,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegDisablePredefinedCache();
+ WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR lpMachineName,HKEY hKey,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR lpMachineName,HKEY hKey,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegConnectRegistryExA(LPCSTR lpMachineName,HKEY hKey,ULONG Flags,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegConnectRegistryExW(LPCWSTR lpMachineName,HKEY hKey,ULONG Flags,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegCreateKeyA(HKEY hKey,LPCSTR lpSubKey,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegCreateKeyW(HKEY hKey,LPCWSTR lpSubKey,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY hKey,LPCSTR lpSubKey,DWORD Reserved,LPSTR lpClass,DWORD dwOptions,REGSAM samDesired,LPSECURITY_ATTRIBUTES lpSecurityAttributes,PHKEY phkResult,LPDWORD lpdwDisposition);
+ WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY hKey,LPCWSTR lpSubKey,DWORD Reserved,LPWSTR lpClass,DWORD dwOptions,REGSAM samDesired,LPSECURITY_ATTRIBUTES lpSecurityAttributes,PHKEY phkResult,LPDWORD lpdwDisposition);
+ WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY hKey,LPCSTR lpSubKey);
+ WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY hKey,LPCWSTR lpSubKey);
+ WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY hKey,LPCSTR lpSubKey,REGSAM samDesired,DWORD Reserved);
+ WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY hKey,LPCWSTR lpSubKey,REGSAM samDesired,DWORD Reserved);
+ WINADVAPI LONG WINAPI RegDisableReflectionKey(HKEY hBase);
+ WINADVAPI LONG WINAPI RegEnableReflectionKey(HKEY hBase);
+ WINADVAPI LONG WINAPI RegQueryReflectionKey(HKEY hBase,WINBOOL *bIsReflectionDisabled);
+ WINADVAPI LONG WINAPI RegDeleteValueA(HKEY hKey,LPCSTR lpValueName);
+ WINADVAPI LONG WINAPI RegDeleteValueW(HKEY hKey,LPCWSTR lpValueName);
+ WINADVAPI LONG WINAPI RegEnumKeyA(HKEY hKey,DWORD dwIndex,LPSTR lpName,DWORD cchName);
+ WINADVAPI LONG WINAPI RegEnumKeyW(HKEY hKey,DWORD dwIndex,LPWSTR lpName,DWORD cchName);
+ WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY hKey,DWORD dwIndex,LPSTR lpName,LPDWORD lpcchName,LPDWORD lpReserved,LPSTR lpClass,LPDWORD lpcchClass,PFILETIME lpftLastWriteTime);
+ WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY hKey,DWORD dwIndex,LPWSTR lpName,LPDWORD lpcchName,LPDWORD lpReserved,LPWSTR lpClass,LPDWORD lpcchClass,PFILETIME lpftLastWriteTime);
+ WINADVAPI LONG WINAPI RegEnumValueA(HKEY hKey,DWORD dwIndex,LPSTR lpValueName,LPDWORD lpcchValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
+ WINADVAPI LONG WINAPI RegEnumValueW(HKEY hKey,DWORD dwIndex,LPWSTR lpValueName,LPDWORD lpcchValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
+ WINADVAPI LONG WINAPI RegFlushKey(HKEY hKey);
+ WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY hKey,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,LPDWORD lpcbSecurityDescriptor);
+ WINADVAPI LONG WINAPI RegLoadKeyA(HKEY hKey,LPCSTR lpSubKey,LPCSTR lpFile);
+ WINADVAPI LONG WINAPI RegLoadKeyW(HKEY hKey,LPCWSTR lpSubKey,LPCWSTR lpFile);
+ WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY hKey,WINBOOL bWatchSubtree,DWORD dwNotifyFilter,HANDLE hEvent,WINBOOL fAsynchronous);
+ WINADVAPI LONG WINAPI RegOpenKeyA(HKEY hKey,LPCSTR lpSubKey,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegOpenKeyW(HKEY hKey,LPCWSTR lpSubKey,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY hKey,LPCSTR lpSubKey,DWORD ulOptions,REGSAM samDesired,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY hKey,LPCWSTR lpSubKey,DWORD ulOptions,REGSAM samDesired,PHKEY phkResult);
+ WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY hKey,LPSTR lpClass,LPDWORD lpcchClass,LPDWORD lpReserved,LPDWORD lpcSubKeys,LPDWORD lpcbMaxSubKeyLen,LPDWORD lpcbMaxClassLen,LPDWORD lpcValues,LPDWORD lpcbMaxValueNameLen,LPDWORD lpcbMaxValueLen,LPDWORD lpcbSecurityDescriptor,PFILETIME lpftLastWriteTime);
+ WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY hKey,LPWSTR lpClass,LPDWORD lpcchClass,LPDWORD lpReserved,LPDWORD lpcSubKeys,LPDWORD lpcbMaxSubKeyLen,LPDWORD lpcbMaxClassLen,LPDWORD lpcValues,LPDWORD lpcbMaxValueNameLen,LPDWORD lpcbMaxValueLen,LPDWORD lpcbSecurityDescriptor,PFILETIME lpftLastWriteTime);
+ WINADVAPI LONG WINAPI RegQueryValueA(HKEY hKey,LPCSTR lpSubKey,LPSTR lpData,PLONG lpcbData);
+ WINADVAPI LONG WINAPI RegQueryValueW(HKEY hKey,LPCWSTR lpSubKey,LPWSTR lpData,PLONG lpcbData);
+ WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY hKey,PVALENTA val_list,DWORD num_vals,LPSTR lpValueBuf,LPDWORD ldwTotsize);
+ WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY hKey,PVALENTW val_list,DWORD num_vals,LPWSTR lpValueBuf,LPDWORD ldwTotsize);
+ WINADVAPI LONG WINAPI RegQueryValueExA(HKEY hKey,LPCSTR lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
+ WINADVAPI LONG WINAPI RegQueryValueExW(HKEY hKey,LPCWSTR lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
+ WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY hKey,LPCSTR lpSubKey,LPCSTR lpNewFile,LPCSTR lpOldFile);
+ WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY hKey,LPCWSTR lpSubKey,LPCWSTR lpNewFile,LPCWSTR lpOldFile);
+ WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY hKey,LPCSTR lpFile,DWORD dwFlags);
+ WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY hKey,LPCWSTR lpFile,DWORD dwFlags);
+ WINADVAPI LONG WINAPI RegSaveKeyA(HKEY hKey,LPCSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINADVAPI LONG WINAPI RegSaveKeyW(HKEY hKey,LPCWSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+ WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY hKey,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor);
+ WINADVAPI LONG WINAPI RegSetValueA(HKEY hKey,LPCSTR lpSubKey,DWORD dwType,LPCSTR lpData,DWORD cbData);
+ WINADVAPI LONG WINAPI RegSetValueW(HKEY hKey,LPCWSTR lpSubKey,DWORD dwType,LPCWSTR lpData,DWORD cbData);
+ WINADVAPI LONG WINAPI RegSetValueExA(HKEY hKey,LPCSTR lpValueName,DWORD Reserved,DWORD dwType,CONST BYTE *lpData,DWORD cbData);
+ WINADVAPI LONG WINAPI RegSetValueExW(HKEY hKey,LPCWSTR lpValueName,DWORD Reserved,DWORD dwType,CONST BYTE *lpData,DWORD cbData);
+ WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY hKey,LPCSTR lpSubKey);
+ WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY hKey,LPCWSTR lpSubKey);
+ WINADVAPI LONG WINAPI RegGetValueA(HKEY hkey,LPCSTR lpSubKey,LPCSTR lpValue,DWORD dwFlags,LPDWORD pdwType,PVOID pvData,LPDWORD pcbData);
+ WINADVAPI LONG WINAPI RegGetValueW(HKEY hkey,LPCWSTR lpSubKey,LPCWSTR lpValue,DWORD dwFlags,LPDWORD pdwType,PVOID pvData,LPDWORD pcbData);
+ WINADVAPI WINBOOL WINAPI InitiateSystemShutdownA(LPSTR lpMachineName,LPSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown);
+ WINADVAPI WINBOOL WINAPI InitiateSystemShutdownW(LPWSTR lpMachineName,LPWSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown);
+ WINADVAPI WINBOOL WINAPI AbortSystemShutdownA(LPSTR lpMachineName);
+ WINADVAPI WINBOOL WINAPI AbortSystemShutdownW(LPWSTR lpMachineName);
+
+//gr #include
+
+#define REASON_SWINSTALL SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_INSTALLATION
+#define REASON_HWINSTALL SHTDN_REASON_MAJOR_HARDWARE|SHTDN_REASON_MINOR_INSTALLATION
+#define REASON_SERVICEHANG SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_HUNG
+#define REASON_UNSTABLE SHTDN_REASON_MAJOR_SYSTEM|SHTDN_REASON_MINOR_UNSTABLE
+#define REASON_SWHWRECONF SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_RECONFIG
+#define REASON_OTHER SHTDN_REASON_MAJOR_OTHER|SHTDN_REASON_MINOR_OTHER
+#define REASON_UNKNOWN SHTDN_REASON_UNKNOWN
+#define REASON_LEGACY_API SHTDN_REASON_LEGACY_API
+#define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED
+
+#define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60)
+
+#ifdef UNICODE
+#define InitiateSystemShutdownEx InitiateSystemShutdownExW
+#define RegSaveKeyEx RegSaveKeyExW
+#else
+#define InitiateSystemShutdownEx InitiateSystemShutdownExA
+#define RegSaveKeyEx RegSaveKeyExA
+#endif
+
+ WINADVAPI WINBOOL WINAPI InitiateSystemShutdownExA(LPSTR lpMachineName,LPSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown,DWORD dwReason);
+ WINADVAPI WINBOOL WINAPI InitiateSystemShutdownExW(LPWSTR lpMachineName,LPWSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown,DWORD dwReason);
+ WINADVAPI LONG WINAPI RegSaveKeyExA(HKEY hKey,LPCSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD Flags);
+ WINADVAPI LONG WINAPI RegSaveKeyExW(HKEY hKey,LPCWSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD Flags);
+ WINADVAPI LONG WINAPI Wow64Win32ApiEntry (DWORD dwFuncNumber,DWORD dwFlag,DWORD dwRes);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winuser.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winuser.h
new file mode 100644
index 00000000..4cd9ffb5
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winuser.h
@@ -0,0 +1,5651 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef _WINUSER_
+#define _WINUSER_
+
+#define WINUSERAPI DECLSPEC_IMPORT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0502
+#endif
+
+#include
+
+#ifndef NOUSER
+ typedef HANDLE HDWP;
+ typedef VOID MENUTEMPLATEA;
+ typedef VOID MENUTEMPLATEW;
+ typedef PVOID LPMENUTEMPLATEA;
+ typedef PVOID LPMENUTEMPLATEW;
+
+#ifdef UNICODE
+ typedef MENUTEMPLATEW MENUTEMPLATE;
+ typedef LPMENUTEMPLATEW LPMENUTEMPLATE;
+#else
+ typedef MENUTEMPLATEA MENUTEMPLATE;
+ typedef LPMENUTEMPLATEA LPMENUTEMPLATE;
+#endif
+
+ typedef LRESULT (CALLBACK *WNDPROC)(HWND,UINT,WPARAM,LPARAM);
+ typedef INT_PTR (CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
+ typedef VOID (CALLBACK *TIMERPROC)(HWND,UINT,UINT_PTR,DWORD);
+ typedef WINBOOL (CALLBACK *GRAYSTRINGPROC)(HDC,LPARAM,int);
+ typedef WINBOOL (CALLBACK *WNDENUMPROC)(HWND,LPARAM);
+ typedef LRESULT (CALLBACK *HOOKPROC)(int code,WPARAM wParam,LPARAM lParam);
+ typedef VOID (CALLBACK *SENDASYNCPROC)(HWND,UINT,ULONG_PTR,LRESULT);
+ typedef WINBOOL (CALLBACK *PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
+ typedef WINBOOL (CALLBACK *PROPENUMPROCW)(HWND,LPCWSTR,HANDLE);
+ typedef WINBOOL (CALLBACK *PROPENUMPROCEXA)(HWND,LPSTR,HANDLE,ULONG_PTR);
+ typedef WINBOOL (CALLBACK *PROPENUMPROCEXW)(HWND,LPWSTR,HANDLE,ULONG_PTR);
+ typedef int (CALLBACK *EDITWORDBREAKPROCA)(LPSTR lpch,int ichCurrent,int cch,int code);
+ typedef int (CALLBACK *EDITWORDBREAKPROCW)(LPWSTR lpch,int ichCurrent,int cch,int code);
+ typedef WINBOOL (CALLBACK *DRAWSTATEPROC)(HDC hdc,LPARAM lData,WPARAM wData,int cx,int cy);
+
+#ifdef UNICODE
+ typedef PROPENUMPROCW PROPENUMPROC;
+ typedef PROPENUMPROCEXW PROPENUMPROCEX;
+ typedef EDITWORDBREAKPROCW EDITWORDBREAKPROC;
+#else
+ typedef PROPENUMPROCA PROPENUMPROC;
+ typedef PROPENUMPROCEXA PROPENUMPROCEX;
+ typedef EDITWORDBREAKPROCA EDITWORDBREAKPROC;
+#endif
+
+ typedef WINBOOL (CALLBACK *NAMEENUMPROCA)(LPSTR,LPARAM);
+ typedef WINBOOL (CALLBACK *NAMEENUMPROCW)(LPWSTR,LPARAM);
+ typedef NAMEENUMPROCA WINSTAENUMPROCA;
+ typedef NAMEENUMPROCA DESKTOPENUMPROCA;
+ typedef NAMEENUMPROCW WINSTAENUMPROCW;
+ typedef NAMEENUMPROCW DESKTOPENUMPROCW;
+
+#ifdef UNICODE
+ typedef WINSTAENUMPROCW WINSTAENUMPROC;
+ typedef DESKTOPENUMPROCW DESKTOPENUMPROC;
+#else
+ typedef WINSTAENUMPROCA WINSTAENUMPROC;
+ typedef DESKTOPENUMPROCA DESKTOPENUMPROC;
+#endif
+
+#define IS_INTRESOURCE(_r) ((((ULONG_PTR)(_r)) >> 16)==0)
+#define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
+#define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))
+#ifdef UNICODE
+#define MAKEINTRESOURCE MAKEINTRESOURCEW
+#else
+#define MAKEINTRESOURCE MAKEINTRESOURCEA
+#endif
+
+#ifndef NORESOURCE
+
+#define RT_CURSOR MAKEINTRESOURCE(1)
+#define RT_BITMAP MAKEINTRESOURCE(2)
+#define RT_ICON MAKEINTRESOURCE(3)
+#define RT_MENU MAKEINTRESOURCE(4)
+#define RT_DIALOG MAKEINTRESOURCE(5)
+#define RT_STRING MAKEINTRESOURCE(6)
+#define RT_FONTDIR MAKEINTRESOURCE(7)
+#define RT_FONT MAKEINTRESOURCE(8)
+#define RT_ACCELERATOR MAKEINTRESOURCE(9)
+#define RT_RCDATA MAKEINTRESOURCE(10)
+#define RT_MESSAGETABLE MAKEINTRESOURCE(11)
+
+#define DIFFERENCE 11
+#define RT_GROUP_CURSOR MAKEINTRESOURCE((ULONG_PTR)RT_CURSOR + DIFFERENCE)
+#define RT_GROUP_ICON MAKEINTRESOURCE((ULONG_PTR)RT_ICON + DIFFERENCE)
+#define RT_VERSION MAKEINTRESOURCE(16)
+#define RT_DLGINCLUDE MAKEINTRESOURCE(17)
+#define RT_PLUGPLAY MAKEINTRESOURCE(19)
+#define RT_VXD MAKEINTRESOURCE(20)
+#define RT_ANICURSOR MAKEINTRESOURCE(21)
+#define RT_ANIICON MAKEINTRESOURCE(22)
+#define RT_HTML MAKEINTRESOURCE(23)
+#ifdef RC_INVOKED
+#define RT_MANIFEST 24
+#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
+#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
+#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
+#define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1
+#define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16
+#else
+#define RT_MANIFEST MAKEINTRESOURCE(24)
+#define CREATEPROCESS_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(1)
+#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(2)
+#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(3)
+#define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(1)
+#define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(16)
+#endif
+#endif
+
+#ifdef UNICODE
+#define wvsprintf wvsprintfW
+#define wsprintf wsprintfW
+#else
+#define wvsprintf wvsprintfA
+#define wsprintf wsprintfA
+#endif
+
+ WINUSERAPI int WINAPI wvsprintfA(LPSTR,LPCSTR,va_list arglist);
+ WINUSERAPI int WINAPI wvsprintfW(LPWSTR,LPCWSTR,va_list arglist);
+ WINUSERAPI int WINAPIV wsprintfA(LPSTR,LPCSTR,...);
+ WINUSERAPI int WINAPIV wsprintfW(LPWSTR,LPCWSTR,...);
+
+#define SETWALLPAPER_DEFAULT ((LPWSTR)-1)
+
+#ifndef NOSCROLL
+#define SB_HORZ 0
+#define SB_VERT 1
+#define SB_CTL 2
+#define SB_BOTH 3
+
+#define SB_LINEUP 0
+#define SB_LINELEFT 0
+#define SB_LINEDOWN 1
+#define SB_LINERIGHT 1
+#define SB_PAGEUP 2
+#define SB_PAGELEFT 2
+#define SB_PAGEDOWN 3
+#define SB_PAGERIGHT 3
+#define SB_THUMBPOSITION 4
+#define SB_THUMBTRACK 5
+#define SB_TOP 6
+#define SB_LEFT 6
+#define SB_BOTTOM 7
+#define SB_RIGHT 7
+#define SB_ENDSCROLL 8
+#endif
+
+#ifndef NOSHOWWINDOW
+#define SW_HIDE 0
+#define SW_SHOWNORMAL 1
+#define SW_NORMAL 1
+#define SW_SHOWMINIMIZED 2
+#define SW_SHOWMAXIMIZED 3
+#define SW_MAXIMIZE 3
+#define SW_SHOWNOACTIVATE 4
+#define SW_SHOW 5
+#define SW_MINIMIZE 6
+#define SW_SHOWMINNOACTIVE 7
+#define SW_SHOWNA 8
+#define SW_RESTORE 9
+#define SW_SHOWDEFAULT 10
+#define SW_FORCEMINIMIZE 11
+#define SW_MAX 11
+
+#define HIDE_WINDOW 0
+#define SHOW_OPENWINDOW 1
+#define SHOW_ICONWINDOW 2
+#define SHOW_FULLSCREEN 3
+#define SHOW_OPENNOACTIVATE 4
+
+#define SW_PARENTCLOSING 1
+#define SW_OTHERZOOM 2
+#define SW_PARENTOPENING 3
+#define SW_OTHERUNZOOM 4
+#endif
+
+#define AW_HOR_POSITIVE 0x00000001
+#define AW_HOR_NEGATIVE 0x00000002
+#define AW_VER_POSITIVE 0x00000004
+#define AW_VER_NEGATIVE 0x00000008
+#define AW_CENTER 0x00000010
+#define AW_HIDE 0x00010000
+#define AW_ACTIVATE 0x00020000
+#define AW_SLIDE 0x00040000
+#define AW_BLEND 0x00080000
+
+#define KF_EXTENDED 0x0100
+#define KF_DLGMODE 0x0800
+#define KF_MENUMODE 0x1000
+#define KF_ALTDOWN 0x2000
+#define KF_REPEAT 0x4000
+#define KF_UP 0x8000
+
+#ifndef NOVIRTUALKEYCODES
+
+#define VK_LBUTTON 0x01
+#define VK_RBUTTON 0x02
+#define VK_CANCEL 0x03
+#define VK_MBUTTON 0x04
+#define VK_XBUTTON1 0x05
+#define VK_XBUTTON2 0x06
+#define VK_BACK 0x08
+#define VK_TAB 0x09
+#define VK_CLEAR 0x0C
+#define VK_RETURN 0x0D
+#define VK_SHIFT 0x10
+#define VK_CONTROL 0x11
+#define VK_MENU 0x12
+#define VK_PAUSE 0x13
+#define VK_CAPITAL 0x14
+#define VK_KANA 0x15
+#define VK_HANGEUL 0x15
+#define VK_HANGUL 0x15
+#define VK_JUNJA 0x17
+#define VK_FINAL 0x18
+#define VK_HANJA 0x19
+#define VK_KANJI 0x19
+#define VK_ESCAPE 0x1B
+#define VK_CONVERT 0x1C
+#define VK_NONCONVERT 0x1D
+#define VK_ACCEPT 0x1E
+#define VK_MODECHANGE 0x1F
+#define VK_SPACE 0x20
+#define VK_PRIOR 0x21
+#define VK_NEXT 0x22
+#define VK_END 0x23
+#define VK_HOME 0x24
+#define VK_LEFT 0x25
+#define VK_UP 0x26
+#define VK_RIGHT 0x27
+#define VK_DOWN 0x28
+#define VK_SELECT 0x29
+#define VK_PRINT 0x2A
+#define VK_EXECUTE 0x2B
+#define VK_SNAPSHOT 0x2C
+#define VK_INSERT 0x2D
+#define VK_DELETE 0x2E
+#define VK_HELP 0x2F
+
+#define VK_LWIN 0x5B
+#define VK_RWIN 0x5C
+#define VK_APPS 0x5D
+#define VK_SLEEP 0x5F
+#define VK_NUMPAD0 0x60
+#define VK_NUMPAD1 0x61
+#define VK_NUMPAD2 0x62
+#define VK_NUMPAD3 0x63
+#define VK_NUMPAD4 0x64
+#define VK_NUMPAD5 0x65
+#define VK_NUMPAD6 0x66
+#define VK_NUMPAD7 0x67
+#define VK_NUMPAD8 0x68
+#define VK_NUMPAD9 0x69
+#define VK_MULTIPLY 0x6A
+#define VK_ADD 0x6B
+#define VK_SEPARATOR 0x6C
+#define VK_SUBTRACT 0x6D
+#define VK_DECIMAL 0x6E
+#define VK_DIVIDE 0x6F
+#define VK_F1 0x70
+#define VK_F2 0x71
+#define VK_F3 0x72
+#define VK_F4 0x73
+#define VK_F5 0x74
+#define VK_F6 0x75
+#define VK_F7 0x76
+#define VK_F8 0x77
+#define VK_F9 0x78
+#define VK_F10 0x79
+#define VK_F11 0x7A
+#define VK_F12 0x7B
+#define VK_F13 0x7C
+#define VK_F14 0x7D
+#define VK_F15 0x7E
+#define VK_F16 0x7F
+#define VK_F17 0x80
+#define VK_F18 0x81
+#define VK_F19 0x82
+#define VK_F20 0x83
+#define VK_F21 0x84
+#define VK_F22 0x85
+#define VK_F23 0x86
+#define VK_F24 0x87
+#define VK_NUMLOCK 0x90
+#define VK_SCROLL 0x91
+#define VK_OEM_NEC_EQUAL 0x92
+#define VK_OEM_FJ_JISHO 0x92
+#define VK_OEM_FJ_MASSHOU 0x93
+#define VK_OEM_FJ_TOUROKU 0x94
+#define VK_OEM_FJ_LOYA 0x95
+#define VK_OEM_FJ_ROYA 0x96
+#define VK_LSHIFT 0xA0
+#define VK_RSHIFT 0xA1
+#define VK_LCONTROL 0xA2
+#define VK_RCONTROL 0xA3
+#define VK_LMENU 0xA4
+#define VK_RMENU 0xA5
+#define VK_BROWSER_BACK 0xA6
+#define VK_BROWSER_FORWARD 0xA7
+#define VK_BROWSER_REFRESH 0xA8
+#define VK_BROWSER_STOP 0xA9
+#define VK_BROWSER_SEARCH 0xAA
+#define VK_BROWSER_FAVORITES 0xAB
+#define VK_BROWSER_HOME 0xAC
+#define VK_VOLUME_MUTE 0xAD
+#define VK_VOLUME_DOWN 0xAE
+#define VK_VOLUME_UP 0xAF
+#define VK_MEDIA_NEXT_TRACK 0xB0
+#define VK_MEDIA_PREV_TRACK 0xB1
+#define VK_MEDIA_STOP 0xB2
+#define VK_MEDIA_PLAY_PAUSE 0xB3
+#define VK_LAUNCH_MAIL 0xB4
+#define VK_LAUNCH_MEDIA_SELECT 0xB5
+#define VK_LAUNCH_APP1 0xB6
+#define VK_LAUNCH_APP2 0xB7
+#define VK_OEM_1 0xBA
+#define VK_OEM_PLUS 0xBB
+#define VK_OEM_COMMA 0xBC
+#define VK_OEM_MINUS 0xBD
+#define VK_OEM_PERIOD 0xBE
+#define VK_OEM_2 0xBF
+#define VK_OEM_3 0xC0
+#define VK_OEM_4 0xDB
+#define VK_OEM_5 0xDC
+#define VK_OEM_6 0xDD
+#define VK_OEM_7 0xDE
+#define VK_OEM_8 0xDF
+#define VK_OEM_AX 0xE1
+#define VK_OEM_102 0xE2
+#define VK_ICO_HELP 0xE3
+#define VK_ICO_00 0xE4
+#define VK_PROCESSKEY 0xE5
+#define VK_ICO_CLEAR 0xE6
+#define VK_PACKET 0xE7
+#define VK_OEM_RESET 0xE9
+#define VK_OEM_JUMP 0xEA
+#define VK_OEM_PA1 0xEB
+#define VK_OEM_PA2 0xEC
+#define VK_OEM_PA3 0xED
+#define VK_OEM_WSCTRL 0xEE
+#define VK_OEM_CUSEL 0xEF
+#define VK_OEM_ATTN 0xF0
+#define VK_OEM_FINISH 0xF1
+#define VK_OEM_COPY 0xF2
+#define VK_OEM_AUTO 0xF3
+#define VK_OEM_ENLW 0xF4
+#define VK_OEM_BACKTAB 0xF5
+#define VK_ATTN 0xF6
+#define VK_CRSEL 0xF7
+#define VK_EXSEL 0xF8
+#define VK_EREOF 0xF9
+#define VK_PLAY 0xFA
+#define VK_ZOOM 0xFB
+#define VK_NONAME 0xFC
+#define VK_PA1 0xFD
+#define VK_OEM_CLEAR 0xFE
+#endif
+
+#ifndef NOWH
+
+#define WH_MIN (-1)
+#define WH_MSGFILTER (-1)
+#define WH_JOURNALRECORD 0
+#define WH_JOURNALPLAYBACK 1
+#define WH_KEYBOARD 2
+#define WH_GETMESSAGE 3
+#define WH_CALLWNDPROC 4
+#define WH_CBT 5
+#define WH_SYSMSGFILTER 6
+#define WH_MOUSE 7
+#define WH_HARDWARE 8
+#define WH_DEBUG 9
+#define WH_SHELL 10
+#define WH_FOREGROUNDIDLE 11
+#define WH_CALLWNDPROCRET 12
+
+#define WH_KEYBOARD_LL 13
+#define WH_MOUSE_LL 14
+
+#define WH_MAX 14
+
+#define WH_MINHOOK WH_MIN
+#define WH_MAXHOOK WH_MAX
+
+#define HC_ACTION 0
+#define HC_GETNEXT 1
+#define HC_SKIP 2
+#define HC_NOREMOVE 3
+#define HC_NOREM HC_NOREMOVE
+#define HC_SYSMODALON 4
+#define HC_SYSMODALOFF 5
+
+#define HCBT_MOVESIZE 0
+#define HCBT_MINMAX 1
+#define HCBT_QS 2
+#define HCBT_CREATEWND 3
+#define HCBT_DESTROYWND 4
+#define HCBT_ACTIVATE 5
+#define HCBT_CLICKSKIPPED 6
+#define HCBT_KEYSKIPPED 7
+#define HCBT_SYSCOMMAND 8
+#define HCBT_SETFOCUS 9
+
+ typedef struct tagCBT_CREATEWNDA {
+ struct tagCREATESTRUCTA *lpcs;
+ HWND hwndInsertAfter;
+ } CBT_CREATEWNDA,*LPCBT_CREATEWNDA;
+
+ typedef struct tagCBT_CREATEWNDW {
+ struct tagCREATESTRUCTW *lpcs;
+ HWND hwndInsertAfter;
+ } CBT_CREATEWNDW,*LPCBT_CREATEWNDW;
+#ifdef UNICODE
+ typedef CBT_CREATEWNDW CBT_CREATEWND;
+ typedef LPCBT_CREATEWNDW LPCBT_CREATEWND;
+#else
+ typedef CBT_CREATEWNDA CBT_CREATEWND;
+ typedef LPCBT_CREATEWNDA LPCBT_CREATEWND;
+#endif
+
+ typedef struct tagCBTACTIVATESTRUCT
+ {
+ WINBOOL fMouse;
+ HWND hWndActive;
+ } CBTACTIVATESTRUCT,*LPCBTACTIVATESTRUCT;
+
+ typedef struct tagWTSSESSION_NOTIFICATION {
+ DWORD cbSize;
+ DWORD dwSessionId;
+
+ } WTSSESSION_NOTIFICATION,*PWTSSESSION_NOTIFICATION;
+
+#define WTS_CONSOLE_CONNECT 0x1
+#define WTS_CONSOLE_DISCONNECT 0x2
+#define WTS_REMOTE_CONNECT 0x3
+#define WTS_REMOTE_DISCONNECT 0x4
+#define WTS_SESSION_LOGON 0x5
+#define WTS_SESSION_LOGOFF 0x6
+#define WTS_SESSION_LOCK 0x7
+#define WTS_SESSION_UNLOCK 0x8
+#define WTS_SESSION_REMOTE_CONTROL 0x9
+
+#define MSGF_DIALOGBOX 0
+#define MSGF_MESSAGEBOX 1
+#define MSGF_MENU 2
+#define MSGF_SCROLLBAR 5
+#define MSGF_NEXTWINDOW 6
+#define MSGF_MAX 8
+#define MSGF_USER 4096
+
+#define HSHELL_WINDOWCREATED 1
+#define HSHELL_WINDOWDESTROYED 2
+#define HSHELL_ACTIVATESHELLWINDOW 3
+
+#define HSHELL_WINDOWACTIVATED 4
+#define HSHELL_GETMINRECT 5
+#define HSHELL_REDRAW 6
+#define HSHELL_TASKMAN 7
+#define HSHELL_LANGUAGE 8
+#define HSHELL_SYSMENU 9
+#define HSHELL_ENDTASK 10
+#define HSHELL_ACCESSIBILITYSTATE 11
+#define HSHELL_APPCOMMAND 12
+#define HSHELL_WINDOWREPLACED 13
+#define HSHELL_WINDOWREPLACING 14
+#define HSHELL_HIGHBIT 0x8000
+#define HSHELL_FLASH (HSHELL_REDRAW|HSHELL_HIGHBIT)
+#define HSHELL_RUDEAPPACTIVATED (HSHELL_WINDOWACTIVATED|HSHELL_HIGHBIT)
+
+#define ACCESS_STICKYKEYS 0x0001
+#define ACCESS_FILTERKEYS 0x0002
+#define ACCESS_MOUSEKEYS 0x0003
+
+#define APPCOMMAND_BROWSER_BACKWARD 1
+#define APPCOMMAND_BROWSER_FORWARD 2
+#define APPCOMMAND_BROWSER_REFRESH 3
+#define APPCOMMAND_BROWSER_STOP 4
+#define APPCOMMAND_BROWSER_SEARCH 5
+#define APPCOMMAND_BROWSER_FAVORITES 6
+#define APPCOMMAND_BROWSER_HOME 7
+#define APPCOMMAND_VOLUME_MUTE 8
+#define APPCOMMAND_VOLUME_DOWN 9
+#define APPCOMMAND_VOLUME_UP 10
+#define APPCOMMAND_MEDIA_NEXTTRACK 11
+#define APPCOMMAND_MEDIA_PREVIOUSTRACK 12
+#define APPCOMMAND_MEDIA_STOP 13
+#define APPCOMMAND_MEDIA_PLAY_PAUSE 14
+#define APPCOMMAND_LAUNCH_MAIL 15
+#define APPCOMMAND_LAUNCH_MEDIA_SELECT 16
+#define APPCOMMAND_LAUNCH_APP1 17
+#define APPCOMMAND_LAUNCH_APP2 18
+#define APPCOMMAND_BASS_DOWN 19
+#define APPCOMMAND_BASS_BOOST 20
+#define APPCOMMAND_BASS_UP 21
+#define APPCOMMAND_TREBLE_DOWN 22
+#define APPCOMMAND_TREBLE_UP 23
+#define APPCOMMAND_MICROPHONE_VOLUME_MUTE 24
+#define APPCOMMAND_MICROPHONE_VOLUME_DOWN 25
+#define APPCOMMAND_MICROPHONE_VOLUME_UP 26
+#define APPCOMMAND_HELP 27
+#define APPCOMMAND_FIND 28
+#define APPCOMMAND_NEW 29
+#define APPCOMMAND_OPEN 30
+#define APPCOMMAND_CLOSE 31
+#define APPCOMMAND_SAVE 32
+#define APPCOMMAND_PRINT 33
+#define APPCOMMAND_UNDO 34
+#define APPCOMMAND_REDO 35
+#define APPCOMMAND_COPY 36
+#define APPCOMMAND_CUT 37
+#define APPCOMMAND_PASTE 38
+#define APPCOMMAND_REPLY_TO_MAIL 39
+#define APPCOMMAND_FORWARD_MAIL 40
+#define APPCOMMAND_SEND_MAIL 41
+#define APPCOMMAND_SPELL_CHECK 42
+#define APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE 43
+#define APPCOMMAND_MIC_ON_OFF_TOGGLE 44
+#define APPCOMMAND_CORRECTION_LIST 45
+#define APPCOMMAND_MEDIA_PLAY 46
+#define APPCOMMAND_MEDIA_PAUSE 47
+#define APPCOMMAND_MEDIA_RECORD 48
+#define APPCOMMAND_MEDIA_FAST_FORWARD 49
+#define APPCOMMAND_MEDIA_REWIND 50
+#define APPCOMMAND_MEDIA_CHANNEL_UP 51
+#define APPCOMMAND_MEDIA_CHANNEL_DOWN 52
+
+#define FAPPCOMMAND_MOUSE 0x8000
+#define FAPPCOMMAND_KEY 0
+#define FAPPCOMMAND_OEM 0x1000
+#define FAPPCOMMAND_MASK 0xF000
+
+#define GET_APPCOMMAND_LPARAM(lParam) ((short)(HIWORD(lParam) & ~FAPPCOMMAND_MASK))
+#define GET_DEVICE_LPARAM(lParam) ((WORD)(HIWORD(lParam) & FAPPCOMMAND_MASK))
+#define GET_MOUSEORKEY_LPARAM GET_DEVICE_LPARAM
+#define GET_FLAGS_LPARAM(lParam) (LOWORD(lParam))
+#define GET_KEYSTATE_LPARAM(lParam) GET_FLAGS_LPARAM(lParam)
+
+ typedef struct {
+ HWND hwnd;
+ RECT rc;
+ } SHELLHOOKINFO,*LPSHELLHOOKINFO;
+
+ typedef struct tagEVENTMSG {
+ UINT message;
+ UINT paramL;
+ UINT paramH;
+ DWORD time;
+ HWND hwnd;
+ } EVENTMSG,*PEVENTMSGMSG,*NPEVENTMSGMSG,*LPEVENTMSGMSG;
+
+ typedef struct tagEVENTMSG *PEVENTMSG,*NPEVENTMSG,*LPEVENTMSG;
+
+ typedef struct tagCWPSTRUCT {
+ LPARAM lParam;
+ WPARAM wParam;
+ UINT message;
+ HWND hwnd;
+ } CWPSTRUCT,*PCWPSTRUCT,*NPCWPSTRUCT,*LPCWPSTRUCT;
+
+ typedef struct tagCWPRETSTRUCT {
+ LRESULT lResult;
+ LPARAM lParam;
+ WPARAM wParam;
+ UINT message;
+ HWND hwnd;
+ } CWPRETSTRUCT,*PCWPRETSTRUCT,*NPCWPRETSTRUCT,*LPCWPRETSTRUCT;
+
+#define LLKHF_EXTENDED (KF_EXTENDED >> 8)
+#define LLKHF_INJECTED 0x00000010
+#define LLKHF_ALTDOWN (KF_ALTDOWN >> 8)
+#define LLKHF_UP (KF_UP >> 8)
+
+#define LLMHF_INJECTED 0x00000001
+
+ typedef struct tagKBDLLHOOKSTRUCT {
+ DWORD vkCode;
+ DWORD scanCode;
+ DWORD flags;
+ DWORD time;
+ ULONG_PTR dwExtraInfo;
+ } KBDLLHOOKSTRUCT,*LPKBDLLHOOKSTRUCT,*PKBDLLHOOKSTRUCT;
+
+ typedef struct tagMSLLHOOKSTRUCT {
+ POINT pt;
+ DWORD mouseData;
+ DWORD flags;
+ DWORD time;
+ ULONG_PTR dwExtraInfo;
+ } MSLLHOOKSTRUCT,*LPMSLLHOOKSTRUCT,*PMSLLHOOKSTRUCT;
+
+ typedef struct tagDEBUGHOOKINFO {
+ DWORD idThread;
+ DWORD idThreadInstaller;
+ LPARAM lParam;
+ WPARAM wParam;
+ int code;
+ } DEBUGHOOKINFO,*PDEBUGHOOKINFO,*NPDEBUGHOOKINFO,*LPDEBUGHOOKINFO;
+
+ typedef struct tagMOUSEHOOKSTRUCT {
+ POINT pt;
+ HWND hwnd;
+ UINT wHitTestCode;
+ ULONG_PTR dwExtraInfo;
+ } MOUSEHOOKSTRUCT,*LPMOUSEHOOKSTRUCT,*PMOUSEHOOKSTRUCT;
+
+#ifdef __cplusplus
+ typedef struct tagMOUSEHOOKSTRUCTEX : public tagMOUSEHOOKSTRUCT {
+ DWORD mouseData;
+ } MOUSEHOOKSTRUCTEX,*LPMOUSEHOOKSTRUCTEX,*PMOUSEHOOKSTRUCTEX;
+#else
+ typedef struct tagMOUSEHOOKSTRUCTEX {
+ MOUSEHOOKSTRUCT _unnamed;
+ DWORD mouseData;
+ } MOUSEHOOKSTRUCTEX,*LPMOUSEHOOKSTRUCTEX,*PMOUSEHOOKSTRUCTEX;
+#endif
+
+ typedef struct tagHARDWAREHOOKSTRUCT {
+ HWND hwnd;
+ UINT message;
+ WPARAM wParam;
+ LPARAM lParam;
+ } HARDWAREHOOKSTRUCT,*LPHARDWAREHOOKSTRUCT,*PHARDWAREHOOKSTRUCT;
+#endif
+
+#define HKL_PREV 0
+#define HKL_NEXT 1
+
+#define KLF_ACTIVATE 0x00000001
+#define KLF_SUBSTITUTE_OK 0x00000002
+#define KLF_REORDER 0x00000008
+#define KLF_REPLACELANG 0x00000010
+#define KLF_NOTELLSHELL 0x00000080
+#define KLF_SETFORPROCESS 0x00000100
+#define KLF_SHIFTLOCK 0x00010000
+#define KLF_RESET 0x40000000
+
+#define INPUTLANGCHANGE_SYSCHARSET 0x0001
+#define INPUTLANGCHANGE_FORWARD 0x0002
+#define INPUTLANGCHANGE_BACKWARD 0x0004
+
+#define KL_NAMELENGTH 9
+
+#ifdef UNICODE
+#define LoadKeyboardLayout LoadKeyboardLayoutW
+#define GetKeyboardLayoutName GetKeyboardLayoutNameW
+#else
+#define LoadKeyboardLayout LoadKeyboardLayoutA
+#define GetKeyboardLayoutName GetKeyboardLayoutNameA
+#endif
+
+ WINUSERAPI HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID,UINT Flags);
+ WINUSERAPI HKL WINAPI LoadKeyboardLayoutW(LPCWSTR pwszKLID,UINT Flags);
+ WINUSERAPI HKL WINAPI ActivateKeyboardLayout(HKL hkl,UINT Flags);
+ WINUSERAPI int WINAPI ToUnicodeEx(UINT wVirtKey,UINT wScanCode,CONST BYTE *lpKeyState,LPWSTR pwszBuff,int cchBuff,UINT wFlags,HKL dwhkl);
+ WINUSERAPI WINBOOL WINAPI UnloadKeyboardLayout(HKL hkl);
+ WINUSERAPI WINBOOL WINAPI GetKeyboardLayoutNameA(LPSTR pwszKLID);
+ WINUSERAPI WINBOOL WINAPI GetKeyboardLayoutNameW(LPWSTR pwszKLID);
+ WINUSERAPI int WINAPI GetKeyboardLayoutList(int nBuff,HKL *lpList);
+ WINUSERAPI HKL WINAPI GetKeyboardLayout(DWORD idThread);
+
+ typedef struct tagMOUSEMOVEPOINT {
+ int x;
+ int y;
+ DWORD time;
+ ULONG_PTR dwExtraInfo;
+ } MOUSEMOVEPOINT,*PMOUSEMOVEPOINT,*LPMOUSEMOVEPOINT;
+
+#define GMMP_USE_DISPLAY_POINTS 1
+#define GMMP_USE_HIGH_RESOLUTION_POINTS 2
+
+ WINUSERAPI int WINAPI GetMouseMovePointsEx(UINT cbSize,LPMOUSEMOVEPOINT lppt,LPMOUSEMOVEPOINT lpptBuf,int nBufPoints,DWORD resolution);
+
+#ifndef NODESKTOP
+
+#define DESKTOP_READOBJECTS 0x0001L
+#define DESKTOP_CREATEWINDOW 0x0002L
+#define DESKTOP_CREATEMENU 0x0004L
+#define DESKTOP_HOOKCONTROL 0x0008L
+#define DESKTOP_JOURNALRECORD 0x0010L
+#define DESKTOP_JOURNALPLAYBACK 0x0020L
+#define DESKTOP_ENUMERATE 0x0040L
+#define DESKTOP_WRITEOBJECTS 0x0080L
+#define DESKTOP_SWITCHDESKTOP 0x0100L
+
+#define DF_ALLOWOTHERACCOUNTHOOK 0x0001L
+
+#ifdef _WINGDI_
+#ifndef NOGDI
+#ifdef UNICODE
+#define CreateDesktop CreateDesktopW
+#else
+#define CreateDesktop CreateDesktopA
+#endif
+
+ WINUSERAPI HDESK WINAPI CreateDesktopA(LPCSTR lpszDesktop,LPCSTR lpszDevice,LPDEVMODEA pDevmode,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa);
+ WINUSERAPI HDESK WINAPI CreateDesktopW(LPCWSTR lpszDesktop,LPCWSTR lpszDevice,LPDEVMODEW pDevmode,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa);
+#endif
+#endif
+
+#ifdef UNICODE
+#define OpenDesktop OpenDesktopW
+#define EnumDesktops EnumDesktopsW
+#else
+#define OpenDesktop OpenDesktopA
+#define EnumDesktops EnumDesktopsA
+#endif
+
+ WINUSERAPI HDESK WINAPI OpenDesktopA(LPCSTR lpszDesktop,DWORD dwFlags,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
+ WINUSERAPI HDESK WINAPI OpenDesktopW(LPCWSTR lpszDesktop,DWORD dwFlags,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
+ WINUSERAPI HDESK WINAPI OpenInputDesktop(DWORD dwFlags,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
+ WINUSERAPI WINBOOL WINAPI EnumDesktopsA(HWINSTA hwinsta,DESKTOPENUMPROCA lpEnumFunc,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI EnumDesktopsW(HWINSTA hwinsta,DESKTOPENUMPROCW lpEnumFunc,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI EnumDesktopWindows(HDESK hDesktop,WNDENUMPROC lpfn,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI SwitchDesktop(HDESK hDesktop);
+ WINUSERAPI WINBOOL WINAPI SetThreadDesktop(HDESK hDesktop);
+ WINUSERAPI WINBOOL WINAPI CloseDesktop(HDESK hDesktop);
+ WINUSERAPI HDESK WINAPI GetThreadDesktop(DWORD dwThreadId);
+#endif
+
+#ifndef NOWINDOWSTATION
+#define WINSTA_ENUMDESKTOPS 0x0001L
+#define WINSTA_READATTRIBUTES 0x0002L
+#define WINSTA_ACCESSCLIPBOARD 0x0004L
+#define WINSTA_CREATEDESKTOP 0x0008L
+#define WINSTA_WRITEATTRIBUTES 0x0010L
+#define WINSTA_ACCESSGLOBALATOMS 0x0020L
+#define WINSTA_EXITWINDOWS 0x0040L
+#define WINSTA_ENUMERATE 0x0100L
+#define WINSTA_READSCREEN 0x0200L
+#define WINSTA_ALL_ACCESS (WINSTA_ENUMDESKTOPS | WINSTA_READATTRIBUTES | WINSTA_ACCESSCLIPBOARD | WINSTA_CREATEDESKTOP | WINSTA_WRITEATTRIBUTES | WINSTA_ACCESSGLOBALATOMS | WINSTA_EXITWINDOWS | WINSTA_ENUMERATE | WINSTA_READSCREEN)
+
+#define CWF_CREATE_ONLY 0x0001L
+
+#define WSF_VISIBLE 0x0001L
+
+#ifdef UNICODE
+#define CreateWindowStation CreateWindowStationW
+#define OpenWindowStation OpenWindowStationW
+#define EnumWindowStations EnumWindowStationsW
+#else
+#define CreateWindowStation CreateWindowStationA
+#define OpenWindowStation OpenWindowStationA
+#define EnumWindowStations EnumWindowStationsA
+#endif
+
+ WINUSERAPI HWINSTA WINAPI CreateWindowStationA(LPCSTR lpwinsta,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa);
+ WINUSERAPI HWINSTA WINAPI CreateWindowStationW(LPCWSTR lpwinsta,DWORD dwFlags,ACCESS_MASK dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa);
+ WINUSERAPI HWINSTA WINAPI OpenWindowStationA(LPCSTR lpszWinSta,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
+ WINUSERAPI HWINSTA WINAPI OpenWindowStationW(LPCWSTR lpszWinSta,WINBOOL fInherit,ACCESS_MASK dwDesiredAccess);
+ WINUSERAPI WINBOOL WINAPI EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI CloseWindowStation(HWINSTA hWinSta);
+ WINUSERAPI WINBOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta);
+ WINUSERAPI HWINSTA WINAPI GetProcessWindowStation(VOID);
+#endif
+
+#ifndef NOSECURITY
+ WINUSERAPI WINBOOL WINAPI SetUserObjectSecurity(HANDLE hObj,PSECURITY_INFORMATION pSIRequested,PSECURITY_DESCRIPTOR pSID);
+ WINUSERAPI WINBOOL WINAPI GetUserObjectSecurity(HANDLE hObj,PSECURITY_INFORMATION pSIRequested,PSECURITY_DESCRIPTOR pSID,DWORD nLength,LPDWORD lpnLengthNeeded);
+
+#define UOI_FLAGS 1
+#define UOI_NAME 2
+#define UOI_TYPE 3
+#define UOI_USER_SID 4
+
+ typedef struct tagUSEROBJECTFLAGS {
+ WINBOOL fInherit;
+ WINBOOL fReserved;
+ DWORD dwFlags;
+ } USEROBJECTFLAGS,*PUSEROBJECTFLAGS;
+
+#ifdef UNICODE
+#define GetUserObjectInformation GetUserObjectInformationW
+#define SetUserObjectInformation SetUserObjectInformationW
+#else
+#define GetUserObjectInformation GetUserObjectInformationA
+#define SetUserObjectInformation SetUserObjectInformationA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI GetUserObjectInformationA(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength,LPDWORD lpnLengthNeeded);
+ WINUSERAPI WINBOOL WINAPI GetUserObjectInformationW(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength,LPDWORD lpnLengthNeeded);
+ WINUSERAPI WINBOOL WINAPI SetUserObjectInformationA(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength);
+ WINUSERAPI WINBOOL WINAPI SetUserObjectInformationW(HANDLE hObj,int nIndex,PVOID pvInfo,DWORD nLength);
+#endif
+
+ typedef struct tagWNDCLASSEXA {
+ UINT cbSize;
+ UINT style;
+ WNDPROC lpfnWndProc;
+ int cbClsExtra;
+ int cbWndExtra;
+ HINSTANCE hInstance;
+ HICON hIcon;
+ HCURSOR hCursor;
+ HBRUSH hbrBackground;
+ LPCSTR lpszMenuName;
+ LPCSTR lpszClassName;
+ HICON hIconSm;
+ } WNDCLASSEXA,*PWNDCLASSEXA,*NPWNDCLASSEXA,*LPWNDCLASSEXA;
+
+ typedef struct tagWNDCLASSEXW {
+ UINT cbSize;
+ UINT style;
+ WNDPROC lpfnWndProc;
+ int cbClsExtra;
+ int cbWndExtra;
+ HINSTANCE hInstance;
+ HICON hIcon;
+ HCURSOR hCursor;
+ HBRUSH hbrBackground;
+ LPCWSTR lpszMenuName;
+ LPCWSTR lpszClassName;
+
+ HICON hIconSm;
+ } WNDCLASSEXW,*PWNDCLASSEXW,*NPWNDCLASSEXW,*LPWNDCLASSEXW;
+
+#ifdef UNICODE
+ typedef WNDCLASSEXW WNDCLASSEX;
+ typedef PWNDCLASSEXW PWNDCLASSEX;
+ typedef NPWNDCLASSEXW NPWNDCLASSEX;
+ typedef LPWNDCLASSEXW LPWNDCLASSEX;
+#else
+ typedef WNDCLASSEXA WNDCLASSEX;
+ typedef PWNDCLASSEXA PWNDCLASSEX;
+ typedef NPWNDCLASSEXA NPWNDCLASSEX;
+ typedef LPWNDCLASSEXA LPWNDCLASSEX;
+#endif
+
+ typedef struct tagWNDCLASSA {
+ UINT style;
+ WNDPROC lpfnWndProc;
+ int cbClsExtra;
+ int cbWndExtra;
+ HINSTANCE hInstance;
+ HICON hIcon;
+ HCURSOR hCursor;
+ HBRUSH hbrBackground;
+ LPCSTR lpszMenuName;
+ LPCSTR lpszClassName;
+ } WNDCLASSA,*PWNDCLASSA,*NPWNDCLASSA,*LPWNDCLASSA;
+
+ typedef struct tagWNDCLASSW {
+ UINT style;
+ WNDPROC lpfnWndProc;
+ int cbClsExtra;
+ int cbWndExtra;
+ HINSTANCE hInstance;
+ HICON hIcon;
+ HCURSOR hCursor;
+ HBRUSH hbrBackground;
+ LPCWSTR lpszMenuName;
+ LPCWSTR lpszClassName;
+ } WNDCLASSW,*PWNDCLASSW,*NPWNDCLASSW,*LPWNDCLASSW;
+
+#ifdef UNICODE
+ typedef WNDCLASSW WNDCLASS;
+ typedef PWNDCLASSW PWNDCLASS;
+ typedef NPWNDCLASSW NPWNDCLASS;
+ typedef LPWNDCLASSW LPWNDCLASS;
+#else
+ typedef WNDCLASSA WNDCLASS;
+ typedef PWNDCLASSA PWNDCLASS;
+ typedef NPWNDCLASSA NPWNDCLASS;
+ typedef LPWNDCLASSA LPWNDCLASS;
+#endif
+
+ WINUSERAPI WINBOOL WINAPI IsHungAppWindow(HWND hwnd);
+ WINUSERAPI VOID WINAPI DisableProcessWindowsGhosting(VOID);
+
+#ifndef NOMSG
+ typedef struct tagMSG {
+ HWND hwnd;
+ UINT message;
+ WPARAM wParam;
+ LPARAM lParam;
+ DWORD time;
+ POINT pt;
+ } MSG,*PMSG,*NPMSG,*LPMSG;
+
+#define POINTSTOPOINT(pt,pts) { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts); (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }
+
+#define POINTTOPOINTS(pt) (MAKELONG((short)((pt).x),(short)((pt).y)))
+#define MAKEWPARAM(l,h) ((WPARAM)(DWORD)MAKELONG(l,h))
+#define MAKELPARAM(l,h) ((LPARAM)(DWORD)MAKELONG(l,h))
+#define MAKELRESULT(l,h) ((LRESULT)(DWORD)MAKELONG(l,h))
+#endif
+
+#ifndef NOWINOFFSETS
+#define GWL_WNDPROC (-4)
+#define GWL_HINSTANCE (-6)
+#define GWL_HWNDPARENT (-8)
+#define GWL_STYLE (-16)
+#define GWL_EXSTYLE (-20)
+#define GWL_USERDATA (-21)
+#define GWL_ID (-12)
+
+#ifdef _WIN64
+#undef GWL_WNDPROC
+#undef GWL_HINSTANCE
+#undef GWL_HWNDPARENT
+#undef GWL_USERDATA
+#endif
+
+#define GWLP_WNDPROC (-4)
+#define GWLP_HINSTANCE (-6)
+#define GWLP_HWNDPARENT (-8)
+#define GWLP_USERDATA (-21)
+#define GWLP_ID (-12)
+
+#define GCL_MENUNAME (-8)
+#define GCL_HBRBACKGROUND (-10)
+#define GCL_HCURSOR (-12)
+#define GCL_HICON (-14)
+#define GCL_HMODULE (-16)
+#define GCL_CBWNDEXTRA (-18)
+#define GCL_CBCLSEXTRA (-20)
+#define GCL_WNDPROC (-24)
+#define GCL_STYLE (-26)
+#define GCW_ATOM (-32)
+#define GCL_HICONSM (-34)
+
+#ifdef _WIN64
+
+#undef GCL_MENUNAME
+#undef GCL_HBRBACKGROUND
+#undef GCL_HCURSOR
+#undef GCL_HICON
+#undef GCL_HMODULE
+#undef GCL_WNDPROC
+#undef GCL_HICONSM
+#endif
+
+#define GCLP_MENUNAME (-8)
+#define GCLP_HBRBACKGROUND (-10)
+#define GCLP_HCURSOR (-12)
+#define GCLP_HICON (-14)
+#define GCLP_HMODULE (-16)
+#define GCLP_WNDPROC (-24)
+#define GCLP_HICONSM (-34)
+#endif
+
+#ifndef NOWINMESSAGES
+
+#define WM_NULL 0x0000
+#define WM_CREATE 0x0001
+#define WM_DESTROY 0x0002
+#define WM_MOVE 0x0003
+#define WM_SIZE 0x0005
+
+#define WM_ACTIVATE 0x0006
+
+#define WA_INACTIVE 0
+#define WA_ACTIVE 1
+#define WA_CLICKACTIVE 2
+
+#define WM_SETFOCUS 0x0007
+#define WM_KILLFOCUS 0x0008
+#define WM_ENABLE 0x000A
+#define WM_SETREDRAW 0x000B
+#define WM_SETTEXT 0x000C
+#define WM_GETTEXT 0x000D
+#define WM_GETTEXTLENGTH 0x000E
+#define WM_PAINT 0x000F
+#define WM_CLOSE 0x0010
+#ifndef _WIN32_WCE
+#define WM_QUERYENDSESSION 0x0011
+#define WM_QUERYOPEN 0x0013
+#define WM_ENDSESSION 0x0016
+#endif
+#define WM_QUIT 0x0012
+#define WM_ERASEBKGND 0x0014
+#define WM_SYSCOLORCHANGE 0x0015
+#define WM_SHOWWINDOW 0x0018
+#define WM_WININICHANGE 0x001A
+#define WM_SETTINGCHANGE WM_WININICHANGE
+#define WM_DEVMODECHANGE 0x001B
+#define WM_ACTIVATEAPP 0x001C
+#define WM_FONTCHANGE 0x001D
+#define WM_TIMECHANGE 0x001E
+#define WM_CANCELMODE 0x001F
+#define WM_SETCURSOR 0x0020
+#define WM_MOUSEACTIVATE 0x0021
+#define WM_CHILDACTIVATE 0x0022
+#define WM_QUEUESYNC 0x0023
+
+#define WM_GETMINMAXINFO 0x0024
+
+ typedef struct tagMINMAXINFO {
+ POINT ptReserved;
+ POINT ptMaxSize;
+ POINT ptMaxPosition;
+ POINT ptMinTrackSize;
+ POINT ptMaxTrackSize;
+ } MINMAXINFO,*PMINMAXINFO,*LPMINMAXINFO;
+
+#define WM_PAINTICON 0x0026
+#define WM_ICONERASEBKGND 0x0027
+#define WM_NEXTDLGCTL 0x0028
+#define WM_SPOOLERSTATUS 0x002A
+#define WM_DRAWITEM 0x002B
+#define WM_MEASUREITEM 0x002C
+#define WM_DELETEITEM 0x002D
+#define WM_VKEYTOITEM 0x002E
+#define WM_CHARTOITEM 0x002F
+#define WM_SETFONT 0x0030
+#define WM_GETFONT 0x0031
+#define WM_SETHOTKEY 0x0032
+#define WM_GETHOTKEY 0x0033
+#define WM_QUERYDRAGICON 0x0037
+#define WM_COMPAREITEM 0x0039
+#ifndef _WIN32_WCE
+#define WM_GETOBJECT 0x003D
+#endif
+#define WM_COMPACTING 0x0041
+#define WM_COMMNOTIFY 0x0044
+#define WM_WINDOWPOSCHANGING 0x0046
+#define WM_WINDOWPOSCHANGED 0x0047
+
+#define WM_POWER 0x0048
+
+#define PWR_OK 1
+#define PWR_FAIL (-1)
+#define PWR_SUSPENDREQUEST 1
+#define PWR_SUSPENDRESUME 2
+#define PWR_CRITICALRESUME 3
+
+#define WM_COPYDATA 0x004A
+#define WM_CANCELJOURNAL 0x004B
+
+ typedef struct tagCOPYDATASTRUCT {
+ ULONG_PTR dwData;
+ DWORD cbData;
+ PVOID lpData;
+ } COPYDATASTRUCT,*PCOPYDATASTRUCT;
+
+ typedef struct tagMDINEXTMENU {
+ HMENU hmenuIn;
+ HMENU hmenuNext;
+ HWND hwndNext;
+ } MDINEXTMENU,*PMDINEXTMENU,*LPMDINEXTMENU;
+
+#define WM_NOTIFY 0x004E
+#define WM_INPUTLANGCHANGEREQUEST 0x0050
+#define WM_INPUTLANGCHANGE 0x0051
+#define WM_TCARD 0x0052
+#define WM_HELP 0x0053
+#define WM_USERCHANGED 0x0054
+#define WM_NOTIFYFORMAT 0x0055
+
+#define NFR_ANSI 1
+#define NFR_UNICODE 2
+#define NF_QUERY 3
+#define NF_REQUERY 4
+
+#define WM_CONTEXTMENU 0x007B
+#define WM_STYLECHANGING 0x007C
+#define WM_STYLECHANGED 0x007D
+#define WM_DISPLAYCHANGE 0x007E
+#define WM_GETICON 0x007F
+#define WM_SETICON 0x0080
+
+#define WM_NCCREATE 0x0081
+#define WM_NCDESTROY 0x0082
+#define WM_NCCALCSIZE 0x0083
+#define WM_NCHITTEST 0x0084
+#define WM_NCPAINT 0x0085
+#define WM_NCACTIVATE 0x0086
+#define WM_GETDLGCODE 0x0087
+#ifndef _WIN32_WCE
+#define WM_SYNCPAINT 0x0088
+#endif
+#define WM_NCMOUSEMOVE 0x00A0
+#define WM_NCLBUTTONDOWN 0x00A1
+#define WM_NCLBUTTONUP 0x00A2
+#define WM_NCLBUTTONDBLCLK 0x00A3
+#define WM_NCRBUTTONDOWN 0x00A4
+#define WM_NCRBUTTONUP 0x00A5
+#define WM_NCRBUTTONDBLCLK 0x00A6
+#define WM_NCMBUTTONDOWN 0x00A7
+#define WM_NCMBUTTONUP 0x00A8
+#define WM_NCMBUTTONDBLCLK 0x00A9
+
+#define WM_NCXBUTTONDOWN 0x00AB
+#define WM_NCXBUTTONUP 0x00AC
+#define WM_NCXBUTTONDBLCLK 0x00AD
+#define WM_INPUT 0x00FF
+#define WM_KEYFIRST 0x0100
+#define WM_KEYDOWN 0x0100
+#define WM_KEYUP 0x0101
+#define WM_CHAR 0x0102
+#define WM_DEADCHAR 0x0103
+#define WM_SYSKEYDOWN 0x0104
+#define WM_SYSKEYUP 0x0105
+#define WM_SYSCHAR 0x0106
+#define WM_SYSDEADCHAR 0x0107
+#define WM_UNICHAR 0x0109
+#define WM_KEYLAST 0x0109
+#define UNICODE_NOCHAR 0xFFFF
+#define WM_IME_STARTCOMPOSITION 0x010D
+#define WM_IME_ENDCOMPOSITION 0x010E
+#define WM_IME_COMPOSITION 0x010F
+#define WM_IME_KEYLAST 0x010F
+#define WM_INITDIALOG 0x0110
+#define WM_COMMAND 0x0111
+#define WM_SYSCOMMAND 0x0112
+#define WM_TIMER 0x0113
+#define WM_HSCROLL 0x0114
+#define WM_VSCROLL 0x0115
+#define WM_INITMENU 0x0116
+#define WM_INITMENUPOPUP 0x0117
+#define WM_MENUSELECT 0x011F
+#define WM_MENUCHAR 0x0120
+#define WM_ENTERIDLE 0x0121
+#ifndef _WIN32_WCE
+#define WM_MENURBUTTONUP 0x0122
+#define WM_MENUDRAG 0x0123
+#define WM_MENUGETOBJECT 0x0124
+#define WM_UNINITMENUPOPUP 0x0125
+#define WM_MENUCOMMAND 0x0126
+
+#ifndef _WIN32_WCE
+#define WM_CHANGEUISTATE 0x0127
+#define WM_UPDATEUISTATE 0x0128
+#define WM_QUERYUISTATE 0x0129
+
+#define UIS_SET 1
+#define UIS_CLEAR 2
+#define UIS_INITIALIZE 3
+
+#define UISF_HIDEFOCUS 0x1
+#define UISF_HIDEACCEL 0x2
+#define UISF_ACTIVE 0x4
+#endif
+#endif
+
+#define WM_CTLCOLORMSGBOX 0x0132
+#define WM_CTLCOLOREDIT 0x0133
+#define WM_CTLCOLORLISTBOX 0x0134
+#define WM_CTLCOLORBTN 0x0135
+#define WM_CTLCOLORDLG 0x0136
+#define WM_CTLCOLORSCROLLBAR 0x0137
+#define WM_CTLCOLORSTATIC 0x0138
+#define MN_GETHMENU 0x01E1
+
+#define WM_MOUSEFIRST 0x0200
+#define WM_MOUSEMOVE 0x0200
+#define WM_LBUTTONDOWN 0x0201
+#define WM_LBUTTONUP 0x0202
+#define WM_LBUTTONDBLCLK 0x0203
+#define WM_RBUTTONDOWN 0x0204
+#define WM_RBUTTONUP 0x0205
+#define WM_RBUTTONDBLCLK 0x0206
+#define WM_MBUTTONDOWN 0x0207
+#define WM_MBUTTONUP 0x0208
+#define WM_MBUTTONDBLCLK 0x0209
+#define WM_MOUSEWHEEL 0x020A
+#define WM_XBUTTONDOWN 0x020B
+#define WM_XBUTTONUP 0x020C
+#define WM_XBUTTONDBLCLK 0x020D
+#define WM_MOUSELAST 0x020D
+
+#define WHEEL_DELTA 120
+#define GET_WHEEL_DELTA_WPARAM(wParam) ((short)HIWORD(wParam))
+
+#define WHEEL_PAGESCROLL (UINT_MAX)
+
+#define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam))
+#define GET_NCHITTEST_WPARAM(wParam) ((short)LOWORD(wParam))
+#define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
+
+#define XBUTTON1 0x0001
+#define XBUTTON2 0x0002
+
+#define WM_PARENTNOTIFY 0x0210
+#define WM_ENTERMENULOOP 0x0211
+#define WM_EXITMENULOOP 0x0212
+
+#define WM_NEXTMENU 0x0213
+#define WM_SIZING 0x0214
+#define WM_CAPTURECHANGED 0x0215
+#define WM_MOVING 0x0216
+
+#define WM_POWERBROADCAST 0x0218
+
+#ifndef _WIN32_WCE
+#define PBT_APMQUERYSUSPEND 0x0000
+#define PBT_APMQUERYSTANDBY 0x0001
+
+#define PBT_APMQUERYSUSPENDFAILED 0x0002
+#define PBT_APMQUERYSTANDBYFAILED 0x0003
+
+#define PBT_APMSUSPEND 0x0004
+#define PBT_APMSTANDBY 0x0005
+
+#define PBT_APMRESUMECRITICAL 0x0006
+#define PBT_APMRESUMESUSPEND 0x0007
+#define PBT_APMRESUMESTANDBY 0x0008
+
+#define PBTF_APMRESUMEFROMFAILURE 0x00000001
+
+#define PBT_APMBATTERYLOW 0x0009
+#define PBT_APMPOWERSTATUSCHANGE 0x000A
+
+#define PBT_APMOEMEVENT 0x000B
+#define PBT_APMRESUMEAUTOMATIC 0x0012
+#endif
+
+#define WM_DEVICECHANGE 0x0219
+
+#define WM_MDICREATE 0x0220
+#define WM_MDIDESTROY 0x0221
+#define WM_MDIACTIVATE 0x0222
+#define WM_MDIRESTORE 0x0223
+#define WM_MDINEXT 0x0224
+#define WM_MDIMAXIMIZE 0x0225
+#define WM_MDITILE 0x0226
+#define WM_MDICASCADE 0x0227
+#define WM_MDIICONARRANGE 0x0228
+#define WM_MDIGETACTIVE 0x0229
+
+#define WM_MDISETMENU 0x0230
+#define WM_ENTERSIZEMOVE 0x0231
+#define WM_EXITSIZEMOVE 0x0232
+#define WM_DROPFILES 0x0233
+#define WM_MDIREFRESHMENU 0x0234
+
+#define WM_IME_SETCONTEXT 0x0281
+#define WM_IME_NOTIFY 0x0282
+#define WM_IME_CONTROL 0x0283
+#define WM_IME_COMPOSITIONFULL 0x0284
+#define WM_IME_SELECT 0x0285
+#define WM_IME_CHAR 0x0286
+#define WM_IME_REQUEST 0x0288
+#define WM_IME_KEYDOWN 0x0290
+#define WM_IME_KEYUP 0x0291
+
+#define WM_MOUSEHOVER 0x02A1
+#define WM_MOUSELEAVE 0x02A3
+#define WM_NCMOUSEHOVER 0x02A0
+#define WM_NCMOUSELEAVE 0x02A2
+#define WM_WTSSESSION_CHANGE 0x02B1
+#define WM_TABLET_FIRST 0x02c0
+#define WM_TABLET_LAST 0x02df
+#define WM_CUT 0x0300
+#define WM_COPY 0x0301
+#define WM_PASTE 0x0302
+#define WM_CLEAR 0x0303
+#define WM_UNDO 0x0304
+#define WM_RENDERFORMAT 0x0305
+#define WM_RENDERALLFORMATS 0x0306
+#define WM_DESTROYCLIPBOARD 0x0307
+#define WM_DRAWCLIPBOARD 0x0308
+#define WM_PAINTCLIPBOARD 0x0309
+#define WM_VSCROLLCLIPBOARD 0x030A
+#define WM_SIZECLIPBOARD 0x030B
+#define WM_ASKCBFORMATNAME 0x030C
+#define WM_CHANGECBCHAIN 0x030D
+#define WM_HSCROLLCLIPBOARD 0x030E
+#define WM_QUERYNEWPALETTE 0x030F
+#define WM_PALETTEISCHANGING 0x0310
+#define WM_PALETTECHANGED 0x0311
+#define WM_HOTKEY 0x0312
+#define WM_PRINT 0x0317
+#define WM_PRINTCLIENT 0x0318
+#define WM_APPCOMMAND 0x0319
+#define WM_THEMECHANGED 0x031A
+#define WM_HANDHELDFIRST 0x0358
+#define WM_HANDHELDLAST 0x035F
+#define WM_AFXFIRST 0x0360
+#define WM_AFXLAST 0x037F
+#define WM_PENWINFIRST 0x0380
+#define WM_PENWINLAST 0x038F
+#define WM_APP 0x8000
+#define WM_USER 0x0400
+
+#define WMSZ_LEFT 1
+#define WMSZ_RIGHT 2
+#define WMSZ_TOP 3
+#define WMSZ_TOPLEFT 4
+#define WMSZ_TOPRIGHT 5
+#define WMSZ_BOTTOM 6
+#define WMSZ_BOTTOMLEFT 7
+#define WMSZ_BOTTOMRIGHT 8
+
+#ifndef NONCMESSAGES
+
+#define HTERROR (-2)
+#define HTTRANSPARENT (-1)
+#define HTNOWHERE 0
+#define HTCLIENT 1
+#define HTCAPTION 2
+#define HTSYSMENU 3
+#define HTGROWBOX 4
+#define HTSIZE HTGROWBOX
+#define HTMENU 5
+#define HTHSCROLL 6
+#define HTVSCROLL 7
+#define HTMINBUTTON 8
+#define HTMAXBUTTON 9
+#define HTLEFT 10
+#define HTRIGHT 11
+#define HTTOP 12
+#define HTTOPLEFT 13
+#define HTTOPRIGHT 14
+#define HTBOTTOM 15
+#define HTBOTTOMLEFT 16
+#define HTBOTTOMRIGHT 17
+#define HTBORDER 18
+#define HTREDUCE HTMINBUTTON
+#define HTZOOM HTMAXBUTTON
+#define HTSIZEFIRST HTLEFT
+#define HTSIZELAST HTBOTTOMRIGHT
+#define HTOBJECT 19
+#define HTCLOSE 20
+#define HTHELP 21
+
+#define SMTO_NORMAL 0x0000
+#define SMTO_BLOCK 0x0001
+#define SMTO_ABORTIFHUNG 0x0002
+#define SMTO_NOTIMEOUTIFNOTHUNG 0x0008
+#endif
+
+#define MA_ACTIVATE 1
+#define MA_ACTIVATEANDEAT 2
+#define MA_NOACTIVATE 3
+#define MA_NOACTIVATEANDEAT 4
+
+#define ICON_SMALL 0
+#define ICON_BIG 1
+#define ICON_SMALL2 2
+
+#ifdef UNICODE
+#define RegisterWindowMessage RegisterWindowMessageW
+#else
+#define RegisterWindowMessage RegisterWindowMessageA
+#endif
+
+ WINUSERAPI UINT WINAPI RegisterWindowMessageA(LPCSTR lpString);
+ WINUSERAPI UINT WINAPI RegisterWindowMessageW(LPCWSTR lpString);
+
+#define SIZE_RESTORED 0
+#define SIZE_MINIMIZED 1
+#define SIZE_MAXIMIZED 2
+#define SIZE_MAXSHOW 3
+#define SIZE_MAXHIDE 4
+
+#define SIZENORMAL SIZE_RESTORED
+#define SIZEICONIC SIZE_MINIMIZED
+#define SIZEFULLSCREEN SIZE_MAXIMIZED
+#define SIZEZOOMSHOW SIZE_MAXSHOW
+#define SIZEZOOMHIDE SIZE_MAXHIDE
+
+ typedef struct tagWINDOWPOS {
+ HWND hwnd;
+ HWND hwndInsertAfter;
+ int x;
+ int y;
+ int cx;
+ int cy;
+ UINT flags;
+ } WINDOWPOS,*LPWINDOWPOS,*PWINDOWPOS;
+
+ typedef struct tagNCCALCSIZE_PARAMS {
+ RECT rgrc[3];
+ PWINDOWPOS lppos;
+ } NCCALCSIZE_PARAMS,*LPNCCALCSIZE_PARAMS;
+
+#define WVR_ALIGNTOP 0x0010
+#define WVR_ALIGNLEFT 0x0020
+#define WVR_ALIGNBOTTOM 0x0040
+#define WVR_ALIGNRIGHT 0x0080
+#define WVR_HREDRAW 0x0100
+#define WVR_VREDRAW 0x0200
+#define WVR_REDRAW (WVR_HREDRAW | WVR_VREDRAW)
+#define WVR_VALIDRECTS 0x0400
+
+#ifndef NOKEYSTATES
+
+#define MK_LBUTTON 0x0001
+#define MK_RBUTTON 0x0002
+#define MK_SHIFT 0x0004
+#define MK_CONTROL 0x0008
+#define MK_MBUTTON 0x0010
+#define MK_XBUTTON1 0x0020
+#define MK_XBUTTON2 0x0040
+#endif
+
+#ifndef NOTRACKMOUSEEVENT
+#define TME_HOVER 0x00000001
+#define TME_LEAVE 0x00000002
+#define TME_NONCLIENT 0x00000010
+#define TME_QUERY 0x40000000
+#define TME_CANCEL 0x80000000
+
+#define HOVER_DEFAULT 0xFFFFFFFF
+#endif
+
+ typedef struct tagTRACKMOUSEEVENT {
+ DWORD cbSize;
+ DWORD dwFlags;
+ HWND hwndTrack;
+ DWORD dwHoverTime;
+ } TRACKMOUSEEVENT,*LPTRACKMOUSEEVENT;
+
+ WINUSERAPI WINBOOL WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack);
+#endif
+
+#ifndef NOWINSTYLES
+
+#define WS_OVERLAPPED 0x00000000L
+#define WS_POPUP 0x80000000L
+#define WS_CHILD 0x40000000L
+#define WS_MINIMIZE 0x20000000L
+#define WS_VISIBLE 0x10000000L
+#define WS_DISABLED 0x08000000L
+#define WS_CLIPSIBLINGS 0x04000000L
+#define WS_CLIPCHILDREN 0x02000000L
+#define WS_MAXIMIZE 0x01000000L
+#define WS_CAPTION 0x00C00000L
+#define WS_BORDER 0x00800000L
+#define WS_DLGFRAME 0x00400000L
+#define WS_VSCROLL 0x00200000L
+#define WS_HSCROLL 0x00100000L
+#define WS_SYSMENU 0x00080000L
+#define WS_THICKFRAME 0x00040000L
+#define WS_GROUP 0x00020000L
+#define WS_TABSTOP 0x00010000L
+#define WS_MINIMIZEBOX 0x00020000L
+#define WS_MAXIMIZEBOX 0x00010000L
+#define WS_TILED WS_OVERLAPPED
+#define WS_ICONIC WS_MINIMIZE
+#define WS_SIZEBOX WS_THICKFRAME
+#define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
+#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
+#define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU)
+#define WS_CHILDWINDOW (WS_CHILD)
+
+#define WS_EX_DLGMODALFRAME 0x00000001L
+#define WS_EX_NOPARENTNOTIFY 0x00000004L
+#define WS_EX_TOPMOST 0x00000008L
+#define WS_EX_ACCEPTFILES 0x00000010L
+#define WS_EX_TRANSPARENT 0x00000020L
+#define WS_EX_MDICHILD 0x00000040L
+#define WS_EX_TOOLWINDOW 0x00000080L
+#define WS_EX_WINDOWEDGE 0x00000100L
+#define WS_EX_CLIENTEDGE 0x00000200L
+#define WS_EX_CONTEXTHELP 0x00000400L
+#define WS_EX_RIGHT 0x00001000L
+#define WS_EX_LEFT 0x00000000L
+#define WS_EX_RTLREADING 0x00002000L
+#define WS_EX_LTRREADING 0x00000000L
+#define WS_EX_LEFTSCROLLBAR 0x00004000L
+#define WS_EX_RIGHTSCROLLBAR 0x00000000L
+#define WS_EX_CONTROLPARENT 0x00010000L
+#define WS_EX_STATICEDGE 0x00020000L
+#define WS_EX_APPWINDOW 0x00040000L
+#define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
+#define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
+#define WS_EX_LAYERED 0x00080000
+#define WS_EX_NOINHERITLAYOUT 0x00100000L
+#define WS_EX_LAYOUTRTL 0x00400000L
+#define WS_EX_COMPOSITED 0x02000000L
+#define WS_EX_NOACTIVATE 0x08000000L
+
+#define CS_VREDRAW 0x0001
+#define CS_HREDRAW 0x0002
+#define CS_DBLCLKS 0x0008
+#define CS_OWNDC 0x0020
+#define CS_CLASSDC 0x0040
+#define CS_PARENTDC 0x0080
+#define CS_NOCLOSE 0x0200
+#define CS_SAVEBITS 0x0800
+#define CS_BYTEALIGNCLIENT 0x1000
+#define CS_BYTEALIGNWINDOW 0x2000
+#define CS_GLOBALCLASS 0x4000
+#define CS_IME 0x00010000
+#define CS_DROPSHADOW 0x00020000
+#endif
+
+#define PRF_CHECKVISIBLE 0x00000001L
+#define PRF_NONCLIENT 0x00000002L
+#define PRF_CLIENT 0x00000004L
+#define PRF_ERASEBKGND 0x00000008L
+#define PRF_CHILDREN 0x00000010L
+#define PRF_OWNED 0x00000020L
+
+#define BDR_RAISEDOUTER 0x0001
+#define BDR_SUNKENOUTER 0x0002
+#define BDR_RAISEDINNER 0x0004
+#define BDR_SUNKENINNER 0x0008
+
+#define BDR_OUTER (BDR_RAISEDOUTER | BDR_SUNKENOUTER)
+#define BDR_INNER (BDR_RAISEDINNER | BDR_SUNKENINNER)
+#define BDR_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER)
+#define BDR_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER)
+
+#define EDGE_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER)
+#define EDGE_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER)
+#define EDGE_ETCHED (BDR_SUNKENOUTER | BDR_RAISEDINNER)
+#define EDGE_BUMP (BDR_RAISEDOUTER | BDR_SUNKENINNER)
+
+#define BF_LEFT 0x0001
+#define BF_TOP 0x0002
+#define BF_RIGHT 0x0004
+#define BF_BOTTOM 0x0008
+
+#define BF_TOPLEFT (BF_TOP | BF_LEFT)
+#define BF_TOPRIGHT (BF_TOP | BF_RIGHT)
+#define BF_BOTTOMLEFT (BF_BOTTOM | BF_LEFT)
+#define BF_BOTTOMRIGHT (BF_BOTTOM | BF_RIGHT)
+#define BF_RECT (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM)
+
+#define BF_DIAGONAL 0x0010
+
+#define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL | BF_TOP | BF_RIGHT)
+#define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL | BF_TOP | BF_LEFT)
+#define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
+#define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
+
+#define BF_MIDDLE 0x0800
+#define BF_SOFT 0x1000
+#define BF_ADJUST 0x2000
+#define BF_FLAT 0x4000
+#define BF_MONO 0x8000
+
+ WINUSERAPI WINBOOL WINAPI DrawEdge(HDC hdc,LPRECT qrc,UINT edge,UINT grfFlags);
+
+#define DFC_CAPTION 1
+#define DFC_MENU 2
+#define DFC_SCROLL 3
+#define DFC_BUTTON 4
+#define DFC_POPUPMENU 5
+
+#define DFCS_CAPTIONCLOSE 0x0000
+#define DFCS_CAPTIONMIN 0x0001
+#define DFCS_CAPTIONMAX 0x0002
+#define DFCS_CAPTIONRESTORE 0x0003
+#define DFCS_CAPTIONHELP 0x0004
+
+#define DFCS_MENUARROW 0x0000
+#define DFCS_MENUCHECK 0x0001
+#define DFCS_MENUBULLET 0x0002
+#define DFCS_MENUARROWRIGHT 0x0004
+#define DFCS_SCROLLUP 0x0000
+#define DFCS_SCROLLDOWN 0x0001
+#define DFCS_SCROLLLEFT 0x0002
+#define DFCS_SCROLLRIGHT 0x0003
+#define DFCS_SCROLLCOMBOBOX 0x0005
+#define DFCS_SCROLLSIZEGRIP 0x0008
+#define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
+
+#define DFCS_BUTTONCHECK 0x0000
+#define DFCS_BUTTONRADIOIMAGE 0x0001
+#define DFCS_BUTTONRADIOMASK 0x0002
+#define DFCS_BUTTONRADIO 0x0004
+#define DFCS_BUTTON3STATE 0x0008
+#define DFCS_BUTTONPUSH 0x0010
+
+#define DFCS_INACTIVE 0x0100
+#define DFCS_PUSHED 0x0200
+#define DFCS_CHECKED 0x0400
+
+#define DFCS_TRANSPARENT 0x0800
+#define DFCS_HOT 0x1000
+
+#define DFCS_ADJUSTRECT 0x2000
+#define DFCS_FLAT 0x4000
+#define DFCS_MONO 0x8000
+
+ WINUSERAPI WINBOOL WINAPI DrawFrameControl(HDC,LPRECT,UINT,UINT);
+
+#define DC_ACTIVE 0x0001
+#define DC_SMALLCAP 0x0002
+#define DC_ICON 0x0004
+#define DC_TEXT 0x0008
+#define DC_INBUTTON 0x0010
+#define DC_GRADIENT 0x0020
+#define DC_BUTTONS 0x1000
+
+ WINUSERAPI WINBOOL WINAPI DrawCaption(HWND hwnd,HDC hdc,CONST RECT *lprect,UINT flags);
+
+#define IDANI_OPEN 1
+#define IDANI_CAPTION 3
+
+ WINUSERAPI WINBOOL WINAPI DrawAnimatedRects(HWND hwnd,int idAni,CONST RECT *lprcFrom,CONST RECT *lprcTo);
+
+#ifndef NOCLIPBOARD
+
+#define CF_TEXT 1
+#define CF_BITMAP 2
+#define CF_METAFILEPICT 3
+#define CF_SYLK 4
+#define CF_DIF 5
+#define CF_TIFF 6
+#define CF_OEMTEXT 7
+#define CF_DIB 8
+#define CF_PALETTE 9
+#define CF_PENDATA 10
+#define CF_RIFF 11
+#define CF_WAVE 12
+#define CF_UNICODETEXT 13
+#define CF_ENHMETAFILE 14
+#define CF_HDROP 15
+#define CF_LOCALE 16
+#define CF_DIBV5 17
+#define CF_MAX 18
+
+#define CF_OWNERDISPLAY 0x0080
+#define CF_DSPTEXT 0x0081
+#define CF_DSPBITMAP 0x0082
+#define CF_DSPMETAFILEPICT 0x0083
+#define CF_DSPENHMETAFILE 0x008E
+
+#define CF_PRIVATEFIRST 0x0200
+#define CF_PRIVATELAST 0x02FF
+
+#define CF_GDIOBJFIRST 0x0300
+#define CF_GDIOBJLAST 0x03FF
+#endif
+
+#define FVIRTKEY TRUE
+#define FNOINVERT 0x02
+#define FSHIFT 0x04
+#define FCONTROL 0x08
+#define FALT 0x10
+
+ typedef struct tagACCEL {
+ BYTE fVirt;
+ WORD key;
+ WORD cmd;
+ } ACCEL,*LPACCEL;
+
+ typedef struct tagPAINTSTRUCT {
+ HDC hdc;
+ WINBOOL fErase;
+ RECT rcPaint;
+ WINBOOL fRestore;
+ WINBOOL fIncUpdate;
+ BYTE rgbReserved[32];
+ } PAINTSTRUCT,*PPAINTSTRUCT,*NPPAINTSTRUCT,*LPPAINTSTRUCT;
+
+ typedef struct tagCREATESTRUCTA {
+ LPVOID lpCreateParams;
+ HINSTANCE hInstance;
+ HMENU hMenu;
+ HWND hwndParent;
+ int cy;
+ int cx;
+ int y;
+ int x;
+ LONG style;
+ LPCSTR lpszName;
+ LPCSTR lpszClass;
+ DWORD dwExStyle;
+ } CREATESTRUCTA,*LPCREATESTRUCTA;
+
+ typedef struct tagCREATESTRUCTW {
+ LPVOID lpCreateParams;
+ HINSTANCE hInstance;
+ HMENU hMenu;
+ HWND hwndParent;
+ int cy;
+ int cx;
+ int y;
+ int x;
+ LONG style;
+ LPCWSTR lpszName;
+ LPCWSTR lpszClass;
+ DWORD dwExStyle;
+ } CREATESTRUCTW,*LPCREATESTRUCTW;
+
+#ifdef UNICODE
+ typedef CREATESTRUCTW CREATESTRUCT;
+ typedef LPCREATESTRUCTW LPCREATESTRUCT;
+#else
+ typedef CREATESTRUCTA CREATESTRUCT;
+ typedef LPCREATESTRUCTA LPCREATESTRUCT;
+#endif
+
+ typedef struct tagWINDOWPLACEMENT {
+ UINT length;
+ UINT flags;
+ UINT showCmd;
+ POINT ptMinPosition;
+ POINT ptMaxPosition;
+ RECT rcNormalPosition;
+ } WINDOWPLACEMENT;
+ typedef WINDOWPLACEMENT *PWINDOWPLACEMENT,*LPWINDOWPLACEMENT;
+
+#define WPF_SETMINPOSITION 0x0001
+#define WPF_RESTORETOMAXIMIZED 0x0002
+#define WPF_ASYNCWINDOWPLACEMENT 0x0004
+
+ typedef struct tagNMHDR {
+ HWND hwndFrom;
+ UINT_PTR idFrom;
+ UINT code;
+ } NMHDR;
+
+ typedef NMHDR *LPNMHDR;
+
+ typedef struct tagSTYLESTRUCT {
+ DWORD styleOld;
+ DWORD styleNew;
+ } STYLESTRUCT,*LPSTYLESTRUCT;
+
+#define ODT_MENU 1
+#define ODT_LISTBOX 2
+#define ODT_COMBOBOX 3
+#define ODT_BUTTON 4
+#define ODT_STATIC 5
+
+#define ODA_DRAWENTIRE 0x0001
+#define ODA_SELECT 0x0002
+#define ODA_FOCUS 0x0004
+
+#define ODS_SELECTED 0x0001
+#define ODS_GRAYED 0x0002
+#define ODS_DISABLED 0x0004
+#define ODS_CHECKED 0x0008
+#define ODS_FOCUS 0x0010
+#define ODS_DEFAULT 0x0020
+#define ODS_COMBOBOXEDIT 0x1000
+#define ODS_HOTLIGHT 0x0040
+#define ODS_INACTIVE 0x0080
+#define ODS_NOACCEL 0x0100
+#define ODS_NOFOCUSRECT 0x0200
+
+ typedef struct tagMEASUREITEMSTRUCT {
+ UINT CtlType;
+ UINT CtlID;
+ UINT itemID;
+ UINT itemWidth;
+ UINT itemHeight;
+ ULONG_PTR itemData;
+ } MEASUREITEMSTRUCT,*PMEASUREITEMSTRUCT,*LPMEASUREITEMSTRUCT;
+
+ typedef struct tagDRAWITEMSTRUCT {
+ UINT CtlType;
+ UINT CtlID;
+ UINT itemID;
+ UINT itemAction;
+ UINT itemState;
+ HWND hwndItem;
+ HDC hDC;
+ RECT rcItem;
+ ULONG_PTR itemData;
+ } DRAWITEMSTRUCT,*PDRAWITEMSTRUCT,*LPDRAWITEMSTRUCT;
+
+ typedef struct tagDELETEITEMSTRUCT {
+ UINT CtlType;
+ UINT CtlID;
+ UINT itemID;
+ HWND hwndItem;
+ ULONG_PTR itemData;
+ } DELETEITEMSTRUCT,*PDELETEITEMSTRUCT,*LPDELETEITEMSTRUCT;
+
+ typedef struct tagCOMPAREITEMSTRUCT {
+ UINT CtlType;
+ UINT CtlID;
+ HWND hwndItem;
+ UINT itemID1;
+ ULONG_PTR itemData1;
+ UINT itemID2;
+ ULONG_PTR itemData2;
+ DWORD dwLocaleId;
+ } COMPAREITEMSTRUCT,*PCOMPAREITEMSTRUCT,*LPCOMPAREITEMSTRUCT;
+
+#ifndef NOMSG
+#ifdef UNICODE
+#define GetMessage GetMessageW
+#define DispatchMessage DispatchMessageW
+#define PeekMessage PeekMessageW
+#else
+#define GetMessage GetMessageA
+#define DispatchMessage DispatchMessageA
+#define PeekMessage PeekMessageA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI GetMessageA(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax);
+ WINUSERAPI WINBOOL WINAPI GetMessageW(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax);
+ WINUSERAPI WINBOOL WINAPI TranslateMessage(CONST MSG *lpMsg);
+ WINUSERAPI LRESULT WINAPI DispatchMessageA(CONST MSG *lpMsg);
+ WINUSERAPI LRESULT WINAPI DispatchMessageW(CONST MSG *lpMsg);
+ WINUSERAPI WINBOOL WINAPI SetMessageQueue(int cMessagesMax);
+ WINUSERAPI WINBOOL WINAPI PeekMessageA(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax,UINT wRemoveMsg);
+ WINUSERAPI WINBOOL WINAPI PeekMessageW(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax,UINT wRemoveMsg);
+
+#define PM_NOREMOVE 0x0000
+#define PM_REMOVE 0x0001
+#define PM_NOYIELD 0x0002
+#define PM_QS_INPUT (QS_INPUT << 16)
+#define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16)
+#define PM_QS_PAINT (QS_PAINT << 16)
+#define PM_QS_SENDMESSAGE (QS_SENDMESSAGE << 16)
+#endif
+
+ WINUSERAPI WINBOOL WINAPI RegisterHotKey(HWND hWnd,int id,UINT fsModifiers,UINT vk);
+ WINUSERAPI WINBOOL WINAPI UnregisterHotKey(HWND hWnd,int id);
+
+#define MOD_ALT 0x0001
+#define MOD_CONTROL 0x0002
+#define MOD_SHIFT 0x0004
+#define MOD_WIN 0x0008
+
+#define IDHOT_SNAPWINDOW (-1)
+#define IDHOT_SNAPDESKTOP (-2)
+
+#ifdef WIN_INTERNAL
+#ifndef LSTRING
+#define NOLSTRING
+#endif
+#ifndef LFILEIO
+#define NOLFILEIO
+#endif
+#endif
+
+#define ENDSESSION_LOGOFF 0x80000000
+
+#define EWX_LOGOFF 0
+#define EWX_SHUTDOWN 0x00000001
+#define EWX_REBOOT 0x00000002
+#define EWX_FORCE 0x00000004
+#define EWX_POWEROFF 0x00000008
+#define EWX_FORCEIFHUNG 0x00000010
+
+#define ExitWindows(dwReserved,Code) ExitWindowsEx(EWX_LOGOFF,0xFFFFFFFF)
+
+#ifdef UNICODE
+#define SendMessage SendMessageW
+#define SendMessageTimeout SendMessageTimeoutW
+#define SendNotifyMessage SendNotifyMessageW
+#define SendMessageCallback SendMessageCallbackW
+#else
+#define SendMessage SendMessageA
+#define SendMessageTimeout SendMessageTimeoutA
+#define SendNotifyMessage SendNotifyMessageA
+#define SendMessageCallback SendMessageCallbackA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI ExitWindowsEx(UINT uFlags,DWORD dwReason);
+ WINUSERAPI WINBOOL WINAPI SwapMouseButton(WINBOOL fSwap);
+ WINUSERAPI DWORD WINAPI GetMessagePos(VOID);
+ WINUSERAPI LONG WINAPI GetMessageTime(VOID);
+ WINUSERAPI LPARAM WINAPI GetMessageExtraInfo(VOID);
+ WINUSERAPI WINBOOL WINAPI IsWow64Message(VOID);
+ WINUSERAPI LPARAM WINAPI SetMessageExtraInfo(LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI SendMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI SendMessageW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI SendMessageTimeoutA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,UINT fuFlags,UINT uTimeout,PDWORD_PTR lpdwResult);
+ WINUSERAPI LRESULT WINAPI SendMessageTimeoutW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,UINT fuFlags,UINT uTimeout,PDWORD_PTR lpdwResult);
+ WINUSERAPI WINBOOL WINAPI SendNotifyMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI SendNotifyMessageW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI SendMessageCallbackA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,SENDASYNCPROC lpResultCallBack,ULONG_PTR dwData);
+ WINUSERAPI WINBOOL WINAPI SendMessageCallbackW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam,SENDASYNCPROC lpResultCallBack,ULONG_PTR dwData);
+
+ typedef struct {
+ UINT cbSize;
+ HDESK hdesk;
+ HWND hwnd;
+ LUID luid;
+ } BSMINFO,*PBSMINFO;
+
+#ifdef UNICODE
+#define BroadcastSystemMessageEx BroadcastSystemMessageExW
+#define BroadcastSystemMessage BroadcastSystemMessageW
+#else
+#define BroadcastSystemMessageEx BroadcastSystemMessageExA
+#define BroadcastSystemMessage BroadcastSystemMessageA
+#endif
+
+ WINUSERAPI long WINAPI BroadcastSystemMessageExA(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam,PBSMINFO pbsmInfo);
+ WINUSERAPI long WINAPI BroadcastSystemMessageExW(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam,PBSMINFO pbsmInfo);
+ WINUSERAPI long WINAPI BroadcastSystemMessageA(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI long WINAPI BroadcastSystemMessageW(DWORD flags,LPDWORD lpInfo,UINT Msg,WPARAM wParam,LPARAM lParam);
+
+#define BSM_ALLCOMPONENTS 0x00000000
+#define BSM_VXDS 0x00000001
+#define BSM_NETDRIVER 0x00000002
+#define BSM_INSTALLABLEDRIVERS 0x00000004
+#define BSM_APPLICATIONS 0x00000008
+#define BSM_ALLDESKTOPS 0x00000010
+
+#define BSF_QUERY 0x00000001
+#define BSF_IGNORECURRENTTASK 0x00000002
+#define BSF_FLUSHDISK 0x00000004
+#define BSF_NOHANG 0x00000008
+#define BSF_POSTMESSAGE 0x00000010
+#define BSF_FORCEIFHUNG 0x00000020
+#define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
+#define BSF_ALLOWSFW 0x00000080
+#define BSF_SENDNOTIFYMESSAGE 0x00000100
+#define BSF_RETURNHDESK 0x00000200
+#define BSF_LUID 0x00000400
+
+#define BROADCAST_QUERY_DENY 0x424D5144
+
+ typedef PVOID HDEVNOTIFY;
+ typedef HDEVNOTIFY *PHDEVNOTIFY;
+
+#define DEVICE_NOTIFY_WINDOW_HANDLE 0x00000000
+#define DEVICE_NOTIFY_SERVICE_HANDLE 0x00000001
+#define DEVICE_NOTIFY_ALL_INTERFACE_CLASSES 0x00000004
+
+#ifdef UNICODE
+#define RegisterDeviceNotification RegisterDeviceNotificationW
+#define PostMessage PostMessageW
+#define PostThreadMessage PostThreadMessageW
+#define PostAppMessage PostAppMessageW
+#define DefWindowProc DefWindowProcW
+#define CallWindowProc CallWindowProcW
+#define RegisterClass RegisterClassW
+#define UnregisterClass UnregisterClassW
+#define GetClassInfo GetClassInfoW
+#define RegisterClassEx RegisterClassExW
+#define GetClassInfoEx GetClassInfoExW
+#else
+#define RegisterDeviceNotification RegisterDeviceNotificationA
+#define PostMessage PostMessageA
+#define PostThreadMessage PostThreadMessageA
+#define PostAppMessage PostAppMessageA
+#define DefWindowProc DefWindowProcA
+#define CallWindowProc CallWindowProcA
+#define RegisterClass RegisterClassA
+#define UnregisterClass UnregisterClassA
+#define GetClassInfo GetClassInfoA
+#define RegisterClassEx RegisterClassExA
+#define GetClassInfoEx GetClassInfoExA
+#endif
+
+ WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE hRecipient,LPVOID NotificationFilter,DWORD Flags);
+ WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE hRecipient,LPVOID NotificationFilter,DWORD Flags);
+ WINUSERAPI WINBOOL WINAPI UnregisterDeviceNotification(HDEVNOTIFY Handle);
+ WINUSERAPI WINBOOL WINAPI PostMessageA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI PostMessageW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI PostThreadMessageA(DWORD idThread,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI PostThreadMessageW(DWORD idThread,UINT Msg,WPARAM wParam,LPARAM lParam);
+#define PostAppMessageA(idThread,wMsg,wParam,lParam) PostThreadMessageA((DWORD)idThread,wMsg,wParam,lParam)
+#define PostAppMessageW(idThread,wMsg,wParam,lParam) PostThreadMessageW((DWORD)idThread,wMsg,wParam,lParam)
+
+#define HWND_BROADCAST ((HWND)0xffff)
+#define HWND_MESSAGE ((HWND)-3)
+
+ WINUSERAPI WINBOOL WINAPI AttachThreadInput(DWORD idAttach,DWORD idAttachTo,WINBOOL fAttach);
+ WINUSERAPI WINBOOL WINAPI ReplyMessage(LRESULT lResult);
+ WINUSERAPI WINBOOL WINAPI WaitMessage(VOID);
+ WINUSERAPI DWORD WINAPI WaitForInputIdle(HANDLE hProcess,DWORD dwMilliseconds);
+ WINUSERAPI LRESULT WINAPI DefWindowProcA(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI DefWindowProcW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI VOID WINAPI PostQuitMessage(int nExitCode);
+ WINUSERAPI LRESULT WINAPI CallWindowProcA(WNDPROC lpPrevWndFunc,HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI CallWindowProcW(WNDPROC lpPrevWndFunc,HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI InSendMessage(VOID);
+ WINUSERAPI DWORD WINAPI InSendMessageEx(LPVOID lpReserved);
+
+#define ISMEX_NOSEND 0x00000000
+#define ISMEX_SEND 0x00000001
+#define ISMEX_NOTIFY 0x00000002
+#define ISMEX_CALLBACK 0x00000004
+#define ISMEX_REPLIED 0x00000008
+
+ WINUSERAPI UINT WINAPI GetDoubleClickTime(VOID);
+ WINUSERAPI WINBOOL WINAPI SetDoubleClickTime(UINT);
+ WINUSERAPI ATOM WINAPI RegisterClassA(CONST WNDCLASSA *lpWndClass);
+ WINUSERAPI ATOM WINAPI RegisterClassW(CONST WNDCLASSW *lpWndClass);
+ WINUSERAPI WINBOOL WINAPI UnregisterClassA(LPCSTR lpClassName,HINSTANCE hInstance);
+ WINUSERAPI WINBOOL WINAPI UnregisterClassW(LPCWSTR lpClassName,HINSTANCE hInstance);
+ WINUSERAPI WINBOOL WINAPI GetClassInfoA(HINSTANCE hInstance,LPCSTR lpClassName,LPWNDCLASSA lpWndClass);
+ WINUSERAPI WINBOOL WINAPI GetClassInfoW(HINSTANCE hInstance,LPCWSTR lpClassName,LPWNDCLASSW lpWndClass);
+ WINUSERAPI ATOM WINAPI RegisterClassExA(CONST WNDCLASSEXA *);
+ WINUSERAPI ATOM WINAPI RegisterClassExW(CONST WNDCLASSEXW *);
+ WINUSERAPI WINBOOL WINAPI GetClassInfoExA(HINSTANCE hInstance,LPCSTR lpszClass,LPWNDCLASSEXA lpwcx);
+ WINUSERAPI WINBOOL WINAPI GetClassInfoExW(HINSTANCE hInstance,LPCWSTR lpszClass,LPWNDCLASSEXW lpwcx);
+
+#define CW_USEDEFAULT ((int)0x80000000)
+
+#define HWND_DESKTOP ((HWND)0)
+
+ typedef BOOLEAN (WINAPI *PREGISTERCLASSNAMEW)(LPCWSTR);
+
+#ifdef UNICODE
+#define CreateWindowEx CreateWindowExW
+#define CreateWindow CreateWindowW
+#else
+#define CreateWindowEx CreateWindowExA
+#define CreateWindow CreateWindowA
+#endif
+
+ WINUSERAPI HWND WINAPI CreateWindowExA(DWORD dwExStyle,LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam);
+ WINUSERAPI HWND WINAPI CreateWindowExW(DWORD dwExStyle,LPCWSTR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam);
+#define CreateWindowA(lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam) CreateWindowExA(0L,lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam)
+#define CreateWindowW(lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam) CreateWindowExW(0L,lpClassName,lpWindowName,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam)
+ WINUSERAPI WINBOOL WINAPI IsWindow(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI IsMenu(HMENU hMenu);
+ WINUSERAPI WINBOOL WINAPI IsChild(HWND hWndParent,HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI DestroyWindow(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI ShowWindow(HWND hWnd,int nCmdShow);
+ WINUSERAPI WINBOOL WINAPI AnimateWindow(HWND hWnd,DWORD dwTime,DWORD dwFlags);
+
+#if defined(_WINGDI_) && !defined(NOGDI)
+ WINUSERAPI WINBOOL WINAPI UpdateLayeredWindow(HWND hWnd,HDC hdcDst,POINT *pptDst,SIZE *psize,HDC hdcSrc,POINT *pptSrc,COLORREF crKey,BLENDFUNCTION *pblend,DWORD dwFlags);
+
+ typedef struct tagUPDATELAYEREDWINDOWINFO {
+ DWORD cbSize;
+ HDC hdcDst;
+ POINT CONST *pptDst;
+ SIZE CONST *psize;
+ HDC hdcSrc;
+ POINT CONST *pptSrc;
+ COLORREF crKey;
+ BLENDFUNCTION CONST *pblend;
+ DWORD dwFlags;
+ RECT CONST *prcDirty;
+ } UPDATELAYEREDWINDOWINFO,*PUPDATELAYEREDWINDOWINFO;
+
+ WINUSERAPI WINBOOL WINAPI UpdateLayeredWindowIndirect(HWND hWnd,UPDATELAYEREDWINDOWINFO CONST *pULWInfo);
+ WINUSERAPI WINBOOL WINAPI GetLayeredWindowAttributes(HWND hwnd,COLORREF *pcrKey,BYTE *pbAlpha,DWORD *pdwFlags);
+
+#define PW_CLIENTONLY 0x00000001
+
+ WINUSERAPI WINBOOL WINAPI PrintWindow(HWND hwnd,HDC hdcBlt,UINT nFlags);
+ WINUSERAPI WINBOOL WINAPI SetLayeredWindowAttributes(HWND hwnd,COLORREF crKey,BYTE bAlpha,DWORD dwFlags);
+
+#define LWA_COLORKEY 0x00000001
+#define LWA_ALPHA 0x00000002
+
+#define ULW_COLORKEY 0x00000001
+#define ULW_ALPHA 0x00000002
+#define ULW_OPAQUE 0x00000004
+
+#define ULW_EX_NORESIZE 0x00000008
+
+ WINUSERAPI WINBOOL WINAPI ShowWindowAsync(HWND hWnd,int nCmdShow);
+ WINUSERAPI WINBOOL WINAPI FlashWindow(HWND hWnd,WINBOOL bInvert);
+
+ typedef struct {
+ UINT cbSize;
+ HWND hwnd;
+ DWORD dwFlags;
+ UINT uCount;
+ DWORD dwTimeout;
+ } FLASHWINFO,*PFLASHWINFO;
+
+ WINUSERAPI WINBOOL WINAPI FlashWindowEx(PFLASHWINFO pfwi);
+
+#define FLASHW_STOP 0
+#define FLASHW_CAPTION 0x00000001
+#define FLASHW_TRAY 0x00000002
+#define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY)
+#define FLASHW_TIMER 0x00000004
+#define FLASHW_TIMERNOFG 0x0000000C
+
+ WINUSERAPI WINBOOL WINAPI ShowOwnedPopups(HWND hWnd,WINBOOL fShow);
+ WINUSERAPI WINBOOL WINAPI OpenIcon(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI CloseWindow(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI MoveWindow(HWND hWnd,int X,int Y,int nWidth,int nHeight,WINBOOL bRepaint);
+ WINUSERAPI WINBOOL WINAPI SetWindowPos(HWND hWnd,HWND hWndInsertAfter,int X,int Y,int cx,int cy,UINT uFlags);
+ WINUSERAPI WINBOOL WINAPI GetWindowPlacement(HWND hWnd,WINDOWPLACEMENT *lpwndpl);
+ WINUSERAPI WINBOOL WINAPI SetWindowPlacement(HWND hWnd,CONST WINDOWPLACEMENT *lpwndpl);
+
+#ifndef NODEFERWINDOWPOS
+ WINUSERAPI HDWP WINAPI BeginDeferWindowPos(int nNumWindows);
+ WINUSERAPI HDWP WINAPI DeferWindowPos(HDWP hWinPosInfo,HWND hWnd,HWND hWndInsertAfter,int x,int y,int cx,int cy,UINT uFlags);
+ WINUSERAPI WINBOOL WINAPI EndDeferWindowPos(HDWP hWinPosInfo);
+#endif
+
+ WINUSERAPI WINBOOL WINAPI IsWindowVisible(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI IsIconic(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI AnyPopup(VOID);
+ WINUSERAPI WINBOOL WINAPI BringWindowToTop(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI IsZoomed(HWND hWnd);
+
+#define SWP_NOSIZE 0x0001
+#define SWP_NOMOVE 0x0002
+#define SWP_NOZORDER 0x0004
+#define SWP_NOREDRAW 0x0008
+#define SWP_NOACTIVATE 0x0010
+#define SWP_FRAMECHANGED 0x0020
+#define SWP_SHOWWINDOW 0x0040
+#define SWP_HIDEWINDOW 0x0080
+#define SWP_NOCOPYBITS 0x0100
+#define SWP_NOOWNERZORDER 0x0200
+#define SWP_NOSENDCHANGING 0x0400
+
+#define SWP_DRAWFRAME SWP_FRAMECHANGED
+#define SWP_NOREPOSITION SWP_NOOWNERZORDER
+#define SWP_DEFERERASE 0x2000
+#define SWP_ASYNCWINDOWPOS 0x4000
+
+#define HWND_TOP ((HWND)0)
+#define HWND_BOTTOM ((HWND)1)
+#define HWND_TOPMOST ((HWND)-1)
+#define HWND_NOTOPMOST ((HWND)-2)
+
+#ifndef NOCTLMGR
+
+#include
+
+ typedef struct {
+ DWORD style;
+ DWORD dwExtendedStyle;
+ WORD cdit;
+ short x;
+ short y;
+ short cx;
+ short cy;
+ } DLGTEMPLATE;
+
+ typedef DLGTEMPLATE *LPDLGTEMPLATEA;
+ typedef DLGTEMPLATE *LPDLGTEMPLATEW;
+
+#ifdef UNICODE
+ typedef LPDLGTEMPLATEW LPDLGTEMPLATE;
+#else
+ typedef LPDLGTEMPLATEA LPDLGTEMPLATE;
+#endif
+
+ typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
+ typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
+
+#ifdef UNICODE
+ typedef LPCDLGTEMPLATEW LPCDLGTEMPLATE;
+#else
+ typedef LPCDLGTEMPLATEA LPCDLGTEMPLATE;
+#endif
+
+ typedef struct {
+ DWORD style;
+ DWORD dwExtendedStyle;
+ short x;
+ short y;
+ short cx;
+ short cy;
+ WORD id;
+ } DLGITEMTEMPLATE;
+
+ typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
+ typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
+
+#ifdef UNICODE
+ typedef PDLGITEMTEMPLATEW PDLGITEMTEMPLATE;
+#else
+ typedef PDLGITEMTEMPLATEA PDLGITEMTEMPLATE;
+#endif
+
+ typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
+ typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
+
+#ifdef UNICODE
+ typedef LPDLGITEMTEMPLATEW LPDLGITEMTEMPLATE;
+#else
+ typedef LPDLGITEMTEMPLATEA LPDLGITEMTEMPLATE;
+#endif
+
+#include
+
+#ifdef UNICODE
+#define CreateDialogParam CreateDialogParamW
+#define CreateDialogIndirectParam CreateDialogIndirectParamW
+#define CreateDialog CreateDialogW
+#define CreateDialogIndirect CreateDialogIndirectW
+#define DialogBoxParam DialogBoxParamW
+#define DialogBoxIndirectParam DialogBoxIndirectParamW
+#define DialogBox DialogBoxW
+#define DialogBoxIndirect DialogBoxIndirectW
+#define SetDlgItemText SetDlgItemTextW
+#define GetDlgItemText GetDlgItemTextW
+#define SendDlgItemMessage SendDlgItemMessageW
+#define DefDlgProc DefDlgProcW
+#else
+#define CreateDialogParam CreateDialogParamA
+#define CreateDialogIndirectParam CreateDialogIndirectParamA
+#define CreateDialog CreateDialogA
+#define CreateDialogIndirect CreateDialogIndirectA
+#define DialogBoxParam DialogBoxParamA
+#define DialogBoxIndirectParam DialogBoxIndirectParamA
+#define DialogBox DialogBoxA
+#define DialogBoxIndirect DialogBoxIndirectA
+#define SetDlgItemText SetDlgItemTextA
+#define GetDlgItemText GetDlgItemTextA
+#define SendDlgItemMessage SendDlgItemMessageA
+#define DefDlgProc DefDlgProcA
+#endif
+
+ WINUSERAPI HWND WINAPI CreateDialogParamA(HINSTANCE hInstance,LPCSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
+ WINUSERAPI HWND WINAPI CreateDialogParamW(HINSTANCE hInstance,LPCWSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
+ WINUSERAPI HWND WINAPI CreateDialogIndirectParamA(HINSTANCE hInstance,LPCDLGTEMPLATEA lpTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
+ WINUSERAPI HWND WINAPI CreateDialogIndirectParamW(HINSTANCE hInstance,LPCDLGTEMPLATEW lpTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
+#define CreateDialogA(hInstance,lpName,hWndParent,lpDialogFunc) CreateDialogParamA(hInstance,lpName,hWndParent,lpDialogFunc,0L)
+#define CreateDialogW(hInstance,lpName,hWndParent,lpDialogFunc) CreateDialogParamW(hInstance,lpName,hWndParent,lpDialogFunc,0L)
+#define CreateDialogIndirectA(hInstance,lpTemplate,hWndParent,lpDialogFunc) CreateDialogIndirectParamA(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
+#define CreateDialogIndirectW(hInstance,lpTemplate,hWndParent,lpDialogFunc) CreateDialogIndirectParamW(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
+ WINUSERAPI INT_PTR WINAPI DialogBoxParamA(HINSTANCE hInstance,LPCSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
+ WINUSERAPI INT_PTR WINAPI DialogBoxParamW(HINSTANCE hInstance,LPCWSTR lpTemplateName,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
+ WINUSERAPI INT_PTR WINAPI DialogBoxIndirectParamA(HINSTANCE hInstance,LPCDLGTEMPLATEA hDialogTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
+ WINUSERAPI INT_PTR WINAPI DialogBoxIndirectParamW(HINSTANCE hInstance,LPCDLGTEMPLATEW hDialogTemplate,HWND hWndParent,DLGPROC lpDialogFunc,LPARAM dwInitParam);
+#define DialogBoxA(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxParamA(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
+#define DialogBoxW(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxParamW(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
+#define DialogBoxIndirectA(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxIndirectParamA(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
+#define DialogBoxIndirectW(hInstance,lpTemplate,hWndParent,lpDialogFunc) DialogBoxIndirectParamW(hInstance,lpTemplate,hWndParent,lpDialogFunc,0L)
+ WINUSERAPI WINBOOL WINAPI EndDialog(HWND hDlg,INT_PTR nResult);
+ WINUSERAPI HWND WINAPI GetDlgItem(HWND hDlg,int nIDDlgItem);
+ WINUSERAPI WINBOOL WINAPI SetDlgItemInt(HWND hDlg,int nIDDlgItem,UINT uValue,WINBOOL bSigned);
+ WINUSERAPI UINT WINAPI GetDlgItemInt(HWND hDlg,int nIDDlgItem,WINBOOL *lpTranslated,WINBOOL bSigned);
+ WINUSERAPI WINBOOL WINAPI SetDlgItemTextA(HWND hDlg,int nIDDlgItem,LPCSTR lpString);
+ WINUSERAPI WINBOOL WINAPI SetDlgItemTextW(HWND hDlg,int nIDDlgItem,LPCWSTR lpString);
+ WINUSERAPI UINT WINAPI GetDlgItemTextA(HWND hDlg,int nIDDlgItem,LPSTR lpString,int cchMax);
+ WINUSERAPI UINT WINAPI GetDlgItemTextW(HWND hDlg,int nIDDlgItem,LPWSTR lpString,int cchMax);
+ WINUSERAPI WINBOOL WINAPI CheckDlgButton(HWND hDlg,int nIDButton,UINT uCheck);
+ WINUSERAPI WINBOOL WINAPI CheckRadioButton(HWND hDlg,int nIDFirstButton,int nIDLastButton,int nIDCheckButton);
+ WINUSERAPI UINT WINAPI IsDlgButtonChecked(HWND hDlg,int nIDButton);
+ WINUSERAPI LRESULT WINAPI SendDlgItemMessageA(HWND hDlg,int nIDDlgItem,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI SendDlgItemMessageW(HWND hDlg,int nIDDlgItem,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI HWND WINAPI GetNextDlgGroupItem(HWND hDlg,HWND hCtl,WINBOOL bPrevious);
+ WINUSERAPI HWND WINAPI GetNextDlgTabItem(HWND hDlg,HWND hCtl,WINBOOL bPrevious);
+ WINUSERAPI int WINAPI GetDlgCtrlID(HWND hWnd);
+ WINUSERAPI long WINAPI GetDialogBaseUnits(VOID);
+ WINUSERAPI LRESULT WINAPI DefDlgProcA(HWND hDlg,UINT Msg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI DefDlgProcW(HWND hDlg,UINT Msg,WPARAM wParam,LPARAM lParam);
+
+#define DLGWINDOWEXTRA 30
+#endif
+
+#ifndef NOMSG
+
+#ifdef UNICODE
+#define CallMsgFilter CallMsgFilterW
+#else
+#define CallMsgFilter CallMsgFilterA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI CallMsgFilterA(LPMSG lpMsg,int nCode);
+ WINUSERAPI WINBOOL WINAPI CallMsgFilterW(LPMSG lpMsg,int nCode);
+#endif
+
+#ifndef NOCLIPBOARD
+
+#ifdef UNICODE
+#define RegisterClipboardFormat RegisterClipboardFormatW
+#define GetClipboardFormatName GetClipboardFormatNameW
+#else
+#define RegisterClipboardFormat RegisterClipboardFormatA
+#define GetClipboardFormatName GetClipboardFormatNameA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI OpenClipboard(HWND hWndNewOwner);
+ WINUSERAPI WINBOOL WINAPI CloseClipboard(VOID);
+ WINUSERAPI DWORD WINAPI GetClipboardSequenceNumber(VOID);
+ WINUSERAPI HWND WINAPI GetClipboardOwner(VOID);
+ WINUSERAPI HWND WINAPI SetClipboardViewer(HWND hWndNewViewer);
+ WINUSERAPI HWND WINAPI GetClipboardViewer(VOID);
+ WINUSERAPI WINBOOL WINAPI ChangeClipboardChain(HWND hWndRemove,HWND hWndNewNext);
+ WINUSERAPI HANDLE WINAPI SetClipboardData(UINT uFormat,HANDLE hMem);
+ WINUSERAPI HANDLE WINAPI GetClipboardData(UINT uFormat);
+ WINUSERAPI UINT WINAPI RegisterClipboardFormatA(LPCSTR lpszFormat);
+ WINUSERAPI UINT WINAPI RegisterClipboardFormatW(LPCWSTR lpszFormat);
+ WINUSERAPI int WINAPI CountClipboardFormats(VOID);
+ WINUSERAPI UINT WINAPI EnumClipboardFormats(UINT format);
+ WINUSERAPI int WINAPI GetClipboardFormatNameA(UINT format,LPSTR lpszFormatName,int cchMaxCount);
+ WINUSERAPI int WINAPI GetClipboardFormatNameW(UINT format,LPWSTR lpszFormatName,int cchMaxCount);
+ WINUSERAPI WINBOOL WINAPI EmptyClipboard(VOID);
+ WINUSERAPI WINBOOL WINAPI IsClipboardFormatAvailable(UINT format);
+ WINUSERAPI int WINAPI GetPriorityClipboardFormat(UINT *paFormatPriorityList,int cFormats);
+ WINUSERAPI HWND WINAPI GetOpenClipboardWindow(VOID);
+#endif
+
+#ifdef UNICODE
+#define CharToOem CharToOemW
+#define OemToChar OemToCharW
+#define CharToOemBuff CharToOemBuffW
+#define OemToCharBuff OemToCharBuffW
+#define CharUpper CharUpperW
+#define CharUpperBuff CharUpperBuffW
+#define CharLower CharLowerW
+#define CharLowerBuff CharLowerBuffW
+#define CharNext CharNextW
+#define CharPrev CharPrevW
+#else
+#define CharToOem CharToOemA
+#define OemToChar OemToCharA
+#define CharToOemBuff CharToOemBuffA
+#define OemToCharBuff OemToCharBuffA
+#define CharUpper CharUpperA
+#define CharUpperBuff CharUpperBuffA
+#define CharLower CharLowerA
+#define CharLowerBuff CharLowerBuffA
+#define CharNext CharNextA
+#define CharPrev CharPrevA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI CharToOemA(LPCSTR lpszSrc,LPSTR lpszDst);
+ WINUSERAPI WINBOOL WINAPI CharToOemW(LPCWSTR lpszSrc,LPSTR lpszDst);
+ WINUSERAPI WINBOOL WINAPI OemToCharA(LPCSTR lpszSrc,LPSTR lpszDst);
+ WINUSERAPI WINBOOL WINAPI OemToCharW(LPCSTR lpszSrc,LPWSTR lpszDst);
+ WINUSERAPI WINBOOL WINAPI CharToOemBuffA(LPCSTR lpszSrc,LPSTR lpszDst,DWORD cchDstLength);
+ WINUSERAPI WINBOOL WINAPI CharToOemBuffW(LPCWSTR lpszSrc,LPSTR lpszDst,DWORD cchDstLength);
+ WINUSERAPI WINBOOL WINAPI OemToCharBuffA(LPCSTR lpszSrc,LPSTR lpszDst,DWORD cchDstLength);
+ WINUSERAPI WINBOOL WINAPI OemToCharBuffW(LPCSTR lpszSrc,LPWSTR lpszDst,DWORD cchDstLength);
+ WINUSERAPI LPSTR WINAPI CharUpperA(LPSTR lpsz);
+ WINUSERAPI LPWSTR WINAPI CharUpperW(LPWSTR lpsz);
+ WINUSERAPI DWORD WINAPI CharUpperBuffA(LPSTR lpsz,DWORD cchLength);
+ WINUSERAPI DWORD WINAPI CharUpperBuffW(LPWSTR lpsz,DWORD cchLength);
+ WINUSERAPI LPSTR WINAPI CharLowerA(LPSTR lpsz);
+ WINUSERAPI LPWSTR WINAPI CharLowerW(LPWSTR lpsz);
+ WINUSERAPI DWORD WINAPI CharLowerBuffA(LPSTR lpsz,DWORD cchLength);
+ WINUSERAPI DWORD WINAPI CharLowerBuffW(LPWSTR lpsz,DWORD cchLength);
+ WINUSERAPI LPSTR WINAPI CharNextA(LPCSTR lpsz);
+ WINUSERAPI LPWSTR WINAPI CharNextW(LPCWSTR lpsz);
+ WINUSERAPI LPSTR WINAPI CharPrevA(LPCSTR lpszStart,LPCSTR lpszCurrent);
+ WINUSERAPI LPWSTR WINAPI CharPrevW(LPCWSTR lpszStart,LPCWSTR lpszCurrent);
+ WINUSERAPI LPSTR WINAPI CharNextExA(WORD CodePage,LPCSTR lpCurrentChar,DWORD dwFlags);
+ WINUSERAPI LPSTR WINAPI CharPrevExA(WORD CodePage,LPCSTR lpStart,LPCSTR lpCurrentChar,DWORD dwFlags);
+
+#define AnsiToOem CharToOemA
+#define OemToAnsi OemToCharA
+#define AnsiToOemBuff CharToOemBuffA
+#define OemToAnsiBuff OemToCharBuffA
+#define AnsiUpper CharUpperA
+#define AnsiUpperBuff CharUpperBuffA
+#define AnsiLower CharLowerA
+#define AnsiLowerBuff CharLowerBuffA
+#define AnsiNext CharNextA
+#define AnsiPrev CharPrevA
+
+#ifndef NOLANGUAGE
+
+#ifdef UNICODE
+#define IsCharAlpha IsCharAlphaW
+#define IsCharAlphaNumeric IsCharAlphaNumericW
+#define IsCharUpper IsCharUpperW
+#define IsCharLower IsCharLowerW
+#else
+#define IsCharAlpha IsCharAlphaA
+#define IsCharAlphaNumeric IsCharAlphaNumericA
+#define IsCharUpper IsCharUpperA
+#define IsCharLower IsCharLowerA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI IsCharAlphaA(CHAR ch);
+ WINUSERAPI WINBOOL WINAPI IsCharAlphaW(WCHAR ch);
+ WINUSERAPI WINBOOL WINAPI IsCharAlphaNumericA(CHAR ch);
+ WINUSERAPI WINBOOL WINAPI IsCharAlphaNumericW(WCHAR ch);
+ WINUSERAPI WINBOOL WINAPI IsCharUpperA(CHAR ch);
+ WINUSERAPI WINBOOL WINAPI IsCharUpperW(WCHAR ch);
+ WINUSERAPI WINBOOL WINAPI IsCharLowerA(CHAR ch);
+ WINUSERAPI WINBOOL WINAPI IsCharLowerW(WCHAR ch);
+#endif
+
+#ifdef UNICODE
+#define GetKeyNameText GetKeyNameTextW
+#define VkKeyScan VkKeyScanW
+#define VkKeyScanEx VkKeyScanExW
+#else
+#define GetKeyNameText GetKeyNameTextA
+#define VkKeyScan VkKeyScanA
+#define VkKeyScanEx VkKeyScanExA
+#endif
+
+ WINUSERAPI HWND WINAPI SetFocus(HWND hWnd);
+ WINUSERAPI HWND WINAPI GetActiveWindow(VOID);
+ WINUSERAPI HWND WINAPI GetFocus(VOID);
+ WINUSERAPI UINT WINAPI GetKBCodePage(VOID);
+ WINUSERAPI SHORT WINAPI GetKeyState(int nVirtKey);
+ WINUSERAPI SHORT WINAPI GetAsyncKeyState(int vKey);
+ WINUSERAPI WINBOOL WINAPI GetKeyboardState(PBYTE lpKeyState);
+ WINUSERAPI WINBOOL WINAPI SetKeyboardState(LPBYTE lpKeyState);
+ WINUSERAPI int WINAPI GetKeyNameTextA(LONG lParam,LPSTR lpString,int cchSize);
+ WINUSERAPI int WINAPI GetKeyNameTextW(LONG lParam,LPWSTR lpString,int cchSize);
+ WINUSERAPI int WINAPI GetKeyboardType(int nTypeFlag);
+ WINUSERAPI int WINAPI ToAscii(UINT uVirtKey,UINT uScanCode,CONST BYTE *lpKeyState,LPWORD lpChar,UINT uFlags);
+ WINUSERAPI int WINAPI ToAsciiEx(UINT uVirtKey,UINT uScanCode,CONST BYTE *lpKeyState,LPWORD lpChar,UINT uFlags,HKL dwhkl);
+ WINUSERAPI int WINAPI ToUnicode(UINT wVirtKey,UINT wScanCode,CONST BYTE *lpKeyState,LPWSTR pwszBuff,int cchBuff,UINT wFlags);
+ WINUSERAPI DWORD WINAPI OemKeyScan(WORD wOemChar);
+ WINUSERAPI SHORT WINAPI VkKeyScanA(CHAR ch);
+ WINUSERAPI SHORT WINAPI VkKeyScanW(WCHAR ch);
+ WINUSERAPI SHORT WINAPI VkKeyScanExA(CHAR ch,HKL dwhkl);
+ WINUSERAPI SHORT WINAPI VkKeyScanExW(WCHAR ch,HKL dwhkl);
+
+#define KEYEVENTF_EXTENDEDKEY 0x0001
+#define KEYEVENTF_KEYUP 0x0002
+#define KEYEVENTF_UNICODE 0x0004
+#define KEYEVENTF_SCANCODE 0x0008
+
+ WINUSERAPI VOID WINAPI keybd_event(BYTE bVk,BYTE bScan,DWORD dwFlags,ULONG_PTR dwExtraInfo);
+
+#define MOUSEEVENTF_MOVE 0x0001
+#define MOUSEEVENTF_LEFTDOWN 0x0002
+#define MOUSEEVENTF_LEFTUP 0x0004
+#define MOUSEEVENTF_RIGHTDOWN 0x0008
+#define MOUSEEVENTF_RIGHTUP 0x0010
+#define MOUSEEVENTF_MIDDLEDOWN 0x0020
+#define MOUSEEVENTF_MIDDLEUP 0x0040
+#define MOUSEEVENTF_XDOWN 0x0080
+#define MOUSEEVENTF_XUP 0x0100
+#define MOUSEEVENTF_WHEEL 0x0800
+#define MOUSEEVENTF_VIRTUALDESK 0x4000
+#define MOUSEEVENTF_ABSOLUTE 0x8000
+
+ WINUSERAPI VOID WINAPI mouse_event(DWORD dwFlags,DWORD dx,DWORD dy,DWORD dwData,ULONG_PTR dwExtraInfo);
+
+ typedef struct tagMOUSEINPUT {
+ LONG dx;
+ LONG dy;
+ DWORD mouseData;
+ DWORD dwFlags;
+ DWORD time;
+ ULONG_PTR dwExtraInfo;
+ } MOUSEINPUT,*PMOUSEINPUT,*LPMOUSEINPUT;
+
+ typedef struct tagKEYBDINPUT {
+ WORD wVk;
+ WORD wScan;
+ DWORD dwFlags;
+ DWORD time;
+ ULONG_PTR dwExtraInfo;
+ } KEYBDINPUT,*PKEYBDINPUT,*LPKEYBDINPUT;
+
+ typedef struct tagHARDWAREINPUT {
+ DWORD uMsg;
+ WORD wParamL;
+ WORD wParamH;
+ } HARDWAREINPUT,*PHARDWAREINPUT,*LPHARDWAREINPUT;
+
+#define INPUT_MOUSE 0
+#define INPUT_KEYBOARD 1
+#define INPUT_HARDWARE 2
+
+ typedef struct tagINPUT {
+ DWORD type;
+ union {
+ MOUSEINPUT mi;
+ KEYBDINPUT ki;
+ HARDWAREINPUT hi;
+ };
+ } INPUT,*PINPUT,*LPINPUT;
+
+ WINUSERAPI UINT WINAPI SendInput(UINT cInputs,LPINPUT pInputs,int cbSize);
+
+ typedef struct tagLASTINPUTINFO {
+ UINT cbSize;
+ DWORD dwTime;
+ } LASTINPUTINFO,*PLASTINPUTINFO;
+
+#ifdef UNICODE
+#define MapVirtualKey MapVirtualKeyW
+#define MapVirtualKeyEx MapVirtualKeyExW
+#else
+#define MapVirtualKey MapVirtualKeyA
+#define MapVirtualKeyEx MapVirtualKeyExA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii);
+ WINUSERAPI UINT WINAPI MapVirtualKeyA(UINT uCode,UINT uMapType);
+ WINUSERAPI UINT WINAPI MapVirtualKeyW(UINT uCode,UINT uMapType);
+ WINUSERAPI UINT WINAPI MapVirtualKeyExA(UINT uCode,UINT uMapType,HKL dwhkl);
+ WINUSERAPI UINT WINAPI MapVirtualKeyExW(UINT uCode,UINT uMapType,HKL dwhkl);
+ WINUSERAPI WINBOOL WINAPI GetInputState(VOID);
+ WINUSERAPI DWORD WINAPI GetQueueStatus(UINT flags);
+ WINUSERAPI HWND WINAPI GetCapture(VOID);
+ WINUSERAPI HWND WINAPI SetCapture(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI ReleaseCapture(VOID);
+ WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjects(DWORD nCount,CONST HANDLE *pHandles,WINBOOL fWaitAll,DWORD dwMilliseconds,DWORD dwWakeMask);
+ WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjectsEx(DWORD nCount,CONST HANDLE *pHandles,DWORD dwMilliseconds,DWORD dwWakeMask,DWORD dwFlags);
+
+#define MWMO_WAITALL 0x0001
+#define MWMO_ALERTABLE 0x0002
+#define MWMO_INPUTAVAILABLE 0x0004
+
+#define QS_KEY 0x0001
+#define QS_MOUSEMOVE 0x0002
+#define QS_MOUSEBUTTON 0x0004
+#define QS_POSTMESSAGE 0x0008
+#define QS_TIMER 0x0010
+#define QS_PAINT 0x0020
+#define QS_SENDMESSAGE 0x0040
+#define QS_HOTKEY 0x0080
+#define QS_ALLPOSTMESSAGE 0x0100
+#define QS_RAWINPUT 0x0400
+#define QS_MOUSE (QS_MOUSEMOVE | QS_MOUSEBUTTON)
+#define QS_INPUT (QS_MOUSE | QS_KEY | QS_RAWINPUT)
+#define QS_ALLEVENTS (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY)
+#define QS_ALLINPUT (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE)
+
+#define USER_TIMER_MAXIMUM 0x7FFFFFFF
+#define USER_TIMER_MINIMUM 0x0000000A
+
+#ifdef UNICODE
+#define LoadAccelerators LoadAcceleratorsW
+#define CreateAcceleratorTable CreateAcceleratorTableW
+#define CopyAcceleratorTable CopyAcceleratorTableW
+#else
+#define LoadAccelerators LoadAcceleratorsA
+#define CreateAcceleratorTable CreateAcceleratorTableA
+#define CopyAcceleratorTable CopyAcceleratorTableA
+#endif
+
+ WINUSERAPI UINT_PTR WINAPI SetTimer(HWND hWnd,UINT_PTR nIDEvent,UINT uElapse,TIMERPROC lpTimerFunc);
+ WINUSERAPI WINBOOL WINAPI KillTimer(HWND hWnd,UINT_PTR uIDEvent);
+ WINUSERAPI WINBOOL WINAPI IsWindowUnicode(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI EnableWindow(HWND hWnd,WINBOOL bEnable);
+ WINUSERAPI WINBOOL WINAPI IsWindowEnabled(HWND hWnd);
+ WINUSERAPI HACCEL WINAPI LoadAcceleratorsA(HINSTANCE hInstance,LPCSTR lpTableName);
+ WINUSERAPI HACCEL WINAPI LoadAcceleratorsW(HINSTANCE hInstance,LPCWSTR lpTableName);
+ WINUSERAPI HACCEL WINAPI CreateAcceleratorTableA(LPACCEL paccel,int cAccel);
+ WINUSERAPI HACCEL WINAPI CreateAcceleratorTableW(LPACCEL paccel,int cAccel);
+ WINUSERAPI WINBOOL WINAPI DestroyAcceleratorTable(HACCEL hAccel);
+ WINUSERAPI int WINAPI CopyAcceleratorTableA(HACCEL hAccelSrc,LPACCEL lpAccelDst,int cAccelEntries);
+ WINUSERAPI int WINAPI CopyAcceleratorTableW(HACCEL hAccelSrc,LPACCEL lpAccelDst,int cAccelEntries);
+
+#ifndef NOMSG
+
+#ifdef UNICODE
+#define TranslateAccelerator TranslateAcceleratorW
+#else
+#define TranslateAccelerator TranslateAcceleratorA
+#endif
+
+ WINUSERAPI int WINAPI TranslateAcceleratorA(HWND hWnd,HACCEL hAccTable,LPMSG lpMsg);
+ WINUSERAPI int WINAPI TranslateAcceleratorW(HWND hWnd,HACCEL hAccTable,LPMSG lpMsg);
+#endif
+
+#ifndef NOSYSMETRICS
+
+#define SM_CXSCREEN 0
+#define SM_CYSCREEN 1
+#define SM_CXVSCROLL 2
+#define SM_CYHSCROLL 3
+#define SM_CYCAPTION 4
+#define SM_CXBORDER 5
+#define SM_CYBORDER 6
+#define SM_CXDLGFRAME 7
+#define SM_CYDLGFRAME 8
+#define SM_CYVTHUMB 9
+#define SM_CXHTHUMB 10
+#define SM_CXICON 11
+#define SM_CYICON 12
+#define SM_CXCURSOR 13
+#define SM_CYCURSOR 14
+#define SM_CYMENU 15
+#define SM_CXFULLSCREEN 16
+#define SM_CYFULLSCREEN 17
+#define SM_CYKANJIWINDOW 18
+#define SM_MOUSEPRESENT 19
+#define SM_CYVSCROLL 20
+#define SM_CXHSCROLL 21
+#define SM_DEBUG 22
+#define SM_SWAPBUTTON 23
+#define SM_RESERVED1 24
+#define SM_RESERVED2 25
+#define SM_RESERVED3 26
+#define SM_RESERVED4 27
+#define SM_CXMIN 28
+#define SM_CYMIN 29
+#define SM_CXSIZE 30
+#define SM_CYSIZE 31
+#define SM_CXFRAME 32
+#define SM_CYFRAME 33
+#define SM_CXMINTRACK 34
+#define SM_CYMINTRACK 35
+#define SM_CXDOUBLECLK 36
+#define SM_CYDOUBLECLK 37
+#define SM_CXICONSPACING 38
+#define SM_CYICONSPACING 39
+#define SM_MENUDROPALIGNMENT 40
+#define SM_PENWINDOWS 41
+#define SM_DBCSENABLED 42
+#define SM_CMOUSEBUTTONS 43
+
+#define SM_CXFIXEDFRAME SM_CXDLGFRAME
+#define SM_CYFIXEDFRAME SM_CYDLGFRAME
+#define SM_CXSIZEFRAME SM_CXFRAME
+#define SM_CYSIZEFRAME SM_CYFRAME
+
+#define SM_SECURE 44
+#define SM_CXEDGE 45
+#define SM_CYEDGE 46
+#define SM_CXMINSPACING 47
+#define SM_CYMINSPACING 48
+#define SM_CXSMICON 49
+#define SM_CYSMICON 50
+#define SM_CYSMCAPTION 51
+#define SM_CXSMSIZE 52
+#define SM_CYSMSIZE 53
+#define SM_CXMENUSIZE 54
+#define SM_CYMENUSIZE 55
+#define SM_ARRANGE 56
+#define SM_CXMINIMIZED 57
+#define SM_CYMINIMIZED 58
+#define SM_CXMAXTRACK 59
+#define SM_CYMAXTRACK 60
+#define SM_CXMAXIMIZED 61
+#define SM_CYMAXIMIZED 62
+#define SM_NETWORK 63
+#define SM_CLEANBOOT 67
+#define SM_CXDRAG 68
+#define SM_CYDRAG 69
+#define SM_SHOWSOUNDS 70
+#define SM_CXMENUCHECK 71
+#define SM_CYMENUCHECK 72
+#define SM_SLOWMACHINE 73
+#define SM_MIDEASTENABLED 74
+#define SM_MOUSEWHEELPRESENT 75
+#define SM_XVIRTUALSCREEN 76
+#define SM_YVIRTUALSCREEN 77
+#define SM_CXVIRTUALSCREEN 78
+#define SM_CYVIRTUALSCREEN 79
+#define SM_CMONITORS 80
+#define SM_SAMEDISPLAYFORMAT 81
+#define SM_IMMENABLED 82
+#define SM_CXFOCUSBORDER 83
+#define SM_CYFOCUSBORDER 84
+#define SM_TABLETPC 86
+#define SM_MEDIACENTER 87
+#define SM_STARTER 88
+#define SM_SERVERR2 89
+#define SM_CMETRICS 90
+#define SM_REMOTESESSION 0x1000
+#define SM_SHUTTINGDOWN 0x2000
+#define SM_REMOTECONTROL 0x2001
+#define SM_CARETBLINKINGENABLED 0x2002
+
+ WINUSERAPI int WINAPI GetSystemMetrics(int nIndex);
+#endif
+
+#ifndef NOMENUS
+
+#ifdef UNICODE
+#define LoadMenu LoadMenuW
+#define LoadMenuIndirect LoadMenuIndirectW
+#define ChangeMenu ChangeMenuW
+#define GetMenuString GetMenuStringW
+#define InsertMenu InsertMenuW
+#define AppendMenu AppendMenuW
+#define ModifyMenu ModifyMenuW
+#else
+#define LoadMenu LoadMenuA
+#define LoadMenuIndirect LoadMenuIndirectA
+#define ChangeMenu ChangeMenuA
+#define GetMenuString GetMenuStringA
+#define InsertMenu InsertMenuA
+#define AppendMenu AppendMenuA
+#define ModifyMenu ModifyMenuA
+#endif
+
+ WINUSERAPI HMENU WINAPI LoadMenuA(HINSTANCE hInstance,LPCSTR lpMenuName);
+ WINUSERAPI HMENU WINAPI LoadMenuW(HINSTANCE hInstance,LPCWSTR lpMenuName);
+ WINUSERAPI HMENU WINAPI LoadMenuIndirectA(CONST MENUTEMPLATEA *lpMenuTemplate);
+ WINUSERAPI HMENU WINAPI LoadMenuIndirectW(CONST MENUTEMPLATEW *lpMenuTemplate);
+ WINUSERAPI HMENU WINAPI GetMenu(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI SetMenu(HWND hWnd,HMENU hMenu);
+ WINUSERAPI WINBOOL WINAPI ChangeMenuA(HMENU hMenu,UINT cmd,LPCSTR lpszNewItem,UINT cmdInsert,UINT flags);
+ WINUSERAPI WINBOOL WINAPI ChangeMenuW(HMENU hMenu,UINT cmd,LPCWSTR lpszNewItem,UINT cmdInsert,UINT flags);
+ WINUSERAPI WINBOOL WINAPI HiliteMenuItem(HWND hWnd,HMENU hMenu,UINT uIDHiliteItem,UINT uHilite);
+ WINUSERAPI int WINAPI GetMenuStringA(HMENU hMenu,UINT uIDItem,LPSTR lpString,int cchMax,UINT flags);
+ WINUSERAPI int WINAPI GetMenuStringW(HMENU hMenu,UINT uIDItem,LPWSTR lpString,int cchMax,UINT flags);
+ WINUSERAPI UINT WINAPI GetMenuState(HMENU hMenu,UINT uId,UINT uFlags);
+ WINUSERAPI WINBOOL WINAPI DrawMenuBar(HWND hWnd);
+
+#define PMB_ACTIVE 0x00000001
+
+ WINUSERAPI HMENU WINAPI GetSystemMenu(HWND hWnd,WINBOOL bRevert);
+ WINUSERAPI HMENU WINAPI CreateMenu(VOID);
+ WINUSERAPI HMENU WINAPI CreatePopupMenu(VOID);
+ WINUSERAPI WINBOOL WINAPI DestroyMenu(HMENU hMenu);
+ WINUSERAPI DWORD WINAPI CheckMenuItem(HMENU hMenu,UINT uIDCheckItem,UINT uCheck);
+ WINUSERAPI WINBOOL WINAPI EnableMenuItem(HMENU hMenu,UINT uIDEnableItem,UINT uEnable);
+ WINUSERAPI HMENU WINAPI GetSubMenu(HMENU hMenu,int nPos);
+ WINUSERAPI UINT WINAPI GetMenuItemID(HMENU hMenu,int nPos);
+ WINUSERAPI int WINAPI GetMenuItemCount(HMENU hMenu);
+ WINUSERAPI WINBOOL WINAPI InsertMenuA(HMENU hMenu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCSTR lpNewItem);
+ WINUSERAPI WINBOOL WINAPI InsertMenuW(HMENU hMenu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCWSTR lpNewItem);
+ WINUSERAPI WINBOOL WINAPI AppendMenuA(HMENU hMenu,UINT uFlags,UINT_PTR uIDNewItem,LPCSTR lpNewItem);
+ WINUSERAPI WINBOOL WINAPI AppendMenuW(HMENU hMenu,UINT uFlags,UINT_PTR uIDNewItem,LPCWSTR lpNewItem);
+ WINUSERAPI WINBOOL WINAPI ModifyMenuA(HMENU hMnu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCSTR lpNewItem);
+ WINUSERAPI WINBOOL WINAPI ModifyMenuW(HMENU hMnu,UINT uPosition,UINT uFlags,UINT_PTR uIDNewItem,LPCWSTR lpNewItem);
+ WINUSERAPI WINBOOL WINAPI RemoveMenu(HMENU hMenu,UINT uPosition,UINT uFlags);
+ WINUSERAPI WINBOOL WINAPI DeleteMenu(HMENU hMenu,UINT uPosition,UINT uFlags);
+ WINUSERAPI WINBOOL WINAPI SetMenuItemBitmaps(HMENU hMenu,UINT uPosition,UINT uFlags,HBITMAP hBitmapUnchecked,HBITMAP hBitmapChecked);
+ WINUSERAPI LONG WINAPI GetMenuCheckMarkDimensions(VOID);
+ WINUSERAPI WINBOOL WINAPI TrackPopupMenu(HMENU hMenu,UINT uFlags,int x,int y,int nReserved,HWND hWnd,CONST RECT *prcRect);
+
+#define MNC_IGNORE 0
+#define MNC_CLOSE 1
+#define MNC_EXECUTE 2
+#define MNC_SELECT 3
+
+ typedef struct tagTPMPARAMS {
+ UINT cbSize;
+ RECT rcExclude;
+ } TPMPARAMS;
+
+ typedef TPMPARAMS *LPTPMPARAMS;
+
+ WINUSERAPI WINBOOL WINAPI TrackPopupMenuEx(HMENU,UINT,int,int,HWND,LPTPMPARAMS);
+
+#define MNS_NOCHECK 0x80000000
+#define MNS_MODELESS 0x40000000
+#define MNS_DRAGDROP 0x20000000
+#define MNS_AUTODISMISS 0x10000000
+#define MNS_NOTIFYBYPOS 0x08000000
+#define MNS_CHECKORBMP 0x04000000
+
+#define MIM_MAXHEIGHT 0x00000001
+#define MIM_BACKGROUND 0x00000002
+#define MIM_HELPID 0x00000004
+#define MIM_MENUDATA 0x00000008
+#define MIM_STYLE 0x00000010
+#define MIM_APPLYTOSUBMENUS 0x80000000
+
+ typedef struct tagMENUINFO {
+ DWORD cbSize;
+ DWORD fMask;
+ DWORD dwStyle;
+ UINT cyMax;
+ HBRUSH hbrBack;
+ DWORD dwContextHelpID;
+ ULONG_PTR dwMenuData;
+ } MENUINFO,*LPMENUINFO;
+
+ typedef MENUINFO CONST *LPCMENUINFO;
+
+ WINUSERAPI WINBOOL WINAPI GetMenuInfo(HMENU,LPMENUINFO);
+ WINUSERAPI WINBOOL WINAPI SetMenuInfo(HMENU,LPCMENUINFO);
+ WINUSERAPI WINBOOL WINAPI EndMenu(VOID);
+
+#define MND_CONTINUE 0
+#define MND_ENDMENU 1
+
+ typedef struct tagMENUGETOBJECTINFO {
+ DWORD dwFlags;
+ UINT uPos;
+ HMENU hmenu;
+ PVOID riid;
+ PVOID pvObj;
+ } MENUGETOBJECTINFO,*PMENUGETOBJECTINFO;
+
+#define MNGOF_TOPGAP 0x00000001
+#define MNGOF_BOTTOMGAP 0x00000002
+
+#define MNGO_NOINTERFACE 0x00000000
+#define MNGO_NOERROR 0x00000001
+
+#define MIIM_STATE 0x00000001
+#define MIIM_ID 0x00000002
+#define MIIM_SUBMENU 0x00000004
+#define MIIM_CHECKMARKS 0x00000008
+#define MIIM_TYPE 0x00000010
+#define MIIM_DATA 0x00000020
+
+#define MIIM_STRING 0x00000040
+#define MIIM_BITMAP 0x00000080
+#define MIIM_FTYPE 0x00000100
+
+#define HBMMENU_CALLBACK ((HBITMAP) -1)
+#define HBMMENU_SYSTEM ((HBITMAP) 1)
+#define HBMMENU_MBAR_RESTORE ((HBITMAP) 2)
+#define HBMMENU_MBAR_MINIMIZE ((HBITMAP) 3)
+#define HBMMENU_MBAR_CLOSE ((HBITMAP) 5)
+#define HBMMENU_MBAR_CLOSE_D ((HBITMAP) 6)
+#define HBMMENU_MBAR_MINIMIZE_D ((HBITMAP) 7)
+#define HBMMENU_POPUP_CLOSE ((HBITMAP) 8)
+#define HBMMENU_POPUP_RESTORE ((HBITMAP) 9)
+#define HBMMENU_POPUP_MAXIMIZE ((HBITMAP) 10)
+#define HBMMENU_POPUP_MINIMIZE ((HBITMAP) 11)
+
+ typedef struct tagMENUITEMINFOA {
+ UINT cbSize;
+ UINT fMask;
+ UINT fType;
+ UINT fState;
+ UINT wID;
+ HMENU hSubMenu;
+ HBITMAP hbmpChecked;
+ HBITMAP hbmpUnchecked;
+ ULONG_PTR dwItemData;
+ LPSTR dwTypeData;
+ UINT cch;
+ HBITMAP hbmpItem;
+ } MENUITEMINFOA,*LPMENUITEMINFOA;
+
+ typedef struct tagMENUITEMINFOW {
+ UINT cbSize;
+ UINT fMask;
+ UINT fType;
+ UINT fState;
+ UINT wID;
+ HMENU hSubMenu;
+ HBITMAP hbmpChecked;
+ HBITMAP hbmpUnchecked;
+ ULONG_PTR dwItemData;
+ LPWSTR dwTypeData;
+ UINT cch;
+ HBITMAP hbmpItem;
+ } MENUITEMINFOW,*LPMENUITEMINFOW;
+
+#ifdef UNICODE
+ typedef MENUITEMINFOW MENUITEMINFO;
+ typedef LPMENUITEMINFOW LPMENUITEMINFO;
+#else
+ typedef MENUITEMINFOA MENUITEMINFO;
+ typedef LPMENUITEMINFOA LPMENUITEMINFO;
+#endif
+ typedef MENUITEMINFOA CONST *LPCMENUITEMINFOA;
+ typedef MENUITEMINFOW CONST *LPCMENUITEMINFOW;
+#ifdef UNICODE
+ typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
+#else
+ typedef LPCMENUITEMINFOA LPCMENUITEMINFO;
+#endif
+
+#ifdef UNICODE
+#define InsertMenuItem InsertMenuItemW
+#define GetMenuItemInfo GetMenuItemInfoW
+#define SetMenuItemInfo SetMenuItemInfoW
+#else
+#define InsertMenuItem InsertMenuItemA
+#define GetMenuItemInfo GetMenuItemInfoA
+#define SetMenuItemInfo SetMenuItemInfoA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI InsertMenuItemA(HMENU hmenu,UINT item,WINBOOL fByPosition,LPCMENUITEMINFOA lpmi);
+ WINUSERAPI WINBOOL WINAPI InsertMenuItemW(HMENU hmenu,UINT item,WINBOOL fByPosition,LPCMENUITEMINFOW lpmi);
+ WINUSERAPI WINBOOL WINAPI GetMenuItemInfoA(HMENU hmenu,UINT item,WINBOOL fByPosition,LPMENUITEMINFOA lpmii);
+ WINUSERAPI WINBOOL WINAPI GetMenuItemInfoW(HMENU hmenu,UINT item,WINBOOL fByPosition,LPMENUITEMINFOW lpmii);
+ WINUSERAPI WINBOOL WINAPI SetMenuItemInfoA(HMENU hmenu,UINT item,WINBOOL fByPositon,LPCMENUITEMINFOA lpmii);
+ WINUSERAPI WINBOOL WINAPI SetMenuItemInfoW(HMENU hmenu,UINT item,WINBOOL fByPositon,LPCMENUITEMINFOW lpmii);
+
+#define GMDI_USEDISABLED 0x0001L
+#define GMDI_GOINTOPOPUPS 0x0002L
+
+ WINUSERAPI UINT WINAPI GetMenuDefaultItem(HMENU hMenu,UINT fByPos,UINT gmdiFlags);
+ WINUSERAPI WINBOOL WINAPI SetMenuDefaultItem(HMENU hMenu,UINT uItem,UINT fByPos);
+ WINUSERAPI WINBOOL WINAPI GetMenuItemRect(HWND hWnd,HMENU hMenu,UINT uItem,LPRECT lprcItem);
+ WINUSERAPI int WINAPI MenuItemFromPoint(HWND hWnd,HMENU hMenu,POINT ptScreen);
+
+#define TPM_LEFTBUTTON 0x0000L
+#define TPM_RIGHTBUTTON 0x0002L
+#define TPM_LEFTALIGN 0x0000L
+#define TPM_CENTERALIGN 0x0004L
+#define TPM_RIGHTALIGN 0x0008L
+#define TPM_TOPALIGN 0x0000L
+#define TPM_VCENTERALIGN 0x0010L
+#define TPM_BOTTOMALIGN 0x0020L
+
+#define TPM_HORIZONTAL 0x0000L
+#define TPM_VERTICAL 0x0040L
+#define TPM_NONOTIFY 0x0080L
+#define TPM_RETURNCMD 0x0100L
+#define TPM_RECURSE 0x0001L
+#define TPM_HORPOSANIMATION 0x0400L
+#define TPM_HORNEGANIMATION 0x0800L
+#define TPM_VERPOSANIMATION 0x1000L
+#define TPM_VERNEGANIMATION 0x2000L
+#define TPM_NOANIMATION 0x4000L
+#define TPM_LAYOUTRTL 0x8000L
+#endif
+
+ typedef struct tagDROPSTRUCT {
+ HWND hwndSource;
+ HWND hwndSink;
+ DWORD wFmt;
+ ULONG_PTR dwData;
+ POINT ptDrop;
+ DWORD dwControlData;
+ } DROPSTRUCT,*PDROPSTRUCT,*LPDROPSTRUCT;
+
+#define DOF_EXECUTABLE 0x8001
+#define DOF_DOCUMENT 0x8002
+#define DOF_DIRECTORY 0x8003
+#define DOF_MULTIPLE 0x8004
+#define DOF_PROGMAN 0x0001
+#define DOF_SHELLDATA 0x0002
+
+#define DO_DROPFILE 0x454C4946L
+#define DO_PRINTFILE 0x544E5250L
+
+ WINUSERAPI DWORD WINAPI DragObject(HWND hwndParent,HWND hwndFrom,UINT fmt,ULONG_PTR data,HCURSOR hcur);
+ WINUSERAPI WINBOOL WINAPI DragDetect(HWND hwnd,POINT pt);
+ WINUSERAPI WINBOOL WINAPI DrawIcon(HDC hDC,int X,int Y,HICON hIcon);
+
+#ifndef NODRAWTEXT
+
+#define DT_TOP 0x00000000
+#define DT_LEFT 0x00000000
+#define DT_CENTER 0x00000001
+#define DT_RIGHT 0x00000002
+#define DT_VCENTER 0x00000004
+#define DT_BOTTOM 0x00000008
+#define DT_WORDBREAK 0x00000010
+#define DT_SINGLELINE 0x00000020
+#define DT_EXPANDTABS 0x00000040
+#define DT_TABSTOP 0x00000080
+#define DT_NOCLIP 0x00000100
+#define DT_EXTERNALLEADING 0x00000200
+#define DT_CALCRECT 0x00000400
+#define DT_NOPREFIX 0x00000800
+#define DT_INTERNAL 0x00001000
+
+#define DT_EDITCONTROL 0x00002000
+#define DT_PATH_ELLIPSIS 0x00004000
+#define DT_END_ELLIPSIS 0x00008000
+#define DT_MODIFYSTRING 0x00010000
+#define DT_RTLREADING 0x00020000
+#define DT_WORD_ELLIPSIS 0x00040000
+#define DT_NOFULLWIDTHCHARBREAK 0x00080000
+#define DT_HIDEPREFIX 0x00100000
+#define DT_PREFIXONLY 0x00200000
+
+ typedef struct tagDRAWTEXTPARAMS {
+ UINT cbSize;
+ int iTabLength;
+ int iLeftMargin;
+ int iRightMargin;
+ UINT uiLengthDrawn;
+ } DRAWTEXTPARAMS,*LPDRAWTEXTPARAMS;
+
+#ifdef UNICODE
+#define DrawText DrawTextW
+#define DrawTextEx DrawTextExW
+#else
+#define DrawText DrawTextA
+#define DrawTextEx DrawTextExA
+#endif
+
+ WINUSERAPI int WINAPI DrawTextA(HDC hdc,LPCSTR lpchText,int cchText,LPRECT lprc,UINT format);
+ WINUSERAPI int WINAPI DrawTextW(HDC hdc,LPCWSTR lpchText,int cchText,LPRECT lprc,UINT format);
+ WINUSERAPI int WINAPI DrawTextExA(HDC hdc,LPSTR lpchText,int cchText,LPRECT lprc,UINT format,LPDRAWTEXTPARAMS lpdtp);
+ WINUSERAPI int WINAPI DrawTextExW(HDC hdc,LPWSTR lpchText,int cchText,LPRECT lprc,UINT format,LPDRAWTEXTPARAMS lpdtp);
+#endif
+
+#ifdef UNICODE
+#define GrayString GrayStringW
+#define DrawState DrawStateW
+#define TabbedTextOut TabbedTextOutW
+#define GetTabbedTextExtent GetTabbedTextExtentW
+#else
+#define GrayString GrayStringA
+#define DrawState DrawStateA
+#define TabbedTextOut TabbedTextOutA
+#define GetTabbedTextExtent GetTabbedTextExtentA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI GrayStringA(HDC hDC,HBRUSH hBrush,GRAYSTRINGPROC lpOutputFunc,LPARAM lpData,int nCount,int X,int Y,int nWidth,int nHeight);
+ WINUSERAPI WINBOOL WINAPI GrayStringW(HDC hDC,HBRUSH hBrush,GRAYSTRINGPROC lpOutputFunc,LPARAM lpData,int nCount,int X,int Y,int nWidth,int nHeight);
+
+#define DST_COMPLEX 0x0000
+#define DST_TEXT 0x0001
+#define DST_PREFIXTEXT 0x0002
+#define DST_ICON 0x0003
+#define DST_BITMAP 0x0004
+
+#define DSS_NORMAL 0x0000
+#define DSS_UNION 0x0010
+#define DSS_DISABLED 0x0020
+#define DSS_MONO 0x0080
+#define DSS_HIDEPREFIX 0x0200
+#define DSS_PREFIXONLY 0x0400
+#define DSS_RIGHT 0x8000
+
+ WINUSERAPI WINBOOL WINAPI DrawStateA(HDC hdc,HBRUSH hbrFore,DRAWSTATEPROC qfnCallBack,LPARAM lData,WPARAM wData,int x,int y,int cx,int cy,UINT uFlags);
+ WINUSERAPI WINBOOL WINAPI DrawStateW(HDC hdc,HBRUSH hbrFore,DRAWSTATEPROC qfnCallBack,LPARAM lData,WPARAM wData,int x,int y,int cx,int cy,UINT uFlags);
+ WINUSERAPI LONG WINAPI TabbedTextOutA(HDC hdc,int x,int y,LPCSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions,int nTabOrigin);
+ WINUSERAPI LONG WINAPI TabbedTextOutW(HDC hdc,int x,int y,LPCWSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions,int nTabOrigin);
+ WINUSERAPI DWORD WINAPI GetTabbedTextExtentA(HDC hdc,LPCSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions);
+ WINUSERAPI DWORD WINAPI GetTabbedTextExtentW(HDC hdc,LPCWSTR lpString,int chCount,int nTabPositions,CONST INT *lpnTabStopPositions);
+ WINUSERAPI WINBOOL WINAPI UpdateWindow(HWND hWnd);
+ WINUSERAPI HWND WINAPI SetActiveWindow(HWND hWnd);
+ WINUSERAPI HWND WINAPI GetForegroundWindow(VOID);
+ WINUSERAPI WINBOOL WINAPI PaintDesktop(HDC hdc);
+ WINUSERAPI VOID WINAPI SwitchToThisWindow(HWND hwnd,WINBOOL fUnknown);
+ WINUSERAPI WINBOOL WINAPI SetForegroundWindow(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI AllowSetForegroundWindow(DWORD dwProcessId);
+
+#define ASFW_ANY ((DWORD)-1)
+
+ WINUSERAPI WINBOOL WINAPI LockSetForegroundWindow(UINT uLockCode);
+
+#define LSFW_LOCK 1
+#define LSFW_UNLOCK 2
+
+ WINUSERAPI HWND WINAPI WindowFromDC(HDC hDC);
+ WINUSERAPI HDC WINAPI GetDC(HWND hWnd);
+ WINUSERAPI HDC WINAPI GetDCEx(HWND hWnd,HRGN hrgnClip,DWORD flags);
+
+#define DCX_WINDOW 0x00000001L
+#define DCX_CACHE 0x00000002L
+#define DCX_NORESETATTRS 0x00000004L
+#define DCX_CLIPCHILDREN 0x00000008L
+#define DCX_CLIPSIBLINGS 0x00000010L
+#define DCX_PARENTCLIP 0x00000020L
+#define DCX_EXCLUDERGN 0x00000040L
+#define DCX_INTERSECTRGN 0x00000080L
+#define DCX_EXCLUDEUPDATE 0x00000100L
+#define DCX_INTERSECTUPDATE 0x00000200L
+#define DCX_LOCKWINDOWUPDATE 0x00000400L
+
+#define DCX_VALIDATE 0x00200000L
+
+ WINUSERAPI HDC WINAPI GetWindowDC(HWND hWnd);
+ WINUSERAPI int WINAPI ReleaseDC(HWND hWnd,HDC hDC);
+ WINUSERAPI HDC WINAPI BeginPaint(HWND hWnd,LPPAINTSTRUCT lpPaint);
+ WINUSERAPI WINBOOL WINAPI EndPaint(HWND hWnd,CONST PAINTSTRUCT *lpPaint);
+ WINUSERAPI WINBOOL WINAPI GetUpdateRect(HWND hWnd,LPRECT lpRect,WINBOOL bErase);
+ WINUSERAPI int WINAPI GetUpdateRgn(HWND hWnd,HRGN hRgn,WINBOOL bErase);
+ WINUSERAPI int WINAPI SetWindowRgn(HWND hWnd,HRGN hRgn,WINBOOL bRedraw);
+ WINUSERAPI int WINAPI GetWindowRgn(HWND hWnd,HRGN hRgn);
+ WINUSERAPI int WINAPI GetWindowRgnBox(HWND hWnd,LPRECT lprc);
+ WINUSERAPI int WINAPI ExcludeUpdateRgn(HDC hDC,HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI InvalidateRect(HWND hWnd,CONST RECT *lpRect,WINBOOL bErase);
+ WINUSERAPI WINBOOL WINAPI ValidateRect(HWND hWnd,CONST RECT *lpRect);
+ WINUSERAPI WINBOOL WINAPI InvalidateRgn(HWND hWnd,HRGN hRgn,WINBOOL bErase);
+ WINUSERAPI WINBOOL WINAPI ValidateRgn(HWND hWnd,HRGN hRgn);
+ WINUSERAPI WINBOOL WINAPI RedrawWindow(HWND hWnd,CONST RECT *lprcUpdate,HRGN hrgnUpdate,UINT flags);
+
+#define RDW_INVALIDATE 0x0001
+#define RDW_INTERNALPAINT 0x0002
+#define RDW_ERASE 0x0004
+
+#define RDW_VALIDATE 0x0008
+#define RDW_NOINTERNALPAINT 0x0010
+#define RDW_NOERASE 0x0020
+
+#define RDW_NOCHILDREN 0x0040
+#define RDW_ALLCHILDREN 0x0080
+
+#define RDW_UPDATENOW 0x0100
+#define RDW_ERASENOW 0x0200
+
+#define RDW_FRAME 0x0400
+#define RDW_NOFRAME 0x0800
+
+ WINUSERAPI WINBOOL WINAPI LockWindowUpdate(HWND hWndLock);
+ WINUSERAPI WINBOOL WINAPI ScrollWindow(HWND hWnd,int XAmount,int YAmount,CONST RECT *lpRect,CONST RECT *lpClipRect);
+ WINUSERAPI WINBOOL WINAPI ScrollDC(HDC hDC,int dx,int dy,CONST RECT *lprcScroll,CONST RECT *lprcClip,HRGN hrgnUpdate,LPRECT lprcUpdate);
+ WINUSERAPI int WINAPI ScrollWindowEx(HWND hWnd,int dx,int dy,CONST RECT *prcScroll,CONST RECT *prcClip,HRGN hrgnUpdate,LPRECT prcUpdate,UINT flags);
+
+#define SW_SCROLLCHILDREN 0x0001
+#define SW_INVALIDATE 0x0002
+#define SW_ERASE 0x0004
+#define SW_SMOOTHSCROLL 0x0010
+
+#ifndef NOSCROLL
+ WINUSERAPI int WINAPI SetScrollPos(HWND hWnd,int nBar,int nPos,WINBOOL bRedraw);
+ WINUSERAPI int WINAPI GetScrollPos(HWND hWnd,int nBar);
+ WINUSERAPI WINBOOL WINAPI SetScrollRange(HWND hWnd,int nBar,int nMinPos,int nMaxPos,WINBOOL bRedraw);
+ WINUSERAPI WINBOOL WINAPI GetScrollRange(HWND hWnd,int nBar,LPINT lpMinPos,LPINT lpMaxPos);
+ WINUSERAPI WINBOOL WINAPI ShowScrollBar(HWND hWnd,int wBar,WINBOOL bShow);
+ WINUSERAPI WINBOOL WINAPI EnableScrollBar(HWND hWnd,UINT wSBflags,UINT wArrows);
+
+#define ESB_ENABLE_BOTH 0x0000
+#define ESB_DISABLE_BOTH 0x0003
+
+#define ESB_DISABLE_LEFT 0x0001
+#define ESB_DISABLE_RIGHT 0x0002
+
+#define ESB_DISABLE_UP 0x0001
+#define ESB_DISABLE_DOWN 0x0002
+
+#define ESB_DISABLE_LTUP ESB_DISABLE_LEFT
+#define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT
+#endif
+
+#ifdef UNICODE
+#define SetProp SetPropW
+#define GetProp GetPropW
+#define RemoveProp RemovePropW
+#define EnumPropsEx EnumPropsExW
+#define EnumProps EnumPropsW
+#define SetWindowText SetWindowTextW
+#define GetWindowText GetWindowTextW
+#define GetWindowTextLength GetWindowTextLengthW
+#else
+#define SetProp SetPropA
+#define GetProp GetPropA
+#define RemoveProp RemovePropA
+#define EnumPropsEx EnumPropsExA
+#define EnumProps EnumPropsA
+#define SetWindowText SetWindowTextA
+#define GetWindowText GetWindowTextA
+#define GetWindowTextLength GetWindowTextLengthA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI SetPropA(HWND hWnd,LPCSTR lpString,HANDLE hData);
+ WINUSERAPI WINBOOL WINAPI SetPropW(HWND hWnd,LPCWSTR lpString,HANDLE hData);
+ WINUSERAPI HANDLE WINAPI GetPropA(HWND hWnd,LPCSTR lpString);
+ WINUSERAPI HANDLE WINAPI GetPropW(HWND hWnd,LPCWSTR lpString);
+ WINUSERAPI HANDLE WINAPI RemovePropA(HWND hWnd,LPCSTR lpString);
+ WINUSERAPI HANDLE WINAPI RemovePropW(HWND hWnd,LPCWSTR lpString);
+ WINUSERAPI int WINAPI EnumPropsExA(HWND hWnd,PROPENUMPROCEXA lpEnumFunc,LPARAM lParam);
+ WINUSERAPI int WINAPI EnumPropsExW(HWND hWnd,PROPENUMPROCEXW lpEnumFunc,LPARAM lParam);
+ WINUSERAPI int WINAPI EnumPropsA(HWND hWnd,PROPENUMPROCA lpEnumFunc);
+ WINUSERAPI int WINAPI EnumPropsW(HWND hWnd,PROPENUMPROCW lpEnumFunc);
+ WINUSERAPI WINBOOL WINAPI SetWindowTextA(HWND hWnd,LPCSTR lpString);
+ WINUSERAPI WINBOOL WINAPI SetWindowTextW(HWND hWnd,LPCWSTR lpString);
+ WINUSERAPI int WINAPI GetWindowTextA(HWND hWnd,LPSTR lpString,int nMaxCount);
+ WINUSERAPI int WINAPI GetWindowTextW(HWND hWnd,LPWSTR lpString,int nMaxCount);
+ WINUSERAPI int WINAPI GetWindowTextLengthA(HWND hWnd);
+ WINUSERAPI int WINAPI GetWindowTextLengthW(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI GetClientRect(HWND hWnd,LPRECT lpRect);
+ WINUSERAPI WINBOOL WINAPI GetWindowRect(HWND hWnd,LPRECT lpRect);
+ WINUSERAPI WINBOOL WINAPI AdjustWindowRect(LPRECT lpRect,DWORD dwStyle,WINBOOL bMenu);
+ WINUSERAPI WINBOOL WINAPI AdjustWindowRectEx(LPRECT lpRect,DWORD dwStyle,WINBOOL bMenu,DWORD dwExStyle);
+
+#define HELPINFO_WINDOW 0x0001
+#define HELPINFO_MENUITEM 0x0002
+
+ typedef struct tagHELPINFO {
+ UINT cbSize;
+ int iContextType;
+ int iCtrlId;
+ HANDLE hItemHandle;
+ DWORD_PTR dwContextId;
+ POINT MousePos;
+ } HELPINFO,*LPHELPINFO;
+
+ WINUSERAPI WINBOOL WINAPI SetWindowContextHelpId(HWND,DWORD);
+ WINUSERAPI DWORD WINAPI GetWindowContextHelpId(HWND);
+ WINUSERAPI WINBOOL WINAPI SetMenuContextHelpId(HMENU,DWORD);
+ WINUSERAPI DWORD WINAPI GetMenuContextHelpId(HMENU);
+
+#ifndef NOMB
+
+#define MB_OK 0x00000000L
+#define MB_OKCANCEL 0x00000001L
+#define MB_ABORTRETRYIGNORE 0x00000002L
+#define MB_YESNOCANCEL 0x00000003L
+#define MB_YESNO 0x00000004L
+#define MB_RETRYCANCEL 0x00000005L
+#define MB_CANCELTRYCONTINUE 0x00000006L
+#define MB_ICONHAND 0x00000010L
+#define MB_ICONQUESTION 0x00000020L
+#define MB_ICONEXCLAMATION 0x00000030L
+#define MB_ICONASTERISK 0x00000040L
+#define MB_USERICON 0x00000080L
+#define MB_ICONWARNING MB_ICONEXCLAMATION
+#define MB_ICONERROR MB_ICONHAND
+#define MB_ICONINFORMATION MB_ICONASTERISK
+#define MB_ICONSTOP MB_ICONHAND
+#define MB_DEFBUTTON1 0x00000000L
+#define MB_DEFBUTTON2 0x00000100L
+#define MB_DEFBUTTON3 0x00000200L
+#define MB_DEFBUTTON4 0x00000300L
+#define MB_APPLMODAL 0x00000000L
+#define MB_SYSTEMMODAL 0x00001000L
+#define MB_TASKMODAL 0x00002000L
+#define MB_HELP 0x00004000L
+#define MB_NOFOCUS 0x00008000L
+#define MB_SETFOREGROUND 0x00010000L
+#define MB_DEFAULT_DESKTOP_ONLY 0x00020000L
+#define MB_TOPMOST 0x00040000L
+#define MB_RIGHT 0x00080000L
+#define MB_RTLREADING 0x00100000L
+#define MB_SERVICE_NOTIFICATION 0x00200000L
+#define MB_SERVICE_NOTIFICATION_NT3X 0x00040000L
+#define MB_TYPEMASK 0x0000000FL
+#define MB_ICONMASK 0x000000F0L
+#define MB_DEFMASK 0x00000F00L
+#define MB_MODEMASK 0x00003000L
+#define MB_MISCMASK 0x0000C000L
+
+#ifdef UNICODE
+#define MessageBox MessageBoxW
+#define MessageBoxEx MessageBoxExW
+#else
+#define MessageBox MessageBoxA
+#define MessageBoxEx MessageBoxExA
+#endif
+
+ WINUSERAPI int WINAPI MessageBoxA(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption,UINT uType);
+ WINUSERAPI int WINAPI MessageBoxW(HWND hWnd,LPCWSTR lpText,LPCWSTR lpCaption,UINT uType);
+ WINUSERAPI int WINAPI MessageBoxExA(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption,UINT uType,WORD wLanguageId);
+ WINUSERAPI int WINAPI MessageBoxExW(HWND hWnd,LPCWSTR lpText,LPCWSTR lpCaption,UINT uType,WORD wLanguageId);
+
+ typedef VOID (CALLBACK *MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo);
+
+ typedef struct tagMSGBOXPARAMSA {
+ UINT cbSize;
+ HWND hwndOwner;
+ HINSTANCE hInstance;
+ LPCSTR lpszText;
+ LPCSTR lpszCaption;
+ DWORD dwStyle;
+ LPCSTR lpszIcon;
+ DWORD_PTR dwContextHelpId;
+ MSGBOXCALLBACK lpfnMsgBoxCallback;
+ DWORD dwLanguageId;
+ } MSGBOXPARAMSA,*PMSGBOXPARAMSA,*LPMSGBOXPARAMSA;
+
+ typedef struct tagMSGBOXPARAMSW {
+ UINT cbSize;
+ HWND hwndOwner;
+ HINSTANCE hInstance;
+ LPCWSTR lpszText;
+ LPCWSTR lpszCaption;
+ DWORD dwStyle;
+ LPCWSTR lpszIcon;
+ DWORD_PTR dwContextHelpId;
+ MSGBOXCALLBACK lpfnMsgBoxCallback;
+ DWORD dwLanguageId;
+ } MSGBOXPARAMSW,*PMSGBOXPARAMSW,*LPMSGBOXPARAMSW;
+
+#ifdef UNICODE
+ typedef MSGBOXPARAMSW MSGBOXPARAMS;
+ typedef PMSGBOXPARAMSW PMSGBOXPARAMS;
+ typedef LPMSGBOXPARAMSW LPMSGBOXPARAMS;
+#else
+ typedef MSGBOXPARAMSA MSGBOXPARAMS;
+ typedef PMSGBOXPARAMSA PMSGBOXPARAMS;
+ typedef LPMSGBOXPARAMSA LPMSGBOXPARAMS;
+#endif
+
+#ifdef UNICODE
+#define MessageBoxIndirect MessageBoxIndirectW
+#else
+#define MessageBoxIndirect MessageBoxIndirectA
+#endif
+
+ WINUSERAPI int WINAPI MessageBoxIndirectA(CONST MSGBOXPARAMSA *lpmbp);
+ WINUSERAPI int WINAPI MessageBoxIndirectW(CONST MSGBOXPARAMSW *lpmbp);
+ WINUSERAPI WINBOOL WINAPI MessageBeep(UINT uType);
+#endif
+
+ WINUSERAPI int WINAPI ShowCursor(WINBOOL bShow);
+ WINUSERAPI WINBOOL WINAPI SetCursorPos(int X,int Y);
+ WINUSERAPI HCURSOR WINAPI SetCursor(HCURSOR hCursor);
+ WINUSERAPI WINBOOL WINAPI GetCursorPos(LPPOINT lpPoint);
+ WINUSERAPI WINBOOL WINAPI ClipCursor(CONST RECT *lpRect);
+ WINUSERAPI WINBOOL WINAPI GetClipCursor(LPRECT lpRect);
+ WINUSERAPI HCURSOR WINAPI GetCursor(VOID);
+ WINUSERAPI WINBOOL WINAPI CreateCaret(HWND hWnd,HBITMAP hBitmap,int nWidth,int nHeight);
+ WINUSERAPI UINT WINAPI GetCaretBlinkTime(VOID);
+ WINUSERAPI WINBOOL WINAPI SetCaretBlinkTime(UINT uMSeconds);
+ WINUSERAPI WINBOOL WINAPI DestroyCaret(VOID);
+ WINUSERAPI WINBOOL WINAPI HideCaret(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI ShowCaret(HWND hWnd);
+ WINUSERAPI WINBOOL WINAPI SetCaretPos(int X,int Y);
+ WINUSERAPI WINBOOL WINAPI GetCaretPos(LPPOINT lpPoint);
+ WINUSERAPI WINBOOL WINAPI ClientToScreen(HWND hWnd,LPPOINT lpPoint);
+ WINUSERAPI WINBOOL WINAPI ScreenToClient(HWND hWnd,LPPOINT lpPoint);
+ WINUSERAPI int WINAPI MapWindowPoints(HWND hWndFrom,HWND hWndTo,LPPOINT lpPoints,UINT cPoints);
+ WINUSERAPI HWND WINAPI WindowFromPoint(POINT Point);
+ WINUSERAPI HWND WINAPI ChildWindowFromPoint(HWND hWndParent,POINT Point);
+
+#define CWP_ALL 0x0000
+#define CWP_SKIPINVISIBLE 0x0001
+#define CWP_SKIPDISABLED 0x0002
+#define CWP_SKIPTRANSPARENT 0x0004
+
+ WINUSERAPI HWND WINAPI ChildWindowFromPointEx(HWND hwnd,POINT pt,UINT flags);
+
+#ifndef NOCOLOR
+
+#define CTLCOLOR_MSGBOX 0
+#define CTLCOLOR_EDIT 1
+#define CTLCOLOR_LISTBOX 2
+#define CTLCOLOR_BTN 3
+#define CTLCOLOR_DLG 4
+#define CTLCOLOR_SCROLLBAR 5
+#define CTLCOLOR_STATIC 6
+#define CTLCOLOR_MAX 7
+
+#define COLOR_SCROLLBAR 0
+#define COLOR_BACKGROUND 1
+#define COLOR_ACTIVECAPTION 2
+#define COLOR_INACTIVECAPTION 3
+#define COLOR_MENU 4
+#define COLOR_WINDOW 5
+#define COLOR_WINDOWFRAME 6
+#define COLOR_MENUTEXT 7
+#define COLOR_WINDOWTEXT 8
+#define COLOR_CAPTIONTEXT 9
+#define COLOR_ACTIVEBORDER 10
+#define COLOR_INACTIVEBORDER 11
+#define COLOR_APPWORKSPACE 12
+#define COLOR_HIGHLIGHT 13
+#define COLOR_HIGHLIGHTTEXT 14
+#define COLOR_BTNFACE 15
+#define COLOR_BTNSHADOW 16
+#define COLOR_GRAYTEXT 17
+#define COLOR_BTNTEXT 18
+#define COLOR_INACTIVECAPTIONTEXT 19
+#define COLOR_BTNHIGHLIGHT 20
+
+#define COLOR_3DDKSHADOW 21
+#define COLOR_3DLIGHT 22
+#define COLOR_INFOTEXT 23
+#define COLOR_INFOBK 24
+
+#define COLOR_HOTLIGHT 26
+#define COLOR_GRADIENTACTIVECAPTION 27
+#define COLOR_GRADIENTINACTIVECAPTION 28
+#define COLOR_MENUHILIGHT 29
+#define COLOR_MENUBAR 30
+
+#define COLOR_DESKTOP COLOR_BACKGROUND
+#define COLOR_3DFACE COLOR_BTNFACE
+#define COLOR_3DSHADOW COLOR_BTNSHADOW
+#define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT
+#define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT
+#define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT
+
+ WINUSERAPI DWORD WINAPI GetSysColor(int nIndex);
+ WINUSERAPI HBRUSH WINAPI GetSysColorBrush(int nIndex);
+ WINUSERAPI WINBOOL WINAPI SetSysColors(int cElements,CONST INT *lpaElements,CONST COLORREF *lpaRgbValues);
+#endif
+
+ WINUSERAPI WINBOOL WINAPI DrawFocusRect(HDC hDC,CONST RECT *lprc);
+ WINUSERAPI int WINAPI FillRect(HDC hDC,CONST RECT *lprc,HBRUSH hbr);
+ WINUSERAPI int WINAPI FrameRect(HDC hDC,CONST RECT *lprc,HBRUSH hbr);
+ WINUSERAPI WINBOOL WINAPI InvertRect(HDC hDC,CONST RECT *lprc);
+ WINUSERAPI WINBOOL WINAPI SetRect(LPRECT lprc,int xLeft,int yTop,int xRight,int yBottom);
+ WINUSERAPI WINBOOL WINAPI SetRectEmpty(LPRECT lprc);
+ WINUSERAPI WINBOOL WINAPI CopyRect(LPRECT lprcDst,CONST RECT *lprcSrc);
+ WINUSERAPI WINBOOL WINAPI InflateRect(LPRECT lprc,int dx,int dy);
+ WINUSERAPI WINBOOL WINAPI IntersectRect(LPRECT lprcDst,CONST RECT *lprcSrc1,CONST RECT *lprcSrc2);
+ WINUSERAPI WINBOOL WINAPI UnionRect(LPRECT lprcDst,CONST RECT *lprcSrc1,CONST RECT *lprcSrc2);
+ WINUSERAPI WINBOOL WINAPI SubtractRect(LPRECT lprcDst,CONST RECT *lprcSrc1,CONST RECT *lprcSrc2);
+ WINUSERAPI WINBOOL WINAPI OffsetRect(LPRECT lprc,int dx,int dy);
+ WINUSERAPI WINBOOL WINAPI IsRectEmpty(CONST RECT *lprc);
+ WINUSERAPI WINBOOL WINAPI EqualRect(CONST RECT *lprc1,CONST RECT *lprc2);
+ WINUSERAPI WINBOOL WINAPI PtInRect(CONST RECT *lprc,POINT pt);
+
+#ifndef NOWINOFFSETS
+
+#ifdef UNICODE
+#define GetWindowLong GetWindowLongW
+#define SetWindowLong SetWindowLongW
+#else
+#define GetWindowLong GetWindowLongA
+#define SetWindowLong SetWindowLongA
+#endif
+
+ WINUSERAPI WORD WINAPI GetWindowWord(HWND hWnd,int nIndex);
+ WINUSERAPI WORD WINAPI SetWindowWord(HWND hWnd,int nIndex,WORD wNewWord);
+ WINUSERAPI LONG WINAPI GetWindowLongA(HWND hWnd,int nIndex);
+ WINUSERAPI LONG WINAPI GetWindowLongW(HWND hWnd,int nIndex);
+ WINUSERAPI LONG WINAPI SetWindowLongA(HWND hWnd,int nIndex,LONG dwNewLong);
+ WINUSERAPI LONG WINAPI SetWindowLongW(HWND hWnd,int nIndex,LONG dwNewLong);
+
+#ifdef _WIN64
+
+#ifdef UNICODE
+#define GetWindowLongPtr GetWindowLongPtrW
+#define SetWindowLongPtr SetWindowLongPtrW
+#else
+#define GetWindowLongPtr GetWindowLongPtrA
+#define SetWindowLongPtr SetWindowLongPtrA
+#endif
+
+ WINUSERAPI LONG_PTR WINAPI GetWindowLongPtrA(HWND hWnd,int nIndex);
+ WINUSERAPI LONG_PTR WINAPI GetWindowLongPtrW(HWND hWnd,int nIndex);
+ WINUSERAPI LONG_PTR WINAPI SetWindowLongPtrA(HWND hWnd,int nIndex,LONG_PTR dwNewLong);
+ WINUSERAPI LONG_PTR WINAPI SetWindowLongPtrW(HWND hWnd,int nIndex,LONG_PTR dwNewLong);
+#else
+
+#ifdef UNICODE
+#define GetWindowLongPtr GetWindowLongPtrW
+#define SetWindowLongPtr SetWindowLongPtrW
+#else
+#define GetWindowLongPtr GetWindowLongPtrA
+#define SetWindowLongPtr SetWindowLongPtrA
+#endif
+
+#define GetWindowLongPtrA GetWindowLongA
+#define GetWindowLongPtrW GetWindowLongW
+#define SetWindowLongPtrA SetWindowLongA
+#define SetWindowLongPtrW SetWindowLongW
+#endif
+
+#ifdef UNICODE
+#define GetClassLong GetClassLongW
+#define SetClassLong SetClassLongW
+#else
+#define GetClassLong GetClassLongA
+#define SetClassLong SetClassLongA
+#endif
+
+ WINUSERAPI WORD WINAPI GetClassWord(HWND hWnd,int nIndex);
+ WINUSERAPI WORD WINAPI SetClassWord(HWND hWnd,int nIndex,WORD wNewWord);
+ WINUSERAPI DWORD WINAPI GetClassLongA(HWND hWnd,int nIndex);
+ WINUSERAPI DWORD WINAPI GetClassLongW(HWND hWnd,int nIndex);
+ WINUSERAPI DWORD WINAPI SetClassLongA(HWND hWnd,int nIndex,LONG dwNewLong);
+ WINUSERAPI DWORD WINAPI SetClassLongW(HWND hWnd,int nIndex,LONG dwNewLong);
+
+#ifdef _WIN64
+
+#ifdef UNICODE
+#define GetClassLongPtr GetClassLongPtrW
+#define SetClassLongPtr SetClassLongPtrW
+#else
+#define GetClassLongPtr GetClassLongPtrA
+#define SetClassLongPtr SetClassLongPtrA
+#endif
+
+ WINUSERAPI ULONG_PTR WINAPI GetClassLongPtrA(HWND hWnd,int nIndex);
+ WINUSERAPI ULONG_PTR WINAPI GetClassLongPtrW(HWND hWnd,int nIndex);
+ WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrA(HWND hWnd,int nIndex,LONG_PTR dwNewLong);
+ WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrW(HWND hWnd,int nIndex,LONG_PTR dwNewLong);
+#else
+#ifdef UNICODE
+#define GetClassLongPtr GetClassLongPtrW
+#define SetClassLongPtr SetClassLongPtrW
+#else
+#define GetClassLongPtr GetClassLongPtrA
+#define SetClassLongPtr SetClassLongPtrA
+#endif
+
+#define GetClassLongPtrA GetClassLongA
+#define GetClassLongPtrW GetClassLongW
+#define SetClassLongPtrA SetClassLongA
+#define SetClassLongPtrW SetClassLongW
+#endif
+#endif
+
+#ifdef UNICODE
+#define FindWindow FindWindowW
+#define FindWindowEx FindWindowExW
+#define GetClassName GetClassNameW
+#else
+#define FindWindow FindWindowA
+#define FindWindowEx FindWindowExA
+#define GetClassName GetClassNameA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI GetProcessDefaultLayout(DWORD *pdwDefaultLayout);
+ WINUSERAPI WINBOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout);
+ WINUSERAPI HWND WINAPI GetDesktopWindow(VOID);
+ WINUSERAPI HWND WINAPI GetParent(HWND hWnd);
+ WINUSERAPI HWND WINAPI SetParent(HWND hWndChild,HWND hWndNewParent);
+ WINUSERAPI WINBOOL WINAPI EnumChildWindows(HWND hWndParent,WNDENUMPROC lpEnumFunc,LPARAM lParam);
+ WINUSERAPI HWND WINAPI FindWindowA(LPCSTR lpClassName,LPCSTR lpWindowName);
+ WINUSERAPI HWND WINAPI FindWindowW(LPCWSTR lpClassName,LPCWSTR lpWindowName);
+ WINUSERAPI HWND WINAPI FindWindowExA(HWND hWndParent,HWND hWndChildAfter,LPCSTR lpszClass,LPCSTR lpszWindow);
+ WINUSERAPI HWND WINAPI FindWindowExW(HWND hWndParent,HWND hWndChildAfter,LPCWSTR lpszClass,LPCWSTR lpszWindow);
+ WINUSERAPI HWND WINAPI GetShellWindow(VOID);
+ WINUSERAPI WINBOOL WINAPI RegisterShellHookWindow(HWND hwnd);
+ WINUSERAPI WINBOOL WINAPI DeregisterShellHookWindow(HWND hwnd);
+ WINUSERAPI WINBOOL WINAPI EnumWindows(WNDENUMPROC lpEnumFunc,LPARAM lParam);
+ WINUSERAPI WINBOOL WINAPI EnumThreadWindows(DWORD dwThreadId,WNDENUMPROC lpfn,LPARAM lParam);
+
+#define EnumTaskWindows(hTask,lpfn,lParam) EnumThreadWindows(HandleToUlong(hTask),lpfn,lParam)
+
+ WINUSERAPI int WINAPI GetClassNameA(HWND hWnd,LPSTR lpClassName,int nMaxCount);
+ WINUSERAPI int WINAPI GetClassNameW(HWND hWnd,LPWSTR lpClassName,int nMaxCount);
+ WINUSERAPI HWND WINAPI GetTopWindow(HWND hWnd);
+
+#define GetNextWindow(hWnd,wCmd) GetWindow(hWnd,wCmd)
+#define GetSysModalWindow() (NULL)
+#define SetSysModalWindow(hWnd) (NULL)
+
+ WINUSERAPI DWORD WINAPI GetWindowThreadProcessId(HWND hWnd,LPDWORD lpdwProcessId);
+ WINUSERAPI WINBOOL WINAPI IsGUIThread(WINBOOL bConvert);
+
+#define GetWindowTask(hWnd) ((HANDLE)(DWORD_PTR)GetWindowThreadProcessId(hWnd,NULL))
+
+ WINUSERAPI HWND WINAPI GetLastActivePopup(HWND hWnd);
+
+#define GW_HWNDFIRST 0
+#define GW_HWNDLAST 1
+#define GW_HWNDNEXT 2
+#define GW_HWNDPREV 3
+#define GW_OWNER 4
+#define GW_CHILD 5
+#define GW_ENABLEDPOPUP 6
+#define GW_MAX 6
+
+ WINUSERAPI HWND WINAPI GetWindow(HWND hWnd,UINT uCmd);
+
+#ifndef NOWH
+
+#ifdef UNICODE
+#define SetWindowsHook SetWindowsHookW
+#define SetWindowsHookEx SetWindowsHookExW
+#else
+#define SetWindowsHook SetWindowsHookA
+#define SetWindowsHookEx SetWindowsHookExA
+#endif
+
+ WINUSERAPI HHOOK WINAPI SetWindowsHookA(int nFilterType,HOOKPROC pfnFilterProc);
+ WINUSERAPI HHOOK WINAPI SetWindowsHookW(int nFilterType,HOOKPROC pfnFilterProc);
+ WINUSERAPI WINBOOL WINAPI UnhookWindowsHook(int nCode,HOOKPROC pfnFilterProc);
+ WINUSERAPI HHOOK WINAPI SetWindowsHookExA(int idHook,HOOKPROC lpfn,HINSTANCE hmod,DWORD dwThreadId);
+ WINUSERAPI HHOOK WINAPI SetWindowsHookExW(int idHook,HOOKPROC lpfn,HINSTANCE hmod,DWORD dwThreadId);
+ WINUSERAPI WINBOOL WINAPI UnhookWindowsHookEx(HHOOK hhk);
+ WINUSERAPI LRESULT WINAPI CallNextHookEx(HHOOK hhk,int nCode,WPARAM wParam,LPARAM lParam);
+#define DefHookProc(nCode,wParam,lParam,phhk) CallNextHookEx(*phhk,nCode,wParam,lParam)
+#endif
+
+#ifndef NOMENUS
+
+#define MF_INSERT 0x00000000L
+#define MF_CHANGE 0x00000080L
+#define MF_APPEND 0x00000100L
+#define MF_DELETE 0x00000200L
+#define MF_REMOVE 0x00001000L
+#define MF_BYCOMMAND 0x00000000L
+#define MF_BYPOSITION 0x00000400L
+#define MF_SEPARATOR 0x00000800L
+#define MF_ENABLED 0x00000000L
+#define MF_GRAYED 0x00000001L
+#define MF_DISABLED 0x00000002L
+#define MF_UNCHECKED 0x00000000L
+#define MF_CHECKED 0x00000008L
+#define MF_USECHECKBITMAPS 0x00000200L
+#define MF_STRING 0x00000000L
+#define MF_BITMAP 0x00000004L
+#define MF_OWNERDRAW 0x00000100L
+#define MF_POPUP 0x00000010L
+#define MF_MENUBARBREAK 0x00000020L
+#define MF_MENUBREAK 0x00000040L
+#define MF_UNHILITE 0x00000000L
+#define MF_HILITE 0x00000080L
+#define MF_DEFAULT 0x00001000L
+#define MF_SYSMENU 0x00002000L
+#define MF_HELP 0x00004000L
+#define MF_RIGHTJUSTIFY 0x00004000L
+#define MF_MOUSESELECT 0x00008000L
+#define MF_END 0x00000080L
+
+#define MFT_STRING MF_STRING
+#define MFT_BITMAP MF_BITMAP
+#define MFT_MENUBARBREAK MF_MENUBARBREAK
+#define MFT_MENUBREAK MF_MENUBREAK
+#define MFT_OWNERDRAW MF_OWNERDRAW
+#define MFT_RADIOCHECK 0x00000200L
+#define MFT_SEPARATOR MF_SEPARATOR
+#define MFT_RIGHTORDER 0x00002000L
+#define MFT_RIGHTJUSTIFY MF_RIGHTJUSTIFY
+
+#define MFS_GRAYED 0x00000003L
+#define MFS_DISABLED MFS_GRAYED
+#define MFS_CHECKED MF_CHECKED
+#define MFS_HILITE MF_HILITE
+#define MFS_ENABLED MF_ENABLED
+#define MFS_UNCHECKED MF_UNCHECKED
+#define MFS_UNHILITE MF_UNHILITE
+#define MFS_DEFAULT MF_DEFAULT
+
+ WINUSERAPI WINBOOL WINAPI CheckMenuRadioItem(HMENU hmenu,UINT first,UINT last,UINT check,UINT flags);
+
+ typedef struct {
+ WORD versionNumber;
+ WORD offset;
+ } MENUITEMTEMPLATEHEADER,*PMENUITEMTEMPLATEHEADER;
+
+ typedef struct {
+ WORD mtOption;
+ WORD mtID;
+ WCHAR mtString[1];
+ } MENUITEMTEMPLATE,*PMENUITEMTEMPLATE;
+#define MF_END 0x00000080L
+#endif
+
+#ifndef NOSYSCOMMANDS
+
+#define SC_SIZE 0xF000
+#define SC_MOVE 0xF010
+#define SC_MINIMIZE 0xF020
+#define SC_MAXIMIZE 0xF030
+#define SC_NEXTWINDOW 0xF040
+#define SC_PREVWINDOW 0xF050
+#define SC_CLOSE 0xF060
+#define SC_VSCROLL 0xF070
+#define SC_HSCROLL 0xF080
+#define SC_MOUSEMENU 0xF090
+#define SC_KEYMENU 0xF100
+#define SC_ARRANGE 0xF110
+#define SC_RESTORE 0xF120
+#define SC_TASKLIST 0xF130
+#define SC_SCREENSAVE 0xF140
+#define SC_HOTKEY 0xF150
+#define SC_DEFAULT 0xF160
+#define SC_MONITORPOWER 0xF170
+#define SC_CONTEXTHELP 0xF180
+#define SC_SEPARATOR 0xF00F
+#define SC_ICON SC_MINIMIZE
+#define SC_ZOOM SC_MAXIMIZE
+#endif
+
+#ifdef UNICODE
+#define LoadBitmap LoadBitmapW
+#define LoadCursor LoadCursorW
+#define LoadCursorFromFile LoadCursorFromFileW
+#else
+#define LoadBitmap LoadBitmapA
+#define LoadCursor LoadCursorA
+#define LoadCursorFromFile LoadCursorFromFileA
+#endif
+
+ WINUSERAPI HBITMAP WINAPI LoadBitmapA(HINSTANCE hInstance,LPCSTR lpBitmapName);
+ WINUSERAPI HBITMAP WINAPI LoadBitmapW(HINSTANCE hInstance,LPCWSTR lpBitmapName);
+ WINUSERAPI HCURSOR WINAPI LoadCursorA(HINSTANCE hInstance,LPCSTR lpCursorName);
+ WINUSERAPI HCURSOR WINAPI LoadCursorW(HINSTANCE hInstance,LPCWSTR lpCursorName);
+ WINUSERAPI HCURSOR WINAPI LoadCursorFromFileA(LPCSTR lpFileName);
+ WINUSERAPI HCURSOR WINAPI LoadCursorFromFileW(LPCWSTR lpFileName);
+ WINUSERAPI HCURSOR WINAPI CreateCursor(HINSTANCE hInst,int xHotSpot,int yHotSpot,int nWidth,int nHeight,CONST VOID *pvANDPlane,CONST VOID *pvXORPlane);
+ WINUSERAPI WINBOOL WINAPI DestroyCursor(HCURSOR hCursor);
+
+#define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur)))
+
+#define IDC_ARROW MAKEINTRESOURCE(32512)
+#define IDC_IBEAM MAKEINTRESOURCE(32513)
+#define IDC_WAIT MAKEINTRESOURCE(32514)
+#define IDC_CROSS MAKEINTRESOURCE(32515)
+#define IDC_UPARROW MAKEINTRESOURCE(32516)
+#define IDC_SIZE MAKEINTRESOURCE(32640)
+#define IDC_ICON MAKEINTRESOURCE(32641)
+#define IDC_SIZENWSE MAKEINTRESOURCE(32642)
+#define IDC_SIZENESW MAKEINTRESOURCE(32643)
+#define IDC_SIZEWE MAKEINTRESOURCE(32644)
+#define IDC_SIZENS MAKEINTRESOURCE(32645)
+#define IDC_SIZEALL MAKEINTRESOURCE(32646)
+#define IDC_NO MAKEINTRESOURCE(32648)
+#define IDC_HAND MAKEINTRESOURCE(32649)
+#define IDC_APPSTARTING MAKEINTRESOURCE(32650)
+#define IDC_HELP MAKEINTRESOURCE(32651)
+
+ WINUSERAPI WINBOOL WINAPI SetSystemCursor(HCURSOR hcur,DWORD id);
+
+ typedef struct _ICONINFO {
+ WINBOOL fIcon;
+ DWORD xHotspot;
+ DWORD yHotspot;
+ HBITMAP hbmMask;
+ HBITMAP hbmColor;
+ } ICONINFO;
+ typedef ICONINFO *PICONINFO;
+
+#ifdef UNICODE
+#define LoadIcon LoadIconW
+#define PrivateExtractIcons PrivateExtractIconsW
+#else
+#define LoadIcon LoadIconA
+#define PrivateExtractIcons PrivateExtractIconsA
+#endif
+
+ WINUSERAPI HICON WINAPI LoadIconA(HINSTANCE hInstance,LPCSTR lpIconName);
+ WINUSERAPI HICON WINAPI LoadIconW(HINSTANCE hInstance,LPCWSTR lpIconName);
+ WINUSERAPI UINT WINAPI PrivateExtractIconsA(LPCSTR szFileName,int nIconIndex,int cxIcon,int cyIcon,HICON *phicon,UINT *piconid,UINT nIcons,UINT flags);
+ WINUSERAPI UINT WINAPI PrivateExtractIconsW(LPCWSTR szFileName,int nIconIndex,int cxIcon,int cyIcon,HICON *phicon,UINT *piconid,UINT nIcons,UINT flags);
+ WINUSERAPI HICON WINAPI CreateIcon(HINSTANCE hInstance,int nWidth,int nHeight,BYTE cPlanes,BYTE cBitsPixel,CONST BYTE *lpbANDbits,CONST BYTE *lpbXORbits);
+ WINUSERAPI WINBOOL WINAPI DestroyIcon(HICON hIcon);
+ WINUSERAPI int WINAPI LookupIconIdFromDirectory(PBYTE presbits,WINBOOL fIcon);
+ WINUSERAPI int WINAPI LookupIconIdFromDirectoryEx(PBYTE presbits,WINBOOL fIcon,int cxDesired,int cyDesired,UINT Flags);
+ WINUSERAPI HICON WINAPI CreateIconFromResource(PBYTE presbits,DWORD dwResSize,WINBOOL fIcon,DWORD dwVer);
+ WINUSERAPI HICON WINAPI CreateIconFromResourceEx(PBYTE presbits,DWORD dwResSize,WINBOOL fIcon,DWORD dwVer,int cxDesired,int cyDesired,UINT Flags);
+
+ typedef struct tagCURSORSHAPE {
+ int xHotSpot;
+ int yHotSpot;
+ int cx;
+ int cy;
+ int cbWidth;
+ BYTE Planes;
+ BYTE BitsPixel;
+ } CURSORSHAPE,*LPCURSORSHAPE;
+
+#define IMAGE_BITMAP 0
+#define IMAGE_ICON 1
+#define IMAGE_CURSOR 2
+#define IMAGE_ENHMETAFILE 3
+
+#define LR_DEFAULTCOLOR 0x0000
+#define LR_MONOCHROME 0x0001
+#define LR_COLOR 0x0002
+#define LR_COPYRETURNORG 0x0004
+#define LR_COPYDELETEORG 0x0008
+#define LR_LOADFROMFILE 0x0010
+#define LR_LOADTRANSPARENT 0x0020
+#define LR_DEFAULTSIZE 0x0040
+#define LR_VGACOLOR 0x0080
+#define LR_LOADMAP3DCOLORS 0x1000
+#define LR_CREATEDIBSECTION 0x2000
+#define LR_COPYFROMRESOURCE 0x4000
+#define LR_SHARED 0x8000
+
+#ifdef UNICODE
+#define LoadImage LoadImageW
+#else
+#define LoadImage LoadImageA
+#endif
+
+ WINUSERAPI HANDLE WINAPI LoadImageA(HINSTANCE hInst,LPCSTR name,UINT type,int cx,int cy,UINT fuLoad);
+ WINUSERAPI HANDLE WINAPI LoadImageW(HINSTANCE hInst,LPCWSTR name,UINT type,int cx,int cy,UINT fuLoad);
+ WINUSERAPI HANDLE WINAPI CopyImage(HANDLE h,UINT type,int cx,int cy,UINT flags);
+
+#define DI_MASK 0x0001
+#define DI_IMAGE 0x0002
+#define DI_NORMAL 0x0003
+#define DI_COMPAT 0x0004
+#define DI_DEFAULTSIZE 0x0008
+#define DI_NOMIRROR 0x0010
+
+ WINUSERAPI WINBOOL WINAPI DrawIconEx(HDC hdc,int xLeft,int yTop,HICON hIcon,int cxWidth,int cyWidth,UINT istepIfAniCur,HBRUSH hbrFlickerFreeDraw,UINT diFlags);
+ WINUSERAPI HICON WINAPI CreateIconIndirect(PICONINFO piconinfo);
+ WINUSERAPI HICON WINAPI CopyIcon(HICON hIcon);
+ WINUSERAPI WINBOOL WINAPI GetIconInfo(HICON hIcon,PICONINFO piconinfo);
+
+#define RES_ICON 1
+#define RES_CURSOR 2
+
+#ifdef OEMRESOURCE
+
+#define OBM_CLOSE 32754
+#define OBM_UPARROW 32753
+#define OBM_DNARROW 32752
+#define OBM_RGARROW 32751
+#define OBM_LFARROW 32750
+#define OBM_REDUCE 32749
+#define OBM_ZOOM 32748
+#define OBM_RESTORE 32747
+#define OBM_REDUCED 32746
+#define OBM_ZOOMD 32745
+#define OBM_RESTORED 32744
+#define OBM_UPARROWD 32743
+#define OBM_DNARROWD 32742
+#define OBM_RGARROWD 32741
+#define OBM_LFARROWD 32740
+#define OBM_MNARROW 32739
+#define OBM_COMBO 32738
+#define OBM_UPARROWI 32737
+#define OBM_DNARROWI 32736
+#define OBM_RGARROWI 32735
+#define OBM_LFARROWI 32734
+
+#define OBM_OLD_CLOSE 32767
+#define OBM_SIZE 32766
+#define OBM_OLD_UPARROW 32765
+#define OBM_OLD_DNARROW 32764
+#define OBM_OLD_RGARROW 32763
+#define OBM_OLD_LFARROW 32762
+#define OBM_BTSIZE 32761
+#define OBM_CHECK 32760
+#define OBM_CHECKBOXES 32759
+#define OBM_BTNCORNERS 32758
+#define OBM_OLD_REDUCE 32757
+#define OBM_OLD_ZOOM 32756
+#define OBM_OLD_RESTORE 32755
+
+#define OCR_NORMAL 32512
+#define OCR_IBEAM 32513
+#define OCR_WAIT 32514
+#define OCR_CROSS 32515
+#define OCR_UP 32516
+#define OCR_SIZE 32640
+#define OCR_ICON 32641
+#define OCR_SIZENWSE 32642
+#define OCR_SIZENESW 32643
+#define OCR_SIZEWE 32644
+#define OCR_SIZENS 32645
+#define OCR_SIZEALL 32646
+#define OCR_ICOCUR 32647
+#define OCR_NO 32648
+#define OCR_HAND 32649
+#define OCR_APPSTARTING 32650
+
+#define OIC_SAMPLE 32512
+#define OIC_HAND 32513
+#define OIC_QUES 32514
+#define OIC_BANG 32515
+#define OIC_NOTE 32516
+#define OIC_WINLOGO 32517
+#define OIC_WARNING OIC_BANG
+#define OIC_ERROR OIC_HAND
+#define OIC_INFORMATION OIC_NOTE
+#endif
+
+#define ORD_LANGDRIVER 1
+
+#ifndef NOICONS
+
+#ifdef RC_INVOKED
+#define IDI_APPLICATION 32512
+#define IDI_HAND 32513
+#define IDI_QUESTION 32514
+#define IDI_EXCLAMATION 32515
+#define IDI_ASTERISK 32516
+#define IDI_WINLOGO 32517
+#else
+#define IDI_APPLICATION MAKEINTRESOURCE(32512)
+#define IDI_HAND MAKEINTRESOURCE(32513)
+#define IDI_QUESTION MAKEINTRESOURCE(32514)
+#define IDI_EXCLAMATION MAKEINTRESOURCE(32515)
+#define IDI_ASTERISK MAKEINTRESOURCE(32516)
+#define IDI_WINLOGO MAKEINTRESOURCE(32517)
+#endif
+
+#define IDI_WARNING IDI_EXCLAMATION
+#define IDI_ERROR IDI_HAND
+#define IDI_INFORMATION IDI_ASTERISK
+#endif
+
+#ifdef UNICODE
+#define LoadString LoadStringW
+#else
+#define LoadString LoadStringA
+#endif
+
+ WINUSERAPI int WINAPI LoadStringA(HINSTANCE hInstance,UINT uID,LPSTR lpBuffer,int cchBufferMax);
+ WINUSERAPI int WINAPI LoadStringW(HINSTANCE hInstance,UINT uID,LPWSTR lpBuffer,int cchBufferMax);
+
+#define IDOK 1
+#define IDCANCEL 2
+#define IDABORT 3
+#define IDRETRY 4
+#define IDIGNORE 5
+#define IDYES 6
+#define IDNO 7
+#define IDCLOSE 8
+#define IDHELP 9
+#define IDTRYAGAIN 10
+#define IDCONTINUE 11
+
+#ifndef IDTIMEOUT
+#define IDTIMEOUT 32000
+#endif
+
+#ifndef NOCTLMGR
+
+#ifndef NOWINSTYLES
+#define ES_LEFT 0x0000L
+#define ES_CENTER 0x0001L
+#define ES_RIGHT 0x0002L
+#define ES_MULTILINE 0x0004L
+#define ES_UPPERCASE 0x0008L
+#define ES_LOWERCASE 0x0010L
+#define ES_PASSWORD 0x0020L
+#define ES_AUTOVSCROLL 0x0040L
+#define ES_AUTOHSCROLL 0x0080L
+#define ES_NOHIDESEL 0x0100L
+#define ES_OEMCONVERT 0x0400L
+#define ES_READONLY 0x0800L
+#define ES_WANTRETURN 0x1000L
+#define ES_NUMBER 0x2000L
+#endif
+
+#define EN_SETFOCUS 0x0100
+#define EN_KILLFOCUS 0x0200
+#define EN_CHANGE 0x0300
+#define EN_UPDATE 0x0400
+#define EN_ERRSPACE 0x0500
+#define EN_MAXTEXT 0x0501
+#define EN_HSCROLL 0x0601
+#define EN_VSCROLL 0x0602
+#define EN_ALIGN_LTR_EC 0x0700
+#define EN_ALIGN_RTL_EC 0x0701
+
+#define EC_LEFTMARGIN 0x0001
+#define EC_RIGHTMARGIN 0x0002
+#define EC_USEFONTINFO 0xffff
+
+#define EMSIS_COMPOSITIONSTRING 0x0001
+
+#define EIMES_GETCOMPSTRATONCE 0x0001
+#define EIMES_CANCELCOMPSTRINFOCUS 0x0002
+#define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004
+
+#ifndef NOWINMESSAGES
+
+#define EM_GETSEL 0x00B0
+#define EM_SETSEL 0x00B1
+#define EM_GETRECT 0x00B2
+#define EM_SETRECT 0x00B3
+#define EM_SETRECTNP 0x00B4
+#define EM_SCROLL 0x00B5
+#define EM_LINESCROLL 0x00B6
+#define EM_SCROLLCARET 0x00B7
+#define EM_GETMODIFY 0x00B8
+#define EM_SETMODIFY 0x00B9
+#define EM_GETLINECOUNT 0x00BA
+#define EM_LINEINDEX 0x00BB
+#define EM_SETHANDLE 0x00BC
+#define EM_GETHANDLE 0x00BD
+#define EM_GETTHUMB 0x00BE
+#define EM_LINELENGTH 0x00C1
+#define EM_REPLACESEL 0x00C2
+#define EM_GETLINE 0x00C4
+#define EM_LIMITTEXT 0x00C5
+#define EM_CANUNDO 0x00C6
+#define EM_UNDO 0x00C7
+#define EM_FMTLINES 0x00C8
+#define EM_LINEFROMCHAR 0x00C9
+#define EM_SETTABSTOPS 0x00CB
+#define EM_SETPASSWORDCHAR 0x00CC
+#define EM_EMPTYUNDOBUFFER 0x00CD
+#define EM_GETFIRSTVISIBLELINE 0x00CE
+#define EM_SETREADONLY 0x00CF
+#define EM_SETWORDBREAKPROC 0x00D0
+#define EM_GETWORDBREAKPROC 0x00D1
+#define EM_GETPASSWORDCHAR 0x00D2
+#define EM_SETMARGINS 0x00D3
+#define EM_GETMARGINS 0x00D4
+#define EM_SETLIMITTEXT EM_LIMITTEXT
+#define EM_GETLIMITTEXT 0x00D5
+#define EM_POSFROMCHAR 0x00D6
+#define EM_CHARFROMPOS 0x00D7
+#define EM_SETIMESTATUS 0x00D8
+#define EM_GETIMESTATUS 0x00D9
+#endif
+
+#define WB_LEFT 0
+#define WB_RIGHT 1
+#define WB_ISDELIMITER 2
+
+#define BS_PUSHBUTTON 0x00000000L
+#define BS_DEFPUSHBUTTON 0x00000001L
+#define BS_CHECKBOX 0x00000002L
+#define BS_AUTOCHECKBOX 0x00000003L
+#define BS_RADIOBUTTON 0x00000004L
+#define BS_3STATE 0x00000005L
+#define BS_AUTO3STATE 0x00000006L
+#define BS_GROUPBOX 0x00000007L
+#define BS_USERBUTTON 0x00000008L
+#define BS_AUTORADIOBUTTON 0x00000009L
+#define BS_PUSHBOX 0x0000000AL
+#define BS_OWNERDRAW 0x0000000BL
+#define BS_TYPEMASK 0x0000000FL
+#define BS_LEFTTEXT 0x00000020L
+#define BS_TEXT 0x00000000L
+#define BS_ICON 0x00000040L
+#define BS_BITMAP 0x00000080L
+#define BS_LEFT 0x00000100L
+#define BS_RIGHT 0x00000200L
+#define BS_CENTER 0x00000300L
+#define BS_TOP 0x00000400L
+#define BS_BOTTOM 0x00000800L
+#define BS_VCENTER 0x00000C00L
+#define BS_PUSHLIKE 0x00001000L
+#define BS_MULTILINE 0x00002000L
+#define BS_NOTIFY 0x00004000L
+#define BS_FLAT 0x00008000L
+#define BS_RIGHTBUTTON BS_LEFTTEXT
+
+#define BN_CLICKED 0
+#define BN_PAINT 1
+#define BN_HILITE 2
+#define BN_UNHILITE 3
+#define BN_DISABLE 4
+#define BN_DOUBLECLICKED 5
+#define BN_PUSHED BN_HILITE
+#define BN_UNPUSHED BN_UNHILITE
+#define BN_DBLCLK BN_DOUBLECLICKED
+#define BN_SETFOCUS 6
+#define BN_KILLFOCUS 7
+
+#define BM_GETCHECK 0x00F0
+#define BM_SETCHECK 0x00F1
+#define BM_GETSTATE 0x00F2
+#define BM_SETSTATE 0x00F3
+#define BM_SETSTYLE 0x00F4
+#define BM_CLICK 0x00F5
+#define BM_GETIMAGE 0x00F6
+#define BM_SETIMAGE 0x00F7
+
+#define BST_UNCHECKED 0x0000
+#define BST_CHECKED 0x0001
+#define BST_INDETERMINATE 0x0002
+#define BST_PUSHED 0x0004
+#define BST_FOCUS 0x0008
+
+#define SS_LEFT 0x00000000L
+#define SS_CENTER 0x00000001L
+#define SS_RIGHT 0x00000002L
+#define SS_ICON 0x00000003L
+#define SS_BLACKRECT 0x00000004L
+#define SS_GRAYRECT 0x00000005L
+#define SS_WHITERECT 0x00000006L
+#define SS_BLACKFRAME 0x00000007L
+#define SS_GRAYFRAME 0x00000008L
+#define SS_WHITEFRAME 0x00000009L
+#define SS_USERITEM 0x0000000AL
+#define SS_SIMPLE 0x0000000BL
+#define SS_LEFTNOWORDWRAP 0x0000000CL
+#define SS_OWNERDRAW 0x0000000DL
+#define SS_BITMAP 0x0000000EL
+#define SS_ENHMETAFILE 0x0000000FL
+#define SS_ETCHEDHORZ 0x00000010L
+#define SS_ETCHEDVERT 0x00000011L
+#define SS_ETCHEDFRAME 0x00000012L
+#define SS_TYPEMASK 0x0000001FL
+#define SS_REALSIZECONTROL 0x00000040L
+#define SS_NOPREFIX 0x00000080L
+#define SS_NOTIFY 0x00000100L
+#define SS_CENTERIMAGE 0x00000200L
+#define SS_RIGHTJUST 0x00000400L
+#define SS_REALSIZEIMAGE 0x00000800L
+#define SS_SUNKEN 0x00001000L
+#define SS_EDITCONTROL 0x00002000L
+#define SS_ENDELLIPSIS 0x00004000L
+#define SS_PATHELLIPSIS 0x00008000L
+#define SS_WORDELLIPSIS 0x0000C000L
+#define SS_ELLIPSISMASK 0x0000C000L
+
+#ifndef NOWINMESSAGES
+
+#define STM_SETICON 0x0170
+#define STM_GETICON 0x0171
+#define STM_SETIMAGE 0x0172
+#define STM_GETIMAGE 0x0173
+#define STN_CLICKED 0
+#define STN_DBLCLK 1
+#define STN_ENABLE 2
+#define STN_DISABLE 3
+#define STM_MSGMAX 0x0174
+#endif
+
+#define WC_DIALOG (MAKEINTATOM(0x8002))
+
+#define DWL_MSGRESULT 0
+#define DWL_DLGPROC 4
+#define DWL_USER 8
+
+#ifdef _WIN64
+
+#undef DWL_MSGRESULT
+#undef DWL_DLGPROC
+#undef DWL_USER
+#endif
+
+#define DWLP_MSGRESULT 0
+#define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT)
+#define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC)
+
+#ifndef NOMSG
+
+#ifdef UNICODE
+#define IsDialogMessage IsDialogMessageW
+#else
+#define IsDialogMessage IsDialogMessageA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI IsDialogMessageA(HWND hDlg,LPMSG lpMsg);
+ WINUSERAPI WINBOOL WINAPI IsDialogMessageW(HWND hDlg,LPMSG lpMsg);
+#endif
+
+#ifdef UNICODE
+#define DlgDirList DlgDirListW
+#define DlgDirSelectEx DlgDirSelectExW
+#define DlgDirListComboBox DlgDirListComboBoxW
+#define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExW
+#else
+#define DlgDirList DlgDirListA
+#define DlgDirSelectEx DlgDirSelectExA
+#define DlgDirListComboBox DlgDirListComboBoxA
+#define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI MapDialogRect(HWND hDlg,LPRECT lpRect);
+ WINUSERAPI int WINAPI DlgDirListA(HWND hDlg,LPSTR lpPathSpec,int nIDListBox,int nIDStaticPath,UINT uFileType);
+ WINUSERAPI int WINAPI DlgDirListW(HWND hDlg,LPWSTR lpPathSpec,int nIDListBox,int nIDStaticPath,UINT uFileType);
+
+#define DDL_READWRITE 0x0000
+#define DDL_READONLY 0x0001
+#define DDL_HIDDEN 0x0002
+#define DDL_SYSTEM 0x0004
+#define DDL_DIRECTORY 0x0010
+#define DDL_ARCHIVE 0x0020
+
+#define DDL_POSTMSGS 0x2000
+#define DDL_DRIVES 0x4000
+#define DDL_EXCLUSIVE 0x8000
+
+ WINUSERAPI WINBOOL WINAPI DlgDirSelectExA(HWND hwndDlg,LPSTR lpString,int chCount,int idListBox);
+ WINUSERAPI WINBOOL WINAPI DlgDirSelectExW(HWND hwndDlg,LPWSTR lpString,int chCount,int idListBox);
+ WINUSERAPI int WINAPI DlgDirListComboBoxA(HWND hDlg,LPSTR lpPathSpec,int nIDComboBox,int nIDStaticPath,UINT uFiletype);
+ WINUSERAPI int WINAPI DlgDirListComboBoxW(HWND hDlg,LPWSTR lpPathSpec,int nIDComboBox,int nIDStaticPath,UINT uFiletype);
+ WINUSERAPI WINBOOL WINAPI DlgDirSelectComboBoxExA(HWND hwndDlg,LPSTR lpString,int cchOut,int idComboBox);
+ WINUSERAPI WINBOOL WINAPI DlgDirSelectComboBoxExW(HWND hwndDlg,LPWSTR lpString,int cchOut,int idComboBox);
+
+#define DS_ABSALIGN 0x01L
+#define DS_SYSMODAL 0x02L
+#define DS_LOCALEDIT 0x20L
+#define DS_SETFONT 0x40L
+#define DS_MODALFRAME 0x80L
+#define DS_NOIDLEMSG 0x100L
+#define DS_SETFOREGROUND 0x200L
+
+#define DS_3DLOOK 0x0004L
+#define DS_FIXEDSYS 0x0008L
+#define DS_NOFAILCREATE 0x0010L
+#define DS_CONTROL 0x0400L
+#define DS_CENTER 0x0800L
+#define DS_CENTERMOUSE 0x1000L
+#define DS_CONTEXTHELP 0x2000L
+
+#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
+
+#if(_WIN32_WCE >= 0x0500)
+#define DS_USEPIXELS 0x8000L
+#endif
+
+#define DM_GETDEFID (WM_USER+0)
+#define DM_SETDEFID (WM_USER+1)
+#define DM_REPOSITION (WM_USER+2)
+
+#define DC_HASDEFID 0x534B
+
+#define DLGC_WANTARROWS 0x0001
+#define DLGC_WANTTAB 0x0002
+#define DLGC_WANTALLKEYS 0x0004
+#define DLGC_WANTMESSAGE 0x0004
+#define DLGC_HASSETSEL 0x0008
+#define DLGC_DEFPUSHBUTTON 0x0010
+#define DLGC_UNDEFPUSHBUTTON 0x0020
+#define DLGC_RADIOBUTTON 0x0040
+#define DLGC_WANTCHARS 0x0080
+#define DLGC_STATIC 0x0100
+#define DLGC_BUTTON 0x2000
+
+#define LB_CTLCODE 0L
+
+#define LB_OKAY 0
+#define LB_ERR (-1)
+#define LB_ERRSPACE (-2)
+
+#define LBN_ERRSPACE (-2)
+#define LBN_SELCHANGE 1
+#define LBN_DBLCLK 2
+#define LBN_SELCANCEL 3
+#define LBN_SETFOCUS 4
+#define LBN_KILLFOCUS 5
+
+#ifndef NOWINMESSAGES
+
+#define LB_ADDSTRING 0x0180
+#define LB_INSERTSTRING 0x0181
+#define LB_DELETESTRING 0x0182
+#define LB_SELITEMRANGEEX 0x0183
+#define LB_RESETCONTENT 0x0184
+#define LB_SETSEL 0x0185
+#define LB_SETCURSEL 0x0186
+#define LB_GETSEL 0x0187
+#define LB_GETCURSEL 0x0188
+#define LB_GETTEXT 0x0189
+#define LB_GETTEXTLEN 0x018A
+#define LB_GETCOUNT 0x018B
+#define LB_SELECTSTRING 0x018C
+#define LB_DIR 0x018D
+#define LB_GETTOPINDEX 0x018E
+#define LB_FINDSTRING 0x018F
+#define LB_GETSELCOUNT 0x0190
+#define LB_GETSELITEMS 0x0191
+#define LB_SETTABSTOPS 0x0192
+#define LB_GETHORIZONTALEXTENT 0x0193
+#define LB_SETHORIZONTALEXTENT 0x0194
+#define LB_SETCOLUMNWIDTH 0x0195
+#define LB_ADDFILE 0x0196
+#define LB_SETTOPINDEX 0x0197
+#define LB_GETITEMRECT 0x0198
+#define LB_GETITEMDATA 0x0199
+#define LB_SETITEMDATA 0x019A
+#define LB_SELITEMRANGE 0x019B
+#define LB_SETANCHORINDEX 0x019C
+#define LB_GETANCHORINDEX 0x019D
+#define LB_SETCARETINDEX 0x019E
+#define LB_GETCARETINDEX 0x019F
+#define LB_SETITEMHEIGHT 0x01A0
+#define LB_GETITEMHEIGHT 0x01A1
+#define LB_FINDSTRINGEXACT 0x01A2
+#define LB_SETLOCALE 0x01A5
+#define LB_GETLOCALE 0x01A6
+#define LB_SETCOUNT 0x01A7
+#define LB_INITSTORAGE 0x01A8
+#define LB_ITEMFROMPOINT 0x01A9
+#if(_WIN32_WCE >= 0x0400)
+#define LB_MULTIPLEADDSTRING 0x01B1
+#endif
+#define LB_GETLISTBOXINFO 0x01B2
+#define LB_MSGMAX 0x01B3
+#endif
+
+#ifndef NOWINSTYLES
+
+#define LBS_NOTIFY 0x0001L
+#define LBS_SORT 0x0002L
+#define LBS_NOREDRAW 0x0004L
+#define LBS_MULTIPLESEL 0x0008L
+#define LBS_OWNERDRAWFIXED 0x0010L
+#define LBS_OWNERDRAWVARIABLE 0x0020L
+#define LBS_HASSTRINGS 0x0040L
+#define LBS_USETABSTOPS 0x0080L
+#define LBS_NOINTEGRALHEIGHT 0x0100L
+#define LBS_MULTICOLUMN 0x0200L
+#define LBS_WANTKEYBOARDINPUT 0x0400L
+#define LBS_EXTENDEDSEL 0x0800L
+#define LBS_DISABLENOSCROLL 0x1000L
+#define LBS_NODATA 0x2000L
+#define LBS_NOSEL 0x4000L
+#define LBS_COMBOBOX 0x8000L
+
+#define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
+#endif
+
+#define CB_OKAY 0
+#define CB_ERR (-1)
+#define CB_ERRSPACE (-2)
+
+#define CBN_ERRSPACE (-1)
+#define CBN_SELCHANGE 1
+#define CBN_DBLCLK 2
+#define CBN_SETFOCUS 3
+#define CBN_KILLFOCUS 4
+#define CBN_EDITCHANGE 5
+#define CBN_EDITUPDATE 6
+#define CBN_DROPDOWN 7
+#define CBN_CLOSEUP 8
+#define CBN_SELENDOK 9
+#define CBN_SELENDCANCEL 10
+
+#ifndef NOWINSTYLES
+
+#define CBS_SIMPLE 0x0001L
+#define CBS_DROPDOWN 0x0002L
+#define CBS_DROPDOWNLIST 0x0003L
+#define CBS_OWNERDRAWFIXED 0x0010L
+#define CBS_OWNERDRAWVARIABLE 0x0020L
+#define CBS_AUTOHSCROLL 0x0040L
+#define CBS_OEMCONVERT 0x0080L
+#define CBS_SORT 0x0100L
+#define CBS_HASSTRINGS 0x0200L
+#define CBS_NOINTEGRALHEIGHT 0x0400L
+#define CBS_DISABLENOSCROLL 0x0800L
+#define CBS_UPPERCASE 0x2000L
+#define CBS_LOWERCASE 0x4000L
+#endif
+
+#ifndef NOWINMESSAGES
+#define CB_GETEDITSEL 0x0140
+#define CB_LIMITTEXT 0x0141
+#define CB_SETEDITSEL 0x0142
+#define CB_ADDSTRING 0x0143
+#define CB_DELETESTRING 0x0144
+#define CB_DIR 0x0145
+#define CB_GETCOUNT 0x0146
+#define CB_GETCURSEL 0x0147
+#define CB_GETLBTEXT 0x0148
+#define CB_GETLBTEXTLEN 0x0149
+#define CB_INSERTSTRING 0x014A
+#define CB_RESETCONTENT 0x014B
+#define CB_FINDSTRING 0x014C
+#define CB_SELECTSTRING 0x014D
+#define CB_SETCURSEL 0x014E
+#define CB_SHOWDROPDOWN 0x014F
+#define CB_GETITEMDATA 0x0150
+#define CB_SETITEMDATA 0x0151
+#define CB_GETDROPPEDCONTROLRECT 0x0152
+#define CB_SETITEMHEIGHT 0x0153
+#define CB_GETITEMHEIGHT 0x0154
+#define CB_SETEXTENDEDUI 0x0155
+#define CB_GETEXTENDEDUI 0x0156
+#define CB_GETDROPPEDSTATE 0x0157
+#define CB_FINDSTRINGEXACT 0x0158
+#define CB_SETLOCALE 0x0159
+#define CB_GETLOCALE 0x015A
+#define CB_GETTOPINDEX 0x015b
+#define CB_SETTOPINDEX 0x015c
+#define CB_GETHORIZONTALEXTENT 0x015d
+#define CB_SETHORIZONTALEXTENT 0x015e
+#define CB_GETDROPPEDWIDTH 0x015f
+#define CB_SETDROPPEDWIDTH 0x0160
+#define CB_INITSTORAGE 0x0161
+#if(_WIN32_WCE >= 0x0400)
+#define CB_MULTIPLEADDSTRING 0x0163
+#endif
+#define CB_GETCOMBOBOXINFO 0x0164
+#define CB_MSGMAX 0x0165
+#endif
+
+#ifndef NOWINSTYLES
+
+#define SBS_HORZ 0x0000L
+#define SBS_VERT 0x0001L
+#define SBS_TOPALIGN 0x0002L
+#define SBS_LEFTALIGN 0x0002L
+#define SBS_BOTTOMALIGN 0x0004L
+#define SBS_RIGHTALIGN 0x0004L
+#define SBS_SIZEBOXTOPLEFTALIGN 0x0002L
+#define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
+#define SBS_SIZEBOX 0x0008L
+#define SBS_SIZEGRIP 0x0010L
+#endif
+
+#ifndef NOWINMESSAGES
+#define SBM_SETPOS 0x00E0
+#define SBM_GETPOS 0x00E1
+#define SBM_SETRANGE 0x00E2
+#define SBM_SETRANGEREDRAW 0x00E6
+#define SBM_GETRANGE 0x00E3
+#define SBM_ENABLE_ARROWS 0x00E4
+#define SBM_SETSCROLLINFO 0x00E9
+#define SBM_GETSCROLLINFO 0x00EA
+#define SBM_GETSCROLLBARINFO 0x00EB
+
+#define SIF_RANGE 0x0001
+#define SIF_PAGE 0x0002
+#define SIF_POS 0x0004
+#define SIF_DISABLENOSCROLL 0x0008
+#define SIF_TRACKPOS 0x0010
+#define SIF_ALL (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
+
+ typedef struct tagSCROLLINFO {
+ UINT cbSize;
+ UINT fMask;
+ int nMin;
+ int nMax;
+ UINT nPage;
+ int nPos;
+ int nTrackPos;
+ } SCROLLINFO,*LPSCROLLINFO;
+ typedef SCROLLINFO CONST *LPCSCROLLINFO;
+
+ WINUSERAPI int WINAPI SetScrollInfo(HWND hwnd,int nBar,LPCSCROLLINFO lpsi,WINBOOL redraw);
+ WINUSERAPI WINBOOL WINAPI GetScrollInfo(HWND hwnd,int nBar,LPSCROLLINFO lpsi);
+#endif
+#endif
+
+#ifndef NOMDI
+
+#define MDIS_ALLCHILDSTYLES 0x0001
+
+#define MDITILE_VERTICAL 0x0000
+#define MDITILE_HORIZONTAL 0x0001
+#define MDITILE_SKIPDISABLED 0x0002
+#define MDITILE_ZORDER 0x0004
+
+ typedef struct tagMDICREATESTRUCTA {
+ LPCSTR szClass;
+ LPCSTR szTitle;
+ HANDLE hOwner;
+ int x;
+ int y;
+ int cx;
+ int cy;
+ DWORD style;
+ LPARAM lParam;
+ } MDICREATESTRUCTA,*LPMDICREATESTRUCTA;
+
+ typedef struct tagMDICREATESTRUCTW {
+ LPCWSTR szClass;
+ LPCWSTR szTitle;
+ HANDLE hOwner;
+ int x;
+ int y;
+ int cx;
+ int cy;
+ DWORD style;
+ LPARAM lParam;
+ } MDICREATESTRUCTW,*LPMDICREATESTRUCTW;
+
+#ifdef UNICODE
+ typedef MDICREATESTRUCTW MDICREATESTRUCT;
+ typedef LPMDICREATESTRUCTW LPMDICREATESTRUCT;
+#else
+ typedef MDICREATESTRUCTA MDICREATESTRUCT;
+ typedef LPMDICREATESTRUCTA LPMDICREATESTRUCT;
+#endif
+
+ typedef struct tagCLIENTCREATESTRUCT {
+ HANDLE hWindowMenu;
+ UINT idFirstChild;
+ } CLIENTCREATESTRUCT,*LPCLIENTCREATESTRUCT;
+
+#ifdef UNICODE
+#define DefFrameProc DefFrameProcW
+#define DefMDIChildProc DefMDIChildProcW
+#define CreateMDIWindow CreateMDIWindowW
+#else
+#define DefFrameProc DefFrameProcA
+#define DefMDIChildProc DefMDIChildProcA
+#define CreateMDIWindow CreateMDIWindowA
+#endif
+
+ WINUSERAPI LRESULT WINAPI DefFrameProcA(HWND hWnd,HWND hWndMDIClient,UINT uMsg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI DefFrameProcW(HWND hWnd,HWND hWndMDIClient,UINT uMsg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI DefMDIChildProcA(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
+ WINUSERAPI LRESULT WINAPI DefMDIChildProcW(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
+
+#ifndef NOMSG
+ WINUSERAPI WINBOOL WINAPI TranslateMDISysAccel(HWND hWndClient,LPMSG lpMsg);
+#endif
+
+ WINUSERAPI UINT WINAPI ArrangeIconicWindows(HWND hWnd);
+ WINUSERAPI HWND WINAPI CreateMDIWindowA(LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HINSTANCE hInstance,LPARAM lParam);
+ WINUSERAPI HWND WINAPI CreateMDIWindowW(LPCWSTR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HINSTANCE hInstance,LPARAM lParam);
+ WINUSERAPI WORD WINAPI TileWindows(HWND hwndParent,UINT wHow,CONST RECT *lpRect,UINT cKids,const HWND *lpKids);
+ WINUSERAPI WORD WINAPI CascadeWindows(HWND hwndParent,UINT wHow,CONST RECT *lpRect,UINT cKids,const HWND *lpKids);
+#endif
+#endif
+
+#ifndef NOHELP
+
+ typedef DWORD HELPPOLY;
+ typedef struct tagMULTIKEYHELPA {
+ DWORD mkSize;
+ CHAR mkKeylist;
+ CHAR szKeyphrase[1];
+ } MULTIKEYHELPA,*PMULTIKEYHELPA,*LPMULTIKEYHELPA;
+
+ typedef struct tagMULTIKEYHELPW {
+ DWORD mkSize;
+ WCHAR mkKeylist;
+ WCHAR szKeyphrase[1];
+ } MULTIKEYHELPW,*PMULTIKEYHELPW,*LPMULTIKEYHELPW;
+
+#ifdef UNICODE
+ typedef MULTIKEYHELPW MULTIKEYHELP;
+ typedef PMULTIKEYHELPW PMULTIKEYHELP;
+ typedef LPMULTIKEYHELPW LPMULTIKEYHELP;
+#else
+ typedef MULTIKEYHELPA MULTIKEYHELP;
+ typedef PMULTIKEYHELPA PMULTIKEYHELP;
+ typedef LPMULTIKEYHELPA LPMULTIKEYHELP;
+#endif
+
+ typedef struct tagHELPWININFOA {
+ int wStructSize;
+ int x;
+ int y;
+ int dx;
+ int dy;
+ int wMax;
+ CHAR rgchMember[2];
+ } HELPWININFOA,*PHELPWININFOA,*LPHELPWININFOA;
+
+ typedef struct tagHELPWININFOW {
+ int wStructSize;
+ int x;
+ int y;
+ int dx;
+ int dy;
+ int wMax;
+ WCHAR rgchMember[2];
+ } HELPWININFOW,*PHELPWININFOW,*LPHELPWININFOW;
+
+#ifdef UNICODE
+ typedef HELPWININFOW HELPWININFO;
+ typedef PHELPWININFOW PHELPWININFO;
+ typedef LPHELPWININFOW LPHELPWININFO;
+#else
+ typedef HELPWININFOA HELPWININFO;
+ typedef PHELPWININFOA PHELPWININFO;
+ typedef LPHELPWININFOA LPHELPWININFO;
+#endif
+
+#define HELP_CONTEXT 0x0001L
+#define HELP_QUIT 0x0002L
+#define HELP_INDEX 0x0003L
+#define HELP_CONTENTS 0x0003L
+#define HELP_HELPONHELP 0x0004L
+#define HELP_SETINDEX 0x0005L
+#define HELP_SETCONTENTS 0x0005L
+#define HELP_CONTEXTPOPUP 0x0008L
+#define HELP_FORCEFILE 0x0009L
+#define HELP_KEY 0x0101L
+#define HELP_COMMAND 0x0102L
+#define HELP_PARTIALKEY 0x0105L
+#define HELP_MULTIKEY 0x0201L
+#define HELP_SETWINPOS 0x0203L
+#define HELP_CONTEXTMENU 0x000a
+#define HELP_FINDER 0x000b
+#define HELP_WM_HELP 0x000c
+#define HELP_SETPOPUP_POS 0x000d
+
+#define HELP_TCARD 0x8000
+#define HELP_TCARD_DATA 0x0010
+#define HELP_TCARD_OTHER_CALLER 0x0011
+
+#define IDH_NO_HELP 28440
+#define IDH_MISSING_CONTEXT 28441
+#define IDH_GENERIC_HELP_BUTTON 28442
+#define IDH_OK 28443
+#define IDH_CANCEL 28444
+#define IDH_HELP 28445
+
+#ifdef UNICODE
+#define WinHelp WinHelpW
+#else
+#define WinHelp WinHelpA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI WinHelpA(HWND hWndMain,LPCSTR lpszHelp,UINT uCommand,ULONG_PTR dwData);
+ WINUSERAPI WINBOOL WINAPI WinHelpW(HWND hWndMain,LPCWSTR lpszHelp,UINT uCommand,ULONG_PTR dwData);
+#endif
+
+#define GR_GDIOBJECTS 0
+#define GR_USEROBJECTS 1
+
+ WINUSERAPI DWORD WINAPI GetGuiResources(HANDLE hProcess,DWORD uiFlags);
+
+#ifndef NOSYSPARAMSINFO
+
+#define SPI_GETBEEP 0x0001
+#define SPI_SETBEEP 0x0002
+#define SPI_GETMOUSE 0x0003
+#define SPI_SETMOUSE 0x0004
+#define SPI_GETBORDER 0x0005
+#define SPI_SETBORDER 0x0006
+#define SPI_GETKEYBOARDSPEED 0x000A
+#define SPI_SETKEYBOARDSPEED 0x000B
+#define SPI_LANGDRIVER 0x000C
+#define SPI_ICONHORIZONTALSPACING 0x000D
+#define SPI_GETSCREENSAVETIMEOUT 0x000E
+#define SPI_SETSCREENSAVETIMEOUT 0x000F
+#define SPI_GETSCREENSAVEACTIVE 0x0010
+#define SPI_SETSCREENSAVEACTIVE 0x0011
+#define SPI_GETGRIDGRANULARITY 0x0012
+#define SPI_SETGRIDGRANULARITY 0x0013
+#define SPI_SETDESKWALLPAPER 0x0014
+#define SPI_SETDESKPATTERN 0x0015
+#define SPI_GETKEYBOARDDELAY 0x0016
+#define SPI_SETKEYBOARDDELAY 0x0017
+#define SPI_ICONVERTICALSPACING 0x0018
+#define SPI_GETICONTITLEWRAP 0x0019
+#define SPI_SETICONTITLEWRAP 0x001A
+#define SPI_GETMENUDROPALIGNMENT 0x001B
+#define SPI_SETMENUDROPALIGNMENT 0x001C
+#define SPI_SETDOUBLECLKWIDTH 0x001D
+#define SPI_SETDOUBLECLKHEIGHT 0x001E
+#define SPI_GETICONTITLELOGFONT 0x001F
+#define SPI_SETDOUBLECLICKTIME 0x0020
+#define SPI_SETMOUSEBUTTONSWAP 0x0021
+#define SPI_SETICONTITLELOGFONT 0x0022
+#define SPI_GETFASTTASKSWITCH 0x0023
+#define SPI_SETFASTTASKSWITCH 0x0024
+#define SPI_SETDRAGFULLWINDOWS 0x0025
+#define SPI_GETDRAGFULLWINDOWS 0x0026
+#define SPI_GETNONCLIENTMETRICS 0x0029
+#define SPI_SETNONCLIENTMETRICS 0x002A
+#define SPI_GETMINIMIZEDMETRICS 0x002B
+#define SPI_SETMINIMIZEDMETRICS 0x002C
+#define SPI_GETICONMETRICS 0x002D
+#define SPI_SETICONMETRICS 0x002E
+#define SPI_SETWORKAREA 0x002F
+#define SPI_GETWORKAREA 0x0030
+#define SPI_SETPENWINDOWS 0x0031
+
+#define SPI_GETHIGHCONTRAST 0x0042
+#define SPI_SETHIGHCONTRAST 0x0043
+#define SPI_GETKEYBOARDPREF 0x0044
+#define SPI_SETKEYBOARDPREF 0x0045
+#define SPI_GETSCREENREADER 0x0046
+#define SPI_SETSCREENREADER 0x0047
+#define SPI_GETANIMATION 0x0048
+#define SPI_SETANIMATION 0x0049
+#define SPI_GETFONTSMOOTHING 0x004A
+#define SPI_SETFONTSMOOTHING 0x004B
+#define SPI_SETDRAGWIDTH 0x004C
+#define SPI_SETDRAGHEIGHT 0x004D
+#define SPI_SETHANDHELD 0x004E
+#define SPI_GETLOWPOWERTIMEOUT 0x004F
+#define SPI_GETPOWEROFFTIMEOUT 0x0050
+#define SPI_SETLOWPOWERTIMEOUT 0x0051
+#define SPI_SETPOWEROFFTIMEOUT 0x0052
+#define SPI_GETLOWPOWERACTIVE 0x0053
+#define SPI_GETPOWEROFFACTIVE 0x0054
+#define SPI_SETLOWPOWERACTIVE 0x0055
+#define SPI_SETPOWEROFFACTIVE 0x0056
+#define SPI_SETCURSORS 0x0057
+#define SPI_SETICONS 0x0058
+#define SPI_GETDEFAULTINPUTLANG 0x0059
+#define SPI_SETDEFAULTINPUTLANG 0x005A
+#define SPI_SETLANGTOGGLE 0x005B
+#define SPI_GETWINDOWSEXTENSION 0x005C
+#define SPI_SETMOUSETRAILS 0x005D
+#define SPI_GETMOUSETRAILS 0x005E
+#define SPI_SETSCREENSAVERRUNNING 0x0061
+#define SPI_SCREENSAVERRUNNING SPI_SETSCREENSAVERRUNNING
+#define SPI_GETFILTERKEYS 0x0032
+#define SPI_SETFILTERKEYS 0x0033
+#define SPI_GETTOGGLEKEYS 0x0034
+#define SPI_SETTOGGLEKEYS 0x0035
+#define SPI_GETMOUSEKEYS 0x0036
+#define SPI_SETMOUSEKEYS 0x0037
+#define SPI_GETSHOWSOUNDS 0x0038
+#define SPI_SETSHOWSOUNDS 0x0039
+#define SPI_GETSTICKYKEYS 0x003A
+#define SPI_SETSTICKYKEYS 0x003B
+#define SPI_GETACCESSTIMEOUT 0x003C
+#define SPI_SETACCESSTIMEOUT 0x003D
+#define SPI_GETSERIALKEYS 0x003E
+#define SPI_SETSERIALKEYS 0x003F
+#define SPI_GETSOUNDSENTRY 0x0040
+#define SPI_SETSOUNDSENTRY 0x0041
+#define SPI_GETSNAPTODEFBUTTON 0x005F
+#define SPI_SETSNAPTODEFBUTTON 0x0060
+#define SPI_GETMOUSEHOVERWIDTH 0x0062
+#define SPI_SETMOUSEHOVERWIDTH 0x0063
+#define SPI_GETMOUSEHOVERHEIGHT 0x0064
+#define SPI_SETMOUSEHOVERHEIGHT 0x0065
+#define SPI_GETMOUSEHOVERTIME 0x0066
+#define SPI_SETMOUSEHOVERTIME 0x0067
+#define SPI_GETWHEELSCROLLLINES 0x0068
+#define SPI_SETWHEELSCROLLLINES 0x0069
+#define SPI_GETMENUSHOWDELAY 0x006A
+#define SPI_SETMENUSHOWDELAY 0x006B
+#define SPI_GETSHOWIMEUI 0x006E
+#define SPI_SETSHOWIMEUI 0x006F
+#define SPI_GETMOUSESPEED 0x0070
+#define SPI_SETMOUSESPEED 0x0071
+#define SPI_GETSCREENSAVERRUNNING 0x0072
+#define SPI_GETDESKWALLPAPER 0x0073
+
+#define SPI_GETACTIVEWINDOWTRACKING 0x1000
+#define SPI_SETACTIVEWINDOWTRACKING 0x1001
+#define SPI_GETMENUANIMATION 0x1002
+#define SPI_SETMENUANIMATION 0x1003
+#define SPI_GETCOMBOBOXANIMATION 0x1004
+#define SPI_SETCOMBOBOXANIMATION 0x1005
+#define SPI_GETLISTBOXSMOOTHSCROLLING 0x1006
+#define SPI_SETLISTBOXSMOOTHSCROLLING 0x1007
+#define SPI_GETGRADIENTCAPTIONS 0x1008
+#define SPI_SETGRADIENTCAPTIONS 0x1009
+#define SPI_GETKEYBOARDCUES 0x100A
+#define SPI_SETKEYBOARDCUES 0x100B
+#define SPI_GETMENUUNDERLINES SPI_GETKEYBOARDCUES
+#define SPI_SETMENUUNDERLINES SPI_SETKEYBOARDCUES
+#define SPI_GETACTIVEWNDTRKZORDER 0x100C
+#define SPI_SETACTIVEWNDTRKZORDER 0x100D
+#define SPI_GETHOTTRACKING 0x100E
+#define SPI_SETHOTTRACKING 0x100F
+#define SPI_GETMENUFADE 0x1012
+#define SPI_SETMENUFADE 0x1013
+#define SPI_GETSELECTIONFADE 0x1014
+#define SPI_SETSELECTIONFADE 0x1015
+#define SPI_GETTOOLTIPANIMATION 0x1016
+#define SPI_SETTOOLTIPANIMATION 0x1017
+#define SPI_GETTOOLTIPFADE 0x1018
+#define SPI_SETTOOLTIPFADE 0x1019
+#define SPI_GETCURSORSHADOW 0x101A
+#define SPI_SETCURSORSHADOW 0x101B
+#define SPI_GETMOUSESONAR 0x101C
+#define SPI_SETMOUSESONAR 0x101D
+#define SPI_GETMOUSECLICKLOCK 0x101E
+#define SPI_SETMOUSECLICKLOCK 0x101F
+#define SPI_GETMOUSEVANISH 0x1020
+#define SPI_SETMOUSEVANISH 0x1021
+#define SPI_GETFLATMENU 0x1022
+#define SPI_SETFLATMENU 0x1023
+#define SPI_GETDROPSHADOW 0x1024
+#define SPI_SETDROPSHADOW 0x1025
+#define SPI_GETBLOCKSENDINPUTRESETS 0x1026
+#define SPI_SETBLOCKSENDINPUTRESETS 0x1027
+#define SPI_GETUIEFFECTS 0x103E
+#define SPI_SETUIEFFECTS 0x103F
+#define SPI_GETFOREGROUNDLOCKTIMEOUT 0x2000
+#define SPI_SETFOREGROUNDLOCKTIMEOUT 0x2001
+#define SPI_GETACTIVEWNDTRKTIMEOUT 0x2002
+#define SPI_SETACTIVEWNDTRKTIMEOUT 0x2003
+#define SPI_GETFOREGROUNDFLASHCOUNT 0x2004
+#define SPI_SETFOREGROUNDFLASHCOUNT 0x2005
+#define SPI_GETCARETWIDTH 0x2006
+#define SPI_SETCARETWIDTH 0x2007
+#define SPI_GETMOUSECLICKLOCKTIME 0x2008
+#define SPI_SETMOUSECLICKLOCKTIME 0x2009
+#define SPI_GETFONTSMOOTHINGTYPE 0x200A
+#define SPI_SETFONTSMOOTHINGTYPE 0x200B
+
+#define FE_FONTSMOOTHINGSTANDARD 0x0001
+#define FE_FONTSMOOTHINGCLEARTYPE 0x0002
+#define FE_FONTSMOOTHINGDOCKING 0x8000
+
+#define SPI_GETFONTSMOOTHINGCONTRAST 0x200C
+#define SPI_SETFONTSMOOTHINGCONTRAST 0x200D
+#define SPI_GETFOCUSBORDERWIDTH 0x200E
+#define SPI_SETFOCUSBORDERWIDTH 0x200F
+#define SPI_GETFOCUSBORDERHEIGHT 0x2010
+#define SPI_SETFOCUSBORDERHEIGHT 0x2011
+#define SPI_GETFONTSMOOTHINGORIENTATION 0x2012
+#define SPI_SETFONTSMOOTHINGORIENTATION 0x2013
+
+#define FE_FONTSMOOTHINGORIENTATIONBGR 0x0000
+#define FE_FONTSMOOTHINGORIENTATIONRGB 0x0001
+
+#define SPIF_UPDATEINIFILE 0x0001
+#define SPIF_SENDWININICHANGE 0x0002
+#define SPIF_SENDCHANGE SPIF_SENDWININICHANGE
+
+#define METRICS_USEDEFAULT -1
+#ifdef _WINGDI_
+#ifndef NOGDI
+ typedef struct tagNONCLIENTMETRICSA {
+ UINT cbSize;
+ int iBorderWidth;
+ int iScrollWidth;
+ int iScrollHeight;
+ int iCaptionWidth;
+ int iCaptionHeight;
+ LOGFONTA lfCaptionFont;
+ int iSmCaptionWidth;
+ int iSmCaptionHeight;
+ LOGFONTA lfSmCaptionFont;
+ int iMenuWidth;
+ int iMenuHeight;
+ LOGFONTA lfMenuFont;
+ LOGFONTA lfStatusFont;
+ LOGFONTA lfMessageFont;
+ } NONCLIENTMETRICSA,*PNONCLIENTMETRICSA,*LPNONCLIENTMETRICSA;
+
+ typedef struct tagNONCLIENTMETRICSW {
+ UINT cbSize;
+ int iBorderWidth;
+ int iScrollWidth;
+ int iScrollHeight;
+ int iCaptionWidth;
+ int iCaptionHeight;
+ LOGFONTW lfCaptionFont;
+ int iSmCaptionWidth;
+ int iSmCaptionHeight;
+ LOGFONTW lfSmCaptionFont;
+ int iMenuWidth;
+ int iMenuHeight;
+ LOGFONTW lfMenuFont;
+ LOGFONTW lfStatusFont;
+ LOGFONTW lfMessageFont;
+ } NONCLIENTMETRICSW,*PNONCLIENTMETRICSW,*LPNONCLIENTMETRICSW;
+
+#ifdef UNICODE
+ typedef NONCLIENTMETRICSW NONCLIENTMETRICS;
+ typedef PNONCLIENTMETRICSW PNONCLIENTMETRICS;
+ typedef LPNONCLIENTMETRICSW LPNONCLIENTMETRICS;
+#else
+ typedef NONCLIENTMETRICSA NONCLIENTMETRICS;
+ typedef PNONCLIENTMETRICSA PNONCLIENTMETRICS;
+ typedef LPNONCLIENTMETRICSA LPNONCLIENTMETRICS;
+#endif
+#endif
+#endif
+
+#define ARW_BOTTOMLEFT 0x0000L
+#define ARW_BOTTOMRIGHT 0x0001L
+#define ARW_TOPLEFT 0x0002L
+#define ARW_TOPRIGHT 0x0003L
+#define ARW_STARTMASK 0x0003L
+#define ARW_STARTRIGHT 0x0001L
+#define ARW_STARTTOP 0x0002L
+
+#define ARW_LEFT 0x0000L
+#define ARW_RIGHT 0x0000L
+#define ARW_UP 0x0004L
+#define ARW_DOWN 0x0004L
+#define ARW_HIDE 0x0008L
+
+ typedef struct tagMINIMIZEDMETRICS {
+ UINT cbSize;
+ int iWidth;
+ int iHorzGap;
+ int iVertGap;
+ int iArrange;
+ } MINIMIZEDMETRICS,*PMINIMIZEDMETRICS,*LPMINIMIZEDMETRICS;
+
+#ifdef _WINGDI_
+#ifndef NOGDI
+ typedef struct tagICONMETRICSA {
+ UINT cbSize;
+ int iHorzSpacing;
+ int iVertSpacing;
+ int iTitleWrap;
+ LOGFONTA lfFont;
+ } ICONMETRICSA,*PICONMETRICSA,*LPICONMETRICSA;
+
+ typedef struct tagICONMETRICSW {
+ UINT cbSize;
+ int iHorzSpacing;
+ int iVertSpacing;
+ int iTitleWrap;
+ LOGFONTW lfFont;
+ } ICONMETRICSW,*PICONMETRICSW,*LPICONMETRICSW;
+
+#ifdef UNICODE
+ typedef ICONMETRICSW ICONMETRICS;
+ typedef PICONMETRICSW PICONMETRICS;
+ typedef LPICONMETRICSW LPICONMETRICS;
+#else
+ typedef ICONMETRICSA ICONMETRICS;
+ typedef PICONMETRICSA PICONMETRICS;
+ typedef LPICONMETRICSA LPICONMETRICS;
+#endif
+#endif
+#endif
+
+ typedef struct tagANIMATIONINFO {
+ UINT cbSize;
+ int iMinAnimate;
+ } ANIMATIONINFO,*LPANIMATIONINFO;
+
+ typedef struct tagSERIALKEYSA {
+ UINT cbSize;
+ DWORD dwFlags;
+ LPSTR lpszActivePort;
+ LPSTR lpszPort;
+ UINT iBaudRate;
+ UINT iPortState;
+ UINT iActive;
+ } SERIALKEYSA,*LPSERIALKEYSA;
+
+ typedef struct tagSERIALKEYSW {
+ UINT cbSize;
+ DWORD dwFlags;
+ LPWSTR lpszActivePort;
+ LPWSTR lpszPort;
+ UINT iBaudRate;
+ UINT iPortState;
+ UINT iActive;
+ } SERIALKEYSW,*LPSERIALKEYSW;
+
+#ifdef UNICODE
+ typedef SERIALKEYSW SERIALKEYS;
+ typedef LPSERIALKEYSW LPSERIALKEYS;
+#else
+ typedef SERIALKEYSA SERIALKEYS;
+ typedef LPSERIALKEYSA LPSERIALKEYS;
+#endif
+
+#define SERKF_SERIALKEYSON 0x00000001
+#define SERKF_AVAILABLE 0x00000002
+#define SERKF_INDICATOR 0x00000004
+
+ typedef struct tagHIGHCONTRASTA {
+ UINT cbSize;
+ DWORD dwFlags;
+ LPSTR lpszDefaultScheme;
+ } HIGHCONTRASTA,*LPHIGHCONTRASTA;
+
+ typedef struct tagHIGHCONTRASTW {
+ UINT cbSize;
+ DWORD dwFlags;
+ LPWSTR lpszDefaultScheme;
+ } HIGHCONTRASTW,*LPHIGHCONTRASTW;
+
+#ifdef UNICODE
+ typedef HIGHCONTRASTW HIGHCONTRAST;
+ typedef LPHIGHCONTRASTW LPHIGHCONTRAST;
+#else
+ typedef HIGHCONTRASTA HIGHCONTRAST;
+ typedef LPHIGHCONTRASTA LPHIGHCONTRAST;
+#endif
+
+#define HCF_HIGHCONTRASTON 0x00000001
+#define HCF_AVAILABLE 0x00000002
+#define HCF_HOTKEYACTIVE 0x00000004
+#define HCF_CONFIRMHOTKEY 0x00000008
+#define HCF_HOTKEYSOUND 0x00000010
+#define HCF_INDICATOR 0x00000020
+#define HCF_HOTKEYAVAILABLE 0x00000040
+#define HCF_LOGONDESKTOP 0x00000100
+#define HCF_DEFAULTDESKTOP 0x00000200
+
+#define CDS_UPDATEREGISTRY 0x00000001
+#define CDS_TEST 0x00000002
+#define CDS_FULLSCREEN 0x00000004
+#define CDS_GLOBAL 0x00000008
+#define CDS_SET_PRIMARY 0x00000010
+#define CDS_VIDEOPARAMETERS 0x00000020
+#define CDS_RESET 0x40000000
+#define CDS_NORESET 0x10000000
+
+//gr #include
+
+#define DISP_CHANGE_SUCCESSFUL 0
+#define DISP_CHANGE_RESTART 1
+#define DISP_CHANGE_FAILED -1
+#define DISP_CHANGE_BADMODE -2
+#define DISP_CHANGE_NOTUPDATED -3
+#define DISP_CHANGE_BADFLAGS -4
+#define DISP_CHANGE_BADPARAM -5
+#define DISP_CHANGE_BADDUALVIEW -6
+
+#ifdef _WINGDI_
+#ifndef NOGDI
+
+#ifdef UNICODE
+#define ChangeDisplaySettings ChangeDisplaySettingsW
+#define ChangeDisplaySettingsEx ChangeDisplaySettingsExW
+#define EnumDisplaySettings EnumDisplaySettingsW
+#define EnumDisplaySettingsEx EnumDisplaySettingsExW
+#define EnumDisplayDevices EnumDisplayDevicesW
+#else
+#define ChangeDisplaySettings ChangeDisplaySettingsA
+#define ChangeDisplaySettingsEx ChangeDisplaySettingsExA
+#define EnumDisplaySettings EnumDisplaySettingsA
+#define EnumDisplaySettingsEx EnumDisplaySettingsExA
+#define EnumDisplayDevices EnumDisplayDevicesA
+#endif
+
+ WINUSERAPI LONG WINAPI ChangeDisplaySettingsA(LPDEVMODEA lpDevMode,DWORD dwFlags);
+ WINUSERAPI LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,DWORD dwFlags);
+ WINUSERAPI LONG WINAPI ChangeDisplaySettingsExA(LPCSTR lpszDeviceName,LPDEVMODEA lpDevMode,HWND hwnd,DWORD dwflags,LPVOID lParam);
+ WINUSERAPI LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR lpszDeviceName,LPDEVMODEW lpDevMode,HWND hwnd,DWORD dwflags,LPVOID lParam);
+
+#define ENUM_CURRENT_SETTINGS ((DWORD)-1)
+#define ENUM_REGISTRY_SETTINGS ((DWORD)-2)
+
+ WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsA(LPCSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEA lpDevMode);
+ WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEW lpDevMode);
+ WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEA lpDevMode,DWORD dwFlags);
+ WINUSERAPI WINBOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName,DWORD iModeNum,LPDEVMODEW lpDevMode,DWORD dwFlags);
+
+#define EDS_RAWMODE 0x00000002
+
+ WINUSERAPI WINBOOL WINAPI EnumDisplayDevicesA(LPCSTR lpDevice,DWORD iDevNum,PDISPLAY_DEVICEA lpDisplayDevice,DWORD dwFlags);
+ WINUSERAPI WINBOOL WINAPI EnumDisplayDevicesW(LPCWSTR lpDevice,DWORD iDevNum,PDISPLAY_DEVICEW lpDisplayDevice,DWORD dwFlags);
+#endif
+#endif
+
+#ifdef UNICODE
+#define SystemParametersInfo SystemParametersInfoW
+#else
+#define SystemParametersInfo SystemParametersInfoA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI SystemParametersInfoA(UINT uiAction,UINT uiParam,PVOID pvParam,UINT fWinIni);
+ WINUSERAPI WINBOOL WINAPI SystemParametersInfoW(UINT uiAction,UINT uiParam,PVOID pvParam,UINT fWinIni);
+#endif
+
+ typedef struct tagFILTERKEYS {
+ UINT cbSize;
+ DWORD dwFlags;
+ DWORD iWaitMSec;
+ DWORD iDelayMSec;
+ DWORD iRepeatMSec;
+ DWORD iBounceMSec;
+ } FILTERKEYS,*LPFILTERKEYS;
+
+#define FKF_FILTERKEYSON 0x00000001
+#define FKF_AVAILABLE 0x00000002
+#define FKF_HOTKEYACTIVE 0x00000004
+#define FKF_CONFIRMHOTKEY 0x00000008
+#define FKF_HOTKEYSOUND 0x00000010
+#define FKF_INDICATOR 0x00000020
+#define FKF_CLICKON 0x00000040
+
+ typedef struct tagSTICKYKEYS {
+ UINT cbSize;
+ DWORD dwFlags;
+ } STICKYKEYS,*LPSTICKYKEYS;
+
+#define SKF_STICKYKEYSON 0x00000001
+#define SKF_AVAILABLE 0x00000002
+#define SKF_HOTKEYACTIVE 0x00000004
+#define SKF_CONFIRMHOTKEY 0x00000008
+#define SKF_HOTKEYSOUND 0x00000010
+#define SKF_INDICATOR 0x00000020
+#define SKF_AUDIBLEFEEDBACK 0x00000040
+#define SKF_TRISTATE 0x00000080
+#define SKF_TWOKEYSOFF 0x00000100
+#define SKF_LALTLATCHED 0x10000000
+#define SKF_LCTLLATCHED 0x04000000
+#define SKF_LSHIFTLATCHED 0x01000000
+#define SKF_RALTLATCHED 0x20000000
+#define SKF_RCTLLATCHED 0x08000000
+#define SKF_RSHIFTLATCHED 0x02000000
+#define SKF_LWINLATCHED 0x40000000
+#define SKF_RWINLATCHED 0x80000000
+#define SKF_LALTLOCKED 0x00100000
+#define SKF_LCTLLOCKED 0x00040000
+#define SKF_LSHIFTLOCKED 0x00010000
+#define SKF_RALTLOCKED 0x00200000
+#define SKF_RCTLLOCKED 0x00080000
+#define SKF_RSHIFTLOCKED 0x00020000
+#define SKF_LWINLOCKED 0x00400000
+#define SKF_RWINLOCKED 0x00800000
+
+ typedef struct tagMOUSEKEYS {
+ UINT cbSize;
+ DWORD dwFlags;
+ DWORD iMaxSpeed;
+ DWORD iTimeToMaxSpeed;
+ DWORD iCtrlSpeed;
+ DWORD dwReserved1;
+ DWORD dwReserved2;
+ } MOUSEKEYS,*LPMOUSEKEYS;
+
+#define MKF_MOUSEKEYSON 0x00000001
+#define MKF_AVAILABLE 0x00000002
+#define MKF_HOTKEYACTIVE 0x00000004
+#define MKF_CONFIRMHOTKEY 0x00000008
+#define MKF_HOTKEYSOUND 0x00000010
+#define MKF_INDICATOR 0x00000020
+#define MKF_MODIFIERS 0x00000040
+#define MKF_REPLACENUMBERS 0x00000080
+#define MKF_LEFTBUTTONSEL 0x10000000
+#define MKF_RIGHTBUTTONSEL 0x20000000
+#define MKF_LEFTBUTTONDOWN 0x01000000
+#define MKF_RIGHTBUTTONDOWN 0x02000000
+#define MKF_MOUSEMODE 0x80000000
+
+ typedef struct tagACCESSTIMEOUT {
+ UINT cbSize;
+ DWORD dwFlags;
+ DWORD iTimeOutMSec;
+ } ACCESSTIMEOUT,*LPACCESSTIMEOUT;
+
+#define ATF_TIMEOUTON 0x00000001
+#define ATF_ONOFFFEEDBACK 0x00000002
+
+#define SSGF_NONE 0
+#define SSGF_DISPLAY 3
+
+#define SSTF_NONE 0
+#define SSTF_CHARS 1
+#define SSTF_BORDER 2
+#define SSTF_DISPLAY 3
+
+#define SSWF_NONE 0
+#define SSWF_TITLE 1
+#define SSWF_WINDOW 2
+#define SSWF_DISPLAY 3
+#define SSWF_CUSTOM 4
+
+ typedef struct tagSOUNDSENTRYA {
+ UINT cbSize;
+ DWORD dwFlags;
+ DWORD iFSTextEffect;
+ DWORD iFSTextEffectMSec;
+ DWORD iFSTextEffectColorBits;
+ DWORD iFSGrafEffect;
+ DWORD iFSGrafEffectMSec;
+ DWORD iFSGrafEffectColor;
+ DWORD iWindowsEffect;
+ DWORD iWindowsEffectMSec;
+ LPSTR lpszWindowsEffectDLL;
+ DWORD iWindowsEffectOrdinal;
+ } SOUNDSENTRYA,*LPSOUNDSENTRYA;
+
+ typedef struct tagSOUNDSENTRYW {
+ UINT cbSize;
+ DWORD dwFlags;
+ DWORD iFSTextEffect;
+ DWORD iFSTextEffectMSec;
+ DWORD iFSTextEffectColorBits;
+ DWORD iFSGrafEffect;
+ DWORD iFSGrafEffectMSec;
+ DWORD iFSGrafEffectColor;
+ DWORD iWindowsEffect;
+ DWORD iWindowsEffectMSec;
+ LPWSTR lpszWindowsEffectDLL;
+ DWORD iWindowsEffectOrdinal;
+ } SOUNDSENTRYW,*LPSOUNDSENTRYW;
+
+#ifdef UNICODE
+ typedef SOUNDSENTRYW SOUNDSENTRY;
+ typedef LPSOUNDSENTRYW LPSOUNDSENTRY;
+#else
+ typedef SOUNDSENTRYA SOUNDSENTRY;
+ typedef LPSOUNDSENTRYA LPSOUNDSENTRY;
+#endif
+
+#define SSF_SOUNDSENTRYON 0x00000001
+#define SSF_AVAILABLE 0x00000002
+#define SSF_INDICATOR 0x00000004
+
+ typedef struct tagTOGGLEKEYS {
+ UINT cbSize;
+ DWORD dwFlags;
+ } TOGGLEKEYS,*LPTOGGLEKEYS;
+
+#define TKF_TOGGLEKEYSON 0x00000001
+#define TKF_AVAILABLE 0x00000002
+#define TKF_HOTKEYACTIVE 0x00000004
+#define TKF_CONFIRMHOTKEY 0x00000008
+#define TKF_HOTKEYSOUND 0x00000010
+#define TKF_INDICATOR 0x00000020
+
+ WINUSERAPI VOID WINAPI SetDebugErrorLevel(DWORD dwLevel);
+
+#define SLE_ERROR 0x00000001
+#define SLE_MINORERROR 0x00000002
+#define SLE_WARNING 0x00000003
+
+ WINUSERAPI VOID WINAPI SetLastErrorEx(DWORD dwErrCode,DWORD dwType);
+ WINUSERAPI int WINAPI InternalGetWindowText(HWND hWnd,LPWSTR pString,int cchMaxCount);
+
+#ifdef WINNT
+ WINUSERAPI WINBOOL WINAPI EndTask(HWND hWnd,WINBOOL fShutDown,WINBOOL fForce);
+#endif
+
+#define MONITOR_DEFAULTTONULL 0x00000000
+#define MONITOR_DEFAULTTOPRIMARY 0x00000001
+#define MONITOR_DEFAULTTONEAREST 0x00000002
+
+ WINUSERAPI HMONITOR WINAPI MonitorFromPoint(POINT pt,DWORD dwFlags);
+ WINUSERAPI HMONITOR WINAPI MonitorFromRect(LPCRECT lprc,DWORD dwFlags);
+ WINUSERAPI HMONITOR WINAPI MonitorFromWindow(HWND hwnd,DWORD dwFlags);
+
+#define MONITORINFOF_PRIMARY 0x00000001
+
+#ifndef CCHDEVICENAME
+#define CCHDEVICENAME 32
+#endif
+
+ typedef struct tagMONITORINFO {
+ DWORD cbSize;
+ RECT rcMonitor;
+ RECT rcWork;
+ DWORD dwFlags;
+ } MONITORINFO,*LPMONITORINFO;
+
+#ifdef __cplusplus
+ typedef struct tagMONITORINFOEXA : public tagMONITORINFO {
+ CHAR szDevice[CCHDEVICENAME];
+ } MONITORINFOEXA,*LPMONITORINFOEXA;
+
+ typedef struct tagMONITORINFOEXW : public tagMONITORINFO {
+ WCHAR szDevice[CCHDEVICENAME];
+ } MONITORINFOEXW,*LPMONITORINFOEXW;
+
+#ifdef UNICODE
+ typedef MONITORINFOEXW MONITORINFOEX;
+ typedef LPMONITORINFOEXW LPMONITORINFOEX;
+#else
+ typedef MONITORINFOEXA MONITORINFOEX;
+ typedef LPMONITORINFOEXA LPMONITORINFOEX;
+#endif
+#else
+ typedef struct tagMONITORINFOEXA {
+ MONITORINFO mi;
+ CHAR szDevice[CCHDEVICENAME];
+ } MONITORINFOEXA,*LPMONITORINFOEXA;
+
+ typedef struct tagMONITORINFOEXW {
+ MONITORINFO mi;
+ WCHAR szDevice[CCHDEVICENAME];
+ } MONITORINFOEXW,*LPMONITORINFOEXW;
+#ifdef UNICODE
+ typedef MONITORINFOEXW MONITORINFOEX;
+ typedef LPMONITORINFOEXW LPMONITORINFOEX;
+#else
+ typedef MONITORINFOEXA MONITORINFOEX;
+ typedef LPMONITORINFOEXA LPMONITORINFOEX;
+#endif
+#endif
+
+#ifdef UNICODE
+#define GetMonitorInfo GetMonitorInfoW
+#else
+#define GetMonitorInfo GetMonitorInfoA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI GetMonitorInfoA(HMONITOR hMonitor,LPMONITORINFO lpmi);
+ WINUSERAPI WINBOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor,LPMONITORINFO lpmi);
+
+ typedef WINBOOL (CALLBACK *MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM);
+
+ WINUSERAPI WINBOOL WINAPI EnumDisplayMonitors(HDC hdc,LPCRECT lprcClip,MONITORENUMPROC lpfnEnum,LPARAM dwData);
+
+#ifndef NOWINABLE
+ WINUSERAPI VOID WINAPI NotifyWinEvent(DWORD event,HWND hwnd,LONG idObject,LONG idChild);
+
+ typedef VOID (CALLBACK *WINEVENTPROC)(HWINEVENTHOOK hWinEventHook,DWORD event,HWND hwnd,LONG idObject,LONG idChild,DWORD idEventThread,DWORD dwmsEventTime);
+
+ WINUSERAPI HWINEVENTHOOK WINAPI SetWinEventHook(DWORD eventMin,DWORD eventMax,HMODULE hmodWinEventProc,WINEVENTPROC pfnWinEventProc,DWORD idProcess,DWORD idThread,DWORD dwFlags);
+ WINUSERAPI WINBOOL WINAPI IsWinEventHookInstalled(DWORD event);
+
+#define WINEVENT_OUTOFCONTEXT 0x0000
+#define WINEVENT_SKIPOWNTHREAD 0x0001
+#define WINEVENT_SKIPOWNPROCESS 0x0002
+#define WINEVENT_INCONTEXT 0x0004
+
+ WINUSERAPI WINBOOL WINAPI UnhookWinEvent(HWINEVENTHOOK hWinEventHook);
+
+#define CHILDID_SELF 0
+#define INDEXID_OBJECT 0
+#define INDEXID_CONTAINER 0
+
+#define OBJID_WINDOW ((LONG)0x00000000)
+#define OBJID_SYSMENU ((LONG)0xFFFFFFFF)
+#define OBJID_TITLEBAR ((LONG)0xFFFFFFFE)
+#define OBJID_MENU ((LONG)0xFFFFFFFD)
+#define OBJID_CLIENT ((LONG)0xFFFFFFFC)
+#define OBJID_VSCROLL ((LONG)0xFFFFFFFB)
+#define OBJID_HSCROLL ((LONG)0xFFFFFFFA)
+#define OBJID_SIZEGRIP ((LONG)0xFFFFFFF9)
+#define OBJID_CARET ((LONG)0xFFFFFFF8)
+#define OBJID_CURSOR ((LONG)0xFFFFFFF7)
+#define OBJID_ALERT ((LONG)0xFFFFFFF6)
+#define OBJID_SOUND ((LONG)0xFFFFFFF5)
+#define OBJID_QUERYCLASSNAMEIDX ((LONG)0xFFFFFFF4)
+#define OBJID_NATIVEOM ((LONG)0xFFFFFFF0)
+
+#define EVENT_MIN 0x00000001
+#define EVENT_MAX 0x7FFFFFFF
+
+#define EVENT_SYSTEM_SOUND 0x0001
+#define EVENT_SYSTEM_ALERT 0x0002
+#define EVENT_SYSTEM_FOREGROUND 0x0003
+#define EVENT_SYSTEM_MENUSTART 0x0004
+#define EVENT_SYSTEM_MENUEND 0x0005
+#define EVENT_SYSTEM_MENUPOPUPSTART 0x0006
+#define EVENT_SYSTEM_MENUPOPUPEND 0x0007
+#define EVENT_SYSTEM_CAPTURESTART 0x0008
+#define EVENT_SYSTEM_CAPTUREEND 0x0009
+#define EVENT_SYSTEM_MOVESIZESTART 0x000A
+#define EVENT_SYSTEM_MOVESIZEEND 0x000B
+#define EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
+#define EVENT_SYSTEM_CONTEXTHELPEND 0x000D
+#define EVENT_SYSTEM_DRAGDROPSTART 0x000E
+#define EVENT_SYSTEM_DRAGDROPEND 0x000F
+#define EVENT_SYSTEM_DIALOGSTART 0x0010
+#define EVENT_SYSTEM_DIALOGEND 0x0011
+#define EVENT_SYSTEM_SCROLLINGSTART 0x0012
+#define EVENT_SYSTEM_SCROLLINGEND 0x0013
+#define EVENT_SYSTEM_SWITCHSTART 0x0014
+#define EVENT_SYSTEM_SWITCHEND 0x0015
+#define EVENT_SYSTEM_MINIMIZESTART 0x0016
+#define EVENT_SYSTEM_MINIMIZEEND 0x0017
+
+#define EVENT_CONSOLE_CARET 0x4001
+#define EVENT_CONSOLE_UPDATE_REGION 0x4002
+#define EVENT_CONSOLE_UPDATE_SIMPLE 0x4003
+#define EVENT_CONSOLE_UPDATE_SCROLL 0x4004
+#define EVENT_CONSOLE_LAYOUT 0x4005
+#define EVENT_CONSOLE_START_APPLICATION 0x4006
+#define EVENT_CONSOLE_END_APPLICATION 0x4007
+
+#define CONSOLE_APPLICATION_16BIT 0x0001
+
+#define CONSOLE_CARET_SELECTION 0x0001
+#define CONSOLE_CARET_VISIBLE 0x0002
+
+#define EVENT_OBJECT_CREATE 0x8000
+#define EVENT_OBJECT_DESTROY 0x8001
+#define EVENT_OBJECT_SHOW 0x8002
+#define EVENT_OBJECT_HIDE 0x8003
+#define EVENT_OBJECT_REORDER 0x8004
+
+#define EVENT_OBJECT_FOCUS 0x8005
+#define EVENT_OBJECT_SELECTION 0x8006
+#define EVENT_OBJECT_SELECTIONADD 0x8007
+#define EVENT_OBJECT_SELECTIONREMOVE 0x8008
+#define EVENT_OBJECT_SELECTIONWITHIN 0x8009
+
+#define EVENT_OBJECT_STATECHANGE 0x800A
+
+#define EVENT_OBJECT_LOCATIONCHANGE 0x800B
+
+#define EVENT_OBJECT_NAMECHANGE 0x800C
+#define EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D
+#define EVENT_OBJECT_VALUECHANGE 0x800E
+#define EVENT_OBJECT_PARENTCHANGE 0x800F
+#define EVENT_OBJECT_HELPCHANGE 0x8010
+#define EVENT_OBJECT_DEFACTIONCHANGE 0x8011
+#define EVENT_OBJECT_ACCELERATORCHANGE 0x8012
+
+#define SOUND_SYSTEM_STARTUP 1
+#define SOUND_SYSTEM_SHUTDOWN 2
+#define SOUND_SYSTEM_BEEP 3
+#define SOUND_SYSTEM_ERROR 4
+#define SOUND_SYSTEM_QUESTION 5
+#define SOUND_SYSTEM_WARNING 6
+#define SOUND_SYSTEM_INFORMATION 7
+#define SOUND_SYSTEM_MAXIMIZE 8
+#define SOUND_SYSTEM_MINIMIZE 9
+#define SOUND_SYSTEM_RESTOREUP 10
+#define SOUND_SYSTEM_RESTOREDOWN 11
+#define SOUND_SYSTEM_APPSTART 12
+#define SOUND_SYSTEM_FAULT 13
+#define SOUND_SYSTEM_APPEND 14
+#define SOUND_SYSTEM_MENUCOMMAND 15
+#define SOUND_SYSTEM_MENUPOPUP 16
+#define CSOUND_SYSTEM 16
+
+#define ALERT_SYSTEM_INFORMATIONAL 1
+#define ALERT_SYSTEM_WARNING 2
+#define ALERT_SYSTEM_ERROR 3
+#define ALERT_SYSTEM_QUERY 4
+#define ALERT_SYSTEM_CRITICAL 5
+#define CALERT_SYSTEM 6
+
+ typedef struct tagGUITHREADINFO {
+ DWORD cbSize;
+ DWORD flags;
+ HWND hwndActive;
+ HWND hwndFocus;
+ HWND hwndCapture;
+ HWND hwndMenuOwner;
+ HWND hwndMoveSize;
+ HWND hwndCaret;
+ RECT rcCaret;
+ } GUITHREADINFO,*PGUITHREADINFO,*LPGUITHREADINFO;
+
+#define GUI_CARETBLINKING 0x00000001
+#define GUI_INMOVESIZE 0x00000002
+#define GUI_INMENUMODE 0x00000004
+#define GUI_SYSTEMMENUMODE 0x00000008
+#define GUI_POPUPMENUMODE 0x00000010
+#define GUI_16BITTASK 0x00000020
+
+#ifdef UNICODE
+#define GetWindowModuleFileName GetWindowModuleFileNameW
+#else
+#define GetWindowModuleFileName GetWindowModuleFileNameA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI GetGUIThreadInfo(DWORD idThread,PGUITHREADINFO pgui);
+ WINUSERAPI UINT WINAPI GetWindowModuleFileNameA(HWND hwnd,LPSTR pszFileName,UINT cchFileNameMax);
+ WINUSERAPI UINT WINAPI GetWindowModuleFileNameW(HWND hwnd,LPWSTR pszFileName,UINT cchFileNameMax);
+
+#ifndef NO_STATE_FLAGS
+#define STATE_SYSTEM_UNAVAILABLE 0x00000001
+#define STATE_SYSTEM_SELECTED 0x00000002
+#define STATE_SYSTEM_FOCUSED 0x00000004
+#define STATE_SYSTEM_PRESSED 0x00000008
+#define STATE_SYSTEM_CHECKED 0x00000010
+#define STATE_SYSTEM_MIXED 0x00000020
+#define STATE_SYSTEM_INDETERMINATE STATE_SYSTEM_MIXED
+#define STATE_SYSTEM_READONLY 0x00000040
+#define STATE_SYSTEM_HOTTRACKED 0x00000080
+#define STATE_SYSTEM_DEFAULT 0x00000100
+#define STATE_SYSTEM_EXPANDED 0x00000200
+#define STATE_SYSTEM_COLLAPSED 0x00000400
+#define STATE_SYSTEM_BUSY 0x00000800
+#define STATE_SYSTEM_FLOATING 0x00001000
+#define STATE_SYSTEM_MARQUEED 0x00002000
+#define STATE_SYSTEM_ANIMATED 0x00004000
+#define STATE_SYSTEM_INVISIBLE 0x00008000
+#define STATE_SYSTEM_OFFSCREEN 0x00010000
+#define STATE_SYSTEM_SIZEABLE 0x00020000
+#define STATE_SYSTEM_MOVEABLE 0x00040000
+#define STATE_SYSTEM_SELFVOICING 0x00080000
+#define STATE_SYSTEM_FOCUSABLE 0x00100000
+#define STATE_SYSTEM_SELECTABLE 0x00200000
+#define STATE_SYSTEM_LINKED 0x00400000
+#define STATE_SYSTEM_TRAVERSED 0x00800000
+#define STATE_SYSTEM_MULTISELECTABLE 0x01000000
+#define STATE_SYSTEM_EXTSELECTABLE 0x02000000
+#define STATE_SYSTEM_ALERT_LOW 0x04000000
+#define STATE_SYSTEM_ALERT_MEDIUM 0x08000000
+#define STATE_SYSTEM_ALERT_HIGH 0x10000000
+#define STATE_SYSTEM_PROTECTED 0x20000000
+#define STATE_SYSTEM_VALID 0x3FFFFFFF
+#endif
+
+#define CCHILDREN_TITLEBAR 5
+#define CCHILDREN_SCROLLBAR 5
+
+ typedef struct tagCURSORINFO {
+ DWORD cbSize;
+ DWORD flags;
+ HCURSOR hCursor;
+ POINT ptScreenPos;
+ } CURSORINFO,*PCURSORINFO,*LPCURSORINFO;
+
+#define CURSOR_SHOWING 0x00000001
+
+ WINUSERAPI WINBOOL WINAPI GetCursorInfo(PCURSORINFO pci);
+
+ typedef struct tagWINDOWINFO {
+ DWORD cbSize;
+ RECT rcWindow;
+ RECT rcClient;
+ DWORD dwStyle;
+ DWORD dwExStyle;
+ DWORD dwWindowStatus;
+ UINT cxWindowBorders;
+ UINT cyWindowBorders;
+ ATOM atomWindowType;
+ WORD wCreatorVersion;
+ } WINDOWINFO,*PWINDOWINFO,*LPWINDOWINFO;
+
+#define WS_ACTIVECAPTION 0x0001
+
+ WINUSERAPI WINBOOL WINAPI GetWindowInfo(HWND hwnd,PWINDOWINFO pwi);
+
+ typedef struct tagTITLEBARINFO {
+ DWORD cbSize;
+ RECT rcTitleBar;
+ DWORD rgstate[CCHILDREN_TITLEBAR + 1];
+ } TITLEBARINFO,*PTITLEBARINFO,*LPTITLEBARINFO;
+
+ WINUSERAPI WINBOOL WINAPI GetTitleBarInfo(HWND hwnd,PTITLEBARINFO pti);
+
+ typedef struct tagMENUBARINFO {
+ DWORD cbSize;
+ RECT rcBar;
+ HMENU hMenu;
+ HWND hwndMenu;
+ WINBOOL fBarFocused:1;
+ WINBOOL fFocused:1;
+ } MENUBARINFO,*PMENUBARINFO,*LPMENUBARINFO;
+
+ WINUSERAPI WINBOOL WINAPI GetMenuBarInfo(HWND hwnd,LONG idObject,LONG idItem,PMENUBARINFO pmbi);
+
+ typedef struct tagSCROLLBARINFO {
+ DWORD cbSize;
+ RECT rcScrollBar;
+ int dxyLineButton;
+ int xyThumbTop;
+ int xyThumbBottom;
+ int reserved;
+ DWORD rgstate[CCHILDREN_SCROLLBAR + 1];
+ } SCROLLBARINFO,*PSCROLLBARINFO,*LPSCROLLBARINFO;
+
+ WINUSERAPI WINBOOL WINAPI GetScrollBarInfo(HWND hwnd,LONG idObject,PSCROLLBARINFO psbi);
+
+ typedef struct tagCOMBOBOXINFO {
+ DWORD cbSize;
+ RECT rcItem;
+ RECT rcButton;
+ DWORD stateButton;
+ HWND hwndCombo;
+ HWND hwndItem;
+ HWND hwndList;
+ } COMBOBOXINFO,*PCOMBOBOXINFO,*LPCOMBOBOXINFO;
+
+ WINUSERAPI WINBOOL WINAPI GetComboBoxInfo(HWND hwndCombo,PCOMBOBOXINFO pcbi);
+
+#define GA_PARENT 1
+#define GA_ROOT 2
+#define GA_ROOTOWNER 3
+
+ WINUSERAPI HWND WINAPI GetAncestor(HWND hwnd,UINT gaFlags);
+ WINUSERAPI HWND WINAPI RealChildWindowFromPoint(HWND hwndParent,POINT ptParentClientCoords);
+ WINUSERAPI UINT WINAPI RealGetWindowClassA(HWND hwnd,LPSTR ptszClassName,UINT cchClassNameMax);
+ WINUSERAPI UINT WINAPI RealGetWindowClassW(HWND hwnd,LPWSTR ptszClassName,UINT cchClassNameMax);
+#ifdef UNICODE
+#define RealGetWindowClass RealGetWindowClassW
+#else
+#define RealGetWindowClass RealGetWindowClassA
+#endif
+
+ typedef struct tagALTTABINFO {
+ DWORD cbSize;
+ int cItems;
+ int cColumns;
+ int cRows;
+ int iColFocus;
+ int iRowFocus;
+ int cxItem;
+ int cyItem;
+ POINT ptStart;
+ } ALTTABINFO,*PALTTABINFO,*LPALTTABINFO;
+
+#ifdef UNICODE
+#define GetAltTabInfo GetAltTabInfoW
+#else
+#define GetAltTabInfo GetAltTabInfoA
+#endif
+
+ WINUSERAPI WINBOOL WINAPI GetAltTabInfoA(HWND hwnd,int iItem,PALTTABINFO pati,LPSTR pszItemText,UINT cchItemText);
+ WINUSERAPI WINBOOL WINAPI GetAltTabInfoW(HWND hwnd,int iItem,PALTTABINFO pati,LPWSTR pszItemText,UINT cchItemText);
+ WINUSERAPI DWORD WINAPI GetListBoxInfo(HWND hwnd);
+#endif
+
+ WINUSERAPI WINBOOL WINAPI LockWorkStation(VOID);
+ WINUSERAPI WINBOOL WINAPI UserHandleGrantAccess(HANDLE hUserHandle,HANDLE hJob,WINBOOL bGrant);
+
+ DECLARE_HANDLE(HRAWINPUT);
+
+#define GET_RAWINPUT_CODE_WPARAM(wParam) ((wParam) & 0xff)
+
+#define RIM_INPUT 0
+#define RIM_INPUTSINK 1
+
+ typedef struct tagRAWINPUTHEADER {
+ DWORD dwType;
+ DWORD dwSize;
+ HANDLE hDevice;
+ WPARAM wParam;
+ } RAWINPUTHEADER,*PRAWINPUTHEADER,*LPRAWINPUTHEADER;
+
+#define RIM_TYPEMOUSE 0
+#define RIM_TYPEKEYBOARD 1
+#define RIM_TYPEHID 2
+
+ typedef struct tagRAWMOUSE {
+ USHORT usFlags;
+ union {
+ ULONG ulButtons;
+ struct {
+ USHORT usButtonFlags;
+ USHORT usButtonData;
+ };
+ };
+ ULONG ulRawButtons;
+ LONG lLastX;
+ LONG lLastY;
+ ULONG ulExtraInformation;
+ } RAWMOUSE,*PRAWMOUSE,*LPRAWMOUSE;
+
+#define RI_MOUSE_LEFT_BUTTON_DOWN 0x0001
+#define RI_MOUSE_LEFT_BUTTON_UP 0x0002
+#define RI_MOUSE_RIGHT_BUTTON_DOWN 0x0004
+#define RI_MOUSE_RIGHT_BUTTON_UP 0x0008
+#define RI_MOUSE_MIDDLE_BUTTON_DOWN 0x0010
+#define RI_MOUSE_MIDDLE_BUTTON_UP 0x0020
+
+#define RI_MOUSE_BUTTON_1_DOWN RI_MOUSE_LEFT_BUTTON_DOWN
+#define RI_MOUSE_BUTTON_1_UP RI_MOUSE_LEFT_BUTTON_UP
+#define RI_MOUSE_BUTTON_2_DOWN RI_MOUSE_RIGHT_BUTTON_DOWN
+#define RI_MOUSE_BUTTON_2_UP RI_MOUSE_RIGHT_BUTTON_UP
+#define RI_MOUSE_BUTTON_3_DOWN RI_MOUSE_MIDDLE_BUTTON_DOWN
+#define RI_MOUSE_BUTTON_3_UP RI_MOUSE_MIDDLE_BUTTON_UP
+
+#define RI_MOUSE_BUTTON_4_DOWN 0x0040
+#define RI_MOUSE_BUTTON_4_UP 0x0080
+#define RI_MOUSE_BUTTON_5_DOWN 0x0100
+#define RI_MOUSE_BUTTON_5_UP 0x0200
+
+#define RI_MOUSE_WHEEL 0x0400
+
+#define MOUSE_MOVE_RELATIVE 0
+#define MOUSE_MOVE_ABSOLUTE 1
+#define MOUSE_VIRTUAL_DESKTOP 0x02
+#define MOUSE_ATTRIBUTES_CHANGED 0x04
+
+ typedef struct tagRAWKEYBOARD {
+ USHORT MakeCode;
+ USHORT Flags;
+ USHORT Reserved;
+ USHORT VKey;
+ UINT Message;
+ ULONG ExtraInformation;
+ } RAWKEYBOARD,*PRAWKEYBOARD,*LPRAWKEYBOARD;
+
+#define KEYBOARD_OVERRUN_MAKE_CODE 0xFF
+
+#define RI_KEY_MAKE 0
+#define RI_KEY_BREAK 1
+#define RI_KEY_E0 2
+#define RI_KEY_E1 4
+#define RI_KEY_TERMSRV_SET_LED 8
+#define RI_KEY_TERMSRV_SHADOW 0x10
+
+ typedef struct tagRAWHID {
+ DWORD dwSizeHid;
+ DWORD dwCount;
+ BYTE bRawData[1];
+ } RAWHID,*PRAWHID,*LPRAWHID;
+
+ typedef struct tagRAWINPUT {
+ RAWINPUTHEADER header;
+ union {
+ RAWMOUSE mouse;
+ RAWKEYBOARD keyboard;
+ RAWHID hid;
+ } data;
+ } RAWINPUT,*PRAWINPUT,*LPRAWINPUT;
+
+#ifdef _WIN64
+#define RAWINPUT_ALIGN(x) (((x) + sizeof(QWORD) - 1) & ~(sizeof(QWORD) - 1))
+#else
+#define RAWINPUT_ALIGN(x) (((x) + sizeof(DWORD) - 1) & ~(sizeof(DWORD) - 1))
+#endif
+
+#define NEXTRAWINPUTBLOCK(ptr) ((PRAWINPUT)RAWINPUT_ALIGN((ULONG_PTR)((PBYTE)(ptr) + (ptr)->header.dwSize)))
+
+#define RID_INPUT 0x10000003
+#define RID_HEADER 0x10000005
+
+ WINUSERAPI UINT WINAPI GetRawInputData(HRAWINPUT hRawInput,UINT uiCommand,LPVOID pData,PUINT pcbSize,UINT cbSizeHeader);
+
+#define RIDI_PREPARSEDDATA 0x20000005
+#define RIDI_DEVICENAME 0x20000007
+#define RIDI_DEVICEINFO 0x2000000b
+
+ typedef struct tagRID_DEVICE_INFO_MOUSE {
+ DWORD dwId;
+ DWORD dwNumberOfButtons;
+ DWORD dwSampleRate;
+ } RID_DEVICE_INFO_MOUSE,*PRID_DEVICE_INFO_MOUSE;
+
+ typedef struct tagRID_DEVICE_INFO_KEYBOARD {
+ DWORD dwType;
+ DWORD dwSubType;
+ DWORD dwKeyboardMode;
+ DWORD dwNumberOfFunctionKeys;
+ DWORD dwNumberOfIndicators;
+ DWORD dwNumberOfKeysTotal;
+ } RID_DEVICE_INFO_KEYBOARD,*PRID_DEVICE_INFO_KEYBOARD;
+
+ typedef struct tagRID_DEVICE_INFO_HID {
+ DWORD dwVendorId;
+ DWORD dwProductId;
+ DWORD dwVersionNumber;
+ USHORT usUsagePage;
+ USHORT usUsage;
+ } RID_DEVICE_INFO_HID,*PRID_DEVICE_INFO_HID;
+
+ typedef struct tagRID_DEVICE_INFO {
+ DWORD cbSize;
+ DWORD dwType;
+ union {
+ RID_DEVICE_INFO_MOUSE mouse;
+ RID_DEVICE_INFO_KEYBOARD keyboard;
+ RID_DEVICE_INFO_HID hid;
+ };
+ } RID_DEVICE_INFO,*PRID_DEVICE_INFO,*LPRID_DEVICE_INFO;
+
+#ifdef UNICODE
+#define GetRawInputDeviceInfo GetRawInputDeviceInfoW
+#else
+#define GetRawInputDeviceInfo GetRawInputDeviceInfoA
+#endif
+
+ WINUSERAPI UINT WINAPI GetRawInputDeviceInfoA(HANDLE hDevice,UINT uiCommand,LPVOID pData,PUINT pcbSize);
+ WINUSERAPI UINT WINAPI GetRawInputDeviceInfoW(HANDLE hDevice,UINT uiCommand,LPVOID pData,PUINT pcbSize);
+ WINUSERAPI UINT WINAPI GetRawInputBuffer(PRAWINPUT pData,PUINT pcbSize,UINT cbSizeHeader);
+
+ typedef struct tagRAWINPUTDEVICE {
+ USHORT usUsagePage;
+ USHORT usUsage;
+ DWORD dwFlags;
+ HWND hwndTarget;
+ } RAWINPUTDEVICE,*PRAWINPUTDEVICE,*LPRAWINPUTDEVICE;
+
+ typedef CONST RAWINPUTDEVICE *PCRAWINPUTDEVICE;
+
+#define RIDEV_REMOVE 0x00000001
+#define RIDEV_EXCLUDE 0x00000010
+#define RIDEV_PAGEONLY 0x00000020
+#define RIDEV_NOLEGACY 0x00000030
+#define RIDEV_INPUTSINK 0x00000100
+#define RIDEV_CAPTUREMOUSE 0x00000200
+#define RIDEV_NOHOTKEYS 0x00000200
+#define RIDEV_APPKEYS 0x00000400
+#define RIDEV_EXMODEMASK 0x000000F0
+#define RIDEV_EXMODE(mode) ((mode) & RIDEV_EXMODEMASK)
+
+ WINUSERAPI WINBOOL WINAPI RegisterRawInputDevices(PCRAWINPUTDEVICE pRawInputDevices,UINT uiNumDevices,UINT cbSize);
+ WINUSERAPI UINT WINAPI GetRegisteredRawInputDevices(PRAWINPUTDEVICE pRawInputDevices,PUINT puiNumDevices,UINT cbSize);
+
+ typedef struct tagRAWINPUTDEVICELIST {
+ HANDLE hDevice;
+ DWORD dwType;
+ } RAWINPUTDEVICELIST,*PRAWINPUTDEVICELIST;
+
+ WINUSERAPI UINT WINAPI GetRawInputDeviceList(PRAWINPUTDEVICELIST pRawInputDeviceList,PUINT puiNumDevices,UINT cbSize);
+ WINUSERAPI LRESULT WINAPI DefRawInputProc(PRAWINPUT *paRawInput,INT nInput,UINT cbSizeHeader);
+
+#endif /* NOUSER */
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winver.h b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winver.h
new file mode 100644
index 00000000..5c0f036b
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/include/winapi/winver.h
@@ -0,0 +1,160 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+#ifndef VER_H
+#define VER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define VS_FILE_INFO RT_VERSION
+#define VS_VERSION_INFO 1
+#define VS_USER_DEFINED 100
+
+#define VS_FFI_SIGNATURE 0xFEEF04BDL
+#define VS_FFI_STRUCVERSION 0x00010000L
+#define VS_FFI_FILEFLAGSMASK 0x0000003FL
+
+#define VS_FF_DEBUG 0x00000001L
+#define VS_FF_PRERELEASE 0x00000002L
+#define VS_FF_PATCHED 0x00000004L
+#define VS_FF_PRIVATEBUILD 0x00000008L
+#define VS_FF_INFOINFERRED 0x00000010L
+#define VS_FF_SPECIALBUILD 0x00000020L
+
+#define VOS_UNKNOWN 0x00000000L
+#define VOS_DOS 0x00010000L
+#define VOS_OS216 0x00020000L
+#define VOS_OS232 0x00030000L
+#define VOS_NT 0x00040000L
+#define VOS_WINCE 0x00050000L
+
+#define VOS__BASE 0x00000000L
+#define VOS__WINDOWS16 0x00000001L
+#define VOS__PM16 0x00000002L
+#define VOS__PM32 0x00000003L
+#define VOS__WINDOWS32 0x00000004L
+
+#define VOS_DOS_WINDOWS16 0x00010001L
+#define VOS_DOS_WINDOWS32 0x00010004L
+#define VOS_OS216_PM16 0x00020002L
+#define VOS_OS232_PM32 0x00030003L
+#define VOS_NT_WINDOWS32 0x00040004L
+
+#define VFT_UNKNOWN 0x00000000L
+#define VFT_APP 0x00000001L
+#define VFT_DLL 0x00000002L
+#define VFT_DRV 0x00000003L
+#define VFT_FONT 0x00000004L
+#define VFT_VXD 0x00000005L
+#define VFT_STATIC_LIB 0x00000007L
+
+#define VFT2_UNKNOWN 0x00000000L
+#define VFT2_DRV_PRINTER 0x00000001L
+#define VFT2_DRV_KEYBOARD 0x00000002L
+#define VFT2_DRV_LANGUAGE 0x00000003L
+#define VFT2_DRV_DISPLAY 0x00000004L
+#define VFT2_DRV_MOUSE 0x00000005L
+#define VFT2_DRV_NETWORK 0x00000006L
+#define VFT2_DRV_SYSTEM 0x00000007L
+#define VFT2_DRV_INSTALLABLE 0x00000008L
+#define VFT2_DRV_SOUND 0x00000009L
+#define VFT2_DRV_COMM 0x0000000AL
+#define VFT2_DRV_INPUTMETHOD 0x0000000BL
+#define VFT2_DRV_VERSIONED_PRINTER 0x0000000CL
+
+#define VFT2_FONT_RASTER 0x00000001L
+#define VFT2_FONT_VECTOR 0x00000002L
+#define VFT2_FONT_TRUETYPE 0x00000003L
+
+#define VFFF_ISSHAREDFILE 0x0001
+
+#define VFF_CURNEDEST 0x0001
+#define VFF_FILEINUSE 0x0002
+#define VFF_BUFFTOOSMALL 0x0004
+
+#define VIFF_FORCEINSTALL 0x0001
+#define VIFF_DONTDELETEOLD 0x0002
+
+#define VIF_TEMPFILE 0x00000001L
+#define VIF_MISMATCH 0x00000002L
+#define VIF_SRCOLD 0x00000004L
+
+#define VIF_DIFFLANG 0x00000008L
+#define VIF_DIFFCODEPG 0x00000010L
+#define VIF_DIFFTYPE 0x00000020L
+
+#define VIF_WRITEPROT 0x00000040L
+#define VIF_FILEINUSE 0x00000080L
+#define VIF_OUTOFSPACE 0x00000100L
+#define VIF_ACCESSVIOLATION 0x00000200L
+#define VIF_SHARINGVIOLATION 0x00000400L
+#define VIF_CANNOTCREATE 0x00000800L
+#define VIF_CANNOTDELETE 0x00001000L
+#define VIF_CANNOTRENAME 0x00002000L
+#define VIF_CANNOTDELETECUR 0x00004000L
+#define VIF_OUTOFMEMORY 0x00008000L
+
+#define VIF_CANNOTREADSRC 0x00010000L
+#define VIF_CANNOTREADDST 0x00020000L
+
+#define VIF_BUFFTOOSMALL 0x00040000L
+#define VIF_CANNOTLOADLZ32 0x00080000L
+#define VIF_CANNOTLOADCABINET 0x00100000L
+
+#ifndef RC_INVOKED
+
+ typedef struct tagVS_FIXEDFILEINFO
+ {
+ DWORD dwSignature;
+ DWORD dwStrucVersion;
+ DWORD dwFileVersionMS;
+ DWORD dwFileVersionLS;
+ DWORD dwProductVersionMS;
+ DWORD dwProductVersionLS;
+ DWORD dwFileFlagsMask;
+ DWORD dwFileFlags;
+ DWORD dwFileOS;
+ DWORD dwFileType;
+ DWORD dwFileSubtype;
+ DWORD dwFileDateMS;
+ DWORD dwFileDateLS;
+ } VS_FIXEDFILEINFO;
+
+#ifdef UNICODE
+#define VerFindFile VerFindFileW
+#define VerInstallFile VerInstallFileW
+#define GetFileVersionInfoSize GetFileVersionInfoSizeW
+#define GetFileVersionInfo GetFileVersionInfoW
+#define VerLanguageName VerLanguageNameW
+#define VerQueryValue VerQueryValueW
+#else
+#define VerFindFile VerFindFileA
+#define VerInstallFile VerInstallFileA
+#define GetFileVersionInfoSize GetFileVersionInfoSizeA
+#define GetFileVersionInfo GetFileVersionInfoA
+#define VerLanguageName VerLanguageNameA
+#define VerQueryValue VerQueryValueA
+#endif
+
+ DWORD WINAPI VerFindFileA(DWORD uFlags,LPSTR szFileName,LPSTR szWinDir,LPSTR szAppDir,LPSTR szCurDir,PUINT lpuCurDirLen,LPSTR szDestDir,PUINT lpuDestDirLen);
+ DWORD WINAPI VerFindFileW(DWORD uFlags,LPWSTR szFileName,LPWSTR szWinDir,LPWSTR szAppDir,LPWSTR szCurDir,PUINT lpuCurDirLen,LPWSTR szDestDir,PUINT lpuDestDirLen);
+ DWORD WINAPI VerInstallFileA(DWORD uFlags,LPSTR szSrcFileName,LPSTR szDestFileName,LPSTR szSrcDir,LPSTR szDestDir,LPSTR szCurDir,LPSTR szTmpFile,PUINT lpuTmpFileLen);
+ DWORD WINAPI VerInstallFileW(DWORD uFlags,LPWSTR szSrcFileName,LPWSTR szDestFileName,LPWSTR szSrcDir,LPWSTR szDestDir,LPWSTR szCurDir,LPWSTR szTmpFile,PUINT lpuTmpFileLen);
+ DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR lptstrFilename,LPDWORD lpdwHandle);
+ DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR lptstrFilename,LPDWORD lpdwHandle);
+ WINBOOL WINAPI GetFileVersionInfoA(LPCSTR lptstrFilename,DWORD dwHandle,DWORD dwLen,LPVOID lpData);
+ WINBOOL WINAPI GetFileVersionInfoW(LPCWSTR lptstrFilename,DWORD dwHandle,DWORD dwLen,LPVOID lpData);
+ DWORD WINAPI VerLanguageNameA(DWORD wLang,LPSTR szLang,DWORD nSize);
+ DWORD WINAPI VerLanguageNameW(DWORD wLang,LPWSTR szLang,DWORD nSize);
+ WINBOOL WINAPI VerQueryValueA(const LPVOID pBlock,LPSTR lpSubBlock,LPVOID *lplpBuffer,PUINT puLen);
+ WINBOOL WINAPI VerQueryValueW(const LPVOID pBlock,LPWSTR lpSubBlock,LPVOID *lplpBuffer,PUINT puLen);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/lib/gdi32.def b/.cache/overlay-toolchain/tcc_extract/tcc/lib/gdi32.def
new file mode 100644
index 00000000..02766da4
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/lib/gdi32.def
@@ -0,0 +1,337 @@
+LIBRARY gdi32.dll
+
+EXPORTS
+AbortDoc
+AbortPath
+AddFontResourceA
+AddFontResourceW
+AngleArc
+AnimatePalette
+Arc
+ArcTo
+BeginPath
+BitBlt
+ByeByeGDI
+CancelDC
+CheckColorsInGamut
+ChoosePixelFormat
+Chord
+CloseEnhMetaFile
+CloseFigure
+CloseMetaFile
+ColorCorrectPalette
+ColorMatchToTarget
+CombineRgn
+CombineTransform
+CopyEnhMetaFileA
+CopyEnhMetaFileW
+CopyMetaFileA
+CopyMetaFileW
+CreateBitmap
+CreateBitmapIndirect
+CreateBrushIndirect
+CreateColorSpaceA
+CreateColorSpaceW
+CreateCompatibleBitmap
+CreateCompatibleDC
+CreateDCA
+CreateDCW
+CreateDIBPatternBrush
+CreateDIBPatternBrushPt
+CreateDIBSection
+CreateDIBitmap
+CreateDiscardableBitmap
+CreateEllipticRgn
+CreateEllipticRgnIndirect
+CreateEnhMetaFileA
+CreateEnhMetaFileW
+CreateFontA
+CreateFontIndirectA
+CreateFontIndirectW
+CreateFontW
+CreateHalftonePalette
+CreateHatchBrush
+CreateICA
+CreateICW
+CreateMetaFileA
+CreateMetaFileW
+CreatePalette
+CreatePatternBrush
+CreatePen
+CreatePenIndirect
+CreatePolyPolygonRgn
+CreatePolygonRgn
+CreateRectRgn
+CreateRectRgnIndirect
+CreateRoundRectRgn
+CreateScalableFontResourceA
+CreateScalableFontResourceW
+CreateSolidBrush
+DPtoLP
+DeleteColorSpace
+DeleteDC
+DeleteEnhMetaFile
+DeleteMetaFile
+DeleteObject
+DescribePixelFormat
+DeviceCapabilitiesEx
+DeviceCapabilitiesExA
+DeviceCapabilitiesExW
+DrawEscape
+Ellipse
+EnableEUDC
+EndDoc
+EndPage
+EndPath
+EnumEnhMetaFile
+EnumFontFamiliesA
+EnumFontFamiliesExA
+EnumFontFamiliesExW
+EnumFontFamiliesW
+EnumFontsA
+EnumFontsW
+EnumICMProfilesA
+EnumICMProfilesW
+EnumMetaFile
+EnumObjects
+EqualRgn
+Escape
+ExcludeClipRect
+ExtCreatePen
+ExtCreateRegion
+ExtEscape
+ExtFloodFill
+ExtSelectClipRgn
+ExtTextOutA
+ExtTextOutW
+FillPath
+FillRgn
+FixBrushOrgEx
+FlattenPath
+FloodFill
+FrameRgn
+GdiComment
+GdiFlush
+GdiGetBatchLimit
+GdiPlayDCScript
+GdiPlayJournal
+GdiPlayScript
+GdiSetBatchLimit
+GetArcDirection
+GetAspectRatioFilterEx
+GetBitmapBits
+GetBitmapDimensionEx
+GetBkColor
+GetBkMode
+GetBoundsRect
+GetBrushOrgEx
+GetCharABCWidthsA
+GetCharABCWidthsFloatA
+GetCharABCWidthsFloatW
+GetCharABCWidthsW
+GetCharWidth32A
+GetCharWidth32W
+GetCharWidthA
+GetCharWidthFloatA
+GetCharWidthFloatW
+GetCharWidthW
+GetCharacterPlacementA
+GetCharacterPlacementW
+GetClipBox
+GetClipRgn
+GetColorAdjustment
+GetColorSpace
+GetCurrentObject
+GetCurrentPositionEx
+GetDCOrgEx
+GetDIBColorTable
+GetDIBits
+GetDeviceCaps
+GetDeviceGammaRamp
+GetEnhMetaFileA
+GetEnhMetaFileBits
+GetEnhMetaFileDescriptionA
+GetEnhMetaFileDescriptionW
+GetEnhMetaFileHeader
+GetEnhMetaFilePaletteEntries
+GetEnhMetaFileW
+GetFontData
+GetFontLanguageInfo
+GetFontResourceInfo
+GetGlyphOutline
+GetGlyphOutlineA
+GetGlyphOutlineW
+GetGraphicsMode
+GetICMProfileA
+GetICMProfileW
+GetKerningPairs
+GetKerningPairsA
+GetKerningPairsW
+GetLayout
+GetLogColorSpaceA
+GetLogColorSpaceW
+GetMapMode
+GetMetaFileA
+GetMetaFileBitsEx
+GetMetaFileW
+GetMetaRgn
+GetMiterLimit
+GetNearestColor
+GetNearestPaletteIndex
+GetObjectA
+GetObjectType
+GetObjectW
+GetOutlineTextMetricsA
+GetOutlineTextMetricsW
+GetPaletteEntries
+GetPath
+GetPixel
+GetPixelFormat
+GetPolyFillMode
+GetROP2
+GetRandomRgn
+GetRasterizerCaps
+GetRegionData
+GetRgnBox
+GetStockObject
+GetStretchBltMode
+GetSystemPaletteEntries
+GetSystemPaletteUse
+GetTextAlign
+GetTextCharacterExtra
+GetTextCharset
+GetTextCharsetInfo
+GetTextColor
+GetTextExtentExPointA
+GetTextExtentExPointW
+GetTextExtentPoint32A
+GetTextExtentPoint32W
+GetTextExtentPointA
+GetTextExtentPointW
+GetTextFaceA
+GetTextFaceW
+GetTextMetricsA
+GetTextMetricsW
+GetViewportExtEx
+GetViewportOrgEx
+GetWinMetaFileBits
+GetWindowExtEx
+GetWindowOrgEx
+GetWorldTransform
+IntersectClipRect
+InvertRgn
+LPtoDP
+LineDDA
+LineTo
+MaskBlt
+ModifyWorldTransform
+MoveToEx
+OffsetClipRgn
+OffsetRgn
+OffsetViewportOrgEx
+OffsetWindowOrgEx
+PaintRgn
+PatBlt
+PathToRegion
+Pie
+PlayEnhMetaFile
+PlayEnhMetaFileRecord
+PlayMetaFile
+PlayMetaFileRecord
+PlgBlt
+PolyBezier
+PolyBezierTo
+PolyDraw
+PolyPolygon
+PolyPolyline
+PolyTextOutA
+PolyTextOutW
+Polygon
+Polyline
+PolylineTo
+PtInRegion
+PtVisible
+RealizePalette
+RectInRegion
+RectVisible
+Rectangle
+RemoveFontResourceA
+RemoveFontResourceW
+ResetDCA
+ResetDCW
+ResizePalette
+RestoreDC
+RoundRect
+SaveDC
+ScaleViewportExtEx
+ScaleWindowExtEx
+SelectClipPath
+SelectClipRgn
+SelectObject
+SelectPalette
+SetAbortProc
+SetArcDirection
+SetBitmapBits
+SetBitmapDimensionEx
+SetBkColor
+SetBkMode
+SetBoundsRect
+SetBrushOrgEx
+SetColorAdjustment
+SetColorSpace
+SetDIBColorTable
+SetDIBits
+SetDIBitsToDevice
+SetDeviceGammaRamp
+SetEnhMetaFileBits
+SetFontEnumeration
+SetGraphicsMode
+SetICMMode
+SetICMProfileA
+SetICMProfileW
+SetLayout
+SetMagicColors
+SetMapMode
+SetMapperFlags
+SetMetaFileBitsEx
+SetMetaRgn
+SetMiterLimit
+SetObjectOwner
+SetPaletteEntries
+SetPixel
+SetPixelFormat
+SetPixelV
+SetPolyFillMode
+SetROP2
+SetRectRgn
+SetStretchBltMode
+SetSystemPaletteUse
+SetTextAlign
+SetTextCharacterExtra
+SetTextColor
+SetTextJustification
+SetViewportExtEx
+SetViewportOrgEx
+SetWinMetaFileBits
+SetWindowExtEx
+SetWindowOrgEx
+SetWorldTransform
+StartDocA
+StartDocW
+StartPage
+StretchBlt
+StretchDIBits
+StrokeAndFillPath
+StrokePath
+SwapBuffers
+TextOutA
+TextOutW
+TranslateCharsetInfo
+UnrealizeObject
+UpdateColors
+UpdateICMRegKeyA
+UpdateICMRegKeyW
+WidenPath
+gdiPlaySpoolStream
+pfnRealizePalette
+pfnSelectPalette
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/lib/kernel32.def b/.cache/overlay-toolchain/tcc_extract/tcc/lib/kernel32.def
new file mode 100644
index 00000000..f03e17ba
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/lib/kernel32.def
@@ -0,0 +1,770 @@
+LIBRARY kernel32.dll
+
+EXPORTS
+AddAtomA
+AddAtomW
+AllocConsole
+AllocLSCallback
+AllocSLCallback
+AreFileApisANSI
+BackupRead
+BackupSeek
+BackupWrite
+Beep
+BeginUpdateResourceA
+BeginUpdateResourceW
+BuildCommDCBA
+BuildCommDCBAndTimeoutsA
+BuildCommDCBAndTimeoutsW
+BuildCommDCBW
+CallNamedPipeA
+CallNamedPipeW
+Callback12
+Callback16
+Callback20
+Callback24
+Callback28
+Callback32
+Callback36
+Callback4
+Callback40
+Callback44
+Callback48
+Callback52
+Callback56
+Callback60
+Callback64
+Callback8
+CancelDeviceWakeupRequest
+CancelIo
+CancelWaitableTimer
+ClearCommBreak
+ClearCommError
+CloseHandle
+CloseProfileUserMapping
+CloseSystemHandle
+CommConfigDialogA
+CommConfigDialogW
+CompareFileTime
+CompareStringA
+CompareStringW
+ConnectNamedPipe
+ContinueDebugEvent
+ConvertDefaultLocale
+ConvertThreadToFiber
+ConvertToGlobalHandle
+CopyFileA
+CopyFileExA
+CopyFileExW
+CopyFileW
+CreateConsoleScreenBuffer
+CreateDirectoryA
+CreateDirectoryExA
+CreateDirectoryExW
+CreateDirectoryW
+CreateEventA
+CreateEventW
+CreateFiber
+CreateFileA
+CreateFileMappingA
+CreateFileMappingW
+CreateFileW
+CreateIoCompletionPort
+CreateKernelThread
+CreateMailslotA
+CreateMailslotW
+CreateMutexA
+CreateMutexW
+CreateNamedPipeA
+CreateNamedPipeW
+CreatePipe
+CreateProcessA
+CreateProcessW
+CreateRemoteThread
+CreateSemaphoreA
+CreateSemaphoreW
+CreateSocketHandle
+CreateTapePartition
+CreateThread
+CreateToolhelp32Snapshot
+CreateWaitableTimerA
+CreateWaitableTimerW
+DebugActiveProcess
+DebugBreak
+DefineDosDeviceA
+DefineDosDeviceW
+DeleteAtom
+DeleteCriticalSection
+DeleteFiber
+DeleteFileA
+DeleteFileW
+DeviceIoControl
+DisableThreadLibraryCalls
+DisconnectNamedPipe
+DosDateTimeToFileTime
+DuplicateHandle
+EndUpdateResourceA
+EndUpdateResourceW
+EnterCriticalSection
+EnumCalendarInfoA
+EnumCalendarInfoExA
+EnumCalendarInfoExW
+EnumCalendarInfoW
+EnumDateFormatsA
+EnumDateFormatsExA
+EnumDateFormatsExW
+EnumDateFormatsW
+EnumLanguageGroupLocalesA
+EnumLanguageGroupLocalesW
+EnumResourceLanguagesA
+EnumResourceLanguagesW
+EnumResourceNamesA
+EnumResourceNamesW
+EnumResourceTypesA
+EnumResourceTypesW
+EnumSystemCodePagesA
+EnumSystemCodePagesW
+EnumSystemGeoID
+EnumSystemLanguageGroupsA
+EnumSystemLanguageGroupsW
+EnumSystemLocalesA
+EnumSystemLocalesW
+EnumTimeFormatsA
+EnumTimeFormatsW
+EnumUILanguagesA
+EnumUILanguagesW
+EraseTape
+EscapeCommFunction
+ExitProcess
+ExitThread
+ExpandEnvironmentStringsA
+ExpandEnvironmentStringsW
+FT_Exit0
+FT_Exit12
+FT_Exit16
+FT_Exit20
+FT_Exit24
+FT_Exit28
+FT_Exit32
+FT_Exit36
+FT_Exit4
+FT_Exit40
+FT_Exit44
+FT_Exit48
+FT_Exit52
+FT_Exit56
+FT_Exit8
+FT_Prolog
+FT_Thunk
+FatalAppExitA
+FatalAppExitW
+FatalExit
+FileTimeToDosDateTime
+FileTimeToLocalFileTime
+FileTimeToSystemTime
+FillConsoleOutputAttribute
+FillConsoleOutputCharacterA
+FillConsoleOutputCharacterW
+FindAtomA
+FindAtomW
+FindClose
+FindCloseChangeNotification
+FindFirstChangeNotificationA
+FindFirstChangeNotificationW
+FindFirstFileA
+FindFirstFileExA
+FindFirstFileExW
+FindFirstFileW
+FindNextChangeNotification
+FindNextFileA
+FindNextFileW
+FindResourceA
+FindResourceExA
+FindResourceExW
+FindResourceW
+FlushConsoleInputBuffer
+FlushFileBuffers
+FlushInstructionCache
+FlushViewOfFile
+FoldStringA
+FoldStringW
+FormatMessageA
+FormatMessageW
+FreeConsole
+FreeEnvironmentStringsA
+FreeEnvironmentStringsW
+FreeLSCallback
+FreeLibrary
+FreeLibraryAndExitThread
+FreeResource
+FreeSLCallback
+GenerateConsoleCtrlEvent
+GetACP
+GetAtomNameA
+GetAtomNameW
+GetBinaryType
+GetBinaryTypeA
+GetBinaryTypeW
+GetCPInfo
+GetCPInfoExA
+GetCPInfoExW
+GetCalendarInfoA
+GetCalendarInfoW
+GetCommConfig
+GetCommMask
+GetCommModemStatus
+GetCommProperties
+GetCommState
+GetCommTimeouts
+GetCommandLineA
+GetCommandLineW
+GetCompressedFileSizeA
+GetCompressedFileSizeW
+GetComputerNameA
+GetComputerNameW
+GetConsoleCP
+GetConsoleCursorInfo
+GetConsoleMode
+GetConsoleOutputCP
+GetConsoleScreenBufferInfo
+GetConsoleTitleA
+GetConsoleTitleW
+GetCurrencyFormatA
+GetCurrencyFormatW
+GetCurrentDirectoryA
+GetCurrentDirectoryW
+GetCurrentProcess
+GetCurrentProcessId
+GetCurrentThread
+GetCurrentThreadId
+GetDateFormatA
+GetDateFormatW
+GetDaylightFlag
+GetDefaultCommConfigA
+GetDefaultCommConfigW
+GetDevicePowerState
+GetDiskFreeSpaceA
+GetDiskFreeSpaceExA
+GetDiskFreeSpaceExW
+GetDiskFreeSpaceW
+GetDriveTypeA
+GetDriveTypeW
+GetEnvironmentStrings
+GetEnvironmentStringsA
+GetEnvironmentStringsW
+GetEnvironmentVariableA
+GetEnvironmentVariableW
+GetErrorMode
+GetExitCodeProcess
+GetExitCodeThread
+GetFileAttributesA
+GetFileAttributesExA
+GetFileAttributesExW
+GetFileAttributesW
+GetFileInformationByHandle
+GetFileSize
+GetFileTime
+GetFileType
+GetFullPathNameA
+GetFullPathNameW
+GetGeoInfoA
+GetGeoInfoW
+GetHandleContext
+GetHandleInformation
+GetLSCallbackTarget
+GetLSCallbackTemplate
+GetLargestConsoleWindowSize
+GetLastError
+GetLocalTime
+GetLocaleInfoA
+GetLocaleInfoW
+GetLogicalDriveStringsA
+GetLogicalDriveStringsW
+GetLogicalDrives
+GetLongPathNameA
+GetLongPathNameW
+GetMailslotInfo
+GetModuleFileNameA
+GetModuleFileNameW
+GetModuleHandleA
+GetModuleHandleW
+GetModuleHandleExA
+GetModuleHandleExW
+GetNamedPipeHandleStateA
+GetNamedPipeHandleStateW
+GetNamedPipeInfo
+GetNumberFormatA
+GetNumberFormatW
+GetNumberOfConsoleInputEvents
+GetNumberOfConsoleMouseButtons
+GetOEMCP
+GetOverlappedResult
+GetPriorityClass
+GetPrivateProfileIntA
+GetPrivateProfileIntW
+GetPrivateProfileSectionA
+GetPrivateProfileSectionNamesA
+GetPrivateProfileSectionNamesW
+GetPrivateProfileSectionW
+GetPrivateProfileStringA
+GetPrivateProfileStringW
+GetPrivateProfileStructA
+GetPrivateProfileStructW
+GetProcAddress
+GetProcessAffinityMask
+GetProcessFlags
+GetProcessHeap
+GetProcessHeaps
+GetProcessPriorityBoost
+GetProcessShutdownParameters
+GetProcessTimes
+GetProcessVersion
+GetProcessWorkingSetSize
+GetProductName
+GetProfileIntA
+GetProfileIntW
+GetProfileSectionA
+GetProfileSectionW
+GetProfileStringA
+GetProfileStringW
+GetQueuedCompletionStatus
+GetSLCallbackTarget
+GetSLCallbackTemplate
+GetShortPathNameA
+GetShortPathNameW
+GetStartupInfoA
+GetStartupInfoW
+GetStdHandle
+GetStringTypeA
+GetStringTypeExA
+GetStringTypeExW
+GetStringTypeW
+GetSystemDefaultLCID
+GetSystemDefaultLangID
+GetSystemDefaultUILanguage
+GetSystemDirectoryA
+GetSystemDirectoryW
+GetSystemInfo
+GetSystemPowerStatus
+GetSystemTime
+GetSystemTimeAdjustment
+GetSystemTimeAsFileTime
+GetTapeParameters
+GetTapePosition
+GetTapeStatus
+GetTempFileNameA
+GetTempFileNameW
+GetTempPathA
+GetTempPathW
+GetThreadContext
+GetThreadLocale
+GetThreadPriority
+GetThreadPriorityBoost
+GetThreadSelectorEntry
+GetThreadTimes
+GetTickCount
+GetTimeFormatA
+GetTimeFormatW
+GetTimeZoneInformation
+GetUserDefaultLCID
+GetUserDefaultLangID
+GetUserDefaultUILanguage
+GetUserGeoID
+GetVersion
+GetVersionExA
+GetVersionExW
+GetVolumeInformationA
+GetVolumeInformationW
+GetWindowsDirectoryA
+GetWindowsDirectoryW
+GetWriteWatch
+GlobalAddAtomA
+GlobalAddAtomW
+GlobalAlloc
+GlobalCompact
+GlobalDeleteAtom
+GlobalFindAtomA
+GlobalFindAtomW
+GlobalFix
+GlobalFlags
+GlobalFree
+GlobalGetAtomNameA
+GlobalGetAtomNameW
+GlobalHandle
+GlobalLock
+GlobalMemoryStatus
+GlobalReAlloc
+GlobalSize
+GlobalUnWire
+GlobalUnfix
+GlobalUnlock
+GlobalWire
+Heap32First
+Heap32ListFirst
+Heap32ListNext
+Heap32Next
+HeapAlloc
+HeapCompact
+HeapCreate
+HeapDestroy
+HeapFree
+HeapLock
+HeapReAlloc
+HeapSetFlags
+HeapSize
+HeapUnlock
+HeapValidate
+HeapWalk
+InitAtomTable
+InitializeCriticalSection
+InitializeCriticalSectionAndSpinCount
+InterlockedCompareExchange
+InterlockedDecrement
+InterlockedExchange
+InterlockedExchangeAdd
+InterlockedIncrement
+InvalidateNLSCache
+IsBadCodePtr
+IsBadHugeReadPtr
+IsBadHugeWritePtr
+IsBadReadPtr
+IsBadStringPtrA
+IsBadStringPtrW
+IsBadWritePtr
+IsDBCSLeadByte
+IsDBCSLeadByteEx
+IsDebuggerPresent
+IsLSCallback
+IsProcessorFeaturePresent
+IsSLCallback
+IsSystemResumeAutomatic
+IsValidCodePage
+IsValidLanguageGroup
+IsValidLocale
+K32Thk1632Epilog
+K32Thk1632Prolog
+K32_NtCreateFile
+K32_RtlNtStatusToDosError
+LCMapStringA
+LCMapStringW
+LeaveCriticalSection
+LoadLibraryA
+LoadLibraryExA
+LoadLibraryExW
+LoadLibraryW
+LoadModule
+LoadResource
+LocalAlloc
+LocalCompact
+LocalFileTimeToFileTime
+LocalFlags
+LocalFree
+LocalHandle
+LocalLock
+LocalReAlloc
+LocalShrink
+LocalSize
+LocalUnlock
+LockFile
+LockFileEx
+LockResource
+MakeCriticalSectionGlobal
+MapHInstLS
+MapHInstLS_PN
+MapHInstSL
+MapHInstSL_PN
+MapHModuleLS
+MapHModuleSL
+MapLS
+MapSL
+MapSLFix
+MapViewOfFile
+MapViewOfFileEx
+Module32First
+Module32Next
+MoveFileA
+MoveFileExA
+MoveFileExW
+MoveFileW
+MulDiv
+MultiByteToWideChar
+NotifyNLSUserCache
+OpenEventA
+OpenEventW
+OpenFile
+OpenFileMappingA
+OpenFileMappingW
+OpenMutexA
+OpenMutexW
+OpenProcess
+OpenProfileUserMapping
+OpenSemaphoreA
+OpenSemaphoreW
+OpenThread
+OpenVxDHandle
+OpenWaitableTimerA
+OpenWaitableTimerW
+OutputDebugStringA
+OutputDebugStringW
+PeekConsoleInputA
+PeekConsoleInputW
+PeekNamedPipe
+PostQueuedCompletionStatus
+PrepareTape
+Process32First
+Process32Next
+PulseEvent
+PurgeComm
+QT_Thunk
+QueryDosDeviceA
+QueryDosDeviceW
+QueryNumberOfEventLogRecords
+QueryOldestEventLogRecord
+QueryPerformanceCounter
+QueryPerformanceFrequency
+QueueUserAPC
+RaiseException
+ReadConsoleA
+ReadConsoleInputA
+ReadConsoleInputW
+ReadConsoleOutputA
+ReadConsoleOutputAttribute
+ReadConsoleOutputCharacterA
+ReadConsoleOutputCharacterW
+ReadConsoleOutputW
+ReadConsoleW
+ReadDirectoryChangesW
+ReadFile
+ReadFileEx
+ReadFileScatter
+ReadProcessMemory
+RegisterServiceProcess
+RegisterSysMsgHandler
+ReinitializeCriticalSection
+ReleaseMutex
+ReleaseSemaphore
+RemoveDirectoryA
+RemoveDirectoryW
+RequestDeviceWakeup
+RequestWakeupLatency
+ResetEvent
+ResetNLSUserInfoCache
+ResetWriteWatch
+ResumeThread
+RtlAddFunctionTable
+RtlDeleteFunctionTable
+RtlFillMemory
+RtlInstallFunctionTableCallback
+RtlMoveMemory
+RtlUnwind
+RtlUnwindEx
+RtlZeroMemory
+SMapLS
+SMapLS_IP_EBP_12
+SMapLS_IP_EBP_16
+SMapLS_IP_EBP_20
+SMapLS_IP_EBP_24
+SMapLS_IP_EBP_28
+SMapLS_IP_EBP_32
+SMapLS_IP_EBP_36
+SMapLS_IP_EBP_40
+SMapLS_IP_EBP_8
+SUnMapLS
+SUnMapLS_IP_EBP_12
+SUnMapLS_IP_EBP_16
+SUnMapLS_IP_EBP_20
+SUnMapLS_IP_EBP_24
+SUnMapLS_IP_EBP_28
+SUnMapLS_IP_EBP_32
+SUnMapLS_IP_EBP_36
+SUnMapLS_IP_EBP_40
+SUnMapLS_IP_EBP_8
+ScrollConsoleScreenBufferA
+ScrollConsoleScreenBufferW
+SearchPathA
+SearchPathW
+SetCalendarInfoA
+SetCalendarInfoW
+SetCommBreak
+SetCommConfig
+SetCommMask
+SetCommState
+SetCommTimeouts
+SetComputerNameA
+SetComputerNameW
+SetConsoleActiveScreenBuffer
+SetConsoleCP
+SetConsoleCtrlHandler
+SetConsoleCursorInfo
+SetConsoleCursorPosition
+SetConsoleMode
+SetConsoleOutputCP
+SetConsoleScreenBufferSize
+SetConsoleTextAttribute
+SetConsoleTitleA
+SetConsoleTitleW
+SetConsoleWindowInfo
+SetCriticalSectionSpinCount
+SetCurrentDirectoryA
+SetCurrentDirectoryW
+SetDaylightFlag
+SetDefaultCommConfigA
+SetDefaultCommConfigW
+SetEndOfFile
+SetEnvironmentVariableA
+SetEnvironmentVariableW
+SetErrorMode
+SetEvent
+SetFileApisToANSI
+SetFileApisToOEM
+SetFileAttributesA
+SetFileAttributesW
+SetFilePointer
+SetFilePointerEx
+SetFileTime
+SetHandleContext
+SetHandleCount
+SetHandleInformation
+SetLastError
+SetLocalTime
+SetLocaleInfoA
+SetLocaleInfoW
+SetMailslotInfo
+SetMessageWaitingIndicator
+SetNamedPipeHandleState
+SetPriorityClass
+SetProcessAffinityMask
+SetProcessPriorityBoost
+SetProcessShutdownParameters
+SetProcessWorkingSetSize
+SetStdHandle
+SetSystemPowerState
+SetSystemTime
+SetSystemTimeAdjustment
+SetTapeParameters
+SetTapePosition
+SetThreadAffinityMask
+SetThreadContext
+SetThreadExecutionState
+SetThreadIdealProcessor
+SetThreadLocale
+SetThreadPriority
+SetThreadPriorityBoost
+SetTimeZoneInformation
+SetUnhandledExceptionFilter
+SetUserGeoID
+SetVolumeLabelA
+SetVolumeLabelW
+SetWaitableTimer
+SetupComm
+SignalObjectAndWait
+SignalSysMsgHandlers
+SizeofResource
+Sleep
+SleepEx
+SuspendThread
+SwitchToFiber
+SwitchToThread
+SystemTimeToFileTime
+SystemTimeToTzSpecificLocalTime
+TerminateProcess
+TerminateThread
+Thread32First
+Thread32Next
+ThunkConnect32
+TlsAlloc
+TlsAllocInternal
+TlsFree
+TlsFreeInternal
+TlsGetValue
+TlsSetValue
+Toolhelp32ReadProcessMemory
+TransactNamedPipe
+TransmitCommChar
+TryEnterCriticalSection
+UTRegister
+UTUnRegister
+UnMapLS
+UnMapSLFixArray
+UnhandledExceptionFilter
+UninitializeCriticalSection
+UnlockFile
+UnlockFileEx
+UnmapViewOfFile
+UpdateResourceA
+UpdateResourceW
+VerLanguageNameA
+VerLanguageNameW
+VirtualAlloc
+VirtualAllocEx
+VirtualFree
+VirtualFreeEx
+VirtualLock
+VirtualProtect
+VirtualProtectEx
+VirtualQuery
+VirtualQueryEx
+VirtualUnlock
+WaitCommEvent
+WaitForDebugEvent
+WaitForMultipleObjects
+WaitForMultipleObjectsEx
+WaitForSingleObject
+WaitForSingleObjectEx
+WaitNamedPipeA
+WaitNamedPipeW
+WideCharToMultiByte
+WinExec
+WriteConsoleA
+WriteConsoleInputA
+WriteConsoleInputW
+WriteConsoleOutputA
+WriteConsoleOutputAttribute
+WriteConsoleOutputCharacterA
+WriteConsoleOutputCharacterW
+WriteConsoleOutputW
+WriteConsoleW
+WriteFile
+WriteFileEx
+WriteFileGather
+WritePrivateProfileSectionA
+WritePrivateProfileSectionW
+WritePrivateProfileStringA
+WritePrivateProfileStringW
+WritePrivateProfileStructA
+WritePrivateProfileStructW
+WriteProcessMemory
+WriteProfileSectionA
+WriteProfileSectionW
+WriteProfileStringA
+WriteProfileStringW
+WriteTapemark
+_DebugOut
+_DebugPrintf
+_hread
+_hwrite
+_lclose
+_lcreat
+_llseek
+_lopen
+_lread
+_lwrite
+dprintf
+lstrcat
+lstrcatA
+lstrcatW
+lstrcmp
+lstrcmpA
+lstrcmpW
+lstrcmpi
+lstrcmpiA
+lstrcmpiW
+lstrcpy
+lstrcpyA
+lstrcpyW
+lstrcpyn
+lstrcpynA
+lstrcpynW
+lstrlen
+lstrlenA
+lstrlenW
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/lib/libtcc1-32.a b/.cache/overlay-toolchain/tcc_extract/tcc/lib/libtcc1-32.a
new file mode 100644
index 00000000..3fdf1fae
Binary files /dev/null and b/.cache/overlay-toolchain/tcc_extract/tcc/lib/libtcc1-32.a differ
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/lib/libtcc1-64.a b/.cache/overlay-toolchain/tcc_extract/tcc/lib/libtcc1-64.a
new file mode 100644
index 00000000..cf1bf6da
Binary files /dev/null and b/.cache/overlay-toolchain/tcc_extract/tcc/lib/libtcc1-64.a differ
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/lib/msvcrt.def b/.cache/overlay-toolchain/tcc_extract/tcc/lib/msvcrt.def
new file mode 100644
index 00000000..742acb8b
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/lib/msvcrt.def
@@ -0,0 +1,1399 @@
+LIBRARY msvcrt.dll
+
+EXPORTS
+$I10_OUTPUT
+??0__non_rtti_object@@QAE@ABV0@@Z
+??0__non_rtti_object@@QAE@PBD@Z
+??0bad_cast@@AAE@PBQBD@Z
+??0bad_cast@@QAE@ABQBD@Z
+??0bad_cast@@QAE@ABV0@@Z
+??0bad_cast@@QAE@PBD@Z
+??0bad_typeid@@QAE@ABV0@@Z
+??0bad_typeid@@QAE@PBD@Z
+??0exception@@QAE@ABQBD@Z
+??0exception@@QAE@ABQBDH@Z
+??0exception@@QAE@ABV0@@Z
+??0exception@@QAE@XZ
+??1__non_rtti_object@@UAE@XZ
+??1bad_cast@@UAE@XZ
+??1bad_typeid@@UAE@XZ
+??1exception@@UAE@XZ
+??1type_info@@UAE@XZ
+??2@YAPAXI@Z
+??2@YAPAXIHPBDH@Z
+??3@YAXPAX@Z
+??4__non_rtti_object@@QAEAAV0@ABV0@@Z
+??4bad_cast@@QAEAAV0@ABV0@@Z
+??4bad_typeid@@QAEAAV0@ABV0@@Z
+??4exception@@QAEAAV0@ABV0@@Z
+??8type_info@@QBEHABV0@@Z
+??9type_info@@QBEHABV0@@Z
+??_7__non_rtti_object@@6B@
+??_7bad_cast@@6B@
+??_7bad_typeid@@6B@
+??_7exception@@6B@
+??_E__non_rtti_object@@UAEPAXI@Z
+??_Ebad_cast@@UAEPAXI@Z
+??_Ebad_typeid@@UAEPAXI@Z
+??_Eexception@@UAEPAXI@Z
+??_Fbad_cast@@QAEXXZ
+??_Fbad_typeid@@QAEXXZ
+??_G__non_rtti_object@@UAEPAXI@Z
+??_Gbad_cast@@UAEPAXI@Z
+??_Gbad_typeid@@UAEPAXI@Z
+??_Gexception@@UAEPAXI@Z
+??_U@YAPAXI@Z
+??_U@YAPAXIHPBDH@Z
+??_V@YAXPAX@Z
+?_query_new_handler@@YAP6AHI@ZXZ
+?_query_new_mode@@YAHXZ
+?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z
+?_set_new_mode@@YAHH@Z
+?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z
+?before@type_info@@QBEHABV1@@Z
+?name@type_info@@QBEPBDXZ
+?raw_name@type_info@@QBEPBDXZ
+?set_new_handler@@YAP6AXXZP6AXXZ@Z
+?set_terminate@@YAP6AXXZP6AXXZ@Z
+?set_unexpected@@YAP6AXXZP6AXXZ@Z
+?terminate@@YAXXZ
+?unexpected@@YAXXZ
+?what@exception@@UBEPBDXZ
+_CIacos
+_CIasin
+_CIatan
+_CIatan2
+_CIcos
+_CIcosh
+_CIexp
+_CIfmod
+_CIlog
+_CIlog10
+_CIpow
+_CIsin
+_CIsinh
+_CIsqrt
+_CItan
+_CItanh
+_CrtCheckMemory
+_CrtDbgBreak
+_CrtDbgReport
+_CrtDbgReportV
+_CrtDbgReportW
+_CrtDbgReportWV
+_CrtDoForAllClientObjects
+_CrtDumpMemoryLeaks
+_CrtIsMemoryBlock
+_CrtIsValidHeapPointer
+_CrtIsValidPointer
+_CrtMemCheckpoint
+_CrtMemDifference
+_CrtMemDumpAllObjectsSince
+_CrtMemDumpStatistics
+_CrtReportBlockType
+_CrtSetAllocHook
+_CrtSetBreakAlloc
+_CrtSetDbgBlockType
+_CrtSetDbgFlag
+_CrtSetDumpClient
+_CrtSetReportFile
+_CrtSetReportHook
+_CrtSetReportHook2
+_CrtSetReportMode
+_CxxThrowException
+_EH_prolog
+_Getdays
+_Getmonths
+_Gettnames
+_HUGE
+_Strftime
+_XcptFilter
+__CppXcptFilter
+__CxxCallUnwindDelDtor
+__CxxCallUnwindDtor
+__CxxCallUnwindVecDtor
+__CxxDetectRethrow
+__CxxExceptionFilter
+__CxxFrameHandler
+__CxxFrameHandler2
+__CxxFrameHandler3
+__CxxLongjmpUnwind
+__CxxQueryExceptionSize
+__CxxRegisterExceptionObject
+__CxxUnregisterExceptionObject
+__DestructExceptionObject
+__RTCastToVoid
+__RTDynamicCast
+__RTtypeid
+__STRINGTOLD
+___lc_codepage_func
+___lc_collate_cp_func
+___lc_handle_func
+___mb_cur_max_func
+___setlc_active_func
+___unguarded_readlc_active_add_func
+__argc
+__argv
+__badioinfo
+__crtCompareStringA
+__crtCompareStringW
+__crtGetLocaleInfoW
+__crtGetStringTypeW
+__crtLCMapStringA
+__crtLCMapStringW
+__daylight
+__dllonexit
+__doserrno
+__dstbias
+__fpecode
+__getmainargs
+__initenv
+__iob_func
+__isascii
+__iscsym
+__iscsymf
+__lc_codepage
+__lc_collate_cp
+__lc_handle
+__lconv_init
+__libm_sse2_acos
+__libm_sse2_acosf
+__libm_sse2_asin
+__libm_sse2_asinf
+__libm_sse2_atan
+__libm_sse2_atan2
+__libm_sse2_atanf
+__libm_sse2_cos
+__libm_sse2_cosf
+__libm_sse2_exp
+__libm_sse2_expf
+__libm_sse2_log
+__libm_sse2_log10
+__libm_sse2_log10f
+__libm_sse2_logf
+__libm_sse2_pow
+__libm_sse2_powf
+__libm_sse2_sin
+__libm_sse2_sinf
+__libm_sse2_tan
+__libm_sse2_tanf
+__mb_cur_max
+__p___argc
+__p___argv
+__p___initenv
+__p___mb_cur_max
+__p___wargv
+__p___winitenv
+__p__acmdln
+__p__amblksiz
+__p__commode
+__p__daylight
+__p__dstbias
+__p__environ
+__p__fileinfo
+__p__fmode
+__p__iob
+__p__mbcasemap
+__p__mbctype
+__p__osver
+__p__pctype
+__p__pgmptr
+__p__pwctype
+__p__timezone
+__p__tzname
+__p__wcmdln
+__p__wenviron
+__p__winmajor
+__p__winminor
+__p__winver
+__p__wpgmptr
+__pctype_func
+__pioinfo
+__pwctype_func
+__pxcptinfoptrs
+__set_app_type
+__setlc_active
+__setusermatherr
+__strncnt
+__threadhandle
+__threadid
+__toascii
+__unDName
+__unDNameEx
+__uncaught_exception
+__unguarded_readlc_active
+__wargv
+__wcserror
+__wcserror_s
+__wcsncnt
+__wgetmainargs
+__winitenv
+_abnormal_termination
+_abs64
+_access
+_access_s
+_acmdln
+_adj_fdiv_m16i
+_adj_fdiv_m32
+_adj_fdiv_m32i
+_adj_fdiv_m64
+_adj_fdiv_r
+_adj_fdivr_m16i
+_adj_fdivr_m32
+_adj_fdivr_m32i
+_adj_fdivr_m64
+_adj_fpatan
+_adj_fprem
+_adj_fprem1
+_adj_fptan
+_adjust_fdiv
+_aexit_rtn
+_aligned_free
+_aligned_free_dbg
+_aligned_malloc
+_aligned_malloc_dbg
+_aligned_offset_malloc
+_aligned_offset_malloc_dbg
+_aligned_offset_realloc
+_aligned_offset_realloc_dbg
+_aligned_realloc
+_aligned_realloc_dbg
+_amsg_exit
+_assert
+_atodbl
+_atodbl_l
+_atof_l
+_atoflt_l
+_atoi64
+_atoi64_l
+_atoi_l
+_atol_l
+_atoldbl
+_atoldbl_l
+_beep
+_beginthread
+_beginthreadex
+_c_exit
+_cabs
+_callnewh
+_calloc_dbg
+_cexit
+_cgets
+_cgets_s
+_cgetws
+_cgetws_s
+_chdir
+_chdrive
+_chgsign
+_chkesp
+_chmod
+_chsize
+_chsize_s
+_chvalidator
+_chvalidator_l
+_clearfp
+_close
+_commit
+_commode
+_control87
+_controlfp
+_controlfp_s
+_copysign
+_cprintf
+_cprintf_l
+_cprintf_p
+_cprintf_p_l
+_cprintf_s
+_cprintf_s_l
+_cputs
+_cputws
+_creat
+_crtAssertBusy
+_crtBreakAlloc
+_crtDbgFlag
+_cscanf
+_cscanf_l
+_cscanf_s
+_cscanf_s_l
+_ctime32
+_ctime32_s
+_ctime64
+_ctime64_s
+_ctype
+_cwait
+_cwprintf
+_cwprintf_l
+_cwprintf_p
+_cwprintf_p_l
+_cwprintf_s
+_cwprintf_s_l
+_cwscanf
+_cwscanf_l
+_cwscanf_s
+_cwscanf_s_l
+_daylight
+_difftime32
+_difftime64
+_dstbias
+_dup
+_dup2
+_ecvt
+_ecvt_s
+_endthread
+_endthreadex
+_environ
+_eof
+_errno
+_except_handler2
+_except_handler3
+_except_handler4_common
+_execl
+_execle
+_execlp
+_execlpe
+_execv
+_execve
+_execvp
+_execvpe
+_exit
+_expand
+_expand_dbg
+_fcloseall
+_fcvt
+_fcvt_s
+_fdopen
+_fgetchar
+_fgetwchar
+_filbuf
+_fileinfo
+_filelength
+_filelengthi64
+_fileno
+_findclose
+_findfirst
+_findfirst64
+_findfirsti64
+_findnext
+_findnext64
+_findnexti64
+_finite
+_flsbuf
+_flushall
+_fmode
+_fpclass
+_fpieee_flt
+_fpreset
+_fprintf_l
+_fprintf_p
+_fprintf_p_l
+_fprintf_s_l
+_fputchar
+_fputwchar
+_free_dbg
+_freea
+_freea_s
+_fscanf_l
+_fscanf_s_l
+_fseeki64
+_fsopen
+_fstat
+_fstat64
+_fstati64
+_ftime
+_ftime32
+_ftime32_s
+_ftime64
+_ftime64_s
+_ftol
+_ftol2
+_ftol2_sse
+_ftol2_sse_excpt
+_fullpath
+_fullpath_dbg
+_futime
+_futime32
+_futime64
+_fwprintf_l
+_fwprintf_p
+_fwprintf_p_l
+_fwprintf_s_l
+_fwscanf_l
+_fwscanf_s_l
+_gcvt
+_gcvt_s
+_get_doserrno
+_get_environ
+_get_errno
+_get_fileinfo
+_get_fmode
+_get_heap_handle
+_get_osfhandle
+_get_osplatform
+_get_osver
+_get_output_format
+_get_pgmptr
+_get_sbh_threshold
+_get_wenviron
+_get_winmajor
+_get_winminor
+_get_winver
+_get_wpgmptr
+_getch
+_getche
+_getcwd
+_getdcwd
+_getdiskfree
+_getdllprocaddr
+_getdrive
+_getdrives
+_getmaxstdio
+_getmbcp
+_getpid
+_getsystime
+_getw
+_getwch
+_getwche
+_getws
+_global_unwind2
+_gmtime32
+_gmtime32_s
+_gmtime64
+_gmtime64_s
+_heapadd
+_heapchk
+_heapmin
+_heapset
+_heapused
+_heapwalk
+_hypot
+_i64toa
+_i64toa_s
+_i64tow
+_i64tow_s
+_initterm
+_initterm_e
+_inp
+_inpd
+_inpw
+_invalid_parameter
+_iob
+_isalnum_l
+_isalpha_l
+_isatty
+_iscntrl_l
+_isctype
+_isctype_l
+_isdigit_l
+_isgraph_l
+_isleadbyte_l
+_islower_l
+_ismbbalnum
+_ismbbalnum_l
+_ismbbalpha
+_ismbbalpha_l
+_ismbbgraph
+_ismbbgraph_l
+_ismbbkalnum
+_ismbbkalnum_l
+_ismbbkana
+_ismbbkana_l
+_ismbbkprint
+_ismbbkprint_l
+_ismbbkpunct
+_ismbbkpunct_l
+_ismbblead
+_ismbblead_l
+_ismbbprint
+_ismbbprint_l
+_ismbbpunct
+_ismbbpunct_l
+_ismbbtrail
+_ismbbtrail_l
+_ismbcalnum
+_ismbcalnum_l
+_ismbcalpha
+_ismbcalpha_l
+_ismbcdigit
+_ismbcdigit_l
+_ismbcgraph
+_ismbcgraph_l
+_ismbchira
+_ismbchira_l
+_ismbckata
+_ismbckata_l
+_ismbcl0
+_ismbcl0_l
+_ismbcl1
+_ismbcl1_l
+_ismbcl2
+_ismbcl2_l
+_ismbclegal
+_ismbclegal_l
+_ismbclower
+_ismbclower_l
+_ismbcprint
+_ismbcprint_l
+_ismbcpunct
+_ismbcpunct_l
+_ismbcspace
+_ismbcspace_l
+_ismbcsymbol
+_ismbcsymbol_l
+_ismbcupper
+_ismbcupper_l
+_ismbslead
+_ismbslead_l
+_ismbstrail
+_ismbstrail_l
+_isnan
+_isprint_l
+_isspace_l
+_isupper_l
+_iswalnum_l
+_iswalpha_l
+_iswcntrl_l
+_iswctype_l
+_iswdigit_l
+_iswgraph_l
+_iswlower_l
+_iswprint_l
+_iswpunct_l
+_iswspace_l
+_iswupper_l
+_iswxdigit_l
+_isxdigit_l
+_itoa
+_itoa_s
+_itow
+_itow_s
+_j0
+_j1
+_jn
+_kbhit
+_lfind
+_lfind_s
+_loaddll
+_local_unwind2
+_local_unwind4
+_localtime32
+_localtime32_s
+_localtime64
+_localtime64_s
+_lock
+_locking
+_logb
+_longjmpex
+_lrotl
+_lrotr
+_lsearch
+_lsearch_s
+_lseek
+_lseeki64
+_ltoa
+_ltoa_s
+_ltow
+_ltow_s
+_makepath
+_makepath_s
+_malloc_dbg
+_mbbtombc
+_mbbtombc_l
+_mbbtype
+_mbcasemap
+_mbccpy
+_mbccpy_l
+_mbccpy_s
+_mbccpy_s_l
+_mbcjistojms
+_mbcjistojms_l
+_mbcjmstojis
+_mbcjmstojis_l
+_mbclen
+_mbclen_l
+_mbctohira
+_mbctohira_l
+_mbctokata
+_mbctokata_l
+_mbctolower
+_mbctolower_l
+_mbctombb
+_mbctombb_l
+_mbctoupper
+_mbctoupper_l
+_mbctype
+_mblen_l
+_mbsbtype
+_mbsbtype_l
+_mbscat
+_mbscat_s
+_mbscat_s_l
+_mbschr
+_mbschr_l
+_mbscmp
+_mbscmp_l
+_mbscoll
+_mbscoll_l
+_mbscpy
+_mbscpy_s
+_mbscpy_s_l
+_mbscspn
+_mbscspn_l
+_mbsdec
+_mbsdec_l
+_mbsdup
+_mbsicmp
+_mbsicmp_l
+_mbsicoll
+_mbsicoll_l
+_mbsinc
+_mbsinc_l
+_mbslen
+_mbslen_l
+_mbslwr
+_mbslwr_l
+_mbslwr_s
+_mbslwr_s_l
+_mbsnbcat
+_mbsnbcat_l
+_mbsnbcat_s
+_mbsnbcat_s_l
+_mbsnbcmp
+_mbsnbcmp_l
+_mbsnbcnt
+_mbsnbcnt_l
+_mbsnbcoll
+_mbsnbcoll_l
+_mbsnbcpy
+_mbsnbcpy_l
+_mbsnbcpy_s
+_mbsnbcpy_s_l
+_mbsnbicmp
+_mbsnbicmp_l
+_mbsnbicoll
+_mbsnbicoll_l
+_mbsnbset
+_mbsnbset_l
+_mbsnbset_s
+_mbsnbset_s_l
+_mbsncat
+_mbsncat_l
+_mbsncat_s
+_mbsncat_s_l
+_mbsnccnt
+_mbsnccnt_l
+_mbsncmp
+_mbsncmp_l
+_mbsncoll
+_mbsncoll_l
+_mbsncpy
+_mbsncpy_l
+_mbsncpy_s
+_mbsncpy_s_l
+_mbsnextc
+_mbsnextc_l
+_mbsnicmp
+_mbsnicmp_l
+_mbsnicoll
+_mbsnicoll_l
+_mbsninc
+_mbsninc_l
+_mbsnlen
+_mbsnlen_l
+_mbsnset
+_mbsnset_l
+_mbsnset_s
+_mbsnset_s_l
+_mbspbrk
+_mbspbrk_l
+_mbsrchr
+_mbsrchr_l
+_mbsrev
+_mbsrev_l
+_mbsset
+_mbsset_l
+_mbsset_s
+_mbsset_s_l
+_mbsspn
+_mbsspn_l
+_mbsspnp
+_mbsspnp_l
+_mbsstr
+_mbsstr_l
+_mbstok
+_mbstok_l
+_mbstok_s
+_mbstok_s_l
+_mbstowcs_l
+_mbstowcs_s_l
+_mbstrlen
+_mbstrlen_l
+_mbstrnlen
+_mbstrnlen_l
+_mbsupr
+_mbsupr_l
+_mbsupr_s
+_mbsupr_s_l
+_mbtowc_l
+_memccpy
+_memicmp
+_memicmp_l
+_mkdir
+_mkgmtime
+_mkgmtime32
+_mkgmtime64
+_mktemp
+_mktemp_s
+_mktime32
+_mktime64
+_msize
+_msize_debug
+_nextafter
+_onexit
+_open
+_open_osfhandle
+_osplatform
+_osver
+_outp
+_outpd
+_outpw
+_pclose
+_pctype
+_pgmptr
+_pipe
+_popen
+_printf_l
+_printf_p
+_printf_p_l
+_printf_s_l
+_purecall
+_putch
+_putenv
+_putenv_s
+_putw
+_putwch
+_putws
+_pwctype
+_read
+_realloc_dbg
+_resetstkoflw
+_rmdir
+_rmtmp
+_rotl
+_rotl64
+_rotr
+_rotr64
+_safe_fdiv
+_safe_fdivr
+_safe_fprem
+_safe_fprem1
+_scalb
+_scanf_l
+_scanf_s_l
+_scprintf
+_scprintf_l
+_scprintf_p_l
+_scwprintf
+_scwprintf_l
+_scwprintf_p_l
+_searchenv
+_searchenv_s
+_seh_longjmp_unwind
+_seh_longjmp_unwind4
+_set_SSE2_enable
+_set_controlfp
+_set_doserrno
+_set_errno
+_set_error_mode
+_set_fileinfo
+_set_fmode
+_set_output_format
+_set_sbh_threshold
+_seterrormode
+_setjmp
+_setjmp3
+_setmaxstdio
+_setmbcp
+_setmode
+_setsystime
+_sleep
+_snprintf
+_snprintf_c
+_snprintf_c_l
+_snprintf_l
+_snprintf_s
+_snprintf_s_l
+_snscanf
+_snscanf_l
+_snscanf_s
+_snscanf_s_l
+_snwprintf
+_snwprintf_l
+_snwprintf_s
+_snwprintf_s_l
+_snwscanf
+_snwscanf_l
+_snwscanf_s
+_snwscanf_s_l
+_sopen
+_sopen_s
+_spawnl
+_spawnle
+_spawnlp
+_spawnlpe
+_spawnv
+_spawnve
+_spawnvp
+_spawnvpe
+_splitpath
+_splitpath_s
+_sprintf_l
+_sprintf_p_l
+_sprintf_s_l
+_sscanf_l
+_sscanf_s_l
+_stat
+_stat64
+_stati64
+_statusfp
+_strcmpi
+_strcoll_l
+_strdate
+_strdate_s
+_strdup
+_strdup_dbg
+_strerror
+_strerror_s
+_stricmp
+_stricmp_l
+_stricoll
+_stricoll_l
+_strlwr
+_strlwr_l
+_strlwr_s
+_strlwr_s_l
+_strncoll
+_strncoll_l
+_strnicmp
+_strnicmp_l
+_strnicoll
+_strnicoll_l
+_strnset
+_strnset_s
+_strrev
+_strset
+_strset_s
+_strtime
+_strtime_s
+_strtod_l
+_strtoi64
+_strtoi64_l
+_strtol_l
+_strtoui64
+_strtoui64_l
+_strtoul_l
+_strupr
+_strupr_l
+_strupr_s
+_strupr_s_l
+_strxfrm_l
+_swab
+_swprintf
+_swprintf_c
+_swprintf_c_l
+_swprintf_p_l
+_swprintf_s_l
+_swscanf_l
+_swscanf_s_l
+_sys_errlist
+_sys_nerr
+_tell
+_telli64
+_tempnam
+_tempnam_dbg
+_time32
+_time64
+_timezone
+_tolower
+_tolower_l
+_toupper
+_toupper_l
+_towlower_l
+_towupper_l
+_tzname
+_tzset
+_ui64toa
+_ui64toa_s
+_ui64tow
+_ui64tow_s
+_ultoa
+_ultoa_s
+_ultow
+_ultow_s
+_umask
+_umask_s
+_ungetch
+_ungetwch
+_unlink
+_unloaddll
+_unlock
+_utime
+_utime32
+_utime64
+_vcprintf
+_vcprintf_l
+_vcprintf_p
+_vcprintf_p_l
+_vcprintf_s
+_vcprintf_s_l
+_vcwprintf
+_vcwprintf_l
+_vcwprintf_p
+_vcwprintf_p_l
+_vcwprintf_s
+_vcwprintf_s_l
+_vfprintf_l
+_vfprintf_p
+_vfprintf_p_l
+_vfprintf_s_l
+_vfwprintf_l
+_vfwprintf_p
+_vfwprintf_p_l
+_vfwprintf_s_l
+_vprintf_l
+_vprintf_p
+_vprintf_p_l
+_vprintf_s_l
+_vscprintf
+_vscprintf_l
+_vscprintf_p_l
+_vscwprintf
+_vscwprintf_l
+_vscwprintf_p_l
+_vsnprintf
+_vsnprintf_c
+_vsnprintf_c_l
+_vsnprintf_l
+_vsnprintf_s
+_vsnprintf_s_l
+_vsnwprintf
+_vsnwprintf_l
+_vsnwprintf_s
+_vsnwprintf_s_l
+_vsprintf_l
+_vsprintf_p
+_vsprintf_p_l
+_vsprintf_s_l
+_vswprintf
+_vswprintf_c
+_vswprintf_c_l
+_vswprintf_l
+_vswprintf_p_l
+_vswprintf_s_l
+_vwprintf_l
+_vwprintf_p
+_vwprintf_p_l
+_vwprintf_s_l
+_waccess
+_waccess_s
+_wasctime
+_wasctime_s
+_wassert
+_wchdir
+_wchmod
+_wcmdln
+_wcreat
+_wcscoll_l
+_wcsdup
+_wcsdup_dbg
+_wcserror
+_wcserror_s
+_wcsftime_l
+_wcsicmp
+_wcsicmp_l
+_wcsicoll
+_wcsicoll_l
+_wcslwr
+_wcslwr_l
+_wcslwr_s
+_wcslwr_s_l
+_wcsncoll
+_wcsncoll_l
+_wcsnicmp
+_wcsnicmp_l
+_wcsnicoll
+_wcsnicoll_l
+_wcsnset
+_wcsnset_s
+_wcsrev
+_wcsset
+_wcsset_s
+_wcstoi64
+_wcstoi64_l
+_wcstol_l
+_wcstombs_l
+_wcstombs_s_l
+_wcstoui64
+_wcstoui64_l
+_wcstoul_l
+_wcsupr
+_wcsupr_l
+_wcsupr_s
+_wcsupr_s_l
+_wcsxfrm_l
+_wctime
+_wctime32
+_wctime32_s
+_wctime64
+_wctime64_s
+_wctomb_l
+_wctomb_s_l
+_wctype
+_wenviron
+_wexecl
+_wexecle
+_wexeclp
+_wexeclpe
+_wexecv
+_wexecve
+_wexecvp
+_wexecvpe
+_wfdopen
+_wfindfirst
+_wfindfirst64
+_wfindfirsti64
+_wfindnext
+_wfindnext64
+_wfindnexti64
+_wfopen
+_wfopen_s
+_wfreopen
+_wfreopen_s
+_wfsopen
+_wfullpath
+_wfullpath_dbg
+_wgetcwd
+_wgetdcwd
+_wgetenv
+_wgetenv_s
+_winmajor
+_winminor
+_winput_s
+_winver
+_wmakepath
+_wmakepath_s
+_wmkdir
+_wmktemp
+_wmktemp_s
+_wopen
+_woutput_s
+_wperror
+_wpgmptr
+_wpopen
+_wprintf_l
+_wprintf_p
+_wprintf_p_l
+_wprintf_s_l
+_wputenv
+_wputenv_s
+_wremove
+_wrename
+_write
+_wrmdir
+_wscanf_l
+_wscanf_s_l
+_wsearchenv
+_wsearchenv_s
+_wsetlocale
+_wsopen
+_wsopen_s
+_wspawnl
+_wspawnle
+_wspawnlp
+_wspawnlpe
+_wspawnv
+_wspawnve
+_wspawnvp
+_wspawnvpe
+_wsplitpath
+_wsplitpath_s
+_wstat
+_wstat64
+_wstati64
+_wstrdate
+_wstrdate_s
+_wstrtime
+_wstrtime_s
+_wsystem
+_wtempnam
+_wtempnam_dbg
+_wtmpnam
+_wtmpnam_s
+_wtof
+_wtof_l
+_wtoi
+_wtoi64
+_wtoi64_l
+_wtoi_l
+_wtol
+_wtol_l
+_wunlink
+_wutime
+_wutime32
+_wutime64
+_y0
+_y1
+_yn
+abort
+abs
+acos
+asctime
+asctime_s
+asin
+atan
+atan2
+atexit
+atof
+atoi
+atol
+bsearch
+bsearch_s
+btowc
+calloc
+ceil
+clearerr
+clearerr_s
+clock
+cos
+cosh
+ctime
+difftime
+div
+exit
+exp
+fabs
+fclose
+feof
+ferror
+fflush
+fgetc
+fgetpos
+fgets
+fgetwc
+fgetws
+floor
+fmod
+fopen
+fopen_s
+fprintf
+fprintf_s
+fputc
+fputs
+fputwc
+fputws
+fread
+free
+freopen
+freopen_s
+frexp
+fscanf
+fscanf_s
+fseek
+fsetpos
+ftell
+fwprintf
+fwprintf_s
+fwrite
+fwscanf
+fwscanf_s
+getc
+getchar
+getenv
+getenv_s
+gets
+getwc
+getwchar
+gmtime
+is_wctype
+isalnum
+isalpha
+iscntrl
+isdigit
+isgraph
+isleadbyte
+islower
+isprint
+ispunct
+isspace
+isupper
+iswalnum
+iswalpha
+iswascii
+iswcntrl
+iswctype
+iswdigit
+iswgraph
+iswlower
+iswprint
+iswpunct
+iswspace
+iswupper
+iswxdigit
+isxdigit
+labs
+ldexp
+ldiv
+localeconv
+localtime
+log
+log10
+longjmp
+malloc
+mblen
+mbrlen
+mbrtowc
+mbsdup_dbg
+mbsrtowcs
+mbsrtowcs_s
+mbstowcs
+mbstowcs_s
+mbtowc
+memchr
+memcmp
+memcpy
+memcpy_s
+memmove
+memmove_s
+memset
+mktime
+modf
+perror
+pow
+printf
+printf_s
+putc
+putchar
+puts
+putwc
+putwchar
+qsort
+qsort_s
+raise
+rand
+rand_s
+realloc
+remove
+rename
+rewind
+scanf
+scanf_s
+setbuf
+setlocale
+setvbuf
+signal
+sin
+sinh
+sprintf
+sprintf_s
+sqrt
+srand
+sscanf
+sscanf_s
+strcat
+strcat_s
+strchr
+strcmp
+strcoll
+strcpy
+strcpy_s
+strcspn
+strerror
+strerror_s
+strftime
+strlen
+strncat
+strncat_s
+strncmp
+strncpy
+strncpy_s
+strnlen
+strpbrk
+strrchr
+strspn
+strstr
+strtod
+strtok
+strtok_s
+strtol
+strtoul
+strxfrm
+swprintf
+swprintf_s
+swscanf
+swscanf_s
+system
+tan
+tanh
+time
+tmpfile
+tmpfile_s
+tmpnam
+tmpnam_s
+tolower
+toupper
+towlower
+towupper
+ungetc
+ungetwc
+utime
+vfprintf
+vfprintf_s
+vfwprintf
+vfwprintf_s
+vprintf
+vprintf_s
+vsnprintf
+vsprintf
+vsprintf_s
+vswprintf
+vswprintf_s
+vwprintf
+vwprintf_s
+wcrtomb
+wcrtomb_s
+wcscat
+wcscat_s
+wcschr
+wcscmp
+wcscoll
+wcscpy
+wcscpy_s
+wcscspn
+wcsftime
+wcslen
+wcsncat
+wcsncat_s
+wcsncmp
+wcsncpy
+wcsncpy_s
+wcsnlen
+wcspbrk
+wcsrchr
+wcsrtombs
+wcsrtombs_s
+wcsspn
+wcsstr
+wcstod
+wcstok
+wcstok_s
+wcstol
+wcstombs
+wcstombs_s
+wcstoul
+wcsxfrm
+wctob
+wctomb
+wctomb_s
+wprintf
+wprintf_s
+wscanf
+wscanf_s
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/lib/user32.def b/.cache/overlay-toolchain/tcc_extract/tcc/lib/user32.def
new file mode 100644
index 00000000..a034dac2
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/lib/user32.def
@@ -0,0 +1,658 @@
+LIBRARY user32.dll
+
+EXPORTS
+ActivateKeyboardLayout
+AdjustWindowRect
+AdjustWindowRectEx
+AlignRects
+AllowSetForegroundWindow
+AnimateWindow
+AnyPopup
+AppendMenuA
+AppendMenuW
+ArrangeIconicWindows
+AttachThreadInput
+BeginDeferWindowPos
+BeginPaint
+BlockInput
+BringWindowToTop
+BroadcastSystemMessage
+BroadcastSystemMessageA
+BroadcastSystemMessageW
+CalcChildScroll
+CallMsgFilter
+CallMsgFilterA
+CallMsgFilterW
+CallNextHookEx
+CallWindowProcA
+CallWindowProcW
+CascadeChildWindows
+CascadeWindows
+ChangeClipboardChain
+ChangeDisplaySettingsA
+ChangeDisplaySettingsExA
+ChangeDisplaySettingsExW
+ChangeDisplaySettingsW
+ChangeMenuA
+ChangeMenuW
+CharLowerA
+CharLowerBuffA
+CharLowerBuffW
+CharLowerW
+CharNextA
+CharNextExA
+CharNextExW
+CharNextW
+CharPrevA
+CharPrevExA
+CharPrevExW
+CharPrevW
+CharToOemA
+CharToOemBuffA
+CharToOemBuffW
+CharToOemW
+CharUpperA
+CharUpperBuffA
+CharUpperBuffW
+CharUpperW
+CheckDlgButton
+CheckMenuItem
+CheckMenuRadioItem
+CheckRadioButton
+ChildWindowFromPoint
+ChildWindowFromPointEx
+ClientThreadConnect
+ClientToScreen
+ClipCursor
+CloseClipboard
+CloseDesktop
+CloseWindow
+CloseWindowStation
+CopyAcceleratorTableA
+CopyAcceleratorTableW
+CopyIcon
+CopyImage
+CopyRect
+CountClipboardFormats
+CreateAcceleratorTableA
+CreateAcceleratorTableW
+CreateCaret
+CreateCursor
+CreateDesktopA
+CreateDesktopW
+CreateDialogIndirectParamA
+CreateDialogIndirectParamW
+CreateDialogParamA
+CreateDialogParamW
+CreateIcon
+CreateIconFromResource
+CreateIconFromResourceEx
+CreateIconIndirect
+CreateMDIWindowA
+CreateMDIWindowW
+CreateMenu
+CreatePopupMenu
+CreateWindowExA
+CreateWindowExW
+CreateWindowStationA
+CreateWindowStationW
+DdeAbandonTransaction
+DdeAccessData
+DdeAddData
+DdeClientTransaction
+DdeCmpStringHandles
+DdeConnect
+DdeConnectList
+DdeCreateDataHandle
+DdeCreateStringHandleA
+DdeCreateStringHandleW
+DdeDisconnect
+DdeDisconnectList
+DdeEnableCallback
+DdeFreeDataHandle
+DdeFreeStringHandle
+DdeGetData
+DdeGetLastError
+DdeImpersonateClient
+DdeInitializeA
+DdeInitializeW
+DdeKeepStringHandle
+DdeNameService
+DdePostAdvise
+DdeQueryConvInfo
+DdeQueryNextServer
+DdeQueryStringA
+DdeQueryStringW
+DdeReconnect
+DdeSetQualityOfService
+DdeSetUserHandle
+DdeUnaccessData
+DdeUninitialize
+DefDlgProcA
+DefDlgProcW
+DefFrameProcA
+DefFrameProcW
+DefMDIChildProcA
+DefMDIChildProcW
+DefWindowProcA
+DefWindowProcW
+DeferWindowPos
+DeleteMenu
+DestroyAcceleratorTable
+DestroyCaret
+DestroyCursor
+DestroyIcon
+DestroyMenu
+DestroyWindow
+DialogBoxIndirectParamA
+DialogBoxIndirectParamW
+DialogBoxParamA
+DialogBoxParamW
+DispatchMessageA
+DispatchMessageW
+DlgDirListA
+DlgDirListComboBoxA
+DlgDirListComboBoxW
+DlgDirListW
+DlgDirSelectComboBoxExA
+DlgDirSelectComboBoxExW
+DlgDirSelectExA
+DlgDirSelectExW
+DragDetect
+DragObject
+DrawAnimatedRects
+DrawCaption
+DrawCaptionTempA
+DrawCaptionTempW
+DrawEdge
+DrawFocusRect
+DrawFrame
+DrawFrameControl
+DrawIcon
+DrawIconEx
+DrawMenuBar
+DrawMenuBarTemp
+DrawStateA
+DrawStateW
+DrawTextA
+DrawTextExA
+DrawTextExW
+DrawTextW
+EditWndProc
+EmptyClipboard
+EnableMenuItem
+EnableScrollBar
+EnableWindow
+EndDeferWindowPos
+EndDialog
+EndMenu
+EndPaint
+EndTask
+EnumChildWindows
+EnumClipboardFormats
+EnumDesktopWindows
+EnumDesktopsA
+EnumDesktopsW
+EnumDisplayDevicesA
+EnumDisplayDevicesW
+EnumDisplayMonitors
+EnumDisplaySettingsA
+EnumDisplaySettingsExA
+EnumDisplaySettingsExW
+EnumDisplaySettingsW
+EnumPropsA
+EnumPropsExA
+EnumPropsExW
+EnumPropsW
+EnumThreadWindows
+EnumWindowStationsA
+EnumWindowStationsW
+EnumWindows
+EqualRect
+ExcludeUpdateRgn
+ExitWindowsEx
+FillRect
+FindWindowA
+FindWindowExA
+FindWindowExW
+FindWindowW
+FlashWindow
+FlashWindowEx
+FrameRect
+FreeDDElParam
+GetActiveWindow
+GetAltTabInfo
+GetAncestor
+GetAsyncKeyState
+GetCapture
+GetCaretBlinkTime
+GetCaretPos
+GetClassInfoA
+GetClassInfoExA
+GetClassInfoExW
+GetClassInfoW
+GetClassLongA
+GetClassLongW
+GetClassNameA
+GetClassNameW
+GetClassWord
+GetClientRect
+GetClipCursor
+GetClipboardData
+GetClipboardFormatNameA
+GetClipboardFormatNameW
+GetClipboardOwner
+GetClipboardSequenceNumber
+GetClipboardViewer
+GetComboBoxInfo
+GetCursor
+GetCursorInfo
+GetCursorPos
+GetDC
+GetDCEx
+GetDesktopWindow
+GetDialogBaseUnits
+GetDlgCtrlID
+GetDlgItem
+GetDlgItemInt
+GetDlgItemTextA
+GetDlgItemTextW
+GetDoubleClickTime
+GetFocus
+GetForegroundWindow
+GetGUIThreadInfo
+GetGuiResources
+GetIconInfo
+GetInputDesktop
+GetInputState
+GetInternalWindowPos
+GetKBCodePage
+GetKeyNameTextA
+GetKeyNameTextW
+GetKeyState
+GetKeyboardLayout
+GetKeyboardLayoutList
+GetKeyboardLayoutNameA
+GetKeyboardLayoutNameW
+GetKeyboardState
+GetKeyboardType
+GetLastActivePopup
+GetListBoxInfo
+GetMenu
+GetMenuBarInfo
+GetMenuCheckMarkDimensions
+GetMenuContextHelpId
+GetMenuDefaultItem
+GetMenuInfo
+GetMenuItemCount
+GetMenuItemID
+GetMenuItemInfoA
+GetMenuItemInfoW
+GetMenuItemRect
+GetMenuState
+GetMenuStringA
+GetMenuStringW
+GetMessageA
+GetMessageExtraInfo
+GetMessagePos
+GetMessageTime
+GetMessageW
+GetMonitorInfoA
+GetMonitorInfoW
+GetMouseMovePoints
+GetMouseMovePointsEx
+GetNextDlgGroupItem
+GetNextDlgTabItem
+GetNextQueueWindow
+GetOpenClipboardWindow
+GetParent
+GetPriorityClipboardFormat
+GetProcessDefaultLayout
+GetProcessWindowStation
+GetPropA
+GetPropW
+GetQueueStatus
+GetScrollBarInfo
+GetScrollInfo
+GetScrollPos
+GetScrollRange
+GetShellWindow
+GetSubMenu
+GetSysColor
+GetSysColorBrush
+GetSystemMenu
+GetSystemMetrics
+GetTabbedTextExtentA
+GetTabbedTextExtentW
+GetThreadDesktop
+GetTitleBarInfo
+GetTopWindow
+GetUpdateRect
+GetUpdateRgn
+GetUserObjectInformationA
+GetUserObjectInformationW
+GetUserObjectSecurity
+GetWindow
+GetWindowContextHelpId
+GetWindowDC
+GetWindowInfo
+GetWindowLongPtrA
+GetWindowLongPtrW
+SetWindowLongPtrA
+SetWindowLongPtrW
+GetWindowLongA
+GetWindowLongW
+GetWindowModuleFileNameA
+GetWindowModuleFileNameW
+GetWindowPlacement
+GetWindowRect
+GetWindowRgn
+GetWindowTextA
+GetWindowTextLengthA
+GetWindowTextLengthW
+GetWindowTextW
+GetWindowThreadProcessId
+GetWindowWord
+GrayStringA
+GrayStringW
+HasSystemSleepStarted
+HideCaret
+HiliteMenuItem
+IMPGetIMEA
+IMPGetIMEW
+IMPQueryIMEA
+IMPQueryIMEW
+IMPSetIMEA
+IMPSetIMEW
+ImpersonateDdeClientWindow
+InSendMessage
+InSendMessageEx
+InflateRect
+InitSharedTable
+InitTask
+InsertMenuA
+InsertMenuItemA
+InsertMenuItemW
+InsertMenuW
+InternalGetWindowText
+IntersectRect
+InvalidateRect
+InvalidateRgn
+InvertRect
+IsCharAlphaA
+IsCharAlphaNumericA
+IsCharAlphaNumericW
+IsCharAlphaW
+IsCharLowerA
+IsCharLowerW
+IsCharUpperA
+IsCharUpperW
+IsChild
+IsClipboardFormatAvailable
+IsDialogMessage
+IsDialogMessageA
+IsDialogMessageW
+IsDlgButtonChecked
+IsHungThread
+IsIconic
+IsMenu
+IsRectEmpty
+IsWindow
+IsWindowEnabled
+IsWindowUnicode
+IsWindowVisible
+IsZoomed
+KillTimer
+LoadAcceleratorsA
+LoadAcceleratorsW
+LoadBitmapA
+LoadBitmapW
+LoadCursorA
+LoadCursorFromFileA
+LoadCursorFromFileW
+LoadCursorW
+LoadIconA
+LoadIconW
+LoadImageA
+LoadImageW
+LoadKeyboardLayoutA
+LoadKeyboardLayoutW
+LoadMenuA
+LoadMenuIndirectA
+LoadMenuIndirectW
+LoadMenuW
+LoadStringA
+LoadStringW
+LockSetForegroundWindow
+LockWindowStation
+LockWindowUpdate
+LookupIconIdFromDirectory
+LookupIconIdFromDirectoryEx
+MapDialogRect
+MapVirtualKeyA
+MapVirtualKeyExA
+MapVirtualKeyExW
+MapVirtualKeyW
+MapWindowPoints
+MenuItemFromPoint
+MessageBeep
+MessageBoxA
+MessageBoxExA
+MessageBoxExW
+MessageBoxIndirectA
+MessageBoxIndirectW
+MessageBoxW
+ModifyAccess
+ModifyMenuA
+ModifyMenuW
+MonitorFromPoint
+MonitorFromRect
+MonitorFromWindow
+MoveWindow
+MsgWaitForMultipleObjects
+MsgWaitForMultipleObjectsEx
+NotifyWinEvent
+OemKeyScan
+OemToCharA
+OemToCharBuffA
+OemToCharBuffW
+OemToCharW
+OffsetRect
+OpenClipboard
+OpenDesktopA
+OpenDesktopW
+OpenIcon
+OpenInputDesktop
+OpenWindowStationA
+OpenWindowStationW
+PackDDElParam
+PaintDesktop
+PeekMessageA
+PeekMessageW
+PlaySoundEvent
+PostMessageA
+PostMessageW
+PostQuitMessage
+PostThreadMessageA
+PostThreadMessageW
+PtInRect
+RealChildWindowFromPoint
+RealGetWindowClass
+RedrawWindow
+RegisterClassA
+RegisterClassExA
+RegisterClassExW
+RegisterClassW
+RegisterClipboardFormatA
+RegisterClipboardFormatW
+RegisterDeviceNotificationA
+RegisterDeviceNotificationW
+RegisterHotKey
+RegisterLogonProcess
+RegisterNetworkCapabilities
+RegisterSystemThread
+RegisterTasklist
+RegisterWindowMessageA
+RegisterWindowMessageW
+ReleaseCapture
+ReleaseDC
+RemoveMenu
+RemovePropA
+RemovePropW
+ReplyMessage
+ReuseDDElParam
+ScreenToClient
+ScrollDC
+ScrollWindow
+ScrollWindowEx
+SendDlgItemMessageA
+SendDlgItemMessageW
+SendIMEMessageExA
+SendIMEMessageExW
+SendInput
+SendMessageA
+SendMessageCallbackA
+SendMessageCallbackW
+SendMessageTimeoutA
+SendMessageTimeoutW
+SendMessageW
+SendNotifyMessageA
+SendNotifyMessageW
+SetActiveWindow
+SetCapture
+SetCaretBlinkTime
+SetCaretPos
+SetClassLongA
+SetClassLongW
+SetClassWord
+SetClipboardData
+SetClipboardViewer
+SetCursor
+SetCursorPos
+SetDebugErrorLevel
+SetDeskWallpaper
+SetDesktopBitmap
+SetDlgItemInt
+SetDlgItemTextA
+SetDlgItemTextW
+SetDoubleClickTime
+SetFocus
+SetForegroundWindow
+SetInternalWindowPos
+SetKeyboardState
+SetLastErrorEx
+SetLogonNotifyWindow
+SetMenu
+SetMenuContextHelpId
+SetMenuDefaultItem
+SetMenuInfo
+SetMenuItemBitmaps
+SetMenuItemInfoA
+SetMenuItemInfoW
+SetMessageExtraInfo
+SetMessageQueue
+SetParent
+SetProcessDefaultLayout
+SetProcessWindowStation
+SetPropA
+SetPropW
+SetRect
+SetRectEmpty
+SetScrollInfo
+SetScrollPos
+SetScrollRange
+SetShellWindow
+SetSysColors
+SetSysColorsTemp
+SetSystemCursor
+SetThreadDesktop
+SetTimer
+SetUserObjectInformationA
+SetUserObjectInformationW
+SetUserObjectSecurity
+SetWinEventHook
+SetWindowContextHelpId
+SetWindowFullScreenState
+SetWindowLongA
+SetWindowLongW
+SetWindowPlacement
+SetWindowPos
+SetWindowRgn
+SetWindowTextA
+SetWindowTextW
+SetWindowWord
+SetWindowsHookA
+SetWindowsHookExA
+SetWindowsHookExW
+SetWindowsHookW
+ShowCaret
+ShowCursor
+ShowOwnedPopups
+ShowScrollBar
+ShowWindow
+ShowWindowAsync
+SubtractRect
+SwapMouseButton
+SwitchDesktop
+SwitchToThisWindow
+SysErrorBox
+SystemParametersInfoA
+SystemParametersInfoW
+TabbedTextOutA
+TabbedTextOutW
+TileChildWindows
+TileWindows
+ToAscii
+ToAsciiEx
+ToUnicode
+ToUnicodeEx
+TrackMouseEvent
+TrackPopupMenu
+TrackPopupMenuEx
+TranslateAccelerator
+TranslateAcceleratorA
+TranslateAcceleratorW
+TranslateMDISysAccel
+TranslateMessage
+UnhookWinEvent
+UnhookWindowsHook
+UnhookWindowsHookEx
+UnionRect
+UnloadKeyboardLayout
+UnlockWindowStation
+UnpackDDElParam
+UnregisterClassA
+UnregisterClassW
+UnregisterDeviceNotification
+UnregisterHotKey
+UpdateWindow
+UserClientDllInitialize
+UserIsSystemResumeAutomatic
+UserSetDeviceHoldState
+UserSignalProc
+UserTickleTimer
+ValidateRect
+ValidateRgn
+VkKeyScanA
+VkKeyScanExA
+VkKeyScanExW
+VkKeyScanW
+WINNLSEnableIME
+WINNLSGetEnableStatus
+WINNLSGetIMEHotkey
+WNDPROC_CALLBACK
+WaitForInputIdle
+WaitMessage
+WinHelpA
+WinHelpW
+WinOldAppHackoMatic
+WindowFromDC
+WindowFromPoint
+YieldTask
+_SetProcessDefaultLayout
+keybd_event
+mouse_event
+wsprintfA
+wsprintfW
+wvsprintfA
+wvsprintfW
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/libtcc.dll b/.cache/overlay-toolchain/tcc_extract/tcc/libtcc.dll
new file mode 100644
index 00000000..0a5d8179
Binary files /dev/null and b/.cache/overlay-toolchain/tcc_extract/tcc/libtcc.dll differ
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/libtcc/libtcc.def b/.cache/overlay-toolchain/tcc_extract/tcc/libtcc/libtcc.def
new file mode 100644
index 00000000..bc866ab9
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/libtcc/libtcc.def
@@ -0,0 +1,37 @@
+LIBRARY libtcc.dll
+
+EXPORTS
+tcc_add_file
+tcc_add_include_path
+tcc_add_library
+tcc_add_library_err
+tcc_add_library_path
+tcc_add_symbol
+tcc_add_sysinclude_path
+tcc_basename
+tcc_compile_string
+tcc_define_symbol
+tcc_delete
+tcc_error
+tcc_error_noabort
+tcc_fileextension
+tcc_free
+tcc_get_dllexports
+tcc_get_symbol
+tcc_malloc
+tcc_mallocz
+tcc_memcheck
+tcc_new
+tcc_output_file
+tcc_parse_args
+tcc_print_stats
+tcc_realloc
+tcc_relocate
+tcc_run
+tcc_set_error_func
+tcc_set_lib_path
+tcc_set_options
+tcc_set_output_type
+tcc_strdup
+tcc_undefine_symbol
+tcc_warning
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/libtcc/libtcc.h b/.cache/overlay-toolchain/tcc_extract/tcc/libtcc/libtcc.h
new file mode 100644
index 00000000..a1b31e30
--- /dev/null
+++ b/.cache/overlay-toolchain/tcc_extract/tcc/libtcc/libtcc.h
@@ -0,0 +1,100 @@
+#ifndef LIBTCC_H
+#define LIBTCC_H
+
+#ifndef LIBTCCAPI
+# define LIBTCCAPI
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct TCCState;
+
+typedef struct TCCState TCCState;
+
+/* create a new TCC compilation context */
+LIBTCCAPI TCCState *tcc_new(void);
+
+/* free a TCC compilation context */
+LIBTCCAPI void tcc_delete(TCCState *s);
+
+/* set CONFIG_TCCDIR at runtime */
+LIBTCCAPI void tcc_set_lib_path(TCCState *s, const char *path);
+
+/* set error/warning display callback */
+LIBTCCAPI void tcc_set_error_func(TCCState *s, void *error_opaque,
+ void (*error_func)(void *opaque, const char *msg));
+
+/* set options as from command line (multiple supported) */
+LIBTCCAPI void tcc_set_options(TCCState *s, const char *str);
+
+/*****************************/
+/* preprocessor */
+
+/* add include path */
+LIBTCCAPI int tcc_add_include_path(TCCState *s, const char *pathname);
+
+/* add in system include path */
+LIBTCCAPI int tcc_add_sysinclude_path(TCCState *s, const char *pathname);
+
+/* define preprocessor symbol 'sym'. Can put optional value */
+LIBTCCAPI void tcc_define_symbol(TCCState *s, const char *sym, const char *value);
+
+/* undefine preprocess symbol 'sym' */
+LIBTCCAPI void tcc_undefine_symbol(TCCState *s, const char *sym);
+
+/*****************************/
+/* compiling */
+
+/* add a file (C file, dll, object, library, ld script). Return -1 if error. */
+LIBTCCAPI int tcc_add_file(TCCState *s, const char *filename);
+
+/* compile a string containing a C source. Return -1 if error. */
+LIBTCCAPI int tcc_compile_string(TCCState *s, const char *buf);
+
+/*****************************/
+/* linking commands */
+
+/* set output type. MUST BE CALLED before any compilation */
+LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type);
+#define TCC_OUTPUT_MEMORY 1 /* output will be run in memory (default) */
+#define TCC_OUTPUT_EXE 2 /* executable file */
+#define TCC_OUTPUT_DLL 3 /* dynamic library */
+#define TCC_OUTPUT_OBJ 4 /* object file */
+#define TCC_OUTPUT_PREPROCESS 5 /* only preprocess (used internally) */
+
+/* equivalent to -Lpath option */
+LIBTCCAPI int tcc_add_library_path(TCCState *s, const char *pathname);
+
+/* the library name is the same as the argument of the '-l' option */
+LIBTCCAPI int tcc_add_library(TCCState *s, const char *libraryname);
+
+/* add a symbol to the compiled program */
+LIBTCCAPI int tcc_add_symbol(TCCState *s, const char *name, const void *val);
+
+/* output an executable, library or object file. DO NOT call
+ tcc_relocate() before. */
+LIBTCCAPI int tcc_output_file(TCCState *s, const char *filename);
+
+/* link and run main() function and return its value. DO NOT call
+ tcc_relocate() before. */
+LIBTCCAPI int tcc_run(TCCState *s, int argc, char **argv);
+
+/* do all relocations (needed before using tcc_get_symbol()) */
+LIBTCCAPI int tcc_relocate(TCCState *s1, void *ptr);
+/* possible values for 'ptr':
+ - TCC_RELOCATE_AUTO : Allocate and manage memory internally
+ - NULL : return required memory size for the step below
+ - memory address : copy code to memory passed by the caller
+ returns -1 if error. */
+#define TCC_RELOCATE_AUTO (void*)1
+
+/* return symbol value or NULL if not found */
+LIBTCCAPI void *tcc_get_symbol(TCCState *s, const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/.cache/overlay-toolchain/tcc_extract/tcc/tcc.exe b/.cache/overlay-toolchain/tcc_extract/tcc/tcc.exe
new file mode 100644
index 00000000..2c8d0639
Binary files /dev/null and b/.cache/overlay-toolchain/tcc_extract/tcc/tcc.exe differ
diff --git a/docs/MOD_PACKAGES.md b/docs/MOD_PACKAGES.md
index f225cf1e..d025ed10 100644
--- a/docs/MOD_PACKAGES.md
+++ b/docs/MOD_PACKAGES.md
@@ -755,6 +755,13 @@ some selections of one feature is a `[[requirement]]`, not a dependency.
## Implicit requirements across packages
+The shared PGXP plugin uses `psx_mod_set_pgxp_precision(enabled, cpu_mode)`.
+This stores a session selection as well as setting live correction flags, so
+later renderer initialization cannot erase mod activation with the base video
+settings. Session start clears the selection before activating the new plan;
+the player's persistent settings remain unchanged. Explicit validation
+environment overrides still take precedence at renderer initialization.
+
Package format 7 lets a feature, while a condition on its own options holds,
need a feature of **another** package:
@@ -897,6 +904,27 @@ length. An audio-first disc or a nonzero first-track start is rejected. Use a
CUE for a raw image containing multiple tracks. Declared volume metadata must
have matching byte orders and 2048-byte logical sectors.
+The resolved plan owns an immutable canonical snapshot. During its callbacks,
+a trusted plugin calls `psx_mod_current_resource_bytes(id, &bytes, &size)` to
+obtain a read-only view scoped to its own package and feature. Ordinary
+unverified resources cannot supply bytes through this API. The pointer remains
+valid until the committed plan is replaced or cleared. Decode into host or
+enhancement memory and rebuild derived data when activation changes; never
+reopen the owner path as a substitute for the verified snapshot.
+
+An activation callback can mount a slice of its verified resource for native CD
+streaming with `psx_mod_append_disc_extent(id, byte_offset, sector_count, &lba)`.
+The slice contains 2336-byte Mode-2 sectors beginning at the duplicated XA
+subheader. The runtime appends extents after the mounted disc, synthesizes raw
+sector headers and a data-track TOC/subchannel entry, and retains the original
+CD-ROM/XA decoder, interrupts and timing. The returned LBAs are deterministic
+for the same activation order. Registration rejects missing/unowned resources,
+invalid ranges/subheaders, late calls and addresses beyond the CD MSF limit.
+Plan replacement or netplay clearing removes the extents; base sectors remain
+unchanged. The game plugin supplies its own file lookup, names and stream
+selection. Donor bytes remain external and are covered by the resource fingerprint.
+
+
Verified resource fingerprints include format, canonical size and SHA-256,
rather than the selected path, so moving identical media or changing N64 byte
order does not change save compatibility. Donor bytes are never package files,
diff --git a/docs/TCP_COMMANDS.md b/docs/TCP_COMMANDS.md
index d1812847..4b46ebce 100644
--- a/docs/TCP_COMMANDS.md
+++ b/docs/TCP_COMMANDS.md
@@ -56,7 +56,8 @@ Columns: **N** = native, **D** = DuckStation oracle.
| `present_shot` | ✓ | | `path` | PNG of the **composed present surface** — the frame after the backend fits the display buffer to the window, so it carries the presented aspect. ⚠ every other capture resolves the display buffer *before* that fit: on a 508×256 display in a 4:3 window they answer 508×256 while the player sees 640×480. Use this one for anything aspect-shaped (widescreen, letterbox), where a pre-fit buffer would hide the very stage the change touches. Staged and fulfilled on the next present, so the ack means *queued* — poll `present_shot_seq`. Unavailable headless and on the Vulkan backend (its swapchain has no readback hook) |
| `present_shot_seq` | ✓ | | — | Completion counter for `present_shot`, plus `wrote` (1 = that completion produced a PNG). Sample before staging, poll until `seq` moves. Advances on success *and* failure, so the poll always terminates |
| `gl_interp` | ✓ | | — | OpenGL frame-rate presenter ([FRAME_RATE.md](FRAME_RATE.md)): enabled/suspended, host and target Hz, swaps, `source` (`vblank`/`flip`), `flip_period`, `captures` (new source frames) and `duplicates` (VBlanks that re-presented the same frame) |
-| `render_pass_stats` | ✓ | | — | Render passes ([RENDER_PASSES.md](RENDER_PASSES.md)): plans, phases wanted/planned (shedding), passes, rollbacks (`nesting_repairs`: watchdog aborts whose skipped frame exits the restore undid), dropped device stores by class, `verify_mismatch` under `PSX_RENDER_PASS_VERIFY=1`, host-time split per pass, smoothed pass cost (`cost_us`; `cost_rewarms`: estimates no pass had run on for a while, measured again), presents made from pass images (`late_presents`: held past the frame's planned end because the next flip was late; `expired`: frames whose images stopped showing after several frame lengths without a flip), pass image textures allocated (`image_textures`, `image_bytes`), `status` (`psx_mod_render_pass_status`: 0 ready, 1 no presenter, 2 backend, 3 disabled, 4 session, 5 fast-forward, 6 busy), `backups_reused` (passes that reused the previous pass's VRAM backup) |
+| `render_pass_stats` | ✓ | | — | Render passes ([RENDER_PASSES.md](RENDER_PASSES.md)): plans, phases wanted/planned (shedding), passes, rollbacks (`nesting_repairs`: watchdog aborts whose skipped frame exits the restore undid), dropped device stores by class, `verify_mismatch` under `PSX_RENDER_PASS_VERIFY=1`, host-time split per pass, smoothed pass cost (`cost_us`; `cost_rewarms`: estimates no pass had run on for a while, measured again), presents made from pass images (`late_presents`: held past the frame's planned end because the next flip was late; `expired`: frames whose images stopped showing after several frame lengths without a flip), pass image textures allocated (`image_textures`, `image_bytes`), `status` (`psx_mod_render_pass_status`: 0 ready, 1 no presenter, 2 backend, 3 disabled, 4 session, 5 fast-forward, 6 busy), `backups_reused` (passes that reused the previous pass's VRAM backup), `spans` / `span_failures` and the last failure `span_fail` (`psx_mod_run_guest_span`: reason, exit PC, `$ra`, PC after a call that did not return) |
+| `window_size` | ✓ | | `w`, `h` | Resize the game window as a player would (Fit / adaptive widescreen follow it): window-shaped checks in `--hidden-window` runs. Pair with `present_shot` |
| `render_pass_dump` | ✓ | | `path`, `count` | Write the images (the game's own frame, then each pass in phase order) of the next `count` frames that get passes as `/g __a.png` |
| `render_pass_refuse` | ✓ | | `on` | Make the OpenGL backend decline render passes (`status` 2, BACKEND), as a renderer mode without them would; tests a plugin's fallback. `PSX_RENDER_PASS_REFUSE=1` does the same from start |
| `geom_correction` | | ✓ | — | `[video] geometry_correction` / `perspective_texturing` engagement: enable flag plus free-running `geometry_vertex_hits` and `perspective_triangles` totals. Both enhancements silently fall back to the faithful path on anything they cannot prove is projected geometry, so a zero counter with the flag on means the title never qualifies — sample twice and diff for a rate. Also `texture_correction`. Its `pgxp` object adds the engine's per-lookup counters, the `position_fallback` / `preserve_projection` / `culling` switches, `ppp_produced` and `ppp_window_fallback` (exact projections outside the agreement window, shadowed with the IR path instead), geometry-corrected triangles split into `tri_precise` / `tri_mixed` / `tri_native` (the mixed share is the mesh-cracking exposure), `rect_bypass` / `rect_partial` (fully / partly precise textured quads that matched the 2D rectangle shortcut; only the former leave it) and `nclip_precise` / `nclip_disagree` / `nclip_corrected` (NCLIPs with an exact determinant, whose exact sign differs from the integer one, and that precise culling corrected); `ENHANCEMENTS.md` G1.11/G1.12 |
@@ -430,9 +431,9 @@ The TCP server is the canonical instrumentation surface. Rule 3 in `CLAUDE.md` i
## Complete command index (generated)
-**323 commands registered** — 310 on the native server (`runtime/src/debug_server.c`), 61 on the Beetle server (`runtime/src/beetle_debug_server.c`).
+**334 commands registered** — 321 on the native server (`runtime/src/debug_server.c`), 61 on the Beetle server (`runtime/src/beetle_debug_server.c`).
-62 of 323 have prose above; **261 are index-only**. An index-only command still works — it just has no description here yet. Send it `{"cmd":""}` and read the reply, or find its `handle_*` function in the server source.
+63 of 334 have prose above; **271 are index-only**. An index-only command still works — it just has no description here yet. Send it `{"cmd":""}` and read the reply, or find its `handle_*` function in the server source.
Regenerate with `python tools/gen_tcp_commands.py`; `--check` fails if this block has drifted from the code.
@@ -452,6 +453,7 @@ Regenerate with `python tools/gen_tcp_commands.py`; `--check` fails if this bloc
| `call_focus_stats` | ✓ | | |
| `callret_watch` | ✓ | | ✓ |
| `capture_freeze` | ✓ | | |
+| `capture_mark` | ✓ | | |
| `capture_quads` | ✓ | | |
| `card_buffer_dump` | ✓ | | |
| `card_data_writes` | ✓ | | |
@@ -569,6 +571,7 @@ Regenerate with `python tools/gen_tcp_commands.py`; `--check` fails if this bloc
| `gpu_opcodes` | ✓ | | |
| `gpu_ring_stats` | ✓ | | |
| `gpu_state` | ✓ | | ✓ |
+| `gpu_timeline` | ✓ | | |
| `gte_frame_stats` | ✓ | | |
| `gte_intpl_dump` | ✓ | | |
| `gte_latch_dump` | ✓ | | |
@@ -603,6 +606,8 @@ Regenerate with `python tools/gen_tcp_commands.py`; `--check` fails if this bloc
| `mmio_clear` | ✓ | | ✓ |
| `mmio_dump` | ✓ | | ✓ |
| `mmx6_freshfix` | ✓ | | |
+| `mod_counters` | ✓ | | |
+| `nclip_stats` | ✓ | | |
| `overlay_candidates` | ✓ | | |
| `overlay_capture_dump` | ✓ | | |
| `overlay_cps_probe` | ✓ | | |
@@ -632,9 +637,13 @@ Regenerate with `python tools/gen_tcp_commands.py`; `--check` fails if this bloc
| `pc_probe_clear` | ✓ | | |
| `pc_probe_dump` | ✓ | | |
| `pgxp` | ✓ | | ✓ |
+| `pgxp_miss_ring` | ✓ | | |
+| `pgxp_shadow` | ✓ | | |
| `phase_hot` | ✓ | | |
| `phase_profile` | ✓ | | |
| `ping` | ✓ | ✓ | ✓ |
+| `present_image_ring_get` | ✓ | | |
+| `present_image_ring_stats` | ✓ | | |
| `present_ring` | ✓ | | |
| `present_shot` | ✓ | | ✓ |
| `present_shot_seq` | ✓ | | ✓ |
@@ -651,6 +660,7 @@ Regenerate with `python tools/gen_tcp_commands.py`; `--check` fails if this bloc
| `render_pass_dump` | ✓ | | ✓ |
| `render_pass_refuse` | ✓ | | ✓ |
| `render_pass_stats` | ✓ | | ✓ |
+| `resident_status` | ✓ | | |
| `restore_trace` | ✓ | | |
| `restore_trace_clear` | ✓ | | |
| `restore_trace_window` | ✓ | | |
@@ -721,6 +731,7 @@ Regenerate with `python tools/gen_tcp_commands.py`; `--check` fails if this bloc
| `watch` | ✓ | | ✓ |
| `wide_full` | ✓ | | |
| `wide_shot` | ✓ | | |
+| `window_size` | ✓ | | ✓ |
| `write_ram` | ✓ | | ✓ |
| `ws_aspect` | ✓ | | |
| `ws_aspect_cone_site` | ✓ | | |
@@ -735,6 +746,7 @@ Regenerate with `python tools/gen_tcp_commands.py`; `--check` fails if this bloc
| `ws_hud_mode` | ✓ | | |
| `ws_margin` | ✓ | | |
| `ws_nw` | ✓ | | |
+| `ws_tag_stats` | ✓ | | |
| `ws_ui_groups` | ✓ | | |
| `wtrace_add` | ✓ | | |
| `wtrace_all_dump` | ✓ | ✓ | |
diff --git a/docs/WIDESCREEN.md b/docs/WIDESCREEN.md
index 2d243e9e..741e6f66 100644
--- a/docs/WIDESCREEN.md
+++ b/docs/WIDESCREEN.md
@@ -25,6 +25,47 @@ OpenGL `test_gl_readback_region.c` fixture. MMX6 is the first consumer;
owner gameplay validation is still pending (`beads-eio.3.146`).
## Earlier squash-mode implementation
+## Explicit native-wide background polygons (September 2026)
+
+A title plugin can call `gpu_ws_tag_background_prim(prim)` for each opaque
+background polygon in a verified composite, before submitting its ordering
+table. The command starts at `prim + 4`; an embedded command can therefore use
+`command_address - 4` even when that preceding word is not a DMA header.
+The framework validates command type, RAM bounds, complete packet contents,
+address and freshness. The title owns the proof that these are backgrounds
+and that their union covers the authored viewport. No fixed game addresses or
+background guesses belong in the shared API.
+
+OpenGL and software rendering stretch only those polygons about the display
+center in the native-wide surface, preserving canonical VRAM and the default
+4:3 path. Tag every part, including flat fills behind textured sky quads, so
+the composite remains continuous. Tags expire after two frames and reject
+reused packets whose words changed. This method performs no guest writes or
+extra guest allocations.
+
+OpenGL preserves the tag across flat and textured batching. Once a valid
+background has been tagged, it renders the full wide composite instead of
+copying the canonical center over it, which would create a scale seam. Packet
+freshness and displayed-pixel lifetime are separate: a slow game or held display
+can retain stretched pixels after the two-frame packet guard expires. The
+full-composite requirement therefore remains latched until GPU reset or snapshot
+restore; packet-address/content freshness is not relaxed. Sessions that have not
+tagged a background retain the center-copy optimization. Measure performance in
+the title and validate the visible sky at the requested aspect before release.
+Vulkan's native-wide compositor is not implemented; this API does not add one.
+
+### Parked validation checkpoint (2026-09-12)
+
+The focused GPU packet/tag regression passes, including expired packets,
+changed packet contents, disabled widescreen and retained composite lifetime.
+The V8 Windows runtime builds and both game CTests pass. In the oil-field
+21:9 playtest the owner reports that terrain looks fine and the background
+flickers less badly, but still flickers. This is partial improvement, not visual
+acceptance. State replay required the HLE scheduler; repeat the comparison with
+matched scheduler settings before attributing the improvement solely to this
+change. Work is parked in a draft; no release is approved.
+
+## Earlier projection-and-stretch implementation
Status as of 2026-06-13. Branch `feat/widescreen` in **both** `psxrecomp`
(framework) and `TombaRecomp` (game opt-in + config), pushed to remote.
diff --git a/docs/internal/FAITHFUL_TIMING_PLAN.md b/docs/internal/FAITHFUL_TIMING_PLAN.md
index ff03478b..90b17471 100644
--- a/docs/internal/FAITHFUL_TIMING_PLAN.md
+++ b/docs/internal/FAITHFUL_TIMING_PLAN.md
@@ -756,6 +756,85 @@ on a fixed region -> next.
Ledger `recompiler/tests/test_segment_aware_codegen.py` (synthetic KUSEG EXE,
Beetle fetch transcription vs psx_icache.c): 10 known gaps, model checks exact.
Not a live Beetle run (no oracle binary on the Mac); §7.2 lists the oracle runs.
+- **2026-09-30 (Phase 5 owner-requested source checkpoint):** Preserve the
+ existing V8:2 combined-content title and generic callback/disc-extent support
+ on local `checkpoint/v82-combined-20260930` branches. Source, tests and
+ attribution only; donor media, generated outputs and playtest evidence stay
+ external. Owner explicitly paused further implementation, including
+ widescreen, original music and netplay, pending a check-in. No publication.
+
+- **2026-09-30 (Phase 5 Dreamland mushroom freeze):** `beads-eio.12.5`
+ identified an imported projectile flag write altering its callback, followed
+ by a skipped prologue and invalid return into the BIOS exception loop. The
+ title converter now tracks the local projectile factory and target pointers.
+ Added 4163 relocation/flag property cases and an opt-in native mushroom-event
+ stress driver; the old overlay fails and the repaired overlay completes both
+ families. All 16 title checks pass. No framework behavior changes.
+
+- **2026-09-30 (Phase 5 Dreamland effect cleanup):** `beads-eio.12.2` traced
+ the owner's frozen V8:2 match to an imported projectile effect writing its
+ matrix over the native child link. The title's input-overlay converter now
+ recognizes both effect-factory object returns. Five corrected field accesses,
+ owner-media regression checks, complete overlay code generation and a live
+ explosion allocation/free check validate the repair. No framework execution,
+ timing or generated-source changes; owner handoff remains at 1x rendering.
+
+- **2026-09-30 (Phase 5 instruction callbacks):** `beads-kbj0` adds plan-owned,
+ exact-word-guarded callbacks before opt-in game instructions, including branch
+ and delay slots. Native/overlay metadata participates in the codegen hash;
+ dirty-RAM execution routes through the same guard after load retirement.
+ Overlay ABI v27 forwards the callback. Runtime, parser/emitter and interpreter
+ routing checks pass. V8:2 uses seven seams for independent vehicle stats,
+ upgrades, transformation parts and special dependencies. Chassey's live match,
+ input/pause and savestate roundtrip were observed after correcting the title
+ allocator to retain shrinking allocations, matching its source implementation.
+
+- **2026-09-30 (Phase 5 mod-defined callbacks):** `beads-eio.3.212` adds
+ trusted mod-defined guest functions in an unused address range, separate
+ from original function-entry hooks. Active plans own availability and
+ callback resource context. Generated BIOS dispatch handles these through
+ its normal return/stack contract, with no synthetic guest instructions.
+ Runtime tests cover aliases, collisions, activation/clearing and nested
+ callback scopes; emitter tests cover routing before hardware dispatch.
+ OpenBIOS/SCPH1001 regenerated; V8:2 title rebuilt. Imported content still
+ needs its title-side runtime/selection adapters (`beads-eio.12.1`).
+
+- **2026-09-30 (Phase 5 combined V8 project):** Owner selected USA 2nd Offense
+ as the game-code base while retaining psxrecomp as the runtime/recompiler.
+ New local `Vigilante82PSXRecomp` builds against `071847ab`, reaches a stock
+ match, responds to driving input and reloads a savestate in an isolated run.
+ The reference's thirteen original-car conversions roundtrip successfully;
+ imported runtime/selector adapters remain title work (`beads-eio.12.1`).
+ No generic execution or hardware change was needed for this bring-up.
+
+- **2026-09-30 (Phase 5 callback reentrancy):** Plugin activation, VBlank and
+ function-entry callbacks now use the same scoped resource/completion context.
+ A native call inside an entry hook can deliver VBlank; previously those
+ callbacks cleared its plugin, making explicit completion fail and executing
+ the original function again. A regression fails before the fix and passes
+ after it, also refusing VBlank completion of the interrupted function. The
+ runtime test and seven V8 checks pass; isolated six-contact construction now
+ produces one chassis and survives drive/save/load. Tracked by `beads-i3ow`.
+
+- **2026-09-29 (Phase 5 mod function completion):** Trusted entry callbacks
+ may explicitly complete the current guest function through
+ `psx_mod_finish_function`. Static codegen, native overlay forwarding and both
+ dirty-RAM entry paths honor the callback result; nested callback completion
+ remains scoped to its CPU and invocation. ABI 26 / codegen 16 reject old
+ caches and states. Five focused framework checks pass. V8's independent
+ sequel-bank integration is being exercised separately under `beads-jogl`;
+ the generic mechanism is tracked by `beads-i3ow`. No title address or content
+ behavior is embedded in the framework.
+
+- **2026-09-29 (Phase 5 enhancement media):** Added format-8 verified donor
+ resources (exact canonical size/SHA-256, immutable snapshots scoped to the
+ owning plugin). N64 byte orders normalize before hashing; PSX identity covers
+ the first data track using the existing disc reader. Mixed-mode retail volume
+ sizes include audio and are not data-track lengths. Framework media/package/
+ runtime tests pass; V8's isolated headless importer validates Super Dreamland
+ 64 from owner media. No CPU execution or timing changes. Arena conversion and
+ gameplay integration remain open. Local uncommitted work tracked by
+ `beads-09ww` and `beads-ip30`; content epic `beads-eio.5.13` remains open.
- **2026-09-13 (SIO card hack removal — branch-only review checkpoint):**
Reproduced fixed-Ape-RAM IRQ7/mask injection after an absent-card probe,
diff --git a/find_func.py b/find_func.py
new file mode 100644
index 00000000..cbfcd53f
--- /dev/null
+++ b/find_func.py
@@ -0,0 +1,11 @@
+import json,sys
+d=json.load(open(sys.argv[1]))
+addrs=[int(x,16) for x in sys.argv[2:]]
+funcs=d['functions']
+funcs.sort(key=lambda f:f['addr'])
+import bisect
+starts=[f['addr'] for f in funcs]
+for a in addrs:
+ i=bisect.bisect_right(starts,a)-1
+ f=funcs[i]
+ print(hex(a), '->', f['name'], hex(f['addr']), hex(f['end']), f.get('confidence'))
diff --git a/generated/OpenBIOS.emitter.sha b/generated/OpenBIOS.emitter.sha
index 9b5600be..8c2ec8ca 100644
--- a/generated/OpenBIOS.emitter.sha
+++ b/generated/OpenBIOS.emitter.sha
@@ -1 +1 @@
-8b10cee63c750fee313839c132742e52441938a70c5736576c140383240036df
+ce9236c0e4e157e673c66063e9327f214ae88286e23fc9714af1b243d4334046
diff --git a/generated/OpenBIOS_full.c b/generated/OpenBIOS_full.c
index ecb86e34..e784d9dd 100644
--- a/generated/OpenBIOS_full.c
+++ b/generated/OpenBIOS_full.c
@@ -1281,7 +1281,8 @@ label_BFC000B8:
psx_cyc_step(cpu, 0x10004u);
#endif
/* 0xBFC000C0: 0202102B sltu $v0, $s0, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0202102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC000C0u);
#endif
@@ -1622,7 +1623,8 @@ label_BFC00118:
psx_cyc_step(cpu, 0x10000u);
#endif
/* 0xBFC0011C: 321000FF andi $s0, $s0, 0xFF */
- cpu->gpr[16] = cpu->gpr[16] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0xFFu;
+ PGXP_ALU(0x321000FFu, cpu->gpr[16], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0011Cu);
#endif
@@ -3945,7 +3947,8 @@ label_BFC003A8:
psx_cyc_step(cpu, 0x48u);
#endif
/* 0xBFC003B8: 00661826 xor $v1, $v1, $a2 */
- cpu->gpr[3] = cpu->gpr[3] ^ cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[3] ^ cpu->gpr[6];
+ PGXP_ALU(0x00661826u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC003B8u);
#endif
@@ -4118,7 +4121,8 @@ label_BFC003D0:
psx_cyc_step(cpu, 0x60u);
#endif
/* 0xBFC003E0: 00A62826 xor $a1, $a1, $a2 */
- cpu->gpr[5] = cpu->gpr[5] ^ cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] ^ cpu->gpr[6];
+ PGXP_ALU(0x00A62826u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC003E0u);
#endif
@@ -4170,7 +4174,8 @@ label_BFC003E4:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC003EC: 00451026 xor $v0, $v0, $a1 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[5];
+ PGXP_ALU(0x00451026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC003ECu);
#endif
@@ -4189,7 +4194,8 @@ label_BFC003E4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC003F4: 2C420001 sltiu $v0, $v0, 1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC003F4u);
#endif
@@ -4816,7 +4822,8 @@ label_BFC00478:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC00488: 30E700F0 andi $a3, $a3, 0xF0 */
- cpu->gpr[7] = cpu->gpr[7] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xF0u;
+ PGXP_ALU(0x30E700F0u, cpu->gpr[7], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00488u);
#endif
@@ -5388,7 +5395,8 @@ label_BFC00514:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC00514: 38820052 xori $v0, $a0, 0x52 */
- cpu->gpr[2] = cpu->gpr[4] ^ 0x52u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] ^ 0x52u;
+ PGXP_ALU(0x38820052u, cpu->gpr[2], _pgx1, 0x0052u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00514u);
#endif
@@ -5407,7 +5415,8 @@ label_BFC00514:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC0051C: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0051Cu);
#endif
@@ -5442,7 +5451,8 @@ label_BFC00520:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC00520: 38820051 xori $v0, $a0, 0x51 */
- cpu->gpr[2] = cpu->gpr[4] ^ 0x51u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] ^ 0x51u;
+ PGXP_ALU(0x38820051u, cpu->gpr[2], _pgx1, 0x0051u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00520u);
#endif
@@ -5461,7 +5471,8 @@ label_BFC00520:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC00528: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00528u);
#endif
@@ -13509,7 +13520,8 @@ label_BFC00D4C:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC00D54: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00D54u);
#endif
@@ -15460,7 +15472,8 @@ label_BFC00F38:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC00F64: 2C430009 sltiu $v1, $v0, 9 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000009u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000009u ? 1 : 0);
+ PGXP_ALU(0x2C430009u, cpu->gpr[3], _pgx1, 0x0009u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00F64u);
#endif
@@ -19391,7 +19404,8 @@ label_BFC01364:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC01378: 2842000F slti $v0, $v0, 15 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ PGXP_ALU(0x2842000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01378u);
#endif
@@ -21063,7 +21077,8 @@ label_BFC0150C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC01520: 28420014 slti $v0, $v0, 20 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (20) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (20) ? 1 : 0);
+ PGXP_ALU(0x28420014u, cpu->gpr[2], _pgx1, 0x0014u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01520u);
#endif
@@ -23647,7 +23662,8 @@ label_BFC017B0:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC017B4: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC017B4u);
#endif
@@ -26795,7 +26811,8 @@ label_BFC01AE8:
psx_cyc_step(cpu, 0x10004u);
#endif
/* 0xBFC01AE8: 2A02000F slti $v0, $s0, 15 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[16] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[16] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A02000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01AE8u);
#endif
@@ -28285,7 +28302,8 @@ label_BFC01C40:
psx_cyc_step(cpu, 0x800004u);
#endif
/* 0xBFC01C40: 32E28000 andi $v0, $s7, 0x8000 */
- cpu->gpr[2] = cpu->gpr[23] & 0x8000u;
+ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = cpu->gpr[23] & 0x8000u;
+ PGXP_ALU(0x32E28000u, cpu->gpr[2], _pgx1, 0x8000u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01C40u);
#endif
@@ -28479,7 +28497,8 @@ label_BFC01C5C:
psx_cyc_step(cpu, 0x800004u);
#endif
/* 0xBFC01C70: 32E20200 andi $v0, $s7, 0x200 */
- cpu->gpr[2] = cpu->gpr[23] & 0x200u;
+ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = cpu->gpr[23] & 0x200u;
+ PGXP_ALU(0x32E20200u, cpu->gpr[2], _pgx1, 0x0200u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01C70u);
#endif
@@ -28798,7 +28817,8 @@ label_BFC01CBC:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC01CC4: 30C600F0 andi $a2, $a2, 0xF0 */
- cpu->gpr[6] = cpu->gpr[6] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xF0u;
+ PGXP_ALU(0x30C600F0u, cpu->gpr[6], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01CC4u);
#endif
@@ -28950,7 +28970,8 @@ label_BFC01CE0:
psx_cyc_step(cpu, 0x84u);
#endif
/* 0xBFC01CE8: 0047102B sltu $v0, $v0, $a3 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x0047102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01CE8u);
#endif
@@ -29103,7 +29124,8 @@ label_BFC01D0C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC01D14: 304200F0 andi $v0, $v0, 0xF0 */
- cpu->gpr[2] = cpu->gpr[2] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xF0u;
+ PGXP_ALU(0x304200F0u, cpu->gpr[2], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D14u);
#endif
@@ -29351,7 +29373,8 @@ label_BFC01D4C:
psx_cyc_step(cpu, 0x1010u);
#endif
/* 0xBFC01D54: 2C8C0001 sltiu $t4, $a0, 1 */
- cpu->gpr[12] = (uint32_t)(cpu->gpr[4] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[12] = (uint32_t)(cpu->gpr[4] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C8C0001u, cpu->gpr[12], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D54u);
#endif
@@ -29467,7 +29490,8 @@ label_BFC01D6C:
psx_cyc_step(cpu, 0x94u);
#endif
/* 0xBFC01D70: 0047202B sltu $a0, $v0, $a3 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x0047202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D70u);
#endif
@@ -29520,7 +29544,8 @@ label_BFC01D7C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC01D7C: 28420002 slti $v0, $v0, 2 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0);
+ PGXP_ALU(0x28420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D7Cu);
#endif
@@ -33843,7 +33868,8 @@ label_BFC021C4:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC021E4: 30A500F0 andi $a1, $a1, 0xF0 */
- cpu->gpr[5] = cpu->gpr[5] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xF0u;
+ PGXP_ALU(0x30A500F0u, cpu->gpr[5], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC021E4u);
#endif
@@ -35457,7 +35483,8 @@ label_BFC02378:
psx_cyc_step(cpu, 0x58u);
#endif
/* 0xBFC02378: 0083302B sltu $a2, $a0, $v1 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[4] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[4] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0083302Bu, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02378u);
#endif
@@ -35510,7 +35537,8 @@ label_BFC02384:
psx_cyc_step(cpu, 0x1Cu);
#endif
/* 0xBFC02384: 0043202B sltu $a0, $v0, $v1 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02384u);
#endif
@@ -37718,7 +37746,8 @@ label_BFC025AC:
psx_cyc_step(cpu, 0x60u);
#endif
/* 0xBFC025AC: 28C50040 slti $a1, $a2, 64 */
- cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[6] < (64) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[6] < (64) ? 1 : 0);
+ PGXP_ALU(0x28C50040u, cpu->gpr[5], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC025ACu);
#endif
@@ -38870,7 +38899,8 @@ label_BFC026BC:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC026C4: 3222007F andi $v0, $s1, 0x7F */
- cpu->gpr[2] = cpu->gpr[17] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x7Fu;
+ PGXP_ALU(0x3222007Fu, cpu->gpr[2], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC026C4u);
#endif
@@ -38943,7 +38973,8 @@ label_BFC026D0:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC026D8: 0222102B sltu $v0, $s1, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[17] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[17] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0222102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC026D8u);
#endif
@@ -39285,7 +39316,8 @@ label_BFC02738:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC02740: 30428000 andi $v0, $v0, 0x8000 */
- cpu->gpr[2] = cpu->gpr[2] & 0x8000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8000u;
+ PGXP_ALU(0x30428000u, cpu->gpr[2], _pgx1, 0x8000u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02740u);
#endif
@@ -39529,7 +39561,8 @@ label_BFC02774:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC02774: 3222003F andi $v0, $s1, 0x3F */
- cpu->gpr[2] = cpu->gpr[17] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x3Fu;
+ PGXP_ALU(0x3222003Fu, cpu->gpr[2], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02774u);
#endif
@@ -39626,7 +39659,8 @@ label_BFC02784:
psx_cyc_step(cpu, 0x90004u);
#endif
/* 0xBFC0278C: 0270102A slt $v0, $s3, $s0 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0270102Au, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0278Cu);
#endif
@@ -42244,7 +42278,8 @@ label_BFC02A20:
psx_cyc_step(cpu, 0x40004u);
#endif
/* 0xBFC02A28: 3242007F andi $v0, $s2, 0x7F */
- cpu->gpr[2] = cpu->gpr[18] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[18] & 0x7Fu;
+ PGXP_ALU(0x3242007Fu, cpu->gpr[2], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02A28u);
#endif
@@ -42317,7 +42352,8 @@ label_BFC02A34:
psx_cyc_step(cpu, 0x40004u);
#endif
/* 0xBFC02A3C: 0242102B sltu $v0, $s2, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[18] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[18] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0242102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02A3Cu);
#endif
@@ -42659,7 +42695,8 @@ label_BFC02A9C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC02AA4: 30428000 andi $v0, $v0, 0x8000 */
- cpu->gpr[2] = cpu->gpr[2] & 0x8000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8000u;
+ PGXP_ALU(0x30428000u, cpu->gpr[2], _pgx1, 0x8000u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02AA4u);
#endif
@@ -42891,7 +42928,8 @@ label_BFC02AD4:
psx_cyc_step(cpu, 0x40008u);
#endif
/* 0xBFC02AD4: 3243003F andi $v1, $s2, 0x3F */
- cpu->gpr[3] = cpu->gpr[18] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[3] = cpu->gpr[18] & 0x3Fu;
+ PGXP_ALU(0x3243003Fu, cpu->gpr[3], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02AD4u);
#endif
@@ -42988,7 +43026,8 @@ label_BFC02AE4:
psx_cyc_step(cpu, 0x280004u);
#endif
/* 0xBFC02AEC: 0275102A slt $v0, $s3, $s5 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0275102Au, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02AECu);
#endif
@@ -50849,7 +50888,8 @@ label_BFC032B4:
psx_cyc_step(cpu, 0x40010004u);
#endif
/* 0xBFC032C4: 021E102B sltu $v0, $s0, $fp */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[30] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[30] ? 1 : 0);
+ PGXP_ALU(0x021E102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC032C4u);
#endif
@@ -51113,7 +51153,8 @@ label_BFC0330C:
psx_cyc_step(cpu, 0x20108u);
#endif
/* 0xBFC0330C: 0228182A slt $v1, $s1, $t0 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0228182Au, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0330Cu);
#endif
@@ -51429,7 +51470,8 @@ label_BFC03354:
psx_cyc_step(cpu, 0x244u);
#endif
/* 0xBFC03354: 0049302A slt $a2, $v0, $t1 */
- cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0049302Au, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03354u);
#endif
@@ -53045,7 +53087,8 @@ label_BFC034F8:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC03504: 00641826 xor $v1, $v1, $a0 */
- cpu->gpr[3] = cpu->gpr[3] ^ cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] ^ cpu->gpr[4];
+ PGXP_ALU(0x00641826u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03504u);
#endif
@@ -53412,7 +53455,8 @@ label_BFC03564:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0356C: 30430001 andi $v1, $v0, 0x1 */
- cpu->gpr[3] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30430001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0356Cu);
#endif
@@ -53496,7 +53540,8 @@ label_BFC0357C:
psx_cyc_step(cpu, 0x110004u);
#endif
/* 0xBFC03580: 0214102B sltu $v0, $s0, $s4 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[20] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[20] ? 1 : 0);
+ PGXP_ALU(0x0214102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03580u);
#endif
@@ -53888,7 +53933,8 @@ label_BFC035D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC035D0: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC035D0u);
#endif
@@ -54177,7 +54223,8 @@ label_BFC03610:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC0361C: 2C84001A sltiu $a0, $a0, 26 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2C84001Au, cpu->gpr[4], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0361Cu);
#endif
@@ -54231,7 +54278,8 @@ label_BFC03628:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC03628: 00451024 and $v0, $v0, $a1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5];
+ PGXP_ALU(0x00451024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03628u);
#endif
@@ -55022,7 +55070,8 @@ label_BFC036E0:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC036E4: 30C207FF andi $v0, $a2, 0x7FF */
- cpu->gpr[2] = cpu->gpr[6] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] & 0x7FFu;
+ PGXP_ALU(0x30C207FFu, cpu->gpr[2], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC036E4u);
#endif
@@ -55144,7 +55193,8 @@ label_BFC03700:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC03708: 304307FF andi $v1, $v0, 0x7FF */
- cpu->gpr[3] = cpu->gpr[2] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x7FFu;
+ PGXP_ALU(0x304307FFu, cpu->gpr[3], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03708u);
#endif
@@ -55260,7 +55310,8 @@ label_BFC0371C:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC03724: 0043102B sltu $v0, $v0, $v1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03724u);
#endif
@@ -55461,7 +55512,8 @@ label_BFC03758:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC03758: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03758u);
#endif
@@ -55899,7 +55951,8 @@ label_BFC037C0:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC037CC: 02221024 and $v0, $s1, $v0 */
- cpu->gpr[2] = cpu->gpr[17] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[17] & cpu->gpr[2];
+ PGXP_ALU(0x02221024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC037CCu);
#endif
@@ -55922,7 +55975,8 @@ label_BFC037C0:
psx_cyc_step(cpu, 0x30u);
#endif
/* 0xBFC037D4: 00A4202B sltu $a0, $a1, $a0 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x00A4202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC037D4u);
#endif
@@ -56199,7 +56253,8 @@ label_BFC0380C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0380C: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0380Cu);
#endif
@@ -57844,7 +57899,8 @@ label_BFC039B0:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC039B0: 2CC6001A sltiu $a2, $a2, 26 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[6] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)(cpu->gpr[6] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2CC6001Au, cpu->gpr[6], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC039B0u);
#endif
@@ -57898,7 +57954,8 @@ label_BFC039BC:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC039BC: 00681824 and $v1, $v1, $t0 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[8];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[8];
+ PGXP_ALU(0x00681824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC039BCu);
#endif
@@ -58162,7 +58219,8 @@ label_BFC039FC:
psx_cyc_step(cpu, 0xC8u);
#endif
/* 0xBFC039FC: 00C3382B sltu $a3, $a2, $v1 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[6] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)(cpu->gpr[6] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x00C3382Bu, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC039FCu);
#endif
@@ -58215,7 +58273,8 @@ label_BFC03A08:
psx_cyc_step(cpu, 0x4Cu);
#endif
/* 0xBFC03A08: 0043302B sltu $a2, $v0, $v1 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043302Bu, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03A08u);
#endif
@@ -58563,7 +58622,8 @@ label_BFC03A54:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC03A54: 2C84001A sltiu $a0, $a0, 26 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2C84001Au, cpu->gpr[4], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03A54u);
#endif
@@ -58617,7 +58677,8 @@ label_BFC03A60:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC03A60: 00461024 and $v0, $v0, $a2 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ PGXP_ALU(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03A60u);
#endif
@@ -62272,7 +62333,8 @@ label_BFC03DE0:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC03DEC: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03DECu);
#endif
@@ -62347,7 +62409,8 @@ label_BFC03DF8:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC03DFC: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03DFCu);
#endif
@@ -62358,7 +62421,8 @@ label_BFC03DF8:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC03E00: 2CA51733 sltiu $a1, $a1, 5939 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x00001733u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x00001733u ? 1 : 0);
+ PGXP_ALU(0x2CA51733u, cpu->gpr[5], _pgx1, 0x1733u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03E00u);
#endif
@@ -62475,7 +62539,8 @@ label_BFC03E10:
psx_cyc_step(cpu, 0x30u);
#endif
/* 0xBFC03E20: 0085282B sltu $a1, $a0, $a1 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0085282Bu, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03E20u);
#endif
@@ -62628,7 +62693,8 @@ label_BFC03E2C:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC03E50: 3082FFFF andi $v0, $a0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3082FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03E50u);
#endif
@@ -62833,7 +62899,8 @@ label_BFC03E70:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC03E74: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03E74u);
#endif
@@ -62844,7 +62911,8 @@ label_BFC03E70:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC03E78: 2C42037F sltiu $v0, $v0, 895 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000037Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000037Fu ? 1 : 0);
+ PGXP_ALU(0x2C42037Fu, cpu->gpr[2], _pgx1, 0x037Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03E78u);
#endif
@@ -62997,7 +63065,8 @@ label_BFC03E94:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC03EA0: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03EA0u);
#endif
@@ -63116,7 +63185,8 @@ label_BFC03EC0:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC03EC0: 3063FFFF andi $v1, $v1, 0xFFFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ PGXP_ALU(0x3063FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03EC0u);
#endif
@@ -63127,7 +63197,8 @@ label_BFC03EC0:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC03EC4: 2C630FD4 sltiu $v1, $v1, 4052 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000FD4u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000FD4u ? 1 : 0);
+ PGXP_ALU(0x2C630FD4u, cpu->gpr[3], _pgx1, 0x0FD4u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03EC4u);
#endif
@@ -67424,7 +67495,8 @@ label_BFC04304:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC04304: 2C830010 sltiu $v1, $a0, 16 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000010u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000010u ? 1 : 0);
+ PGXP_ALU(0x2C830010u, cpu->gpr[3], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04304u);
#endif
@@ -68746,7 +68818,8 @@ label_BFC0443C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC04440: 2C42000A sltiu $v0, $v0, 10 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2C42000Au, cpu->gpr[2], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04440u);
#endif
@@ -69220,7 +69293,8 @@ label_BFC044B0:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC044B0: 2D08000A sltiu $t0, $t0, 10 */
- cpu->gpr[8] = (uint32_t)(cpu->gpr[8] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)(cpu->gpr[8] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2D08000Au, cpu->gpr[8], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC044B0u);
#endif
@@ -69514,7 +69588,8 @@ label_BFC044F0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC044F8: 30421000 andi $v0, $v0, 0x1000 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1000u;
+ PGXP_ALU(0x30421000u, cpu->gpr[2], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC044F8u);
#endif
@@ -70320,7 +70395,8 @@ label_BFC045B8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC045CC: 30420001 andi $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC045CCu);
#endif
@@ -73347,7 +73423,8 @@ label_BFC048AC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC048B4: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC048B4u);
#endif
@@ -73599,7 +73676,8 @@ label_BFC048E4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC048F4: 30420004 andi $v0, $v0, 0x4 */
- cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC048F4u);
#endif
@@ -74633,7 +74711,8 @@ label_BFC049E0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC049E8: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC049E8u);
#endif
@@ -74885,7 +74964,8 @@ label_BFC04A18:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC04A28: 30420004 andi $v0, $v0, 0x4 */
- cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04A28u);
#endif
@@ -77343,7 +77423,8 @@ label_BFC04C70:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC04C74: 00621024 and $v0, $v1, $v0 */
- cpu->gpr[2] = cpu->gpr[3] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] & cpu->gpr[2];
+ PGXP_ALU(0x00621024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04C74u);
#endif
@@ -78209,7 +78290,8 @@ label_BFC04D3C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC04D44: 30420007 andi $v0, $v0, 0x7 */
- cpu->gpr[2] = cpu->gpr[2] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7u;
+ PGXP_ALU(0x30420007u, cpu->gpr[2], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04D44u);
#endif
@@ -78712,7 +78794,8 @@ label_BFC04DB8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC04DC0: 3042007F andi $v0, $v0, 0x7F */
- cpu->gpr[2] = cpu->gpr[2] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7Fu;
+ PGXP_ALU(0x3042007Fu, cpu->gpr[2], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04DC0u);
#endif
@@ -79103,7 +79186,8 @@ label_BFC04E1C:
psx_cyc_step(cpu, 0x30008u);
#endif
/* 0xBFC04E20: 0230182B sltu $v1, $s1, $s0 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[17] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[3] = (uint32_t)(cpu->gpr[17] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0230182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04E20u);
#endif
@@ -79608,7 +79692,8 @@ label_BFC04E84:
psx_cyc_step(cpu, 0x50008u);
#endif
/* 0xBFC04E84: 0212182B sltu $v1, $s0, $s2 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[3] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0212182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04E84u);
#endif
@@ -79815,7 +79900,8 @@ label_BFC04EB0:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC04EB0: 28430020 slti $v1, $v0, 32 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (32) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (32) ? 1 : 0);
+ PGXP_ALU(0x28430020u, cpu->gpr[3], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04EB0u);
#endif
@@ -79900,7 +79986,8 @@ label_BFC04EC4:
psx_cyc_step(cpu, 0x50004u);
#endif
/* 0xBFC04EC4: 0212102B sltu $v0, $s0, $s2 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0212102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04EC4u);
#endif
@@ -83370,7 +83457,8 @@ label_BFC0522C:
psx_cyc_step(cpu, 0x80008u);
#endif
/* 0xBFC05234: 00731824 and $v1, $v1, $s3 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[19];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[19];
+ PGXP_ALU(0x00731824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05234u);
#endif
@@ -83451,7 +83539,8 @@ label_BFC05240:
psx_cyc_step(cpu, 0x48u);
#endif
/* 0xBFC05248: 30C3FFFF andi $v1, $a2, 0xFFFF */
- cpu->gpr[3] = cpu->gpr[6] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] & 0xFFFFu;
+ PGXP_ALU(0x30C3FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05248u);
#endif
@@ -83474,7 +83563,8 @@ label_BFC05240:
psx_cyc_step(cpu, 0x10000u);
#endif
/* 0xBFC05250: 3210FFFF andi $s0, $s0, 0xFFFF */
- cpu->gpr[16] = cpu->gpr[16] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0xFFFFu;
+ PGXP_ALU(0x3210FFFFu, cpu->gpr[16], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05250u);
#endif
@@ -84170,7 +84260,8 @@ label_BFC052F4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC05308: 00621824 and $v1, $v1, $v0 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[2];
+ PGXP_ALU(0x00621824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05308u);
#endif
@@ -84299,7 +84390,8 @@ label_BFC05324:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC0532C: 00641824 and $v1, $v1, $a0 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ PGXP_ALU(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0532Cu);
#endif
@@ -84708,7 +84800,8 @@ label_BFC05384:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC0538C: 00641824 and $v1, $v1, $a0 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ PGXP_ALU(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0538Cu);
#endif
@@ -84825,7 +84918,8 @@ label_BFC053A4:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC053AC: 00441024 and $v0, $v0, $a0 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[4];
+ PGXP_ALU(0x00441024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC053ACu);
#endif
@@ -85188,7 +85282,8 @@ label_BFC053E0:
psx_cyc_step(cpu, 0x50u);
#endif
/* 0xBFC05410: 30C4FFFF andi $a0, $a2, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[6] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[6] & 0xFFFFu;
+ PGXP_ALU(0x30C4FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05410u);
#endif
@@ -86811,7 +86906,8 @@ label_BFC055D8:
psx_cyc_step(cpu, 0x38u);
#endif
/* 0xBFC055D8: 0065202B sltu $a0, $v1, $a1 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0065202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC055D8u);
#endif
@@ -87079,7 +87175,8 @@ label_BFC05618:
psx_cyc_step(cpu, 0x38u);
#endif
/* 0xBFC05618: 0064282B sltu $a1, $v1, $a0 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064282Bu, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05618u);
#endif
@@ -87705,7 +87802,8 @@ label_BFC056B4:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC056B4: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC056B4u);
#endif
@@ -87922,7 +88020,8 @@ label_BFC056EC:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC056EC: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC056ECu);
#endif
@@ -88128,7 +88227,8 @@ label_BFC05724:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC05724: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05724u);
#endif
@@ -88275,7 +88375,8 @@ label_BFC0574C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC0574C: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0574Cu);
#endif
@@ -88526,7 +88627,8 @@ label_BFC0578C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC0578C: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0578Cu);
#endif
@@ -89314,7 +89416,8 @@ label_BFC05858:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0585C: 2C63001A sltiu $v1, $v1, 26 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2C63001Au, cpu->gpr[3], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0585Cu);
#endif
@@ -89380,7 +89483,8 @@ label_BFC05868:
psx_cyc_step(cpu, 0x1Cu);
#endif
/* 0xBFC0586C: 00831024 and $v0, $a0, $v1 */
- cpu->gpr[2] = cpu->gpr[4] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[4] & cpu->gpr[3];
+ PGXP_ALU(0x00831024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0586Cu);
#endif
@@ -89464,7 +89568,8 @@ label_BFC05878:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0587C: 2C63001A sltiu $v1, $v1, 26 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2C63001Au, cpu->gpr[3], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0587Cu);
#endif
@@ -90541,7 +90646,8 @@ label_BFC05958:
psx_cyc_step(cpu, 0x90u);
#endif
/* 0xBFC05960: 2C870001 sltiu $a3, $a0, 1 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[4] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[7] = (uint32_t)(cpu->gpr[4] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C870001u, cpu->gpr[7], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05960u);
#endif
@@ -95822,7 +95928,8 @@ label_BFC05E74:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC05E78: 2C43000A sltiu $v1, $v0, 10 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2C43000Au, cpu->gpr[3], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05E78u);
#endif
@@ -95887,7 +95994,8 @@ label_BFC05E84:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC05E88: 00821024 and $v0, $a0, $v0 */
- cpu->gpr[2] = cpu->gpr[4] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] & cpu->gpr[2];
+ PGXP_ALU(0x00821024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05E88u);
#endif
@@ -95910,7 +96018,8 @@ label_BFC05E84:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC05E90: 2C420006 sltiu $v0, $v0, 6 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000006u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000006u ? 1 : 0);
+ PGXP_ALU(0x2C420006u, cpu->gpr[2], _pgx1, 0x0006u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05E90u);
#endif
@@ -96011,7 +96120,8 @@ label_BFC05EA4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC05EA8: 2C42001A sltiu $v0, $v0, 26 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2C42001Au, cpu->gpr[2], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05EA8u);
#endif
@@ -96157,7 +96267,8 @@ label_BFC05EC4:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC05EC8: 00442026 xor $a0, $v0, $a0 */
- cpu->gpr[4] = cpu->gpr[2] ^ cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[2] ^ cpu->gpr[4];
+ PGXP_ALU(0x00442026u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05EC8u);
#endif
@@ -97072,7 +97183,8 @@ label_BFC05F90:
psx_cyc_step(cpu, 0x4Cu);
#endif
/* 0xBFC05F94: 0043302B sltu $a2, $v0, $v1 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043302Bu, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05F94u);
#endif
@@ -97473,7 +97585,8 @@ label_BFC05FE4:
psx_cyc_step(cpu, 0x4Cu);
#endif
/* 0xBFC05FE8: 0043302B sltu $a2, $v0, $v1 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043302Bu, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05FE8u);
#endif
@@ -98786,7 +98899,8 @@ label_BFC060E4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0610C: 30427FFF andi $v0, $v0, 0x7FFF */
- cpu->gpr[2] = cpu->gpr[2] & 0x7FFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7FFFu;
+ PGXP_ALU(0x30427FFFu, cpu->gpr[2], _pgx1, 0x7FFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0610Cu);
#endif
@@ -99426,7 +99540,8 @@ label_BFC061A0:
psx_cyc_step(cpu, 0x20044u);
#endif
/* 0xBFC061A0: 0226102A slt $v0, $s1, $a2 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x0226102Au, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC061A0u);
#endif
@@ -99937,7 +100052,8 @@ label_BFC06220:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC06220: 2C82000F sltiu $v0, $a0, 15 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[4] < 0x0000000Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(cpu->gpr[4] < 0x0000000Fu ? 1 : 0);
+ PGXP_ALU(0x2C82000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06220u);
#endif
@@ -100639,7 +100755,8 @@ label_BFC062A8:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC062BC: 00A21024 and $v0, $a1, $v0 */
- cpu->gpr[2] = cpu->gpr[5] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[5] & cpu->gpr[2];
+ PGXP_ALU(0x00A21024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC062BCu);
#endif
@@ -100671,7 +100788,8 @@ label_BFC062C0:
psx_cyc_step(cpu, 0x50u);
#endif
/* 0xBFC062C0: 28860009 slti $a2, $a0, 9 */
- cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[4] < (9) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[4] < (9) ? 1 : 0);
+ PGXP_ALU(0x28860009u, cpu->gpr[6], _pgx1, 0x0009u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC062C0u);
#endif
@@ -101246,7 +101364,8 @@ label_BFC06348:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC06348: 28430800 slti $v1, $v0, 2048 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (2048) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (2048) ? 1 : 0);
+ PGXP_ALU(0x28430800u, cpu->gpr[3], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06348u);
#endif
@@ -102912,7 +103031,8 @@ label_BFC064E4:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC064E8: 2CA5001A sltiu $a1, $a1, 26 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2CA5001Au, cpu->gpr[5], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC064E8u);
#endif
@@ -102966,7 +103086,8 @@ label_BFC064F4:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC064F4: 00461024 and $v0, $v0, $a2 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ PGXP_ALU(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC064F4u);
#endif
@@ -105726,7 +105847,8 @@ label_BFC067D4:
psx_cyc_step(cpu, 0x80028u);
#endif
/* 0xBFC067D4: 0073282A slt $a1, $v1, $s3 */
- cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0073282Au, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC067D4u);
#endif
@@ -105811,7 +105933,8 @@ label_BFC067E8:
psx_cyc_step(cpu, 0x40048u);
#endif
/* 0xBFC067E8: 0072302A slt $a2, $v1, $s2 */
- cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0072302Au, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC067E8u);
#endif
@@ -106917,7 +107040,8 @@ label_BFC068F8:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC068F8: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC068F8u);
#endif
@@ -107065,7 +107189,8 @@ label_BFC06924:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC06924: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06924u);
#endif
@@ -107577,7 +107702,8 @@ label_BFC069A8:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC069AC: 2C820005 sltiu $v0, $a0, 5 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[4] < 0x00000005u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(cpu->gpr[4] < 0x00000005u ? 1 : 0);
+ PGXP_ALU(0x2C820005u, cpu->gpr[2], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC069ACu);
#endif
@@ -109990,7 +110116,8 @@ label_BFC06BC8:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC06BC8: 2C64000A sltiu $a0, $v1, 10 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2C64000Au, cpu->gpr[4], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06BC8u);
#endif
@@ -110117,7 +110244,8 @@ label_BFC06BE4:
psx_cyc_step(cpu, 0x1108u);
#endif
/* 0xBFC06BE4: 010C1824 and $v1, $t0, $t4 */
- cpu->gpr[3] = cpu->gpr[8] & cpu->gpr[12];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[8] & cpu->gpr[12];
+ PGXP_ALU(0x010C1824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06BE4u);
#endif
@@ -110140,7 +110268,8 @@ label_BFC06BE4:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC06BEC: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06BECu);
#endif
@@ -110151,7 +110280,8 @@ label_BFC06BE4:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC06BF0: 2C630006 sltiu $v1, $v1, 6 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000006u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000006u ? 1 : 0);
+ PGXP_ALU(0x2C630006u, cpu->gpr[3], _pgx1, 0x0006u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06BF0u);
#endif
@@ -110216,7 +110346,8 @@ label_BFC06BFC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC06C00: 2C42001A sltiu $v0, $v0, 26 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2C42001Au, cpu->gpr[2], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06C00u);
#endif
@@ -110469,7 +110600,8 @@ label_BFC06C38:
psx_cyc_step(cpu, 0x500u);
#endif
/* 0xBFC06C40: 310A00FF andi $t2, $t0, 0xFF */
- cpu->gpr[10] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310A00FFu, cpu->gpr[10], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06C40u);
#endif
@@ -111165,7 +111297,8 @@ label_BFC06C7C:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC06CB0: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06CB0u);
#endif
@@ -111939,7 +112072,8 @@ label_BFC06D78:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC06D80: 2C430021 sltiu $v1, $v0, 33 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000021u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000021u ? 1 : 0);
+ PGXP_ALU(0x2C430021u, cpu->gpr[3], _pgx1, 0x0021u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06D80u);
#endif
@@ -113276,7 +113410,8 @@ label_BFC06ED8:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC06EE0: 3068000F andi $t0, $v1, 0xF */
- cpu->gpr[8] = cpu->gpr[3] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] & 0xFu;
+ PGXP_ALU(0x3068000Fu, cpu->gpr[8], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06EE0u);
#endif
@@ -114891,7 +115026,8 @@ label_BFC07074:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC07080: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07080u);
#endif
@@ -116895,7 +117031,8 @@ label_BFC0728C:
psx_cyc_step(cpu, 0x84u);
#endif
/* 0xBFC07290: 28E2000B slti $v0, $a3, 11 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[7] < (11) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[7] < (11) ? 1 : 0);
+ PGXP_ALU(0x28E2000Bu, cpu->gpr[2], _pgx1, 0x000Bu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07290u);
#endif
@@ -117825,7 +117962,8 @@ label_BFC07354:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC07360: 306400FF andi $a0, $v1, 0xFF */
- cpu->gpr[4] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07360u);
#endif
@@ -117836,7 +117974,8 @@ label_BFC07354:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC07364: 2C84000E sltiu $a0, $a0, 14 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000000Eu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000000Eu ? 1 : 0);
+ PGXP_ALU(0x2C84000Eu, cpu->gpr[4], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07364u);
#endif
@@ -117890,7 +118029,8 @@ label_BFC07370:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC07370: 30840001 andi $a0, $a0, 0x1 */
- cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07370u);
#endif
@@ -119578,7 +119718,8 @@ label_BFC07510:
psx_cyc_step(cpu, 0x30004u);
#endif
/* 0xBFC07514: 0211102B sltu $v0, $s0, $s1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0211102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07514u);
#endif
@@ -122137,7 +122278,8 @@ label_BFC0776C:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC07784: 30E70001 andi $a3, $a3, 0x1 */
- cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07784u);
#endif
@@ -122225,7 +122367,8 @@ label_BFC07798:
psx_cyc_step(cpu, 0xA0u);
#endif
/* 0xBFC07798: 2CA70401 sltiu $a3, $a1, 1025 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[5] < 0x00000401u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = (uint32_t)(cpu->gpr[5] < 0x00000401u ? 1 : 0);
+ PGXP_ALU(0x2CA70401u, cpu->gpr[7], _pgx1, 0x0401u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07798u);
#endif
@@ -122747,7 +122890,8 @@ label_BFC07814:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC0782C: 30E70001 andi $a3, $a3, 0x1 */
- cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0782Cu);
#endif
@@ -122835,7 +122979,8 @@ label_BFC07840:
psx_cyc_step(cpu, 0xA0u);
#endif
/* 0xBFC07840: 2CA70401 sltiu $a3, $a1, 1025 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[5] < 0x00000401u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = (uint32_t)(cpu->gpr[5] < 0x00000401u ? 1 : 0);
+ PGXP_ALU(0x2CA70401u, cpu->gpr[7], _pgx1, 0x0401u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07840u);
#endif
@@ -123353,7 +123498,8 @@ label_BFC078BC:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC078D4: 30C60001 andi $a2, $a2, 0x1 */
- cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ PGXP_ALU(0x30C60001u, cpu->gpr[6], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC078D4u);
#endif
@@ -123923,7 +124069,8 @@ label_BFC07968:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC07980: 306300FE andi $v1, $v1, 0xFE */
- cpu->gpr[3] = cpu->gpr[3] & 0xFEu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFEu;
+ PGXP_ALU(0x306300FEu, cpu->gpr[3], _pgx1, 0x00FEu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07980u);
#endif
@@ -124216,7 +124363,8 @@ label_BFC079C8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC079DC: 2C420002 sltiu $v0, $v0, 2 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC079DCu);
#endif
@@ -124541,7 +124689,8 @@ label_BFC07A24:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC07A38: 30630010 andi $v1, $v1, 0x10 */
- cpu->gpr[3] = cpu->gpr[3] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x10u;
+ PGXP_ALU(0x30630010u, cpu->gpr[3], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07A38u);
#endif
@@ -125456,7 +125605,8 @@ label_BFC07B18:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC07B20: 30420004 andi $v0, $v0, 0x4 */
- cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07B20u);
#endif
@@ -126150,7 +126300,8 @@ label_BFC07BE0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC07BE8: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07BE8u);
#endif
@@ -126380,7 +126531,8 @@ label_BFC07C20:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC07C28: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07C28u);
#endif
@@ -126474,7 +126626,8 @@ label_BFC07C34:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC07C44: 30420008 andi $v0, $v0, 0x8 */
- cpu->gpr[2] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30420008u, cpu->gpr[2], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07C44u);
#endif
@@ -126931,7 +127084,8 @@ label_BFC07CA4:
psx_cyc_step(cpu, 0x120u);
#endif
/* 0xBFC07CAC: 28A87403 slti $t0, $a1, 29699 */
- cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[5] < (29699) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[5] < (29699) ? 1 : 0);
+ PGXP_ALU(0x28A87403u, cpu->gpr[8], _pgx1, 0x7403u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07CACu);
#endif
@@ -127729,7 +127883,8 @@ label_BFC07D68:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC07D6C: 00651824 and $v1, $v1, $a1 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[5];
+ PGXP_ALU(0x00651824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07D6Cu);
#endif
@@ -128406,7 +128561,8 @@ label_BFC07E14:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC07E14: 30680003 andi $t0, $v1, 0x3 */
- cpu->gpr[8] = cpu->gpr[3] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] & 0x3u;
+ PGXP_ALU(0x30680003u, cpu->gpr[8], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07E14u);
#endif
@@ -128543,7 +128699,8 @@ label_BFC07E30:
psx_cyc_step(cpu, 0x8080u);
#endif
/* 0xBFC07E30: 00EF3824 and $a3, $a3, $t7 */
- cpu->gpr[7] = cpu->gpr[7] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[7] = cpu->gpr[7] & cpu->gpr[15];
+ PGXP_ALU(0x00EF3824u, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07E30u);
#endif
@@ -128573,7 +128730,8 @@ label_BFC07E34:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC07E38: 01074026 xor $t0, $t0, $a3 */
- cpu->gpr[8] = cpu->gpr[8] ^ cpu->gpr[7];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[8] ^ cpu->gpr[7];
+ PGXP_ALU(0x01074026u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07E38u);
#endif
@@ -128584,7 +128742,8 @@ label_BFC07E34:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC07E3C: 3908003D xori $t0, $t0, 0x3D */
- cpu->gpr[8] = cpu->gpr[8] ^ 0x3Du;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] ^ 0x3Du;
+ PGXP_ALU(0x3908003Du, cpu->gpr[8], _pgx1, 0x003Du); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07E3Cu);
#endif
@@ -128631,7 +128790,8 @@ label_BFC07E34:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC07E4C: 00E83826 xor $a3, $a3, $t0 */
- cpu->gpr[7] = cpu->gpr[7] ^ cpu->gpr[8];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[7] ^ cpu->gpr[8];
+ PGXP_ALU(0x00E83826u, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07E4Cu);
#endif
@@ -128684,7 +128844,8 @@ label_BFC07E34:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC07E5C: 00E83826 xor $a3, $a3, $t0 */
- cpu->gpr[7] = cpu->gpr[7] ^ cpu->gpr[8];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[7] ^ cpu->gpr[8];
+ PGXP_ALU(0x00E83826u, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07E5Cu);
#endif
@@ -128790,7 +128951,8 @@ label_BFC07E74:
psx_cyc_step(cpu, 0x2080u);
#endif
/* 0xBFC07E78: 00ED3824 and $a3, $a3, $t5 */
- cpu->gpr[7] = cpu->gpr[7] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[7] = cpu->gpr[7] & cpu->gpr[13];
+ PGXP_ALU(0x00ED3824u, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07E78u);
#endif
@@ -134818,7 +134980,8 @@ label_BFC08478:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC08478: 2CA20002 sltiu $v0, $a1, 2 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[5] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(cpu->gpr[5] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2CA20002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08478u);
#endif
@@ -135180,7 +135343,8 @@ label_BFC084D4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC084D8: 0043182B sltu $v1, $v0, $v1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC084D8u);
#endif
@@ -135763,7 +135927,8 @@ label_BFC08570:
psx_cyc_step(cpu, 0x10004u);
#endif
/* 0xBFC08574: 0050102B sltu $v0, $v0, $s0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0050102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08574u);
#endif
@@ -135836,7 +136001,8 @@ label_BFC08584:
psx_cyc_step(cpu, 0x280004u);
#endif
/* 0xBFC08584: 0275102B sltu $v0, $s3, $s5 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[19] < cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)(cpu->gpr[19] < cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0275102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08584u);
#endif
@@ -136446,7 +136612,8 @@ label_BFC08604:
psx_cyc_step(cpu, 0x38u);
#endif
/* 0xBFC08604: 0085182B sltu $v1, $a0, $a1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0085182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08604u);
#endif
@@ -136500,7 +136667,8 @@ label_BFC08610:
psx_cyc_step(cpu, 0x38u);
#endif
/* 0xBFC08610: 00A4182B sltu $v1, $a1, $a0 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x00A4182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08610u);
#endif
@@ -136597,7 +136765,8 @@ label_BFC08624:
psx_cyc_step(cpu, 0x50u);
#endif
/* 0xBFC08628: 0086202B sltu $a0, $a0, $a2 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x0086202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08628u);
#endif
@@ -137097,7 +137266,8 @@ label_BFC08688:
psx_cyc_step(cpu, 0x188u);
#endif
/* 0xBFC08698: 0067402B sltu $t0, $v1, $a3 */
- cpu->gpr[8] = (uint32_t)(cpu->gpr[3] < cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = (uint32_t)(cpu->gpr[3] < cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x0067402Bu, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08698u);
#endif
@@ -137118,7 +137288,8 @@ label_BFC08688:
psx_cyc_step(cpu, 0x88u);
#endif
/* 0xBFC086A0: 00E3182B sltu $v1, $a3, $v1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[7] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[7] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x00E3182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC086A0u);
#endif
@@ -137620,7 +137791,8 @@ label_BFC086E8:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC086E8: 2CC20025 sltiu $v0, $a2, 37 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[6] < 0x00000025u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = (uint32_t)(cpu->gpr[6] < 0x00000025u ? 1 : 0);
+ PGXP_ALU(0x2CC20025u, cpu->gpr[2], _pgx1, 0x0025u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC086E8u);
#endif
@@ -138087,7 +138259,8 @@ label_BFC08760:
psx_cyc_step(cpu, 0x1000000u);
#endif
/* 0xBFC08760: 331800FF andi $t8, $t8, 0xFF */
- cpu->gpr[24] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x331800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08760u);
#endif
@@ -138098,7 +138271,8 @@ label_BFC08760:
psx_cyc_step(cpu, 0x1000000u);
#endif
/* 0xBFC08764: 2F180005 sltiu $t8, $t8, 5 */
- cpu->gpr[24] = (uint32_t)(cpu->gpr[24] < 0x00000005u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)(cpu->gpr[24] < 0x00000005u ? 1 : 0);
+ PGXP_ALU(0x2F180005u, cpu->gpr[24], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08764u);
#endif
@@ -138413,7 +138587,8 @@ label_BFC087A8:
psx_cyc_step(cpu, 0x1002000u);
#endif
/* 0xBFC087A8: 030DC024 and $t8, $t8, $t5 */
- cpu->gpr[24] = cpu->gpr[24] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[24] & cpu->gpr[13];
+ PGXP_ALU(0x030DC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087A8u);
#endif
@@ -138424,7 +138599,8 @@ label_BFC087A8:
psx_cyc_step(cpu, 0x1000000u);
#endif
/* 0xBFC087AC: 331800FF andi $t8, $t8, 0xFF */
- cpu->gpr[24] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x331800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087ACu);
#endif
@@ -138519,7 +138695,8 @@ label_BFC087C0:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC087C0: 3863002D xori $v1, $v1, 0x2D */
- cpu->gpr[3] = cpu->gpr[3] ^ 0x2Du;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] ^ 0x2Du;
+ PGXP_ALU(0x3863002Du, cpu->gpr[3], _pgx1, 0x002Du); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087C0u);
#endif
@@ -138530,7 +138707,8 @@ label_BFC087C0:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC087C4: 2C630001 sltiu $v1, $v1, 1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C630001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087C4u);
#endif
@@ -138773,7 +138951,8 @@ label_BFC087F4:
psx_cyc_step(cpu, 0xC8u);
#endif
/* 0xBFC087F8: 0066382A slt $a3, $v1, $a2 */
- cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x0066382Au, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087F8u);
#endif
@@ -138857,7 +139036,8 @@ label_BFC08804:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0880C: 0062102B sltu $v0, $v1, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0880Cu);
#endif
@@ -138878,7 +139058,8 @@ label_BFC08804:
psx_cyc_step(cpu, 0x80Cu);
#endif
/* 0xBFC08814: 006B102B sltu $v0, $v1, $t3 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[3] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = (uint32_t)(cpu->gpr[3] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x006B102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08814u);
#endif
@@ -139473,7 +139654,8 @@ label_BFC08898:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC08898: 30E700FF andi $a3, $a3, 0xFF */
- cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30E700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08898u);
#endif
@@ -139484,7 +139666,8 @@ label_BFC08898:
psx_cyc_step(cpu, 0x1000080u);
#endif
/* 0xBFC0889C: 2CF8000A sltiu $t8, $a3, 10 */
- cpu->gpr[24] = (uint32_t)(cpu->gpr[7] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = (uint32_t)(cpu->gpr[7] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2CF8000Au, cpu->gpr[24], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0889Cu);
#endif
@@ -139549,7 +139732,8 @@ label_BFC088A8:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC088AC: 30E700FF andi $a3, $a3, 0xFF */
- cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30E700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC088ACu);
#endif
@@ -139560,7 +139744,8 @@ label_BFC088A8:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC088B0: 2CE7001A sltiu $a3, $a3, 26 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[7] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)(cpu->gpr[7] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2CE7001Au, cpu->gpr[7], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC088B0u);
#endif
@@ -139614,7 +139799,8 @@ label_BFC088BC:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC088BC: 30E700FF andi $a3, $a3, 0xFF */
- cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30E700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC088BCu);
#endif
@@ -139625,7 +139811,8 @@ label_BFC088BC:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC088C0: 2CE7001A sltiu $a3, $a3, 26 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[7] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)(cpu->gpr[7] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2CE7001Au, cpu->gpr[7], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC088C0u);
#endif
@@ -141170,7 +141357,8 @@ label_BFC08A44:
psx_cyc_step(cpu, 0x1000008u);
#endif
/* 0xBFC08A48: 2878002E slti $t8, $v1, 46 */
- cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[3] < (46) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[3] < (46) ? 1 : 0);
+ PGXP_ALU(0x2878002Eu, cpu->gpr[24], _pgx1, 0x002Eu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08A48u);
#endif
@@ -141370,7 +141558,8 @@ label_BFC08A6C:
psx_cyc_step(cpu, 0x200100u);
#endif
/* 0xBFC08A6C: 3AA80001 xori $t0, $s5, 0x1 */
- cpu->gpr[8] = cpu->gpr[21] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[8] = cpu->gpr[21] ^ 0x1u;
+ PGXP_ALU(0x3AA80001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08A6Cu);
#endif
@@ -141388,7 +141577,8 @@ label_BFC08A70:
psx_cyc_step(cpu, 0x400110u);
#endif
/* 0xBFC08A70: 0104B024 and $s6, $t0, $a0 */
- cpu->gpr[22] = cpu->gpr[8] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[22] = cpu->gpr[8] & cpu->gpr[4];
+ PGXP_ALU(0x0104B024u, cpu->gpr[22], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08A70u);
#endif
@@ -141580,7 +141770,8 @@ label_BFC08A98:
psx_cyc_step(cpu, 0x90u);
#endif
/* 0xBFC08AA4: 28E4005B slti $a0, $a3, 91 */
- cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[7] < (91) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[7] < (91) ? 1 : 0);
+ PGXP_ALU(0x28E4005Bu, cpu->gpr[4], _pgx1, 0x005Bu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08AA4u);
#endif
@@ -141810,7 +142001,8 @@ label_BFC08AD8:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC08AD8: 2CA5000A sltiu $a1, $a1, 10 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2CA5000Au, cpu->gpr[5], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08AD8u);
#endif
@@ -142152,7 +142344,8 @@ label_BFC08B28:
psx_cyc_step(cpu, 0x200100u);
#endif
/* 0xBFC08B2C: 3AA80001 xori $t0, $s5, 0x1 */
- cpu->gpr[8] = cpu->gpr[21] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[8] = cpu->gpr[21] ^ 0x1u;
+ PGXP_ALU(0x3AA80001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08B2Cu);
#endif
@@ -142510,7 +142703,8 @@ label_BFC08B78:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC08B7C: 2C84000A sltiu $a0, $a0, 10 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2C84000Au, cpu->gpr[4], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08B7Cu);
#endif
@@ -142531,7 +142725,8 @@ label_BFC08B78:
psx_cyc_step(cpu, 0x90u);
#endif
/* 0xBFC08B84: 28E4005B slti $a0, $a3, 91 */
- cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[7] < (91) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[7] < (91) ? 1 : 0);
+ PGXP_ALU(0x28E4005Bu, cpu->gpr[4], _pgx1, 0x005Bu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08B84u);
#endif
@@ -142681,7 +142876,8 @@ label_BFC08B98:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC08BA4: 00642026 xor $a0, $v1, $a0 */
- cpu->gpr[4] = cpu->gpr[3] ^ cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] ^ cpu->gpr[4];
+ PGXP_ALU(0x00642026u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08BA4u);
#endif
@@ -142732,7 +142928,8 @@ label_BFC08BB4:
psx_cyc_step(cpu, 0x30u);
#endif
/* 0xBFC08BB4: 2885003D slti $a1, $a0, 61 */
- cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (61) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (61) ? 1 : 0);
+ PGXP_ALU(0x2885003Du, cpu->gpr[5], _pgx1, 0x003Du); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08BB4u);
#endif
@@ -143167,7 +143364,8 @@ label_BFC08C28:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC08C28: 2F0F000D sltiu $t7, $t8, 13 */
- cpu->gpr[15] = (uint32_t)(cpu->gpr[24] < 0x0000000Du ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = (uint32_t)(cpu->gpr[24] < 0x0000000Du ? 1 : 0);
+ PGXP_ALU(0x2F0F000Du, cpu->gpr[15], _pgx1, 0x000Du); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08C28u);
#endif
@@ -143386,7 +143584,8 @@ label_BFC08C58:
psx_cyc_step(cpu, 0x29u);
#endif
/* 0xBFC08C5C: 0003282B sltu $a1, $zero, $v1 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[0] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)(cpu->gpr[0] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0003282Bu, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08C5Cu);
#endif
@@ -143534,7 +143733,8 @@ label_BFC08C84:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC08C8C: 2C630001 sltiu $v1, $v1, 1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C630001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08C8Cu);
#endif
@@ -143861,7 +144061,8 @@ label_BFC08CBC:
psx_cyc_step(cpu, 0x2040000u);
#endif
/* 0xBFC08CBC: 3A590008 xori $t9, $s2, 0x8 */
- cpu->gpr[25] = cpu->gpr[18] ^ 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[18] ^ 0x8u;
+ PGXP_ALU(0x3A590008u, cpu->gpr[25], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08CBCu);
#endif
@@ -143872,7 +144073,8 @@ label_BFC08CBC:
psx_cyc_step(cpu, 0x2000001u);
#endif
/* 0xBFC08CC0: 0019C82B sltu $t9, $zero, $t9 */
- cpu->gpr[25] = (uint32_t)(cpu->gpr[0] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)(cpu->gpr[0] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0019C82Bu, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08CC0u);
#endif
@@ -143883,7 +144085,8 @@ label_BFC08CBC:
psx_cyc_step(cpu, 0x2000800u);
#endif
/* 0xBFC08CC4: 01795824 and $t3, $t3, $t9 */
- cpu->gpr[11] = cpu->gpr[11] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[11] = cpu->gpr[11] & cpu->gpr[25];
+ PGXP_ALU(0x01795824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08CC4u);
#endif
@@ -144083,7 +144286,8 @@ label_BFC08CF4:
psx_cyc_step(cpu, 0x2001001u);
#endif
/* 0xBFC08CF8: 0019602B sltu $t4, $zero, $t9 */
- cpu->gpr[12] = (uint32_t)(cpu->gpr[0] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[12] = (uint32_t)(cpu->gpr[0] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0019602Bu, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08CF8u);
#endif
@@ -144127,7 +144331,8 @@ label_BFC08CFC:
psx_cyc_step(cpu, 0x3010u);
#endif
/* 0xBFC08D00: 008C682A slt $t5, $a0, $t4 */
- cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[12] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[12] ? 1 : 0);
+ PGXP_ALU(0x008C682Au, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08D00u);
#endif
@@ -144357,7 +144562,8 @@ label_BFC08D2C:
psx_cyc_step(cpu, 0x1000u);
#endif
/* 0xBFC08D34: 2D8C0003 sltiu $t4, $t4, 3 */
- cpu->gpr[12] = (uint32_t)(cpu->gpr[12] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)(cpu->gpr[12] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2D8C0003u, cpu->gpr[12], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08D34u);
#endif
@@ -144502,7 +144708,8 @@ label_BFC08D4C:
psx_cyc_step(cpu, 0x1000u);
#endif
/* 0xBFC08D54: 2D8C0003 sltiu $t4, $t4, 3 */
- cpu->gpr[12] = (uint32_t)(cpu->gpr[12] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)(cpu->gpr[12] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2D8C0003u, cpu->gpr[12], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08D54u);
#endif
@@ -144793,7 +145000,8 @@ label_BFC08D88:
psx_cyc_step(cpu, 0x41008u);
#endif
/* 0xBFC08DA0: 0072602B sltu $t4, $v1, $s2 */
- cpu->gpr[12] = (uint32_t)(cpu->gpr[3] < cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[12] = (uint32_t)(cpu->gpr[3] < cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0072602Bu, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08DA0u);
#endif
@@ -144994,7 +145202,8 @@ label_BFC08DD4:
psx_cyc_step(cpu, 0x19u);
#endif
/* 0xBFC08DD4: 00032027 nor $a0, $zero, $v1 */
- cpu->gpr[4] = ~(cpu->gpr[0] | cpu->gpr[3]);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = ~(cpu->gpr[0] | cpu->gpr[3]);
+ PGXP_ALU(0x00032027u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08DD4u);
#endif
@@ -145017,7 +145226,8 @@ label_BFC08DD4:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC08DDC: 00641824 and $v1, $v1, $a0 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ PGXP_ALU(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08DDCu);
#endif
@@ -145583,7 +145793,8 @@ label_BFC08E64:
psx_cyc_step(cpu, 0x400010u);
#endif
/* 0xBFC08E64: 2EC40034 sltiu $a0, $s6, 52 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[22] < 0x00000034u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[4] = (uint32_t)(cpu->gpr[22] < 0x00000034u ? 1 : 0);
+ PGXP_ALU(0x2EC40034u, cpu->gpr[4], _pgx1, 0x0034u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08E64u);
#endif
@@ -145975,7 +146186,8 @@ label_BFC08EBC:
psx_cyc_step(cpu, 0x800008u);
#endif
/* 0xBFC08EBC: 2EE30034 sltiu $v1, $s7, 52 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[23] < 0x00000034u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[3] = (uint32_t)(cpu->gpr[23] < 0x00000034u ? 1 : 0);
+ PGXP_ALU(0x2EE30034u, cpu->gpr[3], _pgx1, 0x0034u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08EBCu);
#endif
@@ -146603,7 +146815,8 @@ label_BFC08F38:
psx_cyc_step(cpu, 0x80008u);
#endif
/* 0xBFC08F40: 02639824 and $s3, $s3, $v1 */
- cpu->gpr[19] = cpu->gpr[19] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[19] = cpu->gpr[19] & cpu->gpr[3];
+ PGXP_ALU(0x02639824u, cpu->gpr[19], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08F40u);
#endif
@@ -147229,7 +147442,8 @@ label_BFC08FC0:
psx_cyc_step(cpu, 0x58u);
#endif
/* 0xBFC08FC0: 0064302A slt $a2, $v1, $a0 */
- cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064302Au, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08FC0u);
#endif
@@ -147594,7 +147808,8 @@ label_BFC0900C:
psx_cyc_step(cpu, 0x40030u);
#endif
/* 0xBFC0900C: 0092282A slt $a1, $a0, $s2 */
- cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0092282Au, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0900Cu);
#endif
@@ -147928,7 +148143,8 @@ label_BFC0904C:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC0904C: 2CC6005F sltiu $a2, $a2, 95 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[6] < 0x0000005Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)(cpu->gpr[6] < 0x0000005Fu ? 1 : 0);
+ PGXP_ALU(0x2CC6005Fu, cpu->gpr[6], _pgx1, 0x005Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0904Cu);
#endif
@@ -147994,7 +148210,8 @@ label_BFC09058:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0905C: 3063001F andi $v1, $v1, 0x1F */
- cpu->gpr[3] = cpu->gpr[3] & 0x1Fu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x1Fu;
+ PGXP_ALU(0x3063001Fu, cpu->gpr[3], _pgx1, 0x001Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0905Cu);
#endif
@@ -148084,7 +148301,8 @@ label_BFC09074:
psx_cyc_step(cpu, 0x40008u);
#endif
/* 0xBFC09078: 2A430063 slti $v1, $s2, 99 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[18] < (99) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[18] < (99) ? 1 : 0);
+ PGXP_ALU(0x2A430063u, cpu->gpr[3], _pgx1, 0x0063u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09078u);
#endif
@@ -148147,7 +148365,8 @@ label_BFC09084:
psx_cyc_step(cpu, 0x40018u);
#endif
/* 0xBFC09088: 0092182A slt $v1, $a0, $s2 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0092182Au, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09088u);
#endif
@@ -150556,7 +150775,8 @@ label_BFC09274:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC09280: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09280u);
#endif
@@ -150567,7 +150787,8 @@ label_BFC09274:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC09284: 2C64000A sltiu $a0, $v1, 10 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2C64000Au, cpu->gpr[4], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09284u);
#endif
@@ -150642,7 +150863,8 @@ label_BFC09290:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC09298: 2843006A slti $v1, $v0, 106 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (106) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (106) ? 1 : 0);
+ PGXP_ALU(0x2843006Au, cpu->gpr[3], _pgx1, 0x006Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09298u);
#endif
@@ -150726,7 +150948,8 @@ label_BFC092A4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC092A8: 28430026 slti $v1, $v0, 38 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (38) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (38) ? 1 : 0);
+ PGXP_ALU(0x28430026u, cpu->gpr[3], _pgx1, 0x0026u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC092A8u);
#endif
@@ -151657,7 +151880,8 @@ label_BFC09374:
psx_cyc_step(cpu, 0x10004u);
#endif
/* 0xBFC0938C: 2E02000A sltiu $v0, $s0, 10 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2E02000Au, cpu->gpr[2], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0938Cu);
#endif
@@ -151902,7 +152126,8 @@ label_BFC093C0:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC093C8: 28430076 slti $v1, $v0, 118 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (118) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (118) ? 1 : 0);
+ PGXP_ALU(0x28430076u, cpu->gpr[3], _pgx1, 0x0076u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC093C8u);
#endif
@@ -152190,7 +152415,8 @@ label_BFC09408:
psx_cyc_step(cpu, 0x300004u);
#endif
/* 0xBFC09408: 02B4102A slt $v0, $s5, $s4 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[20] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[20] ? 1 : 0);
+ PGXP_ALU(0x02B4102Au, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09408u);
#endif
@@ -152553,7 +152779,8 @@ label_BFC09464:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC09464: 3084000F andi $a0, $a0, 0xF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFu;
+ PGXP_ALU(0x3084000Fu, cpu->gpr[4], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09464u);
#endif
@@ -153102,7 +153329,8 @@ label_BFC094E8:
psx_cyc_step(cpu, 0x900008u);
#endif
/* 0xBFC094E8: 02F4182A slt $v1, $s7, $s4 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[23] < (int32_t)cpu->gpr[20] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[23] < (int32_t)cpu->gpr[20] ? 1 : 0);
+ PGXP_ALU(0x02F4182Au, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC094E8u);
#endif
@@ -153646,7 +153874,8 @@ label_BFC0956C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC0956C: 3084000F andi $a0, $a0, 0xF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFu;
+ PGXP_ALU(0x3084000Fu, cpu->gpr[4], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0956Cu);
#endif
@@ -154279,7 +154508,8 @@ label_BFC0A510:
psx_cyc_step(cpu, 0x502u);
#endif
/* 0xBFC0A510: 0148082A slt $at, $t2, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0148082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030010u);
#endif
@@ -155184,7 +155414,8 @@ label_BFC0A59C:
psx_cyc_step(cpu, 0x10008u);
#endif
/* 0xBFC0A5B8: 38700045 xori $s0, $v1, 0x45 */
- cpu->gpr[16] = cpu->gpr[3] ^ 0x45u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[16] = cpu->gpr[3] ^ 0x45u;
+ PGXP_ALU(0x38700045u, cpu->gpr[16], _pgx1, 0x0045u); }
#ifdef PSX_COSIM
cosim_instr(0x800300B8u);
#endif
@@ -155192,7 +155423,8 @@ label_BFC0A59C:
psx_cyc_step(cpu, 0x10000u);
#endif
/* 0xBFC0A5BC: 2E100001 sltiu $s0, $s0, 1 */
- cpu->gpr[16] = (uint32_t)(cpu->gpr[16] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)(cpu->gpr[16] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2E100001u, cpu->gpr[16], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800300BCu);
#endif
@@ -156242,7 +156474,8 @@ label_BFC0A6F8:
psx_cyc_step(cpu, 0xC04u);
#endif
/* 0xBFC0A700: 014B102A slt $v0, $t2, $t3 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x014B102Au, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030200u);
#endif
@@ -156329,7 +156562,8 @@ label_BFC0A710:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0A71C: 2C430003 sltiu $v1, $v0, 3 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2C430003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x8003021Cu);
#endif
@@ -156570,7 +156804,8 @@ label_BFC0A760:
psx_cyc_step(cpu, 0x400Cu);
#endif
/* 0xBFC0A76C: 004E182A slt $v1, $v0, $t6 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x004E182Au, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003026Cu);
#endif
@@ -158972,7 +159207,8 @@ label_BFC0AA54:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC0AA5C: 00651824 and $v1, $v1, $a1 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[5];
+ PGXP_ALU(0x00651824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003055Cu);
#endif
@@ -159287,7 +159523,8 @@ label_BFC0AAC0:
psx_cyc_step(cpu, 0x1104u);
#endif
/* 0xBFC0AAC0: 010C102A slt $v0, $t0, $t4 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[12] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[12] ? 1 : 0);
+ PGXP_ALU(0x010C102Au, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800305C0u);
#endif
@@ -159401,7 +159638,8 @@ label_BFC0AAD4:
psx_cyc_step(cpu, 0x400u);
#endif
/* 0xBFC0AAE0: 2D4A0028 sltiu $t2, $t2, 40 */
- cpu->gpr[10] = (uint32_t)(cpu->gpr[10] < 0x00000028u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)(cpu->gpr[10] < 0x00000028u ? 1 : 0);
+ PGXP_ALU(0x2D4A0028u, cpu->gpr[10], _pgx1, 0x0028u); }
#ifdef PSX_COSIM
cosim_instr(0x800305E0u);
#endif
@@ -159703,7 +159941,8 @@ label_BFC0AB34:
psx_cyc_step(cpu, 0x8Cu);
#endif
/* 0xBFC0AB34: 0067102A slt $v0, $v1, $a3 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x0067102Au, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030634u);
#endif
@@ -160105,7 +160344,8 @@ label_BFC0ABC4:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC0ABCC: 00641824 and $v1, $v1, $a0 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ PGXP_ALU(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800306CCu);
#endif
@@ -162105,7 +162345,8 @@ label_BFC0AE6C:
psx_cyc_step(cpu, 0x320u);
#endif
/* 0xBFC0AE6C: 00A8482A slt $t1, $a1, $t0 */
- cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x00A8482Au, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003096Cu);
#endif
@@ -162262,7 +162503,8 @@ label_BFC0AE94:
psx_cyc_step(cpu, 0x320u);
#endif
/* 0xBFC0AE94: 00A8482A slt $t1, $a1, $t0 */
- cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x00A8482Au, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030994u);
#endif
@@ -162413,7 +162655,8 @@ label_BFC0AEBC:
psx_cyc_step(cpu, 0x320u);
#endif
/* 0xBFC0AEBC: 00A8482A slt $t1, $a1, $t0 */
- cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x00A8482Au, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800309BCu);
#endif
@@ -164288,7 +164531,8 @@ label_BFC0B0A4:
psx_cyc_step(cpu, 0x60u);
#endif
/* 0xBFC0B0C8: 00C5282A slt $a1, $a2, $a1 */
- cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x00C5282Au, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030BC8u);
#endif
@@ -164397,7 +164641,8 @@ label_BFC0B0E4:
psx_cyc_step(cpu, 0x430u);
#endif
/* 0xBFC0B0E4: 008A282A slt $a1, $a0, $t2 */
- cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x008A282Au, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030BE4u);
#endif
@@ -165247,7 +165492,8 @@ label_BFC0B184:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC0B1C4: 00641824 and $v1, $v1, $a0 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ PGXP_ALU(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030CC4u);
#endif
@@ -165729,7 +165975,8 @@ label_BFC0B264:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0B270: 2C42000A sltiu $v0, $v0, 10 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2C42000Au, cpu->gpr[2], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x80030D70u);
#endif
@@ -165737,7 +165984,8 @@ label_BFC0B264:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0B274: 38420001 xori $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80030D74u);
#endif
@@ -165835,7 +166083,8 @@ label_BFC0B280:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0B294: 2C420002 sltiu $v0, $v0, 2 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80030D94u);
#endif
@@ -165896,7 +166145,8 @@ label_BFC0B298:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0B2A4: 3842000F xori $v0, $v0, 0xF */
- cpu->gpr[2] = cpu->gpr[2] ^ 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0xFu;
+ PGXP_ALU(0x3842000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80030DA4u);
#endif
@@ -165909,7 +166159,8 @@ label_BFC0B298:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0B2AC: 2C420001 sltiu $v0, $v0, 1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80030DACu);
#endif
@@ -166222,7 +166473,8 @@ label_BFC0B2F4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B2FC: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030DFCu);
#endif
@@ -166290,7 +166542,8 @@ label_BFC0B308:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B310: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030E10u);
#endif
@@ -166452,7 +166705,8 @@ label_BFC0B33C:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC0B340: 0044202B sltu $a0, $v0, $a0 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030E40u);
#endif
@@ -166582,7 +166836,8 @@ label_BFC0B35C:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B35C: 2C430004 sltiu $v1, $v0, 4 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000004u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000004u ? 1 : 0);
+ PGXP_ALU(0x2C430004u, cpu->gpr[3], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80030E5Cu);
#endif
@@ -166641,7 +166896,8 @@ label_BFC0B368:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0B36C: 2C420002 sltiu $v0, $v0, 2 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80030E6Cu);
#endif
@@ -166835,7 +167091,8 @@ label_BFC0B39C:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B3A8: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030EA8u);
#endif
@@ -166901,7 +167158,8 @@ label_BFC0B3B4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B3BC: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030EBCu);
#endif
@@ -167255,7 +167513,8 @@ label_BFC0B410:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B424: 30620007 andi $v0, $v1, 0x7 */
- cpu->gpr[2] = cpu->gpr[3] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] & 0x7u;
+ PGXP_ALU(0x30620007u, cpu->gpr[2], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x80030F24u);
#endif
@@ -167339,7 +167598,8 @@ label_BFC0B43C:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0B43C: 30630018 andi $v1, $v1, 0x18 */
- cpu->gpr[3] = cpu->gpr[3] & 0x18u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x18u;
+ PGXP_ALU(0x30630018u, cpu->gpr[3], _pgx1, 0x0018u); }
#ifdef PSX_COSIM
cosim_instr(0x80030F3Cu);
#endif
@@ -167439,7 +167699,8 @@ label_BFC0B454:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0B458: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80030F58u);
#endif
@@ -167447,7 +167708,8 @@ label_BFC0B454:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B45C: 2C430005 sltiu $v1, $v0, 5 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000005u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000005u ? 1 : 0);
+ PGXP_ALU(0x2C430005u, cpu->gpr[3], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0x80030F5Cu);
#endif
@@ -167994,7 +168256,8 @@ label_BFC0B4D0:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B4EC: 2C43000D sltiu $v1, $v0, 13 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Du ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Du ? 1 : 0);
+ PGXP_ALU(0x2C43000Du, cpu->gpr[3], _pgx1, 0x000Du); }
#ifdef PSX_COSIM
cosim_instr(0x80030FECu);
#endif
@@ -170064,7 +170327,8 @@ label_BFC0B718:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0B718: 2C420001 sltiu $v0, $v0, 1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80031218u);
#endif
@@ -170108,7 +170372,8 @@ label_BFC0B71C:
psx_cyc_step(cpu, 0xA0008u);
#endif
/* 0xBFC0B728: 0233182B sltu $v1, $s1, $s3 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[17] < cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[3] = (uint32_t)(cpu->gpr[17] < cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0233182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031228u);
#endif
@@ -170642,7 +170907,8 @@ label_BFC0B7A0:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B7AC: 2C43000A sltiu $v1, $v0, 10 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2C43000Au, cpu->gpr[3], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x800312ACu);
#endif
@@ -172007,7 +172273,8 @@ label_BFC0B930:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B938: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031438u);
#endif
@@ -172220,7 +172487,8 @@ label_BFC0B95C:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0B968: 38620001 xori $v0, $v1, 0x1 */
- cpu->gpr[2] = cpu->gpr[3] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] ^ 0x1u;
+ PGXP_ALU(0x38620001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80031468u);
#endif
@@ -172493,7 +172761,8 @@ label_BFC0B9B0:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC0B9BC: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800314BCu);
#endif
@@ -172579,7 +172848,8 @@ label_BFC0B9D0:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC0B9DC: 2CA50001 sltiu $a1, $a1, 1 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2CA50001u, cpu->gpr[5], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800314DCu);
#endif
@@ -172599,7 +172869,8 @@ label_BFC0B9D0:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC0B9E4: 30A50280 andi $a1, $a1, 0x280 */
- cpu->gpr[5] = cpu->gpr[5] & 0x280u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x280u;
+ PGXP_ALU(0x30A50280u, cpu->gpr[5], _pgx1, 0x0280u); }
#ifdef PSX_COSIM
cosim_instr(0x800314E4u);
#endif
@@ -172683,7 +172954,8 @@ label_BFC0B9F0:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC0BA08: 2CC60001 sltiu $a2, $a2, 1 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[6] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)(cpu->gpr[6] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2CC60001u, cpu->gpr[6], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80031508u);
#endif
@@ -172800,7 +173072,8 @@ label_BFC0BA0C:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC0BA30: 30C60280 andi $a2, $a2, 0x280 */
- cpu->gpr[6] = cpu->gpr[6] & 0x280u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x280u;
+ PGXP_ALU(0x30C60280u, cpu->gpr[6], _pgx1, 0x0280u); }
#ifdef PSX_COSIM
cosim_instr(0x80031530u);
#endif
@@ -173427,7 +173700,8 @@ label_BFC0BAE0:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC0BAF0: 30642000 andi $a0, $v1, 0x2000 */
- cpu->gpr[4] = cpu->gpr[3] & 0x2000u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] & 0x2000u;
+ PGXP_ALU(0x30642000u, cpu->gpr[4], _pgx1, 0x2000u); }
#ifdef PSX_COSIM
cosim_instr(0x800315F0u);
#endif
@@ -173540,7 +173814,8 @@ label_BFC0BB04:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0BB04: 2C420001 sltiu $v0, $v0, 1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80031604u);
#endif
@@ -173657,7 +173932,8 @@ label_BFC0BB24:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0BB2C: 30420001 andi $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8003162Cu);
#endif
@@ -173725,7 +174001,8 @@ label_BFC0BB38:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0BB40: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031640u);
#endif
@@ -174083,7 +174360,8 @@ label_BFC0BB94:
psx_cyc_step(cpu, 0x11u);
#endif
/* 0xBFC0BB94: 0004202B sltu $a0, $zero, $a0 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0004202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031694u);
#endif
@@ -175353,7 +175631,8 @@ label_BFC0BCD4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0BD44: 0043182A slt $v1, $v0, $v1 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043182Au, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031844u);
#endif
@@ -175690,7 +175969,8 @@ label_BFC0BD9C:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC0BD9C: 2E220002 sltiu $v0, $s1, 2 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[17] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(cpu->gpr[17] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2E220002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8003189Cu);
#endif
@@ -175914,7 +176194,8 @@ label_BFC0BDE4:
psx_cyc_step(cpu, 0x5004u);
#endif
/* 0xBFC0BDE8: 01CC102B sltu $v0, $t6, $t4 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[14] < cpu->gpr[12] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = (uint32_t)(cpu->gpr[14] < cpu->gpr[12] ? 1 : 0);
+ PGXP_ALU(0x01CC102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800318E8u);
#endif
@@ -176264,7 +176545,8 @@ label_BFC0BE3C:
psx_cyc_step(cpu, 0x30004u);
#endif
/* 0xBFC0BE44: 0211102B sltu $v0, $s0, $s1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0211102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031944u);
#endif
@@ -176899,7 +177181,8 @@ label_BFC0BEE4:
psx_cyc_step(cpu, 0x20088u);
#endif
/* 0xBFC0BEE4: 0071382A slt $a3, $v1, $s1 */
- cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0071382Au, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800319E4u);
#endif
@@ -177032,7 +177315,8 @@ label_BFC0BEF0:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC0BF18: 2A220002 slti $v0, $s1, 2 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] < (2) ? 1 : 0);
+ PGXP_ALU(0x2A220002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80031A18u);
#endif
@@ -177155,7 +177439,8 @@ label_BFC0BF34:
psx_cyc_step(cpu, 0x20404u);
#endif
/* 0xBFC0BF34: 0151102A slt $v0, $t2, $s1 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0151102Au, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031A34u);
#endif
@@ -177203,7 +177488,8 @@ label_BFC0BF40:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC0BF40: 29030003 slti $v1, $t0, 3 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[8] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[8] < (3) ? 1 : 0);
+ PGXP_ALU(0x29030003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80031A40u);
#endif
@@ -177517,7 +177803,8 @@ label_BFC0BFA4:
psx_cyc_step(cpu, 0x1C0u);
#endif
/* 0xBFC0BFAC: 00E6402A slt $t0, $a3, $a2 */
- cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x00E6402Au, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031AACu);
#endif
@@ -177639,7 +177926,8 @@ label_BFC0BFC0:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC0BFD0: 00E8382A slt $a3, $a3, $t0 */
- cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x00E8382Au, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031AD0u);
#endif
@@ -178569,7 +178857,8 @@ label_BFC0C0DC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0C0F8: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80031BF8u);
#endif
@@ -180345,7 +180634,8 @@ label_BFC0C354:
psx_cyc_step(cpu, 0x30u);
#endif
/* 0xBFC0C358: 30850600 andi $a1, $a0, 0x600 */
- cpu->gpr[5] = cpu->gpr[4] & 0x600u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[4] & 0x600u;
+ PGXP_ALU(0x30850600u, cpu->gpr[5], _pgx1, 0x0600u); }
#ifdef PSX_COSIM
cosim_instr(0x80031E58u);
#endif
@@ -180353,7 +180643,8 @@ label_BFC0C354:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC0C35C: 308307FF andi $v1, $a0, 0x7FF */
- cpu->gpr[3] = cpu->gpr[4] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x7FFu;
+ PGXP_ALU(0x308307FFu, cpu->gpr[3], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80031E5Cu);
#endif
@@ -180462,7 +180753,8 @@ label_BFC0C37C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC0C37C: 30840400 andi $a0, $a0, 0x400 */
- cpu->gpr[4] = cpu->gpr[4] & 0x400u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x400u;
+ PGXP_ALU(0x30840400u, cpu->gpr[4], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x80031E7Cu);
#endif
@@ -180591,7 +180883,8 @@ label_BFC0C3A0:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC0C3A0: 2C640600 sltiu $a0, $v1, 1536 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < 0x00000600u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < 0x00000600u ? 1 : 0);
+ PGXP_ALU(0x2C640600u, cpu->gpr[4], _pgx1, 0x0600u); }
#ifdef PSX_COSIM
cosim_instr(0x80031EA0u);
#endif
@@ -180788,7 +181081,8 @@ label_BFC0C3C0:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC0C3C4: 30A20600 andi $v0, $a1, 0x600 */
- cpu->gpr[2] = cpu->gpr[5] & 0x600u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[5] & 0x600u;
+ PGXP_ALU(0x30A20600u, cpu->gpr[2], _pgx1, 0x0600u); }
#ifdef PSX_COSIM
cosim_instr(0x80031EC4u);
#endif
@@ -180833,7 +181127,8 @@ label_BFC0C3C0:
psx_cyc_step(cpu, 0x30u);
#endif
/* 0xBFC0C3D8: 30A407FF andi $a0, $a1, 0x7FF */
- cpu->gpr[4] = cpu->gpr[5] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[5] & 0x7FFu;
+ PGXP_ALU(0x30A407FFu, cpu->gpr[4], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80031ED8u);
#endif
@@ -186147,7 +186442,8 @@ label_BFC0CB40:
psx_cyc_step(cpu, 0x128u);
#endif
/* 0xBFC0CB40: 0105182B sltu $v1, $t0, $a1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0105182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032640u);
#endif
@@ -186508,7 +186804,8 @@ label_BFC0CBA4:
psx_cyc_step(cpu, 0x184u);
#endif
/* 0xBFC0CBA8: 0048382B sltu $a3, $v0, $t0 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0048382Bu, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800326A8u);
#endif
@@ -186550,7 +186847,8 @@ label_BFC0CBAC:
psx_cyc_step(cpu, 0x184u);
#endif
/* 0xBFC0CBB0: 0102382B sltu $a3, $t0, $v0 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[8] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[7] = (uint32_t)(cpu->gpr[8] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0102382Bu, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800326B0u);
#endif
@@ -186589,7 +186887,8 @@ label_BFC0CBB4:
psx_cyc_step(cpu, 0x184u);
#endif
/* 0xBFC0CBB8: 0048382B sltu $a3, $v0, $t0 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0048382Bu, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800326B8u);
#endif
@@ -186670,7 +186969,8 @@ label_BFC0CBC4:
psx_cyc_step(cpu, 0xB0u);
#endif
/* 0xBFC0CBC8: 00A4382B sltu $a3, $a1, $a0 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x00A4382Bu, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800326C8u);
#endif
@@ -186745,7 +187045,8 @@ label_BFC0CBD4:
psx_cyc_step(cpu, 0x184u);
#endif
/* 0xBFC0CBD4: 0102382B sltu $a3, $t0, $v0 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[8] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[7] = (uint32_t)(cpu->gpr[8] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0102382Bu, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800326D4u);
#endif
@@ -186809,7 +187110,8 @@ label_BFC0CBE0:
psx_cyc_step(cpu, 0xB0u);
#endif
/* 0xBFC0CBE4: 0085382B sltu $a3, $a0, $a1 */
- cpu->gpr[7] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[7] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0085382Bu, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800326E4u);
#endif
@@ -186890,7 +187192,8 @@ label_BFC0CBF0:
psx_cyc_step(cpu, 0x490u);
#endif
/* 0xBFC0CBF4: 0087502B sltu $t2, $a0, $a3 */
- cpu->gpr[10] = (uint32_t)(cpu->gpr[4] < cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[10] = (uint32_t)(cpu->gpr[4] < cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x0087502Bu, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800326F4u);
#endif
@@ -188369,7 +188672,8 @@ label_BFC0CDB8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0CDC0: 2C42001F sltiu $v0, $v0, 31 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Fu ? 1 : 0);
+ PGXP_ALU(0x2C42001Fu, cpu->gpr[2], _pgx1, 0x001Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800328C0u);
#endif
@@ -188868,7 +189172,8 @@ label_BFC0CE44:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0CE4C: 2C42001F sltiu $v0, $v0, 31 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Fu ? 1 : 0);
+ PGXP_ALU(0x2C42001Fu, cpu->gpr[2], _pgx1, 0x001Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003294Cu);
#endif
@@ -189905,7 +190210,8 @@ label_BFC0CFA4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0CFAC: 304207FF andi $v0, $v0, 0x7FF */
- cpu->gpr[2] = cpu->gpr[2] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7FFu;
+ PGXP_ALU(0x304207FFu, cpu->gpr[2], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80032AACu);
#endif
@@ -190083,7 +190389,8 @@ label_BFC0CFC0:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC0CFDC: 00451024 and $v0, $v0, $a1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5];
+ PGXP_ALU(0x00451024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032ADCu);
#endif
@@ -190667,7 +190974,8 @@ label_BFC0D070:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0D078: 3063000F andi $v1, $v1, 0xF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032B78u);
#endif
@@ -190675,7 +190983,8 @@ label_BFC0D070:
psx_cyc_step(cpu, 0x48u);
#endif
/* 0xBFC0D07C: 2C66000F sltiu $a2, $v1, 15 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[3] < 0x0000000Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[3] < 0x0000000Fu ? 1 : 0);
+ PGXP_ALU(0x2C66000Fu, cpu->gpr[6], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032B7Cu);
#endif
@@ -190686,7 +190995,8 @@ label_BFC0D070:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC0D080: 3045000F andi $a1, $v0, 0xF */
- cpu->gpr[5] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3045000Fu, cpu->gpr[5], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032B80u);
#endif
@@ -191003,7 +191313,8 @@ label_BFC0D0C0:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D0CC: 304300FF andi $v1, $v0, 0xFF */
- cpu->gpr[3] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80032BCCu);
#endif
@@ -191746,7 +192057,8 @@ label_BFC0D174:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D180: 2843006C slti $v1, $v0, 108 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (108) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (108) ? 1 : 0);
+ PGXP_ALU(0x2843006Cu, cpu->gpr[3], _pgx1, 0x006Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80032C80u);
#endif
@@ -191903,7 +192215,8 @@ label_BFC0D198:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D1A4: 2843038C slti $v1, $v0, 908 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (908) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (908) ? 1 : 0);
+ PGXP_ALU(0x2843038Cu, cpu->gpr[3], _pgx1, 0x038Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80032CA4u);
#endif
@@ -192025,7 +192338,8 @@ label_BFC0D1B8:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC0D1B8: 2C450011 sltiu $a1, $v0, 17 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2C450011u, cpu->gpr[5], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x80032CB8u);
#endif
@@ -192238,7 +192552,8 @@ label_BFC0D1F4:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC0D1F4: 31030001 andi $v1, $t0, 0x1 */
- cpu->gpr[3] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31030001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80032CF4u);
#endif
@@ -192428,7 +192743,8 @@ label_BFC0D214:
psx_cyc_step(cpu, 0x1Cu);
#endif
/* 0xBFC0D220: 0043202A slt $a0, $v0, $v1 */
- cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043202Au, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032D20u);
#endif
@@ -192501,7 +192817,8 @@ label_BFC0D22C:
psx_cyc_step(cpu, 0x1Cu);
#endif
/* 0xBFC0D238: 0062202A slt $a0, $v1, $v0 */
- cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062202Au, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032D38u);
#endif
@@ -192721,7 +193038,8 @@ label_BFC0D264:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D268: 2C430040 sltiu $v1, $v0, 64 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80032D68u);
#endif
@@ -192812,7 +193130,8 @@ label_BFC0D27C:
psx_cyc_step(cpu, 0x1Cu);
#endif
/* 0xBFC0D27C: 0062202A slt $a0, $v1, $v0 */
- cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062202Au, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032D7Cu);
#endif
@@ -192895,7 +193214,8 @@ label_BFC0D288:
psx_cyc_step(cpu, 0x1Cu);
#endif
/* 0xBFC0D298: 0043202A slt $a0, $v0, $v1 */
- cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043202Au, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032D98u);
#endif
@@ -192962,7 +193282,8 @@ label_BFC0D29C:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC0D29C: 2C450011 sltiu $a1, $v0, 17 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2C450011u, cpu->gpr[5], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x80032D9Cu);
#endif
@@ -193178,7 +193499,8 @@ label_BFC0D2D8:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC0D2D8: 31030001 andi $v1, $t0, 0x1 */
- cpu->gpr[3] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31030001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80032DD8u);
#endif
@@ -193359,7 +193681,8 @@ label_BFC0D2F8:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC0D300: 30A50003 andi $a1, $a1, 0x3 */
- cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80032E00u);
#endif
@@ -193374,7 +193697,8 @@ label_BFC0D2F8:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC0D308: 3082001F andi $v0, $a0, 0x1F */
- cpu->gpr[2] = cpu->gpr[4] & 0x1Fu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0x1Fu;
+ PGXP_ALU(0x3082001Fu, cpu->gpr[2], _pgx1, 0x001Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032E08u);
#endif
@@ -193623,7 +193947,8 @@ label_BFC0D34C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0D34C: 3042000F andi $v0, $v0, 0xF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032E4Cu);
#endif
@@ -193661,7 +193986,8 @@ label_BFC0D34C:
psx_cyc_step(cpu, 0x30u);
#endif
/* 0xBFC0D35C: 28850020 slti $a1, $a0, 32 */
- cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (32) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (32) ? 1 : 0);
+ PGXP_ALU(0x28850020u, cpu->gpr[5], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x80032E5Cu);
#endif
@@ -193791,7 +194117,8 @@ label_BFC0D378:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D37C: 2C430040 sltiu $v1, $v0, 64 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80032E7Cu);
#endif
@@ -194054,7 +194381,8 @@ label_BFC0D3A8:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC0D3B0: 30A50003 andi $a1, $a1, 0x3 */
- cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80032EB0u);
#endif
@@ -194093,7 +194421,8 @@ label_BFC0D3A8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0D3C4: 3042001F andi $v0, $v0, 0x1F */
- cpu->gpr[2] = cpu->gpr[2] & 0x1Fu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1Fu;
+ PGXP_ALU(0x3042001Fu, cpu->gpr[2], _pgx1, 0x001Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032EC4u);
#endif
@@ -194360,7 +194689,8 @@ label_BFC0D408:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC0D410: 3084000F andi $a0, $a0, 0xF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFu;
+ PGXP_ALU(0x3084000Fu, cpu->gpr[4], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032F10u);
#endif
@@ -194398,7 +194728,8 @@ label_BFC0D408:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC0D420: 28840020 slti $a0, $a0, 32 */
- cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] < (32) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] < (32) ? 1 : 0);
+ PGXP_ALU(0x28840020u, cpu->gpr[4], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x80032F20u);
#endif
@@ -194474,7 +194805,8 @@ label_BFC0D430:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0D434: 28420040 slti $v0, $v0, 64 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (64) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (64) ? 1 : 0);
+ PGXP_ALU(0x28420040u, cpu->gpr[2], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80032F34u);
#endif
@@ -194626,7 +194958,8 @@ label_BFC0D460:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC0D460: 31030001 andi $v1, $t0, 0x1 */
- cpu->gpr[3] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31030001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80032F60u);
#endif
@@ -194918,7 +195251,8 @@ label_BFC0D4A0:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC0D4A0: 2C450011 sltiu $a1, $v0, 17 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2C450011u, cpu->gpr[5], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x80032FA0u);
#endif
@@ -195083,7 +195417,8 @@ label_BFC0D4C4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D4C8: 2C430040 sltiu $v1, $v0, 64 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80032FC8u);
#endif
@@ -195661,7 +195996,8 @@ label_BFC0D54C:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0D554: 3063000F andi $v1, $v1, 0xF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80033054u);
#endif
@@ -195669,7 +196005,8 @@ label_BFC0D54C:
psx_cyc_step(cpu, 0x48u);
#endif
/* 0xBFC0D558: 2C66000F sltiu $a2, $v1, 15 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[3] < 0x0000000Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[3] < 0x0000000Fu ? 1 : 0);
+ PGXP_ALU(0x2C66000Fu, cpu->gpr[6], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80033058u);
#endif
@@ -195677,7 +196014,8 @@ label_BFC0D54C:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC0D55C: 3045000F andi $a1, $v0, 0xF */
- cpu->gpr[5] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3045000Fu, cpu->gpr[5], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003305Cu);
#endif
@@ -195888,7 +196226,8 @@ label_BFC0D588:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC0D58C: 30A5003F andi $a1, $a1, 0x3F */
- cpu->gpr[5] = cpu->gpr[5] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3Fu;
+ PGXP_ALU(0x30A5003Fu, cpu->gpr[5], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003308Cu);
#endif
@@ -195899,7 +196238,8 @@ label_BFC0D588:
psx_cyc_step(cpu, 0x21u);
#endif
/* 0xBFC0D590: 0005282B sltu $a1, $zero, $a1 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[0] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[0] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0005282Bu, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033090u);
#endif
@@ -195961,7 +196301,8 @@ label_BFC0D588:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0D5AC: 3063FFCF andi $v1, $v1, 0xFFCF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFCFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFCFu;
+ PGXP_ALU(0x3063FFCFu, cpu->gpr[3], _pgx1, 0xFFCFu); }
#ifdef PSX_COSIM
cosim_instr(0x800330ACu);
#endif
@@ -196044,7 +196385,8 @@ label_BFC0D5C4:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC0D5CC: 30A50030 andi $a1, $a1, 0x30 */
- cpu->gpr[5] = cpu->gpr[5] & 0x30u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x30u;
+ PGXP_ALU(0x30A50030u, cpu->gpr[5], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x800330CCu);
#endif
@@ -196121,7 +196463,8 @@ label_BFC0D5D8:
psx_cyc_step(cpu, 0x60u);
#endif
/* 0xBFC0D5E4: 00A62824 and $a1, $a1, $a2 */
- cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[6];
+ PGXP_ALU(0x00A62824u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800330E4u);
#endif
@@ -196234,7 +196577,8 @@ label_BFC0D608:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D610: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033110u);
#endif
@@ -197277,7 +197621,8 @@ label_BFC0D730:
psx_cyc_step(cpu, 0x10410u);
#endif
/* 0xBFC0D738: 0204502B sltu $t2, $s0, $a0 */
- cpu->gpr[10] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0204502Bu, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033238u);
#endif
@@ -197427,7 +197772,8 @@ label_BFC0D754:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0D760: 2C63FFFE sltiu $v1, $v1, -2 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0xFFFFFFFEu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0xFFFFFFFEu ? 1 : 0);
+ PGXP_ALU(0x2C63FFFEu, cpu->gpr[3], _pgx1, 0xFFFEu); }
#ifdef PSX_COSIM
cosim_instr(0x80033260u);
#endif
@@ -198806,7 +199152,8 @@ label_BFC0D8C4:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC0D8E8: 0044102B sltu $v0, $v0, $a0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800333E8u);
#endif
@@ -199186,7 +199533,8 @@ label_BFC0D950:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D964: 0043182B sltu $v1, $v0, $v1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033464u);
#endif
@@ -199203,7 +199551,8 @@ label_BFC0D950:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D96C: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003346Cu);
#endif
@@ -199401,7 +199750,8 @@ label_BFC0D9A4:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0D9B8: 3063000F andi $v1, $v1, 0xF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800334B8u);
#endif
@@ -199430,7 +199780,8 @@ label_BFC0D9A4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D9C4: 2C430040 sltiu $v1, $v0, 64 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x800334C4u);
#endif
@@ -199447,7 +199798,8 @@ label_BFC0D9A4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D9CC: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800334CCu);
#endif
@@ -199540,7 +199892,8 @@ label_BFC0D9D8:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0D9EC: 0043182B sltu $v1, $v0, $v1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800334ECu);
#endif
@@ -199981,7 +200334,8 @@ label_BFC0DA80:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0DA8C: 2C430040 sltiu $v1, $v0, 64 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x8003358Cu);
#endif
@@ -200278,7 +200632,8 @@ label_BFC0DAE8:
psx_cyc_step(cpu, 0x1008u);
#endif
/* 0xBFC0DAF4: 318300F0 andi $v1, $t4, 0xF0 */
- cpu->gpr[3] = cpu->gpr[12] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[12] & 0xF0u;
+ PGXP_ALU(0x318300F0u, cpu->gpr[3], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x800335F4u);
#endif
@@ -200313,7 +200668,8 @@ label_BFC0DAE8:
psx_cyc_step(cpu, 0x1000u);
#endif
/* 0xBFC0DB04: 318C0F00 andi $t4, $t4, 0xF00 */
- cpu->gpr[12] = cpu->gpr[12] & 0xF00u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] & 0xF00u;
+ PGXP_ALU(0x318C0F00u, cpu->gpr[12], _pgx1, 0x0F00u); }
#ifdef PSX_COSIM
cosim_instr(0x80033604u);
#endif
@@ -200342,7 +200698,8 @@ label_BFC0DAE8:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC0DB10: 316B000F andi $t3, $t3, 0xF */
- cpu->gpr[11] = cpu->gpr[11] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFu;
+ PGXP_ALU(0x316B000Fu, cpu->gpr[11], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80033610u);
#endif
@@ -200368,7 +200725,8 @@ label_BFC0DAE8:
psx_cyc_step(cpu, 0x500u);
#endif
/* 0xBFC0DB1C: 310A000F andi $t2, $t0, 0xF */
- cpu->gpr[10] = cpu->gpr[8] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] & 0xFu;
+ PGXP_ALU(0x310A000Fu, cpu->gpr[10], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003361Cu);
#endif
@@ -200530,7 +200888,8 @@ label_BFC0DB34:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0DB4C: 28630040 slti $v1, $v1, 64 */
- cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] < (64) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] < (64) ? 1 : 0);
+ PGXP_ALU(0x28630040u, cpu->gpr[3], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x8003364Cu);
#endif
@@ -200740,7 +201099,8 @@ label_BFC0DB84:
psx_cyc_step(cpu, 0x210u);
#endif
/* 0xBFC0DB84: 31240001 andi $a0, $t1, 0x1 */
- cpu->gpr[4] = cpu->gpr[9] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[9] & 0x1u;
+ PGXP_ALU(0x31240001u, cpu->gpr[4], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80033684u);
#endif
@@ -201246,7 +201606,8 @@ label_BFC0DBF4:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC0DC28: 3065000C andi $a1, $v1, 0xC */
- cpu->gpr[5] = cpu->gpr[3] & 0xCu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[3] & 0xCu;
+ PGXP_ALU(0x3065000Cu, cpu->gpr[5], _pgx1, 0x000Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80033728u);
#endif
@@ -201315,7 +201676,8 @@ label_BFC0DC38:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0DC38: 2C630040 sltiu $v1, $v1, 64 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C630040u, cpu->gpr[3], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80033738u);
#endif
@@ -201393,7 +201755,8 @@ label_BFC0DC48:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0DC4C: 306300FD andi $v1, $v1, 0xFD */
- cpu->gpr[3] = cpu->gpr[3] & 0xFDu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFDu;
+ PGXP_ALU(0x306300FDu, cpu->gpr[3], _pgx1, 0x00FDu); }
#ifdef PSX_COSIM
cosim_instr(0x8003374Cu);
#endif
@@ -201835,7 +202198,8 @@ label_BFC0DCD0:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC0DCD4: 316B00FF andi $t3, $t3, 0xFF */
- cpu->gpr[11] = cpu->gpr[11] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFu;
+ PGXP_ALU(0x316B00FFu, cpu->gpr[11], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800337D4u);
#endif
@@ -201843,7 +202207,8 @@ label_BFC0DCD0:
psx_cyc_step(cpu, 0x808u);
#endif
/* 0xBFC0DCD8: 2D63000D sltiu $v1, $t3, 13 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[11] < 0x0000000Du ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[3] = (uint32_t)(cpu->gpr[11] < 0x0000000Du ? 1 : 0);
+ PGXP_ALU(0x2D63000Du, cpu->gpr[3], _pgx1, 0x000Du); }
#ifdef PSX_COSIM
cosim_instr(0x800337D8u);
#endif
@@ -202353,7 +202718,8 @@ label_BFC0DD50:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0DD58: 306300F0 andi $v1, $v1, 0xF0 */
- cpu->gpr[3] = cpu->gpr[3] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xF0u;
+ PGXP_ALU(0x306300F0u, cpu->gpr[3], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80033858u);
#endif
@@ -202399,7 +202765,8 @@ label_BFC0DD64:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC0DD68: 310800F0 andi $t0, $t0, 0xF0 */
- cpu->gpr[8] = cpu->gpr[8] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xF0u;
+ PGXP_ALU(0x310800F0u, cpu->gpr[8], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80033868u);
#endif
@@ -202448,7 +202815,8 @@ label_BFC0DD6C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0DD74: 3042000F andi $v0, $v0, 0xF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80033874u);
#endif
@@ -202593,7 +202961,8 @@ label_BFC0DD8C:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC0DD94: 306300F0 andi $v1, $v1, 0xF0 */
- cpu->gpr[3] = cpu->gpr[3] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xF0u;
+ PGXP_ALU(0x306300F0u, cpu->gpr[3], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80033894u);
#endif
@@ -202686,7 +203055,8 @@ label_BFC0DDA8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0DDB0: 3042000F andi $v0, $v0, 0xF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800338B0u);
#endif
@@ -203030,7 +203400,8 @@ label_BFC0DDF0:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC0DDF4: 29020041 slti $v0, $t0, 65 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[8] < (65) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[8] < (65) ? 1 : 0);
+ PGXP_ALU(0x29020041u, cpu->gpr[2], _pgx1, 0x0041u); }
#ifdef PSX_COSIM
cosim_instr(0x800338F4u);
#endif
@@ -203213,7 +203584,8 @@ label_BFC0DE28:
psx_cyc_step(cpu, 0x208u);
#endif
/* 0xBFC0DE28: 31230001 andi $v1, $t1, 0x1 */
- cpu->gpr[3] = cpu->gpr[9] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] & 0x1u;
+ PGXP_ALU(0x31230001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80033928u);
#endif
@@ -203545,7 +203917,8 @@ label_BFC0DE70:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0DE74: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80033974u);
#endif
@@ -203553,7 +203926,8 @@ label_BFC0DE70:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0DE78: 2C43000E sltiu $v1, $v0, 14 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Eu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Eu ? 1 : 0);
+ PGXP_ALU(0x2C43000Eu, cpu->gpr[3], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0x80033978u);
#endif
@@ -204097,7 +204471,8 @@ label_BFC0DF00:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0DF08: 304200F0 andi $v0, $v0, 0xF0 */
- cpu->gpr[2] = cpu->gpr[2] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xF0u;
+ PGXP_ALU(0x304200F0u, cpu->gpr[2], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80033A08u);
#endif
@@ -204535,7 +204910,8 @@ label_BFC0DF68:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0DF70: 3042000F andi $v0, $v0, 0xF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80033A70u);
#endif
@@ -204653,7 +205029,8 @@ label_BFC0DF80:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0DF90: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80033A90u);
#endif
@@ -204661,7 +205038,8 @@ label_BFC0DF80:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0DF94: 2C420040 sltiu $v0, $v0, 64 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C420040u, cpu->gpr[2], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80033A94u);
#endif
@@ -205041,7 +205419,8 @@ label_BFC0DFDC:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC0DFE0: 2D020020 sltiu $v0, $t0, 32 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[8] < 0x00000020u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = (uint32_t)(cpu->gpr[8] < 0x00000020u ? 1 : 0);
+ PGXP_ALU(0x2D020020u, cpu->gpr[2], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x80033AE0u);
#endif
@@ -205265,7 +205644,8 @@ label_BFC0E004:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC0E014: 0043182B sltu $v1, $v0, $v1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033B14u);
#endif
@@ -205635,7 +206015,8 @@ label_BFC1E51C:
psx_cyc_step(cpu, 0x48u);
#endif
/* 0xBFC1E51C: 2CC30020 sltiu $v1, $a2, 32 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[6] < 0x00000020u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = (uint32_t)(cpu->gpr[6] < 0x00000020u ? 1 : 0);
+ PGXP_ALU(0x2CC30020u, cpu->gpr[3], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x00000548u);
#endif
@@ -205840,7 +206221,8 @@ label_BFC1E540:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC1E554: 30830003 andi $v1, $a0, 0x3 */
- cpu->gpr[3] = cpu->gpr[4] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x3u;
+ PGXP_ALU(0x30830003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00000580u);
#endif
@@ -205920,7 +206302,8 @@ label_BFC1E540:
psx_cyc_step(cpu, 0x240u);
#endif
/* 0xBFC1E578: 30C900FF andi $t1, $a2, 0xFF */
- cpu->gpr[9] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30C900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x000005A4u);
#endif
@@ -208316,7 +208699,8 @@ label_BFC1E848:
psx_cyc_step(cpu, 0x90u);
#endif
/* 0xBFC1E848: 00872024 and $a0, $a0, $a3 */
- cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[7];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[7];
+ PGXP_ALU(0x00872024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00000874u);
#endif
@@ -209070,7 +209454,8 @@ label_BFC1E94C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1E958: 30420008 andi $v0, $v0, 0x8 */
- cpu->gpr[2] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30420008u, cpu->gpr[2], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x00000984u);
#endif
@@ -209131,7 +209516,8 @@ label_BFC1E964:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1E96C: 30420008 andi $v0, $v0, 0x8 */
- cpu->gpr[2] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30420008u, cpu->gpr[2], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x00000998u);
#endif
@@ -209209,7 +209595,8 @@ label_BFC1E978:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1E984: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000009B0u);
#endif
@@ -210003,7 +210390,8 @@ label_BFC1EA60:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1EA6C: 30420004 andi $v0, $v0, 0x4 */
- cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00000A98u);
#endif
@@ -210067,7 +210455,8 @@ label_BFC1EA78:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1EA80: 30420004 andi $v0, $v0, 0x4 */
- cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00000AACu);
#endif
@@ -210174,7 +210563,8 @@ label_BFC1EA8C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC1EAA4: 30840007 andi $a0, $a0, 0x7 */
- cpu->gpr[4] = cpu->gpr[4] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x7u;
+ PGXP_ALU(0x30840007u, cpu->gpr[4], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x00000AD0u);
#endif
@@ -210318,7 +210708,8 @@ label_BFC1EACC:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC1EAD4: 30630018 andi $v1, $v1, 0x18 */
- cpu->gpr[3] = cpu->gpr[3] & 0x18u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x18u;
+ PGXP_ALU(0x30630018u, cpu->gpr[3], _pgx1, 0x0018u); }
#ifdef PSX_COSIM
cosim_instr(0x00000B00u);
#endif
@@ -210401,7 +210792,8 @@ label_BFC1EAE0:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC1EAF0: 30630018 andi $v1, $v1, 0x18 */
- cpu->gpr[3] = cpu->gpr[3] & 0x18u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x18u;
+ PGXP_ALU(0x30630018u, cpu->gpr[3], _pgx1, 0x0018u); }
#ifdef PSX_COSIM
cosim_instr(0x00000B1Cu);
#endif
@@ -210496,7 +210888,8 @@ label_BFC1EB0C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1EB14: 30420007 andi $v0, $v0, 0x7 */
- cpu->gpr[2] = cpu->gpr[2] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7u;
+ PGXP_ALU(0x30420007u, cpu->gpr[2], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x00000B40u);
#endif
@@ -210513,7 +210906,8 @@ label_BFC1EB0C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1EB1C: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00000B48u);
#endif
@@ -210521,7 +210915,8 @@ label_BFC1EB0C:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1EB20: 2C430005 sltiu $v1, $v0, 5 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000005u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000005u ? 1 : 0);
+ PGXP_ALU(0x2C430005u, cpu->gpr[3], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0x00000B4Cu);
#endif
@@ -210770,7 +211165,8 @@ label_BFC1EB50:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC1EB68: 2C4400F7 sltiu $a0, $v0, 247 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x000000F7u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x000000F7u ? 1 : 0);
+ PGXP_ALU(0x2C4400F7u, cpu->gpr[4], _pgx1, 0x00F7u); }
#ifdef PSX_COSIM
cosim_instr(0x00000B94u);
#endif
@@ -210966,7 +211362,8 @@ label_BFC1EB88:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC1EB94: 2C4400EC sltiu $a0, $v0, 236 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x000000ECu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x000000ECu ? 1 : 0);
+ PGXP_ALU(0x2C4400ECu, cpu->gpr[4], _pgx1, 0x00ECu); }
#ifdef PSX_COSIM
cosim_instr(0x00000BC0u);
#endif
@@ -211005,7 +211402,8 @@ label_BFC1EB98:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC1EB9C: 2C440006 sltiu $a0, $v0, 6 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x00000006u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x00000006u ? 1 : 0);
+ PGXP_ALU(0x2C440006u, cpu->gpr[4], _pgx1, 0x0006u); }
#ifdef PSX_COSIM
cosim_instr(0x00000BC8u);
#endif
@@ -211079,7 +211477,8 @@ label_BFC1EBA8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1EBA8: 2C420003 sltiu $v0, $v0, 3 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2C420003u, cpu->gpr[2], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00000BD4u);
#endif
@@ -212280,7 +212679,8 @@ label_BFC1ECA0:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC1ECAC: 2C45001B sltiu $a1, $v0, 27 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x0000001Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x0000001Bu ? 1 : 0);
+ PGXP_ALU(0x2C45001Bu, cpu->gpr[5], _pgx1, 0x001Bu); }
#ifdef PSX_COSIM
cosim_instr(0x00000CD8u);
#endif
@@ -212394,7 +212794,8 @@ label_BFC1ECC0:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC1ECC0: 2C440013 sltiu $a0, $v0, 19 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x00000013u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x00000013u ? 1 : 0);
+ PGXP_ALU(0x2C440013u, cpu->gpr[4], _pgx1, 0x0013u); }
#ifdef PSX_COSIM
cosim_instr(0x00000CECu);
#endif
@@ -212463,7 +212864,8 @@ label_BFC1ECD0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1ECD0: 2C420002 sltiu $v0, $v0, 2 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00000CFCu);
#endif
@@ -212947,7 +213349,8 @@ label_BFC1ED24:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1ED2C: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00000D58u);
#endif
@@ -213117,7 +213520,8 @@ label_BFC1ED54:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC1ED60: 2C4500E7 sltiu $a1, $v0, 231 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x000000E7u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x000000E7u ? 1 : 0);
+ PGXP_ALU(0x2C4500E7u, cpu->gpr[5], _pgx1, 0x00E7u); }
#ifdef PSX_COSIM
cosim_instr(0x00000D8Cu);
#endif
@@ -213197,7 +213601,8 @@ label_BFC1ED6C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1ED70: 2C420003 sltiu $v0, $v0, 3 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2C420003u, cpu->gpr[2], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00000D9Cu);
#endif
@@ -213691,7 +214096,8 @@ label_BFC1EDE0:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC1EDE0: 2C46001A sltiu $a2, $v0, 26 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < 0x0000001Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < 0x0000001Au ? 1 : 0);
+ PGXP_ALU(0x2C46001Au, cpu->gpr[6], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0x00000E0Cu);
#endif
@@ -213798,7 +214204,8 @@ label_BFC1EDF8:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC1EDFC: 2C440019 sltiu $a0, $v0, 25 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x00000019u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x00000019u ? 1 : 0);
+ PGXP_ALU(0x2C440019u, cpu->gpr[4], _pgx1, 0x0019u); }
#ifdef PSX_COSIM
cosim_instr(0x00000E28u);
#endif
@@ -214109,7 +214516,8 @@ label_BFC1EE64:
psx_cyc_step(cpu, 0x60u);
#endif
/* 0xBFC1EE74: 00A63024 and $a2, $a1, $a2 */
- cpu->gpr[6] = cpu->gpr[5] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[5] & cpu->gpr[6];
+ PGXP_ALU(0x00A63024u, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00000EA0u);
#endif
@@ -214169,7 +214577,8 @@ label_BFC1EE80:
psx_cyc_step(cpu, 0x60u);
#endif
/* 0xBFC1EE84: 00A62824 and $a1, $a1, $a2 */
- cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[6];
+ PGXP_ALU(0x00A62824u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00000EB0u);
#endif
@@ -214299,7 +214708,8 @@ label_BFC1EEA0:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC1EEA0: 2C4500FF sltiu $a1, $v0, 255 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x000000FFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x000000FFu ? 1 : 0);
+ PGXP_ALU(0x2C4500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00000ECCu);
#endif
@@ -214317,7 +214727,8 @@ label_BFC1EEA0:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC1EEA8: 2C4500E6 sltiu $a1, $v0, 230 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x000000E6u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x000000E6u ? 1 : 0);
+ PGXP_ALU(0x2C4500E6u, cpu->gpr[5], _pgx1, 0x00E6u); }
#ifdef PSX_COSIM
cosim_instr(0x00000ED4u);
#endif
@@ -215179,7 +215590,8 @@ label_BFC1EF34:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC1EF68: 00A2282B sltu $a1, $a1, $v0 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x00A2282Bu, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00000F94u);
#endif
@@ -215240,7 +215652,8 @@ label_BFC1EF74:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC1EF7C: 30A50010 andi $a1, $a1, 0x10 */
- cpu->gpr[5] = cpu->gpr[5] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x10u;
+ PGXP_ALU(0x30A50010u, cpu->gpr[5], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00000FA8u);
#endif
@@ -215801,7 +216214,8 @@ label_BFC1EFF4:
psx_cyc_step(cpu, 0x90u);
#endif
/* 0xBFC1EFF8: 30E4000F andi $a0, $a3, 0xF */
- cpu->gpr[4] = cpu->gpr[7] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[7] & 0xFu;
+ PGXP_ALU(0x30E4000Fu, cpu->gpr[4], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00001024u);
#endif
@@ -215937,7 +216351,8 @@ label_BFC1F014:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC1F018: 30C6000F andi $a2, $a2, 0xF */
- cpu->gpr[6] = cpu->gpr[6] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFu;
+ PGXP_ALU(0x30C6000Fu, cpu->gpr[6], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00001044u);
#endif
@@ -216055,7 +216470,8 @@ label_BFC1F034:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC1F034: 30840010 andi $a0, $a0, 0x10 */
- cpu->gpr[4] = cpu->gpr[4] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x10u;
+ PGXP_ALU(0x30840010u, cpu->gpr[4], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00001060u);
#endif
@@ -216465,7 +216881,8 @@ label_BFC1F098:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F0A8: 30420100 andi $v0, $v0, 0x100 */
- cpu->gpr[2] = cpu->gpr[2] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x100u;
+ PGXP_ALU(0x30420100u, cpu->gpr[2], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x000010D4u);
#endif
@@ -217519,7 +217936,8 @@ label_BFC1F19C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F1A0: 2C420003 sltiu $v0, $v0, 3 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2C420003u, cpu->gpr[2], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x000011CCu);
#endif
@@ -218792,7 +219210,8 @@ label_BFC1F2E8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F2F0: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x0000131Cu);
#endif
@@ -219850,7 +220269,8 @@ label_BFC1F410:
psx_cyc_step(cpu, 0x48u);
#endif
/* 0xBFC1F418: 30C30010 andi $v1, $a2, 0x10 */
- cpu->gpr[3] = cpu->gpr[6] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] & 0x10u;
+ PGXP_ALU(0x30C30010u, cpu->gpr[3], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00001444u);
#endif
@@ -219907,7 +220327,8 @@ label_BFC1F428:
psx_cyc_step(cpu, 0x48u);
#endif
/* 0xBFC1F428: 30C30020 andi $v1, $a2, 0x20 */
- cpu->gpr[3] = cpu->gpr[6] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] & 0x20u;
+ PGXP_ALU(0x30C30020u, cpu->gpr[3], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x00001454u);
#endif
@@ -220117,7 +220538,8 @@ label_BFC1F438:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC1F474: 30630010 andi $v1, $v1, 0x10 */
- cpu->gpr[3] = cpu->gpr[3] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x10u;
+ PGXP_ALU(0x30630010u, cpu->gpr[3], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x000014A0u);
#endif
@@ -220527,7 +220949,8 @@ label_BFC1F4D4:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC1F4EC: 30630010 andi $v1, $v1, 0x10 */
- cpu->gpr[3] = cpu->gpr[3] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x10u;
+ PGXP_ALU(0x30630010u, cpu->gpr[3], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00001518u);
#endif
@@ -221057,7 +221480,8 @@ label_BFC1F568:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC1F594: 00461024 and $v0, $v0, $a2 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ PGXP_ALU(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000015C0u);
#endif
@@ -221092,7 +221516,8 @@ label_BFC1F568:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F5A4: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000015D0u);
#endif
@@ -221126,7 +221551,8 @@ label_BFC1F568:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC1F5B4: 00461024 and $v0, $v0, $a2 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ PGXP_ALU(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000015E0u);
#endif
@@ -221160,7 +221586,8 @@ label_BFC1F568:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F5C4: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000015F0u);
#endif
@@ -221282,7 +221709,8 @@ label_BFC1F568:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F5F8: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001624u);
#endif
@@ -221470,7 +221898,8 @@ label_BFC1F634:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC1F63C: 00461024 and $v0, $v0, $a2 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[6];
+ PGXP_ALU(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001668u);
#endif
@@ -221957,7 +222386,8 @@ label_BFC1F6B8:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F6D4: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001700u);
#endif
@@ -221965,7 +222395,8 @@ label_BFC1F6B8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F6D8: 30420004 andi $v0, $v0, 0x4 */
- cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00001704u);
#endif
@@ -222136,7 +222567,8 @@ label_BFC1F704:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F70C: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001738u);
#endif
@@ -222205,7 +222637,8 @@ label_BFC1F718:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F724: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001750u);
#endif
@@ -222213,7 +222646,8 @@ label_BFC1F718:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F728: 30420200 andi $v0, $v0, 0x200 */
- cpu->gpr[2] = cpu->gpr[2] & 0x200u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x200u;
+ PGXP_ALU(0x30420200u, cpu->gpr[2], _pgx1, 0x0200u); }
#ifdef PSX_COSIM
cosim_instr(0x00001754u);
#endif
@@ -222384,7 +222818,8 @@ label_BFC1F754:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F75C: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001788u);
#endif
@@ -222443,7 +222878,8 @@ label_BFC1F764:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F774: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000017A0u);
#endif
@@ -222451,7 +222887,8 @@ label_BFC1F764:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F778: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x000017A4u);
#endif
@@ -222622,7 +223059,8 @@ label_BFC1F7A4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F7AC: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000017D8u);
#endif
@@ -222691,7 +223129,8 @@ label_BFC1F7B8:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F7C4: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000017F0u);
#endif
@@ -222699,7 +223138,8 @@ label_BFC1F7B8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F7C8: 30420400 andi $v0, $v0, 0x400 */
- cpu->gpr[2] = cpu->gpr[2] & 0x400u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x400u;
+ PGXP_ALU(0x30420400u, cpu->gpr[2], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x000017F4u);
#endif
@@ -223021,7 +223461,8 @@ label_BFC1F7F4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F7FC: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001828u);
#endif
@@ -223159,7 +223600,8 @@ label_BFC1F814:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F814: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001840u);
#endif
@@ -223190,7 +223632,8 @@ label_BFC1F818:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F818: 30420100 andi $v0, $v0, 0x100 */
- cpu->gpr[2] = cpu->gpr[2] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x100u;
+ PGXP_ALU(0x30420100u, cpu->gpr[2], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x00001844u);
#endif
@@ -223466,7 +223909,8 @@ label_BFC1F84C:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F84C: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001878u);
#endif
@@ -223613,7 +224057,8 @@ label_BFC1F858:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F864: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001890u);
#endif
@@ -223621,7 +224066,8 @@ label_BFC1F858:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F868: 30420001 andi $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00001894u);
#endif
@@ -223792,7 +224238,8 @@ label_BFC1F894:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F89C: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000018C8u);
#endif
@@ -223851,7 +224298,8 @@ label_BFC1F8A4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F8B4: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000018E0u);
#endif
@@ -223859,7 +224307,8 @@ label_BFC1F8A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F8B8: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x000018E4u);
#endif
@@ -224030,7 +224479,8 @@ label_BFC1F8E4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F8EC: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001918u);
#endif
@@ -224099,7 +224549,8 @@ label_BFC1F8F8:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F904: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001930u);
#endif
@@ -224107,7 +224558,8 @@ label_BFC1F8F8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F908: 30420020 andi $v0, $v0, 0x20 */
- cpu->gpr[2] = cpu->gpr[2] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x20u;
+ PGXP_ALU(0x30420020u, cpu->gpr[2], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x00001934u);
#endif
@@ -224278,7 +224730,8 @@ label_BFC1F934:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F93C: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001968u);
#endif
@@ -224337,7 +224790,8 @@ label_BFC1F944:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F954: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001980u);
#endif
@@ -224345,7 +224799,8 @@ label_BFC1F944:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F958: 30420040 andi $v0, $v0, 0x40 */
- cpu->gpr[2] = cpu->gpr[2] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x40u;
+ PGXP_ALU(0x30420040u, cpu->gpr[2], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x00001984u);
#endif
@@ -224516,7 +224971,8 @@ label_BFC1F984:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F98C: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000019B8u);
#endif
@@ -224585,7 +225041,8 @@ label_BFC1F998:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F9A4: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000019D0u);
#endif
@@ -224593,7 +225050,8 @@ label_BFC1F998:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F9A8: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000019D4u);
#endif
@@ -224764,7 +225222,8 @@ label_BFC1F9D4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F9DC: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001A08u);
#endif
@@ -224823,7 +225282,8 @@ label_BFC1F9E4:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1F9F4: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001A20u);
#endif
@@ -224831,7 +225291,8 @@ label_BFC1F9E4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1F9F8: 30420008 andi $v0, $v0, 0x8 */
- cpu->gpr[2] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30420008u, cpu->gpr[2], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x00001A24u);
#endif
@@ -225002,7 +225463,8 @@ label_BFC1FA24:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC1FA2C: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001A58u);
#endif
@@ -225137,7 +225599,8 @@ label_BFC1FA48:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1FA54: 30420001 andi $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00001A80u);
#endif
@@ -225201,7 +225664,8 @@ label_BFC1FA60:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1FA68: 30420001 andi $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00001A94u);
#endif
@@ -225446,7 +225910,8 @@ label_BFC1FAA0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1FAAC: 30420040 andi $v0, $v0, 0x40 */
- cpu->gpr[2] = cpu->gpr[2] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x40u;
+ PGXP_ALU(0x30420040u, cpu->gpr[2], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x00001AD8u);
#endif
@@ -225510,7 +225975,8 @@ label_BFC1FAB8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1FAC0: 30420040 andi $v0, $v0, 0x40 */
- cpu->gpr[2] = cpu->gpr[2] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x40u;
+ PGXP_ALU(0x30420040u, cpu->gpr[2], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x00001AECu);
#endif
@@ -225761,7 +226227,8 @@ label_BFC1FAF8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1FB04: 30420020 andi $v0, $v0, 0x20 */
- cpu->gpr[2] = cpu->gpr[2] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x20u;
+ PGXP_ALU(0x30420020u, cpu->gpr[2], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x00001B30u);
#endif
@@ -225825,7 +226292,8 @@ label_BFC1FB10:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1FB18: 30420020 andi $v0, $v0, 0x20 */
- cpu->gpr[2] = cpu->gpr[2] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x20u;
+ PGXP_ALU(0x30420020u, cpu->gpr[2], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x00001B44u);
#endif
@@ -226070,7 +226538,8 @@ label_BFC1FB50:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1FB5C: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00001B88u);
#endif
@@ -226134,7 +226603,8 @@ label_BFC1FB68:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1FB70: 30420010 andi $v0, $v0, 0x10 */
- cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00001B9Cu);
#endif
@@ -227657,7 +228127,8 @@ label_BFC1FCB4:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC1FCD8: 00451024 and $v0, $v0, $a1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5];
+ PGXP_ALU(0x00451024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001D04u);
#endif
@@ -228112,7 +228583,8 @@ label_BFC1FD74:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC1FD74: 2C830003 sltiu $v1, $a0, 3 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2C830003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00001DA0u);
#endif
@@ -228264,7 +228736,8 @@ label_BFC1FD98:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC1FD98: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001DC4u);
#endif
@@ -228272,7 +228745,8 @@ label_BFC1FD98:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC1FD9C: 2C830003 sltiu $v1, $a0, 3 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2C830003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00001DC8u);
#endif
@@ -228362,7 +228836,8 @@ label_BFC1FDA8:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC1FDB8: 30C20010 andi $v0, $a2, 0x10 */
- cpu->gpr[2] = cpu->gpr[6] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] & 0x10u;
+ PGXP_ALU(0x30C20010u, cpu->gpr[2], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00001DE4u);
#endif
@@ -228370,7 +228845,8 @@ label_BFC1FDA8:
psx_cyc_step(cpu, 0x48u);
#endif
/* 0xBFC1FDBC: 30C30001 andi $v1, $a2, 0x1 */
- cpu->gpr[3] = cpu->gpr[6] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] & 0x1u;
+ PGXP_ALU(0x30C30001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00001DE8u);
#endif
@@ -228378,7 +228854,8 @@ label_BFC1FDA8:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC1FDC0: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001DECu);
#endif
@@ -228407,7 +228884,8 @@ label_BFC1FDA8:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC1FDCC: 30C61000 andi $a2, $a2, 0x1000 */
- cpu->gpr[6] = cpu->gpr[6] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1000u;
+ PGXP_ALU(0x30C61000u, cpu->gpr[6], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x00001DF8u);
#endif
@@ -228574,7 +229052,8 @@ label_BFC1FDF8:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC1FDF8: 3082FFFF andi $v0, $a0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3082FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001E24u);
#endif
@@ -228645,7 +229124,8 @@ label_BFC1FDF8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1FE18: 2C420003 sltiu $v0, $v0, 3 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2C420003u, cpu->gpr[2], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00001E44u);
#endif
@@ -228714,7 +229194,8 @@ label_BFC1FE2C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC1FE2C: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001E58u);
#endif
@@ -228785,7 +229266,8 @@ label_BFC1FE2C:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC1FE4C: 00021027 nor $v0, $zero, $v0 */
- cpu->gpr[2] = ~(cpu->gpr[0] | cpu->gpr[2]);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = ~(cpu->gpr[0] | cpu->gpr[2]);
+ PGXP_ALU(0x00021027u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001E78u);
#endif
@@ -228793,7 +229275,8 @@ label_BFC1FE2C:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC1FE50: 00451024 and $v0, $v0, $a1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5];
+ PGXP_ALU(0x00451024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001E7Cu);
#endif
@@ -228865,7 +229348,8 @@ label_BFC1FE60:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC1FE60: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001E8Cu);
#endif
@@ -228876,7 +229360,8 @@ label_BFC1FE60:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC1FE64: 2C830003 sltiu $v1, $a0, 3 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2C830003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00001E90u);
#endif
@@ -229792,7 +230277,8 @@ label_BFC1FF40:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC1FF5C: 3063003C andi $v1, $v1, 0x3C */
- cpu->gpr[3] = cpu->gpr[3] & 0x3Cu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x3Cu;
+ PGXP_ALU(0x3063003Cu, cpu->gpr[3], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x00001F88u);
#endif
@@ -229963,7 +230449,8 @@ label_BFC1FF78:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC1FF94: 2C650003 sltiu $a1, $v1, 3 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[3] < 0x00000003u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)(cpu->gpr[3] < 0x00000003u ? 1 : 0);
+ PGXP_ALU(0x2C650003u, cpu->gpr[5], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00001FC0u);
#endif
@@ -230306,7 +230793,8 @@ label_BFC1FFD8:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC1FFD8: 30830404 andi $v1, $a0, 0x404 */
- cpu->gpr[3] = cpu->gpr[4] & 0x404u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x404u;
+ PGXP_ALU(0x30830404u, cpu->gpr[3], _pgx1, 0x0404u); }
#ifdef PSX_COSIM
cosim_instr(0x00002004u);
#endif
@@ -230337,7 +230825,8 @@ label_BFC1FFDC:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC1FFDC: 38630404 xori $v1, $v1, 0x404 */
- cpu->gpr[3] = cpu->gpr[3] ^ 0x404u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] ^ 0x404u;
+ PGXP_ALU(0x38630404u, cpu->gpr[3], _pgx1, 0x0404u); }
#ifdef PSX_COSIM
cosim_instr(0x00002008u);
#endif
@@ -230368,7 +230857,8 @@ label_BFC1FFE0:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC1FFE0: 2C630001 sltiu $v1, $v1, 1 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C630001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x0000200Cu);
#endif
@@ -230442,7 +230932,8 @@ label_BFC1FFE8:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC1FFEC: 00832024 and $a0, $a0, $v1 */
- cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[3];
+ PGXP_ALU(0x00832024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002018u);
#endif
@@ -231204,7 +231695,8 @@ label_BFC20070:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC20078: 00822024 and $a0, $a0, $v0 */
- cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[2];
+ PGXP_ALU(0x00822024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000020A4u);
#endif
@@ -231670,7 +232162,8 @@ label_BFC200E8:
psx_cyc_step(cpu, 0x510u);
#endif
/* 0xBFC200F0: 0104502B sltu $t2, $t0, $a0 */
- cpu->gpr[10] = (uint32_t)(cpu->gpr[8] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = (uint32_t)(cpu->gpr[8] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0104502Bu, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000211Cu);
#endif
@@ -231773,7 +232266,8 @@ label_BFC20104:
psx_cyc_step(cpu, 0x500u);
#endif
/* 0xBFC2010C: 010A502B sltu $t2, $t0, $t2 */
- cpu->gpr[10] = (uint32_t)(cpu->gpr[8] < cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)(cpu->gpr[8] < cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x010A502Bu, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002138u);
#endif
@@ -232691,7 +233185,8 @@ label_BFC201D4:
psx_cyc_step(cpu, 0x10Cu);
#endif
/* 0xBFC201D8: 0062402B sltu $t0, $v1, $v0 */
- cpu->gpr[8] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[8] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062402Bu, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002204u);
#endif
@@ -233438,7 +233933,8 @@ label_BFC202A4:
psx_cyc_step(cpu, 0x10Cu);
#endif
/* 0xBFC202B4: 0062402B sltu $t0, $v1, $v0 */
- cpu->gpr[8] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[8] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062402Bu, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000022E0u);
#endif
@@ -234016,7 +234512,8 @@ label_BFC20318:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC20324: 00C23024 and $a2, $a2, $v0 */
- cpu->gpr[6] = cpu->gpr[6] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[6] & cpu->gpr[2];
+ PGXP_ALU(0x00C23024u, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002350u);
#endif
@@ -234189,7 +234686,8 @@ label_BFC20350:
psx_cyc_step(cpu, 0x848u);
#endif
/* 0xBFC20350: 00CB182B sltu $v1, $a2, $t3 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x00CB182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000237Cu);
#endif
@@ -234418,7 +234916,8 @@ label_BFC20388:
psx_cyc_step(cpu, 0x114u);
#endif
/* 0xBFC20388: 0048202B sltu $a0, $v0, $t0 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0048202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000023B4u);
#endif
@@ -234466,7 +234965,8 @@ label_BFC20394:
psx_cyc_step(cpu, 0x850u);
#endif
/* 0xBFC20394: 00CB202B sltu $a0, $a2, $t3 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x00CB202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000023C0u);
#endif
@@ -234743,7 +235243,8 @@ label_BFC203D4:
psx_cyc_step(cpu, 0x218u);
#endif
/* 0xBFC203DC: 0124182B sltu $v1, $t1, $a0 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[9] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[9] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0124182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002408u);
#endif
@@ -235239,7 +235740,8 @@ label_BFC20448:
psx_cyc_step(cpu, 0x114u);
#endif
/* 0xBFC20454: 0048202B sltu $a0, $v0, $t0 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0048202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002480u);
#endif
@@ -235271,7 +235773,8 @@ label_BFC20458:
psx_cyc_step(cpu, 0x850u);
#endif
/* 0xBFC20458: 00CB202B sltu $a0, $a2, $t3 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x00CB202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002484u);
#endif
@@ -235551,7 +236054,8 @@ label_BFC2049C:
psx_cyc_step(cpu, 0x850u);
#endif
/* 0xBFC2049C: 00CB202B sltu $a0, $a2, $t3 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x00CB202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000024C8u);
#endif
@@ -235990,7 +236494,8 @@ label_BFC20500:
psx_cyc_step(cpu, 0x218u);
#endif
/* 0xBFC20508: 0124182B sltu $v1, $t1, $a0 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[9] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[9] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0124182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002534u);
#endif
@@ -236415,7 +236920,8 @@ label_BFC2056C:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC20574: 00832024 and $a0, $a0, $v1 */
- cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[3];
+ PGXP_ALU(0x00832024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000025A0u);
#endif
@@ -236471,7 +236977,8 @@ label_BFC2056C:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC2058C: 00A32824 and $a1, $a1, $v1 */
- cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[3];
+ PGXP_ALU(0x00A32824u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000025B8u);
#endif
@@ -236673,7 +237180,8 @@ label_BFC205B4:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC205BC: 00832024 and $a0, $a0, $v1 */
- cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[3];
+ PGXP_ALU(0x00832024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000025E8u);
#endif
@@ -236732,7 +237240,8 @@ label_BFC205B4:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC205D4: 00A32824 and $a1, $a1, $v1 */
- cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[3];
+ PGXP_ALU(0x00A32824u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002600u);
#endif
@@ -236937,7 +237446,8 @@ label_BFC20610:
psx_cyc_step(cpu, 0x30004u);
#endif
/* 0xBFC20610: 0211102B sltu $v0, $s0, $s1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0211102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000263Cu);
#endif
@@ -237626,7 +238136,8 @@ label_BFC206D0:
psx_cyc_step(cpu, 0x4Cu);
#endif
/* 0xBFC206D0: 0043302B sltu $a2, $v0, $v1 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043302Bu, cpu->gpr[6], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000026FCu);
#endif
@@ -238832,7 +239343,8 @@ label_BFC207C0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC207C0: 3042003C andi $v0, $v0, 0x3C */
- cpu->gpr[2] = cpu->gpr[2] & 0x3Cu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x3Cu;
+ PGXP_ALU(0x3042003Cu, cpu->gpr[2], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x000027ECu);
#endif
@@ -238908,7 +239420,8 @@ label_BFC207CC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC207D8: 304200FE andi $v0, $v0, 0xFE */
- cpu->gpr[2] = cpu->gpr[2] & 0xFEu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFEu;
+ PGXP_ALU(0x304200FEu, cpu->gpr[2], _pgx1, 0x00FEu); }
#ifdef PSX_COSIM
cosim_instr(0x00002804u);
#endif
@@ -241496,7 +242009,8 @@ label_BFC20B30:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC20B54: 2C65000D sltiu $a1, $v1, 13 */
- cpu->gpr[5] = (uint32_t)(cpu->gpr[3] < 0x0000000Du ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)(cpu->gpr[3] < 0x0000000Du ? 1 : 0);
+ PGXP_ALU(0x2C65000Du, cpu->gpr[5], _pgx1, 0x000Du); }
#ifdef PSX_COSIM
cosim_instr(0x00002B80u);
#endif
@@ -241643,7 +242157,8 @@ label_BFC20B80:
psx_cyc_step(cpu, 0x11u);
#endif
/* 0xBFC20B80: 0004202B sltu $a0, $zero, $a0 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0004202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002BACu);
#endif
@@ -241753,7 +242268,8 @@ label_BFC20B80:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC20BB0: 3063000F andi $v1, $v1, 0xF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00002BDCu);
#endif
@@ -242272,7 +242788,8 @@ label_BFC20C5C:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC20C5C: 30A30008 andi $v1, $a1, 0x8 */
- cpu->gpr[3] = cpu->gpr[5] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] & 0x8u;
+ PGXP_ALU(0x30A30008u, cpu->gpr[3], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x00002C88u);
#endif
@@ -242655,7 +243172,8 @@ label_BFC20CCC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC20CDC: 3842005A xori $v0, $v0, 0x5A */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x5Au;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Au;
+ PGXP_ALU(0x3842005Au, cpu->gpr[2], _pgx1, 0x005Au); }
#ifdef PSX_COSIM
cosim_instr(0x00002D08u);
#endif
@@ -242714,7 +243232,8 @@ label_BFC20CCC:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC20CF4: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002D20u);
#endif
@@ -242837,7 +243356,8 @@ label_BFC20D10:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC20D14: 3842005D xori $v0, $v0, 0x5D */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x5Du;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Du;
+ PGXP_ALU(0x3842005Du, cpu->gpr[2], _pgx1, 0x005Du); }
#ifdef PSX_COSIM
cosim_instr(0x00002D40u);
#endif
@@ -242900,7 +243420,8 @@ label_BFC20D10:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC20D30: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002D5Cu);
#endif
@@ -243142,7 +243663,8 @@ label_BFC20D5C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC20D6C: 3842005C xori $v0, $v0, 0x5C */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x5Cu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Cu;
+ PGXP_ALU(0x3842005Cu, cpu->gpr[2], _pgx1, 0x005Cu); }
#ifdef PSX_COSIM
cosim_instr(0x00002D98u);
#endif
@@ -243208,7 +243730,8 @@ label_BFC20D5C:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC20D88: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002DB4u);
#endif
@@ -243454,7 +243977,8 @@ label_BFC20DA0:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC20DD0: 00A22826 xor $a1, $a1, $v0 */
- cpu->gpr[5] = cpu->gpr[5] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] ^ cpu->gpr[2];
+ PGXP_ALU(0x00A22826u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002DFCu);
#endif
@@ -243534,7 +244058,8 @@ label_BFC20DD4:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC20DE8: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00002E14u);
#endif
@@ -243697,7 +244222,8 @@ label_BFC20DFC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC20E1C: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00002E48u);
#endif
@@ -244044,7 +244570,8 @@ label_BFC20E48:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC20E98: 00641826 xor $v1, $v1, $a0 */
- cpu->gpr[3] = cpu->gpr[3] ^ cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] ^ cpu->gpr[4];
+ PGXP_ALU(0x00641826u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002EC4u);
#endif
@@ -244313,7 +244840,8 @@ label_BFC20EE8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC20EF0: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00002F1Cu);
#endif
@@ -244574,7 +245102,8 @@ label_BFC20F18:
psx_cyc_step(cpu, 0x48u);
#endif
/* 0xBFC20F3C: 2C66000A sltiu $a2, $v1, 10 */
- cpu->gpr[6] = (uint32_t)(cpu->gpr[3] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[3] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2C66000Au, cpu->gpr[6], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x00002F68u);
#endif
@@ -244736,7 +245265,8 @@ label_BFC20F70:
psx_cyc_step(cpu, 0x11u);
#endif
/* 0xBFC20F70: 0004202B sltu $a0, $zero, $a0 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0004202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002F9Cu);
#endif
@@ -244846,7 +245376,8 @@ label_BFC20F70:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC20FA0: 3063000F andi $v1, $v1, 0xF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00002FCCu);
#endif
@@ -245682,7 +246213,8 @@ label_BFC2104C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC21064: 30A50008 andi $a1, $a1, 0x8 */
- cpu->gpr[5] = cpu->gpr[5] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x8u;
+ PGXP_ALU(0x30A50008u, cpu->gpr[5], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x00003090u);
#endif
@@ -246066,7 +246598,8 @@ label_BFC210C0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC210D0: 3842005A xori $v0, $v0, 0x5A */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x5Au;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Au;
+ PGXP_ALU(0x3842005Au, cpu->gpr[2], _pgx1, 0x005Au); }
#ifdef PSX_COSIM
cosim_instr(0x000030FCu);
#endif
@@ -246125,7 +246658,8 @@ label_BFC210C0:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC210E8: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003114u);
#endif
@@ -246487,7 +247021,8 @@ label_BFC2113C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2114C: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00003178u);
#endif
@@ -246590,7 +247125,8 @@ label_BFC2113C:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC21178: 00821026 xor $v0, $a0, $v0 */
- cpu->gpr[2] = cpu->gpr[4] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] ^ cpu->gpr[2];
+ PGXP_ALU(0x00821026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000031A4u);
#endif
@@ -246923,7 +247459,8 @@ label_BFC211CC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC211DC: 3842005C xori $v0, $v0, 0x5C */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x5Cu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Cu;
+ PGXP_ALU(0x3842005Cu, cpu->gpr[2], _pgx1, 0x005Cu); }
#ifdef PSX_COSIM
cosim_instr(0x00003208u);
#endif
@@ -246989,7 +247526,8 @@ label_BFC211CC:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC211F8: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003224u);
#endif
@@ -247223,7 +247761,8 @@ label_BFC21230:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21238: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00003264u);
#endif
@@ -247360,7 +247899,8 @@ label_BFC21254:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21264: 30420004 andi $v0, $v0, 0x4 */
- cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00003290u);
#endif
@@ -247892,7 +248432,8 @@ label_BFC212E0:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC212F8: 28440004 slti $a0, $v0, 4 */
- cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] < (4) ? 1 : 0);
+ PGXP_ALU(0x28440004u, cpu->gpr[4], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00003324u);
#endif
@@ -248383,7 +248924,8 @@ label_BFC2137C:
psx_cyc_step(cpu, 0x19u);
#endif
/* 0xBFC2137C: 0003202B sltu $a0, $zero, $v1 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0003202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000033A8u);
#endif
@@ -248493,7 +249035,8 @@ label_BFC2137C:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC213AC: 3063000F andi $v1, $v1, 0xF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu;
+ PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x000033D8u);
#endif
@@ -248933,7 +249476,8 @@ label_BFC21450:
psx_cyc_step(cpu, 0x30u);
#endif
/* 0xBFC21450: 3085000C andi $a1, $a0, 0xC */
- cpu->gpr[5] = cpu->gpr[4] & 0xCu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[4] & 0xCu;
+ PGXP_ALU(0x3085000Cu, cpu->gpr[5], _pgx1, 0x000Cu); }
#ifdef PSX_COSIM
cosim_instr(0x0000347Cu);
#endif
@@ -249067,7 +249611,8 @@ label_BFC2145C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC21480: 30840004 andi $a0, $a0, 0x4 */
- cpu->gpr[4] = cpu->gpr[4] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x4u;
+ PGXP_ALU(0x30840004u, cpu->gpr[4], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x000034ACu);
#endif
@@ -249571,7 +250116,8 @@ label_BFC21504:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC2150C: 30430001 andi $v1, $v0, 0x1 */
- cpu->gpr[3] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30430001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00003538u);
#endif
@@ -249833,7 +250379,8 @@ label_BFC2153C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21544: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00003570u);
#endif
@@ -249956,7 +250503,8 @@ label_BFC21558:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21558: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00003584u);
#endif
@@ -250279,7 +250827,8 @@ label_BFC21588:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC215C4: 00220826 xor $at, $at, $v0 */
- cpu->gpr[1] = cpu->gpr[1] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = cpu->gpr[1] ^ cpu->gpr[2];
+ PGXP_ALU(0x00220826u, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000035F0u);
#endif
@@ -250361,7 +250910,8 @@ label_BFC21588:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC215E8: 2C420080 sltiu $v0, $v0, 128 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00003614u);
#endif
@@ -250581,7 +251131,8 @@ label_BFC215FC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC21638: 00220826 xor $at, $at, $v0 */
- cpu->gpr[1] = cpu->gpr[1] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = cpu->gpr[1] ^ cpu->gpr[2];
+ PGXP_ALU(0x00220826u, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003664u);
#endif
@@ -250663,7 +251214,8 @@ label_BFC215FC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2165C: 2C42007F sltiu $v0, $v0, 127 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2C42007Fu, cpu->gpr[2], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00003688u);
#endif
@@ -250947,7 +251499,8 @@ label_BFC216AC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC216B8: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000036E4u);
#endif
@@ -251008,7 +251561,8 @@ label_BFC216C4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC216CC: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000036F8u);
#endif
@@ -251084,7 +251638,8 @@ label_BFC216D8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC216E4: 2C420001 sltiu $v0, $v0, 1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00003710u);
#endif
@@ -251179,7 +251734,8 @@ label_BFC216F0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC216FC: 30420001 andi $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00003728u);
#endif
@@ -251243,7 +251799,8 @@ label_BFC21708:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21710: 30420001 andi $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x0000373Cu);
#endif
@@ -252155,7 +252712,8 @@ label_BFC2180C:
psx_cyc_step(cpu, 0x15u);
#endif
/* 0xBFC2181C: 0002202B sltu $a0, $zero, $v0 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002202Bu, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003848u);
#endif
@@ -253058,7 +253616,8 @@ label_BFC21924:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC21938: 00641824 and $v1, $v1, $a0 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ PGXP_ALU(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003964u);
#endif
@@ -253428,7 +253987,8 @@ label_BFC21998:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC219AC: 00641824 and $v1, $v1, $a0 */
- cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[4];
+ PGXP_ALU(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000039D8u);
#endif
@@ -253977,7 +254537,8 @@ label_BFC21A20:
psx_cyc_step(cpu, 0x800000u);
#endif
/* 0xBFC21A68: 32F7FFFF andi $s7, $s7, 0xFFFF */
- cpu->gpr[23] = cpu->gpr[23] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = cpu->gpr[23] & 0xFFFFu;
+ PGXP_ALU(0x32F7FFFFu, cpu->gpr[23], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00003A94u);
#endif
@@ -254126,7 +254687,8 @@ label_BFC21A98:
psx_cyc_step(cpu, 0x20001u);
#endif
/* 0xBFC21AA0: 0011882B sltu $s1, $zero, $s1 */
- cpu->gpr[17] = (uint32_t)(cpu->gpr[0] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)(cpu->gpr[0] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0011882Bu, cpu->gpr[17], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003ACCu);
#endif
@@ -254258,7 +254820,8 @@ label_BFC21AC4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21ACC: 30420001 andi $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00003AF8u);
#endif
@@ -254475,7 +255038,8 @@ label_BFC21B0C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21B14: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00003B40u);
#endif
@@ -254607,7 +255171,8 @@ label_BFC21B34:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21B3C: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00003B68u);
#endif
@@ -254811,7 +255376,8 @@ label_BFC21B78:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21B80: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00003BACu);
#endif
@@ -254888,7 +255454,8 @@ label_BFC21B8C:
psx_cyc_step(cpu, 0x10000u);
#endif
/* 0xBFC21B98: 3210000F andi $s0, $s0, 0xF */
- cpu->gpr[16] = cpu->gpr[16] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0xFu;
+ PGXP_ALU(0x3210000Fu, cpu->gpr[16], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00003BC4u);
#endif
@@ -254991,7 +255558,8 @@ label_BFC21BAC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21BB4: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00003BE0u);
#endif
@@ -255249,7 +255817,8 @@ label_BFC21BEC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21BF4: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00003C20u);
#endif
@@ -255558,7 +256127,8 @@ label_BFC21C20:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC21C24: 30630080 andi $v1, $v1, 0x80 */
- cpu->gpr[3] = cpu->gpr[3] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x80u;
+ PGXP_ALU(0x30630080u, cpu->gpr[3], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00003C50u);
#endif
@@ -255774,7 +256344,8 @@ label_BFC21C48:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC21C50: 02221024 and $v0, $s1, $v0 */
- cpu->gpr[2] = cpu->gpr[17] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[17] & cpu->gpr[2];
+ PGXP_ALU(0x02221024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003C7Cu);
#endif
@@ -255951,7 +256522,8 @@ label_BFC21C88:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21C90: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00003CBCu);
#endif
@@ -256064,7 +256636,8 @@ label_BFC21CAC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21CB4: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00003CE0u);
#endif
@@ -256192,7 +256765,8 @@ label_BFC21CD4:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC21CDC: 02221024 and $v0, $s1, $v0 */
- cpu->gpr[2] = cpu->gpr[17] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[17] & cpu->gpr[2];
+ PGXP_ALU(0x02221024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003D08u);
#endif
@@ -256343,7 +256917,8 @@ label_BFC21D08:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21D10: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00003D3Cu);
#endif
@@ -257085,7 +257660,8 @@ label_BFC21DDC:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC21DE4: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003E10u);
#endif
@@ -257131,7 +257707,8 @@ label_BFC21DE8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21DF0: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00003E1Cu);
#endif
@@ -257217,7 +257794,8 @@ label_BFC21E00:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC21E08: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00003E34u);
#endif
@@ -257470,7 +258048,8 @@ label_BFC21E34:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC21E3C: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003E68u);
#endif
@@ -258412,7 +258991,8 @@ label_BFC21F1C:
psx_cyc_step(cpu, 0x60u);
#endif
/* 0xBFC21F3C: 00A62824 and $a1, $a1, $a2 */
- cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[6];
+ PGXP_ALU(0x00A62824u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003F68u);
#endif
@@ -258943,7 +259523,8 @@ label_BFC21FE0:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC21FE0: 30840001 andi $a0, $a0, 0x1 */
- cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x0000400Cu);
#endif
@@ -262472,7 +263053,8 @@ label_BFC22414:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC22414: 38C20041 xori $v0, $a2, 0x41 */
- cpu->gpr[2] = cpu->gpr[6] ^ 0x41u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] ^ 0x41u;
+ PGXP_ALU(0x38C20041u, cpu->gpr[2], _pgx1, 0x0041u); }
#ifdef PSX_COSIM
cosim_instr(0x00004440u);
#endif
@@ -262487,7 +263069,8 @@ label_BFC22414:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC2241C: 38C20023 xori $v0, $a2, 0x23 */
- cpu->gpr[2] = cpu->gpr[6] ^ 0x23u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] ^ 0x23u;
+ PGXP_ALU(0x38C20023u, cpu->gpr[2], _pgx1, 0x0023u); }
#ifdef PSX_COSIM
cosim_instr(0x00004448u);
#endif
@@ -262575,7 +263158,8 @@ label_BFC22428:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC22430: 3062FFFF andi $v0, $v1, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[3] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] & 0xFFFFu;
+ PGXP_ALU(0x3062FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x0000445Cu);
#endif
@@ -262744,7 +263328,8 @@ label_BFC22458:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC22464: 2C630011 sltiu $v1, $v1, 17 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2C630011u, cpu->gpr[3], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x00004490u);
#endif
@@ -262792,7 +263377,8 @@ label_BFC22470:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC22470: 00431024 and $v0, $v0, $v1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[3];
+ PGXP_ALU(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000449Cu);
#endif
@@ -262848,7 +263434,8 @@ label_BFC2247C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC22484: 2C420011 sltiu $v0, $v0, 17 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2C420011u, cpu->gpr[2], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x000044B0u);
#endif
@@ -262911,7 +263498,8 @@ label_BFC22490:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC22498: 3042FF7F andi $v0, $v0, 0xFF7F */
- cpu->gpr[2] = cpu->gpr[2] & 0xFF7Fu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFF7Fu;
+ PGXP_ALU(0x3042FF7Fu, cpu->gpr[2], _pgx1, 0xFF7Fu); }
#ifdef PSX_COSIM
cosim_instr(0x000044C4u);
#endif
@@ -263139,7 +263727,8 @@ label_BFC224CC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC224D0: 2C420002 sltiu $v0, $v0, 2 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x000044FCu);
#endif
diff --git a/generated/SCPH1001.emitter.sha b/generated/SCPH1001.emitter.sha
index 739b11d0..4c35ffe5 100644
--- a/generated/SCPH1001.emitter.sha
+++ b/generated/SCPH1001.emitter.sha
@@ -1 +1 @@
-3e8f77cfe0b52d865e06c2375cac130df6e7a50dc3516fae30c945c44a9b2341
+6354929d9f6d6ffeb9a410bc1bcf7640366bfbaa3df78cee998bb13fdcfb1002
diff --git a/generated/SCPH1001_full.c b/generated/SCPH1001_full.c
index 66a2e689..d6e21052 100644
--- a/generated/SCPH1001_full.c
+++ b/generated/SCPH1001_full.c
@@ -3644,7 +3644,8 @@ label_BFC003B8:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC003C0: 0043082B sltu $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC003C0u);
#endif
@@ -5801,7 +5802,8 @@ label_BFC00810:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC0081C: 31CF00FF andi $t7, $t6, 0xFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0081Cu);
#endif
@@ -5836,7 +5838,8 @@ label_BFC00810:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC00828: 316C00FF andi $t4, $t3, 0xFF */
- cpu->gpr[12] = cpu->gpr[11] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFu;
+ PGXP_ALU(0x316C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00828u);
#endif
@@ -5976,7 +5979,8 @@ label_BFC00810:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC00858: 31F800FF andi $t8, $t7, 0xFF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00858u);
#endif
@@ -7743,7 +7747,8 @@ label_BFC00A04:
psx_cyc_step(cpu, 0x1000010u);
#endif
/* 0xBFC00A14: 309800FF andi $t8, $a0, 0xFF */
- cpu->gpr[24] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x309800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00A14u);
#endif
@@ -7786,7 +7791,8 @@ label_BFC00A04:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC00A24: 31090008 andi $t1, $t0, 0x8 */
- cpu->gpr[9] = cpu->gpr[8] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x8u;
+ PGXP_ALU(0x31090008u, cpu->gpr[9], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00A24u);
#endif
@@ -7941,7 +7947,8 @@ label_BFC00A40:
psx_cyc_step(cpu, 0x410u);
#endif
/* 0xBFC00A48: 308A00FF andi $t2, $a0, 0xFF */
- cpu->gpr[10] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308A00FFu, cpu->gpr[10], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00A48u);
#endif
@@ -7984,7 +7991,8 @@ label_BFC00A40:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC00A58: 318D0008 andi $t5, $t4, 0x8 */
- cpu->gpr[13] = cpu->gpr[12] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x8u;
+ PGXP_ALU(0x318D0008u, cpu->gpr[13], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00A58u);
#endif
@@ -8191,7 +8199,8 @@ label_BFC00A7C:
psx_cyc_step(cpu, 0x4008u);
#endif
/* 0xBFC00A88: 306E00FF andi $t6, $v1, 0xFF */
- cpu->gpr[14] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00A88u);
#endif
@@ -8234,7 +8243,8 @@ label_BFC00A7C:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC00A98: 30580008 andi $t8, $v0, 0x8 */
- cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00A98u);
#endif
@@ -8255,7 +8265,8 @@ label_BFC00A7C:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC00AA0: 304A0044 andi $t2, $v0, 0x44 */
- cpu->gpr[10] = cpu->gpr[2] & 0x44u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x44u;
+ PGXP_ALU(0x304A0044u, cpu->gpr[10], _pgx1, 0x0044u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00AA0u);
#endif
@@ -8400,7 +8411,8 @@ label_BFC00AB4:
psx_cyc_step(cpu, 0x2000008u);
#endif
/* 0xBFC00AC0: 307900FF andi $t9, $v1, 0xFF */
- cpu->gpr[25] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x307900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00AC0u);
#endif
@@ -8443,7 +8455,8 @@ label_BFC00AB4:
psx_cyc_step(cpu, 0x204u);
#endif
/* 0xBFC00AD0: 30490008 andi $t1, $v0, 0x8 */
- cpu->gpr[9] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30490008u, cpu->gpr[9], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00AD0u);
#endif
@@ -8496,7 +8509,8 @@ label_BFC00ADC:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC00ADC: 304A0044 andi $t2, $v0, 0x44 */
- cpu->gpr[10] = cpu->gpr[2] & 0x44u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x44u;
+ PGXP_ALU(0x304A0044u, cpu->gpr[10], _pgx1, 0x0044u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00ADCu);
#endif
@@ -8557,7 +8571,8 @@ label_BFC00AE8:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC00AE8: 304B0004 andi $t3, $v0, 0x4 */
- cpu->gpr[11] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x304B0004u, cpu->gpr[11], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00AE8u);
#endif
@@ -8820,7 +8835,8 @@ label_BFC00B20:
psx_cyc_step(cpu, 0x4008u);
#endif
/* 0xBFC00B2C: 306E00FF andi $t6, $v1, 0xFF */
- cpu->gpr[14] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00B2Cu);
#endif
@@ -8863,7 +8879,8 @@ label_BFC00B20:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC00B3C: 30580044 andi $t8, $v0, 0x44 */
- cpu->gpr[24] = cpu->gpr[2] & 0x44u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x44u;
+ PGXP_ALU(0x30580044u, cpu->gpr[24], _pgx1, 0x0044u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00B3Cu);
#endif
@@ -8884,7 +8901,8 @@ label_BFC00B20:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC00B44: 304B0004 andi $t3, $v0, 0x4 */
- cpu->gpr[11] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x304B0004u, cpu->gpr[11], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00B44u);
#endif
@@ -9563,7 +9581,8 @@ label_BFC00BD8:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC00BE8: 304F00FF andi $t7, $v0, 0xFF */
- cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00BE8u);
#endif
@@ -9606,7 +9625,8 @@ label_BFC00BD8:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC00BF8: 33280008 andi $t0, $t9, 0x8 */
- cpu->gpr[8] = cpu->gpr[25] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x8u;
+ PGXP_ALU(0x33280008u, cpu->gpr[8], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00BF8u);
#endif
@@ -9761,7 +9781,8 @@ label_BFC00C14:
psx_cyc_step(cpu, 0x204u);
#endif
/* 0xBFC00C1C: 304900FF andi $t1, $v0, 0xFF */
- cpu->gpr[9] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00C1Cu);
#endif
@@ -9804,7 +9825,8 @@ label_BFC00C14:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC00C2C: 316C0008 andi $t4, $t3, 0x8 */
- cpu->gpr[12] = cpu->gpr[11] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x8u;
+ PGXP_ALU(0x316C0008u, cpu->gpr[12], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00C2Cu);
#endif
@@ -9999,7 +10021,8 @@ label_BFC00C50:
psx_cyc_step(cpu, 0x2004u);
#endif
/* 0xBFC00C58: 304D00FF andi $t5, $v0, 0xFF */
- cpu->gpr[13] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304D00FFu, cpu->gpr[13], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00C58u);
#endif
@@ -10042,7 +10065,8 @@ label_BFC00C50:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC00C68: 31F80008 andi $t8, $t7, 0x8 */
- cpu->gpr[24] = cpu->gpr[15] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x8u;
+ PGXP_ALU(0x31F80008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00C68u);
#endif
@@ -10196,7 +10220,8 @@ label_BFC00C84:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC00C8C: 305900FF andi $t9, $v0, 0xFF */
- cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00C8Cu);
#endif
@@ -10239,7 +10264,8 @@ label_BFC00C84:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC00C9C: 312A0008 andi $t2, $t1, 0x8 */
- cpu->gpr[10] = cpu->gpr[9] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x8u;
+ PGXP_ALU(0x312A0008u, cpu->gpr[10], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00C9Cu);
#endif
@@ -10463,7 +10489,8 @@ label_BFC00CC0:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC00CD8: 31CF0008 andi $t7, $t6, 0x8 */
- cpu->gpr[15] = cpu->gpr[14] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x8u;
+ PGXP_ALU(0x31CF0008u, cpu->gpr[15], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00CD8u);
#endif
@@ -10569,7 +10596,8 @@ label_BFC00CE4:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC00CF8: 31090008 andi $t1, $t0, 0x8 */
- cpu->gpr[9] = cpu->gpr[8] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x8u;
+ PGXP_ALU(0x31090008u, cpu->gpr[9], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00CF8u);
#endif
@@ -13097,7 +13125,8 @@ label_BFC00EF4:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC00F00: 2C610080 sltiu $at, $v1, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C610080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00F00u);
#endif
@@ -13181,7 +13210,8 @@ label_BFC00F10:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC00F10: 2C610080 sltiu $at, $v1, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C610080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00F10u);
#endif
@@ -13274,7 +13304,8 @@ label_BFC00F1C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC00F28: 33190004 andi $t9, $t8, 0x4 */
- cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00F28u);
#endif
@@ -13403,7 +13434,8 @@ label_BFC00F38:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC00F4C: 2C610080 sltiu $at, $v1, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C610080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00F4Cu);
#endif
@@ -13489,7 +13521,8 @@ label_BFC00F58:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC00F64: 33190004 andi $t9, $t8, 0x4 */
- cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00F64u);
#endif
@@ -13828,7 +13861,8 @@ label_BFC00F9C:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC00FB0: 2C610080 sltiu $at, $v1, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C610080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00FB0u);
#endif
@@ -13914,7 +13948,8 @@ label_BFC00FBC:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC00FC8: 33190004 andi $t9, $t8, 0x4 */
- cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC00FC8u);
#endif
@@ -14271,7 +14306,8 @@ label_BFC01018:
psx_cyc_step(cpu, 0x28000u);
#endif
/* 0xBFC01018: 322F0001 andi $t7, $s1, 0x1 */
- cpu->gpr[15] = cpu->gpr[17] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] & 0x1u;
+ PGXP_ALU(0x322F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01018u);
#endif
@@ -14389,7 +14425,8 @@ label_BFC01034:
psx_cyc_step(cpu, 0x1020000u);
#endif
/* 0xBFC01034: 32380004 andi $t8, $s1, 0x4 */
- cpu->gpr[24] = cpu->gpr[17] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x4u;
+ PGXP_ALU(0x32380004u, cpu->gpr[24], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01034u);
#endif
@@ -14638,7 +14675,8 @@ label_BFC0106C:
psx_cyc_step(cpu, 0x2020000u);
#endif
/* 0xBFC0106C: 32390001 andi $t9, $s1, 0x1 */
- cpu->gpr[25] = cpu->gpr[17] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] & 0x1u;
+ PGXP_ALU(0x32390001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0106Cu);
#endif
@@ -14659,7 +14697,8 @@ label_BFC0106C:
psx_cyc_step(cpu, 0x1020000u);
#endif
/* 0xBFC01074: 32380004 andi $t8, $s1, 0x4 */
- cpu->gpr[24] = cpu->gpr[17] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x4u;
+ PGXP_ALU(0x32380004u, cpu->gpr[24], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01074u);
#endif
@@ -14764,7 +14803,8 @@ label_BFC0108C:
psx_cyc_step(cpu, 0x1020000u);
#endif
/* 0xBFC0108C: 32380004 andi $t8, $s1, 0x4 */
- cpu->gpr[24] = cpu->gpr[17] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x4u;
+ PGXP_ALU(0x32380004u, cpu->gpr[24], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0108Cu);
#endif
@@ -14987,7 +15027,8 @@ label_BFC010C0:
psx_cyc_step(cpu, 0x2020000u);
#endif
/* 0xBFC010C4: 32390001 andi $t9, $s1, 0x1 */
- cpu->gpr[25] = cpu->gpr[17] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] & 0x1u;
+ PGXP_ALU(0x32390001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC010C4u);
#endif
@@ -15124,7 +15165,8 @@ label_BFC010E4:
psx_cyc_step(cpu, 0x24000u);
#endif
/* 0xBFC010E4: 322E0004 andi $t6, $s1, 0x4 */
- cpu->gpr[14] = cpu->gpr[17] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] & 0x4u;
+ PGXP_ALU(0x322E0004u, cpu->gpr[14], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC010E4u);
#endif
@@ -15734,7 +15776,8 @@ label_BFC0117C:
psx_cyc_step(cpu, 0x4Au);
#endif
/* 0xBFC01180: 00C3082A slt $at, $a2, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x00C3082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01180u);
#endif
@@ -16069,7 +16112,8 @@ label_BFC011D0:
psx_cyc_step(cpu, 0x28000u);
#endif
/* 0xBFC011D0: 322F0001 andi $t7, $s1, 0x1 */
- cpu->gpr[15] = cpu->gpr[17] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] & 0x1u;
+ PGXP_ALU(0x322F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC011D0u);
#endif
@@ -16199,7 +16243,8 @@ label_BFC011F0:
psx_cyc_step(cpu, 0x1020000u);
#endif
/* 0xBFC011F0: 32380004 andi $t8, $s1, 0x4 */
- cpu->gpr[24] = cpu->gpr[17] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x4u;
+ PGXP_ALU(0x32380004u, cpu->gpr[24], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC011F0u);
#endif
@@ -16411,7 +16456,8 @@ label_BFC01218:
psx_cyc_step(cpu, 0x24000u);
#endif
/* 0xBFC01224: 322E0001 andi $t6, $s1, 0x1 */
- cpu->gpr[14] = cpu->gpr[17] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] & 0x1u;
+ PGXP_ALU(0x322E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01224u);
#endif
@@ -16548,7 +16594,8 @@ label_BFC01244:
psx_cyc_step(cpu, 0x28000u);
#endif
/* 0xBFC01244: 322F0004 andi $t7, $s1, 0x4 */
- cpu->gpr[15] = cpu->gpr[17] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] & 0x4u;
+ PGXP_ALU(0x322F0004u, cpu->gpr[15], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01244u);
#endif
@@ -16700,7 +16747,8 @@ label_BFC01268:
psx_cyc_step(cpu, 0x1020000u);
#endif
/* 0xBFC01268: 32380008 andi $t8, $s1, 0x8 */
- cpu->gpr[24] = cpu->gpr[17] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x8u;
+ PGXP_ALU(0x32380008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01268u);
#endif
@@ -16869,7 +16917,8 @@ label_BFC01288:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC0128C: 02218824 and $s1, $s1, $at */
- cpu->gpr[17] = cpu->gpr[17] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[17] = cpu->gpr[17] & cpu->gpr[1];
+ PGXP_ALU(0x02218824u, cpu->gpr[17], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0128Cu);
#endif
@@ -16981,7 +17030,8 @@ label_BFC012A0:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC012A4: 32220008 andi $v0, $s1, 0x8 */
- cpu->gpr[2] = cpu->gpr[17] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x8u;
+ PGXP_ALU(0x32220008u, cpu->gpr[2], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC012A4u);
#endif
@@ -17576,7 +17626,8 @@ label_BFC01338:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC01338: 32220040 andi $v0, $s1, 0x40 */
- cpu->gpr[2] = cpu->gpr[17] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x40u;
+ PGXP_ALU(0x32220040u, cpu->gpr[2], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01338u);
#endif
@@ -17710,7 +17761,8 @@ label_BFC01354:
psx_cyc_step(cpu, 0x3000002u);
#endif
/* 0xBFC01360: 0338082A slt $at, $t9, $t8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x0338082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01360u);
#endif
@@ -17850,7 +17902,8 @@ label_BFC01380:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC01380: 32220030 andi $v0, $s1, 0x30 */
- cpu->gpr[2] = cpu->gpr[17] & 0x30u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x30u;
+ PGXP_ALU(0x32220030u, cpu->gpr[2], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01380u);
#endif
@@ -17966,7 +18019,8 @@ label_BFC01394:
psx_cyc_step(cpu, 0x200006u);
#endif
/* 0xBFC0139C: 0055082A slt $at, $v0, $s5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0055082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0139Cu);
#endif
@@ -18069,7 +18123,8 @@ label_BFC013B0:
psx_cyc_step(cpu, 0x210002u);
#endif
/* 0xBFC013B4: 0215082A slt $at, $s0, $s5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0215082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC013B4u);
#endif
@@ -18798,7 +18853,8 @@ label_BFC0147C:
psx_cyc_step(cpu, 0x200006u);
#endif
/* 0xBFC01484: 0055082A slt $at, $v0, $s5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0055082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01484u);
#endif
@@ -18901,7 +18957,8 @@ label_BFC01498:
psx_cyc_step(cpu, 0x210002u);
#endif
/* 0xBFC0149C: 0215082A slt $at, $s0, $s5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0215082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0149Cu);
#endif
@@ -19076,7 +19133,8 @@ label_BFC014C8:
psx_cyc_step(cpu, 0x1004002u);
#endif
/* 0xBFC014D0: 030E082A slt $at, $t8, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x030E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC014D0u);
#endif
@@ -19185,7 +19243,8 @@ label_BFC014E4:
psx_cyc_step(cpu, 0x18002u);
#endif
/* 0xBFC014EC: 020F082A slt $at, $s0, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x020F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC014ECu);
#endif
@@ -19600,7 +19659,8 @@ label_BFC01558:
psx_cyc_step(cpu, 0x1020000u);
#endif
/* 0xBFC01560: 32380010 andi $t8, $s1, 0x10 */
- cpu->gpr[24] = cpu->gpr[17] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x10u;
+ PGXP_ALU(0x32380010u, cpu->gpr[24], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01560u);
#endif
@@ -19808,7 +19868,8 @@ label_BFC01594:
psx_cyc_step(cpu, 0x1020000u);
#endif
/* 0xBFC01594: 32380010 andi $t8, $s1, 0x10 */
- cpu->gpr[24] = cpu->gpr[17] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x10u;
+ PGXP_ALU(0x32380010u, cpu->gpr[24], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01594u);
#endif
@@ -19886,7 +19947,8 @@ label_BFC015A0:
psx_cyc_step(cpu, 0x204002u);
#endif
/* 0xBFC015A8: 01D5082A slt $at, $t6, $s5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x01D5082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC015A8u);
#endif
@@ -19989,7 +20051,8 @@ label_BFC015BC:
psx_cyc_step(cpu, 0x210002u);
#endif
/* 0xBFC015C0: 0215082A slt $at, $s0, $s5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0215082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC015C0u);
#endif
@@ -20154,7 +20217,8 @@ label_BFC015EC:
psx_cyc_step(cpu, 0x208002u);
#endif
/* 0xBFC015F0: 01F5082A slt $at, $t7, $s5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x01F5082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC015F0u);
#endif
@@ -20495,7 +20559,8 @@ label_BFC0164C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC01650: 2C410045 sltiu $at, $v0, 69 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000045u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000045u ? 1 : 0);
+ PGXP_ALU(0x2C410045u, cpu->gpr[1], _pgx1, 0x0045u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01650u);
#endif
@@ -20580,7 +20645,8 @@ label_BFC0165C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC01660: 2C410033 sltiu $at, $v0, 51 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000033u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000033u ? 1 : 0);
+ PGXP_ALU(0x2C410033u, cpu->gpr[1], _pgx1, 0x0033u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01660u);
#endif
@@ -20665,7 +20731,8 @@ label_BFC0166C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC01670: 2C41002E sltiu $at, $v0, 46 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000002Eu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000002Eu ? 1 : 0);
+ PGXP_ALU(0x2C41002Eu, cpu->gpr[1], _pgx1, 0x002Eu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01670u);
#endif
@@ -20749,7 +20816,8 @@ label_BFC0167C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC01680: 2C41002B sltiu $at, $v0, 43 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000002Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000002Bu ? 1 : 0);
+ PGXP_ALU(0x2C41002Bu, cpu->gpr[1], _pgx1, 0x002Bu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01680u);
#endif
@@ -20833,7 +20901,8 @@ label_BFC0168C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC01690: 2C410021 sltiu $at, $v0, 33 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000021u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000021u ? 1 : 0);
+ PGXP_ALU(0x2C410021u, cpu->gpr[1], _pgx1, 0x0021u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01690u);
#endif
@@ -21343,7 +21412,8 @@ label_BFC01700:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC01704: 2C410031 sltiu $at, $v0, 49 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000031u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000031u ? 1 : 0);
+ PGXP_ALU(0x2C410031u, cpu->gpr[1], _pgx1, 0x0031u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01704u);
#endif
@@ -21630,7 +21700,8 @@ label_BFC01738:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC0173C: 2C410037 sltiu $at, $v0, 55 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000037u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000037u ? 1 : 0);
+ PGXP_ALU(0x2C410037u, cpu->gpr[1], _pgx1, 0x0037u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0173Cu);
#endif
@@ -21715,7 +21786,8 @@ label_BFC01748:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC0174C: 2C410035 sltiu $at, $v0, 53 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000035u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000035u ? 1 : 0);
+ PGXP_ALU(0x2C410035u, cpu->gpr[1], _pgx1, 0x0035u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0174Cu);
#endif
@@ -21996,7 +22068,8 @@ label_BFC0177C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC01784: 2C410039 sltiu $at, $v0, 57 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000039u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000039u ? 1 : 0);
+ PGXP_ALU(0x2C410039u, cpu->gpr[1], _pgx1, 0x0039u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01784u);
#endif
@@ -22284,7 +22357,8 @@ label_BFC017B8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC017BC: 2C41006A sltiu $at, $v0, 106 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000006Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000006Au ? 1 : 0);
+ PGXP_ALU(0x2C41006Au, cpu->gpr[1], _pgx1, 0x006Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC017BCu);
#endif
@@ -22369,7 +22443,8 @@ label_BFC017C8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC017CC: 2C410059 sltiu $at, $v0, 89 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000059u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000059u ? 1 : 0);
+ PGXP_ALU(0x2C410059u, cpu->gpr[1], _pgx1, 0x0059u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC017CCu);
#endif
@@ -22454,7 +22529,8 @@ label_BFC017D8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC017DC: 2C410050 sltiu $at, $v0, 80 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000050u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000050u ? 1 : 0);
+ PGXP_ALU(0x2C410050u, cpu->gpr[1], _pgx1, 0x0050u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC017DCu);
#endif
@@ -22734,7 +22810,8 @@ label_BFC0180C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC01814: 2C410065 sltiu $at, $v0, 101 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000065u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000065u ? 1 : 0);
+ PGXP_ALU(0x2C410065u, cpu->gpr[1], _pgx1, 0x0065u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01814u);
#endif
@@ -23013,7 +23090,8 @@ label_BFC01844:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC0184C: 2C410071 sltiu $at, $v0, 113 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000071u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000071u ? 1 : 0);
+ PGXP_ALU(0x2C410071u, cpu->gpr[1], _pgx1, 0x0071u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0184Cu);
#endif
@@ -23098,7 +23176,8 @@ label_BFC01858:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC0185C: 2C41006F sltiu $at, $v0, 111 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000006Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000006Fu ? 1 : 0);
+ PGXP_ALU(0x2C41006Fu, cpu->gpr[1], _pgx1, 0x006Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0185Cu);
#endif
@@ -23280,7 +23359,8 @@ label_BFC01878:
psx_cyc_step(cpu, 0x2020000u);
#endif
/* 0xBFC01880: 32390001 andi $t9, $s1, 0x1 */
- cpu->gpr[25] = cpu->gpr[17] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] & 0x1u;
+ PGXP_ALU(0x32390001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01880u);
#endif
@@ -23377,7 +23457,8 @@ label_BFC0188C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC01894: 2C410076 sltiu $at, $v0, 118 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000076u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000076u ? 1 : 0);
+ PGXP_ALU(0x2C410076u, cpu->gpr[1], _pgx1, 0x0076u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01894u);
#endif
@@ -23559,7 +23640,8 @@ label_BFC018B0:
psx_cyc_step(cpu, 0x24000u);
#endif
/* 0xBFC018B8: 322E0001 andi $t6, $s1, 0x1 */
- cpu->gpr[14] = cpu->gpr[17] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] & 0x1u;
+ PGXP_ALU(0x322E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC018B8u);
#endif
@@ -25067,7 +25149,8 @@ label_BFC01A60:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC01A68: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01A68u);
#endif
@@ -26405,7 +26488,8 @@ label_BFC01B88:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC01B94: 0044082B sltu $at, $v0, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01B94u);
#endif
@@ -26653,7 +26737,8 @@ label_BFC01BB4:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC01BD8: 0043082B sltu $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01BD8u);
#endif
@@ -26674,7 +26759,8 @@ label_BFC01BB4:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC01BE0: 0045082B sltu $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01BE0u);
#endif
@@ -26749,7 +26835,8 @@ label_BFC01BEC:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC01BEC: 0045082B sltu $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01BECu);
#endif
@@ -26940,7 +27027,8 @@ label_BFC01C08:
psx_cyc_step(cpu, 0x8012u);
#endif
/* 0xBFC01C1C: 008F082B sltu $at, $a0, $t7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x008F082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01C1Cu);
#endif
@@ -27500,7 +27588,8 @@ label_BFC01C8C:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC01CA8: 00A12824 and $a1, $a1, $at */
- cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[1];
+ PGXP_ALU(0x00A12824u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01CA8u);
#endif
@@ -27600,7 +27689,8 @@ label_BFC01CB4:
psx_cyc_step(cpu, 0x540u);
#endif
/* 0xBFC01CC0: 00CA4024 and $t0, $a2, $t2 */
- cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[10];
+ PGXP_ALU(0x00CA4024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01CC0u);
#endif
@@ -27611,7 +27701,8 @@ label_BFC01CB4:
psx_cyc_step(cpu, 0x122u);
#endif
/* 0xBFC01CC4: 0105082B sltu $at, $t0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0105082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01CC4u);
#endif
@@ -27825,7 +27916,8 @@ label_BFC01D00:
psx_cyc_step(cpu, 0x2000080u);
#endif
/* 0xBFC01D00: 30F90001 andi $t9, $a3, 0x1 */
- cpu->gpr[25] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30F90001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D00u);
#endif
@@ -27909,7 +28001,8 @@ label_BFC01D0C:
psx_cyc_step(cpu, 0x142u);
#endif
/* 0xBFC01D18: 00C14024 and $t0, $a2, $at */
- cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[1];
+ PGXP_ALU(0x00C14024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D18u);
#endif
@@ -28031,7 +28124,8 @@ label_BFC01D24:
psx_cyc_step(cpu, 0x2102u);
#endif
/* 0xBFC01D34: 01A8082B sltu $at, $t5, $t0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x01A8082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D34u);
#endif
@@ -28116,7 +28210,8 @@ label_BFC01D40:
psx_cyc_step(cpu, 0x142u);
#endif
/* 0xBFC01D4C: 00C14024 and $t0, $a2, $at */
- cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[1];
+ PGXP_ALU(0x00C14024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D4Cu);
#endif
@@ -28263,7 +28358,8 @@ label_BFC01D70:
psx_cyc_step(cpu, 0x1480u);
#endif
/* 0xBFC01D74: 00EA6024 and $t4, $a3, $t2 */
- cpu->gpr[12] = cpu->gpr[7] & cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[12] = cpu->gpr[7] & cpu->gpr[10];
+ PGXP_ALU(0x00EA6024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D74u);
#endif
@@ -28318,7 +28414,8 @@ label_BFC01D70:
psx_cyc_step(cpu, 0x4480u);
#endif
/* 0xBFC01D88: 00EA7024 and $t6, $a3, $t2 */
- cpu->gpr[14] = cpu->gpr[7] & cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[14] = cpu->gpr[7] & cpu->gpr[10];
+ PGXP_ALU(0x00EA7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D88u);
#endif
@@ -28341,7 +28438,8 @@ label_BFC01D70:
psx_cyc_step(cpu, 0x62u);
#endif
/* 0xBFC01D90: 00C5082B sltu $at, $a2, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x00C5082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01D90u);
#endif
@@ -28416,7 +28514,8 @@ label_BFC01D9C:
psx_cyc_step(cpu, 0x142u);
#endif
/* 0xBFC01DA4: 00C14024 and $t0, $a2, $at */
- cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[1];
+ PGXP_ALU(0x00C14024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01DA4u);
#endif
@@ -28453,7 +28552,8 @@ label_BFC01DAC:
psx_cyc_step(cpu, 0x8042u);
#endif
/* 0xBFC01DAC: 00C17824 and $t7, $a2, $at */
- cpu->gpr[15] = cpu->gpr[6] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[6] & cpu->gpr[1];
+ PGXP_ALU(0x00C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01DACu);
#endif
@@ -28464,7 +28564,8 @@ label_BFC01DAC:
psx_cyc_step(cpu, 0x8022u);
#endif
/* 0xBFC01DB0: 00AF082B sltu $at, $a1, $t7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x00AF082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01DB0u);
#endif
@@ -28485,7 +28586,8 @@ label_BFC01DAC:
psx_cyc_step(cpu, 0x122u);
#endif
/* 0xBFC01DB8: 0105082B sltu $at, $t0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0105082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01DB8u);
#endif
@@ -28715,7 +28817,8 @@ label_BFC01DC8:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC01DF8: 31F80001 andi $t8, $t7, 0x1 */
- cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01DF8u);
#endif
@@ -28781,7 +28884,8 @@ label_BFC01E08:
psx_cyc_step(cpu, 0x122u);
#endif
/* 0xBFC01E08: 0105082B sltu $at, $t0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0105082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01E08u);
#endif
@@ -29378,7 +29482,8 @@ label_BFC01E5C:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC01E94: 02218824 and $s1, $s1, $at */
- cpu->gpr[17] = cpu->gpr[17] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[17] = cpu->gpr[17] & cpu->gpr[1];
+ PGXP_ALU(0x02218824u, cpu->gpr[17], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01E94u);
#endif
@@ -29506,7 +29611,8 @@ label_BFC01EA0:
psx_cyc_step(cpu, 0x8006u);
#endif
/* 0xBFC01EB4: 004F082B sltu $at, $v0, $t7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x004F082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01EB4u);
#endif
@@ -29956,7 +30062,8 @@ label_BFC01F18:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC01F2C: 30830001 andi $v1, $a0, 0x1 */
- cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01F2Cu);
#endif
@@ -30038,7 +30145,8 @@ label_BFC01F38:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC01F40: 0044082B sltu $at, $v0, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01F40u);
#endif
@@ -30091,7 +30199,8 @@ label_BFC01F44:
psx_cyc_step(cpu, 0x40210u);
#endif
/* 0xBFC01F4C: 00924824 and $t1, $a0, $s2 */
- cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[18];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[18];
+ PGXP_ALU(0x00924824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01F4Cu);
#endif
@@ -30145,7 +30254,8 @@ label_BFC01F58:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC01F58: 0044082B sltu $at, $v0, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01F58u);
#endif
@@ -30173,7 +30283,8 @@ label_BFC01F5C:
psx_cyc_step(cpu, 0x20012u);
#endif
/* 0xBFC01F60: 0091082B sltu $at, $a0, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0091082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01F60u);
#endif
@@ -30424,7 +30535,8 @@ label_BFC01FA0:
psx_cyc_step(cpu, 0x20012u);
#endif
/* 0xBFC01FA0: 0091082B sltu $at, $a0, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0091082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01FA0u);
#endif
@@ -30572,7 +30684,8 @@ label_BFC01FAC:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC01FCC: 304E0001 andi $t6, $v0, 0x1 */
- cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC01FCCu);
#endif
@@ -30856,7 +30969,8 @@ label_BFC02008:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC02008: 304E0001 andi $t6, $v0, 0x1 */
- cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02008u);
#endif
@@ -30916,7 +31030,8 @@ label_BFC02014:
psx_cyc_step(cpu, 0x42004u);
#endif
/* 0xBFC02014: 00526824 and $t5, $v0, $s2 */
- cpu->gpr[13] = cpu->gpr[2] & cpu->gpr[18];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[2] & cpu->gpr[18];
+ PGXP_ALU(0x00526824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02014u);
#endif
@@ -31097,7 +31212,8 @@ label_BFC02038:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC0204C: 30830001 andi $v1, $a0, 0x1 */
- cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0204Cu);
#endif
@@ -31575,7 +31691,8 @@ label_BFC020B0:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC020C4: 30830001 andi $v1, $a0, 0x1 */
- cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC020C4u);
#endif
@@ -33017,7 +33134,8 @@ label_BFC02200:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC02224: 30427FFF andi $v0, $v0, 0x7FFF */
- cpu->gpr[2] = cpu->gpr[2] & 0x7FFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7FFFu;
+ PGXP_ALU(0x30427FFFu, cpu->gpr[2], _pgx1, 0x7FFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02224u);
#endif
@@ -33537,7 +33655,8 @@ label_BFC022C0:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC022C8: 308E00FF andi $t6, $a0, 0xFF */
- cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC022C8u);
#endif
@@ -33593,7 +33712,8 @@ label_BFC022C0:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC022DC: 304F0004 andi $t7, $v0, 0x4 */
- cpu->gpr[15] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x304F0004u, cpu->gpr[15], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC022DCu);
#endif
@@ -33690,7 +33810,8 @@ label_BFC022F0:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC022F0: 30580003 andi $t8, $v0, 0x3 */
- cpu->gpr[24] = cpu->gpr[2] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x3u;
+ PGXP_ALU(0x30580003u, cpu->gpr[24], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC022F0u);
#endif
@@ -34356,7 +34477,8 @@ label_BFC025E0:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC025F0: 308E00FF andi $t6, $a0, 0xFF */
- cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC025F0u);
#endif
@@ -34399,7 +34521,8 @@ label_BFC025E0:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC02600: 33190008 andi $t9, $t8, 0x8 */
- cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02600u);
#endif
@@ -34420,7 +34543,8 @@ label_BFC025E0:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC02608: 2A610002 slti $at, $s3, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (2) ? 1 : 0);
+ PGXP_ALU(0x2A610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02608u);
#endif
@@ -34473,7 +34597,8 @@ label_BFC0260C:
psx_cyc_step(cpu, 0x110u);
#endif
/* 0xBFC02614: 308800FF andi $t0, $a0, 0xFF */
- cpu->gpr[8] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308800FFu, cpu->gpr[8], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02614u);
#endif
@@ -34516,7 +34641,8 @@ label_BFC0260C:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC02624: 314B0008 andi $t3, $t2, 0x8 */
- cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02624u);
#endif
@@ -34537,7 +34663,8 @@ label_BFC0260C:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC0262C: 2A610002 slti $at, $s3, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (2) ? 1 : 0);
+ PGXP_ALU(0x2A610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0262Cu);
#endif
@@ -34579,7 +34706,8 @@ label_BFC02630:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC02634: 2A610025 slti $at, $s3, 37 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (37) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (37) ? 1 : 0);
+ PGXP_ALU(0x2A610025u, cpu->gpr[1], _pgx1, 0x0025u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02634u);
#endif
@@ -35317,7 +35445,8 @@ label_BFC026D8:
psx_cyc_step(cpu, 0x80006u);
#endif
/* 0xBFC026D8: 0053082B sltu $at, $v0, $s3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0053082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC026D8u);
#endif
@@ -35470,7 +35599,8 @@ label_BFC02700:
psx_cyc_step(cpu, 0x80006u);
#endif
/* 0xBFC02700: 0053082B sltu $at, $v0, $s3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0053082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02700u);
#endif
@@ -35996,7 +36126,8 @@ label_BFC02770:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC02780: 308E00FF andi $t6, $a0, 0xFF */
- cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02780u);
#endif
@@ -36039,7 +36170,8 @@ label_BFC02770:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC02790: 33190008 andi $t9, $t8, 0x8 */
- cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02790u);
#endif
@@ -36113,7 +36245,8 @@ label_BFC0279C:
psx_cyc_step(cpu, 0x110u);
#endif
/* 0xBFC027A4: 308800FF andi $t0, $a0, 0xFF */
- cpu->gpr[8] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308800FFu, cpu->gpr[8], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC027A4u);
#endif
@@ -36156,7 +36289,8 @@ label_BFC0279C:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC027B4: 314B0008 andi $t3, $t2, 0x8 */
- cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC027B4u);
#endif
@@ -36231,7 +36365,8 @@ label_BFC027C0:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC027C8: 2E610002 sltiu $at, $s3, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2E610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC027C8u);
#endif
@@ -36327,7 +36462,8 @@ label_BFC027DC:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC027DC: 2E610002 sltiu $at, $s3, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2E610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC027DCu);
#endif
@@ -36355,7 +36491,8 @@ label_BFC027E0:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC027E4: 2E610025 sltiu $at, $s3, 37 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < 0x00000025u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < 0x00000025u ? 1 : 0);
+ PGXP_ALU(0x2E610025u, cpu->gpr[1], _pgx1, 0x0025u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC027E4u);
#endif
@@ -37093,7 +37230,8 @@ label_BFC02888:
psx_cyc_step(cpu, 0x80006u);
#endif
/* 0xBFC02888: 0053082B sltu $at, $v0, $s3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0053082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02888u);
#endif
@@ -37369,7 +37507,8 @@ label_BFC028CC:
psx_cyc_step(cpu, 0x80006u);
#endif
/* 0xBFC028D0: 0053082B sltu $at, $v0, $s3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0053082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC028D0u);
#endif
@@ -38245,7 +38384,8 @@ label_BFC02984:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC02994: 308E00FF andi $t6, $a0, 0xFF */
- cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02994u);
#endif
@@ -38288,7 +38428,8 @@ label_BFC02984:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC029A4: 33190008 andi $t9, $t8, 0x8 */
- cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC029A4u);
#endif
@@ -38362,7 +38503,8 @@ label_BFC029B0:
psx_cyc_step(cpu, 0x110u);
#endif
/* 0xBFC029B8: 308800FF andi $t0, $a0, 0xFF */
- cpu->gpr[8] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308800FFu, cpu->gpr[8], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC029B8u);
#endif
@@ -38405,7 +38547,8 @@ label_BFC029B0:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC029C8: 314B0008 andi $t3, $t2, 0x8 */
- cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC029C8u);
#endif
@@ -39069,7 +39212,8 @@ label_BFC02A5C:
psx_cyc_step(cpu, 0x200006u);
#endif
/* 0xBFC02A5C: 0055082B sltu $at, $v0, $s5 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0055082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02A5Cu);
#endif
@@ -39360,7 +39504,8 @@ label_BFC02AA8:
psx_cyc_step(cpu, 0x200006u);
#endif
/* 0xBFC02AA8: 0055082B sltu $at, $v0, $s5 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0055082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02AA8u);
#endif
@@ -40240,7 +40385,8 @@ label_BFC02B8C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC02B90: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02B90u);
#endif
@@ -40558,7 +40704,8 @@ label_BFC02BC8:
psx_cyc_step(cpu, 0x32u);
#endif
/* 0xBFC02BCC: 00A4082B sltu $at, $a1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x00A4082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02BCCu);
#endif
@@ -40679,7 +40826,8 @@ label_BFC02BE4:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC02BE8: 0082082B sltu $at, $a0, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0082082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02BE8u);
#endif
@@ -41668,7 +41816,8 @@ label_BFC02CC0:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC02CC4: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02CC4u);
#endif
@@ -43178,7 +43327,8 @@ label_BFC02E3C:
psx_cyc_step(cpu, 0x60002u);
#endif
/* 0xBFC02E3C: 0232082A slt $at, $s1, $s2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0232082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02E3Cu);
#endif
@@ -43579,7 +43729,8 @@ label_BFC02EA0:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC02EA8: 308200FF andi $v0, $a0, 0xFF */
- cpu->gpr[2] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02EA8u);
#endif
@@ -43634,7 +43785,8 @@ label_BFC02EA0:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC02EBC: 31CF0002 andi $t7, $t6, 0x2 */
- cpu->gpr[15] = cpu->gpr[14] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x2u;
+ PGXP_ALU(0x31CF0002u, cpu->gpr[15], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02EBCu);
#endif
@@ -43809,7 +43961,8 @@ label_BFC02EDC:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC02EE4: 308200FF andi $v0, $a0, 0xFF */
- cpu->gpr[2] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02EE4u);
#endif
@@ -43864,7 +44017,8 @@ label_BFC02EDC:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC02EF8: 31CF0001 andi $t7, $t6, 0x1 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02EF8u);
#endif
@@ -44233,7 +44387,8 @@ label_BFC02F58:
psx_cyc_step(cpu, 0xA00002u);
#endif
/* 0xBFC02F58: 02F5082A slt $at, $s7, $s5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (int32_t)cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x02F5082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02F58u);
#endif
@@ -44419,7 +44574,8 @@ label_BFC02F84:
psx_cyc_step(cpu, 0xA00002u);
#endif
/* 0xBFC02F84: 02B7082A slt $at, $s5, $s7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[23] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[23] ? 1 : 0);
+ PGXP_ALU(0x02B7082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02F84u);
#endif
@@ -44701,7 +44857,8 @@ label_BFC02FD0:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC02FD4: 0230082A slt $at, $s1, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02FD4u);
#endif
@@ -44787,7 +44944,8 @@ label_BFC02FE0:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC02FE4: 0230082A slt $at, $s1, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02FE4u);
#endif
@@ -44808,7 +44966,8 @@ label_BFC02FE0:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC02FEC: 0230082A slt $at, $s1, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC02FECu);
#endif
@@ -44973,7 +45132,8 @@ label_BFC03014:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC03018: 0230082A slt $at, $s1, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03018u);
#endif
@@ -45015,7 +45175,8 @@ label_BFC0301C:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC03020: 0230082A slt $at, $s1, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03020u);
#endif
@@ -45108,7 +45269,8 @@ label_BFC03034:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC03034: 0230082A slt $at, $s1, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03034u);
#endif
@@ -49556,7 +49718,8 @@ label_BFC03450:
psx_cyc_step(cpu, 0x46u);
#endif
/* 0xBFC03454: 0046082A slt $at, $v0, $a2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x0046082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03454u);
#endif
@@ -49621,7 +49784,8 @@ label_BFC03460:
psx_cyc_step(cpu, 0x46u);
#endif
/* 0xBFC03464: 0046082A slt $at, $v0, $a2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x0046082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03464u);
#endif
@@ -50795,7 +50959,8 @@ label_BFC03564:
psx_cyc_step(cpu, 0x1Cu);
#endif
/* 0xBFC03564: 0044182B sltu $v1, $v0, $a0 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03564u);
#endif
@@ -51581,7 +51746,8 @@ label_BFC03610:
psx_cyc_step(cpu, 0x1Cu);
#endif
/* 0xBFC03610: 0044182B sltu $v1, $v0, $a0 */
- cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044182Bu, cpu->gpr[3], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03610u);
#endif
@@ -55004,7 +55170,8 @@ label_BFC03910:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC03924: 31CF0001 andi $t7, $t6, 0x1 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03924u);
#endif
@@ -55078,7 +55245,8 @@ label_BFC03930:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC03938: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03938u);
#endif
@@ -58575,7 +58743,8 @@ label_BFC03CAC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC03CAC: 28410800 slti $at, $v0, 2048 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2048) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2048) ? 1 : 0);
+ PGXP_ALU(0x28410800u, cpu->gpr[1], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03CACu);
#endif
@@ -59503,7 +59672,8 @@ label_BFC03D80:
psx_cyc_step(cpu, 0x1048000u);
#endif
/* 0xBFC03DB0: 01F2C024 and $t8, $t7, $s2 */
- cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[18];
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[18];
+ PGXP_ALU(0x01F2C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03DB0u);
#endif
@@ -59744,7 +59914,8 @@ label_BFC03DDC:
psx_cyc_step(cpu, 0x40300u);
#endif
/* 0xBFC03DF0: 01124824 and $t1, $t0, $s2 */
- cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[18];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[18];
+ PGXP_ALU(0x01124824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03DF0u);
#endif
@@ -59888,7 +60059,8 @@ label_BFC03E04:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC03E1C: 31AEFFFF andi $t6, $t5, 0xFFFF */
- cpu->gpr[14] = cpu->gpr[13] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFFFu;
+ PGXP_ALU(0x31AEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03E1Cu);
#endif
@@ -59965,7 +60137,8 @@ label_BFC03E04:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC03E38: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03E38u);
#endif
@@ -60558,7 +60731,8 @@ label_BFC03EBC:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC03EE8: 3328FFFF andi $t0, $t9, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[25] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0xFFFFu;
+ PGXP_ALU(0x3328FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03EE8u);
#endif
@@ -60593,7 +60767,8 @@ label_BFC03EBC:
psx_cyc_step(cpu, 0x810u);
#endif
/* 0xBFC03EF4: 308BFFFF andi $t3, $a0, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x308BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC03EF4u);
#endif
@@ -62661,7 +62836,8 @@ label_BFC04138:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC04150: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04150u);
#endif
@@ -62736,7 +62912,8 @@ label_BFC0415C:
psx_cyc_step(cpu, 0x3000010u);
#endif
/* 0xBFC04164: 0304C824 and $t9, $t8, $a0 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[4];
+ PGXP_ALU(0x0304C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04164u);
#endif
@@ -62963,7 +63140,8 @@ label_BFC04190:
psx_cyc_step(cpu, 0x310u);
#endif
/* 0xBFC04198: 01044824 and $t1, $t0, $a0 */
- cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[4];
+ PGXP_ALU(0x01044824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04198u);
#endif
@@ -63113,7 +63291,8 @@ label_BFC041AC:
psx_cyc_step(cpu, 0xC20u);
#endif
/* 0xBFC041C0: 01455824 and $t3, $t2, $a1 */
- cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[5];
+ PGXP_ALU(0x01455824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC041C0u);
#endif
@@ -63340,7 +63519,8 @@ label_BFC041EC:
psx_cyc_step(cpu, 0x3020u);
#endif
/* 0xBFC041F4: 01856824 and $t5, $t4, $a1 */
- cpu->gpr[13] = cpu->gpr[12] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[13] = cpu->gpr[12] & cpu->gpr[5];
+ PGXP_ALU(0x01856824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC041F4u);
#endif
@@ -63415,7 +63595,8 @@ label_BFC04200:
psx_cyc_step(cpu, 0xC008u);
#endif
/* 0xBFC04208: 01C37824 and $t7, $t6, $v1 */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[3];
+ PGXP_ALU(0x01C37824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04208u);
#endif
@@ -63489,7 +63670,8 @@ label_BFC04214:
psx_cyc_step(cpu, 0x3000008u);
#endif
/* 0xBFC0421C: 0303C824 and $t9, $t8, $v1 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[3];
+ PGXP_ALU(0x0303C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0421Cu);
#endif
@@ -65285,7 +65467,8 @@ label_BFC046D8:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC046F8: 0045082B sltu $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC046F8u);
#endif
@@ -65363,7 +65546,8 @@ label_BFC04708:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC0470C: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0470Cu);
#endif
@@ -66117,7 +66301,8 @@ label_BFC047B8:
psx_cyc_step(cpu, 0x52u);
#endif
/* 0xBFC047C8: 00C4082B sltu $at, $a2, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x00C4082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC047C8u);
#endif
@@ -66180,7 +66365,8 @@ label_BFC047D4:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC047D8: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC047D8u);
#endif
@@ -66310,7 +66496,8 @@ label_BFC047E8:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC047FC: 0045082B sltu $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC047FCu);
#endif
@@ -66395,7 +66582,8 @@ label_BFC0480C:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC04810: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04810u);
#endif
@@ -67523,7 +67711,8 @@ label_BFC04934:
psx_cyc_step(cpu, 0xC040u);
#endif
/* 0xBFC0494C: 01C67824 and $t7, $t6, $a2 */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[6];
+ PGXP_ALU(0x01C67824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0494Cu);
#endif
@@ -67567,7 +67756,8 @@ label_BFC04934:
psx_cyc_step(cpu, 0x3000020u);
#endif
/* 0xBFC0495C: 0305C824 and $t9, $t8, $a1 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[5];
+ PGXP_ALU(0x0305C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0495Cu);
#endif
@@ -67764,7 +67954,8 @@ label_BFC04934:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC049A0: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC049A0u);
#endif
@@ -69259,7 +69450,8 @@ label_BFC04B14:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC04B28: 30580010 andi $t8, $v0, 0x10 */
- cpu->gpr[24] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30580010u, cpu->gpr[24], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04B28u);
#endif
@@ -70660,7 +70852,8 @@ label_BFC04C70:
psx_cyc_step(cpu, 0x1000040u);
#endif
/* 0xBFC04CA0: 30D80010 andi $t8, $a2, 0x10 */
- cpu->gpr[24] = cpu->gpr[6] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] & 0x10u;
+ PGXP_ALU(0x30D80010u, cpu->gpr[24], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04CA0u);
#endif
@@ -70781,7 +70974,8 @@ label_BFC04CBC:
psx_cyc_step(cpu, 0x140u);
#endif
/* 0xBFC04CBC: 30C80020 andi $t0, $a2, 0x20 */
- cpu->gpr[8] = cpu->gpr[6] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] & 0x20u;
+ PGXP_ALU(0x30C80020u, cpu->gpr[8], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04CBCu);
#endif
@@ -71005,7 +71199,8 @@ label_BFC04CE4:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC04CF8: 304B0010 andi $t3, $v0, 0x10 */
- cpu->gpr[11] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304B0010u, cpu->gpr[11], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04CF8u);
#endif
@@ -71134,7 +71329,8 @@ label_BFC04D0C:
psx_cyc_step(cpu, 0x1040u);
#endif
/* 0xBFC04D18: 30CC00FF andi $t4, $a2, 0xFF */
- cpu->gpr[12] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30CC00FFu, cpu->gpr[12], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04D18u);
#endif
@@ -71586,7 +71782,8 @@ label_BFC04D78:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC04D94: 304F0010 andi $t7, $v0, 0x10 */
- cpu->gpr[15] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304F0010u, cpu->gpr[15], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04D94u);
#endif
@@ -71715,7 +71912,8 @@ label_BFC04DA8:
psx_cyc_step(cpu, 0x1000010u);
#endif
/* 0xBFC04DB4: 309800FF andi $t8, $a0, 0xFF */
- cpu->gpr[24] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x309800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04DB4u);
#endif
@@ -72043,7 +72241,8 @@ label_BFC04DEC:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC04E04: 31CF0004 andi $t7, $t6, 0x4 */
- cpu->gpr[15] = cpu->gpr[14] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x4u;
+ PGXP_ALU(0x31CF0004u, cpu->gpr[15], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04E04u);
#endif
@@ -72160,7 +72359,8 @@ label_BFC04E18:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC04E20: 30580004 andi $t8, $v0, 0x4 */
- cpu->gpr[24] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30580004u, cpu->gpr[24], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04E20u);
#endif
@@ -72343,7 +72543,8 @@ label_BFC04E34:
psx_cyc_step(cpu, 0x84u);
#endif
/* 0xBFC04E54: 30470007 andi $a3, $v0, 0x7 */
- cpu->gpr[7] = cpu->gpr[2] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] & 0x7u;
+ PGXP_ALU(0x30470007u, cpu->gpr[7], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04E54u);
#endif
@@ -72354,7 +72555,8 @@ label_BFC04E34:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC04E58: 30E700FF andi $a3, $a3, 0xFF */
- cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30E700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04E58u);
#endif
@@ -72375,7 +72577,8 @@ label_BFC04E34:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC04E60: 30430018 andi $v1, $v0, 0x18 */
- cpu->gpr[3] = cpu->gpr[2] & 0x18u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x18u;
+ PGXP_ALU(0x30430018u, cpu->gpr[3], _pgx1, 0x0018u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04E60u);
#endif
@@ -72475,7 +72678,8 @@ label_BFC04E64:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC04E7C: 29010004 slti $at, $t0, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0);
+ PGXP_ALU(0x29010004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04E7Cu);
#endif
@@ -72496,7 +72700,8 @@ label_BFC04E64:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC04E84: 30430018 andi $v1, $v0, 0x18 */
- cpu->gpr[3] = cpu->gpr[2] & 0x18u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x18u;
+ PGXP_ALU(0x30430018u, cpu->gpr[3], _pgx1, 0x0018u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04E84u);
#endif
@@ -72624,7 +72829,8 @@ label_BFC04E88:
psx_cyc_step(cpu, 0x1002u);
#endif
/* 0xBFC04EAC: 29810004 slti $at, $t4, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0);
+ PGXP_ALU(0x29810004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04EACu);
#endif
@@ -72677,7 +72883,8 @@ label_BFC04EB8:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC04EB8: 30430018 andi $v1, $v0, 0x18 */
- cpu->gpr[3] = cpu->gpr[2] & 0x18u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x18u;
+ PGXP_ALU(0x30430018u, cpu->gpr[3], _pgx1, 0x0018u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04EB8u);
#endif
@@ -72695,7 +72902,8 @@ label_BFC04EBC:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC04EBC: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04EBCu);
#endif
@@ -72805,7 +73013,8 @@ label_BFC04EC8:
psx_cyc_step(cpu, 0x2002u);
#endif
/* 0xBFC04EDC: 29A10004 slti $at, $t5, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (4) ? 1 : 0);
+ PGXP_ALU(0x29A10004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04EDCu);
#endif
@@ -72955,7 +73164,8 @@ label_BFC04EE8:
psx_cyc_step(cpu, 0x2000002u);
#endif
/* 0xBFC04F0C: 2B210004 slti $at, $t9, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (4) ? 1 : 0);
+ PGXP_ALU(0x2B210004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04F0Cu);
#endif
@@ -73039,7 +73249,8 @@ label_BFC04F1C:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC04F20: 2D010005 sltiu $at, $t0, 5 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < 0x00000005u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < 0x00000005u ? 1 : 0);
+ PGXP_ALU(0x2D010005u, cpu->gpr[1], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04F20u);
#endif
@@ -73870,7 +74081,8 @@ label_BFC04FBC:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC04FD4: 31CF0008 andi $t7, $t6, 0x8 */
- cpu->gpr[15] = cpu->gpr[14] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x8u;
+ PGXP_ALU(0x31CF0008u, cpu->gpr[15], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04FD4u);
#endif
@@ -73987,7 +74199,8 @@ label_BFC04FE8:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC04FF0: 30580008 andi $t8, $v0, 0x8 */
- cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC04FF0u);
#endif
@@ -74138,7 +74351,8 @@ label_BFC05004:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05018: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05018u);
#endif
@@ -75268,7 +75482,8 @@ label_BFC05120:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC05150: 29010004 slti $at, $t0, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0);
+ PGXP_ALU(0x29010004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05150u);
#endif
@@ -75424,7 +75639,8 @@ label_BFC05160:
psx_cyc_step(cpu, 0x1002u);
#endif
/* 0xBFC05180: 29810004 slti $at, $t4, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0);
+ PGXP_ALU(0x29810004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05180u);
#endif
@@ -77465,7 +77681,8 @@ label_BFC05300:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05304: 2841001A slti $at, $v0, 26 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (26) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (26) ? 1 : 0);
+ PGXP_ALU(0x2841001Au, cpu->gpr[1], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05304u);
#endif
@@ -77550,7 +77767,8 @@ label_BFC05310:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05314: 2841000F slti $at, $v0, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ PGXP_ALU(0x2841000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05314u);
#endif
@@ -77635,7 +77853,8 @@ label_BFC05320:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05324: 28410009 slti $at, $v0, 9 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (9) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (9) ? 1 : 0);
+ PGXP_ALU(0x28410009u, cpu->gpr[1], _pgx1, 0x0009u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05324u);
#endif
@@ -77720,7 +77939,8 @@ label_BFC05330:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05334: 28410006 slti $at, $v0, 6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (6) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (6) ? 1 : 0);
+ PGXP_ALU(0x28410006u, cpu->gpr[1], _pgx1, 0x0006u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05334u);
#endif
@@ -77805,7 +78025,8 @@ label_BFC05340:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05344: 28410004 slti $at, $v0, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4) ? 1 : 0);
+ PGXP_ALU(0x28410004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05344u);
#endif
@@ -78171,7 +78392,8 @@ label_BFC05388:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05390: 2841000C slti $at, $v0, 12 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (12) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (12) ? 1 : 0);
+ PGXP_ALU(0x2841000Cu, cpu->gpr[1], _pgx1, 0x000Cu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05390u);
#endif
@@ -78442,7 +78664,8 @@ label_BFC053C0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC053C8: 28410015 slti $at, $v0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0);
+ PGXP_ALU(0x28410015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC053C8u);
#endif
@@ -78527,7 +78750,8 @@ label_BFC053D4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC053D8: 28410013 slti $at, $v0, 19 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (19) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (19) ? 1 : 0);
+ PGXP_ALU(0x28410013u, cpu->gpr[1], _pgx1, 0x0013u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC053D8u);
#endif
@@ -78800,7 +79024,8 @@ label_BFC05408:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05410: 28410017 slti $at, $v0, 23 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0);
+ PGXP_ALU(0x28410017u, cpu->gpr[1], _pgx1, 0x0017u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05410u);
#endif
@@ -79071,7 +79296,8 @@ label_BFC05440:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05448: 284100F7 slti $at, $v0, 247 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (247) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (247) ? 1 : 0);
+ PGXP_ALU(0x284100F7u, cpu->gpr[1], _pgx1, 0x00F7u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05448u);
#endif
@@ -79156,7 +79382,8 @@ label_BFC05454:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05458: 284100E7 slti $at, $v0, 231 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (231) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (231) ? 1 : 0);
+ PGXP_ALU(0x284100E7u, cpu->gpr[1], _pgx1, 0x00E7u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05458u);
#endif
@@ -79241,7 +79468,8 @@ label_BFC05464:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05468: 28410051 slti $at, $v0, 81 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ PGXP_ALU(0x28410051u, cpu->gpr[1], _pgx1, 0x0051u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05468u);
#endif
@@ -79512,7 +79740,8 @@ label_BFC05498:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC054A0: 284100EF slti $at, $v0, 239 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (239) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (239) ? 1 : 0);
+ PGXP_ALU(0x284100EFu, cpu->gpr[1], _pgx1, 0x00EFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC054A0u);
#endif
@@ -79786,7 +80015,8 @@ label_BFC054D0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC054D8: 28410DDE slti $at, $v0, 3550 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3550) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3550) ? 1 : 0);
+ PGXP_ALU(0x28410DDEu, cpu->gpr[1], _pgx1, 0x0DDEu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC054D8u);
#endif
@@ -79871,7 +80101,8 @@ label_BFC054E4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC054E8: 284100FF slti $at, $v0, 255 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (255) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (255) ? 1 : 0);
+ PGXP_ALU(0x284100FFu, cpu->gpr[1], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC054E8u);
#endif
@@ -80143,7 +80374,8 @@ label_BFC05518:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05520: 28411000 slti $at, $v0, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0);
+ PGXP_ALU(0x28411000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05520u);
#endif
@@ -82070,7 +82302,8 @@ label_BFC056E4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC056E8: 28410CCD slti $at, $v0, 3277 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3277) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3277) ? 1 : 0);
+ PGXP_ALU(0x28410CCDu, cpu->gpr[1], _pgx1, 0x0CCDu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC056E8u);
#endif
@@ -82155,7 +82388,8 @@ label_BFC056F4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC056F8: 28410017 slti $at, $v0, 23 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0);
+ PGXP_ALU(0x28410017u, cpu->gpr[1], _pgx1, 0x0017u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC056F8u);
#endif
@@ -82240,7 +82474,8 @@ label_BFC05704:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05708: 2841000A slti $at, $v0, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (10) ? 1 : 0);
+ PGXP_ALU(0x2841000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05708u);
#endif
@@ -82717,7 +82952,8 @@ label_BFC05768:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC05770: 28411000 slti $at, $v0, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0);
+ PGXP_ALU(0x28411000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05770u);
#endif
@@ -83403,7 +83639,8 @@ label_BFC057EC:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC0581C: 29210004 slti $at, $t1, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (4) ? 1 : 0);
+ PGXP_ALU(0x29210004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0581Cu);
#endif
@@ -83574,7 +83811,8 @@ label_BFC05828:
psx_cyc_step(cpu, 0x8002u);
#endif
/* 0xBFC05854: 29E10004 slti $at, $t7, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (4) ? 1 : 0);
+ PGXP_ALU(0x29E10004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05854u);
#endif
@@ -89293,7 +89531,8 @@ label_BFC05DB0:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC05DBC: 308300FF andi $v1, $a0, 0xFF */
- cpu->gpr[3] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05DBCu);
#endif
@@ -89936,7 +90175,8 @@ label_BFC05E58:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC05E70: 31F80100 andi $t8, $t7, 0x100 */
- cpu->gpr[24] = cpu->gpr[15] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x100u;
+ PGXP_ALU(0x31F80100u, cpu->gpr[24], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC05E70u);
#endif
@@ -91622,7 +91862,8 @@ label_BFC06038:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC06044: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06044u);
#endif
@@ -92171,7 +92412,8 @@ label_BFC060DC:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC060EC: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC060ECu);
#endif
@@ -92236,7 +92478,8 @@ label_BFC060DC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC06104: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06104u);
#endif
@@ -92342,7 +92585,8 @@ label_BFC06114:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC06120: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06120u);
#endif
@@ -93331,7 +93575,8 @@ label_BFC06218:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC06230: 304E0010 andi $t6, $v0, 0x10 */
- cpu->gpr[14] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304E0010u, cpu->gpr[14], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06230u);
#endif
@@ -94016,7 +94261,8 @@ label_BFC062CC:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC062F8: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC062F8u);
#endif
@@ -94027,7 +94273,8 @@ label_BFC062CC:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC062FC: 304E000F andi $t6, $v0, 0xF */
- cpu->gpr[14] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x304E000Fu, cpu->gpr[14], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC062FCu);
#endif
@@ -94050,7 +94297,8 @@ label_BFC062CC:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC06304: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06304u);
#endif
@@ -94163,7 +94411,8 @@ label_BFC062CC:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC0632C: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0632Cu);
#endif
@@ -94174,7 +94423,8 @@ label_BFC062CC:
psx_cyc_step(cpu, 0x8008u);
#endif
/* 0xBFC06330: 306F000F andi $t7, $v1, 0xF */
- cpu->gpr[15] = cpu->gpr[3] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] & 0xFu;
+ PGXP_ALU(0x306F000Fu, cpu->gpr[15], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06330u);
#endif
@@ -94206,7 +94456,8 @@ label_BFC062CC:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC0633C: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0633Cu);
#endif
@@ -94253,7 +94504,8 @@ label_BFC062CC:
psx_cyc_step(cpu, 0x1000040u);
#endif
/* 0xBFC0634C: 30D80010 andi $t8, $a2, 0x10 */
- cpu->gpr[24] = cpu->gpr[6] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] & 0x10u;
+ PGXP_ALU(0x30D80010u, cpu->gpr[24], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0634Cu);
#endif
@@ -94274,7 +94526,8 @@ label_BFC062CC:
psx_cyc_step(cpu, 0x90u);
#endif
/* 0xBFC06354: 308700FF andi $a3, $a0, 0xFF */
- cpu->gpr[7] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06354u);
#endif
@@ -94503,7 +94756,8 @@ label_BFC0636C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC06390: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06390u);
#endif
@@ -94541,7 +94795,8 @@ label_BFC0636C:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC0639C: 314B00FF andi $t3, $t2, 0xFF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFu;
+ PGXP_ALU(0x314B00FFu, cpu->gpr[11], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0639Cu);
#endif
@@ -94932,7 +95187,8 @@ label_BFC063CC:
psx_cyc_step(cpu, 0x10Au);
#endif
/* 0xBFC06414: 0103082B sltu $at, $t0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0103082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06414u);
#endif
@@ -95175,7 +95431,8 @@ label_BFC06444:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC06458: 304A0010 andi $t2, $v0, 0x10 */
- cpu->gpr[10] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304A0010u, cpu->gpr[10], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06458u);
#endif
@@ -95420,7 +95677,8 @@ label_BFC06478:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC06498: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06498u);
#endif
@@ -95458,7 +95716,8 @@ label_BFC06478:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC064A4: 318D00FF andi $t5, $t4, 0xFF */
- cpu->gpr[13] = cpu->gpr[12] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFu;
+ PGXP_ALU(0x318D00FFu, cpu->gpr[13], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC064A4u);
#endif
@@ -95496,7 +95755,8 @@ label_BFC06478:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC064B0: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC064B0u);
#endif
@@ -96600,7 +96860,8 @@ label_BFC065C0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC065D8: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC065D8u);
#endif
@@ -97202,7 +97463,8 @@ label_BFC06680:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC06698: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06698u);
#endif
@@ -98895,7 +99157,8 @@ label_BFC06808:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC06810: 00412024 and $a0, $v0, $at */
- cpu->gpr[4] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00412024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06810u);
#endif
@@ -103837,7 +104100,8 @@ label_BFC06CC8:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC06CD0: 00412024 and $a0, $v0, $at */
- cpu->gpr[4] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00412024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC06CD0u);
#endif
@@ -110741,7 +111005,8 @@ label_BFC073B0:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC073BC: 01C2082A slt $at, $t6, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x01C2082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC073BCu);
#endif
@@ -110897,7 +111162,8 @@ label_BFC073CC:
psx_cyc_step(cpu, 0x106u);
#endif
/* 0xBFC073EC: 0102082A slt $at, $t0, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0102082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC073ECu);
#endif
@@ -112077,7 +112343,8 @@ label_BFC07518:
psx_cyc_step(cpu, 0xE00u);
#endif
/* 0xBFC07528: 012A5826 xor $t3, $t1, $t2 */
- cpu->gpr[11] = cpu->gpr[9] ^ cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] ^ cpu->gpr[10];
+ PGXP_ALU(0x012A5826u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07528u);
#endif
@@ -112112,7 +112379,8 @@ label_BFC07518:
psx_cyc_step(cpu, 0x100006u);
#endif
/* 0xBFC07534: 0054082B sltu $at, $v0, $s4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[20] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[20] ? 1 : 0);
+ PGXP_ALU(0x0054082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07534u);
#endif
@@ -112553,7 +112821,8 @@ label_BFC07580:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC075BC: 3063FFFF andi $v1, $v1, 0xFFFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ PGXP_ALU(0x3063FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC075BCu);
#endif
@@ -112702,7 +112971,8 @@ label_BFC075DC:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC075EC: 30480001 andi $t0, $v0, 0x1 */
- cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC075ECu);
#endif
@@ -112841,7 +113111,8 @@ label_BFC0760C:
psx_cyc_step(cpu, 0x110002u);
#endif
/* 0xBFC0760C: 0214082B sltu $at, $s0, $s4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[20] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[20] ? 1 : 0);
+ PGXP_ALU(0x0214082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0760Cu);
#endif
@@ -113588,7 +113859,8 @@ label_BFC076C8:
psx_cyc_step(cpu, 0x1020002u);
#endif
/* 0xBFC076D4: 0238082A slt $at, $s1, $t8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x0238082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC076D4u);
#endif
@@ -114865,7 +115137,8 @@ label_BFC07834:
psx_cyc_step(cpu, 0xA0002u);
#endif
/* 0xBFC07848: 0233082B sltu $at, $s1, $s3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0233082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07848u);
#endif
@@ -114919,7 +115192,8 @@ label_BFC07854:
psx_cyc_step(cpu, 0x140002u);
#endif
/* 0xBFC07854: 0254082B sltu $at, $s2, $s4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[18] < cpu->gpr[20] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[18] < cpu->gpr[20] ? 1 : 0);
+ PGXP_ALU(0x0254082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07854u);
#endif
@@ -115361,7 +115635,8 @@ label_BFC078C8:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC078C8: 304E0010 andi $t6, $v0, 0x10 */
- cpu->gpr[14] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304E0010u, cpu->gpr[14], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC078C8u);
#endif
@@ -116759,7 +117034,8 @@ label_BFC07A04:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC07A24: 31CF07FF andi $t7, $t6, 0x7FF */
- cpu->gpr[15] = cpu->gpr[14] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x7FFu;
+ PGXP_ALU(0x31CF07FFu, cpu->gpr[15], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07A24u);
#endif
@@ -116915,7 +117191,8 @@ label_BFC07A3C:
psx_cyc_step(cpu, 0x1000010u);
#endif
/* 0xBFC07A44: 309807FF andi $t8, $a0, 0x7FF */
- cpu->gpr[24] = cpu->gpr[4] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0x7FFu;
+ PGXP_ALU(0x309807FFu, cpu->gpr[24], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07A44u);
#endif
@@ -117062,7 +117339,8 @@ label_BFC07A60:
psx_cyc_step(cpu, 0x112u);
#endif
/* 0xBFC07A68: 0088082B sltu $at, $a0, $t0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0088082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07A68u);
#endif
@@ -117228,7 +117506,8 @@ label_BFC07A8C:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC07A90: 304A0010 andi $t2, $v0, 0x10 */
- cpu->gpr[10] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304A0010u, cpu->gpr[10], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07A90u);
#endif
@@ -117951,7 +118230,8 @@ label_BFC07B40:
psx_cyc_step(cpu, 0x406u);
#endif
/* 0xBFC07B50: 004A082B sltu $at, $v0, $t2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x004A082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07B50u);
#endif
@@ -118277,7 +118557,8 @@ label_BFC07B98:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC07B98: 304E0010 andi $t6, $v0, 0x10 */
- cpu->gpr[14] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304E0010u, cpu->gpr[14], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07B98u);
#endif
@@ -119102,7 +119383,8 @@ label_BFC07C1C:
psx_cyc_step(cpu, 0x400004u);
#endif
/* 0xBFC07C58: 2AC2000A slti $v0, $s6, 10 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] < (10) ? 1 : 0);
+ PGXP_ALU(0x2AC2000Au, cpu->gpr[2], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07C58u);
#endif
@@ -120733,7 +121015,8 @@ label_BFC07E14:
psx_cyc_step(cpu, 0x400004u);
#endif
/* 0xBFC07E18: 2AC2000A slti $v0, $s6, 10 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] < (10) ? 1 : 0);
+ PGXP_ALU(0x2AC2000Au, cpu->gpr[2], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07E18u);
#endif
@@ -121504,7 +121787,8 @@ label_BFC07EC0:
psx_cyc_step(cpu, 0x400004u);
#endif
/* 0xBFC07EC4: 2AC2000A slti $v0, $s6, 10 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] < (10) ? 1 : 0);
+ PGXP_ALU(0x2AC2000Au, cpu->gpr[2], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07EC4u);
#endif
@@ -122056,7 +122340,8 @@ label_BFC07F44:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC07F44: 304E00FF andi $t6, $v0, 0xFF */
- cpu->gpr[14] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07F44u);
#endif
@@ -122200,7 +122485,8 @@ label_BFC07F64:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC07F64: 304F00FF andi $t7, $v0, 0xFF */
- cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07F64u);
#endif
@@ -122515,7 +122801,8 @@ label_BFC07FAC:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC07FAC: 305800FF andi $t8, $v0, 0xFF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07FACu);
#endif
@@ -122674,7 +122961,8 @@ label_BFC07FD4:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC07FD4: 305900FF andi $t9, $v0, 0xFF */
- cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC07FD4u);
#endif
@@ -123661,7 +123949,8 @@ label_BFC080B0:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC080B0: 304E0010 andi $t6, $v0, 0x10 */
- cpu->gpr[14] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304E0010u, cpu->gpr[14], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC080B0u);
#endif
@@ -125340,7 +125629,8 @@ label_BFC08264:
psx_cyc_step(cpu, 0x2000Au);
#endif
/* 0xBFC08268: 0223082B sltu $at, $s1, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0223082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08268u);
#endif
@@ -125832,7 +126122,8 @@ label_BFC082D8:
psx_cyc_step(cpu, 0x2000Au);
#endif
/* 0xBFC082E0: 0223082B sltu $at, $s1, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0223082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC082E0u);
#endif
@@ -125914,7 +126205,8 @@ label_BFC082F0:
psx_cyc_step(cpu, 0x2000Au);
#endif
/* 0xBFC082F4: 0223082B sltu $at, $s1, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0223082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC082F4u);
#endif
@@ -127594,7 +127886,8 @@ label_BFC084A0:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC084A4: 2A610008 slti $at, $s3, 8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (8) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (8) ? 1 : 0);
+ PGXP_ALU(0x2A610008u, cpu->gpr[1], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC084A4u);
#endif
@@ -127797,7 +128090,8 @@ label_BFC084CC:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC084D0: 2A610008 slti $at, $s3, 8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (8) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (8) ? 1 : 0);
+ PGXP_ALU(0x2A610008u, cpu->gpr[1], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC084D0u);
#endif
@@ -127825,7 +128119,8 @@ label_BFC084D8:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC084D8: 2A610008 slti $at, $s3, 8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (8) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (8) ? 1 : 0);
+ PGXP_ALU(0x2A610008u, cpu->gpr[1], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC084D8u);
#endif
@@ -128219,7 +128514,8 @@ label_BFC08520:
psx_cyc_step(cpu, 0x420002u);
#endif
/* 0xBFC0852C: 02D1082A slt $at, $s6, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x02D1082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0852Cu);
#endif
@@ -128523,7 +128819,8 @@ label_BFC08574:
psx_cyc_step(cpu, 0xA0002u);
#endif
/* 0xBFC08578: 0271082A slt $at, $s3, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0271082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08578u);
#endif
@@ -130234,7 +130531,8 @@ label_BFC08720:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC0872C: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0872Cu);
#endif
@@ -130254,7 +130552,8 @@ label_BFC08720:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC08734: 004E1026 xor $v0, $v0, $t6 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[14];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[14];
+ PGXP_ALU(0x004E1026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08734u);
#endif
@@ -130265,7 +130564,8 @@ label_BFC08720:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08738: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08738u);
#endif
@@ -130300,7 +130600,8 @@ label_BFC08720:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC08744: 004F1026 xor $v0, $v0, $t7 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[15];
+ PGXP_ALU(0x004F1026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08744u);
#endif
@@ -130311,7 +130612,8 @@ label_BFC08720:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08748: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08748u);
#endif
@@ -130383,7 +130685,8 @@ label_BFC08758:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC08760: 00581026 xor $v0, $v0, $t8 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[24];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[24];
+ PGXP_ALU(0x00581026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08760u);
#endif
@@ -130394,7 +130697,8 @@ label_BFC08758:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08764: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08764u);
#endif
@@ -130414,7 +130718,8 @@ label_BFC08758:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC0876C: 00591026 xor $v0, $v0, $t9 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[25];
+ PGXP_ALU(0x00591026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0876Cu);
#endif
@@ -130425,7 +130730,8 @@ label_BFC08758:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08770: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08770u);
#endif
@@ -130457,7 +130763,8 @@ label_BFC08758:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC0877C: 00481026 xor $v0, $v0, $t0 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[8];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[8];
+ PGXP_ALU(0x00481026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0877Cu);
#endif
@@ -130468,7 +130775,8 @@ label_BFC08758:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08780: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08780u);
#endif
@@ -130515,7 +130823,8 @@ label_BFC08758:
psx_cyc_step(cpu, 0x204u);
#endif
/* 0xBFC08790: 00491026 xor $v0, $v0, $t1 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[9];
+ PGXP_ALU(0x00491026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08790u);
#endif
@@ -130526,7 +130835,8 @@ label_BFC08758:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08794: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08794u);
#endif
@@ -130762,7 +131072,8 @@ label_BFC087C4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC087D0: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087D0u);
#endif
@@ -130782,7 +131093,8 @@ label_BFC087C4:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC087D8: 004E1026 xor $v0, $v0, $t6 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[14];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[14];
+ PGXP_ALU(0x004E1026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087D8u);
#endif
@@ -130793,7 +131105,8 @@ label_BFC087C4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC087DC: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087DCu);
#endif
@@ -130828,7 +131141,8 @@ label_BFC087C4:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC087E8: 004F1026 xor $v0, $v0, $t7 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[15];
+ PGXP_ALU(0x004F1026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087E8u);
#endif
@@ -130839,7 +131153,8 @@ label_BFC087C4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC087EC: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC087ECu);
#endif
@@ -130911,7 +131226,8 @@ label_BFC087FC:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC08804: 00581026 xor $v0, $v0, $t8 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[24];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[24];
+ PGXP_ALU(0x00581026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08804u);
#endif
@@ -130922,7 +131238,8 @@ label_BFC087FC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08808: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08808u);
#endif
@@ -130942,7 +131259,8 @@ label_BFC087FC:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC08810: 00591026 xor $v0, $v0, $t9 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[25];
+ PGXP_ALU(0x00591026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08810u);
#endif
@@ -130953,7 +131271,8 @@ label_BFC087FC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08814: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08814u);
#endif
@@ -130985,7 +131304,8 @@ label_BFC087FC:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC08820: 00481026 xor $v0, $v0, $t0 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[8];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[8];
+ PGXP_ALU(0x00481026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08820u);
#endif
@@ -130996,7 +131316,8 @@ label_BFC087FC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08824: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08824u);
#endif
@@ -131043,7 +131364,8 @@ label_BFC087FC:
psx_cyc_step(cpu, 0x204u);
#endif
/* 0xBFC08834: 00491026 xor $v0, $v0, $t1 */
- cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[9];
+ PGXP_ALU(0x00491026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08834u);
#endif
@@ -131054,7 +131376,8 @@ label_BFC087FC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC08838: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08838u);
#endif
@@ -137556,7 +137879,8 @@ label_BFC08EA8:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC08EAC: 2A01000F slti $at, $s0, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A01000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC08EACu);
#endif
@@ -139632,7 +139956,8 @@ label_BFC09098:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC090A4: 31AE00F0 andi $t6, $t5, 0xF0 */
- cpu->gpr[14] = cpu->gpr[13] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xF0u;
+ PGXP_ALU(0x31AE00F0u, cpu->gpr[14], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC090A4u);
#endif
@@ -145349,7 +145674,8 @@ label_BFC09618:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC0962C: 2A010014 slti $at, $s0, 20 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (20) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (20) ? 1 : 0);
+ PGXP_ALU(0x2A010014u, cpu->gpr[1], _pgx1, 0x0014u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0962Cu);
#endif
@@ -145403,7 +145729,8 @@ label_BFC09630:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC09638: 2A010014 slti $at, $s0, 20 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (20) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (20) ? 1 : 0);
+ PGXP_ALU(0x2A010014u, cpu->gpr[1], _pgx1, 0x0014u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09638u);
#endif
@@ -147781,7 +148108,8 @@ label_BFC09890:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC09890: 38820052 xori $v0, $a0, 0x52 */
- cpu->gpr[2] = cpu->gpr[4] ^ 0x52u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] ^ 0x52u;
+ PGXP_ALU(0x38820052u, cpu->gpr[2], _pgx1, 0x0052u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09890u);
#endif
@@ -147800,7 +148128,8 @@ label_BFC09890:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC09898: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09898u);
#endif
@@ -147835,7 +148164,8 @@ label_BFC0989C:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC0989C: 38820051 xori $v0, $a0, 0x51 */
- cpu->gpr[2] = cpu->gpr[4] ^ 0x51u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] ^ 0x51u;
+ PGXP_ALU(0x38820051u, cpu->gpr[2], _pgx1, 0x0051u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0989Cu);
#endif
@@ -147854,7 +148184,8 @@ label_BFC0989C:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC098A4: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC098A4u);
#endif
@@ -149198,7 +149529,8 @@ label_BFC099D8:
psx_cyc_step(cpu, 0x2080000u);
#endif
/* 0xBFC099D8: 32798000 andi $t9, $s3, 0x8000 */
- cpu->gpr[25] = cpu->gpr[19] & 0x8000u;
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] & 0x8000u;
+ PGXP_ALU(0x32798000u, cpu->gpr[25], _pgx1, 0x8000u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC099D8u);
#endif
@@ -149231,7 +149563,8 @@ label_BFC099D8:
psx_cyc_step(cpu, 0x80800u);
#endif
/* 0xBFC099E4: 326B0200 andi $t3, $s3, 0x200 */
- cpu->gpr[11] = cpu->gpr[19] & 0x200u;
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[11] = cpu->gpr[19] & 0x200u;
+ PGXP_ALU(0x326B0200u, cpu->gpr[11], _pgx1, 0x0200u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC099E4u);
#endif
@@ -149318,7 +149651,8 @@ label_BFC099F4:
psx_cyc_step(cpu, 0x80800u);
#endif
/* 0xBFC099F8: 326B0200 andi $t3, $s3, 0x200 */
- cpu->gpr[11] = cpu->gpr[19] & 0x200u;
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[11] = cpu->gpr[19] & 0x200u;
+ PGXP_ALU(0x326B0200u, cpu->gpr[11], _pgx1, 0x0200u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC099F8u);
#endif
@@ -149393,7 +149727,8 @@ label_BFC09A04:
psx_cyc_step(cpu, 0x80800u);
#endif
/* 0xBFC09A04: 326B0200 andi $t3, $s3, 0x200 */
- cpu->gpr[11] = cpu->gpr[19] & 0x200u;
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[11] = cpu->gpr[19] & 0x200u;
+ PGXP_ALU(0x326B0200u, cpu->gpr[11], _pgx1, 0x0200u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09A04u);
#endif
@@ -149875,7 +150210,8 @@ label_BFC09A80:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC09A88: 31F800F0 andi $t8, $t7, 0xF0 */
- cpu->gpr[24] = cpu->gpr[15] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xF0u;
+ PGXP_ALU(0x31F800F0u, cpu->gpr[24], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09A88u);
#endif
@@ -150014,7 +150350,8 @@ label_BFC09AA4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC09AA8: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09AA8u);
#endif
@@ -150049,7 +150386,8 @@ label_BFC09AA4:
psx_cyc_step(cpu, 0x2000006u);
#endif
/* 0xBFC09AB4: 0322082B sltu $at, $t9, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0322082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09AB4u);
#endif
@@ -150123,7 +150461,8 @@ label_BFC09AC0:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC09AC8: 304B1FFF andi $t3, $v0, 0x1FFF */
- cpu->gpr[11] = cpu->gpr[2] & 0x1FFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x1FFFu;
+ PGXP_ALU(0x304B1FFFu, cpu->gpr[11], _pgx1, 0x1FFFu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09AC8u);
#endif
@@ -150289,7 +150628,8 @@ label_BFC09AF0:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC09AF8: 318D00F0 andi $t5, $t4, 0xF0 */
- cpu->gpr[13] = cpu->gpr[12] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xF0u;
+ PGXP_ALU(0x318D00F0u, cpu->gpr[13], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09AF8u);
#endif
@@ -150854,7 +151194,8 @@ label_BFC09B98:
psx_cyc_step(cpu, 0x10Au);
#endif
/* 0xBFC09B9C: 0068082A slt $at, $v1, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0068082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09B9Cu);
#endif
@@ -150920,7 +151261,8 @@ label_BFC09BA8:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC09BAC: 28610002 slti $at, $v1, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0);
+ PGXP_ALU(0x28610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09BACu);
#endif
@@ -153005,7 +153347,8 @@ label_BFC09DB4:
psx_cyc_step(cpu, 0x2000008u);
#endif
/* 0xBFC09DBC: 3079007F andi $t9, $v1, 0x7F */
- cpu->gpr[25] = cpu->gpr[3] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0x7Fu;
+ PGXP_ALU(0x3079007Fu, cpu->gpr[25], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09DBCu);
#endif
@@ -153145,7 +153488,8 @@ label_BFC09DD8:
psx_cyc_step(cpu, 0x20Au);
#endif
/* 0xBFC09DE0: 0069082B sltu $at, $v1, $t1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0069082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09DE0u);
#endif
@@ -153322,7 +153666,8 @@ label_BFC09DFC:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC09E10: 316C8000 andi $t4, $t3, 0x8000 */
- cpu->gpr[12] = cpu->gpr[11] & 0x8000u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x8000u;
+ PGXP_ALU(0x316C8000u, cpu->gpr[12], _pgx1, 0x8000u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09E10u);
#endif
@@ -154649,7 +154994,8 @@ label_BFC09F78:
psx_cyc_step(cpu, 0x22000u);
#endif
/* 0xBFC09F7C: 322D003F andi $t5, $s1, 0x3F */
- cpu->gpr[13] = cpu->gpr[17] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[13] = cpu->gpr[17] & 0x3Fu;
+ PGXP_ALU(0x322D003Fu, cpu->gpr[13], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09F7Cu);
#endif
@@ -154754,7 +155100,8 @@ label_BFC09F8C:
psx_cyc_step(cpu, 0x40006u);
#endif
/* 0xBFC09F90: 0052082A slt $at, $v0, $s2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0052082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC09F90u);
#endif
@@ -156189,7 +156536,8 @@ label_BFC0A0F8:
psx_cyc_step(cpu, 0x2000008u);
#endif
/* 0xBFC0A100: 3079007F andi $t9, $v1, 0x7F */
- cpu->gpr[25] = cpu->gpr[3] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0x7Fu;
+ PGXP_ALU(0x3079007Fu, cpu->gpr[25], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A100u);
#endif
@@ -156329,7 +156677,8 @@ label_BFC0A11C:
psx_cyc_step(cpu, 0x20Au);
#endif
/* 0xBFC0A124: 0069082B sltu $at, $v1, $t1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0069082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A124u);
#endif
@@ -156506,7 +156855,8 @@ label_BFC0A140:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC0A154: 316C8000 andi $t4, $t3, 0x8000 */
- cpu->gpr[12] = cpu->gpr[11] & 0x8000u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x8000u;
+ PGXP_ALU(0x316C8000u, cpu->gpr[12], _pgx1, 0x8000u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A154u);
#endif
@@ -157881,7 +158231,8 @@ label_BFC0A2CC:
psx_cyc_step(cpu, 0x24000u);
#endif
/* 0xBFC0A2D0: 322E003F andi $t6, $s1, 0x3F */
- cpu->gpr[14] = cpu->gpr[17] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] & 0x3Fu;
+ PGXP_ALU(0x322E003Fu, cpu->gpr[14], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A2D0u);
#endif
@@ -157986,7 +158337,8 @@ label_BFC0A2E0:
psx_cyc_step(cpu, 0x40006u);
#endif
/* 0xBFC0A2E4: 0052082A slt $at, $v0, $s2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0052082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A2E4u);
#endif
@@ -158879,7 +159231,8 @@ label_BFC0A3D4:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC0A3D4: 28C10040 slti $at, $a2, 64 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (64) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (64) ? 1 : 0);
+ PGXP_ALU(0x28C10040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A3D4u);
#endif
@@ -159079,7 +159432,8 @@ label_BFC0A400:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC0A410: 28C10040 slti $at, $a2, 64 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (64) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (64) ? 1 : 0);
+ PGXP_ALU(0x28C10040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A410u);
#endif
@@ -160625,7 +160979,8 @@ label_BFC0A570:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC0A598: 31CF00F0 andi $t7, $t6, 0xF0 */
- cpu->gpr[15] = cpu->gpr[14] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xF0u;
+ PGXP_ALU(0x31CF00F0u, cpu->gpr[15], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A598u);
#endif
@@ -161634,7 +161989,8 @@ label_BFC0A694:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC0A698: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A698u);
#endif
@@ -162095,7 +162451,8 @@ label_BFC0A700:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC0A708: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A708u);
#endif
@@ -162179,7 +162536,8 @@ label_BFC0A718:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC0A71C: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A71Cu);
#endif
@@ -162488,7 +162846,8 @@ label_BFC0A754:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC0A760: 28A1000F slti $at, $a1, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (15) ? 1 : 0);
+ PGXP_ALU(0x28A1000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A760u);
#endif
@@ -163596,7 +163955,8 @@ label_BFC0A87C:
psx_cyc_step(cpu, 0x40002u);
#endif
/* 0xBFC0A880: 2A41000F slti $at, $s2, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A41000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0A880u);
#endif
@@ -175753,7 +176113,8 @@ label_BFC0B488:
psx_cyc_step(cpu, 0x82u);
#endif
/* 0xBFC0B494: 28E10014 slti $at, $a3, 20 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (20) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (20) ? 1 : 0);
+ PGXP_ALU(0x28E10014u, cpu->gpr[1], _pgx1, 0x0014u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0B494u);
#endif
@@ -175840,7 +176201,8 @@ label_BFC0B4A4:
psx_cyc_step(cpu, 0x82u);
#endif
/* 0xBFC0B4A4: 28E10014 slti $at, $a3, 20 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (20) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (20) ? 1 : 0);
+ PGXP_ALU(0x28E10014u, cpu->gpr[1], _pgx1, 0x0014u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0B4A4u);
#endif
@@ -177895,7 +178257,8 @@ label_BFC0B68C:
psx_cyc_step(cpu, 0x8002u);
#endif
/* 0xBFC0B694: 2DE10008 sltiu $at, $t7, 8 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x00000008u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x00000008u ? 1 : 0);
+ PGXP_ALU(0x2DE10008u, cpu->gpr[1], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0B694u);
#endif
@@ -183378,7 +183741,8 @@ label_BFC0BC64:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC0BC80: 2861000F slti $at, $v1, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (15) ? 1 : 0);
+ PGXP_ALU(0x2861000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0BC80u);
#endif
@@ -184844,7 +185208,8 @@ label_BFC0BE0C:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC0BE10: 2A01000F slti $at, $s0, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A01000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0BE10u);
#endif
@@ -185997,7 +186362,8 @@ label_BFC0BF38:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC0BF54: 28610014 slti $at, $v1, 20 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (20) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (20) ? 1 : 0);
+ PGXP_ALU(0x28610014u, cpu->gpr[1], _pgx1, 0x0014u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0BF54u);
#endif
@@ -190783,7 +191149,8 @@ label_BFC0C5F4:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC0C5FC: 29C12710 slti $at, $t6, 10000 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (10000) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (10000) ? 1 : 0);
+ PGXP_ALU(0x29C12710u, cpu->gpr[1], _pgx1, 0x2710u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0C5FCu);
#endif
@@ -190939,7 +191306,8 @@ label_BFC0C60C:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC0C62C: 29012710 slti $at, $t0, 10000 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (10000) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (10000) ? 1 : 0);
+ PGXP_ALU(0x29012710u, cpu->gpr[1], _pgx1, 0x2710u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0C62Cu);
#endif
@@ -191095,7 +191463,8 @@ label_BFC0C648:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC0C654: 2921000A slti $at, $t1, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (10) ? 1 : 0);
+ PGXP_ALU(0x2921000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0C654u);
#endif
@@ -191297,7 +191666,8 @@ label_BFC0C678:
psx_cyc_step(cpu, 0x2002u);
#endif
/* 0xBFC0C690: 29A1000A slti $at, $t5, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (10) ? 1 : 0);
+ PGXP_ALU(0x29A1000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0C690u);
#endif
@@ -191417,7 +191787,8 @@ label_BFC0C6A4:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC0C6B0: 29C1000A slti $at, $t6, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (10) ? 1 : 0);
+ PGXP_ALU(0x29C1000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0C6B0u);
#endif
@@ -191619,7 +191990,8 @@ label_BFC0C6D4:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC0C6EC: 2901000A slti $at, $t0, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (10) ? 1 : 0);
+ PGXP_ALU(0x2901000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0C6ECu);
#endif
@@ -192293,7 +192665,8 @@ label_BFC0C790:
psx_cyc_step(cpu, 0x28002u);
#endif
/* 0xBFC0C798: 01F1082A slt $at, $t7, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x01F1082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0C798u);
#endif
@@ -192449,7 +192822,8 @@ label_BFC0C7A8:
psx_cyc_step(cpu, 0x20202u);
#endif
/* 0xBFC0C7C8: 0131082A slt $at, $t1, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0131082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0C7C8u);
#endif
@@ -194531,7 +194905,8 @@ label_BFC0C9EC:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC0C9F0: 2E210002 sltiu $at, $s1, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2E210002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0C9F0u);
#endif
@@ -195821,7 +196196,8 @@ label_BFC0CB30:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC0CB38: 33280004 andi $t0, $t9, 0x4 */
- cpu->gpr[8] = cpu->gpr[25] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x4u;
+ PGXP_ALU(0x33280004u, cpu->gpr[8], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0CB38u);
#endif
@@ -196500,7 +196876,8 @@ label_BFC0CBEC:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC0CBF4: 31AE0002 andi $t6, $t5, 0x2 */
- cpu->gpr[14] = cpu->gpr[13] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x2u;
+ PGXP_ALU(0x31AE0002u, cpu->gpr[14], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0CBF4u);
#endif
@@ -197796,7 +198173,8 @@ label_BFC0CD20:
psx_cyc_step(cpu, 0x302u);
#endif
/* 0xBFC0CD28: 01014824 and $t1, $t0, $at */
- cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[1];
+ PGXP_ALU(0x01014824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0CD28u);
#endif
@@ -199235,7 +199613,8 @@ label_BFC0CE94:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC0CE9C: 30580001 andi $t8, $v0, 0x1 */
- cpu->gpr[24] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30580001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0CE9Cu);
#endif
@@ -199620,7 +199999,8 @@ label_BFC0CF00:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC0CF08: 304E0001 andi $t6, $v0, 0x1 */
- cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0CF08u);
#endif
@@ -200779,7 +201159,8 @@ label_BFC0CFF0:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC0CFF4: 28810709 slti $at, $a0, 1801 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1801) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1801) ? 1 : 0);
+ PGXP_ALU(0x28810709u, cpu->gpr[1], _pgx1, 0x0709u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0CFF4u);
#endif
@@ -200864,7 +201245,8 @@ label_BFC0D000:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC0D004: 28810097 slti $at, $a0, 151 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (151) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (151) ? 1 : 0);
+ PGXP_ALU(0x28810097u, cpu->gpr[1], _pgx1, 0x0097u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D004u);
#endif
@@ -200949,7 +201331,8 @@ label_BFC0D010:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC0D014: 2881006F slti $at, $a0, 111 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (111) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (111) ? 1 : 0);
+ PGXP_ALU(0x2881006Fu, cpu->gpr[1], _pgx1, 0x006Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D014u);
#endif
@@ -201227,7 +201610,8 @@ label_BFC0D044:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC0D04C: 28810259 slti $at, $a0, 601 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (601) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (601) ? 1 : 0);
+ PGXP_ALU(0x28810259u, cpu->gpr[1], _pgx1, 0x0259u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D04Cu);
#endif
@@ -201504,7 +201888,8 @@ label_BFC0D07C:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC0D084: 28812581 slti $at, $a0, 9601 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (9601) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (9601) ? 1 : 0);
+ PGXP_ALU(0x28812581u, cpu->gpr[1], _pgx1, 0x2581u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D084u);
#endif
@@ -201589,7 +201974,8 @@ label_BFC0D090:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC0D094: 288112C1 slti $at, $a0, 4801 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (4801) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (4801) ? 1 : 0);
+ PGXP_ALU(0x288112C1u, cpu->gpr[1], _pgx1, 0x12C1u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D094u);
#endif
@@ -202396,7 +202782,8 @@ label_BFC0D11C:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC0D144: 30580001 andi $t8, $v0, 0x1 */
- cpu->gpr[24] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30580001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D144u);
#endif
@@ -202417,7 +202804,8 @@ label_BFC0D11C:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC0D14C: 30590010 andi $t9, $v0, 0x10 */
- cpu->gpr[25] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30590010u, cpu->gpr[25], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D14Cu);
#endif
@@ -202492,7 +202880,8 @@ label_BFC0D158:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC0D158: 30590010 andi $t9, $v0, 0x10 */
- cpu->gpr[25] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30590010u, cpu->gpr[25], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D158u);
#endif
@@ -202520,7 +202909,8 @@ label_BFC0D15C:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC0D160: 305900C0 andi $t9, $v0, 0xC0 */
- cpu->gpr[25] = cpu->gpr[2] & 0xC0u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xC0u;
+ PGXP_ALU(0x305900C0u, cpu->gpr[25], _pgx1, 0x00C0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D160u);
#endif
@@ -202573,7 +202963,8 @@ label_BFC0D164:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC0D16C: 31090001 andi $t1, $t0, 0x1 */
- cpu->gpr[9] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31090001u, cpu->gpr[9], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D16Cu);
#endif
@@ -203199,7 +203590,8 @@ label_BFC0D218:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC0D220: 31CF0001 andi $t7, $t6, 0x1 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D220u);
#endif
@@ -203352,7 +203744,8 @@ label_BFC0D240:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC0D240: 305900C0 andi $t9, $v0, 0xC0 */
- cpu->gpr[25] = cpu->gpr[2] & 0xC0u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xC0u;
+ PGXP_ALU(0x305900C0u, cpu->gpr[25], _pgx1, 0x00C0u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D240u);
#endif
@@ -204595,7 +204988,8 @@ label_BFC0D34C:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC0D390: 33280002 andi $t0, $t9, 0x2 */
- cpu->gpr[8] = cpu->gpr[25] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x2u;
+ PGXP_ALU(0x33280002u, cpu->gpr[8], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D390u);
#endif
@@ -204702,7 +205096,8 @@ label_BFC0D3A4:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC0D3AC: 312A0002 andi $t2, $t1, 0x2 */
- cpu->gpr[10] = cpu->gpr[9] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x2u;
+ PGXP_ALU(0x312A0002u, cpu->gpr[10], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D3ACu);
#endif
@@ -204890,7 +205285,8 @@ label_BFC0D3D8:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC0D3E0: 31AE0004 andi $t6, $t5, 0x4 */
- cpu->gpr[14] = cpu->gpr[13] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x4u;
+ PGXP_ALU(0x31AE0004u, cpu->gpr[14], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D3E0u);
#endif
@@ -205053,7 +205449,8 @@ label_BFC0D400:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC0D408: 31F80004 andi $t8, $t7, 0x4 */
- cpu->gpr[24] = cpu->gpr[15] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x4u;
+ PGXP_ALU(0x31F80004u, cpu->gpr[24], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D408u);
#endif
@@ -205937,7 +206334,8 @@ label_BFC0D4F0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC0D4F4: 2C41000F sltiu $at, $v0, 15 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000000Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000000Fu ? 1 : 0);
+ PGXP_ALU(0x2C41000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D4F4u);
#endif
@@ -207768,7 +208166,8 @@ label_BFC0D6B4:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC0D6D4: 30510007 andi $s1, $v0, 0x7 */
- cpu->gpr[17] = cpu->gpr[2] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[17] = cpu->gpr[2] & 0x7u;
+ PGXP_ALU(0x30510007u, cpu->gpr[17], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D6D4u);
#endif
@@ -207789,7 +208188,8 @@ label_BFC0D6B4:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC0D6DC: 2A010005 slti $at, $s0, 5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (5) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (5) ? 1 : 0);
+ PGXP_ALU(0x2A010005u, cpu->gpr[1], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D6DCu);
#endif
@@ -207878,7 +208278,8 @@ label_BFC0D6E8:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC0D6F0: 2A010005 slti $at, $s0, 5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (5) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (5) ? 1 : 0);
+ PGXP_ALU(0x2A010005u, cpu->gpr[1], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D6F0u);
#endif
@@ -208377,7 +208778,8 @@ label_BFC0D764:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC0D768: 3059001D andi $t9, $v0, 0x1D */
- cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D768u);
#endif
@@ -208488,7 +208890,8 @@ label_BFC0D77C:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC0D77C: 3059001D andi $t9, $v0, 0x1D */
- cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D77Cu);
#endif
@@ -209026,7 +209429,8 @@ label_BFC0D7F4:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC0D7F8: 3059001D andi $t9, $v0, 0x1D */
- cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D7F8u);
#endif
@@ -209137,7 +209541,8 @@ label_BFC0D80C:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC0D80C: 3059001D andi $t9, $v0, 0x1D */
- cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); }
#ifdef PSX_COSIM
cosim_instr(0xBFC0D80Cu);
#endif
@@ -213728,7 +214133,8 @@ label_BFC100A8:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC100B0: 0043082B sltu $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000005B0u);
#endif
@@ -215055,7 +215461,8 @@ label_BFC107C0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC107C0: 3042003C andi $v0, $v0, 0x3C */
- cpu->gpr[2] = cpu->gpr[2] & 0x3Cu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x3Cu;
+ PGXP_ALU(0x3042003Cu, cpu->gpr[2], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x00000CC0u);
#endif
@@ -215128,7 +215535,8 @@ label_BFC107CC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC107D8: 304200FE andi $v0, $v0, 0xFE */
- cpu->gpr[2] = cpu->gpr[2] & 0xFEu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFEu;
+ PGXP_ALU(0x304200FEu, cpu->gpr[2], _pgx1, 0x00FEu); }
#ifdef PSX_COSIM
cosim_instr(0x00000CD8u);
#endif
@@ -217494,7 +217902,8 @@ label_BFC10B38:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC10B44: 0044082B sltu $at, $v0, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001044u);
#endif
@@ -217709,7 +218118,8 @@ label_BFC10B64:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC10B88: 0043082B sltu $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001088u);
#endif
@@ -217727,7 +218137,8 @@ label_BFC10B64:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC10B90: 0045082B sltu $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001090u);
#endif
@@ -217799,7 +218210,8 @@ label_BFC10B9C:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC10B9C: 0045082B sltu $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000109Cu);
#endif
@@ -217988,7 +218400,8 @@ label_BFC10BB8:
psx_cyc_step(cpu, 0x8012u);
#endif
/* 0xBFC10BCC: 008F082B sltu $at, $a0, $t7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x008F082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000010CCu);
#endif
@@ -218815,7 +219228,8 @@ label_BFC10C74:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC10CAC: 02218824 and $s1, $s1, $at */
- cpu->gpr[17] = cpu->gpr[17] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[17] = cpu->gpr[17] & cpu->gpr[1];
+ PGXP_ALU(0x02218824u, cpu->gpr[17], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000011ACu);
#endif
@@ -218928,7 +219342,8 @@ label_BFC10CB8:
psx_cyc_step(cpu, 0x8006u);
#endif
/* 0xBFC10CCC: 004F082B sltu $at, $v0, $t7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x004F082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000011CCu);
#endif
@@ -219327,7 +219742,8 @@ label_BFC10D30:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC10D44: 30830001 andi $v1, $a0, 0x1 */
- cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00001244u);
#endif
@@ -219400,7 +219816,8 @@ label_BFC10D50:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC10D58: 0044082B sltu $at, $v0, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001258u);
#endif
@@ -219450,7 +219867,8 @@ label_BFC10D5C:
psx_cyc_step(cpu, 0x40210u);
#endif
/* 0xBFC10D64: 00924824 and $t1, $a0, $s2 */
- cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[18];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[18];
+ PGXP_ALU(0x00924824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001264u);
#endif
@@ -219498,7 +219916,8 @@ label_BFC10D70:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC10D70: 0044082B sltu $at, $v0, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001270u);
#endif
@@ -219523,7 +219942,8 @@ label_BFC10D74:
psx_cyc_step(cpu, 0x20012u);
#endif
/* 0xBFC10D78: 0091082B sltu $at, $a0, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0091082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001278u);
#endif
@@ -219750,7 +220170,8 @@ label_BFC10DB8:
psx_cyc_step(cpu, 0x20012u);
#endif
/* 0xBFC10DB8: 0091082B sltu $at, $a0, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0091082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000012B8u);
#endif
@@ -219880,7 +220301,8 @@ label_BFC10DC4:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC10DE4: 304E0001 andi $t6, $v0, 0x1 */
- cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x000012E4u);
#endif
@@ -220146,7 +220568,8 @@ label_BFC10E20:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC10E20: 304E0001 andi $t6, $v0, 0x1 */
- cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00001320u);
#endif
@@ -220203,7 +220626,8 @@ label_BFC10E2C:
psx_cyc_step(cpu, 0x42004u);
#endif
/* 0xBFC10E2C: 00526824 and $t5, $v0, $s2 */
- cpu->gpr[13] = cpu->gpr[2] & cpu->gpr[18];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[2] & cpu->gpr[18];
+ PGXP_ALU(0x00526824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000132Cu);
#endif
@@ -220357,7 +220781,8 @@ label_BFC10E50:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC10E64: 30830001 andi $v1, $a0, 0x1 */
- cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00001364u);
#endif
@@ -220781,7 +221206,8 @@ label_BFC10EC8:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC10EDC: 30830001 andi $v1, $a0, 0x1 */
- cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x000013DCu);
#endif
@@ -222086,7 +222512,8 @@ label_BFC11008:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC11040: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001540u);
#endif
@@ -222683,7 +223110,8 @@ label_BFC110F8:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC110F8: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x000015F8u);
#endif
@@ -222691,7 +223119,8 @@ label_BFC110F8:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC110FC: 28810003 slti $at, $a0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x000015FCu);
#endif
@@ -222702,7 +223131,8 @@ label_BFC110F8:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC11100: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001600u);
#endif
@@ -222866,7 +223296,8 @@ label_BFC11114:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC11124: 00811026 xor $v0, $a0, $at */
- cpu->gpr[2] = cpu->gpr[4] ^ cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[4] ^ cpu->gpr[1];
+ PGXP_ALU(0x00811026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001624u);
#endif
@@ -222895,7 +223326,8 @@ label_BFC11114:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC11130: 2C420001 sltiu $v0, $v0, 1 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00001630u);
#endif
@@ -223001,7 +223433,8 @@ label_BFC1114C:
psx_cyc_step(cpu, 0x2000080u);
#endif
/* 0xBFC1114C: 30F90010 andi $t9, $a3, 0x10 */
- cpu->gpr[25] = cpu->gpr[7] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x10u;
+ PGXP_ALU(0x30F90010u, cpu->gpr[25], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x0000164Cu);
#endif
@@ -223019,7 +223452,8 @@ label_BFC1114C:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC11154: 30E80001 andi $t0, $a3, 0x1 */
- cpu->gpr[8] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30E80001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00001654u);
#endif
@@ -223060,7 +223494,8 @@ label_BFC11158:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC1115C: 30E80001 andi $t0, $a3, 0x1 */
- cpu->gpr[8] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30E80001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x0000165Cu);
#endif
@@ -223085,7 +223520,8 @@ label_BFC11160:
psx_cyc_step(cpu, 0x880u);
#endif
/* 0xBFC11164: 30EB1000 andi $t3, $a3, 0x1000 */
- cpu->gpr[11] = cpu->gpr[7] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x1000u;
+ PGXP_ALU(0x30EB1000u, cpu->gpr[11], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x00001664u);
#endif
@@ -223183,7 +223619,8 @@ label_BFC11174:
psx_cyc_step(cpu, 0x880u);
#endif
/* 0xBFC11178: 30EB1000 andi $t3, $a3, 0x1000 */
- cpu->gpr[11] = cpu->gpr[7] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x1000u;
+ PGXP_ALU(0x30EB1000u, cpu->gpr[11], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x00001678u);
#endif
@@ -223215,7 +223652,8 @@ label_BFC1117C:
psx_cyc_step(cpu, 0x480u);
#endif
/* 0xBFC1117C: 30EA0001 andi $t2, $a3, 0x1 */
- cpu->gpr[10] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[10] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30EA0001u, cpu->gpr[10], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x0000167Cu);
#endif
@@ -223233,7 +223671,8 @@ label_BFC1117C:
psx_cyc_step(cpu, 0x880u);
#endif
/* 0xBFC11184: 30EB1000 andi $t3, $a3, 0x1000 */
- cpu->gpr[11] = cpu->gpr[7] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x1000u;
+ PGXP_ALU(0x30EB1000u, cpu->gpr[11], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x00001684u);
#endif
@@ -223284,7 +223723,8 @@ label_BFC1118C:
psx_cyc_step(cpu, 0x880u);
#endif
/* 0xBFC1118C: 30EB1000 andi $t3, $a3, 0x1000 */
- cpu->gpr[11] = cpu->gpr[7] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x1000u;
+ PGXP_ALU(0x30EB1000u, cpu->gpr[11], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x0000168Cu);
#endif
@@ -223431,7 +223871,8 @@ label_BFC111AC:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC111AC: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x000016ACu);
#endif
@@ -223442,7 +223883,8 @@ label_BFC111AC:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC111B0: 28810003 slti $at, $a0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x000016B0u);
#endif
@@ -223645,7 +224087,8 @@ label_BFC111E4:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC111E8: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x000016E8u);
#endif
@@ -223704,7 +224147,8 @@ label_BFC111E4:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC11204: 28810003 slti $at, $a0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00001704u);
#endif
@@ -223857,7 +224301,8 @@ label_BFC11228:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC11228: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001728u);
#endif
@@ -223925,7 +224370,8 @@ label_BFC11228:
psx_cyc_step(cpu, 0x3000001u);
#endif
/* 0xBFC11248: 0300C827 nor $t9, $t8, $zero */
- cpu->gpr[25] = ~(cpu->gpr[24] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[24] | cpu->gpr[0]);
+ PGXP_ALU(0x0300C827u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001748u);
#endif
@@ -223933,7 +224379,8 @@ label_BFC11228:
psx_cyc_step(cpu, 0x2004100u);
#endif
/* 0xBFC1124C: 01D94024 and $t0, $t6, $t9 */
- cpu->gpr[8] = cpu->gpr[14] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[14] & cpu->gpr[25];
+ PGXP_ALU(0x01D94024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000174Cu);
#endif
@@ -224004,7 +224451,8 @@ label_BFC1125C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC1125C: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x0000175Cu);
#endif
@@ -224015,7 +224463,8 @@ label_BFC1125C:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC11260: 28810003 slti $at, $a0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x00001760u);
#endif
@@ -224273,7 +224722,8 @@ label_BFC11294:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC112AC: 31CF0010 andi $t7, $t6, 0x10 */
- cpu->gpr[15] = cpu->gpr[14] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x10u;
+ PGXP_ALU(0x31CF0010u, cpu->gpr[15], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x000017ACu);
#endif
@@ -224340,7 +224790,8 @@ label_BFC112B8:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC112C0: 33190010 andi $t9, $t8, 0x10 */
- cpu->gpr[25] = cpu->gpr[24] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x10u;
+ PGXP_ALU(0x33190010u, cpu->gpr[25], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x000017C0u);
#endif
@@ -224631,7 +225082,8 @@ label_BFC112F4:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC1130C: 31CF0020 andi $t7, $t6, 0x20 */
- cpu->gpr[15] = cpu->gpr[14] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x20u;
+ PGXP_ALU(0x31CF0020u, cpu->gpr[15], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x0000180Cu);
#endif
@@ -224698,7 +225150,8 @@ label_BFC11318:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC11320: 33190020 andi $t9, $t8, 0x20 */
- cpu->gpr[25] = cpu->gpr[24] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x20u;
+ PGXP_ALU(0x33190020u, cpu->gpr[25], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x00001820u);
#endif
@@ -225004,7 +225457,8 @@ label_BFC11358:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC11370: 31CF0040 andi $t7, $t6, 0x40 */
- cpu->gpr[15] = cpu->gpr[14] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x40u;
+ PGXP_ALU(0x31CF0040u, cpu->gpr[15], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x00001870u);
#endif
@@ -225068,7 +225522,8 @@ label_BFC1137C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC11384: 33190040 andi $t9, $t8, 0x40 */
- cpu->gpr[25] = cpu->gpr[24] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x40u;
+ PGXP_ALU(0x33190040u, cpu->gpr[25], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x00001884u);
#endif
@@ -225371,7 +225826,8 @@ label_BFC113BC:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC113D4: 31CF0001 andi $t7, $t6, 0x1 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x000018D4u);
#endif
@@ -225432,7 +225888,8 @@ label_BFC113E0:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC113E8: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x000018E8u);
#endif
@@ -226513,7 +226970,8 @@ label_BFC11500:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC11520: 3063003C andi $v1, $v1, 0x3C */
- cpu->gpr[3] = cpu->gpr[3] & 0x3Cu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x3Cu;
+ PGXP_ALU(0x3063003Cu, cpu->gpr[3], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x00001A20u);
#endif
@@ -226648,7 +227106,8 @@ label_BFC1152C:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC11538: 2C610004 sltiu $at, $v1, 4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000004u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000004u ? 1 : 0);
+ PGXP_ALU(0x2C610004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00001A38u);
#endif
@@ -226829,7 +227288,8 @@ label_BFC11560:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC11568: 31090404 andi $t1, $t0, 0x404 */
- cpu->gpr[9] = cpu->gpr[8] & 0x404u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x404u;
+ PGXP_ALU(0x31090404u, cpu->gpr[9], _pgx1, 0x0404u); }
#ifdef PSX_COSIM
cosim_instr(0x00001A68u);
#endif
@@ -226962,7 +227422,8 @@ label_BFC11584:
psx_cyc_step(cpu, 0x1802u);
#endif
/* 0xBFC1158C: 01616024 and $t4, $t3, $at */
- cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[1];
+ PGXP_ALU(0x01616024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001A8Cu);
#endif
@@ -227964,7 +228425,8 @@ label_BFC11644:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC11694: 0062082B sltu $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001B94u);
#endif
@@ -228481,7 +228943,8 @@ label_BFC11720:
psx_cyc_step(cpu, 0x110002u);
#endif
/* 0xBFC11724: 0214082B sltu $at, $s0, $s4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[20] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[20] ? 1 : 0);
+ PGXP_ALU(0x0214082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001C24u);
#endif
@@ -228793,7 +229256,8 @@ label_BFC1175C:
psx_cyc_step(cpu, 0x8Au);
#endif
/* 0xBFC11790: 0067082B sltu $at, $v1, $a3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x0067082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001C90u);
#endif
@@ -229124,7 +229588,8 @@ label_BFC117E8:
psx_cyc_step(cpu, 0x46u);
#endif
/* 0xBFC117EC: 0046082B sltu $at, $v0, $a2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x0046082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001CECu);
#endif
@@ -229340,7 +229805,8 @@ label_BFC11800:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC11834: 01C2082B sltu $at, $t6, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x01C2082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001D34u);
#endif
@@ -229583,7 +230049,8 @@ label_BFC11870:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC11874: 0062082B sltu $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001D74u);
#endif
@@ -230117,7 +230584,8 @@ label_BFC1191C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC1191C: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001E1Cu);
#endif
@@ -230245,7 +230713,8 @@ label_BFC11944:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC11944: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001E44u);
#endif
@@ -230725,7 +231194,8 @@ label_BFC119C8:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC119C8: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001EC8u);
#endif
@@ -230970,7 +231440,8 @@ label_BFC11A10:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC11A10: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001F10u);
#endif
@@ -231172,7 +231643,8 @@ label_BFC11A4C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC11A4C: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x00001F4Cu);
#endif
@@ -231502,7 +231974,8 @@ label_BFC11A88:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC11ABC: 01C2082B sltu $at, $t6, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x01C2082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00001FBCu);
#endif
@@ -231752,7 +232225,8 @@ label_BFC11AFC:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC11B00: 0062082B sltu $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002000u);
#endif
@@ -232289,7 +232763,8 @@ label_BFC11BA8:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC11BA8: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x000020A8u);
#endif
@@ -232434,7 +232909,8 @@ label_BFC11BD4:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC11BD8: 3063FFFF andi $v1, $v1, 0xFFFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ PGXP_ALU(0x3063FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x000020D8u);
#endif
@@ -233318,7 +233794,8 @@ label_BFC11C8C:
psx_cyc_step(cpu, 0x100C000u);
#endif
/* 0xBFC11CA8: 01CFC024 and $t8, $t6, $t7 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000021A8u);
#endif
@@ -233326,7 +233803,8 @@ label_BFC11C8C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC11CAC: 33190004 andi $t9, $t8, 0x4 */
- cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x000021ACu);
#endif
@@ -233490,7 +233968,8 @@ label_BFC11CD4:
psx_cyc_step(cpu, 0x700u);
#endif
/* 0xBFC11CE0: 01095024 and $t2, $t0, $t1 */
- cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000021E0u);
#endif
@@ -233498,7 +233977,8 @@ label_BFC11CD4:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC11CE4: 314B0200 andi $t3, $t2, 0x200 */
- cpu->gpr[11] = cpu->gpr[10] & 0x200u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x200u;
+ PGXP_ALU(0x314B0200u, cpu->gpr[11], _pgx1, 0x0200u); }
#ifdef PSX_COSIM
cosim_instr(0x000021E4u);
#endif
@@ -233653,7 +234133,8 @@ label_BFC11D0C:
psx_cyc_step(cpu, 0x7000u);
#endif
/* 0xBFC11D18: 018D7024 and $t6, $t4, $t5 */
- cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002218u);
#endif
@@ -233661,7 +234142,8 @@ label_BFC11D0C:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC11D1C: 31CF0002 andi $t7, $t6, 0x2 */
- cpu->gpr[15] = cpu->gpr[14] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x2u;
+ PGXP_ALU(0x31CF0002u, cpu->gpr[15], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x0000221Cu);
#endif
@@ -233825,7 +234307,8 @@ label_BFC11D44:
psx_cyc_step(cpu, 0x3000100u);
#endif
/* 0xBFC11D50: 03194024 and $t0, $t8, $t9 */
- cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002250u);
#endif
@@ -233833,7 +234316,8 @@ label_BFC11D44:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC11D54: 31090400 andi $t1, $t0, 0x400 */
- cpu->gpr[9] = cpu->gpr[8] & 0x400u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x400u;
+ PGXP_ALU(0x31090400u, cpu->gpr[9], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x00002254u);
#endif
@@ -233988,7 +234472,8 @@ label_BFC11D7C:
psx_cyc_step(cpu, 0x1C00u);
#endif
/* 0xBFC11D88: 014B6024 and $t4, $t2, $t3 */
- cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002288u);
#endif
@@ -233996,7 +234481,8 @@ label_BFC11D7C:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC11D8C: 318D0100 andi $t5, $t4, 0x100 */
- cpu->gpr[13] = cpu->gpr[12] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x100u;
+ PGXP_ALU(0x318D0100u, cpu->gpr[13], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x0000228Cu);
#endif
@@ -234160,7 +234646,8 @@ label_BFC11DB4:
psx_cyc_step(cpu, 0x100C000u);
#endif
/* 0xBFC11DC0: 01CFC024 and $t8, $t6, $t7 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000022C0u);
#endif
@@ -234168,7 +234655,8 @@ label_BFC11DB4:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC11DC4: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x000022C4u);
#endif
@@ -234323,7 +234811,8 @@ label_BFC11DEC:
psx_cyc_step(cpu, 0x700u);
#endif
/* 0xBFC11DF8: 01095024 and $t2, $t0, $t1 */
- cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000022F8u);
#endif
@@ -234331,7 +234820,8 @@ label_BFC11DEC:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC11DFC: 314B0010 andi $t3, $t2, 0x10 */
- cpu->gpr[11] = cpu->gpr[10] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x10u;
+ PGXP_ALU(0x314B0010u, cpu->gpr[11], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x000022FCu);
#endif
@@ -234495,7 +234985,8 @@ label_BFC11E24:
psx_cyc_step(cpu, 0x7000u);
#endif
/* 0xBFC11E30: 018D7024 and $t6, $t4, $t5 */
- cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002330u);
#endif
@@ -234503,7 +234994,8 @@ label_BFC11E24:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC11E34: 31CF0020 andi $t7, $t6, 0x20 */
- cpu->gpr[15] = cpu->gpr[14] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x20u;
+ PGXP_ALU(0x31CF0020u, cpu->gpr[15], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x00002334u);
#endif
@@ -234658,7 +235150,8 @@ label_BFC11E5C:
psx_cyc_step(cpu, 0x3000100u);
#endif
/* 0xBFC11E68: 03194024 and $t0, $t8, $t9 */
- cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002368u);
#endif
@@ -234666,7 +235159,8 @@ label_BFC11E5C:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC11E6C: 31090040 andi $t1, $t0, 0x40 */
- cpu->gpr[9] = cpu->gpr[8] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x40u;
+ PGXP_ALU(0x31090040u, cpu->gpr[9], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x0000236Cu);
#endif
@@ -234830,7 +235324,8 @@ label_BFC11E94:
psx_cyc_step(cpu, 0x1C00u);
#endif
/* 0xBFC11EA0: 014B6024 and $t4, $t2, $t3 */
- cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000023A0u);
#endif
@@ -234838,7 +235333,8 @@ label_BFC11E94:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC11EA4: 318D0080 andi $t5, $t4, 0x80 */
- cpu->gpr[13] = cpu->gpr[12] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x80u;
+ PGXP_ALU(0x318D0080u, cpu->gpr[13], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000023A4u);
#endif
@@ -234993,7 +235489,8 @@ label_BFC11ECC:
psx_cyc_step(cpu, 0x100C000u);
#endif
/* 0xBFC11ED8: 01CFC024 and $t8, $t6, $t7 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000023D8u);
#endif
@@ -235001,7 +235498,8 @@ label_BFC11ECC:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC11EDC: 33190008 andi $t9, $t8, 0x8 */
- cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x000023DCu);
#endif
@@ -235345,7 +235843,8 @@ label_BFC11F40:
psx_cyc_step(cpu, 0x811u);
#endif
/* 0xBFC11F40: 00805827 nor $t3, $a0, $zero */
- cpu->gpr[11] = ~(cpu->gpr[4] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = ~(cpu->gpr[4] | cpu->gpr[0]);
+ PGXP_ALU(0x00805827u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002440u);
#endif
@@ -235561,7 +236060,8 @@ label_BFC11F58:
psx_cyc_step(cpu, 0x100C000u);
#endif
/* 0xBFC11F74: 01CFC024 and $t8, $t6, $t7 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002474u);
#endif
@@ -235569,7 +236069,8 @@ label_BFC11F58:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC11F78: 33190004 andi $t9, $t8, 0x4 */
- cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00002478u);
#endif
@@ -235727,7 +236228,8 @@ label_BFC11FA0:
psx_cyc_step(cpu, 0x700u);
#endif
/* 0xBFC11FAC: 01095024 and $t2, $t0, $t1 */
- cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000024ACu);
#endif
@@ -235738,7 +236240,8 @@ label_BFC11FA0:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC11FB0: 314B0200 andi $t3, $t2, 0x200 */
- cpu->gpr[11] = cpu->gpr[10] & 0x200u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x200u;
+ PGXP_ALU(0x314B0200u, cpu->gpr[11], _pgx1, 0x0200u); }
#ifdef PSX_COSIM
cosim_instr(0x000024B0u);
#endif
@@ -235899,7 +236402,8 @@ label_BFC11FD8:
psx_cyc_step(cpu, 0x7000u);
#endif
/* 0xBFC11FE4: 018D7024 and $t6, $t4, $t5 */
- cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000024E4u);
#endif
@@ -235907,7 +236411,8 @@ label_BFC11FD8:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC11FE8: 31CF0002 andi $t7, $t6, 0x2 */
- cpu->gpr[15] = cpu->gpr[14] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x2u;
+ PGXP_ALU(0x31CF0002u, cpu->gpr[15], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x000024E8u);
#endif
@@ -236065,7 +236570,8 @@ label_BFC12010:
psx_cyc_step(cpu, 0x3000100u);
#endif
/* 0xBFC1201C: 03194024 and $t0, $t8, $t9 */
- cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000251Cu);
#endif
@@ -236076,7 +236582,8 @@ label_BFC12010:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC12020: 31090400 andi $t1, $t0, 0x400 */
- cpu->gpr[9] = cpu->gpr[8] & 0x400u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x400u;
+ PGXP_ALU(0x31090400u, cpu->gpr[9], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x00002520u);
#endif
@@ -236237,7 +236744,8 @@ label_BFC12048:
psx_cyc_step(cpu, 0x1C00u);
#endif
/* 0xBFC12054: 014B6024 and $t4, $t2, $t3 */
- cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002554u);
#endif
@@ -236245,7 +236753,8 @@ label_BFC12048:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC12058: 318D0100 andi $t5, $t4, 0x100 */
- cpu->gpr[13] = cpu->gpr[12] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x100u;
+ PGXP_ALU(0x318D0100u, cpu->gpr[13], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x00002558u);
#endif
@@ -236403,7 +236912,8 @@ label_BFC12080:
psx_cyc_step(cpu, 0x100C000u);
#endif
/* 0xBFC1208C: 01CFC024 and $t8, $t6, $t7 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000258Cu);
#endif
@@ -236414,7 +236924,8 @@ label_BFC12080:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC12090: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00002590u);
#endif
@@ -236575,7 +237086,8 @@ label_BFC120B8:
psx_cyc_step(cpu, 0x700u);
#endif
/* 0xBFC120C4: 01095024 and $t2, $t0, $t1 */
- cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000025C4u);
#endif
@@ -236583,7 +237095,8 @@ label_BFC120B8:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC120C8: 314B0010 andi $t3, $t2, 0x10 */
- cpu->gpr[11] = cpu->gpr[10] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x10u;
+ PGXP_ALU(0x314B0010u, cpu->gpr[11], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x000025C8u);
#endif
@@ -236741,7 +237254,8 @@ label_BFC120F0:
psx_cyc_step(cpu, 0x7000u);
#endif
/* 0xBFC120FC: 018D7024 and $t6, $t4, $t5 */
- cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000025FCu);
#endif
@@ -236752,7 +237266,8 @@ label_BFC120F0:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC12100: 31CF0020 andi $t7, $t6, 0x20 */
- cpu->gpr[15] = cpu->gpr[14] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x20u;
+ PGXP_ALU(0x31CF0020u, cpu->gpr[15], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x00002600u);
#endif
@@ -236913,7 +237428,8 @@ label_BFC12128:
psx_cyc_step(cpu, 0x3000100u);
#endif
/* 0xBFC12134: 03194024 and $t0, $t8, $t9 */
- cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002634u);
#endif
@@ -236921,7 +237437,8 @@ label_BFC12128:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC12138: 31090040 andi $t1, $t0, 0x40 */
- cpu->gpr[9] = cpu->gpr[8] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x40u;
+ PGXP_ALU(0x31090040u, cpu->gpr[9], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x00002638u);
#endif
@@ -237079,7 +237596,8 @@ label_BFC12160:
psx_cyc_step(cpu, 0x1C00u);
#endif
/* 0xBFC1216C: 014B6024 and $t4, $t2, $t3 */
- cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000266Cu);
#endif
@@ -237090,7 +237608,8 @@ label_BFC12160:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC12170: 318D0080 andi $t5, $t4, 0x80 */
- cpu->gpr[13] = cpu->gpr[12] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x80u;
+ PGXP_ALU(0x318D0080u, cpu->gpr[13], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00002670u);
#endif
@@ -237251,7 +237770,8 @@ label_BFC12198:
psx_cyc_step(cpu, 0x100C000u);
#endif
/* 0xBFC121A4: 01CFC024 and $t8, $t6, $t7 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000026A4u);
#endif
@@ -237259,7 +237779,8 @@ label_BFC12198:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC121A8: 33190008 andi $t9, $t8, 0x8 */
- cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u;
+ PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x000026A8u);
#endif
@@ -237597,7 +238118,8 @@ label_BFC1220C:
psx_cyc_step(cpu, 0x811u);
#endif
/* 0xBFC1220C: 00805827 nor $t3, $a0, $zero */
- cpu->gpr[11] = ~(cpu->gpr[4] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = ~(cpu->gpr[4] | cpu->gpr[0]);
+ PGXP_ALU(0x00805827u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000270Cu);
#endif
@@ -241614,7 +242136,8 @@ label_BFC12670:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC12680: 33190010 andi $t9, $t8, 0x10 */
- cpu->gpr[25] = cpu->gpr[24] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x10u;
+ PGXP_ALU(0x33190010u, cpu->gpr[25], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00002B80u);
#endif
@@ -241855,7 +242378,8 @@ label_BFC126B8:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC126D4: 318D0004 andi $t5, $t4, 0x4 */
- cpu->gpr[13] = cpu->gpr[12] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x4u;
+ PGXP_ALU(0x318D0004u, cpu->gpr[13], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00002BD4u);
#endif
@@ -242890,7 +243414,8 @@ label_BFC127DC:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC127EC: 33190010 andi $t9, $t8, 0x10 */
- cpu->gpr[25] = cpu->gpr[24] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x10u;
+ PGXP_ALU(0x33190010u, cpu->gpr[25], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x00002CECu);
#endif
@@ -243131,7 +243656,8 @@ label_BFC12824:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC12840: 318D0004 andi $t5, $t4, 0x4 */
- cpu->gpr[13] = cpu->gpr[12] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x4u;
+ PGXP_ALU(0x318D0004u, cpu->gpr[13], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00002D40u);
#endif
@@ -245110,7 +245636,8 @@ label_BFC12A5C:
psx_cyc_step(cpu, 0x100000Au);
#endif
/* 0xBFC12A5C: 0061C024 and $t8, $v1, $at */
- cpu->gpr[24] = cpu->gpr[3] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[3] & cpu->gpr[1];
+ PGXP_ALU(0x0061C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00002F5Cu);
#endif
@@ -246215,7 +246742,8 @@ label_BFC12B90:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC12B94: 0062082B sltu $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003094u);
#endif
@@ -246423,7 +246951,8 @@ label_BFC12BC8:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC12BCC: 28810010 slti $at, $a0, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (16) ? 1 : 0);
+ PGXP_ALU(0x28810010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x000030CCu);
#endif
@@ -246844,7 +247373,8 @@ label_BFC12C08:
psx_cyc_step(cpu, 0x3000002u);
#endif
/* 0xBFC12C40: 0319082B sltu $at, $t8, $t9 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0319082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003140u);
#endif
@@ -247151,7 +247681,8 @@ label_BFC12C7C:
psx_cyc_step(cpu, 0x10402u);
#endif
/* 0xBFC12C98: 020A082B sltu $at, $s0, $t2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x020A082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003198u);
#endif
@@ -248112,7 +248643,8 @@ label_BFC12D8C:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC12DAC: 316C0044 andi $t4, $t3, 0x44 */
- cpu->gpr[12] = cpu->gpr[11] & 0x44u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x44u;
+ PGXP_ALU(0x316C0044u, cpu->gpr[12], _pgx1, 0x0044u); }
#ifdef PSX_COSIM
cosim_instr(0x000032ACu);
#endif
@@ -248217,7 +248749,8 @@ label_BFC12DBC:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC12DD0: 31F80044 andi $t8, $t7, 0x44 */
- cpu->gpr[24] = cpu->gpr[15] & 0x44u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x44u;
+ PGXP_ALU(0x31F80044u, cpu->gpr[24], _pgx1, 0x0044u); }
#ifdef PSX_COSIM
cosim_instr(0x000032D0u);
#endif
@@ -248434,7 +248967,8 @@ label_BFC12E04:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC12E18: 316C0004 andi $t4, $t3, 0x4 */
- cpu->gpr[12] = cpu->gpr[11] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x4u;
+ PGXP_ALU(0x316C0004u, cpu->gpr[12], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00003318u);
#endif
@@ -248971,7 +249505,8 @@ label_BFC12EA4:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC12EAC: 2CC10010 sltiu $at, $a2, 16 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < 0x00000010u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < 0x00000010u ? 1 : 0);
+ PGXP_ALU(0x2CC10010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x000033ACu);
#endif
@@ -249031,7 +249566,8 @@ label_BFC12EBC:
psx_cyc_step(cpu, 0x82u);
#endif
/* 0xBFC12EBC: 2CE10010 sltiu $at, $a3, 16 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < 0x00000010u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < 0x00000010u ? 1 : 0);
+ PGXP_ALU(0x2CE10010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x000033BCu);
#endif
@@ -249656,7 +250192,8 @@ label_BFC12F7C:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC12F80: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003480u);
#endif
@@ -249732,7 +250269,8 @@ label_BFC12F8C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC12F9C: 30420002 andi $v0, $v0, 0x2 */
- cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x0000349Cu);
#endif
@@ -249743,7 +250281,8 @@ label_BFC12F8C:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC12FA0: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000034A0u);
#endif
@@ -250066,7 +250605,8 @@ label_BFC12FF4:
psx_cyc_step(cpu, 0x3000002u);
#endif
/* 0xBFC13008: 0319082B sltu $at, $t8, $t9 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0319082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003508u);
#endif
@@ -250084,7 +250624,8 @@ label_BFC12FF4:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC13010: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00003510u);
#endif
@@ -250248,7 +250789,8 @@ label_BFC1302C:
psx_cyc_step(cpu, 0x400Au);
#endif
/* 0xBFC13038: 006E082B sltu $at, $v1, $t6 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x006E082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003538u);
#endif
@@ -256481,7 +257023,8 @@ label_BFC1372C:
psx_cyc_step(cpu, 0x1000006u);
#endif
/* 0xBFC13758: 0058082B sltu $at, $v0, $t8 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x0058082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003C58u);
#endif
@@ -256890,7 +257433,8 @@ label_BFC137BC:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC137C0: 0062082B sltu $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003CC0u);
#endif
@@ -257184,7 +257728,8 @@ label_BFC137E0:
psx_cyc_step(cpu, 0x3000002u);
#endif
/* 0xBFC13818: 0319082B sltu $at, $t8, $t9 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0319082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003D18u);
#endif
@@ -257554,7 +258099,8 @@ label_BFC13868:
psx_cyc_step(cpu, 0x10802u);
#endif
/* 0xBFC13884: 020B082B sltu $at, $s0, $t3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x020B082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003D84u);
#endif
@@ -257823,7 +258369,8 @@ label_BFC138AC:
psx_cyc_step(cpu, 0x1000006u);
#endif
/* 0xBFC138DC: 0058082B sltu $at, $v0, $t8 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x0058082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003DDCu);
#endif
@@ -258116,7 +258663,8 @@ label_BFC13934:
psx_cyc_step(cpu, 0x10006u);
#endif
/* 0xBFC13938: 0202082B sltu $at, $s0, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0202082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003E38u);
#endif
@@ -258496,7 +259044,8 @@ label_BFC139A8:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC139B0: 31CF1000 andi $t7, $t6, 0x1000 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1000u;
+ PGXP_ALU(0x31CF1000u, cpu->gpr[15], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x00003EB0u);
#endif
@@ -258654,7 +259203,8 @@ label_BFC139DC:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC139E0: 0211082B sltu $at, $s0, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0211082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003EE0u);
#endif
@@ -258913,7 +259463,8 @@ label_BFC13A1C:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC13A24: 304E0001 andi $t6, $v0, 0x1 */
- cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00003F24u);
#endif
@@ -258960,7 +259511,8 @@ label_BFC13A30:
psx_cyc_step(cpu, 0x8040u);
#endif
/* 0xBFC13A30: 30CF00FF andi $t7, $a2, 0xFF */
- cpu->gpr[15] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00003F30u);
#endif
@@ -259016,7 +259568,8 @@ label_BFC13A40:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC13A40: 30580004 andi $t8, $v0, 0x4 */
- cpu->gpr[24] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30580004u, cpu->gpr[24], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00003F40u);
#endif
@@ -259031,7 +259584,8 @@ label_BFC13A40:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC13A48: 30C2007F andi $v0, $a2, 0x7F */
- cpu->gpr[2] = cpu->gpr[6] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] & 0x7Fu;
+ PGXP_ALU(0x30C2007Fu, cpu->gpr[2], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00003F48u);
#endif
@@ -259151,7 +259705,8 @@ label_BFC13A68:
psx_cyc_step(cpu, 0x44u);
#endif
/* 0xBFC13A68: 30C2007F andi $v0, $a2, 0x7F */
- cpu->gpr[2] = cpu->gpr[6] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] & 0x7Fu;
+ PGXP_ALU(0x30C2007Fu, cpu->gpr[2], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00003F68u);
#endif
@@ -259426,7 +259981,8 @@ label_BFC13AAC:
psx_cyc_step(cpu, 0xC02u);
#endif
/* 0xBFC13AB4: 01415824 and $t3, $t2, $at */
- cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[1];
+ PGXP_ALU(0x01415824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00003FB4u);
#endif
@@ -259488,7 +260044,8 @@ label_BFC13AC0:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC13AC8: 318D0002 andi $t5, $t4, 0x2 */
- cpu->gpr[13] = cpu->gpr[12] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x2u;
+ PGXP_ALU(0x318D0002u, cpu->gpr[13], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00003FC8u);
#endif
@@ -259741,7 +260298,8 @@ label_BFC13B08:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC13B10: 3042007F andi $v0, $v0, 0x7F */
- cpu->gpr[2] = cpu->gpr[2] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7Fu;
+ PGXP_ALU(0x3042007Fu, cpu->gpr[2], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00004010u);
#endif
@@ -259996,7 +260554,8 @@ label_BFC13B4C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC13B50: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00004050u);
#endif
@@ -260421,7 +260980,8 @@ label_BFC13BAC:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC13BC0: 31F80007 andi $t8, $t7, 0x7 */
- cpu->gpr[24] = cpu->gpr[15] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x7u;
+ PGXP_ALU(0x31F80007u, cpu->gpr[24], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x000040C0u);
#endif
@@ -260638,7 +261198,8 @@ label_BFC13BE4:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC13BF4: 31090097 andi $t1, $t0, 0x97 */
- cpu->gpr[9] = cpu->gpr[8] & 0x97u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x97u;
+ PGXP_ALU(0x31090097u, cpu->gpr[9], _pgx1, 0x0097u); }
#ifdef PSX_COSIM
cosim_instr(0x000040F4u);
#endif
@@ -261581,7 +262142,8 @@ label_BFC13CEC:
psx_cyc_step(cpu, 0x60002u);
#endif
/* 0xBFC13CF0: 0251082B sltu $at, $s2, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[18] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[18] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0251082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000041F0u);
#endif
@@ -261620,7 +262182,8 @@ label_BFC13CF4:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC13CF8: 308E00FF andi $t6, $a0, 0xFF */
- cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x000041F8u);
#endif
@@ -261698,7 +262261,8 @@ label_BFC13D04:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC13D08: 0230082B sltu $at, $s1, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0230082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00004208u);
#endif
@@ -261987,7 +262551,8 @@ label_BFC13D4C:
psx_cyc_step(cpu, 0x60002u);
#endif
/* 0xBFC13D4C: 0251082B sltu $at, $s2, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[18] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[18] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0251082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x0000424Cu);
#endif
@@ -262212,7 +262777,8 @@ label_BFC13D7C:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC13D80: 308E00FF andi $t6, $a0, 0xFF */
- cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00004280u);
#endif
@@ -262265,7 +262831,8 @@ label_BFC13D84:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC13D94: 31F80097 andi $t8, $t7, 0x97 */
- cpu->gpr[24] = cpu->gpr[15] & 0x97u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x97u;
+ PGXP_ALU(0x31F80097u, cpu->gpr[24], _pgx1, 0x0097u); }
#ifdef PSX_COSIM
cosim_instr(0x00004294u);
#endif
@@ -262321,7 +262888,8 @@ label_BFC13DA0:
psx_cyc_step(cpu, 0x2020002u);
#endif
/* 0xBFC13DA4: 0239082B sltu $at, $s1, $t9 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0239082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000042A4u);
#endif
@@ -263011,7 +263579,8 @@ label_BFC13E60:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC13E68: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00004368u);
#endif
@@ -264508,7 +265077,8 @@ label_BFC14048:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC14060: 31AE0001 andi $t6, $t5, 0x1 */
- cpu->gpr[14] = cpu->gpr[13] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x1u;
+ PGXP_ALU(0x31AE0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00004560u);
#endif
@@ -264573,7 +265143,8 @@ label_BFC1406C:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC14074: 31F80001 andi $t8, $t7, 0x1 */
- cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00004574u);
#endif
@@ -264768,7 +265339,8 @@ label_BFC14090:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC140B8: 314B0002 andi $t3, $t2, 0x2 */
- cpu->gpr[11] = cpu->gpr[10] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x2u;
+ PGXP_ALU(0x314B0002u, cpu->gpr[11], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x000045B8u);
#endif
@@ -264832,7 +265404,8 @@ label_BFC140C4:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC140CC: 318D0002 andi $t5, $t4, 0x2 */
- cpu->gpr[13] = cpu->gpr[12] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x2u;
+ PGXP_ALU(0x318D0002u, cpu->gpr[13], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x000045CCu);
#endif
@@ -264938,7 +265511,8 @@ label_BFC140E4:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC140EC: 31CF0080 andi $t7, $t6, 0x80 */
- cpu->gpr[15] = cpu->gpr[14] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x80u;
+ PGXP_ALU(0x31CF0080u, cpu->gpr[15], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000045ECu);
#endif
@@ -265014,7 +265588,8 @@ label_BFC140FC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC14100: 28420051 slti $v0, $v0, 81 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ PGXP_ALU(0x28420051u, cpu->gpr[2], _pgx1, 0x0051u); }
#ifdef PSX_COSIM
cosim_instr(0x00004600u);
#endif
@@ -265022,7 +265597,8 @@ label_BFC140FC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC14104: 38420001 xori $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00004604u);
#endif
@@ -265096,7 +265672,8 @@ label_BFC14114:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC1411C: 31090080 andi $t1, $t0, 0x80 */
- cpu->gpr[9] = cpu->gpr[8] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x80u;
+ PGXP_ALU(0x31090080u, cpu->gpr[9], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x0000461Cu);
#endif
@@ -265279,7 +265856,8 @@ label_BFC14138:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC14158: 31AE0002 andi $t6, $t5, 0x2 */
- cpu->gpr[14] = cpu->gpr[13] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x2u;
+ PGXP_ALU(0x31AE0002u, cpu->gpr[14], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00004658u);
#endif
@@ -265343,7 +265921,8 @@ label_BFC14164:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC1416C: 31F80002 andi $t8, $t7, 0x2 */
- cpu->gpr[24] = cpu->gpr[15] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x2u;
+ PGXP_ALU(0x31F80002u, cpu->gpr[24], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x0000466Cu);
#endif
@@ -265429,7 +266008,8 @@ label_BFC14178:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC14188: 3043000F andi $v1, $v0, 0xF */
- cpu->gpr[3] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3043000Fu, cpu->gpr[3], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00004688u);
#endif
@@ -265555,7 +266135,8 @@ label_BFC141A8:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC141B0: 312A0080 andi $t2, $t1, 0x80 */
- cpu->gpr[10] = cpu->gpr[9] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x80u;
+ PGXP_ALU(0x312A0080u, cpu->gpr[10], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000046B0u);
#endif
@@ -265624,7 +266205,8 @@ label_BFC141C0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC141C4: 28420051 slti $v0, $v0, 81 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ PGXP_ALU(0x28420051u, cpu->gpr[2], _pgx1, 0x0051u); }
#ifdef PSX_COSIM
cosim_instr(0x000046C4u);
#endif
@@ -265632,7 +266214,8 @@ label_BFC141C0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC141C8: 38420001 xori $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x000046C8u);
#endif
@@ -265709,7 +266292,8 @@ label_BFC141D8:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC141E0: 31AE0080 andi $t6, $t5, 0x80 */
- cpu->gpr[14] = cpu->gpr[13] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x80u;
+ PGXP_ALU(0x31AE0080u, cpu->gpr[14], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000046E0u);
#endif
@@ -265877,7 +266461,8 @@ label_BFC141FC:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC1421C: 33280002 andi $t0, $t9, 0x2 */
- cpu->gpr[8] = cpu->gpr[25] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x2u;
+ PGXP_ALU(0x33280002u, cpu->gpr[8], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x0000471Cu);
#endif
@@ -265944,7 +266529,8 @@ label_BFC14228:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC14230: 312A0002 andi $t2, $t1, 0x2 */
- cpu->gpr[10] = cpu->gpr[9] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x2u;
+ PGXP_ALU(0x312A0002u, cpu->gpr[10], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00004730u);
#endif
@@ -266121,7 +266707,8 @@ label_BFC1425C:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC14264: 316C0080 andi $t4, $t3, 0x80 */
- cpu->gpr[12] = cpu->gpr[11] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x80u;
+ PGXP_ALU(0x316C0080u, cpu->gpr[12], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00004764u);
#endif
@@ -266190,7 +266777,8 @@ label_BFC14274:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC14278: 28420051 slti $v0, $v0, 81 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ PGXP_ALU(0x28420051u, cpu->gpr[2], _pgx1, 0x0051u); }
#ifdef PSX_COSIM
cosim_instr(0x00004778u);
#endif
@@ -266198,7 +266786,8 @@ label_BFC14274:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1427C: 38420001 xori $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x0000477Cu);
#endif
@@ -266275,7 +266864,8 @@ label_BFC1428C:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC14294: 31F80080 andi $t8, $t7, 0x80 */
- cpu->gpr[24] = cpu->gpr[15] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x80u;
+ PGXP_ALU(0x31F80080u, cpu->gpr[24], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00004794u);
#endif
@@ -266335,7 +266925,8 @@ label_BFC142A0:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC142A8: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000047A8u);
#endif
@@ -266385,7 +266976,8 @@ label_BFC142B4:
psx_cyc_step(cpu, 0x200005u);
#endif
/* 0xBFC142B4: 0015102B sltu $v0, $zero, $s5 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0015102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000047B4u);
#endif
@@ -266526,7 +267118,8 @@ label_BFC142C8:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC142E8: 312A0002 andi $t2, $t1, 0x2 */
- cpu->gpr[10] = cpu->gpr[9] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x2u;
+ PGXP_ALU(0x312A0002u, cpu->gpr[10], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x000047E8u);
#endif
@@ -266590,7 +267183,8 @@ label_BFC142F4:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC142FC: 316C0080 andi $t4, $t3, 0x80 */
- cpu->gpr[12] = cpu->gpr[11] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x80u;
+ PGXP_ALU(0x316C0080u, cpu->gpr[12], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000047FCu);
#endif
@@ -266657,7 +267251,8 @@ label_BFC14308:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC14310: 31AE0002 andi $t6, $t5, 0x2 */
- cpu->gpr[14] = cpu->gpr[13] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x2u;
+ PGXP_ALU(0x31AE0002u, cpu->gpr[14], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00004810u);
#endif
@@ -266721,7 +267316,8 @@ label_BFC1431C:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC14324: 31F80002 andi $t8, $t7, 0x2 */
- cpu->gpr[24] = cpu->gpr[15] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x2u;
+ PGXP_ALU(0x31F80002u, cpu->gpr[24], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00004824u);
#endif
@@ -266827,7 +267423,8 @@ label_BFC1433C:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC14344: 33280002 andi $t0, $t9, 0x2 */
- cpu->gpr[8] = cpu->gpr[25] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x2u;
+ PGXP_ALU(0x33280002u, cpu->gpr[8], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00004844u);
#endif
@@ -266933,7 +267530,8 @@ label_BFC14350:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC1436C: 312A0080 andi $t2, $t1, 0x80 */
- cpu->gpr[10] = cpu->gpr[9] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x80u;
+ PGXP_ALU(0x312A0080u, cpu->gpr[10], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x0000486Cu);
#endif
@@ -267008,7 +267606,8 @@ label_BFC1437C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC14380: 28420051 slti $v0, $v0, 81 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ PGXP_ALU(0x28420051u, cpu->gpr[2], _pgx1, 0x0051u); }
#ifdef PSX_COSIM
cosim_instr(0x00004880u);
#endif
@@ -267016,7 +267615,8 @@ label_BFC1437C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC14384: 38420001 xori $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00004884u);
#endif
@@ -267090,7 +267690,8 @@ label_BFC14394:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC1439C: 31AE0080 andi $t6, $t5, 0x80 */
- cpu->gpr[14] = cpu->gpr[13] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x80u;
+ PGXP_ALU(0x31AE0080u, cpu->gpr[14], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x0000489Cu);
#endif
@@ -267156,7 +267757,8 @@ label_BFC143A8:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC143B0: 0002102B sltu $v0, $zero, $v0 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000048B0u);
#endif
@@ -267203,7 +267805,8 @@ label_BFC143BC:
psx_cyc_step(cpu, 0x200005u);
#endif
/* 0xBFC143BC: 0015102B sltu $v0, $zero, $s5 */
- cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x0015102Bu, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000048BCu);
#endif
@@ -267341,7 +267944,8 @@ label_BFC143D0:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC143F0: 33280002 andi $t0, $t9, 0x2 */
- cpu->gpr[8] = cpu->gpr[25] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x2u;
+ PGXP_ALU(0x33280002u, cpu->gpr[8], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x000048F0u);
#endif
@@ -267405,7 +268009,8 @@ label_BFC143FC:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC14404: 312A0002 andi $t2, $t1, 0x2 */
- cpu->gpr[10] = cpu->gpr[9] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x2u;
+ PGXP_ALU(0x312A0002u, cpu->gpr[10], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00004904u);
#endif
@@ -268883,7 +269488,8 @@ label_BFC1454C:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC14560: 31CF0001 andi $t7, $t6, 0x1 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00004A60u);
#endif
@@ -268947,7 +269553,8 @@ label_BFC1456C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC14574: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00004A74u);
#endif
@@ -272918,7 +273525,8 @@ label_BFC149BC:
psx_cyc_step(cpu, 0x610u);
#endif
/* 0xBFC149D4: 01245024 and $t2, $t1, $a0 */
- cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[4];
+ PGXP_ALU(0x01245024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00004ED4u);
#endif
@@ -273138,7 +273746,8 @@ label_BFC14A0C:
psx_cyc_step(cpu, 0x1810u);
#endif
/* 0xBFC14A24: 01646024 and $t4, $t3, $a0 */
- cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[4];
+ PGXP_ALU(0x01646024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00004F24u);
#endif
@@ -273579,7 +274188,8 @@ label_BFC14A90:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC14AA8: 31CF0080 andi $t7, $t6, 0x80 */
- cpu->gpr[15] = cpu->gpr[14] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x80u;
+ PGXP_ALU(0x31CF0080u, cpu->gpr[15], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00004FA8u);
#endif
@@ -273643,7 +274253,8 @@ label_BFC14AB4:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC14ABC: 33190080 andi $t9, $t8, 0x80 */
- cpu->gpr[25] = cpu->gpr[24] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x80u;
+ PGXP_ALU(0x33190080u, cpu->gpr[25], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00004FBCu);
#endif
@@ -273766,7 +274377,8 @@ label_BFC14AD8:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC14AD8: 30480001 andi $t0, $v0, 0x1 */
- cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00004FD8u);
#endif
@@ -274453,7 +275065,8 @@ label_BFC14B6C:
psx_cyc_step(cpu, 0x1008010u);
#endif
/* 0xBFC14BA0: 01E4C024 and $t8, $t7, $a0 */
- cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[4];
+ PGXP_ALU(0x01E4C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000050A0u);
#endif
@@ -274950,7 +275563,8 @@ label_BFC14C28:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC14C5C: 312A0001 andi $t2, $t1, 0x1 */
- cpu->gpr[10] = cpu->gpr[9] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x1u;
+ PGXP_ALU(0x312A0001u, cpu->gpr[10], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x0000515Cu);
#endif
@@ -275632,7 +276246,8 @@ label_BFC14CF4:
psx_cyc_step(cpu, 0x8002u);
#endif
/* 0xBFC14D1C: 2DE1000A sltiu $at, $t7, 10 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2DE1000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x0000521Cu);
#endif
@@ -276008,7 +276623,8 @@ label_BFC14D58:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC14D7C: 312A000F andi $t2, $t1, 0xF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFu;
+ PGXP_ALU(0x312A000Fu, cpu->gpr[10], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x0000527Cu);
#endif
@@ -276512,7 +277128,8 @@ label_BFC14E40:
psx_cyc_step(cpu, 0x208u);
#endif
/* 0xBFC14E40: 30690008 andi $t1, $v1, 0x8 */
- cpu->gpr[9] = cpu->gpr[3] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[3] & 0x8u;
+ PGXP_ALU(0x30690008u, cpu->gpr[9], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x00005340u);
#endif
@@ -277009,7 +277626,8 @@ label_BFC14ED4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC14EE4: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x000053E4u);
#endif
@@ -277257,7 +277875,8 @@ label_BFC14F2C:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC14F34: 30A300FF andi $v1, $a1, 0xFF */
- cpu->gpr[3] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00005434u);
#endif
@@ -277398,7 +278017,8 @@ label_BFC14F2C:
psx_cyc_step(cpu, 0x308u);
#endif
/* 0xBFC14F74: 01034826 xor $t1, $t0, $v1 */
- cpu->gpr[9] = cpu->gpr[8] ^ cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[8] ^ cpu->gpr[3];
+ PGXP_ALU(0x01034826u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00005474u);
#endif
@@ -278144,7 +278764,8 @@ label_BFC15074:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC1507C: 31090002 andi $t1, $t0, 0x2 */
- cpu->gpr[9] = cpu->gpr[8] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x2u;
+ PGXP_ALU(0x31090002u, cpu->gpr[9], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x0000557Cu);
#endif
@@ -278211,7 +278832,8 @@ label_BFC15088:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC15090: 314B0002 andi $t3, $t2, 0x2 */
- cpu->gpr[11] = cpu->gpr[10] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x2u;
+ PGXP_ALU(0x314B0002u, cpu->gpr[11], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00005590u);
#endif
@@ -278366,7 +278988,8 @@ label_BFC150B0:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC150C4: 304E0004 andi $t6, $v0, 0x4 */
- cpu->gpr[14] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x304E0004u, cpu->gpr[14], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x000055C4u);
#endif
@@ -279264,7 +279887,8 @@ label_BFC15188:
psx_cyc_step(cpu, 0x1000002u);
#endif
/* 0xBFC151C0: 2F01000D sltiu $at, $t8, 13 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < 0x0000000Du ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < 0x0000000Du ? 1 : 0);
+ PGXP_ALU(0x2F01000Du, cpu->gpr[1], _pgx1, 0x000Du); }
#ifdef PSX_COSIM
cosim_instr(0x000056C0u);
#endif
@@ -279593,7 +280217,8 @@ label_BFC151FC:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC15220: 312A000F andi $t2, $t1, 0xF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFu;
+ PGXP_ALU(0x312A000Fu, cpu->gpr[10], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00005720u);
#endif
@@ -280126,7 +280751,8 @@ label_BFC152DC:
psx_cyc_step(cpu, 0x210u);
#endif
/* 0xBFC152DC: 30890008 andi $t1, $a0, 0x8 */
- cpu->gpr[9] = cpu->gpr[4] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[4] & 0x8u;
+ PGXP_ALU(0x30890008u, cpu->gpr[9], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x000057DCu);
#endif
@@ -280667,7 +281293,8 @@ label_BFC15370:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC15380: 332800FF andi $t0, $t9, 0xFF */
- cpu->gpr[8] = cpu->gpr[25] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0xFFu;
+ PGXP_ALU(0x332800FFu, cpu->gpr[8], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00005880u);
#endif
@@ -280860,7 +281487,8 @@ label_BFC153B4:
psx_cyc_step(cpu, 0x2040u);
#endif
/* 0xBFC153BC: 30CD00FF andi $t5, $a2, 0xFF */
- cpu->gpr[13] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30CD00FFu, cpu->gpr[13], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x000058BCu);
#endif
@@ -281643,7 +282271,8 @@ label_BFC15490:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC154BC: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x000059BCu);
#endif
@@ -281765,7 +282394,8 @@ label_BFC154D0:
psx_cyc_step(cpu, 0x4040u);
#endif
/* 0xBFC154D0: 30CE00FF andi $t6, $a2, 0xFF */
- cpu->gpr[14] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30CE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x000059D0u);
#endif
@@ -281773,7 +282403,8 @@ label_BFC154D0:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC154D4: 31CF00FF andi $t7, $t6, 0xFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x000059D4u);
#endif
@@ -281781,7 +282412,8 @@ label_BFC154D0:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC154D8: 305800FF andi $t8, $v0, 0xFF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x000059D8u);
#endif
@@ -281819,7 +282451,8 @@ label_BFC154D0:
psx_cyc_step(cpu, 0x3008000u);
#endif
/* 0xBFC154E8: 01F8C826 xor $t9, $t7, $t8 */
- cpu->gpr[25] = cpu->gpr[15] ^ cpu->gpr[24];
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] ^ cpu->gpr[24];
+ PGXP_ALU(0x01F8C826u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000059E8u);
#endif
@@ -282056,7 +282689,8 @@ label_BFC15508:
psx_cyc_step(cpu, 0x4040u);
#endif
/* 0xBFC15534: 30CE00FF andi $t6, $a2, 0xFF */
- cpu->gpr[14] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30CE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00005A34u);
#endif
@@ -282453,7 +283087,8 @@ label_BFC15580:
psx_cyc_step(cpu, 0x3800u);
#endif
/* 0xBFC155A4: 016C6826 xor $t5, $t3, $t4 */
- cpu->gpr[13] = cpu->gpr[11] ^ cpu->gpr[12];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[11] ^ cpu->gpr[12];
+ PGXP_ALU(0x016C6826u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00005AA4u);
#endif
@@ -282803,7 +283438,8 @@ label_BFC15600:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC15608: 314B0002 andi $t3, $t2, 0x2 */
- cpu->gpr[11] = cpu->gpr[10] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x2u;
+ PGXP_ALU(0x314B0002u, cpu->gpr[11], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00005B08u);
#endif
@@ -282867,7 +283503,8 @@ label_BFC15614:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC1561C: 318D0002 andi $t5, $t4, 0x2 */
- cpu->gpr[13] = cpu->gpr[12] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x2u;
+ PGXP_ALU(0x318D0002u, cpu->gpr[13], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x00005B1Cu);
#endif
@@ -283295,7 +283932,8 @@ label_BFC15664:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC1567C: 2DC10004 sltiu $at, $t6, 4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000004u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000004u ? 1 : 0);
+ PGXP_ALU(0x2DC10004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00005B7Cu);
#endif
@@ -283627,7 +284265,8 @@ label_BFC156B8:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC156DC: 3328000F andi $t0, $t9, 0xF */
- cpu->gpr[8] = cpu->gpr[25] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0xFu;
+ PGXP_ALU(0x3328000Fu, cpu->gpr[8], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00005BDCu);
#endif
@@ -284173,7 +284812,8 @@ label_BFC15798:
psx_cyc_step(cpu, 0x2000008u);
#endif
/* 0xBFC15798: 30790004 andi $t9, $v1, 0x4 */
- cpu->gpr[25] = cpu->gpr[3] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0x4u;
+ PGXP_ALU(0x30790004u, cpu->gpr[25], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x00005C98u);
#endif
@@ -284458,7 +285098,8 @@ label_BFC157F0:
psx_cyc_step(cpu, 0x808u);
#endif
/* 0xBFC157F0: 306B0008 andi $t3, $v1, 0x8 */
- cpu->gpr[11] = cpu->gpr[3] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] & 0x8u;
+ PGXP_ALU(0x306B0008u, cpu->gpr[11], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x00005CF0u);
#endif
@@ -285818,7 +286459,8 @@ label_BFC15964:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC15974: 304F0001 andi $t7, $v0, 0x1 */
- cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00005E74u);
#endif
@@ -285872,7 +286514,8 @@ label_BFC15980:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC15984: 28A10401 slti $at, $a1, 1025 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (1025) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (1025) ? 1 : 0);
+ PGXP_ALU(0x28A10401u, cpu->gpr[1], _pgx1, 0x0401u); }
#ifdef PSX_COSIM
cosim_instr(0x00005E84u);
#endif
@@ -286428,7 +287071,8 @@ label_BFC15A18:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC15A28: 304F0001 andi $t7, $v0, 0x1 */
- cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00005F28u);
#endif
@@ -286485,7 +287129,8 @@ label_BFC15A34:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC15A38: 28A10401 slti $at, $a1, 1025 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (1025) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (1025) ? 1 : 0);
+ PGXP_ALU(0x28A10401u, cpu->gpr[1], _pgx1, 0x0401u); }
#ifdef PSX_COSIM
cosim_instr(0x00005F38u);
#endif
@@ -287038,7 +287683,8 @@ label_BFC15ACC:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC15ADC: 304F0001 andi $t7, $v0, 0x1 */
- cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00005FDCu);
#endif
@@ -287544,7 +288190,8 @@ label_BFC15B7C:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC15B84: 304F0001 andi $t7, $v0, 0x1 */
- cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x00006084u);
#endif
@@ -289028,7 +289675,8 @@ label_BFC15D18:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC15D28: 310900FF andi $t1, $t0, 0xFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00006228u);
#endif
@@ -289184,7 +289832,8 @@ label_BFC15D4C:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC15D64: 2DC10011 sltiu $at, $t6, 17 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2DC10011u, cpu->gpr[1], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x00006264u);
#endif
@@ -289245,7 +289894,8 @@ label_BFC15D70:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC15D78: 31F8FFBF andi $t8, $t7, 0xFFBF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFBFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFBFu;
+ PGXP_ALU(0x31F8FFBFu, cpu->gpr[24], _pgx1, 0xFFBFu); }
#ifdef PSX_COSIM
cosim_instr(0x00006278u);
#endif
@@ -289295,7 +289945,8 @@ label_BFC15D80:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC15D8C: 2D010011 sltiu $at, $t0, 17 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2D010011u, cpu->gpr[1], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x0000628Cu);
#endif
@@ -289362,7 +290013,8 @@ label_BFC15D98:
psx_cyc_step(cpu, 0x2000200u);
#endif
/* 0xBFC15DA0: 3329FF7F andi $t1, $t9, 0xFF7F */
- cpu->gpr[9] = cpu->gpr[25] & 0xFF7Fu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0xFF7Fu;
+ PGXP_ALU(0x3329FF7Fu, cpu->gpr[9], _pgx1, 0xFF7Fu); }
#ifdef PSX_COSIM
cosim_instr(0x000062A0u);
#endif
@@ -289592,7 +290244,8 @@ label_BFC15DD8:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC15DE8: 31AE00FF andi $t6, $t5, 0xFF */
- cpu->gpr[14] = cpu->gpr[13] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFu;
+ PGXP_ALU(0x31AE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x000062E8u);
#endif
@@ -289748,7 +290401,8 @@ label_BFC15E0C:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC15E24: 2D210011 sltiu $at, $t1, 17 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2D210011u, cpu->gpr[1], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x00006324u);
#endif
@@ -289809,7 +290463,8 @@ label_BFC15E30:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC15E38: 314BFFBF andi $t3, $t2, 0xFFBF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFBFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFBFu;
+ PGXP_ALU(0x314BFFBFu, cpu->gpr[11], _pgx1, 0xFFBFu); }
#ifdef PSX_COSIM
cosim_instr(0x00006338u);
#endif
@@ -289859,7 +290514,8 @@ label_BFC15E40:
psx_cyc_step(cpu, 0x2002u);
#endif
/* 0xBFC15E4C: 2DA10011 sltiu $at, $t5, 17 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2DA10011u, cpu->gpr[1], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x0000634Cu);
#endif
@@ -289926,7 +290582,8 @@ label_BFC15E58:
psx_cyc_step(cpu, 0x5000u);
#endif
/* 0xBFC15E60: 318EFF7F andi $t6, $t4, 0xFF7F */
- cpu->gpr[14] = cpu->gpr[12] & 0xFF7Fu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[12] & 0xFF7Fu;
+ PGXP_ALU(0x318EFF7Fu, cpu->gpr[14], _pgx1, 0xFF7Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00006360u);
#endif
@@ -290666,7 +291323,8 @@ label_BFC15F30:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC15F38: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00006438u);
#endif
@@ -290792,7 +291450,8 @@ label_BFC15F4C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC15F4C: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x0000644Cu);
#endif
@@ -291112,7 +291771,8 @@ label_BFC15F74:
psx_cyc_step(cpu, 0x4000004u);
#endif
/* 0xBFC15FC0: 0342D026 xor $k0, $k0, $v0 */
- cpu->gpr[26] = cpu->gpr[26] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[26]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[26] = cpu->gpr[26] ^ cpu->gpr[2];
+ PGXP_ALU(0x0342D026u, cpu->gpr[26], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x000064C0u);
#endif
@@ -291173,7 +291833,8 @@ label_BFC15F74:
psx_cyc_step(cpu, 0x4000002u);
#endif
/* 0xBFC15FDC: 2F410080 sltiu $at, $k0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[26] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[1] = (uint32_t)(cpu->gpr[26] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2F410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000064DCu);
#endif
@@ -291488,7 +292149,8 @@ label_BFC16014:
psx_cyc_step(cpu, 0x4000004u);
#endif
/* 0xBFC16060: 0342D026 xor $k0, $k0, $v0 */
- cpu->gpr[26] = cpu->gpr[26] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[26]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[26] = cpu->gpr[26] ^ cpu->gpr[2];
+ PGXP_ALU(0x0342D026u, cpu->gpr[26], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x00006560u);
#endif
@@ -291549,7 +292211,8 @@ label_BFC16014:
psx_cyc_step(cpu, 0x4000002u);
#endif
/* 0xBFC1607C: 2F41007F sltiu $at, $k0, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[26] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[1] = (uint32_t)(cpu->gpr[26] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2F41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x0000657Cu);
#endif
@@ -292177,7 +292840,8 @@ label_BFC1618C:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC1619C: 2DC10004 sltiu $at, $t6, 4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000004u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000004u ? 1 : 0);
+ PGXP_ALU(0x2DC10004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x0000669Cu);
#endif
@@ -292347,7 +293011,8 @@ label_BFC161C4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC161CC: 2C410040 sltiu $at, $v0, 64 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x000066CCu);
#endif
@@ -292365,7 +293030,8 @@ label_BFC161C4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC161D4: 2C41007F sltiu $at, $v0, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x000066D4u);
#endif
@@ -292404,7 +293070,8 @@ label_BFC161D8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC161DC: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000066DCu);
#endif
@@ -292476,7 +293143,8 @@ label_BFC161E8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC161E8: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x000066E8u);
#endif
@@ -292504,7 +293172,8 @@ label_BFC161EC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC161F0: 2C4100AD sltiu $at, $v0, 173 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000ADu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000ADu ? 1 : 0);
+ PGXP_ALU(0x2C4100ADu, cpu->gpr[1], _pgx1, 0x00ADu); }
#ifdef PSX_COSIM
cosim_instr(0x000066F0u);
#endif
@@ -292543,7 +293212,8 @@ label_BFC161F4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC161F8: 2C4100B8 sltiu $at, $v0, 184 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0);
+ PGXP_ALU(0x2C4100B8u, cpu->gpr[1], _pgx1, 0x00B8u); }
#ifdef PSX_COSIM
cosim_instr(0x000066F8u);
#endif
@@ -292618,7 +293288,8 @@ label_BFC16204:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16204: 2C4100B8 sltiu $at, $v0, 184 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0);
+ PGXP_ALU(0x2C4100B8u, cpu->gpr[1], _pgx1, 0x00B8u); }
#ifdef PSX_COSIM
cosim_instr(0x00006704u);
#endif
@@ -292643,7 +293314,8 @@ label_BFC16208:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1620C: 2C4100C0 sltiu $at, $v0, 192 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C0u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C0u ? 1 : 0);
+ PGXP_ALU(0x2C4100C0u, cpu->gpr[1], _pgx1, 0x00C0u); }
#ifdef PSX_COSIM
cosim_instr(0x0000670Cu);
#endif
@@ -292682,7 +293354,8 @@ label_BFC16210:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16214: 2C4100C8 sltiu $at, $v0, 200 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0);
+ PGXP_ALU(0x2C4100C8u, cpu->gpr[1], _pgx1, 0x00C8u); }
#ifdef PSX_COSIM
cosim_instr(0x00006714u);
#endif
@@ -292754,7 +293427,8 @@ label_BFC16220:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16220: 2C4100C8 sltiu $at, $v0, 200 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0);
+ PGXP_ALU(0x2C4100C8u, cpu->gpr[1], _pgx1, 0x00C8u); }
#ifdef PSX_COSIM
cosim_instr(0x00006720u);
#endif
@@ -292779,7 +293453,8 @@ label_BFC16224:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16228: 2C4100CF sltiu $at, $v0, 207 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000CFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000CFu ? 1 : 0);
+ PGXP_ALU(0x2C4100CFu, cpu->gpr[1], _pgx1, 0x00CFu); }
#ifdef PSX_COSIM
cosim_instr(0x00006728u);
#endif
@@ -292821,7 +293496,8 @@ label_BFC1622C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16230: 2C4100DA sltiu $at, $v0, 218 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0);
+ PGXP_ALU(0x2C4100DAu, cpu->gpr[1], _pgx1, 0x00DAu); }
#ifdef PSX_COSIM
cosim_instr(0x00006730u);
#endif
@@ -292893,7 +293569,8 @@ label_BFC1623C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1623C: 2C4100DA sltiu $at, $v0, 218 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0);
+ PGXP_ALU(0x2C4100DAu, cpu->gpr[1], _pgx1, 0x00DAu); }
#ifdef PSX_COSIM
cosim_instr(0x0000673Cu);
#endif
@@ -292918,7 +293595,8 @@ label_BFC16240:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16244: 2C4100E9 sltiu $at, $v0, 233 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000E9u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000E9u ? 1 : 0);
+ PGXP_ALU(0x2C4100E9u, cpu->gpr[1], _pgx1, 0x00E9u); }
#ifdef PSX_COSIM
cosim_instr(0x00006744u);
#endif
@@ -292957,7 +293635,8 @@ label_BFC16248:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1624C: 2C4100F0 sltiu $at, $v0, 240 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0);
+ PGXP_ALU(0x2C4100F0u, cpu->gpr[1], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x0000674Cu);
#endif
@@ -293029,7 +293708,8 @@ label_BFC16258:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16258: 2C4100F0 sltiu $at, $v0, 240 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0);
+ PGXP_ALU(0x2C4100F0u, cpu->gpr[1], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x00006758u);
#endif
@@ -293057,7 +293737,8 @@ label_BFC1625C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16260: 2C4100F8 sltiu $at, $v0, 248 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F8u ? 1 : 0);
+ PGXP_ALU(0x2C4100F8u, cpu->gpr[1], _pgx1, 0x00F8u); }
#ifdef PSX_COSIM
cosim_instr(0x00006760u);
#endif
@@ -293421,7 +294102,8 @@ label_BFC162B8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC162C0: 2C41004F sltiu $at, $v0, 79 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000004Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000004Fu ? 1 : 0);
+ PGXP_ALU(0x2C41004Fu, cpu->gpr[1], _pgx1, 0x004Fu); }
#ifdef PSX_COSIM
cosim_instr(0x000067C0u);
#endif
@@ -293436,7 +294118,8 @@ label_BFC162B8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC162C8: 2C410059 sltiu $at, $v0, 89 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000059u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000059u ? 1 : 0);
+ PGXP_ALU(0x2C410059u, cpu->gpr[1], _pgx1, 0x0059u); }
#ifdef PSX_COSIM
cosim_instr(0x000067C8u);
#endif
@@ -293478,7 +294161,8 @@ label_BFC162CC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC162D0: 2C410060 sltiu $at, $v0, 96 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0);
+ PGXP_ALU(0x2C410060u, cpu->gpr[1], _pgx1, 0x0060u); }
#ifdef PSX_COSIM
cosim_instr(0x000067D0u);
#endif
@@ -293550,7 +294234,8 @@ label_BFC162DC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC162DC: 2C410060 sltiu $at, $v0, 96 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0);
+ PGXP_ALU(0x2C410060u, cpu->gpr[1], _pgx1, 0x0060u); }
#ifdef PSX_COSIM
cosim_instr(0x000067DCu);
#endif
@@ -293575,7 +294260,8 @@ label_BFC162E0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC162E4: 2C41007A sltiu $at, $v0, 122 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Au ? 1 : 0);
+ PGXP_ALU(0x2C41007Au, cpu->gpr[1], _pgx1, 0x007Au); }
#ifdef PSX_COSIM
cosim_instr(0x000067E4u);
#endif
@@ -293614,7 +294300,8 @@ label_BFC162E8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC162EC: 2C410081 sltiu $at, $v0, 129 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0);
+ PGXP_ALU(0x2C410081u, cpu->gpr[1], _pgx1, 0x0081u); }
#ifdef PSX_COSIM
cosim_instr(0x000067ECu);
#endif
@@ -293686,7 +294373,8 @@ label_BFC162F8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC162F8: 2C410081 sltiu $at, $v0, 129 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0);
+ PGXP_ALU(0x2C410081u, cpu->gpr[1], _pgx1, 0x0081u); }
#ifdef PSX_COSIM
cosim_instr(0x000067F8u);
#endif
@@ -293714,7 +294402,8 @@ label_BFC162FC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16300: 2C41009B sltiu $at, $v0, 155 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Bu ? 1 : 0);
+ PGXP_ALU(0x2C41009Bu, cpu->gpr[1], _pgx1, 0x009Bu); }
#ifdef PSX_COSIM
cosim_instr(0x00006800u);
#endif
@@ -293753,7 +294442,8 @@ label_BFC16304:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16308: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00006808u);
#endif
@@ -293828,7 +294518,8 @@ label_BFC16314:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16314: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00006814u);
#endif
@@ -293853,7 +294544,8 @@ label_BFC16318:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1631C: 2C4100F2 sltiu $at, $v0, 242 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0);
+ PGXP_ALU(0x2C4100F2u, cpu->gpr[1], _pgx1, 0x00F2u); }
#ifdef PSX_COSIM
cosim_instr(0x0000681Cu);
#endif
@@ -293930,7 +294622,8 @@ label_BFC1632C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1632C: 2C4100F2 sltiu $at, $v0, 242 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0);
+ PGXP_ALU(0x2C4100F2u, cpu->gpr[1], _pgx1, 0x00F2u); }
#ifdef PSX_COSIM
cosim_instr(0x0000682Cu);
#endif
@@ -294178,7 +294871,8 @@ label_BFC16370:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16378: 2C410040 sltiu $at, $v0, 64 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x00006878u);
#endif
@@ -294196,7 +294890,8 @@ label_BFC16370:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16380: 2C41007F sltiu $at, $v0, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00006880u);
#endif
@@ -294235,7 +294930,8 @@ label_BFC16384:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16388: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00006888u);
#endif
@@ -294310,7 +295006,8 @@ label_BFC16394:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16394: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00006894u);
#endif
@@ -294335,7 +295032,8 @@ label_BFC16398:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1639C: 2C410097 sltiu $at, $v0, 151 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000097u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000097u ? 1 : 0);
+ PGXP_ALU(0x2C410097u, cpu->gpr[1], _pgx1, 0x0097u); }
#ifdef PSX_COSIM
cosim_instr(0x0000689Cu);
#endif
@@ -294374,7 +295072,8 @@ label_BFC163A0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC163A4: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x000068A4u);
#endif
@@ -294446,7 +295145,8 @@ label_BFC163B0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC163B0: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x000068B0u);
#endif
@@ -294471,7 +295171,8 @@ label_BFC163B4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC163B8: 2C4100B7 sltiu $at, $v0, 183 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B7u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B7u ? 1 : 0);
+ PGXP_ALU(0x2C4100B7u, cpu->gpr[1], _pgx1, 0x00B7u); }
#ifdef PSX_COSIM
cosim_instr(0x000068B8u);
#endif
@@ -294513,7 +295214,8 @@ label_BFC163BC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC163C0: 2C4100BF sltiu $at, $v0, 191 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); }
#ifdef PSX_COSIM
cosim_instr(0x000068C0u);
#endif
@@ -294585,7 +295287,8 @@ label_BFC163CC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC163CC: 2C4100BF sltiu $at, $v0, 191 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); }
#ifdef PSX_COSIM
cosim_instr(0x000068CCu);
#endif
@@ -294610,7 +295313,8 @@ label_BFC163D0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC163D4: 2C4100D7 sltiu $at, $v0, 215 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0);
+ PGXP_ALU(0x2C4100D7u, cpu->gpr[1], _pgx1, 0x00D7u); }
#ifdef PSX_COSIM
cosim_instr(0x000068D4u);
#endif
@@ -294690,7 +295394,8 @@ label_BFC163E4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC163E4: 2C4100D7 sltiu $at, $v0, 215 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0);
+ PGXP_ALU(0x2C4100D7u, cpu->gpr[1], _pgx1, 0x00D7u); }
#ifdef PSX_COSIM
cosim_instr(0x000068E4u);
#endif
@@ -294938,7 +295643,8 @@ label_BFC16428:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16430: 2C410040 sltiu $at, $v0, 64 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x00006930u);
#endif
@@ -294953,7 +295659,8 @@ label_BFC16428:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16438: 2C410061 sltiu $at, $v0, 97 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000061u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000061u ? 1 : 0);
+ PGXP_ALU(0x2C410061u, cpu->gpr[1], _pgx1, 0x0061u); }
#ifdef PSX_COSIM
cosim_instr(0x00006938u);
#endif
@@ -294995,7 +295702,8 @@ label_BFC1643C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16440: 2C410070 sltiu $at, $v0, 112 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0);
+ PGXP_ALU(0x2C410070u, cpu->gpr[1], _pgx1, 0x0070u); }
#ifdef PSX_COSIM
cosim_instr(0x00006940u);
#endif
@@ -295067,7 +295775,8 @@ label_BFC1644C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1644C: 2C410070 sltiu $at, $v0, 112 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0);
+ PGXP_ALU(0x2C410070u, cpu->gpr[1], _pgx1, 0x0070u); }
#ifdef PSX_COSIM
cosim_instr(0x0000694Cu);
#endif
@@ -295092,7 +295801,8 @@ label_BFC16450:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16454: 2C41007F sltiu $at, $v0, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00006954u);
#endif
@@ -295131,7 +295841,8 @@ label_BFC16458:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1645C: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x0000695Cu);
#endif
@@ -295203,7 +295914,8 @@ label_BFC16468:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16468: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x00006968u);
#endif
@@ -295231,7 +295943,8 @@ label_BFC1646C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16470: 2C410092 sltiu $at, $v0, 146 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000092u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000092u ? 1 : 0);
+ PGXP_ALU(0x2C410092u, cpu->gpr[1], _pgx1, 0x0092u); }
#ifdef PSX_COSIM
cosim_instr(0x00006970u);
#endif
@@ -295270,7 +295983,8 @@ label_BFC16474:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16478: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00006978u);
#endif
@@ -295345,7 +296059,8 @@ label_BFC16484:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC16484: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x00006984u);
#endif
@@ -295370,7 +296085,8 @@ label_BFC16488:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1648C: 2C4100BF sltiu $at, $v0, 191 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); }
#ifdef PSX_COSIM
cosim_instr(0x0000698Cu);
#endif
@@ -295447,7 +296163,8 @@ label_BFC1649C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1649C: 2C4100BF sltiu $at, $v0, 191 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); }
#ifdef PSX_COSIM
cosim_instr(0x0000699Cu);
#endif
@@ -295695,7 +296412,8 @@ label_BFC164E0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC164E8: 2C41007F sltiu $at, $v0, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x000069E8u);
#endif
@@ -295832,7 +296550,8 @@ label_BFC16500:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC1650C: 316C00FF andi $t4, $t3, 0xFF */
- cpu->gpr[12] = cpu->gpr[11] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFu;
+ PGXP_ALU(0x316C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x00006A0Cu);
#endif
@@ -303017,7 +303736,8 @@ label_BFC18600:
psx_cyc_step(cpu, 0x2010002u);
#endif
/* 0xBFC1860C: 0219082A slt $at, $s0, $t9 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0219082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003060Cu);
#endif
@@ -304535,7 +305255,8 @@ label_BFC18788:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC18788: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80030788u);
#endif
@@ -306073,7 +306794,8 @@ label_BFC18930:
psx_cyc_step(cpu, 0x8012u);
#endif
/* 0xBFC18934: 00817824 and $t7, $a0, $at */
- cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80030934u);
#endif
@@ -306704,7 +307426,8 @@ label_BFC189B0:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC189BC: 2862003D slti $v0, $v1, 61 */
- cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] < (61) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] < (61) ? 1 : 0);
+ PGXP_ALU(0x2862003Du, cpu->gpr[2], _pgx1, 0x003Du); }
#ifdef PSX_COSIM
cosim_instr(0x800309BCu);
#endif
@@ -306715,7 +307438,8 @@ label_BFC189B0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC189C0: 38420001 xori $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800309C0u);
#endif
@@ -315488,7 +316212,8 @@ label_BFC194F0:
psx_cyc_step(cpu, 0x10102u);
#endif
/* 0xBFC194FC: 0208082A slt $at, $s0, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0208082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800314FCu);
#endif
@@ -317209,7 +317934,8 @@ label_BFC1970C:
psx_cyc_step(cpu, 0x1000u);
#endif
/* 0xBFC19714: 318CFFF3 andi $t4, $t4, 0xFFF3 */
- cpu->gpr[12] = cpu->gpr[12] & 0xFFF3u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] & 0xFFF3u;
+ PGXP_ALU(0x318CFFF3u, cpu->gpr[12], _pgx1, 0xFFF3u); }
#ifdef PSX_COSIM
cosim_instr(0x80031714u);
#endif
@@ -317843,7 +318569,8 @@ label_BFC197D8:
psx_cyc_step(cpu, 0x208u);
#endif
/* 0xBFC197D8: 31230003 andi $v1, $t1, 0x3 */
- cpu->gpr[3] = cpu->gpr[9] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] & 0x3u;
+ PGXP_ALU(0x31230003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x800317D8u);
#endif
@@ -317946,7 +318673,8 @@ label_BFC197F0:
psx_cyc_step(cpu, 0x2004u);
#endif
/* 0xBFC197F8: 304D00C0 andi $t5, $v0, 0xC0 */
- cpu->gpr[13] = cpu->gpr[2] & 0xC0u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xC0u;
+ PGXP_ALU(0x304D00C0u, cpu->gpr[13], _pgx1, 0x00C0u); }
#ifdef PSX_COSIM
cosim_instr(0x800317F8u);
#endif
@@ -317954,7 +318682,8 @@ label_BFC197F0:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC197FC: 304F0030 andi $t7, $v0, 0x30 */
- cpu->gpr[15] = cpu->gpr[2] & 0x30u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x30u;
+ PGXP_ALU(0x304F0030u, cpu->gpr[15], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x800317FCu);
#endif
@@ -318019,7 +318748,8 @@ label_BFC197F0:
psx_cyc_step(cpu, 0x2004u);
#endif
/* 0xBFC19818: 304D000C andi $t5, $v0, 0xC */
- cpu->gpr[13] = cpu->gpr[2] & 0xCu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xCu;
+ PGXP_ALU(0x304D000Cu, cpu->gpr[13], _pgx1, 0x000Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80031818u);
#endif
@@ -318039,7 +318769,8 @@ label_BFC197F0:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC19820: 304E0003 andi $t6, $v0, 0x3 */
- cpu->gpr[14] = cpu->gpr[2] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x3u;
+ PGXP_ALU(0x304E0003u, cpu->gpr[14], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80031820u);
#endif
@@ -318210,7 +318941,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x2004u);
#endif
/* 0xBFC19850: 304D00C0 andi $t5, $v0, 0xC0 */
- cpu->gpr[13] = cpu->gpr[2] & 0xC0u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xC0u;
+ PGXP_ALU(0x304D00C0u, cpu->gpr[13], _pgx1, 0x00C0u); }
#ifdef PSX_COSIM
cosim_instr(0x80031850u);
#endif
@@ -318218,7 +318950,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC19854: 304E0030 andi $t6, $v0, 0x30 */
- cpu->gpr[14] = cpu->gpr[2] & 0x30u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x30u;
+ PGXP_ALU(0x304E0030u, cpu->gpr[14], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x80031854u);
#endif
@@ -318283,7 +319016,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x2004u);
#endif
/* 0xBFC19870: 304D000C andi $t5, $v0, 0xC */
- cpu->gpr[13] = cpu->gpr[2] & 0xCu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xCu;
+ PGXP_ALU(0x304D000Cu, cpu->gpr[13], _pgx1, 0x000Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80031870u);
#endif
@@ -318300,7 +319034,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC19878: 304F0003 andi $t7, $v0, 0x3 */
- cpu->gpr[15] = cpu->gpr[2] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x3u;
+ PGXP_ALU(0x304F0003u, cpu->gpr[15], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80031878u);
#endif
@@ -318344,7 +319079,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x2000008u);
#endif
/* 0xBFC1988C: 307900C0 andi $t9, $v1, 0xC0 */
- cpu->gpr[25] = cpu->gpr[3] & 0xC0u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0xC0u;
+ PGXP_ALU(0x307900C0u, cpu->gpr[25], _pgx1, 0x00C0u); }
#ifdef PSX_COSIM
cosim_instr(0x8003188Cu);
#endif
@@ -318355,7 +319091,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x4008u);
#endif
/* 0xBFC19890: 306E0030 andi $t6, $v1, 0x30 */
- cpu->gpr[14] = cpu->gpr[3] & 0x30u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] & 0x30u;
+ PGXP_ALU(0x306E0030u, cpu->gpr[14], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x80031890u);
#endif
@@ -318416,7 +319153,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x2000008u);
#endif
/* 0xBFC198AC: 3079000C andi $t9, $v1, 0xC */
- cpu->gpr[25] = cpu->gpr[3] & 0xCu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0xCu;
+ PGXP_ALU(0x3079000Cu, cpu->gpr[25], _pgx1, 0x000Cu); }
#ifdef PSX_COSIM
cosim_instr(0x800318ACu);
#endif
@@ -318436,7 +319174,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x2008u);
#endif
/* 0xBFC198B4: 306D0003 andi $t5, $v1, 0x3 */
- cpu->gpr[13] = cpu->gpr[3] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] & 0x3u;
+ PGXP_ALU(0x306D0003u, cpu->gpr[13], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x800318B4u);
#endif
@@ -318479,7 +319218,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x1000010u);
#endif
/* 0xBFC198C8: 309800C0 andi $t8, $a0, 0xC0 */
- cpu->gpr[24] = cpu->gpr[4] & 0xC0u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0xC0u;
+ PGXP_ALU(0x309800C0u, cpu->gpr[24], _pgx1, 0x00C0u); }
#ifdef PSX_COSIM
cosim_instr(0x800318C8u);
#endif
@@ -318487,7 +319227,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC198CC: 308E0030 andi $t6, $a0, 0x30 */
- cpu->gpr[14] = cpu->gpr[4] & 0x30u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x30u;
+ PGXP_ALU(0x308E0030u, cpu->gpr[14], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x800318CCu);
#endif
@@ -318551,7 +319292,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x1000010u);
#endif
/* 0xBFC198E8: 3098000C andi $t8, $a0, 0xC */
- cpu->gpr[24] = cpu->gpr[4] & 0xCu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0xCu;
+ PGXP_ALU(0x3098000Cu, cpu->gpr[24], _pgx1, 0x000Cu); }
#ifdef PSX_COSIM
cosim_instr(0x800318E8u);
#endif
@@ -318571,7 +319313,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x2000010u);
#endif
/* 0xBFC198F0: 30990003 andi $t9, $a0, 0x3 */
- cpu->gpr[25] = cpu->gpr[4] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0x3u;
+ PGXP_ALU(0x30990003u, cpu->gpr[25], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x800318F0u);
#endif
@@ -318614,7 +319357,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x8020u);
#endif
/* 0xBFC19904: 30AF00C0 andi $t7, $a1, 0xC0 */
- cpu->gpr[15] = cpu->gpr[5] & 0xC0u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xC0u;
+ PGXP_ALU(0x30AF00C0u, cpu->gpr[15], _pgx1, 0x00C0u); }
#ifdef PSX_COSIM
cosim_instr(0x80031904u);
#endif
@@ -318622,7 +319366,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x4020u);
#endif
/* 0xBFC19908: 30AE0030 andi $t6, $a1, 0x30 */
- cpu->gpr[14] = cpu->gpr[5] & 0x30u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] & 0x30u;
+ PGXP_ALU(0x30AE0030u, cpu->gpr[14], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x80031908u);
#endif
@@ -318686,7 +319431,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x8020u);
#endif
/* 0xBFC19924: 30AF000C andi $t7, $a1, 0xC */
- cpu->gpr[15] = cpu->gpr[5] & 0xCu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xCu;
+ PGXP_ALU(0x30AF000Cu, cpu->gpr[15], _pgx1, 0x000Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80031924u);
#endif
@@ -318703,7 +319449,8 @@ label_BFC19848:
psx_cyc_step(cpu, 0x1000020u);
#endif
/* 0xBFC1992C: 30B80003 andi $t8, $a1, 0x3 */
- cpu->gpr[24] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30B80003u, cpu->gpr[24], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x8003192Cu);
#endif
@@ -318817,7 +319564,8 @@ label_BFC19944:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1994C: 3042000F andi $v0, $v0, 0xF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003194Cu);
#endif
@@ -318979,7 +319727,8 @@ label_BFC19970:
psx_cyc_step(cpu, 0xA000u);
#endif
/* 0xBFC19978: 31AF00F0 andi $t7, $t5, 0xF0 */
- cpu->gpr[15] = cpu->gpr[13] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[13] & 0xF0u;
+ PGXP_ALU(0x31AF00F0u, cpu->gpr[15], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80031978u);
#endif
@@ -319045,7 +319794,8 @@ label_BFC19984:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1998C: 3042000F andi $v0, $v0, 0xF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003198Cu);
#endif
@@ -319129,7 +319879,8 @@ label_BFC1999C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC199A4: 331900F0 andi $t9, $t8, 0xF0 */
- cpu->gpr[25] = cpu->gpr[24] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xF0u;
+ PGXP_ALU(0x331900F0u, cpu->gpr[25], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x800319A4u);
#endif
@@ -319243,7 +319994,8 @@ label_BFC199C4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC199CC: 3042000F andi $v0, $v0, 0xF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800319CCu);
#endif
@@ -321383,7 +322135,8 @@ label_BFC19C54:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC19C60: 2DCF0001 sltiu $t7, $t6, 1 */
- cpu->gpr[15] = (uint32_t)(cpu->gpr[14] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)(cpu->gpr[14] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2DCF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80031C60u);
#endif
@@ -321509,7 +322262,8 @@ label_BFC19C80:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC19C8C: 2F190001 sltiu $t9, $t8, 1 */
- cpu->gpr[25] = (uint32_t)(cpu->gpr[24] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)(cpu->gpr[24] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2F190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80031C8Cu);
#endif
@@ -324366,7 +325120,8 @@ label_BFC19FD0:
psx_cyc_step(cpu, 0x4012u);
#endif
/* 0xBFC19FDC: 00817024 and $t6, $a0, $at */
- cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80031FDCu);
#endif
@@ -324849,7 +325604,8 @@ label_BFC1A050:
psx_cyc_step(cpu, 0x4012u);
#endif
/* 0xBFC1A05C: 00817024 and $t6, $a0, $at */
- cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003205Cu);
#endif
@@ -325535,7 +326291,8 @@ label_BFC1A11C:
psx_cyc_step(cpu, 0x4012u);
#endif
/* 0xBFC1A128: 00817024 and $t6, $a0, $at */
- cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032128u);
#endif
@@ -326224,7 +326981,8 @@ label_BFC1A1BC:
psx_cyc_step(cpu, 0x4012u);
#endif
/* 0xBFC1A1C8: 00817024 and $t6, $a0, $at */
- cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800321C8u);
#endif
@@ -329065,7 +329823,8 @@ label_BFC1A49C:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1A4A0: 2A0100D0 slti $at, $s0, 208 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (208) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (208) ? 1 : 0);
+ PGXP_ALU(0x2A0100D0u, cpu->gpr[1], _pgx1, 0x00D0u); }
#ifdef PSX_COSIM
cosim_instr(0x800324A0u);
#endif
@@ -329341,7 +330100,8 @@ label_BFC1A4E4:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC1A4F0: 2DF80001 sltiu $t8, $t7, 1 */
- cpu->gpr[24] = (uint32_t)(cpu->gpr[15] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)(cpu->gpr[15] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2DF80001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800324F0u);
#endif
@@ -329615,7 +330375,8 @@ label_BFC1A538:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1A53C: 2A0100D0 slti $at, $s0, 208 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (208) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (208) ? 1 : 0);
+ PGXP_ALU(0x2A0100D0u, cpu->gpr[1], _pgx1, 0x00D0u); }
#ifdef PSX_COSIM
cosim_instr(0x8003253Cu);
#endif
@@ -329878,7 +330639,8 @@ label_BFC1A580:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC1A58C: 2F280001 sltiu $t0, $t9, 1 */
- cpu->gpr[8] = (uint32_t)(cpu->gpr[25] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)(cpu->gpr[25] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2F280001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8003258Cu);
#endif
@@ -330147,7 +330909,8 @@ label_BFC1A5C8:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC1A5D4: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800325D4u);
#endif
@@ -330511,7 +331274,8 @@ label_BFC1A630:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC1A644: 2D210007 sltiu $at, $t1, 7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000007u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000007u ? 1 : 0);
+ PGXP_ALU(0x2D210007u, cpu->gpr[1], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x80032644u);
#endif
@@ -331447,7 +332211,8 @@ label_BFC1A6EC:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC1A704: 2DCF0001 sltiu $t7, $t6, 1 */
- cpu->gpr[15] = (uint32_t)(cpu->gpr[14] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)(cpu->gpr[14] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2DCF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80032704u);
#endif
@@ -331604,7 +332369,8 @@ label_BFC1A728:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC1A73C: 2F190001 sltiu $t9, $t8, 1 */
- cpu->gpr[25] = (uint32_t)(cpu->gpr[24] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)(cpu->gpr[24] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2F190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8003273Cu);
#endif
@@ -331725,7 +332491,8 @@ label_BFC1A760:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC1A768: 2861002B slti $at, $v1, 43 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (43) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (43) ? 1 : 0);
+ PGXP_ALU(0x2861002Bu, cpu->gpr[1], _pgx1, 0x002Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80032768u);
#endif
@@ -331776,7 +332543,8 @@ label_BFC1A774:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC1A774: 2861002F slti $at, $v1, 47 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (47) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (47) ? 1 : 0);
+ PGXP_ALU(0x2861002Fu, cpu->gpr[1], _pgx1, 0x002Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032774u);
#endif
@@ -334612,7 +335380,8 @@ label_BFC1AAB8:
psx_cyc_step(cpu, 0x8002u);
#endif
/* 0xBFC1AAC4: 2DE1000A sltiu $at, $t7, 10 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2DE1000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x80032AC4u);
#endif
@@ -334627,7 +335396,8 @@ label_BFC1AAB8:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC1AACC: 3058000F andi $t8, $v0, 0xF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3058000Fu, cpu->gpr[24], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032ACCu);
#endif
@@ -334659,7 +335429,8 @@ label_BFC1AAD0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1AAD0: 3042000F andi $v0, $v0, 0xF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032AD0u);
#endif
@@ -334667,7 +335438,8 @@ label_BFC1AAD0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1AAD4: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80032AD4u);
#endif
@@ -334675,7 +335447,8 @@ label_BFC1AAD0:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC1AAD8: 3058000F andi $t8, $v0, 0xF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3058000Fu, cpu->gpr[24], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032AD8u);
#endif
@@ -334693,7 +335466,8 @@ label_BFC1AADC:
psx_cyc_step(cpu, 0x1000002u);
#endif
/* 0xBFC1AADC: 2F01000A sltiu $at, $t8, 10 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2F01000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x80032ADCu);
#endif
@@ -334744,7 +335518,8 @@ label_BFC1AAE8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1AAE8: 304200F0 andi $v0, $v0, 0xF0 */
- cpu->gpr[2] = cpu->gpr[2] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xF0u;
+ PGXP_ALU(0x304200F0u, cpu->gpr[2], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80032AE8u);
#endif
@@ -334752,7 +335527,8 @@ label_BFC1AAE8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC1AAEC: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80032AECu);
#endif
@@ -334846,7 +335622,8 @@ label_BFC1AB00:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC1AB0C: 3045000F andi $a1, $v0, 0xF */
- cpu->gpr[5] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x3045000Fu, cpu->gpr[5], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032B0Cu);
#endif
@@ -334943,7 +335720,8 @@ label_BFC1AB20:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC1AB2C: 30A5000F andi $a1, $a1, 0xF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFu;
+ PGXP_ALU(0x30A5000Fu, cpu->gpr[5], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032B2Cu);
#endif
@@ -335040,7 +335818,8 @@ label_BFC1AB40:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC1AB4C: 30A5000F andi $a1, $a1, 0xF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFu;
+ PGXP_ALU(0x30A5000Fu, cpu->gpr[5], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80032B4Cu);
#endif
@@ -336155,7 +336934,8 @@ label_BFC1AC80:
psx_cyc_step(cpu, 0x8002u);
#endif
/* 0xBFC1AC94: 2DE1000A sltiu $at, $t7, 10 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2DE1000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x80032C94u);
#endif
@@ -336986,7 +337766,8 @@ label_BFC1AD60:
psx_cyc_step(cpu, 0x1000006u);
#endif
/* 0xBFC1AD68: 0041C024 and $t8, $v0, $at */
- cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032D68u);
#endif
@@ -337046,7 +337827,8 @@ label_BFC1AD74:
psx_cyc_step(cpu, 0x2000006u);
#endif
/* 0xBFC1AD78: 0041C824 and $t9, $v0, $at */
- cpu->gpr[25] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x0041C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032D78u);
#endif
@@ -337187,7 +337969,8 @@ label_BFC1AD94:
psx_cyc_step(cpu, 0x106u);
#endif
/* 0xBFC1AD98: 00414024 and $t0, $v0, $at */
- cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00414024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032D98u);
#endif
@@ -337247,7 +338030,8 @@ label_BFC1ADA4:
psx_cyc_step(cpu, 0x206u);
#endif
/* 0xBFC1ADA8: 00414824 and $t1, $v0, $at */
- cpu->gpr[9] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00414824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032DA8u);
#endif
@@ -338379,7 +339163,8 @@ label_BFC1AE80:
psx_cyc_step(cpu, 0x14002u);
#endif
/* 0xBFC1AE88: 02017024 and $t6, $s0, $at */
- cpu->gpr[14] = cpu->gpr[16] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[16] & cpu->gpr[1];
+ PGXP_ALU(0x02017024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032E88u);
#endif
@@ -338589,7 +339374,8 @@ label_BFC1AEC4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1AEC4: 28410015 slti $at, $v0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0);
+ PGXP_ALU(0x28410015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80032EC4u);
#endif
@@ -338883,7 +339669,8 @@ label_BFC1AF18:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1AF24: 2841000B slti $at, $v0, 11 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (11) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (11) ? 1 : 0);
+ PGXP_ALU(0x2841000Bu, cpu->gpr[1], _pgx1, 0x000Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80032F24u);
#endif
@@ -338949,7 +339736,8 @@ label_BFC1AF28:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1AF38: 2841000B slti $at, $v0, 11 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (11) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (11) ? 1 : 0);
+ PGXP_ALU(0x2841000Bu, cpu->gpr[1], _pgx1, 0x000Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80032F38u);
#endif
@@ -339223,7 +340011,8 @@ label_BFC1AF64:
psx_cyc_step(cpu, 0x2Au);
#endif
/* 0xBFC1AF84: 00A3082B sltu $at, $a1, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x00A3082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032F84u);
#endif
@@ -339347,7 +340136,8 @@ label_BFC1AFA0:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC1AFAC: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80032FACu);
#endif
@@ -339644,7 +340434,8 @@ label_BFC1AFE8:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC1B004: 00A2082B sltu $at, $a1, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x00A2082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033004u);
#endif
@@ -340083,7 +340874,8 @@ label_BFC1B08C:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC1B09C: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003309Cu);
#endif
@@ -340122,7 +340914,8 @@ label_BFC1B0A0:
psx_cyc_step(cpu, 0x2Au);
#endif
/* 0xBFC1B0A4: 00A3082B sltu $at, $a1, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x00A3082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800330A4u);
#endif
@@ -340198,7 +340991,8 @@ label_BFC1B0B0:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC1B0B4: 28C10063 slti $at, $a2, 99 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0);
+ PGXP_ALU(0x28C10063u, cpu->gpr[1], _pgx1, 0x0063u); }
#ifdef PSX_COSIM
cosim_instr(0x800330B4u);
#endif
@@ -340239,7 +341033,8 @@ label_BFC1B0B8:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC1B0BC: 00A2082B sltu $at, $a1, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x00A2082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800330BCu);
#endif
@@ -340290,7 +341085,8 @@ label_BFC1B0C8:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1B0C8: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800330C8u);
#endif
@@ -340318,7 +341114,8 @@ label_BFC1B0CC:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC1B0D0: 28C10063 slti $at, $a2, 99 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0);
+ PGXP_ALU(0x28C10063u, cpu->gpr[1], _pgx1, 0x0063u); }
#ifdef PSX_COSIM
cosim_instr(0x800330D0u);
#endif
@@ -340438,7 +341235,8 @@ label_BFC1B0E4:
psx_cyc_step(cpu, 0x10022u);
#endif
/* 0xBFC1B0F4: 00B0082B sltu $at, $a1, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x00B0082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800330F4u);
#endif
@@ -340507,7 +341305,8 @@ label_BFC1B100:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1B10C: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x8003310Cu);
#endif
@@ -340572,7 +341371,8 @@ label_BFC1B11C:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC1B11C: 28C10063 slti $at, $a2, 99 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0);
+ PGXP_ALU(0x28C10063u, cpu->gpr[1], _pgx1, 0x0063u); }
#ifdef PSX_COSIM
cosim_instr(0x8003311Cu);
#endif
@@ -340597,7 +341397,8 @@ label_BFC1B120:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC1B124: 28610015 slti $at, $v1, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (21) ? 1 : 0);
+ PGXP_ALU(0x28610015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80033124u);
#endif
@@ -341032,7 +341833,8 @@ label_BFC1B1A4:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC1B1A8: 28C10063 slti $at, $a2, 99 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0);
+ PGXP_ALU(0x28C10063u, cpu->gpr[1], _pgx1, 0x0063u); }
#ifdef PSX_COSIM
cosim_instr(0x800331A8u);
#endif
@@ -341487,7 +342289,8 @@ label_BFC1B228:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC1B238: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033238u);
#endif
@@ -341529,7 +342332,8 @@ label_BFC1B23C:
psx_cyc_step(cpu, 0x2Au);
#endif
/* 0xBFC1B240: 00A3082B sltu $at, $a1, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x00A3082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033240u);
#endif
@@ -341672,7 +342476,8 @@ label_BFC1B260:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC1B264: 0043082A slt $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033264u);
#endif
@@ -341797,7 +342602,8 @@ label_BFC1B280:
psx_cyc_step(cpu, 0x1000Au);
#endif
/* 0xBFC1B288: 0203082A slt $at, $s0, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0203082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033288u);
#endif
@@ -341881,7 +342687,8 @@ label_BFC1B2A0:
psx_cyc_step(cpu, 0x2Au);
#endif
/* 0xBFC1B2A0: 00A3082B sltu $at, $a1, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x00A3082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800332A0u);
#endif
@@ -341929,7 +342736,8 @@ label_BFC1B2AC:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1B2AC: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800332ACu);
#endif
@@ -342075,7 +342883,8 @@ label_BFC1B2C8:
psx_cyc_step(cpu, 0x10022u);
#endif
/* 0xBFC1B2D8: 00B0082B sltu $at, $a1, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x00B0082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800332D8u);
#endif
@@ -342093,7 +342902,8 @@ label_BFC1B2C8:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1B2E0: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800332E0u);
#endif
@@ -343155,7 +343965,8 @@ label_BFC1B410:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC1B41C: 2CA10015 sltiu $at, $a1, 21 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000015u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000015u ? 1 : 0);
+ PGXP_ALU(0x2CA10015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x8003341Cu);
#endif
@@ -343344,7 +344155,8 @@ label_BFC1B43C:
psx_cyc_step(cpu, 0x10022u);
#endif
/* 0xBFC1B45C: 00B0082B sltu $at, $a1, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x00B0082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003345Cu);
#endif
@@ -343591,7 +344403,8 @@ label_BFC1B494:
psx_cyc_step(cpu, 0x10022u);
#endif
/* 0xBFC1B4A0: 00B0082B sltu $at, $a1, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x00B0082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800334A0u);
#endif
@@ -343650,7 +344463,8 @@ label_BFC1B4A4:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC1B4B0: 2C810002 sltiu $at, $a0, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2C810002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x800334B0u);
#endif
@@ -343801,7 +344615,8 @@ label_BFC1B4D0:
psx_cyc_step(cpu, 0x10012u);
#endif
/* 0xBFC1B4DC: 0204082B sltu $at, $s0, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0204082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800334DCu);
#endif
@@ -343994,7 +344809,8 @@ label_BFC1B508:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC1B51C: 0045082A slt $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003351Cu);
#endif
@@ -344111,7 +344927,8 @@ label_BFC1B538:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC1B540: 28810015 slti $at, $a0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (21) ? 1 : 0);
+ PGXP_ALU(0x28810015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80033540u);
#endif
@@ -344365,7 +345182,8 @@ label_BFC1B58C:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC1B590: 0062082B sltu $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033590u);
#endif
@@ -344480,7 +345298,8 @@ label_BFC1B5A4:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC1B5B0: 0045082B sltu $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800335B0u);
#endif
@@ -344528,7 +345347,8 @@ label_BFC1B5BC:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1B5BC: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800335BCu);
#endif
@@ -344700,7 +345520,8 @@ label_BFC1B5EC:
psx_cyc_step(cpu, 0x10022u);
#endif
/* 0xBFC1B5F0: 0205082B sltu $at, $s0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0205082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800335F0u);
#endif
@@ -344715,7 +345536,8 @@ label_BFC1B5EC:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1B5F8: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800335F8u);
#endif
@@ -345691,7 +346513,8 @@ label_BFC1B6EC:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC1B6F4: 28610015 slti $at, $v1, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (21) ? 1 : 0);
+ PGXP_ALU(0x28610015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800336F4u);
#endif
@@ -345851,7 +346674,8 @@ label_BFC1B718:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC1B728: 2DF80001 sltiu $t8, $t7, 1 */
- cpu->gpr[24] = (uint32_t)(cpu->gpr[15] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)(cpu->gpr[15] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2DF80001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80033728u);
#endif
@@ -345990,7 +346814,8 @@ label_BFC1B748:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC1B758: 2F280001 sltiu $t0, $t9, 1 */
- cpu->gpr[8] = (uint32_t)(cpu->gpr[25] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)(cpu->gpr[25] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2F280001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80033758u);
#endif
@@ -348404,7 +349229,8 @@ label_BFC1B9EC:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC1B9F8: 2D210015 sltiu $at, $t1, 21 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000015u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000015u ? 1 : 0);
+ PGXP_ALU(0x2D210015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800339F8u);
#endif
@@ -349276,7 +350102,8 @@ label_BFC1BAF4:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC1BB00: 2C610002 sltiu $at, $v1, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2C610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80033B00u);
#endif
@@ -349480,7 +350307,8 @@ label_BFC1BB2C:
psx_cyc_step(cpu, 0x2000Au);
#endif
/* 0xBFC1BB38: 0223082B sltu $at, $s1, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0223082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033B38u);
#endif
@@ -349558,7 +350386,8 @@ label_BFC1BB44:
psx_cyc_step(cpu, 0x8006u);
#endif
/* 0xBFC1BB50: 01E2082B sltu $at, $t7, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x01E2082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033B50u);
#endif
@@ -349606,7 +350435,8 @@ label_BFC1BB5C:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC1BB5C: 2A210015 slti $at, $s1, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A210015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80033B5Cu);
#endif
@@ -349816,7 +350646,8 @@ label_BFC1BB88:
psx_cyc_step(cpu, 0x1020002u);
#endif
/* 0xBFC1BB94: 0311082B sltu $at, $t8, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0311082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033B94u);
#endif
@@ -349831,7 +350662,8 @@ label_BFC1BB88:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC1BB9C: 2A210015 slti $at, $s1, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A210015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80033B9Cu);
#endif
@@ -349887,7 +350719,8 @@ label_BFC1BBA0:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC1BBAC: 28610002 slti $at, $v1, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0);
+ PGXP_ALU(0x28610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80033BACu);
#endif
@@ -350041,7 +350874,8 @@ label_BFC1BBD0:
psx_cyc_step(cpu, 0x2000Au);
#endif
/* 0xBFC1BBDC: 0223082A slt $at, $s1, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0223082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033BDCu);
#endif
@@ -350151,7 +350985,8 @@ label_BFC1BBF0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1BC00: 28410015 slti $at, $v0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0);
+ PGXP_ALU(0x28410015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80033C00u);
#endif
@@ -350341,7 +351176,8 @@ label_BFC1BC2C:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC1BC30: 2A210015 slti $at, $s1, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A210015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80033C30u);
#endif
@@ -350620,7 +351456,8 @@ label_BFC1BC74:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC1BC84: 28410002 slti $at, $v0, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0);
+ PGXP_ALU(0x28410002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80033C84u);
#endif
@@ -350774,7 +351611,8 @@ label_BFC1BCA4:
psx_cyc_step(cpu, 0x20006u);
#endif
/* 0xBFC1BCB4: 0222082A slt $at, $s1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0222082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033CB4u);
#endif
@@ -350845,7 +351683,8 @@ label_BFC1BCC0:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC1BCCC: 0062082A slt $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033CCCu);
#endif
@@ -351015,7 +351854,8 @@ label_BFC1BCF4:
psx_cyc_step(cpu, 0x20402u);
#endif
/* 0xBFC1BD00: 0151082A slt $at, $t2, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0151082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033D00u);
#endif
@@ -351452,7 +352292,8 @@ label_BFC1BD80:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC1BD8C: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80033D8Cu);
#endif
@@ -351761,7 +352602,8 @@ label_BFC1BDDC:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC1BDEC: 2D210005 sltiu $at, $t1, 5 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000005u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000005u ? 1 : 0);
+ PGXP_ALU(0x2D210005u, cpu->gpr[1], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0x80033DECu);
#endif
@@ -353464,7 +354306,8 @@ label_BFC1BF90:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC1BFBC: 2C610002 sltiu $at, $v1, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2C610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80033FBCu);
#endif
@@ -353717,7 +354560,8 @@ label_BFC1BFF8:
psx_cyc_step(cpu, 0x1000Au);
#endif
/* 0xBFC1C004: 0203082B sltu $at, $s0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0203082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034004u);
#endif
@@ -353816,7 +354660,8 @@ label_BFC1C018:
psx_cyc_step(cpu, 0x106u);
#endif
/* 0xBFC1C024: 0102082B sltu $at, $t0, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0102082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034024u);
#endif
@@ -353901,7 +354746,8 @@ label_BFC1C03C:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1C03C: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x8003403Cu);
#endif
@@ -354182,7 +355028,8 @@ label_BFC1C07C:
psx_cyc_step(cpu, 0x10402u);
#endif
/* 0xBFC1C088: 0150082B sltu $at, $t2, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[10] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[10] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0150082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034088u);
#endif
@@ -354390,7 +355237,8 @@ label_BFC1C0B8:
psx_cyc_step(cpu, 0x802u);
#endif
/* 0xBFC1C0C4: 29610002 slti $at, $t3, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (2) ? 1 : 0);
+ PGXP_ALU(0x29610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x800340C4u);
#endif
@@ -354405,7 +355253,8 @@ label_BFC1C0B8:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1C0CC: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800340CCu);
#endif
@@ -354564,7 +355413,8 @@ label_BFC1C0EC:
psx_cyc_step(cpu, 0x14002u);
#endif
/* 0xBFC1C0F8: 020E082A slt $at, $s0, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x020E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800340F8u);
#endif
@@ -354582,7 +355432,8 @@ label_BFC1C0EC:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1C100: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80034100u);
#endif
@@ -355345,7 +356196,8 @@ label_BFC1C1A4:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC1C1B4: 2D210002 sltiu $at, $t1, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2D210002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x800341B4u);
#endif
@@ -355616,7 +356468,8 @@ label_BFC1C1F8:
psx_cyc_step(cpu, 0x10202u);
#endif
/* 0xBFC1C204: 0209082B sltu $at, $s0, $t1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0209082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034204u);
#endif
@@ -355715,7 +356568,8 @@ label_BFC1C218:
psx_cyc_step(cpu, 0x502u);
#endif
/* 0xBFC1C224: 010A082B sltu $at, $t0, $t2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x010A082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034224u);
#endif
@@ -355821,7 +356675,8 @@ label_BFC1C244:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1C244: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80034244u);
#endif
@@ -356037,7 +356892,8 @@ label_BFC1C27C:
psx_cyc_step(cpu, 0x10102u);
#endif
/* 0xBFC1C280: 0110082B sltu $at, $t0, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0110082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034280u);
#endif
@@ -356417,7 +357273,8 @@ label_BFC1C2D8:
psx_cyc_step(cpu, 0x10012u);
#endif
/* 0xBFC1C2F8: 0204082B sltu $at, $s0, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0204082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800342F8u);
#endif
@@ -356508,7 +357365,8 @@ label_BFC1C30C:
psx_cyc_step(cpu, 0x902u);
#endif
/* 0xBFC1C310: 010B082B sltu $at, $t0, $t3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x010B082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034310u);
#endif
@@ -356635,7 +357493,8 @@ label_BFC1C338:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC1C338: 2C810002 sltiu $at, $a0, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2C810002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80034338u);
#endif
@@ -356834,7 +357693,8 @@ label_BFC1C370:
psx_cyc_step(cpu, 0x10012u);
#endif
/* 0xBFC1C374: 0204082B sltu $at, $s0, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0204082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034374u);
#endif
@@ -356957,7 +357817,8 @@ label_BFC1C380:
psx_cyc_step(cpu, 0xA2u);
#endif
/* 0xBFC1C3A0: 00E5082B sltu $at, $a3, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x00E5082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800343A0u);
#endif
@@ -357151,7 +358012,8 @@ label_BFC1C3D8:
psx_cyc_step(cpu, 0x902u);
#endif
/* 0xBFC1C3D8: 010B082B sltu $at, $t0, $t3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x010B082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800343D8u);
#endif
@@ -357454,7 +358316,8 @@ label_BFC1C42C:
psx_cyc_step(cpu, 0x10102u);
#endif
/* 0xBFC1C42C: 0110082B sltu $at, $t0, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0110082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003442Cu);
#endif
@@ -357616,7 +358479,8 @@ label_BFC1C454:
psx_cyc_step(cpu, 0x902u);
#endif
/* 0xBFC1C454: 010B082B sltu $at, $t0, $t3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x010B082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034454u);
#endif
@@ -357787,7 +358651,8 @@ label_BFC1C488:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC1C490: 0043082B sltu $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034490u);
#endif
@@ -360015,7 +360880,8 @@ label_BFC1C6E8:
psx_cyc_step(cpu, 0x2006u);
#endif
/* 0xBFC1C6FC: 01A2082B sltu $at, $t5, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x01A2082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800346FCu);
#endif
@@ -360066,7 +360932,8 @@ label_BFC1C708:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1C708: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80034708u);
#endif
@@ -360191,7 +361058,8 @@ label_BFC1C720:
psx_cyc_step(cpu, 0x14002u);
#endif
/* 0xBFC1C72C: 01D0082B sltu $at, $t6, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x01D0082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003472Cu);
#endif
@@ -360209,7 +361077,8 @@ label_BFC1C720:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1C734: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80034734u);
#endif
@@ -362016,7 +362885,8 @@ label_BFC1C904:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC1C910: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034910u);
#endif
@@ -362853,7 +363723,8 @@ label_BFC1C9F0:
psx_cyc_step(cpu, 0x2000012u);
#endif
/* 0xBFC1C9F4: 0081C824 and $t9, $a0, $at */
- cpu->gpr[25] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x0081C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800349F4u);
#endif
@@ -363142,7 +364013,8 @@ label_BFC1CA38:
psx_cyc_step(cpu, 0x212u);
#endif
/* 0xBFC1CA3C: 00814824 and $t1, $a0, $at */
- cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00814824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034A3Cu);
#endif
@@ -363294,7 +364166,8 @@ label_BFC1CA5C:
psx_cyc_step(cpu, 0x412u);
#endif
/* 0xBFC1CA60: 00815024 and $t2, $a0, $at */
- cpu->gpr[10] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00815024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034A60u);
#endif
@@ -363443,7 +364316,8 @@ label_BFC1CA80:
psx_cyc_step(cpu, 0x812u);
#endif
/* 0xBFC1CA84: 00815824 and $t3, $a0, $at */
- cpu->gpr[11] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00815824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034A84u);
#endif
@@ -363589,7 +364463,8 @@ label_BFC1CAA4:
psx_cyc_step(cpu, 0x1012u);
#endif
/* 0xBFC1CAA8: 00816024 and $t4, $a0, $at */
- cpu->gpr[12] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00816024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034AA8u);
#endif
@@ -363741,7 +364616,8 @@ label_BFC1CAC8:
psx_cyc_step(cpu, 0x2012u);
#endif
/* 0xBFC1CACC: 00816824 and $t5, $a0, $at */
- cpu->gpr[13] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[13] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00816824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80034ACCu);
#endif
@@ -364962,7 +365838,8 @@ label_BFC1CBF4:
psx_cyc_step(cpu, 0x140u);
#endif
/* 0xBFC1CC18: 30C8000F andi $t0, $a2, 0xF */
- cpu->gpr[8] = cpu->gpr[6] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] & 0xFu;
+ PGXP_ALU(0x30C8000Fu, cpu->gpr[8], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80034C18u);
#endif
@@ -364970,7 +365847,8 @@ label_BFC1CBF4:
psx_cyc_step(cpu, 0x880u);
#endif
/* 0xBFC1CC1C: 30EB000F andi $t3, $a3, 0xF */
- cpu->gpr[11] = cpu->gpr[7] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0xFu;
+ PGXP_ALU(0x30EB000Fu, cpu->gpr[11], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80034C1Cu);
#endif
@@ -365150,7 +366028,8 @@ label_BFC1CC3C:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC1CC64: 30E8000F andi $t0, $a3, 0xF */
- cpu->gpr[8] = cpu->gpr[7] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0xFu;
+ PGXP_ALU(0x30E8000Fu, cpu->gpr[8], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80034C64u);
#endif
@@ -365185,7 +366064,8 @@ label_BFC1CC3C:
psx_cyc_step(cpu, 0x4040u);
#endif
/* 0xBFC1CC74: 30CE000F andi $t6, $a2, 0xF */
- cpu->gpr[14] = cpu->gpr[6] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] & 0xFu;
+ PGXP_ALU(0x30CE000Fu, cpu->gpr[14], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80034C74u);
#endif
@@ -365324,7 +366204,8 @@ label_BFC1CC90:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC1CCA4: 2881003C slti $at, $a0, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (60) ? 1 : 0);
+ PGXP_ALU(0x2881003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80034CA4u);
#endif
@@ -366881,7 +367762,8 @@ label_BFC1CE24:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC1CE2C: 2E010005 sltiu $at, $s0, 5 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < 0x00000005u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < 0x00000005u ? 1 : 0);
+ PGXP_ALU(0x2E010005u, cpu->gpr[1], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0x80034E2Cu);
#endif
@@ -370505,7 +371387,8 @@ label_BFC1D294:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC1D2AC: 28610002 slti $at, $v1, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0);
+ PGXP_ALU(0x28610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x800352ACu);
#endif
@@ -371653,7 +372536,8 @@ label_BFC1D42C:
psx_cyc_step(cpu, 0x200Au);
#endif
/* 0xBFC1D43C: 01A3082A slt $at, $t5, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x01A3082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003543Cu);
#endif
@@ -374266,7 +375150,8 @@ label_BFC1D7AC:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC1D7B4: 004E082A slt $at, $v0, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x004E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800357B4u);
#endif
@@ -374817,7 +375702,8 @@ label_BFC1D86C:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC1D870: 2A61003C slti $at, $s3, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (60) ? 1 : 0);
+ PGXP_ALU(0x2A61003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80035870u);
#endif
@@ -374992,7 +375878,8 @@ label_BFC1D87C:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC1D8A4: 2A61003C slti $at, $s3, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (60) ? 1 : 0);
+ PGXP_ALU(0x2A61003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x800358A4u);
#endif
@@ -375123,7 +376010,8 @@ label_BFC1D8C4:
psx_cyc_step(cpu, 0x100002u);
#endif
/* 0xBFC1D8C8: 2A810064 slti $at, $s4, 100 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (100) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (100) ? 1 : 0);
+ PGXP_ALU(0x2A810064u, cpu->gpr[1], _pgx1, 0x0064u); }
#ifdef PSX_COSIM
cosim_instr(0x800358C8u);
#endif
@@ -375167,7 +376055,8 @@ label_BFC1D8CC:
psx_cyc_step(cpu, 0x100002u);
#endif
/* 0xBFC1D8D0: 2A810064 slti $at, $s4, 100 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (100) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (100) ? 1 : 0);
+ PGXP_ALU(0x2A810064u, cpu->gpr[1], _pgx1, 0x0064u); }
#ifdef PSX_COSIM
cosim_instr(0x800358D0u);
#endif
@@ -376281,7 +377170,8 @@ label_BFC1DA18:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC1DA24: 31F80010 andi $t8, $t7, 0x10 */
- cpu->gpr[24] = cpu->gpr[15] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x10u;
+ PGXP_ALU(0x31F80010u, cpu->gpr[24], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80035A24u);
#endif
@@ -376623,7 +377513,8 @@ label_BFC1DA78:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC1DA84: 31090010 andi $t1, $t0, 0x10 */
- cpu->gpr[9] = cpu->gpr[8] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x10u;
+ PGXP_ALU(0x31090010u, cpu->gpr[9], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80035A84u);
#endif
@@ -377295,7 +378186,8 @@ label_BFC1DB30:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC1DB3C: 304E0080 andi $t6, $v0, 0x80 */
- cpu->gpr[14] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x304E0080u, cpu->gpr[14], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80035B3Cu);
#endif
@@ -377535,7 +378427,8 @@ label_BFC1DB78:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC1DB84: 33280008 andi $t0, $t9, 0x8 */
- cpu->gpr[8] = cpu->gpr[25] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x8u;
+ PGXP_ALU(0x33280008u, cpu->gpr[8], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80035B84u);
#endif
@@ -377582,7 +378475,8 @@ label_BFC1DB90:
psx_cyc_step(cpu, 0x204u);
#endif
/* 0xBFC1DB90: 30490040 andi $t1, $v0, 0x40 */
- cpu->gpr[9] = cpu->gpr[2] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x40u;
+ PGXP_ALU(0x30490040u, cpu->gpr[9], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80035B90u);
#endif
@@ -377597,7 +378491,8 @@ label_BFC1DB90:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC1DB98: 304B0080 andi $t3, $v0, 0x80 */
- cpu->gpr[11] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x304B0080u, cpu->gpr[11], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80035B98u);
#endif
@@ -377690,7 +378585,8 @@ label_BFC1DBAC:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC1DBAC: 304B0080 andi $t3, $v0, 0x80 */
- cpu->gpr[11] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x304B0080u, cpu->gpr[11], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80035BACu);
#endif
@@ -377788,7 +378684,8 @@ label_BFC1DBC4:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC1DBC4: 304C0010 andi $t4, $v0, 0x10 */
- cpu->gpr[12] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304C0010u, cpu->gpr[12], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80035BC4u);
#endif
@@ -380750,7 +381647,8 @@ label_BFC1DF94:
psx_cyc_step(cpu, 0x2000006u);
#endif
/* 0xBFC1DFA4: 0059082B sltu $at, $v0, $t9 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0059082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80035FA4u);
#endif
@@ -381184,7 +382082,8 @@ label_BFC1E024:
psx_cyc_step(cpu, 0x802u);
#endif
/* 0xBFC1E030: 2D610095 sltiu $at, $t3, 149 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < 0x00000095u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < 0x00000095u ? 1 : 0);
+ PGXP_ALU(0x2D610095u, cpu->gpr[1], _pgx1, 0x0095u); }
#ifdef PSX_COSIM
cosim_instr(0x80036030u);
#endif
@@ -381367,7 +382266,8 @@ label_BFC1E058:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC1E064: 2CC10007 sltiu $at, $a2, 7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < 0x00000007u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < 0x00000007u ? 1 : 0);
+ PGXP_ALU(0x2CC10007u, cpu->gpr[1], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x80036064u);
#endif
@@ -381543,7 +382443,8 @@ label_BFC1E084:
psx_cyc_step(cpu, 0x2002u);
#endif
/* 0xBFC1E090: 2DA10006 sltiu $at, $t5, 6 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < 0x00000006u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < 0x00000006u ? 1 : 0);
+ PGXP_ALU(0x2DA10006u, cpu->gpr[1], _pgx1, 0x0006u); }
#ifdef PSX_COSIM
cosim_instr(0x80036090u);
#endif
@@ -382773,7 +383674,8 @@ label_BFC1E1CC:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC1E1E0: 2DC10018 sltiu $at, $t6, 24 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000018u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000018u ? 1 : 0);
+ PGXP_ALU(0x2DC10018u, cpu->gpr[1], _pgx1, 0x0018u); }
#ifdef PSX_COSIM
cosim_instr(0x800361E0u);
#endif
@@ -385607,7 +386509,8 @@ label_BFC1E3F0:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC1E404: 2DC10018 sltiu $at, $t6, 24 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000018u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000018u ? 1 : 0);
+ PGXP_ALU(0x2DC10018u, cpu->gpr[1], _pgx1, 0x0018u); }
#ifdef PSX_COSIM
cosim_instr(0x80036404u);
#endif
@@ -386210,7 +387113,8 @@ label_BFC1E48C:
psx_cyc_step(cpu, 0x802u);
#endif
/* 0xBFC1E4B4: 2D61000A sltiu $at, $t3, 10 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < 0x0000000Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < 0x0000000Au ? 1 : 0);
+ PGXP_ALU(0x2D61000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x800364B4u);
#endif
@@ -387155,7 +388059,8 @@ label_BFC1E5B8:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC1E5B8: 30A30003 andi $v1, $a1, 0x3 */
- cpu->gpr[3] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30A30003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x800365B8u);
#endif
@@ -388040,7 +388945,8 @@ label_BFC1E6BC:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC1E6C8: 33280080 andi $t0, $t9, 0x80 */
- cpu->gpr[8] = cpu->gpr[25] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x80u;
+ PGXP_ALU(0x33280080u, cpu->gpr[8], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x800366C8u);
#endif
@@ -388184,7 +389090,8 @@ label_BFC1E6E4:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC1E6F8: 3084007F andi $a0, $a0, 0x7F */
- cpu->gpr[4] = cpu->gpr[4] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x7Fu;
+ PGXP_ALU(0x3084007Fu, cpu->gpr[4], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800366F8u);
#endif
@@ -388356,7 +389263,8 @@ label_BFC1E718:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC1E72C: 3084007F andi $a0, $a0, 0x7F */
- cpu->gpr[4] = cpu->gpr[4] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x7Fu;
+ PGXP_ALU(0x3084007Fu, cpu->gpr[4], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003672Cu);
#endif
@@ -389041,7 +389949,8 @@ label_BFC1E7E0:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC1E7F4: 0043082A slt $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800367F4u);
#endif
@@ -389159,7 +390068,8 @@ label_BFC1E80C:
psx_cyc_step(cpu, 0x2000Au);
#endif
/* 0xBFC1E818: 0223082A slt $at, $s1, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0223082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036818u);
#endif
@@ -389245,7 +390155,8 @@ label_BFC1E824:
psx_cyc_step(cpu, 0x100Au);
#endif
/* 0xBFC1E834: 006C082B sltu $at, $v1, $t4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[12] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[12] ? 1 : 0);
+ PGXP_ALU(0x006C082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036834u);
#endif
@@ -389363,7 +390274,8 @@ label_BFC1E84C:
psx_cyc_step(cpu, 0x22002u);
#endif
/* 0xBFC1E858: 022D082B sltu $at, $s1, $t5 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x022D082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036858u);
#endif
@@ -390399,7 +391311,8 @@ label_BFC1E974:
psx_cyc_step(cpu, 0x406u);
#endif
/* 0xBFC1E980: 0142082A slt $at, $t2, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0142082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036980u);
#endif
@@ -391223,7 +392136,8 @@ label_BFC1EA60:
psx_cyc_step(cpu, 0x10006u);
#endif
/* 0xBFC1EA6C: 0050082B sltu $at, $v0, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0050082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036A6Cu);
#endif
@@ -392056,7 +392970,8 @@ label_BFC1EB50:
psx_cyc_step(cpu, 0x10006u);
#endif
/* 0xBFC1EB5C: 0050082B sltu $at, $v0, $s0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0050082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036B5Cu);
#endif
@@ -392193,7 +393108,8 @@ label_BFC1EB74:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC1EB88: 01CF082B sltu $at, $t6, $t7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x01CF082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036B88u);
#endif
@@ -393442,7 +394358,8 @@ label_BFC1ECE0:
psx_cyc_step(cpu, 0x2000006u);
#endif
/* 0xBFC1ECF4: 0322082B sltu $at, $t9, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0322082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036CF4u);
#endif
@@ -393603,7 +394520,8 @@ label_BFC1ED1C:
psx_cyc_step(cpu, 0x20202u);
#endif
/* 0xBFC1ED28: 0131082B sltu $at, $t1, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0131082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036D28u);
#endif
@@ -394184,7 +395102,8 @@ label_BFC1EDB4:
psx_cyc_step(cpu, 0x806u);
#endif
/* 0xBFC1EDC8: 0162082B sltu $at, $t3, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0162082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036DC8u);
#endif
@@ -394348,7 +395267,8 @@ label_BFC1EDF0:
psx_cyc_step(cpu, 0x24002u);
#endif
/* 0xBFC1EDFC: 01D1082B sltu $at, $t6, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x01D1082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036DFCu);
#endif
@@ -395198,7 +396118,8 @@ label_BFC1EEE0:
psx_cyc_step(cpu, 0x20006u);
#endif
/* 0xBFC1EEE0: 0051082A slt $at, $v0, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036EE0u);
#endif
@@ -395514,7 +396435,8 @@ label_BFC1EF40:
psx_cyc_step(cpu, 0x20006u);
#endif
/* 0xBFC1EF40: 0051082A slt $at, $v0, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80036F40u);
#endif
@@ -395684,7 +396606,8 @@ label_BFC1EF5C:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC1EF78: 28810015 slti $at, $a0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (21) ? 1 : 0);
+ PGXP_ALU(0x28810015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x80036F78u);
#endif
@@ -397391,7 +398314,8 @@ label_BFC1F160:
psx_cyc_step(cpu, 0x808u);
#endif
/* 0xBFC1F16C: 306B0010 andi $t3, $v1, 0x10 */
- cpu->gpr[11] = cpu->gpr[3] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] & 0x10u;
+ PGXP_ALU(0x306B0010u, cpu->gpr[11], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x8003716Cu);
#endif
@@ -398021,7 +398945,8 @@ label_BFC1F224:
psx_cyc_step(cpu, 0x408u);
#endif
/* 0xBFC1F224: 306A0008 andi $t2, $v1, 0x8 */
- cpu->gpr[10] = cpu->gpr[3] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x8u;
+ PGXP_ALU(0x306A0008u, cpu->gpr[10], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80037224u);
#endif
@@ -398081,7 +399006,8 @@ label_BFC1F230:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC1F238: 30680004 andi $t0, $v1, 0x4 */
- cpu->gpr[8] = cpu->gpr[3] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] & 0x4u;
+ PGXP_ALU(0x30680004u, cpu->gpr[8], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80037238u);
#endif
@@ -398249,7 +399175,8 @@ label_BFC1F268:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC1F26C: 304C0080 andi $t4, $v0, 0x80 */
- cpu->gpr[12] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x304C0080u, cpu->gpr[12], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x8003726Cu);
#endif
@@ -398340,7 +399267,8 @@ label_BFC1F284:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC1F284: 304E0040 andi $t6, $v0, 0x40 */
- cpu->gpr[14] = cpu->gpr[2] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x40u;
+ PGXP_ALU(0x304E0040u, cpu->gpr[14], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80037284u);
#endif
@@ -398355,7 +399283,8 @@ label_BFC1F284:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC1F28C: 30590010 andi $t9, $v0, 0x10 */
- cpu->gpr[25] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30590010u, cpu->gpr[25], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x8003728Cu);
#endif
@@ -398414,7 +399343,8 @@ label_BFC1F290:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC1F29C: 30590010 andi $t9, $v0, 0x10 */
- cpu->gpr[25] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30590010u, cpu->gpr[25], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x8003729Cu);
#endif
@@ -398521,7 +399451,8 @@ label_BFC1F2B8:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC1F2B8: 30680004 andi $t0, $v1, 0x4 */
- cpu->gpr[8] = cpu->gpr[3] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] & 0x4u;
+ PGXP_ALU(0x30680004u, cpu->gpr[8], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x800372B8u);
#endif
@@ -398582,7 +399513,8 @@ label_BFC1F2C4:
psx_cyc_step(cpu, 0x204u);
#endif
/* 0xBFC1F2C4: 30490008 andi $t1, $v0, 0x8 */
- cpu->gpr[9] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30490008u, cpu->gpr[9], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x800372C4u);
#endif
@@ -399140,7 +400072,8 @@ label_BFC1F364:
psx_cyc_step(cpu, 0x408u);
#endif
/* 0xBFC1F36C: 306A0001 andi $t2, $v1, 0x1 */
- cpu->gpr[10] = cpu->gpr[3] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x1u;
+ PGXP_ALU(0x306A0001u, cpu->gpr[10], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8003736Cu);
#endif
@@ -399172,7 +400105,8 @@ label_BFC1F370:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC1F370: 30580040 andi $t8, $v0, 0x40 */
- cpu->gpr[24] = cpu->gpr[2] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x40u;
+ PGXP_ALU(0x30580040u, cpu->gpr[24], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80037370u);
#endif
@@ -399219,7 +400153,8 @@ label_BFC1F37C:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC1F37C: 30480020 andi $t0, $v0, 0x20 */
- cpu->gpr[8] = cpu->gpr[2] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x20u;
+ PGXP_ALU(0x30480020u, cpu->gpr[8], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x8003737Cu);
#endif
@@ -399269,7 +400204,8 @@ label_BFC1F388:
psx_cyc_step(cpu, 0x204u);
#endif
/* 0xBFC1F388: 30490010 andi $t1, $v0, 0x10 */
- cpu->gpr[9] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x30490010u, cpu->gpr[9], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80037388u);
#endif
@@ -399287,7 +400223,8 @@ label_BFC1F388:
psx_cyc_step(cpu, 0x408u);
#endif
/* 0xBFC1F390: 306A0001 andi $t2, $v1, 0x1 */
- cpu->gpr[10] = cpu->gpr[3] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x1u;
+ PGXP_ALU(0x306A0001u, cpu->gpr[10], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80037390u);
#endif
@@ -399385,7 +400322,8 @@ label_BFC1F3A8:
psx_cyc_step(cpu, 0x408u);
#endif
/* 0xBFC1F3A8: 306A0001 andi $t2, $v1, 0x1 */
- cpu->gpr[10] = cpu->gpr[3] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x1u;
+ PGXP_ALU(0x306A0001u, cpu->gpr[10], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800373A8u);
#endif
@@ -399446,7 +400384,8 @@ label_BFC1F3B4:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC1F3B4: 304B0080 andi $t3, $v0, 0x80 */
- cpu->gpr[11] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x304B0080u, cpu->gpr[11], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x800373B4u);
#endif
@@ -400624,7 +401563,8 @@ label_BFC1F50C:
psx_cyc_step(cpu, 0x28u);
#endif
/* 0xBFC1F50C: 30A30003 andi $v1, $a1, 0x3 */
- cpu->gpr[3] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30A30003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x8003750Cu);
#endif
@@ -401159,7 +402099,8 @@ label_BFC1F5B0:
psx_cyc_step(cpu, 0x210u);
#endif
/* 0xBFC1F5B4: 308900FF andi $t1, $a0, 0xFF */
- cpu->gpr[9] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800375B4u);
#endif
@@ -403359,7 +404300,8 @@ label_BFC1F84C:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC1F84C: 0045082B sltu $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003784Cu);
#endif
@@ -403377,7 +404319,8 @@ label_BFC1F84C:
psx_cyc_step(cpu, 0x46u);
#endif
/* 0xBFC1F854: 00C2082B sltu $at, $a2, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x00C2082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80037854u);
#endif
@@ -409888,7 +410831,8 @@ label_BFC2020C:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC20220: 0043082A slt $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80038220u);
#endif
@@ -410016,7 +410960,8 @@ label_BFC20238:
psx_cyc_step(cpu, 0x1000Au);
#endif
/* 0xBFC20244: 0203082A slt $at, $s0, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0203082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80038244u);
#endif
@@ -411583,7 +412528,8 @@ label_BFC203E4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC203E4: 28410002 slti $at, $v0, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0);
+ PGXP_ALU(0x28410002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x800383E4u);
#endif
@@ -411771,7 +412717,8 @@ label_BFC2041C:
psx_cyc_step(cpu, 0x20006u);
#endif
/* 0xBFC2041C: 0222082A slt $at, $s1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0222082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003841Cu);
#endif
@@ -412513,7 +413460,8 @@ label_BFC204DC:
psx_cyc_step(cpu, 0x2000006u);
#endif
/* 0xBFC204F0: 0059082B sltu $at, $v0, $t9 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0059082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800384F0u);
#endif
@@ -414399,7 +415347,8 @@ label_BFC206D0:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC206DC: 004E082A slt $at, $v0, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x004E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800386DCu);
#endif
@@ -414954,7 +415903,8 @@ label_BFC20770:
psx_cyc_step(cpu, 0x20006u);
#endif
/* 0xBFC20770: 0051082A slt $at, $v0, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80038770u);
#endif
@@ -415446,7 +416396,8 @@ label_BFC207F8:
psx_cyc_step(cpu, 0x20006u);
#endif
/* 0xBFC207F8: 0051082A slt $at, $v0, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800387F8u);
#endif
@@ -415783,7 +416734,8 @@ label_BFC20860:
psx_cyc_step(cpu, 0x20006u);
#endif
/* 0xBFC20860: 0051082A slt $at, $v0, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80038860u);
#endif
@@ -415983,7 +416935,8 @@ label_BFC20884:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC208A0: 28810015 slti $at, $a0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (21) ? 1 : 0);
+ PGXP_ALU(0x28810015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800388A0u);
#endif
@@ -416880,7 +417833,8 @@ label_BFC20990:
psx_cyc_step(cpu, 0x2802u);
#endif
/* 0xBFC209A4: 016D082B sltu $at, $t3, $t5 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x016D082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800389A4u);
#endif
@@ -417437,7 +418391,8 @@ label_BFC20A40:
psx_cyc_step(cpu, 0x602u);
#endif
/* 0xBFC20A54: 012A082B sltu $at, $t1, $t2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x012A082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80038A54u);
#endif
@@ -422434,7 +423389,8 @@ label_BFC20F24:
psx_cyc_step(cpu, 0x20010u);
#endif
/* 0xBFC20F34: 309100FF andi $s1, $a0, 0xFF */
- cpu->gpr[17] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[17] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x309100FFu, cpu->gpr[17], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80038F34u);
#endif
@@ -427368,7 +428324,8 @@ label_BFC213E8:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC213E8: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800393E8u);
#endif
@@ -427384,7 +428341,8 @@ label_BFC213E8:
psx_cyc_step(cpu, 0x14u);
#endif
/* 0xBFC213F0: 3082000F andi $v0, $a0, 0xF */
- cpu->gpr[2] = cpu->gpr[4] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFu;
+ PGXP_ALU(0x3082000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800393F0u);
#endif
@@ -427720,7 +428678,8 @@ label_BFC21438:
psx_cyc_step(cpu, 0x50002u);
#endif
/* 0xBFC21448: 0212082A slt $at, $s0, $s2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0212082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039448u);
#endif
@@ -427785,7 +428744,8 @@ label_BFC2144C:
psx_cyc_step(cpu, 0x50002u);
#endif
/* 0xBFC2145C: 0212082A slt $at, $s0, $s2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0212082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003945Cu);
#endif
@@ -427843,7 +428803,8 @@ label_BFC21468:
psx_cyc_step(cpu, 0x50002u);
#endif
/* 0xBFC21468: 0212082A slt $at, $s0, $s2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0212082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039468u);
#endif
@@ -428370,7 +429331,8 @@ label_BFC214CC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC214DC: 2841003D slti $at, $v0, 61 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (61) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (61) ? 1 : 0);
+ PGXP_ALU(0x2841003Du, cpu->gpr[1], _pgx1, 0x003Du); }
#ifdef PSX_COSIM
cosim_instr(0x800394DCu);
#endif
@@ -428879,7 +429841,8 @@ label_BFC21564:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2156C: 28410003 slti $at, $v0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3) ? 1 : 0);
+ PGXP_ALU(0x28410003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x8003956Cu);
#endif
@@ -429382,7 +430345,8 @@ label_BFC21610:
psx_cyc_step(cpu, 0x8006u);
#endif
/* 0xBFC2161C: 004F082A slt $at, $v0, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x004F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003961Cu);
#endif
@@ -432059,7 +433023,8 @@ label_BFC218E0:
psx_cyc_step(cpu, 0x8012u);
#endif
/* 0xBFC218E8: 00817824 and $t7, $a0, $at */
- cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800398E8u);
#endif
@@ -432251,7 +433216,8 @@ label_BFC21914:
psx_cyc_step(cpu, 0x1000012u);
#endif
/* 0xBFC21918: 0081C024 and $t8, $a0, $at */
- cpu->gpr[24] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x0081C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039918u);
#endif
@@ -434511,7 +435477,8 @@ label_BFC21B7C:
psx_cyc_step(cpu, 0x1006u);
#endif
/* 0xBFC21B98: 0182082A slt $at, $t4, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0182082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039B98u);
#endif
@@ -435218,7 +436185,8 @@ label_BFC21C78:
psx_cyc_step(cpu, 0x40102u);
#endif
/* 0xBFC21C84: 0248082A slt $at, $s2, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0248082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039C84u);
#endif
@@ -435637,7 +436605,8 @@ label_BFC21D18:
psx_cyc_step(cpu, 0x40102u);
#endif
/* 0xBFC21D20: 0248082A slt $at, $s2, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0248082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039D20u);
#endif
@@ -435943,7 +436912,8 @@ label_BFC21D88:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC21D90: 28410011 slti $at, $v0, 17 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (17) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (17) ? 1 : 0);
+ PGXP_ALU(0x28410011u, cpu->gpr[1], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x80039D90u);
#endif
@@ -435958,7 +436928,8 @@ label_BFC21D88:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC21D98: 28410014 slti $at, $v0, 20 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (20) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (20) ? 1 : 0);
+ PGXP_ALU(0x28410014u, cpu->gpr[1], _pgx1, 0x0014u); }
#ifdef PSX_COSIM
cosim_instr(0x80039D98u);
#endif
@@ -436053,7 +437024,8 @@ label_BFC21DA4:
psx_cyc_step(cpu, 0x42002u);
#endif
/* 0xBFC21DB0: 024D082A slt $at, $s2, $t5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x024D082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039DB0u);
#endif
@@ -436472,7 +437444,8 @@ label_BFC21E44:
psx_cyc_step(cpu, 0x42002u);
#endif
/* 0xBFC21E4C: 024D082A slt $at, $s2, $t5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x024D082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039E4Cu);
#endif
@@ -436974,7 +437947,8 @@ label_BFC21EB8:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC21F0C: 28610010 slti $at, $v1, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (16) ? 1 : 0);
+ PGXP_ALU(0x28610010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80039F0Cu);
#endif
@@ -437063,7 +438037,8 @@ label_BFC21F18:
psx_cyc_step(cpu, 0x42002u);
#endif
/* 0xBFC21F20: 024D082A slt $at, $s2, $t5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x024D082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039F20u);
#endif
@@ -437341,7 +438316,8 @@ label_BFC21F78:
psx_cyc_step(cpu, 0x2040002u);
#endif
/* 0xBFC21F80: 0259082A slt $at, $s2, $t9 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0259082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80039F80u);
#endif
@@ -439363,7 +440339,8 @@ label_BFC221F4:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC22218: 2A61000F slti $at, $s3, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A61000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A218u);
#endif
@@ -439499,7 +440476,8 @@ label_BFC2223C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2223C: 28410020 slti $at, $v0, 32 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (32) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (32) ? 1 : 0);
+ PGXP_ALU(0x28410020u, cpu->gpr[1], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x8003A23Cu);
#endif
@@ -439882,7 +440860,8 @@ label_BFC222B0:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC222B0: 2A010041 slti $at, $s0, 65 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (65) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (65) ? 1 : 0);
+ PGXP_ALU(0x2A010041u, cpu->gpr[1], _pgx1, 0x0041u); }
#ifdef PSX_COSIM
cosim_instr(0x8003A2B0u);
#endif
@@ -440038,7 +441017,8 @@ label_BFC222D4:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC222D4: 2A010040 slti $at, $s0, 64 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (64) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (64) ? 1 : 0);
+ PGXP_ALU(0x2A010040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x8003A2D4u);
#endif
@@ -440171,7 +441151,8 @@ label_BFC222F4:
psx_cyc_step(cpu, 0x2080002u);
#endif
/* 0xBFC222FC: 0279082A slt $at, $s3, $t9 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0279082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003A2FCu);
#endif
@@ -440222,7 +441203,8 @@ label_BFC22308:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC22308: 2A61000F slti $at, $s3, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A61000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A308u);
#endif
@@ -440430,7 +441412,8 @@ label_BFC2233C:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC22340: 2A61000F slti $at, $s3, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A61000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A340u);
#endif
@@ -442301,7 +443284,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC22618: 312900FF andi $t1, $t1, 0xFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFu;
+ PGXP_ALU(0x312900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A618u);
#endif
@@ -442321,7 +443305,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC22620: 310800FF andi $t0, $t0, 0xFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310800FFu, cpu->gpr[8], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A620u);
#endif
@@ -442338,7 +443323,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0xA0u);
#endif
/* 0xBFC22628: 30A700FF andi $a3, $a1, 0xFF */
- cpu->gpr[7] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A628u);
#endif
@@ -442358,7 +443344,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0xC0u);
#endif
/* 0xBFC22630: 30E600FF andi $a2, $a3, 0xFF */
- cpu->gpr[6] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[6] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30E600FFu, cpu->gpr[6], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A630u);
#endif
@@ -442375,7 +443362,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x500u);
#endif
/* 0xBFC22638: 310A00FF andi $t2, $t0, 0xFF */
- cpu->gpr[10] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310A00FFu, cpu->gpr[10], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A638u);
#endif
@@ -442395,7 +443383,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x1200u);
#endif
/* 0xBFC22640: 312C00FF andi $t4, $t1, 0xFF */
- cpu->gpr[12] = cpu->gpr[9] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[12] = cpu->gpr[9] & 0xFFu;
+ PGXP_ALU(0x312C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A640u);
#endif
@@ -442403,7 +443392,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x810u);
#endif
/* 0xBFC22644: 308B00FF andi $t3, $a0, 0xFF */
- cpu->gpr[11] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308B00FFu, cpu->gpr[11], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A644u);
#endif
@@ -442491,7 +443481,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC2266C: 30E700FF andi $a3, $a3, 0xFF */
- cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30E700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A66Cu);
#endif
@@ -442511,7 +443502,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC22674: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A674u);
#endif
@@ -442528,7 +443520,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC2267C: 306400FF andi $a0, $v1, 0xFF */
- cpu->gpr[4] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A67Cu);
#endif
@@ -442548,7 +443541,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x50u);
#endif
/* 0xBFC22684: 308600FF andi $a2, $a0, 0xFF */
- cpu->gpr[6] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[6] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308600FFu, cpu->gpr[6], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A684u);
#endif
@@ -442565,7 +443559,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x420u);
#endif
/* 0xBFC2268C: 30AA00FF andi $t2, $a1, 0xFF */
- cpu->gpr[10] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[10] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30AA00FFu, cpu->gpr[10], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A68Cu);
#endif
@@ -442585,7 +443580,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x1080u);
#endif
/* 0xBFC22694: 30EC00FF andi $t4, $a3, 0xFF */
- cpu->gpr[12] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[12] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30EC00FFu, cpu->gpr[12], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A694u);
#endif
@@ -442593,7 +443589,8 @@ label_BFC225A8:
psx_cyc_step(cpu, 0x80000800u);
#endif
/* 0xBFC22698: 33EB00FF andi $t3, $ra, 0xFF */
- cpu->gpr[11] = cpu->gpr[31] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[11] = cpu->gpr[31] & 0xFFu;
+ PGXP_ALU(0x33EB00FFu, cpu->gpr[11], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003A698u);
#endif
@@ -442947,7 +443944,8 @@ label_BFC226E4:
psx_cyc_step(cpu, 0x8012u);
#endif
/* 0xBFC226EC: 00817824 and $t7, $a0, $at */
- cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003A6ECu);
#endif
@@ -444048,7 +445046,8 @@ label_BFC227EC:
psx_cyc_step(cpu, 0x2000012u);
#endif
/* 0xBFC227F0: 0081C824 and $t9, $a0, $at */
- cpu->gpr[25] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x0081C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003A7F0u);
#endif
@@ -444197,7 +445196,8 @@ label_BFC22810:
psx_cyc_step(cpu, 0x112u);
#endif
/* 0xBFC22814: 00814024 and $t0, $a0, $at */
- cpu->gpr[8] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00814024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003A814u);
#endif
@@ -444254,7 +445254,8 @@ label_BFC22820:
psx_cyc_step(cpu, 0x212u);
#endif
/* 0xBFC22824: 00814824 and $t1, $a0, $at */
- cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00814824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003A824u);
#endif
@@ -444311,7 +445312,8 @@ label_BFC22830:
psx_cyc_step(cpu, 0x412u);
#endif
/* 0xBFC22834: 00815024 and $t2, $a0, $at */
- cpu->gpr[10] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00815024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003A834u);
#endif
@@ -444368,7 +445370,8 @@ label_BFC22840:
psx_cyc_step(cpu, 0x812u);
#endif
/* 0xBFC22844: 00815824 and $t3, $a0, $at */
- cpu->gpr[11] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00815824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003A844u);
#endif
@@ -447358,7 +448361,8 @@ label_BFC22B94:
psx_cyc_step(cpu, 0x4012u);
#endif
/* 0xBFC22BA0: 00817024 and $t6, $a0, $at */
- cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003ABA0u);
#endif
@@ -447804,7 +448808,8 @@ label_BFC22C00:
psx_cyc_step(cpu, 0x8012u);
#endif
/* 0xBFC22C08: 00817824 and $t7, $a0, $at */
- cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003AC08u);
#endif
@@ -448095,7 +449100,8 @@ label_BFC22C48:
psx_cyc_step(cpu, 0x1000012u);
#endif
/* 0xBFC22C4C: 0081C024 and $t8, $a0, $at */
- cpu->gpr[24] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x0081C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003AC4Cu);
#endif
@@ -448615,7 +449621,8 @@ label_BFC22CC4:
psx_cyc_step(cpu, 0x2000012u);
#endif
/* 0xBFC22CC8: 0081C824 and $t9, $a0, $at */
- cpu->gpr[25] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x0081C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003ACC8u);
#endif
@@ -449007,7 +450014,8 @@ label_BFC22D20:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC22D2C: 2901003C slti $at, $t0, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (60) ? 1 : 0);
+ PGXP_ALU(0x2901003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x8003AD2Cu);
#endif
@@ -449377,7 +450385,8 @@ label_BFC22D80:
psx_cyc_step(cpu, 0x412u);
#endif
/* 0xBFC22D84: 00815024 and $t2, $a0, $at */
- cpu->gpr[10] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00815024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003AD84u);
#endif
@@ -449392,7 +450401,8 @@ label_BFC22D80:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC22D8C: 2841003C slti $at, $v0, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (60) ? 1 : 0);
+ PGXP_ALU(0x2841003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x8003AD8Cu);
#endif
@@ -449691,7 +450701,8 @@ label_BFC22DC8:
psx_cyc_step(cpu, 0x812u);
#endif
/* 0xBFC22DD0: 00815824 and $t3, $a0, $at */
- cpu->gpr[11] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00815824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003ADD0u);
#endif
@@ -449706,7 +450717,8 @@ label_BFC22DC8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC22DD8: 2841003C slti $at, $v0, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (60) ? 1 : 0);
+ PGXP_ALU(0x2841003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x8003ADD8u);
#endif
@@ -451442,7 +452454,8 @@ label_BFC22FF8:
psx_cyc_step(cpu, 0x80002u);
#endif
/* 0xBFC22FF8: 2A610002 slti $at, $s3, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (2) ? 1 : 0);
+ PGXP_ALU(0x2A610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8003AFF8u);
#endif
@@ -451640,7 +452653,8 @@ label_BFC23020:
psx_cyc_step(cpu, 0x400402u);
#endif
/* 0xBFC23030: 02CA082A slt $at, $s6, $t2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x02CA082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003B030u);
#endif
@@ -452221,7 +453235,8 @@ label_BFC230E4:
psx_cyc_step(cpu, 0x20022u);
#endif
/* 0xBFC230E4: 00B1082A slt $at, $a1, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x00B1082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003B0E4u);
#endif
@@ -452312,7 +453327,8 @@ label_BFC230F8:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC230FC: 0211082A slt $at, $s0, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0211082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003B0FCu);
#endif
@@ -452719,7 +453735,8 @@ label_BFC2317C:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC23180: 2A21000F slti $at, $s1, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A21000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003B180u);
#endif
@@ -453021,7 +454038,8 @@ label_BFC231DC:
psx_cyc_step(cpu, 0x40002u);
#endif
/* 0xBFC231E0: 2A41000F slti $at, $s2, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A41000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003B1E0u);
#endif
@@ -454125,7 +455143,8 @@ label_BFC2332C:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC23338: 28610002 slti $at, $v1, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0);
+ PGXP_ALU(0x28610002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8003B338u);
#endif
@@ -455822,7 +456841,8 @@ label_BFC23570:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC23578: 2881003C slti $at, $a0, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (60) ? 1 : 0);
+ PGXP_ALU(0x2881003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x8003B578u);
#endif
@@ -455975,7 +456995,8 @@ label_BFC235A4:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC235A4: 2881003C slti $at, $a0, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (60) ? 1 : 0);
+ PGXP_ALU(0x2881003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x8003B5A4u);
#endif
@@ -456311,7 +457332,8 @@ label_BFC235D0:
psx_cyc_step(cpu, 0x20000u);
#endif
/* 0xBFC23614: 323100FF andi $s1, $s1, 0xFF */
- cpu->gpr[17] = cpu->gpr[17] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] & 0xFFu;
+ PGXP_ALU(0x323100FFu, cpu->gpr[17], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003B614u);
#endif
@@ -456326,7 +457348,8 @@ label_BFC235D0:
psx_cyc_step(cpu, 0x40004u);
#endif
/* 0xBFC2361C: 305200FF andi $s2, $v0, 0xFF */
- cpu->gpr[18] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[18] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305200FFu, cpu->gpr[18], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003B61Cu);
#endif
@@ -460735,7 +461758,8 @@ label_BFC23C4C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC23CC8: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003BCC8u);
#endif
@@ -460764,7 +461788,8 @@ label_BFC23C4C:
psx_cyc_step(cpu, 0x50u);
#endif
/* 0xBFC23CD4: 30C400FF andi $a0, $a2, 0xFF */
- cpu->gpr[4] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30C400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003BCD4u);
#endif
@@ -460820,7 +461845,8 @@ label_BFC23C4C:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC23CEC: 312900FF andi $t1, $t1, 0xFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFu;
+ PGXP_ALU(0x312900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003BCECu);
#endif
@@ -460831,7 +461857,8 @@ label_BFC23C4C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC23CF0: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003BCF0u);
#endif
@@ -460839,7 +461866,8 @@ label_BFC23C4C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC23CF4: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003BCF4u);
#endif
@@ -460847,7 +461875,8 @@ label_BFC23C4C:
psx_cyc_step(cpu, 0x108u);
#endif
/* 0xBFC23CF8: 310300FF andi $v1, $t0, 0xFF */
- cpu->gpr[3] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003BCF8u);
#endif
@@ -462320,7 +463349,8 @@ label_BFC23E7C:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC23E80: 2A01000A slti $at, $s0, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0);
+ PGXP_ALU(0x2A01000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x8003BE80u);
#endif
@@ -463328,7 +464358,8 @@ label_BFC23FA4:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC23FA8: 2A01000A slti $at, $s0, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0);
+ PGXP_ALU(0x2A01000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x8003BFA8u);
#endif
@@ -463971,7 +465002,8 @@ label_BFC24064:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC24068: 2A01000A slti $at, $s0, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0);
+ PGXP_ALU(0x2A01000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x8003C068u);
#endif
@@ -464579,7 +465611,8 @@ label_BFC24114:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC24118: 2A01000A slti $at, $s0, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0);
+ PGXP_ALU(0x2A01000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x8003C118u);
#endif
@@ -465049,7 +466082,8 @@ label_BFC2418C:
psx_cyc_step(cpu, 0x206u);
#endif
/* 0xBFC241AC: 0049082A slt $at, $v0, $t1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0049082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003C1ACu);
#endif
@@ -465523,7 +466557,8 @@ label_BFC24238:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC24244: 304A1FFF andi $t2, $v0, 0x1FFF */
- cpu->gpr[10] = cpu->gpr[2] & 0x1FFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x1FFFu;
+ PGXP_ALU(0x304A1FFFu, cpu->gpr[10], _pgx1, 0x1FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003C244u);
#endif
@@ -466419,7 +467454,8 @@ label_BFC24314:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC24320: 28A1003C slti $at, $a1, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (60) ? 1 : 0);
+ PGXP_ALU(0x28A1003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x8003C320u);
#endif
@@ -467315,7 +468351,8 @@ label_BFC24418:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC2442C: 2A21003C slti $at, $s1, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (60) ? 1 : 0);
+ PGXP_ALU(0x2A21003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x8003C42Cu);
#endif
@@ -468129,7 +469166,8 @@ label_BFC244EC:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC2453C: 2A01000E slti $at, $s0, 14 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (14) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (14) ? 1 : 0);
+ PGXP_ALU(0x2A01000Eu, cpu->gpr[1], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0x8003C53Cu);
#endif
@@ -468407,7 +469445,8 @@ label_BFC24598:
psx_cyc_step(cpu, 0x40002u);
#endif
/* 0xBFC2459C: 2A41000E slti $at, $s2, 14 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (14) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (14) ? 1 : 0);
+ PGXP_ALU(0x2A41000Eu, cpu->gpr[1], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0x8003C59Cu);
#endif
@@ -469118,7 +470157,8 @@ label_BFC24664:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC24670: 2861003C slti $at, $v1, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (60) ? 1 : 0);
+ PGXP_ALU(0x2861003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x8003C670u);
#endif
@@ -470086,7 +471126,8 @@ label_BFC24770:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC247C0: 29010010 slti $at, $t0, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (16) ? 1 : 0);
+ PGXP_ALU(0x29010010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x8003C7C0u);
#endif
@@ -471356,7 +472397,8 @@ label_BFC24960:
psx_cyc_step(cpu, 0x302u);
#endif
/* 0xBFC2496C: 0128082A slt $at, $t1, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0128082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003C96Cu);
#endif
@@ -471692,7 +472734,8 @@ label_BFC249B8:
psx_cyc_step(cpu, 0x1802u);
#endif
/* 0xBFC249C4: 018B082A slt $at, $t4, $t3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x018B082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003C9C4u);
#endif
@@ -471870,7 +472913,8 @@ label_BFC249F0:
psx_cyc_step(cpu, 0x100006u);
#endif
/* 0xBFC249F0: 0282082A slt $at, $s4, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0282082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003C9F0u);
#endif
@@ -472431,7 +473475,8 @@ label_BFC24A7C:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC24A88: 29C1003C slti $at, $t6, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (60) ? 1 : 0);
+ PGXP_ALU(0x29C1003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x8003CA88u);
#endif
@@ -473403,7 +474448,8 @@ label_BFC24BC4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC24BCC: 2841000F slti $at, $v0, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ PGXP_ALU(0x2841000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003CBCCu);
#endif
@@ -473526,7 +474572,8 @@ label_BFC24BDC:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC24BF4: 29C10010 slti $at, $t6, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (16) ? 1 : 0);
+ PGXP_ALU(0x29C10010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x8003CBF4u);
#endif
@@ -475095,7 +476142,8 @@ label_BFC24DFC:
psx_cyc_step(cpu, 0x2004002u);
#endif
/* 0xBFC24E08: 032E082A slt $at, $t9, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x032E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003CE08u);
#endif
@@ -475425,7 +476473,8 @@ label_BFC24E54:
psx_cyc_step(cpu, 0x1000402u);
#endif
/* 0xBFC24E60: 0158082A slt $at, $t2, $t8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x0158082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003CE60u);
#endif
@@ -475609,7 +476658,8 @@ label_BFC24E8C:
psx_cyc_step(cpu, 0x100006u);
#endif
/* 0xBFC24E8C: 0282082A slt $at, $s4, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0282082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003CE8Cu);
#endif
@@ -475786,7 +476836,8 @@ label_BFC24EB4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC24EBC: 2841000F slti $at, $v0, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ PGXP_ALU(0x2841000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003CEBCu);
#endif
@@ -480786,7 +481837,8 @@ label_BFC253E4:
psx_cyc_step(cpu, 0x10006u);
#endif
/* 0xBFC253F8: 0050082A slt $at, $v0, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0050082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D3F8u);
#endif
@@ -480870,7 +481922,8 @@ label_BFC2540C:
psx_cyc_step(cpu, 0x10006u);
#endif
/* 0xBFC2540C: 0050082A slt $at, $v0, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0050082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D40Cu);
#endif
@@ -482219,7 +483272,8 @@ label_BFC255A0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC255B4: 38420001 xori $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u;
+ PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8003D5B4u);
#endif
@@ -483082,7 +484136,8 @@ label_BFC256E4:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC256F0: 29C10002 slti $at, $t6, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (2) ? 1 : 0);
+ PGXP_ALU(0x29C10002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8003D6F0u);
#endif
@@ -483155,7 +484210,8 @@ label_BFC256FC:
psx_cyc_step(cpu, 0x8002u);
#endif
/* 0xBFC25708: 29E10002 slti $at, $t7, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (2) ? 1 : 0);
+ PGXP_ALU(0x29E10002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8003D708u);
#endif
@@ -483626,7 +484682,8 @@ label_BFC25788:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC25798: 2DC14000 sltiu $at, $t6, 16384 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00004000u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00004000u ? 1 : 0);
+ PGXP_ALU(0x2DC14000u, cpu->gpr[1], _pgx1, 0x4000u); }
#ifdef PSX_COSIM
cosim_instr(0x8003D798u);
#endif
@@ -483730,7 +484787,8 @@ label_BFC257A4:
psx_cyc_step(cpu, 0x3000008u);
#endif
/* 0xBFC257BC: 0078C826 xor $t9, $v1, $t8 */
- cpu->gpr[25] = cpu->gpr[3] ^ cpu->gpr[24];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[3] ^ cpu->gpr[24];
+ PGXP_ALU(0x0078C826u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D7BCu);
#endif
@@ -483750,7 +484808,8 @@ label_BFC257A4:
psx_cyc_step(cpu, 0x304u);
#endif
/* 0xBFC257C4: 01024826 xor $t1, $t0, $v0 */
- cpu->gpr[9] = cpu->gpr[8] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[8] ^ cpu->gpr[2];
+ PGXP_ALU(0x01024826u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D7C4u);
#endif
@@ -484006,7 +485065,8 @@ label_BFC2580C:
psx_cyc_step(cpu, 0xC004u);
#endif
/* 0xBFC25818: 01C27826 xor $t7, $t6, $v0 */
- cpu->gpr[15] = cpu->gpr[14] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[14] ^ cpu->gpr[2];
+ PGXP_ALU(0x01C27826u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D818u);
#endif
@@ -484035,7 +485095,8 @@ label_BFC2580C:
psx_cyc_step(cpu, 0x2000104u);
#endif
/* 0xBFC25824: 03224026 xor $t0, $t9, $v0 */
- cpu->gpr[8] = cpu->gpr[25] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[25] ^ cpu->gpr[2];
+ PGXP_ALU(0x03224026u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D824u);
#endif
@@ -484133,7 +485194,8 @@ label_BFC25840:
psx_cyc_step(cpu, 0x100600u);
#endif
/* 0xBFC25848: 01345024 and $t2, $t1, $s4 */
- cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[20];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[20];
+ PGXP_ALU(0x01345024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D848u);
#endif
@@ -484167,7 +485229,8 @@ label_BFC25840:
psx_cyc_step(cpu, 0x1802u);
#endif
/* 0xBFC25858: 01616024 and $t4, $t3, $at */
- cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[1];
+ PGXP_ALU(0x01616024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D858u);
#endif
@@ -484522,7 +485585,8 @@ label_BFC2592C:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC25938: 0082082A slt $at, $a0, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0082082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D938u);
#endif
@@ -484638,7 +485702,8 @@ label_BFC2594C:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC25958: 0044082A slt $at, $v0, $a0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0044082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D958u);
#endif
@@ -484733,7 +485798,8 @@ label_BFC25968:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC25974: 00A2082A slt $at, $a1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x00A2082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D974u);
#endif
@@ -484846,7 +485912,8 @@ label_BFC25988:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC25994: 0045082A slt $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003D994u);
#endif
@@ -485218,7 +486285,8 @@ label_BFC25A0C:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC25A14: 308300F0 andi $v1, $a0, 0xF0 */
- cpu->gpr[3] = cpu->gpr[4] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0xF0u;
+ PGXP_ALU(0x308300F0u, cpu->gpr[3], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x8003DA14u);
#endif
@@ -485419,7 +486487,8 @@ label_BFC25A2C:
psx_cyc_step(cpu, 0x601u);
#endif
/* 0xBFC25A50: 01205027 nor $t2, $t1, $zero */
- cpu->gpr[10] = ~(cpu->gpr[9] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = ~(cpu->gpr[9] | cpu->gpr[0]);
+ PGXP_ALU(0x01205027u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003DA50u);
#endif
@@ -485427,7 +486496,8 @@ label_BFC25A2C:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC25A54: 314B0008 andi $t3, $t2, 0x8 */
- cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x8003DA54u);
#endif
@@ -485612,7 +486682,8 @@ label_BFC25A88:
psx_cyc_step(cpu, 0x1008001u);
#endif
/* 0xBFC25A90: 01E0C027 nor $t8, $t7, $zero */
- cpu->gpr[24] = ~(cpu->gpr[15] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = ~(cpu->gpr[15] | cpu->gpr[0]);
+ PGXP_ALU(0x01E0C027u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003DA90u);
#endif
@@ -485620,7 +486691,8 @@ label_BFC25A88:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC25A94: 33190004 andi $t9, $t8, 0x4 */
- cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x8003DA94u);
#endif
@@ -485737,7 +486809,8 @@ label_BFC25AB4:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC25ABC: 314BFFFF andi $t3, $t2, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003DABCu);
#endif
@@ -485851,7 +486924,8 @@ label_BFC25AD4:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC25AE0: 306300F0 andi $v1, $v1, 0xF0 */
- cpu->gpr[3] = cpu->gpr[3] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xF0u;
+ PGXP_ALU(0x306300F0u, cpu->gpr[3], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x8003DAE0u);
#endif
@@ -486119,7 +487193,8 @@ label_BFC25B14:
psx_cyc_step(cpu, 0x601u);
#endif
/* 0xBFC25B30: 01205027 nor $t2, $t1, $zero */
- cpu->gpr[10] = ~(cpu->gpr[9] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = ~(cpu->gpr[9] | cpu->gpr[0]);
+ PGXP_ALU(0x01205027u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003DB30u);
#endif
@@ -486127,7 +487202,8 @@ label_BFC25B14:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC25B34: 314BFFFF andi $t3, $t2, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8003DB34u);
#endif
@@ -486160,7 +487236,8 @@ label_BFC25B14:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC25B44: 306300F0 andi $v1, $v1, 0xF0 */
- cpu->gpr[3] = cpu->gpr[3] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xF0u;
+ PGXP_ALU(0x306300F0u, cpu->gpr[3], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x8003DB44u);
#endif
@@ -489896,7 +490973,8 @@ label_BFC25F88:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC25F98: 2A0100B4 slti $at, $s0, 180 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (180) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (180) ? 1 : 0);
+ PGXP_ALU(0x2A0100B4u, cpu->gpr[1], _pgx1, 0x00B4u); }
#ifdef PSX_COSIM
cosim_instr(0x8003DF98u);
#endif
@@ -489978,7 +491056,8 @@ label_BFC25FA4:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC25FA8: 2A0101B5 slti $at, $s0, 437 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (437) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (437) ? 1 : 0);
+ PGXP_ALU(0x2A0101B5u, cpu->gpr[1], _pgx1, 0x01B5u); }
#ifdef PSX_COSIM
cosim_instr(0x8003DFA8u);
#endif
@@ -490089,7 +491168,8 @@ label_BFC25FC4:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC25FC4: 2A0101B5 slti $at, $s0, 437 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (437) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (437) ? 1 : 0);
+ PGXP_ALU(0x2A0101B5u, cpu->gpr[1], _pgx1, 0x01B5u); }
#ifdef PSX_COSIM
cosim_instr(0x8003DFC4u);
#endif
@@ -491130,7 +492210,8 @@ label_BFC26110:
psx_cyc_step(cpu, 0x10022u);
#endif
/* 0xBFC26114: 00B0082A slt $at, $a1, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x00B0082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E114u);
#endif
@@ -491187,7 +492268,8 @@ label_BFC26120:
psx_cyc_step(cpu, 0x18002u);
#endif
/* 0xBFC26124: 020F082A slt $at, $s0, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x020F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E124u);
#endif
@@ -491202,7 +492284,8 @@ label_BFC26120:
psx_cyc_step(cpu, 0x20082u);
#endif
/* 0xBFC2612C: 00F1082A slt $at, $a3, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x00F1082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E12Cu);
#endif
@@ -491282,7 +492365,8 @@ label_BFC26138:
psx_cyc_step(cpu, 0x1020002u);
#endif
/* 0xBFC2613C: 0238082A slt $at, $s1, $t8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x0238082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E13Cu);
#endif
@@ -491384,7 +492468,8 @@ label_BFC26150:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC26158: 332E0020 andi $t6, $t9, 0x20 */
- cpu->gpr[14] = cpu->gpr[25] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] & 0x20u;
+ PGXP_ALU(0x332E0020u, cpu->gpr[14], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x8003E158u);
#endif
@@ -491812,7 +492897,8 @@ label_BFC261CC:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC261D4: 31F80020 andi $t8, $t7, 0x20 */
- cpu->gpr[24] = cpu->gpr[15] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x20u;
+ PGXP_ALU(0x31F80020u, cpu->gpr[24], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x8003E1D4u);
#endif
@@ -492149,7 +493235,8 @@ label_BFC2622C:
psx_cyc_step(cpu, 0x1008002u);
#endif
/* 0xBFC26238: 01E1C024 and $t8, $t7, $at */
- cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[1];
+ PGXP_ALU(0x01E1C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E238u);
#endif
@@ -492362,7 +493449,8 @@ label_BFC26264:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC26270: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E270u);
#endif
@@ -492687,7 +493775,8 @@ label_BFC262B4:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC262C4: 2A210072 slti $at, $s1, 114 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (114) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (114) ? 1 : 0);
+ PGXP_ALU(0x2A210072u, cpu->gpr[1], _pgx1, 0x0072u); }
#ifdef PSX_COSIM
cosim_instr(0x8003E2C4u);
#endif
@@ -492726,7 +493815,8 @@ label_BFC262C8:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC262CC: 2A21016B slti $at, $s1, 363 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (363) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (363) ? 1 : 0);
+ PGXP_ALU(0x2A21016Bu, cpu->gpr[1], _pgx1, 0x016Bu); }
#ifdef PSX_COSIM
cosim_instr(0x8003E2CCu);
#endif
@@ -492765,7 +493855,8 @@ label_BFC262D0:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC262D4: 2A010015 slti $at, $s0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0);
+ PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x8003E2D4u);
#endif
@@ -492804,7 +493895,8 @@ label_BFC262D8:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC262DC: 2A0100B3 slti $at, $s0, 179 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (179) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (179) ? 1 : 0);
+ PGXP_ALU(0x2A0100B3u, cpu->gpr[1], _pgx1, 0x00B3u); }
#ifdef PSX_COSIM
cosim_instr(0x8003E2DCu);
#endif
@@ -492843,7 +493935,8 @@ label_BFC262E0:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC262E4: 2A0101A7 slti $at, $s0, 423 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (423) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (423) ? 1 : 0);
+ PGXP_ALU(0x2A0101A7u, cpu->gpr[1], _pgx1, 0x01A7u); }
#ifdef PSX_COSIM
cosim_instr(0x8003E2E4u);
#endif
@@ -492949,7 +494042,8 @@ label_BFC262F8:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC262F8: 2A0101A7 slti $at, $s0, 423 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (423) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (423) ? 1 : 0);
+ PGXP_ALU(0x2A0101A7u, cpu->gpr[1], _pgx1, 0x01A7u); }
#ifdef PSX_COSIM
cosim_instr(0x8003E2F8u);
#endif
@@ -492977,7 +494071,8 @@ label_BFC262FC:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC26300: 2A010245 slti $at, $s0, 581 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (581) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (581) ? 1 : 0);
+ PGXP_ALU(0x2A010245u, cpu->gpr[1], _pgx1, 0x0245u); }
#ifdef PSX_COSIM
cosim_instr(0x8003E300u);
#endif
@@ -493929,7 +495024,8 @@ label_BFC263F0:
psx_cyc_step(cpu, 0x8120u);
#endif
/* 0xBFC263F0: 01057824 and $t7, $t0, $a1 */
- cpu->gpr[15] = cpu->gpr[8] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[8] & cpu->gpr[5];
+ PGXP_ALU(0x01057824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E3F0u);
#endif
@@ -494094,7 +495190,8 @@ label_BFC26414:
psx_cyc_step(cpu, 0x1000120u);
#endif
/* 0xBFC26414: 0105C024 and $t8, $t0, $a1 */
- cpu->gpr[24] = cpu->gpr[8] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[8] & cpu->gpr[5];
+ PGXP_ALU(0x0105C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E414u);
#endif
@@ -496980,7 +498077,8 @@ label_BFC26750:
psx_cyc_step(cpu, 0x182u);
#endif
/* 0xBFC26754: 00E14024 and $t0, $a3, $at */
- cpu->gpr[8] = cpu->gpr[7] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[7] & cpu->gpr[1];
+ PGXP_ALU(0x00E14024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E754u);
#endif
@@ -497585,7 +498683,8 @@ label_BFC267E8:
psx_cyc_step(cpu, 0x1082u);
#endif
/* 0xBFC267F0: 00E16024 and $t4, $a3, $at */
- cpu->gpr[12] = cpu->gpr[7] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[7] & cpu->gpr[1];
+ PGXP_ALU(0x00E16024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E7F0u);
#endif
@@ -498222,7 +499321,8 @@ label_BFC26894:
psx_cyc_step(cpu, 0x1000082u);
#endif
/* 0xBFC268A4: 00E1C024 and $t8, $a3, $at */
- cpu->gpr[24] = cpu->gpr[7] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[7] & cpu->gpr[1];
+ PGXP_ALU(0x00E1C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003E8A4u);
#endif
@@ -499451,7 +500551,8 @@ label_BFC26A0C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC26A20: 30A5007F andi $a1, $a1, 0x7F */
- cpu->gpr[5] = cpu->gpr[5] & 0x7Fu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x7Fu;
+ PGXP_ALU(0x30A5007Fu, cpu->gpr[5], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8003EA20u);
#endif
@@ -502151,7 +503252,8 @@ label_BFC26D64:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC26D6C: 30420080 andi $v0, $v0, 0x80 */
- cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x8003ED6Cu);
#endif
@@ -502218,7 +503320,8 @@ label_BFC26D78:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC26D80: 31F80080 andi $t8, $t7, 0x80 */
- cpu->gpr[24] = cpu->gpr[15] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x80u;
+ PGXP_ALU(0x31F80080u, cpu->gpr[24], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x8003ED80u);
#endif
@@ -502402,7 +503505,8 @@ label_BFC26DA8:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC26DB0: 33280010 andi $t0, $t9, 0x10 */
- cpu->gpr[8] = cpu->gpr[25] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x10u;
+ PGXP_ALU(0x33280010u, cpu->gpr[8], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x8003EDB0u);
#endif
@@ -502520,7 +503624,8 @@ label_BFC26DCC:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC26DD0: 312A0010 andi $t2, $t1, 0x10 */
- cpu->gpr[10] = cpu->gpr[9] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x10u;
+ PGXP_ALU(0x312A0010u, cpu->gpr[10], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x8003EDD0u);
#endif
@@ -507474,7 +508579,8 @@ label_BFC273A8:
psx_cyc_step(cpu, 0x800002u);
#endif
/* 0xBFC273AC: 2AE1001E slti $at, $s7, 30 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (30) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (30) ? 1 : 0);
+ PGXP_ALU(0x2AE1001Eu, cpu->gpr[1], _pgx1, 0x001Eu); }
#ifdef PSX_COSIM
cosim_instr(0x8003F3ACu);
#endif
@@ -509609,7 +510715,8 @@ label_BFC275F0:
psx_cyc_step(cpu, 0x40006u);
#endif
/* 0xBFC275F0: 0242082A slt $at, $s2, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0242082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003F5F0u);
#endif
@@ -511325,7 +512432,8 @@ label_BFC27828:
psx_cyc_step(cpu, 0x100002u);
#endif
/* 0xBFC27828: 2A810002 slti $at, $s4, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (2) ? 1 : 0);
+ PGXP_ALU(0x2A810002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8003F828u);
#endif
@@ -512262,7 +513370,8 @@ label_BFC27954:
psx_cyc_step(cpu, 0x100000Au);
#endif
/* 0xBFC27968: 0303082B sltu $at, $t8, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0303082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003F968u);
#endif
@@ -512517,7 +513626,8 @@ label_BFC2799C:
psx_cyc_step(cpu, 0x40Au);
#endif
/* 0xBFC279CC: 0143082B sltu $at, $t2, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[10] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[10] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0143082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003F9CCu);
#endif
@@ -513102,7 +514212,8 @@ label_BFC27A64:
psx_cyc_step(cpu, 0x100000Au);
#endif
/* 0xBFC27A78: 0303082B sltu $at, $t8, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0303082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003FA78u);
#endif
@@ -513357,7 +514468,8 @@ label_BFC27AAC:
psx_cyc_step(cpu, 0x40Au);
#endif
/* 0xBFC27ADC: 0143082B sltu $at, $t2, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[10] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[10] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0143082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8003FADCu);
#endif
@@ -516591,7 +517703,8 @@ label_BFC27EB4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC27EC0: 2C410007 sltiu $at, $v0, 7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000007u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000007u ? 1 : 0);
+ PGXP_ALU(0x2C410007u, cpu->gpr[1], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x8003FEC0u);
#endif
@@ -521711,7 +522824,8 @@ label_BFC2867C:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC2867C: 2A012329 slti $at, $s0, 9001 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (9001) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (9001) ? 1 : 0);
+ PGXP_ALU(0x2A012329u, cpu->gpr[1], _pgx1, 0x2329u); }
#ifdef PSX_COSIM
cosim_instr(0x8004067Cu);
#endif
@@ -523120,7 +524234,8 @@ label_BFC2884C:
psx_cyc_step(cpu, 0x10802u);
#endif
/* 0xBFC28850: 020B082A slt $at, $s0, $t3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x020B082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80040850u);
#endif
@@ -525641,7 +526756,8 @@ label_BFC28B38:
psx_cyc_step(cpu, 0x100002u);
#endif
/* 0xBFC28B48: 2A810002 slti $at, $s4, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (2) ? 1 : 0);
+ PGXP_ALU(0x2A810002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80040B48u);
#endif
@@ -530141,7 +531257,8 @@ label_BFC29174:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC29188: 28410002 slti $at, $v0, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0);
+ PGXP_ALU(0x28410002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80041188u);
#endif
@@ -531641,7 +532758,8 @@ label_BFC2932C:
psx_cyc_step(cpu, 0x82u);
#endif
/* 0xBFC29338: 28E11000 slti $at, $a3, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (4096) ? 1 : 0);
+ PGXP_ALU(0x28E11000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80041338u);
#endif
@@ -531751,7 +532869,8 @@ label_BFC29350:
psx_cyc_step(cpu, 0x86u);
#endif
/* 0xBFC2935C: 0047082A slt $at, $v0, $a3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x0047082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004135Cu);
#endif
@@ -535710,7 +536829,8 @@ label_BFC2986C:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC2986C: 29011000 slti $at, $t0, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4096) ? 1 : 0);
+ PGXP_ALU(0x29011000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x8004186Cu);
#endif
@@ -535728,7 +536848,8 @@ label_BFC2986C:
psx_cyc_step(cpu, 0x182u);
#endif
/* 0xBFC29874: 00E8082A slt $at, $a3, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x00E8082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80041874u);
#endif
@@ -535769,7 +536890,8 @@ label_BFC29878:
psx_cyc_step(cpu, 0x182u);
#endif
/* 0xBFC2987C: 00E8082A slt $at, $a3, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x00E8082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004187Cu);
#endif
@@ -536201,7 +537323,8 @@ label_BFC298EC:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC29908: 304E001F andi $t6, $v0, 0x1F */
- cpu->gpr[14] = cpu->gpr[2] & 0x1Fu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1Fu;
+ PGXP_ALU(0x304E001Fu, cpu->gpr[14], _pgx1, 0x001Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80041908u);
#endif
@@ -536319,7 +537442,8 @@ label_BFC298EC:
psx_cyc_step(cpu, 0x2000200u);
#endif
/* 0xBFC29934: 3329FFFF andi $t1, $t9, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[25] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0xFFFFu;
+ PGXP_ALU(0x3329FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80041934u);
#endif
@@ -536327,7 +537451,8 @@ label_BFC298EC:
psx_cyc_step(cpu, 0x604u);
#endif
/* 0xBFC29938: 01225026 xor $t2, $t1, $v0 */
- cpu->gpr[10] = cpu->gpr[9] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[9] ^ cpu->gpr[2];
+ PGXP_ALU(0x01225026u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80041938u);
#endif
@@ -536335,7 +537460,8 @@ label_BFC298EC:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC2993C: 314B001F andi $t3, $t2, 0x1F */
- cpu->gpr[11] = cpu->gpr[10] & 0x1Fu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x1Fu;
+ PGXP_ALU(0x314B001Fu, cpu->gpr[11], _pgx1, 0x001Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8004193Cu);
#endif
@@ -536346,7 +537472,8 @@ label_BFC298EC:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC29940: 01621026 xor $v0, $t3, $v0 */
- cpu->gpr[2] = cpu->gpr[11] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[11] ^ cpu->gpr[2];
+ PGXP_ALU(0x01621026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80041940u);
#endif
@@ -536354,7 +537481,8 @@ label_BFC298EC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC29944: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80041944u);
#endif
@@ -536803,7 +537931,8 @@ label_BFC299B0:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC299B8: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800419B8u);
#endif
@@ -536811,7 +537940,8 @@ label_BFC299B0:
psx_cyc_step(cpu, 0x2000600u);
#endif
/* 0xBFC299BC: 03295026 xor $t2, $t9, $t1 */
- cpu->gpr[10] = cpu->gpr[25] ^ cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[25] ^ cpu->gpr[9];
+ PGXP_ALU(0x03295026u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800419BCu);
#endif
@@ -536840,7 +537970,8 @@ label_BFC299B0:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC299C8: 01821026 xor $v0, $t4, $v0 */
- cpu->gpr[2] = cpu->gpr[12] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[12] ^ cpu->gpr[2];
+ PGXP_ALU(0x01821026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800419C8u);
#endif
@@ -536848,7 +537979,8 @@ label_BFC299B0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC299CC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800419CCu);
#endif
@@ -537122,7 +538254,8 @@ label_BFC299F4:
psx_cyc_step(cpu, 0x2000200u);
#endif
/* 0xBFC29A18: 3329FFFF andi $t1, $t9, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[25] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0xFFFFu;
+ PGXP_ALU(0x3329FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80041A18u);
#endif
@@ -537142,7 +538275,8 @@ label_BFC299F4:
psx_cyc_step(cpu, 0xE00u);
#endif
/* 0xBFC29A20: 012A5826 xor $t3, $t1, $t2 */
- cpu->gpr[11] = cpu->gpr[9] ^ cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] ^ cpu->gpr[10];
+ PGXP_ALU(0x012A5826u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80041A20u);
#endif
@@ -537168,7 +538302,8 @@ label_BFC299F4:
psx_cyc_step(cpu, 0x2004u);
#endif
/* 0xBFC29A2C: 01A21026 xor $v0, $t5, $v0 */
- cpu->gpr[2] = cpu->gpr[13] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[13] ^ cpu->gpr[2];
+ PGXP_ALU(0x01A21026u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80041A2Cu);
#endif
@@ -537179,7 +538314,8 @@ label_BFC299F4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC29A30: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80041A30u);
#endif
@@ -537517,7 +538653,8 @@ label_BFC29A88:
psx_cyc_step(cpu, 0xA0002u);
#endif
/* 0xBFC29A8C: 0271082B sltu $at, $s3, $s1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0271082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80041A8Cu);
#endif
@@ -540043,7 +541180,8 @@ label_BFC29D84:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC29D90: 2841003C slti $at, $v0, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (60) ? 1 : 0);
+ PGXP_ALU(0x2841003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80041D90u);
#endif
@@ -540987,7 +542125,8 @@ label_BFC29EE0:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC29EE0: 29210400 slti $at, $t1, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0);
+ PGXP_ALU(0x29210400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x80041EE0u);
#endif
@@ -541576,7 +542715,8 @@ label_BFC29F9C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC29FA4: 2841005B slti $at, $v0, 91 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (91) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (91) ? 1 : 0);
+ PGXP_ALU(0x2841005Bu, cpu->gpr[1], _pgx1, 0x005Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80041FA4u);
#endif
@@ -542249,7 +543389,8 @@ label_BFC2A068:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2A094: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042094u);
#endif
@@ -542275,7 +543416,8 @@ label_BFC2A068:
psx_cyc_step(cpu, 0x300000u);
#endif
/* 0xBFC2A0A0: 32B4FFFF andi $s4, $s5, 0xFFFF */
- cpu->gpr[20] = cpu->gpr[21] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[20] = cpu->gpr[21] & 0xFFFFu;
+ PGXP_ALU(0x32B4FFFFu, cpu->gpr[20], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800420A0u);
#endif
@@ -542364,7 +543506,8 @@ label_BFC2A068:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2A0C8: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800420C8u);
#endif
@@ -542462,7 +543605,8 @@ label_BFC2A068:
psx_cyc_step(cpu, 0x40020u);
#endif
/* 0xBFC2A0F4: 3245FFFF andi $a1, $s2, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[18] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[5] = cpu->gpr[18] & 0xFFFFu;
+ PGXP_ALU(0x3245FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800420F4u);
#endif
@@ -542470,7 +543614,8 @@ label_BFC2A068:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2A0F8: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800420F8u);
#endif
@@ -542577,7 +543722,8 @@ label_BFC2A068:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2A128: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042128u);
#endif
@@ -542809,7 +543955,8 @@ label_BFC2A158:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2A188: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042188u);
#endif
@@ -542925,7 +544072,8 @@ label_BFC2A158:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2A1BC: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800421BCu);
#endif
@@ -543023,7 +544171,8 @@ label_BFC2A158:
psx_cyc_step(cpu, 0x200040u);
#endif
/* 0xBFC2A1E8: 32A6FFFF andi $a2, $s5, 0xFFFF */
- cpu->gpr[6] = cpu->gpr[21] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[6] = cpu->gpr[21] & 0xFFFFu;
+ PGXP_ALU(0x32A6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800421E8u);
#endif
@@ -543031,7 +544180,8 @@ label_BFC2A158:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2A1EC: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800421ECu);
#endif
@@ -543093,7 +544243,8 @@ label_BFC2A158:
psx_cyc_step(cpu, 0x40020u);
#endif
/* 0xBFC2A208: 3245FFFF andi $a1, $s2, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[18] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[5] = cpu->gpr[18] & 0xFFFFu;
+ PGXP_ALU(0x3245FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042208u);
#endif
@@ -543122,7 +544273,8 @@ label_BFC2A158:
psx_cyc_step(cpu, 0x80000080u);
#endif
/* 0xBFC2A214: 33E7FFFF andi $a3, $ra, 0xFFFF */
- cpu->gpr[7] = cpu->gpr[31] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[7] = cpu->gpr[31] & 0xFFFFu;
+ PGXP_ALU(0x33E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042214u);
#endif
@@ -543211,7 +544363,8 @@ label_BFC2A158:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2A23C: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004223Cu);
#endif
@@ -543228,7 +544381,8 @@ label_BFC2A158:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2A244: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042244u);
#endif
@@ -543245,7 +544399,8 @@ label_BFC2A158:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2A24C: 31D9FFFF andi $t9, $t6, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31D9FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004224Cu);
#endif
@@ -545231,7 +546386,8 @@ label_BFC2A578:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC2A57C: 2C810081 sltiu $at, $a0, 129 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0);
+ PGXP_ALU(0x2C810081u, cpu->gpr[1], _pgx1, 0x0081u); }
#ifdef PSX_COSIM
cosim_instr(0x8004257Cu);
#endif
@@ -545392,7 +546548,8 @@ label_BFC2A5A0:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC2A5A0: 2C810081 sltiu $at, $a0, 129 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0);
+ PGXP_ALU(0x2C810081u, cpu->gpr[1], _pgx1, 0x0081u); }
#ifdef PSX_COSIM
cosim_instr(0x800425A0u);
#endif
@@ -545417,7 +546574,8 @@ label_BFC2A5A4:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC2A5A8: 2C810099 sltiu $at, $a0, 153 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000099u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000099u ? 1 : 0);
+ PGXP_ALU(0x2C810099u, cpu->gpr[1], _pgx1, 0x0099u); }
#ifdef PSX_COSIM
cosim_instr(0x800425A8u);
#endif
@@ -545518,7 +546676,8 @@ label_BFC2A5B4:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC2A5C0: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800425C0u);
#endif
@@ -545602,7 +546761,8 @@ label_BFC2A5D4:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC2A5D4: 3058FFFF andi $t8, $v0, 0xFFFF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3058FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800425D4u);
#endif
@@ -545617,7 +546777,8 @@ label_BFC2A5D4:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC2A5DC: 3045FFFF andi $a1, $v0, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800425DCu);
#endif
@@ -545708,7 +546869,8 @@ label_BFC2A5EC:
psx_cyc_step(cpu, 0x200022u);
#endif
/* 0xBFC2A5EC: 00B5082B sltu $at, $a1, $s5 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[21] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[21] ? 1 : 0);
+ PGXP_ALU(0x00B5082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800425ECu);
#endif
@@ -545726,7 +546888,8 @@ label_BFC2A5EC:
psx_cyc_step(cpu, 0x800022u);
#endif
/* 0xBFC2A5F4: 00B7082B sltu $at, $a1, $s7 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[23] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[23] ? 1 : 0);
+ PGXP_ALU(0x00B7082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800425F4u);
#endif
@@ -545898,7 +547061,8 @@ label_BFC2A61C:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2A620: 00A1082B sltu $at, $a1, $at */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80042620u);
#endif
@@ -545946,7 +547110,8 @@ label_BFC2A62C:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2A62C: 00A1082B sltu $at, $a1, $at */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004262Cu);
#endif
@@ -546327,7 +547492,8 @@ label_BFC2A690:
psx_cyc_step(cpu, 0x400002u);
#endif
/* 0xBFC2A69C: 2AC10100 slti $at, $s6, 256 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (256) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (256) ? 1 : 0);
+ PGXP_ALU(0x2AC10100u, cpu->gpr[1], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x8004269Cu);
#endif
@@ -546519,7 +547685,8 @@ label_BFC2A6CC:
psx_cyc_step(cpu, 0x80400002u);
#endif
/* 0xBFC2A6CC: 03F6082A slt $at, $ra, $s6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[31] < (int32_t)cpu->gpr[22] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[31] < (int32_t)cpu->gpr[22] ? 1 : 0);
+ PGXP_ALU(0x03F6082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800426CCu);
#endif
@@ -546733,7 +547900,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC2A714: 30840001 andi $a0, $a0, 0x1 */
- cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042714u);
#endif
@@ -546741,7 +547909,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC2A718: 316B0001 andi $t3, $t3, 0x1 */
- cpu->gpr[11] = cpu->gpr[11] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0x1u;
+ PGXP_ALU(0x316B0001u, cpu->gpr[11], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042718u);
#endif
@@ -546749,7 +547918,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC2A71C: 30630001 andi $v1, $v1, 0x1 */
- cpu->gpr[3] = cpu->gpr[3] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x1u;
+ PGXP_ALU(0x30630001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004271Cu);
#endif
@@ -546808,7 +547978,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC2A734: 30A50001 andi $a1, $a1, 0x1 */
- cpu->gpr[5] = cpu->gpr[5] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x1u;
+ PGXP_ALU(0x30A50001u, cpu->gpr[5], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042734u);
#endif
@@ -546864,7 +548035,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC2A74C: 30C60001 andi $a2, $a2, 0x1 */
- cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ PGXP_ALU(0x30C60001u, cpu->gpr[6], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004274Cu);
#endif
@@ -546953,7 +548125,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC2A770: 31080001 andi $t0, $t0, 0x1 */
- cpu->gpr[8] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31080001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042770u);
#endif
@@ -546961,7 +548134,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC2A774: 30E70001 andi $a3, $a3, 0x1 */
- cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042774u);
#endif
@@ -547029,7 +548203,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC2A790: 31290001 andi $t1, $t1, 0x1 */
- cpu->gpr[9] = cpu->gpr[9] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0x1u;
+ PGXP_ALU(0x31290001u, cpu->gpr[9], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042790u);
#endif
@@ -547085,7 +548260,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC2A7A8: 304C0001 andi $t4, $v0, 0x1 */
- cpu->gpr[12] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304C0001u, cpu->gpr[12], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800427A8u);
#endif
@@ -547171,7 +548347,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC2A7CC: 30630001 andi $v1, $v1, 0x1 */
- cpu->gpr[3] = cpu->gpr[3] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x1u;
+ PGXP_ALU(0x30630001u, cpu->gpr[3], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800427CCu);
#endif
@@ -547182,7 +548359,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC2A7D0: 30840001 andi $a0, $a0, 0x1 */
- cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800427D0u);
#endif
@@ -547247,7 +548425,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC2A7EC: 30A50001 andi $a1, $a1, 0x1 */
- cpu->gpr[5] = cpu->gpr[5] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x1u;
+ PGXP_ALU(0x30A50001u, cpu->gpr[5], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800427ECu);
#endif
@@ -547306,7 +548485,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC2A804: 30C60001 andi $a2, $a2, 0x1 */
- cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ PGXP_ALU(0x30C60001u, cpu->gpr[6], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042804u);
#endif
@@ -547401,7 +548581,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC2A82C: 30E70001 andi $a3, $a3, 0x1 */
- cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004282Cu);
#endif
@@ -547412,7 +548593,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC2A830: 31080001 andi $t0, $t0, 0x1 */
- cpu->gpr[8] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31080001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042830u);
#endif
@@ -547477,7 +548659,8 @@ label_BFC2A700:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC2A84C: 31290001 andi $t1, $t1, 0x1 */
- cpu->gpr[9] = cpu->gpr[9] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0x1u;
+ PGXP_ALU(0x31290001u, cpu->gpr[9], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004284Cu);
#endif
@@ -547672,7 +548855,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2A894: 31CF0001 andi $t7, $t6, 0x1 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042894u);
#endif
@@ -547680,7 +548864,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2A898: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042898u);
#endif
@@ -547718,7 +548903,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2A8A8: 31F90001 andi $t9, $t7, 0x1 */
- cpu->gpr[25] = cpu->gpr[15] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] & 0x1u;
+ PGXP_ALU(0x31F90001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800428A8u);
#endif
@@ -547756,7 +548942,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2A8B8: 332E0001 andi $t6, $t9, 0x1 */
- cpu->gpr[14] = cpu->gpr[25] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] & 0x1u;
+ PGXP_ALU(0x332E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800428B8u);
#endif
@@ -547824,7 +549011,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2A8D4: 31CF0001 andi $t7, $t6, 0x1 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800428D4u);
#endif
@@ -547832,7 +549020,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2A8D8: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800428D8u);
#endif
@@ -547870,7 +549059,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2A8E8: 332F0001 andi $t7, $t9, 0x1 */
- cpu->gpr[15] = cpu->gpr[25] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0x1u;
+ PGXP_ALU(0x332F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800428E8u);
#endif
@@ -547899,7 +549089,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC2A8F4: 304F0001 andi $t7, $v0, 0x1 */
- cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800428F4u);
#endif
@@ -547976,7 +549167,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2A914: 31F90001 andi $t9, $t7, 0x1 */
- cpu->gpr[25] = cpu->gpr[15] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] & 0x1u;
+ PGXP_ALU(0x31F90001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042914u);
#endif
@@ -547984,7 +549176,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x1004000u);
#endif
/* 0xBFC2A918: 330E0001 andi $t6, $t8, 0x1 */
- cpu->gpr[14] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x330E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042918u);
#endif
@@ -548022,7 +549215,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2A928: 31D90001 andi $t9, $t6, 0x1 */
- cpu->gpr[25] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31D90001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042928u);
#endif
@@ -548060,7 +549254,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2A938: 33380001 andi $t8, $t9, 0x1 */
- cpu->gpr[24] = cpu->gpr[25] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0x1u;
+ PGXP_ALU(0x33380001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042938u);
#endif
@@ -548137,7 +549332,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x1004000u);
#endif
/* 0xBFC2A958: 330E0001 andi $t6, $t8, 0x1 */
- cpu->gpr[14] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x330E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80042958u);
#endif
@@ -548145,7 +549341,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2A95C: 31F90001 andi $t9, $t7, 0x1 */
- cpu->gpr[25] = cpu->gpr[15] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] & 0x1u;
+ PGXP_ALU(0x31F90001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004295Cu);
#endif
@@ -548183,7 +549380,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2A96C: 332E0001 andi $t6, $t9, 0x1 */
- cpu->gpr[14] = cpu->gpr[25] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] & 0x1u;
+ PGXP_ALU(0x332E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004296Cu);
#endif
@@ -548221,7 +549419,8 @@ label_BFC2A884:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2A97C: 31CF0001 andi $t7, $t6, 0x1 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004297Cu);
#endif
@@ -548360,7 +549559,8 @@ label_BFC2A9A4:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC2A9A8: 2A210010 slti $at, $s1, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (16) ? 1 : 0);
+ PGXP_ALU(0x2A210010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x800429A8u);
#endif
@@ -548378,7 +549578,8 @@ label_BFC2A9A4:
psx_cyc_step(cpu, 0x480002u);
#endif
/* 0xBFC2A9B0: 0276082A slt $at, $s3, $s6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[22] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[22] ? 1 : 0);
+ PGXP_ALU(0x0276082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800429B0u);
#endif
@@ -548417,7 +549618,8 @@ label_BFC2A9B4:
psx_cyc_step(cpu, 0x400002u);
#endif
/* 0xBFC2A9B8: 2AC10010 slti $at, $s6, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (16) ? 1 : 0);
+ PGXP_ALU(0x2AC10010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x800429B8u);
#endif
@@ -548461,7 +549663,8 @@ label_BFC2A9BC:
psx_cyc_step(cpu, 0x800002u);
#endif
/* 0xBFC2A9C0: 2AE10100 slti $at, $s7, 256 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (256) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (256) ? 1 : 0);
+ PGXP_ALU(0x2AE10100u, cpu->gpr[1], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x800429C0u);
#endif
@@ -548476,7 +549679,8 @@ label_BFC2A9BC:
psx_cyc_step(cpu, 0x400002u);
#endif
/* 0xBFC2A9C8: 2AC10010 slti $at, $s6, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (16) ? 1 : 0);
+ PGXP_ALU(0x2AC10010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x800429C8u);
#endif
@@ -549186,7 +550390,8 @@ label_BFC2AA20:
psx_cyc_step(cpu, 0x400002u);
#endif
/* 0xBFC2AAB0: 2AC10011 slti $at, $s6, 17 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (17) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (17) ? 1 : 0);
+ PGXP_ALU(0x2AC10011u, cpu->gpr[1], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x80042AB0u);
#endif
@@ -549290,7 +550495,8 @@ label_BFC2AAC8:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC2AACC: 3222000F andi $v0, $s1, 0xF */
- cpu->gpr[2] = cpu->gpr[17] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0xFu;
+ PGXP_ALU(0x3222000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042ACCu);
#endif
@@ -549450,7 +550656,8 @@ label_BFC2AAE4:
psx_cyc_step(cpu, 0x400002u);
#endif
/* 0xBFC2AAF4: 2AC10010 slti $at, $s6, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (16) ? 1 : 0);
+ PGXP_ALU(0x2AC10010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80042AF4u);
#endif
@@ -549591,7 +550798,8 @@ label_BFC2AB18:
psx_cyc_step(cpu, 0x2080000u);
#endif
/* 0xBFC2AB1C: 3279003F andi $t9, $s3, 0x3F */
- cpu->gpr[25] = cpu->gpr[19] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] & 0x3Fu;
+ PGXP_ALU(0x3279003Fu, cpu->gpr[25], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042B1Cu);
#endif
@@ -549681,7 +550889,8 @@ label_BFC2AB2C:
psx_cyc_step(cpu, 0x2000012u);
#endif
/* 0xBFC2AB2C: 0324082A slt $at, $t9, $a0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0324082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80042B2Cu);
#endif
@@ -550264,7 +551473,8 @@ label_BFC2ABD8:
psx_cyc_step(cpu, 0x20006u);
#endif
/* 0xBFC2ABE8: 0222082A slt $at, $s1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0222082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80042BE8u);
#endif
@@ -550814,7 +552024,8 @@ label_BFC2ACEC:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC2ACFC: 2DC10004 sltiu $at, $t6, 4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000004u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000004u ? 1 : 0);
+ PGXP_ALU(0x2DC10004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80042CFCu);
#endif
@@ -550984,7 +552195,8 @@ label_BFC2AD24:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD2C: 2C410040 sltiu $at, $v0, 64 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80042D2Cu);
#endif
@@ -551002,7 +552214,8 @@ label_BFC2AD24:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD34: 2C41007F sltiu $at, $v0, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042D34u);
#endif
@@ -551041,7 +552254,8 @@ label_BFC2AD38:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD3C: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80042D3Cu);
#endif
@@ -551113,7 +552327,8 @@ label_BFC2AD48:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD48: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80042D48u);
#endif
@@ -551141,7 +552356,8 @@ label_BFC2AD4C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD50: 2C4100AD sltiu $at, $v0, 173 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000ADu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000ADu ? 1 : 0);
+ PGXP_ALU(0x2C4100ADu, cpu->gpr[1], _pgx1, 0x00ADu); }
#ifdef PSX_COSIM
cosim_instr(0x80042D50u);
#endif
@@ -551180,7 +552396,8 @@ label_BFC2AD54:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD58: 2C4100B8 sltiu $at, $v0, 184 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0);
+ PGXP_ALU(0x2C4100B8u, cpu->gpr[1], _pgx1, 0x00B8u); }
#ifdef PSX_COSIM
cosim_instr(0x80042D58u);
#endif
@@ -551255,7 +552472,8 @@ label_BFC2AD64:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD64: 2C4100B8 sltiu $at, $v0, 184 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0);
+ PGXP_ALU(0x2C4100B8u, cpu->gpr[1], _pgx1, 0x00B8u); }
#ifdef PSX_COSIM
cosim_instr(0x80042D64u);
#endif
@@ -551280,7 +552498,8 @@ label_BFC2AD68:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD6C: 2C4100C0 sltiu $at, $v0, 192 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C0u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C0u ? 1 : 0);
+ PGXP_ALU(0x2C4100C0u, cpu->gpr[1], _pgx1, 0x00C0u); }
#ifdef PSX_COSIM
cosim_instr(0x80042D6Cu);
#endif
@@ -551319,7 +552538,8 @@ label_BFC2AD70:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD74: 2C4100C8 sltiu $at, $v0, 200 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0);
+ PGXP_ALU(0x2C4100C8u, cpu->gpr[1], _pgx1, 0x00C8u); }
#ifdef PSX_COSIM
cosim_instr(0x80042D74u);
#endif
@@ -551391,7 +552611,8 @@ label_BFC2AD80:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD80: 2C4100C8 sltiu $at, $v0, 200 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0);
+ PGXP_ALU(0x2C4100C8u, cpu->gpr[1], _pgx1, 0x00C8u); }
#ifdef PSX_COSIM
cosim_instr(0x80042D80u);
#endif
@@ -551416,7 +552637,8 @@ label_BFC2AD84:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD88: 2C4100CF sltiu $at, $v0, 207 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000CFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000CFu ? 1 : 0);
+ PGXP_ALU(0x2C4100CFu, cpu->gpr[1], _pgx1, 0x00CFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042D88u);
#endif
@@ -551458,7 +552680,8 @@ label_BFC2AD8C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD90: 2C4100DA sltiu $at, $v0, 218 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0);
+ PGXP_ALU(0x2C4100DAu, cpu->gpr[1], _pgx1, 0x00DAu); }
#ifdef PSX_COSIM
cosim_instr(0x80042D90u);
#endif
@@ -551530,7 +552753,8 @@ label_BFC2AD9C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AD9C: 2C4100DA sltiu $at, $v0, 218 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0);
+ PGXP_ALU(0x2C4100DAu, cpu->gpr[1], _pgx1, 0x00DAu); }
#ifdef PSX_COSIM
cosim_instr(0x80042D9Cu);
#endif
@@ -551555,7 +552779,8 @@ label_BFC2ADA0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2ADA4: 2C4100E9 sltiu $at, $v0, 233 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000E9u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000E9u ? 1 : 0);
+ PGXP_ALU(0x2C4100E9u, cpu->gpr[1], _pgx1, 0x00E9u); }
#ifdef PSX_COSIM
cosim_instr(0x80042DA4u);
#endif
@@ -551594,7 +552819,8 @@ label_BFC2ADA8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2ADAC: 2C4100F0 sltiu $at, $v0, 240 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0);
+ PGXP_ALU(0x2C4100F0u, cpu->gpr[1], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80042DACu);
#endif
@@ -551666,7 +552892,8 @@ label_BFC2ADB8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2ADB8: 2C4100F0 sltiu $at, $v0, 240 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0);
+ PGXP_ALU(0x2C4100F0u, cpu->gpr[1], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80042DB8u);
#endif
@@ -551694,7 +552921,8 @@ label_BFC2ADBC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2ADC0: 2C4100F8 sltiu $at, $v0, 248 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F8u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F8u ? 1 : 0);
+ PGXP_ALU(0x2C4100F8u, cpu->gpr[1], _pgx1, 0x00F8u); }
#ifdef PSX_COSIM
cosim_instr(0x80042DC0u);
#endif
@@ -552058,7 +553286,8 @@ label_BFC2AE18:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE20: 2C41004F sltiu $at, $v0, 79 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000004Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000004Fu ? 1 : 0);
+ PGXP_ALU(0x2C41004Fu, cpu->gpr[1], _pgx1, 0x004Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042E20u);
#endif
@@ -552073,7 +553302,8 @@ label_BFC2AE18:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE28: 2C410059 sltiu $at, $v0, 89 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000059u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000059u ? 1 : 0);
+ PGXP_ALU(0x2C410059u, cpu->gpr[1], _pgx1, 0x0059u); }
#ifdef PSX_COSIM
cosim_instr(0x80042E28u);
#endif
@@ -552115,7 +553345,8 @@ label_BFC2AE2C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE30: 2C410060 sltiu $at, $v0, 96 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0);
+ PGXP_ALU(0x2C410060u, cpu->gpr[1], _pgx1, 0x0060u); }
#ifdef PSX_COSIM
cosim_instr(0x80042E30u);
#endif
@@ -552187,7 +553418,8 @@ label_BFC2AE3C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE3C: 2C410060 sltiu $at, $v0, 96 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0);
+ PGXP_ALU(0x2C410060u, cpu->gpr[1], _pgx1, 0x0060u); }
#ifdef PSX_COSIM
cosim_instr(0x80042E3Cu);
#endif
@@ -552212,7 +553444,8 @@ label_BFC2AE40:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE44: 2C41007A sltiu $at, $v0, 122 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Au ? 1 : 0);
+ PGXP_ALU(0x2C41007Au, cpu->gpr[1], _pgx1, 0x007Au); }
#ifdef PSX_COSIM
cosim_instr(0x80042E44u);
#endif
@@ -552251,7 +553484,8 @@ label_BFC2AE48:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE4C: 2C410081 sltiu $at, $v0, 129 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0);
+ PGXP_ALU(0x2C410081u, cpu->gpr[1], _pgx1, 0x0081u); }
#ifdef PSX_COSIM
cosim_instr(0x80042E4Cu);
#endif
@@ -552323,7 +553557,8 @@ label_BFC2AE58:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE58: 2C410081 sltiu $at, $v0, 129 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0);
+ PGXP_ALU(0x2C410081u, cpu->gpr[1], _pgx1, 0x0081u); }
#ifdef PSX_COSIM
cosim_instr(0x80042E58u);
#endif
@@ -552351,7 +553586,8 @@ label_BFC2AE5C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE60: 2C41009B sltiu $at, $v0, 155 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Bu ? 1 : 0);
+ PGXP_ALU(0x2C41009Bu, cpu->gpr[1], _pgx1, 0x009Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80042E60u);
#endif
@@ -552390,7 +553626,8 @@ label_BFC2AE64:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE68: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042E68u);
#endif
@@ -552465,7 +553702,8 @@ label_BFC2AE74:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE74: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042E74u);
#endif
@@ -552490,7 +553728,8 @@ label_BFC2AE78:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE7C: 2C4100F2 sltiu $at, $v0, 242 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0);
+ PGXP_ALU(0x2C4100F2u, cpu->gpr[1], _pgx1, 0x00F2u); }
#ifdef PSX_COSIM
cosim_instr(0x80042E7Cu);
#endif
@@ -552567,7 +553806,8 @@ label_BFC2AE8C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AE8C: 2C4100F2 sltiu $at, $v0, 242 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0);
+ PGXP_ALU(0x2C4100F2u, cpu->gpr[1], _pgx1, 0x00F2u); }
#ifdef PSX_COSIM
cosim_instr(0x80042E8Cu);
#endif
@@ -552815,7 +554055,8 @@ label_BFC2AED0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AED8: 2C410040 sltiu $at, $v0, 64 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80042ED8u);
#endif
@@ -552833,7 +554074,8 @@ label_BFC2AED0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AEE0: 2C41007F sltiu $at, $v0, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042EE0u);
#endif
@@ -552872,7 +554114,8 @@ label_BFC2AEE4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AEE8: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80042EE8u);
#endif
@@ -552947,7 +554190,8 @@ label_BFC2AEF4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AEF4: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80042EF4u);
#endif
@@ -552972,7 +554216,8 @@ label_BFC2AEF8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AEFC: 2C410097 sltiu $at, $v0, 151 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000097u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000097u ? 1 : 0);
+ PGXP_ALU(0x2C410097u, cpu->gpr[1], _pgx1, 0x0097u); }
#ifdef PSX_COSIM
cosim_instr(0x80042EFCu);
#endif
@@ -553011,7 +554256,8 @@ label_BFC2AF00:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AF04: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042F04u);
#endif
@@ -553083,7 +554329,8 @@ label_BFC2AF10:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AF10: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042F10u);
#endif
@@ -553108,7 +554355,8 @@ label_BFC2AF14:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AF18: 2C4100B7 sltiu $at, $v0, 183 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B7u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B7u ? 1 : 0);
+ PGXP_ALU(0x2C4100B7u, cpu->gpr[1], _pgx1, 0x00B7u); }
#ifdef PSX_COSIM
cosim_instr(0x80042F18u);
#endif
@@ -553150,7 +554398,8 @@ label_BFC2AF1C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AF20: 2C4100BF sltiu $at, $v0, 191 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042F20u);
#endif
@@ -553222,7 +554471,8 @@ label_BFC2AF2C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AF2C: 2C4100BF sltiu $at, $v0, 191 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042F2Cu);
#endif
@@ -553247,7 +554497,8 @@ label_BFC2AF30:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AF34: 2C4100D7 sltiu $at, $v0, 215 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0);
+ PGXP_ALU(0x2C4100D7u, cpu->gpr[1], _pgx1, 0x00D7u); }
#ifdef PSX_COSIM
cosim_instr(0x80042F34u);
#endif
@@ -553327,7 +554578,8 @@ label_BFC2AF44:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AF44: 2C4100D7 sltiu $at, $v0, 215 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0);
+ PGXP_ALU(0x2C4100D7u, cpu->gpr[1], _pgx1, 0x00D7u); }
#ifdef PSX_COSIM
cosim_instr(0x80042F44u);
#endif
@@ -553575,7 +554827,8 @@ label_BFC2AF88:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AF90: 2C410040 sltiu $at, $v0, 64 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80042F90u);
#endif
@@ -553590,7 +554843,8 @@ label_BFC2AF88:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AF98: 2C410061 sltiu $at, $v0, 97 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000061u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000061u ? 1 : 0);
+ PGXP_ALU(0x2C410061u, cpu->gpr[1], _pgx1, 0x0061u); }
#ifdef PSX_COSIM
cosim_instr(0x80042F98u);
#endif
@@ -553632,7 +554886,8 @@ label_BFC2AF9C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFA0: 2C410070 sltiu $at, $v0, 112 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0);
+ PGXP_ALU(0x2C410070u, cpu->gpr[1], _pgx1, 0x0070u); }
#ifdef PSX_COSIM
cosim_instr(0x80042FA0u);
#endif
@@ -553704,7 +554959,8 @@ label_BFC2AFAC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFAC: 2C410070 sltiu $at, $v0, 112 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0);
+ PGXP_ALU(0x2C410070u, cpu->gpr[1], _pgx1, 0x0070u); }
#ifdef PSX_COSIM
cosim_instr(0x80042FACu);
#endif
@@ -553729,7 +554985,8 @@ label_BFC2AFB0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFB4: 2C41007F sltiu $at, $v0, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042FB4u);
#endif
@@ -553768,7 +555025,8 @@ label_BFC2AFB8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFBC: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80042FBCu);
#endif
@@ -553840,7 +555098,8 @@ label_BFC2AFC8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFC8: 2C410080 sltiu $at, $v0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80042FC8u);
#endif
@@ -553868,7 +555127,8 @@ label_BFC2AFCC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFD0: 2C410092 sltiu $at, $v0, 146 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000092u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000092u ? 1 : 0);
+ PGXP_ALU(0x2C410092u, cpu->gpr[1], _pgx1, 0x0092u); }
#ifdef PSX_COSIM
cosim_instr(0x80042FD0u);
#endif
@@ -553907,7 +555167,8 @@ label_BFC2AFD4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFD8: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042FD8u);
#endif
@@ -553982,7 +555243,8 @@ label_BFC2AFE4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFE4: 2C41009F sltiu $at, $v0, 159 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0);
+ PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80042FE4u);
#endif
@@ -554007,7 +555269,8 @@ label_BFC2AFE8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFEC: 2C4100BF sltiu $at, $v0, 191 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042FECu);
#endif
@@ -554084,7 +555347,8 @@ label_BFC2AFFC:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2AFFC: 2C4100BF sltiu $at, $v0, 191 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0);
+ PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); }
#ifdef PSX_COSIM
cosim_instr(0x80042FFCu);
#endif
@@ -554332,7 +555596,8 @@ label_BFC2B040:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2B048: 2C41007F sltiu $at, $v0, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80043048u);
#endif
@@ -554469,7 +555734,8 @@ label_BFC2B060:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC2B06C: 316C00FF andi $t4, $t3, 0xFF */
- cpu->gpr[12] = cpu->gpr[11] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFu;
+ PGXP_ALU(0x316C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004306Cu);
#endif
@@ -554737,7 +556003,8 @@ label_BFC2B0A8:
psx_cyc_step(cpu, 0x30u);
#endif
/* 0xBFC2B0A8: 308500FF andi $a1, $a0, 0xFF */
- cpu->gpr[5] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800430A8u);
#endif
@@ -554757,7 +556024,8 @@ label_BFC2B0A8:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B0B0: 2CA10020 sltiu $at, $a1, 32 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000020u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000020u ? 1 : 0);
+ PGXP_ALU(0x2CA10020u, cpu->gpr[1], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x800430B0u);
#endif
@@ -554814,7 +556082,8 @@ label_BFC2B0C0:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B0C0: 2CA10030 sltiu $at, $a1, 48 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0);
+ PGXP_ALU(0x2CA10030u, cpu->gpr[1], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x800430C0u);
#endif
@@ -554829,7 +556098,8 @@ label_BFC2B0C0:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B0C8: 2CA10030 sltiu $at, $a1, 48 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0);
+ PGXP_ALU(0x2CA10030u, cpu->gpr[1], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x800430C8u);
#endif
@@ -554904,7 +556174,8 @@ label_BFC2B0D4:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B0D4: 2CA10030 sltiu $at, $a1, 48 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0);
+ PGXP_ALU(0x2CA10030u, cpu->gpr[1], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x800430D4u);
#endif
@@ -554929,7 +556200,8 @@ label_BFC2B0D8:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B0DC: 2CA1003A sltiu $at, $a1, 58 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000003Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000003Au ? 1 : 0);
+ PGXP_ALU(0x2CA1003Au, cpu->gpr[1], _pgx1, 0x003Au); }
#ifdef PSX_COSIM
cosim_instr(0x800430DCu);
#endif
@@ -554968,7 +556240,8 @@ label_BFC2B0E0:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B0E4: 2CA1003A sltiu $at, $a1, 58 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000003Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000003Au ? 1 : 0);
+ PGXP_ALU(0x2CA1003Au, cpu->gpr[1], _pgx1, 0x003Au); }
#ifdef PSX_COSIM
cosim_instr(0x800430E4u);
#endif
@@ -555040,7 +556313,8 @@ label_BFC2B0F0:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B0F0: 2CA1003A sltiu $at, $a1, 58 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000003Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000003Au ? 1 : 0);
+ PGXP_ALU(0x2CA1003Au, cpu->gpr[1], _pgx1, 0x003Au); }
#ifdef PSX_COSIM
cosim_instr(0x800430F0u);
#endif
@@ -555065,7 +556339,8 @@ label_BFC2B0F4:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B0F8: 2CA10041 sltiu $at, $a1, 65 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000041u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000041u ? 1 : 0);
+ PGXP_ALU(0x2CA10041u, cpu->gpr[1], _pgx1, 0x0041u); }
#ifdef PSX_COSIM
cosim_instr(0x800430F8u);
#endif
@@ -555107,7 +556382,8 @@ label_BFC2B0FC:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B100: 2CA10041 sltiu $at, $a1, 65 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000041u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000041u ? 1 : 0);
+ PGXP_ALU(0x2CA10041u, cpu->gpr[1], _pgx1, 0x0041u); }
#ifdef PSX_COSIM
cosim_instr(0x80043100u);
#endif
@@ -555179,7 +556455,8 @@ label_BFC2B10C:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B10C: 2CA10041 sltiu $at, $a1, 65 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000041u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000041u ? 1 : 0);
+ PGXP_ALU(0x2CA10041u, cpu->gpr[1], _pgx1, 0x0041u); }
#ifdef PSX_COSIM
cosim_instr(0x8004310Cu);
#endif
@@ -555204,7 +556481,8 @@ label_BFC2B110:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B114: 2CA1005B sltiu $at, $a1, 91 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000005Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000005Bu ? 1 : 0);
+ PGXP_ALU(0x2CA1005Bu, cpu->gpr[1], _pgx1, 0x005Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80043114u);
#endif
@@ -555243,7 +556521,8 @@ label_BFC2B118:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B11C: 2CA1005B sltiu $at, $a1, 91 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000005Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000005Bu ? 1 : 0);
+ PGXP_ALU(0x2CA1005Bu, cpu->gpr[1], _pgx1, 0x005Bu); }
#ifdef PSX_COSIM
cosim_instr(0x8004311Cu);
#endif
@@ -555324,7 +556603,8 @@ label_BFC2B12C:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B12C: 2CA1005B sltiu $at, $a1, 91 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000005Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000005Bu ? 1 : 0);
+ PGXP_ALU(0x2CA1005Bu, cpu->gpr[1], _pgx1, 0x005Bu); }
#ifdef PSX_COSIM
cosim_instr(0x8004312Cu);
#endif
@@ -555349,7 +556629,8 @@ label_BFC2B130:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B134: 2CA10061 sltiu $at, $a1, 97 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000061u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000061u ? 1 : 0);
+ PGXP_ALU(0x2CA10061u, cpu->gpr[1], _pgx1, 0x0061u); }
#ifdef PSX_COSIM
cosim_instr(0x80043134u);
#endif
@@ -555388,7 +556669,8 @@ label_BFC2B138:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B13C: 2CA10061 sltiu $at, $a1, 97 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000061u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000061u ? 1 : 0);
+ PGXP_ALU(0x2CA10061u, cpu->gpr[1], _pgx1, 0x0061u); }
#ifdef PSX_COSIM
cosim_instr(0x8004313Cu);
#endif
@@ -555460,7 +556742,8 @@ label_BFC2B148:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B148: 2CA10061 sltiu $at, $a1, 97 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000061u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000061u ? 1 : 0);
+ PGXP_ALU(0x2CA10061u, cpu->gpr[1], _pgx1, 0x0061u); }
#ifdef PSX_COSIM
cosim_instr(0x80043148u);
#endif
@@ -555488,7 +556771,8 @@ label_BFC2B14C:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B150: 2CA1007B sltiu $at, $a1, 123 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Bu ? 1 : 0);
+ PGXP_ALU(0x2CA1007Bu, cpu->gpr[1], _pgx1, 0x007Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80043150u);
#endif
@@ -555527,7 +556811,8 @@ label_BFC2B154:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B158: 2CA1007B sltiu $at, $a1, 123 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Bu ? 1 : 0);
+ PGXP_ALU(0x2CA1007Bu, cpu->gpr[1], _pgx1, 0x007Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80043158u);
#endif
@@ -555611,7 +556896,8 @@ label_BFC2B168:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B168: 2CA1007B sltiu $at, $a1, 123 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Bu ? 1 : 0);
+ PGXP_ALU(0x2CA1007Bu, cpu->gpr[1], _pgx1, 0x007Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80043168u);
#endif
@@ -555639,7 +556925,8 @@ label_BFC2B16C:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B170: 2CA1007F sltiu $at, $a1, 127 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Fu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Fu ? 1 : 0);
+ PGXP_ALU(0x2CA1007Fu, cpu->gpr[1], _pgx1, 0x007Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80043170u);
#endif
@@ -557191,7 +558478,8 @@ label_BFC2B304:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC2B308: 2C810081 sltiu $at, $a0, 129 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0);
+ PGXP_ALU(0x2C810081u, cpu->gpr[1], _pgx1, 0x0081u); }
#ifdef PSX_COSIM
cosim_instr(0x80043308u);
#endif
@@ -557378,7 +558666,8 @@ label_BFC2B338:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC2B338: 2C810081 sltiu $at, $a0, 129 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0);
+ PGXP_ALU(0x2C810081u, cpu->gpr[1], _pgx1, 0x0081u); }
#ifdef PSX_COSIM
cosim_instr(0x80043338u);
#endif
@@ -557406,7 +558695,8 @@ label_BFC2B33C:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC2B340: 2C810099 sltiu $at, $a0, 153 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000099u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000099u ? 1 : 0);
+ PGXP_ALU(0x2C810099u, cpu->gpr[1], _pgx1, 0x0099u); }
#ifdef PSX_COSIM
cosim_instr(0x80043340u);
#endif
@@ -557504,7 +558794,8 @@ label_BFC2B34C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC2B358: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043358u);
#endif
@@ -557588,7 +558879,8 @@ label_BFC2B36C:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC2B36C: 3058FFFF andi $t8, $v0, 0xFFFF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3058FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004336Cu);
#endif
@@ -557606,7 +558898,8 @@ label_BFC2B36C:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC2B374: 3045FFFF andi $a1, $v0, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043374u);
#endif
@@ -557706,7 +558999,8 @@ label_BFC2B384:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B388: 00A1082B sltu $at, $a1, $at */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80043388u);
#endif
@@ -557757,7 +559051,8 @@ label_BFC2B394:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B394: 00A1082B sltu $at, $a1, $at */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80043394u);
#endif
@@ -557941,7 +559236,8 @@ label_BFC2B3CC:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B3D0: 00A1082B sltu $at, $a1, $at */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800433D0u);
#endif
@@ -557989,7 +559285,8 @@ label_BFC2B3DC:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC2B3DC: 00A1082B sltu $at, $a1, $at */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800433DCu);
#endif
@@ -558378,7 +559675,8 @@ label_BFC2B44C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2B44C: 28410093 slti $at, $v0, 147 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (147) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (147) ? 1 : 0);
+ PGXP_ALU(0x28410093u, cpu->gpr[1], _pgx1, 0x0093u); }
#ifdef PSX_COSIM
cosim_instr(0x8004344Cu);
#endif
@@ -558396,7 +559694,8 @@ label_BFC2B44C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC2B454: 284100D1 slti $at, $v0, 209 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (209) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (209) ? 1 : 0);
+ PGXP_ALU(0x284100D1u, cpu->gpr[1], _pgx1, 0x00D1u); }
#ifdef PSX_COSIM
cosim_instr(0x80043454u);
#endif
@@ -558666,7 +559965,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x8020u);
#endif
/* 0xBFC2B4B0: 30AF00FF andi $t7, $a1, 0xFF */
- cpu->gpr[15] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30AF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800434B0u);
#endif
@@ -558683,7 +559983,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2B4B8: 31D900FF andi $t9, $t6, 0xFF */
- cpu->gpr[25] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31D900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800434B8u);
#endif
@@ -558712,7 +560013,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B4C4: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800434C4u);
#endif
@@ -558729,7 +560031,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B4CC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800434CCu);
#endif
@@ -558740,7 +560043,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B4D0: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800434D0u);
#endif
@@ -558748,7 +560052,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC2B4D4: 304F00FF andi $t7, $v0, 0xFF */
- cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800434D4u);
#endif
@@ -558765,7 +560070,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2B4DC: 331900FF andi $t9, $t8, 0xFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800434DCu);
#endif
@@ -558821,7 +560127,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x1000040u);
#endif
/* 0xBFC2B4F4: 30D800FF andi $t8, $a2, 0xFF */
- cpu->gpr[24] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30D800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800434F4u);
#endif
@@ -558838,7 +560145,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2B4FC: 332F00FF andi $t7, $t9, 0xFF */
- cpu->gpr[15] = cpu->gpr[25] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0xFFu;
+ PGXP_ALU(0x332F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800434FCu);
#endif
@@ -558858,7 +560166,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B504: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043504u);
#endif
@@ -558875,7 +560184,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B50C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004350Cu);
#endif
@@ -558886,7 +560196,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B510: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043510u);
#endif
@@ -558894,7 +560205,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC2B514: 305800FF andi $t8, $v0, 0xFF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043514u);
#endif
@@ -558911,7 +560223,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2B51C: 31CF00FF andi $t7, $t6, 0xFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004351Cu);
#endif
@@ -558967,7 +560280,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4080u);
#endif
/* 0xBFC2B534: 30EE00FF andi $t6, $a3, 0xFF */
- cpu->gpr[14] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043534u);
#endif
@@ -558984,7 +560298,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC2B53C: 31F800FF andi $t8, $t7, 0xFF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004353Cu);
#endif
@@ -559004,7 +560319,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B544: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043544u);
#endif
@@ -559021,7 +560337,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B54C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004354Cu);
#endif
@@ -559032,7 +560349,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B550: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043550u);
#endif
@@ -559040,7 +560358,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC2B554: 304E00FF andi $t6, $v0, 0xFF */
- cpu->gpr[14] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043554u);
#endif
@@ -559057,7 +560376,8 @@ label_BFC2B4A4:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2B55C: 333800FF andi $t8, $t9, 0xFF */
- cpu->gpr[24] = cpu->gpr[25] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0xFFu;
+ PGXP_ALU(0x333800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004355Cu);
#endif
@@ -559138,7 +560458,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x2000010u);
#endif
/* 0xBFC2B57C: 309900FF andi $t9, $a0, 0xFF */
- cpu->gpr[25] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x309900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004357Cu);
#endif
@@ -559158,7 +560479,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x1004000u);
#endif
/* 0xBFC2B584: 330E00FF andi $t6, $t8, 0xFF */
- cpu->gpr[14] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x330E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043584u);
#endif
@@ -559187,7 +560509,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B590: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043590u);
#endif
@@ -559204,7 +560527,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B598: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043598u);
#endif
@@ -559212,7 +560536,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B59C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004359Cu);
#endif
@@ -559223,7 +560548,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC2B5A0: 305900FF andi $t9, $v0, 0xFF */
- cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435A0u);
#endif
@@ -559240,7 +560566,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2B5A8: 31EE00FF andi $t6, $t7, 0xFF */
- cpu->gpr[14] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435A8u);
#endif
@@ -559287,7 +560614,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x8020u);
#endif
/* 0xBFC2B5BC: 30AF00FF andi $t7, $a1, 0xFF */
- cpu->gpr[15] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30AF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435BCu);
#endif
@@ -559307,7 +560635,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2B5C4: 31D900FF andi $t9, $t6, 0xFF */
- cpu->gpr[25] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31D900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435C4u);
#endif
@@ -559324,7 +560653,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B5CC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435CCu);
#endif
@@ -559344,7 +560674,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B5D4: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435D4u);
#endif
@@ -559352,7 +560683,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B5D8: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435D8u);
#endif
@@ -559360,7 +560692,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC2B5DC: 304F00FF andi $t7, $v0, 0xFF */
- cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435DCu);
#endif
@@ -559380,7 +560713,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2B5E4: 331900FF andi $t9, $t8, 0xFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435E4u);
#endif
@@ -559433,7 +560767,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x1000040u);
#endif
/* 0xBFC2B5FC: 30D800FF andi $t8, $a2, 0xFF */
- cpu->gpr[24] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30D800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800435FCu);
#endif
@@ -559453,7 +560788,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2B604: 332F00FF andi $t7, $t9, 0xFF */
- cpu->gpr[15] = cpu->gpr[25] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0xFFu;
+ PGXP_ALU(0x332F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043604u);
#endif
@@ -559470,7 +560806,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B60C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004360Cu);
#endif
@@ -559490,7 +560827,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B614: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043614u);
#endif
@@ -559498,7 +560836,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B618: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043618u);
#endif
@@ -559506,7 +560845,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC2B61C: 305800FF andi $t8, $v0, 0xFF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004361Cu);
#endif
@@ -559526,7 +560866,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2B624: 31CF00FF andi $t7, $t6, 0xFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043624u);
#endif
@@ -559579,7 +560920,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4080u);
#endif
/* 0xBFC2B63C: 30EE00FF andi $t6, $a3, 0xFF */
- cpu->gpr[14] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004363Cu);
#endif
@@ -559599,7 +560941,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC2B644: 31F800FF andi $t8, $t7, 0xFF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043644u);
#endif
@@ -559616,7 +560959,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B64C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004364Cu);
#endif
@@ -559636,7 +560980,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B654: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043654u);
#endif
@@ -559644,7 +560989,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B658: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043658u);
#endif
@@ -559652,7 +560998,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC2B65C: 304E00FF andi $t6, $v0, 0xFF */
- cpu->gpr[14] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004365Cu);
#endif
@@ -559672,7 +561019,8 @@ label_BFC2B574:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2B664: 333800FF andi $t8, $t9, 0xFF */
- cpu->gpr[24] = cpu->gpr[25] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0xFFu;
+ PGXP_ALU(0x333800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043664u);
#endif
@@ -560045,7 +561393,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x2000020u);
#endif
/* 0xBFC2B6DC: 30B900FF andi $t9, $a1, 0xFF */
- cpu->gpr[25] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30B900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800436DCu);
#endif
@@ -560065,7 +561414,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x1004000u);
#endif
/* 0xBFC2B6E4: 330E00FF andi $t6, $t8, 0xFF */
- cpu->gpr[14] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x330E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800436E4u);
#endif
@@ -560100,7 +561450,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B6F4: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800436F4u);
#endif
@@ -560117,7 +561468,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B6FC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800436FCu);
#endif
@@ -560128,7 +561480,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B700: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043700u);
#endif
@@ -560136,7 +561489,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC2B704: 305900FF andi $t9, $v0, 0xFF */
- cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043704u);
#endif
@@ -560153,7 +561507,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2B70C: 31EE00FF andi $t6, $t7, 0xFF */
- cpu->gpr[14] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004370Cu);
#endif
@@ -560209,7 +561564,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x8040u);
#endif
/* 0xBFC2B724: 30CF00FF andi $t7, $a2, 0xFF */
- cpu->gpr[15] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043724u);
#endif
@@ -560226,7 +561582,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2B72C: 31D900FF andi $t9, $t6, 0xFF */
- cpu->gpr[25] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31D900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004372Cu);
#endif
@@ -560246,7 +561603,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B734: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043734u);
#endif
@@ -560263,7 +561621,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B73C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004373Cu);
#endif
@@ -560274,7 +561633,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B740: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043740u);
#endif
@@ -560282,7 +561642,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC2B744: 304F00FF andi $t7, $v0, 0xFF */
- cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043744u);
#endif
@@ -560299,7 +561660,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2B74C: 331900FF andi $t9, $t8, 0xFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004374Cu);
#endif
@@ -560355,7 +561717,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x1000080u);
#endif
/* 0xBFC2B764: 30F800FF andi $t8, $a3, 0xFF */
- cpu->gpr[24] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043764u);
#endif
@@ -560372,7 +561735,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2B76C: 332F00FF andi $t7, $t9, 0xFF */
- cpu->gpr[15] = cpu->gpr[25] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0xFFu;
+ PGXP_ALU(0x332F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004376Cu);
#endif
@@ -560392,7 +561756,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B774: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043774u);
#endif
@@ -560409,7 +561774,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B77C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004377Cu);
#endif
@@ -560420,7 +561786,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B780: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043780u);
#endif
@@ -560428,7 +561795,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC2B784: 305800FF andi $t8, $v0, 0xFF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043784u);
#endif
@@ -560445,7 +561813,8 @@ label_BFC2B6D0:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2B78C: 31CF00FF andi $t7, $t6, 0xFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004378Cu);
#endif
@@ -560526,7 +561895,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC2B7AC: 308E00FF andi $t6, $a0, 0xFF */
- cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437ACu);
#endif
@@ -560546,7 +561916,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC2B7B4: 31F800FF andi $t8, $t7, 0xFF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437B4u);
#endif
@@ -560575,7 +561946,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B7C0: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437C0u);
#endif
@@ -560592,7 +561964,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B7C8: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437C8u);
#endif
@@ -560600,7 +561973,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B7CC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437CCu);
#endif
@@ -560611,7 +561985,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC2B7D0: 304E00FF andi $t6, $v0, 0xFF */
- cpu->gpr[14] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437D0u);
#endif
@@ -560628,7 +562003,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2B7D8: 333800FF andi $t8, $t9, 0xFF */
- cpu->gpr[24] = cpu->gpr[25] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0xFFu;
+ PGXP_ALU(0x333800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437D8u);
#endif
@@ -560675,7 +562051,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x2000020u);
#endif
/* 0xBFC2B7EC: 30B900FF andi $t9, $a1, 0xFF */
- cpu->gpr[25] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30B900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437ECu);
#endif
@@ -560695,7 +562072,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x1004000u);
#endif
/* 0xBFC2B7F4: 330E00FF andi $t6, $t8, 0xFF */
- cpu->gpr[14] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x330E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437F4u);
#endif
@@ -560712,7 +562090,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B7FC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800437FCu);
#endif
@@ -560732,7 +562111,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B804: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043804u);
#endif
@@ -560740,7 +562120,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B808: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043808u);
#endif
@@ -560748,7 +562129,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC2B80C: 305900FF andi $t9, $v0, 0xFF */
- cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004380Cu);
#endif
@@ -560768,7 +562150,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2B814: 31EE00FF andi $t6, $t7, 0xFF */
- cpu->gpr[14] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043814u);
#endif
@@ -560821,7 +562204,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x8040u);
#endif
/* 0xBFC2B82C: 30CF00FF andi $t7, $a2, 0xFF */
- cpu->gpr[15] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004382Cu);
#endif
@@ -560841,7 +562225,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2B834: 31D900FF andi $t9, $t6, 0xFF */
- cpu->gpr[25] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31D900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043834u);
#endif
@@ -560858,7 +562243,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B83C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004383Cu);
#endif
@@ -560878,7 +562264,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B844: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043844u);
#endif
@@ -560886,7 +562273,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B848: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043848u);
#endif
@@ -560894,7 +562282,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC2B84C: 304F00FF andi $t7, $v0, 0xFF */
- cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004384Cu);
#endif
@@ -560914,7 +562303,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2B854: 331900FF andi $t9, $t8, 0xFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043854u);
#endif
@@ -560967,7 +562357,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x1000080u);
#endif
/* 0xBFC2B86C: 30F800FF andi $t8, $a3, 0xFF */
- cpu->gpr[24] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004386Cu);
#endif
@@ -560987,7 +562378,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2B874: 332F00FF andi $t7, $t9, 0xFF */
- cpu->gpr[15] = cpu->gpr[25] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0xFFu;
+ PGXP_ALU(0x332F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043874u);
#endif
@@ -561004,7 +562396,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B87C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004387Cu);
#endif
@@ -561024,7 +562417,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B884: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043884u);
#endif
@@ -561032,7 +562426,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2B888: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043888u);
#endif
@@ -561040,7 +562435,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC2B88C: 305800FF andi $t8, $v0, 0xFF */
- cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004388Cu);
#endif
@@ -561060,7 +562456,8 @@ label_BFC2B7A4:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2B894: 31CF00FF andi $t7, $t6, 0xFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80043894u);
#endif
@@ -561404,7 +562801,8 @@ label_BFC2B8F4:
psx_cyc_step(cpu, 0x1000002u);
#endif
/* 0xBFC2B8FC: 2B010100 slti $at, $t8, 256 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (256) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (256) ? 1 : 0);
+ PGXP_ALU(0x2B010100u, cpu->gpr[1], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x800438FCu);
#endif
@@ -561592,7 +562990,8 @@ label_BFC2B938:
psx_cyc_step(cpu, 0x80000012u);
#endif
/* 0xBFC2B938: 03E4082A slt $at, $ra, $a0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[31] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[31] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x03E4082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80043938u);
#endif
@@ -561837,7 +563236,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC2B984: 30A50001 andi $a1, $a1, 0x1 */
- cpu->gpr[5] = cpu->gpr[5] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x1u;
+ PGXP_ALU(0x30A50001u, cpu->gpr[5], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043984u);
#endif
@@ -561845,7 +563245,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC2B988: 316B0001 andi $t3, $t3, 0x1 */
- cpu->gpr[11] = cpu->gpr[11] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0x1u;
+ PGXP_ALU(0x316B0001u, cpu->gpr[11], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043988u);
#endif
@@ -561853,7 +563254,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC2B98C: 30840001 andi $a0, $a0, 0x1 */
- cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004398Cu);
#endif
@@ -561921,7 +563323,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC2B9A8: 30C60001 andi $a2, $a2, 0x1 */
- cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ PGXP_ALU(0x30C60001u, cpu->gpr[6], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800439A8u);
#endif
@@ -561980,7 +563383,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC2B9C0: 30E70001 andi $a3, $a3, 0x1 */
- cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800439C0u);
#endif
@@ -562075,7 +563479,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC2B9E8: 31290001 andi $t1, $t1, 0x1 */
- cpu->gpr[9] = cpu->gpr[9] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0x1u;
+ PGXP_ALU(0x31290001u, cpu->gpr[9], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800439E8u);
#endif
@@ -562083,7 +563488,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC2B9EC: 31080001 andi $t0, $t0, 0x1 */
- cpu->gpr[8] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31080001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800439ECu);
#endif
@@ -562151,7 +563557,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x400u);
#endif
/* 0xBFC2BA08: 314A0001 andi $t2, $t2, 0x1 */
- cpu->gpr[10] = cpu->gpr[10] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0x1u;
+ PGXP_ALU(0x314A0001u, cpu->gpr[10], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043A08u);
#endif
@@ -562210,7 +563617,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC2BA20: 304C0001 andi $t4, $v0, 0x1 */
- cpu->gpr[12] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304C0001u, cpu->gpr[12], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043A20u);
#endif
@@ -562296,7 +563704,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC2BA44: 30840001 andi $a0, $a0, 0x1 */
- cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043A44u);
#endif
@@ -562304,7 +563713,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC2BA48: 30A50001 andi $a1, $a1, 0x1 */
- cpu->gpr[5] = cpu->gpr[5] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x1u;
+ PGXP_ALU(0x30A50001u, cpu->gpr[5], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043A48u);
#endif
@@ -562372,7 +563782,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC2BA64: 30C60001 andi $a2, $a2, 0x1 */
- cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1u;
+ PGXP_ALU(0x30C60001u, cpu->gpr[6], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043A64u);
#endif
@@ -562428,7 +563839,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC2BA7C: 30E70001 andi $a3, $a3, 0x1 */
- cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043A7Cu);
#endif
@@ -562526,7 +563938,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC2BAA4: 31080001 andi $t0, $t0, 0x1 */
- cpu->gpr[8] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31080001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043AA4u);
#endif
@@ -562534,7 +563947,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC2BAA8: 31290001 andi $t1, $t1, 0x1 */
- cpu->gpr[9] = cpu->gpr[9] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0x1u;
+ PGXP_ALU(0x31290001u, cpu->gpr[9], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043AA8u);
#endif
@@ -562602,7 +564016,8 @@ label_BFC2B970:
psx_cyc_step(cpu, 0x400u);
#endif
/* 0xBFC2BAC4: 314A0001 andi $t2, $t2, 0x1 */
- cpu->gpr[10] = cpu->gpr[10] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0x1u;
+ PGXP_ALU(0x314A0001u, cpu->gpr[10], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043AC4u);
#endif
@@ -562851,7 +564266,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x1004000u);
#endif
/* 0xBFC2BB24: 31D80001 andi $t8, $t6, 0x1 */
- cpu->gpr[24] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31D80001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043B24u);
#endif
@@ -562859,7 +564275,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2BB28: 332F0001 andi $t7, $t9, 0x1 */
- cpu->gpr[15] = cpu->gpr[25] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0x1u;
+ PGXP_ALU(0x332F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043B28u);
#endif
@@ -562897,7 +564314,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC2BB38: 31F80001 andi $t8, $t7, 0x1 */
- cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043B38u);
#endif
@@ -562935,7 +564353,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2BB48: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043B48u);
#endif
@@ -563012,7 +564431,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2BB68: 332F0001 andi $t7, $t9, 0x1 */
- cpu->gpr[15] = cpu->gpr[25] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0x1u;
+ PGXP_ALU(0x332F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043B68u);
#endif
@@ -563020,7 +564440,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x1004000u);
#endif
/* 0xBFC2BB6C: 31D80001 andi $t8, $t6, 0x1 */
- cpu->gpr[24] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31D80001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043B6Cu);
#endif
@@ -563058,7 +564479,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC2BB7C: 330F0001 andi $t7, $t8, 0x1 */
- cpu->gpr[15] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x330F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043B7Cu);
#endif
@@ -563087,7 +564509,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC2BB88: 304F0001 andi $t7, $v0, 0x1 */
- cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043B88u);
#endif
@@ -563164,7 +564587,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC2BBA8: 31F80001 andi $t8, $t7, 0x1 */
- cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043BA8u);
#endif
@@ -563172,7 +564596,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2BBAC: 31D90001 andi $t9, $t6, 0x1 */
- cpu->gpr[25] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31D90001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043BACu);
#endif
@@ -563210,7 +564635,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2BBBC: 33380001 andi $t8, $t9, 0x1 */
- cpu->gpr[24] = cpu->gpr[25] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0x1u;
+ PGXP_ALU(0x33380001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043BBCu);
#endif
@@ -563248,7 +564674,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x1004000u);
#endif
/* 0xBFC2BBCC: 330E0001 andi $t6, $t8, 0x1 */
- cpu->gpr[14] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x330E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043BCCu);
#endif
@@ -563325,7 +564752,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x2004000u);
#endif
/* 0xBFC2BBEC: 31D90001 andi $t9, $t6, 0x1 */
- cpu->gpr[25] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31D90001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043BECu);
#endif
@@ -563336,7 +564764,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC2BBF0: 31F80001 andi $t8, $t7, 0x1 */
- cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u;
+ PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043BF0u);
#endif
@@ -563374,7 +564803,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2BC00: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043C00u);
#endif
@@ -563412,7 +564842,8 @@ label_BFC2BB04:
psx_cyc_step(cpu, 0x2008000u);
#endif
/* 0xBFC2BC10: 332F0001 andi $t7, $t9, 0x1 */
- cpu->gpr[15] = cpu->gpr[25] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0x1u;
+ PGXP_ALU(0x332F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80043C10u);
#endif
@@ -563623,7 +565054,8 @@ label_BFC2BC54:
psx_cyc_step(cpu, 0x100002u);
#endif
/* 0xBFC2BC58: 2A810010 slti $at, $s4, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (16) ? 1 : 0);
+ PGXP_ALU(0x2A810010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80043C58u);
#endif
@@ -563674,7 +565106,8 @@ label_BFC2BC64:
psx_cyc_step(cpu, 0x200012u);
#endif
/* 0xBFC2BC64: 02A4082A slt $at, $s5, $a0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x02A4082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80043C64u);
#endif
@@ -563689,7 +565122,8 @@ label_BFC2BC64:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC2BC6C: 28810010 slti $at, $a0, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (16) ? 1 : 0);
+ PGXP_ALU(0x28810010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80043C6Cu);
#endif
@@ -563744,7 +565178,8 @@ label_BFC2BC70:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC2BC7C: 29C10100 slti $at, $t6, 256 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (256) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (256) ? 1 : 0);
+ PGXP_ALU(0x29C10100u, cpu->gpr[1], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x80043C7Cu);
#endif
@@ -563795,7 +565230,8 @@ label_BFC2BC88:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC2BC88: 28810010 slti $at, $a0, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (16) ? 1 : 0);
+ PGXP_ALU(0x28810010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80043C88u);
#endif
@@ -564527,7 +565963,8 @@ label_BFC2BCEC:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC2BD80: 28610011 slti $at, $v1, 17 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (17) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (17) ? 1 : 0);
+ PGXP_ALU(0x28610011u, cpu->gpr[1], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x80043D80u);
#endif
@@ -564631,7 +566068,8 @@ label_BFC2BD98:
psx_cyc_step(cpu, 0x20004u);
#endif
/* 0xBFC2BD9C: 3222000F andi $v0, $s1, 0xF */
- cpu->gpr[2] = cpu->gpr[17] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0xFu;
+ PGXP_ALU(0x3222000Fu, cpu->gpr[2], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80043D9Cu);
#endif
@@ -564791,7 +566229,8 @@ label_BFC2BDB4:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC2BDC4: 28610010 slti $at, $v1, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (16) ? 1 : 0);
+ PGXP_ALU(0x28610010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80043DC4u);
#endif
@@ -564932,7 +566371,8 @@ label_BFC2BDE8:
psx_cyc_step(cpu, 0x208000u);
#endif
/* 0xBFC2BDEC: 32AF003F andi $t7, $s5, 0x3F */
- cpu->gpr[15] = cpu->gpr[21] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[21] & 0x3Fu;
+ PGXP_ALU(0x32AF003Fu, cpu->gpr[15], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80043DECu);
#endif
@@ -565022,7 +566462,8 @@ label_BFC2BDFC:
psx_cyc_step(cpu, 0x8012u);
#endif
/* 0xBFC2BDFC: 01E4082A slt $at, $t7, $a0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x01E4082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80043DFCu);
#endif
@@ -565605,7 +567046,8 @@ label_BFC2BEA8:
psx_cyc_step(cpu, 0x100006u);
#endif
/* 0xBFC2BEB8: 0282082A slt $at, $s4, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0282082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80043EB8u);
#endif
@@ -566443,7 +567885,8 @@ label_BFC2BFAC:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC2BFB4: 304F0008 andi $t7, $v0, 0x8 */
- cpu->gpr[15] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304F0008u, cpu->gpr[15], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80043FB4u);
#endif
@@ -566458,7 +567901,8 @@ label_BFC2BFAC:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC2BFBC: 30580003 andi $t8, $v0, 0x3 */
- cpu->gpr[24] = cpu->gpr[2] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x3u;
+ PGXP_ALU(0x30580003u, cpu->gpr[24], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80043FBCu);
#endif
@@ -566514,7 +567958,8 @@ label_BFC2BFC0:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC2BFCC: 30580003 andi $t8, $v0, 0x3 */
- cpu->gpr[24] = cpu->gpr[2] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x3u;
+ PGXP_ALU(0x30580003u, cpu->gpr[24], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80043FCCu);
#endif
@@ -567088,7 +568533,8 @@ label_BFC2C074:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC2C08C: 30840007 andi $a0, $a0, 0x7 */
- cpu->gpr[4] = cpu->gpr[4] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x7u;
+ PGXP_ALU(0x30840007u, cpu->gpr[4], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x8004408Cu);
#endif
@@ -567172,7 +568618,8 @@ label_BFC2C090:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC2C0AC: 31AE003F andi $t6, $t5, 0x3F */
- cpu->gpr[14] = cpu->gpr[13] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x3Fu;
+ PGXP_ALU(0x31AE003Fu, cpu->gpr[14], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800440ACu);
#endif
@@ -567306,7 +568753,8 @@ label_BFC2C0BC:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC2C0D0: 31F800FF andi $t8, $t7, 0xFF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800440D0u);
#endif
@@ -567419,7 +568867,8 @@ label_BFC2C0E0:
psx_cyc_step(cpu, 0x2000002u);
#endif
/* 0xBFC2C0EC: 2F210002 sltiu $at, $t9, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2F210002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x800440ECu);
#endif
@@ -567722,7 +569171,8 @@ label_BFC2C158:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC2C160: 2DC10002 sltiu $at, $t6, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2DC10002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80044160u);
#endif
@@ -568070,7 +569520,8 @@ label_BFC2C1C4:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2C1DC: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800441DCu);
#endif
@@ -568135,7 +569586,8 @@ label_BFC2C1E8:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC2C1F0: 316CFFFF andi $t4, $t3, 0xFFFF */
- cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800441F0u);
#endif
@@ -568179,7 +569631,8 @@ label_BFC2C1E8:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2C204: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80044204u);
#endif
@@ -568214,7 +569667,8 @@ label_BFC2C1E8:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2C214: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80044214u);
#endif
@@ -568288,7 +569742,8 @@ label_BFC2C1E8:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC2C234: 312AFFFF andi $t2, $t1, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80044234u);
#endif
@@ -568341,7 +569796,8 @@ label_BFC2C1E8:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC2C24C: 316CFFFF andi $t4, $t3, 0xFFFF */
- cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004424Cu);
#endif
@@ -568388,7 +569844,8 @@ label_BFC2C1E8:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2C260: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80044260u);
#endif
@@ -568423,7 +569880,8 @@ label_BFC2C1E8:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2C270: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80044270u);
#endif
@@ -568467,7 +569925,8 @@ label_BFC2C1E8:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC2C284: 312AFFFF andi $t2, $t1, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80044284u);
#endif
@@ -568522,7 +569981,8 @@ label_BFC2C290:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC2C298: 316CFFFF andi $t4, $t3, 0xFFFF */
- cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80044298u);
#endif
@@ -568566,7 +570026,8 @@ label_BFC2C290:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC2C2AC: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800442ACu);
#endif
@@ -568601,7 +570062,8 @@ label_BFC2C290:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2C2BC: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800442BCu);
#endif
@@ -568648,7 +570110,8 @@ label_BFC2C290:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC2C2D0: 312AFFFF andi $t2, $t1, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800442D0u);
#endif
@@ -568974,7 +570437,8 @@ label_BFC2C328:
psx_cyc_step(cpu, 0x106u);
#endif
/* 0xBFC2C33C: 0048082B sltu $at, $v0, $t0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0048082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004433Cu);
#endif
@@ -569095,7 +570559,8 @@ label_BFC2C364:
psx_cyc_step(cpu, 0x32u);
#endif
/* 0xBFC2C364: 0085082B sltu $at, $a0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0085082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80044364u);
#endif
@@ -569211,7 +570676,8 @@ label_BFC2C370:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC2C390: 0045082B sltu $at, $v0, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80044390u);
#endif
@@ -569313,7 +570779,8 @@ label_BFC2C3AC:
psx_cyc_step(cpu, 0x182u);
#endif
/* 0xBFC2C3B0: 00E8082B sltu $at, $a3, $t0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x00E8082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800443B0u);
#endif
@@ -570119,7 +571586,8 @@ label_BFC2C494:
psx_cyc_step(cpu, 0x808u);
#endif
/* 0xBFC2C494: 306BFFFF andi $t3, $v1, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[3] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] & 0xFFFFu;
+ PGXP_ALU(0x306BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80044494u);
#endif
@@ -570837,7 +572305,8 @@ label_BFC2C4E4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC2C59C: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004459Cu);
#endif
@@ -580616,7 +582085,8 @@ label_BFC2D154:
psx_cyc_step(cpu, 0x4018u);
#endif
/* 0xBFC2D194: 01C32026 xor $a0, $t6, $v1 */
- cpu->gpr[4] = cpu->gpr[14] ^ cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[14] ^ cpu->gpr[3];
+ PGXP_ALU(0x01C32026u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045194u);
#endif
@@ -580624,7 +582094,8 @@ label_BFC2D154:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC2D198: 2C840001 sltiu $a0, $a0, 1 */
- cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x00000001u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x00000001u ? 1 : 0);
+ PGXP_ALU(0x2C840001u, cpu->gpr[4], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80045198u);
#endif
@@ -580819,7 +582290,8 @@ label_BFC2D1CC:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC2D1D4: 304B00F0 andi $t3, $v0, 0xF0 */
- cpu->gpr[11] = cpu->gpr[2] & 0xF0u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0xF0u;
+ PGXP_ALU(0x304B00F0u, cpu->gpr[11], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x800451D4u);
#endif
@@ -580866,7 +582338,8 @@ label_BFC2D1E0:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC2D1E0: 304C0004 andi $t4, $v0, 0x4 */
- cpu->gpr[12] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x304C0004u, cpu->gpr[12], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x800451E0u);
#endif
@@ -581166,7 +582639,8 @@ label_BFC2D230:
psx_cyc_step(cpu, 0x2008002u);
#endif
/* 0xBFC2D234: 032F082A slt $at, $t9, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x032F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045234u);
#endif
@@ -581438,7 +582912,8 @@ label_BFC2D240:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC2D2A0: 0062082A slt $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800452A0u);
#endif
@@ -581767,7 +583242,8 @@ label_BFC2D310:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC2D310: 304A0002 andi $t2, $v0, 0x2 */
- cpu->gpr[10] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x304A0002u, cpu->gpr[10], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80045310u);
#endif
@@ -581782,7 +583258,8 @@ label_BFC2D310:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC2D318: 304F0001 andi $t7, $v0, 0x1 */
- cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80045318u);
#endif
@@ -582060,7 +583537,8 @@ label_BFC2D370:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC2D380: 304F0001 andi $t7, $v0, 0x1 */
- cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80045380u);
#endif
@@ -582085,7 +583563,8 @@ label_BFC2D384:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC2D388: 304C0008 andi $t4, $v0, 0x8 */
- cpu->gpr[12] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304C0008u, cpu->gpr[12], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80045388u);
#endif
@@ -582451,7 +583930,8 @@ label_BFC2D400:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC2D410: 304C0008 andi $t4, $v0, 0x8 */
- cpu->gpr[12] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304C0008u, cpu->gpr[12], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80045410u);
#endif
@@ -582604,7 +584084,8 @@ label_BFC2D41C:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC2D444: 30430080 andi $v1, $v0, 0x80 */
- cpu->gpr[3] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30430080u, cpu->gpr[3], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80045444u);
#endif
@@ -583087,7 +584568,8 @@ label_BFC2D4CC:
psx_cyc_step(cpu, 0x204u);
#endif
/* 0xBFC2D4D4: 30490004 andi $t1, $v0, 0x4 */
- cpu->gpr[9] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30490004u, cpu->gpr[9], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x800454D4u);
#endif
@@ -583102,7 +584584,8 @@ label_BFC2D4CC:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC2D4DC: 304B0010 andi $t3, $v0, 0x10 */
- cpu->gpr[11] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304B0010u, cpu->gpr[11], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x800454DCu);
#endif
@@ -583477,7 +584960,8 @@ label_BFC2D54C:
psx_cyc_step(cpu, 0x1000102u);
#endif
/* 0xBFC2D550: 0118082A slt $at, $t0, $t8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x0118082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045550u);
#endif
@@ -583749,7 +585233,8 @@ label_BFC2D55C:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC2D5BC: 0062082A slt $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800455BCu);
#endif
@@ -584259,7 +585744,8 @@ label_BFC2D658:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC2D668: 304B0010 andi $t3, $v0, 0x10 */
- cpu->gpr[11] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304B0010u, cpu->gpr[11], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80045668u);
#endif
@@ -584878,7 +586364,8 @@ label_BFC2D6E4:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC2D724: 2A01003C slti $at, $s0, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (60) ? 1 : 0);
+ PGXP_ALU(0x2A01003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80045724u);
#endif
@@ -585057,7 +586544,8 @@ label_BFC2D758:
psx_cyc_step(cpu, 0x10006u);
#endif
/* 0xBFC2D758: 0050082A slt $at, $v0, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0050082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045758u);
#endif
@@ -585154,7 +586642,8 @@ label_BFC2D76C:
psx_cyc_step(cpu, 0x30002u);
#endif
/* 0xBFC2D770: 0230082A slt $at, $s1, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045770u);
#endif
@@ -585290,7 +586779,8 @@ label_BFC2D78C:
psx_cyc_step(cpu, 0x18002u);
#endif
/* 0xBFC2D798: 020F082A slt $at, $s0, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x020F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045798u);
#endif
@@ -585831,7 +587321,8 @@ label_BFC2D7CC:
psx_cyc_step(cpu, 0x412u);
#endif
/* 0xBFC2D854: 008A082A slt $at, $a0, $t2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x008A082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045854u);
#endif
@@ -586000,7 +587491,8 @@ label_BFC2D87C:
psx_cyc_step(cpu, 0x2802u);
#endif
/* 0xBFC2D888: 01AB082A slt $at, $t5, $t3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x01AB082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045888u);
#endif
@@ -586124,7 +587616,8 @@ label_BFC2D8A0:
psx_cyc_step(cpu, 0x90002u);
#endif
/* 0xBFC2D8A8: 0213082A slt $at, $s0, $s3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0213082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800458A8u);
#endif
@@ -586212,7 +587705,8 @@ label_BFC2D8BC:
psx_cyc_step(cpu, 0x28002u);
#endif
/* 0xBFC2D8C0: 022F082A slt $at, $s1, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x022F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800458C0u);
#endif
@@ -586983,7 +588477,8 @@ label_BFC2D99C:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC2D9C0: 30590020 andi $t9, $v0, 0x20 */
- cpu->gpr[25] = cpu->gpr[2] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x20u;
+ PGXP_ALU(0x30590020u, cpu->gpr[25], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x800459C0u);
#endif
@@ -587453,7 +588948,8 @@ label_BFC2DA38:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC2DA50: 2A01003C slti $at, $s0, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (60) ? 1 : 0);
+ PGXP_ALU(0x2A01003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80045A50u);
#endif
@@ -588069,7 +589565,8 @@ label_BFC2DB00:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC2DB08: 33190020 andi $t9, $t8, 0x20 */
- cpu->gpr[25] = cpu->gpr[24] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x20u;
+ PGXP_ALU(0x33190020u, cpu->gpr[25], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x80045B08u);
#endif
@@ -588157,7 +589654,8 @@ label_BFC2DB18:
psx_cyc_step(cpu, 0x40002u);
#endif
/* 0xBFC2DB20: 2A41000F slti $at, $s2, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (15) ? 1 : 0);
+ PGXP_ALU(0x2A41000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80045B20u);
#endif
@@ -588351,7 +589849,8 @@ label_BFC2DB50:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC2DB54: 2A210010 slti $at, $s1, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (16) ? 1 : 0);
+ PGXP_ALU(0x2A210010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80045B54u);
#endif
@@ -589409,7 +590908,8 @@ label_BFC2DCA8:
psx_cyc_step(cpu, 0x206u);
#endif
/* 0xBFC2DCB4: 0122082A slt $at, $t1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0122082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045CB4u);
#endif
@@ -589518,7 +591018,8 @@ label_BFC2DCC8:
psx_cyc_step(cpu, 0x106u);
#endif
/* 0xBFC2DCD4: 0102082A slt $at, $t0, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0102082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045CD4u);
#endif
@@ -589718,7 +591219,8 @@ label_BFC2DD08:
psx_cyc_step(cpu, 0x1006u);
#endif
/* 0xBFC2DD14: 0182082A slt $at, $t4, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0182082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045D14u);
#endif
@@ -589827,7 +591329,8 @@ label_BFC2DD28:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC2DD34: 01C2082A slt $at, $t6, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x01C2082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045D34u);
#endif
@@ -589919,7 +591422,8 @@ label_BFC2DD40:
psx_cyc_step(cpu, 0x1008002u);
#endif
/* 0xBFC2DD54: 01E1C024 and $t8, $t7, $at */
- cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[1];
+ PGXP_ALU(0x01E1C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045D54u);
#endif
@@ -590853,7 +592357,8 @@ label_BFC2DEA8:
psx_cyc_step(cpu, 0x24002u);
#endif
/* 0xBFC2DEB0: 022E082A slt $at, $s1, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x022E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045EB0u);
#endif
@@ -591061,7 +592566,8 @@ label_BFC2DEE8:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC2DEE8: 30580040 andi $t8, $v0, 0x40 */
- cpu->gpr[24] = cpu->gpr[2] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x40u;
+ PGXP_ALU(0x30580040u, cpu->gpr[24], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80045EE8u);
#endif
@@ -591438,7 +592944,8 @@ label_BFC2DF60:
psx_cyc_step(cpu, 0x8006u);
#endif
/* 0xBFC2DF6C: 01E2082A slt $at, $t7, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x01E2082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045F6Cu);
#endif
@@ -591547,7 +593054,8 @@ label_BFC2DF80:
psx_cyc_step(cpu, 0x1000006u);
#endif
/* 0xBFC2DF8C: 0302082A slt $at, $t8, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0302082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045F8Cu);
#endif
@@ -591750,7 +593258,8 @@ label_BFC2DFC0:
psx_cyc_step(cpu, 0x406u);
#endif
/* 0xBFC2DFCC: 0142082A slt $at, $t2, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0142082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045FCCu);
#endif
@@ -591859,7 +593368,8 @@ label_BFC2DFE0:
psx_cyc_step(cpu, 0x806u);
#endif
/* 0xBFC2DFEC: 0162082A slt $at, $t3, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0162082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80045FECu);
#endif
@@ -591972,7 +593482,8 @@ label_BFC2DFF8:
psx_cyc_step(cpu, 0x3002u);
#endif
/* 0xBFC2E014: 01A16024 and $t4, $t5, $at */
- cpu->gpr[12] = cpu->gpr[13] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[13] & cpu->gpr[1];
+ PGXP_ALU(0x01A16024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80046014u);
#endif
@@ -592621,7 +594132,8 @@ label_BFC2E0FC:
psx_cyc_step(cpu, 0x24002u);
#endif
/* 0xBFC2E104: 022E082A slt $at, $s1, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x022E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80046104u);
#endif
@@ -593908,7 +595420,8 @@ label_BFC2E2B0:
psx_cyc_step(cpu, 0x42002u);
#endif
/* 0xBFC2E2BC: 024D082A slt $at, $s2, $t5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x024D082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800462BCu);
#endif
@@ -594021,7 +595534,8 @@ label_BFC2E2D4:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC2E2DC: 29C10060 slti $at, $t6, 96 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (96) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (96) ? 1 : 0);
+ PGXP_ALU(0x29C10060u, cpu->gpr[1], _pgx1, 0x0060u); }
#ifdef PSX_COSIM
cosim_instr(0x800462DCu);
#endif
@@ -594791,7 +596305,8 @@ label_BFC2E3C4:
psx_cyc_step(cpu, 0x2Au);
#endif
/* 0xBFC2E3E0: 0065082A slt $at, $v1, $a1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0065082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800463E0u);
#endif
@@ -594918,7 +596433,8 @@ label_BFC2E3F4:
psx_cyc_step(cpu, 0x200000Au);
#endif
/* 0xBFC2E404: 0323082A slt $at, $t9, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0323082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80046404u);
#endif
@@ -597103,7 +598619,8 @@ label_BFC2E6B8:
psx_cyc_step(cpu, 0x1008020u);
#endif
/* 0xBFC2E6F8: 00AFC024 and $t8, $a1, $t7 */
- cpu->gpr[24] = cpu->gpr[5] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[5] & cpu->gpr[15];
+ PGXP_ALU(0x00AFC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800466F8u);
#endif
@@ -597406,7 +598923,8 @@ label_BFC2E750:
psx_cyc_step(cpu, 0x822u);
#endif
/* 0xBFC2E754: 00A15824 and $t3, $a1, $at */
- cpu->gpr[11] = cpu->gpr[5] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[5] & cpu->gpr[1];
+ PGXP_ALU(0x00A15824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80046754u);
#endif
@@ -597696,7 +599214,8 @@ label_BFC2E7B4:
psx_cyc_step(cpu, 0x8022u);
#endif
/* 0xBFC2E7B8: 00A17824 and $t7, $a1, $at */
- cpu->gpr[15] = cpu->gpr[5] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[5] & cpu->gpr[1];
+ PGXP_ALU(0x00A17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800467B8u);
#endif
@@ -597986,7 +599505,8 @@ label_BFC2E814:
psx_cyc_step(cpu, 0x122u);
#endif
/* 0xBFC2E818: 00A14024 and $t0, $a1, $at */
- cpu->gpr[8] = cpu->gpr[5] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[5] & cpu->gpr[1];
+ PGXP_ALU(0x00A14024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80046818u);
#endif
@@ -598276,7 +599796,8 @@ label_BFC2E874:
psx_cyc_step(cpu, 0x822u);
#endif
/* 0xBFC2E878: 00A15824 and $t3, $a1, $at */
- cpu->gpr[11] = cpu->gpr[5] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[5] & cpu->gpr[1];
+ PGXP_ALU(0x00A15824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80046878u);
#endif
@@ -598658,7 +600179,8 @@ label_BFC2E8CC:
psx_cyc_step(cpu, 0x4022u);
#endif
/* 0xBFC2E8E4: 00A17024 and $t6, $a1, $at */
- cpu->gpr[14] = cpu->gpr[5] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[5] & cpu->gpr[1];
+ PGXP_ALU(0x00A17024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800468E4u);
#endif
@@ -599124,7 +600646,8 @@ label_BFC2E97C:
psx_cyc_step(cpu, 0x422u);
#endif
/* 0xBFC2E980: 00A15024 and $t2, $a1, $at */
- cpu->gpr[10] = cpu->gpr[5] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[5] & cpu->gpr[1];
+ PGXP_ALU(0x00A15024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80046980u);
#endif
@@ -599417,7 +600940,8 @@ label_BFC2E9DC:
psx_cyc_step(cpu, 0x2022u);
#endif
/* 0xBFC2E9E0: 00A16824 and $t5, $a1, $at */
- cpu->gpr[13] = cpu->gpr[5] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[13] = cpu->gpr[5] & cpu->gpr[1];
+ PGXP_ALU(0x00A16824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800469E0u);
#endif
@@ -599710,7 +601234,8 @@ label_BFC2EA3C:
psx_cyc_step(cpu, 0x1000022u);
#endif
/* 0xBFC2EA40: 00A1C024 and $t8, $a1, $at */
- cpu->gpr[24] = cpu->gpr[5] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[5] & cpu->gpr[1];
+ PGXP_ALU(0x00A1C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80046A40u);
#endif
@@ -602332,7 +603857,8 @@ label_BFC2EE90:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC2EE94: 00A2082A slt $at, $a1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x00A2082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80046E94u);
#endif
@@ -603672,7 +605198,8 @@ label_BFC2F014:
psx_cyc_step(cpu, 0x100002u);
#endif
/* 0xBFC2F014: 2A81003C slti $at, $s4, 60 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (60) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (60) ? 1 : 0);
+ PGXP_ALU(0x2A81003Cu, cpu->gpr[1], _pgx1, 0x003Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80047014u);
#endif
@@ -603915,7 +605442,8 @@ label_BFC2F03C:
psx_cyc_step(cpu, 0x20802u);
#endif
/* 0xBFC2F064: 022B082A slt $at, $s1, $t3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x022B082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80047064u);
#endif
@@ -609188,7 +610716,8 @@ label_BFC2F830:
psx_cyc_step(cpu, 0x800Cu);
#endif
/* 0xBFC2F83C: 006F1024 and $v0, $v1, $t7 */
- cpu->gpr[2] = cpu->gpr[3] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[3] & cpu->gpr[15];
+ PGXP_ALU(0x006F1024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004783Cu);
#endif
@@ -610976,7 +612505,8 @@ label_BFC2FA18:
psx_cyc_step(cpu, 0x180002u);
#endif
/* 0xBFC2FA1C: 0293082A slt $at, $s4, $s3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0293082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80047A1Cu);
#endif
@@ -614437,7 +615967,8 @@ label_BFC2FEC4:
psx_cyc_step(cpu, 0x2402u);
#endif
/* 0xBFC2FED4: 014D082A slt $at, $t2, $t5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x014D082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80047ED4u);
#endif
@@ -614603,7 +616134,8 @@ label_BFC2FEEC:
psx_cyc_step(cpu, 0x602u);
#endif
/* 0xBFC2FF10: 012A082A slt $at, $t1, $t2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x012A082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80047F10u);
#endif
@@ -617814,7 +619346,8 @@ label_BFC3041C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC30430: 2C410004 sltiu $at, $v0, 4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000004u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000004u ? 1 : 0);
+ PGXP_ALU(0x2C410004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80048430u);
#endif
@@ -618735,7 +620268,8 @@ label_BFC30514:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC30528: 2C410004 sltiu $at, $v0, 4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000004u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000004u ? 1 : 0);
+ PGXP_ALU(0x2C410004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80048528u);
#endif
@@ -628301,7 +629835,8 @@ label_BFC31128:
psx_cyc_step(cpu, 0x420002u);
#endif
/* 0xBFC3112C: 0236082A slt $at, $s1, $s6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[22] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[22] ? 1 : 0);
+ PGXP_ALU(0x0236082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004912Cu);
#endif
@@ -630229,7 +631764,8 @@ label_BFC313B8:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC313C4: 2A211000 slti $at, $s1, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (4096) ? 1 : 0);
+ PGXP_ALU(0x2A211000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x800493C4u);
#endif
@@ -630521,7 +632057,8 @@ label_BFC31418:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC31424: 2A211000 slti $at, $s1, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (4096) ? 1 : 0);
+ PGXP_ALU(0x2A211000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80049424u);
#endif
@@ -631210,7 +632747,8 @@ label_BFC31530:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC31534: 2A011000 slti $at, $s0, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (4096) ? 1 : 0);
+ PGXP_ALU(0x2A011000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80049534u);
#endif
@@ -631768,7 +633306,8 @@ label_BFC315FC:
psx_cyc_step(cpu, 0x20002u);
#endif
/* 0xBFC31608: 2A211000 slti $at, $s1, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (4096) ? 1 : 0);
+ PGXP_ALU(0x2A211000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80049608u);
#endif
@@ -633319,7 +634858,8 @@ label_BFC3182C:
psx_cyc_step(cpu, 0x500u);
#endif
/* 0xBFC31854: 310A003F andi $t2, $t0, 0x3F */
- cpu->gpr[10] = cpu->gpr[8] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] & 0x3Fu;
+ PGXP_ALU(0x310A003Fu, cpu->gpr[10], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80049854u);
#endif
@@ -633922,7 +635462,8 @@ label_BFC318E4:
psx_cyc_step(cpu, 0x408u);
#endif
/* 0xBFC3190C: 306A003F andi $t2, $v1, 0x3F */
- cpu->gpr[10] = cpu->gpr[3] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x3Fu;
+ PGXP_ALU(0x306A003Fu, cpu->gpr[10], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8004990Cu);
#endif
@@ -634931,7 +636472,8 @@ label_BFC319EC:
psx_cyc_step(cpu, 0x4008u);
#endif
/* 0xBFC31A14: 306E003F andi $t6, $v1, 0x3F */
- cpu->gpr[14] = cpu->gpr[3] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] & 0x3Fu;
+ PGXP_ALU(0x306E003Fu, cpu->gpr[14], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80049A14u);
#endif
@@ -635863,7 +637405,8 @@ label_BFC31B38:
psx_cyc_step(cpu, 0x11000u);
#endif
/* 0xBFC31B3C: 320C003F andi $t4, $s0, 0x3F */
- cpu->gpr[12] = cpu->gpr[16] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] & 0x3Fu;
+ PGXP_ALU(0x320C003Fu, cpu->gpr[12], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80049B3Cu);
#endif
@@ -636767,7 +638310,8 @@ label_BFC31C50:
psx_cyc_step(cpu, 0x10Cu);
#endif
/* 0xBFC31C60: 01031024 and $v0, $t0, $v1 */
- cpu->gpr[2] = cpu->gpr[8] & cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[8] & cpu->gpr[3];
+ PGXP_ALU(0x01031024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80049C60u);
#endif
@@ -637023,7 +638567,8 @@ label_BFC31C88:
psx_cyc_step(cpu, 0x2000080u);
#endif
/* 0xBFC31CAC: 30F9003F andi $t9, $a3, 0x3F */
- cpu->gpr[25] = cpu->gpr[7] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x3Fu;
+ PGXP_ALU(0x30F9003Fu, cpu->gpr[25], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80049CACu);
#endif
@@ -637666,7 +639211,8 @@ label_BFC31D38:
psx_cyc_step(cpu, 0x2000080u);
#endif
/* 0xBFC31D5C: 30F9003F andi $t9, $a3, 0x3F */
- cpu->gpr[25] = cpu->gpr[7] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x3Fu;
+ PGXP_ALU(0x30F9003Fu, cpu->gpr[25], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80049D5Cu);
#endif
@@ -638309,7 +639855,8 @@ label_BFC31DE8:
psx_cyc_step(cpu, 0x2000080u);
#endif
/* 0xBFC31E0C: 30F9003F andi $t9, $a3, 0x3F */
- cpu->gpr[25] = cpu->gpr[7] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x3Fu;
+ PGXP_ALU(0x30F9003Fu, cpu->gpr[25], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80049E0Cu);
#endif
@@ -638952,7 +640499,8 @@ label_BFC31E98:
psx_cyc_step(cpu, 0x2000080u);
#endif
/* 0xBFC31EBC: 30F9003F andi $t9, $a3, 0x3F */
- cpu->gpr[25] = cpu->gpr[7] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x3Fu;
+ PGXP_ALU(0x30F9003Fu, cpu->gpr[25], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80049EBCu);
#endif
@@ -639653,7 +641201,8 @@ label_BFC32054:
psx_cyc_step(cpu, 0xC001u);
#endif
/* 0xBFC3205C: 01C07827 nor $t7, $t6, $zero */
- cpu->gpr[15] = ~(cpu->gpr[14] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[15] = ~(cpu->gpr[14] | cpu->gpr[0]);
+ PGXP_ALU(0x01C07827u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A05Cu);
#endif
@@ -640083,7 +641632,8 @@ label_BFC320D0:
psx_cyc_step(cpu, 0x100C000u);
#endif
/* 0xBFC320DC: 01CFC024 and $t8, $t6, $t7 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A0DCu);
#endif
@@ -640372,7 +641922,8 @@ label_BFC3211C:
psx_cyc_step(cpu, 0x4022u);
#endif
/* 0xBFC32124: 00AE082A slt $at, $a1, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x00AE082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A124u);
#endif
@@ -640433,7 +641984,8 @@ label_BFC32130:
psx_cyc_step(cpu, 0x8042u);
#endif
/* 0xBFC32138: 00CF082A slt $at, $a2, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x00CF082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A138u);
#endif
@@ -640796,7 +642348,8 @@ label_BFC3214C:
psx_cyc_step(cpu, 0x2008400u);
#endif
/* 0xBFC321BC: 032A7824 and $t7, $t9, $t2 */
- cpu->gpr[15] = cpu->gpr[25] & cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[25] & cpu->gpr[10];
+ PGXP_ALU(0x032A7824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A1BCu);
#endif
@@ -641193,7 +642746,8 @@ label_BFC32210:
psx_cyc_step(cpu, 0x4022u);
#endif
/* 0xBFC32218: 00AE082A slt $at, $a1, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x00AE082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A218u);
#endif
@@ -641257,7 +642811,8 @@ label_BFC32224:
psx_cyc_step(cpu, 0x8042u);
#endif
/* 0xBFC3222C: 00CF082A slt $at, $a2, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x00CF082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A22Cu);
#endif
@@ -641542,7 +643097,8 @@ label_BFC32238:
psx_cyc_step(cpu, 0x1000201u);
#endif
/* 0xBFC32294: 0120C027 nor $t8, $t1, $zero */
- cpu->gpr[24] = ~(cpu->gpr[9] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = ~(cpu->gpr[9] | cpu->gpr[0]);
+ PGXP_ALU(0x0120C027u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A294u);
#endif
@@ -641597,7 +643153,8 @@ label_BFC32238:
psx_cyc_step(cpu, 0x1006000u);
#endif
/* 0xBFC322AC: 01B87024 and $t6, $t5, $t8 */
- cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[24];
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[24];
+ PGXP_ALU(0x01B87024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A2ACu);
#endif
@@ -643698,7 +645255,8 @@ label_BFC324F8:
psx_cyc_step(cpu, 0x10006u);
#endif
/* 0xBFC32508: 0202082A slt $at, $s0, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0202082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A508u);
#endif
@@ -643802,7 +645360,8 @@ label_BFC3251C:
psx_cyc_step(cpu, 0x8000Au);
#endif
/* 0xBFC32528: 0263082A slt $at, $s3, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0263082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A528u);
#endif
@@ -644122,7 +645681,8 @@ label_BFC3255C:
psx_cyc_step(cpu, 0x10Au);
#endif
/* 0xBFC32580: 0068082A slt $at, $v1, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0068082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A580u);
#endif
@@ -644203,7 +645763,8 @@ label_BFC3258C:
psx_cyc_step(cpu, 0x8006u);
#endif
/* 0xBFC3259C: 01E2082A slt $at, $t7, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x01E2082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A59Cu);
#endif
@@ -644313,7 +645874,8 @@ label_BFC325B0:
psx_cyc_step(cpu, 0xA2u);
#endif
/* 0xBFC325BC: 00E5082A slt $at, $a3, $a1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x00E5082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A5BCu);
#endif
@@ -644396,7 +645958,8 @@ label_BFC325C8:
psx_cyc_step(cpu, 0x2000012u);
#endif
/* 0xBFC325D8: 0324082A slt $at, $t9, $a0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0324082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A5D8u);
#endif
@@ -644512,7 +646075,8 @@ label_BFC325EC:
psx_cyc_step(cpu, 0xA02u);
#endif
/* 0xBFC325F8: 0169082A slt $at, $t3, $t1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0169082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A5F8u);
#endif
@@ -644628,7 +646192,8 @@ label_BFC3260C:
psx_cyc_step(cpu, 0x2102u);
#endif
/* 0xBFC32618: 01A8082A slt $at, $t5, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x01A8082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A618u);
#endif
@@ -644748,7 +646313,8 @@ label_BFC3262C:
psx_cyc_step(cpu, 0x40012u);
#endif
/* 0xBFC32638: 0244082A slt $at, $s2, $a0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0244082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A638u);
#endif
@@ -644838,7 +646404,8 @@ label_BFC3264C:
psx_cyc_step(cpu, 0x10006u);
#endif
/* 0xBFC32650: 0202082A slt $at, $s0, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0202082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A650u);
#endif
@@ -645197,7 +646764,8 @@ label_BFC3269C:
psx_cyc_step(cpu, 0x10006u);
#endif
/* 0xBFC326B4: 0202082A slt $at, $s0, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0202082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A6B4u);
#endif
@@ -645311,7 +646879,8 @@ label_BFC326D0:
psx_cyc_step(cpu, 0x40012u);
#endif
/* 0xBFC326DC: 0244082A slt $at, $s2, $a0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0244082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A6DCu);
#endif
@@ -646711,7 +648280,8 @@ label_BFC32874:
psx_cyc_step(cpu, 0x11002u);
#endif
/* 0xBFC328B0: 020C082A slt $at, $s0, $t4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[12] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[12] ? 1 : 0);
+ PGXP_ALU(0x020C082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004A8B0u);
#endif
@@ -648069,7 +649639,8 @@ label_BFC32A5C:
psx_cyc_step(cpu, 0x180002u);
#endif
/* 0xBFC32A60: 0274082B sltu $at, $s3, $s4 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < cpu->gpr[20] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < cpu->gpr[20] ? 1 : 0);
+ PGXP_ALU(0x0274082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004AA60u);
#endif
@@ -649460,7 +651031,8 @@ label_BFC32C50:
psx_cyc_step(cpu, 0x6002u);
#endif
/* 0xBFC32C70: 01AE082B sltu $at, $t5, $t6 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x01AE082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004AC70u);
#endif
@@ -654860,7 +656432,8 @@ label_BFC331A0:
psx_cyc_step(cpu, 0x200082u);
#endif
/* 0xBFC331D0: 02A7082A slt $at, $s5, $a3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x02A7082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B1D0u);
#endif
@@ -655011,7 +656584,8 @@ label_BFC331F4:
psx_cyc_step(cpu, 0x40000Au);
#endif
/* 0xBFC331FC: 02C3082A slt $at, $s6, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x02C3082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B1FCu);
#endif
@@ -655340,7 +656914,8 @@ label_BFC33244:
psx_cyc_step(cpu, 0xC0002u);
#endif
/* 0xBFC33244: 0253082A slt $at, $s2, $s3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0253082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B244u);
#endif
@@ -655547,7 +657122,8 @@ label_BFC3327C:
psx_cyc_step(cpu, 0x90002u);
#endif
/* 0xBFC33280: 0270082A slt $at, $s3, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0270082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B280u);
#endif
@@ -655673,7 +657249,8 @@ label_BFC3329C:
psx_cyc_step(cpu, 0xA0002u);
#endif
/* 0xBFC332A8: 0271082A slt $at, $s3, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0271082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B2A8u);
#endif
@@ -655936,7 +657513,8 @@ label_BFC332EC:
psx_cyc_step(cpu, 0x50002u);
#endif
/* 0xBFC332F0: 0250082A slt $at, $s2, $s0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[16] ? 1 : 0);
+ PGXP_ALU(0x0250082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B2F0u);
#endif
@@ -656062,7 +657640,8 @@ label_BFC3330C:
psx_cyc_step(cpu, 0x60002u);
#endif
/* 0xBFC33318: 0251082A slt $at, $s2, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0251082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B318u);
#endif
@@ -656374,7 +657953,8 @@ label_BFC33358:
psx_cyc_step(cpu, 0x18002u);
#endif
/* 0xBFC33388: 020F082A slt $at, $s0, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x020F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B388u);
#endif
@@ -656585,7 +658165,8 @@ label_BFC333BC:
psx_cyc_step(cpu, 0x10202u);
#endif
/* 0xBFC333D4: 0209082A slt $at, $s0, $t1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0209082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B3D4u);
#endif
@@ -656844,7 +658425,8 @@ label_BFC33400:
psx_cyc_step(cpu, 0x8002u);
#endif
/* 0xBFC3342C: 29E10002 slti $at, $t7, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (2) ? 1 : 0);
+ PGXP_ALU(0x29E10002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8004B42Cu);
#endif
@@ -656979,7 +658561,8 @@ label_BFC33438:
psx_cyc_step(cpu, 0x40000002u);
#endif
/* 0xBFC3345C: 2BC10002 slti $at, $fp, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[30] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[30] < (2) ? 1 : 0);
+ PGXP_ALU(0x2BC10002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8004B45Cu);
#endif
@@ -657233,7 +658816,8 @@ label_BFC3349C:
psx_cyc_step(cpu, 0x100002u);
#endif
/* 0xBFC334A0: 2A810002 slti $at, $s4, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (2) ? 1 : 0);
+ PGXP_ALU(0x2A810002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8004B4A0u);
#endif
@@ -657499,7 +659083,8 @@ label_BFC334E0:
psx_cyc_step(cpu, 0x40080002u);
#endif
/* 0xBFC334E4: 027E082A slt $at, $s3, $fp */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[30] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[30] ? 1 : 0);
+ PGXP_ALU(0x027E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B4E4u);
#endif
@@ -657561,7 +659146,8 @@ label_BFC334F0:
psx_cyc_step(cpu, 0x1800002u);
#endif
/* 0xBFC334F8: 02F8082A slt $at, $s7, $t8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x02F8082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004B4F8u);
#endif
@@ -657579,7 +659165,8 @@ label_BFC334F0:
psx_cyc_step(cpu, 0x40000002u);
#endif
/* 0xBFC33500: 2BC10002 slti $at, $fp, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[30] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[30] < (2) ? 1 : 0);
+ PGXP_ALU(0x2BC10002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8004B500u);
#endif
@@ -660326,7 +661913,8 @@ label_BFC33800:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC3380C: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B80Cu);
#endif
@@ -660337,7 +661925,8 @@ label_BFC33800:
psx_cyc_step(cpu, 0x400u);
#endif
/* 0xBFC33810: 314AFFFF andi $t2, $t2, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B810u);
#endif
@@ -660440,7 +662029,8 @@ label_BFC33800:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC33838: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B838u);
#endif
@@ -660448,7 +662038,8 @@ label_BFC33800:
psx_cyc_step(cpu, 0x400u);
#endif
/* 0xBFC3383C: 314AFFFF andi $t2, $t2, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B83Cu);
#endif
@@ -660585,7 +662176,8 @@ label_BFC33800:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC33868: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B868u);
#endif
@@ -660718,7 +662310,8 @@ label_BFC3388C:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC33898: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B898u);
#endif
@@ -660726,7 +662319,8 @@ label_BFC3388C:
psx_cyc_step(cpu, 0x400u);
#endif
/* 0xBFC3389C: 314AFFFF andi $t2, $t2, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B89Cu);
#endif
@@ -660832,7 +662426,8 @@ label_BFC3388C:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC338C4: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B8C4u);
#endif
@@ -660840,7 +662435,8 @@ label_BFC3388C:
psx_cyc_step(cpu, 0x400u);
#endif
/* 0xBFC338C8: 314AFFFF andi $t2, $t2, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B8C8u);
#endif
@@ -660977,7 +662573,8 @@ label_BFC3388C:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC338F4: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004B8F4u);
#endif
@@ -662885,7 +664482,8 @@ label_BFC33B9C:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC33B9C: 30480001 andi $t0, $v0, 0x1 */
- cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004BB9Cu);
#endif
@@ -662905,7 +664503,8 @@ label_BFC33B9C:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC33BA4: 004A5024 and $t2, $v0, $t2 */
- cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[10];
+ PGXP_ALU(0x004A5024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004BBA4u);
#endif
@@ -663344,7 +664943,8 @@ label_BFC33C20:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC33C20: 30480001 andi $t0, $v0, 0x1 */
- cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004BC20u);
#endif
@@ -663361,7 +664961,8 @@ label_BFC33C20:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC33C28: 004A5024 and $t2, $v0, $t2 */
- cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[10];
+ PGXP_ALU(0x004A5024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004BC28u);
#endif
@@ -663922,7 +665523,8 @@ label_BFC33CBC:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC33CBC: 30480001 andi $t0, $v0, 0x1 */
- cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x8004BCBCu);
#endif
@@ -663978,7 +665580,8 @@ label_BFC33CC0:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC33CC4: 004A5024 and $t2, $v0, $t2 */
- cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[10];
+ PGXP_ALU(0x004A5024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004BCC4u);
#endif
@@ -664386,7 +665989,8 @@ label_BFC33D30:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC33D3C: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004BD3Cu);
#endif
@@ -664487,7 +666091,8 @@ label_BFC33D30:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC33D64: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004BD64u);
#endif
@@ -664957,7 +666562,8 @@ label_BFC33DA4:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC33E04: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004BE04u);
#endif
@@ -667441,7 +669047,8 @@ label_BFC3409C:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC340A4: 3109001F andi $t1, $t0, 0x1F */
- cpu->gpr[9] = cpu->gpr[8] & 0x1Fu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1Fu;
+ PGXP_ALU(0x3109001Fu, cpu->gpr[9], _pgx1, 0x001Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8004C0A4u);
#endif
@@ -667458,7 +669065,8 @@ label_BFC3409C:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC340AC: 310903E0 andi $t1, $t0, 0x3E0 */
- cpu->gpr[9] = cpu->gpr[8] & 0x3E0u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x3E0u;
+ PGXP_ALU(0x310903E0u, cpu->gpr[9], _pgx1, 0x03E0u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C0ACu);
#endif
@@ -667487,7 +669095,8 @@ label_BFC3409C:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC340B8: 31097C00 andi $t1, $t0, 0x7C00 */
- cpu->gpr[9] = cpu->gpr[8] & 0x7C00u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x7C00u;
+ PGXP_ALU(0x31097C00u, cpu->gpr[9], _pgx1, 0x7C00u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C0B8u);
#endif
@@ -668017,7 +669626,8 @@ label_BFC34148:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3414C: 28410003 slti $at, $v0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3) ? 1 : 0);
+ PGXP_ALU(0x28410003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C14Cu);
#endif
@@ -673303,7 +674913,8 @@ label_BFC348A8:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC348B0: 30630FFF andi $v1, $v1, 0xFFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFu;
+ PGXP_ALU(0x30630FFFu, cpu->gpr[3], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004C8B0u);
#endif
@@ -673474,7 +675085,8 @@ label_BFC348D0:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC348D4: 30630FFF andi $v1, $v1, 0xFFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFu;
+ PGXP_ALU(0x30630FFFu, cpu->gpr[3], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004C8D4u);
#endif
@@ -673679,7 +675291,8 @@ label_BFC348FC:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34900: 28810400 slti $at, $a0, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C900u);
#endif
@@ -673718,7 +675331,8 @@ label_BFC34904:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34908: 28810400 slti $at, $a0, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C908u);
#endif
@@ -673828,7 +675442,8 @@ label_BFC34924:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34924: 28810400 slti $at, $a0, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C924u);
#endif
@@ -673880,7 +675495,8 @@ label_BFC34928:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC3492C: 28810800 slti $at, $a0, 2048 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C92Cu);
#endif
@@ -673919,7 +675535,8 @@ label_BFC34930:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34934: 28810800 slti $at, $a0, 2048 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C934u);
#endif
@@ -674038,7 +675655,8 @@ label_BFC34954:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34954: 28810800 slti $at, $a0, 2048 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C954u);
#endif
@@ -674090,7 +675708,8 @@ label_BFC34958:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC3495C: 28810C00 slti $at, $a0, 3072 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C95Cu);
#endif
@@ -674129,7 +675748,8 @@ label_BFC34960:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34964: 28810C00 slti $at, $a0, 3072 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C964u);
#endif
@@ -674237,7 +675857,8 @@ label_BFC34980:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34980: 28810C00 slti $at, $a0, 3072 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C980u);
#endif
@@ -674290,7 +675911,8 @@ label_BFC34984:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34988: 28811000 slti $at, $a0, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (4096) ? 1 : 0);
+ PGXP_ALU(0x28811000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C988u);
#endif
@@ -674565,7 +676187,8 @@ label_BFC349C4:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC349C8: 30840FFF andi $a0, $a0, 0xFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFu;
+ PGXP_ALU(0x30840FFFu, cpu->gpr[4], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004C9C8u);
#endif
@@ -674665,7 +676288,8 @@ label_BFC349D8:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC349DC: 28810400 slti $at, $a0, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C9DCu);
#endif
@@ -674704,7 +676328,8 @@ label_BFC349E0:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC349E4: 28810400 slti $at, $a0, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8004C9E4u);
#endif
@@ -674823,7 +676448,8 @@ label_BFC34A04:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34A04: 28810400 slti $at, $a0, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CA04u);
#endif
@@ -674875,7 +676501,8 @@ label_BFC34A08:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34A0C: 28810800 slti $at, $a0, 2048 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CA0Cu);
#endif
@@ -674914,7 +676541,8 @@ label_BFC34A10:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34A14: 28810800 slti $at, $a0, 2048 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CA14u);
#endif
@@ -675022,7 +676650,8 @@ label_BFC34A30:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34A30: 28810800 slti $at, $a0, 2048 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0);
+ PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CA30u);
#endif
@@ -675074,7 +676703,8 @@ label_BFC34A34:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34A38: 28810C00 slti $at, $a0, 3072 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CA38u);
#endif
@@ -675116,7 +676746,8 @@ label_BFC34A3C:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34A40: 28810C00 slti $at, $a0, 3072 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CA40u);
#endif
@@ -675233,7 +676864,8 @@ label_BFC34A60:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34A60: 28810C00 slti $at, $a0, 3072 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0);
+ PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CA60u);
#endif
@@ -675286,7 +676918,8 @@ label_BFC34A64:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC34A68: 28811000 slti $at, $a0, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (4096) ? 1 : 0);
+ PGXP_ALU(0x28811000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CA68u);
#endif
@@ -677449,7 +679082,8 @@ label_BFC34CF4:
psx_cyc_step(cpu, 0x222u);
#endif
/* 0xBFC34CF8: 0125082B sltu $at, $t1, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0125082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004CCF8u);
#endif
@@ -677627,7 +679261,8 @@ label_BFC34D2C:
psx_cyc_step(cpu, 0x1000022u);
#endif
/* 0xBFC34D34: 00B8082A slt $at, $a1, $t8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x00B8082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004CD34u);
#endif
@@ -677787,7 +679422,8 @@ label_BFC34D60:
psx_cyc_step(cpu, 0x602u);
#endif
/* 0xBFC34D64: 012A082B sltu $at, $t1, $t2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x012A082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004CD64u);
#endif
@@ -677844,7 +679480,8 @@ label_BFC34D70:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC34D74: 2C410009 sltiu $at, $v0, 9 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000009u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000009u ? 1 : 0);
+ PGXP_ALU(0x2C410009u, cpu->gpr[1], _pgx1, 0x0009u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CD74u);
#endif
@@ -679347,7 +680984,8 @@ label_BFC34F70:
psx_cyc_step(cpu, 0x122u);
#endif
/* 0xBFC34F74: 00A8082B sltu $at, $a1, $t0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x00A8082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004CF74u);
#endif
@@ -679362,7 +681000,8 @@ label_BFC34F70:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC34F7C: 28410014 slti $at, $v0, 20 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (20) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (20) ? 1 : 0);
+ PGXP_ALU(0x28410014u, cpu->gpr[1], _pgx1, 0x0014u); }
#ifdef PSX_COSIM
cosim_instr(0x8004CF7Cu);
#endif
@@ -679699,7 +681338,8 @@ label_BFC34FA0:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC34FE4: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004CFE4u);
#endif
@@ -679933,7 +681573,8 @@ label_BFC34FA0:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC35040: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D040u);
#endif
@@ -680050,7 +681691,8 @@ label_BFC34FA0:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC35068: 316BFFFF andi $t3, $t3, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D068u);
#endif
@@ -680088,7 +681730,8 @@ label_BFC34FA0:
psx_cyc_step(cpu, 0x2000u);
#endif
/* 0xBFC35078: 31ADFFFF andi $t5, $t5, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D078u);
#endif
@@ -680312,7 +681955,8 @@ label_BFC34FA0:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC350CC: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D0CCu);
#endif
@@ -680341,7 +681985,8 @@ label_BFC34FA0:
psx_cyc_step(cpu, 0x8000u);
#endif
/* 0xBFC350D8: 31EFFFFF andi $t7, $t7, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D0D8u);
#endif
@@ -680729,7 +682374,8 @@ label_BFC35128:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC3516C: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D16Cu);
#endif
@@ -680963,7 +682609,8 @@ label_BFC35128:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC351C8: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D1C8u);
#endif
@@ -681083,7 +682730,8 @@ label_BFC35128:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC351F0: 316BFFFF andi $t3, $t3, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D1F0u);
#endif
@@ -681121,7 +682769,8 @@ label_BFC35128:
psx_cyc_step(cpu, 0x2000u);
#endif
/* 0xBFC35200: 31ADFFFF andi $t5, $t5, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D200u);
#endif
@@ -681198,7 +682847,8 @@ label_BFC35128:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC3521C: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D21Cu);
#endif
@@ -681236,7 +682886,8 @@ label_BFC35128:
psx_cyc_step(cpu, 0x8000u);
#endif
/* 0xBFC3522C: 31EFFFFF andi $t7, $t7, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D22Cu);
#endif
@@ -681407,7 +683058,8 @@ label_BFC3524C:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC35268: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D268u);
#endif
@@ -681641,7 +683293,8 @@ label_BFC3524C:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC352C4: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D2C4u);
#endif
@@ -681758,7 +683411,8 @@ label_BFC3524C:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC352EC: 316BFFFF andi $t3, $t3, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D2ECu);
#endif
@@ -681796,7 +683450,8 @@ label_BFC3524C:
psx_cyc_step(cpu, 0x2000u);
#endif
/* 0xBFC352FC: 31ADFFFF andi $t5, $t5, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D2FCu);
#endif
@@ -681876,7 +683531,8 @@ label_BFC3524C:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC35318: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D318u);
#endif
@@ -681914,7 +683570,8 @@ label_BFC3524C:
psx_cyc_step(cpu, 0x8000u);
#endif
/* 0xBFC35328: 31EFFFFF andi $t7, $t7, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D328u);
#endif
@@ -682196,7 +683853,8 @@ label_BFC35348:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC35390: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D390u);
#endif
@@ -682427,7 +684085,8 @@ label_BFC35348:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC353EC: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D3ECu);
#endif
@@ -682547,7 +684206,8 @@ label_BFC35348:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC35414: 316BFFFF andi $t3, $t3, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D414u);
#endif
@@ -682585,7 +684245,8 @@ label_BFC35348:
psx_cyc_step(cpu, 0x2000u);
#endif
/* 0xBFC35424: 31ADFFFF andi $t5, $t5, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D424u);
#endif
@@ -682665,7 +684326,8 @@ label_BFC35348:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC35440: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D440u);
#endif
@@ -682703,7 +684365,8 @@ label_BFC35348:
psx_cyc_step(cpu, 0x8000u);
#endif
/* 0xBFC35450: 31EFFFFF andi $t7, $t7, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D450u);
#endif
@@ -682979,7 +684642,8 @@ label_BFC35470:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC354B8: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D4B8u);
#endif
@@ -683213,7 +684877,8 @@ label_BFC35470:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC35514: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D514u);
#endif
@@ -683330,7 +684995,8 @@ label_BFC35470:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC3553C: 316BFFFF andi $t3, $t3, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D53Cu);
#endif
@@ -683368,7 +685034,8 @@ label_BFC35470:
psx_cyc_step(cpu, 0x2000u);
#endif
/* 0xBFC3554C: 31ADFFFF andi $t5, $t5, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D54Cu);
#endif
@@ -683448,7 +685115,8 @@ label_BFC35470:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC35568: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D568u);
#endif
@@ -683486,7 +685154,8 @@ label_BFC35470:
psx_cyc_step(cpu, 0x8000u);
#endif
/* 0xBFC35578: 31EFFFFF andi $t7, $t7, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D578u);
#endif
@@ -683648,7 +685317,8 @@ label_BFC35598:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC355B0: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D5B0u);
#endif
@@ -683665,7 +685335,8 @@ label_BFC35598:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC355B8: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D5B8u);
#endif
@@ -683899,7 +685570,8 @@ label_BFC35598:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC35614: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D614u);
#endif
@@ -684016,7 +685688,8 @@ label_BFC35598:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC3563C: 316BFFFF andi $t3, $t3, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D63Cu);
#endif
@@ -684054,7 +685727,8 @@ label_BFC35598:
psx_cyc_step(cpu, 0x2000u);
#endif
/* 0xBFC3564C: 31ADFFFF andi $t5, $t5, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D64Cu);
#endif
@@ -684134,7 +685808,8 @@ label_BFC35598:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC35668: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D668u);
#endif
@@ -684172,7 +685847,8 @@ label_BFC35598:
psx_cyc_step(cpu, 0x8000u);
#endif
/* 0xBFC35678: 31EFFFFF andi $t7, $t7, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D678u);
#endif
@@ -684454,7 +686130,8 @@ label_BFC35698:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC356E0: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D6E0u);
#endif
@@ -684685,7 +686362,8 @@ label_BFC35698:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC3573C: 01214824 and $t1, $t1, $at */
- cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004D73Cu);
#endif
@@ -684805,7 +686483,8 @@ label_BFC35698:
psx_cyc_step(cpu, 0x800u);
#endif
/* 0xBFC35764: 316BFFFF andi $t3, $t3, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D764u);
#endif
@@ -684834,7 +686513,8 @@ label_BFC35698:
psx_cyc_step(cpu, 0x2000u);
#endif
/* 0xBFC35770: 31ADFFFF andi $t5, $t5, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu;
+ PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D770u);
#endif
@@ -684915,7 +686595,8 @@ label_BFC35698:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC3578C: 3108FFFF andi $t0, $t0, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D78Cu);
#endif
@@ -684944,7 +686625,8 @@ label_BFC35698:
psx_cyc_step(cpu, 0x8000u);
#endif
/* 0xBFC35798: 31EFFFFF andi $t7, $t7, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu;
+ PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D798u);
#endif
@@ -685694,7 +687376,8 @@ label_BFC35890:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC35898: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D898u);
#endif
@@ -685798,7 +687481,8 @@ label_BFC35890:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC358C4: 3129FFFF andi $t1, $t1, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D8C4u);
#endif
@@ -685872,7 +687556,8 @@ label_BFC35890:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC358E0: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D8E0u);
#endif
@@ -685952,7 +687637,8 @@ label_BFC35890:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC35900: 3129FFFF andi $t1, $t1, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D900u);
#endif
@@ -686023,7 +687709,8 @@ label_BFC35890:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3591C: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D91Cu);
#endif
@@ -686103,7 +687790,8 @@ label_BFC35890:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC3593C: 3129FFFF andi $t1, $t1, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D93Cu);
#endif
@@ -686177,7 +687865,8 @@ label_BFC35890:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC35958: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D958u);
#endif
@@ -686257,7 +687946,8 @@ label_BFC35890:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC35978: 3129FFFF andi $t1, $t1, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D978u);
#endif
@@ -686331,7 +688021,8 @@ label_BFC35890:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC35994: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D994u);
#endif
@@ -686449,7 +688140,8 @@ label_BFC359B4:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC359BC: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D9BCu);
#endif
@@ -686553,7 +688245,8 @@ label_BFC359B4:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC359E8: 3129FFFF andi $t1, $t1, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004D9E8u);
#endif
@@ -686627,7 +688320,8 @@ label_BFC359B4:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC35A04: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004DA04u);
#endif
@@ -686707,7 +688401,8 @@ label_BFC359B4:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC35A24: 3129FFFF andi $t1, $t1, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004DA24u);
#endif
@@ -686781,7 +688476,8 @@ label_BFC359B4:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC35A40: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004DA40u);
#endif
@@ -686861,7 +688557,8 @@ label_BFC359B4:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC35A60: 3129FFFF andi $t1, $t1, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004DA60u);
#endif
@@ -686932,7 +688629,8 @@ label_BFC359B4:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC35A7C: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004DA7Cu);
#endif
@@ -687012,7 +688710,8 @@ label_BFC359B4:
psx_cyc_step(cpu, 0x200u);
#endif
/* 0xBFC35A9C: 3129FFFF andi $t1, $t1, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004DA9Cu);
#endif
@@ -687086,7 +688785,8 @@ label_BFC359B4:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC35AB8: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004DAB8u);
#endif
@@ -687747,7 +689447,8 @@ label_BFC35B88:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC35B94: 29C10280 slti $at, $t6, 640 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (640) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (640) ? 1 : 0);
+ PGXP_ALU(0x29C10280u, cpu->gpr[1], _pgx1, 0x0280u); }
#ifdef PSX_COSIM
cosim_instr(0x8004DB94u);
#endif
@@ -701700,7 +703401,8 @@ label_BFC36CF0:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC36D08: 00612024 and $a0, $v1, $at */
- cpu->gpr[4] = cpu->gpr[3] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[3] & cpu->gpr[1];
+ PGXP_ALU(0x00612024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004ED08u);
#endif
@@ -701821,7 +703523,8 @@ label_BFC36D1C:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC36D2C: 30630003 andi $v1, $v1, 0x3 */
- cpu->gpr[3] = cpu->gpr[3] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x3u;
+ PGXP_ALU(0x30630003u, cpu->gpr[3], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x8004ED2Cu);
#endif
@@ -702871,7 +704574,8 @@ label_BFC36E54:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC36E5C: 33280008 andi $t0, $t9, 0x8 */
- cpu->gpr[8] = cpu->gpr[25] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x8u;
+ PGXP_ALU(0x33280008u, cpu->gpr[8], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x8004EE5Cu);
#endif
@@ -704736,7 +706440,8 @@ label_BFC370A0:
psx_cyc_step(cpu, 0x140u);
#endif
/* 0xBFC370B4: 30C800FF andi $t0, $a2, 0xFF */
- cpu->gpr[8] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30C800FFu, cpu->gpr[8], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F0B4u);
#endif
@@ -704744,7 +706449,8 @@ label_BFC370A0:
psx_cyc_step(cpu, 0x88u);
#endif
/* 0xBFC370B8: 30E300FF andi $v1, $a3, 0xFF */
- cpu->gpr[3] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30E300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F0B8u);
#endif
@@ -704761,7 +706467,8 @@ label_BFC370A0:
psx_cyc_step(cpu, 0x220u);
#endif
/* 0xBFC370C0: 30A900FF andi $t1, $a1, 0xFF */
- cpu->gpr[9] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[9] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F0C0u);
#endif
@@ -705390,7 +707097,8 @@ label_BFC3716C:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC3719C: 312AFFFF andi $t2, $t1, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F19Cu);
#endif
@@ -706013,7 +707721,8 @@ label_BFC373AC:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC373C4: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F3C4u);
#endif
@@ -706554,7 +708263,8 @@ label_BFC37458:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC37460: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004F460u);
#endif
@@ -707290,7 +709000,8 @@ label_BFC37518:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC37524: 304B0FFF andi $t3, $v0, 0xFFF */
- cpu->gpr[11] = cpu->gpr[2] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0xFFFu;
+ PGXP_ALU(0x304B0FFFu, cpu->gpr[11], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F524u);
#endif
@@ -707298,7 +709009,8 @@ label_BFC37518:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC37528: 31F80FFF andi $t8, $t7, 0xFFF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFFu;
+ PGXP_ALU(0x31F80FFFu, cpu->gpr[24], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F528u);
#endif
@@ -707373,7 +709085,8 @@ label_BFC37538:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC37540: 318D01FF andi $t5, $t4, 0x1FF */
- cpu->gpr[13] = cpu->gpr[12] & 0x1FFu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x1FFu;
+ PGXP_ALU(0x318D01FFu, cpu->gpr[13], _pgx1, 0x01FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F540u);
#endif
@@ -707390,7 +709103,8 @@ label_BFC37538:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC37548: 31F803FF andi $t8, $t7, 0x3FF */
- cpu->gpr[24] = cpu->gpr[15] & 0x3FFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x3FFu;
+ PGXP_ALU(0x31F803FFu, cpu->gpr[24], _pgx1, 0x03FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F548u);
#endif
@@ -707821,7 +709535,8 @@ label_BFC375D0:
psx_cyc_step(cpu, 0x82u);
#endif
/* 0xBFC375D0: 28E101F4 slti $at, $a3, 500 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (500) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (500) ? 1 : 0);
+ PGXP_ALU(0x28E101F4u, cpu->gpr[1], _pgx1, 0x01F4u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F5D0u);
#endif
@@ -707912,7 +709627,8 @@ label_BFC375E4:
psx_cyc_step(cpu, 0x82u);
#endif
/* 0xBFC375E4: 28E10CDB slti $at, $a3, 3291 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (3291) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (3291) ? 1 : 0);
+ PGXP_ALU(0x28E10CDBu, cpu->gpr[1], _pgx1, 0x0CDBu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F5E4u);
#endif
@@ -708047,7 +709763,8 @@ label_BFC37600:
psx_cyc_step(cpu, 0x206u);
#endif
/* 0xBFC37604: 0122082A slt $at, $t1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0122082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004F604u);
#endif
@@ -708062,7 +709779,8 @@ label_BFC37600:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC3760C: 29210CDB slti $at, $t1, 3291 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (3291) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (3291) ? 1 : 0);
+ PGXP_ALU(0x29210CDBu, cpu->gpr[1], _pgx1, 0x0CDBu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F60Cu);
#endif
@@ -708134,7 +709852,8 @@ label_BFC37618:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC37618: 29210CDB slti $at, $t1, 3291 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (3291) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (3291) ? 1 : 0);
+ PGXP_ALU(0x29210CDBu, cpu->gpr[1], _pgx1, 0x0CDBu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F618u);
#endif
@@ -708280,7 +709999,8 @@ label_BFC37634:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC37638: 28C10138 slti $at, $a2, 312 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (312) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (312) ? 1 : 0);
+ PGXP_ALU(0x28C10138u, cpu->gpr[1], _pgx1, 0x0138u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F638u);
#endif
@@ -708355,7 +710075,8 @@ label_BFC37644:
psx_cyc_step(cpu, 0x42u);
#endif
/* 0xBFC37644: 28C10138 slti $at, $a2, 312 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (312) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (312) ? 1 : 0);
+ PGXP_ALU(0x28C10138u, cpu->gpr[1], _pgx1, 0x0138u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F644u);
#endif
@@ -708491,7 +710212,8 @@ label_BFC37660:
psx_cyc_step(cpu, 0x142u);
#endif
/* 0xBFC37660: 0106082A slt $at, $t0, $a2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x0106082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004F660u);
#endif
@@ -708506,7 +710228,8 @@ label_BFC37660:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC37668: 29010138 slti $at, $t0, 312 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (312) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (312) ? 1 : 0);
+ PGXP_ALU(0x29010138u, cpu->gpr[1], _pgx1, 0x0138u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F668u);
#endif
@@ -708581,7 +710304,8 @@ label_BFC37674:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC37674: 29010138 slti $at, $t0, 312 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (312) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (312) ? 1 : 0);
+ PGXP_ALU(0x29010138u, cpu->gpr[1], _pgx1, 0x0138u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F674u);
#endif
@@ -708732,7 +710456,8 @@ label_BFC37690:
psx_cyc_step(cpu, 0x2200u);
#endif
/* 0xBFC37698: 312D0FFF andi $t5, $t1, 0xFFF */
- cpu->gpr[13] = cpu->gpr[9] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[13] = cpu->gpr[9] & 0xFFFu;
+ PGXP_ALU(0x312D0FFFu, cpu->gpr[13], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F698u);
#endif
@@ -708815,7 +710540,8 @@ label_BFC37690:
psx_cyc_step(cpu, 0x1000080u);
#endif
/* 0xBFC376BC: 30F80FFF andi $t8, $a3, 0xFFF */
- cpu->gpr[24] = cpu->gpr[7] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] & 0xFFFu;
+ PGXP_ALU(0x30F80FFFu, cpu->gpr[24], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F6BCu);
#endif
@@ -708891,7 +710617,8 @@ label_BFC376C8:
psx_cyc_step(cpu, 0x1100u);
#endif
/* 0xBFC376D8: 310C03FF andi $t4, $t0, 0x3FF */
- cpu->gpr[12] = cpu->gpr[8] & 0x3FFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[8] & 0x3FFu;
+ PGXP_ALU(0x310C03FFu, cpu->gpr[12], _pgx1, 0x03FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F6D8u);
#endif
@@ -708950,7 +710677,8 @@ label_BFC376C8:
psx_cyc_step(cpu, 0x4040u);
#endif
/* 0xBFC376F4: 30CE03FF andi $t6, $a2, 0x3FF */
- cpu->gpr[14] = cpu->gpr[6] & 0x3FFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] & 0x3FFu;
+ PGXP_ALU(0x30CE03FFu, cpu->gpr[14], _pgx1, 0x03FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004F6F4u);
#endif
@@ -709335,7 +711063,8 @@ label_BFC37760:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC37768: 28410119 slti $at, $v0, 281 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (281) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (281) ? 1 : 0);
+ PGXP_ALU(0x28410119u, cpu->gpr[1], _pgx1, 0x0119u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F768u);
#endif
@@ -709353,7 +711082,8 @@ label_BFC37760:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC37770: 28410161 slti $at, $v0, 353 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (353) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (353) ? 1 : 0);
+ PGXP_ALU(0x28410161u, cpu->gpr[1], _pgx1, 0x0161u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F770u);
#endif
@@ -709424,7 +711154,8 @@ label_BFC3777C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3777C: 28410161 slti $at, $v0, 353 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (353) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (353) ? 1 : 0);
+ PGXP_ALU(0x28410161u, cpu->gpr[1], _pgx1, 0x0161u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F77Cu);
#endif
@@ -709449,7 +711180,8 @@ label_BFC37780:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC37784: 28410191 slti $at, $v0, 401 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (401) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (401) ? 1 : 0);
+ PGXP_ALU(0x28410191u, cpu->gpr[1], _pgx1, 0x0191u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F784u);
#endif
@@ -709521,7 +711253,8 @@ label_BFC37790:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC37790: 28410191 slti $at, $v0, 401 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (401) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (401) ? 1 : 0);
+ PGXP_ALU(0x28410191u, cpu->gpr[1], _pgx1, 0x0191u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F790u);
#endif
@@ -709546,7 +711279,8 @@ label_BFC37794:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC37798: 28410231 slti $at, $v0, 561 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (561) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (561) ? 1 : 0);
+ PGXP_ALU(0x28410231u, cpu->gpr[1], _pgx1, 0x0231u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F798u);
#endif
@@ -709621,7 +711355,8 @@ label_BFC377A4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC377A4: 28410231 slti $at, $v0, 561 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (561) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (561) ? 1 : 0);
+ PGXP_ALU(0x28410231u, cpu->gpr[1], _pgx1, 0x0231u); }
#ifdef PSX_COSIM
cosim_instr(0x8004F7A4u);
#endif
@@ -709853,7 +711588,8 @@ label_BFC377D0:
psx_cyc_step(cpu, 0x800Au);
#endif
/* 0xBFC377D8: 006F082A slt $at, $v1, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x006F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004F7D8u);
#endif
@@ -710443,7 +712179,8 @@ label_BFC37888:
psx_cyc_step(cpu, 0x1000006u);
#endif
/* 0xBFC3788C: 0041C024 and $t8, $v0, $at */
- cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004F88Cu);
#endif
@@ -710675,7 +712412,8 @@ label_BFC378B4:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC378CC: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004F8CCu);
#endif
@@ -710920,7 +712658,8 @@ label_BFC37908:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC37920: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004F920u);
#endif
@@ -711298,7 +713037,8 @@ label_BFC37998:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC379B0: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004F9B0u);
#endif
@@ -711555,7 +713295,8 @@ label_BFC37A4C:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC37A64: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004FA64u);
#endif
@@ -711632,7 +713373,8 @@ label_BFC37A4C:
psx_cyc_step(cpu, 0xC0u);
#endif
/* 0xBFC37A84: 30E6FFFF andi $a2, $a3, 0xFFFF */
- cpu->gpr[6] = cpu->gpr[7] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[6] = cpu->gpr[7] & 0xFFFFu;
+ PGXP_ALU(0x30E6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FA84u);
#endif
@@ -712703,7 +714445,8 @@ label_BFC37BEC:
psx_cyc_step(cpu, 0x1000002u);
#endif
/* 0xBFC37BF0: 2B010400 slti $at, $t8, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (1024) ? 1 : 0);
+ PGXP_ALU(0x2B010400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8004FBF0u);
#endif
@@ -713082,7 +714825,8 @@ label_BFC37C48:
psx_cyc_step(cpu, 0x106u);
#endif
/* 0xBFC37C50: 0048082A slt $at, $v0, $t0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0048082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004FC50u);
#endif
@@ -713328,7 +715072,8 @@ label_BFC37C84:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC37C8C: 312A003F andi $t2, $t1, 0x3F */
- cpu->gpr[10] = cpu->gpr[9] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x3Fu;
+ PGXP_ALU(0x312A003Fu, cpu->gpr[10], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FC8Cu);
#endif
@@ -713393,7 +715138,8 @@ label_BFC37C98:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC37CA0: 316C003F andi $t4, $t3, 0x3F */
- cpu->gpr[12] = cpu->gpr[11] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x3Fu;
+ PGXP_ALU(0x316C003Fu, cpu->gpr[12], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FCA0u);
#endif
@@ -713983,7 +715729,8 @@ label_BFC37D90:
psx_cyc_step(cpu, 0x28000u);
#endif
/* 0xBFC37D94: 322F00FF andi $t7, $s1, 0xFF */
- cpu->gpr[15] = cpu->gpr[17] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] & 0xFFu;
+ PGXP_ALU(0x322F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FD94u);
#endif
@@ -714012,7 +715759,8 @@ label_BFC37D90:
psx_cyc_step(cpu, 0x3000100u);
#endif
/* 0xBFC37DA0: 0308C826 xor $t9, $t8, $t0 */
- cpu->gpr[25] = cpu->gpr[24] ^ cpu->gpr[8];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[24] ^ cpu->gpr[8];
+ PGXP_ALU(0x0308C826u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004FDA0u);
#endif
@@ -714029,7 +715777,8 @@ label_BFC37D90:
psx_cyc_step(cpu, 0x604u);
#endif
/* 0xBFC37DA8: 01225026 xor $t2, $t1, $v0 */
- cpu->gpr[10] = cpu->gpr[9] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[9] ^ cpu->gpr[2];
+ PGXP_ALU(0x01225026u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004FDA8u);
#endif
@@ -714175,7 +715924,8 @@ label_BFC37DC8:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC37DD0: 30C6FFFF andi $a2, $a2, 0xFFFF */
- cpu->gpr[6] = cpu->gpr[6] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFFFFu;
+ PGXP_ALU(0x30C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FDD0u);
#endif
@@ -714453,7 +716203,8 @@ label_BFC37E04:
psx_cyc_step(cpu, 0x2000040u);
#endif
/* 0xBFC37E10: 30D927FF andi $t9, $a2, 0x27FF */
- cpu->gpr[25] = cpu->gpr[6] & 0x27FFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] & 0x27FFu;
+ PGXP_ALU(0x30D927FFu, cpu->gpr[25], _pgx1, 0x27FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FE10u);
#endif
@@ -714724,7 +716475,8 @@ label_BFC37E44:
psx_cyc_step(cpu, 0x440u);
#endif
/* 0xBFC37E50: 30CA01FF andi $t2, $a2, 0x1FF */
- cpu->gpr[10] = cpu->gpr[6] & 0x1FFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[10] = cpu->gpr[6] & 0x1FFu;
+ PGXP_ALU(0x30CA01FFu, cpu->gpr[10], _pgx1, 0x01FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FE50u);
#endif
@@ -714945,7 +716697,8 @@ label_BFC37E7C:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC37E7C: 28810400 slti $at, $a0, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8004FE7Cu);
#endif
@@ -715308,7 +717061,8 @@ label_BFC37ED4:
psx_cyc_step(cpu, 0x2Au);
#endif
/* 0xBFC37ED4: 0065082A slt $at, $v1, $a1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0065082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004FED4u);
#endif
@@ -715549,7 +717303,8 @@ label_BFC37F08:
psx_cyc_step(cpu, 0x120u);
#endif
/* 0xBFC37F0C: 30A803FF andi $t0, $a1, 0x3FF */
- cpu->gpr[8] = cpu->gpr[5] & 0x3FFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[5] & 0x3FFu;
+ PGXP_ALU(0x30A803FFu, cpu->gpr[8], _pgx1, 0x03FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FF0Cu);
#endif
@@ -715581,7 +717336,8 @@ label_BFC37F10:
psx_cyc_step(cpu, 0x4020u);
#endif
/* 0xBFC37F10: 30AE0FFF andi $t6, $a1, 0xFFF */
- cpu->gpr[14] = cpu->gpr[5] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] & 0xFFFu;
+ PGXP_ALU(0x30AE0FFFu, cpu->gpr[14], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FF10u);
#endif
@@ -715619,7 +717375,8 @@ label_BFC37F10:
psx_cyc_step(cpu, 0x2000010u);
#endif
/* 0xBFC37F20: 30990FFF andi $t9, $a0, 0xFFF */
- cpu->gpr[25] = cpu->gpr[4] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0xFFFu;
+ PGXP_ALU(0x30990FFFu, cpu->gpr[25], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FF20u);
#endif
@@ -715686,7 +717443,8 @@ label_BFC37F30:
psx_cyc_step(cpu, 0x810u);
#endif
/* 0xBFC37F3C: 308B03FF andi $t3, $a0, 0x3FF */
- cpu->gpr[11] = cpu->gpr[4] & 0x3FFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[4] & 0x3FFu;
+ PGXP_ALU(0x308B03FFu, cpu->gpr[11], _pgx1, 0x03FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FF3Cu);
#endif
@@ -715910,7 +717668,8 @@ label_BFC37F68:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC37F68: 28810400 slti $at, $a0, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0);
+ PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8004FF68u);
#endif
@@ -716267,7 +718026,8 @@ label_BFC37FC0:
psx_cyc_step(cpu, 0x2Au);
#endif
/* 0xBFC37FC0: 0065082A slt $at, $v1, $a1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0065082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8004FFC0u);
#endif
@@ -716514,7 +718274,8 @@ label_BFC37FF4:
psx_cyc_step(cpu, 0x120u);
#endif
/* 0xBFC37FF8: 30A801FF andi $t0, $a1, 0x1FF */
- cpu->gpr[8] = cpu->gpr[5] & 0x1FFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[5] & 0x1FFu;
+ PGXP_ALU(0x30A801FFu, cpu->gpr[8], _pgx1, 0x01FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FFF8u);
#endif
@@ -716546,7 +718307,8 @@ label_BFC37FFC:
psx_cyc_step(cpu, 0x4020u);
#endif
/* 0xBFC37FFC: 30AE0FFF andi $t6, $a1, 0xFFF */
- cpu->gpr[14] = cpu->gpr[5] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] & 0xFFFu;
+ PGXP_ALU(0x30AE0FFFu, cpu->gpr[14], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8004FFFCu);
#endif
@@ -716584,7 +718346,8 @@ label_BFC37FFC:
psx_cyc_step(cpu, 0x2000010u);
#endif
/* 0xBFC3800C: 30990FFF andi $t9, $a0, 0xFFF */
- cpu->gpr[25] = cpu->gpr[4] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0xFFFu;
+ PGXP_ALU(0x30990FFFu, cpu->gpr[25], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005000Cu);
#endif
@@ -716657,7 +718420,8 @@ label_BFC3801C:
psx_cyc_step(cpu, 0x810u);
#endif
/* 0xBFC38028: 308B03FF andi $t3, $a0, 0x3FF */
- cpu->gpr[11] = cpu->gpr[4] & 0x3FFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[4] & 0x3FFu;
+ PGXP_ALU(0x308B03FFu, cpu->gpr[11], _pgx1, 0x03FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80050028u);
#endif
@@ -716817,7 +718581,8 @@ label_BFC38054:
psx_cyc_step(cpu, 0x8020u);
#endif
/* 0xBFC38054: 30AF0FFF andi $t7, $a1, 0xFFF */
- cpu->gpr[15] = cpu->gpr[5] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xFFFu;
+ PGXP_ALU(0x30AF0FFFu, cpu->gpr[15], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80050054u);
#endif
@@ -716855,7 +718620,8 @@ label_BFC38054:
psx_cyc_step(cpu, 0x110u);
#endif
/* 0xBFC38064: 30880FFF andi $t0, $a0, 0xFFF */
- cpu->gpr[8] = cpu->gpr[4] & 0xFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] & 0xFFFu;
+ PGXP_ALU(0x30880FFFu, cpu->gpr[8], _pgx1, 0x0FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80050064u);
#endif
@@ -716895,7 +718661,8 @@ label_BFC38070:
psx_cyc_step(cpu, 0x220u);
#endif
/* 0xBFC38070: 30A907FF andi $t1, $a1, 0x7FF */
- cpu->gpr[9] = cpu->gpr[5] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[9] = cpu->gpr[5] & 0x7FFu;
+ PGXP_ALU(0x30A907FFu, cpu->gpr[9], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80050070u);
#endif
@@ -716933,7 +718700,8 @@ label_BFC38070:
psx_cyc_step(cpu, 0x1010u);
#endif
/* 0xBFC38080: 308C07FF andi $t4, $a0, 0x7FF */
- cpu->gpr[12] = cpu->gpr[4] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[4] & 0x7FFu;
+ PGXP_ALU(0x308C07FFu, cpu->gpr[12], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80050080u);
#endif
@@ -717069,7 +718837,8 @@ label_BFC38098:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC380A8: 30C600FF andi $a2, $a2, 0xFF */
- cpu->gpr[6] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30C600FFu, cpu->gpr[6], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800500A8u);
#endif
@@ -717098,7 +718867,8 @@ label_BFC38098:
psx_cyc_step(cpu, 0x81u);
#endif
/* 0xBFC380B4: 00E03827 nor $a3, $a3, $zero */
- cpu->gpr[7] = ~(cpu->gpr[7] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = ~(cpu->gpr[7] | cpu->gpr[0]);
+ PGXP_ALU(0x00E03827u, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800500B4u);
#endif
@@ -717106,7 +718876,8 @@ label_BFC38098:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC380B8: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800500B8u);
#endif
@@ -717126,7 +718897,8 @@ label_BFC38098:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC380C0: 30E700FF andi $a3, $a3, 0xFF */
- cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFu;
+ PGXP_ALU(0x30E700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800500C0u);
#endif
@@ -717164,7 +718936,8 @@ label_BFC38098:
psx_cyc_step(cpu, 0x21u);
#endif
/* 0xBFC380D0: 00A02827 nor $a1, $a1, $zero */
- cpu->gpr[5] = ~(cpu->gpr[5] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = ~(cpu->gpr[5] | cpu->gpr[0]);
+ PGXP_ALU(0x00A02827u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800500D0u);
#endif
@@ -717202,7 +718975,8 @@ label_BFC38098:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC380E0: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800500E0u);
#endif
@@ -718513,7 +720287,8 @@ label_BFC38270:
psx_cyc_step(cpu, 0x16000u);
#endif
/* 0xBFC38284: 01B07024 and $t6, $t5, $s0 */
- cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[16];
+ PGXP_ALU(0x01B07024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050284u);
#endif
@@ -718710,7 +720485,8 @@ label_BFC382A8:
psx_cyc_step(cpu, 0x3010000u);
#endif
/* 0xBFC382BC: 0310C824 and $t9, $t8, $s0 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16];
+ PGXP_ALU(0x0310C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800502BCu);
#endif
@@ -719139,7 +720915,8 @@ label_BFC3832C:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC38330: 29210400 slti $at, $t1, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0);
+ PGXP_ALU(0x29210400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x80050330u);
#endif
@@ -719518,7 +721295,8 @@ label_BFC38388:
psx_cyc_step(cpu, 0x806u);
#endif
/* 0xBFC38390: 004B082A slt $at, $v0, $t3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x004B082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050390u);
#endif
@@ -719764,7 +721542,8 @@ label_BFC383C4:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC383CC: 318D003F andi $t5, $t4, 0x3F */
- cpu->gpr[13] = cpu->gpr[12] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x3Fu;
+ PGXP_ALU(0x318D003Fu, cpu->gpr[13], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800503CCu);
#endif
@@ -719832,7 +721611,8 @@ label_BFC383D8:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC383E0: 31CF003F andi $t7, $t6, 0x3F */
- cpu->gpr[15] = cpu->gpr[14] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x3Fu;
+ PGXP_ALU(0x31CF003Fu, cpu->gpr[15], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800503E0u);
#endif
@@ -719926,7 +721706,8 @@ label_BFC383F0:
psx_cyc_step(cpu, 0x3000004u);
#endif
/* 0xBFC383FC: 0302C824 and $t9, $t8, $v0 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[2];
+ PGXP_ALU(0x0302C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800503FCu);
#endif
@@ -720093,7 +721874,8 @@ label_BFC383F0:
psx_cyc_step(cpu, 0x2024u);
#endif
/* 0xBFC38440: 00A26824 and $t5, $a1, $v0 */
- cpu->gpr[13] = cpu->gpr[5] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[5] & cpu->gpr[2];
+ PGXP_ALU(0x00A26824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050440u);
#endif
@@ -720562,7 +722344,8 @@ label_BFC384C4:
psx_cyc_step(cpu, 0x2024u);
#endif
/* 0xBFC384E4: 00A26824 and $t5, $a1, $v0 */
- cpu->gpr[13] = cpu->gpr[5] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[5] & cpu->gpr[2];
+ PGXP_ALU(0x00A26824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800504E4u);
#endif
@@ -721106,7 +722889,8 @@ label_BFC38578:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC3857C: 29210400 slti $at, $t1, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0);
+ PGXP_ALU(0x29210400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x8005057Cu);
#endif
@@ -721485,7 +723269,8 @@ label_BFC385D4:
psx_cyc_step(cpu, 0x806u);
#endif
/* 0xBFC385DC: 004B082A slt $at, $v0, $t3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x004B082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800505DCu);
#endif
@@ -721734,7 +723519,8 @@ label_BFC38610:
psx_cyc_step(cpu, 0x1002u);
#endif
/* 0xBFC38618: 29810400 slti $at, $t4, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (1024) ? 1 : 0);
+ PGXP_ALU(0x29810400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x80050618u);
#endif
@@ -722090,7 +723876,8 @@ label_BFC38670:
psx_cyc_step(cpu, 0x11800u);
#endif
/* 0xBFC38684: 01706024 and $t4, $t3, $s0 */
- cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[16];
+ PGXP_ALU(0x01706024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050684u);
#endif
@@ -722249,7 +724036,8 @@ label_BFC386A0:
psx_cyc_step(cpu, 0x1C000u);
#endif
/* 0xBFC386B4: 01D07824 and $t7, $t6, $s0 */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[16];
+ PGXP_ALU(0x01D07824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800506B4u);
#endif
@@ -722538,7 +724326,8 @@ label_BFC386F4:
psx_cyc_step(cpu, 0x50u);
#endif
/* 0xBFC38714: 30C4000F andi $a0, $a2, 0xF */
- cpu->gpr[4] = cpu->gpr[6] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[6] & 0xFu;
+ PGXP_ALU(0x30C4000Fu, cpu->gpr[4], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80050714u);
#endif
@@ -723479,7 +725268,8 @@ label_BFC38824:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC38828: 29210400 slti $at, $t1, 1024 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0);
+ PGXP_ALU(0x29210400u, cpu->gpr[1], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x80050828u);
#endif
@@ -723855,7 +725645,8 @@ label_BFC38880:
psx_cyc_step(cpu, 0x806u);
#endif
/* 0xBFC38888: 004B082A slt $at, $v0, $t3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x004B082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050888u);
#endif
@@ -724341,7 +726132,8 @@ label_BFC388F4:
psx_cyc_step(cpu, 0x1C000u);
#endif
/* 0xBFC38908: 01D07824 and $t7, $t6, $s0 */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[16];
+ PGXP_ALU(0x01D07824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050908u);
#endif
@@ -724594,7 +726386,8 @@ label_BFC38940:
psx_cyc_step(cpu, 0x3010000u);
#endif
/* 0xBFC38954: 0310C824 and $t9, $t8, $s0 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16];
+ PGXP_ALU(0x0310C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050954u);
#endif
@@ -724787,7 +726580,8 @@ label_BFC38968:
psx_cyc_step(cpu, 0x3004u);
#endif
/* 0xBFC389A0: 01826824 and $t5, $t4, $v0 */
- cpu->gpr[13] = cpu->gpr[12] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[12] & cpu->gpr[2];
+ PGXP_ALU(0x01826824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800509A0u);
#endif
@@ -724851,7 +726645,8 @@ label_BFC389AC:
psx_cyc_step(cpu, 0xC004u);
#endif
/* 0xBFC389B4: 01C27824 and $t7, $t6, $v0 */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[2];
+ PGXP_ALU(0x01C27824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800509B4u);
#endif
@@ -724905,7 +726700,8 @@ label_BFC389C0:
psx_cyc_step(cpu, 0x90u);
#endif
/* 0xBFC389C4: 30E4000F andi $a0, $a3, 0xF */
- cpu->gpr[4] = cpu->gpr[7] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[7] & 0xFu;
+ PGXP_ALU(0x30E4000Fu, cpu->gpr[4], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800509C4u);
#endif
@@ -725684,7 +727480,8 @@ label_BFC38AA4:
psx_cyc_step(cpu, 0x8012u);
#endif
/* 0xBFC38AB4: 00817824 and $t7, $a0, $at */
- cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050AB4u);
#endif
@@ -726396,7 +728193,8 @@ label_BFC38B80:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC38BAC: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050BACu);
#endif
@@ -726916,7 +728714,8 @@ label_BFC38C68:
psx_cyc_step(cpu, 0x10000u);
#endif
/* 0xBFC38C90: 3210003F andi $s0, $s0, 0x3F */
- cpu->gpr[16] = cpu->gpr[16] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0x3Fu;
+ PGXP_ALU(0x3210003Fu, cpu->gpr[16], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80050C90u);
#endif
@@ -727538,7 +729337,8 @@ label_BFC38CD8:
psx_cyc_step(cpu, 0xA02u);
#endif
/* 0xBFC38D6C: 01215824 and $t3, $t1, $at */
- cpu->gpr[11] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01215824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050D6Cu);
#endif
@@ -727671,7 +729471,8 @@ label_BFC38D80:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC38D98: 3042003F andi $v0, $v0, 0x3F */
- cpu->gpr[2] = cpu->gpr[2] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x3Fu;
+ PGXP_ALU(0x3042003Fu, cpu->gpr[2], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80050D98u);
#endif
@@ -728100,7 +729901,8 @@ label_BFC38DFC:
psx_cyc_step(cpu, 0x2040100u);
#endif
/* 0xBFC38E10: 03324024 and $t0, $t9, $s2 */
- cpu->gpr[8] = cpu->gpr[25] & cpu->gpr[18];
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[8] = cpu->gpr[25] & cpu->gpr[18];
+ PGXP_ALU(0x03324024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050E10u);
#endif
@@ -728350,7 +730152,8 @@ label_BFC38E48:
psx_cyc_step(cpu, 0x13000u);
#endif
/* 0xBFC38E5C: 01906824 and $t5, $t4, $s0 */
- cpu->gpr[13] = cpu->gpr[12] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[12] & cpu->gpr[16];
+ PGXP_ALU(0x01906824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050E5Cu);
#endif
@@ -728512,7 +730315,8 @@ label_BFC38E78:
psx_cyc_step(cpu, 0x1018000u);
#endif
/* 0xBFC38E8C: 01F0C024 and $t8, $t7, $s0 */
- cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[16];
+ PGXP_ALU(0x01F0C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80050E8Cu);
#endif
@@ -728921,7 +730725,8 @@ label_BFC38F20:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC38F30: 312A003F andi $t2, $t1, 0x3F */
- cpu->gpr[10] = cpu->gpr[9] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x3Fu;
+ PGXP_ALU(0x312A003Fu, cpu->gpr[10], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80050F30u);
#endif
@@ -729811,7 +731616,8 @@ label_BFC39034:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC39048: 31AE3FFF andi $t6, $t5, 0x3FFF */
- cpu->gpr[14] = cpu->gpr[13] & 0x3FFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x3FFFu;
+ PGXP_ALU(0x31AE3FFFu, cpu->gpr[14], _pgx1, 0x3FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80051048u);
#endif
@@ -729862,7 +731668,8 @@ label_BFC39034:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC39060: 33191000 andi $t9, $t8, 0x1000 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1000u;
+ PGXP_ALU(0x33191000u, cpu->gpr[25], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80051060u);
#endif
@@ -730557,7 +732364,8 @@ label_BFC390F0:
psx_cyc_step(cpu, 0x2010100u);
#endif
/* 0xBFC39104: 03304024 and $t0, $t9, $s0 */
- cpu->gpr[8] = cpu->gpr[25] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[8] = cpu->gpr[25] & cpu->gpr[16];
+ PGXP_ALU(0x03304024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051104u);
#endif
@@ -730924,7 +732732,8 @@ label_BFC39160:
psx_cyc_step(cpu, 0x21800u);
#endif
/* 0xBFC39174: 01716024 and $t4, $t3, $s1 */
- cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[17];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[17];
+ PGXP_ALU(0x01716024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051174u);
#endif
@@ -730985,7 +732794,8 @@ label_BFC39180:
psx_cyc_step(cpu, 0x46000u);
#endif
/* 0xBFC39188: 01B27024 and $t6, $t5, $s2 */
- cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[18];
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[18];
+ PGXP_ALU(0x01B27024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051188u);
#endif
@@ -731118,7 +732928,8 @@ label_BFC3919C:
psx_cyc_step(cpu, 0x3010000u);
#endif
/* 0xBFC391B0: 0310C824 and $t9, $t8, $s0 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16];
+ PGXP_ALU(0x0310C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800511B0u);
#endif
@@ -731234,7 +733045,8 @@ label_BFC391C8:
psx_cyc_step(cpu, 0x10300u);
#endif
/* 0xBFC391D0: 01104824 and $t1, $t0, $s0 */
- cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[16];
+ PGXP_ALU(0x01104824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800511D0u);
#endif
@@ -731457,7 +733269,8 @@ label_BFC39200:
psx_cyc_step(cpu, 0x10C00u);
#endif
/* 0xBFC39214: 01505824 and $t3, $t2, $s0 */
- cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[16];
+ PGXP_ALU(0x01505824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051214u);
#endif
@@ -731684,7 +733497,8 @@ label_BFC39244:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC39260: 3042003F andi $v0, $v0, 0x3F */
- cpu->gpr[2] = cpu->gpr[2] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x3Fu;
+ PGXP_ALU(0x3042003Fu, cpu->gpr[2], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80051260u);
#endif
@@ -731758,7 +733572,8 @@ label_BFC39264:
psx_cyc_step(cpu, 0x3040000u);
#endif
/* 0xBFC39278: 0312C824 and $t9, $t8, $s2 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[18];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[18];
+ PGXP_ALU(0x0312C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051278u);
#endif
@@ -731878,7 +733693,8 @@ label_BFC39290:
psx_cyc_step(cpu, 0x10300u);
#endif
/* 0xBFC3929C: 01104824 and $t1, $t0, $s0 */
- cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[16];
+ PGXP_ALU(0x01104824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005129Cu);
#endif
@@ -732304,7 +734120,8 @@ label_BFC39300:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC39314: 01CF082A slt $at, $t6, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x01CF082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051314u);
#endif
@@ -732393,7 +734210,8 @@ label_BFC39320:
psx_cyc_step(cpu, 0x2000006u);
#endif
/* 0xBFC39334: 0041C824 and $t9, $v0, $at */
- cpu->gpr[25] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x0041C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051334u);
#endif
@@ -732544,7 +734362,8 @@ label_BFC3934C:
psx_cyc_step(cpu, 0x602u);
#endif
/* 0xBFC39360: 01215024 and $t2, $t1, $at */
- cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[1];
+ PGXP_ALU(0x01215024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051360u);
#endif
@@ -735002,7 +736821,8 @@ label_BFC3964C:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC39660: 308E0003 andi $t6, $a0, 0x3 */
- cpu->gpr[14] = cpu->gpr[4] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x3u;
+ PGXP_ALU(0x308E0003u, cpu->gpr[14], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051660u);
#endif
@@ -735034,7 +736854,8 @@ label_BFC39664:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC39664: 308E0003 andi $t6, $a0, 0x3 */
- cpu->gpr[14] = cpu->gpr[4] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x3u;
+ PGXP_ALU(0x308E0003u, cpu->gpr[14], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051664u);
#endif
@@ -735042,7 +736863,8 @@ label_BFC39664:
psx_cyc_step(cpu, 0x1000020u);
#endif
/* 0xBFC39668: 30B80003 andi $t8, $a1, 0x3 */
- cpu->gpr[24] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30B80003u, cpu->gpr[24], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051668u);
#endif
@@ -735071,7 +736893,8 @@ label_BFC39664:
psx_cyc_step(cpu, 0x240u);
#endif
/* 0xBFC39674: 30C90300 andi $t1, $a2, 0x300 */
- cpu->gpr[9] = cpu->gpr[6] & 0x300u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[6] & 0x300u;
+ PGXP_ALU(0x30C90300u, cpu->gpr[9], _pgx1, 0x0300u); }
#ifdef PSX_COSIM
cosim_instr(0x80051674u);
#endif
@@ -735100,7 +736923,8 @@ label_BFC39664:
psx_cyc_step(cpu, 0x1080u);
#endif
/* 0xBFC39680: 30EC03FF andi $t4, $a3, 0x3FF */
- cpu->gpr[12] = cpu->gpr[7] & 0x3FFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[12] = cpu->gpr[7] & 0x3FFu;
+ PGXP_ALU(0x30EC03FFu, cpu->gpr[12], _pgx1, 0x03FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80051680u);
#endif
@@ -735169,7 +736993,8 @@ label_BFC39694:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC39694: 308E0003 andi $t6, $a0, 0x3 */
- cpu->gpr[14] = cpu->gpr[4] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x3u;
+ PGXP_ALU(0x308E0003u, cpu->gpr[14], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051694u);
#endif
@@ -735187,7 +737012,8 @@ label_BFC39698:
psx_cyc_step(cpu, 0x8020u);
#endif
/* 0xBFC39698: 30AF0003 andi $t7, $a1, 0x3 */
- cpu->gpr[15] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30AF0003u, cpu->gpr[15], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051698u);
#endif
@@ -735216,7 +737042,8 @@ label_BFC39698:
psx_cyc_step(cpu, 0x140u);
#endif
/* 0xBFC396A4: 30C80100 andi $t0, $a2, 0x100 */
- cpu->gpr[8] = cpu->gpr[6] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] & 0x100u;
+ PGXP_ALU(0x30C80100u, cpu->gpr[8], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x800516A4u);
#endif
@@ -735245,7 +737072,8 @@ label_BFC39698:
psx_cyc_step(cpu, 0x880u);
#endif
/* 0xBFC396B0: 30EB03FF andi $t3, $a3, 0x3FF */
- cpu->gpr[11] = cpu->gpr[7] & 0x3FFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x3FFu;
+ PGXP_ALU(0x30EB03FFu, cpu->gpr[11], _pgx1, 0x03FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800516B0u);
#endif
@@ -735310,7 +737138,8 @@ label_BFC396C0:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC396CC: 3062FFFF andi $v0, $v1, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[3] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] & 0xFFFFu;
+ PGXP_ALU(0x3062FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800516CCu);
#endif
@@ -735354,7 +737183,8 @@ label_BFC396D0:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC396D4: 31F8003F andi $t8, $t7, 0x3F */
- cpu->gpr[24] = cpu->gpr[15] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x3Fu;
+ PGXP_ALU(0x31F8003Fu, cpu->gpr[24], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800516D4u);
#endif
@@ -735388,7 +737218,8 @@ label_BFC396D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC396E4: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800516E4u);
#endif
@@ -735464,7 +737295,8 @@ label_BFC396E8:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC396F0: 3083FFFF andi $v1, $a0, 0xFFFF */
- cpu->gpr[3] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3083FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800516F0u);
#endif
@@ -735581,7 +737413,8 @@ label_BFC39708:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC39714: 31CF0300 andi $t7, $t6, 0x300 */
- cpu->gpr[15] = cpu->gpr[14] & 0x300u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x300u;
+ PGXP_ALU(0x31CF0300u, cpu->gpr[15], _pgx1, 0x0300u); }
#ifdef PSX_COSIM
cosim_instr(0x80051714u);
#endif
@@ -735628,7 +737461,8 @@ label_BFC39708:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC39728: 30E707C0 andi $a3, $a3, 0x7C0 */
- cpu->gpr[7] = cpu->gpr[7] & 0x7C0u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7C0u;
+ PGXP_ALU(0x30E707C0u, cpu->gpr[7], _pgx1, 0x07C0u); }
#ifdef PSX_COSIM
cosim_instr(0x80051728u);
#endif
@@ -735636,7 +737470,8 @@ label_BFC39708:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC3972C: 30C60003 andi $a2, $a2, 0x3 */
- cpu->gpr[6] = cpu->gpr[6] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x3u;
+ PGXP_ALU(0x30C60003u, cpu->gpr[6], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x8005172Cu);
#endif
@@ -735647,7 +737482,8 @@ label_BFC39708:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC39730: 30A50003 andi $a1, $a1, 0x3 */
- cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051730u);
#endif
@@ -735763,7 +737599,8 @@ label_BFC39748:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC39754: 33280100 andi $t0, $t9, 0x100 */
- cpu->gpr[8] = cpu->gpr[25] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x100u;
+ PGXP_ALU(0x33280100u, cpu->gpr[8], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x80051754u);
#endif
@@ -735810,7 +737647,8 @@ label_BFC39748:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC39768: 30E707C0 andi $a3, $a3, 0x7C0 */
- cpu->gpr[7] = cpu->gpr[7] & 0x7C0u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7C0u;
+ PGXP_ALU(0x30E707C0u, cpu->gpr[7], _pgx1, 0x07C0u); }
#ifdef PSX_COSIM
cosim_instr(0x80051768u);
#endif
@@ -735818,7 +737656,8 @@ label_BFC39748:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC3976C: 30C60003 andi $a2, $a2, 0x3 */
- cpu->gpr[6] = cpu->gpr[6] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x3u;
+ PGXP_ALU(0x30C60003u, cpu->gpr[6], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x8005176Cu);
#endif
@@ -735829,7 +737668,8 @@ label_BFC39748:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC39770: 30A50003 andi $a1, $a1, 0x3 */
- cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051770u);
#endif
@@ -735979,7 +737819,8 @@ label_BFC39804:
psx_cyc_step(cpu, 0x3000008u);
#endif
/* 0xBFC39814: 0303C826 xor $t9, $t8, $v1 */
- cpu->gpr[25] = cpu->gpr[24] ^ cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[24] ^ cpu->gpr[3];
+ PGXP_ALU(0x0303C826u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051814u);
#endif
@@ -736008,7 +737849,8 @@ label_BFC39804:
psx_cyc_step(cpu, 0x608u);
#endif
/* 0xBFC39820: 01235026 xor $t2, $t1, $v1 */
- cpu->gpr[10] = cpu->gpr[9] ^ cpu->gpr[3];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[9] ^ cpu->gpr[3];
+ PGXP_ALU(0x01235026u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051820u);
#endif
@@ -736042,7 +737884,8 @@ label_BFC39804:
psx_cyc_step(cpu, 0x824u);
#endif
/* 0xBFC39830: 00A25826 xor $t3, $a1, $v0 */
- cpu->gpr[11] = cpu->gpr[5] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[5] ^ cpu->gpr[2];
+ PGXP_ALU(0x00A25826u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051830u);
#endif
@@ -736068,7 +737911,8 @@ label_BFC39804:
psx_cyc_step(cpu, 0x6004u);
#endif
/* 0xBFC3983C: 01A27026 xor $t6, $t5, $v0 */
- cpu->gpr[14] = cpu->gpr[13] ^ cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[13] ^ cpu->gpr[2];
+ PGXP_ALU(0x01A27026u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005183Cu);
#endif
@@ -736197,7 +738041,8 @@ label_BFC398DC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC398E8: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800518E8u);
#endif
@@ -736255,7 +738100,8 @@ label_BFC398F4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC398FC: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800518FCu);
#endif
@@ -736266,7 +738112,8 @@ label_BFC398F4:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC39900: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80051900u);
#endif
@@ -736400,7 +738247,8 @@ label_BFC39918:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC39924: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80051924u);
#endif
@@ -736455,7 +738303,8 @@ label_BFC39930:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC39938: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051938u);
#endif
@@ -736463,7 +738312,8 @@ label_BFC39930:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3993C: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005193Cu);
#endif
@@ -736550,7 +738400,8 @@ label_BFC3994C:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC39958: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051958u);
#endif
@@ -736668,7 +738519,8 @@ label_BFC3999C:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC399A8: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800519A8u);
#endif
@@ -736786,7 +738638,8 @@ label_BFC399EC:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC399F8: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800519F8u);
#endif
@@ -736904,7 +738757,8 @@ label_BFC39A14:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC39A20: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051A20u);
#endif
@@ -737019,7 +738873,8 @@ label_BFC39A3C:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC39A48: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051A48u);
#endif
@@ -737137,7 +738992,8 @@ label_BFC39ADC:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC39AE8: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051AE8u);
#endif
@@ -737255,7 +739111,8 @@ label_BFC39BA4:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC39BB0: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051BB0u);
#endif
@@ -737370,7 +739227,8 @@ label_BFC39BCC:
psx_cyc_step(cpu, 0xC002u);
#endif
/* 0xBFC39BD8: 01C17824 and $t7, $t6, $at */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80051BD8u);
#endif
@@ -738050,7 +739908,8 @@ label_BFC39DF4:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC39E04: 316C0300 andi $t4, $t3, 0x300 */
- cpu->gpr[12] = cpu->gpr[11] & 0x300u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x300u;
+ PGXP_ALU(0x316C0300u, cpu->gpr[12], _pgx1, 0x0300u); }
#ifdef PSX_COSIM
cosim_instr(0x80051E04u);
#endif
@@ -738097,7 +739956,8 @@ label_BFC39DF4:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC39E18: 30E707C0 andi $a3, $a3, 0x7C0 */
- cpu->gpr[7] = cpu->gpr[7] & 0x7C0u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7C0u;
+ PGXP_ALU(0x30E707C0u, cpu->gpr[7], _pgx1, 0x07C0u); }
#ifdef PSX_COSIM
cosim_instr(0x80051E18u);
#endif
@@ -738105,7 +739965,8 @@ label_BFC39DF4:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC39E1C: 30C60003 andi $a2, $a2, 0x3 */
- cpu->gpr[6] = cpu->gpr[6] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x3u;
+ PGXP_ALU(0x30C60003u, cpu->gpr[6], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051E1Cu);
#endif
@@ -738116,7 +739977,8 @@ label_BFC39DF4:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC39E20: 30A50003 andi $a1, $a1, 0x3 */
- cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051E20u);
#endif
@@ -738238,7 +740100,8 @@ label_BFC39E38:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC39E48: 31CF0100 andi $t7, $t6, 0x100 */
- cpu->gpr[15] = cpu->gpr[14] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x100u;
+ PGXP_ALU(0x31CF0100u, cpu->gpr[15], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x80051E48u);
#endif
@@ -738285,7 +740148,8 @@ label_BFC39E38:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC39E5C: 30E707C0 andi $a3, $a3, 0x7C0 */
- cpu->gpr[7] = cpu->gpr[7] & 0x7C0u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7C0u;
+ PGXP_ALU(0x30E707C0u, cpu->gpr[7], _pgx1, 0x07C0u); }
#ifdef PSX_COSIM
cosim_instr(0x80051E5Cu);
#endif
@@ -738296,7 +740160,8 @@ label_BFC39E38:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC39E60: 30C60003 andi $a2, $a2, 0x3 */
- cpu->gpr[6] = cpu->gpr[6] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x3u;
+ PGXP_ALU(0x30C60003u, cpu->gpr[6], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051E60u);
#endif
@@ -738304,7 +740169,8 @@ label_BFC39E38:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC39E64: 30A50003 andi $a1, $a1, 0x3 */
- cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u;
+ PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80051E64u);
#endif
@@ -738893,7 +740759,8 @@ label_BFC39F30:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC39F30: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80051F30u);
#endif
@@ -738917,7 +740784,8 @@ label_BFC39F30:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC39F3C: 2C810020 sltiu $at, $a0, 32 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000020u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000020u ? 1 : 0);
+ PGXP_ALU(0x2C810020u, cpu->gpr[1], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x80051F3Cu);
#endif
@@ -738997,7 +740865,8 @@ label_BFC39F50:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC39F54: 2C810080 sltiu $at, $a0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C810080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80051F54u);
#endif
@@ -739232,7 +741101,8 @@ label_BFC39F90:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC39F90: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80051F90u);
#endif
@@ -739256,7 +741126,8 @@ label_BFC39F90:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC39F9C: 2C810020 sltiu $at, $a0, 32 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000020u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000020u ? 1 : 0);
+ PGXP_ALU(0x2C810020u, cpu->gpr[1], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x80051F9Cu);
#endif
@@ -739330,7 +741201,8 @@ label_BFC39FAC:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC39FB0: 2C810080 sltiu $at, $a0, 128 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000080u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000080u ? 1 : 0);
+ PGXP_ALU(0x2C810080u, cpu->gpr[1], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80051FB0u);
#endif
@@ -739743,7 +741615,8 @@ label_BFC3A020:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3A020: 31CF00FF andi $t7, $t6, 0xFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052020u);
#endif
@@ -739989,7 +741862,8 @@ label_BFC3A06C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3A06C: 331900FF andi $t9, $t8, 0xFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005206Cu);
#endif
@@ -740539,7 +742413,8 @@ label_BFC3A114:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC3A114: 31F800FF andi $t8, $t7, 0xFF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052114u);
#endif
@@ -740621,7 +742496,8 @@ label_BFC3A120:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3A130: 310900FF andi $t1, $t0, 0xFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052130u);
#endif
@@ -741569,7 +743445,8 @@ label_BFC3A250:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC3A25C: 31F800FF andi $t8, $t7, 0xFF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu;
+ PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005225Cu);
#endif
@@ -741702,7 +743579,8 @@ label_BFC3A274:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3A288: 310900FF andi $t1, $t0, 0xFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052288u);
#endif
@@ -742170,7 +744048,8 @@ label_BFC3A308:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC3A310: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052310u);
#endif
@@ -742235,7 +744114,8 @@ label_BFC3A31C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3A324: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052324u);
#endif
@@ -742243,7 +744123,8 @@ label_BFC3A31C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3A328: 2C410018 sltiu $at, $v0, 24 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000018u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000018u ? 1 : 0);
+ PGXP_ALU(0x2C410018u, cpu->gpr[1], _pgx1, 0x0018u); }
#ifdef PSX_COSIM
cosim_instr(0x80052328u);
#endif
@@ -742647,7 +744528,8 @@ label_BFC3A36C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC3A3A8: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800523A8u);
#endif
@@ -742655,7 +744537,8 @@ label_BFC3A36C:
psx_cyc_step(cpu, 0x92u);
#endif
/* 0xBFC3A3AC: 0087082B sltu $at, $a0, $a3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x0087082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800523ACu);
#endif
@@ -742804,7 +744687,8 @@ label_BFC3A3CC:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC3A3D8: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800523D8u);
#endif
@@ -742824,7 +744708,8 @@ label_BFC3A3CC:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC3A3E0: 2C810021 sltiu $at, $a0, 33 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000021u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000021u ? 1 : 0);
+ PGXP_ALU(0x2C810021u, cpu->gpr[1], _pgx1, 0x0021u); }
#ifdef PSX_COSIM
cosim_instr(0x800523E0u);
#endif
@@ -743698,7 +745583,8 @@ label_BFC3A4E4:
psx_cyc_step(cpu, 0x1006u);
#endif
/* 0xBFC3A4EC: 0182082B sltu $at, $t4, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[12] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[12] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0182082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800524ECu);
#endif
@@ -743748,7 +745634,8 @@ label_BFC3A4F8:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3A4F8: 3182FFFF andi $v0, $t4, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[12] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[12] & 0xFFFFu;
+ PGXP_ALU(0x3182FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800524F8u);
#endif
@@ -743756,7 +745643,8 @@ label_BFC3A4F8:
psx_cyc_step(cpu, 0x810u);
#endif
/* 0xBFC3A4FC: 3164FFFF andi $a0, $t3, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x3164FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800524FCu);
#endif
@@ -743774,7 +745662,8 @@ label_BFC3A4F8:
psx_cyc_step(cpu, 0x140u);
#endif
/* 0xBFC3A504: 310600FF andi $a2, $t0, 0xFF */
- cpu->gpr[6] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[6] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310600FFu, cpu->gpr[6], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052504u);
#endif
@@ -743813,7 +745702,8 @@ label_BFC3A508:
psx_cyc_step(cpu, 0x812u);
#endif
/* 0xBFC3A50C: 0164082B sltu $at, $t3, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0164082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005250Cu);
#endif
@@ -743884,7 +745774,8 @@ label_BFC3A518:
psx_cyc_step(cpu, 0x810u);
#endif
/* 0xBFC3A518: 3164FFFF andi $a0, $t3, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x3164FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052518u);
#endif
@@ -743902,7 +745793,8 @@ label_BFC3A518:
psx_cyc_step(cpu, 0x140u);
#endif
/* 0xBFC3A520: 310600FF andi $a2, $t0, 0xFF */
- cpu->gpr[6] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[6] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310600FFu, cpu->gpr[6], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052520u);
#endif
@@ -743990,7 +745882,8 @@ label_BFC3A52C:
psx_cyc_step(cpu, 0x2802u);
#endif
/* 0xBFC3A534: 01AB082A slt $at, $t5, $t3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x01AB082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052534u);
#endif
@@ -744046,7 +745939,8 @@ label_BFC3A540:
psx_cyc_step(cpu, 0x100Au);
#endif
/* 0xBFC3A544: 0183082B sltu $at, $t4, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[12] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[12] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0183082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052544u);
#endif
@@ -744099,7 +745993,8 @@ label_BFC3A550:
psx_cyc_step(cpu, 0x1008u);
#endif
/* 0xBFC3A554: 3183FFFF andi $v1, $t4, 0xFFFF */
- cpu->gpr[3] = cpu->gpr[12] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[12] & 0xFFFFu;
+ PGXP_ALU(0x3183FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052554u);
#endif
@@ -744114,7 +746009,8 @@ label_BFC3A550:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC3A55C: 310700FF andi $a3, $t0, 0xFF */
- cpu->gpr[7] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005255Cu);
#endif
@@ -744202,7 +746098,8 @@ label_BFC3A568:
psx_cyc_step(cpu, 0x822u);
#endif
/* 0xBFC3A570: 0165082B sltu $at, $t3, $a1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0165082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052570u);
#endif
@@ -744249,7 +746146,8 @@ label_BFC3A57C:
psx_cyc_step(cpu, 0x820u);
#endif
/* 0xBFC3A57C: 3165FFFF andi $a1, $t3, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[5] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x3165FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005257Cu);
#endif
@@ -744260,7 +746158,8 @@ label_BFC3A57C:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC3A580: 310700FF andi $a3, $t0, 0xFF */
- cpu->gpr[7] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052580u);
#endif
@@ -744293,7 +746192,8 @@ label_BFC3A584:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC3A58C: 310800FF andi $t0, $t0, 0xFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310800FFu, cpu->gpr[8], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005258Cu);
#endif
@@ -744304,7 +746204,8 @@ label_BFC3A584:
psx_cyc_step(cpu, 0x302u);
#endif
/* 0xBFC3A590: 0109082B sltu $at, $t0, $t1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0109082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052590u);
#endif
@@ -744539,7 +746440,8 @@ label_BFC3A5C4:
psx_cyc_step(cpu, 0x280u);
#endif
/* 0xBFC3A5C4: 312700FF andi $a3, $t1, 0xFF */
- cpu->gpr[7] = cpu->gpr[9] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[7] = cpu->gpr[9] & 0xFFu;
+ PGXP_ALU(0x312700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800525C4u);
#endif
@@ -744650,7 +746552,8 @@ label_BFC3A5D4:
psx_cyc_step(cpu, 0xA002u);
#endif
/* 0xBFC3A5E8: 01AF082A slt $at, $t5, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x01AF082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800525E8u);
#endif
@@ -744714,7 +746617,8 @@ label_BFC3A5F4:
psx_cyc_step(cpu, 0x26u);
#endif
/* 0xBFC3A5FC: 00A2082B sltu $at, $a1, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x00A2082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800525FCu);
#endif
@@ -744764,7 +746668,8 @@ label_BFC3A608:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC3A608: 3045FFFF andi $a1, $v0, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052608u);
#endif
@@ -744772,7 +746677,8 @@ label_BFC3A608:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC3A60C: 310700FF andi $a3, $t0, 0xFF */
- cpu->gpr[7] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310700FFu, cpu->gpr[7], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005260Cu);
#endif
@@ -744799,7 +746705,8 @@ label_BFC3A610:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC3A614: 310800FF andi $t0, $t0, 0xFF */
- cpu->gpr[8] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310800FFu, cpu->gpr[8], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052614u);
#endif
@@ -744807,7 +746714,8 @@ label_BFC3A610:
psx_cyc_step(cpu, 0x302u);
#endif
/* 0xBFC3A618: 0109082B sltu $at, $t0, $t1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0109082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052618u);
#endif
@@ -745177,7 +747085,8 @@ label_BFC3A638:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3A68C: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005268Cu);
#endif
@@ -745498,7 +747407,8 @@ label_BFC3A638:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC3A704: 2D010040 sltiu $at, $t0, 64 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2D010040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80052704u);
#endif
@@ -745771,7 +747681,8 @@ label_BFC3A74C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3A758: 2C410040 sltiu $at, $v0, 64 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80052758u);
#endif
@@ -745996,7 +747907,8 @@ label_BFC3A78C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3A798: 2C410040 sltiu $at, $v0, 64 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0);
+ PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80052798u);
#endif
@@ -746229,7 +748141,8 @@ label_BFC3A7CC:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC3A7DC: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800527DCu);
#endif
@@ -746425,7 +748338,8 @@ label_BFC3A7F4:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC3A810: 30E7FFFF andi $a3, $a3, 0xFFFF */
- cpu->gpr[7] = cpu->gpr[7] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFFFu;
+ PGXP_ALU(0x30E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052810u);
#endif
@@ -746695,7 +748609,8 @@ label_BFC3A7F4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3A87C: 28410010 slti $at, $v0, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (16) ? 1 : 0);
+ PGXP_ALU(0x28410010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x8005287Cu);
#endif
@@ -746797,7 +748712,8 @@ label_BFC3A894:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC3A89C: 3063FFFF andi $v1, $v1, 0xFFFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ PGXP_ALU(0x3063FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005289Cu);
#endif
@@ -746887,7 +748803,8 @@ label_BFC3A8A8:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC3A8B8: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800528B8u);
#endif
@@ -746931,7 +748848,8 @@ label_BFC3A8BC:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC3A8C8: 318D0004 andi $t5, $t4, 0x4 */
- cpu->gpr[13] = cpu->gpr[12] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x4u;
+ PGXP_ALU(0x318D0004u, cpu->gpr[13], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x800528C8u);
#endif
@@ -747117,7 +749035,8 @@ label_BFC3A900:
psx_cyc_step(cpu, 0x809u);
#endif
/* 0xBFC3A908: 00605827 nor $t3, $v1, $zero */
- cpu->gpr[11] = ~(cpu->gpr[3] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = ~(cpu->gpr[3] | cpu->gpr[0]);
+ PGXP_ALU(0x00605827u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052908u);
#endif
@@ -747152,7 +749071,8 @@ label_BFC3A900:
psx_cyc_step(cpu, 0xE00u);
#endif
/* 0xBFC3A918: 012B5024 and $t2, $t1, $t3 */
- cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[11];
+ PGXP_ALU(0x012B5024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052918u);
#endif
@@ -747172,7 +749092,8 @@ label_BFC3A900:
psx_cyc_step(cpu, 0x2011u);
#endif
/* 0xBFC3A920: 00806827 nor $t5, $a0, $zero */
- cpu->gpr[13] = ~(cpu->gpr[4] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = ~(cpu->gpr[4] | cpu->gpr[0]);
+ PGXP_ALU(0x00806827u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052920u);
#endif
@@ -747189,7 +749110,8 @@ label_BFC3A900:
psx_cyc_step(cpu, 0x7000u);
#endif
/* 0xBFC3A928: 018D7024 and $t6, $t4, $t5 */
- cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052928u);
#endif
@@ -747380,7 +749302,8 @@ label_BFC3A95C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3A968: 2C410010 sltiu $at, $v0, 16 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000010u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000010u ? 1 : 0);
+ PGXP_ALU(0x2C410010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80052968u);
#endif
@@ -747449,7 +749372,8 @@ label_BFC3A974:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC3A97C: 3063FFFF andi $v1, $v1, 0xFFFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu;
+ PGXP_ALU(0x3063FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005297Cu);
#endif
@@ -747549,7 +749473,8 @@ label_BFC3A98C:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC3A998: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052998u);
#endif
@@ -748006,7 +749931,8 @@ label_BFC3AA24:
psx_cyc_step(cpu, 0x4020u);
#endif
/* 0xBFC3AA34: 30AEFFFF andi $t6, $a1, 0xFFFF */
- cpu->gpr[14] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30AEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052A34u);
#endif
@@ -748023,7 +749949,8 @@ label_BFC3AA24:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC3AA3C: 2DC10010 sltiu $at, $t6, 16 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000010u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000010u ? 1 : 0);
+ PGXP_ALU(0x2DC10010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80052A3Cu);
#endif
@@ -748034,7 +749961,8 @@ label_BFC3AA24:
psx_cyc_step(cpu, 0x30u);
#endif
/* 0xBFC3AA40: 30A4FFFF andi $a0, $a1, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A4FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052A40u);
#endif
@@ -748327,7 +750255,8 @@ label_BFC3AA9C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3AAA4: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052AA4u);
#endif
@@ -748416,7 +750345,8 @@ label_BFC3AAB0:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3AAB8: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052AB8u);
#endif
@@ -748707,7 +750637,8 @@ label_BFC3AAF4:
psx_cyc_step(cpu, 0x482u);
#endif
/* 0xBFC3AB14: 00EA082B sltu $at, $a3, $t2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x00EA082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052B14u);
#endif
@@ -748768,7 +750699,8 @@ label_BFC3AB20:
psx_cyc_step(cpu, 0x882u);
#endif
/* 0xBFC3AB28: 0167082B sltu $at, $t3, $a3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x0167082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052B28u);
#endif
@@ -748872,7 +750804,8 @@ label_BFC3AB34:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC3AB4C: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052B4Cu);
#endif
@@ -748917,7 +750850,8 @@ label_BFC3AB50:
psx_cyc_step(cpu, 0x46u);
#endif
/* 0xBFC3AB5C: 0046082A slt $at, $v0, $a2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x0046082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052B5Cu);
#endif
@@ -749135,7 +751069,8 @@ label_BFC3AB70:
psx_cyc_step(cpu, 0x2000010u);
#endif
/* 0xBFC3ABA0: 30990001 andi $t9, $a0, 0x1 */
- cpu->gpr[25] = cpu->gpr[4] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0x1u;
+ PGXP_ALU(0x30990001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80052BA0u);
#endif
@@ -750075,7 +752010,8 @@ label_BFC3ACD0:
psx_cyc_step(cpu, 0x8022u);
#endif
/* 0xBFC3ACDC: 00AF082A slt $at, $a1, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x00AF082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052CDCu);
#endif
@@ -750600,7 +752536,8 @@ label_BFC3AD68:
psx_cyc_step(cpu, 0x40080u);
#endif
/* 0xBFC3AD90: 30F2FFFF andi $s2, $a3, 0xFFFF */
- cpu->gpr[18] = cpu->gpr[7] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[18] = cpu->gpr[7] & 0xFFFFu;
+ PGXP_ALU(0x30F2FFFFu, cpu->gpr[18], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052D90u);
#endif
@@ -750991,7 +752928,8 @@ label_BFC3ADB0:
psx_cyc_step(cpu, 0x80802u);
#endif
/* 0xBFC3AE28: 026B082B sltu $at, $s3, $t3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < cpu->gpr[11] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < cpu->gpr[11] ? 1 : 0);
+ PGXP_ALU(0x026B082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052E28u);
#endif
@@ -751290,7 +753228,8 @@ label_BFC3AE74:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3AE74: 304C00FF andi $t4, $v0, 0xFF */
- cpu->gpr[12] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052E74u);
#endif
@@ -751298,7 +753237,8 @@ label_BFC3AE74:
psx_cyc_step(cpu, 0x40004u);
#endif
/* 0xBFC3AE78: 305200FF andi $s2, $v0, 0xFF */
- cpu->gpr[18] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[18] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x305200FFu, cpu->gpr[18], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052E78u);
#endif
@@ -751545,7 +753485,8 @@ label_BFC3AEB0:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC3AED8: 312AFFFF andi $t2, $t1, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052ED8u);
#endif
@@ -751849,7 +753790,8 @@ label_BFC3AF44:
psx_cyc_step(cpu, 0x1802u);
#endif
/* 0xBFC3AF5C: 016C082A slt $at, $t3, $t4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[12] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[12] ? 1 : 0);
+ PGXP_ALU(0x016C082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80052F5Cu);
#endif
@@ -752241,7 +754183,8 @@ label_BFC3AFE0:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC3AFE8: 3045FFFF andi $a1, $v0, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80052FE8u);
#endif
@@ -752341,7 +754284,8 @@ label_BFC3B004:
psx_cyc_step(cpu, 0x10000u);
#endif
/* 0xBFC3B008: 321000FF andi $s0, $s0, 0xFF */
- cpu->gpr[16] = cpu->gpr[16] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0xFFu;
+ PGXP_ALU(0x321000FFu, cpu->gpr[16], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80053008u);
#endif
@@ -752349,7 +754293,8 @@ label_BFC3B004:
psx_cyc_step(cpu, 0x50002u);
#endif
/* 0xBFC3B00C: 0212082B sltu $at, $s0, $s2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0212082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005300Cu);
#endif
@@ -752751,7 +754696,8 @@ label_BFC3B054:
psx_cyc_step(cpu, 0x100080u);
#endif
/* 0xBFC3B094: 30F4FFFF andi $s4, $a3, 0xFFFF */
- cpu->gpr[20] = cpu->gpr[7] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[20] = cpu->gpr[7] & 0xFFFFu;
+ PGXP_ALU(0x30F4FFFFu, cpu->gpr[20], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80053094u);
#endif
@@ -753176,7 +755122,8 @@ label_BFC3B110:
psx_cyc_step(cpu, 0x20000u);
#endif
/* 0xBFC3B114: 323100FF andi $s1, $s1, 0xFF */
- cpu->gpr[17] = cpu->gpr[17] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] & 0xFFu;
+ PGXP_ALU(0x323100FFu, cpu->gpr[17], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80053114u);
#endif
@@ -753203,7 +755150,8 @@ label_BFC3B118:
psx_cyc_step(cpu, 0x10000u);
#endif
/* 0xBFC3B11C: 321000FF andi $s0, $s0, 0xFF */
- cpu->gpr[16] = cpu->gpr[16] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0xFFu;
+ PGXP_ALU(0x321000FFu, cpu->gpr[16], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005311Cu);
#endif
@@ -753214,7 +755162,8 @@ label_BFC3B118:
psx_cyc_step(cpu, 0x50002u);
#endif
/* 0xBFC3B120: 0212082B sltu $at, $s0, $s2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0);
+ PGXP_ALU(0x0212082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80053120u);
#endif
@@ -753594,7 +755543,8 @@ label_BFC3B17C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3B1A4: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800531A4u);
#endif
@@ -753611,7 +755561,8 @@ label_BFC3B17C:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC3B1AC: 0043082B sltu $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800531ACu);
#endif
@@ -753722,7 +755673,8 @@ label_BFC3B1B8:
psx_cyc_step(cpu, 0x3001u);
#endif
/* 0xBFC3B1D4: 01806827 nor $t5, $t4, $zero */
- cpu->gpr[13] = ~(cpu->gpr[12] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = ~(cpu->gpr[12] | cpu->gpr[0]);
+ PGXP_ALU(0x01806827u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800531D4u);
#endif
@@ -753748,7 +755700,8 @@ label_BFC3B1B8:
psx_cyc_step(cpu, 0xA800u);
#endif
/* 0xBFC3B1E0: 016D7824 and $t7, $t3, $t5 */
- cpu->gpr[15] = cpu->gpr[11] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[11] & cpu->gpr[13];
+ PGXP_ALU(0x016D7824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800531E0u);
#endif
@@ -753774,7 +755727,8 @@ label_BFC3B1B8:
psx_cyc_step(cpu, 0x3000001u);
#endif
/* 0xBFC3B1EC: 0300C827 nor $t9, $t8, $zero */
- cpu->gpr[25] = ~(cpu->gpr[24] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[24] | cpu->gpr[0]);
+ PGXP_ALU(0x0300C827u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800531ECu);
#endif
@@ -753800,7 +755754,8 @@ label_BFC3B1B8:
psx_cyc_step(cpu, 0x2004200u);
#endif
/* 0xBFC3B1F8: 01D94824 and $t1, $t6, $t9 */
- cpu->gpr[9] = cpu->gpr[14] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[14] & cpu->gpr[25];
+ PGXP_ALU(0x01D94824u, cpu->gpr[9], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800531F8u);
#endif
@@ -753820,7 +755775,8 @@ label_BFC3B1B8:
psx_cyc_step(cpu, 0x8100u);
#endif
/* 0xBFC3B200: 31E8FFFF andi $t0, $t7, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[15] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[8] = cpu->gpr[15] & 0xFFFFu;
+ PGXP_ALU(0x31E8FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80053200u);
#endif
@@ -756201,7 +758157,8 @@ label_BFC3B530:
psx_cyc_step(cpu, 0x2000002u);
#endif
/* 0xBFC3B538: 2B210005 slti $at, $t9, 5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (5) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (5) ? 1 : 0);
+ PGXP_ALU(0x2B210005u, cpu->gpr[1], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0x80053538u);
#endif
@@ -756402,7 +758359,8 @@ label_BFC3B560:
psx_cyc_step(cpu, 0x16u);
#endif
/* 0xBFC3B570: 0082082B sltu $at, $a0, $v0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0082082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80053570u);
#endif
@@ -756937,7 +758895,8 @@ label_BFC3B614:
psx_cyc_step(cpu, 0x200000Au);
#endif
/* 0xBFC3B620: 0079082A slt $at, $v1, $t9 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0079082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80053620u);
#endif
@@ -757143,7 +759102,8 @@ label_BFC3B668:
psx_cyc_step(cpu, 0x10Au);
#endif
/* 0xBFC3B668: 0103082B sltu $at, $t0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0103082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80053668u);
#endif
@@ -757241,7 +759201,8 @@ label_BFC3B674:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC3B68C: 29C10005 slti $at, $t6, 5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (5) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (5) ? 1 : 0);
+ PGXP_ALU(0x29C10005u, cpu->gpr[1], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0x8005368Cu);
#endif
@@ -757833,7 +759794,8 @@ label_BFC3B738:
psx_cyc_step(cpu, 0x2002u);
#endif
/* 0xBFC3B744: 01A1082B sltu $at, $t5, $at */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[1] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[1] ? 1 : 0);
+ PGXP_ALU(0x01A1082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80053744u);
#endif
@@ -758137,7 +760099,8 @@ label_BFC3B798:
psx_cyc_step(cpu, 0x2008u);
#endif
/* 0xBFC3B7A8: 306D0001 andi $t5, $v1, 0x1 */
- cpu->gpr[13] = cpu->gpr[3] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] & 0x1u;
+ PGXP_ALU(0x306D0001u, cpu->gpr[13], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800537A8u);
#endif
@@ -758590,7 +760553,8 @@ label_BFC3B81C:
psx_cyc_step(cpu, 0x10Au);
#endif
/* 0xBFC3B820: 0103082B sltu $at, $t0, $v1 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0103082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80053820u);
#endif
@@ -758860,7 +760824,8 @@ label_BFC3B85C:
psx_cyc_step(cpu, 0x10002u);
#endif
/* 0xBFC3B86C: 2A010002 slti $at, $s0, 2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (2) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (2) ? 1 : 0);
+ PGXP_ALU(0x2A010002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x8005386Cu);
#endif
@@ -759851,7 +761816,8 @@ label_BFC3B964:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3B998: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80053998u);
#endif
@@ -759898,7 +761864,8 @@ label_BFC3B964:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3B9AC: 28410010 slti $at, $v0, 16 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (16) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (16) ? 1 : 0);
+ PGXP_ALU(0x28410010u, cpu->gpr[1], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x800539ACu);
#endif
@@ -759909,7 +761876,8 @@ label_BFC3B964:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC3B9B0: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800539B0u);
#endif
@@ -760358,7 +762326,8 @@ label_BFC3BA4C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3BA54: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80053A54u);
#endif
@@ -760447,7 +762416,8 @@ label_BFC3BA60:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3BA68: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80053A68u);
#endif
@@ -760963,7 +762933,8 @@ label_BFC3BAF0:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC3BAF0: 0062082A slt $at, $v1, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x0062082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80053AF0u);
#endif
@@ -762778,7 +764749,8 @@ label_BFC3BDCC:
psx_cyc_step(cpu, 0xAu);
#endif
/* 0xBFC3BDCC: 2861000A slti $at, $v1, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (10) ? 1 : 0);
+ PGXP_ALU(0x2861000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x80053DCCu);
#endif
@@ -765688,7 +767660,8 @@ label_BFC3C140:
psx_cyc_step(cpu, 0x4002u);
#endif
/* 0xBFC3C150: 29C100F0 slti $at, $t6, 240 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (240) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (240) ? 1 : 0);
+ PGXP_ALU(0x29C100F0u, cpu->gpr[1], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80054150u);
#endif
@@ -765838,7 +767811,8 @@ label_BFC3C160:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC3C188: 292100F0 slti $at, $t1, 240 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (240) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (240) ? 1 : 0);
+ PGXP_ALU(0x292100F0u, cpu->gpr[1], _pgx1, 0x00F0u); }
#ifdef PSX_COSIM
cosim_instr(0x80054188u);
#endif
@@ -766197,7 +768171,8 @@ label_BFC3C1EC:
psx_cyc_step(cpu, 0x2000400u);
#endif
/* 0xBFC3C1F4: 332A07FF andi $t2, $t9, 0x7FF */
- cpu->gpr[10] = cpu->gpr[25] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[10] = cpu->gpr[25] & 0x7FFu;
+ PGXP_ALU(0x332A07FFu, cpu->gpr[10], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800541F4u);
#endif
@@ -766294,7 +768269,8 @@ label_BFC3C208:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3C20C: 28411389 slti $at, $v0, 5001 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (5001) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (5001) ? 1 : 0);
+ PGXP_ALU(0x28411389u, cpu->gpr[1], _pgx1, 0x1389u); }
#ifdef PSX_COSIM
cosim_instr(0x8005420Cu);
#endif
@@ -766487,7 +768463,8 @@ label_BFC3C240:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC3C248: 316C07FF andi $t4, $t3, 0x7FF */
- cpu->gpr[12] = cpu->gpr[11] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x7FFu;
+ PGXP_ALU(0x316C07FFu, cpu->gpr[12], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054248u);
#endif
@@ -767974,7 +769951,8 @@ label_BFC3C428:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC3C448: 30C607FF andi $a2, $a2, 0x7FF */
- cpu->gpr[6] = cpu->gpr[6] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x7FFu;
+ PGXP_ALU(0x30C607FFu, cpu->gpr[6], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054448u);
#endif
@@ -767982,7 +769960,8 @@ label_BFC3C428:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C44C: 3042FFCF andi $v0, $v0, 0xFFCF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu;
+ PGXP_ALU(0x3042FFCFu, cpu->gpr[2], _pgx1, 0xFFCFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005444Cu);
#endif
@@ -767993,7 +769972,8 @@ label_BFC3C428:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C450: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054450u);
#endif
@@ -768016,7 +769996,8 @@ label_BFC3C428:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC3C45C: 30C6FFFF andi $a2, $a2, 0xFFFF */
- cpu->gpr[6] = cpu->gpr[6] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFFFFu;
+ PGXP_ALU(0x30C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005445Cu);
#endif
@@ -768027,7 +770008,8 @@ label_BFC3C428:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3C460: 31CF07FF andi $t7, $t6, 0x7FF */
- cpu->gpr[15] = cpu->gpr[14] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x7FFu;
+ PGXP_ALU(0x31CF07FFu, cpu->gpr[15], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054460u);
#endif
@@ -768136,7 +770118,8 @@ label_BFC3C478:
psx_cyc_step(cpu, 0x82u);
#endif
/* 0xBFC3C47C: 28E11389 slti $at, $a3, 5001 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (5001) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (5001) ? 1 : 0);
+ PGXP_ALU(0x28E11389u, cpu->gpr[1], _pgx1, 0x1389u); }
#ifdef PSX_COSIM
cosim_instr(0x8005447Cu);
#endif
@@ -768314,7 +770297,8 @@ label_BFC3C4A8:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3C4B0: 331907FF andi $t9, $t8, 0x7FF */
- cpu->gpr[25] = cpu->gpr[24] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x7FFu;
+ PGXP_ALU(0x331907FFu, cpu->gpr[25], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800544B0u);
#endif
@@ -768684,7 +770668,8 @@ label_BFC3C4E0:
psx_cyc_step(cpu, 0x200000u);
#endif
/* 0xBFC3C510: 32B507FF andi $s5, $s5, 0x7FF */
- cpu->gpr[21] = cpu->gpr[21] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[21] & 0x7FFu;
+ PGXP_ALU(0x32B507FFu, cpu->gpr[21], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054510u);
#endif
@@ -768701,7 +770686,8 @@ label_BFC3C4E0:
psx_cyc_step(cpu, 0x200000u);
#endif
/* 0xBFC3C518: 32B5FFFF andi $s5, $s5, 0xFFFF */
- cpu->gpr[21] = cpu->gpr[21] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[21] & 0xFFFFu;
+ PGXP_ALU(0x32B5FFFFu, cpu->gpr[21], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054518u);
#endif
@@ -768773,7 +770759,8 @@ label_BFC3C528:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC3C530: 31F807FF andi $t8, $t7, 0x7FF */
- cpu->gpr[24] = cpu->gpr[15] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x7FFu;
+ PGXP_ALU(0x31F807FFu, cpu->gpr[24], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054530u);
#endif
@@ -768839,7 +770826,8 @@ label_BFC3C540:
psx_cyc_step(cpu, 0x40002u);
#endif
/* 0xBFC3C540: 2A411389 slti $at, $s2, 5001 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (5001) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (5001) ? 1 : 0);
+ PGXP_ALU(0x2A411389u, cpu->gpr[1], _pgx1, 0x1389u); }
#ifdef PSX_COSIM
cosim_instr(0x80054540u);
#endif
@@ -769035,7 +771023,8 @@ label_BFC3C574:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC3C57C: 332807FF andi $t0, $t9, 0x7FF */
- cpu->gpr[8] = cpu->gpr[25] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x7FFu;
+ PGXP_ALU(0x332807FFu, cpu->gpr[8], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005457Cu);
#endif
@@ -769156,7 +771145,8 @@ label_BFC3C594:
psx_cyc_step(cpu, 0x100002u);
#endif
/* 0xBFC3C598: 2E810041 sltiu $at, $s4, 65 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[20] < 0x00000041u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[20] < 0x00000041u ? 1 : 0);
+ PGXP_ALU(0x2E810041u, cpu->gpr[1], _pgx1, 0x0041u); }
#ifdef PSX_COSIM
cosim_instr(0x80054598u);
#endif
@@ -769333,7 +771323,8 @@ label_BFC3C5B8:
psx_cyc_step(cpu, 0x8000Au);
#endif
/* 0xBFC3C5C0: 0073082A slt $at, $v1, $s3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[19] ? 1 : 0);
+ PGXP_ALU(0x0073082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800545C0u);
#endif
@@ -769404,7 +771395,8 @@ label_BFC3C5D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C5D8: 3042FFCF andi $v0, $v0, 0xFFCF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu;
+ PGXP_ALU(0x3042FFCFu, cpu->gpr[2], _pgx1, 0xFFCFu); }
#ifdef PSX_COSIM
cosim_instr(0x800545D8u);
#endif
@@ -769412,7 +771404,8 @@ label_BFC3C5D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C5DC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800545DCu);
#endif
@@ -769432,7 +771425,8 @@ label_BFC3C5D0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C5E4: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800545E4u);
#endif
@@ -769488,7 +771482,8 @@ label_BFC3C5F0:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC3C5F8: 312A0400 andi $t2, $t1, 0x400 */
- cpu->gpr[10] = cpu->gpr[9] & 0x400u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x400u;
+ PGXP_ALU(0x312A0400u, cpu->gpr[10], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x800545F8u);
#endif
@@ -769557,7 +771552,8 @@ label_BFC3C608:
psx_cyc_step(cpu, 0x40002u);
#endif
/* 0xBFC3C608: 2A411389 slti $at, $s2, 5001 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (5001) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (5001) ? 1 : 0);
+ PGXP_ALU(0x2A411389u, cpu->gpr[1], _pgx1, 0x1389u); }
#ifdef PSX_COSIM
cosim_instr(0x80054608u);
#endif
@@ -769756,7 +771752,8 @@ label_BFC3C63C:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC3C644: 316C0400 andi $t4, $t3, 0x400 */
- cpu->gpr[12] = cpu->gpr[11] & 0x400u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x400u;
+ PGXP_ALU(0x316C0400u, cpu->gpr[12], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x80054644u);
#endif
@@ -769908,7 +771905,8 @@ label_BFC3C664:
psx_cyc_step(cpu, 0x100002u);
#endif
/* 0xBFC3C66C: 2E810041 sltiu $at, $s4, 65 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[20] < 0x00000041u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[20] < 0x00000041u ? 1 : 0);
+ PGXP_ALU(0x2E810041u, cpu->gpr[1], _pgx1, 0x0041u); }
#ifdef PSX_COSIM
cosim_instr(0x8005466Cu);
#endif
@@ -769981,7 +771979,8 @@ label_BFC3C678:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C680: 3042FFCF andi $v0, $v0, 0xFFCF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu;
+ PGXP_ALU(0x3042FFCFu, cpu->gpr[2], _pgx1, 0xFFCFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054680u);
#endif
@@ -769989,7 +771988,8 @@ label_BFC3C678:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C684: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054684u);
#endif
@@ -770023,7 +772023,8 @@ label_BFC3C678:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC3C694: 31AE07FF andi $t6, $t5, 0x7FF */
- cpu->gpr[14] = cpu->gpr[13] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x7FFu;
+ PGXP_ALU(0x31AE07FFu, cpu->gpr[14], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054694u);
#endif
@@ -770120,7 +772121,8 @@ label_BFC3C6A8:
psx_cyc_step(cpu, 0x40002u);
#endif
/* 0xBFC3C6AC: 2A411389 slti $at, $s2, 5001 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (5001) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (5001) ? 1 : 0);
+ PGXP_ALU(0x2A411389u, cpu->gpr[1], _pgx1, 0x1389u); }
#ifdef PSX_COSIM
cosim_instr(0x800546ACu);
#endif
@@ -770298,7 +772300,8 @@ label_BFC3C6D8:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC3C6E0: 31F807FF andi $t8, $t7, 0x7FF */
- cpu->gpr[24] = cpu->gpr[15] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x7FFu;
+ PGXP_ALU(0x31F807FFu, cpu->gpr[24], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800546E0u);
#endif
@@ -770929,7 +772932,8 @@ label_BFC3C710:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC3C72C: 30E707FF andi $a3, $a3, 0x7FF */
- cpu->gpr[7] = cpu->gpr[7] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7FFu;
+ PGXP_ALU(0x30E707FFu, cpu->gpr[7], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005472Cu);
#endif
@@ -770940,7 +772944,8 @@ label_BFC3C710:
psx_cyc_step(cpu, 0x100u);
#endif
/* 0xBFC3C730: 3108000E andi $t0, $t0, 0xE */
- cpu->gpr[8] = cpu->gpr[8] & 0xEu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xEu;
+ PGXP_ALU(0x3108000Eu, cpu->gpr[8], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0x80054730u);
#endif
@@ -770948,7 +772953,8 @@ label_BFC3C710:
psx_cyc_step(cpu, 0x80u);
#endif
/* 0xBFC3C734: 30E7FFFF andi $a3, $a3, 0xFFFF */
- cpu->gpr[7] = cpu->gpr[7] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFFFu;
+ PGXP_ALU(0x30E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054734u);
#endif
@@ -771188,7 +773194,8 @@ label_BFC3C76C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3C774: 3319BFFF andi $t9, $t8, 0xBFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xBFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xBFFFu;
+ PGXP_ALU(0x3319BFFFu, cpu->gpr[25], _pgx1, 0xBFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054774u);
#endif
@@ -771250,7 +773257,8 @@ label_BFC3C780:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC3C788: 312A4000 andi $t2, $t1, 0x4000 */
- cpu->gpr[10] = cpu->gpr[9] & 0x4000u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x4000u;
+ PGXP_ALU(0x312A4000u, cpu->gpr[10], _pgx1, 0x4000u); }
#ifdef PSX_COSIM
cosim_instr(0x80054788u);
#endif
@@ -771453,7 +773461,8 @@ label_BFC3C7B0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C7B8: 3042FFBF andi $v0, $v0, 0xFFBF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFBFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFBFu;
+ PGXP_ALU(0x3042FFBFu, cpu->gpr[2], _pgx1, 0xFFBFu); }
#ifdef PSX_COSIM
cosim_instr(0x800547B8u);
#endif
@@ -771461,7 +773470,8 @@ label_BFC3C7B0:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C7BC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800547BCu);
#endif
@@ -771538,7 +773548,8 @@ label_BFC3C7C8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C7D4: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800547D4u);
#endif
@@ -771600,7 +773611,8 @@ label_BFC3C7E0:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC3C7E8: 318D0040 andi $t5, $t4, 0x40 */
- cpu->gpr[13] = cpu->gpr[12] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x40u;
+ PGXP_ALU(0x318D0040u, cpu->gpr[13], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x800547E8u);
#endif
@@ -771757,7 +773769,8 @@ label_BFC3C808:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3C810: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054810u);
#endif
@@ -771765,7 +773778,8 @@ label_BFC3C808:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3C814: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054814u);
#endif
@@ -771927,7 +773941,8 @@ label_BFC3C83C:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC3C850: 31F807FF andi $t8, $t7, 0x7FF */
- cpu->gpr[24] = cpu->gpr[15] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x7FFu;
+ PGXP_ALU(0x31F807FFu, cpu->gpr[24], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054850u);
#endif
@@ -772027,7 +774042,8 @@ label_BFC3C864:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3C868: 28411389 slti $at, $v0, 5001 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (5001) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (5001) ? 1 : 0);
+ PGXP_ALU(0x28411389u, cpu->gpr[1], _pgx1, 0x1389u); }
#ifdef PSX_COSIM
cosim_instr(0x80054868u);
#endif
@@ -772205,7 +774221,8 @@ label_BFC3C894:
psx_cyc_step(cpu, 0x2000200u);
#endif
/* 0xBFC3C89C: 332907FF andi $t1, $t9, 0x7FF */
- cpu->gpr[9] = cpu->gpr[25] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0x7FFu;
+ PGXP_ALU(0x332907FFu, cpu->gpr[9], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005489Cu);
#endif
@@ -772612,7 +774629,8 @@ label_BFC3C8F8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3C8FC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800548FCu);
#endif
@@ -772623,7 +774641,8 @@ label_BFC3C8F8:
psx_cyc_step(cpu, 0x24u);
#endif
/* 0xBFC3C900: 3045FFFF andi $a1, $v0, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054900u);
#endif
@@ -772848,7 +774867,8 @@ label_BFC3C940:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC3C954: 318D07FF andi $t5, $t4, 0x7FF */
- cpu->gpr[13] = cpu->gpr[12] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x7FFu;
+ PGXP_ALU(0x318D07FFu, cpu->gpr[13], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054954u);
#endif
@@ -772945,7 +774965,8 @@ label_BFC3C968:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3C96C: 28411389 slti $at, $v0, 5001 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (5001) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (5001) ? 1 : 0);
+ PGXP_ALU(0x28411389u, cpu->gpr[1], _pgx1, 0x1389u); }
#ifdef PSX_COSIM
cosim_instr(0x8005496Cu);
#endif
@@ -773123,7 +775144,8 @@ label_BFC3C998:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3C9A0: 31CF07FF andi $t7, $t6, 0x7FF */
- cpu->gpr[15] = cpu->gpr[14] & 0x7FFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x7FFu;
+ PGXP_ALU(0x31CF07FFu, cpu->gpr[15], _pgx1, 0x07FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800549A0u);
#endif
@@ -773530,7 +775552,8 @@ label_BFC3C9FC:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3CA00: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054A00u);
#endif
@@ -773538,7 +775561,8 @@ label_BFC3C9FC:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC3CA04: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054A04u);
#endif
@@ -773865,7 +775889,8 @@ label_BFC3CA5C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CA64: 3042FFCF andi $v0, $v0, 0xFFCF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu;
+ PGXP_ALU(0x3042FFCFu, cpu->gpr[2], _pgx1, 0xFFCFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054A64u);
#endif
@@ -773873,7 +775898,8 @@ label_BFC3CA5C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CA68: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054A68u);
#endif
@@ -773970,7 +775996,8 @@ label_BFC3CA7C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CA84: 3042000E andi $v0, $v0, 0xE */
- cpu->gpr[2] = cpu->gpr[2] & 0xEu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xEu;
+ PGXP_ALU(0x3042000Eu, cpu->gpr[2], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0x80054A84u);
#endif
@@ -773987,7 +776014,8 @@ label_BFC3CA7C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CA8C: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054A8Cu);
#endif
@@ -774053,7 +776081,8 @@ label_BFC3CA98:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CAA0: 30420001 andi $v0, $v0, 0x1 */
- cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80054AA0u);
#endif
@@ -774061,7 +776090,8 @@ label_BFC3CA98:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CAA4: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054AA4u);
#endif
@@ -774135,7 +776165,8 @@ label_BFC3CAB4:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC3CABC: 31F8000E andi $t8, $t7, 0xE */
- cpu->gpr[24] = cpu->gpr[15] & 0xEu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xEu;
+ PGXP_ALU(0x31F8000Eu, cpu->gpr[24], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0x80054ABCu);
#endif
@@ -774210,7 +776241,8 @@ label_BFC3CACC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CAD4: 3042FF7F andi $v0, $v0, 0xFF7F */
- cpu->gpr[2] = cpu->gpr[2] & 0xFF7Fu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFF7Fu;
+ PGXP_ALU(0x3042FF7Fu, cpu->gpr[2], _pgx1, 0xFF7Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80054AD4u);
#endif
@@ -774218,7 +776250,8 @@ label_BFC3CACC:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC3CAD8: 312A0001 andi $t2, $t1, 0x1 */
- cpu->gpr[10] = cpu->gpr[9] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x1u;
+ PGXP_ALU(0x312A0001u, cpu->gpr[10], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80054AD8u);
#endif
@@ -774226,7 +776259,8 @@ label_BFC3CACC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CADC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054ADCu);
#endif
@@ -774255,7 +776289,8 @@ label_BFC3CACC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CAE8: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054AE8u);
#endif
@@ -774320,7 +776355,8 @@ label_BFC3CAF4:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3CAFC: 304C0080 andi $t4, $v0, 0x80 */
- cpu->gpr[12] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x304C0080u, cpu->gpr[12], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80054AFCu);
#endif
@@ -774479,7 +776515,8 @@ label_BFC3CB1C:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3CB24: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054B24u);
#endif
@@ -774843,7 +776880,8 @@ label_BFC3CB78:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC3CB7C: 312AFFFF andi $t2, $t1, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054B7Cu);
#endif
@@ -774911,7 +776949,8 @@ label_BFC3CB88:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC3CB90: 316CFFFF andi $t4, $t3, 0xFFFF */
- cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054B90u);
#endif
@@ -774977,7 +777016,8 @@ label_BFC3CB9C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CBA4: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054BA4u);
#endif
@@ -774985,7 +777025,8 @@ label_BFC3CB9C:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CBA8: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054BA8u);
#endif
@@ -775131,7 +777172,8 @@ label_BFC3CBC8:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC3CBD0: 31F8FFFF andi $t8, $t7, 0xFFFF */
- cpu->gpr[24] = cpu->gpr[15] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFFFu;
+ PGXP_ALU(0x31F8FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054BD0u);
#endif
@@ -775139,7 +777181,8 @@ label_BFC3CBC8:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3CBD4: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054BD4u);
#endif
@@ -775156,7 +777199,8 @@ label_BFC3CBC8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CBDC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054BDCu);
#endif
@@ -775200,7 +777244,8 @@ label_BFC3CBC8:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC3CBF0: 314B00FF andi $t3, $t2, 0xFF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFu;
+ PGXP_ALU(0x314B00FFu, cpu->gpr[11], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054BF0u);
#endif
@@ -775208,7 +777253,8 @@ label_BFC3CBC8:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC3CBF4: 316CFFFF andi $t4, $t3, 0xFFFF */
- cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu;
+ PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054BF4u);
#endif
@@ -775225,7 +777271,8 @@ label_BFC3CBC8:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CBFC: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054BFCu);
#endif
@@ -775291,7 +777338,8 @@ label_BFC3CC08:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC3CC10: 31AE00FF andi $t6, $t5, 0xFF */
- cpu->gpr[14] = cpu->gpr[13] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFu;
+ PGXP_ALU(0x31AE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054C10u);
#endif
@@ -775308,7 +777356,8 @@ label_BFC3CC08:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3CC18: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054C18u);
#endif
@@ -775383,7 +777432,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC3CC30: 314BFFFF andi $t3, $t2, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054C30u);
#endif
@@ -775391,7 +777441,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0x1801u);
#endif
/* 0xBFC3CC34: 01606027 nor $t4, $t3, $zero */
- cpu->gpr[12] = ~(cpu->gpr[11] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[12] = ~(cpu->gpr[11] | cpu->gpr[0]);
+ PGXP_ALU(0x01606027u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80054C34u);
#endif
@@ -775399,7 +777450,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC3CC38: 318DFFFF andi $t5, $t4, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[12] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFFFu;
+ PGXP_ALU(0x318DFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054C38u);
#endif
@@ -775407,7 +777459,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0x2004u);
#endif
/* 0xBFC3CC3C: 004D1024 and $v0, $v0, $t5 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[13];
+ PGXP_ALU(0x004D1024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80054C3Cu);
#endif
@@ -775418,7 +777471,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CC40: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054C40u);
#endif
@@ -775459,7 +777513,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC3CC54: 330F00FF andi $t7, $t8, 0xFF */
- cpu->gpr[15] = cpu->gpr[24] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = cpu->gpr[24] & 0xFFu;
+ PGXP_ALU(0x330F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054C54u);
#endif
@@ -775467,7 +777522,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0x2008001u);
#endif
/* 0xBFC3CC58: 01E0C827 nor $t9, $t7, $zero */
- cpu->gpr[25] = ~(cpu->gpr[15] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[15] | cpu->gpr[0]);
+ PGXP_ALU(0x01E0C827u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80054C58u);
#endif
@@ -775475,7 +777531,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0x2000200u);
#endif
/* 0xBFC3CC5C: 3329FFFF andi $t1, $t9, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[25] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0xFFFFu;
+ PGXP_ALU(0x3329FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054C5Cu);
#endif
@@ -775486,7 +777543,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0x204u);
#endif
/* 0xBFC3CC60: 00491024 and $v0, $v0, $t1 */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[9];
+ PGXP_ALU(0x00491024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80054C60u);
#endif
@@ -775494,7 +777552,8 @@ label_BFC3CC28:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC3CC64: 3042FFFF andi $v0, $v0, 0xFFFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80054C64u);
#endif
@@ -775700,7 +777759,8 @@ label_BFC3CC90:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CC98: 2CA1002E sltiu $at, $a1, 46 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000002Eu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000002Eu ? 1 : 0);
+ PGXP_ALU(0x2CA1002Eu, cpu->gpr[1], _pgx1, 0x002Eu); }
#ifdef PSX_COSIM
cosim_instr(0x80054C98u);
#endif
@@ -775782,7 +777842,8 @@ label_BFC3CCA4:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CCA8: 2CA10023 sltiu $at, $a1, 35 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000023u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000023u ? 1 : 0);
+ PGXP_ALU(0x2CA10023u, cpu->gpr[1], _pgx1, 0x0023u); }
#ifdef PSX_COSIM
cosim_instr(0x80054CA8u);
#endif
@@ -775864,7 +777925,8 @@ label_BFC3CCB4:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CCB8: 2CA10011 sltiu $at, $a1, 17 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000011u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000011u ? 1 : 0);
+ PGXP_ALU(0x2CA10011u, cpu->gpr[1], _pgx1, 0x0011u); }
#ifdef PSX_COSIM
cosim_instr(0x80054CB8u);
#endif
@@ -775946,7 +778008,8 @@ label_BFC3CCC4:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CCC8: 2CA10002 sltiu $at, $a1, 2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000002u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000002u ? 1 : 0);
+ PGXP_ALU(0x2CA10002u, cpu->gpr[1], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80054CC8u);
#endif
@@ -776259,7 +778322,8 @@ label_BFC3CD04:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CD0C: 2CA10021 sltiu $at, $a1, 33 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000021u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000021u ? 1 : 0);
+ PGXP_ALU(0x2CA10021u, cpu->gpr[1], _pgx1, 0x0021u); }
#ifdef PSX_COSIM
cosim_instr(0x80054D0Cu);
#endif
@@ -776518,7 +778582,8 @@ label_BFC3CD3C:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CD44: 2CA1002A sltiu $at, $a1, 42 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000002Au ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000002Au ? 1 : 0);
+ PGXP_ALU(0x2CA1002Au, cpu->gpr[1], _pgx1, 0x002Au); }
#ifdef PSX_COSIM
cosim_instr(0x80054D44u);
#endif
@@ -776597,7 +778662,8 @@ label_BFC3CD50:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CD54: 2CA10026 sltiu $at, $a1, 38 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000026u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000026u ? 1 : 0);
+ PGXP_ALU(0x2CA10026u, cpu->gpr[1], _pgx1, 0x0026u); }
#ifdef PSX_COSIM
cosim_instr(0x80054D54u);
#endif
@@ -776853,7 +778919,8 @@ label_BFC3CD84:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CD8C: 2CA1002C sltiu $at, $a1, 44 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000002Cu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000002Cu ? 1 : 0);
+ PGXP_ALU(0x2CA1002Cu, cpu->gpr[1], _pgx1, 0x002Cu); }
#ifdef PSX_COSIM
cosim_instr(0x80054D8Cu);
#endif
@@ -777112,7 +779179,8 @@ label_BFC3CDBC:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CDC4: 2CA10067 sltiu $at, $a1, 103 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000067u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000067u ? 1 : 0);
+ PGXP_ALU(0x2CA10067u, cpu->gpr[1], _pgx1, 0x0067u); }
#ifdef PSX_COSIM
cosim_instr(0x80054DC4u);
#endif
@@ -777191,7 +779259,8 @@ label_BFC3CDD0:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CDD4: 2CA10062 sltiu $at, $a1, 98 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000062u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000062u ? 1 : 0);
+ PGXP_ALU(0x2CA10062u, cpu->gpr[1], _pgx1, 0x0062u); }
#ifdef PSX_COSIM
cosim_instr(0x80054DD4u);
#endif
@@ -777270,7 +779339,8 @@ label_BFC3CDE0:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CDE4: 2CA10030 sltiu $at, $a1, 48 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0);
+ PGXP_ALU(0x2CA10030u, cpu->gpr[1], _pgx1, 0x0030u); }
#ifdef PSX_COSIM
cosim_instr(0x80054DE4u);
#endif
@@ -777526,7 +779596,8 @@ label_BFC3CE14:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CE1C: 2CA10064 sltiu $at, $a1, 100 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000064u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000064u ? 1 : 0);
+ PGXP_ALU(0x2CA10064u, cpu->gpr[1], _pgx1, 0x0064u); }
#ifdef PSX_COSIM
cosim_instr(0x80054E1Cu);
#endif
@@ -777785,7 +779856,8 @@ label_BFC3CE4C:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CE54: 2CA1006B sltiu $at, $a1, 107 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000006Bu ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000006Bu ? 1 : 0);
+ PGXP_ALU(0x2CA1006Bu, cpu->gpr[1], _pgx1, 0x006Bu); }
#ifdef PSX_COSIM
cosim_instr(0x80054E54u);
#endif
@@ -777864,7 +779936,8 @@ label_BFC3CE60:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CE64: 2CA10069 sltiu $at, $a1, 105 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000069u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000069u ? 1 : 0);
+ PGXP_ALU(0x2CA10069u, cpu->gpr[1], _pgx1, 0x0069u); }
#ifdef PSX_COSIM
cosim_instr(0x80054E64u);
#endif
@@ -778120,7 +780193,8 @@ label_BFC3CE94:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3CE9C: 2CA10102 sltiu $at, $a1, 258 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000102u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000102u ? 1 : 0);
+ PGXP_ALU(0x2CA10102u, cpu->gpr[1], _pgx1, 0x0102u); }
#ifdef PSX_COSIM
cosim_instr(0x80054E9Cu);
#endif
@@ -778735,7 +780809,8 @@ label_BFC3CEEC:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC3CEEC: 304E0001 andi $t6, $v0, 0x1 */
- cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80054EECu);
#endif
@@ -778935,7 +781010,8 @@ label_BFC3CF24:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC3CF24: 30580002 andi $t8, $v0, 0x2 */
- cpu->gpr[24] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30580002u, cpu->gpr[24], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80054F24u);
#endif
@@ -779057,7 +781133,8 @@ label_BFC3CF44:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC3CF44: 30480004 andi $t0, $v0, 0x4 */
- cpu->gpr[8] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30480004u, cpu->gpr[8], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80054F44u);
#endif
@@ -779179,7 +781256,8 @@ label_BFC3CF64:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC3CF64: 304A0008 andi $t2, $v0, 0x8 */
- cpu->gpr[10] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304A0008u, cpu->gpr[10], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80054F64u);
#endif
@@ -779301,7 +781379,8 @@ label_BFC3CF84:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3CF84: 304C0010 andi $t4, $v0, 0x10 */
- cpu->gpr[12] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304C0010u, cpu->gpr[12], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80054F84u);
#endif
@@ -779423,7 +781502,8 @@ label_BFC3CFA4:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC3CFA4: 304E0020 andi $t6, $v0, 0x20 */
- cpu->gpr[14] = cpu->gpr[2] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x20u;
+ PGXP_ALU(0x304E0020u, cpu->gpr[14], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x80054FA4u);
#endif
@@ -779545,7 +781625,8 @@ label_BFC3CFC4:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC3CFC4: 30580040 andi $t8, $v0, 0x40 */
- cpu->gpr[24] = cpu->gpr[2] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x40u;
+ PGXP_ALU(0x30580040u, cpu->gpr[24], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80054FC4u);
#endif
@@ -779667,7 +781748,8 @@ label_BFC3CFE4:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC3CFE4: 30480080 andi $t0, $v0, 0x80 */
- cpu->gpr[8] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x30480080u, cpu->gpr[8], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x80054FE4u);
#endif
@@ -779789,7 +781871,8 @@ label_BFC3D004:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC3D004: 304A0100 andi $t2, $v0, 0x100 */
- cpu->gpr[10] = cpu->gpr[2] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x100u;
+ PGXP_ALU(0x304A0100u, cpu->gpr[10], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x80055004u);
#endif
@@ -779911,7 +781994,8 @@ label_BFC3D024:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3D024: 304C0200 andi $t4, $v0, 0x200 */
- cpu->gpr[12] = cpu->gpr[2] & 0x200u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x200u;
+ PGXP_ALU(0x304C0200u, cpu->gpr[12], _pgx1, 0x0200u); }
#ifdef PSX_COSIM
cosim_instr(0x80055024u);
#endif
@@ -780033,7 +782117,8 @@ label_BFC3D044:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC3D044: 304E0400 andi $t6, $v0, 0x400 */
- cpu->gpr[14] = cpu->gpr[2] & 0x400u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x400u;
+ PGXP_ALU(0x304E0400u, cpu->gpr[14], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x80055044u);
#endif
@@ -780155,7 +782240,8 @@ label_BFC3D064:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC3D064: 30580800 andi $t8, $v0, 0x800 */
- cpu->gpr[24] = cpu->gpr[2] & 0x800u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x800u;
+ PGXP_ALU(0x30580800u, cpu->gpr[24], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0x80055064u);
#endif
@@ -780277,7 +782363,8 @@ label_BFC3D084:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC3D084: 30481000 andi $t0, $v0, 0x1000 */
- cpu->gpr[8] = cpu->gpr[2] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1000u;
+ PGXP_ALU(0x30481000u, cpu->gpr[8], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80055084u);
#endif
@@ -780399,7 +782486,8 @@ label_BFC3D0A4:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC3D0A4: 304A2000 andi $t2, $v0, 0x2000 */
- cpu->gpr[10] = cpu->gpr[2] & 0x2000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x2000u;
+ PGXP_ALU(0x304A2000u, cpu->gpr[10], _pgx1, 0x2000u); }
#ifdef PSX_COSIM
cosim_instr(0x800550A4u);
#endif
@@ -780521,7 +782609,8 @@ label_BFC3D0C4:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3D0C4: 304C4000 andi $t4, $v0, 0x4000 */
- cpu->gpr[12] = cpu->gpr[2] & 0x4000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x4000u;
+ PGXP_ALU(0x304C4000u, cpu->gpr[12], _pgx1, 0x4000u); }
#ifdef PSX_COSIM
cosim_instr(0x800550C4u);
#endif
@@ -780643,7 +782732,8 @@ label_BFC3D0E4:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC3D0E4: 304E8000 andi $t6, $v0, 0x8000 */
- cpu->gpr[14] = cpu->gpr[2] & 0x8000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x8000u;
+ PGXP_ALU(0x304E8000u, cpu->gpr[14], _pgx1, 0x8000u); }
#ifdef PSX_COSIM
cosim_instr(0x800550E4u);
#endif
@@ -780766,7 +782856,8 @@ label_BFC3D104:
psx_cyc_step(cpu, 0x1000006u);
#endif
/* 0xBFC3D104: 0041C024 and $t8, $v0, $at */
- cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055104u);
#endif
@@ -780889,7 +782980,8 @@ label_BFC3D124:
psx_cyc_step(cpu, 0x106u);
#endif
/* 0xBFC3D124: 00414024 and $t0, $v0, $at */
- cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00414024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055124u);
#endif
@@ -781012,7 +783104,8 @@ label_BFC3D144:
psx_cyc_step(cpu, 0x406u);
#endif
/* 0xBFC3D144: 00415024 and $t2, $v0, $at */
- cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00415024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055144u);
#endif
@@ -781135,7 +783228,8 @@ label_BFC3D164:
psx_cyc_step(cpu, 0x1006u);
#endif
/* 0xBFC3D164: 00416024 and $t4, $v0, $at */
- cpu->gpr[12] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00416024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055164u);
#endif
@@ -781258,7 +783352,8 @@ label_BFC3D184:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC3D184: 00417024 and $t6, $v0, $at */
- cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00417024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055184u);
#endif
@@ -781381,7 +783476,8 @@ label_BFC3D1A4:
psx_cyc_step(cpu, 0x1000006u);
#endif
/* 0xBFC3D1A4: 0041C024 and $t8, $v0, $at */
- cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800551A4u);
#endif
@@ -781504,7 +783600,8 @@ label_BFC3D1C4:
psx_cyc_step(cpu, 0x106u);
#endif
/* 0xBFC3D1C4: 00414024 and $t0, $v0, $at */
- cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00414024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800551C4u);
#endif
@@ -781627,7 +783724,8 @@ label_BFC3D1E4:
psx_cyc_step(cpu, 0x406u);
#endif
/* 0xBFC3D1E4: 00415024 and $t2, $v0, $at */
- cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00415024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800551E4u);
#endif
@@ -781750,7 +783848,8 @@ label_BFC3D204:
psx_cyc_step(cpu, 0x1006u);
#endif
/* 0xBFC3D204: 00416024 and $t4, $v0, $at */
- cpu->gpr[12] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00416024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055204u);
#endif
@@ -781873,7 +783972,8 @@ label_BFC3D224:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC3D224: 00417024 and $t6, $v0, $at */
- cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00417024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055224u);
#endif
@@ -781996,7 +784096,8 @@ label_BFC3D244:
psx_cyc_step(cpu, 0x1000006u);
#endif
/* 0xBFC3D244: 0041C024 and $t8, $v0, $at */
- cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055244u);
#endif
@@ -782119,7 +784220,8 @@ label_BFC3D264:
psx_cyc_step(cpu, 0x106u);
#endif
/* 0xBFC3D264: 00414024 and $t0, $v0, $at */
- cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00414024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055264u);
#endif
@@ -782242,7 +784344,8 @@ label_BFC3D284:
psx_cyc_step(cpu, 0x406u);
#endif
/* 0xBFC3D284: 00415024 and $t2, $v0, $at */
- cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00415024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055284u);
#endif
@@ -782365,7 +784468,8 @@ label_BFC3D2A4:
psx_cyc_step(cpu, 0x1006u);
#endif
/* 0xBFC3D2A4: 00416024 and $t4, $v0, $at */
- cpu->gpr[12] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00416024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800552A4u);
#endif
@@ -782488,7 +784592,8 @@ label_BFC3D2C4:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC3D2C4: 00417024 and $t6, $v0, $at */
- cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00417024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800552C4u);
#endif
@@ -782611,7 +784716,8 @@ label_BFC3D2E4:
psx_cyc_step(cpu, 0x1000006u);
#endif
/* 0xBFC3D2E4: 0041C024 and $t8, $v0, $at */
- cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800552E4u);
#endif
@@ -783043,7 +785149,8 @@ label_BFC3D328:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC3D328: 304E0001 andi $t6, $v0, 0x1 */
- cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u;
+ PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80055328u);
#endif
@@ -783240,7 +785347,8 @@ label_BFC3D360:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC3D360: 30580002 andi $t8, $v0, 0x2 */
- cpu->gpr[24] = cpu->gpr[2] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x2u;
+ PGXP_ALU(0x30580002u, cpu->gpr[24], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80055360u);
#endif
@@ -783362,7 +785470,8 @@ label_BFC3D380:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC3D380: 30480004 andi $t0, $v0, 0x4 */
- cpu->gpr[8] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30480004u, cpu->gpr[8], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80055380u);
#endif
@@ -783484,7 +785593,8 @@ label_BFC3D3A0:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC3D3A0: 304A0008 andi $t2, $v0, 0x8 */
- cpu->gpr[10] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304A0008u, cpu->gpr[10], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x800553A0u);
#endif
@@ -783606,7 +785716,8 @@ label_BFC3D3C0:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3D3C0: 304C0010 andi $t4, $v0, 0x10 */
- cpu->gpr[12] = cpu->gpr[2] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x10u;
+ PGXP_ALU(0x304C0010u, cpu->gpr[12], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x800553C0u);
#endif
@@ -783728,7 +785839,8 @@ label_BFC3D3E0:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC3D3E0: 304E0020 andi $t6, $v0, 0x20 */
- cpu->gpr[14] = cpu->gpr[2] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x20u;
+ PGXP_ALU(0x304E0020u, cpu->gpr[14], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x800553E0u);
#endif
@@ -783850,7 +785962,8 @@ label_BFC3D400:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC3D400: 30580100 andi $t8, $v0, 0x100 */
- cpu->gpr[24] = cpu->gpr[2] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x100u;
+ PGXP_ALU(0x30580100u, cpu->gpr[24], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x80055400u);
#endif
@@ -783970,7 +786083,8 @@ label_BFC3D41C:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3D424: 3109FFFB andi $t1, $t0, 0xFFFB */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFBu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFBu;
+ PGXP_ALU(0x3109FFFBu, cpu->gpr[9], _pgx1, 0xFFFBu); }
#ifdef PSX_COSIM
cosim_instr(0x80055424u);
#endif
@@ -784099,7 +786213,8 @@ label_BFC3D448:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3D448: 304C0400 andi $t4, $v0, 0x400 */
- cpu->gpr[12] = cpu->gpr[2] & 0x400u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x400u;
+ PGXP_ALU(0x304C0400u, cpu->gpr[12], _pgx1, 0x0400u); }
#ifdef PSX_COSIM
cosim_instr(0x80055448u);
#endif
@@ -784219,7 +786334,8 @@ label_BFC3D464:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3D46C: 31CFFFFE andi $t7, $t6, 0xFFFE */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFEu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFEu;
+ PGXP_ALU(0x31CFFFFEu, cpu->gpr[15], _pgx1, 0xFFFEu); }
#ifdef PSX_COSIM
cosim_instr(0x8005546Cu);
#endif
@@ -784354,7 +786470,8 @@ label_BFC3D490:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC3D490: 30480040 andi $t0, $v0, 0x40 */
- cpu->gpr[8] = cpu->gpr[2] & 0x40u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x40u;
+ PGXP_ALU(0x30480040u, cpu->gpr[8], _pgx1, 0x0040u); }
#ifdef PSX_COSIM
cosim_instr(0x80055490u);
#endif
@@ -784476,7 +786593,8 @@ label_BFC3D4B0:
psx_cyc_step(cpu, 0x404u);
#endif
/* 0xBFC3D4B0: 304A0080 andi $t2, $v0, 0x80 */
- cpu->gpr[10] = cpu->gpr[2] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x80u;
+ PGXP_ALU(0x304A0080u, cpu->gpr[10], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x800554B0u);
#endif
@@ -784598,7 +786716,8 @@ label_BFC3D4D0:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3D4D0: 304C0200 andi $t4, $v0, 0x200 */
- cpu->gpr[12] = cpu->gpr[2] & 0x200u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x200u;
+ PGXP_ALU(0x304C0200u, cpu->gpr[12], _pgx1, 0x0200u); }
#ifdef PSX_COSIM
cosim_instr(0x800554D0u);
#endif
@@ -784718,7 +786837,8 @@ label_BFC3D4EC:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3D4F4: 31CFFFF7 andi $t7, $t6, 0xFFF7 */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFF7u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFF7u;
+ PGXP_ALU(0x31CFFFF7u, cpu->gpr[15], _pgx1, 0xFFF7u); }
#ifdef PSX_COSIM
cosim_instr(0x800554F4u);
#endif
@@ -784847,7 +786967,8 @@ label_BFC3D518:
psx_cyc_step(cpu, 0x104u);
#endif
/* 0xBFC3D518: 30480800 andi $t0, $v0, 0x800 */
- cpu->gpr[8] = cpu->gpr[2] & 0x800u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x800u;
+ PGXP_ALU(0x30480800u, cpu->gpr[8], _pgx1, 0x0800u); }
#ifdef PSX_COSIM
cosim_instr(0x80055518u);
#endif
@@ -784967,7 +787088,8 @@ label_BFC3D534:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC3D53C: 314BFFFD andi $t3, $t2, 0xFFFD */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFFDu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFDu;
+ PGXP_ALU(0x314BFFFDu, cpu->gpr[11], _pgx1, 0xFFFDu); }
#ifdef PSX_COSIM
cosim_instr(0x8005553Cu);
#endif
@@ -785102,7 +787224,8 @@ label_BFC3D560:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC3D560: 304E1000 andi $t6, $v0, 0x1000 */
- cpu->gpr[14] = cpu->gpr[2] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1000u;
+ PGXP_ALU(0x304E1000u, cpu->gpr[14], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80055560u);
#endif
@@ -785166,7 +787289,8 @@ label_BFC3D56C:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC3D574: 31F8C0FF andi $t8, $t7, 0xC0FF */
- cpu->gpr[24] = cpu->gpr[15] & 0xC0FFu;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xC0FFu;
+ PGXP_ALU(0x31F8C0FFu, cpu->gpr[24], _pgx1, 0xC0FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80055574u);
#endif
@@ -785198,7 +787322,8 @@ label_BFC3D56C:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3D584: 3109003F andi $t1, $t0, 0x3F */
- cpu->gpr[9] = cpu->gpr[8] & 0x3Fu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x3Fu;
+ PGXP_ALU(0x3109003Fu, cpu->gpr[9], _pgx1, 0x003Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80055584u);
#endif
@@ -785215,7 +787340,8 @@ label_BFC3D56C:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC3D58C: 314BFFFF andi $t3, $t2, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005558Cu);
#endif
@@ -785293,7 +787419,8 @@ label_BFC3D5A0:
psx_cyc_step(cpu, 0x2004u);
#endif
/* 0xBFC3D5A0: 304D2000 andi $t5, $v0, 0x2000 */
- cpu->gpr[13] = cpu->gpr[2] & 0x2000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0x2000u;
+ PGXP_ALU(0x304D2000u, cpu->gpr[13], _pgx1, 0x2000u); }
#ifdef PSX_COSIM
cosim_instr(0x800555A0u);
#endif
@@ -785357,7 +787484,8 @@ label_BFC3D5AC:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3D5B4: 31CFFF7F andi $t7, $t6, 0xFF7F */
- cpu->gpr[15] = cpu->gpr[14] & 0xFF7Fu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFF7Fu;
+ PGXP_ALU(0x31CFFF7Fu, cpu->gpr[15], _pgx1, 0xFF7Fu); }
#ifdef PSX_COSIM
cosim_instr(0x800555B4u);
#endif
@@ -785389,7 +787517,8 @@ label_BFC3D5AC:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3D5C4: 31090001 andi $t1, $t0, 0x1 */
- cpu->gpr[9] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31090001u, cpu->gpr[9], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800555C4u);
#endif
@@ -785406,7 +787535,8 @@ label_BFC3D5AC:
psx_cyc_step(cpu, 0x2000400u);
#endif
/* 0xBFC3D5CC: 3159FFFF andi $t9, $t2, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[25] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x3159FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800555CCu);
#endif
@@ -785484,7 +787614,8 @@ label_BFC3D5E0:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC3D5E0: 304C4000 andi $t4, $v0, 0x4000 */
- cpu->gpr[12] = cpu->gpr[2] & 0x4000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x4000u;
+ PGXP_ALU(0x304C4000u, cpu->gpr[12], _pgx1, 0x4000u); }
#ifdef PSX_COSIM
cosim_instr(0x800555E0u);
#endif
@@ -785548,7 +787679,8 @@ label_BFC3D5EC:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC3D5F4: 31AEFFF1 andi $t6, $t5, 0xFFF1 */
- cpu->gpr[14] = cpu->gpr[13] & 0xFFF1u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFF1u;
+ PGXP_ALU(0x31AEFFF1u, cpu->gpr[14], _pgx1, 0xFFF1u); }
#ifdef PSX_COSIM
cosim_instr(0x800555F4u);
#endif
@@ -785580,7 +787712,8 @@ label_BFC3D5EC:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3D604: 31090007 andi $t1, $t0, 0x7 */
- cpu->gpr[9] = cpu->gpr[8] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x7u;
+ PGXP_ALU(0x31090007u, cpu->gpr[9], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x80055604u);
#endif
@@ -785597,7 +787730,8 @@ label_BFC3D5EC:
psx_cyc_step(cpu, 0x1000400u);
#endif
/* 0xBFC3D60C: 3158FFFF andi $t8, $t2, 0xFFFF */
- cpu->gpr[24] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[24] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x3158FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005560Cu);
#endif
@@ -785675,7 +787809,8 @@ label_BFC3D620:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC3D620: 304B8000 andi $t3, $v0, 0x8000 */
- cpu->gpr[11] = cpu->gpr[2] & 0x8000u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x8000u;
+ PGXP_ALU(0x304B8000u, cpu->gpr[11], _pgx1, 0x8000u); }
#ifdef PSX_COSIM
cosim_instr(0x80055620u);
#endif
@@ -785739,7 +787874,8 @@ label_BFC3D62C:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC3D634: 318DFFFE andi $t5, $t4, 0xFFFE */
- cpu->gpr[13] = cpu->gpr[12] & 0xFFFEu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFFEu;
+ PGXP_ALU(0x318DFFFEu, cpu->gpr[13], _pgx1, 0xFFFEu); }
#ifdef PSX_COSIM
cosim_instr(0x80055634u);
#endif
@@ -785771,7 +787907,8 @@ label_BFC3D62C:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3D644: 31090001 andi $t1, $t0, 0x1 */
- cpu->gpr[9] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31090001u, cpu->gpr[9], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80055644u);
#endif
@@ -785779,7 +787916,8 @@ label_BFC3D62C:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC3D648: 312AFFFF andi $t2, $t1, 0xFFFF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu;
+ PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80055648u);
#endif
@@ -785951,7 +788089,8 @@ label_BFC3D65C:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3D670: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80055670u);
#endif
@@ -785985,7 +788124,8 @@ label_BFC3D65C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3D680: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80055680u);
#endif
@@ -786019,7 +788159,8 @@ label_BFC3D65C:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3D690: 3109FFFF andi $t1, $t0, 0xFFFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu;
+ PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80055690u);
#endif
@@ -786053,7 +788194,8 @@ label_BFC3D65C:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC3D6A0: 314BFFFF andi $t3, $t2, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800556A0u);
#endif
@@ -786087,7 +788229,8 @@ label_BFC3D65C:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC3D6B0: 318DFFFF andi $t5, $t4, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[12] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFFFu;
+ PGXP_ALU(0x318DFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800556B0u);
#endif
@@ -786121,7 +788264,8 @@ label_BFC3D65C:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3D6C0: 31CFFFFF andi $t7, $t6, 0xFFFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu;
+ PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800556C0u);
#endif
@@ -786155,7 +788299,8 @@ label_BFC3D65C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3D6D0: 33190004 andi $t9, $t8, 0x4 */
- cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u;
+ PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x800556D0u);
#endif
@@ -786296,7 +788441,8 @@ label_BFC3D6F0:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3D6F8: 31090001 andi $t1, $t0, 0x1 */
- cpu->gpr[9] = cpu->gpr[8] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1u;
+ PGXP_ALU(0x31090001u, cpu->gpr[9], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800556F8u);
#endif
@@ -786419,7 +788565,8 @@ label_BFC3D710:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC3D718: 314BFFFF andi $t3, $t2, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80055718u);
#endif
@@ -786453,7 +788600,8 @@ label_BFC3D710:
psx_cyc_step(cpu, 0x3000u);
#endif
/* 0xBFC3D728: 318DFFFF andi $t5, $t4, 0xFFFF */
- cpu->gpr[13] = cpu->gpr[12] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFFFu;
+ PGXP_ALU(0x318DFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80055728u);
#endif
@@ -786487,7 +788635,8 @@ label_BFC3D710:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3D738: 31CF0008 andi $t7, $t6, 0x8 */
- cpu->gpr[15] = cpu->gpr[14] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x8u;
+ PGXP_ALU(0x31CF0008u, cpu->gpr[15], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80055738u);
#endif
@@ -786610,7 +788759,8 @@ label_BFC3D750:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3D758: 33190002 andi $t9, $t8, 0x2 */
- cpu->gpr[25] = cpu->gpr[24] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x2u;
+ PGXP_ALU(0x33190002u, cpu->gpr[25], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80055758u);
#endif
@@ -786733,7 +788883,8 @@ label_BFC3D770:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3D778: 31093F00 andi $t1, $t0, 0x3F00 */
- cpu->gpr[9] = cpu->gpr[8] & 0x3F00u;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x3F00u;
+ PGXP_ALU(0x31093F00u, cpu->gpr[9], _pgx1, 0x3F00u); }
#ifdef PSX_COSIM
cosim_instr(0x80055778u);
#endif
@@ -786776,7 +788927,8 @@ label_BFC3D770:
psx_cyc_step(cpu, 0x1800u);
#endif
/* 0xBFC3D78C: 316C0080 andi $t4, $t3, 0x80 */
- cpu->gpr[12] = cpu->gpr[11] & 0x80u;
+ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x80u;
+ PGXP_ALU(0x316C0080u, cpu->gpr[12], _pgx1, 0x0080u); }
#ifdef PSX_COSIM
cosim_instr(0x8005578Cu);
#endif
@@ -786914,7 +789066,8 @@ label_BFC3D7A8:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3D7B0: 31CF000E andi $t7, $t6, 0xE */
- cpu->gpr[15] = cpu->gpr[14] & 0xEu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xEu;
+ PGXP_ALU(0x31CF000Eu, cpu->gpr[15], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0x800557B0u);
#endif
@@ -786957,7 +789110,8 @@ label_BFC3D7A8:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC3D7C4: 33280001 andi $t0, $t9, 0x1 */
- cpu->gpr[8] = cpu->gpr[25] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x1u;
+ PGXP_ALU(0x33280001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x800557C4u);
#endif
@@ -787084,7 +789238,8 @@ label_BFC3D7E0:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC3D7E8: 314BFFFF andi $t3, $t2, 0xFFFF */
- cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu;
+ PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800557E8u);
#endif
@@ -787104,7 +789259,8 @@ label_BFC3D7E0:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC3D7F0: 31AEFFFF andi $t6, $t5, 0xFFFF */
- cpu->gpr[14] = cpu->gpr[13] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFFFu;
+ PGXP_ALU(0x31AEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x800557F0u);
#endif
@@ -787148,7 +789304,8 @@ label_BFC3D7E0:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3D804: 3319FFFF andi $t9, $t8, 0xFFFF */
- cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu;
+ PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80055804u);
#endif
@@ -787299,7 +789456,8 @@ label_BFC3D828:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC3D830: 31CF0001 andi $t7, $t6, 0x1 */
- cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u;
+ PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80055830u);
#endif
@@ -788102,7 +790260,8 @@ label_BFC3D8E8:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC3D908: 3063000E andi $v1, $v1, 0xE */
- cpu->gpr[3] = cpu->gpr[3] & 0xEu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xEu;
+ PGXP_ALU(0x3063000Eu, cpu->gpr[3], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0x80055908u);
#endif
@@ -788493,7 +790652,8 @@ label_BFC3D98C:
psx_cyc_step(cpu, 0x3000000u);
#endif
/* 0xBFC3D994: 33190001 andi $t9, $t8, 0x1 */
- cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u;
+ PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80055994u);
#endif
@@ -788583,7 +790743,8 @@ label_BFC3D9A4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3D9B0: 2841000A slti $at, $v0, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (10) ? 1 : 0);
+ PGXP_ALU(0x2841000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x800559B0u);
#endif
@@ -789771,7 +791932,8 @@ label_BFC3DB20:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC3DB28: 314B0008 andi $t3, $t2, 0x8 */
- cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u;
+ PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80055B28u);
#endif
@@ -790617,7 +792779,8 @@ label_BFC3DC38:
psx_cyc_step(cpu, 0xA00u);
#endif
/* 0xBFC3DC40: 312B0010 andi $t3, $t1, 0x10 */
- cpu->gpr[11] = cpu->gpr[9] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[11] = cpu->gpr[9] & 0x10u;
+ PGXP_ALU(0x312B0010u, cpu->gpr[11], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80055C40u);
#endif
@@ -791723,7 +793886,8 @@ label_BFC3DD8C:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC3DD94: 31AE0002 andi $t6, $t5, 0x2 */
- cpu->gpr[14] = cpu->gpr[13] & 0x2u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x2u;
+ PGXP_ALU(0x31AE0002u, cpu->gpr[14], _pgx1, 0x0002u); }
#ifdef PSX_COSIM
cosim_instr(0x80055D94u);
#endif
@@ -791913,7 +794077,8 @@ label_BFC3DDD0:
psx_cyc_step(cpu, 0xA00u);
#endif
/* 0xBFC3DDD8: 312B0004 andi $t3, $t1, 0x4 */
- cpu->gpr[11] = cpu->gpr[9] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[11] = cpu->gpr[9] & 0x4u;
+ PGXP_ALU(0x312B0004u, cpu->gpr[11], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80055DD8u);
#endif
@@ -792260,7 +794425,8 @@ label_BFC3DED0:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3DEDC: 00A1082B sltu $at, $a1, $at */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0);
+ PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055EDCu);
#endif
@@ -792941,7 +795107,8 @@ label_BFC3DF90:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC3DF9C: 0081082B sltu $at, $a0, $at */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[1] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[1] ? 1 : 0);
+ PGXP_ALU(0x0081082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055F9Cu);
#endif
@@ -793032,7 +795199,8 @@ label_BFC3DFB0:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC3DFB0: 2C811000 sltiu $at, $a0, 4096 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00001000u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00001000u ? 1 : 0);
+ PGXP_ALU(0x2C811000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80055FB0u);
#endif
@@ -793047,7 +795215,8 @@ label_BFC3DFB0:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC3DFB8: 308E0007 andi $t6, $a0, 0x7 */
- cpu->gpr[14] = cpu->gpr[4] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x7u;
+ PGXP_ALU(0x308E0007u, cpu->gpr[14], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x80055FB8u);
#endif
@@ -793122,7 +795291,8 @@ label_BFC3DFC4:
psx_cyc_step(cpu, 0x4010u);
#endif
/* 0xBFC3DFC4: 308E0007 andi $t6, $a0, 0x7 */
- cpu->gpr[14] = cpu->gpr[4] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x7u;
+ PGXP_ALU(0x308E0007u, cpu->gpr[14], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x80055FC4u);
#endif
@@ -793240,7 +795410,8 @@ label_BFC3DFD8:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC3DFE0: 00812024 and $a0, $a0, $at */
- cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[1];
+ PGXP_ALU(0x00812024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80055FE0u);
#endif
@@ -794720,7 +796891,8 @@ label_BFC3E164:
psx_cyc_step(cpu, 0x4840u);
#endif
/* 0xBFC3E16C: 00CB7024 and $t6, $a2, $t3 */
- cpu->gpr[14] = cpu->gpr[6] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[6] & cpu->gpr[11];
+ PGXP_ALU(0x00CB7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005616Cu);
#endif
@@ -794834,7 +797006,8 @@ label_BFC3E184:
psx_cyc_step(cpu, 0x1000C00u);
#endif
/* 0xBFC3E190: 014BC024 and $t8, $t2, $t3 */
- cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[11];
+ PGXP_ALU(0x014BC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056190u);
#endif
@@ -794906,7 +797079,8 @@ label_BFC3E19C:
psx_cyc_step(cpu, 0x1000C00u);
#endif
/* 0xBFC3E19C: 014BC024 and $t8, $t2, $t3 */
- cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[11];
+ PGXP_ALU(0x014BC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005619Cu);
#endif
@@ -794969,7 +797143,8 @@ label_BFC3E1A8:
psx_cyc_step(cpu, 0x2002040u);
#endif
/* 0xBFC3E1AC: 00CDC824 and $t9, $a2, $t5 */
- cpu->gpr[25] = cpu->gpr[6] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[6] & cpu->gpr[13];
+ PGXP_ALU(0x00CDC824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800561ACu);
#endif
@@ -794980,7 +797155,8 @@ label_BFC3E1A8:
psx_cyc_step(cpu, 0x1002400u);
#endif
/* 0xBFC3E1B0: 014DC024 and $t8, $t2, $t5 */
- cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[13];
+ PGXP_ALU(0x014DC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800561B0u);
#endif
@@ -795148,7 +797324,8 @@ label_BFC3E1E4:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC3E1E4: 0043082A slt $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800561E4u);
#endif
@@ -795352,7 +797529,8 @@ label_BFC3E20C:
psx_cyc_step(cpu, 0x3010000u);
#endif
/* 0xBFC3E214: 0310C824 and $t9, $t8, $s0 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16];
+ PGXP_ALU(0x0310C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056214u);
#endif
@@ -795459,7 +797637,8 @@ label_BFC3E22C:
psx_cyc_step(cpu, 0x4006u);
#endif
/* 0xBFC3E22C: 004E082A slt $at, $v0, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x004E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005622Cu);
#endif
@@ -795564,7 +797743,8 @@ label_BFC3E244:
psx_cyc_step(cpu, 0x1010400u);
#endif
/* 0xBFC3E24C: 0150C024 and $t8, $t2, $s0 */
- cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[16];
+ PGXP_ALU(0x0150C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005624Cu);
#endif
@@ -795621,7 +797801,8 @@ label_BFC3E258:
psx_cyc_step(cpu, 0x2002400u);
#endif
/* 0xBFC3E25C: 014DC824 and $t9, $t2, $t5 */
- cpu->gpr[25] = cpu->gpr[10] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[10] & cpu->gpr[13];
+ PGXP_ALU(0x014DC824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005625Cu);
#endif
@@ -795632,7 +797813,8 @@ label_BFC3E258:
psx_cyc_step(cpu, 0x6040u);
#endif
/* 0xBFC3E260: 00CD7024 and $t6, $a2, $t5 */
- cpu->gpr[14] = cpu->gpr[6] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[6] & cpu->gpr[13];
+ PGXP_ALU(0x00CD7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056260u);
#endif
@@ -795640,7 +797822,8 @@ label_BFC3E258:
psx_cyc_step(cpu, 0x2004002u);
#endif
/* 0xBFC3E264: 032E082B sltu $at, $t9, $t6 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x032E082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056264u);
#endif
@@ -795769,7 +797952,8 @@ label_BFC3E28C:
psx_cyc_step(cpu, 0x8Au);
#endif
/* 0xBFC3E290: 00E3082A slt $at, $a3, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x00E3082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056290u);
#endif
@@ -795836,7 +798020,8 @@ label_BFC3E2A0:
psx_cyc_step(cpu, 0xEu);
#endif
/* 0xBFC3E2A0: 0043082A slt $at, $v0, $v1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0);
+ PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800562A0u);
#endif
@@ -795978,7 +798163,8 @@ label_BFC3E2BC:
psx_cyc_step(cpu, 0x1010040u);
#endif
/* 0xBFC3E2C4: 00D0C024 and $t8, $a2, $s0 */
- cpu->gpr[24] = cpu->gpr[6] & cpu->gpr[16];
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[6] & cpu->gpr[16];
+ PGXP_ALU(0x00D0C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800562C4u);
#endif
@@ -796466,7 +798652,8 @@ label_BFC3E32C:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC3E35C: 3063000E andi $v1, $v1, 0xE */
- cpu->gpr[3] = cpu->gpr[3] & 0xEu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xEu;
+ PGXP_ALU(0x3063000Eu, cpu->gpr[3], _pgx1, 0x000Eu); }
#ifdef PSX_COSIM
cosim_instr(0x8005635Cu);
#endif
@@ -796997,7 +799184,8 @@ label_BFC3E3F0:
psx_cyc_step(cpu, 0x2000005u);
#endif
/* 0xBFC3E3F4: 0040C827 nor $t9, $v0, $zero */
- cpu->gpr[25] = ~(cpu->gpr[2] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[2] | cpu->gpr[0]);
+ PGXP_ALU(0x0040C827u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800563F4u);
#endif
@@ -797005,7 +799193,8 @@ label_BFC3E3F0:
psx_cyc_step(cpu, 0x2008100u);
#endif
/* 0xBFC3E3F8: 01197824 and $t7, $t0, $t9 */
- cpu->gpr[15] = cpu->gpr[8] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[8] & cpu->gpr[25];
+ PGXP_ALU(0x01197824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800563F8u);
#endif
@@ -797166,7 +799355,8 @@ label_BFC3E410:
psx_cyc_step(cpu, 0x1004040u);
#endif
/* 0xBFC3E428: 01C6C024 and $t8, $t6, $a2 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[6];
+ PGXP_ALU(0x01C6C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056428u);
#endif
@@ -797554,7 +799744,8 @@ label_BFC3E49C:
psx_cyc_step(cpu, 0x8044u);
#endif
/* 0xBFC3E4A4: 00467824 and $t7, $v0, $a2 */
- cpu->gpr[15] = cpu->gpr[2] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[2] & cpu->gpr[6];
+ PGXP_ALU(0x00467824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800564A4u);
#endif
@@ -797601,7 +799792,8 @@ label_BFC3E4B0:
psx_cyc_step(cpu, 0x4014u);
#endif
/* 0xBFC3E4B0: 00447024 and $t6, $v0, $a0 */
- cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[4];
+ PGXP_ALU(0x00447024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800564B0u);
#endif
@@ -797665,7 +799857,8 @@ label_BFC3E4BC:
psx_cyc_step(cpu, 0x1000102u);
#endif
/* 0xBFC3E4C4: 0308082B sltu $at, $t8, $t0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0308082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800564C4u);
#endif
@@ -797801,7 +799994,8 @@ label_BFC3E4E0:
psx_cyc_step(cpu, 0x422u);
#endif
/* 0xBFC3E4E4: 00AA082A slt $at, $a1, $t2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x00AA082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800564E4u);
#endif
@@ -797996,7 +800190,8 @@ label_BFC3E508:
psx_cyc_step(cpu, 0x8240u);
#endif
/* 0xBFC3E514: 01267824 and $t7, $t1, $a2 */
- cpu->gpr[15] = cpu->gpr[9] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[9] & cpu->gpr[6];
+ PGXP_ALU(0x01267824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056514u);
#endif
@@ -798011,7 +800206,8 @@ label_BFC3E508:
psx_cyc_step(cpu, 0xC02u);
#endif
/* 0xBFC3E51C: 016A082A slt $at, $t3, $t2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x016A082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005651Cu);
#endif
@@ -798108,7 +800304,8 @@ label_BFC3E528:
psx_cyc_step(cpu, 0x1000102u);
#endif
/* 0xBFC3E534: 0308082B sltu $at, $t8, $t0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[8] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[8] ? 1 : 0);
+ PGXP_ALU(0x0308082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056534u);
#endif
@@ -798182,7 +800379,8 @@ label_BFC3E540:
psx_cyc_step(cpu, 0x8210u);
#endif
/* 0xBFC3E54C: 01247824 and $t7, $t1, $a0 */
- cpu->gpr[15] = cpu->gpr[9] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[9] & cpu->gpr[4];
+ PGXP_ALU(0x01247824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005654Cu);
#endif
@@ -798292,7 +800490,8 @@ label_BFC3E540:
psx_cyc_step(cpu, 0x1004010u);
#endif
/* 0xBFC3E57C: 01C4C024 and $t8, $t6, $a0 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[4];
+ PGXP_ALU(0x01C4C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005657Cu);
#endif
@@ -798452,7 +800651,8 @@ label_BFC3E5A0:
psx_cyc_step(cpu, 0x142u);
#endif
/* 0xBFC3E5A8: 0106082B sltu $at, $t0, $a2 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x0106082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800565A8u);
#endif
@@ -798529,7 +800729,8 @@ label_BFC3E5B4:
psx_cyc_step(cpu, 0x482u);
#endif
/* 0xBFC3E5C0: 00EA082A slt $at, $a3, $t2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[10] ? 1 : 0);
+ PGXP_ALU(0x00EA082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800565C0u);
#endif
@@ -798752,7 +800953,8 @@ label_BFC3E610:
psx_cyc_step(cpu, 0x2000210u);
#endif
/* 0xBFC3E614: 0124C824 and $t9, $t1, $a0 */
- cpu->gpr[25] = cpu->gpr[9] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[9] & cpu->gpr[4];
+ PGXP_ALU(0x0124C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056614u);
#endif
@@ -799229,7 +801431,8 @@ label_BFC3E694:
psx_cyc_step(cpu, 0x100Au);
#endif
/* 0xBFC3E698: 00616024 and $t4, $v1, $at */
- cpu->gpr[12] = cpu->gpr[3] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[3] & cpu->gpr[1];
+ PGXP_ALU(0x00616024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056698u);
#endif
@@ -799289,7 +801492,8 @@ label_BFC3E6A4:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC3E6A8: 00612024 and $a0, $v1, $at */
- cpu->gpr[4] = cpu->gpr[3] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[3] & cpu->gpr[1];
+ PGXP_ALU(0x00612024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800566A8u);
#endif
@@ -799394,7 +801598,8 @@ label_BFC3E6C4:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC3E6CC: 00612024 and $a0, $v1, $at */
- cpu->gpr[4] = cpu->gpr[3] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[3] & cpu->gpr[1];
+ PGXP_ALU(0x00612024u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800566CCu);
#endif
@@ -799459,7 +801664,8 @@ label_BFC3E6E4:
psx_cyc_step(cpu, 0x2042u);
#endif
/* 0xBFC3E6E4: 01A6082A slt $at, $t5, $a2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x01A6082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800566E4u);
#endif
@@ -799666,7 +801872,8 @@ label_BFC3E708:
psx_cyc_step(cpu, 0x8202u);
#endif
/* 0xBFC3E71C: 01E9082A slt $at, $t7, $t1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x01E9082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005671Cu);
#endif
@@ -799812,7 +802019,8 @@ label_BFC3E734:
psx_cyc_step(cpu, 0x3000002u);
#endif
/* 0xBFC3E744: 0301C824 and $t9, $t8, $at */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[1];
+ PGXP_ALU(0x0301C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056744u);
#endif
@@ -800009,7 +802217,8 @@ label_BFC3E77C:
psx_cyc_step(cpu, 0x2000202u);
#endif
/* 0xBFC3E790: 0139082A slt $at, $t1, $t9 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0139082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056790u);
#endif
@@ -800155,7 +802364,8 @@ label_BFC3E7A8:
psx_cyc_step(cpu, 0x1004002u);
#endif
/* 0xBFC3E7B8: 01C1C024 and $t8, $t6, $at */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[1];
+ PGXP_ALU(0x01C1C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800567B8u);
#endif
@@ -800346,7 +802556,8 @@ label_BFC3E7F8:
psx_cyc_step(cpu, 0x2042u);
#endif
/* 0xBFC3E7FC: 00CD082A slt $at, $a2, $t5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x00CD082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800567FCu);
#endif
@@ -800459,7 +802670,8 @@ label_BFC3E808:
psx_cyc_step(cpu, 0x4202u);
#endif
/* 0xBFC3E81C: 01C9082A slt $at, $t6, $t1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x01C9082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005681Cu);
#endif
@@ -800591,7 +802803,8 @@ label_BFC3E830:
psx_cyc_step(cpu, 0x1000202u);
#endif
/* 0xBFC3E844: 0138082A slt $at, $t1, $t8 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[24] ? 1 : 0);
+ PGXP_ALU(0x0138082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056844u);
#endif
@@ -800743,7 +802956,8 @@ label_BFC3E85C:
psx_cyc_step(cpu, 0x2042u);
#endif
/* 0xBFC3E870: 01A6082A slt $at, $t5, $a2 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[6] ? 1 : 0);
+ PGXP_ALU(0x01A6082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056870u);
#endif
@@ -801054,7 +803268,8 @@ label_BFC3E8D8:
psx_cyc_step(cpu, 0x2042u);
#endif
/* 0xBFC3E8D8: 00CD082A slt $at, $a2, $t5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x00CD082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800568D8u);
#endif
@@ -801213,7 +803428,8 @@ label_BFC3E8F4:
psx_cyc_step(cpu, 0x8202u);
#endif
/* 0xBFC3E908: 012F082A slt $at, $t1, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x012F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056908u);
#endif
@@ -801332,7 +803548,8 @@ label_BFC3E920:
psx_cyc_step(cpu, 0x4082u);
#endif
/* 0xBFC3E924: 00E17024 and $t6, $a3, $at */
- cpu->gpr[14] = cpu->gpr[7] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[7] & cpu->gpr[1];
+ PGXP_ALU(0x00E17024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056924u);
#endif
@@ -801340,7 +803557,8 @@ label_BFC3E920:
psx_cyc_step(cpu, 0x2042u);
#endif
/* 0xBFC3E928: 00CD082A slt $at, $a2, $t5 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[13] ? 1 : 0);
+ PGXP_ALU(0x00CD082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056928u);
#endif
@@ -802012,7 +804230,8 @@ label_BFC3E9DC:
psx_cyc_step(cpu, 0x19u);
#endif
/* 0xBFC3E9E0: 00602027 nor $a0, $v1, $zero */
- cpu->gpr[4] = ~(cpu->gpr[3] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = ~(cpu->gpr[3] | cpu->gpr[0]);
+ PGXP_ALU(0x00602027u, cpu->gpr[4], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800569E0u);
#endif
@@ -802020,7 +804239,8 @@ label_BFC3E9DC:
psx_cyc_step(cpu, 0x1000210u);
#endif
/* 0xBFC3E9E4: 0124C024 and $t8, $t1, $a0 */
- cpu->gpr[24] = cpu->gpr[9] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[9] & cpu->gpr[4];
+ PGXP_ALU(0x0124C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800569E4u);
#endif
@@ -802148,7 +804368,8 @@ label_BFC3E9FC:
psx_cyc_step(cpu, 0x2000090u);
#endif
/* 0xBFC3EA04: 00E4C824 and $t9, $a3, $a0 */
- cpu->gpr[25] = cpu->gpr[7] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[7] & cpu->gpr[4];
+ PGXP_ALU(0x00E4C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056A04u);
#endif
@@ -802294,7 +804515,8 @@ label_BFC3EA20:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3EA2C: 28A11000 slti $at, $a1, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (4096) ? 1 : 0);
+ PGXP_ALU(0x28A11000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80056A2Cu);
#endif
@@ -802434,7 +804656,8 @@ label_BFC3EA44:
psx_cyc_step(cpu, 0x8006u);
#endif
/* 0xBFC3EA50: 01E2082A slt $at, $t7, $v0 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[2] ? 1 : 0);
+ PGXP_ALU(0x01E2082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056A50u);
#endif
@@ -802565,7 +804788,8 @@ label_BFC3EA64:
psx_cyc_step(cpu, 0x3000040u);
#endif
/* 0xBFC3EA78: 0306C824 and $t9, $t8, $a2 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[6];
+ PGXP_ALU(0x0306C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056A78u);
#endif
@@ -802621,7 +804845,8 @@ label_BFC3EA84:
psx_cyc_step(cpu, 0x22u);
#endif
/* 0xBFC3EA88: 28A11001 slti $at, $a1, 4097 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (4097) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (4097) ? 1 : 0);
+ PGXP_ALU(0x28A11001u, cpu->gpr[1], _pgx1, 0x1001u); }
#ifdef PSX_COSIM
cosim_instr(0x80056A88u);
#endif
@@ -802735,7 +804960,8 @@ label_BFC3EA9C:
psx_cyc_step(cpu, 0x2008002u);
#endif
/* 0xBFC3EAB0: 032F082A slt $at, $t9, $t7 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[15] ? 1 : 0);
+ PGXP_ALU(0x032F082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056AB0u);
#endif
@@ -803032,7 +805258,8 @@ label_BFC3EB00:
psx_cyc_step(cpu, 0x2004002u);
#endif
/* 0xBFC3EB14: 032E082A slt $at, $t9, $t6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[14] ? 1 : 0);
+ PGXP_ALU(0x032E082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056B14u);
#endif
@@ -803442,7 +805669,8 @@ label_BFC3EB90:
psx_cyc_step(cpu, 0x8408u);
#endif
/* 0xBFC3EB98: 006A7824 and $t7, $v1, $t2 */
- cpu->gpr[15] = cpu->gpr[3] & cpu->gpr[10];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[3] & cpu->gpr[10];
+ PGXP_ALU(0x006A7824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056B98u);
#endif
@@ -803460,7 +805688,8 @@ label_BFC3EB90:
psx_cyc_step(cpu, 0x8048u);
#endif
/* 0xBFC3EBA0: 00667824 and $t7, $v1, $a2 */
- cpu->gpr[15] = cpu->gpr[3] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[3] & cpu->gpr[6];
+ PGXP_ALU(0x00667824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056BA0u);
#endif
@@ -803492,7 +805721,8 @@ label_BFC3EBA4:
psx_cyc_step(cpu, 0x888u);
#endif
/* 0xBFC3EBA4: 006B3824 and $a3, $v1, $t3 */
- cpu->gpr[7] = cpu->gpr[3] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[7] = cpu->gpr[3] & cpu->gpr[11];
+ PGXP_ALU(0x006B3824u, cpu->gpr[7], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056BA4u);
#endif
@@ -803500,7 +805730,8 @@ label_BFC3EBA4:
psx_cyc_step(cpu, 0xA2u);
#endif
/* 0xBFC3EBA8: 00A7082B sltu $at, $a1, $a3 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[7] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[7] ? 1 : 0);
+ PGXP_ALU(0x00A7082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056BA8u);
#endif
@@ -803576,7 +805807,8 @@ label_BFC3EBB4:
psx_cyc_step(cpu, 0x2000022u);
#endif
/* 0xBFC3EBC0: 00B9082B sltu $at, $a1, $t9 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x00B9082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056BC0u);
#endif
@@ -803641,7 +805873,8 @@ label_BFC3EBCC:
psx_cyc_step(cpu, 0x6040u);
#endif
/* 0xBFC3EBD4: 01C66824 and $t5, $t6, $a2 */
- cpu->gpr[13] = cpu->gpr[14] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[14] & cpu->gpr[6];
+ PGXP_ALU(0x01C66824u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056BD4u);
#endif
@@ -803766,7 +805999,8 @@ label_BFC3EBF0:
psx_cyc_step(cpu, 0x212u);
#endif
/* 0xBFC3EBF4: 0089082A slt $at, $a0, $t1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0089082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056BF4u);
#endif
@@ -803970,7 +806204,8 @@ label_BFC3EC20:
psx_cyc_step(cpu, 0x212u);
#endif
/* 0xBFC3EC28: 0089082A slt $at, $a0, $t1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0089082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056C28u);
#endif
@@ -804172,7 +806407,8 @@ label_BFC3EC58:
psx_cyc_step(cpu, 0x8048u);
#endif
/* 0xBFC3EC58: 00667824 and $t7, $v1, $a2 */
- cpu->gpr[15] = cpu->gpr[3] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[3] & cpu->gpr[6];
+ PGXP_ALU(0x00667824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056C58u);
#endif
@@ -804304,7 +806540,8 @@ label_BFC3EC70:
psx_cyc_step(cpu, 0x212u);
#endif
/* 0xBFC3EC7C: 0089082A slt $at, $a0, $t1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[9] ? 1 : 0);
+ PGXP_ALU(0x0089082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056C7Cu);
#endif
@@ -804414,7 +806651,8 @@ label_BFC3EC94:
psx_cyc_step(cpu, 0x828u);
#endif
/* 0xBFC3EC94: 006B2824 and $a1, $v1, $t3 */
- cpu->gpr[5] = cpu->gpr[3] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[5] = cpu->gpr[3] & cpu->gpr[11];
+ PGXP_ALU(0x006B2824u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056C94u);
#endif
@@ -804669,7 +806907,8 @@ label_BFC3ECD4:
psx_cyc_step(cpu, 0x4044u);
#endif
/* 0xBFC3ECDC: 00467024 and $t6, $v0, $a2 */
- cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[6];
+ PGXP_ALU(0x00467024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056CDCu);
#endif
@@ -804719,7 +806958,8 @@ label_BFC3ECE8:
psx_cyc_step(cpu, 0x8084u);
#endif
/* 0xBFC3ECE8: 00477824 and $t7, $v0, $a3 */
- cpu->gpr[15] = cpu->gpr[2] & cpu->gpr[7];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[2] & cpu->gpr[7];
+ PGXP_ALU(0x00477824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056CE8u);
#endif
@@ -804769,7 +807009,8 @@ label_BFC3ECF4:
psx_cyc_step(cpu, 0x124u);
#endif
/* 0xBFC3ECF4: 00482824 and $a1, $v0, $t0 */
- cpu->gpr[5] = cpu->gpr[2] & cpu->gpr[8];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[2] & cpu->gpr[8];
+ PGXP_ALU(0x00482824u, cpu->gpr[5], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056CF4u);
#endif
@@ -804777,7 +807018,8 @@ label_BFC3ECF4:
psx_cyc_step(cpu, 0x32u);
#endif
/* 0xBFC3ECF8: 00A4082B sltu $at, $a1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x00A4082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056CF8u);
#endif
@@ -804885,7 +807127,8 @@ label_BFC3ED0C:
psx_cyc_step(cpu, 0x2000012u);
#endif
/* 0xBFC3ED18: 0099082B sltu $at, $a0, $t9 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[25] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[25] ? 1 : 0);
+ PGXP_ALU(0x0099082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056D18u);
#endif
@@ -805223,7 +807466,8 @@ label_BFC3ED68:
psx_cyc_step(cpu, 0x4014u);
#endif
/* 0xBFC3ED70: 00447024 and $t6, $v0, $a0 */
- cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[4];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[4];
+ PGXP_ALU(0x00447024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056D70u);
#endif
@@ -805845,7 +808089,8 @@ label_BFC3EE0C:
psx_cyc_step(cpu, 0x2080100u);
#endif
/* 0xBFC3EE24: 03334024 and $t0, $t9, $s3 */
- cpu->gpr[8] = cpu->gpr[25] & cpu->gpr[19];
+ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[8] = cpu->gpr[25] & cpu->gpr[19];
+ PGXP_ALU(0x03334024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056E24u);
#endif
@@ -805977,7 +808222,8 @@ label_BFC3EE44:
psx_cyc_step(cpu, 0x20202u);
#endif
/* 0xBFC3EE50: 0131082A slt $at, $t1, $s1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[17] ? 1 : 0);
+ PGXP_ALU(0x0131082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80056E50u);
#endif
@@ -806656,7 +808902,8 @@ label_BFC3EF24:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC3EF30: 30430007 andi $v1, $v0, 0x7 */
- cpu->gpr[3] = cpu->gpr[2] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x7u;
+ PGXP_ALU(0x30430007u, cpu->gpr[3], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x80056F30u);
#endif
@@ -807055,7 +809302,8 @@ label_BFC3EF98:
psx_cyc_step(cpu, 0xCu);
#endif
/* 0xBFC3EFA4: 30430007 andi $v1, $v0, 0x7 */
- cpu->gpr[3] = cpu->gpr[2] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x7u;
+ PGXP_ALU(0x30430007u, cpu->gpr[3], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x80056FA4u);
#endif
@@ -807661,7 +809909,8 @@ label_BFC3F040:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC3F044: 3059001D andi $t9, $v0, 0x1D */
- cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); }
#ifdef PSX_COSIM
cosim_instr(0x80057044u);
#endif
@@ -807766,7 +810015,8 @@ label_BFC3F058:
psx_cyc_step(cpu, 0x2000004u);
#endif
/* 0xBFC3F058: 3059001D andi $t9, $v0, 0x1D */
- cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du;
+ PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); }
#ifdef PSX_COSIM
cosim_instr(0x80057058u);
#endif
@@ -808148,7 +810398,8 @@ label_BFC3F090:
psx_cyc_step(cpu, 0xC040u);
#endif
/* 0xBFC3F0C8: 01C67824 and $t7, $t6, $a2 */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[6];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[6];
+ PGXP_ALU(0x01C67824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800570C8u);
#endif
@@ -808183,7 +810434,8 @@ label_BFC3F090:
psx_cyc_step(cpu, 0x3000020u);
#endif
/* 0xBFC3F0D8: 0305C824 and $t9, $t8, $a1 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[5];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[5];
+ PGXP_ALU(0x0305C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x800570D8u);
#endif
@@ -808284,7 +810536,8 @@ label_BFC3F090:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC3F104: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80057104u);
#endif
@@ -809226,7 +811479,8 @@ label_BFC3F210:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC3F224: 30580008 andi $t8, $v0, 0x8 */
- cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80057224u);
#endif
@@ -810287,7 +812541,8 @@ label_BFC3F324:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC3F338: 30580008 andi $t8, $v0, 0x8 */
- cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80057338u);
#endif
@@ -812136,7 +814391,8 @@ label_BFC3F5D8:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC3F5F0: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800575F0u);
#endif
@@ -812357,7 +814613,8 @@ label_BFC3F608:
psx_cyc_step(cpu, 0x8040u);
#endif
/* 0xBFC3F62C: 30CF0010 andi $t7, $a2, 0x10 */
- cpu->gpr[15] = cpu->gpr[6] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] & 0x10u;
+ PGXP_ALU(0x30CF0010u, cpu->gpr[15], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x8005762Cu);
#endif
@@ -812469,7 +814726,8 @@ label_BFC3F648:
psx_cyc_step(cpu, 0x2000040u);
#endif
/* 0xBFC3F648: 30D90020 andi $t9, $a2, 0x20 */
- cpu->gpr[25] = cpu->gpr[6] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] & 0x20u;
+ PGXP_ALU(0x30D90020u, cpu->gpr[25], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x80057648u);
#endif
@@ -812669,7 +814927,8 @@ label_BFC3F670:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC3F684: 304B0008 andi $t3, $v0, 0x8 */
- cpu->gpr[11] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304B0008u, cpu->gpr[11], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80057684u);
#endif
@@ -812838,7 +815097,8 @@ label_BFC3F6A0:
psx_cyc_step(cpu, 0x2040u);
#endif
/* 0xBFC3F6B8: 30CD00FF andi $t5, $a2, 0xFF */
- cpu->gpr[13] = cpu->gpr[6] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[6] & 0xFFu;
+ PGXP_ALU(0x30CD00FFu, cpu->gpr[13], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800576B8u);
#endif
@@ -813195,7 +815455,8 @@ label_BFC3F710:
psx_cyc_step(cpu, 0x8010u);
#endif
/* 0xBFC3F724: 308F0010 andi $t7, $a0, 0x10 */
- cpu->gpr[15] = cpu->gpr[4] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] & 0x10u;
+ PGXP_ALU(0x308F0010u, cpu->gpr[15], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80057724u);
#endif
@@ -813301,7 +815562,8 @@ label_BFC3F740:
psx_cyc_step(cpu, 0x2000010u);
#endif
/* 0xBFC3F740: 30990020 andi $t9, $a0, 0x20 */
- cpu->gpr[25] = cpu->gpr[4] & 0x20u;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0x20u;
+ PGXP_ALU(0x30990020u, cpu->gpr[25], _pgx1, 0x0020u); }
#ifdef PSX_COSIM
cosim_instr(0x80057740u);
#endif
@@ -813498,7 +815760,8 @@ label_BFC3F768:
psx_cyc_step(cpu, 0x804u);
#endif
/* 0xBFC3F77C: 304B0008 andi $t3, $v0, 0x8 */
- cpu->gpr[11] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304B0008u, cpu->gpr[11], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x8005777Cu);
#endif
@@ -813673,7 +815936,8 @@ label_BFC3F798:
psx_cyc_step(cpu, 0x2010u);
#endif
/* 0xBFC3F7B0: 308D00FF andi $t5, $a0, 0xFF */
- cpu->gpr[13] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[13] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308D00FFu, cpu->gpr[13], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800577B0u);
#endif
@@ -814900,7 +817164,8 @@ label_BFC3F910:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC3F928: 304F0008 andi $t7, $v0, 0x8 */
- cpu->gpr[15] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304F0008u, cpu->gpr[15], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80057928u);
#endif
@@ -815111,7 +817376,8 @@ label_BFC3F94C:
psx_cyc_step(cpu, 0x2000010u);
#endif
/* 0xBFC3F96C: 309900FF andi $t9, $a0, 0xFF */
- cpu->gpr[25] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x309900FFu, cpu->gpr[25], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005796Cu);
#endif
@@ -820246,7 +822512,8 @@ label_BFC3FE84:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC3FE98: 30580008 andi $t8, $v0, 0x8 */
- cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80057E98u);
#endif
@@ -820955,7 +823222,8 @@ label_BFC3FF64:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC3FF78: 30580008 andi $t8, $v0, 0x8 */
- cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80057F78u);
#endif
@@ -821353,7 +823621,8 @@ label_BFC3FFE4:
psx_cyc_step(cpu, 0x300u);
#endif
/* 0xBFC3FFFC: 310900FF andi $t1, $t0, 0xFF */
- cpu->gpr[9] = cpu->gpr[8] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFu;
+ PGXP_ALU(0x310900FFu, cpu->gpr[9], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80057FFCu);
#endif
@@ -822917,7 +825186,8 @@ label_BFC40184:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC40190: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80058190u);
#endif
@@ -824316,7 +826586,8 @@ label_BFC40300:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC40314: 30580008 andi $t8, $v0, 0x8 */
- cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80058314u);
#endif
@@ -824651,7 +826922,8 @@ label_BFC40378:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC40384: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80058384u);
#endif
@@ -825633,7 +827905,8 @@ label_BFC40484:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC4049C: 31CF0004 andi $t7, $t6, 0x4 */
- cpu->gpr[15] = cpu->gpr[14] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x4u;
+ PGXP_ALU(0x31CF0004u, cpu->gpr[15], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x8005849Cu);
#endif
@@ -825738,7 +828011,8 @@ label_BFC404B0:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC404B8: 30580004 andi $t8, $v0, 0x4 */
- cpu->gpr[24] = cpu->gpr[2] & 0x4u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x4u;
+ PGXP_ALU(0x30580004u, cpu->gpr[24], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x800584B8u);
#endif
@@ -825874,7 +828148,8 @@ label_BFC404CC:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC404E0: 33280003 andi $t0, $t9, 0x3 */
- cpu->gpr[8] = cpu->gpr[25] & 0x3u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x3u;
+ PGXP_ALU(0x33280003u, cpu->gpr[8], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x800584E0u);
#endif
@@ -825933,7 +828208,8 @@ label_BFC404CC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC404FC: 30420007 andi $v0, $v0, 0x7 */
- cpu->gpr[2] = cpu->gpr[2] & 0x7u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7u;
+ PGXP_ALU(0x30420007u, cpu->gpr[2], _pgx1, 0x0007u); }
#ifdef PSX_COSIM
cosim_instr(0x800584FCu);
#endif
@@ -825944,7 +828220,8 @@ label_BFC404CC:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC40500: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80058500u);
#endif
@@ -825970,7 +828247,8 @@ label_BFC404CC:
psx_cyc_step(cpu, 0x1002u);
#endif
/* 0xBFC4050C: 2D810005 sltiu $at, $t4, 5 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[12] < 0x00000005u ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)(cpu->gpr[12] < 0x00000005u ? 1 : 0);
+ PGXP_ALU(0x2D810005u, cpu->gpr[1], _pgx1, 0x0005u); }
#ifdef PSX_COSIM
cosim_instr(0x8005850Cu);
#endif
@@ -826683,7 +828961,8 @@ label_BFC405B0:
psx_cyc_step(cpu, 0x1000002u);
#endif
/* 0xBFC405D0: 2B010004 slti $at, $t8, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (4) ? 1 : 0);
+ PGXP_ALU(0x2B010004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x800585D0u);
#endif
@@ -826813,7 +829092,8 @@ label_BFC405E0:
psx_cyc_step(cpu, 0x402u);
#endif
/* 0xBFC40600: 29410004 slti $at, $t2, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (4) ? 1 : 0);
+ PGXP_ALU(0x29410004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80058600u);
#endif
@@ -827038,7 +829318,8 @@ label_BFC40628:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC40640: 31CF0008 andi $t7, $t6, 0x8 */
- cpu->gpr[15] = cpu->gpr[14] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x8u;
+ PGXP_ALU(0x31CF0008u, cpu->gpr[15], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80058640u);
#endif
@@ -827143,7 +829424,8 @@ label_BFC40654:
psx_cyc_step(cpu, 0x1000004u);
#endif
/* 0xBFC4065C: 30580008 andi $t8, $v0, 0x8 */
- cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x8005865Cu);
#endif
@@ -827312,7 +829594,8 @@ label_BFC40670:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40694: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80058694u);
#endif
@@ -828013,7 +830296,8 @@ label_BFC40744:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC40774: 29010004 slti $at, $t0, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0);
+ PGXP_ALU(0x29010004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80058774u);
#endif
@@ -828145,7 +830429,8 @@ label_BFC40784:
psx_cyc_step(cpu, 0x1002u);
#endif
/* 0xBFC407A4: 29810004 slti $at, $t4, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0);
+ PGXP_ALU(0x29810004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x800587A4u);
#endif
@@ -830011,7 +832296,8 @@ label_BFC4090C:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40914: 2841001A slti $at, $v0, 26 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (26) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (26) ? 1 : 0);
+ PGXP_ALU(0x2841001Au, cpu->gpr[1], _pgx1, 0x001Au); }
#ifdef PSX_COSIM
cosim_instr(0x80058914u);
#endif
@@ -830090,7 +832376,8 @@ label_BFC40920:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40924: 2841000F slti $at, $v0, 15 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0);
+ PGXP_ALU(0x2841000Fu, cpu->gpr[1], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80058924u);
#endif
@@ -830169,7 +832456,8 @@ label_BFC40930:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40934: 28410009 slti $at, $v0, 9 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (9) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (9) ? 1 : 0);
+ PGXP_ALU(0x28410009u, cpu->gpr[1], _pgx1, 0x0009u); }
#ifdef PSX_COSIM
cosim_instr(0x80058934u);
#endif
@@ -830248,7 +832536,8 @@ label_BFC40940:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40944: 28410006 slti $at, $v0, 6 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (6) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (6) ? 1 : 0);
+ PGXP_ALU(0x28410006u, cpu->gpr[1], _pgx1, 0x0006u); }
#ifdef PSX_COSIM
cosim_instr(0x80058944u);
#endif
@@ -830327,7 +832616,8 @@ label_BFC40950:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40954: 28410004 slti $at, $v0, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4) ? 1 : 0);
+ PGXP_ALU(0x28410004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80058954u);
#endif
@@ -830666,7 +832956,8 @@ label_BFC40998:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC409A0: 2841000C slti $at, $v0, 12 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (12) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (12) ? 1 : 0);
+ PGXP_ALU(0x2841000Cu, cpu->gpr[1], _pgx1, 0x000Cu); }
#ifdef PSX_COSIM
cosim_instr(0x800589A0u);
#endif
@@ -830919,7 +833210,8 @@ label_BFC409D0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC409D8: 28410015 slti $at, $v0, 21 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0);
+ PGXP_ALU(0x28410015u, cpu->gpr[1], _pgx1, 0x0015u); }
#ifdef PSX_COSIM
cosim_instr(0x800589D8u);
#endif
@@ -831001,7 +833293,8 @@ label_BFC409E4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC409E8: 28410013 slti $at, $v0, 19 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (19) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (19) ? 1 : 0);
+ PGXP_ALU(0x28410013u, cpu->gpr[1], _pgx1, 0x0013u); }
#ifdef PSX_COSIM
cosim_instr(0x800589E8u);
#endif
@@ -831259,7 +833552,8 @@ label_BFC40A18:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40A20: 28410017 slti $at, $v0, 23 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0);
+ PGXP_ALU(0x28410017u, cpu->gpr[1], _pgx1, 0x0017u); }
#ifdef PSX_COSIM
cosim_instr(0x80058A20u);
#endif
@@ -831512,7 +833806,8 @@ label_BFC40A50:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40A58: 284100F7 slti $at, $v0, 247 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (247) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (247) ? 1 : 0);
+ PGXP_ALU(0x284100F7u, cpu->gpr[1], _pgx1, 0x00F7u); }
#ifdef PSX_COSIM
cosim_instr(0x80058A58u);
#endif
@@ -831594,7 +833889,8 @@ label_BFC40A64:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40A68: 284100E7 slti $at, $v0, 231 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (231) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (231) ? 1 : 0);
+ PGXP_ALU(0x284100E7u, cpu->gpr[1], _pgx1, 0x00E7u); }
#ifdef PSX_COSIM
cosim_instr(0x80058A68u);
#endif
@@ -831676,7 +833972,8 @@ label_BFC40A74:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40A78: 28410051 slti $at, $v0, 81 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0);
+ PGXP_ALU(0x28410051u, cpu->gpr[1], _pgx1, 0x0051u); }
#ifdef PSX_COSIM
cosim_instr(0x80058A78u);
#endif
@@ -831932,7 +834229,8 @@ label_BFC40AA8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40AB0: 284100EF slti $at, $v0, 239 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (239) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (239) ? 1 : 0);
+ PGXP_ALU(0x284100EFu, cpu->gpr[1], _pgx1, 0x00EFu); }
#ifdef PSX_COSIM
cosim_instr(0x80058AB0u);
#endif
@@ -832188,7 +834486,8 @@ label_BFC40AE0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40AE8: 28410DDE slti $at, $v0, 3550 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3550) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3550) ? 1 : 0);
+ PGXP_ALU(0x28410DDEu, cpu->gpr[1], _pgx1, 0x0DDEu); }
#ifdef PSX_COSIM
cosim_instr(0x80058AE8u);
#endif
@@ -832270,7 +834569,8 @@ label_BFC40AF4:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40AF8: 284100FF slti $at, $v0, 255 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (255) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (255) ? 1 : 0);
+ PGXP_ALU(0x284100FFu, cpu->gpr[1], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80058AF8u);
#endif
@@ -832527,7 +834827,8 @@ label_BFC40B28:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40B30: 28411000 slti $at, $v0, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0);
+ PGXP_ALU(0x28411000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80058B30u);
#endif
@@ -834354,7 +836655,8 @@ label_BFC40D18:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40D1C: 28410CCD slti $at, $v0, 3277 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3277) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3277) ? 1 : 0);
+ PGXP_ALU(0x28410CCDu, cpu->gpr[1], _pgx1, 0x0CCDu); }
#ifdef PSX_COSIM
cosim_instr(0x80058D1Cu);
#endif
@@ -834433,7 +836735,8 @@ label_BFC40D28:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40D2C: 28410017 slti $at, $v0, 23 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0);
+ PGXP_ALU(0x28410017u, cpu->gpr[1], _pgx1, 0x0017u); }
#ifdef PSX_COSIM
cosim_instr(0x80058D2Cu);
#endif
@@ -834512,7 +836815,8 @@ label_BFC40D38:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40D3C: 2841000A slti $at, $v0, 10 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (10) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (10) ? 1 : 0);
+ PGXP_ALU(0x2841000Au, cpu->gpr[1], _pgx1, 0x000Au); }
#ifdef PSX_COSIM
cosim_instr(0x80058D3Cu);
#endif
@@ -834972,7 +837276,8 @@ label_BFC40DA0:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC40DA8: 28411000 slti $at, $v0, 4096 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0);
+ PGXP_ALU(0x28411000u, cpu->gpr[1], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80058DA8u);
#endif
@@ -835579,7 +837884,8 @@ label_BFC40E24:
psx_cyc_step(cpu, 0x202u);
#endif
/* 0xBFC40E54: 29210004 slti $at, $t1, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (4) ? 1 : 0);
+ PGXP_ALU(0x29210004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80058E54u);
#endif
@@ -835717,7 +838023,8 @@ label_BFC40E60:
psx_cyc_step(cpu, 0x8002u);
#endif
/* 0xBFC40E8C: 29E10004 slti $at, $t7, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (4) ? 1 : 0);
+ PGXP_ALU(0x29E10004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80058E8Cu);
#endif
@@ -840689,7 +842996,8 @@ label_BFC413B0:
psx_cyc_step(cpu, 0x18u);
#endif
/* 0xBFC413BC: 308300FF andi $v1, $a0, 0xFF */
- cpu->gpr[3] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800593BCu);
#endif
@@ -841309,7 +843617,8 @@ label_BFC41468:
psx_cyc_step(cpu, 0x1008000u);
#endif
/* 0xBFC41480: 31F80100 andi $t8, $t7, 0x100 */
- cpu->gpr[24] = cpu->gpr[15] & 0x100u;
+ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x100u;
+ PGXP_ALU(0x31F80100u, cpu->gpr[24], _pgx1, 0x0100u); }
#ifdef PSX_COSIM
cosim_instr(0x80059480u);
#endif
@@ -842906,7 +845215,8 @@ label_BFC41670:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC4167C: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005967Cu);
#endif
@@ -843344,7 +845654,8 @@ label_BFC41708:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC41718: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059718u);
#endif
@@ -843397,7 +845708,8 @@ label_BFC41708:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC41730: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059730u);
#endif
@@ -843488,7 +845800,8 @@ label_BFC41740:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC4174C: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005974Cu);
#endif
@@ -844362,7 +846675,8 @@ label_BFC41848:
psx_cyc_step(cpu, 0x8004u);
#endif
/* 0xBFC41860: 304F0008 andi $t7, $v0, 0x8 */
- cpu->gpr[15] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304F0008u, cpu->gpr[15], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80059860u);
#endif
@@ -845100,7 +847414,8 @@ label_BFC4192C:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC41958: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059958u);
#endif
@@ -845108,7 +847423,8 @@ label_BFC4192C:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC4195C: 304E000F andi $t6, $v0, 0xF */
- cpu->gpr[14] = cpu->gpr[2] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFu;
+ PGXP_ALU(0x304E000Fu, cpu->gpr[14], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x8005995Cu);
#endif
@@ -845128,7 +847444,8 @@ label_BFC4192C:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC41964: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059964u);
#endif
@@ -845217,7 +847534,8 @@ label_BFC4192C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC4198C: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005998Cu);
#endif
@@ -845228,7 +847546,8 @@ label_BFC4192C:
psx_cyc_step(cpu, 0x8010u);
#endif
/* 0xBFC41990: 308F000F andi $t7, $a0, 0xF */
- cpu->gpr[15] = cpu->gpr[4] & 0xFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] & 0xFu;
+ PGXP_ALU(0x308F000Fu, cpu->gpr[15], _pgx1, 0x000Fu); }
#ifdef PSX_COSIM
cosim_instr(0x80059990u);
#endif
@@ -845251,7 +847570,8 @@ label_BFC4192C:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC4199C: 30A500FF andi $a1, $a1, 0xFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu;
+ PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005999Cu);
#endif
@@ -845289,7 +847609,8 @@ label_BFC4192C:
psx_cyc_step(cpu, 0x2000040u);
#endif
/* 0xBFC419AC: 30D90008 andi $t9, $a2, 0x8 */
- cpu->gpr[25] = cpu->gpr[6] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] & 0x8u;
+ PGXP_ALU(0x30D90008u, cpu->gpr[25], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x800599ACu);
#endif
@@ -845444,7 +847765,8 @@ label_BFC419C8:
psx_cyc_step(cpu, 0x8u);
#endif
/* 0xBFC419D4: 306300FF andi $v1, $v1, 0xFF */
- cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu;
+ PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800599D4u);
#endif
@@ -845494,7 +847816,8 @@ label_BFC419C8:
psx_cyc_step(cpu, 0x600u);
#endif
/* 0xBFC419E8: 312A00FF andi $t2, $t1, 0xFF */
- cpu->gpr[10] = cpu->gpr[9] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFu;
+ PGXP_ALU(0x312A00FFu, cpu->gpr[10], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x800599E8u);
#endif
@@ -846117,7 +848440,8 @@ label_BFC41ABC:
psx_cyc_step(cpu, 0x1Au);
#endif
/* 0xBFC41AC0: 0064082B sltu $at, $v1, $a0 */
- cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0);
+ PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059AC0u);
#endif
@@ -846327,7 +848651,8 @@ label_BFC41AF0:
psx_cyc_step(cpu, 0x1004u);
#endif
/* 0xBFC41B04: 304C0008 andi $t4, $v0, 0x8 */
- cpu->gpr[12] = cpu->gpr[2] & 0x8u;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x8u;
+ PGXP_ALU(0x304C0008u, cpu->gpr[12], _pgx1, 0x0008u); }
#ifdef PSX_COSIM
cosim_instr(0x80059B04u);
#endif
@@ -846500,7 +848825,8 @@ label_BFC41B24:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC41B30: 31CF00FF andi $t7, $t6, 0xFF */
- cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu;
+ PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059B30u);
#endif
@@ -846539,7 +848865,8 @@ label_BFC41B24:
psx_cyc_step(cpu, 0x4u);
#endif
/* 0xBFC41B40: 304200FF andi $v0, $v0, 0xFF */
- cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu;
+ PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059B40u);
#endif
@@ -846599,7 +848926,8 @@ label_BFC41B48:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC41B4C: 308400FF andi $a0, $a0, 0xFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu;
+ PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059B4Cu);
#endif
@@ -846907,7 +849235,8 @@ label_BFC41BA8:
psx_cyc_step(cpu, 0x6u);
#endif
/* 0xBFC41BC0: 00411024 and $v0, $v0, $at */
- cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1];
+ PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059BC0u);
#endif
@@ -847246,7 +849575,8 @@ label_BFC41C0C:
psx_cyc_step(cpu, 0x102u);
#endif
/* 0xBFC41C3C: 29010004 slti $at, $t0, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0);
+ PGXP_ALU(0x29010004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80059C3Cu);
#endif
@@ -847381,7 +849711,8 @@ label_BFC41C4C:
psx_cyc_step(cpu, 0x1002u);
#endif
/* 0xBFC41C6C: 29810004 slti $at, $t4, 4 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0);
+ PGXP_ALU(0x29810004u, cpu->gpr[1], _pgx1, 0x0004u); }
#ifdef PSX_COSIM
cosim_instr(0x80059C6Cu);
#endif
@@ -847599,7 +849930,8 @@ label_BFC41C80:
psx_cyc_step(cpu, 0x40u);
#endif
/* 0xBFC41CB4: 30C6FFFF andi $a2, $a2, 0xFFFF */
- cpu->gpr[6] = cpu->gpr[6] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFFFFu;
+ PGXP_ALU(0x30C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059CB4u);
#endif
@@ -847992,7 +850324,8 @@ label_BFC41D18:
psx_cyc_step(cpu, 0x10Au);
#endif
/* 0xBFC41D24: 00614024 and $t0, $v1, $at */
- cpu->gpr[8] = cpu->gpr[3] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[3] & cpu->gpr[1];
+ PGXP_ALU(0x00614024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059D24u);
#endif
@@ -848080,7 +850413,8 @@ label_BFC41D30:
psx_cyc_step(cpu, 0x608u);
#endif
/* 0xBFC41D44: 00695026 xor $t2, $v1, $t1 */
- cpu->gpr[10] = cpu->gpr[3] ^ cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[3] ^ cpu->gpr[9];
+ PGXP_ALU(0x00695026u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059D44u);
#endif
@@ -848088,7 +850422,8 @@ label_BFC41D30:
psx_cyc_step(cpu, 0xC04u);
#endif
/* 0xBFC41D48: 01425824 and $t3, $t2, $v0 */
- cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[2];
+ PGXP_ALU(0x01425824u, cpu->gpr[11], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059D48u);
#endif
@@ -848152,7 +850487,8 @@ label_BFC41D54:
psx_cyc_step(cpu, 0x3008u);
#endif
/* 0xBFC41D5C: 006C6826 xor $t5, $v1, $t4 */
- cpu->gpr[13] = cpu->gpr[3] ^ cpu->gpr[12];
+ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[3] ^ cpu->gpr[12];
+ PGXP_ALU(0x006C6826u, cpu->gpr[13], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059D5Cu);
#endif
@@ -848163,7 +850499,8 @@ label_BFC41D54:
psx_cyc_step(cpu, 0x6004u);
#endif
/* 0xBFC41D60: 01A27024 and $t6, $t5, $v0 */
- cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[2];
+ PGXP_ALU(0x01A27024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059D60u);
#endif
@@ -848433,7 +850770,8 @@ label_BFC41DA4:
psx_cyc_step(cpu, 0x8022u);
#endif
/* 0xBFC41DBC: 01E5082A slt $at, $t7, $a1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x01E5082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059DBCu);
#endif
@@ -848722,7 +851060,8 @@ label_BFC41DFC:
psx_cyc_step(cpu, 0x122u);
#endif
/* 0xBFC41E08: 0105082A slt $at, $t0, $a1 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[5] ? 1 : 0);
+ PGXP_ALU(0x0105082Au, cpu->gpr[1], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059E08u);
#endif
@@ -848903,7 +851242,8 @@ label_BFC41E30:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC41E30: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059E30u);
#endif
@@ -848911,7 +851251,8 @@ label_BFC41E30:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC41E34: 28810003 slti $at, $a0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80059E34u);
#endif
@@ -848919,7 +851260,8 @@ label_BFC41E30:
psx_cyc_step(cpu, 0x20u);
#endif
/* 0xBFC41E38: 30A5FFFF andi $a1, $a1, 0xFFFF */
- cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu;
+ PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059E38u);
#endif
@@ -849151,7 +851493,8 @@ label_BFC41E78:
psx_cyc_step(cpu, 0x1000080u);
#endif
/* 0xBFC41E78: 30F80010 andi $t8, $a3, 0x10 */
- cpu->gpr[24] = cpu->gpr[7] & 0x10u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] & 0x10u;
+ PGXP_ALU(0x30F80010u, cpu->gpr[24], _pgx1, 0x0010u); }
#ifdef PSX_COSIM
cosim_instr(0x80059E78u);
#endif
@@ -849169,7 +851512,8 @@ label_BFC41E78:
psx_cyc_step(cpu, 0x2000080u);
#endif
/* 0xBFC41E80: 30F90001 andi $t9, $a3, 0x1 */
- cpu->gpr[25] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30F90001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80059E80u);
#endif
@@ -849210,7 +851554,8 @@ label_BFC41E84:
psx_cyc_step(cpu, 0x2000080u);
#endif
/* 0xBFC41E88: 30F90001 andi $t9, $a3, 0x1 */
- cpu->gpr[25] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30F90001u, cpu->gpr[25], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80059E88u);
#endif
@@ -849238,7 +851583,8 @@ label_BFC41E8C:
psx_cyc_step(cpu, 0x280u);
#endif
/* 0xBFC41E90: 30E91000 andi $t1, $a3, 0x1000 */
- cpu->gpr[9] = cpu->gpr[7] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] & 0x1000u;
+ PGXP_ALU(0x30E91000u, cpu->gpr[9], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80059E90u);
#endif
@@ -849336,7 +851682,8 @@ label_BFC41EA0:
psx_cyc_step(cpu, 0x280u);
#endif
/* 0xBFC41EA4: 30E91000 andi $t1, $a3, 0x1000 */
- cpu->gpr[9] = cpu->gpr[7] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] & 0x1000u;
+ PGXP_ALU(0x30E91000u, cpu->gpr[9], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80059EA4u);
#endif
@@ -849368,7 +851715,8 @@ label_BFC41EA8:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC41EA8: 30E80001 andi $t0, $a3, 0x1 */
- cpu->gpr[8] = cpu->gpr[7] & 0x1u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0x1u;
+ PGXP_ALU(0x30E80001u, cpu->gpr[8], _pgx1, 0x0001u); }
#ifdef PSX_COSIM
cosim_instr(0x80059EA8u);
#endif
@@ -849386,7 +851734,8 @@ label_BFC41EA8:
psx_cyc_step(cpu, 0x280u);
#endif
/* 0xBFC41EB0: 30E91000 andi $t1, $a3, 0x1000 */
- cpu->gpr[9] = cpu->gpr[7] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] & 0x1000u;
+ PGXP_ALU(0x30E91000u, cpu->gpr[9], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80059EB0u);
#endif
@@ -849437,7 +851786,8 @@ label_BFC41EB8:
psx_cyc_step(cpu, 0x280u);
#endif
/* 0xBFC41EB8: 30E91000 andi $t1, $a3, 0x1000 */
- cpu->gpr[9] = cpu->gpr[7] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] & 0x1000u;
+ PGXP_ALU(0x30E91000u, cpu->gpr[9], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x80059EB8u);
#endif
@@ -849589,7 +851939,8 @@ label_BFC41ED8:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC41ED8: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059ED8u);
#endif
@@ -849597,7 +851948,8 @@ label_BFC41ED8:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC41EDC: 28810003 slti $at, $a0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80059EDCu);
#endif
@@ -849790,7 +852142,8 @@ label_BFC41F10:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC41F14: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059F14u);
#endif
@@ -849849,7 +852202,8 @@ label_BFC41F10:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC41F30: 28810003 slti $at, $a0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80059F30u);
#endif
@@ -849990,7 +852344,8 @@ label_BFC41F54:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC41F54: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059F54u);
#endif
@@ -850058,7 +852413,8 @@ label_BFC41F54:
psx_cyc_step(cpu, 0x3000001u);
#endif
/* 0xBFC41F74: 0300C827 nor $t9, $t8, $zero */
- cpu->gpr[25] = ~(cpu->gpr[24] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[24] | cpu->gpr[0]);
+ PGXP_ALU(0x0300C827u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059F74u);
#endif
@@ -850066,7 +852422,8 @@ label_BFC41F54:
psx_cyc_step(cpu, 0x2004100u);
#endif
/* 0xBFC41F78: 01D94024 and $t0, $t6, $t9 */
- cpu->gpr[8] = cpu->gpr[14] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[14] & cpu->gpr[25];
+ PGXP_ALU(0x01D94024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x80059F78u);
#endif
@@ -850139,7 +852496,8 @@ label_BFC41F88:
psx_cyc_step(cpu, 0x10u);
#endif
/* 0xBFC41F88: 3084FFFF andi $a0, $a0, 0xFFFF */
- cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu;
+ PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x80059F88u);
#endif
@@ -850147,7 +852505,8 @@ label_BFC41F88:
psx_cyc_step(cpu, 0x12u);
#endif
/* 0xBFC41F8C: 28810003 slti $at, $a0, 3 */
- cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0);
+ PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); }
#ifdef PSX_COSIM
cosim_instr(0x80059F8Cu);
#endif
@@ -850709,7 +853068,8 @@ label_BFC42024:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC42038: 00401027 nor $v0, $v0, $zero */
- cpu->gpr[2] = ~(cpu->gpr[2] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = ~(cpu->gpr[2] | cpu->gpr[0]);
+ PGXP_ALU(0x00401027u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A038u);
#endif
@@ -852183,7 +854543,8 @@ label_BFC421E0:
psx_cyc_step(cpu, 0x3000100u);
#endif
/* 0xBFC42210: 03194024 and $t0, $t8, $t9 */
- cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25];
+ PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A210u);
#endif
@@ -852191,7 +854552,8 @@ label_BFC421E0:
psx_cyc_step(cpu, 0x700u);
#endif
/* 0xBFC42214: 01095024 and $t2, $t0, $t1 */
- cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A214u);
#endif
@@ -852554,7 +854916,8 @@ label_BFC4226C:
psx_cyc_step(cpu, 0x11800u);
#endif
/* 0xBFC4227C: 020B6024 and $t4, $s0, $t3 */
- cpu->gpr[12] = cpu->gpr[16] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[16] & cpu->gpr[11];
+ PGXP_ALU(0x020B6024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A27Cu);
#endif
@@ -852565,7 +854928,8 @@ label_BFC4226C:
psx_cyc_step(cpu, 0x7000u);
#endif
/* 0xBFC42280: 018D7024 and $t6, $t4, $t5 */
- cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A280u);
#endif
@@ -852573,7 +854937,8 @@ label_BFC4226C:
psx_cyc_step(cpu, 0x100C000u);
#endif
/* 0xBFC42284: 01CFC024 and $t8, $t6, $t7 */
- cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15];
+ PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A284u);
#endif
@@ -852620,7 +854985,8 @@ label_BFC42290:
psx_cyc_step(cpu, 0x2010001u);
#endif
/* 0xBFC42290: 0200C827 nor $t9, $s0, $zero */
- cpu->gpr[25] = ~(cpu->gpr[16] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[16] | cpu->gpr[0]);
+ PGXP_ALU(0x0200C827u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A290u);
#endif
@@ -852875,7 +855241,8 @@ label_BFC422D8:
psx_cyc_step(cpu, 0x1C00u);
#endif
/* 0xBFC422E8: 014B6024 and $t4, $t2, $t3 */
- cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11];
+ PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A2E8u);
#endif
@@ -852883,7 +855250,8 @@ label_BFC422D8:
psx_cyc_step(cpu, 0x7000u);
#endif
/* 0xBFC422EC: 018D7024 and $t6, $t4, $t5 */
- cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13];
+ PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A2ECu);
#endif
@@ -853633,7 +856001,8 @@ label_BFC423A8:
psx_cyc_step(cpu, 0x180u);
#endif
/* 0xBFC423C0: 30E8FFFF andi $t0, $a3, 0xFFFF */
- cpu->gpr[8] = cpu->gpr[7] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0xFFFFu;
+ PGXP_ALU(0x30E8FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005A3C0u);
#endif
@@ -853780,7 +856149,8 @@ label_BFC423E4:
psx_cyc_step(cpu, 0x5u);
#endif
/* 0xBFC423F8: 00401027 nor $v0, $v0, $zero */
- cpu->gpr[2] = ~(cpu->gpr[2] | cpu->gpr[0]);
+ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = ~(cpu->gpr[2] | cpu->gpr[0]);
+ PGXP_ALU(0x00401027u, cpu->gpr[2], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A3F8u);
#endif
@@ -853788,7 +856158,8 @@ label_BFC423E4:
psx_cyc_step(cpu, 0x4004u);
#endif
/* 0xBFC423FC: 304EFFFF andi $t6, $v0, 0xFFFF */
- cpu->gpr[14] = cpu->gpr[2] & 0xFFFFu;
+ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFFFu;
+ PGXP_ALU(0x304EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005A3FCu);
#endif
@@ -853799,7 +856170,8 @@ label_BFC423E4:
psx_cyc_step(cpu, 0xE000u);
#endif
/* 0xBFC42400: 01AE7824 and $t7, $t5, $t6 */
- cpu->gpr[15] = cpu->gpr[13] & cpu->gpr[14];
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] & cpu->gpr[14];
+ PGXP_ALU(0x01AE7824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A400u);
#endif
@@ -853843,7 +856215,8 @@ label_BFC423E4:
psx_cyc_step(cpu, 0x3000004u);
#endif
/* 0xBFC42414: 0302C824 and $t9, $t8, $v0 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[2];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[2];
+ PGXP_ALU(0x0302C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A414u);
#endif
@@ -854416,7 +856789,8 @@ label_BFC424A8:
psx_cyc_step(cpu, 0xC000u);
#endif
/* 0xBFC424C8: 31CF3FFF andi $t7, $t6, 0x3FFF */
- cpu->gpr[15] = cpu->gpr[14] & 0x3FFFu;
+ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x3FFFu;
+ PGXP_ALU(0x31CF3FFFu, cpu->gpr[15], _pgx1, 0x3FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005A4C8u);
#endif
@@ -854471,7 +856845,8 @@ label_BFC424A8:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC424E0: 33283FFF andi $t0, $t9, 0x3FFF */
- cpu->gpr[8] = cpu->gpr[25] & 0x3FFFu;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x3FFFu;
+ PGXP_ALU(0x33283FFFu, cpu->gpr[8], _pgx1, 0x3FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005A4E0u);
#endif
@@ -854514,7 +856889,8 @@ label_BFC424A8:
psx_cyc_step(cpu, 0xC00u);
#endif
/* 0xBFC424F4: 314B3FFF andi $t3, $t2, 0x3FFF */
- cpu->gpr[11] = cpu->gpr[10] & 0x3FFFu;
+ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x3FFFu;
+ PGXP_ALU(0x314B3FFFu, cpu->gpr[11], _pgx1, 0x3FFFu); }
#ifdef PSX_COSIM
cosim_instr(0x8005A4F4u);
#endif
@@ -854557,7 +856933,8 @@ label_BFC424A8:
psx_cyc_step(cpu, 0x6000u);
#endif
/* 0xBFC42508: 31AE1000 andi $t6, $t5, 0x1000 */
- cpu->gpr[14] = cpu->gpr[13] & 0x1000u;
+ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x1000u;
+ PGXP_ALU(0x31AE1000u, cpu->gpr[14], _pgx1, 0x1000u); }
#ifdef PSX_COSIM
cosim_instr(0x8005A508u);
#endif
@@ -856355,7 +858732,8 @@ label_BFC4270C:
psx_cyc_step(cpu, 0x40C000u);
#endif
/* 0xBFC42728: 01D67824 and $t7, $t6, $s6 */
- cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[22];
+ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[22];
+ PGXP_ALU(0x01D67824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A728u);
#endif
@@ -856577,7 +858955,8 @@ label_BFC4276C:
psx_cyc_step(cpu, 0x3020000u);
#endif
/* 0xBFC42774: 0311C824 and $t9, $t8, $s1 */
- cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[17];
+ { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[17];
+ PGXP_ALU(0x0311C824u, cpu->gpr[25], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A774u);
#endif
@@ -856648,7 +859027,8 @@ label_BFC42780:
psx_cyc_step(cpu, 0x700u);
#endif
/* 0xBFC4278C: 01095024 and $t2, $t0, $t1 */
- cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9];
+ PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A78Cu);
#endif
@@ -856866,7 +859246,8 @@ label_BFC427C8:
psx_cyc_step(cpu, 0x406000u);
#endif
/* 0xBFC427D0: 01B67024 and $t6, $t5, $s6 */
- cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[22];
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[22];
+ PGXP_ALU(0x01B67024u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A7D0u);
#endif
@@ -856992,7 +859373,8 @@ label_BFC427F8:
psx_cyc_step(cpu, 0x1008002u);
#endif
/* 0xBFC42800: 01E1C024 and $t8, $t7, $at */
- cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[1];
+ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[1];
+ PGXP_ALU(0x01E1C024u, cpu->gpr[24], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A800u);
#endif
@@ -857062,7 +859444,8 @@ label_BFC42810:
psx_cyc_step(cpu, 0x2000100u);
#endif
/* 0xBFC42818: 33288000 andi $t0, $t9, 0x8000 */
- cpu->gpr[8] = cpu->gpr[25] & 0x8000u;
+ { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x8000u;
+ PGXP_ALU(0x33288000u, cpu->gpr[8], _pgx1, 0x8000u); }
#ifdef PSX_COSIM
cosim_instr(0x8005A818u);
#endif
@@ -857558,7 +859941,8 @@ label_BFC42898:
psx_cyc_step(cpu, 0x6002u);
#endif
/* 0xBFC428B0: 01A17027 nor $t6, $t5, $at */
- cpu->gpr[14] = ~(cpu->gpr[13] | cpu->gpr[1]);
+ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = ~(cpu->gpr[13] | cpu->gpr[1]);
+ PGXP_ALU(0x01A17027u, cpu->gpr[14], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A8B0u);
#endif
@@ -857566,7 +859950,8 @@ label_BFC42898:
psx_cyc_step(cpu, 0xC800u);
#endif
/* 0xBFC428B4: 016E7824 and $t7, $t3, $t6 */
- cpu->gpr[15] = cpu->gpr[11] & cpu->gpr[14];
+ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[11] & cpu->gpr[14];
+ PGXP_ALU(0x016E7824u, cpu->gpr[15], _pgx1, _pgx2); }
#ifdef PSX_COSIM
cosim_instr(0x8005A8B4u);
#endif
diff --git a/overlay_toolchain/bios/OpenBIOS.toml b/overlay_toolchain/bios/OpenBIOS.toml
new file mode 100644
index 00000000..141da1a4
--- /dev/null
+++ b/overlay_toolchain/bios/OpenBIOS.toml
@@ -0,0 +1,152 @@
+# bios/OpenBIOS.toml — BIOS build profile for PCSX-Redux OpenBIOS.
+#
+# OpenBIOS is the PCSX-Redux project's from-scratch, MIT-licensed PS1 BIOS
+# (https://github.com/grumpycoders/pcsx-redux, src/mips/openbios). MIT means
+# the image is REDISTRIBUTABLE: a game verified against it ships its BIOS
+# with the build and the player supplies only a disc (redistributable=true
+# below removes the whole BIOS-selection surface at runtime).
+#
+# Pinned build (bios/openbios.bin + the ELFs the seeds derive from):
+# pcsx-redux 55fbf0468345acfbe5512628a3be5c0cfe3f22e7
+# uC-sdk 69e06871824e2d62069487a7426ded09090ceb69
+# toolchain g++-mipsel-none-elf (GCC 16.1.0, static.grumpycoder.net build)
+# build make -C src/mips/openbios PREFIX=mipsel-none-elf FORMAT=elf32-littlemips
+# Regenerating seeds after a re-pin (--extra is REQUIRED to keep the 5
+# empirically-discovered dispatch-miss seeds; without it they are silently
+# dropped and the regenerated set has 641 entries, not 646):
+# tools/gen_bios_seeds_from_elf.py --profile bios/OpenBIOS.toml \
+# --elf .../openbios.elf --elf .../shell.elf \
+# --extra recompiler/seeds/openbios_dispatch_miss.json \
+# --out recompiler/seeds/openbios_elf_seeds.json
+#
+# The address model below was established by direct disassembly of the boot
+# path (reset vector -> copy loops), each copy confirmed twice (boot + the
+# warm-restart path reloading lengths from ROM constants; the shell length
+# additionally confirmed by the blob's own self-relocation constants).
+
+[program]
+name = "PCSX-Redux OpenBIOS"
+id = "OPENBIOS"
+rom = "bios/openbios.bin"
+load_address = "0xBFC00000"
+entry_pc = "0xBFC00000"
+text_size = "0x80000"
+
+[program.image]
+sha256 = "fabe498fbf224e4721f12f31b6f5fe0659205e341dc4e5c5f91b9bd1a1011c57"
+license = "MIT"
+redistributable = true
+
+[recompiler]
+seeds = "recompiler/seeds/openbios_elf_seeds.json"
+out_dir = "generated"
+out_stem = "OpenBIOS"
+strict = true
+
+# OpenBIOS's boot-time bulk code copies. Windows are BYTE-PROVEN against
+# openbios.elf (readelf -lW program headers give the .data LMA; the embedded
+# shell blob was located by content search; both ranges memcmp-verified
+# ELF-content == image-content — an earlier hand-disassembly of the copy
+# routines mis-read both source offsets by 0xB8/0x2C0-class deltas, which
+# emitted every shell/ramtext function from shifted bytes):
+# - kernel .data (VMA 0x500, WAX — code+data): LMA 0xBFC1E4D4, FileSiz
+# 0x46A0, copied to RAM 0x500 at boot. Byte-verbatim -> kernel_bless.
+# - shell blob (objcopy of shell.elf, linked at 0x80030000): embedded in
+# .rodata at ROM 0xA500, size 0x13D44, copied to RAM 0x80030000. The
+# first-crash a1=0xBFC1E244 was exactly this blob's END pointer mid-copy.
+# NOT modeled, by design:
+# - the 4x16-byte vector stubs copied to RAM 0x80/0xA0/0xB0/0xC0
+# (runtime-written trampolines -> dirty-RAM interp territory, rule 18);
+# - the RAM->RAM A0-table move (0x4844 -> 0x200): nothing dispatches TO the
+# table, discovery gets entries from ELF symbols, and runtime dispatch
+# keys on the actual jump targets.
+[recompiler.address_model]
+normalize_mask = "0x1FFFFFFF"
+
+[[recompiler.address_model.copy]]
+name = "Kernel ramtext"
+rom_lo = "0x1FC1E4D4"
+rom_hi = "0x1FC22B74"
+ram_lo = "0x00000500"
+runtime_base = "0x00000500"
+dispatch_key = "ram"
+kernel_bless = true
+
+[[recompiler.address_model.copy]]
+name = "Shell"
+rom_lo = "0x1FC0A500"
+rom_hi = "0x1FC1E244"
+ram_lo = "0x00030000"
+runtime_base = "0x80030000"
+dispatch_key = "rom"
+kernel_bless = false
+
+# Kernel-RAM RANGES the guest's Psy-Q libapi patchers overwrite at runtime
+# (CLAUDE.md rule 18; docs/dynamic_handler_install.md). See SCPH1001.toml for
+# what `len` and `resume` mean. OpenBIOS declared none until 2026-09-11; the
+# consequence was that its exception handler failed the kernel-bless memcmp
+# from the first card access onward and interpreted for the life of the
+# process — 1.22 billion instructions in one measured title.
+#
+# Measured on a live boot of Breath of Fire III (SLPS-00990, Psy-Q SDK 3.70)
+# against the ROM source, 30 s in. The shapes are the same three the retail
+# image shows, because the patchers are the game's, not the BIOS's.
+
+[[recompiler.install_slots]]
+ram_addr = "0x000027B4" # exceptionHandler: register-save prologue
+len = "0x30" # shifted two words + an inserted mfc0 v0,Cause
+resume = "fallthrough"
+
+[[recompiler.install_slots]]
+ram_addr = "0x0000281C" # stub into exceptionHandlerCardFastTrack
+len = "0x10" # lui/addiu/jalr/nop over ROM zeros; installed
+resume = "jalr" # on the first card access, not at boot
+
+[[recompiler.install_slots]]
+ram_addr = "0x0000357C" # exceptionHandlerCardFastTrack: the kernel's
+len = "0x10" # card handler replaced by jr into boot EXE
+resume = "none" # 0x8017EAA0 (_patch_card payload)
+
+# NOT declared: the three pad-table words after readPadHighLevel (0x45FC,
+# 0x460C, 0x461C). They are data, not instructions, so they unbless nothing
+# and a range there would only widen what the verifier stops checking.
+
+# HLE anchors: only the boot-skip anchor is exported. deliver_event_ret is
+# deliberately ABSENT (0) until the B0 event services are validated against
+# this kernel's EvCB behavior (they are believed compatible — OpenBIOS
+# reimplements the documented kernel ABI, EvCB anchor 0x120/0x124, TCB
+# 0x108/0x110 — but believed is not verified). Absent = the kernel-call HLE
+# tier is STRUCTURALLY UNAVAILABLE here and config/env cannot force it on.
+#
+# That refusal is scoped to kernel calls ONLY. The boot-skip is a separate axis
+# gated on shell_entry_phys alone and works under pure LLE, so `bios_hle` (and
+# the deprecated `fast_boot` alias) skips the boot animation and goes straight
+# to the game on THIS image exactly as it does on retail SCPH-1001 — the flag
+# means one thing on every BIOS. Both axes are decided in one pure place,
+# psx_bios_hle_plan() (runtime/include/bios_hle_plan.h), which exists because
+# deriving the boot-skip from the anchor-gated call tier silently took the skip
+# away on this image (fixed 2026-07-27).
+#
+# shell_entry_phys was verified against the generated C (2026-07-23):
+# - startShell (ELF symbol, ROM 0xBFC074DC) ends `lui $t9,0x8003; jr $t9`
+# (0xBFC07534/38) — a TAIL jump to the RAM shell copy at 0x80030000
+# that goes through the dispatch trampoline, where the hook fires on
+# the pre-normalize phys 0x00030000;
+# - $ra at that point is the jal link 0xBFC06EA8 (startShell restores its
+# stack before the tail jump), so the intercept's resume-at-$ra lands
+# exactly at the shell call's continuation;
+# - that continuation OVERWRITES $v0 immediately (addiu $v0,$zero,8 — a
+# boot-progress POST byte), so the intercept's v0=0 is never observed,
+# and the boot proceeds unconditionally to the SYSTEM.CNF/EXE load
+# (gameMainThunk), exactly the retail LoadRunShell contract the skip
+# models. The shell's own animation (waitVSync/flip/convexHull in
+# shell.elf) is the only thing skipped.
+[recompiler.runtime_exports]
+shell_entry_phys = "0x00030000"
+
+# No [runtime] block: a BIOS profile states facts about an image, never runtime
+# preferences, and load_bios_config rejects one outright. This file used to end
+# with `[runtime] bios_hle = false`, which nothing read — the recompiler parsed
+# it into a field with no consumers. Runtime options live in game.toml /
+# settings.toml; per-image HLE capability is expressed by which anchors
+# [recompiler.runtime_exports] above does and does not export.
diff --git a/overlay_toolchain/bios/SCPH1001.toml b/overlay_toolchain/bios/SCPH1001.toml
new file mode 100644
index 00000000..5f5b39b8
--- /dev/null
+++ b/overlay_toolchain/bios/SCPH1001.toml
@@ -0,0 +1,138 @@
+# bios/SCPH1001.toml — BIOS build profile for the retail Sony SCPH-1001 image.
+#
+# One profile per BIOS image. Consumed by `psxrecomp-bios --config`, by
+# tools/regen_bios.sh (which reads rom/seeds/out_dir/out_stem from here), and
+# by tools/bios_emitter_fingerprint.sh (which hashes this file, the seeds and
+# the ROM into the generated/.emitter.sha staleness stamp).
+#
+# The .BIN image itself stays untracked (bios/* gitignore rule) — profiles are
+# the only tracked contents of this directory.
+
+[program]
+name = "Sony SCPH-1001 BIOS"
+id = "SCPH-1001"
+rom = "bios/SCPH1001.BIN"
+load_address = "0xBFC00000"
+entry_pc = "0xBFC00000"
+text_size = "0x80000"
+
+# Declared identity. The emitter refuses to generate from any other image
+# (main_bios.cpp's declared-identity gate), which is the point: the seeds in
+# this profile name v2.2 function starts, and generating from a SCPH-1001
+# **v2.0** dump (CRC32 55847D8C, 1994-09-22) produced three boot halts and a
+# live A0 table with 90 of 161 ROM targets uncompiled. That looked like
+# missing upstream seeds and was actually a revision mismatch. An empty pin
+# let it through silently.
+#
+# This is v2.2, 1995-09-18: CRC32 37157331, 512 KiB.
+[program.image]
+sha256 = "71af94d1e47a68c11e8fdb9f8368040601514a42a5a399cda48c7d3bff1e99d3"
+license = "proprietary"
+redistributable = false
+
+[recompiler]
+seeds = "recompiler/seeds/phase2_ghidra_seeds.json"
+out_dir = "generated"
+out_stem = "SCPH1001"
+strict = true
+
+# The BIOS's boot-time bulk copies of CODE out of ROM into RAM. Single source
+# of truth for every relocation window in the recompiler AND in the C it
+# emits (the generated dispatch's normalize(), the kernel-bless guard, the
+# game/shell-overlap tests). Each entry is a CLAIM that the copy is
+# byte-verbatim; the runtime's kernel-bless memcmp enforces it for the
+# bless window. All bounds are [lo, hi) with hi EXCLUSIVE.
+#
+# dispatch_key = "ram": functions in the window are keyed by RAM address
+# (normalize folds ROM -> RAM).
+# dispatch_key = "rom": functions keep their ROM key (normalize folds the
+# RAM alias back to ROM).
+[recompiler.address_model]
+normalize_mask = "0x1FFFFFFF"
+
+[[recompiler.address_model.copy]]
+name = "Kernel Part 2"
+rom_lo = "0x1FC10000"
+rom_hi = "0x1FC18000"
+ram_lo = "0x00000500"
+runtime_base = "0x00000500" # KUSEG — the kernel executes uncached-region code cached at 0x500
+dispatch_key = "ram"
+kernel_bless = true
+
+[[recompiler.address_model.copy]]
+name = "Shell"
+rom_lo = "0x1FC18000"
+rom_hi = "0x1FC43000"
+ram_lo = "0x00030000"
+runtime_base = "0x80030000" # KSEG0 — LoadRunShell jumps to 0x80030000
+dispatch_key = "rom"
+kernel_bless = false
+# NOTE (do not "fix" without evidence): runtime/src/bios_hle.c documents the
+# actual LoadRunShell copy as 0x67FF0 bytes (ROM 0xBFC18000 -> RAM 0x30000..
+# 0x97FF0). Every pre-profile window constant covered only 0x2B000 of that,
+# and dirty_ram_interp.c tracks live RAM in [0x5B000,0x8F000) as an open
+# class-B bug. Widening this window is a REAL BEHAVIOR CHANGE requiring its
+# own evidence-backed commit — it is not a parameterization cleanup.
+
+# Kernel-RAM RANGES the BIOS and the game's Psy-Q libapi patchers overwrite at
+# runtime (CLAUDE.md rule 18; docs/dynamic_handler_install.md). The emitter
+# plants a compare-against-ROM hook at each range start so the guest's patched
+# instructions execute; the runtime excludes the range from the kernel-bless
+# memcmp and resumes native at the range end, so only the patched words
+# interpret.
+#
+# `resume` says how the compiled body picks up again: "jalr" for the classic
+# 4-word lui/addiu/jalr/nop stub (the call returns to ram_addr+0x10),
+# "fallthrough" when the patched words ARE the function, "none" when the patch
+# jumps out and never comes back.
+#
+# Measured on a live boot of Breath of Fire III (SLPS-00990, Psy-Q SDK 3.70)
+# against the ROM source, 30 s in, identical at t+8 s — the patchers are
+# _patch_gte / _patch_card / _patch_card2 / _patch_pad. Every SDK title runs
+# these, so the ranges are a property of the BIOS revision and libapi release,
+# not of one game. Re-measure per SDK version before trusting the numbers:
+# the schema tolerates declaring the union.
+
+[[recompiler.install_slots]]
+ram_addr = "0x00000C88" # exception handler: register-save prologue
+len = "0x30" # shifted two words + an inserted mfc0 v0,Cause
+resume = "fallthrough" # the patched words are the function itself
+
+[[recompiler.install_slots]]
+ram_addr = "0x00000CF0" # SIO data-byte handler dispatch slot
+len = "0x10" # lui/addiu/jalr/nop over ROM zeros
+resume = "jalr" # the stub's call returns to 0x0D00
+
+[[recompiler.install_slots]]
+ram_addr = "0x00004964" # pad driver clear routine, 11 words NOP'd
+len = "0x2C" # (RemovePatchPad / ChgclrPAD family)
+resume = "fallthrough"
+
+[[recompiler.install_slots]]
+ram_addr = "0x00004D98" # _patch_card2 payload: jalr into boot EXE
+len = "0x14" # 0x8017EB6C; the ra landing word is NOP'd too,
+resume = "fallthrough" # so the body resumes past it, not at +0x10
+
+[[recompiler.install_slots]]
+ram_addr = "0x00006444" # _patch_card payload: the kernel's card
+len = "0x10" # handler replaced by jr into boot EXE
+resume = "none" # 0x8017EAA0 — a jr never returns here
+
+# NOT declared: RAM 0x0500, one word of kernel_trampoline_0 cleared to zero
+# (ROM `lui t2, 0`). It differs on every boot, but what writes it is not yet
+# identified, and a range declared on a guess would tell the bless verifier to
+# stop checking a word it should be checking. Rule 14: unknown is acceptable,
+# guessing is not. Undeclared means that body keeps interpreting, exactly as
+# it does today.
+
+# Per-image anchors couriered into the generated C (psx_bios_image) for the
+# runtime HLE tier. Values are FACTS about this image, not tunables: the
+# shell entry is where LoadRunShell (ROM 0xBFC06FF0) jumps after its copy;
+# deliver_event_ret is the instruction after the kernel DeliverEvent loop's
+# `jalr v0` (kernel RAM 0x1718), the $ra a delivered event callback returns
+# through. Omit a key on a BIOS that has no such anchor — the runtime then
+# treats that HLE feature as structurally unavailable instead of firing on a
+# wrong address.
+[recompiler.runtime_exports]
+shell_entry_phys = "0x00030000"
+deliver_event_ret = "0x80001720"
diff --git a/overlay_toolchain/bios/SCPH101.toml b/overlay_toolchain/bios/SCPH101.toml
new file mode 100644
index 00000000..8d18728a
--- /dev/null
+++ b/overlay_toolchain/bios/SCPH101.toml
@@ -0,0 +1,44 @@
+# SCPH-101 (US PSOne, v4.5 05/25/00)
+# Boot + kernel are byte-identical to SCPH1001 (534 seeds kept).
+# Shell (ROM 0x18000+, 568 seeds) differs — runs via dirty-RAM interpreter.
+
+[program]
+name = "SCPH101 BIOS (PSOne)"
+id = "SCPH-101"
+rom = "bios/US-PSOne-SCPH101.BIN"
+load_address = "0xBFC00000"
+entry_pc = "0xBFC00000"
+text_size = "0x80000"
+
+[recompiler]
+seeds = "recompiler/seeds/phase2_ghidra_seeds_SCPH101.json"
+out_dir = "generated"
+out_stem = "SCPH101"
+strict = true
+
+# SCPH101 shares SCPH1001's A0/B0/C0 dispatch tables and kernel layout.
+# The BIOS vector table ROM addresses and aliases are identical.
+[[recompiler.bios_vectors]]
+ram_addr = "0xA0"
+index_reg = 9
+table_rom_addr = "0xBFC04300"
+table_count = 0xC1
+table_ram_addr = "0x200"
+
+[[recompiler.bios_vectors]]
+ram_addr = "0xB0"
+index_reg = 9
+table_rom_addr = "0xBFC10874"
+table_count = 0x44
+table_ram_addr = "0x874"
+
+[[recompiler.bios_vectors]]
+ram_addr = "0xC0"
+index_reg = 9
+table_rom_addr = "0xBFC10674"
+table_count = 0x1E
+table_ram_addr = "0x674"
+
+[[recompiler.bios_aliases]]
+ram_addr = "0xCF0"
+target_key = "0x641C"
diff --git a/overlay_toolchain/bios/SCPH5500.toml b/overlay_toolchain/bios/SCPH5500.toml
new file mode 100644
index 00000000..51408b58
--- /dev/null
+++ b/overlay_toolchain/bios/SCPH5500.toml
@@ -0,0 +1,142 @@
+# bios/SCPH5500.toml — BIOS build profile for the retail Sony SCPH-5500 image
+# (Japan, v3.0 09/09/96).
+#
+# Compared byte for byte with the SCPH-1001 v2.2 image (bios/SCPH1001.toml):
+# ROM [0x00000,0x00080) reset vector 24 bytes differ
+# ROM [0x00080,0x18000) kernel identical
+# ROM [0x18000,0x80000) shell differs
+# So every kernel property below (copy windows, install slots) carries over
+# unchanged. Because the reset vector differs, this image has its own seed
+# list, recompiler/seeds/phase2_ghidra_seeds_SCPH5500.json: the SCPH-1001
+# corpus filtered to seeds whose 64-byte window is identical in both ROMs,
+# plus the architectural vectors and this ROM's own A0/B0/C0 table targets
+# (the same rule as phase2_ghidra_seeds_SCPH5552.json). The shell has no seeds
+# of its own; it runs through the dirty-RAM interpreter (build with
+# -DPSX_SHELLWIN_INTERP=ON), as for SCPH5552.
+#
+# One profile per BIOS image. Consumed by `psxrecomp-bios --config`, by
+# tools/regen_bios.sh and by tools/bios_emitter_fingerprint.sh, as for
+# SCPH1001.toml. The .BIN image itself stays untracked (bios/* gitignore rule).
+
+[program]
+name = "Sony SCPH-5500 BIOS (Japan, v3.0 09/09/96)"
+id = "SCPH-5500"
+rom = "bios/SCPH5500.BIN"
+load_address = "0xBFC00000"
+entry_pc = "0xBFC00000"
+text_size = "0x80000"
+
+# Declared identity. The emitter refuses to generate from any other image
+# (main_bios.cpp's declared-identity gate). SCPH-5500 v3.0: CRC32 FF3EEB8C,
+# 512 KiB.
+[program.image]
+sha256 = "9c0421858e217805f4abe18698afea8d5aa36ff0727eb8484944e00eb5e7eadb"
+license = "proprietary"
+redistributable = false
+
+[recompiler]
+seeds = "recompiler/seeds/phase2_ghidra_seeds_SCPH5500.json"
+out_dir = "generated"
+out_stem = "SCPH5500"
+strict = true
+
+# The BIOS's boot-time bulk copies of CODE out of ROM into RAM. Single source
+# of truth for every relocation window in the recompiler AND in the C it
+# emits (the generated dispatch's normalize(), the kernel-bless guard, the
+# game/shell-overlap tests). Each entry is a CLAIM that the copy is
+# byte-verbatim; the runtime's kernel-bless memcmp enforces it for the
+# bless window. All bounds are [lo, hi) with hi EXCLUSIVE.
+#
+# dispatch_key = "ram": functions in the window are keyed by RAM address
+# (normalize folds ROM -> RAM).
+# dispatch_key = "rom": functions keep their ROM key (normalize folds the
+# RAM alias back to ROM).
+[recompiler.address_model]
+normalize_mask = "0x1FFFFFFF"
+
+[[recompiler.address_model.copy]]
+name = "Kernel Part 2"
+rom_lo = "0x1FC10000"
+rom_hi = "0x1FC18000"
+ram_lo = "0x00000500"
+runtime_base = "0x00000500" # KUSEG — the kernel executes uncached-region code cached at 0x500
+dispatch_key = "ram"
+kernel_bless = true
+
+[[recompiler.address_model.copy]]
+name = "Shell"
+rom_lo = "0x1FC18000"
+rom_hi = "0x1FC43000"
+ram_lo = "0x00030000"
+runtime_base = "0x80030000" # KSEG0 — LoadRunShell jumps to 0x80030000
+dispatch_key = "rom"
+kernel_bless = false
+# NOTE (do not "fix" without evidence): runtime/src/bios_hle.c documents the
+# actual LoadRunShell copy as 0x67FF0 bytes (ROM 0xBFC18000 -> RAM 0x30000..
+# 0x97FF0). Every pre-profile window constant covered only 0x2B000 of that,
+# and dirty_ram_interp.c tracks live RAM in [0x5B000,0x8F000) as an open
+# class-B bug. Widening this window is a REAL BEHAVIOR CHANGE requiring its
+# own evidence-backed commit — it is not a parameterization cleanup.
+
+# Kernel-RAM RANGES the BIOS and the game's Psy-Q libapi patchers overwrite at
+# runtime (CLAUDE.md rule 18; docs/dynamic_handler_install.md). The emitter
+# plants a compare-against-ROM hook at each range start so the guest's patched
+# instructions execute; the runtime excludes the range from the kernel-bless
+# memcmp and resumes native at the range end, so only the patched words
+# interpret.
+#
+# `resume` says how the compiled body picks up again: "jalr" for the classic
+# 4-word lui/addiu/jalr/nop stub (the call returns to ram_addr+0x10),
+# "fallthrough" when the patched words ARE the function, "none" when the patch
+# jumps out and never comes back.
+#
+# Measured on a live boot of Breath of Fire III (SLPS-00990, Psy-Q SDK 3.70)
+# against the ROM source, 30 s in, identical at t+8 s — the patchers are
+# _patch_gte / _patch_card / _patch_card2 / _patch_pad. Every SDK title runs
+# these, so the ranges are a property of the BIOS revision and libapi release,
+# not of one game. Re-measure per SDK version before trusting the numbers:
+# the schema tolerates declaring the union.
+
+[[recompiler.install_slots]]
+ram_addr = "0x00000C88" # exception handler: register-save prologue
+len = "0x30" # shifted two words + an inserted mfc0 v0,Cause
+resume = "fallthrough" # the patched words are the function itself
+
+[[recompiler.install_slots]]
+ram_addr = "0x00000CF0" # SIO data-byte handler dispatch slot
+len = "0x10" # lui/addiu/jalr/nop over ROM zeros
+resume = "jalr" # the stub's call returns to 0x0D00
+
+[[recompiler.install_slots]]
+ram_addr = "0x00004964" # pad driver clear routine, 11 words NOP'd
+len = "0x2C" # (RemovePatchPad / ChgclrPAD family)
+resume = "fallthrough"
+
+[[recompiler.install_slots]]
+ram_addr = "0x00004D98" # _patch_card2 payload: jalr into boot EXE
+len = "0x14" # 0x8017EB6C; the ra landing word is NOP'd too,
+resume = "fallthrough" # so the body resumes past it, not at +0x10
+
+[[recompiler.install_slots]]
+ram_addr = "0x00006444" # _patch_card payload: the kernel's card
+len = "0x10" # handler replaced by jr into boot EXE
+resume = "none" # 0x8017EAA0 — a jr never returns here
+
+# NOT declared: RAM 0x0500, one word of kernel_trampoline_0 cleared to zero
+# (ROM `lui t2, 0`). It differs on every boot, but what writes it is not yet
+# identified, and a range declared on a guess would tell the bless verifier to
+# stop checking a word it should be checking. Rule 14: unknown is acceptable,
+# guessing is not. Undeclared means that body keeps interpreting, exactly as
+# it does today.
+
+# Per-image anchors couriered into the generated C (psx_bios_image) for the
+# runtime HLE tier. Values are FACTS about this image, not tunables: the
+# shell entry is where LoadRunShell (ROM 0xBFC06FF0) jumps after its copy;
+# deliver_event_ret is the instruction after the kernel DeliverEvent loop's
+# `jalr v0` (kernel RAM 0x1718), the $ra a delivered event callback returns
+# through. Omit a key on a BIOS that has no such anchor — the runtime then
+# treats that HLE feature as structurally unavailable instead of firing on a
+# wrong address.
+[recompiler.runtime_exports]
+shell_entry_phys = "0x00030000"
+deliver_event_ret = "0x80001720"
diff --git a/overlay_toolchain/bios/SCPH5501.toml b/overlay_toolchain/bios/SCPH5501.toml
new file mode 100644
index 00000000..ded9be47
--- /dev/null
+++ b/overlay_toolchain/bios/SCPH5501.toml
@@ -0,0 +1,141 @@
+# bios/SCPH5501.toml — BIOS build profile for the retail Sony SCPH-5501 image
+# (USA, v3.0 11/18/96).
+#
+# Compared byte for byte with the SCPH-1001 v2.2 image (bios/SCPH1001.toml):
+# ROM [0x00000,0x00080) reset vector identical
+# ROM [0x00080,0x18000) kernel identical
+# ROM [0x18000,0x80000) shell differs
+# So every kernel property below (copy windows, install slots) carries over
+# unchanged. The seed list, recompiler/seeds/phase2_ghidra_seeds_SCPH5501.json,
+# is the SCPH-1001 corpus filtered to seeds whose 64-byte window is identical
+# in both ROMs, plus the architectural vectors and this ROM's own A0/B0/C0
+# table targets (the same rule as phase2_ghidra_seeds_SCPH5552.json). The shell
+# has no seeds of its own; it runs through the dirty-RAM interpreter (build
+# with -DPSX_SHELLWIN_INTERP=ON), as for SCPH5552.
+#
+# One profile per BIOS image. Consumed by `psxrecomp-bios --config`, by
+# tools/regen_bios.sh and by tools/bios_emitter_fingerprint.sh, as for
+# SCPH1001.toml. The .BIN image itself stays untracked (bios/* gitignore rule).
+
+[program]
+name = "Sony SCPH-5501 BIOS (USA, v3.0 11/18/96)"
+id = "SCPH-5501"
+rom = "bios/SCPH5501.BIN"
+load_address = "0xBFC00000"
+entry_pc = "0xBFC00000"
+text_size = "0x80000"
+
+# Declared identity. The emitter refuses to generate from any other image
+# (main_bios.cpp's declared-identity gate). SCPH-5501 v3.0: CRC32 8D8CB7E4,
+# 512 KiB.
+[program.image]
+sha256 = "11052b6499e466bbf0a709b1f9cb6834a9418e66680387912451e971cf8a1fef"
+license = "proprietary"
+redistributable = false
+
+[recompiler]
+seeds = "recompiler/seeds/phase2_ghidra_seeds_SCPH5501.json"
+out_dir = "generated"
+out_stem = "SCPH5501"
+strict = true
+
+# The BIOS's boot-time bulk copies of CODE out of ROM into RAM. Single source
+# of truth for every relocation window in the recompiler AND in the C it
+# emits (the generated dispatch's normalize(), the kernel-bless guard, the
+# game/shell-overlap tests). Each entry is a CLAIM that the copy is
+# byte-verbatim; the runtime's kernel-bless memcmp enforces it for the
+# bless window. All bounds are [lo, hi) with hi EXCLUSIVE.
+#
+# dispatch_key = "ram": functions in the window are keyed by RAM address
+# (normalize folds ROM -> RAM).
+# dispatch_key = "rom": functions keep their ROM key (normalize folds the
+# RAM alias back to ROM).
+[recompiler.address_model]
+normalize_mask = "0x1FFFFFFF"
+
+[[recompiler.address_model.copy]]
+name = "Kernel Part 2"
+rom_lo = "0x1FC10000"
+rom_hi = "0x1FC18000"
+ram_lo = "0x00000500"
+runtime_base = "0x00000500" # KUSEG — the kernel executes uncached-region code cached at 0x500
+dispatch_key = "ram"
+kernel_bless = true
+
+[[recompiler.address_model.copy]]
+name = "Shell"
+rom_lo = "0x1FC18000"
+rom_hi = "0x1FC43000"
+ram_lo = "0x00030000"
+runtime_base = "0x80030000" # KSEG0 — LoadRunShell jumps to 0x80030000
+dispatch_key = "rom"
+kernel_bless = false
+# NOTE (do not "fix" without evidence): runtime/src/bios_hle.c documents the
+# actual LoadRunShell copy as 0x67FF0 bytes (ROM 0xBFC18000 -> RAM 0x30000..
+# 0x97FF0). Every pre-profile window constant covered only 0x2B000 of that,
+# and dirty_ram_interp.c tracks live RAM in [0x5B000,0x8F000) as an open
+# class-B bug. Widening this window is a REAL BEHAVIOR CHANGE requiring its
+# own evidence-backed commit — it is not a parameterization cleanup.
+
+# Kernel-RAM RANGES the BIOS and the game's Psy-Q libapi patchers overwrite at
+# runtime (CLAUDE.md rule 18; docs/dynamic_handler_install.md). The emitter
+# plants a compare-against-ROM hook at each range start so the guest's patched
+# instructions execute; the runtime excludes the range from the kernel-bless
+# memcmp and resumes native at the range end, so only the patched words
+# interpret.
+#
+# `resume` says how the compiled body picks up again: "jalr" for the classic
+# 4-word lui/addiu/jalr/nop stub (the call returns to ram_addr+0x10),
+# "fallthrough" when the patched words ARE the function, "none" when the patch
+# jumps out and never comes back.
+#
+# Measured on a live boot of Breath of Fire III (SLPS-00990, Psy-Q SDK 3.70)
+# against the ROM source, 30 s in, identical at t+8 s — the patchers are
+# _patch_gte / _patch_card / _patch_card2 / _patch_pad. Every SDK title runs
+# these, so the ranges are a property of the BIOS revision and libapi release,
+# not of one game. Re-measure per SDK version before trusting the numbers:
+# the schema tolerates declaring the union.
+
+[[recompiler.install_slots]]
+ram_addr = "0x00000C88" # exception handler: register-save prologue
+len = "0x30" # shifted two words + an inserted mfc0 v0,Cause
+resume = "fallthrough" # the patched words are the function itself
+
+[[recompiler.install_slots]]
+ram_addr = "0x00000CF0" # SIO data-byte handler dispatch slot
+len = "0x10" # lui/addiu/jalr/nop over ROM zeros
+resume = "jalr" # the stub's call returns to 0x0D00
+
+[[recompiler.install_slots]]
+ram_addr = "0x00004964" # pad driver clear routine, 11 words NOP'd
+len = "0x2C" # (RemovePatchPad / ChgclrPAD family)
+resume = "fallthrough"
+
+[[recompiler.install_slots]]
+ram_addr = "0x00004D98" # _patch_card2 payload: jalr into boot EXE
+len = "0x14" # 0x8017EB6C; the ra landing word is NOP'd too,
+resume = "fallthrough" # so the body resumes past it, not at +0x10
+
+[[recompiler.install_slots]]
+ram_addr = "0x00006444" # _patch_card payload: the kernel's card
+len = "0x10" # handler replaced by jr into boot EXE
+resume = "none" # 0x8017EAA0 — a jr never returns here
+
+# NOT declared: RAM 0x0500, one word of kernel_trampoline_0 cleared to zero
+# (ROM `lui t2, 0`). It differs on every boot, but what writes it is not yet
+# identified, and a range declared on a guess would tell the bless verifier to
+# stop checking a word it should be checking. Rule 14: unknown is acceptable,
+# guessing is not. Undeclared means that body keeps interpreting, exactly as
+# it does today.
+
+# Per-image anchors couriered into the generated C (psx_bios_image) for the
+# runtime HLE tier. Values are FACTS about this image, not tunables: the
+# shell entry is where LoadRunShell (ROM 0xBFC06FF0) jumps after its copy;
+# deliver_event_ret is the instruction after the kernel DeliverEvent loop's
+# `jalr v0` (kernel RAM 0x1718), the $ra a delivered event callback returns
+# through. Omit a key on a BIOS that has no such anchor — the runtime then
+# treats that HLE feature as structurally unavailable instead of firing on a
+# wrong address.
+[recompiler.runtime_exports]
+shell_entry_phys = "0x00030000"
+deliver_event_ret = "0x80001720"
diff --git a/overlay_toolchain/bios/SCPH5552.toml b/overlay_toolchain/bios/SCPH5552.toml
new file mode 100644
index 00000000..a943496e
--- /dev/null
+++ b/overlay_toolchain/bios/SCPH5552.toml
@@ -0,0 +1,153 @@
+# bios/SCPH5552.toml — BIOS build profile for the retail Sony SCPH-5502/5552
+# (Europe) v3.0 01/06/97 image ("System ROM Version 3.0 01/06/97 E",
+# SHA-256 1faaa18fa820a0225e488d9f086296b8e6c46df739666093987ff7d8fd352c09).
+#
+# Derived from bios/SCPH1001.toml. ROM 0x00000-0x17FFF (boot + Kernel Part 1/2)
+# is byte-identical to the US SCPH-1001 v2.2 image, so every kernel anchor
+# below (copy windows, install slots, deliver_event_ret, shell entry) carries
+# over unchanged. Verified by direct comparison of the two dumps, each matching
+# its declared identity (SCPH-1001 CRC32 37157331, SCPH-5552 CRC32 D786F0B9):
+# 0x00000-0x0FFFF and 0x10000-0x17FFF identical; the shell at 0x18000-0x42FFF
+# differs in 155874 bytes.
+#
+# Because the shell DIFFERS from the US image, this profile has no shell seeds:
+# recompiler/seeds/phase2_ghidra_seeds_SCPH5552.json is the SCPH1001 corpus
+# filtered through tools/filter_bios_seeds.py to the kernel region, and every
+# seed in it lies below ROM 0x18000. The shell window runs through the dirty-RAM
+# interpreter (build with -DPSX_SHELLWIN_INTERP=ON) until an EU-shell seed
+# corpus exists.
+#
+# The .BIN image itself stays untracked (bios/* gitignore rule) — profiles are
+# the only tracked contents of this directory.
+
+[program]
+name = "Sony SCPH-5552 BIOS (Europe, v3.0 01/06/97)"
+id = "SCPH-5552"
+rom = "bios/EUR-PSX-SCPH5552.bin"
+load_address = "0xBFC00000"
+entry_pc = "0xBFC00000"
+text_size = "0x80000"
+
+# Declared identity. The emitter refuses to generate from any other image
+# (main_bios.cpp's declared-identity gate). Without this pin a different
+# revision generates silently: the kernel seeds above name v3.0 function starts
+# only because the kernel matches SCPH-1001 v2.2 byte for byte, and a dump that
+# differs there would break that premise without any error.
+#
+# This is v3.0, 1997-01-06: CRC32 D786F0B9, 512 KiB.
+[program.image]
+sha256 = "1faaa18fa820a0225e488d9f086296b8e6c46df739666093987ff7d8fd352c09"
+license = "proprietary"
+redistributable = false
+
+[recompiler]
+seeds = "recompiler/seeds/phase2_ghidra_seeds_SCPH5552.json"
+out_dir = "generated"
+out_stem = "SCPH5552"
+strict = true
+
+# The BIOS's boot-time bulk copies of CODE out of ROM into RAM. Single source
+# of truth for every relocation window in the recompiler AND in the C it
+# emits (the generated dispatch's normalize(), the kernel-bless guard, the
+# game/shell-overlap tests). Each entry is a CLAIM that the copy is
+# byte-verbatim; the runtime's kernel-bless memcmp enforces it for the
+# bless window. All bounds are [lo, hi) with hi EXCLUSIVE.
+#
+# dispatch_key = "ram": functions in the window are keyed by RAM address
+# (normalize folds ROM -> RAM).
+# dispatch_key = "rom": functions keep their ROM key (normalize folds the
+# RAM alias back to ROM).
+[recompiler.address_model]
+normalize_mask = "0x1FFFFFFF"
+
+[[recompiler.address_model.copy]]
+name = "Kernel Part 2"
+rom_lo = "0x1FC10000"
+rom_hi = "0x1FC18000"
+ram_lo = "0x00000500"
+runtime_base = "0x00000500" # KUSEG — the kernel executes uncached-region code cached at 0x500
+dispatch_key = "ram"
+kernel_bless = true
+
+[[recompiler.address_model.copy]]
+name = "Shell"
+rom_lo = "0x1FC18000"
+rom_hi = "0x1FC43000"
+ram_lo = "0x00030000"
+runtime_base = "0x80030000" # KSEG0 — LoadRunShell jumps to 0x80030000
+dispatch_key = "rom"
+kernel_bless = false
+# NOTE (do not "fix" without evidence): runtime/src/bios_hle.c documents the
+# actual LoadRunShell copy as 0x67FF0 bytes (ROM 0xBFC18000 -> RAM 0x30000..
+# 0x97FF0). Every pre-profile window constant covered only 0x2B000 of that,
+# and dirty_ram_interp.c tracks live RAM in [0x5B000,0x8F000) as an open
+# class-B bug. Widening this window is a REAL BEHAVIOR CHANGE requiring its
+# own evidence-backed commit — it is not a parameterization cleanup.
+
+# Kernel-RAM RANGES the BIOS and the game's Psy-Q libapi patchers overwrite at
+# runtime (CLAUDE.md rule 18; docs/dynamic_handler_install.md). The emitter
+# plants a compare-against-ROM hook at each range start so the guest's patched
+# instructions execute; the runtime excludes the range from the kernel-bless
+# memcmp and resumes native at the range end, so only the patched words
+# interpret.
+#
+# `resume` says how the compiled body picks up again: "jalr" for the classic
+# 4-word lui/addiu/jalr/nop stub (the call returns to ram_addr+0x10),
+# "fallthrough" when the patched words ARE the function, "none" when the patch
+# jumps out and never comes back.
+#
+# EVIDENCE LEVEL — read before relying on these. The five ranges were measured
+# on a live SCPH-1001 boot (bios/SCPH1001.toml, Breath of Fire III, Psy-Q SDK
+# 3.70). They are carried here, NOT re-measured on a live SCPH-5552 boot. The
+# basis is that each range maps through Kernel Part 2 (ROM 0x10000 -> RAM
+# 0x500) into bytes verified identical between the two images, so the same
+# libapi patchers land on the same code. That is a strong inference, not an
+# observation. Re-measure on a 5552 boot before treating a divergence here as a
+# recompiler bug.
+
+[[recompiler.install_slots]]
+ram_addr = "0x00000C88" # exception handler: register-save prologue
+len = "0x30" # shifted two words + an inserted mfc0 v0,Cause
+resume = "fallthrough" # the patched words are the function itself
+
+[[recompiler.install_slots]]
+ram_addr = "0x00000CF0" # SIO data-byte handler dispatch slot
+len = "0x10" # lui/addiu/jalr/nop over ROM zeros
+resume = "jalr" # the stub's call returns to 0x0D00
+
+[[recompiler.install_slots]]
+ram_addr = "0x00004964" # pad driver clear routine, 11 words NOP'd
+len = "0x2C" # (RemovePatchPad / ChgclrPAD family)
+resume = "fallthrough"
+
+[[recompiler.install_slots]]
+ram_addr = "0x00004D98" # _patch_card2 payload: jalr into boot EXE
+len = "0x14" # 0x8017EB6C; the ra landing word is NOP'd too,
+resume = "fallthrough" # so the body resumes past it, not at +0x10
+
+[[recompiler.install_slots]]
+ram_addr = "0x00006444" # _patch_card payload: the kernel's card
+len = "0x10" # handler replaced by jr into boot EXE
+resume = "none" # 0x8017EAA0 — a jr never returns here
+
+# NOT declared: RAM 0x0500, one word of kernel_trampoline_0 cleared to zero
+# (ROM `lui t2, 0`). It differs on every boot, but what writes it is not yet
+# identified, and a range declared on a guess would tell the bless verifier to
+# stop checking a word it should be checking. Rule 14: unknown is acceptable,
+# guessing is not. Undeclared means that body keeps interpreting, exactly as
+# it does today.
+
+# Per-image anchors couriered into the generated C (psx_bios_image) for the
+# runtime HLE tier. Values are FACTS about this image, not tunables: the
+# shell entry is where LoadRunShell (ROM 0xBFC06FF0) jumps after its copy;
+# deliver_event_ret is the instruction after the kernel DeliverEvent loop's
+# `jalr v0` (kernel RAM 0x1718), the $ra a delivered event callback returns
+# through. deliver_event_ret lies in the verified-identical kernel (RAM 0x1720,
+# ROM 0x11220). shell_entry_phys is shell RAM, whose contents differ, but the
+# address is LoadRunShell's jump target and LoadRunShell itself (ROM 0x06FF0)
+# is in the identical region, so the target is the same. Omit a key on a
+# BIOS that has no such anchor — the runtime then treats that HLE feature as
+# structurally unavailable instead of firing on a wrong address.
+[recompiler.runtime_exports]
+shell_entry_phys = "0x00030000"
+deliver_event_ret = "0x80001720"
diff --git a/overlay_toolchain/bios_module_build.py b/overlay_toolchain/bios_module_build.py
new file mode 100644
index 00000000..1b1769dd
--- /dev/null
+++ b/overlay_toolchain/bios_module_build.py
@@ -0,0 +1,318 @@
+#!/usr/bin/env python3
+"""bios_module_build.py — build a loadable BIOS backend from the player's own
+retail dump, on the player's machine.
+
+WHY
+===
+A bundled release links only the redistributable OpenBIOS backend: the C a
+retail image recompiles to is a translation of that image's code and never
+ships (docs/BIOS_SELECTION.md). This script is what the runtime runs, from the
+overlay toolchain beside the executable, when the player selects a retail dump:
+it recompiles THAT dump with the bundled psxrecomp-bios and compiles the result
+into a shared library the runtime loads as one more backend
+(runtime/src/psx_bios_module.c, runtime/include/psx_bios_module.h). The same
+interpreter and compiler already turn overlays streamed from the player's disc
+into native code; this is that mechanism applied to the BIOS.
+
+CONTRACT
+========
+The module is a self-contained shared library (no imports from the executable
+on any platform), exporting psx_bios_module_abi / _codegen_hash / _init /
+_backend (see psx_bios_module_glue.c.inc). It is compiled with the same flags
+the executable's own BIOS backend uses (no debug tools, block cycles, game
+dispatch present) plus the two module defines, from THREE translation units:
+
+ _full.c generated function bodies (+ psx_bios_module.h prepended)
+ _dispatch.c generated dispatcher/descriptor (+ psx_bios_module.h prepended)
+ glue.c overlay preamble + BIOS glue (the only exports)
+
+The identity gate is the emitter's own: a profile pins the image's SHA-256 and
+psxrecomp-bios refuses any other image, so a module can only ever be built from
+the exact dump its code describes.
+
+USAGE (as the runtime invokes it)
+ python3 bios_module_build.py --dump --toolchain \
+ --stem SCPH1001 --out /SCPH1001_.so --flavor 0 \
+ --compiler gcc|tcc [--gcc ] [--tcc ]
+
+The toolchain dir is overlay_toolchain/ as tools/release_stage.py stages it
+(python, psxrecomp-bios, include/, bios/*.toml, recompiler/seeds/). Each
+piece can be overridden (--emitter, --include, --profiles, --seeds) so a
+developer tree can run it without staging.
+
+Prints `PSX_BIOS_MODULE_PUBLISHED ` on success; exit 0. Any failure
+leaves no file at --out and exits non-zero with the reason on stdout.
+"""
+
+from __future__ import annotations
+
+import argparse
+import ctypes
+import hashlib
+import os
+import re
+import shutil
+import subprocess
+import sys
+import tempfile
+import zlib
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+sys.path.insert(0, HERE)
+
+import compile_overlays as co # noqa: E402 (shared compiler driver helpers)
+
+
+def die(msg: str) -> "NoReturn":
+ print(f"bios_module_build: ERROR: {msg}")
+ sys.exit(1)
+
+
+def read_profile(path: str) -> dict:
+ """The few keys this needs from a bios/.toml (simple `key = "value"`
+ lines inside [program] / [program.image] / [recompiler]). No TOML library:
+ the pinned interpreter is the stdlib-only embeddable Python."""
+ out = {"rom": "", "sha256": "", "seeds": "", "out_stem": "", "id": ""}
+ section = ""
+ with open(path, encoding="utf-8", errors="replace") as f:
+ for line in f:
+ s = line.split("#", 1)[0].strip()
+ if not s:
+ continue
+ m = re.match(r"^\[([^\]]+)\]$", s)
+ if m:
+ section = m.group(1).strip()
+ continue
+ m = re.match(r'^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*"([^"]*)"', s)
+ if not m:
+ continue
+ k, v = m.group(1), m.group(2)
+ if section == "program" and k == "rom":
+ out["rom"] = v
+ elif section == "program" and k == "id":
+ out["id"] = v
+ elif section == "program.image" and k == "sha256":
+ out["sha256"] = v.lower()
+ elif section == "recompiler" and k == "seeds":
+ out["seeds"] = v
+ elif section == "recompiler" and k == "out_stem":
+ out["out_stem"] = v
+ return out
+
+
+def identity(path: str) -> tuple[int, int, str]:
+ with open(path, "rb") as f:
+ data = f.read()
+ return len(data), zlib.crc32(data) & 0xFFFFFFFF, hashlib.sha256(data).hexdigest()
+
+
+MODULE_DEFINES = [
+ "-DPSX_OVERLAY_DLL_BUILD",
+ "-DPSX_BIOS_MODULE_BUILD",
+ # Mirror the executable's own BIOS objects (runtime.cmake): no debug tools,
+ # faithful block cycles, and the game-dispatch-aware dispatcher body.
+ "-DPSX_NO_DEBUG_TOOLS",
+ "-DPSX_ENABLE_BLOCK_CYCLES=1",
+ "-DPSX_HAS_GAME_DISPATCH",
+]
+
+
+def compile_module(sources: list[str], out: str, include_dirs: list[str],
+ stem: str, flavor: int, compiler: str, gcc: str, tcc: str) -> bool:
+ defines = MODULE_DEFINES + [f"-DPSX_OVERLAY_FLAVOR={int(flavor)}",
+ f"-DPSX_BIOS_MODULE_STEM={stem}"]
+ if int(flavor) & 2:
+ defines.append("-DPSX_PGXP=1")
+ if compiler == "tcc":
+ # Same treatment compile_overlays gives a shard: strip any BOM, add the
+ # __builtin_ctz shim, and hand tcc BOM-free copies of the headers.
+ for src in sources:
+ with open(src, "rb") as f:
+ data = f.read()
+ if data[:3] == b"\xef\xbb\xbf":
+ data = data[3:]
+ if not data.startswith(co._TCC_COMPAT_PREFIX):
+ data = co._TCC_COMPAT_PREFIX + data
+ with open(src, "wb") as f:
+ f.write(data)
+ cmd = [tcc, "-shared", *defines, *[co.native_path(s) for s in sources],
+ "-o", co.native_path(out)]
+ for d in include_dirs:
+ cmd.append("-I" + co.native_path(co._bom_free_incdir(d)))
+ env = None
+ else:
+ env, tc_dir = co._toolchain_env(gcc)
+ pic = [] if co.is_windows() else ["-fPIC"]
+ cmd = [gcc, "-shared", *pic, "-O2", *defines,
+ *[co.native_path(s) for s in sources],
+ "-o", co.native_path(out),
+ *[f"-I{co.native_path(d)}" for d in include_dirs], "-lm"]
+ if tc_dir is None:
+ print(" WARNING: no gcc toolchain dir found; compile may fail to launch")
+ print(" compile: " + " ".join(cmd))
+ r = subprocess.run(cmd, capture_output=True, text=True, env=env)
+ if r.returncode != 0:
+ msg = (r.stderr or r.stdout or "").strip() or "(no compiler output)"
+ print(f" COMPILE ERROR (exit {r.returncode}):\n{msg}")
+ return False
+ return True
+
+
+def self_check(path: str, flavor: int) -> bool:
+ """Load the fresh module in this interpreter: proves it is self-contained
+ (RTLD_NOW resolves every symbol or fails) and that its ABI tag names the
+ flavor asked for. The host repeats the gate with its own tag."""
+ try:
+ lib = ctypes.CDLL(co.native_path(path))
+ except OSError as exc:
+ print(f" self-check: module does not load: {exc}")
+ return False
+ try:
+ abi = ctypes.c_int(lib.psx_bios_module_abi()).value
+ h = ctypes.c_uint32(lib.psx_bios_module_codegen_hash()).value
+ except AttributeError as exc:
+ print(f" self-check: export missing: {exc}")
+ return False
+ if (abi >> 16) & 0xFFFF != int(flavor) & 0xFFFF:
+ print(f" self-check: ABI flavor {(abi >> 16) & 0xFFFF} != requested {flavor}")
+ return False
+ print(f" self-check: abi=0x{abi:08x} codegen_hash=0x{h:08x} ok")
+ return True
+
+
+def main(argv=None) -> int:
+ ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
+ ap.add_argument("--dump", required=True, help="the player's BIOS image")
+ ap.add_argument("--toolchain", default=HERE, help="overlay_toolchain/ dir (default: this script's dir)")
+ ap.add_argument("--stem", required=True, help="profile stem, e.g. SCPH1001 (bios/.toml)")
+ ap.add_argument("--out", required=True, help="module path to publish (.so/.dll)")
+ ap.add_argument("--flavor", type=int, default=0, help="PSX_OVERLAY_FLAVOR of the host build")
+ ap.add_argument("--compiler", choices=("gcc", "tcc"), default="gcc")
+ ap.add_argument("--gcc", default="gcc")
+ ap.add_argument("--tcc", default="tcc")
+ ap.add_argument("--emitter", default=None, help="psxrecomp-bios (default: /psxrecomp-bios[.exe])")
+ ap.add_argument("--include", default=None, help="runtime include dir (default: /include)")
+ ap.add_argument("--profiles", default=None, help="bios/ profiles dir (default: /bios)")
+ ap.add_argument("--seeds", default=None, help="seeds dir (default: /recompiler/seeds)")
+ ap.add_argument("--keep-work", action="store_true", help="keep the temporary emit tree (debugging)")
+ args = ap.parse_args(argv)
+
+ tk = os.path.abspath(args.toolchain)
+ # Everything absolute: the emitter runs with cwd inside the staged work
+ # tree, and the compiler is handed paths from more than one directory.
+ emitter = os.path.abspath(args.emitter or os.path.join(
+ tk, "psxrecomp-bios.exe" if co.is_windows() else "psxrecomp-bios"))
+ include = os.path.abspath(args.include or os.path.join(tk, "include"))
+ profiles = os.path.abspath(args.profiles or os.path.join(tk, "bios"))
+ seeds_dir = os.path.abspath(args.seeds or os.path.join(tk, "recompiler", "seeds"))
+ args.dump = os.path.abspath(args.dump)
+ args.out = os.path.abspath(args.out)
+ for label, p in (("emitter", emitter), ("include dir", include), ("profiles dir", profiles),
+ ("seeds dir", seeds_dir), ("dump", args.dump)):
+ if not os.path.exists(p):
+ die(f"{label} not found: {p}")
+ if not re.match(r"^[A-Za-z_][A-Za-z0-9_]*$", args.stem):
+ die(f"bad stem {args.stem!r}")
+ profile_path = os.path.join(profiles, f"{args.stem}.toml")
+ if not os.path.isfile(profile_path):
+ die(f"no profile for stem {args.stem}: {profile_path}")
+ prof = read_profile(profile_path)
+ if not prof["rom"] or not prof["seeds"]:
+ die(f"profile {profile_path} lacks rom/seeds")
+ out_stem = prof["out_stem"] or args.stem
+ if out_stem != args.stem:
+ die(f"profile out_stem {out_stem!r} != --stem {args.stem!r}; the descriptor symbol must match")
+
+ size, crc, sha = identity(args.dump)
+ print(f"dump: {args.dump} ({size} bytes, CRC32 {crc:08X}, SHA-256 {sha[:16]}…)")
+ if size != 512 * 1024:
+ die(f"a PlayStation BIOS image is exactly 524288 bytes (got {size})")
+ if prof["sha256"] and prof["sha256"] != sha:
+ die(f"this image is not {prof['id'] or args.stem}: profile pins SHA-256 "
+ f"{prof['sha256'][:16]}…, dump is {sha[:16]}…")
+
+ seeds_src = os.path.join(seeds_dir, os.path.basename(prof["seeds"]))
+ if not os.path.isfile(seeds_src):
+ die(f"seeds file the profile names is not shipped: {seeds_src}")
+
+ # Stage an emitter project root: the profile's rom/seeds paths are relative
+ # to the directory holding a .gitignore/.git/CMakeLists.txt marker
+ # (config_loader find_project_root), so recreate exactly that shape.
+ work = tempfile.mkdtemp(prefix="psx_bios_module_")
+ try:
+ with open(os.path.join(work, ".gitignore"), "w") as f:
+ f.write("*\n")
+ rom_dst = os.path.join(work, prof["rom"])
+ os.makedirs(os.path.dirname(rom_dst), exist_ok=True)
+ shutil.copy2(args.dump, rom_dst)
+ seeds_dst = os.path.join(work, prof["seeds"])
+ os.makedirs(os.path.dirname(seeds_dst), exist_ok=True)
+ shutil.copy2(seeds_src, seeds_dst)
+ prof_dst = os.path.join(work, "bios", f"{args.stem}.toml")
+ os.makedirs(os.path.dirname(prof_dst), exist_ok=True)
+ shutil.copy2(profile_path, prof_dst)
+ gen = os.path.join(work, "out")
+ os.makedirs(gen, exist_ok=True)
+
+ env = os.environ.copy()
+ env.setdefault("PSX_CPS", "1")
+ cmd = [emitter, "--config", os.path.join("bios", f"{args.stem}.toml"), "--out-dir", gen]
+ print(" emit: " + " ".join(cmd))
+ r = subprocess.run(cmd, cwd=work, capture_output=True, text=True, env=env)
+ if r.returncode != 0:
+ tail = "\n".join((r.stderr or r.stdout or "").splitlines()[-25:])
+ die(f"psxrecomp-bios exited {r.returncode}:\n{tail}")
+ full_c = os.path.join(gen, f"{args.stem}_full.c")
+ disp_c = os.path.join(gen, f"{args.stem}_dispatch.c")
+ for p in (full_c, disp_c):
+ if not os.path.isfile(p):
+ die(f"emitter produced no {p}")
+ with open(disp_c, encoding="utf-8", errors="replace") as f:
+ if f"{args.stem}_psx_bios_backend" not in f.read():
+ die("emitted dispatch defines no backend descriptor (emitter too old)")
+
+ # Module translation units: the name mappings go before the first
+ # #include so psx_memory.h's g_psx_ram_mask is rewritten too.
+ prelude = '#include "psx_bios_module.h"\n'
+ for p in (full_c, disp_c):
+ with open(p, "rb") as f:
+ data = f.read()
+ if data[:3] == b"\xef\xbb\xbf":
+ data = data[3:]
+ with open(p, "wb") as f:
+ f.write(prelude.encode("utf-8") + data)
+ glue_c = os.path.join(gen, "glue.c")
+ with open(glue_c, "w", encoding="utf-8") as f:
+ f.write(prelude)
+ f.write('#include "overlay_dispatch_preamble.c.inc"\n')
+ f.write('#include "psx_bios_module_glue.c.inc"\n')
+
+ out_dir = os.path.dirname(os.path.abspath(args.out)) or "."
+ os.makedirs(out_dir, exist_ok=True)
+ tmp_out = os.path.join(out_dir, "." + os.path.basename(args.out) + ".tmp")
+ if os.path.exists(tmp_out):
+ os.remove(tmp_out)
+ include_dirs = [include]
+ fmt_inc = os.path.join(tk, "lib", "fmt", "include") # dev-tree layout only
+ if os.path.isdir(fmt_inc):
+ include_dirs.append(fmt_inc)
+ if not compile_module([full_c, disp_c, glue_c], tmp_out, include_dirs,
+ args.stem, args.flavor, args.compiler, args.gcc, args.tcc):
+ if os.path.exists(tmp_out):
+ os.remove(tmp_out)
+ die("compile failed")
+ if not self_check(tmp_out, args.flavor):
+ os.remove(tmp_out)
+ die("self-check failed")
+ os.replace(tmp_out, args.out)
+ print(f"PSX_BIOS_MODULE_PUBLISHED {args.out}")
+ return 0
+ finally:
+ if args.keep_work:
+ print(f" work tree kept: {work}")
+ else:
+ shutil.rmtree(work, ignore_errors=True)
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/overlay_toolchain/compile_overlays.py b/overlay_toolchain/compile_overlays.py
new file mode 100644
index 00000000..240a1255
--- /dev/null
+++ b/overlay_toolchain/compile_overlays.py
@@ -0,0 +1,8106 @@
+#!/usr/bin/env python3
+"""
+compile_overlays.py — Offline overlay compilation primitive (B-2 / A-2 shared path).
+
+Reads overlay_captures.json, compiles each code overlay to a DLL, and writes
+it to the cache directory. The runtime's A-1 LoadLibrary path reads from the
+same cache.
+
+Usage:
+ python3 tools/compile_overlays.py \\
+ --captures build-dev/overlay_captures.json \\
+ --game-toml game.toml \\
+ --recompiler psxrecomp/recompiler/build/psxrecomp-game.exe \\
+ --runtime-include psxrecomp/runtime/include \\
+ --out-dir build-dev/cache
+
+Each DLL is written to //.dll.
+Each DLL exports:
+ overlay_init(dispatch_fn) — call once after LoadLibrary to wire dispatch
+ func_XXXXXXXX(CPUState*) — one export per compiled function entry point
+"""
+
+import argparse
+import itertools
+import io
+import contextlib
+import contextvars
+import base64
+import binascii
+from bisect import bisect_left
+from collections import Counter, deque
+from contextlib import contextmanager, nullcontext
+import glob
+import hashlib
+import heapq
+import os
+import re
+import struct
+import subprocess
+import sys
+import tempfile
+import threading
+import time
+import uuid
+
+
+try:
+ import tomllib # Python 3.11+
+except ImportError:
+ try:
+ import tomli as tomllib
+ except ImportError:
+ print("ERROR: need tomllib (Python 3.11+) or 'pip install tomli'")
+ sys.exit(1)
+
+import json
+import platform
+import re
+
+
+def codegen_ver(runtime_include: str) -> int:
+ """Parse PSX_OVERLAY_CODEGEN_VER from overlay_api.h so the cache path version
+ is the SAME value the runtime (overlay_loader.c) uses — the two can't drift.
+ The cache is namespaced gcc//cg/, so a build with new emitter
+ output reads+writes a FRESH dir and never reuses a stale DLL."""
+ hdr = os.path.join(runtime_include, 'overlay_api.h')
+ with open(hdr) as f:
+ m = re.search(r'#define\s+PSX_OVERLAY_CODEGEN_VER\s+(\d+)', f.read())
+ if not m:
+ raise SystemExit(f'PSX_OVERLAY_CODEGEN_VER not found in {hdr}')
+ return int(m.group(1))
+
+
+def overlay_abi_tag(runtime_include: str, flavor: int) -> int:
+ """Return the exact ABI/flavor export expected from a cached shard."""
+ hdr = os.path.join(runtime_include, 'overlay_api.h')
+ with open(hdr) as source:
+ match = re.search(
+ r'#define\s+PSX_OVERLAY_ABI_VERSION\s+(\d+)', source.read())
+ if not match:
+ raise SystemExit(f'PSX_OVERLAY_ABI_VERSION not found in {hdr}')
+ return (int(match.group(1)) & 0xFFFF) | ((int(flavor) & 0xFFFF) << 16)
+
+
+def overlay_candidate_cap(runtime_include: str) -> int:
+ """Return the loader's process-lifetime manifest-candidate capacity."""
+ hdr = os.path.join(runtime_include, 'overlay_api.h')
+ with open(hdr) as source:
+ match = re.search(
+ r'#define\s+PSX_OVERLAY_CANDIDATE_CAP\s+(\d+)', source.read())
+ if not match:
+ raise SystemExit(f'PSX_OVERLAY_CANDIDATE_CAP not found in {hdr}')
+ value = int(match.group(1))
+ if value <= 0:
+ raise SystemExit(f'invalid PSX_OVERLAY_CANDIDATE_CAP in {hdr}: {value}')
+ return value
+
+
+def codegen_hash(runtime_include: str) -> int:
+ """Parse PSX_OVERLAY_CODEGEN_HASH from the build-generated overlay_codegen_hash.h
+ (next to overlay_api.h). Folded into the cache path as cg_ so ANY
+ emitter change auto-invalidates the cache (no stale-but-cgN reuse). Falls back
+ to 0 when the header is absent (a tree not yet built) — matching overlay_api.h's
+ __has_include fallback, so the loader and compiler still agree on the path."""
+ hdr = os.path.join(runtime_include, 'overlay_codegen_hash.h')
+ try:
+ with open(hdr) as f:
+ m = re.search(r'#define\s+PSX_OVERLAY_CODEGEN_HASH\s+0x([0-9A-Fa-f]+)', f.read())
+ if m:
+ return int(m.group(1), 16)
+ except FileNotFoundError:
+ pass
+ return 0
+
+
+def verify_recompiler_matches_tag(recompiler: str, tag_hash: int) -> None:
+ """Stale-recompiler-binary guard. The cg tag hash is computed from the
+ EMITTER SOURCES (via --runtime-include's overlay_codegen_hash.h), but the
+ code is emitted by the --recompiler BINARY — nothing else ties the two.
+ A recompiler built before the last emitter change happily emits OLD code
+ that gets stamped with the CURRENT tag: read tag == write tag, content
+ stale (the 2026-07-01 Tomba pause-menu wedge; loaded-save scene shards
+ corrupted the display-list queue while every tag check passed).
+
+ psxrecomp-game bakes the same hash at ITS build time and prints it via
+ --codegen-hash. Any mismatch — including a binary too old to support the
+ flag — is a HARD failure: rebuild the recompiler, never build shards."""
+ import subprocess
+ try:
+ out = subprocess.run([recompiler, '--codegen-hash'],
+ capture_output=True, text=True, timeout=30)
+ except Exception as e:
+ raise SystemExit(f'FATAL: cannot execute {recompiler} for --codegen-hash '
+ f'staleness check: {e}')
+ line = (out.stdout or '').strip().splitlines()
+ baked = line[0].strip() if line else ''
+ if out.returncode != 0 or not re.fullmatch(r'[0-9a-fA-F]{8}', baked or ''):
+ raise SystemExit(
+ f'FATAL: {recompiler} does not support --codegen-hash (or errored).\n'
+ f' This binary predates the stale-recompiler guard and CANNOT be\n'
+ f' verified against the emitter sources. Rebuild it:\n'
+ f' cmake --build --target psxrecomp-game')
+ if int(baked, 16) != tag_hash:
+ raise SystemExit(
+ f'FATAL: STALE RECOMPILER BINARY.\n'
+ f' {recompiler}\n'
+ f' was built from emitter sources hashing {baked}, but the runtime\n'
+ f' tree stamps cache tag hash {tag_hash:08x}. Shards it emits would\n'
+ f' carry the current tag with OLD codegen semantics (the silent\n'
+ f' stale-shard class). Rebuild the recompiler first:\n'
+ f' cmake --build --target psxrecomp-game')
+ print(f'recompiler codegen hash verified: {baked} == cg tag hash')
+
+
+def cache_tag(runtime_include: str, recompiler: str, game_toml: str,
+ flavor: int = 0) -> str:
+ """THE cache-namespace string. Single source of truth.
+
+ The release packagers used to rebuild this string themselves in PowerShell.
+ That parallel implementation went stale the moment the flavor suffix was
+ added: the packager derived cg__gc while this tool wrote
+ cg__gc_f, so its tag filter matched nothing and a
+ perfectly good regenerated cache staged ZERO shards (measured on Tomba 2,
+ 2026-09-01). Anything that needs the tag must call this, never reformat it.
+
+ Must stay identical to overlay_loader.c scan_cache_dir().
+ """
+ return 'cg%d_%08x_gc%08x_f%d' % (
+ codegen_ver(runtime_include),
+ codegen_hash(runtime_include),
+ overlay_config_hash(recompiler, game_toml),
+ int(flavor))
+
+
+def overlay_config_hash(recompiler: str, game_toml: str) -> int:
+ """Ask the recompiler for the canonical hash of config fields that affect
+ generated overlay code. Keeping the serializer in the shared C++ config
+ loader means the runtime and producer cannot disagree about which
+ widescreen/patch settings define a cache namespace."""
+ import subprocess
+ try:
+ out = subprocess.run(
+ [recompiler, '--overlay-config-hash', os.path.abspath(game_toml)],
+ capture_output=True, text=True, timeout=30)
+ except Exception as e:
+ raise SystemExit(
+ f'FATAL: cannot execute {recompiler} for --overlay-config-hash: {e}')
+ line = (out.stdout or '').strip().splitlines()
+ value = line[0].strip() if line else ''
+ if out.returncode != 0 or not re.fullmatch(r'[0-9a-fA-F]{8}', value):
+ detail = (out.stderr or out.stdout or '').strip()
+ raise SystemExit(
+ f'FATAL: {recompiler} could not hash overlay codegen config.\n'
+ f' This binary may predate --overlay-config-hash; rebuild it.\n'
+ f' detail: {detail}')
+ return int(value, 16)
+
+
+_TARGET_OS = None
+
+def set_target_os(target_os: str | None) -> None:
+ global _TARGET_OS
+ _TARGET_OS = target_os
+
+def is_windows() -> bool:
+ if _TARGET_OS == 'win':
+ return True
+ if _TARGET_OS in ('linux', 'macos'):
+ return False
+ return (os.name == 'nt'
+ or platform.system() == 'Windows'
+ or platform.system().startswith(('MSYS', 'CYGWIN', 'MINGW')))
+
+
+def overlay_ext() -> str:
+ """Use the host platform's conventional shared-library suffix."""
+ return '.dll' if is_windows() else '.so'
+
+
+def native_path(p: str) -> str:
+ """Absolute form of `p`, in the RUNNING interpreter's own path flavor, for
+ handing to native tools (gcc, tcc). Two hard-won rules live here
+ (2026-07-15, runtime `cmd.exe /C python` resolved to devkitPro's MSYS
+ python and every in-game shard compile died exit-1/empty-stderr):
+
+ 1. ABSOLUTE is mandatory: gcc invoked from cmd.exe silently fails on
+ relative forward-slash paths.
+ 2. Do NOT translate flavors here. Under an MSYS-flavored python, POSIX
+ args (/f/..., /home/...) are translated to Windows form AT THE EXEC
+ BOUNDARY by the msys runtime using its OWN mount table — verified
+ correct (gcc -v showed /home/... arriving as C:/Users/...). Translating
+ here with `cygpath`/heuristics uses whatever foreign cygpath is first
+ on PATH (e.g. Git-for-Windows') and corrupts the path. The actual
+ silent-failure root cause was never the args — it was the child PATH
+ flavor (_toolchain_env below)."""
+ return os.path.abspath(p)
+
+
+def cache_arch_abi() -> str:
+ """Canonical cache arch-abi tag, IDENTICAL to overlay_loader.c's
+ PSX_OVERLAY_ARCH_ABI ("-": win|linux|macos + x64|arm64|x86).
+ gcc DLLs are namespaced under /gcc// so same-OS
+ different-arch caches never comingle. Keep this
+ mapping in lockstep with overlay_loader.c."""
+ if _TARGET_OS in ('win', 'linux', 'macos'):
+ os_tag = _TARGET_OS
+ elif is_windows():
+ os_tag = 'win'
+ else:
+ os_tag = {'Darwin': 'macos'}.get(platform.system(), 'linux')
+ m = platform.machine().lower()
+ if m in ('amd64', 'x86_64', 'x64'):
+ arch = 'x64'
+ elif m in ('arm64', 'aarch64'):
+ arch = 'arm64'
+ elif m in ('i386', 'i686', 'x86'):
+ arch = 'x86'
+ else:
+ arch = 'unknown'
+ return f'{os_tag}-{arch}'
+
+
+# ---------------------------------------------------------------------------
+# Code segments (docs/SEGMENT_AWARE_CODE.md §5.7)
+# ---------------------------------------------------------------------------
+# The bytes of an overlay are segment-free; execution is not. A PC's segment
+# (KUSEG 0x0xxxxxxx, KSEG0 0x8xxxxxxx, KSEG1 0xAxxxxxxx) is part of every link,
+# EPC, I-cache tag and store-PC stamp a compiled body bakes, so a shard serves
+# only the segment it was compiled for. Capture schema v3 records the segments
+# each dispatch entry entered through (`dispatch_entry_segments`); a capture
+# without it is KSEG0 only. This tool compiles one shard per (region, segment
+# with entries): the image is compiled at `segment | phys`, so its functions,
+# manifest F entries and exports are named by that VA (§5.1). KSEG0 shards keep
+# their place and names in the cache tag directory, so no existing cache is
+# invalidated; KUSEG and KSEG1 shards go in its seg-kuseg/ and seg-kseg1/
+# subdirectories (decision 4), under the same {phys}_{crc} filename grammar,
+# and their manifests carry `S `. R records stay KSEG0-spelled byte
+# extents: they validate bytes, not execution.
+KUSEG, KSEG0, KSEG1 = 0x00000000, 0x80000000, 0xA0000000
+SEGMENT_MASK, PHYS_MASK = 0xE0000000, 0x1FFFFFFF
+SEGMENT_NAMES = {KUSEG: 'kuseg', KSEG0: 'kseg0', KSEG1: 'kseg1'}
+SEGMENT_BY_NAME = {name: seg for seg, name in SEGMENT_NAMES.items()}
+SEGMENT_CACHE_SUBDIRS = {KUSEG: 'seg-kuseg', KSEG1: 'seg-kseg1'}
+
+# The segment of the image being compiled. Helpers that name PCs without an
+# image address at hand spell them in it (_canonical_guest_addr); every
+# per-image entry point below sets it for its duration (image_segment). The
+# default is KSEG0, the only segment before §5.7, so a KSEG0 compile is
+# unchanged. A context variable, not a global: captures compile on threads.
+_IMAGE_SEGMENT = contextvars.ContextVar('psx_overlay_image_segment',
+ default=KSEG0)
+
+
+def segment_of(addr: int) -> int:
+ return addr & SEGMENT_MASK
+
+
+@contextmanager
+def image_segment(seg: int):
+ if seg not in SEGMENT_NAMES:
+ raise ValueError(f'0x{seg:08X} is not a segment that maps RAM')
+ token = _IMAGE_SEGMENT.set(seg)
+ try:
+ yield seg
+ finally:
+ _IMAGE_SEGMENT.reset(token)
+
+
+def _canonical_guest_addr(addr: int) -> int:
+ """``addr``'s bytes, spelled in the segment of the image being compiled."""
+ return (addr & PHYS_MASK) | _IMAGE_SEGMENT.get()
+
+
+def segment_cache_dir(cache_dir: str, seg: int) -> str:
+ """The directory a shard compiled for ``seg`` lives in (decision 4)."""
+ sub = SEGMENT_CACHE_SUBDIRS.get(seg)
+ return os.path.join(cache_dir, sub) if sub else cache_dir
+
+
+def cache_dir_segment(directory: str) -> int:
+ """The segment of the shards in ``directory`` (overlay_loader.c's
+ cache_seg_from_path): a seg-kuseg/ or seg-kseg1/ directory, else KSEG0."""
+ name = os.path.basename(os.path.normpath(directory)).lower()
+ for seg, sub in SEGMENT_CACHE_SUBDIRS.items():
+ if name == sub:
+ return seg
+ return KSEG0
+
+
+def _respell(addr: int, seg: int) -> int:
+ return (addr & PHYS_MASK) | seg
+
+
+def capture_segment_views(cap: dict,
+ required_segments=frozenset()) -> list[dict]:
+ """Split one capture record into one per segment with entries (§5.7).
+
+ A v2 capture (no ``dispatch_entry_segments``) is KSEG0 only and is
+ returned unchanged, so every existing capture compiles exactly as before.
+ For v3, ``dispatch_entry_pcs`` keeps its v2 meaning (dispatched in any
+ segment, spelled at KSEG0) and ``dispatch_entry_segments`` names the
+ segments: {"kuseg": [...], "kseg0": [...], "kseg1": [...]}, each PC in its
+ own segment. A dispatch entry that no segment list names is KSEG0.
+
+ A view is the capture seen from one segment: ``load_addr`` and every PC in
+ it are spelled in that segment, and its dispatch entries are that
+ segment's alone. The execution evidence (executed_pcs) has no segment --
+ direct edges keep the entry's segment -- so each view carries all of it.
+ The bytes, size and guard words are shared.
+
+ ``required_segments`` also gets a view where the record has no dispatch
+ entry: the segments an operator or config demand names inside it
+ (declared_view_segments). A record with no view at all -- execution
+ evidence only, which the runtime writes -- is read as a v2 reader reads
+ it: one KSEG0 view, so its classification, forced interiors, declared
+ entries and prior manifests apply exactly as before.
+ """
+ segments = cap.get('dispatch_entry_segments')
+ if segments is None:
+ return [cap]
+ load = _parse_addr(cap['load_addr'])
+ all_entries = {a & PHYS_MASK
+ for a in _parse_addr_list(cap.get('dispatch_entry_pcs', []))}
+ by_seg = {seg: set() for seg in SEGMENT_NAMES}
+ labelled = set()
+ if not isinstance(segments, dict):
+ raise RuntimeError('dispatch_entry_segments must be an object')
+ for name, pcs in segments.items():
+ seg = SEGMENT_BY_NAME.get(name)
+ if seg is None:
+ raise RuntimeError(f'dispatch_entry_segments: unknown segment {name!r}')
+ for pc in _parse_addr_list(pcs):
+ if segment_of(pc) != seg:
+ raise RuntimeError(
+ f'dispatch_entry_segments.{name}: 0x{pc:08X} is not in {name}')
+ by_seg[seg].add(pc & PHYS_MASK)
+ labelled.add(pc & PHYS_MASK)
+ # Entries with no segment record are KSEG0, as in a v2 capture.
+ by_seg[KSEG0] |= all_entries - labelled
+
+ def respell_list(values, seg, keep=None):
+ out = []
+ for value in _parse_addr_list(values or []):
+ if keep is not None and (value & PHYS_MASK) not in keep:
+ continue
+ out.append(f'0x{_respell(value, seg):08X}')
+ return sorted(out)
+
+ wanted = {seg for seg, entries in by_seg.items() if entries}
+ wanted |= {seg for seg in required_segments if seg in by_seg}
+ if not wanted:
+ wanted = {KSEG0}
+ views = []
+ for seg in (KSEG0, KUSEG, KSEG1):
+ if seg not in wanted:
+ continue
+ entries = by_seg[seg]
+ view = {k: v for k, v in cap.items() if k != 'dispatch_entry_segments'}
+ view['load_addr'] = f'0x{_respell(load, seg):08X}'
+ view['dispatch_entry_pcs'] = [f'0x{_respell(a, seg):08X}'
+ for a in sorted(entries)]
+ view['seeds'] = list(view['dispatch_entry_pcs'])
+ if 'static_dispatch_entry_pcs' in cap:
+ view['static_dispatch_entry_pcs'] = respell_list(
+ cap['static_dispatch_entry_pcs'], seg, entries)
+ for field in ('executed_pcs', 'observed_pcs', 'function_entry_pcs',
+ 'static_discovery_entry_pcs',
+ 'static_call_continuation_pcs'):
+ if field in cap:
+ view[field] = respell_list(cap[field], seg)
+ if cap.get('producer_ranges'):
+ view['producer_ranges'] = [
+ dict(r, start=f'0x{_respell(_parse_addr(r["start"]), seg):08X}',
+ end=f'0x{_respell(_parse_addr(r["end"]), seg):08X}')
+ for r in cap['producer_ranges']]
+ if cap.get('static_alias_ranges'):
+ view['static_alias_ranges'] = [
+ dict(r, entry=f'0x{_respell(_parse_addr(r["entry"]), seg):08X}',
+ start=f'0x{_respell(_parse_addr(r["start"]), seg):08X}',
+ end=f'0x{_respell(_parse_addr(r["end"]), seg):08X}')
+ for r in cap['static_alias_ranges']]
+ views.append(view)
+ return views
+
+
+def declared_view_segments(cap: dict, toml_doc: dict,
+ forced_interiors=frozenset()) -> set[int]:
+ """Segments a demand from outside the capture names inside ``cap`` (§5.7).
+
+ A ``--force-interior`` PC is KSEG0 (a physical and a KUSEG PC are the same
+ number), so one inside the record asks for its KSEG0 view. A game.toml
+ ``[[overlays]]`` table matches the load address it spells, and one without
+ a load address applies its entries by their own spelling, so each names
+ the segment it is written in. capture_segment_views() gives every such
+ segment a view even where the capture saw no dispatch entry, so these
+ demands compile as they did before captures carried segments. Byte-CRC
+ checks stay with the compile (_collect_toml_overlay_entries): a detached
+ table's view compiles nothing."""
+ load = _parse_addr(cap['load_addr'])
+ lo = load & PHYS_MASK
+ hi = lo + int(cap['size'])
+ inside = lambda pc: lo <= (pc & PHYS_MASK) < hi
+ segs = {KSEG0} if any(inside(pc) for pc in forced_interiors) else set()
+ for ov in (toml_doc or {}).get('overlays', []) or []:
+ if not isinstance(ov, dict):
+ continue
+ entries = set()
+ for key in ('entry', 'entries', 'function_entry_pcs', 'function_entries'):
+ val = ov.get(key)
+ if isinstance(val, list):
+ entries.update(_parse_addr_list(val))
+ elif val is not None:
+ entries.add(_parse_addr(val))
+ ov_load = ov.get('load_addr') or ov.get('load_address')
+ if ov_load is not None:
+ ov_load = _parse_addr(ov_load)
+ if entries and (ov_load & PHYS_MASK) == lo:
+ segs.add(segment_of(ov_load))
+ else:
+ segs.update(segment_of(pc) for pc in entries if inside(pc))
+ return {seg for seg in segs if seg in SEGMENT_NAMES}
+
+
+# ---------------------------------------------------------------------------
+# Shard build accounting — make failures LOUD
+# ---------------------------------------------------------------------------
+# Historically a per-shard failure (recompiler error, generated-C audit reject,
+# gcc/tcc compile error, dropped interior fragment) only printed a line into an
+# ephemeral log and the script still exited 0. The runtime's autocompile watcher
+# keys "did it work?" off the exit code, so a header change that broke EVERY
+# shard looked identical to a fully-successful run: the affected code just ran
+# interpreted forever. ShardStats fixes that — every build outcome is tallied
+# (thread-safe, since captures compile on a pool), a SUMMARY prints at the end,
+# a machine-readable PSX_SHARD_RESULT line is emitted for the runtime to parse,
+# and main() exits non-zero when any shard that SHOULD have built failed.
+class ShardStats:
+ def __init__(self):
+ self._lock = threading.Lock()
+ self.ok = 0
+ self.skipped = 0
+ self.capacity_fastpath = 0
+ self.fail_by_class = Counter()
+ self.failures = [] # [(label, cls, detail), ...] (detail truncated)
+
+ def add_ok(self, n=1):
+ with self._lock:
+ self.ok += n
+
+ def add_skip(self, n=1):
+ with self._lock:
+ self.skipped += n
+
+ def add_capacity_fastpath(self, n=1):
+ with self._lock:
+ self.capacity_fastpath += n
+
+ def add_fail(self, label, cls, detail=''):
+ # Print immediately AND record, so the failure is visible in the live
+ # stream (per-worker buffered) and in the end-of-run summary.
+ d = (detail or '').strip().replace('\n', ' ')
+ if len(d) > 240:
+ d = d[:237] + '...'
+ print(f' SHARD FAIL [{cls}] {label}{(": " + d) if d else ""}')
+ with self._lock:
+ self.fail_by_class[cls] += 1
+ self.failures.append((label, cls, d))
+
+ def total_fail(self):
+ with self._lock:
+ return sum(self.fail_by_class.values())
+
+ def print_summary(self):
+ with self._lock:
+ fail = sum(self.fail_by_class.values())
+ print('\n=== SHARD BUILD SUMMARY ===')
+ print(f' built OK : {self.ok}')
+ print(f' skipped : {self.skipped} '
+ '(cached / data-only / safe coverage loss)')
+ if self.capacity_fastpath:
+ print(f' cap-fast : {self.capacity_fastpath} cache recipe '
+ 'job(s) skipped at an already-full fixed point')
+ print(f' FAILED : {fail}')
+ for cls, n in sorted(self.fail_by_class.items()):
+ print(f' - {cls}: {n}')
+ for label, cls, detail in self.failures[:40]:
+ print(f' ! [{cls}] {label}{(": " + detail) if detail else ""}')
+ if len(self.failures) > 40:
+ print(f' ... {len(self.failures) - 40} more')
+ # Stable, grep-able result line the runtime (autocompile.c) parses to
+ # surface shard_ok / shard_fail without depending on the exit code.
+ print(f'PSX_SHARD_RESULT ok={self.ok} failed={fail} '
+ f'skipped={self.skipped} '
+ f'capacity_fastpath={self.capacity_fastpath}')
+ return fail
+
+
+# ---------------------------------------------------------------------------
+# PS-EXE fake header
+# ---------------------------------------------------------------------------
+
+# Analysis-bound tag read by the recompiler (recompiler/include/ps1_exe_parser.h,
+# namespace exe_tag). Offsets are into the 2048-byte PS-EXE header, whose tail
+# is zero-filled in every retail image; the 8-byte magic makes a false positive
+# on a genuine EXE effectively impossible.
+GUARD_TAG_MAGIC_OFFSET = 0x7E0
+GUARD_TAG_COUNT_OFFSET = 0x7E8
+GUARD_TAG_MAGIC = b'PSXRGRD1'
+CAPTURE_PAGE_BYTES = 4096
+
+
+def capture_guard_bytes(cap: dict, size: int, label: str = '') -> int:
+ """Trailing bytes of a captured region that are guard words ONLY.
+
+ overlay_capture.c write_json_window appends one coherent guard instruction
+ past the end of a dirty-page run so that a MIPS branch at the run's final
+ word (...FFC) has its architectural delay slot (...000) available. Those
+ bytes must stay READABLE by the recompiler and must NEVER be discovered as
+ code: the word after a guard word is not in the image, so a control
+ transfer AT the guard word could not emit its own delay slot. The
+ recompiler is TOLD the count (see make_psxexe) rather than inferring it.
+
+ Precedence:
+ 1. the capture's explicit ``guard_bytes`` field — the writer stating its
+ own intent, which survives any future change to capture granularity;
+ 2. for captures recorded BEFORE that field existed, reconstruct from the
+ format invariant write_json_window has always obeyed: a dirty-page run
+ is a whole number of 4 KiB pages, plus one 4-byte guard word whenever
+ the next word is still inside RAM. ``size % 4096 == 4`` is exactly
+ that signature and means one guard word.
+
+ Every OTHER shape reconstructs to zero, and that is ordinary traffic rather
+ than an anomaly, so this stays quiet:
+ * ``size % 4096 == 0`` — a page run whose guard word was suppressed
+ because it would have left RAM, or a pre-2026-07-25 page-exact capture.
+ * any other residue — a STATIC extraction, not a RAM page run. Those
+ records carry an exact file extent (tools/aot_overlay_spike/
+ extract_generic.py; they are the ones with static_dispatch_entry_pcs /
+ producer_ranges) and append no guard word. MEASURED: 52 of the 946
+ records in the SCUS-94454 vault are this shape, with residues from 112
+ to 3996 bytes and one that is not even 4-byte aligned.
+
+ Zero is also the fail-closed answer. If some future producer ever appends a
+ guard word in a shape this cannot recognise, that word is analysed as code
+ and the emitter's mandatory-delay-slot check refuses the transfer LOUDLY at
+ generation time; it never silently emits a transfer without its slot. The
+ way to opt in is the explicit field, not a wider guess here.
+ """
+ declared = cap.get('guard_bytes') if cap else None
+ if declared is not None:
+ try:
+ guard = int(declared)
+ except (TypeError, ValueError):
+ guard = -1
+ if guard in (0, 4) and guard < size:
+ return guard
+ # A malformed DECLARATION is a producer bug, unlike the shapes above.
+ print(f' WARNING: {label or "capture"} declares guard_bytes='
+ f'{declared!r} with size {size}; ignoring (treating as 0)')
+ return 0
+ if size % CAPTURE_PAGE_BYTES == 4 and size > 4:
+ return 4
+ return 0
+
+
+def make_psxexe(load_addr: int, entry_pc: int, data: bytes, *,
+ guard_bytes: int) -> bytes:
+ """Wrap raw overlay bytes in a minimal PS-EXE header.
+
+ ``guard_bytes`` is keyword-only and has NO default on purpose: every
+ producer of an overlay image must state how many of its trailing bytes are
+ delay-slot guard words (see capture_guard_bytes). A new call site that
+ forgets is a TypeError, not a silently mis-analysed shard.
+ """
+ if guard_bytes < 0 or guard_bytes % 4 or guard_bytes >= len(data):
+ raise ValueError(
+ f'invalid guard_bytes={guard_bytes} for {len(data)}-byte image')
+ header = bytearray(2048)
+ header[0:8] = b'PS-X EXE'
+ struct.pack_into(' list:
+ """--project-root arguments for a psxrecomp-game invocation, or [].
+
+ Every recompiler spawn below runs with cwd = dirname(game.toml), because
+ the seeds/captures paths in the config are relative to it. That cwd is
+ also where the recompiler probes for the BIOS profile when the config has
+ no explicit [recompiler] bios_config — and for a PACKAGED game.toml
+ (packaging/release/game.toml) it holds neither bios/SCPH1001.toml nor a
+ vendored framework one level down. Every shard then died with
+ "FATAL: no BIOS profile found" and the cache silently failed to build,
+ which is what the recipe printed by package_release.ps1 used to tell
+ people to run (issue #72).
+
+ Default the root to the framework, derived from the required
+ --runtime-include (/runtime/include). Derivation is used ONLY
+ when it actually locates a profile, so this can fix a broken invocation
+ but never alter one that already worked.
+
+ Every lookup is defensive: in-process callers (the test suite, the
+ packager's importlib entry) build a lightweight args object that carries
+ only the fields their recipe needs, so a missing attribute must degrade to
+ "pass no flag" — today's behaviour — never raise.
+ """
+ explicit = getattr(args, 'project_root', None)
+ if explicit:
+ return ['--project-root', os.path.abspath(explicit)]
+ runtime_include = getattr(args, 'runtime_include', None)
+ if not runtime_include:
+ return []
+ derived = os.path.abspath(
+ os.path.join(os.path.abspath(runtime_include), '..', '..'))
+ if os.path.isfile(os.path.join(derived, 'bios', 'SCPH1001.toml')):
+ return ['--project-root', derived]
+ return []
+
+
+BIOS_RESIDENT_PRODUCER = 'bios_resident_manifest'
+BIOS_RESIDENT_MARKER = 'psxrecomp bios resident shard v1'
+
+# Hosted aliases are supplemental optimizations, never correctness authority.
+# Keep every phase deterministically bounded so adversarial/malformed capture
+# sets cannot turn one compile invocation into unbounded shard fan-out.
+HOSTED_NOMINATION_CAP = 4096
+# Python selection precedes the C++ organic-block proof, so most candidates are
+# expected to be rejected without publication. The emitted-identity cap below
+# remains the tighter runtime-facing limit.
+HOSTED_SELECTED_ALIAS_CAP = 4096
+HOSTED_SELECTED_HOST_CAP = 512
+HOSTED_BATCH_HOST_CAP = 64
+HOSTED_BATCH_ALIAS_CAP = 256
+# A terminal partition/partial-success tree over N targets has at most 2N-1
+# nodes. Budget the entire selected universe so a second invocation can never
+# resume an attempt-capped suffix.
+HOSTED_COMPILE_ATTEMPT_CAP = 2 * HOSTED_SELECTED_ALIAS_CAP - 1
+HOSTED_EMITTED_IDENTITY_CAP = 1024
+MANIFEST_LINE_MAX = 128
+MANIFEST_PHYSICAL_LINE_MAX = 159
+MANIFEST_ASCII_WHITESPACE = ' \t\r\v\f'
+HOSTED_MANIFEST_PROVENANCE = 'hosted-v1'
+ORPHAN_MANIFEST_PROVENANCE = 'orphan-v1'
+NON_AUTHORITY_MANIFEST_PROVENANCES = {
+ HOSTED_MANIFEST_PROVENANCE, ORPHAN_MANIFEST_PROVENANCE,
+}
+HOSTED_MANIFEST_MARKER = (
+ f'# psxrecomp overlay provenance {HOSTED_MANIFEST_PROVENANCE}')
+HOSTED_UNIQUE_GUARDED_BYTE_CAP = 1024 * 1024
+# Full 8 MiB host capacity (PSX_MAIN_RAM_BACKING_BYTES): 8 MB-mod captures carry
+# high-bank enhancement code and their ranges must validate.
+PSX_RAM_SIZE = 8 * 1024 * 1024
+
+
+class ShardCandidateCapacityError(RuntimeError):
+ """A cache publication would exceed the runtime's fixed F-record table."""
+
+
+def manifest_has_hosted_provenance(manifest: str) -> bool:
+ """Recognize the exact compiler-owned marker under LF or CRLF records."""
+ return manifest_provenance(manifest) == HOSTED_MANIFEST_PROVENANCE
+
+
+def manifest_declares_supplemental_provenance(manifest: str) -> bool:
+ """Fail closed for any compiler provenance record, known or malformed."""
+ prefix = '# psxrecomp overlay provenance '
+ return any(
+ (raw_line[:-1] if raw_line.endswith('\r') else raw_line).startswith(
+ prefix)
+ for raw_line in manifest.split('\n')
+ )
+
+
+def manifest_provenance(manifest: str) -> str | None:
+ """Return one exact compiler-owned non-authority provenance record."""
+ prefix = '# psxrecomp overlay provenance '
+ found = []
+ for raw_line in manifest.split('\n'):
+ line = raw_line[:-1] if raw_line.endswith('\r') else raw_line
+ if line.startswith(prefix):
+ found.append(line[len(prefix):])
+ if len(found) != 1 or found[0] not in NON_AUTHORITY_MANIFEST_PROVENANCES:
+ return None
+ return found[0]
+
+
+def seed_line_for_reason(addr: int, reason: str) -> str:
+ """Serialize one classifier reason without weakening its root contract."""
+ if reason == 'DISPATCH_INTERIOR':
+ return f'interior 0x{addr:08X}'
+ if reason == 'DISPATCH_ROOT':
+ return f'dispatch_root 0x{addr:08X}'
+ if reason in ('DIRECT_JAL_TARGET', 'STATIC_INDIRECT_TARGET',
+ 'STATIC_BRANCH_ROOT', 'STATIC_DISCOVERY_ROOT'):
+ return f'call_root 0x{addr:08X}'
+ return f'0x{addr:08X}'
+
+
+def update_bios_resident_marker(dll_path: str, cap: dict) -> None:
+ """Publish/remove the opt-in marker consumed by the runtime preloader.
+
+ Resident BIOS helpers use a synthetic page envelope, so their filename's
+ region key cannot equal the dirty-run start recovered at runtime. The
+ marker tells the loader to register the shard at cache scan time; normal
+ per-function code-CRC validation remains the execution authority.
+ """
+ marker = os.path.splitext(dll_path)[0] + '.resident'
+ if cap.get('producer') != BIOS_RESIDENT_PRODUCER:
+ try:
+ os.remove(marker)
+ except FileNotFoundError:
+ pass
+ return
+ payload = {
+ 'schema': BIOS_RESIDENT_MARKER,
+ 'bios_sha256': str(cap.get('bios_sha256', '')),
+ 'producer_name': str(cap.get('producer_name', 'BIOS resident code')),
+ }
+ serialized = json.dumps(payload, sort_keys=True) + '\n'
+ try:
+ with open(marker, 'r', encoding='utf-8') as f:
+ if f.read(len(serialized) + 1) == serialized:
+ return
+ except (FileNotFoundError, OSError, UnicodeError):
+ pass
+ tmp = f'{marker}.tmp.{uuid.uuid4().hex}'
+ try:
+ with open(tmp, 'w', encoding='utf-8') as f:
+ f.write(serialized)
+ os.replace(tmp, marker)
+ finally:
+ _best_effort_unlink(tmp)
+
+
+def reconcile_bios_resident_marker(dll_path: str, cap: dict,
+ published: bool) -> None:
+ """Keep the winner's residency, while letting resident evidence self-heal.
+
+ A losing ordinary writer must not remove a resident winner's sidecar. A
+ resident capture may always ensure the marker: identical region bytes make
+ the preserved shard equally safe to preload, and this repairs a crash
+ between pair publication and sidecar publication.
+ """
+ # Once this exact canonical region identity has verified resident evidence,
+ # retaining the marker is safe even if an ordinary capture won the compile
+ # race: every function still passes the live per-range CRC guard. Never let
+ # an ordinary writer race a resident writer by removing that evidence.
+ if cap.get('producer') == BIOS_RESIDENT_PRODUCER:
+ update_bios_resident_marker(dll_path, cap)
+
+
+def _parse_addr(value) -> int:
+ if isinstance(value, int):
+ return value
+ return int(str(value), 16)
+
+
+def _parse_addr_list(values) -> set[int]:
+ out = set()
+ for v in values or []:
+ try:
+ out.add(_parse_addr(v))
+ except (TypeError, ValueError):
+ pass
+ return out
+
+
+def optional_enrichment_fallback_capture(cap: dict) -> dict | None:
+ """Return a conservative retry recipe declared by a static extractor.
+
+ The richer recipe is always attempted first. If its generated C or host
+ compile is rejected, these independently proven roots preserve the safe
+ shard while all optional aliases and normal-mode discoveries are dropped.
+ """
+ key = 'optional_enrichment_fallback_entry_pcs'
+ recipe = cap.get(key, [])
+ fallback = dict(cap)
+ if isinstance(recipe, dict):
+ functions = sorted(_parse_addr_list(
+ recipe.get('function_entry_pcs', [])))
+ dispatch = sorted(_parse_addr_list(
+ recipe.get('dispatch_entry_pcs', [])))
+ static = sorted(_parse_addr_list(
+ recipe.get('static_discovery_entry_pcs', [])))
+ static_dispatch = sorted(_parse_addr_list(
+ recipe.get('static_dispatch_entry_pcs', [])))
+ if not (functions or dispatch or static):
+ return None
+ fallback['function_entry_pcs'] = [
+ f'0x{entry:08X}' for entry in functions]
+ fallback['dispatch_entry_pcs'] = [
+ f'0x{entry:08X}' for entry in dispatch]
+ fallback['static_dispatch_entry_pcs'] = [
+ f'0x{entry:08X}' for entry in static_dispatch
+ if entry in set(dispatch)]
+ fallback['static_discovery_entry_pcs'] = [
+ f'0x{entry:08X}' for entry in static]
+ fallback['seeds'] = fallback['function_entry_pcs']
+ if 'producer_ranges' in recipe:
+ fallback['producer_ranges'] = recipe['producer_ranges']
+ if 'strict_producer_ranges' in recipe:
+ fallback['strict_producer_ranges'] = bool(
+ recipe['strict_producer_ranges'])
+ else:
+ entries = sorted(_parse_addr_list(recipe))
+ if not entries:
+ return None
+ encoded = [f'0x{entry:08X}' for entry in entries]
+ fallback['function_entry_pcs'] = encoded
+ fallback['dispatch_entry_pcs'] = encoded
+ fallback['static_dispatch_entry_pcs'] = []
+ fallback['static_discovery_entry_pcs'] = encoded
+ fallback['seeds'] = encoded
+ fallback.pop('static_alias_ranges', None)
+ fallback.pop('static_jump_table_proofs', None)
+ fallback.pop('static_call_continuation_pcs', None)
+ fallback.pop('_prior_aliases', None)
+ fallback.pop(key, None)
+ return fallback
+
+
+def _word_at(data: bytes, load_addr: int, addr: int):
+ off = addr - load_addr
+ if off < 0 or off + 4 > len(data):
+ return None
+ return struct.unpack_from(' bool:
+ return word == 0x03E00008
+
+
+def _is_addiu_sp_neg(word) -> bool:
+ if word is None:
+ return False
+ return ((word >> 26) & 0x3F) == 0x09 \
+ and ((word >> 21) & 0x1F) == 29 \
+ and ((word >> 16) & 0x1F) == 29 \
+ and (word & 0x8000) != 0
+
+
+def _is_control_flow(word) -> bool:
+ if word is None:
+ return False
+ op = (word >> 26) & 0x3F
+ fn = word & 0x3F
+ return (op in (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x14, 0x15, 0x16, 0x17) or
+ (op == 0 and fn in (0x08, 0x09)) or
+ (op in (0x11, 0x12) and ((word >> 21) & 0x1F) == 0x08))
+
+
+def _is_valid_mips_word(word) -> bool:
+ if word is None or word in (0xFFFFFFFF, 0xFFFFFFFD):
+ return False
+
+ op = (word >> 26) & 0x3F
+ fn = word & 0x3F
+ rt = (word >> 16) & 0x1F
+
+ if op == 0x00:
+ return fn in {
+ 0x00, 0x02, 0x03, 0x04, 0x06, 0x07,
+ 0x08, 0x09, 0x0C, 0x0D,
+ 0x10, 0x11, 0x12, 0x13,
+ 0x18, 0x19, 0x1A, 0x1B,
+ 0x20, 0x21, 0x22, 0x23,
+ 0x24, 0x25, 0x26, 0x27,
+ 0x2A, 0x2B,
+ }
+ if op == 0x01:
+ return rt in (0x00, 0x01, 0x10, 0x11)
+
+ return op in {
+ 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+ 0x10, 0x12,
+ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
+ 0x28, 0x29, 0x2A, 0x2B, 0x2E,
+ 0x30, 0x32, 0x38, 0x3A,
+ }
+
+
+def _jump_target(pc: int, word: int) -> int:
+ return ((pc + 4) & 0xF0000000) | ((word & 0x03FFFFFF) << 2)
+
+
+def _branch_target(pc: int, word: int) -> int:
+ imm = word & 0xFFFF
+ if imm & 0x8000:
+ imm -= 0x10000
+ return pc + 4 + (imm << 2)
+
+
+def _classify_cf(pc: int, word: int) -> tuple[str, int]:
+ op = (word >> 26) & 0x3F
+ fn = word & 0x3F
+ rs = (word >> 21) & 0x1F
+ if op == 0 and fn == 0x08:
+ return ('jr_ra' if rs == 31 else 'jr', 0)
+ if op == 0 and fn == 0x09:
+ return ('jalr', 0)
+ if op == 0x02:
+ return ('j', _jump_target(pc, word))
+ if op == 0x03:
+ return ('jal', _jump_target(pc, word))
+ rt = (word >> 16) & 0x1F
+ if op in (0x04, 0x14) and rs == rt:
+ return ('j', _branch_target(pc, word))
+ if op == 0x05 and rs == rt:
+ return ('branch_never', 0)
+ if op == 0x15 and rs == rt:
+ return ('branch_never_likely', 0)
+ if op in (0x06, 0x16) and rs == 0:
+ return ('j', _branch_target(pc, word))
+ if op == 0x07 and rs == 0:
+ return ('branch_never', 0)
+ if op == 0x17 and rs == 0:
+ return ('branch_never_likely', 0)
+ if op == 0x01 and rs == 0:
+ if rt in (0x00, 0x10): # bltz / bltzal
+ return ('branch_never', 0)
+ if rt in (0x02, 0x12): # bltzl / bltzall
+ return ('branch_never_likely', 0)
+ if rt in (0x01, 0x03): # bgez / bgezl
+ return ('j', _branch_target(pc, word))
+ if rt in (0x11, 0x13): # bal / ball aliases: target + continuation
+ return ('jal', _branch_target(pc, word))
+ if op in (0x11, 0x12) and rs == 0x08:
+ return ('branch', _branch_target(pc, word))
+ if op in (0x01, 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17):
+ return ('branch', _branch_target(pc, word))
+ return ('normal', 0)
+
+
+def _find_jump_table_targets(data: bytes, load_addr: int, size: int,
+ entry: int, hard_cap: int,
+ jr_pc: int, jr_rs: int,
+ producer_range=None, proof_out=None) -> set[int]:
+ """Resolve one tightly bounded canonical ``sltiu``/``jr`` switch.
+
+ This is deliberately a structural reaching-definition proof, not the old
+ 40-word bag-of-opcodes backscan. The accepted suffix is::
+
+ sltiu guard,index,count; beq guard,zero,reject; nop
+ sll scaled,index,2; addu address,scaled,table_base
+ lw target,offset(address); [nop x 0..1]; jr target
+
+ Also accept ``sltiu; beq; lui; addiu; sll``: the LUI executes in the
+ guard's delay slot, then ADDIU completes the base on the in-range path.
+ That exact pair may not overwrite the checked index, and direct edges
+ may not bypass the bound (including edges from switch cases).
+
+ ``table_base`` must be a nearest-definition LUI, optionally followed by a
+ nearest-definition ADDIU. The lower instruction may rename the
+ register (``lui v0; addiu s0,v0,lo``), as used by Ape Escape. Any other
+ control flow between that constant and the suffix, an inbound edge that
+ skips the definition, a register mismatch/clobber, or one non-local table
+ entry rejects the entire candidate.
+ """
+ lo = load_addr
+ hi = load_addr + size
+ if not (entry <= jr_pc < hard_cap and 0 < jr_rs < 31):
+ return set()
+ jr_word = _word_at(data, load_addr, jr_pc)
+ if jr_word != ((jr_rs << 21) | 0x08):
+ return set()
+
+ # Permit only the compiler's zero-or-one scheduling NOP between LW/JR.
+ lw_pc = jr_pc - 4
+ for _ in range(1):
+ if _word_at(data, load_addr, lw_pc) != 0:
+ break
+ lw_pc -= 4
+ lw_word = _word_at(data, load_addr, lw_pc)
+ if lw_word is None or ((lw_word >> 26) & 0x3F) != 0x23 \
+ or ((lw_word >> 16) & 0x1F) != jr_rs:
+ return set()
+ address_reg = (lw_word >> 21) & 0x1F
+ if not address_reg:
+ return set()
+ lw_offset = lw_word & 0xFFFF
+ if lw_offset & 0x8000:
+ lw_offset -= 0x10000
+
+ addu_pc = lw_pc - 4
+ addu_word = _word_at(data, load_addr, addu_pc)
+ if addu_word is None or ((addu_word >> 26) & 0x3F) != 0 \
+ or (addu_word & 0x3F) != 0x21 \
+ or ((addu_word >> 6) & 0x1F) != 0 \
+ or ((addu_word >> 11) & 0x1F) != address_reg:
+ return set()
+ addu_inputs = ((addu_word >> 21) & 0x1F,
+ (addu_word >> 16) & 0x1F)
+
+ sll_pc = addu_pc - 4
+ sll_word = _word_at(data, load_addr, sll_pc)
+ if sll_word is None or ((sll_word >> 26) & 0x3F) != 0 \
+ or (sll_word & 0x3F) != 0 \
+ or ((sll_word >> 21) & 0x1F) != 0 \
+ or ((sll_word >> 6) & 0x1F) != 2:
+ return set()
+ scaled_reg = (sll_word >> 11) & 0x1F
+ index_reg = (sll_word >> 16) & 0x1F
+ if not scaled_reg or not index_reg or scaled_reg not in addu_inputs:
+ return set()
+ table_reg = addu_inputs[1] if addu_inputs[0] == scaled_reg else addu_inputs[0]
+ if not table_reg or table_reg == scaled_reg:
+ return set()
+
+ # The bound must guard this exact index on the sole fallthrough into SLL.
+ sltiu_pc = sll_pc - 12
+ branch_pc = sll_pc - 8
+ scheduled_base = _word_at(data, load_addr, sll_pc - 4) != 0
+ if scheduled_base:
+ # R3000 load delay: JR must not consume the immediately preceding LW.
+ if lw_pc != jr_pc - 8:
+ return set()
+ sltiu_pc -= 4
+ branch_pc -= 4
+ upper = _word_at(data, load_addr, sll_pc - 8)
+ lower = _word_at(data, load_addr, sll_pc - 4)
+ if (upper is None or lower is None or
+ (upper >> 26) != 0x0F or ((upper >> 21) & 31) != 0 or
+ (lower >> 26) != 0x09 or ((lower >> 16) & 31) != table_reg or
+ ((upper >> 16) & 31) == 0 or
+ ((upper >> 16) & 31) != ((lower >> 21) & 31) or
+ index_reg in (table_reg, (upper >> 16) & 31)):
+ return set()
+ if sltiu_pc < entry or (sltiu_pc >= entry + 4 and
+ _is_control_flow(_word_at(data, load_addr, sltiu_pc - 4))):
+ return set()
+ sltiu_word = _word_at(data, load_addr, sltiu_pc)
+ branch_word = _word_at(data, load_addr, branch_pc)
+ if sltiu_word is None or ((sltiu_word >> 26) & 0x3F) != 0x0B \
+ or ((sltiu_word >> 21) & 0x1F) != index_reg:
+ return set()
+ guard_reg = (sltiu_word >> 16) & 0x1F
+ table_count = sltiu_word & 0xFFFF
+ if not guard_reg or guard_reg == index_reg or not (1 <= table_count < 512):
+ return set()
+ if branch_word is None or ((branch_word >> 26) & 0x3F) != 0x04:
+ return set()
+ branch_rs = (branch_word >> 21) & 0x1F
+ branch_rt = (branch_word >> 16) & 0x1F
+ if {branch_rs, branch_rt} != {0, guard_reg}:
+ return set()
+ reject_target = _branch_target(branch_pc, branch_word)
+ if (not (entry <= reject_target < hard_cap) or
+ sll_pc <= reject_target < jr_pc + 8 or
+ (scheduled_base and sltiu_pc < reject_target < jr_pc + 8)):
+ return set()
+
+ def nearest_writer(reg: int, before: int):
+ for pc in range(before - 4, max(entry, before - 0x80) - 1, -4):
+ word = _word_at(data, load_addr, pc)
+ if word is None:
+ return None
+ if _instruction_writes_gpr(word, reg):
+ return pc, word
+ return None
+
+ table_writer = nearest_writer(table_reg, addu_pc)
+ if table_writer is None:
+ return set()
+ table_def_pc, table_def_word = table_writer
+ def_op = (table_def_word >> 26) & 0x3F
+ def_rs = (table_def_word >> 21) & 0x1F
+ def_rt = (table_def_word >> 16) & 0x1F
+ if def_op == 0x0F and def_rs == 0 and def_rt == table_reg:
+ constant_pc = table_def_pc
+ table_base = (table_def_word & 0xFFFF) << 16
+ elif def_op == 0x09 and def_rt == table_reg and def_rs:
+ upper_writer = nearest_writer(def_rs, table_def_pc)
+ if upper_writer is None:
+ return set()
+ constant_pc, upper_word = upper_writer
+ if ((upper_word >> 26) & 0x3F) != 0x0F \
+ or ((upper_word >> 21) & 0x1F) != 0 \
+ or ((upper_word >> 16) & 0x1F) != def_rs:
+ return set()
+ low = table_def_word & 0xFFFF
+ upper = (upper_word & 0xFFFF) << 16
+ if low & 0x8000:
+ low -= 0x10000
+ table_base = (upper + low) & 0xFFFFFFFF
+ else:
+ return set()
+
+ if scheduled_base and (constant_pc != branch_pc + 4 or
+ table_def_pc != sll_pc - 4):
+ return set()
+
+ # Calls could clobber the proven constant. Other branches could enter the
+ # suffix through an unproved path. The one exact bounds branch is allowed.
+ for pc in range(constant_pc + 4, sll_pc, 4):
+ word = _word_at(data, load_addr, pc)
+ if word is None:
+ return set()
+ if _is_control_flow(word) and pc != branch_pc:
+ return set()
+ predecessor = _word_at(data, load_addr, constant_pc - 4)
+ if (constant_pc >= entry + 4 and _is_control_flow(predecessor) and
+ not scheduled_base):
+ return set()
+ table_base = (table_base + lw_offset) & 0xFFFFFFFF
+ table_end = table_base + table_count * 4
+ range_lo, range_hi = producer_range or (lo, hi)
+ if (table_base & 3) or not (range_lo <= table_base < table_end <= range_hi):
+ return set()
+
+ targets = set()
+ for index in range(table_count):
+ target = _word_at(data, load_addr, table_base + index * 4)
+ if (target is None or (target & 3) or
+ not (entry <= target < hard_cap) or
+ (scheduled_base and sltiu_pc < target < jr_pc + 8) or
+ not (range_lo <= target < range_hi) or
+ not _is_valid_mips_word(_word_at(data, load_addr, target))):
+ return set()
+ targets.add(target)
+
+ # Establish which later sources are themselves reached only after the
+ # proven table dispatch. Such case blocks may safely loop to the suffix
+ # (Ape does this); an arbitrary earlier/later byte sequence may not jump
+ # into the protected definitions and manufacture domination.
+ case_reachable = set()
+ work = deque(targets)
+ while work and len(case_reachable) < 2048:
+ pc = work.popleft()
+ if (pc in case_reachable or not (entry <= pc < hard_cap) or
+ not (range_lo <= pc < range_hi)):
+ continue
+ word = _word_at(data, load_addr, pc)
+ if not _is_valid_mips_word(word):
+ continue
+ case_reachable.add(pc)
+ kind, target = _classify_cf(pc, word)
+ delay = pc + 4
+ if kind == 'normal':
+ work.append(pc + 4)
+ elif kind == 'branch':
+ case_reachable.add(delay)
+ work.extend((pc + 8, target))
+ elif kind == 'branch_never':
+ case_reachable.add(delay)
+ work.append(pc + 8)
+ elif kind == 'branch_never_likely':
+ work.append(pc + 8)
+ elif kind == 'j':
+ case_reachable.add(delay)
+ work.append(target)
+ elif kind in ('jal', 'jalr'):
+ case_reachable.add(delay)
+ work.append(pc + 8)
+ elif kind in ('jr', 'jr_ra'):
+ case_reachable.add(delay)
+
+ protected_pc = sltiu_pc if scheduled_base else constant_pc
+ for source in range(entry, hard_cap, 4):
+ source_word = _word_at(data, load_addr, source)
+ if source_word is None:
+ return set()
+ kind, target = _classify_cf(source, source_word)
+ if (kind in ('branch', 'j', 'jal') and
+ protected_pc < target <= jr_pc and
+ not (protected_pc <= source <= jr_pc) and
+ (scheduled_base or source not in case_reachable)):
+ return set()
+ if proof_out is not None:
+ proof_out.append({
+ 'host_entry': entry,
+ 'jr_pc': jr_pc,
+ 'table_base': table_base,
+ 'count': table_count,
+ 'targets': sorted(targets),
+ })
+ return targets
+
+
+def _callable_legacy_seed(data: bytes, load_addr: int, addr: int) -> bool:
+ """Conservative fallback for old captures that only had a `seeds` list."""
+ word = _word_at(data, load_addr, addr)
+ prev = _word_at(data, load_addr, addr - 4)
+ prev8 = _word_at(data, load_addr, addr - 8)
+ if not _is_valid_mips_word(word):
+ return False
+ if addr == load_addr:
+ return True
+ if _is_jr_ra(prev8):
+ return True
+ return _is_addiu_sp_neg(word) and not _is_control_flow(prev)
+
+
+def _dense_local_pointer_table(data: bytes, load_addr: int,
+ addr: int, count: int = 3) -> bool:
+ """Reject instruction-shaped data at a supposed callable target."""
+ hi = load_addr + len(data)
+ for index in range(count):
+ value = _word_at(data, load_addr, addr + index * 4)
+ if value is None or (value & 3) or not (load_addr <= value < hi):
+ return False
+ return True
+
+
+def _callable_direct_jal_target(data: bytes, load_addr: int, addr: int) -> bool:
+ """True only when a direct JAL target has independent boundary evidence."""
+ return (not _dense_local_pointer_table(data, load_addr, addr) and
+ _callable_legacy_seed(data, load_addr, addr))
+
+
+def _instruction_writes_gpr(word: int, reg: int) -> bool:
+ if not reg:
+ return False
+ op = (word >> 26) & 0x3F
+ rs = (word >> 21) & 0x1F
+ rt = (word >> 16) & 0x1F
+ rd = (word >> 11) & 0x1F
+ fn = word & 0x3F
+ if op == 0:
+ if fn in (0x08, 0x0C, 0x0D, 0x11, 0x13,
+ 0x18, 0x19, 0x1A, 0x1B):
+ return False
+ return rd == reg
+ if op == 0x03:
+ return reg == 31
+ if op == 0x01 and rt in (0x10, 0x11):
+ return reg == 31
+ if op in range(0x08, 0x10) or op in range(0x20, 0x27) \
+ or op in (0x30, 0x32):
+ return rt == reg
+ if op in (0x10, 0x12) and rs in (0, 2):
+ return rt == reg
+ return False
+
+
+def _resolve_constant_transfer(data: bytes, load_addr: int,
+ entry: int, transfer_pc: int,
+ target_reg: int):
+ """Resolve a same-basic-block lui + addiu/ori constant feeding jr/jalr."""
+ low = None
+ low_is_addiu = False
+ for count in range(1, 17):
+ pc = transfer_pc - count * 4
+ if pc < entry:
+ break
+ word = _word_at(data, load_addr, pc)
+ if word is None:
+ break
+ op = (word >> 26) & 0x3F
+ rs = (word >> 21) & 0x1F
+ rt = (word >> 16) & 0x1F
+ if low is None and op in (0x09, 0x0D) \
+ and rs == target_reg and rt == target_reg:
+ low = word & 0xFFFF
+ low_is_addiu = op == 0x09
+ continue
+ if op == 0x0F and rt == target_reg:
+ # A LUI in a control-transfer delay slot is not a local reaching
+ # definition for the following suffix. A callee may clobber the
+ # register before returning at LUI+4, while a branch/jump can leave
+ # the linear path entirely. Fail closed without path/call proof.
+ predecessor = _word_at(data, load_addr, pc - 4)
+ if pc >= entry + 4 and _is_control_flow(predecessor):
+ return None
+
+ # Reject a syntactic constant pair when a direct control-flow edge
+ # can enter after this LUI. Example: `j low; lui; low: addiu;
+ # jalr` never executes the LUI, despite looking like a pair to a
+ # raw backward scan.
+ crossed_inbound_boundary = False
+ for source in range(entry, transfer_pc, 4):
+ source_word = _word_at(data, load_addr, source)
+ if source_word is None:
+ continue
+ source_kind, source_target = _classify_cf(source, source_word)
+ if (source_kind in ('branch', 'j', 'jal') and
+ pc < source_target <= transfer_pc):
+ crossed_inbound_boundary = True
+ break
+ if crossed_inbound_boundary:
+ return None
+
+ upper = (word & 0xFFFF) << 16
+ if low is None:
+ return upper
+ if low_is_addiu and low & 0x8000:
+ low -= 0x10000
+ return (upper + low) & 0xFFFFFFFF if low_is_addiu else upper | low
+ if _instruction_writes_gpr(word, target_reg) or _is_control_flow(word):
+ break
+ return None
+
+
+def plausible_callable_target(data: bytes, load_addr: int, size: int,
+ target: int, producer_hi: int) -> bool:
+ """CFG proof for a cross-producer call target without a classic prologue.
+
+ Direct calls are sufficient boundary evidence inside one linked producer.
+ Across a synthetic adjacent-producer envelope, additionally require a
+ bounded, valid CFG with a reachable return and no sequential fallthrough.
+ This retains real frameless exports while rejecting pointer tables/NOP
+ runways that only happen to decode as instructions.
+ """
+ first = _word_at(data, load_addr, target)
+ if first in (None, 0) or not _is_valid_mips_word(first):
+ return False
+ if _dense_local_pointer_table(data, load_addr, target):
+ return False
+ cap = min(load_addr + size, producer_hi, target + 0x4000)
+ work = deque([target])
+ visited = set()
+ saw_return = False
+ bad = False
+
+ def inside(addr: int) -> bool:
+ return target <= addr < cap and (addr & 3) == 0
+
+ def add_delay(pc: int) -> None:
+ nonlocal bad
+ delay = pc + 4
+ if not inside(delay):
+ bad = True
+ return
+ word = _word_at(data, load_addr, delay)
+ if not _is_valid_mips_word(word):
+ bad = True
+ else:
+ visited.add(delay)
+
+ while work and not bad and len(visited) < 2048:
+ pc = work.popleft()
+ if pc in visited:
+ continue
+ if not inside(pc):
+ bad = True # sequential fallthrough past the bounded probe
+ break
+ word = _word_at(data, load_addr, pc)
+ if not _is_valid_mips_word(word):
+ bad = True
+ break
+ visited.add(pc)
+ kind, branch_target = _classify_cf(pc, word)
+ if kind == 'normal':
+ work.append(pc + 4)
+ elif kind == 'branch':
+ add_delay(pc)
+ work.append(pc + 8) # conditional fallthrough must remain bounded
+ if inside(branch_target):
+ work.append(branch_target)
+ # An out-of-probe branch target is a shared external code edge.
+ elif kind == 'branch_never':
+ add_delay(pc)
+ work.append(pc + 8)
+ elif kind == 'branch_never_likely':
+ work.append(pc + 8)
+ elif kind in ('jal', 'jalr'):
+ add_delay(pc)
+ work.append(pc + 8)
+ elif kind == 'j':
+ add_delay(pc)
+ if inside(branch_target):
+ work.append(branch_target)
+ # Otherwise this is a bounded tail edge.
+ elif kind == 'jr_ra':
+ add_delay(pc)
+ saw_return = True
+ elif kind == 'jr':
+ add_delay(pc) # bounded indirect/tail exit
+
+ return saw_return and not bad and not work and len(visited) < 2048
+
+
+def _frameless_dispatch_root_proven(data: bytes, load_addr: int, size: int,
+ addr: int, producer_hi: int) -> bool:
+ """CFG proof for a dispatch entry admitted only by the word before it.
+
+ `_callable_legacy_seed` accepts an address on three different grades of
+ evidence: it is the image entry, it opens a stack frame, or the word two
+ slots back is `jr $ra`. The third is the weak one, and it is weak exactly
+ where it fires most: the first word *after* a function's return is also
+ the first word of whatever the linker laid down next, which in these
+ images is routinely a pointer table, a packed record array or zero fill.
+ A dispatch PC there is real -- a sibling occupant of the shared band has
+ code at that address -- but for *this* image it is data, and promoting it
+ to a walk root sends the linear walk through the table to the image end.
+
+ So require the same bounded CFG probe the discovery roots already use
+ when the classic prologue is absent. Failing it does not discard the
+ entry: the caller demotes it to DISPATCH_INTERIOR, which keeps the
+ dispatch evidence and the isolated-fragment demand and only declines to
+ start a walk there.
+ """
+ word = _word_at(data, load_addr, addr)
+ prev = _word_at(data, load_addr, addr - 4)
+ if addr == load_addr:
+ return True
+ if _is_addiu_sp_neg(word) and not _is_control_flow(prev):
+ return True
+ return plausible_callable_target(data, load_addr, size, addr, producer_hi)
+
+
+def _walk_overlay_function(data: bytes, load_addr: int, size: int,
+ entry: int, hard_cap: int,
+ producer_ranges=(),
+ allow_cross_producer_calls=True) -> dict:
+ lo = load_addr
+ hi = load_addr + size
+
+ work = deque([entry])
+ visited = set()
+ direct_jals = set()
+ static_indirect_targets = set()
+ call_continuations = set()
+ branch_targets = set()
+ jump_table_targets = set()
+ jump_table_proofs = []
+ forward_branch_targets = set()
+ rejected_cross_producer_calls = set()
+ accepted_cross_producer_calls = set()
+
+ def producer_for(addr: int):
+ for range_lo, range_hi in producer_ranges:
+ if range_lo <= addr < range_hi:
+ return range_lo, range_hi
+ return None
+
+ entry_producer = producer_for(entry)
+
+ def in_function(addr: int) -> bool:
+ return (lo <= addr < hi and entry <= addr < hard_cap and
+ (addr & 3) == 0 and
+ (not producer_ranges or
+ (entry_producer is not None and
+ producer_for(addr) == entry_producer)))
+
+ def callable_transfer_target(source: int, target: int) -> bool:
+ if _dense_local_pointer_table(data, load_addr, target):
+ rejected_cross_producer_calls.add(target)
+ return False
+ if not producer_ranges:
+ return True
+ source_range = producer_for(source)
+ target_range = producer_for(target)
+ if source_range is None or target_range is None:
+ rejected_cross_producer_calls.add(target)
+ return False
+ if source_range is not None and source_range == target_range:
+ return True
+ if not allow_cross_producer_calls:
+ rejected_cross_producer_calls.add(target)
+ return False
+ # Adjacent-producer composites are a byte envelope, not proof that a
+ # call encoded by producer A is linked to arbitrary bytes at the same
+ # address in every producer-B variant. Cross-boundary calls therefore
+ # need independent local boundary evidence. This keeps real exports
+ # while rejecting pointer/data words that happen to be valid MIPS.
+ if _callable_direct_jal_target(data, load_addr, target):
+ accepted_cross_producer_calls.add(target)
+ return True
+ if (target_range is not None and
+ plausible_callable_target(
+ data, load_addr, size, target, target_range[1])):
+ accepted_cross_producer_calls.add(target)
+ return True
+ rejected_cross_producer_calls.add(target)
+ return False
+
+ while work:
+ pc = work.popleft()
+ if pc in visited or not in_function(pc):
+ continue
+ word = _word_at(data, load_addr, pc)
+ if word is None:
+ continue
+ visited.add(pc)
+ kind, target = _classify_cf(pc, word)
+ delay = pc + 4
+
+ if kind == 'normal':
+ if in_function(pc + 4):
+ work.append(pc + 4)
+ elif kind == 'branch':
+ if in_function(delay):
+ visited.add(delay)
+ if in_function(pc + 8):
+ work.append(pc + 8)
+ branch_targets.add(pc + 8)
+ if in_function(target):
+ work.append(target)
+ branch_targets.add(target)
+ elif lo <= target < hi and target >= hard_cap and (target & 3) == 0:
+ # A reachable direct branch may jump across a sibling entry.
+ # Exact-entry partitioning hard-caps the current walk there,
+ # but the target remains mechanically proven code reachability.
+ forward_branch_targets.add(target)
+ elif kind == 'branch_never':
+ if in_function(delay):
+ visited.add(delay)
+ if in_function(pc + 8):
+ work.append(pc + 8)
+ branch_targets.add(pc + 8)
+ elif kind == 'branch_never_likely':
+ if in_function(pc + 8):
+ work.append(pc + 8)
+ branch_targets.add(pc + 8)
+ elif kind == 'j':
+ if in_function(delay):
+ visited.add(delay)
+ if in_function(target):
+ work.append(target)
+ branch_targets.add(target)
+ elif lo <= target < hi and target >= hard_cap and (target & 3) == 0:
+ forward_branch_targets.add(target)
+ elif kind == 'jal':
+ if in_function(delay):
+ visited.add(delay)
+ if in_function(pc + 8):
+ work.append(pc + 8)
+ branch_targets.add(pc + 8)
+ call_continuations.add(pc + 8)
+ if (lo <= target < hi and (target & 3) == 0 and
+ _is_valid_mips_word(_word_at(data, load_addr, target)) and
+ callable_transfer_target(pc, target)):
+ direct_jals.add(target)
+ elif kind == 'jalr':
+ if in_function(delay):
+ visited.add(delay)
+ if in_function(pc + 8):
+ work.append(pc + 8)
+ branch_targets.add(pc + 8)
+ call_continuations.add(pc + 8)
+ target_reg = (word >> 21) & 0x1F
+ target = _resolve_constant_transfer(data, load_addr, entry, pc,
+ target_reg)
+ if (target is not None and lo <= target < hi and (target & 3) == 0
+ and callable_transfer_target(pc, target)):
+ static_indirect_targets.add(target)
+ elif kind == 'jr':
+ if in_function(delay):
+ visited.add(delay)
+ jr_rs = (word >> 21) & 0x1F
+ target = _resolve_constant_transfer(data, load_addr, entry, pc, jr_rs)
+ if target is not None and lo <= target < hi and (target & 3) == 0:
+ if in_function(target):
+ branch_targets.add(target)
+ work.append(target)
+ elif callable_transfer_target(pc, target):
+ static_indirect_targets.add(target)
+ else:
+ proofs = []
+ for jt in _find_jump_table_targets(data, load_addr, size,
+ entry, hard_cap, pc, jr_rs,
+ entry_producer, proofs):
+ jump_table_targets.add(jt)
+ branch_targets.add(jt)
+ if in_function(jt):
+ work.append(jt)
+ jump_table_proofs.extend(proofs)
+ elif kind == 'jr_ra':
+ if in_function(delay):
+ visited.add(delay)
+
+ return {
+ 'visited': visited,
+ 'direct_jals': direct_jals,
+ 'static_indirect_targets': static_indirect_targets,
+ 'call_continuations': call_continuations,
+ 'branch_targets': branch_targets,
+ 'jump_table_targets': jump_table_targets,
+ 'jump_table_proofs': jump_table_proofs,
+ 'forward_branch_targets': forward_branch_targets,
+ 'rejected_cross_producer_calls': rejected_cross_producer_calls,
+ 'accepted_cross_producer_calls': accepted_cross_producer_calls,
+ }
+
+
+def _masked_region_crc(data: bytes, load_addr: int, ignore) -> int:
+ """CRC32 of a captured region with declared-volatile byte ranges zeroed."""
+ if not ignore:
+ return binascii.crc32(data) & 0xFFFFFFFF
+ buf = bytearray(data)
+ hi = load_addr + len(data)
+ for raw in ignore:
+ if isinstance(raw, dict):
+ start, end = _parse_addr(raw['start']), _parse_addr(raw['end'])
+ else:
+ raise RuntimeError(
+ 'bytes_crc_ignore entries must be tables with start/end')
+ if not (load_addr <= start < end <= hi):
+ raise RuntimeError(
+ f'bytes_crc_ignore range 0x{start:08X}..0x{end:08X} outside '
+ f'capture 0x{load_addr:08X}..0x{hi:08X}')
+ buf[start - load_addr:end - load_addr] = b'\0' * (end - start)
+ return binascii.crc32(bytes(buf)) & 0xFFFFFFFF
+
+
+def _collect_toml_overlay_entries(toml_doc: dict, load_addr: int, crc32: int,
+ data: bytes = b'') -> set[int]:
+ entries = set()
+ for ov in toml_doc.get('overlays', []) or []:
+ if not isinstance(ov, dict):
+ continue
+ ov_load = ov.get('load_addr') or ov.get('load_address')
+ if ov_load is not None and _parse_addr(ov_load) != load_addr:
+ continue
+ ov_crc = ov.get('bytes_crc') or ov.get('crc32') or ov.get('crc')
+ if ov_crc is not None:
+ ignore = ov.get('bytes_crc_ignore')
+ live = _masked_region_crc(data, load_addr, ignore) if ignore else crc32
+ if _parse_addr(ov_crc) != live:
+ print(f' declared entries DETACHED for 0x{load_addr:08X}: '
+ f'bytes_crc=0x{_parse_addr(ov_crc):08X} but region hashes '
+ f'0x{live:08X}'
+ f'{" (masked)" if ignore else ""} -- update game.toml',
+ file=sys.stderr)
+ continue
+ for key in ('entry', 'entries', 'function_entry_pcs', 'function_entries'):
+ if key not in ov:
+ continue
+ val = ov[key]
+ if isinstance(val, list):
+ entries.update(_parse_addr_list(val))
+ else:
+ entries.add(_parse_addr(val))
+ return entries
+
+
+def classify_overlay_seeds(cap: dict, data: bytes, load_addr: int, size: int,
+ crc32: int, toml_doc: dict) -> tuple[list[str], dict]:
+ lo = load_addr
+ hi = load_addr + size
+ region = lambda a: lo <= a < hi and (a & 3) == 0
+ producer_ranges = []
+ for raw_range in cap.get('producer_ranges', []) or []:
+ if not isinstance(raw_range, dict):
+ raise RuntimeError('producer_ranges entries must be objects')
+ try:
+ range_lo = _parse_addr(raw_range['start'])
+ range_hi = _parse_addr(raw_range['end'])
+ except (KeyError, TypeError, ValueError) as exc:
+ raise RuntimeError(f'invalid producer_ranges entry: {raw_range}') from exc
+ if not (lo <= range_lo < range_hi <= hi):
+ raise RuntimeError(
+ f'producer range 0x{range_lo:08X}..0x{range_hi:08X} '
+ f'outside capture 0x{lo:08X}..0x{hi:08X}')
+ producer_ranges.append((range_lo, range_hi))
+ producer_ranges.sort()
+ if any(producer_ranges[i-1][1] > producer_ranges[i][0]
+ for i in range(1, len(producer_ranges))):
+ raise RuntimeError('producer_ranges overlap')
+
+ def capture_producer_for(addr: int):
+ for producer_lo, producer_hi in producer_ranges:
+ if producer_lo <= addr < producer_hi:
+ return producer_lo, producer_hi
+ return None
+
+ static_alias_ranges = set()
+ allow_cross_producer_calls = not bool(cap.get('strict_producer_ranges'))
+ for raw_alias in cap.get('static_alias_ranges', []) or []:
+ if not isinstance(raw_alias, dict):
+ raise RuntimeError('static_alias_ranges entries must be objects')
+ try:
+ entry = _parse_addr(raw_alias['entry'])
+ range_lo = _parse_addr(raw_alias['start'])
+ range_hi = _parse_addr(raw_alias['end'])
+ except (KeyError, TypeError, ValueError) as exc:
+ raise RuntimeError(
+ f'invalid static_alias_ranges entry: {raw_alias}') from exc
+ if not (lo <= range_lo <= entry < range_hi <= hi and
+ (entry & 3) == 0 and (range_lo & 3) == 0 and
+ (range_hi & 3) == 0):
+ raise RuntimeError(
+ f'static alias 0x{entry:08X} -> '
+ f'0x{range_lo:08X}..0x{range_hi:08X} outside/misaligned for '
+ f'capture 0x{lo:08X}..0x{hi:08X}')
+ if producer_ranges:
+ owners = [index for index, (producer_lo, producer_hi) in
+ enumerate(producer_ranges)
+ if (producer_lo <= range_lo < producer_hi and
+ producer_lo <= entry < producer_hi and
+ producer_lo <= range_hi - 1 < producer_hi)]
+ if not owners:
+ raise RuntimeError(
+ f'static alias 0x{entry:08X} crosses producer boundary')
+ static_alias_ranges.add((entry, range_lo, range_hi))
+
+ schema_keys = {'executed_pcs', 'observed_pcs', 'dispatch_entry_pcs',
+ 'static_dispatch_entry_pcs', 'function_entry_pcs'}
+ has_split_schema = any(k in cap for k in schema_keys)
+
+ legacy_seeds = _parse_addr_list(cap.get('seeds', []))
+ executed_pcs = _parse_addr_list(cap.get('executed_pcs',
+ cap.get('observed_pcs',
+ legacy_seeds if not has_split_schema else [])))
+ dispatch_entry_pcs = _parse_addr_list(cap.get('dispatch_entry_pcs', []))
+ # New extractors preserve which dispatch entries came from a static
+ # export/header/jump table. Treat malformed superset values as ordinary
+ # unknown metadata, never as cross-variant authority.
+ declared_static_dispatch = _parse_addr_list(
+ cap.get('static_dispatch_entry_pcs', []))
+ if not declared_static_dispatch <= dispatch_entry_pcs:
+ extra = sorted(declared_static_dispatch - dispatch_entry_pcs)
+ raise RuntimeError(
+ 'static_dispatch_entry_pcs must be a subset of '
+ 'dispatch_entry_pcs: ' +
+ ', '.join(f'0x{addr:08X}' for addr in extra))
+ static_dispatch_entries = declared_static_dispatch
+ captured_function_entries = _parse_addr_list(cap.get('function_entry_pcs', []))
+ static_discovery_entries = _parse_addr_list(
+ cap.get('static_discovery_entry_pcs', []))
+ toml_entries = _collect_toml_overlay_entries(toml_doc, load_addr, crc32, data)
+ legacy_callable_seeds = {a for a in legacy_seeds
+ if region(a) and _callable_legacy_seed(data, load_addr, a)}
+
+ included: dict[int, str] = {}
+ excluded: dict[int, str] = {}
+ # Shared CFG ownership may later reject a hostless interior. Preserve its
+ # validated dispatch evidence separately so executed entries can still use
+ # the isolated, audited fragment path without truncating a shared host.
+ dispatch_fragment_demands = set()
+ fragment_hi = hi - capture_guard_bytes(cap, size)
+ game_text = _game_text_range(toml_doc)
+
+ # A dispatch into dirty RAM can land on a jump-table case label. That
+ # proves coverage, not a callable function boundary, so discover those
+ # labels before promoting dispatch entries to seeds.
+ pre_roots = (set(legacy_callable_seeds) | set(captured_function_entries) |
+ set(static_discovery_entries) | set(toml_entries))
+ pre_roots.update(a for a in dispatch_entry_pcs
+ if region(a) and _callable_legacy_seed(data, load_addr, a))
+ jump_table_targets = set()
+ pre_roots_sorted = sorted(a for a in pre_roots if region(a))
+ for i, entry in enumerate(pre_roots_sorted):
+ hard_cap = pre_roots_sorted[i + 1] if i + 1 < len(pre_roots_sorted) else hi
+ walk = _walk_overlay_function(
+ data, load_addr, size, entry, hard_cap, producer_ranges,
+ allow_cross_producer_calls)
+ jump_table_targets.update(walk['jump_table_targets'])
+
+ def impossible_entry_start(addr: int) -> bool:
+ word = _word_at(data, load_addr, addr)
+ if word is None:
+ return True
+ if not _is_valid_mips_word(word):
+ return True
+ kind, target = _classify_cf(addr, word)
+ if kind == 'j':
+ return _classify_target(target, load_addr, size, game_text) == 'UNKNOWN_BAD'
+ if kind == 'jal' and region(target):
+ return not _callable_direct_jal_target(data, load_addr, target)
+ return False
+
+ def include(addr: int, reason: str):
+ if not region(addr):
+ excluded[addr] = 'UNKNOWN'
+ return
+ # Composite padding has bytes but no producer identity. A root there
+ # would otherwise get entry_producer=None and could walk through every
+ # disconnected zero-fill gap as though those gaps shared ownership.
+ if producer_ranges and capture_producer_for(addr) is None:
+ excluded[addr] = 'UNKNOWN'
+ return
+ # Boundary gate: a dispatched-to PC is proof of *code reachability*, not
+ # of a *callable function boundary*. A jr-driven jump-table case label
+ # or a mid-function pointer target can be dispatched-to yet have no
+ # prologue and no preceding jr $ra. Promoting it to a WALK ROOT would
+ # truncate its host function (mid-function-seed softlock class) or run
+ # off into adjacent data. Such PCs are dispatch-proven code, though —
+ # classify them DISPATCH_INTERIOR: the recompiler emits them as
+ # overlapping-alias entries into their host (never walk roots).
+ # Invalid words stay excluded. Call-edge-proven reasons
+ # (DIRECT_JAL_TARGET, FUNCTION_POINTER_TARGET, TOML_DECLARED_ENTRY) are
+ # exempt — they carry their own proof.
+ # A dispatch entry that has no prologue and is callable only because a
+ # `jr $ra` precedes it is the head of whatever follows the last
+ # function, data included, so it needs the bounded CFG probe before it
+ # may be a walk root (_frameless_dispatch_root_proven).
+ if reason in ('DISPATCH_ENTRY', 'STATIC_DISPATCH_ENTRY'):
+ if impossible_entry_start(addr):
+ excluded[addr] = 'UNKNOWN'
+ return
+ if addr + 4 <= fragment_hi:
+ dispatch_fragment_demands.add(addr)
+ producer = capture_producer_for(addr)
+ if (addr in jump_table_targets or
+ not _callable_legacy_seed(data, load_addr, addr) or
+ not _frameless_dispatch_root_proven(
+ data, load_addr, size, addr,
+ producer[1] if producer else hi)):
+ included.setdefault(addr, 'DISPATCH_INTERIOR')
+ return
+ elif (reason not in ('DIRECT_JAL_TARGET', 'STATIC_INDIRECT_TARGET',
+ 'STATIC_BRANCH_ROOT',
+ 'STATIC_DISCOVERY_ROOT',
+ 'TOML_DECLARED_ENTRY') and
+ addr in jump_table_targets and
+ not _callable_legacy_seed(data, load_addr, addr)):
+ excluded[addr] = 'BRANCH_TARGET_ONLY'
+ return
+ if reason in FATAL_SEED_REASONS:
+ raise RuntimeError(f'BUG: refusing to include 0x{addr:08X} as {reason}')
+ old = included.get(addr)
+ if reason in ('DIRECT_JAL_TARGET', 'STATIC_INDIRECT_TARGET',
+ 'STATIC_BRANCH_ROOT', 'STATIC_DISCOVERY_ROOT',
+ 'STATIC_DISPATCH_ENTRY'):
+ # Static call-edge evidence outranks heuristic capture metadata.
+ included[addr] = reason
+ elif old is None or old in ('FUNCTION_POINTER_TARGET', 'DISPATCH_INTERIOR'):
+ included[addr] = reason
+
+ for addr in dispatch_entry_pcs:
+ include(addr, ('STATIC_DISPATCH_ENTRY'
+ if addr in static_dispatch_entries
+ else 'DISPATCH_ENTRY'))
+ for addr in captured_function_entries:
+ include(addr, 'FUNCTION_POINTER_TARGET')
+ for addr in static_discovery_entries:
+ if not region(addr):
+ excluded[addr] = 'UNKNOWN'
+ elif (_callable_legacy_seed(data, load_addr, addr) or
+ plausible_callable_target(data, load_addr, size, addr, hi)):
+ include(addr, 'STATIC_DISCOVERY_ROOT')
+ else:
+ # Preserve the weaker classification. Overlay mode will perform
+ # its ordinary boundary recheck and fail closed if needed.
+ include(addr, 'FUNCTION_POINTER_TARGET')
+ for addr in toml_entries:
+ include(addr, 'TOML_DECLARED_ENTRY')
+
+ legacy_seed_mode = bool(legacy_seeds) and not cap.get('schema')
+ if legacy_seed_mode:
+ # Old capture files used `seeds` for interpreter-observed PCs. Include
+ # only PCs whose surrounding bytes look callable; classify the rest
+ # after we know branch targets from accepted roots.
+ for addr in legacy_callable_seeds:
+ include(addr, 'FUNCTION_POINTER_TARGET')
+
+ # Current-capture alias recipes contribute only an interior ENTRY candidate;
+ # their historical host range is not trusted. Final exact reachability below
+ # must discover a current host or the entry is dropped to the interpreter.
+ for addr, _range_lo, _range_hi in static_alias_ranges:
+ if region(addr):
+ included[addr] = 'DISPATCH_INTERIOR'
+
+ # Walk roots: callable entries only. DISPATCH_INTERIOR addresses are NOT
+ # roots — as roots they would hard-cap (truncate) the sibling walk that
+ # owns them.
+ known = {a for a, r in included.items() if r != 'DISPATCH_INTERIOR'}
+ initial_known = set(known)
+ derived_reasons = {}
+ promoted_roots = set()
+ suppressed_derived = set()
+ suppression_passes = 0
+ all_branch_targets = set()
+ kernel_window = (load_addr & 0x1FFFFFFF) < 0x10000
+
+ while True:
+ # Recompute call/branch evidence from the CURRENT partition. Evidence is
+ # not monotonic: a new hard cap can make an old source PC unreachable.
+ # Dropping stale candidates here prevents an old speculative walk from
+ # resurrecting a target in the final shard.
+ discovery_round = 0
+ seen_states = {}
+ state_history = []
+ while True:
+ discovery_round += 1
+ state = (tuple(sorted(known)), tuple(sorted(derived_reasons)))
+ cycle_start = seen_states.get(state)
+ if discovery_round > 64 or cycle_start is not None:
+ unstable = set()
+ if cycle_start is not None:
+ cycle_states = state_history[cycle_start:]
+ known_sets = [set(item[0]) for item in cycle_states]
+ derived_sets = [set(item[1]) for item in cycle_states]
+ if known_sets:
+ unstable |= set.union(*known_sets) - set.intersection(*known_sets)
+ if derived_sets:
+ unstable |= (set.union(*derived_sets) -
+ set.intersection(*derived_sets))
+ unstable_text = ','.join(f'{addr:08X}'
+ for addr in sorted(unstable)[:12])
+ unstable -= initial_known | promoted_roots
+ if unstable and suppression_passes < 64:
+ suppression_passes += 1
+ suppressed_derived.update(unstable)
+ print(' WARNING: ownership discovery cycle; suppressing '
+ f'{len(unstable)} unstable derived roots'
+ + (f' ({unstable_text})' if unstable_text else ''))
+ known = initial_known | promoted_roots
+ derived_reasons = {}
+ discovery_round = 0
+ seen_states = {}
+ state_history = []
+ continue
+ print(' WARNING: ownership discovery did not converge; '
+ 'falling back to explicit/dispatch roots'
+ + (f' (cycle={len(state_history) - cycle_start}, '
+ f'unstable={unstable_text})'
+ if cycle_start is not None else ' (round limit)'))
+ known = initial_known | promoted_roots
+ derived_reasons = {}
+ break
+ seen_states[state] = len(state_history)
+ state_history.append(state)
+ next_reasons = {}
+ round_branch_targets = set()
+ sorted_known = sorted(known)
+ for index, entry in enumerate(sorted_known):
+ hard_cap = (sorted_known[index + 1]
+ if index + 1 < len(sorted_known) else hi)
+ walk = _walk_overlay_function(
+ data, load_addr, size, entry, hard_cap, producer_ranges,
+ allow_cross_producer_calls)
+ round_branch_targets.update(walk['branch_targets'])
+ round_branch_targets.update(walk['jump_table_targets'])
+ for target in walk['direct_jals']:
+ if (target not in initial_known and
+ target not in suppressed_derived):
+ next_reasons[target] = 'DIRECT_JAL_TARGET'
+ for target in walk['static_indirect_targets']:
+ if (target not in initial_known and
+ target not in suppressed_derived):
+ next_reasons.setdefault(target, 'STATIC_INDIRECT_TARGET')
+ for target in walk['forward_branch_targets']:
+ source_reason = (included.get(entry) or
+ derived_reasons.get(entry) or
+ ('DISPATCH_ROOT'
+ if entry in promoted_roots else None))
+ strong_source = source_reason in (
+ 'DIRECT_JAL_TARGET', 'STATIC_INDIRECT_TARGET',
+ 'STATIC_BRANCH_ROOT', 'STATIC_DISCOVERY_ROOT',
+ 'STATIC_DISPATCH_ENTRY', 'TOML_DECLARED_ENTRY',
+ 'DISPATCH_ROOT')
+ if not strong_source and not _callable_legacy_seed(
+ data, load_addr, entry):
+ continue
+ source_range = next(
+ ((rlo, rhi) for rlo, rhi in producer_ranges
+ if rlo <= entry < rhi), None)
+ target_range = next(
+ ((rlo, rhi) for rlo, rhi in producer_ranges
+ if rlo <= target < rhi), None)
+ if producer_ranges and source_range != target_range:
+ continue
+ producer_hi = target_range[1] if target_range else hi
+ if plausible_callable_target(
+ data, load_addr, size, target, producer_hi):
+ if (target not in initial_known and
+ target not in suppressed_derived):
+ next_reasons.setdefault(target, 'STATIC_BRANCH_ROOT')
+
+ normalized = initial_known | promoted_roots | set(next_reasons)
+ roots = sorted(normalized)
+ for target in sorted(next_reasons):
+ if target not in normalized:
+ continue
+ index = bisect_left(roots, target)
+ if index == len(roots) or roots[index] != target or index == 0:
+ continue
+ owner = roots[index - 1]
+ hard_cap = roots[index + 1] if index + 1 < len(roots) else hi
+ owner_walk = _walk_overlay_function(
+ data, load_addr, size, owner, hard_cap, producer_ranges,
+ allow_cross_producer_calls)
+ if target in owner_walk['visited']:
+ normalized.remove(target)
+ roots.pop(index)
+
+ if normalized == known and next_reasons == derived_reasons:
+ all_branch_targets = round_branch_targets
+ break
+ known = normalized
+ derived_reasons = next_reasons
+
+ if not kernel_window:
+ break
+
+ # Orphan promotion (see DISPATCH_ROOT in INCLUDE_REASONS): a kernel
+ # dispatch interior that no rooted walk covers is promoted to a
+ # trusted walk root. Re-enter the walk loop — the new root's walk
+ # may cover other interiors or discover direct-jal callees.
+ covered = set()
+ sorted_known = sorted(known)
+ for i, entry in enumerate(sorted_known):
+ hard_cap = sorted_known[i + 1] if i + 1 < len(sorted_known) else hi
+ walk = _walk_overlay_function(
+ data, load_addr, size, entry, hard_cap, producer_ranges,
+ allow_cross_producer_calls)
+ covered |= walk['visited']
+ promoted = sorted(a for a, r in included.items()
+ if r == 'DISPATCH_INTERIOR' and a not in covered
+ and _is_valid_mips_word(_word_at(data, load_addr, a)))
+ if not promoted:
+ break
+ # Promote ONE orphan per iteration (lowest address first): its walk
+ # usually covers the remaining orphans, which then stay interiors and
+ # alias into the new root as host — rather than minting sibling roots
+ # that split one real function and hard-cap each other.
+ a = promoted[0]
+ included[a] = 'DISPATCH_ROOT'
+ promoted_roots.add(a)
+ known.add(a)
+
+ # Re-walk with the final function set so the branch-target exclusion count
+ # matches the actual compilation boundaries.
+ all_branch_targets.clear()
+ rejected_cross_producer_calls = set()
+ accepted_cross_producer_calls = set()
+ final_covered = set()
+ sorted_known = sorted(known)
+ for i, entry in enumerate(sorted_known):
+ hard_cap = sorted_known[i + 1] if i + 1 < len(sorted_known) else hi
+ walk = _walk_overlay_function(
+ data, load_addr, size, entry, hard_cap, producer_ranges,
+ allow_cross_producer_calls)
+ all_branch_targets.update(walk['branch_targets'])
+ all_branch_targets.update(walk['jump_table_targets'])
+ all_branch_targets.update(walk['forward_branch_targets'])
+ final_covered.update(walk['visited'])
+ rejected_cross_producer_calls.update(
+ walk['rejected_cross_producer_calls'])
+ accepted_cross_producer_calls.update(
+ walk['accepted_cross_producer_calls'])
+
+ # A DISPATCH_INTERIOR is emitted only when the final partition has a real
+ # CFG host for that exact PC. Reconsider every derived target after all
+ # later roots have settled; stale ownership falls back to a root (when it
+ # remains call-proven) or to the interpreter, never a hostless alias.
+ for addr, reason in sorted(derived_reasons.items()):
+ if addr in known:
+ include(addr, reason)
+ elif addr in final_covered:
+ included[addr] = 'DISPATCH_INTERIOR'
+ else:
+ included.pop(addr, None)
+ excluded[addr] = 'OBSERVED_PC_ONLY'
+ for addr, reason in list(included.items()):
+ if reason == 'DISPATCH_INTERIOR' and addr not in final_covered:
+ del included[addr]
+ excluded[addr] = ('OBSERVED_PC_ONLY'
+ if addr in executed_pcs else 'UNKNOWN')
+
+ candidates = {a for a in (executed_pcs | dispatch_entry_pcs |
+ captured_function_entries | static_discovery_entries |
+ legacy_seeds | toml_entries)
+ if region(a)}
+ for addr in sorted(candidates - set(included)):
+ if addr in all_branch_targets or addr in jump_table_targets:
+ excluded[addr] = 'BRANCH_TARGET_ONLY'
+ elif addr in executed_pcs or addr in legacy_seeds:
+ excluded[addr] = 'OBSERVED_PC_ONLY'
+ else:
+ excluded[addr] = 'UNKNOWN'
+
+ bad_included = [(a, r) for a, r in included.items() if r in FATAL_SEED_REASONS]
+ if bad_included:
+ details = ', '.join(f'0x{a:08X}:{r}' for a, r in bad_included)
+ raise RuntimeError(f'fatal seed classification: {details}')
+
+ counts = Counter(included.values())
+ excluded_counts = Counter(excluded.values())
+ audit = {
+ 'load_addr': load_addr,
+ 'crc32': crc32,
+ 'lo': lo,
+ 'hi': hi,
+ 'executed_pcs': executed_pcs,
+ 'dispatch_entry_pcs': dispatch_entry_pcs,
+ 'static_dispatch_entry_pcs': static_dispatch_entries,
+ 'dispatch_fragment_demands': dispatch_fragment_demands,
+ 'function_entry_pcs': set(included),
+ 'included_reasons': included,
+ 'excluded_reasons': excluded,
+ 'branch_targets_excluded_count': len(all_branch_targets - set(included)),
+ 'counts': counts,
+ 'excluded_counts': excluded_counts,
+ 'producer_ranges': producer_ranges,
+ 'static_alias_ranges': static_alias_ranges,
+ # Every strong walk root is an exact-entry demand. These roots come from
+ # decoder/control-flow, callable-boundary, explicit TOML, or dispatch
+ # proof rather than an arbitrary observed PC. If a shared-region build
+ # (or a concurrent poorer winner) lacks its F entry, the post-pass can
+ # safely retry it in the isolated-fragment failure domain.
+ 'static_exact_fragment_demands': {
+ addr for addr, reason in included.items()
+ if reason in EXACT_FRAGMENT_REASONS
+ },
+ # Only static control-flow/export evidence may nominate an address in a
+ # sibling byte recipe. The recipient still has to prove an existing
+ # CRC-valid host and the recompiler must prove a real block leader.
+ 'cross_variant_hosted_demands': {
+ addr for addr, reason in included.items()
+ if reason in CROSS_VARIANT_DONOR_REASONS
+ },
+ # Alias recipes describe entry labels inside a normal-mode host. They
+ # need an isolated body only when the stricter shared analysis leaves
+ # the label outside every current code interval; aliases already inside
+ # a guarded body remain candidates for the future exact-resume pass.
+ 'static_interval_fragment_demands': {
+ entry for entry, _lo, _hi in static_alias_ranges
+ },
+ 'rejected_cross_producer_calls': rejected_cross_producer_calls,
+ 'accepted_cross_producer_calls': accepted_cross_producer_calls,
+ 'static_jump_table_proofs': cap.get('static_jump_table_proofs', []),
+ 'static_call_continuation_pcs': _parse_addr_list(
+ cap.get('static_call_continuation_pcs', [])),
+ }
+ # Interior entries carry the 'interior' marker so the recompiler emits
+ # them as overlapping aliases, never as walk roots. Promoted kernel
+ # orphans carry 'dispatch_root' so the recompiler roots them without
+ # boundary re-verification.
+ seeds = []
+ for range_lo, range_hi in producer_ranges:
+ seeds.append(f'producer_range 0x{range_lo:08X} 0x{range_hi:08X}')
+ for addr in sorted(accepted_cross_producer_calls):
+ seeds.append(f'cross_call_allow 0x{addr:08X}')
+ seeds.extend(seed_line_for_reason(addr, included[addr])
+ for addr in sorted(included))
+ return seeds, audit
+
+
+def print_seed_audit(audit: dict) -> None:
+ print(f'Overlay {audit["load_addr"]:08X}_{audit["crc32"]:08X}')
+ print(f'Region: {audit["lo"]:08X}..{audit["hi"] - 1:08X}')
+ print(f'executed_pcs: {len(audit["executed_pcs"])}')
+ print(f'dispatch_entry_pcs: {len(audit["dispatch_entry_pcs"])}')
+ print(f'function_entry_pcs: {len(audit["function_entry_pcs"])}')
+ print(f'direct_jal_targets_included: {audit["counts"].get("DIRECT_JAL_TARGET", 0)}')
+ print(f'static_indirect_targets_included: {audit["counts"].get("STATIC_INDIRECT_TARGET", 0)}')
+ print(f'static_branch_roots_included: '
+ f'{audit["counts"].get("STATIC_BRANCH_ROOT", 0)}')
+ print(f'static_discovery_roots_included: '
+ f'{audit["counts"].get("STATIC_DISCOVERY_ROOT", 0)}')
+ print(f'function_pointer_targets_included: {audit["counts"].get("FUNCTION_POINTER_TARGET", 0)}')
+ print(f'toml_entries_included: {audit["counts"].get("TOML_DECLARED_ENTRY", 0)}')
+ print(f'dispatch_interior_included: {audit["counts"].get("DISPATCH_INTERIOR", 0)}')
+ print(f'dispatch_roots_promoted: {audit["counts"].get("DISPATCH_ROOT", 0)}')
+ unhosted_dispatch = (audit.get('dispatch_fragment_demands', set()) &
+ audit['executed_pcs']) - set(audit['included_reasons'])
+ print(f'unhosted_executed_dispatch_fragment_demands: {len(unhosted_dispatch)}')
+ print(f'cross_producer_calls_rejected: '
+ f'{len(audit["rejected_cross_producer_calls"])}')
+ print(f'cross_producer_calls_accepted: '
+ f'{len(audit["accepted_cross_producer_calls"])}')
+ print(f'branch_targets_excluded: {audit["branch_targets_excluded_count"]}')
+ print(f'observed_only_excluded: {audit["excluded_counts"].get("OBSERVED_PC_ONLY", 0)}')
+ print(f'unknown_excluded: {audit["excluded_counts"].get("UNKNOWN", 0)}')
+ for addr in sorted(audit['included_reasons']):
+ print(f' {addr:08X} {audit["included_reasons"][addr]}')
+ for addr in sorted(audit['excluded_reasons']):
+ reason = audit['excluded_reasons'][addr]
+ if reason in ('BRANCH_TARGET_ONLY', 'OBSERVED_PC_ONLY', 'UNKNOWN'):
+ recovery = ('; isolated fragment demand retained'
+ if addr in unhosted_dispatch else '')
+ print(f' {addr:08X} excluded: {reason}{recovery}')
+
+
+def walk_root_seed_entries(seeds: list[str]) -> set[int]:
+ """Exact F entries demanded by recompiler walk-root seed records."""
+ entries = set()
+ for seed in seeds:
+ parts = seed.split()
+ if not parts:
+ continue
+ if (parts[0] not in ('call_root', 'dispatch_root') and
+ not parts[0].startswith('0x')):
+ continue
+ try:
+ entries.add(_canonical_guest_addr(int(parts[-1], 16)))
+ except ValueError:
+ pass
+ return entries
+
+
+def _game_text_range(toml_doc: dict) -> tuple[int, int]:
+ game = toml_doc.get('game', {})
+ load = game.get('load_address')
+ size = game.get('text_size')
+ if load is None or size is None:
+ return (0, 0)
+ lo = _parse_addr(load) & 0x1FFFFFFF
+ hi = lo + _parse_addr(size)
+ return lo, hi
+
+
+def _classify_target(addr: int, load_addr: int, size: int,
+ game_text: tuple[int, int]) -> str:
+ phys = addr & 0x1FFFFFFF
+ ov_lo = load_addr & 0x1FFFFFFF
+ ov_hi = ov_lo + size
+ if ov_lo <= phys < ov_hi:
+ return 'INSIDE_OVERLAY'
+ game_lo, game_hi = game_text
+ if game_hi > game_lo and game_lo <= phys < game_hi:
+ return 'MAIN_EXE'
+ if 0x1FC00000 <= phys < 0x1FC80000 or 0xBFC00000 <= addr < 0xBFC80000:
+ return 'BIOS'
+ return 'UNKNOWN_BAD'
+
+
+def audit_generated_c(src: str, load_addr: int, size: int,
+ crc32: int, toml_doc: dict) -> dict:
+ defs = {int(x, 16) for x in re.findall(
+ r'^void func_([0-9A-Fa-f]{8})\(CPUState\* cpu\)$', src, re.MULTILINE)}
+ decls = {int(x, 16) for x in re.findall(
+ r'^void func_([0-9A-Fa-f]{8})\(CPUState\* cpu\);$', src, re.MULTILINE)}
+ direct_calls = [int(x, 16) for x in re.findall(
+ r'\bfunc_([0-9A-Fa-f]{8})\(cpu\)', src)]
+ literal_cba = [int(x, 16) for x in re.findall(
+ r'\bcall_by_address\(cpu,\s*0x([0-9A-Fa-f]{8})u?\)', src)]
+ unsupported_todo_addrs = {int(x, 16) for x in re.findall(
+ r'TODO:[^\n]*?0x([0-9A-Fa-f]{8}):', src)}
+
+ game_text = _game_text_range(toml_doc)
+ ov_lo = load_addr & 0x1FFFFFFF
+ ov_hi = ov_lo + size
+
+ def in_overlay(addr: int) -> bool:
+ phys = addr & 0x1FFFFFFF
+ return ov_lo <= phys < ov_hi
+
+ unknown_bad = set()
+ missing_direct = set()
+ direct_outside = set()
+ for addr in direct_calls:
+ if not in_overlay(addr):
+ direct_outside.add(addr)
+ unknown_bad.add(addr)
+ elif addr not in defs:
+ missing_direct.add(addr)
+ unknown_bad.add(addr)
+
+ cba_classes = Counter()
+ for addr in literal_cba:
+ cls = _classify_target(addr, load_addr, size, game_text)
+ cba_classes[cls] += 1
+ if cls == 'UNKNOWN_BAD':
+ unknown_bad.add(addr)
+
+ decl_without_def = {a for a in decls if in_overlay(a) and a not in defs}
+ called_decl_without_def = decl_without_def & set(direct_calls)
+ if called_decl_without_def:
+ unknown_bad.update(called_decl_without_def)
+
+ report = {
+ 'defs': defs,
+ 'decls': decls,
+ 'direct_calls': direct_calls,
+ 'literal_cba': literal_cba,
+ 'direct_inside': sum(1 for a in direct_calls if in_overlay(a)),
+ 'external_cba': sum(1 for a in literal_cba if not in_overlay(a)),
+ 'bios_calls': cba_classes.get('BIOS', 0),
+ 'syscall_uses': len(re.findall(r'\bpsx_syscall\s*\(', src)),
+ 'unknown_dispatch_uses': len(re.findall(r'\bpsx_unknown_dispatch\s*\(', src)),
+ 'unsupported_todo_addrs': unsupported_todo_addrs,
+ 'unknown_bad': unknown_bad,
+ 'direct_outside': direct_outside,
+ 'missing_direct': missing_direct,
+ 'decl_without_def': decl_without_def,
+ 'called_decl_without_def': called_decl_without_def,
+ 'cba_classes': cba_classes,
+ }
+ return report
+
+
+def print_generated_c_audit(load_addr: int, size: int, crc32: int,
+ report: dict) -> None:
+ print(f'Overlay {load_addr:08X}_{crc32:08X}')
+ print(f'Region: {load_addr:08X}..{load_addr + size - 1:08X}')
+ print(f'Function definitions: {len(report["defs"])}')
+ print(f'Forward declarations: {len(report["decls"])}')
+ print(f'Direct calls inside overlay: {report["direct_inside"]}')
+ print(f'External calls via call_by_address: {report["external_cba"]}')
+ print(f'BIOS calls: {report["bios_calls"]}')
+ print(f'Syscall uses: {report["syscall_uses"]}')
+ print(f'Unsupported instruction TODOs: {len(report["unsupported_todo_addrs"])}')
+ print(f'Unknown/bad targets: {len(report["unknown_bad"])}')
+ for addr in sorted(report['unknown_bad']):
+ print(f' 0x{addr:08X} UNKNOWN_BAD')
+ for addr in sorted(report['unsupported_todo_addrs'])[:20]:
+ print(f' 0x{addr:08X} UNSUPPORTED_INSTRUCTION')
+ if len(report['unsupported_todo_addrs']) > 20:
+ print(f' ... {len(report["unsupported_todo_addrs"]) - 20} more unsupported instructions')
+
+
+# ---------------------------------------------------------------------------
+# Post-process generated C for DLL compilation
+# ---------------------------------------------------------------------------
+
+# The overlay dispatch shim / link contract is the SINGLE SOURCE OF TRUTH for
+# the symbols every compiled shard links against (dispatch forwarders, GTE/WS
+# hooks, cycle callbacks). It lives beside the ABI header it must agree with,
+# at /overlay_dispatch_preamble.c.inc, so cmake can fold its
+# content into the overlay cache tag (codegen_hash_sources.cmake) -- a change to
+# the link contract then auto-invalidates the cache instead of silently
+# breaking every shard compile against a moved-on runtime. Loaded once by
+# load_dispatch_preamble(); patch_generated_c() reads this global.
+DISPATCH_PREAMBLE = None
+PREAMBLE_INC_NAME = "overlay_dispatch_preamble.c.inc"
+
+
+def load_dispatch_preamble(runtime_include: str) -> str:
+ """Load the shard dispatch-shim preamble from / and
+ cache it in the module global. Missing is a HARD error: a shard built
+ without the shim links against nothing, and silently skipping it is exactly
+ the invisible-failure class this tooling exists to eliminate."""
+ global DISPATCH_PREAMBLE
+ if DISPATCH_PREAMBLE is not None:
+ return DISPATCH_PREAMBLE
+ path = os.path.join(runtime_include, PREAMBLE_INC_NAME)
+ try:
+ with open(path, encoding="utf-8") as f:
+ DISPATCH_PREAMBLE = f.read()
+ except OSError as e:
+ raise SystemExit(
+ f"FATAL: cannot read overlay dispatch preamble {path}: {e}\n"
+ f" This file is the shard link contract and MUST ship in "
+ f"runtime/include. Without it no shard can be compiled.")
+ return DISPATCH_PREAMBLE
+
+def patch_generated_c(src: str, load_addr: int, size: int) -> str:
+ """
+ Post-process psxrecomp-game's _full.c output for standalone DLL compilation:
+
+ 1. Prepend the dispatch function-pointer preamble (before any includes).
+ 2. Remove forward declarations for functions outside the overlay range —
+ they'd be unresolved externals in the DLL.
+ 3. Replace direct calls to out-of-range func_XXXXXXXX(cpu) with
+ call_by_address(cpu, 0xXXXXXXXXu) so they go through the dispatch ptr.
+ 4. Export all func_XXXXXXXX symbols so the runtime can enumerate them.
+ """
+ ov_lo = load_addr & 0x1FFFFFFF
+ ov_hi = ov_lo + size
+
+ def in_overlay(addr: int) -> bool:
+ phys = addr & 0x1FFFFFFF
+ return ov_lo <= phys < ov_hi
+
+ # 1. Insert preamble AFTER the last #include line (so CPUState is complete)
+ last_inc = -1
+ for m in re.finditer(r'^#include\s+[<"].*[>"]\s*$', src, re.MULTILINE):
+ last_inc = m.end()
+ if last_inc == -1:
+ src = DISPATCH_PREAMBLE + src
+ else:
+ src = src[:last_inc] + '\n' + DISPATCH_PREAMBLE + src[last_inc:]
+
+ # 2. Remove out-of-range forward declarations
+ def drop_extern(m):
+ addr = int(m.group(1), 16)
+ return '' if not in_overlay(addr) else m.group(0)
+ src = re.sub(r'^void func_([0-9A-Fa-f]{8})\(CPUState\* cpu\);\n',
+ drop_extern, src, flags=re.MULTILINE)
+
+ # 3. Replace out-of-range direct calls with call_by_address
+ def fix_call(m):
+ addr = int(m.group(1), 16)
+ if in_overlay(addr):
+ return m.group(0)
+ return f'call_by_address(cpu, 0x{addr:08X}u)'
+ src = re.sub(r'\bfunc_([0-9A-Fa-f]{8})\(cpu\)',
+ fix_call, src)
+
+ # 4. Add dllexport to every in-overlay func_XXXXXXXX definition.
+ # psxrecomp-game emits "void func_XXXXXXXX(CPUState* cpu)" on one line
+ # with "{" on the NEXT line — match the signature line alone (no ";" = definition).
+ def add_export(m):
+ addr = int(m.group(1), 16)
+ if not in_overlay(addr):
+ return m.group(0)
+ return (
+ '#ifdef _WIN32\n__declspec(dllexport)\n#else\n'
+ '__attribute__((visibility("default")))\n#endif\n'
+ + m.group(0)
+ )
+ src = re.sub(r'^void func_([0-9A-Fa-f]{8})\(CPUState\* cpu\)$',
+ add_export, src, flags=re.MULTILINE)
+
+ return src
+
+
+# ---------------------------------------------------------------------------
+# Static (B-2) post-processing
+# ---------------------------------------------------------------------------
+
+STATIC_PREAMBLE = """\
+/* ---- Static overlay (B-2): psx_runtime.h already provides call_by_address. */
+
+"""
+
+def patch_generated_c_static(src: str, load_addr: int, size: int) -> tuple:
+ """
+ Post-process psxrecomp-game's _full.c output for static binary compilation.
+
+ Returns (patched_src, sorted_list_of_in_overlay_virt_addrs).
+
+ Differences from DLL path:
+ - No overlay_api.h / OverlayCallbacks / overlay_init
+ - Callbacks are direct extern calls, not function pointers
+ - No __declspec(dllexport) — all functions have normal external linkage
+ - Returns function address list so caller can build the switch dispatch
+ """
+ ov_lo = load_addr & 0x1FFFFFFF
+ ov_hi = ov_lo + size
+
+ def in_overlay(addr: int) -> bool:
+ return ov_lo <= (addr & 0x1FFFFFFF) < ov_hi
+
+ # 1. Insert preamble after last #include
+ last_inc = -1
+ for m in re.finditer(r'^#include\s+[<"].*[>"]\s*$', src, re.MULTILINE):
+ last_inc = m.end()
+ if last_inc == -1:
+ src = STATIC_PREAMBLE + src
+ else:
+ src = src[:last_inc] + '\n' + STATIC_PREAMBLE + src[last_inc:]
+
+ # 2. Remove out-of-range forward declarations
+ def drop_extern(m):
+ addr = int(m.group(1), 16)
+ return '' if not in_overlay(addr) else m.group(0)
+ src = re.sub(r'^void func_([0-9A-Fa-f]{8})\(CPUState\* cpu\);\n',
+ drop_extern, src, flags=re.MULTILINE)
+
+ # 3. Replace out-of-range direct calls with call_by_address
+ def fix_call(m):
+ addr = int(m.group(1), 16)
+ if in_overlay(addr):
+ return m.group(0)
+ return f'call_by_address(cpu, 0x{addr:08X}u)'
+ src = re.sub(r'\bfunc_([0-9A-Fa-f]{8})\(cpu\)', fix_call, src)
+
+ # 4. Collect in-overlay function definition addresses (no export annotation
+ # needed), spelled in the image's segment (§5.7).
+ func_virt_addrs = []
+ image_seg = segment_of(load_addr)
+ def collect_fn(m):
+ addr = int(m.group(1), 16)
+ if in_overlay(addr):
+ func_virt_addrs.append(image_seg | (addr & PHYS_MASK))
+ return m.group(0)
+ src = re.sub(r'^void func_([0-9A-Fa-f]{8})\(CPUState\* cpu\)$',
+ collect_fn, src, flags=re.MULTILINE)
+
+ return src, sorted(func_virt_addrs)
+
+
+def namespace_generated_static(src: str, namespace: str,
+ func_virt_addrs: list) -> tuple:
+ """Give one generated overlay image private C symbols.
+
+ Static mode combines several independently-generated C files into one
+ translation unit. The recompiler deliberately gives each file the same
+ helper names, and different overlay images may define functions at the same
+ guest address. Namespace the four common helpers, every in-image function,
+ and every alias-body helper. Return the guest-entry -> C-symbol map used by
+ the content-validated dispatcher.
+ """
+ func_set = set(func_virt_addrs)
+
+ for helper in ('psx_lwl', 'psx_lwr', 'psx_swl', 'psx_swr'):
+ src = re.sub(rf'\b{helper}\b', f'{namespace}_{helper}', src)
+
+ def rename_func(m):
+ addr = _canonical_guest_addr(int(m.group(1), 16))
+ if addr not in func_set:
+ return m.group(0)
+ return f'{namespace}_func_{addr:08X}'
+
+ src = re.sub(r'\bfunc_([0-9A-Fa-f]{8})\b', rename_func, src)
+
+ def rename_alias(m):
+ addr = _canonical_guest_addr(int(m.group(1), 16))
+ if addr not in func_set:
+ return m.group(0)
+ return f'{namespace}_alias_body_{addr:08X}'
+
+ src = re.sub(r'\bpsx_alias_body_([0-9A-Fa-f]{8})\b', rename_alias, src)
+ symbols = {va: f'{namespace}_func_{va:08X}' for va in func_set}
+ return src, symbols
+
+
+def parse_cps_continuation_owners(src: str) -> dict:
+ """Return compiled block entry -> owning function for generated CPS C.
+
+ Runtime captures can prove a block label as a dispatch entry even when an
+ earlier capture never needed that label in the host's ``cpu->pc`` resume
+ switch. Static mode can add the missing switch arm and synthesize a wrapper
+ as long as the host's exact compiled code ranges match live RAM.
+ """
+ definition_re = re.compile(
+ r'^void func_([0-9A-Fa-f]{8})\(CPUState\* cpu\)\n\{',
+ re.MULTILINE)
+ definitions = list(definition_re.finditer(src))
+ owners = {}
+ for index, match in enumerate(definitions):
+ host = _canonical_guest_addr(int(match.group(1), 16))
+ end = definitions[index + 1].start() if index + 1 < len(definitions) else len(src)
+ body = src[match.end():end]
+ for block in re.finditer(r'^block_([0-9A-Fa-f]{8}):', body,
+ re.MULTILINE):
+ entry = _canonical_guest_addr(int(block.group(1), 16))
+ owners.setdefault(entry, host)
+ return owners
+
+
+def add_cps_resume_case(src: str, host_symbol: str,
+ host: int, entry: int) -> tuple:
+ """Make ``entry`` a legal ``cpu->pc`` resume point in one native host."""
+ definition = re.search(
+ rf'^void {re.escape(host_symbol)}\(CPUState\* cpu\)\n\{{',
+ src, re.MULTILINE)
+ if not definition:
+ return src, False
+ next_definition = re.search(r'^void [A-Za-z_][A-Za-z0-9_]*\(CPUState\* cpu\)',
+ src[definition.end():], re.MULTILINE)
+ end = (definition.end() + next_definition.start()
+ if next_definition else len(src))
+ segment = src[definition.start():end]
+ if not re.search(rf'^block_{entry:08X}:', segment, re.MULTILINE):
+ return src, False
+ if f'case 0x{entry:08X}u: goto block_{entry:08X};' in segment:
+ return src, True
+
+ hook = segment.find('debug_server_log_call_entry')
+ prologue = segment[:hook] if hook >= 0 else ''
+ default_match = re.search(r'^\s+default:', prologue, re.MULTILINE)
+ if 'if (cpu->pc != 0u)' in prologue and default_match:
+ insert = definition.start() + default_match.start()
+ indent = re.match(r'\s*', prologue[default_match.start():]).group(0)
+ arm = f'{indent}case 0x{entry:08X}u: goto block_{entry:08X};\n'
+ return src[:insert] + arm + src[insert:], True
+
+ prologue_text = (
+ '\n if (cpu->pc != 0u) {\n'
+ ' uint32_t _cont = cpu->pc; cpu->pc = 0;\n'
+ ' switch (_cont) {\n'
+ f' case 0x{entry:08X}u: goto block_{entry:08X};\n'
+ f' case 0x{host:08X}u: break; /* entry at prologue */\n'
+ f' default: cpu->pc = _cont; psx_native_bad_entry(cpu, '
+ f'0x{host:08X}u, _cont); return;\n'
+ ' }\n'
+ ' }')
+ return src[:definition.end()] + prologue_text + src[definition.end():], True
+
+
+_CPS_SIGNATURE_RE = re.compile(r'^void ([A-Za-z_][A-Za-z0-9_]*)\(CPUState\* cpu\)',
+ re.MULTILINE)
+
+
+def add_cps_resume_cases(src: str, requests: list) -> tuple:
+ """Batch form of add_cps_resume_case().
+
+ requests: [(host_symbol, host, [entry, ...]), ...]. Returns
+ (src, {host_symbol: set(entries made legal)}).
+
+ Per entry this applies exactly the rule add_cps_resume_case() applies --
+ the block label must exist in the host's own segment, an existing arm is
+ left alone, otherwise the arm goes before the resume switch's ``default:``
+ (or a fresh switch is created after the opening brace). The difference is
+ cost: the per-entry function re-scans and rebuilds the WHOLE part source
+ (tens of MB) for every entry, which made the post-pass quadratic -- 7,386
+ wrappers on a 19 MB part took ~7 minutes. Here every function signature is
+ located once, each host's segment is edited in isolation, and the source
+ is rebuilt once. Output is byte-identical to the per-entry form.
+ """
+ sigs = list(_CPS_SIGNATURE_RE.finditer(src))
+ def_index = {}
+ for i, m in enumerate(sigs):
+ # A definition is the signature followed by "\n{"; the first one wins,
+ # like re.search() did.
+ if src.startswith('\n{', m.end()) and m.group(1) not in def_index:
+ def_index[m.group(1)] = i
+ edits = []
+ ok_by_symbol = {}
+ for host_symbol, host, entries in requests:
+ i = def_index.get(host_symbol)
+ if i is None:
+ continue
+ m = sigs[i]
+ start = m.start()
+ def_len = (m.end() + 2) - start # through the opening brace
+ end = sigs[i + 1].start() if i + 1 < len(sigs) else len(src)
+ seg = src[start:end]
+ labels = set(re.findall(r'^block_[0-9A-Fa-f]{8}:', seg, re.MULTILINE))
+ ok = set()
+ changed = False
+ for entry in entries:
+ if f'block_{entry:08X}:' not in labels:
+ continue
+ if f'case 0x{entry:08X}u: goto block_{entry:08X};' in seg:
+ ok.add(entry)
+ continue
+ hook = seg.find('debug_server_log_call_entry')
+ prologue = seg[:hook] if hook >= 0 else ''
+ default_match = re.search(r'^\s+default:', prologue, re.MULTILINE)
+ if 'if (cpu->pc != 0u)' in prologue and default_match:
+ insert = default_match.start()
+ indent = re.match(r'\s*', prologue[default_match.start():]).group(0)
+ arm = f'{indent}case 0x{entry:08X}u: goto block_{entry:08X};\n'
+ seg = seg[:insert] + arm + seg[insert:]
+ else:
+ prologue_text = (
+ '\n if (cpu->pc != 0u) {\n'
+ ' uint32_t _cont = cpu->pc; cpu->pc = 0;\n'
+ ' switch (_cont) {\n'
+ f' case 0x{entry:08X}u: goto block_{entry:08X};\n'
+ f' case 0x{host:08X}u: break; /* entry at prologue */\n'
+ f' default: cpu->pc = _cont; psx_native_bad_entry(cpu, '
+ f'0x{host:08X}u, _cont); return;\n'
+ ' }\n'
+ ' }')
+ seg = seg[:def_len] + prologue_text + seg[def_len:]
+ ok.add(entry)
+ changed = True
+ ok_by_symbol[host_symbol] = ok
+ if changed:
+ edits.append((start, end, seg))
+ if edits:
+ edits.sort()
+ pieces = []
+ pos = 0
+ for start, end, seg in edits:
+ pieces.append(src[pos:start])
+ pieces.append(seg)
+ pos = end
+ pieces.append(src[pos:])
+ src = ''.join(pieces)
+ return src, ok_by_symbol
+
+
+def generate_overlay_dispatch(variants: list) -> str:
+ """Generate byte-validated dispatch for all static overlay variants."""
+ unique = []
+ seen = set()
+ for variant in variants:
+ # The lookup keys on the exact PC, and each body is compiled for the
+ # segment of its PC (§5.7): a KUSEG, KSEG0 or KSEG1 entry of the same
+ # bytes is its own row. PC 0 is the hash table's empty marker.
+ if (segment_of(variant['addr']) not in SEGMENT_NAMES or
+ variant['addr'] == 0):
+ raise ValueError(f"static overlay entry 0x{variant['addr']:08X} "
+ "is not a KUSEG, KSEG0 or KSEG1 code PC")
+ ranges = tuple((lo & 0x1FFFFFFF, length)
+ for lo, length in variant['ranges'])
+ key = (variant['addr'], variant['crc'], ranges)
+ if key in seen:
+ continue
+ seen.add(key)
+ item = dict(variant)
+ item['ranges'] = ranges
+ unique.append(item)
+
+ unique.sort(key=lambda v: (v['addr'], v['crc'], v['ranges'], v['symbol']))
+ by_addr = {}
+ for index, variant in enumerate(unique):
+ variant['range_symbol'] = f'psx_ov_static_ranges_{index:05d}'
+ by_addr.setdefault(variant['addr'], []).append(variant)
+
+ lines = [
+ '',
+ '/* Auto-generated, content-validated overlay dispatch -- do not edit. */',
+ 'extern int psx_overlay_static_code_matches(const uint32_t *lo_len_pairs,',
+ ' uint32_t count,',
+ ' uint32_t expected_crc);',
+ 'static uint64_t psx_ov_static_checks = 0;',
+ 'static uint64_t psx_ov_static_hits = 0;',
+ 'static uint64_t psx_ov_static_variant_misses = 0;',
+ 'static uint64_t psx_ov_static_address_misses = 0;',
+ '',
+ ]
+ for variant in unique:
+ flat = []
+ for lo, length in variant['ranges']:
+ flat.extend((f'0x{lo:08X}u', f'0x{length:X}u'))
+ lines.append(
+ f'static const uint32_t {variant["range_symbol"]}[] = '
+ '{ ' + ', '.join(flat) + ' };')
+
+ # ---- O(1) address lookup ------------------------------------------------
+ # The dispatcher is consulted on EVERY interpreted entry, and the
+ # overwhelming majority of those calls are for addresses with no compiled
+ # entry at all. Measured on BoF3 during a battle-transition stall:
+ # ~264,000 calls/sec, of which ~1,160 out of every 1,161 found nothing.
+ # A `switch` over tens of thousands of sparse cases compiles to a binary
+ # search tree, so each of those fruitless calls walked ~log2(N) compares
+ # through a jump table far larger than cache -- which is why frame rate
+ # tracked compiled-case COUNT rather than variant chain depth, and why
+ # adding bands cost frame rate on screens where no overlay code ran.
+ #
+ # Replace it with a compile-time open-addressed hash table. The miss path
+ # -- the hot one -- becomes: hash, one load, compare, return. Two parallel
+ # uint32 arrays keep a miss inside a single 128 KB table: the address array
+ # answers "is this mine?" without touching the entry or variant arrays at
+ # all. Load factor is held at <= 0.5 to bound probe length.
+ entry_addrs = sorted(by_addr)
+ n_entries = len(entry_addrs)
+
+ def hash_slot(key: int, mask: int) -> int:
+ """MUST stay bit-identical to psx_ov_hash_slot() emitted below."""
+ h = (key >> 2) & 0xFFFFFFFF
+ h = (h * 0x9E3779B1) & 0xFFFFFFFF
+ h ^= h >> 15
+ return h & mask
+
+ bits = 4
+ while (1 << bits) < max(n_entries, 1) * 2:
+ bits += 1
+ size = 1 << bits
+ mask = size - 1
+
+ table_addr = [0] * size
+ table_idx = [0] * size
+ max_probe = 0
+ for index, addr in enumerate(entry_addrs):
+ slot = hash_slot(addr, mask)
+ probe = 0
+ while table_addr[slot] != 0:
+ assert table_addr[slot] != addr, f'duplicate entry 0x{addr:08X}'
+ slot = (slot + 1) & mask
+ probe += 1
+ table_addr[slot] = addr
+ table_idx[slot] = index
+ max_probe = max(max_probe, probe)
+
+ # Flat variant array; each entry owns a contiguous run of it.
+ flat_variants = []
+ entry_rows = []
+ for addr in entry_addrs:
+ entry_rows.append((addr, len(flat_variants), len(by_addr[addr])))
+ flat_variants.extend(by_addr[addr])
+
+ def emit_table(name, values, per_line=8):
+ out = [f'static const uint32_t {name}[{size}] = {{']
+ for i in range(0, size, per_line):
+ chunk = ', '.join(f'0x{v:08X}u' for v in values[i:i + per_line])
+ out.append(f' {chunk},')
+ out.append('};')
+ return out
+
+ lines += [
+ '',
+ 'typedef void (*PsxOvFn)(CPUState *cpu);',
+ '',
+ 'typedef struct {',
+ ' const uint32_t *ranges;',
+ ' uint32_t count;',
+ ' uint32_t crc;',
+ ' PsxOvFn fn;',
+ '} PsxOvVariant;',
+ '',
+ 'typedef struct {',
+ ' uint32_t addr;',
+ ' uint32_t first; /* index into psx_ov_variants */',
+ ' uint32_t n; /* occupants compiled at this address */',
+ '} PsxOvEntry;',
+ '',
+ ]
+
+ if flat_variants:
+ lines.append(f'static const PsxOvVariant '
+ f'psx_ov_variants[{len(flat_variants)}] = {{')
+ for variant in flat_variants:
+ lines.append(
+ f' {{ {variant["range_symbol"]}, '
+ f'{len(variant["ranges"])}u, 0x{variant["crc"]:08X}u, '
+ f'{variant["symbol"]} }},')
+ lines.append('};')
+ lines.append('')
+ lines.append(f'static const PsxOvEntry psx_ov_entries[{n_entries}] = {{')
+ for addr, first, count in entry_rows:
+ lines.append(f' {{ 0x{addr:08X}u, {first}u, {count}u }},')
+ lines.append('};')
+ lines.append('')
+ lines += emit_table('psx_ov_hash_addr', table_addr)
+ lines.append('')
+ lines += emit_table('psx_ov_hash_idx', table_idx)
+ lines.append('')
+ # Resident-occupant memo. On hardware the game CD-reads a file to a
+ # fixed address and jal's straight into it -- identity is implicit in
+ # control flow and costs nothing. We rediscover it by walking a band's
+ # occupants and CRC-gating each. On a deep band that walk dominated:
+ # the memory-card screen measured 41.25 checks per hit, i.e. ~41 failed
+ # gates before the resident one, 4.4 M failed checks per 2 s.
+ #
+ # Remember which occupant last satisfied each address and try it first.
+ # Correctness is unchanged because the memo only reorders candidates --
+ # every call still passes psx_overlay_static_code_matches(), so a band
+ # that swapped occupants fails the memo and falls into the full walk.
+ # The memo is a hint, never an authority.
+ lines.append(f'static uint16_t psx_ov_last_hit[{n_entries}];')
+ # Per-entry hit counters answer "did THIS image's variant run?" (for
+ # example a mod engine in a RAM mirror versus a menu overlay) through
+ # overlay_static_entries, where the global psx_ov_static_hits cannot.
+ lines.append(f'static uint64_t psx_ov_entry_hits[{n_entries}];')
+ lines.append('')
+
+ present = sorted({segment_of(v['addr']) for v in unique} or {KSEG0})
+ if present == [KSEG0]:
+ segment_gate = [
+ ' /* Entries are the KSEG0 PCs their bodies were compiled for',
+ ' * (PSX_OVERLAY_CODE_SEGMENT, overlay_loader.h). A KUSEG or KSEG1',
+ ' * alias of the same bytes is a different architectural PC and',
+ ' * stays in the interpreter. */',
+ ' if ((addr & 0xE0000000u) != 0x80000000u) {',
+ ]
+ else:
+ segment_gate = [
+ ' /* Entries are the exact PCs their bodies were compiled for, in',
+ ' * their own segment (docs/SEGMENT_AWARE_CODE.md §5.7). A PC in a',
+ ' * segment no body was compiled for stays in the interpreter. */',
+ ' if (' + ' &&\n '.join(
+ f'(addr & 0xE0000000u) != 0x{seg:08X}u' for seg in present) + ') {',
+ ]
+ lines += [
+ f'/* {n_entries} dispatch addresses, {len(flat_variants)} variants, '
+ f'{size}-slot table (load {n_entries / size:.2f}), '
+ f'max probe {max_probe}. */',
+ f'#define PSX_OV_HASH_MASK 0x{mask:X}u',
+ '',
+ 'static inline uint32_t psx_ov_hash_slot(uint32_t key) {',
+ ' uint32_t h = key >> 2; /* entries are word-aligned */',
+ ' h *= 0x9E3779B1u;',
+ ' h ^= h >> 15;',
+ ' return h & PSX_OV_HASH_MASK;',
+ '}',
+ '',
+ 'void psx_overlay_static_get_stats(uint64_t *checks, uint64_t *hits,',
+ ' uint64_t *variant_misses,',
+ ' uint64_t *address_misses) {',
+ ' if (checks) *checks = psx_ov_static_checks;',
+ ' if (hits) *hits = psx_ov_static_hits;',
+ ' if (variant_misses) *variant_misses = psx_ov_static_variant_misses;',
+ ' if (address_misses) *address_misses = psx_ov_static_address_misses;',
+ '}',
+ '',
+ '/* Entry index of the last successful find (single-threaded dispatch). */',
+ 'static uint32_t psx_ov_found_entry = 0;',
+ '',
+ 'static const PsxOvVariant *psx_overlay_static_find_variant(uint32_t addr) {',
+ ] + segment_gate + [
+ ' psx_ov_static_address_misses++;',
+ ' return 0;',
+ ' }',
+ ' const uint32_t key = addr;',
+ ]
+
+ if not flat_variants:
+ lines += [
+ ' (void)key;',
+ ' (void)psx_ov_found_entry;',
+ ' psx_ov_static_address_misses++;',
+ ' return 0;',
+ '}',
+ '',
+ 'int psx_overlay_static_can_dispatch(uint32_t addr) {',
+ ' return psx_overlay_static_find_variant(addr) != 0;',
+ '}',
+ '',
+ 'int psx_overlay_dispatch(CPUState *cpu, uint32_t addr) {',
+ ' (void)cpu;',
+ ' if (psx_overlay_static_find_variant(addr) == 0) return 0;',
+ ' return 0;',
+ '}',
+ '',
+ 'uint32_t psx_overlay_static_entry_count(void) { return 0u; }',
+ '',
+ 'int psx_overlay_static_entry_stats(uint32_t index, uint32_t *addr,',
+ ' uint32_t *variants, uint64_t *hits) {',
+ ' (void)index; (void)addr; (void)variants; (void)hits;',
+ ' return 0;',
+ '}',
+ '',
+ ]
+ return '\n'.join(lines)
+
+ lines += [
+ ' uint32_t slot = psx_ov_hash_slot(key);',
+ ' for (;;) {',
+ ' uint32_t slot_addr = psx_ov_hash_addr[slot];',
+ ' if (slot_addr == 0u) {',
+ ' /* Empty slot: this address is compiled nowhere. This is',
+ ' * the overwhelmingly common case -- keep it one load. */',
+ ' psx_ov_static_address_misses++;',
+ ' return 0;',
+ ' }',
+ ' if (slot_addr == key) break;',
+ ' slot = (slot + 1u) & PSX_OV_HASH_MASK;',
+ ' }',
+ ' {',
+ ' const uint32_t ei = psx_ov_hash_idx[slot];',
+ ' const PsxOvEntry *e = &psx_ov_entries[ei];',
+ ' const PsxOvVariant *base = &psx_ov_variants[e->first];',
+ ' const uint32_t n = e->n;',
+ ' uint32_t memo = psx_ov_last_hit[ei];',
+ ' uint32_t i;',
+ ' if (memo >= n) memo = 0u;',
+ ' /* Try the occupant that satisfied this address last time. On a',
+ ' * deep band this is the difference between one CRC gate and',
+ ' * walking every occupant. It is only a hint: the gate below',
+ ' * still decides, so a swapped band simply falls through. */',
+ ' if (n > 1u) {',
+ ' const PsxOvVariant *v = base + memo;',
+ ' psx_ov_static_checks++;',
+ ' if (psx_overlay_static_code_matches(v->ranges, v->count,',
+ ' v->crc)) {',
+ ' psx_ov_found_entry = ei;',
+ ' return v;',
+ ' }',
+ ' psx_ov_static_variant_misses++;',
+ ' }',
+ ' for (i = 0; i < n; i++) {',
+ ' const PsxOvVariant *v = base + i;',
+ ' if (n > 1u && i == memo) continue; /* already tried */',
+ ' psx_ov_static_checks++;',
+ ' if (psx_overlay_static_code_matches(v->ranges, v->count,',
+ ' v->crc)) {',
+ ' psx_ov_last_hit[ei] = (uint16_t)i;',
+ ' psx_ov_found_entry = ei;',
+ ' return v;',
+ ' }',
+ ' psx_ov_static_variant_misses++;',
+ ' }',
+ ' }',
+ ' /* Address is ours but no occupant is resident -> interpreter. */',
+ ' return 0;',
+ '}',
+ '',
+ 'int psx_overlay_static_can_dispatch(uint32_t addr) {',
+ ' return psx_overlay_static_find_variant(addr) != 0;',
+ '}',
+ '',
+ 'int psx_overlay_dispatch(CPUState *cpu, uint32_t addr) {',
+ ' const PsxOvVariant *v = psx_overlay_static_find_variant(addr);',
+ ' if (!v) return 0;',
+ ' psx_ov_static_hits++;',
+ ' psx_ov_entry_hits[psx_ov_found_entry]++;',
+ ' v->fn(cpu);',
+ ' return 1;',
+ '}',
+ '',
+ f'uint32_t psx_overlay_static_entry_count(void) {{ return {n_entries}u; }}',
+ '',
+ '/* Entry `index` (sorted by address): its address, occupant count and',
+ ' * dispatches served. 0 past the last entry. */',
+ 'int psx_overlay_static_entry_stats(uint32_t index, uint32_t *addr,',
+ ' uint32_t *variants, uint64_t *hits) {',
+ f' if (index >= {n_entries}u) return 0;',
+ ' if (addr) *addr = psx_ov_entries[index].addr;',
+ ' if (variants) *variants = psx_ov_entries[index].n;',
+ ' if (hits) *hits = psx_ov_entry_hits[index];',
+ ' return 1;',
+ '}',
+ '',
+ ]
+ return '\n'.join(lines)
+
+
+# ---------------------------------------------------------------------------
+# DLL compilation
+# ---------------------------------------------------------------------------
+
+def parse_overlay_func_ids(src_path: str, data: bytes, load_addr: int,
+ size: int) -> list:
+ """Parse the recompiler's _full.ranges manifest and return the list of
+ in-overlay function identities as (ev, code_crc, ranges) tuples, where
+ ev = virtual entry, code_crc = AUTHORITATIVE hash of the captured code-range
+ bytes (the exact bytes the recompiler compiled from), and ranges is the
+ coalesced [(lo, len), ...] code-range list.
+
+ This (entry, code_crc) pair is the per-function IDENTITY: the loader marks a
+ compiled entry callable iff live RAM matches code_crc, and overlay-cache v2
+ keys build/dedup decisions on this set rather than on the whole-region CRC.
+
+ binascii.crc32 (zlib, poly 0xEDB88320, init/final 0xFFFFFFFF) is bit-identical
+ to the runtime's crc32_compute, and `data` is the raw little-endian RAM image,
+ so the offline hash matches the runtime's hash of live RAM byte-for-byte."""
+ ov_lo = load_addr & 0x1FFFFFFF
+ ov_hi = ov_lo + size
+
+ def in_ov(a: int) -> bool:
+ return ov_lo <= (a & 0x1FFFFFFF) < ov_hi
+
+ # Parse the recompiler manifest into [(entry, [(lo, len), ...]), ...].
+ funcs: list[tuple[int, list[tuple[int, int]]]] = []
+ cur = None
+ with open(src_path) as f:
+ for line in f:
+ s = line.split()
+ if not s:
+ continue
+ if s[0] == 'F':
+ try:
+ addr = int(s[1], 16)
+ except (IndexError, ValueError):
+ cur = None
+ continue
+ if in_ov(addr):
+ cur = (addr, [])
+ funcs.append(cur)
+ else:
+ cur = None
+ elif s[0] == 'R' and cur is not None:
+ try:
+ lo, length = int(s[1], 16), int(s[2], 16)
+ except (IndexError, ValueError):
+ continue
+ cur[1].append((lo, length))
+
+ out = []
+ for entry, ranges in funcs:
+ if not ranges:
+ continue
+ crc = 0
+ ok = True
+ for lo, length in ranges:
+ off = (lo & 0x1FFFFFFF) - ov_lo
+ if off < 0 or off + length > len(data):
+ ok = False # range outside captured bytes — can't hash reliably
+ break
+ crc = binascii.crc32(data[off:off + length], crc)
+ if not ok:
+ continue
+ # The entry VA in the image's segment (§5.1, §5.7).
+ ev = (entry & PHYS_MASK) | segment_of(load_addr)
+ out.append((ev, crc & 0xFFFFFFFF, ranges))
+
+ return out
+
+
+def _mips_control_kind(instr: int) -> int:
+ """1=supported delayed transfer, 0=ordinary, -1=reserved/unsupported."""
+ op = (instr >> 26) & 0x3F
+ if op == 0:
+ return int((instr & 0x3F) in (0x08, 0x09)) # JR/JALR
+ if op == 0x01:
+ return 1 if ((instr >> 16) & 0x1F) in (0x00, 0x01, 0x10, 0x11) else -1
+ if op in (0x02, 0x03) or 0x04 <= op <= 0x07:
+ return 1
+ if 0x14 <= op <= 0x17:
+ return -1
+ if 0x10 <= op <= 0x13 and ((instr >> 21) & 0x1F) == 0x08:
+ return -1
+ return 0
+
+
+def audit_func_id_delay_slots(func_ids: list, data: bytes,
+ load_addr: int) -> list:
+ """Return unsafe emitted dependency errors for exact function identities."""
+ errors = []
+ base = load_addr & 0x1FFFFFFF
+ seg = segment_of(load_addr)
+ for entry, _crc, ranges in func_ids:
+ if len(ranges) > 16:
+ errors.append((entry, None,
+ f'{len(ranges)} ranges exceed loader limit 16'))
+ continue
+ normalized = []
+ malformed = False
+ for lo, length in ranges:
+ phys = lo & 0x1FFFFFFF
+ off = phys - base
+ if (phys & 3) or (length & 3) or length < 4 or \
+ off < 0 or off + length > len(data):
+ errors.append((entry, phys | seg,
+ 'malformed/out-of-capture code range'))
+ malformed = True
+ break
+ normalized.append((phys, phys + length))
+ if malformed:
+ continue
+
+ def contains_word(addr: int) -> bool:
+ return any(lo <= addr and addr + 4 <= hi
+ for lo, hi in normalized)
+
+ controls = set()
+ for lo, hi in normalized:
+ for pc in range(lo, hi, 4):
+ off = pc - base
+ instr = int.from_bytes(data[off:off + 4], 'little')
+ kind = _mips_control_kind(instr)
+ if kind < 0:
+ errors.append((entry, pc | seg,
+ 'reserved/unsupported branch encoding'))
+ elif kind > 0:
+ controls.add(pc)
+ if not contains_word(pc + 4):
+ errors.append((entry, pc | seg,
+ f'delay slot 0x{(pc + 4) | seg:08X} '
+ 'is not identity-hashed'))
+ delay_pcs = {pc + 4 for pc in controls}
+ nested = sorted(controls & delay_pcs)
+ for pc in nested:
+ errors.append((entry, pc | seg,
+ 'control transfer in a delay slot'))
+ return errors
+
+
+def overlay_ranges_text(func_ids: list, pair_id: int | None = None,
+ provenance: str | None = None) -> str:
+ """Serialize one loader manifest.
+
+ ``P`` is an optional DLL/manifest publication identity. Old runtimes
+ ignore the unfamiliar record, while pair-aware runtimes require a matching
+ ``overlay_pair_id`` export whenever it is present.
+ """
+ if provenance is not None and provenance not in \
+ NON_AUTHORITY_MANIFEST_PROVENANCES:
+ raise ValueError(f'unsupported overlay manifest provenance: {provenance}')
+ out_lines = ['# psxrecomp overlay code-range manifest v2 (entry+code_crc)\n']
+ if provenance is not None:
+ out_lines.append(f'# psxrecomp overlay provenance {provenance}\n')
+ # F entries are full VAs in the shard's segment (§5.7). A KUSEG or KSEG1
+ # shard says so with S before its first F; a KSEG0 manifest keeps the
+ # pre-§5.7 text exactly (no S means KSEG0).
+ segments = {segment_of(ev) for ev, _crc, _ranges in func_ids}
+ if len(segments) > 1:
+ raise ValueError('one manifest names entries in several segments: ' +
+ ', '.join(f'0x{seg:08X}' for seg in sorted(segments)))
+ seg = segments.pop() if segments else KSEG0
+ if seg not in SEGMENT_NAMES:
+ raise ValueError(f'manifest entries in segment 0x{seg:08X}, '
+ 'which maps no RAM')
+ if seg != KSEG0:
+ out_lines.append(f'S {seg:08X}\n')
+ if pair_id is not None:
+ out_lines.append(f'P {pair_id & 0xFFFFFFFFFFFFFFFF:016X}\n')
+ for ev, crc, ranges in func_ids:
+ out_lines.append(f'F {ev:08X} {crc & 0xFFFFFFFF:08X}\n')
+ for lo, length in ranges:
+ # Byte extents, KSEG0-spelled in every segment's manifest.
+ out_lines.append(
+ f'R {(lo & PHYS_MASK) | KSEG0:08X} {length:X}\n')
+ return ''.join(out_lines)
+
+
+def overlay_pair_id(src: str, func_ids: list,
+ provenance: str | None = None) -> int:
+ """Bind a newly compiled DLL to the exact C and range manifest it uses."""
+ digest = hashlib.sha256()
+ digest.update(b'psxrecomp overlay pair v1\0')
+ digest.update(src.encode('utf-8'))
+ digest.update(b'\0')
+ digest.update(overlay_ranges_text(
+ func_ids, provenance=provenance).encode('ascii'))
+ return int.from_bytes(digest.digest()[:8], 'big')
+
+
+def add_overlay_pair_export(src: str, pair_id: int) -> str:
+ """Add the optional v2-pair binding export without changing the shard ABI."""
+ return src + f'''\n
+PSX_OVERLAY_EXPORT uint64_t overlay_pair_id(void) {{
+ return UINT64_C(0x{pair_id:016X});
+}}
+'''
+
+
+def write_overlay_ranges_from(func_ids: list, out_path: str,
+ pair_id: int | None = None,
+ provenance: str | None = None) -> int:
+ """Write the {phys}_{key}.ranges manifest (v2) from a func-id list produced by
+ parse_overlay_func_ids. Returns the number of functions written.
+
+ Manifest v2 line format:
+ F one per function
+ R one per coalesced code range"""
+ with open(out_path, 'w') as f:
+ f.write(overlay_ranges_text(func_ids, pair_id, provenance))
+ return len(func_ids)
+
+
+def write_overlay_ranges(src_path: str, out_path: str,
+ data: bytes, load_addr: int, size: int) -> int:
+ """Back-compat wrapper: parse the recompiler manifest and write the v2 .ranges.
+ See parse_overlay_func_ids / write_overlay_ranges_from."""
+ return write_overlay_ranges_from(
+ parse_overlay_func_ids(src_path, data, load_addr, size), out_path)
+
+
+def load_region_coverage(cache_dir: str, phys_addr: int,
+ expected_abi: int | None = None) -> set:
+ """Set of (ev, code_crc) function identities already provided by built DLLs
+ for this region_start. The loader content-matches per function across ALL
+ DLLs sharing a region_start, so a function is "covered" as soon as ANY
+ existing .ranges for that region_start lists it with a matching code_crc.
+ overlay-cache v2 uses this to skip the (expensive) gcc compile when a capture
+ would add no new function identity (the volatile-data redundant-build case)."""
+ covered = set()
+ prefix = f'{phys_addr:08X}_'
+ try:
+ names = os.listdir(cache_dir)
+ except OSError:
+ return covered
+ for name in names:
+ if not (name.startswith(prefix) and name.endswith('.ranges')):
+ continue
+ dll_path = os.path.join(
+ cache_dir, os.path.splitext(name)[0] + overlay_ext())
+ covered.update(
+ (entry, code_crc)
+ for entry, code_crc, _ranges in load_shard_func_ids(
+ dll_path, expected_abi))
+ return covered
+
+
+def _addr_in_func_ids(addr: int, func_ids: list) -> bool:
+ """True if addr falls inside any code range of the given func-id list."""
+ a = addr & 0x1FFFFFFF
+ for _ev, _crc, ranges in func_ids:
+ for lo, length in ranges:
+ lo &= 0x1FFFFFFF
+ if lo <= a < lo + length:
+ return True
+ return False
+
+
+def load_region_entry_set(cache_dir: str, phys_addr: int,
+ expected_abi: int | None = None) -> set:
+ """Set of phys-normalized F-line ENTRY addresses provided by ALL built DLLs
+ (region + fragment) for this region_start. This — not range coverage — is
+ the dispatchability test: native code is enterable ONLY at F entries, so a
+ dispatch-proven PC inside a compiled range but absent from every manifest's
+ F set still runs its whole chain on the interpreter (the 0x80106D7C class,
+ 2026-07-06: 80% of Tomba2 attract interp residue was two range-covered,
+ entry-less interior PCs that the range-based orphan test refused to
+ fragment, while the region compile skipped as 'already covered')."""
+ return {
+ entry & 0x1FFFFFFF
+ for entry, _crc in load_region_coverage(
+ cache_dir, phys_addr, expected_abi)
+ }
+
+
+def parse_runtime_shard_manifest(manifest: str,
+ require_pair: bool = True,
+ expected_segment: int | None = None
+ ) -> tuple[int | None, list]:
+ """Parse only identities representable by the runtime manifest contract.
+
+ F entries are full VAs in the manifest's segment: ``S `` before
+ the first F, KSEG0 when absent (§5.7). ``expected_segment`` is the segment
+ of the directory the shard lives in; the runtime refuses a manifest that
+ names another, and so does this."""
+ def hex_field(token: str, max_digits: int) -> int:
+ if not re.fullmatch(rf'[0-9A-Fa-f]{{1,{max_digits}}}', token):
+ raise ValueError(f'invalid manifest hex field: {token!r}')
+ return int(token, 16)
+
+ pair_ids = []
+ funcs = []
+ current = None
+ segment = None
+ if '\0' in manifest:
+ return None, []
+ # Runtime reads physical records with fgets(), so only LF terminates a
+ # record. A trailing CR in CRLF is ordinary whitespace; a bare CR between
+ # directives is not a second record and must therefore fail identically.
+ for line in manifest.split('\n'):
+ if len(line) > MANIFEST_PHYSICAL_LINE_MAX:
+ return None, []
+ cr = line.find('\r')
+ record_width = len(line) if cr < 0 else cr
+ if record_width > MANIFEST_LINE_MAX:
+ return None, []
+ stripped = line.strip(MANIFEST_ASCII_WHITESPACE)
+ parts = (re.split(r'[ \t\r\v\f]+', stripped)
+ if stripped else [])
+ if not parts:
+ continue
+ if parts[0] == 'S':
+ if len(parts) != 2 or segment is not None or funcs:
+ return None, []
+ try:
+ segment = hex_field(parts[1], 8)
+ except ValueError:
+ return None, []
+ if segment not in SEGMENT_NAMES:
+ return None, []
+ elif parts[0] == 'P':
+ if len(parts) != 2:
+ return None, []
+ try:
+ pair_ids.append(hex_field(parts[1], 16))
+ except ValueError:
+ return None, []
+ elif parts[0] == 'F':
+ if len(parts) != 3:
+ return None, []
+ try:
+ current = [hex_field(parts[1], 8), hex_field(parts[2], 8), []]
+ except ValueError:
+ return None, []
+ if segment_of(current[0]) != (KSEG0 if segment is None else segment):
+ return None, []
+ funcs.append(current)
+ elif parts[0] == 'R' and current is not None:
+ if len(parts) != 3:
+ return None, []
+ try:
+ current[2].append((hex_field(parts[1], 8),
+ hex_field(parts[2], 8)))
+ except ValueError:
+ return None, []
+ if len(pair_ids) > 1 or (require_pair and len(pair_ids) != 1) or not funcs:
+ return None, []
+ if (expected_segment is not None and
+ (KSEG0 if segment is None else segment) != expected_segment):
+ return None, []
+ entries = [entry & 0x1FFFFFFF for entry, _crc, _ranges in funcs]
+ if len(set(entries)) != len(entries):
+ return None, []
+ for entry, _crc, ranges in funcs:
+ entry_phys = entry & 0x1FFFFFFF
+ if (not 1 <= len(ranges) <= 16 or
+ any(length <= 0 for _start, length in ranges) or
+ any((start & 0x1FFFFFFF) >= PSX_RAM_SIZE or
+ length > PSX_RAM_SIZE - (start & 0x1FFFFFFF)
+ for start, length in ranges) or
+ not any((start & 0x1FFFFFFF) <= entry_phys <
+ (start & 0x1FFFFFFF) + length
+ for start, length in ranges)):
+ return None, []
+ return (pair_ids[0] if pair_ids else None,
+ [tuple(func) for func in funcs])
+
+
+def load_shard_func_ids(dll_path: str,
+ expected_abi: int | None = None,
+ include_supplemental: bool = True) -> list:
+ """Read one runtime-valid shard manifest as ``(entry, crc, ranges)``.
+
+ A nonempty DLL and manifest are not enough: the pair-aware runtime rejects
+ a manifest whose ``P`` identity does not match the DLL export. Discovery
+ must apply the same validity rule before allowing a cached shard to
+ suppress a needed fragment.
+ """
+ ranges_path = os.path.splitext(dll_path)[0] + '.ranges'
+ try:
+ with _shard_pair_lock(dll_path):
+ _recover_shard_pair_locked(dll_path)
+ if (not os.path.isfile(dll_path) or
+ os.path.getsize(dll_path) == 0 or
+ not os.path.isfile(ranges_path) or
+ os.path.getsize(ranges_path) == 0):
+ return []
+ with open(ranges_path, encoding='ascii', newline='') as f:
+ manifest = f.read()
+ if (not include_supplemental and
+ manifest_declares_supplemental_provenance(manifest)):
+ return []
+ pair_id, valid_funcs = parse_runtime_shard_manifest(
+ manifest, require_pair=False,
+ expected_segment=cache_dir_segment(os.path.dirname(dll_path)))
+ if (not valid_funcs or not _dll_runtime_exports_match(
+ dll_path, expected_abi, pair_id,
+ {entry for entry, _crc, _ranges in valid_funcs})):
+ return []
+ except (OSError, UnicodeError):
+ return []
+ return valid_funcs
+
+
+def load_shard_entry_set(dll_path: str,
+ expected_abi: int | None = None) -> set:
+ """Phys-normalized F entries from one runtime-valid shard pair."""
+ return {
+ entry & 0x1FFFFFFF
+ for entry, _crc, _ranges in load_shard_func_ids(dll_path, expected_abi)
+ }
+
+
+def load_shard_code_ranges(dll_path: str,
+ expected_abi: int | None = None) -> list:
+ """Phys-normalized guarded R intervals from one runtime-valid shard pair."""
+ return [
+ (start & 0x1FFFFFFF, (start & 0x1FFFFFFF) + length)
+ for _entry, _crc, ranges in load_shard_func_ids(dll_path, expected_abi)
+ for start, length in ranges if length > 0
+ ]
+
+
+def load_region_current_variant_coverage(cache_dir: str, phys_addr: int,
+ data: bytes, load_addr: int,
+ size: int,
+ expected_abi: int | None = None
+ ) -> tuple[set, list]:
+ """Return exact entries/ranges whose manifest CRC matches ``data``.
+
+ Shards for different byte variants share a region-start namespace. An F
+ entry from another variant cannot satisfy the current capture: the runtime
+ will reject it by code CRC. Recompute each cached function identity over
+ the current bytes and expose only identities the runtime can actually call.
+ """
+ entries = set()
+ ranges_out = []
+ prefix = f'{phys_addr:08X}_'
+ try:
+ names = os.listdir(cache_dir)
+ except OSError:
+ return entries, ranges_out
+ for name in names:
+ if not (name.startswith(prefix) and name.endswith('.ranges')):
+ continue
+ dll_path = os.path.join(
+ cache_dir, os.path.splitext(name)[0] + overlay_ext())
+ shard_entries, shard_ranges = current_variant_func_id_coverage(
+ load_shard_func_ids(dll_path, expected_abi), data, load_addr, size)
+ entries.update(shard_entries)
+ ranges_out.extend(shard_ranges)
+ return entries, ranges_out
+
+
+def current_variant_func_ids(func_ids: list, data: bytes,
+ load_addr: int, size: int) -> list:
+ """Retain complete identities whose guarded bytes match this image."""
+ valid_ids = []
+ ov_lo = load_addr & 0x1FFFFFFF
+ ov_hi = ov_lo + size
+ for entry, expected_crc, ranges in func_ids:
+ crc = 0
+ valid = True
+ for start, length in ranges:
+ lo = start & 0x1FFFFFFF
+ if length <= 0 or lo < ov_lo or lo + length > ov_hi:
+ valid = False
+ break
+ crc = binascii.crc32(data[lo - ov_lo:lo - ov_lo + length], crc)
+ if valid and (crc & 0xFFFFFFFF) == (expected_crc & 0xFFFFFFFF):
+ candidate = [(entry, expected_crc, ranges)]
+ if not audit_func_id_delay_slots(candidate, data, load_addr):
+ valid_ids.append((entry, expected_crc, ranges))
+ return valid_ids
+
+
+def load_region_current_variant_func_ids(cache_dir: str, phys_addr: int,
+ data: bytes, load_addr: int,
+ size: int,
+ expected_abi: int | None = None,
+ include_supplemental: bool = True
+ ) -> list:
+ """Complete runtime-valid identities matching one captured byte recipe."""
+ out = []
+ prefix = f'{phys_addr:08X}_'
+ try:
+ names = os.listdir(cache_dir)
+ except OSError:
+ return out
+ for name in names:
+ if not (name.startswith(prefix) and name.endswith('.ranges')):
+ continue
+ dll_path = os.path.join(
+ cache_dir, os.path.splitext(name)[0] + overlay_ext())
+ out.extend(current_variant_func_ids(
+ load_shard_func_ids(
+ dll_path, expected_abi,
+ include_supplemental=include_supplemental),
+ data, load_addr, size))
+ return out
+
+
+def current_variant_func_id_coverage(func_ids: list, data: bytes,
+ load_addr: int,
+ size: int) -> tuple[set, list]:
+ """Filter parsed identities to those callable for these captured bytes."""
+ entries = set()
+ ranges_out = []
+ for entry, _expected_crc, ranges in current_variant_func_ids(
+ func_ids, data, load_addr, size):
+ entries.add(entry & 0x1FFFFFFF)
+ ranges_out.extend(
+ ((start & 0x1FFFFFFF), (start & 0x1FFFFFFF) + length)
+ for start, length in ranges)
+ return entries, ranges_out
+
+
+# ---------------------------------------------------------------------------
+# Doomed-interior fail memo
+# ---------------------------------------------------------------------------
+# An executed orphan interior whose bytes (in THIS captured image) are data, not
+# code, fails the generated-C audit EVERY time — but the fragment pass re-attempts
+# it on every autocompile cycle, making the recompiler walk thousands of words of
+# data and emit tens of thousands of lines of C only to reject it (measured on
+# Vigilante 8: 91 interiors, ~16k walked words each, per cycle). The memo records
+# which (region_phys, interior_pc, region_crc) fragments have already failed so
+# later cycles SKIP them instead of re-walking. Correctness is preserved:
+# - The key includes region_crc, so a DIFFERENT captured variant (different
+# bytes at the same PC) is NOT memoized — it re-attempts and can succeed.
+# - The memo file lives inside the cg_ cache dir, so ANY codegen/
+# contract/header change (which bumps the hash -> fresh dir -> fresh memo)
+# re-attempts everything (e.g. the psx_rfe_mark_escape contract fix).
+# So a memoized skip only ever elides a build that is deterministically doomed.
+# Printed when a capture contributes no walk-root seed. The wording is
+# deliberate: the region is NOT declared data-only -- its executed dispatch
+# demands are still served by the isolated-fragment pass, which runs
+# separately. Named so the two emit sites and the test cannot drift apart.
+# They did: 4683e923 reworded both prints and left
+# test_compile_overlays_static_split asserting the old string.
+NO_SHARED_WALK_ROOT_SEEDS_SKIP = (
+ 'SKIP: no shared walk-root seeds; checking fragments separately')
+
+INTERIOR_FAIL_MEMO = 'interior_fail_memo.txt'
+
+
+def _interior_fail_key(phys_addr: int, interior: int, data: bytes,
+ load_addr: int, size: int, producer_ranges,
+ cross_call_allow, expected_abi: int, cps: bool,
+ toml_doc: dict, guard_bytes: int = 0) -> str:
+ """Stable identity of every input to deterministic fragment generation."""
+ recipe = {
+ # v3 adds guard_bytes: the analysis bound is an input to generation, so
+ # a memo recorded under the old (guard-word-as-code) analysis must not
+ # suppress a retry under the corrected one.
+ 'schema': 'psxrecomp fragment fail key v3',
+ 'phys_addr': phys_addr,
+ 'interior': interior & 0x1FFFFFFF,
+ 'load_addr': load_addr,
+ 'size': size,
+ 'guard_bytes': guard_bytes,
+ 'data_sha256': hashlib.sha256(data).hexdigest(),
+ 'producer_ranges': [list(pair) for pair in producer_ranges],
+ 'cross_call_allow': sorted(set(cross_call_allow)),
+ 'overlay_abi': expected_abi,
+ 'cps': bool(cps),
+ 'toml': toml_doc,
+ }
+ digest = hashlib.sha256(json.dumps(
+ recipe, sort_keys=True, separators=(',', ':'),
+ default=str).encode('utf-8')).hexdigest()[:24]
+ return f'{phys_addr:08X}_{interior & 0x1FFFFFFF:08X}_{digest}'
+
+
+def interior_failure_is_deterministic(reason: str) -> bool:
+ """Only guest-byte/codegen audit verdicts belong in the persistent memo."""
+ return (reason.startswith(('generated-c-audit:', 'requested-entry-audit:',
+ 'guest-walk-audit:')) or
+ unsupported_guest_branch_rejection(reason))
+
+
+def unsupported_guest_branch_rejection(reason: str) -> bool:
+ """An invalid guest branch is data/unsupported code, not a tool failure.
+
+ Other delay-slot identity failures remain fatal: missing guarded delay
+ words or a changed instruction identity can indicate an emitter defect.
+ """
+ return (reason.startswith('delay-slot-identity:') and
+ reason.endswith(': reserved/unsupported branch encoding'))
+
+
+def reconcile_empty_primary_scans(pending, cache_dir, expected_abi, stats):
+ """Accept an empty primary only if guarded fragments serve every root.
+
+ Each capture view is checked against its own segment's shards (§5.7)."""
+ for label, physical, load, size, data, roots in pending:
+ seg = segment_of(load)
+ current, _ = load_region_current_variant_coverage(
+ segment_cache_dir(cache_dir, seg), physical, data, load, size,
+ expected_abi)
+ served = {(entry & PHYS_MASK) | seg for entry in current}
+ if roots and roots <= served:
+ print(f' primary scan recovered by guarded fragments: {label}')
+ stats.add_skip()
+ else:
+ stats.add_fail(label, 'no_ranges',
+ 'primary roots remain without guarded native coverage')
+
+
+def optional_static_fragment_rejection(entry: int, job: dict,
+ reason: str) -> bool:
+ """Whether an unplayed speculative candidate failed safely.
+
+ Publishing nothing is the correct outcome for a static-only candidate that
+ fails a deterministic byte/codegen audit. Execution evidence or an
+ explicit operator demand turns the same rejection into a real coverage
+ failure and therefore remains fatal.
+ """
+ return (entry in job.get('static_demands', set()) and
+ entry not in job.get('executed', set()) and
+ entry not in job.get('forced', set()) and
+ interior_failure_is_deterministic(reason))
+
+
+def interior_fail_memo_action(entry: int, job: dict, force: bool) -> str:
+ """Choose ``retry``, ``fail``, or ``skip`` for a deterministic miss.
+
+ Required executed/forced demands remain loud without repeating an
+ expensive deterministic data-as-code walk. ``--force`` explicitly retries
+ it; an unplayed speculative demand remains a safe skip.
+ """
+ if force:
+ return 'retry'
+ if (entry in job.get('executed', set()) or
+ entry in job.get('forced', set())):
+ return 'fail'
+ return 'skip'
+
+
+def load_interior_fail_memo(cache_dir: str) -> dict:
+ memo = {}
+ try:
+ with open(os.path.join(cache_dir, INTERIOR_FAIL_MEMO)) as f:
+ for ln in f:
+ ln = ln.strip()
+ if ln and not ln.startswith('#'):
+ key, _sep, reason = ln.partition('#')
+ memo[key.strip()] = (reason.strip() or
+ 'known deterministic failure')
+ except OSError:
+ pass
+ return memo
+
+
+def append_interior_fail_memo(cache_dir: str, key: str, reason: str) -> None:
+ try:
+ os.makedirs(cache_dir, exist_ok=True)
+ with open(os.path.join(cache_dir, INTERIOR_FAIL_MEMO), 'a') as f:
+ f.write(f'{key} # {(reason or "").strip()[:120]}\n')
+ except OSError:
+ pass # best-effort; a memo write failure must never break the compile
+
+
+def served_static_variant_keys(parts) -> set:
+ """(entry, image_crc) pairs the built static parts can dispatch.
+
+ Coverage is per byte-variant: a part serves an address only for the image
+ it was compiled from, because the dispatcher's CRC gate rejects that
+ identity against any other resident bytes."""
+ return {(variant['addr'], part['image_crc'])
+ for part in parts for variant in part['variants']}
+
+
+def select_static_fragment_demands(requested_keys, parts) -> list:
+ """Requested (entry, image_crc) demands no built part serves, sorted.
+
+ Keyed by (entry, image crc) and NEVER by the bare address. With address
+ keys, the first variant at an address -- from any capture of the band --
+ marked that address served for every other capture, and the per-entry
+ source map kept only the last capture's bytes, so in a band with N
+ occupants exactly one occupant ever received isolated fragments
+ (BoF3 SCENARIO band, 2026-09-05: 20 sections, SCENA16 resident, all 53 of
+ its observed entries interpreted while every spanning piece had been
+ compiled from SCENA19/04/06 bytes and could never validate)."""
+ return sorted(set(requested_keys) - served_static_variant_keys(parts))
+
+
+_STATIC_IMAGE_SOURCES: dict = {}
+
+
+def _init_static_fragment_worker(image_sources: dict) -> None:
+ """Pool initializer: the image table travels to each worker ONCE.
+
+ A demand is (entry, image); thousands of demands share a few hundred
+ images, so pickling the bytes per job would move the whole capture set
+ through the pipe once per demand. Workers look images up by key."""
+ global _STATIC_IMAGE_SOURCES
+ _STATIC_IMAGE_SOURCES = image_sources
+
+
+def static_fragment_job(entry: int, image_key, args):
+ """Worker for the static isolated-fragment pass: one (entry, image).
+
+ Module-level and self-contained so it runs in a ProcessPoolExecutor.
+ Returns (part or None, reason)."""
+ data, load_addr, size, phys_addr, guard_bytes = \
+ _STATIC_IMAGE_SOURCES[image_key]
+ with image_segment(segment_of(load_addr)):
+ return generate_interior_fragment_static(
+ entry, data, load_addr, size, phys_addr, args,
+ guard_bytes=guard_bytes)
+
+
+def generate_interior_fragment_static(interior: int, data: bytes,
+ load_addr: int, size: int,
+ phys_addr: int, args, *,
+ guard_bytes: int):
+ """Generate one isolated, exact-range-gated static interior shard.
+
+ Returns (part, reason): part is None on failure and reason then says
+ why. Reasons starting with 'generated-c-audit:', 'requested-entry-audit:'
+ or 'guest-walk-audit:' are deterministic verdicts on these exact bytes
+ (the interior is data in this image) and are safe to memoize; anything
+ else (recompiler exit, missing output) is not."""
+ with tempfile.TemporaryDirectory() as tmp:
+ psx = os.path.join(tmp, 'frag.psx')
+ with open(psx, 'wb') as f:
+ f.write(make_psxexe(load_addr, interior, data,
+ guard_bytes=guard_bytes))
+ seeds_path = os.path.join(tmp, 'seeds.txt')
+ with open(seeds_path, 'w') as f:
+ f.write(f'dispatch_root 0x{interior:08X}\n')
+ out_dir_tmp = os.path.join(tmp, 'out')
+ os.makedirs(out_dir_tmp)
+ cmd = [args.recompiler, psx, '--seeds', seeds_path,
+ '--out-dir', out_dir_tmp, '--overlay',
+ '--ws-config', os.path.abspath(args.game_toml)]
+ cmd += recompiler_project_root_args(args)
+ sub_env = dict(os.environ)
+ if args.cps:
+ sub_env['PSX_CPS'] = '1'
+ result = subprocess.run(
+ cmd, capture_output=True, text=True,
+ cwd=os.path.dirname(os.path.abspath(args.game_toml)), env=sub_env)
+ if result.returncode != 0:
+ # A walk from this interior that runs off the image (a branch at
+ # the last word, its delay slot past the end) is the recompiler's
+ # own verdict that these bytes are not code from here: it throws
+ # rather than auditing. Deterministic for the image, so memoizable
+ # alongside the audit rejections.
+ text = (result.stderr or '') + (result.stdout or '')
+ walk = [ln.strip() for ln in text.splitlines()
+ if 'outside the input image' in ln or
+ 'cannot emit control flow' in ln]
+ if walk:
+ return None, 'guest-walk-audit: ' + walk[0][:160]
+ return None, f'recompiler: exit {result.returncode}'
+
+ full_c = ranges_src = None
+ for filename in os.listdir(out_dir_tmp):
+ if filename.endswith('_full.c'):
+ full_c = os.path.join(out_dir_tmp, filename)
+ elif filename.endswith('_full.ranges'):
+ ranges_src = os.path.join(out_dir_tmp, filename)
+ if not full_c or not ranges_src:
+ return None, 'no-output: recompiler emitted no _full.c/_full.ranges'
+
+ with open(full_c) as f:
+ src, func_addrs = patch_generated_c_static(
+ f.read(), load_addr, size)
+ image_crc = binascii.crc32(data) & 0xFFFFFFFF
+ audit = audit_generated_c(src, load_addr, size, image_crc, {})
+ if audit['unknown_bad'] or audit['unsupported_todo_addrs']:
+ return None, (f'generated-c-audit: {len(audit["unknown_bad"])} '
+ f'unknown_bad, '
+ f'{len(audit["unsupported_todo_addrs"])} unsupported')
+ func_ids = parse_overlay_func_ids(ranges_src, data, load_addr, size)
+ ids_by_addr = {}
+ for ev, code_crc, ranges in func_ids:
+ ids_by_addr.setdefault(ev, []).append((code_crc, ranges))
+ if set(func_addrs) - set(ids_by_addr):
+ return None, 'static-ranges: dispatchable function(s) lack exact ranges'
+
+ entry = (interior & PHYS_MASK) | segment_of(load_addr)
+ if entry not in ids_by_addr or entry not in set(func_addrs):
+ return None, 'requested-entry-audit: fragment omitted its own entry'
+ namespace = (f'ov_frag_{phys_addr:08X}_{image_crc:08X}_'
+ f'{entry:08X}')
+ continuation_owners = parse_cps_continuation_owners(src)
+ src, symbols = namespace_generated_static(src, namespace, func_addrs)
+ variants = []
+ for ev in sorted(func_addrs):
+ for code_crc, ranges in ids_by_addr[ev]:
+ variants.append({
+ 'addr': ev,
+ 'symbol': symbols[ev],
+ 'crc': code_crc,
+ 'ranges': ranges,
+ })
+ return {
+ 'src': src,
+ 'variants': variants,
+ 'namespace': namespace,
+ 'image_crc': image_crc,
+ 'func_addrs': set(func_addrs),
+ 'symbols': symbols,
+ 'ids_by_addr': ids_by_addr,
+ 'continuation_owners': continuation_owners,
+ }, 'ok'
+
+
+def validate_overlay_func_ids(func_ids: list,
+ label: str = 'shard') -> str | None:
+ """Validate identities against the runtime's fixed manifest contract."""
+ entries = [entry & 0x1FFFFFFF for entry, _crc, _ranges in func_ids]
+ if len(set(entries)) != len(entries):
+ return f'{label} contains duplicate function entries'
+ for entry, _crc, ranges in func_ids:
+ if not 1 <= len(ranges) <= 16:
+ return (f'{label} entry 0x{entry:08X} has {len(ranges)} ranges '
+ '(runtime supports 1..16)')
+ if any(length <= 0 for _lo, length in ranges):
+ return f'{label} entry 0x{entry:08X} has an empty guarded range'
+ if not _addr_in_func_ids(entry, [(entry, 0, ranges)]):
+ return f'{label} entry 0x{entry:08X} is outside its guarded ranges'
+ return None
+
+
+def validate_fragment_requested_ids(requested: set[int], frag_ids: list,
+ generated_defs: set[int]) -> str | None:
+ """Return a fail-closed reason when a fragment omitted a requested entry.
+
+ A non-empty manifest is not sufficient: the recompiler can emit some other
+ reachable function while rejecting/demoting an exact requested PC. The
+ loader can also retain at most 16 ranges for one function. Refuse to
+ publish unless every requested entry has one unambiguous, runtime-
+ representable identity whose guarded bytes include the entry itself.
+ """
+ for requested_entry in sorted(requested):
+ entry = _canonical_guest_addr(requested_entry)
+ if entry not in generated_defs:
+ return f'requested entry 0x{entry:08X} missing from generated C'
+ matches = [
+ (ev, crc, ranges) for ev, crc, ranges in frag_ids if ev == entry
+ ]
+ if len(matches) != 1:
+ return (f'requested entry 0x{entry:08X} has {len(matches)} '
+ 'manifest identities (expected exactly 1)')
+ contract_error = validate_overlay_func_ids(frag_ids, 'fragment')
+ if contract_error:
+ return contract_error
+ for requested_entry in sorted(requested):
+ entry = _canonical_guest_addr(requested_entry)
+ matches = [
+ (ev, crc, ranges) for ev, crc, ranges in frag_ids if ev == entry
+ ]
+ if not _addr_in_func_ids(entry, matches):
+ return f'requested entry 0x{entry:08X} is outside its guarded ranges'
+ return None
+
+
+def validate_interior_fragment_ids(interior: int, frag_ids: list,
+ generated_defs: set[int]) -> str | None:
+ """Compatibility wrapper for a singleton isolated fragment."""
+ return validate_fragment_requested_ids(
+ {interior}, frag_ids, generated_defs)
+
+
+def validate_hosted_fragment_ids(requested: set[int], host_specs: dict,
+ frag_ids: list,
+ generated_defs: set[int],
+ allow_missing_targets: bool = False
+ ) -> str | None:
+ """Require every emitted host/alias to equal its selected cached owner.
+
+ The recompiler's host-range block boundary is only a syntactic landing-pad
+ check. Safety comes from this publication gate: the original host and
+ every added alias must reproduce the already runtime-validated owner CRC
+ and complete guarded-range geometry exactly.
+ """
+ targets = {_canonical_guest_addr(entry) for entry in requested}
+ specs = {
+ _canonical_guest_addr(entry): spec
+ for entry, spec in host_specs.items()
+ }
+ if set(specs) != targets:
+ return 'hosted target/spec set mismatch'
+ expected_by_entry = {}
+ hosts = set()
+ for target, spec in sorted(specs.items()):
+ host = _canonical_guest_addr(spec['host'])
+ expected = _normalized_func_identity(spec['owner_identity'])
+ if expected[0] != host:
+ return f'hosted target 0x{target:08X} owner entry differs from host'
+ if target == host:
+ return f'hosted target 0x{target:08X} equals its host'
+ hosts.add(host)
+ prior = expected_by_entry.setdefault(host, expected[1:])
+ if prior != expected[1:]:
+ return f'hosted host 0x{host:08X} has conflicting identities'
+ expected_by_entry[target] = expected[1:]
+ if targets & hosts:
+ return 'hosted target is also a host in the same shard'
+ required = targets | hosts
+ contract_error = validate_overlay_func_ids(frag_ids, 'hosted fragment')
+ if contract_error:
+ return contract_error
+ if len(frag_ids) > HOSTED_EMITTED_IDENTITY_CAP:
+ return (f'hosted shard emitted {len(frag_ids)} identities '
+ f'(cap {HOSTED_EMITTED_IDENTITY_CAP})')
+ intervals = sorted(
+ (_canonical_guest_addr(start),
+ _canonical_guest_addr(start) + length)
+ for _entry, _crc, ranges in frag_ids
+ for start, length in ranges)
+ guarded_bytes = 0
+ merged_end = None
+ for start, end in intervals:
+ if merged_end is None or start > merged_end:
+ guarded_bytes += end - start
+ merged_end = end
+ elif end > merged_end:
+ guarded_bytes += end - merged_end
+ merged_end = end
+ if guarded_bytes > HOSTED_UNIQUE_GUARDED_BYTE_CAP:
+ return (f'hosted shard guards {guarded_bytes} unique bytes '
+ f'(cap {HOSTED_UNIQUE_GUARDED_BYTE_CAP})')
+ by_entry = {}
+ for func_id in frag_ids:
+ identity = _normalized_func_identity(func_id)
+ by_entry.setdefault(identity[0], []).append(identity)
+ for entry in sorted(required):
+ matches = by_entry.get(entry, [])
+ emitted = entry in generated_defs
+ if (allow_missing_targets and entry in targets and
+ not matches and not emitted):
+ continue
+ if not emitted:
+ return f'requested entry 0x{entry:08X} missing from generated C'
+ if len(matches) != 1:
+ return (f'hosted entry 0x{entry:08X} has {len(matches)} '
+ 'normalized identities (expected exactly 1)')
+ if matches[0][1:] != expected_by_entry[entry]:
+ return (f'hosted entry 0x{entry:08X} changed selected owner '
+ 'CRC/range identity')
+ return None
+
+
+def hosted_fragment_served_targets(requested: set[int], frag_ids: list,
+ generated_defs: set[int]) -> set[int]:
+ """Targets actually emitted after the C++ block-leader proof."""
+ manifest_entries = {
+ _canonical_guest_addr(entry) for entry, _crc, _ranges in frag_ids
+ }
+ return ({_canonical_guest_addr(entry) for entry in requested} &
+ manifest_entries &
+ {_canonical_guest_addr(entry) for entry in generated_defs})
+
+
+def make_interior_fragment_job(phys_addr: int, load_addr: int, size: int,
+ data: bytes, seed_audit: dict,
+ forced_interiors: set[int],
+ capture: dict | None = None) -> dict | None:
+ """Build one explicit fragment job without mutating the shared seed set."""
+ interiors = {
+ a for a, reason in seed_audit['included_reasons'].items()
+ if reason == 'DISPATCH_INTERIOR'
+ }
+ dispatch_roots = {
+ a for a, reason in seed_audit['included_reasons'].items()
+ if reason in ('DISPATCH_ENTRY', 'STATIC_DISPATCH_ENTRY',
+ 'DISPATCH_ROOT')
+ }
+ executed = set(seed_audit.get('executed_pcs', set()))
+ # A final DISPATCH_INTERIOR needs a discovered host, but a guarded isolated
+ # fragment does not. Do not rebuild live demand solely from surviving
+ # shared seeds. Retain the existing execution gate: arbitrary seeds,
+ # static-only interiors, and merely observed instructions are not enough.
+ observed_dispatch = (set(seed_audit.get('dispatch_fragment_demands', set())) &
+ executed)
+ static_exact_demands = set(
+ seed_audit.get('static_exact_fragment_demands', set()))
+ hosted_donor_demands = set(
+ seed_audit.get('cross_variant_hosted_demands', set()))
+ static_interval_demands = set(
+ seed_audit.get('static_interval_fragment_demands', set()))
+ static_demands = static_exact_demands | static_interval_demands
+ region_hi = phys_addr + size
+ # --force-interior names a PC, so it forces the view of its own segment.
+ forced = {
+ a for a in forced_interiors
+ if phys_addr <= (a & 0x1FFFFFFF) < region_hi and
+ segment_of(a) == segment_of(load_addr)
+ }
+ if not (((interiors or dispatch_roots) and executed) or observed_dispatch or
+ static_demands or forced):
+ return None
+ return {
+ 'phys_addr': phys_addr,
+ 'load_addr': load_addr,
+ 'size': size,
+ 'data': data,
+ # Trailing delay-slot guard words in `data` (readable, not
+ # discoverable). Stated by the capture writer where the field exists,
+ # reconstructed from the page-run format otherwise.
+ 'guard_bytes': capture_guard_bytes(
+ capture, size, f'region 0x{load_addr:08X}'),
+ 'candidates': (interiors | dispatch_roots | observed_dispatch |
+ static_demands | forced),
+ 'executed': executed,
+ 'static_demands': static_demands,
+ 'static_exact_demands': static_exact_demands,
+ 'hosted_donor_demands': hosted_donor_demands,
+ 'included_reasons': {
+ addr: {reason}
+ for addr, reason in seed_audit['included_reasons'].items()
+ },
+ 'static_interval_demands': static_interval_demands,
+ 'forced': forced,
+ 'producer_ranges': tuple(seed_audit['producer_ranges']),
+ 'cross_call_allow': tuple(seed_audit['accepted_cross_producer_calls']),
+ 'resident_cap': ({
+ 'producer': BIOS_RESIDENT_PRODUCER,
+ 'bios_sha256': capture.get('bios_sha256', ''),
+ 'producer_name': capture.get('producer_name', 'BIOS resident code'),
+ } if capture and capture.get('producer') == BIOS_RESIDENT_PRODUCER
+ else None),
+ }
+
+
+def merge_fragment_jobs_by_recipe(jobs: list[dict],
+ invocation_recipe=()) -> list[dict]:
+ """Union evidence that can safely share one byte-variant fragment recipe.
+
+ Repeated captures of identical bytes commonly carry different observed or
+ static roots. Batching each capture independently would still create many
+ supplemental DLLs, so merge only jobs whose complete recompiler recipe is
+ identical. Invocation-wide ABI/flavor/CPS/TOML inputs are constant and are
+ therefore intentionally not repeated in this key.
+ """
+ grouped = {}
+ set_fields = (
+ 'candidates', 'executed', 'static_demands',
+ 'static_exact_demands', 'hosted_donor_demands',
+ 'static_interval_demands', 'forced',
+ )
+ for job in jobs:
+ key = (
+ job['phys_addr'], hashlib.sha256(job['data']).digest(),
+ job['load_addr'], job['size'],
+ tuple(sorted(job['producer_ranges'])),
+ tuple(sorted(set(job['cross_call_allow']))),
+ json.dumps(job.get('resident_cap'), sort_keys=True),
+ tuple(invocation_recipe),
+ )
+ merged = grouped.get(key)
+ if merged is None:
+ merged = dict(job)
+ for field in set_fields:
+ merged[field] = set(job[field])
+ merged['included_reasons'] = {
+ addr: set(reasons)
+ for addr, reasons in job.get('included_reasons', {}).items()
+ }
+ grouped[key] = merged
+ continue
+ for field in set_fields:
+ merged[field].update(job[field])
+ for addr, reasons in job.get('included_reasons', {}).items():
+ merged.setdefault('included_reasons', {}).setdefault(
+ addr, set()).update(reasons)
+ if merged.get('resident_cap') is None and job.get('resident_cap'):
+ merged['resident_cap'] = job['resident_cap']
+ return [grouped[key] for key in sorted(grouped)]
+
+
+def _normalized_func_identity(func_id) -> tuple:
+ entry, code_crc, ranges = func_id
+ return (_canonical_guest_addr(entry), code_crc & 0xFFFFFFFF,
+ tuple((_canonical_guest_addr(start), length)
+ for start, length in ranges))
+
+
+def _producer_for_job_addr(job: dict, addr: int):
+ """Return a stable producer token, treating a simple image as one producer."""
+ phys = addr & 0x1FFFFFFF
+ ranges = job.get('producer_ranges', ())
+ if not ranges:
+ lo = job['load_addr'] & 0x1FFFFFFF
+ hi = lo + job['size']
+ return ('image', lo, hi) if lo <= phys < hi else None
+ for index, (start, end) in enumerate(ranges):
+ lo = start & 0x1FFFFFFF
+ hi = lo + (end - start)
+ if lo <= phys < hi:
+ return ('producer', index, lo, hi)
+ return None
+
+
+def _preferred_host_reason(reasons) -> str | None:
+ """Choose one existing marker deterministically without widening trust."""
+ priority = (
+ 'DIRECT_JAL_TARGET', 'STATIC_INDIRECT_TARGET',
+ 'STATIC_BRANCH_ROOT', 'STATIC_DISCOVERY_ROOT',
+ 'STATIC_DISPATCH_ENTRY', 'DISPATCH_ENTRY', 'FUNCTION_POINTER_TARGET',
+ 'TOML_DECLARED_ENTRY',
+ )
+ reason_set = set(reasons) & HOSTED_OWNER_REASONS
+ return next((reason for reason in priority if reason in reason_set), None)
+
+
+def select_hosted_interior_demands(job: dict, donor_recipes: dict,
+ current_func_ids: list,
+ audit_out: dict | None = None) -> dict:
+ """Map sibling-proven targets to unique CRC-valid local host identities.
+
+ This is deliberately fail-closed. Aliases and multi-range functions are
+ not eligible owners: an owner must have one exact range beginning at its F
+ entry, carry local root evidence, share the target's producer, and be the
+ sole distinct identity containing that target.
+ """
+ donor_items = sorted(donor_recipes.items())
+ nomination_dropped = max(0, len(donor_items) - HOSTED_NOMINATION_CAP)
+ donor_items = donor_items[:HOSTED_NOMINATION_CAP]
+ lo = job['load_addr'] & 0x1FFFFFFF
+ hi = lo + job['size']
+ local_reasons = {
+ _canonical_guest_addr(addr): set(reasons)
+ for addr, reasons in job.get('included_reasons', {}).items()
+ }
+ identities = {
+ _normalized_func_identity(func_id)
+ for func_id in current_func_ids
+ }
+ rejected = Counter()
+ owner_intervals = []
+ for identity in identities:
+ host, _crc, ranges = identity
+ reason = _preferred_host_reason(local_reasons.get(host, ()))
+ if reason is None:
+ rejected['owner_identity_no_local_root'] += 1
+ continue
+ if len(ranges) != 1:
+ rejected['owner_identity_alias_or_multirange'] += 1
+ continue
+ range_start, length = ranges[0]
+ if range_start != host or length <= 0:
+ rejected['owner_identity_not_rooted_range'] += 1
+ continue
+ producer = _producer_for_job_addr(job, host)
+ if producer is None:
+ rejected['owner_identity_no_producer'] += 1
+ continue
+ range_end = range_start + length
+ if (range_end & 0x1FFFFFFF) > producer[-1]:
+ rejected['owner_identity_crosses_producer_end'] += 1
+ continue
+ owner_intervals.append(
+ (range_start, range_end, producer, identity, reason))
+ owner_intervals.sort(key=lambda item: (item[0], item[1], item[3]))
+
+ selected = {}
+ active_intervals = []
+ next_interval = 0
+ for raw_target, donors in donor_items:
+ target = _canonical_guest_addr(raw_target)
+ if not donors:
+ rejected['target_no_donor_recipe'] += 1
+ continue
+ target_phys = target & 0x1FFFFFFF
+ if (target & 3) != 0 or not (lo <= target_phys < hi):
+ rejected['target_outside'] += 1
+ continue
+ target_producer = _producer_for_job_addr(job, target)
+ if target_producer is None:
+ rejected['target_no_producer'] += 1
+ continue
+ while (next_interval < len(owner_intervals) and
+ owner_intervals[next_interval][0] < target):
+ active_intervals.append(owner_intervals[next_interval])
+ next_interval += 1
+ active_intervals = [
+ interval for interval in active_intervals
+ if interval[1] > target
+ ]
+ candidates = [
+ (identity, reason)
+ for _start, _end, producer, identity, reason in active_intervals
+ if producer == target_producer
+ ]
+ # Multiple byte/geometry owners make runtime load order semantically
+ # relevant. Duplicate copies of the identical identity collapse in
+ # the set above; any remaining ambiguity is rejected.
+ if len(candidates) != 1:
+ rejected['target_no_unique_owner'] += 1
+ continue
+ owner_identity, host_reason = candidates[0]
+ selected[target] = {
+ 'host': owner_identity[0],
+ 'owner_identity': owner_identity,
+ 'host_reason': host_reason,
+ }
+ bounded = {}
+ selected_hosts = set()
+ for target, spec in sorted(selected.items()):
+ host = _canonical_guest_addr(spec['host'])
+ if len(bounded) >= HOSTED_SELECTED_ALIAS_CAP:
+ rejected['selected_alias_cap_dropped'] += 1
+ continue
+ if host not in selected_hosts and len(
+ selected_hosts) >= HOSTED_SELECTED_HOST_CAP:
+ rejected['selected_host_cap_dropped'] += 1
+ continue
+ bounded[target] = spec
+ selected_hosts.add(host)
+ selected = bounded
+ if nomination_dropped:
+ rejected['nomination_cap_dropped'] += nomination_dropped
+ if audit_out is not None:
+ audit_out.clear()
+ audit_out.update(rejected)
+ audit_out['donor_targets'] = len(donor_recipes)
+ audit_out['current_identities'] = len(identities)
+ audit_out['selected'] = len(selected)
+ return selected
+
+
+def organic_root_entries(func_ids) -> set[int]:
+ """Return entries whose identity is exactly one range rooted at entry.
+
+ Hosted aliases reuse their owner's range, so their F entry must never gain
+ sibling-donor authority merely because the alias survived CRC validation.
+ Requiring the same geometry as hosted-owner selection also rejects a later
+ island in a multi-range identity from becoming a recursive donor.
+ """
+ roots = set()
+ for func_id in func_ids:
+ entry, _crc, ranges = _normalized_func_identity(func_id)
+ if len(ranges) != 1:
+ continue
+ start, length = ranges[0]
+ if start == entry and length > 0:
+ roots.add(entry)
+ return roots
+
+
+def recipient_sibling_proofs(donor_entries_by_recipe: dict[int, tuple],
+ recipient_index: int,
+ authority_phys_entries: set,
+ limit: int = HOSTED_NOMINATION_CAP
+ ) -> tuple[dict, bool]:
+ """Return the fixed first entries proven by another byte recipe.
+
+ Each recipe's donor list is sorted once. A heap merge excludes the
+ recipient before applying the nomination limit. Authority coverage is also
+ removed before the cap because it is reconstructed deterministically on
+ every invocation. Supplemental coverage deliberately remains in the
+ returned window through *all* later selection caps (alias and host as well
+ as nomination); ``still_needed`` removes it only at compile time. Filtering
+ it here would let an unchanged rerun page into a host that was dropped by a
+ later cap. Duplicate addresses collapse.
+ """
+ streams = [
+ entries for index, entries in sorted(donor_entries_by_recipe.items())
+ if index != recipient_index and entries
+ ]
+ if not streams or limit <= 0:
+ return {}, bool(streams)
+ nominated = []
+ previous = None
+ have_previous = False
+ for entry in heapq.merge(*streams):
+ if have_previous and entry == previous:
+ continue
+ previous = entry
+ have_previous = True
+ if (entry & 0x1FFFFFFF) in authority_phys_entries:
+ continue
+ if len(nominated) >= limit:
+ return ({entry: True for entry in nominated}, True)
+ nominated.append(entry)
+ return ({entry: True for entry in nominated}, False)
+
+
+def select_fragment_orphans(candidates: set[int], executed: set[int],
+ forced: set[int], static_exact: set[int],
+ static_interval: set[int],
+ current_variant_entries: set[int],
+ current_variant_ranges: list) -> list[int]:
+ """Select exact demands that the relevant current artifacts cannot serve."""
+ def current_region_contains(addr):
+ phys = addr & 0x1FFFFFFF
+ return any(start <= phys < end for start, end in current_variant_ranges)
+
+ return sorted(
+ addr for addr in candidates
+ # Every exact demand is byte-variant-specific. A same-address F from a
+ # different region variant cannot satisfy it because the runtime's CRC
+ # guard will reject that identity against the current bytes.
+ if (addr in forced or
+ (addr in static_exact and
+ (addr & 0x1FFFFFFF) not in current_variant_entries) or
+ (addr in static_interval and not current_region_contains(addr)) or
+ (addr in executed and
+ (addr & 0x1FFFFFFF) not in current_variant_entries)))
+
+
+def select_batchable_strong_roots(static_exact: set[int], executed: set[int],
+ forced: set[int], static_interval: set[int],
+ current_variant_entries: set[int]) -> list[int]:
+ """Strong exact roots safe to share a supplemental failure domain."""
+ batchable, _isolated = partition_strong_root_demands(
+ static_exact, executed, forced, static_interval,
+ current_variant_entries)
+ return batchable
+
+
+def partition_strong_root_demands(static_exact: set[int], executed: set[int],
+ forced: set[int], static_interval: set[int],
+ current_variant_entries: set[int]
+ ) -> tuple[list[int], list[int]]:
+ """Partition every missing exact root without deferring live overlaps."""
+ isolated = executed | forced | static_interval
+ missing = {
+ entry for entry in static_exact
+ if (entry & 0x1FFFFFFF) not in current_variant_entries
+ }
+ return (sorted(missing - isolated), sorted(missing & isolated))
+
+
+def compile_batched_fragment_roots(entries, compile_one, on_success,
+ on_singleton_failure,
+ still_needed=lambda _entry: True,
+ should_bisect=lambda _status: True,
+ on_batch_failure=None) -> int:
+ """Compile one root batch, bisecting only when the batch fails closed.
+
+ ``compile_one`` returns the normal ``(func_ids, status)`` pair. Successful
+ batches stay grouped; a rejected interaction is recursively partitioned so
+ one bad root cannot discard good roots. Only singleton failures are exposed
+ to memo/accounting policy.
+ """
+ roots = sorted(entry for entry in set(entries) if still_needed(entry))
+ if not roots:
+ return 0
+ frag_ids, status = compile_one(roots)
+ if frag_ids:
+ on_success(roots, frag_ids, status)
+ return 1
+ if len(roots) == 1:
+ on_singleton_failure(roots[0], status)
+ return 0
+ if not should_bisect(status):
+ if on_batch_failure is not None:
+ on_batch_failure(roots, status)
+ else:
+ for root in roots:
+ on_singleton_failure(root, status)
+ return 0
+ middle = len(roots) // 2
+ return (compile_batched_fragment_roots(
+ roots[:middle], compile_one, on_success,
+ on_singleton_failure, still_needed, should_bisect,
+ on_batch_failure) +
+ compile_batched_fragment_roots(
+ roots[middle:], compile_one, on_success,
+ on_singleton_failure, still_needed, should_bisect,
+ on_batch_failure))
+
+
+def compile_batched_hosted_aliases(hosted: dict, compile_one, on_success,
+ on_singleton_failure,
+ still_needed=lambda _entry: True,
+ should_bisect=lambda _status: True,
+ on_batch_failure=None,
+ attempt_cap=HOSTED_COMPILE_ATTEMPT_CAP,
+ stop_requested=lambda: False) -> int:
+ """Compile bounded host groups, splitting hosts before their targets.
+
+ Multiple host roots can repartition one another. Exact identity validation
+ makes that interaction fail closed; host-group-first bisection then removes
+ the conflicting root without needlessly exploding every target belonging
+ to otherwise compatible hosts.
+ """
+ by_host = {}
+ for raw_target, spec in sorted(hosted.items()):
+ target = _canonical_guest_addr(raw_target)
+ host = _canonical_guest_addr(spec['host'])
+ key = (host, _normalized_func_identity(spec['owner_identity']),
+ spec['host_reason'])
+ by_host.setdefault(key, []).append(target)
+
+ # A group larger than the per-shard alias bound is split deterministically;
+ # each piece still carries exactly one owner identity.
+ groups = []
+ for key, targets in sorted(by_host.items()):
+ unique_targets = sorted(set(targets))
+ for offset in range(0, len(unique_targets), HOSTED_BATCH_ALIAS_CAP):
+ groups.append((key, unique_targets[
+ offset:offset + HOSTED_BATCH_ALIAS_CAP]))
+
+ chunks = []
+ chunk = []
+ alias_count = 0
+ for group in groups:
+ group_aliases = len(group[1])
+ if chunk and (len(chunk) >= HOSTED_BATCH_HOST_CAP or
+ alias_count + group_aliases > HOSTED_BATCH_ALIAS_CAP or
+ chunk[-1][0][0] == group[0][0]):
+ chunks.append(chunk)
+ chunk = []
+ alias_count = 0
+ chunk.append(group)
+ alias_count += group_aliases
+ if chunk:
+ chunks.append(chunk)
+
+ attempts = 0
+
+ def run(group_batch):
+ nonlocal attempts
+ if stop_requested():
+ return 0
+ filtered = []
+ for key, targets in group_batch:
+ needed = [entry for entry in targets if still_needed(entry)]
+ if needed:
+ filtered.append((key, needed))
+ if not filtered:
+ return 0
+ specs = {}
+ for (host, owner_identity, host_reason), targets in filtered:
+ for target in targets:
+ specs[target] = {
+ 'host': host,
+ 'owner_identity': owner_identity,
+ 'host_reason': host_reason,
+ }
+ entries = sorted(specs)
+ if attempts >= attempt_cap:
+ status = (f'hosted-entry-audit: compile attempt cap '
+ f'{attempt_cap} reached')
+ if on_batch_failure is not None:
+ on_batch_failure(entries, status)
+ return 0
+ attempts += 1
+ frag_ids, status = compile_one(specs)
+ if frag_ids:
+ served = on_success(entries, frag_ids, status)
+ if served is None:
+ return 1
+ served = ({_canonical_guest_addr(entry) for entry in served} &
+ set(entries))
+ if not served:
+ status = ('hosted-entry-audit: successful batch reported no '
+ 'requested targets')
+ if on_batch_failure is not None:
+ on_batch_failure(entries, status)
+ else:
+ for entry in entries:
+ on_singleton_failure(entry, status)
+ return 1
+ missing_groups = []
+ for key, targets in filtered:
+ missing = [entry for entry in targets if entry not in served]
+ if missing:
+ missing_groups.append((key, missing))
+ if not missing_groups:
+ return 1
+ # The recompiler may prove only a subset of a multi-target hosted
+ # request. Retry the deterministic remainder now; otherwise a later
+ # invocation would shrink the batch and accidentally page into new
+ # successes. Every successful retry removes at least one target and
+ # the global attempt cap still bounds adversarial inputs.
+ return 1 + run(missing_groups)
+ if len(filtered) > 1 and should_bisect(status):
+ middle = len(filtered) // 2
+ return run(filtered[:middle]) + run(filtered[middle:])
+ key, targets = filtered[0]
+ if len(targets) > 1 and should_bisect(status):
+ middle = len(targets) // 2
+ return (run([(key, targets[:middle])]) +
+ run([(key, targets[middle:])]))
+ if len(targets) == 1:
+ on_singleton_failure(targets[0], status)
+ elif on_batch_failure is not None:
+ on_batch_failure(targets, status)
+ else:
+ for target in targets:
+ on_singleton_failure(target, status)
+ return 0
+
+ built = 0
+ for chunk_groups in chunks:
+ if stop_requested():
+ break
+ built += run(chunk_groups)
+ return built
+
+
+def hosted_entries_still_missing(hosted: dict, current_phys_entries,
+ rejected_entries=()) -> list[int]:
+ """Return nominated aliases that still need capacity accounting."""
+ covered = {int(entry) & 0x1FFFFFFF for entry in current_phys_entries}
+ rejected = {_canonical_guest_addr(entry) for entry in rejected_entries}
+ return sorted({
+ _canonical_guest_addr(entry)
+ for entry in hosted
+ if ((int(entry) & 0x1FFFFFFF) not in covered and
+ _canonical_guest_addr(entry) not in rejected)
+ })
+
+
+def fragment_capacity_allows_entry(saturated: bool, repair_all: bool,
+ forced_entries, entry: int) -> bool:
+ """Whether capacity policy permits one fragment compile attempt.
+
+ A saturated namespace cannot admit ordinary growth. ``--force`` still
+ has to reach the transactional publisher because replacing the same shard
+ can be capacity-neutral. ``--force-interior`` grants that exception only
+ to the explicitly named entry.
+ """
+ return (not saturated or repair_all or
+ _canonical_guest_addr(entry) in {
+ _canonical_guest_addr(forced)
+ for forced in forced_entries
+ })
+
+
+def fragment_capacity_fastpath_eligible(saturated: bool, repair_all: bool,
+ jobs) -> bool:
+ """Whether an already-full invocation may bypass fragment owner analysis."""
+ return (saturated and not repair_all and
+ not any(job.get('forced') for job in jobs))
+
+
+def fragment_batch_failure_is_partitionable(reason: str) -> bool:
+ """Whether retrying smaller root sets can change this failure verdict."""
+ if reason.startswith('candidate-capacity: full'):
+ return False
+ if unsupported_guest_branch_rejection(reason):
+ return True
+ return reason.startswith((
+ 'generated-c-audit:', 'requested-entry-audit:',
+ 'hosted-entry-audit:',
+ 'candidate-capacity:',
+ 'no-generated-output', 'no-func-ids',
+ 'fragment cache-key collision',
+ ))
+
+
+def compile_fragment_batch(requested_entries, data: bytes, load_addr: int,
+ size: int, phys_addr: int, cache_dir: str,
+ args, sub_env: dict, toml_doc: dict,
+ producer_ranges=(), cross_call_allow=(),
+ hosted_owners: dict | None = None,
+ manifest_provenance: str | None = None,
+ *, guard_bytes: int):
+ """Compile an ISOLATED interior-entry 'island' fragment that ENTERS at an
+ executed orphan DISPATCH_INTERIOR PC (a host that static analysis never
+ discovered, e.g. an FMV driver reached via a computed jump) and covers the
+ recompiler's worklist-discovered reachable CFG from that PC — a single
+ `dispatch_root` seed; out-of-island branches become dispatcher exits.
+
+ Emitted as its OWN _.dll so a fragment that fails the
+ generated-C audit is dropped ALONE and never poisons the region's trusted DLL
+ (separate failure domain — the invariant the earlier host-recovery attempt
+ violated). Safe because: dispatch_root is exempt from the boundary re-check
+ that would reject a mid-function start; the recompiler translates mid-function
+ code literally (regs from CPU state, no synthesized stack frame — the caller
+ already set up the frame); and the loader's per-function live-RAM CRC gate
+ rejects any fragment whose bytes don't match. Returns (frag_ids, status):
+ status 'built' or 'cached' on success (frag_ids is the func-id list), or
+ (None, reason) on failure/skip so the caller can tally WHY a fragment
+ dropped instead of the old silent None."""
+ requested = sorted({
+ (entry & PHYS_MASK) | segment_of(load_addr)
+ for entry in requested_entries
+ })
+ if not requested:
+ return None, 'no-requested-entries'
+ if hosted_owners is not None:
+ hosted_specs = {
+ _canonical_guest_addr(entry): spec
+ for entry, spec in hosted_owners.items()
+ if _canonical_guest_addr(entry) in requested
+ }
+ if set(hosted_specs) != set(requested):
+ return None, 'hosted-entry-audit: target/spec set mismatch'
+ hosts = sorted({_canonical_guest_addr(spec['host'])
+ for spec in hosted_specs.values()})
+ if set(hosts) & set(requested):
+ return None, 'hosted-entry-audit: target is also a host'
+ first_entry = hosts[0]
+ else:
+ hosted_specs = None
+ first_entry = requested[0]
+ with tempfile.TemporaryDirectory() as tmp:
+ psx = os.path.join(tmp, 'frag.psx')
+ with open(psx, 'wb') as f:
+ f.write(make_psxexe(load_addr, first_entry, data,
+ guard_bytes=guard_bytes))
+ seeds_path = os.path.join(tmp, 'seeds.txt')
+ with open(seeds_path, 'w') as f:
+ for range_lo, range_hi in producer_ranges:
+ f.write(f'producer_range 0x{range_lo:08X} 0x{range_hi:08X}\n')
+ for target in sorted(set(cross_call_allow)):
+ f.write(f'cross_call_allow 0x{target:08X}\n')
+ if hosted_specs is None:
+ for entry in requested:
+ f.write(f'dispatch_root 0x{entry:08X}\n')
+ else:
+ host_markers = {}
+ for entry, spec in sorted(hosted_specs.items()):
+ host = _canonical_guest_addr(spec['host'])
+ marker = seed_line_for_reason(host, spec['host_reason'])
+ prior = host_markers.setdefault(host, marker)
+ if prior != marker:
+ return None, (f'hosted-entry-audit: host '
+ f'0x{host:08X} has conflicting markers')
+ for host, marker in sorted(host_markers.items()):
+ f.write(marker + '\n')
+ for entry in requested:
+ host = _canonical_guest_addr(hosted_specs[entry]['host'])
+ f.write(f'hosted_interior 0x{entry:08X} '
+ f'0x{host:08X}\n')
+ out_dir_tmp = os.path.join(tmp, 'out')
+ os.makedirs(out_dir_tmp)
+ cmd = [args.recompiler, psx, '--seeds', seeds_path,
+ '--out-dir', out_dir_tmp, '--overlay',
+ '--ws-config', os.path.abspath(args.game_toml)]
+ cmd += recompiler_project_root_args(args)
+ r = subprocess.run(cmd, capture_output=True, text=True,
+ cwd=os.path.dirname(os.path.abspath(args.game_toml)),
+ env=sub_env)
+ if r.returncode != 0:
+ return None, f'recompiler-error: {(r.stderr or r.stdout or "").strip()}'
+ full_c = ranges_src = None
+ for fn in os.listdir(out_dir_tmp):
+ if fn.endswith('_full.c'):
+ full_c = os.path.join(out_dir_tmp, fn)
+ elif fn.endswith('_full.ranges'):
+ ranges_src = os.path.join(out_dir_tmp, fn)
+ if not full_c or not ranges_src:
+ return None, 'no-generated-output (_full.c/_full.ranges missing)'
+ with open(full_c) as f:
+ src = patch_generated_c(f.read(), load_addr, size)
+ c_audit = audit_generated_c(src, load_addr, size,
+ binascii.crc32(data) & 0xFFFFFFFF, toml_doc)
+ if c_audit['unknown_bad'] or c_audit['unsupported_todo_addrs']:
+ # RETAIN the failed fragment's C for triage. Region shards already
+ # keep their _patched.c on audit failure; interior fragments used to
+ # return here BEFORE the (success-only) retain below, so the exact
+ # shards you most want to inspect — WHY did this orphan interior fail
+ # to lower — vanished with the temp dir. Write it out with a header
+ # summarizing the audit verdict so a failure is drillable, not just
+ # counted. (compile_overlays.py is not in the codegen hash: no reshard.)
+ try:
+ os.makedirs(cache_dir, exist_ok=True)
+ ub = ', '.join(f'0x{a:08X}' for a in sorted(c_audit['unknown_bad']))
+ us = ', '.join(f'0x{a:08X}'
+ for a in sorted(c_audit['unsupported_todo_addrs']))
+ header = (
+ f'/* FRAGMENT AUDIT FAILED — retained for triage (not compiled).\n'
+ f' * requested ({len(requested)}): '
+ f'{", ".join(f"0x{entry:08X}" for entry in requested)}\n'
+ f' * region phys : 0x{phys_addr:08X}\n'
+ f' * unknown_bad ({len(c_audit["unknown_bad"])}): {ub}\n'
+ f' * unsupported ({len(c_audit["unsupported_todo_addrs"])}): {us}\n'
+ f' */\n')
+ request_key = binascii.crc32(b''.join(
+ struct.pack(' \d+ projected .* > (\d+);',
+ capacity_error)
+ if match and int(match.group(1)) >= int(match.group(2)):
+ return None, 'candidate-capacity: full; ' + capacity_error
+ return None, 'candidate-capacity: ' + capacity_error
+ return None, 'compile-error (see COMPILE ERROR above)'
+ if not publication.get('published', True):
+ # Another process won the content-key publication race. It is a
+ # cache hit only when the complete pair is byte-for-byte the same
+ # manifest identity; a 32-bit filename-key collision must fail
+ # closed instead of warming coverage from our discarded staging.
+ cache_status = cached_shard_manifest_status(
+ dll_path, overlay_abi_tag(args.runtime_include, args.flavor),
+ overlay_ranges_text(
+ frag_ids, pair_id, manifest_provenance), pair_id)
+ if cache_status != 'match':
+ return None, ('fragment cache-key collision/concurrent pair: '
+ 'preserved manifest does not match generated identity')
+ return frag_ids, 'cached'
+ return frag_ids, 'built'
+
+
+def compile_interior_fragment(interior: int, data: bytes, load_addr: int,
+ size: int, phys_addr: int, cache_dir: str,
+ args, sub_env: dict, toml_doc: dict,
+ producer_ranges=(), cross_call_allow=(),
+ *, guard_bytes: int):
+ """Compile one isolated uncertain interior entry.
+
+ Executed, operator-forced, and interval-only aliases deliberately use this
+ singleton wrapper so one speculative entry cannot poison trusted roots.
+ Play-free strong roots use ``compile_fragment_batch`` instead.
+ """
+ return compile_fragment_batch(
+ {interior}, data, load_addr, size, phys_addr, cache_dir, args, sub_env,
+ toml_doc, producer_ranges, cross_call_allow,
+ manifest_provenance=ORPHAN_MANIFEST_PROVENANCE,
+ guard_bytes=guard_bytes)
+
+
+def fragment_shard_key(func_ids: list,
+ provenance: str | None = None) -> int:
+ """Filename identity shared by fragment publication and sidecars."""
+ crc = 0
+ if provenance is not None:
+ crc = binascii.crc32(
+ b'psxrecomp fragment provenance\0' +
+ provenance.encode('ascii') + b'\0')
+ return binascii.crc32(b''.join(
+ struct.pack(' /x/... before prepending; verified live:
+ # POSIX-prepend rc 0, Windows-prepend rc 1.
+ pd = d
+ if os.sep == '/':
+ m = re.match(r'^([A-Za-z]):[\\/](.*)$', d)
+ if m:
+ pd = '/' + m.group(1).lower() + '/' + m.group(2).replace('\\', '/')
+ env['PATH'] = pd + os.pathsep + env.get('PATH', '')
+ return env, d
+ return env, None
+
+
+# ---- TinyCC (tcc) overlay compile — toolchain-free user fallback -----------
+# tcc has its own built-in linker (no ld/collect2) and bundles its own headers,
+# so it is self-contained. The only friction is that tcc 0.9.27 does not skip a
+# UTF-8 BOM, and the recompiler's runtime headers carry one — so we feed tcc a
+# BOM-stripped copy of the include dirs (used ONLY for tcc's -I; the codegen hash
+# still derives from the real headers, so the cache dir matches the runtime).
+_TCC_BOMFREE_INC = {} # orig include dir -> bom-stripped temp dir (memoized)
+_TCC_COMPAT_PREFIX = b'''\
+#ifdef __TINYC__
+/* TinyCC 0.9.27 has no GCC __builtin_ctz. Keep this shim local to the
+ * disposable generated source so runtime headers and the codegen hash stay
+ * byte-identical across compilers. */
+static inline unsigned psx_tcc_ctz(unsigned value) {
+ unsigned bit = 0u;
+ while (((value >> bit) & 1u) == 0u) ++bit;
+ return bit;
+}
+#define __builtin_ctz(value) psx_tcc_ctz((unsigned)(value))
+#endif
+'''
+
+def _bom_free_incdir(d: str) -> str:
+ d = os.path.abspath(d)
+ if d in _TCC_BOMFREE_INC:
+ return _TCC_BOMFREE_INC[d]
+ out = tempfile.mkdtemp(prefix='tcc_inc_')
+ for name in os.listdir(d):
+ # Headers, and the .c.inc fragments a BIOS module's glue.c includes by
+ # name (overlay_dispatch_preamble.c.inc, psx_bios_module_glue.c.inc).
+ # tcc sees only this copy, so a file left out here is "not found".
+ if not name.endswith(('.h', '.inc')):
+ continue
+ with open(os.path.join(d, name), 'rb') as f:
+ data = f.read()
+ if data[:3] == b'\xef\xbb\xbf':
+ data = data[3:]
+ with open(os.path.join(out, name), 'wb') as f:
+ f.write(data)
+ _TCC_BOMFREE_INC[d] = out
+ return out
+
+def _compile_dll_tcc(c_path: str, out_dll: str, include_dirs, flavor: int,
+ tcc: str) -> bool:
+ # Strip a UTF-8 BOM off the overlay C itself (tcc 0.9.27 chokes on it) and
+ # provide the one GCC builtin used by the shared cycle-model header.
+ with open(c_path, 'rb') as f:
+ data = f.read()
+ if data[:3] == b'\xef\xbb\xbf':
+ data = data[3:]
+ if not data.startswith(_TCC_COMPAT_PREFIX):
+ data = _TCC_COMPAT_PREFIX + data
+ with open(c_path, 'wb') as f:
+ f.write(data)
+ cmd = [tcc, '-shared',
+ '-DPSX_OVERLAY_DLL_BUILD',
+ # Keep TCC semantically identical to the GCC overlay path. Omitting
+ # these left debug_server_cyc_observe unresolved in release shards
+ # and disabled guest-cycle charging in every successfully linked
+ # TCC shard.
+ '-DPSX_NO_DEBUG_TOOLS',
+ '-DPSX_ENABLE_BLOCK_CYCLES=1',
+ f'-DPSX_OVERLAY_FLAVOR={int(flavor)}',
+ # PGXP flavor bit (overlay_api.h PSX_OVERLAY_FLAVOR_PGXP): arm the
+ # PGXP_*() hook macros the emitter writes into every overlay C.
+ *(['-DPSX_PGXP=1'] if int(flavor) & 2 else []),
+ native_path(c_path), '-o', native_path(out_dll)]
+ for d in include_dirs:
+ cmd.append('-I' + native_path(_bom_free_incdir(d)))
+ print(f' compile (tcc): {" ".join(cmd)}')
+ r = subprocess.run(cmd, capture_output=True, text=True)
+ if r.returncode != 0:
+ print(f' TCC COMPILE ERROR (exit {r.returncode}):\n{r.stderr or r.stdout}')
+ return False
+ return True
+
+
+def _compile_dll_direct(c_path: str, out_dll: str, include_dirs: list[str],
+ gcc: str = 'gcc', flavor: int = 0,
+ compiler: str = 'gcc', tcc: str = 'tcc') -> bool:
+ import platform
+ # Absolute paths (interpreter flavor) for EVERY path the native compiler
+ # touches — see native_path's docstring for the two rules and the
+ # 2026-07-15 MSYS-python incident they encode.
+ c_path = native_path(c_path)
+ out_dll = native_path(out_dll)
+ if compiler == 'tcc':
+ return _compile_dll_tcc(c_path, out_dll, include_dirs, flavor, tcc)
+ env, tc_dir = _toolchain_env(gcc)
+ includes = [f'-I{native_path(d)}' for d in include_dirs]
+ # On Windows, DLLs use PE relocations — -fPIC triggers GCC CRT init
+ # that conflicts with the host process. Use -shared without -fPIC.
+ pic_flag = [] if is_windows() else ['-fPIC']
+ cmd = [
+ gcc, '-shared', *pic_flag, '-O2',
+ '-DPSX_OVERLAY_DLL_BUILD',
+ # Overlays mirror the runtime's no-debug-tools build: the emitter guards
+ # debug_server_cyc_observe (and friends) behind PSX_NO_DEBUG_TOOLS, and the
+ # shipped/native runtime is built without debug tools, so define it here too or
+ # the overlay emits calls to symbols the runtime doesn't have (undefined ref).
+ '-DPSX_NO_DEBUG_TOOLS',
+ # CYCLE MODEL UNIFICATION (Tomba2 logo Timer1 fork): compiled-overlay code
+ # MUST charge guest cycles exactly like the dirty-RAM interpreter and the
+ # BIOS (both built with PSX_ENABLE_BLOCK_CYCLES=1). Without this flag every
+ # psx_advance_cycles() in overlay code is #ifdef'd out, so a function run as
+ # a native overlay charges ~0 cycles while the same function run via the
+ # interp charges per-instruction -> timer-sensitive code (e.g. a Timer1
+ # debounce) reads different values per backend and the game forks.
+ '-DPSX_ENABLE_BLOCK_CYCLES=1',
+ # Codegen-flavor tag baked into overlay_abi() (base=0). The loader
+ # rejects DLLs whose flavor differs from the runtime's, so a widescreen
+ # cache and a base cache can never cross-contaminate even if they share
+ # a directory (they key by guest-bytes CRC, which is flavor-blind).
+ f'-DPSX_OVERLAY_FLAVOR={int(flavor)}',
+ # PGXP flavor bit (overlay_api.h PSX_OVERLAY_FLAVOR_PGXP): arm the
+ # PGXP_*() hook macros the emitter writes into every overlay C.
+ *(['-DPSX_PGXP=1'] if int(flavor) & 2 else []),
+ c_path,
+ '-o', out_dll,
+ *includes,
+ '-lm',
+ ]
+ if tc_dir is None:
+ print(' WARNING: no gcc toolchain dir found (PSX_MINGW_BIN / --gcc dir / '
+ 'PATH / common locations); compile will likely fail silently.')
+ print(f' compile: {" ".join(cmd)}')
+ r = subprocess.run(cmd, capture_output=True, text=True, env=env)
+ if r.returncode != 0:
+ msg = (r.stderr or r.stdout or '').strip()
+ if not msg:
+ # No compiler output at all = the compiler never really ran
+ # (spawn/DLL-load failure: foreign-MSYS runtime mix, bad toolchain
+ # dir, or non-native paths). Say so instead of printing nothing —
+ # an empty COMPILE ERROR is undiagnosable from the runtime's tail.
+ msg = ('(no compiler output — gcc likely failed to launch: '
+ f'toolchain dir={tc_dir!r}, check PATH/DLL mix and that '
+ 'all paths above are OS-native)')
+ print(f' COMPILE ERROR (exit {r.returncode}):\n{msg}')
+ return False
+ return True
+
+
+def compile_dll(c_path: str, out_dll: str, include_dirs: list[str],
+ gcc: str = 'gcc', flavor: int = 0,
+ compiler: str = 'gcc', tcc: str = 'tcc',
+ func_ids: list | None = None,
+ pair_id: int | None = None,
+ preserve_existing_pair: bool = False,
+ expected_existing_abi: int | None = None,
+ publication_result: dict | None = None,
+ candidate_cap: int | None = None,
+ manifest_provenance: str | None = None) -> bool:
+ """Publish a shard only after all of its artifacts are complete.
+
+ GCC and tcc write their output incrementally. If the process is interrupted
+ while targeting the final cache name, the next run sees that partial file
+ and used to skip it as if it were complete. Compile to a unique sibling.
+
+ When ``func_ids`` is supplied, stage the range manifest too and publish the
+ two as one recoverable transaction. Moving the old DLL out of its loader-
+ visible name first means every interruption point contains either a complete
+ old pair, a complete new pair, or no loadable pair -- never mixed halves.
+ The pair ID additionally lets a pair-aware loader reject the only filesystem
+ TOCTOU left: an old manifest parsed immediately before the DLL rename.
+ """
+ final_out = os.path.abspath(out_dll)
+ out_dir = os.path.dirname(final_out)
+ os.makedirs(out_dir, exist_ok=True)
+ if func_ids is not None and (not func_ids or pair_id is None):
+ print(' COMPILE ERROR: paired shard requires non-empty ranges and pair ID')
+ return False
+ if func_ids is not None and candidate_cap is not None:
+ try:
+ capacity_error = preflight_shard_candidate_capacity(
+ final_out, func_ids, pair_id, manifest_provenance,
+ expected_existing_abi, candidate_cap)
+ except Exception as exc:
+ # A failed optimization must not replace the authoritative locked
+ # projection after linking. Compile normally and let publication
+ # either admit or reject the staged pair.
+ print(f' capacity preflight unavailable: {exc}')
+ capacity_error = None
+ if capacity_error is not None:
+ if publication_result is not None:
+ publication_result['capacity_error'] = capacity_error
+ print(f' COMPILE SKIP (preflight): {capacity_error}')
+ return False
+ suffix = os.path.splitext(final_out)[1] or overlay_ext()
+ fd, staged = tempfile.mkstemp(
+ prefix=f'.{os.path.basename(final_out)}.tmp.', suffix=suffix,
+ dir=out_dir)
+ os.close(fd)
+ os.unlink(staged) # let the native compiler create its output normally
+ staged_ranges = os.path.splitext(staged)[0] + '.ranges'
+ try:
+ if not _compile_dll_direct(
+ c_path, staged, include_dirs, gcc=gcc, flavor=flavor,
+ compiler=compiler, tcc=tcc):
+ return False
+ if not os.path.isfile(staged) or os.path.getsize(staged) == 0:
+ print(' COMPILE ERROR: compiler reported success but emitted no DLL')
+ return False
+ if func_ids is None:
+ os.replace(staged, final_out)
+ if publication_result is not None:
+ publication_result['published'] = True
+ return True
+ write_overlay_ranges_from(
+ func_ids, staged_ranges, pair_id, manifest_provenance)
+ if not os.path.isfile(staged_ranges) or os.path.getsize(staged_ranges) == 0:
+ print(' COMPILE ERROR: range manifest staging produced no output')
+ return False
+ try:
+ published = publish_shard_pair(
+ staged, staged_ranges, final_out,
+ preserve_existing=preserve_existing_pair,
+ expected_existing_abi=expected_existing_abi,
+ candidate_cap=candidate_cap)
+ if publication_result is not None:
+ publication_result['published'] = published
+ except ShardCandidateCapacityError as exc:
+ if publication_result is not None:
+ publication_result['capacity_error'] = str(exc)
+ print(f' COMPILE SKIP: {exc}')
+ return False
+ except Exception as exc:
+ print(f' COMPILE ERROR: could not publish DLL/ranges pair: {exc}')
+ try:
+ recover_shard_pair(final_out)
+ except Exception as recover_exc:
+ print(f' COMPILE ERROR: shard-pair recovery also failed: '
+ f'{recover_exc}')
+ return False
+ return True
+ finally:
+ # TinyCC emits an export-definition sidecar beside its requested DLL.
+ # It inherits the unique staged basename and must not accumulate in the
+ # content cache after either success or failure.
+ staged_sidecars = [os.path.splitext(staged)[0] + '.def']
+ for temporary in [staged, staged_ranges, *staged_sidecars]:
+ try:
+ os.unlink(temporary)
+ except FileNotFoundError:
+ pass
+
+
+def _shard_pair_paths(dll_path: str) -> tuple[str, str, str, str]:
+ dll_path = os.path.abspath(dll_path)
+ ranges_path = os.path.splitext(dll_path)[0] + '.ranges'
+ return (dll_path, ranges_path,
+ dll_path + '.pair-lock', dll_path + '.pair-txn.json')
+
+
+def _unlink_if_present(path: str) -> None:
+ try:
+ os.unlink(path)
+ except FileNotFoundError:
+ pass
+
+
+def _best_effort_unlink(path: str) -> None:
+ """Remove transaction debris when possible (loaded Windows DLLs may refuse)."""
+ try:
+ os.unlink(path)
+ except OSError:
+ pass
+
+
+def _file_sha256(path: str) -> str | None:
+ try:
+ digest = hashlib.sha256()
+ with open(path, 'rb') as source:
+ for chunk in iter(lambda: source.read(1024 * 1024), b''):
+ digest.update(chunk)
+ return digest.hexdigest()
+ except OSError:
+ return None
+
+
+def _write_json_atomic(path: str, value: dict) -> None:
+ directory = os.path.dirname(path)
+ fd, staged = tempfile.mkstemp(prefix=f'.{os.path.basename(path)}.',
+ suffix='.tmp', dir=directory)
+ try:
+ with os.fdopen(fd, 'w', encoding='utf-8') as out:
+ json.dump(value, out, sort_keys=True)
+ out.flush()
+ os.fsync(out.fileno())
+ os.replace(staged, path)
+ finally:
+ _best_effort_unlink(staged)
+
+
+@contextmanager
+def _exclusive_file_lock(lock_path: str, timeout: float | None = 120.0):
+ """Kernel-owned cross-process lock on one permanent byte-range file.
+
+ The lock file is intentionally permanent. OS byte-range/advisory locks are
+ released by the kernel when a process dies; deleting the file would create
+ an inode/handle split that permits two simultaneous owners.
+ """
+ lock_path = os.path.abspath(lock_path)
+ os.makedirs(os.path.dirname(lock_path), exist_ok=True)
+ lock_file = open(lock_path, 'a+b')
+ if os.path.getsize(lock_path) == 0:
+ lock_file.write(b'\0')
+ lock_file.flush()
+ deadline = (time.monotonic() + timeout if timeout is not None else None)
+ acquired = False
+ try:
+ while not acquired:
+ try:
+ lock_file.seek(0)
+ if os.name == 'nt':
+ import msvcrt
+ msvcrt.locking(lock_file.fileno(), msvcrt.LK_NBLCK, 1)
+ else:
+ import fcntl
+ fcntl.flock(lock_file.fileno(), fcntl.LOCK_EX |
+ fcntl.LOCK_NB)
+ acquired = True
+ except OSError:
+ if deadline is not None and time.monotonic() >= deadline:
+ raise TimeoutError(
+ f'timed out waiting for shard-pair lock {lock_path}')
+ time.sleep(0.025)
+ yield
+ finally:
+ if acquired:
+ lock_file.seek(0)
+ if os.name == 'nt':
+ import msvcrt
+ msvcrt.locking(lock_file.fileno(), msvcrt.LK_UNLCK, 1)
+ else:
+ import fcntl
+ fcntl.flock(lock_file.fileno(), fcntl.LOCK_UN)
+ lock_file.close()
+
+
+@contextmanager
+def _shard_pair_lock(dll_path: str, timeout: float = 120.0):
+ """Cross-process lock for one canonical DLL/ranges filename pair."""
+ _dll, _ranges, lock_path, _journal = _shard_pair_paths(dll_path)
+ with _exclusive_file_lock(lock_path, timeout):
+ yield
+
+
+def _candidate_capacity_namespace(dll_path: str) -> tuple[str, list[str]]:
+ """Return the shared lock and compiler-tier dirs for one cache namespace.
+
+ Normal caches are ``GAME/compiler/arch/cgN_hash_gcCONFIG`` (legacy tests
+ may still use ``cgN_hash``). The runtime candidate table is process-global,
+ so serialize/count every compiler tier with the same GAME/arch/cg leaf.
+ Tests and hand-built paths fall back to their containing directory.
+
+ The KUSEG and KSEG1 shards of a leaf live in its seg-kuseg/ and seg-kseg1/
+ subdirectories (§5.7) and take slots from the same process-global table,
+ so a shard there belongs to its leaf's namespace, and every namespace
+ lists each leaf's segment directories after the leaf.
+ """
+ leaf = os.path.dirname(os.path.abspath(dll_path))
+ if cache_dir_segment(leaf) != KSEG0:
+ leaf = os.path.dirname(leaf)
+ cg_name = os.path.basename(leaf)
+ arch_dir = os.path.dirname(leaf)
+ compiler_dir = os.path.dirname(arch_dir)
+ game_dir = os.path.dirname(compiler_dir)
+ compiler_name = os.path.basename(compiler_dir)
+ if (re.fullmatch(r'cg\d+_[0-9A-Fa-f]{8}(?:_gc[0-9A-Fa-f]{8})?', cg_name) and
+ compiler_name in ('gcc', 'tcc')):
+ arch_name = os.path.basename(arch_dir)
+ tier_dirs = [
+ directory
+ for tier in ('gcc', 'tcc')
+ for directory in _with_segment_dirs(
+ os.path.join(game_dir, tier, arch_name, cg_name))
+ ]
+ return (os.path.join(game_dir, '.overlay-candidate-capacity.lock'),
+ tier_dirs)
+ return (os.path.join(leaf, '.overlay-candidate-capacity.lock'),
+ _with_segment_dirs(leaf))
+
+
+def _with_segment_dirs(leaf: str) -> list[str]:
+ """A cache leaf, then its per-segment subdirectories (§5.7)."""
+ return [leaf] + [os.path.join(leaf, SEGMENT_CACHE_SUBDIRS[seg])
+ for seg in (KUSEG, KSEG1)]
+
+
+def _segment_leaf(directory: str) -> str:
+ """The cache leaf a (possibly per-segment) shard directory belongs to."""
+ directory = os.path.abspath(directory)
+ if cache_dir_segment(directory) != KSEG0:
+ return os.path.dirname(directory)
+ return directory
+
+
+def _segment_basename(path: str) -> tuple[int, str]:
+ """A shard's identity within one compiler tier: its segment and name.
+ The same {phys}_{crc} name is a different shard in each segment."""
+ return (cache_dir_segment(os.path.dirname(os.path.abspath(path))),
+ os.path.normcase(os.path.basename(path)))
+
+
+def cache_candidate_capacity_snapshot(
+ dll_path: str, expected_abi: int | None) -> tuple[int, dict]:
+ """Read one recovered candidate namespace under its publication lock."""
+ capacity_lock, cache_dirs = _candidate_capacity_namespace(dll_path)
+ with _exclusive_file_lock(capacity_lock):
+ recover_candidate_namespace(cache_dirs)
+ return cache_candidate_inventory(cache_dirs, expected_abi)
+
+
+def cache_candidate_capacity_full(dll_path: str, expected_abi: int | None,
+ candidate_cap: int) -> tuple[bool, int]:
+ """Read one serialized namespace inventory and report a saturated cache."""
+ total, counts = cache_candidate_capacity_snapshot(dll_path, expected_abi)
+ return (total >= candidate_cap or
+ getattr(counts, 'raw_total', sum(counts.values())) >=
+ 2 * candidate_cap or
+ getattr(counts, 'range_link_total', 0) >=
+ 2 * candidate_cap * 8 or
+ getattr(counts, 'file_total', len(counts)) >=
+ RUNTIME_CACHE_FILE_CAP), total
+
+
+def candidate_capacity_saturated_in_tier(total: int, counts: dict,
+ candidate_cap: int,
+ cache_dir: str) -> bool:
+ """Whether one active tier has reached any physical/runtime capacity."""
+ active = os.path.normcase(_segment_leaf(cache_dir))
+ saturated = (total >= candidate_cap or
+ getattr(counts, 'raw_total', sum(counts.values())) >=
+ 2 * candidate_cap or
+ getattr(counts, 'range_link_total', 0) >=
+ 2 * candidate_cap * 8 or
+ getattr(counts, 'file_total', len(counts)) >=
+ RUNTIME_CACHE_FILE_CAP)
+ return (saturated and bool(counts) and all(
+ os.path.normcase(_segment_leaf(os.path.dirname(path))) == active
+ for path in counts
+ ))
+
+
+class CandidateInventory(dict):
+ """Per-selected-path counts plus the metadata needed for safe projection.
+
+ Keep the historical ``path -> F count`` mapping API: several fixed-point
+ callers use its keys to decide which compiler tier owns the inventory. The
+ extra fields distinguish the deduplicated process-lifetime candidate cost
+ from physical F-row, range-link, and file costs, none of which may dedup.
+ """
+
+ def __init__(self):
+ super().__init__()
+ self.identities = {}
+ self.raw_counts = {}
+ self.range_link_counts = {}
+ self.raw_total = 0
+ self.range_link_total = 0
+ self.file_total = 0
+
+
+RUNTIME_CACHE_FILE_CAP = 4096
+
+
+def _runtime_manifest_range_link_count(funcs: list) -> int:
+ """Mirror LazyMan's unique 4 KiB RAM-page links for parsed F records."""
+ page_count = PSX_RAM_SIZE // 4096
+ total = 0
+ for _entry, _crc, ranges in funcs:
+ seen_pages = set()
+ for start, length in ranges:
+ lo = start & 0x1FFFFFFF
+ hi = lo + length - 1
+ p0, p1 = lo >> 12, hi >> 12
+ if p0 >= page_count:
+ continue
+ p1 = min(p1, page_count - 1)
+ seen_pages.update(range(p0, p1 + 1))
+ total += len(seen_pages)
+ return total
+
+
+def _normalized_runtime_manifest_identity(manifest: str, pair_id: int | None,
+ funcs: list):
+ """Return a conservative whole-pair identity, or ``None`` if ambiguous.
+
+ Runtime address aliases are normalized, but F and R ordering is retained:
+ range order participates in the guarded CRC calculation. Compiler-owned
+ provenance is part of the identity. Unknown/malformed provenance and
+ legacy manifests without P remain unique rather than being guessed equal.
+ """
+ if pair_id is None:
+ return None
+ provenance = manifest_provenance(manifest)
+ if (manifest_declares_supplemental_provenance(manifest) and
+ provenance is None):
+ return None
+ normalized_funcs = tuple(
+ (entry & 0x1FFFFFFF, crc,
+ tuple((start & 0x1FFFFFFF, length) for start, length in ranges))
+ for entry, crc, ranges in funcs
+ )
+ return pair_id, provenance, normalized_funcs
+
+
+def _candidate_group_identity(cache_dir: str, manifest_identity):
+ if manifest_identity is None:
+ return None
+ return os.path.normcase(os.path.abspath(cache_dir)), manifest_identity
+
+
+_candidate_validation_cache_lock = threading.Lock()
+_candidate_abi_cache = {}
+_candidate_record_cache = {}
+_candidate_rejection_witness_cache = {}
+
+
+def _candidate_file_fingerprint(path: str):
+ """Return the replacement-sensitive identity of one cache artifact.
+
+ Cache publication uses atomic replacement, so a new pair receives a new
+ file identity even when its size and timestamps happen to match. Keep the
+ timestamps as defense for in-place test/repair writes. Callers still scan
+ the namespace and perform the authoritative capacity projection every time;
+ this cache only avoids repeatedly mapping unchanged DLLs and reparsing their
+ unchanged manifests near the candidate ceiling.
+ """
+ try:
+ stat = os.stat(path)
+ except OSError:
+ return None
+ return (stat.st_dev, stat.st_ino, stat.st_size, stat.st_mtime_ns,
+ getattr(stat, 'st_ctime_ns', None))
+
+
+def _candidate_cached_abi_matches(dll: str, expected_abi: int) -> bool:
+ path = os.path.normcase(os.path.abspath(dll))
+ fingerprint = (
+ expected_abi, _dll_abi_matches,
+ _candidate_file_fingerprint(dll),
+ )
+ with _candidate_validation_cache_lock:
+ cached = _candidate_abi_cache.get(path)
+ if cached is not None and cached[0] == fingerprint:
+ return cached[1]
+ matched = _dll_abi_matches(dll, expected_abi)
+ # Do not memoize across an uncooperative in-place writer. Cooperating cache
+ # publishers are already excluded by the namespace lock held by callers.
+ if matched and fingerprint[2] == _candidate_file_fingerprint(dll):
+ with _candidate_validation_cache_lock:
+ _candidate_abi_cache[path] = (fingerprint, matched)
+ return matched
+
+
+def _load_candidate_inventory_record(dll: str,
+ expected_abi: int | None):
+ """Return valid rows, identity, raw F count, and raw range-link count."""
+ ranges_path = os.path.splitext(dll)[0] + '.ranges'
+ path = os.path.normcase(os.path.abspath(dll))
+
+ def fingerprint():
+ return (
+ expected_abi, _dll_runtime_exports_match,
+ _candidate_file_fingerprint(dll),
+ _candidate_file_fingerprint(ranges_path),
+ )
+
+ # A positive cached record is immutable under the cooperating publisher's
+ # atomic-replacement contract. Double-stat it before reuse; a changed or
+ # transaction-hidden artifact falls through to locked recovery below.
+ observed = fingerprint()
+ with _candidate_validation_cache_lock:
+ cached = _candidate_record_cache.get(path)
+ if (cached is not None and cached[0] == observed and
+ observed == fingerprint()):
+ return cached[1]
+ try:
+ with _shard_pair_lock(dll):
+ _recover_shard_pair_locked(dll)
+ if (not os.path.isfile(dll) or os.path.getsize(dll) == 0 or
+ not os.path.isfile(ranges_path) or
+ os.path.getsize(ranges_path) == 0):
+ return [], None, 0, 0
+ observed = fingerprint()
+ with _candidate_validation_cache_lock:
+ cached = _candidate_record_cache.get(path)
+ if cached is not None and cached[0] == observed:
+ return cached[1]
+ with open(ranges_path, encoding='ascii', newline='') as source:
+ manifest = source.read()
+ pair_id, funcs = parse_runtime_shard_manifest(
+ manifest, require_pair=False,
+ expected_segment=cache_dir_segment(os.path.dirname(dll)))
+ raw_count = len(funcs)
+ range_link_count = _runtime_manifest_range_link_count(funcs)
+ if (not funcs or not _dll_runtime_exports_match(
+ dll, expected_abi, pair_id,
+ {entry for entry, _crc, _ranges in funcs})):
+ record = ([], None, raw_count, range_link_count)
+ else:
+ identity = _normalized_runtime_manifest_identity(
+ manifest, pair_id, funcs)
+ record = (
+ funcs,
+ _candidate_group_identity(os.path.dirname(dll), identity),
+ raw_count, range_link_count)
+ stable = observed == fingerprint()
+ # Boolean DLL validation currently conflates deterministic export
+ # mismatch with transient LoadLibrary failure. Cache successes only
+ # so a one-off loader failure cannot suppress a pair indefinitely.
+ if stable and record[0]:
+ with _candidate_validation_cache_lock:
+ _candidate_record_cache[path] = (observed, record)
+ return record
+ except (OSError, UnicodeError):
+ return [], None, 0, 0
+
+
+def cache_candidate_inventory(cache_dirs: list[str],
+ expected_abi: int | None) -> tuple[int, dict]:
+ """Inventory runtime-selected pairs with conservative whole-pair dedup.
+
+ Only a non-legacy P identity with the exact normalized manifest semantics
+ and provenance may share candidate cost, and only inside one compiler-tier
+ leaf. Raw manifest rows, per-F page links, and files remain undeduped.
+ """
+ ext = overlay_ext()
+ canonical = re.compile(
+ rf'^[0-9A-Fa-f]{{8}}_[0-9A-Fa-f]{{8}}{re.escape(ext)}$')
+ counts = CandidateInventory()
+ seen_basenames = set()
+ ordered_dirs = []
+ for path in cache_dirs:
+ absolute = os.path.abspath(path)
+ if absolute not in ordered_dirs:
+ ordered_dirs.append(absolute)
+ for cache_dir in ordered_dirs:
+ try:
+ names = sorted(os.listdir(cache_dir))
+ except OSError:
+ continue
+ for name in names:
+ if not canonical.fullmatch(name):
+ continue
+ dll = os.path.abspath(os.path.join(cache_dir, name))
+ if (expected_abi is not None and
+ not _candidate_cached_abi_matches(dll, expected_abi)):
+ # Runtime's ABI preflight removes this path from the index
+ # before scanning the next compiler tier, so it cannot shadow
+ # a valid lower-tier basename.
+ continue
+ basename = _segment_basename(dll)
+ if basename in seen_basenames:
+ continue
+ # Runtime scans gcc before tcc and suppresses a lower-tier path by
+ # basename even when the selected higher-tier pair later fails ABI
+ # validation. Mirror that exact candidate population here.
+ seen_basenames.add(basename)
+ funcs, identity, raw_count, range_link_count = \
+ _load_candidate_inventory_record(dll, expected_abi)
+ counts[dll] = len(funcs)
+ counts.identities[dll] = identity
+ counts.raw_counts[dll] = raw_count
+ counts.range_link_counts[dll] = range_link_count
+ counts.raw_total = sum(counts.raw_counts.values())
+ counts.range_link_total = sum(counts.range_link_counts.values())
+ counts.file_total = len(counts)
+ seen_identities = set()
+ total = 0
+ for path, count in counts.items():
+ identity = counts.identities[path]
+ if identity is None or identity not in seen_identities:
+ total += count
+ if identity is not None:
+ seen_identities.add(identity)
+ return total, counts
+
+
+def recover_candidate_namespace(cache_dirs: list[str]) -> None:
+ """Recover transaction-hidden canonical pairs before capacity inventory."""
+ ext = overlay_ext()
+ journal_suffix = ext + '.pair-txn.json'
+ canonical = re.compile(
+ rf'^[0-9A-Fa-f]{{8}}_[0-9A-Fa-f]{{8}}{re.escape(ext)}$')
+ for cache_dir in cache_dirs:
+ try:
+ journals = sorted(
+ name for name in os.listdir(cache_dir)
+ if name.endswith(journal_suffix))
+ except OSError:
+ continue
+ for name in journals:
+ dll_name = name[:-len('.pair-txn.json')]
+ if canonical.fullmatch(dll_name):
+ recover_shard_pair(os.path.join(cache_dir, dll_name))
+
+
+def _projected_cache_capacity_usage(total: int, counts: dict,
+ cache_dirs: list[str], final_dll: str,
+ staged_count: int, staged_identity=None,
+ staged_range_links: int = 0
+ ) -> tuple[int, int, int, int]:
+ """Model candidate, lazy-F, range-link, and file usage."""
+ final_dll = os.path.abspath(final_dll)
+ final_dir = os.path.normcase(os.path.dirname(final_dll))
+ ranks = {
+ os.path.normcase(os.path.abspath(path)): index
+ for index, path in enumerate(cache_dirs)
+ }
+ final_rank = ranks.get(final_dir, 0)
+ basename = _segment_basename(final_dll)
+ selected_path = next((
+ path for path in counts
+ if _segment_basename(path) == basename
+ ), None)
+ records = [(path, count,
+ getattr(counts, 'identities', {}).get(path),
+ getattr(counts, 'raw_counts', {}).get(path, count),
+ getattr(counts, 'range_link_counts', {}).get(path, 0))
+ for path, count in counts.items()]
+ if selected_path is not None:
+ selected_rank = ranks.get(
+ os.path.normcase(os.path.dirname(selected_path)), 0)
+ if final_rank > selected_rank:
+ # A lower-tier publication is invisible while a same-basename
+ # higher tier exists.
+ return (total, getattr(counts, 'raw_total', sum(counts.values())),
+ getattr(counts, 'range_link_total', 0),
+ getattr(counts, 'file_total', len(counts)))
+ records = [record for record in records if record[0] != selected_path]
+ group_identity = _candidate_group_identity(final_dir, staged_identity)
+ records.append((final_dll, staged_count, group_identity, staged_count,
+ staged_range_links))
+
+ projected = 0
+ seen_identities = set()
+ for _path, count, identity, _raw_count, _range_links in records:
+ if identity is None or identity not in seen_identities:
+ projected += count
+ if identity is not None:
+ seen_identities.add(identity)
+ return (projected,
+ sum(raw_count for _path, _count, _identity, raw_count, _links
+ in records),
+ sum(links for _path, _count, _identity, _raw, links in records),
+ len(records))
+
+
+def projected_cache_candidate_usage(total: int, counts: dict,
+ cache_dirs: list[str], final_dll: str,
+ staged_count: int,
+ staged_identity=None) -> tuple[int, int, int]:
+ """Compatibility API for candidate, lazy-F, and file usage."""
+ projected, raw, _range_links, files = _projected_cache_capacity_usage(
+ total, counts, cache_dirs, final_dll, staged_count, staged_identity)
+ return projected, raw, files
+
+
+def projected_cache_candidate_count(total: int, counts: dict,
+ cache_dirs: list[str], final_dll: str,
+ staged_count: int,
+ staged_identity=None) -> int:
+ """Compatibility wrapper returning process-lifetime candidate usage."""
+ return projected_cache_candidate_usage(
+ total, counts, cache_dirs, final_dll, staged_count,
+ staged_identity)[0]
+
+
+def _candidate_capacity_projection_error(
+ total: int, counts: dict, projected: int, projected_raw: int,
+ projected_range_links: int, projected_files: int,
+ staged_count: int, candidate_cap: int) -> str | None:
+ """Return the same fail-closed capacity verdict before or after linking."""
+ raw_total = getattr(counts, 'raw_total', sum(counts.values()))
+ range_link_total = getattr(counts, 'range_link_total', 0)
+ file_total = getattr(counts, 'file_total', len(counts))
+ if projected > candidate_cap and projected > total:
+ return ('overlay candidate capacity would be exceeded: '
+ f'{total} existing -> {projected} projected with '
+ f'{staged_count} staged > {candidate_cap}; canonical '
+ 'pair preserved')
+ if projected_raw > 2 * candidate_cap and projected_raw > raw_total:
+ return ('overlay lazy-manifest capacity would be exceeded: '
+ f'{raw_total} existing -> {projected_raw} projected > '
+ f'{2 * candidate_cap}; canonical pair preserved')
+ if (projected_range_links > 2 * candidate_cap * 8 and
+ projected_range_links > range_link_total):
+ return ('overlay lazy range-link capacity would be exceeded: '
+ f'{range_link_total} existing -> '
+ f'{projected_range_links} projected > '
+ f'{2 * candidate_cap * 8}; canonical pair preserved')
+ if (projected_files > RUNTIME_CACHE_FILE_CAP and
+ projected_files > file_total):
+ return ('overlay cache file capacity would be exceeded: '
+ f'{file_total} existing -> {projected_files} projected > '
+ f'{RUNTIME_CACHE_FILE_CAP}; canonical pair preserved')
+ return None
+
+
+def preflight_shard_candidate_capacity(
+ final_dll: str, func_ids: list, pair_id: int,
+ manifest_provenance: str | None, expected_abi: int | None,
+ candidate_cap: int) -> str | None:
+ """Reject an impossible publication before invoking the native linker.
+
+ The locked publication check remains authoritative. This early check is
+ deliberately one-sided: a concurrent deletion after the snapshot can only
+ defer safe coverage until the next invocation, while an admitted shard is
+ still reprojected under the namespace lock after it has been compiled.
+ """
+ final_dll = os.path.abspath(final_dll)
+ capacity_lock, cache_dirs = _candidate_capacity_namespace(final_dll)
+ manifest = overlay_ranges_text(
+ func_ids, pair_id, manifest_provenance)
+ staged_identity = _normalized_runtime_manifest_identity(
+ manifest, pair_id, func_ids)
+ staged_range_links = _runtime_manifest_range_link_count(func_ids)
+ with _exclusive_file_lock(capacity_lock):
+ cache_dirs_key = tuple(
+ os.path.normcase(os.path.abspath(path)) for path in cache_dirs)
+ witness_key = (
+ os.path.normcase(os.path.abspath(capacity_lock)), cache_dirs_key,
+ expected_abi, candidate_cap, _dll_abi_matches,
+ _dll_runtime_exports_match,
+ )
+ with _candidate_validation_cache_lock:
+ witness = _candidate_rejection_witness_cache.get(witness_key)
+ if witness is not None:
+ witness_total, witness_counts = witness
+ witness_usage = _projected_cache_capacity_usage(
+ witness_total, witness_counts, cache_dirs, final_dll,
+ len(func_ids), staged_identity, staged_range_links)
+ witness_error = _candidate_capacity_projection_error(
+ witness_total, witness_counts, *witness_usage,
+ len(func_ids), candidate_cap)
+ if witness_error is not None:
+ # Reuse only a proof of impossibility. Added pairs make the
+ # bound stronger; deletion/replacement can merely defer safe
+ # optional coverage until the next command. An apparent
+ # admission always falls through to a fresh locked inventory.
+ return witness_error
+ recover_candidate_namespace(cache_dirs)
+ total, counts = cache_candidate_inventory(cache_dirs, expected_abi)
+ with _candidate_validation_cache_lock:
+ _candidate_rejection_witness_cache[witness_key] = (total, counts)
+ usage = _projected_cache_capacity_usage(
+ total, counts, cache_dirs, final_dll, len(func_ids),
+ staged_identity, staged_range_links)
+ return _candidate_capacity_projection_error(
+ total, counts, *usage, len(func_ids), candidate_cap)
+
+
+def _cleanup_old_pair_debris(dll_path: str) -> None:
+ for path in glob.glob(os.path.abspath(dll_path) + '.pair-txn.*.old-*'):
+ _best_effort_unlink(path)
+
+
+def _recover_shard_pair_locked(dll_path: str) -> None:
+ dll, ranges, _lock, journal_path = _shard_pair_paths(dll_path)
+ if not os.path.isfile(journal_path):
+ _cleanup_old_pair_debris(dll)
+ return
+ try:
+ with open(journal_path, encoding='utf-8') as source:
+ txn = json.load(source)
+ except (OSError, ValueError) as exc:
+ raise RuntimeError(f'cannot recover shard transaction {journal_path}: {exc}')
+
+ required = ('backup_dll', 'backup_ranges', 'new_dll_sha256',
+ 'new_ranges_sha256', 'old_dll_sha256', 'old_ranges_sha256')
+ if txn.get('schema') != 'psxrecomp shard pair transaction v1' or any(
+ key not in txn for key in required):
+ raise RuntimeError(f'invalid shard transaction journal {journal_path}')
+
+ backup_dll = txn['backup_dll']
+ backup_ranges = txn['backup_ranges']
+ token = txn.get('token', '')
+ if (not re.fullmatch(r'[0-9a-f]{32}', token) or
+ backup_dll != f'{dll}.pair-txn.{token}.old-dll' or
+ backup_ranges != f'{dll}.pair-txn.{token}.old-ranges'):
+ raise RuntimeError(f'invalid shard transaction ownership in {journal_path}')
+ new_complete = (_file_sha256(dll) == txn['new_dll_sha256'] and
+ _file_sha256(ranges) == txn['new_ranges_sha256'])
+ if new_complete:
+ # The DLL rename is the commit point. A crash before a journal phase
+ # update must not roll back a new DLL already paired with its exact
+ # manifest. Remove the journal first; old loaded-DLL backups are merely
+ # deferred debris and may remain locked until process exit on Windows.
+ _unlink_if_present(journal_path)
+ _best_effort_unlink(backup_dll)
+ _best_effort_unlink(backup_ranges)
+ return
+
+ def restore(path: str, backup: str, expected_hash: str | None) -> None:
+ current_hash = _file_sha256(path)
+ if expected_hash is None:
+ if current_hash is not None:
+ _unlink_if_present(path)
+ return
+ if current_hash == expected_hash:
+ return
+ if _file_sha256(backup) != expected_hash:
+ raise RuntimeError(
+ f'cannot recover {path}: neither canonical nor backup is the old file')
+ if current_hash is not None:
+ _unlink_if_present(path)
+ os.replace(backup, path)
+
+ # Restore the manifest first; restoring the DLL is the rollback commit.
+ restore(ranges, backup_ranges, txn['old_ranges_sha256'])
+ restore(dll, backup_dll, txn['old_dll_sha256'])
+ _unlink_if_present(journal_path)
+ _best_effort_unlink(backup_dll)
+ _best_effort_unlink(backup_ranges)
+
+
+def recover_shard_pair(dll_path: str) -> None:
+ """Recover/finish a dead writer's transaction under its OS-owned lock."""
+ with _shard_pair_lock(dll_path):
+ _recover_shard_pair_locked(dll_path)
+
+
+def _runtime_valid_shard_pair_locked(dll: str, ranges: str,
+ expected_abi: int | None) -> bool:
+ """Mirror the pair-aware loader's minimum acceptance checks."""
+ if (not os.path.isfile(dll) or os.path.getsize(dll) == 0 or
+ not os.path.isfile(ranges) or os.path.getsize(ranges) == 0):
+ return False
+ try:
+ with open(ranges, encoding='ascii', newline='') as f:
+ manifest = f.read()
+ pair_id, funcs = parse_runtime_shard_manifest(
+ manifest, require_pair=False,
+ expected_segment=cache_dir_segment(os.path.dirname(dll)))
+ except (OSError, UnicodeError):
+ return False
+ return (bool(funcs) and _dll_runtime_exports_match(
+ dll, expected_abi, pair_id,
+ {entry for entry, _crc, _ranges in funcs}))
+
+
+def publish_shard_pair(staged_dll: str, staged_ranges: str,
+ final_dll: str, preserve_existing: bool = False,
+ expected_existing_abi: int | None = None,
+ candidate_cap: int | None = None) -> bool:
+ """Commit a staged pair, optionally preserving a valid concurrent winner.
+
+ Region DLL names are keyed only by whole-region CRC. Two processes can
+ compile the same bytes with different discovery evidence; the later,
+ poorer writer must not overwrite a richer pair after that richer process
+ has used its own result to suppress fragment repair. First valid publisher
+ wins, while each process's post-pass re-reads the actual winner and emits
+ any exact-demand fragments it still lacks.
+ """
+ dll, ranges, _lock, journal_path = _shard_pair_paths(final_dll)
+ token = uuid.uuid4().hex
+ backup_dll = f'{dll}.pair-txn.{token}.old-dll'
+ backup_ranges = f'{dll}.pair-txn.{token}.old-ranges'
+
+ capacity_lock, cache_dirs = _candidate_capacity_namespace(dll)
+ capacity_guard = (_exclusive_file_lock(capacity_lock)
+ if candidate_cap is not None else nullcontext())
+ with capacity_guard:
+ projected = None
+ staged_count = 0
+ total = 0
+ if candidate_cap is not None:
+ try:
+ with open(staged_ranges, encoding='ascii', newline='') as source:
+ staged_manifest = source.read()
+ staged_pair, staged_funcs = (
+ parse_runtime_shard_manifest(staged_manifest))
+ except (OSError, UnicodeError) as exc:
+ raise RuntimeError(
+ f'cannot read staged range manifest: {exc}') from exc
+ if not staged_funcs:
+ raise RuntimeError(
+ 'staged range manifest has no runtime-valid F records')
+ staged_count = len(staged_funcs)
+ recover_candidate_namespace(cache_dirs)
+ total, counts = cache_candidate_inventory(
+ cache_dirs, expected_existing_abi)
+ staged_identity = _normalized_runtime_manifest_identity(
+ staged_manifest, staged_pair, staged_funcs)
+ staged_range_links = _runtime_manifest_range_link_count(staged_funcs)
+ (projected, projected_raw, projected_range_links,
+ projected_files) = _projected_cache_capacity_usage(
+ total, counts, cache_dirs, dll, staged_count,
+ staged_identity, staged_range_links)
+ with _shard_pair_lock(dll):
+ _recover_shard_pair_locked(dll)
+ if (preserve_existing and _runtime_valid_shard_pair_locked(
+ dll, ranges, expected_existing_abi)):
+ return False
+ if candidate_cap is not None:
+ capacity_error = _candidate_capacity_projection_error(
+ total, counts, projected, projected_raw,
+ projected_range_links, projected_files, staged_count,
+ candidate_cap)
+ if capacity_error is not None:
+ raise ShardCandidateCapacityError(capacity_error)
+ txn = {
+ 'schema': 'psxrecomp shard pair transaction v1',
+ 'token': token,
+ 'backup_dll': backup_dll,
+ 'backup_ranges': backup_ranges,
+ 'old_dll_sha256': _file_sha256(dll),
+ 'old_ranges_sha256': _file_sha256(ranges),
+ 'new_dll_sha256': _file_sha256(staged_dll),
+ 'new_ranges_sha256': _file_sha256(staged_ranges),
+ }
+ if txn['new_dll_sha256'] is None or txn['new_ranges_sha256'] is None:
+ raise RuntimeError('staged DLL/ranges disappeared before publication')
+ _write_json_atomic(journal_path, txn)
+ try:
+ if txn['old_dll_sha256'] is not None:
+ os.replace(dll, backup_dll)
+ if txn['old_ranges_sha256'] is not None:
+ os.replace(ranges, backup_ranges)
+
+ # The new manifest alone is inert. Publishing the DLL is the commit.
+ os.replace(staged_ranges, ranges)
+ os.replace(staged_dll, dll)
+ _recover_shard_pair_locked(dll) # recognizes committed hashes
+ except BaseException:
+ _recover_shard_pair_locked(dll)
+ raise
+ return True
+
+
+def _dll_abi_matches(dll_path: str, expected_abi: int) -> bool:
+ """Read overlay_abi from one loaded image, then release it immediately."""
+ import _ctypes
+ import ctypes
+ library = None
+ try:
+ # Shards are generated as ordinary C (cdecl). ctypes.WinDLL selects
+ # stdcall and can corrupt a 32-bit Windows caller's stack; CDLL is the
+ # correct loader on every supported host (x64 merely masks the error).
+ library = ctypes.CDLL(dll_path)
+ abi_fn = library.overlay_abi
+ abi_fn.argtypes = []
+ abi_fn.restype = ctypes.c_int
+ return (abi_fn() & 0xFFFFFFFF) == (expected_abi & 0xFFFFFFFF)
+ except (OSError, AttributeError):
+ return False
+ finally:
+ if library is not None and library._handle:
+ handle = library._handle
+ library._handle = 0
+ if os.name == 'nt':
+ _ctypes.FreeLibrary(handle)
+ else:
+ _ctypes.dlclose(handle)
+
+
+def _dll_pair_id_matches(dll_path: str, expected_pair_id: int) -> bool:
+ """Read overlay_pair_id from one loaded image, then release it."""
+ import _ctypes
+ import ctypes
+ library = None
+ try:
+ library = ctypes.CDLL(dll_path)
+ pair_fn = library.overlay_pair_id
+ pair_fn.argtypes = []
+ pair_fn.restype = ctypes.c_uint64
+ return pair_fn() == (expected_pair_id & 0xFFFFFFFFFFFFFFFF)
+ except (OSError, AttributeError):
+ return False
+ finally:
+ if library is not None and library._handle:
+ handle = library._handle
+ library._handle = 0
+ if os.name == 'nt':
+ _ctypes.FreeLibrary(handle)
+ else:
+ _ctypes.dlclose(handle)
+
+
+def _dll_runtime_exports_match(dll_path: str, expected_abi: int | None,
+ expected_pair_id: int | None,
+ entries: set[int]) -> bool:
+ """Validate the exports the runtime needs in one library mapping."""
+ import _ctypes
+ import ctypes
+ library = None
+ try:
+ library = ctypes.CDLL(dll_path)
+ abi_fn = library.overlay_abi
+ abi_fn.argtypes = []
+ abi_fn.restype = ctypes.c_int
+ if (expected_abi is not None and
+ (abi_fn() & 0xFFFFFFFF) != (expected_abi & 0xFFFFFFFF)):
+ return False
+ try:
+ pair_fn = library.overlay_pair_id
+ except AttributeError:
+ if expected_pair_id is not None:
+ return False
+ else:
+ if expected_pair_id is None:
+ return False
+ pair_fn.argtypes = []
+ pair_fn.restype = ctypes.c_uint64
+ if pair_fn() != (expected_pair_id & 0xFFFFFFFFFFFFFFFF):
+ return False
+ getattr(library, 'overlay_init')
+ getattr(library, 'overlay_flush_cycles')
+ for entry in entries:
+ # Exports are named by the entry's full VA (§5.1, §5.7).
+ getattr(library, f'func_{entry:08X}')
+ return True
+ except (OSError, AttributeError):
+ return False
+ finally:
+ if library is not None and library._handle:
+ handle = library._handle
+ library._handle = 0
+ if os.name == 'nt':
+ _ctypes.FreeLibrary(handle)
+ else:
+ _ctypes.dlclose(handle)
+
+
+def compiled_shard_complete(dll_path: str,
+ expected_abi: int | None = None) -> bool:
+ """Whether the pair satisfies the runtime's manifest/export contract."""
+ return bool(load_shard_func_ids(dll_path, expected_abi))
+
+
+def shard_pair_files_complete(dll_path: str) -> bool:
+ """Filesystem-only completeness used by crash-transaction tests."""
+ ranges = os.path.splitext(dll_path)[0] + '.ranges'
+ with _shard_pair_lock(dll_path):
+ _recover_shard_pair_locked(dll_path)
+ return (os.path.isfile(dll_path) and
+ os.path.getsize(dll_path) > 0 and
+ os.path.isfile(ranges) and
+ os.path.getsize(ranges) > 0)
+
+
+def cached_shard_manifest_status(dll_path: str, expected_abi: int | None,
+ expected_manifest: str,
+ expected_pair_id: int | None = None) -> str:
+ """Return ``match``, ``mismatch``, or ``missing`` under the pair lock."""
+ ranges = os.path.splitext(dll_path)[0] + '.ranges'
+ with _shard_pair_lock(dll_path):
+ _recover_shard_pair_locked(dll_path)
+ complete = (os.path.isfile(dll_path) and
+ os.path.getsize(dll_path) > 0 and
+ os.path.isfile(ranges) and
+ os.path.getsize(ranges) > 0)
+ if not complete:
+ return 'missing'
+ try:
+ with open(ranges) as f:
+ actual_manifest = f.read()
+ except OSError:
+ return 'missing'
+ if expected_pair_id is not None:
+ if (expected_abi is not None and
+ not _dll_abi_matches(dll_path, expected_abi)):
+ # A stale flavor/ABI is replaceable, not an identity collision.
+ return 'missing'
+ try:
+ entries = {
+ int(parts[1], 16)
+ for parts in (line.split()
+ for line in actual_manifest.splitlines())
+ if len(parts) >= 3 and parts[0] == 'F'
+ }
+ except ValueError:
+ return 'mismatch'
+ if (not entries or not _dll_runtime_exports_match(
+ dll_path, None, expected_pair_id, entries)):
+ return 'mismatch'
+ elif (expected_abi is not None and
+ not _dll_abi_matches(dll_path, expected_abi)):
+ return 'missing'
+ return 'match' if actual_manifest == expected_manifest else 'mismatch'
+
+
+# ---------------------------------------------------------------------------
+# Main
+# ---------------------------------------------------------------------------
+
+# ---------------------------------------------------------------------------
+# Static mode (--static): per-capture worker + split output writer
+# ---------------------------------------------------------------------------
+
+def static_capture_job(cap: dict, args, toml: dict, forced_interiors: set,
+ static_out: str) -> dict:
+ """Recompile ONE capture for static mode. Module-level and self-contained so
+ it can run in a worker process (ProcessPoolExecutor needs a picklable
+ callable and picklable arguments: the capture dict, the argparse Namespace,
+ the parsed game.toml, the forced-interior set).
+
+ Nothing here touches shared state. Everything the sequential path used to
+ write into main()'s accumulators comes back in the result and is merged by
+ the caller in canonical capture order, so the emitted C is byte-identical
+ whether --jobs is 1 or 12. Prints go to result['log'] instead of stdout so
+ parallel workers never interleave.
+
+ result: label, outcome ('ok' | 'skip' | 'fail'), fail=(class, detail),
+ part (the static_parts entry, or None),
+ requested_entries (set of (entry, image_crc)),
+ entry_sources ({(entry, image_crc): (data, load_addr, size,
+ phys_addr, guard_bytes)}), log.
+
+ Requested entries are keyed by (entry, image crc), never by the bare
+ address: the dispatcher validates every variant against the exact bytes
+ it was compiled from, so a demand is only served by a variant built from
+ THIS capture's bytes. Two captures of one band that both observed an
+ address are two demands (see the isolated-fragment pass in main()).
+ """
+ result = {'label': None, 'outcome': None, 'fail': None, 'part': None,
+ 'requested_entries': set(), 'entry_sources': {}, 'log': ''}
+ log = io.StringIO()
+ with contextlib.redirect_stdout(log):
+ try:
+ _static_capture_job(cap, args, toml, forced_interiors, static_out,
+ result)
+ finally:
+ result['log'] = log.getvalue()
+ return result
+
+
+def _static_capture_job(cap, args, toml, forced_interiors, static_out, result):
+ # Runs in a worker process too, so it sets its image segment itself.
+ with image_segment(segment_of(int(cap['load_addr'], 16))):
+ _static_capture_job_in_segment(cap, args, toml, forced_interiors,
+ static_out, result)
+
+
+def _static_capture_job_in_segment(cap, args, toml, forced_interiors,
+ static_out, result):
+ load_addr = int(cap['load_addr'], 16)
+ size = int(cap['size'])
+ data = base64.b64decode(cap['bytes_b64'])
+ crc32 = binascii.crc32(data) & 0xFFFFFFFF
+ phys_addr = (load_addr & 0x1FFFFFFF)
+ _label = f'overlay 0x{load_addr:08X} crc {crc32:08X}'
+ result['label'] = _label
+ # Trailing delay-slot guard words appended by the capture writer.
+ # Declared to the recompiler through the PS-EXE analysis-bound tag so
+ # they stay readable but are never discovered as code.
+ guard_bytes = capture_guard_bytes(cap, size, _label)
+
+ def fail(cls, detail):
+ result['outcome'] = 'fail'
+ result['fail'] = (cls, detail)
+
+ for captured_entry in _parse_addr_list(cap.get('dispatch_entry_pcs', [])):
+ entry = _canonical_guest_addr(captured_entry)
+ key = (entry, crc32)
+ result['requested_entries'].add(key)
+ result['entry_sources'][key] = (
+ data, load_addr, size, phys_addr, guard_bytes)
+ # --force-interior is an explicit operator assertion that a live dispatch
+ # entry was observed even if the retained capture lost its classifier
+ # provenance. Bind the requested PC to this capture's exact bytes; the
+ # post-pass builds a content-validated isolated shard for it.
+ region_hi = phys_addr + size
+ for forced_entry in forced_interiors:
+ forced_phys = forced_entry & 0x1FFFFFFF
+ if (phys_addr <= forced_phys < region_hi and
+ segment_of(forced_entry) == segment_of(load_addr)):
+ entry = forced_entry
+ key = (entry, crc32)
+ result['requested_entries'].add(key)
+ result['entry_sources'][key] = (
+ data, load_addr, size, phys_addr, guard_bytes)
+
+ seeds, seed_audit = classify_overlay_seeds(cap, data, load_addr, size,
+ crc32, toml)
+ print(f'Overlay load=0x{load_addr:08X} size={size} crc32=0x{crc32:08X}'
+ + (f' guard={guard_bytes}B (delay-slot only, not analysed)'
+ if guard_bytes else ''))
+ print(f' seeds: {len(seeds)} mode: static -> {static_out}')
+ print_seed_audit(seed_audit)
+
+ root_seeds = [
+ seed for seed in seeds
+ if ((seed.split()[0] in ('call_root', 'dispatch_root')) or
+ seed.split()[0].startswith('0x'))
+ ]
+ if not root_seeds:
+ print(f' {NO_SHARED_WALK_ROOT_SEEDS_SKIP}\n')
+ result['outcome'] = 'skip'
+ return
+
+ with tempfile.TemporaryDirectory() as tmp:
+ # Fake PS-EXE: the header entry PC becomes a walk root in the
+ # recompiler, so it must be a walk-root seed, never an interior one.
+ entry_pc = int(root_seeds[0].split()[-1], 16)
+ psx_path = os.path.join(tmp, f'overlay_{load_addr:08X}.psx')
+ with open(psx_path, 'wb') as f:
+ f.write(make_psxexe(load_addr, entry_pc, data,
+ guard_bytes=guard_bytes))
+ seeds_path = os.path.join(tmp, 'seeds.txt')
+ with open(seeds_path, 'w') as f:
+ for seed in seeds:
+ f.write(seed + '\n')
+ out_dir_tmp = os.path.join(tmp, 'out')
+ os.makedirs(out_dir_tmp)
+
+ # Evidence-scoped discovery (the overlay-compilation contract): compile
+ # only the proven entry seeds and what they reach, never a whole-byte
+ # sweep. Same invocation as the DLL path.
+ cmd = [args.recompiler, psx_path,
+ '--seeds', seeds_path,
+ '--out-dir', out_dir_tmp,
+ '--overlay',
+ '--ws-config', os.path.abspath(args.game_toml)]
+ cmd += recompiler_project_root_args(args)
+ print(f' recompile: {args.recompiler} ...{" [CPS]" if args.cps else ""}')
+ toml_dir = os.path.dirname(os.path.abspath(args.game_toml))
+ sub_env = dict(os.environ)
+ if args.cps:
+ sub_env['PSX_CPS'] = '1' # §25: emit continuation-passing overlay C
+ r = subprocess.run(cmd, capture_output=True, text=True,
+ cwd=toml_dir, env=sub_env)
+ if r.returncode != 0:
+ print(f' RECOMPILER ERROR:\n{r.stderr or r.stdout}')
+ fail('recompiler', r.stderr or r.stdout)
+ return
+
+ stem = os.path.basename(psx_path)
+ full_c = os.path.join(out_dir_tmp, stem + '_full.c')
+ if not os.path.exists(full_c):
+ candidates = [f for f in os.listdir(out_dir_tmp) if f.endswith('_full.c')]
+ if not candidates:
+ print(f' ERROR: no _full.c in {out_dir_tmp}')
+ fail('no_output', 'no _full.c emitted')
+ return
+ full_c = os.path.join(out_dir_tmp, candidates[0])
+ with open(full_c) as f:
+ src = f.read()
+ ranges_src = None
+ for fn in os.listdir(out_dir_tmp):
+ if fn.endswith('_full.ranges'):
+ ranges_src = os.path.join(out_dir_tmp, fn)
+ break
+
+ src, func_addrs = patch_generated_c_static(src, load_addr, size)
+ continuation_owners = parse_cps_continuation_owners(src)
+ c_audit = audit_generated_c(src, load_addr, size, crc32, toml)
+ print_generated_c_audit(load_addr, size, crc32, c_audit)
+ if c_audit['unknown_bad'] or c_audit['unsupported_todo_addrs']:
+ print(' GENERATED-C AUDIT FAILED\n')
+ fail('audit', f'{len(c_audit["unknown_bad"])} unknown_bad, '
+ f'{len(c_audit["unsupported_todo_addrs"])} unsupported')
+ return
+ if not ranges_src:
+ print(' STATIC RANGE AUDIT FAILED: no _full.ranges manifest\n')
+ fail('no_ranges', 'no _full.ranges manifest')
+ return
+
+ func_ids = parse_overlay_func_ids(ranges_src, data, load_addr, size)
+ ids_by_addr = {}
+ for ev, code_crc, ranges in func_ids:
+ ids_by_addr.setdefault(ev, []).append((code_crc, ranges))
+ missing = sorted(set(func_addrs) - set(ids_by_addr))
+ if missing:
+ sample = ', '.join(f'0x{a:08X}' for a in missing[:8])
+ print(f' STATIC RANGE AUDIT FAILED: {len(missing)} '
+ f'dispatchable function(s) lack exact ranges: {sample}\n')
+ fail('static_ranges', f'{len(missing)} funcs lack exact ranges')
+ return
+
+ # Whole-image identity plus compiled-entry coverage makes the namespace
+ # deterministic while allowing a later, richer seed capture of
+ # identical bytes to coexist without symbol clashes.
+ cov_blob = ','.join(f'{a:08X}' for a in sorted(func_addrs)).encode()
+ cov_crc = binascii.crc32(cov_blob) & 0xFFFFFFFF
+ # A KUSEG or KSEG1 image of the same bytes links beside the KSEG0 one
+ # (§5.7): ov_s0_… and ov_s5_…; KSEG0 keeps its name.
+ seg_tag = ('' if segment_of(load_addr) == KSEG0
+ else f's{segment_of(load_addr) >> 29}_')
+ namespace = f'ov_{seg_tag}{phys_addr:08X}_{crc32:08X}_{cov_crc:08X}'
+ src, symbols = namespace_generated_static(src, namespace, func_addrs)
+ variants = []
+ for ev in sorted(func_addrs):
+ for code_crc, ranges in ids_by_addr[ev]:
+ variants.append({
+ 'addr': ev,
+ 'symbol': symbols[ev],
+ 'crc': code_crc,
+ 'ranges': ranges,
+ })
+ result['part'] = {
+ 'src': src,
+ 'variants': variants,
+ 'namespace': namespace,
+ 'image_crc': crc32,
+ 'func_addrs': set(func_addrs),
+ 'symbols': symbols,
+ 'ids_by_addr': ids_by_addr,
+ 'continuation_owners': continuation_owners,
+ }
+ print(f' recompiled: {len(func_addrs)} functions, '
+ f'{len(variants)} exact identities\n')
+ result['outcome'] = 'ok'
+
+
+STATIC_HEADER = ('/* Auto-generated overlay dispatch -- do not edit.\n'
+ ' * Rebuild: python3 psxrecomp/tools/compile_overlays.py --static ...\n'
+ ' */\n')
+_STATIC_PART_RE = re.compile(r'_(\d{4})\.c$')
+
+
+def static_part_paths(static_out: str) -> list:
+ """Existing split-output part files next to static_out, sorted."""
+ d = os.path.dirname(static_out) or '.'
+ stem = os.path.splitext(os.path.basename(static_out))[0]
+ if not os.path.isdir(d):
+ return []
+ out = []
+ for fn in os.listdir(d):
+ if fn.startswith(stem + '_') and _STATIC_PART_RE.search(fn):
+ out.append(os.path.join(d, fn))
+ return sorted(out)
+
+
+def _write_if_changed(path: str, text: str) -> bool:
+ """Write only when the content differs, so an unchanged translation unit
+ keeps its mtime and the build system does not recompile it."""
+ try:
+ with open(path, encoding='utf-8') as f:
+ if f.read() == text:
+ return False
+ except (OSError, UnicodeDecodeError):
+ pass
+ with open(path, 'w', encoding='utf-8', newline='\n') as f:
+ f.write(text)
+ return True
+
+
+def write_static_outputs(static_out: str, parts: list, variants: list,
+ dispatch_src: str, single_file: bool = False) -> list:
+ """Emit the static overlay C.
+
+ Default (split): `static_out` holds the content-validated dispatcher plus
+ an extern prototype for every compiled entry, and each part becomes its own
+ translation unit `_NNNN.c` beside it. Every part already carries its
+ own #includes and a private symbol namespace, so it compiles standalone.
+ The build then parallelizes across parts, and because unchanged parts are
+ not rewritten, only overlays whose code changed recompile. Stale parts from
+ a previous, larger run are deleted so a glob never links a leftover.
+
+ single_file: the pre-split behaviour, everything in `static_out`.
+
+ Returns the list of files that make up the output (written or unchanged).
+ """
+ stale = static_part_paths(static_out)
+ if single_file:
+ combined = STATIC_HEADER
+ for part in parts:
+ combined += part['src']
+ combined += dispatch_src
+ _write_if_changed(static_out, combined)
+ for p in stale:
+ os.remove(p)
+ return [static_out]
+
+ d = os.path.dirname(static_out) or '.'
+ stem = os.path.splitext(os.path.basename(static_out))[0]
+ # One unit per region part, plus one unit per IMAGE for its isolated
+ # fragments. Fragments are per (entry, image) and a band with many
+ # occupants carries thousands of them (BoF3: 20k), so a unit per fragment
+ # would mean 20k files for the glob and 20k compiler launches. Fragment
+ # parts are privately namespaced, so concatenating an image's fragments
+ # is safe; keeping them apart from the region unit means a new fragment
+ # rewrites only its image's fragment unit, never the region.
+ units = [] # (label, [parts])
+ frag_units = {}
+ for part in parts:
+ if part['namespace'].startswith('ov_frag_'):
+ key = part['namespace'].rsplit('_', 1)[0] # ov_frag__
+ if key not in frag_units:
+ frag_units[key] = [key + '_fragments', []]
+ units.append(frag_units[key])
+ frag_units[key][1].append(part)
+ else:
+ units.append([part['namespace'], [part]])
+ written = []
+ for index, (label, unit_parts) in enumerate(units):
+ path = os.path.join(d, f'{stem}_{index:04d}.c')
+ # No part COUNT in the header: adding or dropping an overlay must leave
+ # every unchanged unit byte-identical (and therefore not rebuilt).
+ text = (STATIC_HEADER +
+ f'/* Static overlay translation unit {index}: {label} */\n' +
+ ''.join(part['src'] for part in unit_parts))
+ _write_if_changed(path, text)
+ written.append(path)
+ keep = set(written)
+ for p in stale:
+ if p not in keep:
+ os.remove(p)
+
+ symbols = sorted({variant['symbol'] for variant in variants})
+ main = STATIC_HEADER
+ main += '#include "psx_runtime.h"\n\n'
+ main += (f'/* Dispatcher for {len(written)} overlay translation unit(s) '
+ f'({stem}_0000.c ...). Every compiled entry has external linkage '
+ f'in its own unit; declare them here. */\n')
+ main += ''.join(f'void {sym}(CPUState *cpu);\n' for sym in symbols)
+ main += dispatch_src
+ _write_if_changed(static_out, main)
+ return [static_out] + written
+
+
+
+def main():
+ ap = argparse.ArgumentParser(description=__doc__,
+ formatter_class=argparse.RawDescriptionHelpFormatter)
+ ap.add_argument('--captures', default=None,
+ help='overlay_captures.json from the runtime. Optional: the '
+ 'runtime injects PSX_OVERLAY_CAPTURES (the canonical '
+ '/overlay_captures.json), which wins. Required only '
+ 'for manual/offline invocation.')
+ ap.add_argument('--game-toml', required=True,
+ help='game.toml (for game_id)')
+ ap.add_argument('--recompiler', required=True,
+ help='path to psxrecomp-game.exe')
+ ap.add_argument('--runtime-include', required=True,
+ help='path to psxrecomp runtime/include dir')
+ ap.add_argument('--project-root', default=None,
+ help='root the recompiler resolves the BIOS profile against '
+ '(bios/SCPH1001.toml, or /bios/SCPH1001.toml '
+ 'one level down). Defaults to the framework root derived '
+ 'from --runtime-include. Only needed when that '
+ 'derivation is wrong, because we spawn the recompiler '
+ 'with cwd = dirname(game.toml) and a PACKAGED game.toml '
+ 'lives in a directory with no BIOS profile under it.')
+ ap.add_argument('--out-dir', default='build-dev/cache',
+ help='cache root dir (default: build-dev/cache)')
+ ap.add_argument('--gcc', default='gcc',
+ help='GCC binary (default: gcc)')
+ ap.add_argument('--compiler', choices=['gcc', 'tcc'], default='gcc',
+ help='overlay shard compiler: gcc (default; dev/production, '
+ 'best-optimized) or tcc (bundled, toolchain-free user '
+ 'fallback). tcc shards land in the tcc/ cache namespace.')
+ ap.add_argument('--tcc', default='tcc',
+ help='TinyCC binary (used when --compiler tcc)')
+ ap.add_argument('--force', action='store_true',
+ help='recompile even if output already exists')
+ ap.add_argument('--only-region', action='append', default=[],
+ help='compile only captures whose normalized load address '
+ 'matches this value (repeatable; manual validation aid)')
+ ap.add_argument('--check', action='store_true',
+ help='PREFLIGHT: build every shard into a throwaway temp dir '
+ '(implies --force, ignores any injected cache dir, never '
+ 'touches the real cache) and report pass/fail. Answers '
+ '"would this game\'s shards compile against the CURRENT '
+ 'recompiler + runtime headers?" — exits non-zero if any '
+ 'shard that should build fails. Use after a header/ABI '
+ 'or emitter change to catch silent shard breakage.')
+ ap.add_argument('--force-interior', action='append', default=[],
+ help='also compile this virtual/physical PC as an isolated '
+ 'interior fragment (repeatable; diagnostic recovery for '
+ 'an observed dispatch PC whose classifier provenance was '
+ 'lost after a later capture)')
+ ap.add_argument('--static-single-file', action='store_true',
+ help='with --static: emit one monolithic overlays_static.c '
+ '(pre-split behaviour) instead of the dispatcher plus '
+ 'one translation unit per overlay.')
+ ap.add_argument('--static', action='store_true',
+ help='B-2 mode: compile into binary (overlays_static.c) instead of DLL')
+ ap.add_argument('--flavor', type=int, default=0,
+ help='codegen flavor id baked into overlay_abi() (0=base/master; '
+ 'widescreen build passes 1). The loader rejects DLLs whose '
+ 'flavor != the runtime flavor, keeping caches separate.')
+ ap.add_argument('--cps', action='store_true',
+ help='continuation-passing (RECURSION_BUG.md §25): set PSX_CPS '
+ 'when invoking the recompiler so overlay funcs tail-transfer '
+ '+ carry an entry-switch. Must match the runtime build.')
+ ap.add_argument('--jobs', type=int,
+ default=max(1, (os.cpu_count() or 4) - 2),
+ help='parallel region-group workers (default: cores-2). '
+ 'Captures are grouped by region start; regions are '
+ 'independent (dedup coverage, prior-ranges merge, '
+ 'fragments, and filenames all key on the region), '
+ 'captures within one region stay ordered. 1 = the '
+ 'sequential path. In --static mode each capture is an '
+ 'independent recompile+audit, run in a process pool '
+ 'and merged in capture order (byte-identical output '
+ 'to the sequential path).')
+ ap.add_argument('--target-os', choices=['auto', 'win', 'linux', 'macos'], default='auto',
+ help='target operating system for compiled overlay shards (default: auto)')
+ args = ap.parse_args()
+ target_os = args.target_os
+ if target_os == 'auto':
+ if 'mingw' in args.gcc.lower() or 'w64' in args.gcc.lower() or args.gcc.lower().endswith('.exe'):
+ target_os = 'win'
+ else:
+ target_os = None
+ set_target_os(target_os)
+ # Canonicalized to KSEG0 as before (a physical and a KUSEG PC are the
+ # same number); a forced interior therefore forces KSEG0 views.
+ forced_interiors = {
+ (int(v, 0) & 0x1FFFFFFF) | KSEG0
+ for v in args.force_interior
+ }
+
+ # ---- Framework-injected cache location wins over CLI flags ----------------
+ # The runtime (autocompile.c) exports PSX_OVERLAY_CACHE_DIR / PSX_OVERLAY_CAPTURES
+ # set to the loader's CANONICAL /cache and /overlay_captures.json. We
+ # honor those above --out-dir/--captures so the WRITE cache and READ captures
+ # are always exactly where the loader reads — no per-game config, no drift
+ # between dev and prod (the read/write-location divergence bug). The CLI flags
+ # remain the fallback for manual/offline invocation (no env set).
+ # --check is a preflight: it must NEVER write the real cache, so it ignores
+ # the injected cache dir and builds into a throwaway temp dir with --force.
+ _check_tmp = None
+ if args.check:
+ args.force = True
+ _check_tmp = tempfile.mkdtemp(prefix='shardcheck_')
+ args.out_dir = _check_tmp
+ print(f'[check] preflight build into throwaway dir: {_check_tmp}')
+ _env_out = None if args.check else os.environ.get('PSX_OVERLAY_CACHE_DIR')
+ if _env_out:
+ if _env_out != args.out_dir:
+ print(f'[cache] PSX_OVERLAY_CACHE_DIR overrides --out-dir: {_env_out}')
+ args.out_dir = _env_out
+ _env_cap = os.environ.get('PSX_OVERLAY_CAPTURES')
+ if _env_cap:
+ if _env_cap != args.captures:
+ print(f'[cache] PSX_OVERLAY_CAPTURES overrides --captures: {_env_cap}')
+ args.captures = _env_cap
+ # Flavor is pinned by the spawning runtime the same way as the cache
+ # locations: --flavor defaults to 0 (play), so an instrumented (flavor 2)
+ # runtime used to spawn compiles whose shards its loader then rejected —
+ # every overlay ran interpreted on debug builds, silently.
+ _env_flavor = os.environ.get('PSX_OVERLAY_FLAVOR')
+ if _env_flavor:
+ try:
+ _fl = int(_env_flavor, 0)
+ except ValueError:
+ _fl = None
+ if _fl is not None and _fl != args.flavor:
+ print(f'[cache] PSX_OVERLAY_FLAVOR overrides --flavor: {_fl}')
+ args.flavor = _fl
+ if not args.captures:
+ ap.error('no captures file: set PSX_OVERLAY_CAPTURES (runtime injects it) '
+ 'or pass --captures for manual/offline use')
+
+ # Resolve the recompiler exe and runtime-include to absolute paths up front.
+ # game.toml's overlay_autocompile_cmd uses paths RELATIVE to the project root
+ # (the runtime spawns this script via cmd.exe with cwd = project root) so the
+ # shipped config is portable across machines — never bake absolute paths into
+ # game.toml. But two Windows quirks break relative paths once we hand them off:
+ # 1. subprocess/CreateProcess does NOT resolve a relative *executable*
+ # against the child cwd (the recompiler spawn below, cwd=toml_dir), so a
+ # relative --recompiler fails with WinError 2 and the cache never warms.
+ # 2. gcc launched from cmd.exe rejects relative forward-slash -I/-c/-o paths
+ # (already handled inside compile_dll via os.path.abspath).
+ # Anchoring both here (against this process's cwd = project root, where the
+ # relative paths are meant to resolve) makes relative config work everywhere.
+ args.recompiler = os.path.abspath(args.recompiler)
+ args.runtime_include = os.path.abspath(args.runtime_include)
+
+ # Load the shard link-contract preamble from runtime/include up front (hard
+ # error if absent). Threads/fragments read the module global thereafter.
+ load_dispatch_preamble(args.runtime_include)
+
+ # Read game ID from game.toml (strip BOM if present)
+ with open(args.game_toml, 'rb') as f:
+ raw = f.read().lstrip(b'\xef\xbb\xbf') # UTF-8 BOM
+ toml = tomllib.loads(raw.decode('utf-8'))
+ game_id = toml.get('game', {}).get('id', 'UNKNOWN')
+ print(f'Game ID: {game_id}')
+
+ # Stale-recompiler-binary guard — BOTH modes (static overlays are just as
+ # wrong when emitted by a stale binary; they simply have no tag to hide in).
+ verify_recompiler_matches_tag(args.recompiler, codegen_hash(args.runtime_include))
+
+ if args.static:
+ static_out = os.path.join(args.out_dir, 'overlays_static.c')
+ if os.path.exists(static_out) and not args.force:
+ print(f'SKIP: {static_out} already exists (use --force to recompile)')
+ return
+ os.makedirs(args.out_dir, exist_ok=True)
+ else:
+ # Namespaced + versioned gcc cache:
+ # /gcc//cg__gc/
+ # (SLJIT.md §4 — no comingling; cg = codegen version so a new emitter
+ # build never reuses a stale DLL, old versions coexist). MUST match
+ # overlay_loader.c scan_cache_dir(). Pre-1.0: no legacy fallback.
+ cg = codegen_ver(args.runtime_include)
+ ch = codegen_hash(args.runtime_include)
+ gh = overlay_config_hash(args.recompiler, args.game_toml)
+ cache_dir = os.path.join(args.out_dir, game_id, args.compiler, cache_arch_abi(),
+ cache_tag(args.runtime_include, args.recompiler,
+ args.game_toml, args.flavor))
+ os.makedirs(cache_dir, exist_ok=True)
+ print(f'Cache dir: {cache_dir} '
+ f'(codegen ver {cg}, emitter {ch:08x}, config {gh:08x})')
+
+ with open(args.captures) as f:
+ captures = json.load(f)
+
+ if args.only_region:
+ only_regions = {int(value, 0) & 0x1FFFFFFF
+ for value in args.only_region}
+ captures = [cap for cap in captures
+ if (int(cap['load_addr'], 16) & 0x1FFFFFFF) in only_regions]
+ if not captures:
+ ap.error('--only-region did not match any capture')
+
+ # One view per (capture, segment with entries), §5.7. A capture whose
+ # segment record is malformed is reported and not compiled.
+ segment_view_errors = []
+ views = []
+ for cap in captures:
+ try:
+ views.extend(capture_segment_views(
+ cap, declared_view_segments(cap, toml, forced_interiors)))
+ except (KeyError, TypeError, ValueError, RuntimeError) as exc:
+ segment_view_errors.append(
+ (f'overlay {cap.get("load_addr", "?")}', str(exc)))
+ if len(views) != len(captures) or segment_view_errors:
+ by_seg = Counter(SEGMENT_NAMES[segment_of(int(v['load_addr'], 16))]
+ for v in views)
+ print(f'Segment views: {len(captures)} capture(s) -> {len(views)} '
+ 'view(s) (' + ', '.join(f'{n} {name}' for name, n in
+ sorted(by_seg.items())) + ')')
+ captures = views
+
+ print(f'Captures: {len(captures)} overlay(s) to process\n')
+
+ # B-2 static mode: accumulate privately-namespaced generated C plus exact
+ # per-function identities for the content-validated dispatcher.
+ static_parts = []
+ static_requested_entries = set()
+ static_entry_sources = {}
+
+ # overlay-cache v2: per-region_start function-identity coverage, so a capture
+ # that adds no NEW (entry, code_crc) skips the gcc compile (volatile-data
+ # redundant-build elimination). Lazily loaded from existing .ranges, kept warm
+ # in-memory and updated as we build, so repeats within one run also dedup.
+ region_coverage_cache = {} # phys_addr -> set((ev, code_crc))
+ cov_lock = threading.Lock() # guards region_coverage_cache + its sets
+ # Per-region info for the post-loop interior-entry fragment pass (decoupled
+ # from region-compile success): (phys, load_addr, size, data, interior_pcs,
+ # executed_pcs). Collected right after classification so it survives a region
+ # whose own compile is skipped or audit-fails.
+ interior_frag_jobs = []
+ pending_empty_primary = []
+
+ def _merge_static_result(res):
+ """Fold one static_capture_job result into the shared accumulators.
+ Called in canonical capture order for both the sequential and the
+ --jobs path, so static_parts / entry sources are order-identical."""
+ if res['log']:
+ print(res['log'], end='')
+ static_requested_entries.update(res['requested_entries'])
+ static_entry_sources.update(res['entry_sources'])
+ if res['outcome'] == 'ok':
+ static_parts.append(res['part'])
+ stats.add_ok()
+ elif res['outcome'] == 'skip':
+ stats.add_skip()
+ else:
+ cls, detail = res['fail']
+ stats.add_fail(res['label'], cls, detail)
+
+ # Per-capture body, extracted so the region-parallel driver below can call
+ # it. All shared state is either read-only closure (args/toml/cache_dir)
+ # or passed per-region (region_coverage_cache / interior_frag_jobs), so a
+ # worker owning a region owns every mutable it touches.
+ def _do_capture(cap, region_coverage_cache, interior_frag_jobs, stats):
+ # A capture view compiles in its own segment (§5.7): helpers that name
+ # PCs spell them in it, and its shard lives in that segment's cache
+ # directory.
+ with image_segment(segment_of(int(cap['load_addr'], 16))):
+ _do_capture_in_segment(cap, region_coverage_cache,
+ interior_frag_jobs, stats)
+
+ def _do_capture_in_segment(cap, region_coverage_cache, interior_frag_jobs,
+ stats):
+ load_addr = int(cap['load_addr'], 16)
+ size = int(cap['size'])
+ data = base64.b64decode(cap['bytes_b64'])
+ crc32 = binascii.crc32(data) & 0xFFFFFFFF
+ phys_addr = (load_addr & 0x1FFFFFFF)
+ _label = f'overlay 0x{load_addr:08X} crc {crc32:08X}'
+ # Trailing delay-slot guard words appended by the capture writer.
+ # Declared to the recompiler through the PS-EXE analysis-bound tag so
+ # they stay readable but are never discovered as code.
+ guard_bytes = capture_guard_bytes(cap, size, _label)
+ if args.static:
+ # Static mode is one self-contained job per capture (see
+ # static_capture_job); the sequential and --jobs paths share it.
+ _merge_static_result(static_capture_job(
+ cap, args, toml, forced_interiors, static_out))
+ return
+ seg_cache_dir = segment_cache_dir(cache_dir, segment_of(load_addr))
+ # Coverage is per segment: each segment's shards are their own.
+ coverage_key = (segment_of(load_addr), phys_addr)
+
+ # Reclassify prior F entry addresses from an identical image. Callable
+ # entries may become current roots; other entries re-enter as dispatch
+ # candidates and require a current exact host. Never reuse prior R host
+ # ranges: later roots can repartition the same bytes incompatibly.
+ if not args.static:
+ ranges_name = f'{phys_addr:08X}_{crc32:08X}.ranges'
+ prior_ranges_path = os.path.join(seg_cache_dir, ranges_name)
+ if os.path.exists(prior_ranges_path):
+ prior_entries = []
+ with open(prior_ranges_path) as pf:
+ for ln in pf:
+ parts = ln.split()
+ if parts and parts[0] == 'F':
+ try:
+ prior_entries.append(int(parts[1], 16))
+ except (IndexError, ValueError):
+ pass
+ if prior_entries:
+ fe = _parse_addr_list(cap.get('function_entry_pcs', []))
+ de = _parse_addr_list(cap.get('dispatch_entry_pcs', []))
+ for a in prior_entries:
+ if _callable_legacy_seed(data, load_addr, a):
+ fe.add(a)
+ else:
+ de.add(a)
+ cap['function_entry_pcs'] = sorted(fe)
+ cap['dispatch_entry_pcs'] = sorted(de)
+ cap.setdefault('schema', 'merged')
+ print(f' merged {len(prior_entries)} prior-manifest entries '
+ f'from {prior_ranges_path}')
+
+ seeds, seed_audit = classify_overlay_seeds(cap, data, load_addr, size,
+ crc32, toml)
+ this_ids = None # region func-ids once recompiled (None if skipped early)
+
+ # Record this region's executed dispatch-proven PCs for the decoupled
+ # fragment pass (runs after the loop, regardless of this region's
+ # compile outcome). Interiors AND callable dispatch roots both go in:
+ # a callable root can be starved by the DLL-already-exists skip when
+ # an OLDER capture of the same image bytes built this region's DLL
+ # before the PC became dispatch-proven (same filename, stale entry
+ # set — the 0x80024548 class), and the fragment pass is the demand-
+ # driven recovery path for exactly that.
+ if not args.static:
+ # A manual exact demand must not depend on the capture still
+ # retaining executed_pcs or on today's classifier assigning the PC
+ # DISPATCH_INTERIOR. That provenance is precisely what
+ # --force-interior restores. Keep it isolated from the shared
+ # region seed set and queue the fragment directly.
+ fragment_job = make_interior_fragment_job(
+ phys_addr, load_addr, size, data, seed_audit,
+ forced_interiors, cap)
+ if fragment_job is not None:
+ interior_frag_jobs.append(fragment_job)
+
+ if not args.static:
+ dll_path = os.path.join(seg_cache_dir,
+ f'{phys_addr:08X}_{crc32:08X}{overlay_ext()}')
+
+ print(f'Overlay load=0x{load_addr:08X} size={size} crc32=0x{crc32:08X}'
+ + (f' guard={guard_bytes}B (delay-slot only, not analysed)'
+ if guard_bytes else ''))
+ print(f' seeds: {len(seeds)} dll: {dll_path}')
+ print_seed_audit(seed_audit)
+
+ demanded_root_entries = walk_root_seed_entries(seeds)
+ root_seeds = [
+ seed for seed in seeds
+ if ((seed.split()[0] in ('call_root', 'dispatch_root')) or
+ seed.split()[0].startswith('0x'))
+ ]
+ if not root_seeds:
+ print(f' {NO_SHARED_WALK_ROOT_SEEDS_SKIP}\n')
+ stats.add_skip()
+ return
+
+ # Cheap evidence-aware cache gate. A valid existing pair is not enough:
+ # a later capture can add roots for identical bytes. Skip reanalysis only
+ # when runtime-callable identities matching THIS byte variant already
+ # serve every current walk-root demand. The fragment job was queued
+ # above and still repairs any exact interior/static demand independently.
+ if not args.static and not args.force:
+ expected_abi = overlay_abi_tag(
+ args.runtime_include, args.flavor)
+ if cap.get('producer') == BIOS_RESIDENT_PRODUCER:
+ # A resident fast-path needs one canonical preloadable bundle;
+ # aggregate fragment coverage is insufficient because the
+ # sidecar names exactly one DLL stem.
+ current_entries, _current_ranges = (
+ current_variant_func_id_coverage(
+ load_shard_func_ids(dll_path, expected_abi),
+ data, load_addr, size))
+ else:
+ current_entries, _current_ranges = (
+ load_region_current_variant_coverage(
+ seg_cache_dir, phys_addr, data, load_addr, size,
+ expected_abi))
+ if demanded_root_entries <= {
+ _canonical_guest_addr(entry)
+ for entry in current_entries}:
+ reconcile_bios_resident_marker(dll_path, cap, False)
+ print(f' SKIP: runtime-valid current-byte cache serves all '
+ f'{len(demanded_root_entries)} walk-root demand(s)\n')
+ stats.add_skip()
+ return
+
+ with tempfile.TemporaryDirectory() as tmp:
+ # Write fake PS-EXE. The header entry PC becomes a walk root in the
+ # recompiler, so it must be a walk-root seed — never an 'interior'
+ # one. Root seed lines are either '0x...' or 'dispatch_root 0x...'.
+ entry_pc = int(root_seeds[0].split()[-1], 16)
+ psx_path = os.path.join(tmp, f'overlay_{load_addr:08X}.psx')
+ with open(psx_path, 'wb') as f:
+ f.write(make_psxexe(load_addr, entry_pc, data,
+ guard_bytes=guard_bytes))
+
+ # Write seeds file
+ seeds_path = os.path.join(tmp, 'seeds.txt')
+ with open(seeds_path, 'w') as f:
+ for s in seeds:
+ f.write(s + '\n')
+
+ out_dir_tmp = os.path.join(tmp, 'out')
+ os.makedirs(out_dir_tmp)
+
+ # Run psxrecomp-game in --overlay mode (always, for every overlay
+ # input). Evidence-scoped discovery: compile only the proven entry
+ # seeds and the code reachable from them; never whole-byte sweep
+ # (which decodes embedded data tables as code). Branch/jump-table
+ # targets stay as in-parent labels, not standalone functions. This
+ # is the overlay-compilation contract, not a tunable.
+ cmd = [args.recompiler, psx_path,
+ '--seeds', seeds_path,
+ '--out-dir', out_dir_tmp,
+ '--overlay',
+ # Forward the [widescreen] site lists so overlay-resident
+ # emits (backdrop screenX squash, and any sprite-tag/cull
+ # sites that resolve into overlay code) are applied. --ws-config
+ # only adopts the widescreen lists, not the game's exe/paths.
+ '--ws-config', os.path.abspath(args.game_toml)]
+ cmd += recompiler_project_root_args(args)
+ print(f' recompile: {args.recompiler} ...{" [CPS]" if args.cps else ""}')
+ toml_dir = os.path.dirname(os.path.abspath(args.game_toml))
+ sub_env = dict(os.environ)
+ if args.cps:
+ sub_env['PSX_CPS'] = '1' # §25: emit continuation-passing overlay C
+ r = subprocess.run(cmd, capture_output=True, text=True,
+ cwd=toml_dir, env=sub_env)
+ if r.returncode != 0:
+ print(f' RECOMPILER ERROR:\n{r.stderr or r.stdout}')
+ stats.add_fail(_label, 'recompiler', r.stderr or r.stdout)
+ return
+
+ # Find the generated _full.c
+ stem = os.path.basename(psx_path)
+ full_c = os.path.join(out_dir_tmp, stem + '_full.c')
+ if not os.path.exists(full_c):
+ # psxrecomp-game uses filename() not stem()
+ candidates = [f for f in os.listdir(out_dir_tmp) if f.endswith('_full.c')]
+ if not candidates:
+ print(f' ERROR: no _full.c in {out_dir_tmp}')
+ stats.add_fail(_label, 'no_output', 'no _full.c emitted')
+ return
+ full_c = os.path.join(out_dir_tmp, candidates[0])
+
+ with open(full_c) as f:
+ src = f.read()
+
+ ranges_src = None
+ for fn in os.listdir(out_dir_tmp):
+ if fn.endswith('_full.ranges'):
+ ranges_src = os.path.join(out_dir_tmp, fn)
+ break
+
+ # Post-process (DLL path; static mode returned early above)
+ src = patch_generated_c(src, load_addr, size)
+ c_audit = audit_generated_c(src, load_addr, size, crc32, toml)
+ print_generated_c_audit(load_addr, size, crc32, c_audit)
+ # Always save the debug copy for inspection — including on audit
+ # failure, so opcode gaps / boundary artifacts can be classified.
+ os.makedirs(os.path.dirname(dll_path), exist_ok=True)
+ debug_c = os.path.join(os.path.dirname(dll_path),
+ f'{crc32:08X}_patched.c')
+ with open(debug_c, 'w') as f:
+ f.write(src)
+ if c_audit['unknown_bad'] or c_audit['unsupported_todo_addrs']:
+ fallback = optional_enrichment_fallback_capture(cap)
+ if fallback is not None:
+ print(' OPTIONAL ENRICHMENT AUDIT REJECTED; '
+ 'retrying conservative recipe\n')
+ _do_capture(fallback, region_coverage_cache,
+ interior_frag_jobs, stats)
+ return
+ print(' GENERATED-C AUDIT FAILED\n')
+ stats.add_fail(_label, 'audit',
+ f'{len(c_audit["unknown_bad"])} unknown_bad, '
+ f'{len(c_audit["unsupported_todo_addrs"])} unsupported')
+ return
+ patched_c = os.path.join(tmp, 'overlay_patched.c')
+ with open(patched_c, 'w') as f:
+ f.write(src)
+
+ # overlay-cache v2 dedup: compute this capture's per-function
+ # identity set BEFORE the (expensive) gcc compile. The loader
+ # content-matches each function by (entry, code_crc) across ALL
+ # DLLs at this region_start, so if every function we'd produce is
+ # already provided by an existing DLL, a new DLL adds nothing —
+ # skip the build. This is what stops volatile-data regions (a
+ # changing whole-region CRC over byte-identical code) from minting
+ # an endless pile of redundant DLLs.
+ this_ids = (parse_overlay_func_ids(ranges_src, data, load_addr, size)
+ if ranges_src else [])
+ delay_errors = audit_func_id_delay_slots(
+ this_ids, data, load_addr)
+ if delay_errors:
+ entry, pc, reason = delay_errors[0]
+ where = f' at 0x{pc:08X}' if pc is not None else ''
+ print(f' DELAY-SLOT IDENTITY AUDIT FAILED: '
+ f'func 0x{entry:08X}{where}: {reason}\n')
+ stats.add_fail(_label, 'delay_slot_identity', reason)
+ return
+ this_set = {(ev, crc) for ev, crc, _ in this_ids}
+
+ with cov_lock:
+ covered = region_coverage_cache.get(coverage_key)
+ if covered is None:
+ covered = load_region_coverage(
+ seg_cache_dir, phys_addr,
+ overlay_abi_tag(args.runtime_include, args.flavor))
+ region_coverage_cache[coverage_key] = covered
+ fully_covered = (bool(this_set) and this_set <= covered
+ and not args.force
+ and cap.get('producer') !=
+ BIOS_RESIDENT_PRODUCER)
+ if fully_covered:
+ print(f' SKIP: all {len(this_set)} function(s) already '
+ f'covered by existing DLL(s) at this region — no new '
+ f'native code to build\n')
+ stats.add_skip()
+ return
+
+ if not this_ids:
+ print(' WARNING: recompiler emitted no usable _full.ranges -- '
+ 'preserving any prior DLL/ranges pair; checking exact '
+ 'fragment coverage after supplementation')
+ if cap.get('producer') == BIOS_RESIDENT_PRODUCER:
+ stats.add_fail(_label, 'no_ranges',
+ 'resident producer requires its canonical bundle')
+ else:
+ pending_empty_primary.append((
+ _label, phys_addr, load_addr, size, data,
+ demanded_root_entries))
+ return
+ missing_exports = {
+ entry for entry, _crc, _ranges in this_ids
+ if entry not in c_audit['defs']
+ }
+ if missing_exports:
+ detail = ', '.join(
+ f'0x{entry:08X}' for entry in sorted(missing_exports))
+ print(' GENERATED-C/MANIFEST EXPORT AUDIT FAILED: '
+ f'{detail}\n')
+ stats.add_fail(
+ _label, 'manifest_exports',
+ f'{len(missing_exports)} manifest entries lack C definitions')
+ return
+ representability_error = validate_overlay_func_ids(
+ this_ids, 'region')
+ if representability_error:
+ print(' RANGE MANIFEST AUDIT FAILED: '
+ f'{representability_error}\n')
+ stats.add_fail(
+ _label, 'manifest_ranges', representability_error)
+ return
+ pair_id = overlay_pair_id(src, this_ids)
+ src = add_overlay_pair_export(src, pair_id)
+ # Retained source is the exact source compiled into the DLL.
+ with open(patched_c, 'w') as f:
+ f.write(src)
+
+ # Compile to DLL
+ include_dirs = [args.runtime_include]
+ recomp_root = os.path.dirname(os.path.dirname(args.recompiler))
+ for lib_inc in ['lib/fmt/include']:
+ p = os.path.join(recomp_root, lib_inc)
+ if os.path.isdir(p):
+ include_dirs.append(p)
+
+ publication = {}
+ success = compile_dll(patched_c, dll_path, include_dirs,
+ gcc=args.gcc, flavor=args.flavor,
+ compiler=args.compiler, tcc=args.tcc,
+ func_ids=this_ids,
+ pair_id=pair_id,
+ preserve_existing_pair=(
+ not args.force and
+ cap.get('producer') !=
+ BIOS_RESIDENT_PRODUCER),
+ expected_existing_abi=overlay_abi_tag(
+ args.runtime_include, args.flavor),
+ publication_result=publication,
+ candidate_cap=overlay_candidate_cap(
+ args.runtime_include))
+ if success:
+ # compile_dll transactionally published the per-entry range
+ # manifest beside the DLL from the same func-id list used by
+ # dedup. The loader keys it by the same filename stem.
+ ranges_out = os.path.splitext(dll_path)[0] + '.ranges'
+ if this_ids:
+ nfn = len(this_ids)
+ published = publication.get('published', True)
+ reconcile_bios_resident_marker(
+ dll_path, cap, published)
+ print(f' ranges: {nfn} functions -> {ranges_out}')
+ # New identities are now available for this region_start;
+ # keep the warm coverage set current so later captures in
+ # this same run dedup against them. (Parallel note: the
+ # check→build→update window is deliberately unlocked, so
+ # two concurrent captures can both build overlapping DLLs.
+ # That is redundancy, not corruption — the loader content-
+ # matches every function by (entry, code_crc) across all
+ # DLLs at a region.)
+ with cov_lock:
+ covered |= load_region_coverage(
+ seg_cache_dir, phys_addr,
+ overlay_abi_tag(
+ args.runtime_include, args.flavor))
+ if published:
+ print(f' OK -> {dll_path}\n')
+ stats.add_ok()
+ else:
+ print(f' PRESERVED concurrent valid pair -> '
+ f'{dll_path}\n')
+ stats.add_skip()
+ else:
+ print(' WARNING: recompiler emitted no _full.ranges — '
+ 'loader will leave this region to the interpreter')
+ # A DLL with no .ranges is dead weight: the loader has no
+ # per-function identities to dispatch, so the region stays
+ # interpreted. Tally it as a failure, not a silent "OK".
+ stats.add_fail(_label, 'no_ranges',
+ 'DLL built but no _full.ranges (undispatchable)')
+ else:
+ if publication.get('capacity_error'):
+ print(' CACHE CAPACITY REACHED; shard left to the '
+ 'interpreter\n')
+ stats.add_skip()
+ return
+ fallback = optional_enrichment_fallback_capture(cap)
+ if fallback is not None:
+ print(' OPTIONAL ENRICHMENT COMPILE REJECTED; '
+ 'retrying conservative recipe\n')
+ _do_capture(fallback, region_coverage_cache,
+ interior_frag_jobs, stats)
+ return
+ print(f' FAILED\n')
+ stats.add_fail(_label, 'compile',
+ 'gcc/tcc compile failed (see COMPILE ERROR above)')
+
+ # Interior-entry "island" fragments (overlay-cache v2): the FMV-driver class.
+ # Run as a SEPARATE pass AFTER all region compiles, so it is DECOUPLED from
+ # region success — an executed orphan interior gets its isolated island shard
+ # even if its region's trusted compile failed/audit-failed (that is the whole
+ # point of the separate failure domain). For each region, retain validated
+ # dispatch PCs even when shared CFG ownership dropped their interior seeds.
+ # Select those that ACTUALLY EXECUTED but that NO current DLL serves (orphan
+ # interiors — host never discovered, so the region can't alias them), and
+ # compile each as its OWN isolated _.dll that ENTERS at the
+ # interior PC (recovers no host). Isolated => a bad fragment fails alone and
+ # never poisons a region's trusted DLL.
+ def _do_frags(interior_frag_jobs, stats):
+ # Fragments compile per segment, like region shards (§5.7): a job's
+ # PCs, its shards and their directory are its capture view's segment.
+ # KSEG0 always runs (as before); the others only when they have jobs.
+ by_seg = {}
+ for job in interior_frag_jobs:
+ by_seg.setdefault(segment_of(job['load_addr']), []).append(job)
+ for seg in [KSEG0] + [s for s in (KUSEG, KSEG1) if s in by_seg]:
+ with image_segment(seg):
+ _do_frags_in_segment(by_seg.get(seg, []), stats,
+ segment_cache_dir(cache_dir, seg))
+
+ def _do_frags_in_segment(interior_frag_jobs, stats, cache_dir):
+ frag_env = dict(os.environ)
+ if args.cps:
+ frag_env['PSX_CPS'] = '1'
+ # Persistent doomed-interior memo: skip interiors already proven to fail
+ # audit from IDENTICAL bytes, so autocompile stops re-walking data-as-code
+ # every cycle. --force ignores the skip (re-attempts) for triage/debug.
+ fail_memo = load_interior_fail_memo(cache_dir)
+ memo_skipped = 0
+ variant_coverage_cache = {}
+ expected_abi = overlay_abi_tag(args.runtime_include, args.flavor)
+ runtime_candidate_cap = overlay_candidate_cap(args.runtime_include)
+ capacity_probe = os.path.join(
+ cache_dir, f'00000000_00000000{overlay_ext()}')
+ candidate_capacity_exhausted, existing_candidates = \
+ cache_candidate_capacity_full(
+ capacity_probe, expected_abi, runtime_candidate_cap)
+ if candidate_capacity_exhausted:
+ print(f' overlay candidate capacity already full: '
+ f'{existing_candidates}/{runtime_candidate_cap}; '
+ 'new fragments stay interpreted')
+ invocation_recipe = (
+ expected_abi, int(args.flavor), bool(args.cps), args.compiler,
+ hashlib.sha256(json.dumps(
+ toml, sort_keys=True, separators=(',', ':'),
+ default=str).encode('utf-8')).hexdigest(),
+ )
+ merged_jobs = merge_fragment_jobs_by_recipe(
+ interior_frag_jobs, invocation_recipe)
+ if len(merged_jobs) != len(interior_frag_jobs):
+ print(f' fragment recipes: merged {len(interior_frag_jobs)} capture '
+ f'job(s) into {len(merged_jobs)} byte-variant recipe(s)')
+
+ # A namespace that is already saturated cannot admit ordinary fragment
+ # growth. Avoid the expensive cross-variant donor/owner proof at this
+ # true fixed point, but preserve the only failure semantics that do not
+ # require that proof: a required executed demand already memoized as a
+ # deterministic compile failure remains loud. --force and explicit
+ # --force-interior work bypass this shortcut because a same-basename
+ # replacement can be capacity-neutral.
+ if fragment_capacity_fastpath_eligible(
+ candidate_capacity_exhausted, args.force, merged_jobs):
+ for job in merged_jobs:
+ memo_entries = {}
+ for entry in sorted(job['candidates']):
+ key = _interior_fail_key(
+ job['phys_addr'], entry, job['data'],
+ job['load_addr'], job['size'],
+ job['producer_ranges'], job['cross_call_allow'],
+ expected_abi, args.cps, toml,
+ job['guard_bytes'])
+ if key in fail_memo:
+ memo_entries[entry] = fail_memo[key]
+ if not memo_entries:
+ continue
+ current_entries, _current_ranges = \
+ load_region_current_variant_coverage(
+ cache_dir, job['phys_addr'], job['data'],
+ job['load_addr'], job['size'], expected_abi)
+ for entry, reason in memo_entries.items():
+ if (entry & 0x1FFFFFFF) in current_entries:
+ continue
+ memo_action = interior_fail_memo_action(
+ entry, job, args.force)
+ if memo_action == 'skip':
+ memo_skipped += 1
+ stats.add_skip()
+ else:
+ stats.add_fail(
+ f'interior 0x{entry:08X} @region '
+ f'0x{job["phys_addr"]:08X}',
+ 'fragment_memo', reason)
+ stats.add_capacity_fastpath(len(merged_jobs))
+ print(f' fragment capacity fixed point: skipped donor/owner '
+ f'analysis for {len(merged_jobs)} byte-variant recipe job(s); '
+ 'the exact unserved hosted-demand count was intentionally '
+ 'not recomputed')
+ if memo_skipped:
+ print(f' interior fail-memo: skipped {memo_skipped} '
+ 'known-doomed optional interior(s)')
+ return
+
+ # Global phase 1: publish every strong play-free root before freezing
+ # sibling donor authority. Freezing first deferred these roots until a
+ # second CLI invocation: the next run reloaded them from disk and could
+ # then nominate hosted interiors that a clean first run missed. Strong
+ # roots are the complete organic authority for cross-variant donors, so
+ # closing them for every recipe first makes an empty-cache invocation
+ # reproducible without allowing hosted aliases to recurse.
+ strong_handled_by_job = []
+ for job in merged_jobs:
+ phys_addr = job['phys_addr']
+ load_addr = job['load_addr']
+ size = job['size']
+ data = job['data']
+ current_variant_ids = load_region_current_variant_func_ids(
+ cache_dir, phys_addr, data, load_addr, size, expected_abi,
+ include_supplemental=False)
+ current_variant_entries, current_variant_ranges = \
+ current_variant_func_id_coverage(
+ current_variant_ids, data, load_addr, size)
+ strong_handled = set()
+ batch_candidates, isolated_candidates = \
+ partition_strong_root_demands(
+ job['static_exact_demands'], job['executed'],
+ job['forced'], job['static_interval_demands'],
+ current_variant_entries)
+ strong_candidates = batch_candidates + isolated_candidates
+ batch_pending = []
+ isolated_pending = []
+ isolated_candidate_set = set(isolated_candidates)
+ for entry in strong_candidates:
+ key = _interior_fail_key(
+ phys_addr, entry, data, load_addr, size,
+ job['producer_ranges'], job['cross_call_allow'],
+ expected_abi, args.cps, toml,
+ job['guard_bytes'])
+ memo_action = interior_fail_memo_action(
+ entry, job, args.force)
+ if key in fail_memo and memo_action != 'retry':
+ strong_handled.add(entry)
+ if memo_action == 'skip':
+ memo_skipped += 1
+ stats.add_skip()
+ else:
+ stats.add_fail(
+ f'interior 0x{entry:08X} @region '
+ f'0x{phys_addr:08X}',
+ 'fragment_memo', fail_memo[key])
+ continue
+ if entry in isolated_candidate_set:
+ isolated_pending.append(entry)
+ else:
+ batch_pending.append(entry)
+
+ if candidate_capacity_exhausted:
+ capacity_pending = [
+ entry for entry in batch_pending + isolated_pending
+ if not fragment_capacity_allows_entry(
+ True, args.force, job['forced'], entry)
+ ]
+ if capacity_pending:
+ print(f' strong-root supplement @0x{phys_addr:08X}: '
+ f'{len(capacity_pending)} demand(s) left to '
+ 'interpreter: candidate capacity full')
+ strong_handled.update(capacity_pending)
+ for _entry in capacity_pending:
+ stats.add_skip()
+ capacity_pending_set = set(capacity_pending)
+ batch_pending = [
+ entry for entry in batch_pending
+ if entry not in capacity_pending_set
+ ]
+ isolated_pending = [
+ entry for entry in isolated_pending
+ if entry not in capacity_pending_set
+ ]
+ if not batch_pending and not isolated_pending:
+ strong_handled_by_job.append(strong_handled)
+ continue
+
+ def compile_strong_batch(entries):
+ return compile_fragment_batch(
+ entries, data, load_addr, size, phys_addr, cache_dir,
+ args, frag_env, toml, job['producer_ranges'],
+ job['cross_call_allow'],
+ guard_bytes=job['guard_bytes'])
+
+ def strong_batch_success(entries, frag_ids, status):
+ strong_handled.update(entries)
+ if status == 'cached':
+ stats.add_skip()
+ else:
+ stats.add_ok()
+ for ev, _cc, ranges in frag_ids:
+ current_variant_entries.add(ev & 0x1FFFFFFF)
+ current_variant_ranges.extend(
+ ((start & 0x1FFFFFFF),
+ (start & 0x1FFFFFFF) + length)
+ for start, length in ranges)
+ current_variant_ids.extend(frag_ids)
+ if job.get('resident_cap'):
+ fragment_dll = os.path.join(
+ cache_dir,
+ f'{phys_addr:08X}_{fragment_shard_key(frag_ids):08X}'
+ f'{overlay_ext()}')
+ reconcile_bios_resident_marker(
+ fragment_dll, job['resident_cap'], status == 'built')
+
+ def strong_singleton_failure(entry, status):
+ nonlocal candidate_capacity_exhausted
+ strong_handled.add(entry)
+ if status.startswith('candidate-capacity:'):
+ if status.startswith('candidate-capacity: full'):
+ candidate_capacity_exhausted = True
+ print(f' fragment 0x{entry:08X} skipped safely: '
+ f'{status}')
+ stats.add_skip()
+ return
+ key = _interior_fail_key(
+ phys_addr, entry, data, load_addr, size,
+ job['producer_ranges'], job['cross_call_allow'],
+ expected_abi, args.cps, toml,
+ job['guard_bytes'])
+ optional_reject = optional_static_fragment_rejection(
+ entry, job, status)
+ if optional_reject:
+ print(f' static fragment 0x{entry:08X} rejected safely: '
+ f'{status}')
+ stats.add_skip()
+ else:
+ stats.add_fail(
+ f'interior 0x{entry:08X} @region '
+ f'0x{phys_addr:08X}', 'fragment', status)
+ if interior_failure_is_deterministic(status):
+ fail_memo[key] = status
+ append_interior_fail_memo(cache_dir, key, status)
+
+ def strong_batch_failure(entries, status):
+ nonlocal candidate_capacity_exhausted
+ if status.startswith('candidate-capacity:'):
+ strong_handled.update(entries)
+ if status.startswith('candidate-capacity: full'):
+ candidate_capacity_exhausted = True
+ for _entry in entries:
+ stats.add_skip()
+ print(f' strong-root batch: {len(entries)} demand(s) '
+ f'left to interpreter: {status}')
+ return
+ strong_handled.update(entries)
+ stats.add_fail(
+ f'strong-root batch ({len(entries)} entries) '
+ f'@region 0x{phys_addr:08X}',
+ 'fragment_batch', status)
+
+ strong_shards = compile_batched_fragment_roots(
+ batch_pending, compile_strong_batch, strong_batch_success,
+ strong_singleton_failure,
+ lambda entry: ((entry & 0x1FFFFFFF) not in
+ current_variant_entries),
+ fragment_batch_failure_is_partitionable,
+ strong_batch_failure)
+ # A root that is also live/forced/interval evidence retains its
+ # historical singleton failure domain, but still closes before the
+ # donor snapshot. A successful batch may incidentally cover it.
+ for entry in isolated_pending:
+ if not fragment_capacity_allows_entry(
+ candidate_capacity_exhausted, args.force,
+ job['forced'], entry):
+ if entry not in strong_handled:
+ strong_handled.add(entry)
+ stats.add_skip()
+ continue
+ if (entry & 0x1FFFFFFF) in current_variant_entries:
+ strong_handled.add(entry)
+ continue
+ frag_ids, status = compile_strong_batch([entry])
+ if frag_ids:
+ strong_batch_success([entry], frag_ids, status)
+ strong_shards += 1
+ else:
+ strong_singleton_failure(entry, status)
+ if strong_candidates:
+ print(f' strong-root supplement @0x{phys_addr:08X}: '
+ f'{len(strong_candidates)} demand(s) -> '
+ f'{strong_shards} batched shard(s)')
+ strong_handled_by_job.append(strong_handled)
+
+ # A strong-root publication can consume the last Candidate slots.
+ # Re-probe under the shared namespace lock before hosted admission.
+ # The outer invocation lock excludes cooperating writers for the rest
+ # of this pass; an uncoordinated external deletion can only cause safe
+ # coverage loss until the next invocation.
+ was_capacity_exhausted = candidate_capacity_exhausted
+ candidate_capacity_exhausted, existing_candidates = \
+ cache_candidate_capacity_full(
+ capacity_probe, expected_abi, runtime_candidate_cap)
+ if candidate_capacity_exhausted and not was_capacity_exhausted:
+ print(f' overlay candidate capacity reached after strong-root '
+ f'closure: {existing_candidates}/{runtime_candidate_cap}; '
+ 'new fragments stay interpreted')
+
+ # Global phase 2: snapshot native coverage and authority separately.
+ # Coverage includes prior hosted shards so a valid alias is not rebuilt.
+ # Donor/owner authority excludes provenance-tagged hosted output, whose
+ # incidental rooted callees must not manufacture another wave on a later
+ # invocation. Strong roots above reconstruct durable authority first.
+ initial_variant_ids = [
+ load_region_current_variant_func_ids(
+ cache_dir, job['phys_addr'], job['data'], job['load_addr'],
+ job['size'], expected_abi)
+ for job in merged_jobs
+ ]
+ initial_authority_ids = [
+ load_region_current_variant_func_ids(
+ cache_dir, job['phys_addr'], job['data'], job['load_addr'],
+ job['size'], expected_abi, include_supplemental=False)
+ for job in merged_jobs
+ ]
+ # Build sorted sibling static-donor streams once. Each recipe needs at
+ # most its maximum current-entry population plus one nomination batch:
+ # any later address necessarily has HOSTED_NOMINATION_CAP earlier
+ # entries from that same sibling after a recipient filters its current
+ # coverage. The recipient heap-merge below applies the final cap only
+ # after excluding self evidence and already native entries.
+ hosted_donors_by_region = {}
+ initial_entry_bound_by_region = Counter()
+ for index, indexed_job in enumerate(merged_jobs):
+ initial_entry_bound_by_region[indexed_job['phys_addr']] = max(
+ initial_entry_bound_by_region[indexed_job['phys_addr']],
+ len({_canonical_guest_addr(entry)
+ for entry, _crc, _ranges in
+ initial_authority_ids[index]}))
+ hosted_donor_index_drops = Counter()
+ for sibling_index, sibling in enumerate(merged_jobs):
+ organic_entries = organic_root_entries(
+ initial_authority_ids[sibling_index])
+ donor_entries = sorted({
+ _canonical_guest_addr(entry)
+ for entry in sibling.get('hosted_donor_demands', set())
+ if _canonical_guest_addr(entry) in organic_entries
+ })
+ # A recipient can filter no more than its current exact entry set.
+ # Normal publication bounds that by the runtime cap; include the
+ # observed on-disk maximum as well so a legacy/manual over-cap cache
+ # loses coverage safely without invalidating this prefix proof.
+ donor_index_limit = (
+ max(runtime_candidate_cap,
+ initial_entry_bound_by_region[sibling['phys_addr']]) +
+ HOSTED_NOMINATION_CAP)
+ dropped = max(0, len(donor_entries) - donor_index_limit)
+ if dropped:
+ hosted_donor_index_drops[sibling['phys_addr']] += dropped
+ hosted_donors_by_region.setdefault(
+ sibling['phys_addr'], {})[sibling_index] = tuple(
+ donor_entries[:donor_index_limit])
+ for job_index, job in enumerate(merged_jobs):
+ phys_addr = job['phys_addr']
+ load_addr = job['load_addr']
+ size = job['size']
+ data = job['data']
+ interior_pcs = set(job['candidates'])
+ executed = job['executed']
+ static_exact_demands = job['static_exact_demands']
+ static_interval_demands = job['static_interval_demands']
+ forced = job['forced']
+ region_crc = binascii.crc32(data) & 0xFFFFFFFF
+ # ENTRY-based orphan test, not range-based: native code is
+ # enterable only at manifest F entries, so "inside a compiled
+ # range" does NOT make a dispatch target servable — a range-
+ # covered PC with no F entry anywhere still interps its whole
+ # chain on every dispatch. Demand an entry at exactly this PC.
+ coverage_key = (phys_addr, hashlib.sha256(data).digest(),
+ load_addr, size)
+ current_coverage = variant_coverage_cache.get(coverage_key)
+ current_variant_ids = list(initial_variant_ids[job_index])
+ current_authority_ids = list(
+ initial_authority_ids[job_index])
+ current_authority_entries, _authority_ranges = \
+ current_variant_func_id_coverage(
+ current_authority_ids, data, load_addr, size)
+ if current_coverage is None:
+ current_coverage = current_variant_func_id_coverage(
+ current_variant_ids, data, load_addr, size)
+ variant_coverage_cache[coverage_key] = current_coverage
+ current_variant_entries, current_variant_ranges = current_coverage
+
+ def record_fragment_success(frag_ids, status,
+ provenance=None):
+ if status == 'cached':
+ stats.add_skip()
+ else:
+ stats.add_ok()
+ for ev, _cc, ranges in frag_ids:
+ current_variant_entries.add(ev & 0x1FFFFFFF)
+ current_variant_ranges.extend(
+ ((start & 0x1FFFFFFF),
+ (start & 0x1FFFFFFF) + length)
+ for start, length in ranges)
+ current_variant_ids.extend(frag_ids)
+ if job.get('resident_cap'):
+ fragment_dll = os.path.join(
+ cache_dir,
+ f'{phys_addr:08X}_'
+ f'{fragment_shard_key(frag_ids, provenance):08X}'
+ f'{overlay_ext()}')
+ reconcile_bios_resident_marker(
+ fragment_dll, job['resident_cap'], status == 'built')
+
+ def record_fragment_failure(entry, status):
+ nonlocal candidate_capacity_exhausted
+ if status.startswith('candidate-capacity:'):
+ if status.startswith('candidate-capacity: full'):
+ candidate_capacity_exhausted = True
+ print(f' fragment 0x{entry:08X} skipped safely: {status}')
+ stats.add_skip()
+ return
+ key = _interior_fail_key(
+ phys_addr, entry, data, load_addr, size,
+ job['producer_ranges'], job['cross_call_allow'],
+ expected_abi, args.cps, toml,
+ job['guard_bytes'])
+ optional_reject = optional_static_fragment_rejection(
+ entry, job, status)
+ if optional_reject:
+ print(f' static fragment 0x{entry:08X} rejected safely: '
+ f'{status}')
+ stats.add_skip()
+ else:
+ stats.add_fail(
+ f'interior 0x{entry:08X} @region 0x{phys_addr:08X}',
+ 'fragment', status)
+ if interior_failure_is_deterministic(status):
+ fail_memo[key] = status
+ append_interior_fail_memo(cache_dir, key, status)
+
+ strong_handled = set(strong_handled_by_job[job_index])
+
+ # Global phase 3: a static root proven in one captured byte recipe
+ # can identify an
+ # indirect-switch entry in a sibling recipe. Run this after local
+ # strong closure, so owner availability is independent of the
+ # poorer base-region bundle. Donor and owner authority remain
+ # frozen to the post-strong snapshot and cannot recurse through a
+ # hosted shard. Sibling bytes only nominate the address; all
+ # executable authority comes from this recipient's current-byte
+ # owner and publication audit.
+ sibling_proofs, sibling_proofs_truncated = \
+ recipient_sibling_proofs(
+ hosted_donors_by_region.get(phys_addr, {}), job_index,
+ current_authority_entries)
+ hosted_audit = {}
+ hosted = select_hosted_interior_demands(
+ job, sibling_proofs, current_authority_ids, hosted_audit)
+ if sibling_proofs_truncated:
+ hosted_audit['region_nomination_cap_truncated'] = 1
+ donor_index_drops = hosted_donor_index_drops.get(phys_addr, 0)
+ if donor_index_drops:
+ hosted_audit['region_donor_index_cap_dropped'] = \
+ donor_index_drops
+
+ def compile_hosted_batch(specs):
+ return compile_fragment_batch(
+ specs, data, load_addr, size, phys_addr, cache_dir,
+ args, frag_env, toml, job['producer_ranges'],
+ job['cross_call_allow'], hosted_owners=specs,
+ guard_bytes=job['guard_bytes'])
+
+ hosted_rejected = set()
+ hosted_published = False
+
+ def hosted_success(batch, frag_ids, status):
+ nonlocal hosted_published
+ record_fragment_success(
+ frag_ids, status, HOSTED_MANIFEST_PROVENANCE)
+ if status == 'built':
+ hosted_published = True
+ emitted = {
+ _canonical_guest_addr(entry)
+ for entry, _crc, _ranges in frag_ids
+ }
+ missing = sorted(set(batch) - emitted)
+ if missing:
+ print(f' hosted batch: {len(batch) - len(missing)}/'
+ f'{len(batch)} target(s) passed recipient CFG proof; '
+ f'{len(missing)} retrying in smaller batches')
+ return set(batch) - set(missing)
+
+ def hosted_singleton_failure(entry, status):
+ nonlocal candidate_capacity_exhausted
+ print(f' hosted interior 0x{entry:08X} rejected safely: '
+ f'{status}')
+ if status.startswith('candidate-capacity: full'):
+ candidate_capacity_exhausted = True
+ if args.force:
+ stats.add_skip()
+ return
+ hosted_rejected.add(_canonical_guest_addr(entry))
+ if status.startswith((
+ 'generated-c-audit:', 'hosted-entry-audit:',
+ 'hosted-no-target:', 'candidate-capacity:',
+ 'no-generated-output', 'no-func-ids')):
+ stats.add_skip()
+ else:
+ stats.add_fail(
+ f'hosted interior 0x{entry:08X} '
+ f'@region 0x{phys_addr:08X}',
+ 'hosted_fragment', status)
+
+ def hosted_batch_failure(batch, status):
+ nonlocal candidate_capacity_exhausted
+ if status.startswith('candidate-capacity: full'):
+ candidate_capacity_exhausted = True
+ print(f' hosted batch: 0/{len(batch)} target(s) passed '
+ 'recipient CFG proof; candidate capacity full')
+ if args.force:
+ for _entry in batch:
+ stats.add_skip()
+ return
+ hosted_rejected.update(
+ _canonical_guest_addr(entry) for entry in batch)
+ if status.startswith((
+ 'hosted-no-target:',
+ 'hosted-entry-audit: compile attempt cap',
+ 'candidate-capacity:', 'no-generated-output',
+ 'no-func-ids')):
+ for _entry in batch:
+ stats.add_skip()
+ print(f' hosted batch: 0/{len(batch)} target(s) passed '
+ 'recipient CFG proof; rejected safely')
+ return
+ stats.add_fail(
+ f'hosted-interior batch ({len(batch)} entries) '
+ f'@region 0x{phys_addr:08X}',
+ 'hosted_fragment_batch', status)
+
+ hosted_shards = compile_batched_hosted_aliases(
+ hosted, compile_hosted_batch, hosted_success,
+ hosted_singleton_failure,
+ lambda entry: ((entry & 0x1FFFFFFF) not in
+ current_variant_entries),
+ fragment_batch_failure_is_partitionable,
+ hosted_batch_failure,
+ stop_requested=lambda: (
+ candidate_capacity_exhausted and not args.force))
+ if hosted_published:
+ was_capacity_exhausted = candidate_capacity_exhausted
+ candidate_capacity_exhausted, existing_candidates = \
+ cache_candidate_capacity_full(
+ capacity_probe, expected_abi, runtime_candidate_cap)
+ if (candidate_capacity_exhausted and
+ not was_capacity_exhausted):
+ print(f' overlay candidate capacity reached after '
+ f'hosted closure: {existing_candidates}/'
+ f'{runtime_candidate_cap}; ordinary fragments stay '
+ 'interpreted')
+ hosted_capacity_skipped = set()
+ if candidate_capacity_exhausted and not args.force:
+ already_accounted = hosted_rejected | {
+ _canonical_guest_addr(entry) for entry in strong_handled
+ }
+ capacity_missing = hosted_entries_still_missing(
+ hosted, current_variant_entries, already_accounted)
+ if capacity_missing:
+ hosted_capacity_skipped.update(capacity_missing)
+ hosted_audit['candidate_capacity_full'] = \
+ len(capacity_missing)
+ for _entry in capacity_missing:
+ stats.add_skip()
+ if sibling_proofs:
+ print(f' cross-variant hosted supplement @0x{phys_addr:08X}: '
+ f'{len(hosted)}/{len(sibling_proofs)} sibling-proven '
+ f'target(s) had a unique current-byte local owner -> '
+ f'{hosted_shards} shard(s); '
+ f'audit={dict(sorted(hosted_audit.items()))}')
+
+ orphans = select_fragment_orphans(
+ interior_pcs, executed, forced, static_exact_demands,
+ static_interval_demands, current_variant_entries,
+ current_variant_ranges)
+ orphans = [entry for entry in orphans
+ if (entry not in strong_handled and
+ _canonical_guest_addr(entry) not in
+ hosted_capacity_skipped)]
+ if not orphans:
+ continue
+ capacity_orphans = [
+ entry for entry in orphans
+ if not fragment_capacity_allows_entry(
+ candidate_capacity_exhausted, args.force,
+ job['forced'], entry)
+ ]
+ if capacity_orphans:
+ print(f' orphan fragments: {len(capacity_orphans)} '
+ 'demand(s) left to interpreter: candidate capacity full')
+ for _entry in capacity_orphans:
+ stats.add_skip()
+ capacity_orphan_set = set(capacity_orphans)
+ orphans = [
+ entry for entry in orphans
+ if entry not in capacity_orphan_set
+ ]
+ if not orphans:
+ continue
+ built = 0
+ for a in orphans:
+ # A preceding orphan can consume the final slot or receive the
+ # first authoritative full verdict. Stop ordinary toolchain
+ # work immediately while still allowing a later explicit
+ # capacity-neutral repair candidate.
+ if not fragment_capacity_allows_entry(
+ candidate_capacity_exhausted, args.force,
+ job['forced'], a):
+ stats.add_skip()
+ continue
+ key = _interior_fail_key(
+ phys_addr, a, data, load_addr, size,
+ job['producer_ranges'], job['cross_call_allow'],
+ expected_abi, args.cps, toml,
+ job['guard_bytes'])
+ memo_action = interior_fail_memo_action(a, job, args.force)
+ if key in fail_memo and memo_action != 'retry':
+ # Deterministically doomed from these exact bytes — skip the
+ # ~16k-word data walk. NOT a fresh failure (already counted
+ # when first memoized); count as a skip so the summary is honest.
+ if memo_action == 'skip':
+ memo_skipped += 1
+ stats.add_skip()
+ else:
+ stats.add_fail(
+ f'interior 0x{a:08X} @region 0x{phys_addr:08X}',
+ 'fragment_memo', fail_memo[key])
+ continue
+ frag_ids, status = compile_interior_fragment(
+ a, data, load_addr, size, phys_addr, cache_dir, args,
+ frag_env, toml, job['producer_ranges'],
+ job['cross_call_allow'],
+ guard_bytes=job['guard_bytes'])
+ if frag_ids:
+ built += 1
+ record_fragment_success(
+ frag_ids, status, ORPHAN_MANIFEST_PROVENANCE)
+ else:
+ # An executed orphan interior that would NOT build is a real
+ # coverage hole: that PC's whole dispatch chain runs
+ # interpreted forever. Tally it loudly with the reason.
+ # Persist only deterministic generated-code audit verdicts;
+ # compiler/spawn errors and cache-pair mismatches depend on
+ # mutable external state and must remain retryable.
+ record_fragment_failure(a, status)
+ print(f' interior fragments @0x{phys_addr:08X}: {built}/{len(orphans)} '
+ f'exact-demand orphan interior(s) -> isolated island shards')
+ if memo_skipped:
+ print(f' interior fail-memo: skipped {memo_skipped} known-doomed '
+ f'interior(s) (data-as-code from identical bytes; '
+ f'{INTERIOR_FAIL_MEMO})')
+
+ # ---- Drive the capture list -------------------------------------------
+ # Dynamic cache publication is deliberately canonical and sequential. A
+ # parallel recompile race is harmless below capacity but chooses an
+ # irreproducible winning subset at the hard Candidate boundary. Static
+ # combined-C mode has no runtime cache publication and keeps its historical
+ # capture order.
+ stats = ShardStats()
+ for label, detail in segment_view_errors:
+ print(f' SEGMENT RECORD REJECTED: {label}: {detail}')
+ stats.add_fail(label, 'segments', detail)
+ if args.static:
+ if args.jobs > 1 and len(captures) > 1:
+ # Each capture is an independent recompiler subprocess plus a
+ # Python-side audit/namespace pass; the latter is CPU-bound, so
+ # processes, not threads. pool.map yields in submission order, and
+ # the merge runs in that order, so the result is byte-identical to
+ # the sequential loop.
+ from concurrent.futures import ProcessPoolExecutor
+ print(f'Static mode: {args.jobs} worker processes, '
+ f'results merged in capture order\n')
+ with ProcessPoolExecutor(max_workers=args.jobs) as pool:
+ for res in pool.map(static_capture_job, captures,
+ itertools.repeat(args),
+ itertools.repeat(toml),
+ itertools.repeat(forced_interiors),
+ itertools.repeat(static_out),
+ chunksize=1):
+ _merge_static_result(res)
+ else:
+ for cap in captures:
+ _do_capture(cap, region_coverage_cache, interior_frag_jobs, stats)
+ else:
+ # Publication order is part of the reproducible cache result whenever
+ # the process-lifetime Candidate cap can bind. Sort complete capture
+ # recipes and serialize whole compiler invocations in this namespace;
+ # a mutex around only the final rename would still admit whichever
+ # worker happened to arrive first at cap-minus-N.
+ capacity_lock, _tier_dirs = _candidate_capacity_namespace(
+ os.path.join(cache_dir, f'00000000_00000000{overlay_ext()}'))
+ invocation_lock = capacity_lock + '.invocation'
+ with _exclusive_file_lock(invocation_lock, timeout=None):
+ expected_abi = overlay_abi_tag(
+ args.runtime_include, args.flavor)
+ runtime_candidate_cap = overlay_candidate_cap(
+ args.runtime_include)
+ capacity_probe = os.path.join(
+ cache_dir, f'00000000_00000000{overlay_ext()}')
+ existing_candidates, candidate_counts = \
+ cache_candidate_capacity_snapshot(
+ capacity_probe, expected_abi)
+ saturated_single_tier = candidate_capacity_saturated_in_tier(
+ existing_candidates, candidate_counts,
+ runtime_candidate_cap, cache_dir)
+ capacity_fixedpoint = (
+ saturated_single_tier and not args.force and
+ not forced_interiors)
+ captures_to_process = captures
+ if capacity_fixedpoint:
+ # At a single-tier full namespace, ordinary compilation cannot
+ # publish growth and there is no lower compiler tier to promote
+ # with a capacity-neutral basename replacement. This is an
+ # intentionally coarse fixed-point result: coverage_report is
+ # the exact gap authority, while this invocation avoids decoding
+ # and sorting a potentially gigabyte-scale capture collection.
+ # BIOS resident bundles are the exception: normal policy lets a
+ # richer capture replace its canonical bundle without --force,
+ # and that replacement can be capacity-neutral. Process only
+ # these tiny captures, then re-probe before suppressing the
+ # gigabyte-scale ordinary collection.
+ resident_captures = [
+ cap for cap in captures
+ if cap.get('producer') == BIOS_RESIDENT_PRODUCER
+ ]
+ resident_captures.sort(key=lambda cap: (
+ int(cap['load_addr'], 16) & 0x1FFFFFFF,
+ binascii.crc32(base64.b64decode(
+ cap['bytes_b64'])) & 0xFFFFFFFF,
+ hashlib.sha256(json.dumps(
+ cap, sort_keys=True, separators=(',', ':'),
+ default=str).encode('utf-8')).digest(),
+ ))
+ for cap in resident_captures:
+ _do_capture(
+ cap, region_coverage_cache, interior_frag_jobs, stats)
+ resident_ids = {id(cap) for cap in resident_captures}
+ captures_to_process = [
+ cap for cap in captures if id(cap) not in resident_ids
+ ]
+ existing_candidates, candidate_counts = \
+ cache_candidate_capacity_snapshot(
+ capacity_probe, expected_abi)
+ capacity_fixedpoint = candidate_capacity_saturated_in_tier(
+ existing_candidates, candidate_counts,
+ runtime_candidate_cap, cache_dir)
+ if capacity_fixedpoint:
+ stats.add_capacity_fastpath(len(captures_to_process))
+ print(f'Overlay candidate fixed point: '
+ f'{existing_candidates}/{runtime_candidate_cap} '
+ f'candidates in the active compiler tier; processed '
+ f'{len(resident_captures)} BIOS resident recipe(s) '
+ f'and skipped {len(captures_to_process)} ordinary '
+ 'capture recipe(s) before byte decode. Use --force or '
+ '--force-interior for capacity-neutral repair '
+ 'attempts; coverage_report remains the exact gap '
+ 'authority.\n')
+ if not capacity_fixedpoint:
+ captures_to_process.sort(key=lambda cap: (
+ int(cap['load_addr'], 16) & 0x1FFFFFFF,
+ binascii.crc32(base64.b64decode(
+ cap['bytes_b64'])) & 0xFFFFFFFF,
+ hashlib.sha256(json.dumps(
+ cap, sort_keys=True, separators=(',', ':'),
+ default=str).encode('utf-8')).digest(),
+ ))
+ if args.jobs > 1:
+ print('Deterministic candidate-cap admission: region '
+ 'recipes run in canonical order '
+ '(parallel publication disabled)\n')
+ for cap in captures_to_process:
+ _do_capture(
+ cap, region_coverage_cache, interior_frag_jobs, stats)
+ _do_frags(interior_frag_jobs, stats)
+
+ # B-2: write combined static C file
+ if args.static and static_parts:
+ # CPS can yield at every compiled block leader, not just leaders that a
+ # particular capture happened to observe. Give every block in every
+ # variant a content-gated resume wrapper. This makes static coverage
+ # independent of host timing / slice boundaries.
+ synthesized = 0
+
+ def synthesize_all_resume_wrappers(parts):
+ nonlocal synthesized
+ for part in parts:
+ done = part.setdefault('resume_entries', set())
+ # Same per-entry rules as before, but the resume arms are
+ # inserted per HOST in one pass (add_cps_resume_cases) and the
+ # wrappers appended in one concatenation. Entry order is the
+ # sorted order the per-entry loop used, so the emitted C is
+ # byte-identical; the cost drops from quadratic in the part
+ # size to linear.
+ candidates = []
+ by_host = {}
+ for entry, host in sorted(part['continuation_owners'].items()):
+ if entry in part['func_addrs'] or entry in done:
+ continue
+ if host not in part['ids_by_addr']:
+ continue
+ candidates.append((entry, host))
+ by_host.setdefault(host, []).append(entry)
+ requests = [(part['symbols'][host], host, entries)
+ for host, entries in by_host.items()]
+ part['src'], ok_by_symbol = add_cps_resume_cases(
+ part['src'], requests)
+ wrappers = []
+ for entry, host in candidates:
+ host_symbol = part['symbols'][host]
+ if entry not in ok_by_symbol.get(host_symbol, ()):
+ continue
+ symbol = f'{part["namespace"]}_func_{entry:08X}'
+ wrappers.append(
+ f'\n/* CPS block resume entry owned by 0x{host:08X}. */\n'
+ f'void {symbol}(CPUState* cpu)\n{{\n'
+ f' cpu->pc = 0x{entry:08X}u;\n'
+ f' {host_symbol}(cpu);\n'
+ f'}}\n')
+ for code_crc, ranges in part['ids_by_addr'][host]:
+ part['variants'].append({
+ 'addr': entry,
+ 'symbol': symbol,
+ 'crc': code_crc,
+ 'ranges': ranges,
+ })
+ done.add(entry)
+ synthesized += 1
+ part['src'] += ''.join(wrappers)
+
+ synthesize_all_resume_wrappers(static_parts)
+
+ # Captured entries not owned by any compiled host are genuine orphan
+ # interiors. Compile each as an isolated dispatch-root shard, then give
+ # every block in those fragments the same universal resume treatment.
+ #
+ # Demands are (entry, image crc), one per capture that observed the
+ # address, and a demand is served only by a part built from that
+ # capture's bytes (select_static_fragment_demands). A band with many
+ # occupants therefore gets one fragment per occupant that observed the
+ # address -- the dispatcher's CRC gate picks the resident one.
+ unresolved = select_static_fragment_demands(
+ static_requested_entries, static_parts)
+ # PSX_STATIC_NO_ISOLATED=1: A/B guard -- skip the isolated-fragment pass
+ # entirely while testing the universal-resume machinery.
+ if os.environ.get('PSX_STATIC_NO_ISOLATED'):
+ unresolved = []
+
+ # Persistent doomed-fragment memo, as in the DLL path: an interior
+ # that is data in THIS image fails the generated-C audit every time,
+ # after a full recompiler walk. Band-attributed captures (an observed
+ # PC attached to every occupant of its band) make that the common
+ # case, so remember the verdict per (image bytes, interior, toml,
+ # cps, guard) next to the static output. --force cannot be the retry
+ # switch here (static mode needs it just to overwrite the output);
+ # --force-interior PC retries that entry, deleting the memo file
+ # retries everything.
+ fail_memo = load_interior_fail_memo(args.out_dir)
+ expected_abi = overlay_abi_tag(args.runtime_include, args.flavor)
+ forced_phys = {entry & 0x1FFFFFFF for entry in forced_interiors}
+ fragment_jobs = [] # (demand key, memo key, image key)
+ image_sources = {} # image key -> (data, load, size, phys, guard)
+ fragment_memo_skipped = 0
+ for key in unresolved:
+ source = static_entry_sources.get(key)
+ if source is None:
+ continue
+ entry, image_crc = key
+ data, load_addr, size, phys_addr, guard_bytes = source
+ memo_key = _interior_fail_key(
+ phys_addr, entry, data, load_addr, size, [], [],
+ expected_abi, bool(args.cps), toml, guard_bytes=guard_bytes)
+ if (memo_key in fail_memo and
+ (entry & 0x1FFFFFFF) not in forced_phys):
+ fragment_memo_skipped += 1
+ continue
+ # One image per segment view (§5.7): every view of a capture has
+ # the same bytes, phys and size, but a demand compiles against its
+ # own view's load address, which fixes the segment it is spelled,
+ # named and baked in.
+ image_key = (image_crc, phys_addr, size, segment_of(load_addr))
+ image_sources.setdefault(image_key, source)
+ fragment_jobs.append((key, memo_key, image_key))
+
+ # Fragments are independent recompiler subprocesses; run them on the
+ # same pool as the regions. Results are merged in demand order and a
+ # result whose entry an earlier-merged part already serves for the
+ # same image is discarded, so the output is byte-identical to the
+ # sequential loop (which skipped such entries before compiling).
+ if fragment_jobs:
+ print(f'Static isolated interior fragments: {len(fragment_jobs)} '
+ f'(entry, image) demand(s) over {len(image_sources)} '
+ f'image(s) to compile'
+ + (f', {fragment_memo_skipped} known-doomed skipped'
+ if fragment_memo_skipped else ''))
+ if args.jobs > 1 and len(fragment_jobs) > 1:
+ from concurrent.futures import ProcessPoolExecutor
+ with ProcessPoolExecutor(
+ max_workers=args.jobs,
+ initializer=_init_static_fragment_worker,
+ initargs=(image_sources,)) as pool:
+ fragment_results = list(pool.map(
+ static_fragment_job,
+ [job[0][0] for job in fragment_jobs],
+ [job[2] for job in fragment_jobs],
+ itertools.repeat(args),
+ chunksize=8))
+ else:
+ _init_static_fragment_worker(image_sources)
+ fragment_results = [static_fragment_job(key[0], image_key, args)
+ for key, _memo_key, image_key in fragment_jobs]
+
+ fragment_built = 0
+ fragment_rejected = 0
+ fragment_failed = []
+ new_fragment_parts = []
+ existing_keys = served_static_variant_keys(static_parts)
+ for (key, memo_key, _image_key), (part, reason) in zip(
+ fragment_jobs, fragment_results):
+ if key in existing_keys:
+ continue
+ if part is None:
+ if interior_failure_is_deterministic(reason):
+ fragment_rejected += 1
+ append_interior_fail_memo(args.out_dir, memo_key, reason)
+ else:
+ fragment_failed.append((key, reason))
+ continue
+ static_parts.append(part)
+ new_fragment_parts.append(part)
+ existing_keys.update(
+ (variant['addr'], part['image_crc'])
+ for variant in part['variants'])
+ fragment_built += 1
+
+ synthesize_all_resume_wrappers(new_fragment_parts)
+ unresolved = select_static_fragment_demands(
+ static_requested_entries, static_parts)
+ print(f'Static universal CPS resume wrappers: {synthesized}')
+ print(f'Static isolated interior shards: {fragment_built}')
+ if fragment_rejected or fragment_memo_skipped:
+ # Data-as-code in that capture's bytes. Expected whenever a
+ # dispatch entry is attributed to more occupants of a band than
+ # actually ran it: safe coverage loss, never a shard failure --
+ # the resident occupant's own fragment is what serves the entry.
+ print(f'Static fragments rejected as data in their image: '
+ f'{fragment_rejected} this run (memoized), '
+ f'{fragment_memo_skipped} skipped from the memo')
+ stats.add_skip(fragment_rejected + fragment_memo_skipped)
+ hard = [(key, reason) for key, reason in fragment_failed]
+ if hard:
+ sample = ', '.join(f'0x{key[0]:08X}/{key[1]:08X}'
+ for key, _reason in hard[:12])
+ print(f'STATIC COVERAGE WARNING: {len(hard)} captured dispatch '
+ f'entry(s) have no compiled body/owner (entry/image): '
+ f'{sample}')
+ for key, reason in hard:
+ stats.add_fail(f'static entry 0x{key[0]:08X} image {key[1]:08X}',
+ 'static_unresolved',
+ f'captured dispatch entry with no compiled '
+ f'body/owner: {reason}')
+
+ all_variants = []
+ for part in static_parts:
+ all_variants.extend(part['variants'])
+ dispatch_src = generate_overlay_dispatch(all_variants)
+ written = write_static_outputs(static_out, static_parts, all_variants,
+ dispatch_src,
+ single_file=args.static_single_file)
+ print(f'Static output: {static_out} '
+ f'({len(all_variants)} exact function identities total, '
+ f'{len(written)} translation unit(s))')
+
+ # A conservative primary scan can emit no functions while exact-entry
+ # supplementation still serves every requested root. Decide only after
+ # that pass, using ABI-valid, current-byte guarded native coverage. Missing
+ # even one primary root remains a failure; toolchain/audit failures above
+ # are never cleared by this reconciliation.
+ #
+ # DLL mode only. The reconciliation reads the per-game DLL cache, and
+ # cache_dir is bound only on the non-static path; --static emits one
+ # self-contained overlays_static.c and _do_capture returns into
+ # static_capture_job before anything is queued. Calling it unconditionally
+ # raised UnboundLocalError at the very end of every --static run, after
+ # the output was already written, and turned a clean compile into exit 1.
+ if args.static:
+ if pending_empty_primary:
+ raise SystemExit(
+ 'internal error: --static queued %d empty-primary '
+ 'reconciliation(s), but static mode has no DLL cache to '
+ 'reconcile against' % len(pending_empty_primary))
+ else:
+ reconcile_empty_primary_scans(
+ pending_empty_primary, cache_dir,
+ overlay_abi_tag(args.runtime_include, args.flavor), stats)
+
+ # LOUD summary + machine-readable result line, then a non-zero exit when any
+ # shard that should have built failed. The runtime's autocompile watcher and
+ # any CI/dev invocation now SEE shard failures instead of a green exit 0 that
+ # masked a header-drift breakage. Skips (data-only / already-covered) and a
+ # zero-capture run are NOT failures.
+ n_fail = stats.print_summary()
+ if _check_tmp:
+ import shutil
+ shutil.rmtree(_check_tmp, ignore_errors=True)
+ print(f'[check] removed throwaway dir {_check_tmp}')
+ print('Done.')
+ if n_fail:
+ raise SystemExit(2)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/overlay_toolchain/compiler.txt b/overlay_toolchain/compiler.txt
new file mode 100644
index 00000000..29431468
--- /dev/null
+++ b/overlay_toolchain/compiler.txt
@@ -0,0 +1 @@
+C:\Users\Matthew\.local\share\retcomm\toolchains\cmake-clang-v1\latest\bin\clang.exe
diff --git a/overlay_toolchain/include/audio_shadow.h b/overlay_toolchain/include/audio_shadow.h
new file mode 100644
index 00000000..b20d4ac1
--- /dev/null
+++ b/overlay_toolchain/include/audio_shadow.h
@@ -0,0 +1,95 @@
+/* audio_shadow.h — engine-agnostic HLE-shadow differential verifier (C).
+ *
+ * The gate that makes a "verified-enhancement shadow" SAFE: a higher-fidelity
+ * re-render of a guest audio subsystem (here the PS1 SPU's ADPCM voices, free
+ * of the hardware Gaussian interpolation and 16-bit intermediate truncation)
+ * runs ALONGSIDE the canon hardware mix, never replacing it. This verifier
+ * decides, from the running canon stream, whether the shadow is proven enough
+ * to substitute, and reverts loudly the instant it stops matching:
+ *
+ * - envelope correlation + level-ratio self-check vs the canon stream
+ * - probation auto-gain calibration (constant mixer-scale differences)
+ * - prove-then-substitute, strike-then-pause, escalating re-prove
+ *
+ * The canon (hardware-modeled SPU) output stays the verify oracle; the shadow
+ * is never ground truth. If this verifier is wrong, the worst case is "we keep
+ * playing the authentic hardware mix" — it cannot corrupt output.
+ *
+ * Ported (C) from JRickey/gba-recomp crates/gba-core/src/shadow.rs via the
+ * gbarecomp C++ port (src/gba/audio_shadow.*) and the snesrecomp C port
+ * (runner/src/snes/audio_shadow.*), © Jrickey, MIT OR Apache-2.0, used with
+ * permission. Engine-agnostic; reused across the recomp ecosystem.
+ */
+
+#ifndef PSXRECOMP_AUDIO_SHADOW_H
+#define PSXRECOMP_AUDIO_SHADOW_H
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ SHADOW_JUDGE_NONE = 0, /* mid-window, or canon silent (no verdict) */
+ SHADOW_JUDGE_PASS = 1, /* window passed all gates */
+ SHADOW_JUDGE_FAIL = 2, /* window failed (see fail_structural) */
+} ShadowJudgement;
+
+/* Window/decimation geometry (see the .c for the rationale). */
+#define SHADOW_DECIM 64u
+#define SHADOW_WINDOW 1024u
+#define SHADOW_MAX_LAG 56u
+
+/* Differential self-check: shadow mix vs the canon DAC stream. Polices
+ * STRUCTURE (same notes, same loudness, same time) via rectified-lowpassed
+ * envelopes, decimated and Pearson-correlated over a coarse lag range. */
+typedef struct {
+ float lp_x[2]; /* canon envelope follower (L,R) */
+ float lp_y[2]; /* shadow envelope follower (L,R) */
+ float ex[SHADOW_WINDOW][2]; /* decimated canon envelope */
+ float ey[SHADOW_WINDOW][2]; /* decimated shadow envelope */
+ uint32_t count; /* entries filled in ex/ey this window */
+ uint32_t phase; /* decimation phase */
+ uint32_t strikes;
+} ShadowSelfCheck;
+
+/* The engine-agnostic verification state machine. */
+typedef struct {
+ ShadowSelfCheck check;
+ float gain; /* calibrated output gain (1.0 = stock scale) */
+ bool calibrated;
+ float ratio_hist[3];
+ uint32_t ratio_n;
+ bool proven; /* frontend substitutes only when true */
+ uint32_t prove_need;
+ uint32_t consec_pass;
+ uint64_t pauses;
+ char reverted[160]; /* reason on each pause (caller logs + clears); "" = none */
+ float last_r;
+ float last_ratio;
+ bool fail_structural; /* last Fail broke correlation at an in-band level */
+} ShadowVerifier;
+
+/* Zero-init then call this (sets gain=1, prove_need=1). */
+void shadow_verifier_init(ShadowVerifier* v);
+
+/* Feed one grid sample of (canon, shadow-check-copy) stereo pairs, both in the
+ * canon's normalized domain. Drives calibration, proving, strikes, pauses. */
+ShadowJudgement shadow_verifier_judge(ShadowVerifier* v,
+ float canon_l, float canon_r,
+ float chk_l, float chk_r);
+
+static inline float shadow_verifier_gain(const ShadowVerifier* v) {
+ return v->gain;
+}
+static inline bool shadow_verifier_proven(const ShadowVerifier* v) {
+ return v->proven;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_AUDIO_SHADOW_H */
diff --git a/overlay_toolchain/include/audio_trace.h b/overlay_toolchain/include/audio_trace.h
new file mode 100644
index 00000000..544faaed
--- /dev/null
+++ b/overlay_toolchain/include/audio_trace.h
@@ -0,0 +1,133 @@
+/*
+ * audio_trace.h - audio health counters, event ring and debug PCM history.
+ *
+ * Port of the snesrecomp audio-campaign measurement harness (audio_trace.{c,h},
+ * commit 67ead27 lineage) to the PSX pipeline, following the cross-system tap
+ * model in F:/Projects/_audio_round2/ROUND2_PLAN.md: debug-tool builds keep
+ * always-on ring buffers recording from process start, dumped AFTER the fact via
+ * TCP debug commands — never arm-then-reproduce.
+ *
+ * Taps (PSX pipeline):
+ * AUDIO_TAP_SPU_OUT "T1" — canonical spu_render() output @44100, recorded
+ * inside spu_render so every caller (pump, fade tail) is
+ * covered, PRE any host-side fade/mute gain.
+ * AUDIO_TAP_CD_IN "T2" — decoded XA/CD-DA PCM pushed onto the SPU CD
+ * input bus (already resampled to 44100 by the producer).
+ * AUDIO_TAP_HOST "T3" — the exact bytes handed to the host audio API
+ * (post fade ramps; what SDL_QueueAudio receives).
+ *
+ * The same module compiles into psx-beetle, where AUDIO_TAP_SPU_OUT records
+ * the libretro audio_batch callback — Beetle's fully-mixed reference SPU
+ * output — giving symmetric `audio_*` commands on ports 4370 and 4380.
+ *
+ * Threading: each tap has a single writer. Readers (debug-server thread)
+ * take a stable [oldest, head) snapshot; in debug-tool builds the PCM rings
+ * hold ~95 s at 44100, so a dump cannot be lapped mid-read in practice.
+ * Production PSX_NO_DEBUG_TOOLS builds keep counters/events but compile out
+ * PCM history and WAV dumps. Indices are C11 atomics (release on publish,
+ * acquire on read).
+ */
+#ifndef PSX_AUDIO_TRACE_H
+#define PSX_AUDIO_TRACE_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ AUDIO_TAP_SPU_OUT = 0,
+ AUDIO_TAP_CD_IN = 1,
+ AUDIO_TAP_HOST = 2,
+ AUDIO_TAP_VOICES = 3, /* T0: 24-voice sum only (pre CD mix, pre main) */
+ AUDIO_TAP_COUNT = 4
+};
+
+/* Event kinds. REG_WRITE covers every SPU register store (addr/value), which
+ * subsumes KEYON/KEYOFF/pitch/volume writes — the semantic KON ring stays in
+ * spu.c. The rest instrument the host delivery path. */
+enum {
+ AUDIO_EV_NONE = 0,
+ AUDIO_EV_REG_WRITE = 1, /* a=SPU reg addr, b=value */
+ AUDIO_EV_RENDER = 2, /* a=frames rendered, b=host queued bytes before */
+ AUDIO_EV_PUMP_SKIP = 3, /* backpressure skip; a=queued bytes */
+ AUDIO_EV_UNDERRUN = 4, /* host queue empty at pump entry; a=queued bytes */
+ AUDIO_EV_MUTE = 5, /* turbo mute engaged; a=fade tail frames */
+ AUDIO_EV_UNMUTE = 6, /* pumping resumed; a=fade-in frames pending */
+ AUDIO_EV_CD_PUSH = 7, /* a=guest-cycle clock low32, b=ring fill after */
+ AUDIO_EV_DMA_WRITE = 8, /* SPU RAM DMA; a=words, b=transfer addr after */
+ AUDIO_EV_XA_ZERO = 9, /* zero-run in decoded XA PCM; a=lba,
+ b=(stage<<28)|(start_frame<<14)|run_len.
+ stage 0=post-ADPCM-decode (native rate),
+ stage 1=post-resample+volume (44100). */
+ AUDIO_EV_SINK_DROP = 10, /* turbo host sink; a=guest SPU frames discarded */
+ AUDIO_EV_DMA_READ = 11, /* SPU RAM -> CPU DMA; a=words, b=dest RAM addr */
+};
+
+typedef struct {
+ uint64_t seq; /* monotone event counter */
+ uint64_t sample_idx; /* AUDIO_TAP_SPU_OUT frames produced when recorded */
+ uint32_t frame; /* host-noted frame counter (vblank / retro_run) */
+ uint16_t kind;
+ uint16_t reserved;
+ uint32_t a;
+ uint32_t b;
+} AudioTraceEvent;
+
+typedef struct {
+ /* Per-tap PCM production. */
+ uint64_t tap_frames[AUDIO_TAP_COUNT]; /* frames ever recorded */
+ uint64_t tap_nonzero[AUDIO_TAP_COUNT]; /* frames with |L| or |R| > 0 */
+ uint64_t tap_audible[AUDIO_TAP_COUNT]; /* frames with |L| or |R| > 256 (~ -42 dBFS) */
+ int32_t tap_peak[AUDIO_TAP_COUNT]; /* running peak |sample| */
+ /* Host pump behavior. */
+ uint64_t pump_calls;
+ uint64_t pump_skips; /* backpressure early-outs */
+ uint64_t underruns; /* pump entered with 0 queued bytes (post first audio) */
+ uint32_t queue_hiwater; /* max queued bytes observed at pump entry */
+ uint32_t queue_lowater; /* min queued bytes observed at pump entry (post first audio) */
+ uint64_t mute_events;
+ uint64_t unmute_events;
+ /* Event ring. */
+ uint64_t events_total;
+} AudioTraceStats;
+
+void audio_trace_init(void);
+
+/* Record `frames` interleaved stereo s16 frames into tap `tap`. */
+void audio_trace_pcm(int tap, const int16_t *stereo, int frames);
+
+/* Record a pipeline event (timestamps applied internally). */
+void audio_trace_event(uint16_t kind, uint32_t a, uint32_t b);
+
+/* Host frame tag for event timestamps (call once per vblank / retro_run). */
+void audio_trace_note_frame(uint32_t frame);
+
+void audio_trace_get_stats(AudioTraceStats *out);
+uint64_t audio_trace_tap_total(int tap);
+uint64_t audio_trace_events_total(void);
+
+/* Taps default to 44100 Hz; the host tap may run at the device rate in
+ * bridge/pull mode. The WAV dumper stamps this rate — a mislabeled header
+ * silently poisons every offline A/B. */
+void audio_trace_set_tap_rate(int tap, uint32_t rate);
+uint32_t audio_trace_tap_rate(int tap);
+
+/* Copy the most recent `max` events, oldest first. Returns count copied. */
+uint32_t audio_trace_events_get(AudioTraceEvent *out, uint32_t max);
+
+/* Write a tap slice as a stereo s16 WAV at the tap's rate. start=-1,count=0
+ * dumps the whole currently-buffered ring. `start`/`count` are absolute frame
+ * indices on the tap's production timeline. Returns frames written, or -1 on
+ * error (unwritable path / empty ring / slice already evicted). In
+ * PSX_NO_DEBUG_TOOLS production builds, PCM history is not present and this
+ * returns -1 without creating/opening `path`. */
+int64_t audio_trace_dump_wav(int tap, const char *path,
+ int64_t start, uint64_t count);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSX_AUDIO_TRACE_H */
diff --git a/overlay_toolchain/include/autocompile.h b/overlay_toolchain/include/autocompile.h
new file mode 100644
index 00000000..0db386ec
--- /dev/null
+++ b/overlay_toolchain/include/autocompile.h
@@ -0,0 +1,74 @@
+/* autocompile.h — background overlay compile for variant-capture automation
+ * (step 2.8). Spawns the configured compile command (compile_overlays.py
+ * invocation from game.toml [runtime] overlay_autocompile_cmd) after an
+ * automatic capture, collects its output into an in-memory ring (no log
+ * files — CLAUDE.md §3; read it via the autocompile_status TCP command),
+ * and on success has the emu thread rescan the overlay-DLL cache so the new
+ * variant goes native in-session, without a restart. */
+#ifndef PSXRECOMP_AUTOCOMPILE_H
+#define PSXRECOMP_AUTOCOMPILE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Store the command line + working directory. Empty cmd disables. */
+void autocompile_configure(const char *cmd, const char *cwd);
+int autocompile_configured(void);
+
+/* Pin the canonical overlay cache dir + captures file the LOADER actually uses
+ * (/cache and /overlay_captures.json — computed once in main.cpp).
+ * autocompile injects these into every spawned compile via the environment
+ * (PSX_OVERLAY_CACHE_DIR / PSX_OVERLAY_CAPTURES), so the WRITE cache and the
+ * READ captures can never diverge from where the loader reads — for every game,
+ * dev or prod, gcc or tcc. compile_overlays.py / coverage_vault.py honor these
+ * over any CLI --out-dir/--captures. This is the single source of truth for the
+ * cache location: no per-game config, no drift. */
+void autocompile_set_cache_paths(const char *cache_dir, const char *captures);
+
+/* Probe whether a C compiler is actually reachable on PATH (gcc/cc/clang) — the
+ * REAL "developer machine" signal, distinct from autocompile_configured() which
+ * only reports that a command STRING is set (the shipped game.toml always sets
+ * one). overlay_backend_resolve uses this so `auto` picks gcc only when the
+ * toolchain can really build a shard, else tcc (toolchain-less production).
+ * Memoized; safe to call repeatedly. */
+int autocompile_toolchain_available(void);
+
+/* 1 while a compile process is running. */
+int autocompile_busy(void);
+
+/* Kick a compile if configured and idle. Returns 1 if started. */
+int autocompile_request(void);
+
+/* Emu-thread tick: applies a finished compile (cache rescan on success).
+ * Must be called from the same thread that owns the overlay loader. */
+void autocompile_poll_main(void);
+
+/* Process-shutdown teardown, emu thread only: stops the publication pipeline,
+ * kills the compiler process tree (job object), and JOINS the watcher and
+ * preparer threads — waiting out any in-flight LoadLibrary rather than
+ * abandoning a thread inside the Windows loader lock (which can deadlock
+ * ExitProcess). Safe to call in any state, including mid-run; idempotent. */
+void autocompile_shutdown(void);
+
+/* JSON status blob for the debug server: state, run/fail counters, last
+ * exit code, and the output tail. Returns bytes written. */
+int autocompile_status_json(char *out, int cap);
+
+/* Why overlay autocompile cannot work, or NULL if nothing is known to be wrong.
+ *
+ * When this is non-NULL, no shard will ever be compiled and overlay execution
+ * stays in the interpreter — the run is valid but its performance is
+ * meaningless. Callers that report timings should say so rather than publish a
+ * number measured in that state.
+ *
+ * This exists because the equivalent warnings are written to stdout and the
+ * shipped runtime links -mwindows, so they reach nobody. `autocompile_status`
+ * carries this out over the TCP debug server as "degraded"/"degraded_reason". */
+const char *autocompile_degraded_reason(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_AUTOCOMPILE_H */
diff --git a/overlay_toolchain/include/beetle_history.h b/overlay_toolchain/include/beetle_history.h
new file mode 100644
index 00000000..b1467c90
--- /dev/null
+++ b/overlay_toolchain/include/beetle_history.h
@@ -0,0 +1,88 @@
+/* beetle_history.h — psx-beetle per-frame snapshot ring.
+ *
+ * Mirrors runtime/src/debug_server.c's PSXFrameRecord history so beetle
+ * exposes the SAME time-series surface as psx-runtime: history,
+ * get_frame, frame_range, frame_timeseries, first_failure,
+ * read_frame_ram, set_snapshot, get_snapshots.
+ *
+ * Capacity matches the runtime side (36000 frames ~= 10 min @ 60 Hz)
+ * so cross-backend tooling can assume identical retention windows.
+ *
+ * The record fields are a strict subset of PSXFrameRecord — the fields
+ * recomp can populate but beetle cannot (e.g. dispatch_count tied to
+ * psx_dispatch() call gates) are left zero and explicitly documented
+ * so consumers see real-vs-stub at a glance.
+ */
+#ifndef PSXRECOMP_BEETLE_HISTORY_H
+#define PSXRECOMP_BEETLE_HISTORY_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define BEETLE_FRAME_HISTORY_CAP 36000
+#define BEETLE_RAM_SNAPSHOT_REGIONS 4
+#define BEETLE_RAM_SNAPSHOT_SIZE 128
+
+typedef struct {
+ uint32_t frame_number;
+ int verify_pass; /* -1: not checked (no verify mode on beetle today) */
+ int diff_count; /* 0 */
+
+ /* MIPS CPU state (read via PSX_CPU::GetRegister). */
+ uint32_t gpr[32];
+ uint32_t hi, lo;
+ uint32_t cop0_sr;
+ uint32_t cop0_cause;
+ uint32_t cop0_epc;
+
+ /* Interrupt controller (IRQ_GetRegister). */
+ uint32_t i_stat;
+ uint32_t i_mask;
+
+ /* GPU display state (PS_GPU fields). */
+ uint16_t display_area_x, display_area_y;
+ uint16_t display_w, display_h;
+ uint8_t display_disabled;
+
+ /* SIO / pad. pad_buttons mirrors recomp's pad_buttons word. */
+ uint16_t pad_buttons;
+ uint16_t sio_stat;
+ uint16_t sio_ctrl;
+
+ /* Timing (left as stubs on beetle for now; documented). */
+ uint32_t dispatch_count;
+ uint64_t total_dispatches; /* mirrors frame_number on beetle */
+
+ /* Per-frame configurable RAM snapshot regions (MainRAM byte copies). */
+ uint32_t snapshot_addr[BEETLE_RAM_SNAPSHOT_REGIONS];
+ uint8_t snapshot_data[BEETLE_RAM_SNAPSHOT_REGIONS][BEETLE_RAM_SNAPSHOT_SIZE];
+} BeetleFrameRecord;
+
+/* ---- Lifecycle hooks (called from beetle_libretro.cpp) ---- */
+void beetle_history_init(void);
+void beetle_history_record_frame(void);
+
+/* ---- Query surface (called from beetle_debug_server.c) ----
+ * All "frame" parameters are absolute frame numbers (0..s_history_count-1).
+ * Frames older than (s_history_count - cap) are evicted and look like
+ * "not available" in the per-frame APIs. */
+
+void beetle_history_get_bounds(uint64_t *out_count,
+ uint64_t *out_oldest,
+ uint64_t *out_newest);
+
+const BeetleFrameRecord *beetle_history_get_frame(uint32_t frame);
+
+int beetle_history_first_failure(uint32_t *out_frame, int *out_diff_count);
+
+int beetle_history_set_snapshot(int slot, uint32_t addr);
+int beetle_history_get_snapshot(int slot, uint32_t *out_addr, int *out_active);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_BEETLE_HISTORY_H */
diff --git a/overlay_toolchain/include/bios_hle.h b/overlay_toolchain/include/bios_hle.h
new file mode 100644
index 00000000..f9547eb8
--- /dev/null
+++ b/overlay_toolchain/include/bios_hle.h
@@ -0,0 +1,122 @@
+/* bios_hle.h — opt-in High-Level Emulation tier for PSX BIOS kernel services.
+ *
+ * CLAUDE.md §0 AMENDMENT 2026-07-02 (the gbarecomp model, see the sibling
+ * gbarecomp project's src/runtime/bios_hle.h): the recompiled real
+ * BIOS (LLE) is the DEFAULT, the reference implementation, and the
+ * correctness/timing oracle. HLE is an *alternative backend*, selected
+ * per-game via `[runtime] bios_hle = true` in game.toml (PSX_BIOS_HLE env
+ * override). Every kernel service the HLE layer does not implement
+ * transparently falls through to the recompiled BIOS, so HLE is never
+ * load-bearing beyond what it covers and never becomes the oracle.
+ *
+ * Mechanism: psx_bios_hle_configure() installs (or leaves NULL) the dispatch
+ * hook g_psx_bios_hle_hook consulted at the top of every psx_dispatch_impl
+ * iteration (emitted by full_function_emitter.cpp), BEFORE any backend claims
+ * the target. The hook sees the pre-normalize physical address; when the
+ * target is a kernel service vector (0xA0/0xB0/0xC0, function number in $t1)
+ * and the service is implemented, the handler computes its effect directly on
+ * guest state (the REAL kernel structures in guest RAM — EvCB table etc., per
+ * docs/psx_bios_disasm.txt + the SCPH1001 kernel disassembly), charges an
+ * approximate cycle cost, and returns 1: the guest resumes at $ra with no
+ * BIOS dispatch. NULL hook (default) = pure LLE, byte-identical dispatch.
+ *
+ * Boot HLE: with the tier on (and no keep-intro opt-out) the hook also
+ * intercepts the first dispatch of the BIOS SHELL entry (RAM 0x30000 — the
+ * boot animation; LoadRunShell's indirect `0x80030000()` call always routes
+ * through the dispatcher) and returns immediately, so BIOS Main() proceeds
+ * straight to step 8 (SYSTEM.CNF + game EXE load) with kernel state built
+ * entirely by the REAL recompiled kernel init. The frontend runs unpaced
+ * (turbo) until game handoff. This is THE boot-skip mechanism; it deprecates
+ * the old fast_boot snapshot restore.
+ *
+ * The boot-skip is BIOS-INDEPENDENT and works under pure LLE. It needs only
+ * the image's shell_entry_phys anchor — nothing is synthesized, the shell call
+ * just returns immediately — so it fires identically on retail SCPH-1001 and
+ * on the bundled OpenBIOS, whose kernel-call HLE is separately (and correctly)
+ * refused for want of a DeliverEvent anchor. bios_hle_plan.h documents why the
+ * two axes must not be collapsed; deriving the skip from the granted call-HLE
+ * axis is exactly the bug that made the flag mean different things per BIOS.
+ * With the tier fully off, LLE plays the real intro.
+ *
+ * NO-STUBS STANDS: every handler here is a validated reimplementation of the
+ * documented kernel mechanism operating on the real guest structures — never
+ * a "return the answer" fake. Timing is approximate (documented limitation;
+ * LLE remains the timing oracle).
+ *
+ * Observability (CLAUDE.md rule 3 + the global ring-buffer rule): every hook
+ * decision is recorded in an always-on ring queryable over the TCP debug
+ * server ("hle_dump"), never armed, never polled.
+ */
+#ifndef PSXRECOMP_BIOS_HLE_H
+#define PSXRECOMP_BIOS_HLE_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct CPUState;
+
+/* The dispatch hook slot the generated trampoline consults (defined in
+ * bios_hle.c, emitted-extern by full_function_emitter.cpp). NULL = pure LLE. */
+extern int (*g_psx_bios_hle_hook)(struct CPUState* cpu, uint32_t phys);
+
+/* Select the BIOS backend. Call at bring-up (and again on netplay rematch
+ * session_reboot), after config + env resolution, before psx_scheduler_run.
+ * Two independent axes — decide them with psx_bios_hle_plan() (bios_hle_plan.h)
+ * rather than open-coding the policy at the call site:
+ * call_hle — service implemented kernel calls in HLE ([runtime] bios_hle);
+ * requires the image's deliver_event_ret anchor
+ * boot_skip — one-shot shell intercept ((bios_hle && !keep_intro) OR the
+ * deprecated fast_boot alias, which skips boot only); requires
+ * only the image's shell_entry_phys anchor, and is clamped to it
+ * here so the reported state cannot overstate what can fire
+ * Clears the shell-skip latch so rematch can skip again. The hook is installed
+ * when either axis is on; both off = NULL = pure LLE. */
+void psx_bios_hle_configure(int call_hle, int boot_skip);
+
+int psx_bios_hle_enabled(void);
+int psx_bios_hle_boot_skip_enabled(void);
+const char* psx_bios_hle_backend_name(void); /* startup banner */
+
+/* True while the HLE boot-skip is driving the frontend unpaced: boot skip
+ * enabled and the game entry PC has not yet been dispatched. main.cpp ORs
+ * this into the turbo predicate so kernel init + EXE load run at host speed. */
+int psx_bios_hle_boot_turbo_active(void);
+
+/* ── Always-on HLE ring (queried by debug_server "hle_dump") ─────────────── */
+
+enum {
+ PSX_HLE_ROUTE_LLE = 0, /* vector call seen, fell through to recompiled BIOS */
+ PSX_HLE_ROUTE_HLE = 1, /* serviced in HLE */
+ PSX_HLE_ROUTE_BOOT = 2, /* boot shell-skip fired */
+};
+
+typedef struct PsxHleCallEntry {
+ uint64_t seq;
+ uint64_t cycle; /* psx_cycle_count at record time (first occurrence) */
+ uint64_t cycle_last; /* psx_cycle_count of the most recent collapsed repeat */
+ uint32_t vector; /* 0xA0/0xB0/0xC0, or 0x30000 for the boot skip */
+ uint32_t fn; /* $t1 function number (0 for boot skip) */
+ uint32_t a0, a1, a2, a3;
+ uint32_t ra;
+ uint32_t v0; /* result for HLE-serviced calls (0 otherwise) */
+ uint32_t repeat; /* consecutive identical calls collapsed into this entry */
+ uint32_t tcb; /* current guest thread: [[0x108]] at call time (0 if unset) */
+ uint8_t route; /* PSX_HLE_ROUTE_* */
+ uint8_t in_exc; /* recorded inside guest exception context */
+} PsxHleCallEntry;
+
+#define PSX_HLE_RING_CAP 16384 /* power of two */
+
+/* Snapshot accessors: seq is the total number of records ever written; entry
+ * i (seq-CAP .. seq-1 valid window) returns the ring slot for that sequence. */
+uint64_t psx_hle_ring_seq(void);
+const PsxHleCallEntry* psx_hle_ring_entry(uint64_t seq_index);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_BIOS_HLE_H */
diff --git a/overlay_toolchain/include/bios_hle_plan.h b/overlay_toolchain/include/bios_hle_plan.h
new file mode 100644
index 00000000..5950b422
--- /dev/null
+++ b/overlay_toolchain/include/bios_hle_plan.h
@@ -0,0 +1,74 @@
+/* bios_hle_plan.h — the ONE place the BIOS-backend axes are decided.
+ *
+ * The HLE tier has two INDEPENDENT axes, and conflating them was a real bug:
+ *
+ * call_hle — service implemented kernel calls (B0 events) in HLE instead of
+ * the recompiled BIOS. Needs the per-image `deliver_event_ret`
+ * anchor, because a delivered callback has to return through the
+ * exact $ra the kernel's DeliverEvent loop uses. An image that
+ * does not export it CANNOT run call-HLE at all.
+ *
+ * boot_skip — the one-shot shell intercept that skips the BIOS boot animation
+ * and lets Main() proceed straight to SYSTEM.CNF + game EXE load.
+ * Needs only the per-image `shell_entry_phys` anchor, and works
+ * under pure LLE: nothing is synthesized, the shell call simply
+ * returns immediately, exactly as if the player had let the disc
+ * menu exit on its own.
+ *
+ * THE BUG THIS MODULE FIXES (2026-07-27). main.cpp used to force the requested
+ * `bios_hle` flag to false when an image exported no `deliver_event_ret` (the
+ * correct call-HLE decision), and THEN derived boot_skip from that already-
+ * mutated flag. So on OpenBIOS — which deliberately omits deliver_event_ret
+ * until its B0 semantics are validated, but does export shell_entry_phys — the
+ * player's boot-skip silently stopped working: choosing OpenBIOS sat the player
+ * in the boot animation while the same build on retail SCPH-1001 went straight
+ * to the game. One flag, two behaviours, depending on a BIOS detail no player
+ * can see.
+ *
+ * The rule is now explicit and image-independent: `bios_hle` (or the deprecated
+ * `fast_boot` alias) means "skip the BIOS boot and go to the game", on EVERY
+ * BIOS that exports a shell entry. Whether the same flag additionally routes
+ * kernel calls through HLE is a separate, anchor-gated question.
+ *
+ * Kept dependency-free (no CPUState, no psx_bios_image, no runtime globals) so
+ * the whole decision matrix is unit-tested directly — see
+ * runtime/tests/test_bios_hle_plan.c.
+ */
+#ifndef PSXRECOMP_BIOS_HLE_PLAN_H
+#define PSXRECOMP_BIOS_HLE_PLAN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* What the config/env asked for, plus what the linked BIOS image can support. */
+typedef struct PsxBiosHleRequest {
+ /* ---- requested (game.toml [runtime] / settings.toml / env) ---- */
+ int bios_hle; /* [runtime] bios_hle, PSX_BIOS_HLE */
+ int keep_intro; /* bios_hle_keep_intro, PSX_BIOS_HLE_KEEP_INTRO */
+ int fast_boot; /* deprecated alias: boot-skip only, never call-HLE */
+ /* ---- capabilities of the SELECTED backend (psx_bios_image anchors) ---- */
+ int have_deliver_event_ret; /* image exports the DeliverEvent $ra anchor */
+ int have_shell_entry; /* image exports the shell entry PC */
+ /* ---- session shape ---- */
+ int have_game_entry; /* a game EXE is loaded (0 = BIOS-only run) */
+} PsxBiosHleRequest;
+
+typedef struct PsxBiosHlePlan {
+ int call_hle; /* pass to psx_bios_hle_configure() as call_hle */
+ int boot_skip; /* pass to psx_bios_hle_configure() as boot_skip */
+ /* Denial flags: the feature was asked for and is being refused because the
+ * SELECTED image cannot support it. Purely for the startup banner — a
+ * silent downgrade is what made the original bug invisible. */
+ int call_hle_denied;
+ int boot_skip_denied;
+} PsxBiosHlePlan;
+
+/* Pure function: same request in, same plan out, no globals touched. */
+PsxBiosHlePlan psx_bios_hle_plan(PsxBiosHleRequest req);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_BIOS_HLE_PLAN_H */
diff --git a/overlay_toolchain/include/boot_state.h b/overlay_toolchain/include/boot_state.h
new file mode 100644
index 00000000..27a94b44
--- /dev/null
+++ b/overlay_toolchain/include/boot_state.h
@@ -0,0 +1,168 @@
+#ifndef PSX_BOOT_STATE_H
+#define PSX_BOOT_STATE_H
+
+#include
+#include
+#include "cpu_state.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Boot snapshot (a.k.a. fast_boot) — a COMPLETE post-BIOS save-state.
+ *
+ * Model: first launch (and the first launch after ANY app/recompiler update)
+ * runs the real recompiled BIOS normally, logos and all. At the moment the BIOS
+ * dispatches into the game's PS-EXE entry_pc, we capture a complete hardware
+ * snapshot. Every subsequent launch (same build) restores that snapshot and
+ * presents the game's first frame — instant boot, no BIOS, no logos.
+ *
+ * This is NOT HLE: it persists the REAL hardware state produced by a real BIOS
+ * run, then replays it. Nothing about BIOS behaviour is synthesized.
+ *
+ * Rebuild-proof: the file carries an integrity key (below) that includes the
+ * codegen hash + ABI tag + codegen version. A user update changes those, so a
+ * stale snapshot can NEVER silently load into a new build — it is rejected and
+ * the next boot is a normal boot that recaptures. Graceful, automatic.
+ *
+ * Completeness is mandatory (v4 no-stub rule): a partial capture that leaves a
+ * subsystem at reset while CPU/RAM assume it was configured is a latent stub.
+ * Every mutable hardware subsystem gets a section here, and the capture is
+ * proven complete by diffing a restored session's frames against a normal-boot
+ * session's frames (see the "bootsnap" debug command). Host-side / recompiler-
+ * derived state (dirty-RAM bitmap, overlay tables, debug rings) is NOT
+ * serialized — it is re-derived from restored guest RAM on load.
+ */
+
+#define BOOT_STATE_MAGIC 0x50535842u /* "PSXB" */
+/* v1 = incomplete RAM-only; v2 = full machine but host-struct memcpy (padding);
+ * v3 = little-endian field wire (portable Win/Linux/macOS ARM);
+ * v4 = v3 + optional zlib on large sections (section pad bit0 = compressed);
+ * v5 = v4 + CD-ROM Sub-Q replacement state;
+ * v6 = v5 + per-word GPU DMA2 linked-list progress;
+ * v7 = v6 + pending XA DATA_END IRQ state. */
+#define BOOT_STATE_VERSION 9u
+/* v8 added allocated enhancement memory (vanilla v8-era writers kept v7); older
+ * runtimes must not accept enhanced snapshots while ignoring their arenas. */
+/* v9 persists the BIOS-to-game handoff latch. Engine overlays may have
+ * replaced the original entry code by the time a gameplay state is loaded. */
+/* v7 intentionally breaks older savestates after the CD-ROM wire grew. Reject
+ * them at the header before any section changes the live machine. */
+#define BOOT_STATE_VERSION_MIN_READ 7u
+/* Section pad bit0: payload is u32 LE uncompressed_len + zlib deflate bytes. */
+#define BOOT_STATE_SEC_ZLIB 1u
+
+/*
+ * On-disk header (v3): nine little-endian uint32 fields at offset 0 (36 bytes),
+ * followed by the section stream. ALL key fields must match the running build
+ * or the snapshot is rejected. Do not fwrite() this struct — use pst_wire.
+ */
+typedef struct {
+ uint32_t magic; /* BOOT_STATE_MAGIC */
+ uint32_t version; /* BOOT_STATE_VERSION */
+ /* ---- integrity key (every field must match to accept) ---- */
+ uint32_t bios_checksum; /* sum of all uint32 words in the BIOS ROM */
+ uint32_t entry_pc; /* game PS-EXE entry PC */
+ uint32_t codegen_hash; /* PSX_OVERLAY_CODEGEN_HASH (auto-gen by cmake) */
+ int32_t abi_tag; /* PSX_OVERLAY_ABI_TAG (abi version | flavor<<16) */
+ uint32_t codegen_ver; /* PSX_OVERLAY_CODEGEN_VER */
+ /* ---- layout ---- */
+ uint32_t section_count; /* number of sections that follow */
+ uint32_t reserved; /* v8: enhancement-memory layout cookie; vanilla 0 */
+} BootStateHeader;
+
+#define BOOT_STATE_HEADER_WIRE_BYTES 36u
+
+/*
+ * Section stream (v3/v4): section_count records, each laid out as
+ * uint32_t tag; LE (one of BS_SEC_*)
+ * uint32_t pad; LE flags (v3: 0; v4: BOOT_STATE_SEC_ZLIB optional)
+ * uint64_t len; LE payload byte count
+ * uint8_t payload[len]; (module payloads are LE field wires too)
+ * When BOOT_STATE_SEC_ZLIB is set, payload = u32 LE raw_len + zlib(raw).
+ * Unknown tags are skipped for forward compatibility. A malformed known section
+ * or a missing required section on load is a hard reject (incomplete restore is
+ * never allowed) -> normal boot + recapture.
+ */
+enum {
+ BS_SEC_GAME_START = 0x12, /* u32 LE boolean: BIOS-to-game handoff completed */
+ BS_SEC_MODMEM = 0x11, /* allocated opt-in CPU/GPU enhancement arenas */
+ BS_SEC_CPU = 0x01, /* CPUState: gpr/pc/hi/lo/cop0/gte_data/gte_ctrl */
+ BS_SEC_RAM = 0x02, /* 2 MB main RAM */
+ BS_SEC_SPAD = 0x03, /* 1 KB scratchpad */
+ BS_SEC_IRQ = 0x04, /* i_stat / i_mask / cycles_since_vblank (12B; 8B ok) */
+ BS_SEC_TIMER = 0x05, /* 3 root counters (counter/mode/target/irq/frac) */
+ BS_SEC_CLOCK = 0x06, /* psx_cycle_count */
+ BS_SEC_GPU = 0x07, /* GPU regs: display/draw-area/offset/mask/texpage/xfer*/
+ BS_SEC_VRAM = 0x08, /* 1 MB VRAM (1024x512x16) */
+ BS_SEC_SPU = 0x09, /* SPU regs + 24 voice decode/ADSR state + latches */
+ BS_SEC_SPURAM = 0x0A, /* 512 KB SPU RAM */
+ BS_SEC_CDROM = 0x0B, /* CD-ROM controller FSM (regs/FIFOs/seek/read/pending)*/
+ BS_SEC_DMA = 0x0C, /* DMA channels[7] + dpcr/dicr + async-transfer state */
+ BS_SEC_SIO = 0x0D, /* SIO regs + pad-config FSM + memcard FSM */
+ BS_SEC_DIRTY = 0x0E, /* dirty-RAM page bitmap (guest-written code pages) */
+ BS_SEC_MDEC = 0x0F, /* MDEC command/FIFOs/quant/scale (FMV decode resume) */
+ BS_SEC_ICACHE = 0x10, /* R3000A I-cache tag/valid words (1024 u32) — fetch
+ cost model. Host-persistent otherwise: a warm load
+ without it replays with the pre-load timeline's
+ cache, so fetch-miss cycles differ per peer/retry
+ and IRQ delivery lands a few wait-loop iterations
+ apart (MotK abort@940: fin cyc Δ8, v0 5c83/5c86
+ from identical baselines). Optional on load for
+ old blobs (left untouched when absent). */
+};
+
+/* Save a COMPLETE snapshot at game handoff. Returns 1 on success. */
+int boot_state_save(const CPUState* cpu, uint32_t bios_checksum,
+ uint32_t entry_pc, const char* path);
+
+/* Same as boot_state_save, but into a malloc'd buffer (caller frees *out_data).
+ * Compresses large sections (disk-oriented). */
+int boot_state_save_buffer(const CPUState* cpu, uint32_t bios_checksum,
+ uint32_t entry_pc, uint8_t** out_data,
+ size_t* out_len);
+
+/* In-memory ring snaps: same sections, no zlib. Load accepts either form.
+ * Avoids compress2 on ~3.5 MiB RAM+VRAM+SPU every live/resim snap (FPS). */
+int boot_state_save_buffer_raw(const CPUState* cpu, uint32_t bios_checksum,
+ uint32_t entry_pc, uint8_t** out_data,
+ size_t* out_len);
+
+/* §96 telemetry: after the latest save, how many VRAM scanlines were dirty
+ * and whether the incremental mirror path patched (vs full memcpy). */
+uint32_t boot_state_last_vram_dirty_rows(void);
+int boot_state_last_vram_incremental(void);
+
+/* Drop the §96 VRAM mirror (RB shutdown / before re-enable). */
+void boot_state_vram_mirror_reset(void);
+
+/* Load + validate (integrity key) + restore the full machine. On any mismatch
+ * or incompleteness returns 0 (caller then boots normally and recaptures). */
+int boot_state_load(const char* path, uint32_t bios_checksum,
+ uint32_t entry_pc, CPUState* cpu);
+
+/* Same as boot_state_load, but from an already-buffered .pst image (netplay). */
+int boot_state_load_buffer(const uint8_t* file, size_t file_len,
+ uint32_t bios_checksum, uint32_t entry_pc,
+ CPUState* cpu);
+
+/* Header-only integrity check (no section inflate/apply). Returns 1 if this
+ * build can load the image; 0 and fills reason (when non-NULL) on reject. */
+int boot_state_check_buffer(const uint8_t* file, size_t file_len,
+ uint32_t bios_checksum, uint32_t entry_pc,
+ char* reason, size_t reason_cap);
+
+/* Register a deferred capture: when boot_state_trigger_capture() fires (from
+ * fntrace at game-start), serialize to path. One-shot. */
+void boot_state_set_capture(const char* path, uint32_t bios_checksum,
+ uint32_t entry_pc);
+
+/* Called from fntrace when the game entry PC first dispatches. */
+void boot_state_trigger_capture(const CPUState* cpu);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSX_BOOT_STATE_H */
diff --git a/overlay_toolchain/include/card_data_writes.h b/overlay_toolchain/include/card_data_writes.h
new file mode 100644
index 00000000..1ed87910
--- /dev/null
+++ b/overlay_toolchain/include/card_data_writes.h
@@ -0,0 +1,70 @@
+/*
+ * card_data_writes.h — always-on capture of where the BIOS stores
+ * incoming SIO data bytes during memory-card READ_DATA.
+ *
+ * The chain handler reads each byte from 0x1F801040 (SIO_RX_DATA) and
+ * stores it into a destination buffer in RAM. We capture (cycle, addr,
+ * value, mc_state, mc_data_idx, store_pc, func_addr) for every byte
+ * that lands in RAM during a card data phase.
+ *
+ * Mechanism:
+ * - sio_read(0x1F801040) sets a "pending" flag when mc_state is in
+ * READ_DATA..READ_END and active_device==DEV_MEMCARD.
+ * - The next byte/halfword/word RAM write whose new_val matches the
+ * armed RX value is captured into the ring; the flag is cleared.
+ * - Non-matching writes between read and store don't disarm us.
+ *
+ * Ring is non-evicting up to CARD_DATA_WRITES_CAP, then keeps a
+ * rolling tail (so we never lose the LATEST writes). For first-32-
+ * read audit, this gives ~32*128=4096 byte writes — enough to see
+ * the full destination buffer for several consecutive reads.
+ */
+#ifndef PSXRECOMP_CARD_DATA_WRITES_H
+#define PSXRECOMP_CARD_DATA_WRITES_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CARD_DATA_WRITES_CAP 4096
+
+typedef struct {
+ uint64_t seq; /* monotonic across all entries */
+ uint64_t psx_cycle_count;
+ uint32_t addr; /* dest physical RAM address */
+ uint32_t store_pc; /* g_debug_last_store_pc when stored */
+ uint32_t func_addr; /* g_debug_current_func_addr */
+ uint32_t value; /* value written (zero-extended) */
+ uint16_t mc_state_at_read; /* mc_state at the SIO read */
+ uint8_t mc_data_idx_at_read; /* mc_data_idx at the SIO read (0..127) */
+ uint8_t width; /* 1, 2, or 4 */
+ uint8_t slot; /* mc_slot at read */
+ uint8_t pad0;
+ uint8_t pad1;
+ uint8_t pad2;
+} CardDataWriteEntry;
+
+/* Called from sio_read(0x1F801040) inside the MC_READ_DATA..READ_END
+ * window. Records the byte we just delivered to BIOS so the next
+ * matching RAM write can be tagged. */
+void card_data_writes_arm(uint8_t value, uint16_t mc_state,
+ uint8_t mc_data_idx, uint8_t slot);
+
+/* Called from psx_write_byte/half/word. If armed and value matches
+ * the armed RX byte, record + disarm. Returns 1 if captured, 0
+ * otherwise. */
+int card_data_writes_check(uint32_t phys, uint32_t value, uint8_t width);
+
+uint32_t card_data_writes_get(const CardDataWriteEntry **buf_out,
+ uint64_t *total_seq_out,
+ uint32_t *head_out);
+
+void card_data_writes_reset(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_CARD_DATA_WRITES_H */
diff --git a/overlay_toolchain/include/card_read_summary.h b/overlay_toolchain/include/card_read_summary.h
new file mode 100644
index 00000000..8feef597
--- /dev/null
+++ b/overlay_toolchain/include/card_read_summary.h
@@ -0,0 +1,61 @@
+/*
+ * card_read_summary.h — non-evicting evidence ring for the first 32
+ * completed memory-card reads.
+ *
+ * The card-txn ring (256 entries, evicting) covers recent activity
+ * but the long history is gone by the time we audit. This ring is
+ * fixed-size and STOPS recording after 32 entries, so the FIRST 32
+ * successful reads post-CROSS are preserved indefinitely.
+ *
+ * Each entry captures the SIO-layer evidence at the MC_READ_END
+ * transition: slot/cmd/sector/checksum/first 16 bytes/cycle counts/
+ * caller function. The destination RAM pointer is filled in later
+ * by the chain-handler trace (Phase 3).
+ */
+#ifndef PSXRECOMP_CARD_READ_SUMMARY_H
+#define PSXRECOMP_CARD_READ_SUMMARY_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CARD_READ_SUMMARY_CAP 32
+#define CARD_READ_SUMMARY_PEEK 16 /* bytes captured from start of buffer */
+
+typedef struct {
+ uint64_t seq; /* monotonic; first record = 0 */
+ uint64_t psx_cycle_count; /* guest cycle clock at completion */
+ uint32_t current_func; /* g_debug_current_func_addr at MC_READ_END */
+ uint32_t last_store_pc; /* g_debug_last_store_pc at MC_READ_END */
+ uint16_t sector;
+ uint8_t slot;
+ uint8_t cmd; /* mc_cmd at completion (e.g. 0x52) */
+ uint8_t checksum_card; /* simulated card's computed checksum */
+ uint8_t data_idx_at_end; /* should be 128 for clean READ_END */
+ uint8_t pad0;
+ uint8_t pad1;
+ uint32_t dest_ram_addr; /* filled by chain-handler trace; 0 if unknown */
+ uint8_t data_peek[CARD_READ_SUMMARY_PEEK];
+} CardReadSummary;
+
+void card_read_summary_record(uint8_t slot, uint8_t cmd, uint16_t sector,
+ uint8_t checksum, uint8_t data_idx,
+ const uint8_t *data128);
+
+/* Read access for debug_server. Returns count of recorded entries. */
+uint32_t card_read_summary_get(const CardReadSummary **buf_out);
+
+/* Reset the ring (for clean audit re-runs). */
+void card_read_summary_reset(void);
+
+/* Late-fill the destination RAM pointer for the most recent record.
+ * Called by chain-handler trace once the BIOS commits the byte to RAM. */
+void card_read_summary_set_dest(uint32_t dest_addr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_CARD_READ_SUMMARY_H */
diff --git a/overlay_toolchain/include/cdrom.h b/overlay_toolchain/include/cdrom.h
new file mode 100644
index 00000000..5a33b389
--- /dev/null
+++ b/overlay_toolchain/include/cdrom.h
@@ -0,0 +1,352 @@
+#ifndef PSXRECOMP_CDROM_H
+#define PSXRECOMP_CDROM_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void cdrom_init(const char* cue_path);
+
+/* Did cdrom_init() actually mount an image? 0 = the drive is empty.
+ *
+ * cdrom_init() is deliberately non-fatal when iso_open() fails (a BIOS-only
+ * target legitimately runs with no disc), so a game that was GIVEN a disc path
+ * whose image could not be mounted would otherwise boot straight into an empty
+ * drive and render nothing -- a black screen with no explanation. Callers that
+ * passed a real path must check this and report. */
+int cdrom_has_disc(void);
+/* Disc license region for GetID ("SCEE"/"SCEA"/"SCEI"); derived from the
+ * mounted disc's boot serial at launch. Defaults to "SCEA" (SCPH1001). */
+void cdrom_set_disc_scex(const char scex[4]);
+
+/* Set disc speed multiplier immediately. divisor=0 → instant, 1 → 1x, 2 → 2x. */
+void cdrom_set_speed(int divisor);
+/* Store configured game speed (applied post-BIOS via cdrom_notify_game_started). */
+void cdrom_set_game_speed(int divisor);
+/* Called by fntrace on first game-range dispatch; switches to game speed. */
+void cdrom_notify_game_started(void);
+/* LBA of the most recent SetLoc command (-1 if none yet). Used by the DMA
+ * ring buffer to correlate each sector transfer with its disc position. */
+int cdrom_get_setloc_lba(void);
+
+/* 'instant' per-frame sector-IRQ budget (step 3). Clamped to [1, 4096];
+ * the per-sector period additionally floors at CDROM_MIN_DELAY. Writers:
+ * game.toml [runtime] instant_max_per_frame, the cdrom_instant_rate TCP
+ * command, and the turbo-through-loads predicate (step 4). */
+void cdrom_set_instant_rate(int per_frame);
+int cdrom_get_instant_rate(void);
+
+/* Strict, config-driven warm-load route accelerator. Up to 16 routes may be
+ * registered after cdrom_init. A route arms only after arm_lba and activates
+ * only if the following SetLoc values match lbas in order. Any mismatch
+ * restores normal disc timing. Only non-XA read cadence is accelerated. */
+void cdrom_register_warm_route(int arm_lba, const int* lbas, int count,
+ int instant_max_per_frame);
+void cdrom_warm_route_set_enabled(int enabled);
+void cdrom_warm_route_stats_json(char* out, int cap);
+
+/* Passive physical-deadline -> buffer -> INT1 exposure telemetry (L1.5).
+ * Diagnostics only: recording never changes CD scheduling or delivery. */
+void cdrom_timing_reset(void);
+void cdrom_timing_stats_json(char* out, int cap);
+int cdrom_get_delivered_lba(void);
+
+/* Per-record view of the same ring, for localising a single lost/skipped
+ * sector rather than summarising thousands. */
+typedef struct CdTimingPub {
+ uint64_t seq;
+ uint64_t due_cycle;
+ uint64_t buffer_cycle;
+ uint64_t irq_arm_cycle;
+ uint64_t intc_cycle;
+ uint32_t frame;
+ int32_t lba;
+ uint8_t flags; /* CDT_* bits, mirrored in the JSON as named fields */
+} CdTimingPub;
+uint64_t cdrom_timing_total(void);
+int cdrom_timing_record(uint64_t seq, CdTimingPub* out);
+/* Notify the guest that the mounted disc was reinserted. The controller stops
+ * active transfers, reports an open shell, waits two emulated seconds, then
+ * makes the mounted media readable. This call does not mount a different image. */
+void debug_force_cd_reinsert(void);
+
+/* Multi-disc support. The roster is the image set this build was made from
+ * (game.toml [game] discs), registered once at launch in roster order.
+ *
+ * cdrom_disc_select() mounts a different image while the game runs, through
+ * the same tray-open event as a reinsert, so a title that asks for its other
+ * disc can be answered. Returns 0 if the index is outside the roster or the
+ * image will not open. Indexes are 1-based, matching [disc] selected. */
+void cdrom_disc_roster_set(const char *const *paths, int count,
+ int selected_1based);
+int cdrom_disc_roster_count(void);
+int cdrom_disc_selected(void);
+const char *cdrom_disc_roster_path(int index_1based);
+int cdrom_disc_select(int index_1based);
+
+/* TOC of the image currently mounted; 0 when the drive is empty. Two images
+ * of a set have different TOCs, so this is how a caller confirms that a disc
+ * change reached the reader instead of only moving an index. */
+uint32_t cdrom_mounted_sector_count(void);
+int cdrom_mounted_track_count(void);
+
+/* FMV auto-skip detection: cdrom_xa_stream_active() lets the frontend detect
+ * that streaming XA (FMV/CDDA) is in progress. The skip itself is done by the
+ * frontend via uncapped pacing (it does NOT alter CD timing — flooding XA
+ * sectors desyncs and hangs the player). */
+int cdrom_xa_stream_active(void);
+/* True while a CD read is armed with XA/FMV mode bits (or XA already
+ * streaming). Netplay uses this to arm no-invent / refuse tip episodes
+ * before the first MDEC colour decode — MotK intro invent≠Start at FMV
+ * entry opened a tip episode into a matched black wait. */
+int cdrom_fmv_stream_pending(void);
+/* Re-arm host absolute CD deadlines from restored relative delays after
+ * boot_state / RB snap load (read stream + pending/present dues from snap).
+ * Does NOT clamp delays (unlike accelerate). */
+void cdrom_resync_deadlines_after_restore(void);
+
+/* CD load-burst ring (always-on). One record per gap-separated run of
+ * delivered data sectors. `out` receives up to `max` records, newest first
+ * (layout matches cdrom.c's CdBurst — consumed by debug_server.c only). */
+typedef struct CdBurstRecord {
+ uint32_t start_frame, end_frame;
+ uint64_t start_ms, end_ms;
+ uint32_t sectors;
+ uint32_t rate;
+ uint32_t divisor;
+} CdBurstRecord;
+int cdrom_get_bursts(void *out, int max);
+uint32_t cdrom_get_burst_total(void);
+
+/* True while a data-sector load is in progress (read stream active or a
+ * data sector delivered within the burst-gap window). XA streaming is never
+ * a load. Drives turbo-through-loads (step 4). */
+int cdrom_load_in_progress(void);
+/* Physical non-XA data-read command state, without the logical load gap
+ * bridge used by cdrom_load_in_progress(). Diagnostics only. */
+int cdrom_data_read_active(void);
+
+/* boot_state / netplay digest — full controller FSM (sector FIFOs included). */
+uint32_t cdrom_snapshot_bytes(void);
+void cdrom_snapshot_write(uint8_t *p);
+int cdrom_snapshot_read(const uint8_t *p, uint32_t len);
+
+/* After savestate restore: clamp long CD second-response / read-start delays
+ * and arm a short boost window so post-load ReadTOC/seek/Init waits do not
+ * freeze the picture for ~1s+. Completions still fire (IRQs preserved). */
+void cdrom_accelerate_after_savestate(void);
+/* Call once per host vblank while the boost window is armed. */
+void cdrom_savestate_boost_vblank(void);
+/* Non-zero while boost is armed AND a CD wait is outstanding (pending
+ * second response or non-XA read). Lets turbo_loads unpace those waits. */
+int cdrom_savestate_cd_wait_active(void);
+/* Remaining boost vblanks (0 when idle). Diagnostics / post-load probe. */
+int cdrom_savestate_boost_vblanks_remaining(void);
+
+/* MMIO read/write (0x1F801800-0x1F801803) */
+uint32_t cdrom_read(uint32_t addr);
+void cdrom_write(uint32_t addr, uint32_t value);
+
+/* Advance CD-ROM state machine by guest CPU cycles. Sets i_stat IRQ_CDROM
+ * when a command completes or data is ready. */
+void cdrom_advance(uint32_t cycles);
+
+/* Cycle-budgeted precise event slicing: guest CPU cycles until a DELIVERABLE
+ * CD-ROM IRQ (bit2 unmasked in i_mask). UINT32_MAX if none. */
+uint32_t cdrom_cycles_to_irq(uint32_t i_mask);
+
+/* Legacy frame-paced entry point for interpreter/oracle builds. */
+void cdrom_tick(void);
+
+/* DMA channel 3 interface */
+uint32_t cdrom_dma_read(void);
+int cdrom_dma_ready(void);
+uint32_t cdrom_dma_sector_word_count(void);
+
+typedef struct CDROMDebugState {
+ uint64_t seq;
+ uint8_t index_reg;
+ uint8_t stat_reg;
+ uint8_t request_reg;
+ uint8_t irq_enable;
+ uint8_t irq_flag;
+ uint8_t mode_reg;
+ uint8_t seek_min;
+ uint8_t seek_sec;
+ uint8_t seek_sect;
+ uint8_t pending_cmd;
+ uint8_t queued_cmd;
+ uint8_t queued_pending;
+ uint8_t queued_param_count;
+ int has_disc;
+ int param_count;
+ int response_read;
+ int response_count;
+ int sector_read_pos;
+ int sector_available;
+ int sector_size;
+ int reading;
+ int read_min;
+ int read_sec;
+ int read_sect;
+ uint8_t read_cmd;
+ uint8_t filter_file;
+ uint8_t filter_channel;
+ uint8_t muted;
+ int read_delay;
+ /* Cycles until a held CD response is presented to INTC (0 = ready). */
+ int irq_present_delay;
+ int pending_pending;
+ int pending_delay;
+ int pending_phase;
+ /* Operating disc-speed divisor (1 during BIOS; game.toml post-entry). */
+ int speed_divisor;
+ uint32_t i_stat;
+ int last_sector_lba;
+ int last_sector_size;
+ uint32_t last_sector_frame;
+ uint8_t last_sector_mode;
+ uint8_t last_sector_have_raw;
+ /* Read-stream hold accounting: guest cycles the disc clock was frozen
+ * waiting on guest INT-ack / buffer drain (unfaithful pause; real discs
+ * never stop). Must stay 0 since the 2026-07-10 continuous-disc fix;
+ * nonzero = regression. */
+ uint64_t read_hold_cycles;
+ uint64_t read_hold_events;
+ /* One-deep pended data-ready INT1 accounting (Beetle SetAIP analog). */
+ uint64_t int1_pended;
+ uint64_t int1_lost;
+ /* Accelerated-read flow control: holds where a faster-than-hardware
+ * sector was deferred rather than allowed to clobber an unconsumed one.
+ * Nonzero is healthy (the guest was busy and the enhancement waited);
+ * int1_lost rising while the speed divisor != 1 is the regression. */
+ /* Sector-ring tripwires: starved = a drain found its slot exhausted
+ * while the writer had moved on (must stay 0); dropped = an unread slot
+ * was overwritten because the guest fell a full ring behind. */
+ uint64_t ring_starved;
+ uint64_t ring_dropped;
+ uint64_t accel_consumer_waits;
+ uint64_t accel_consumer_wait_cycles;
+ uint8_t int1_pending_now;
+} CDROMDebugState;
+
+typedef struct CDROMSectorDebugState {
+ int current_available;
+ int current_read_pos;
+ int current_size;
+ int last_lba;
+ int last_size;
+ uint32_t last_frame;
+ uint8_t last_mode;
+ uint8_t last_have_raw;
+} CDROMSectorDebugState;
+
+typedef struct CDROMTraceEntry {
+ uint64_t seq;
+ uint32_t addr;
+ uint32_t val;
+ uint32_t func;
+ uint32_t pc;
+ uint32_t frame;
+ uint32_t i_stat;
+ uint8_t kind;
+ uint8_t width;
+ uint8_t index_reg;
+ uint8_t stat_reg;
+ uint8_t irq_enable;
+ uint8_t irq_flag;
+ uint8_t param_count;
+ uint8_t response_read;
+ uint8_t response_count;
+ uint8_t sector_available;
+ uint8_t request_reg;
+ uint8_t mode_reg;
+ uint8_t pending_cmd;
+ uint8_t pending_pending;
+ uint8_t reading;
+ uint8_t read_cmd;
+ int sector_read_pos;
+ int sector_size;
+ int pending_delay;
+ int read_delay;
+} CDROMTraceEntry;
+
+#define CDROM_TRACE_CAP (1 << 16)
+#define CDROM_COMMAND_HISTORY_CAP (1 << 13)
+#define CDROM_SECTOR_HISTORY_CAP (1 << 13)
+#define CDROM_SECTOR_HISTORY_BYTES 128
+
+typedef struct CDROMCommandHistoryEntry {
+ uint64_t seq;
+ /* Guest cycle at which this command was issued/executed. Frame numbers
+ * cannot separate "the guest had not asked yet" from "the command was
+ * queued behind an unacked INT" -- both look like one frame. */
+ uint64_t cycle;
+ uint32_t frame;
+ uint32_t func;
+ uint32_t pc;
+ uint32_t i_stat;
+ uint8_t kind;
+ uint8_t cmd;
+ uint8_t param_count;
+ uint8_t params[16];
+ uint8_t stat;
+ uint8_t request;
+ uint8_t irq_enable;
+ uint8_t irq_flag;
+ uint8_t mode;
+ uint8_t seek_min;
+ uint8_t seek_sec;
+ uint8_t seek_sect;
+ uint8_t read_min;
+ uint8_t read_sec;
+ uint8_t read_sect;
+ uint8_t read_cmd;
+ uint8_t reading;
+ uint8_t pending_cmd;
+ uint8_t pending_pending;
+ uint8_t queued_cmd;
+ uint8_t queued_pending;
+ /* Immediate response FIFO as the guest will read it (e.g. the GetTD MSF,
+ * the GetTN track range), so a TOC can be checked from the ring. */
+ uint8_t response_count;
+ uint8_t response[16];
+} CDROMCommandHistoryEntry;
+
+typedef struct CDROMSectorHistoryEntry {
+ uint64_t seq;
+ int lba;
+ int size;
+ uint32_t frame;
+ uint8_t mode;
+ uint8_t have_raw;
+ uint8_t raw_mode;
+ uint8_t xa_file;
+ uint8_t xa_channel;
+ uint8_t xa_submode;
+ uint8_t xa_coding;
+ uint8_t data_delivered;
+ uint8_t xa_audio_delivered;
+ uint8_t skip_reason;
+ uint16_t bytes_len;
+ uint8_t bytes[CDROM_SECTOR_HISTORY_BYTES];
+} CDROMSectorHistoryEntry;
+
+void cdrom_debug_snapshot(CDROMDebugState* out);
+uint64_t cdrom_debug_get_trace(const CDROMTraceEntry** out_entries);
+void cdrom_debug_clear_trace(void);
+uint64_t cdrom_debug_get_command_history(const CDROMCommandHistoryEntry** out_entries);
+void cdrom_debug_clear_command_history(void);
+uint32_t cdrom_debug_copy_last_sector(uint32_t offset, uint32_t len,
+ uint8_t* out,
+ CDROMSectorDebugState* state);
+uint64_t cdrom_debug_get_sector_history(const CDROMSectorHistoryEntry** out_entries);
+void cdrom_debug_clear_sector_history(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_CDROM_H */
diff --git a/overlay_toolchain/include/code_provider.h b/overlay_toolchain/include/code_provider.h
new file mode 100644
index 00000000..a84152d9
--- /dev/null
+++ b/overlay_toolchain/include/code_provider.h
@@ -0,0 +1,61 @@
+/* code_provider.h — the backend-agnostic code-production seam.
+ *
+ * One interface the overlay capture/dispatch spine talks to instead of calling
+ * a specific backend directly. The validated gcc/tcc spawn->DLL->rescan path is
+ * its implementation. Everything that makes overlays correct — content-keyed
+ * multi-candidate dispatch, per-call live-byte validation, the self-mod
+ * blacklist, the coverage manifest — is backend-blind.
+ *
+ * Production is BATCH / ASYNC (request / busy / poll_main): kicked by the
+ * autocapture tick, spawns a compiler off-thread, applied later via a cache
+ * rescan on the emu thread. Seconds of latency; many fragments per run. A
+ * provider sets the hooks it supports and leaves the rest NULL; callers
+ * null-check before invoking.
+ *
+ * (The in-process sljit JIT provider — a synchronous on-miss producer with a
+ * compile_fragment hook — was removed 2026-07-15; it had been disabled by
+ * default since 2026-06-25 due to an emitter bug. Gaps gcc/tcc have not yet
+ * covered fall to the interpreter, the always-safe precision-over-recall floor.)
+ */
+#ifndef PSXRECOMP_CODE_PROVIDER_H
+#define PSXRECOMP_CODE_PROVIDER_H
+
+#include "cpu_state.h"
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Native shard ABI — identical to overlay_loader's OverlayFn. */
+typedef void (*CodeProviderFn)(CPUState *);
+
+typedef struct CodeProvider {
+ const char *name; /* "gcc" (spawns gcc OR tcc) */
+ int (*available)(void); /* a compile cmd is configured */
+
+ /* Batch/async production (autocapture-driven). request() returns 1 if a
+ * compile was started. busy() is 1 while one is in flight. poll_main() runs
+ * on the emu thread to apply a finished compile (cache rescan). Any may be
+ * NULL on a provider that does not do batch production. */
+ int (*request)(void);
+ int (*busy)(void);
+ void (*poll_main)(void);
+} CodeProvider;
+
+/* Resolve the active backend (overlay_backend_resolve) and cache the matching
+ * provider. cfg_backend = [runtime] overlay_backend ("auto"|"gcc"|"tcc"|
+ * "auto-no-gcc", may be NULL/empty for auto); gcc_configured =
+ * autocompile_configured(). Call once at overlay-cache init, on the emu thread,
+ * before the run loop starts. */
+void code_provider_init(const char *cfg_backend, int gcc_configured);
+
+/* The active/primary provider (owns the batch path + default selection). Never
+ * NULL — defaults to the gcc provider before code_provider_init() runs. */
+const CodeProvider *code_provider_active(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_CODE_PROVIDER_H */
diff --git a/overlay_toolchain/include/color_lut.h b/overlay_toolchain/include/color_lut.h
new file mode 100644
index 00000000..fc9a4691
--- /dev/null
+++ b/overlay_toolchain/include/color_lut.h
@@ -0,0 +1,84 @@
+/* color_lut.h — present-time screen-color simulation (BGR555 -> RGB888 LUT).
+ *
+ * PRESENT-TIME ONLY. This never touches the emulation, the VRAM the GPU
+ * produces, or the differential-verify path — diff_frame / oracle comparisons
+ * stay defined on the raw RGB888 expansion the GPU scanout produces. The LUT
+ * is a 32768-entry table consulted at the 15-bit-scanout -> RGB888 conversion
+ * step (gpu_rgb555_to_rgb888), and it defaults to Raw (exact 5->8 passthrough),
+ * so default behavior and every hashed/verified frame are byte-identical unless
+ * a screen model is opted in via PSX_SCREEN={raw,crt,composite,trinitron}.
+ *
+ * The math is first-principles CIE colorimetry (xyY->XYZ, primaries->matrix,
+ * Bradford adaptation, sRGB OETF) over a CRT/composite display model; it is not
+ * a ported shader.
+ *
+ * SCOPE / WHAT IS MODELLED vs DOCUMENTED-ONLY:
+ * - The 15-bit (BGR555) display path is fully covered: each scanout pixel is
+ * a 5-bit-per-channel index into the baked table.
+ * - The 24-bit (depth24, FMV) display path is NOT colour-mapped here — those
+ * frames already carry 8-bit-per-channel data and have no 5-bit hardware
+ * index to key the table on; they pass through untouched (documented).
+ * - The model is a REASONABLE consumer-CRT / composite approximation (SMPTE-C
+ * phosphors, ~2.4 display gamma, a small black lift). The real per-TV
+ * transfer and the composite-encoder bandwidth/notch effects are NOT
+ * guessed at the signal level — only a colorimetric approximation is baked.
+ * See docs/SHADOW_ENHANCEMENTS.md for what is approximated.
+ *
+ * ── Attribution ───────────────────────────────────────────────────
+ * Ported from JRickey/gba-recomp (https://github.com/JRickey/gba-recomp),
+ * crates/screen/src/{color,profile,lut}.rs, via the gbarecomp C++ port
+ * (src/runtime/color_lut.*), © Jrickey, MIT OR Apache-2.0, used with
+ * permission. The C re-implementation and the CRT/composite panel models are
+ * ours. See THIRD_PARTY_ATTRIBUTION.md.
+ */
+
+#ifndef PSXRECOMP_COLOR_LUT_H
+#define PSXRECOMP_COLOR_LUT_H
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Which physical display model to simulate. */
+typedef enum {
+ SCREEN_RAW = 0, /* 5->8 bit replication, untouched (default; passthrough) */
+ SCREEN_CRT, /* generic consumer CRT (SMPTE-C phosphors, gamma ~2.4) */
+ SCREEN_COMPOSITE, /* CRT via composite: same phosphors, lifted black + softer */
+ SCREEN_TRINITRON, /* late near-sRGB Trinitron-class tube, clean blacks */
+} ScreenKind;
+
+/* Display colorspace the emitted bytes are interpreted in. */
+typedef enum {
+ DISPLAY_SRGB = 0,
+ DISPLAY_P3,
+} DisplayTarget;
+
+/* Parse a config/env token; returns false if unrecognized. */
+bool screen_kind_from_name(const char* name, ScreenKind* out);
+
+typedef struct {
+ ScreenKind screen; /* default SCREEN_RAW */
+ double darken; /* <0 = per-screen default */
+ DisplayTarget target; /* default DISPLAY_SRGB */
+} ColorSettings;
+
+/* A baked BGR555 -> RGB888 table. Build once per settings change; apply per
+ * scanout pixel as one indexed lookup. Opaque to callers. */
+typedef struct ColorLut ColorLut;
+
+ColorLut* color_lut_create(const ColorSettings* settings);
+void color_lut_destroy(ColorLut* lut);
+bool color_lut_is_passthrough(const ColorLut* lut);
+
+/* Map one BGR555 hardware pixel (red=low 5 bits, as in PS1 VRAM) to RGB888. */
+void color_lut_map555(const ColorLut* lut, uint16_t bgr555,
+ uint8_t* r, uint8_t* g, uint8_t* b);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_COLOR_LUT_H */
diff --git a/overlay_toolchain/include/cosim_state.h b/overlay_toolchain/include/cosim_state.h
new file mode 100644
index 00000000..04ead474
--- /dev/null
+++ b/overlay_toolchain/include/cosim_state.h
@@ -0,0 +1,67 @@
+/* cosim_state.h — full-architectural-state canonical hash for the first-divergence
+ * co-simulation oracle. See COSIM_ORACLE.md.
+ *
+ * The single correctness rule: this hash must cover EVERY piece of state that can
+ * influence future guest execution, and NOTHING that is host-only (pointers, padding,
+ * jmpbufs, fiber/malloc addresses). A missed execution-relevant field is a blind spot
+ * (false "no divergence"); an included host-only field is a false positive. The
+ * validation gates in COSIM_ORACLE.md (compiled-vs-compiled == 0, injected-divergence
+ * halts at the right field) exist to prove this list is exactly right.
+ */
+#pragma once
+#include
+#include "cpu_state.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Per-subsystem sub-hashes so a mismatch localizes to a subsystem before a full
+ * field/byte diff. All 64-bit FNV-1a over canonical little-endian serialization. */
+typedef struct {
+ uint64_t cpu; /* GPRs/HI/LO/PC/COP0/GTE + micro-state (muldiv/gte/load-delay) */
+ uint64_t irqctl; /* i_stat/i_mask + interrupts.c timing statics + VBLANK schedule */
+ uint64_t ram; /* 2MB main RAM (incremental page-hash) */
+ uint64_t scratch; /* 1KB scratchpad */
+ uint64_t vram; /* 1MB VRAM (incremental page-hash) */
+ uint64_t gpu; /* GPU regs + FIFO + draw budget + deadlines (boot_state blob) */
+ uint64_t spu; /* SPU regs + voices + SPU RAM */
+ uint64_t cdrom; /* CDROM command/FIFO/phase/next-event */
+ uint64_t dma; /* DMA channel regs + in-flight/deadlines */
+ uint64_t sio; /* SIO/pad/memcard transaction state */
+ uint64_t timers; /* RootCounters counter/mode/target/frac/last-update */
+ uint64_t clock; /* psx_cycle_count */
+ uint64_t dirty; /* dirty-RAM page bitmap (affects dispatch/interp routing) */
+} CosimSubHashes;
+
+/* Compute the full canonical state hash of the LIVE machine (debug_cpu_ptr + globals).
+ * Fills `sub` (may be NULL) and returns the folded top hash. Cheap per call: RAM/VRAM
+ * use incremental page hashes maintained by cosim_note_ram_write/cosim_note_vram_write;
+ * everything else is small. */
+uint64_t cosim_state_hash(CosimSubHashes *sub);
+
+/* Incremental page-hash maintenance. Call from the RAM/VRAM write chokepoints in the
+ * cosim build: mark the touched page dirty (cheap); the page hash is recomputed lazily
+ * inside cosim_state_hash(). phys is the byte offset into RAM (0..2MB) / VRAM (0..1MB). */
+void cosim_note_ram_write(uint32_t phys, uint32_t nbytes);
+void cosim_note_vram_write(uint32_t byte_off, uint32_t nbytes);
+
+/* Reset all incremental state (call once at machine init / after a full state load). */
+void cosim_state_reset(void);
+
+/* ---- engine (cosim.c) ---- */
+void cosim_init(void); /* start the TCP oracle server (call once at startup) */
+void cosim_block(uint32_t pc); /* block-leader pc stash (emitted + interp), reporting */
+uint32_t cosim_last_block(void); /* last block-leader pc, for diagnostic attribution */
+void cosim_tick(void); /* cycle-keyed checkpoint (called from psx_advance_cycles) */
+void cosim_instr(uint32_t pc); /* retire pending cycle checkpoints at an instruction boundary */
+uint32_t cosim_cycles_to_next_checkpoint(void);
+
+/* Gate-4 fault injection: after this is armed, the next cosim_state_hash perturbs one
+ * byte of RAM (addr) or one CPU GPR (reg 0..31, hi=32, lo=33) by XOR val, so the
+ * oracle MUST halt at exactly that field. Returns via the same hash path. */
+void cosim_inject_ram(uint32_t phys, uint8_t xor_val);
+void cosim_inject_reg(int reg_index, uint32_t xor_val);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/overlay_toolchain/include/cpu_state.h b/overlay_toolchain/include/cpu_state.h
new file mode 100644
index 00000000..d03b97a1
--- /dev/null
+++ b/overlay_toolchain/include/cpu_state.h
@@ -0,0 +1,377 @@
+/* ============================================================================
+ * cpu_state.h — Phase 2 runtime version
+ * ----------------------------------------------------------------------------
+ * This is the RUNTIME version of the CPUState header. It has the same struct
+ * layout as generated/cpu_state.h (Phase 1a compile-only artifact) but is
+ * intended to be linked into a runnable binary.
+ *
+ * The generated C files (SCPH1001_full.c, SCPH1001_dispatch.c) include
+ * "cpu_state.h" and the build uses -I runtime/include so they find this file.
+ * ========================================================================== */
+
+#ifndef PSXRECOMP_CPU_STATE_H
+#define PSXRECOMP_CPU_STATE_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* (sljit shard host-helper table removed 2026-07-15 with the sljit tier.) */
+
+typedef struct CPUState {
+ uint32_t gpr[32]; /* $0..$31; gpr[0] is hardwired zero, never written */
+ uint32_t pc; /* program counter */
+ uint32_t hi, lo; /* mult/div result registers */
+ uint32_t cop0[32]; /* COP0 system control registers (SR, Cause, EPC, ...) */
+ uint32_t gte_data[32]; /* COP2 (GTE) data registers */
+ uint32_t gte_ctrl[32]; /* COP2 (GTE) control registers */
+
+ /* Memory access function pointers -- wired at init to psx_read/psx_write. */
+ uint32_t (*read_word)(uint32_t addr);
+ void (*write_word)(uint32_t addr, uint32_t value);
+ uint16_t (*read_half)(uint32_t addr);
+ void (*write_half)(uint32_t addr, uint16_t value);
+ uint8_t (*read_byte)(uint32_t addr);
+ void (*write_byte)(uint32_t addr, uint8_t value);
+
+ /* Mult/div completion deadline (absolute guest cycle). Set by MULT/MULTU/
+ * DIV/DIVU to psx_cycle_count()+latency; a later MFLO/MFHI stalls (advances
+ * cycles) until this deadline — faithful R3000A behavior (Beetle
+ * muldiv_ts_done). Appended at END so prior field offsets are unchanged. */
+ uint64_t muldiv_ts_done;
+
+ /* GTE (COP2) command completion deadline (absolute guest cycle). A GTE
+ * command sets this to psx_cycle_count()+(cost-1) (cost from gte.cpp per-op
+ * returns; -1 because the COP2 instruction's own +1 base is charged
+ * separately). Back-to-back commands serialize (set stalls to the prior
+ * deadline first); any COP2 register access (MFC2/CFC2/MTC2/CTC2/LWC2/SWC2)
+ * stalls until it — faithful R3000A behavior (Beetle gte_ts_done).
+ * Appended at END so prior field offsets are unchanged. */
+ uint64_t gte_ts_done;
+
+ /* ---- R3000A load-delay pipeline interlock (Beetle ReadAbsorb/ReadFudge/
+ * LDAbsorb/LDWhich) — TIMING ONLY; the load VALUE delay is handled by the
+ * existing load-delay correctness path. See psx_cyc.h + accuracy/
+ * load_readfudge_ldabsorb.md. Models: a load's data-access cost becomes a
+ * per-register "give-back" (read_absorb) that following instructions consume
+ * instead of charging their own +1 base; plus the +2 "fudge" charged on a
+ * load whose predecessor committed no load. Appended at END so prior field
+ * offsets are unchanged (precompiled overlay DLLs bake offsets). */
+ uint8_t read_absorb[33]; /* ReadAbsorb[0..31] + [32]=0x20 DO_LDS dummy slot */
+ uint8_t read_absorb_which; /* ReadAbsorbWhich: GPR the last committed load wrote */
+ uint8_t read_fudge; /* ReadFudge: last committed load's dest reg, or 0x20 = none */
+ uint8_t ld_which_t; /* LDWhich (timing): pending load dest reg, 0x20 = none */
+ uint32_t ld_absorb; /* LDAbsorb: pending load's give-back (region+completion) */
+} CPUState;
+
+/* Overlay DLLs batch per-instruction cycle charges in a DLL-local accumulator.
+ * A guest store is an observation boundary: MMIO handlers must see the cycle
+ * count through the store instruction, and RAM/self-modification/capture hooks
+ * must run after those cycles have been published to the host. Generated code
+ * calls this immediately before every store (and before SWL/SWR's raw read).
+ * Static recompiled code and the interpreter share host cycle state directly,
+ * so their barrier compiles to nothing. */
+#ifdef PSX_OVERLAY_DLL_BUILD
+/* Kept here rather than in psx_cycles.h because cpu_state.h is the first
+ * generated-code include that declares the store barrier. The preamble is
+ * inserted after all generated includes, so both declaration and definition
+ * must carry the same export attribute for Clang. */
+# if defined(_WIN32)
+# define PSX_OVERLAY_EXPORT __declspec(dllexport)
+# else
+# define PSX_OVERLAY_EXPORT __attribute__((visibility("default")))
+# endif
+PSX_OVERLAY_EXPORT void overlay_flush_cycles(void);
+static inline void psx_store_cycle_barrier(void) { overlay_flush_cycles(); }
+#else
+static inline void psx_store_cycle_barrier(void) { }
+#endif
+
+/* Faithful exception-return (fix B) — defined in runtime/src/interrupts.c. The
+ * interrupted-thread resume PC is the REAL guest PC, stored in COP0.EPC and (by the
+ * BIOS handler) in the thread's TCB EPC slot — never a sentinel, never a single
+ * global — so a thread suspended mid-exception (ChangeThread) resumes at its OWN PC.
+ * The host longjmp escape out of the NESTED synchronous handler is keyed on "RFE
+ * while in_exception" (psx_rfe_mark_escape, called by the recompiled `rfe` op;
+ * psx_rfe_escape_check, called in the dispatch trampoline), not on pc==sentinel.
+ * Declared here (not psx_runtime.h) because the generated BIOS includes only this. */
+typedef enum {
+ PSX_EXC_ESCAPE_NONE = 0,
+ PSX_EXC_ESCAPE_RFE_RETURN,
+ PSX_EXC_ESCAPE_SYSCALL_RETURN,
+ PSX_EXC_ESCAPE_LEGACY_SENTINEL,
+} psx_exc_escape_reason_t;
+
+/* The host escape token for the SYNCHRONOUS (nested) exception handler. It is a
+ * pure HOST control-flow marker — it must NEVER be persisted into a guest TCB as a
+ * thread's resume PC. If it does, that thread will resume by resolving the sentinel
+ * through host escape state (the multi-thread bug fix B repaired), not at its own
+ * code. The save/restore/fiber-entry guards in traps.c are fail-closed on this. */
+#define PSX_EXC_SENTINEL_PC 0x80000048u
+extern int g_rfe_escape_pending;
+extern int g_exc_escape_reason; /* psx_exc_escape_reason_t */
+extern uint32_t g_exception_real_epc;
+void psx_rfe_mark_escape(void);
+void psx_rfe_escape_check(CPUState* cpu);
+
+/* Trap trampolines — defined in runtime/src/traps.c */
+/* psx_syscall returns 1 if control transfers (cpu->pc set to a dispatch target;
+ * the caller must return to the trampoline), 0 for a directly-handled "void"
+ * syscall (Enter/ExitCriticalSection). Under CPS the generated code emits
+ * `if (psx_syscall(...)) return;` so a void syscall falls through to the inline
+ * post-syscall code (the guest's own jr $ra); legacy callers ignore the return
+ * value and rely on cpu->pc (0 = handled, resume at caller). */
+extern int psx_syscall(CPUState* cpu, uint32_t code);
+extern void psx_arith_overflow(CPUState* cpu);
+/* Mult/div completion-stall timing (psx_cycles.c). MULT/MULTU/DIV/DIVU call
+ * psx_muldiv_set with their latency (DIV/DIVU = 37; MULT/MULTU via the latency
+ * helpers, indexed on the first operand magnitude). MFLO/MFHI call
+ * psx_muldiv_stall, which advances guest cycles to the deadline if not yet
+ * reached. Faithful only with per-instruction cycle charging. */
+extern void psx_muldiv_set(CPUState* cpu, uint32_t latency);
+extern void psx_muldiv_stall(CPUState* cpu);
+extern uint32_t psx_mult_latency_s(uint32_t rs); /* MULT (signed) */
+extern uint32_t psx_mult_latency_u(uint32_t rs); /* MULTU (unsigned) */
+
+/* GTE (COP2) per-command completion-stall timing (psx_cycles.c). gte_execute()
+ * calls psx_gte_set with the command's added latency (cost-1, from
+ * psx_gte_cmd_latency); it serializes back-to-back ops by stalling to the prior
+ * deadline first. Every COP2 register access calls psx_gte_stall, which advances
+ * guest cycles to the deadline if the op is still in flight. Faithful only with
+ * per-instruction cycle charging. */
+/* R3000A I-cache instruction-FETCH cost (psx_icache.h). HIT is inlined;
+ * MISS lives in psx_icache.c. Shared by interp + compiled emitters. */
+#include "psx_icache.h"
+
+extern void psx_gte_set(CPUState* cpu, uint32_t latency);
+extern void psx_gte_stall(CPUState* cpu);
+/* MFC2/CFC2 GTE register read: stall to the deadline AND arm the load-delay
+ * give-back (ld_absorb=gte_ts_done-now, ld_which_t=rt) — Beetle MFC2/CFC2. */
+extern void psx_gte_read(CPUState* cpu, uint32_t rt);
+extern uint32_t psx_gte_cmd_latency(uint32_t cmd); /* cost-1 for the 6-bit op */
+
+extern void psx_unaligned_access(CPUState* cpu, uint32_t addr, uint32_t pc);
+extern void psx_break(CPUState* cpu, uint32_t code, uint32_t pc);
+/* Fail-closed native entry guard: a function's CPS entry-switch calls this when
+ * dispatched at a PC that is not one of its legal entries (foreign interior PC
+ * from a range-ownership mismatch). The function returns without executing; the
+ * overlay dispatch then routes the PC to the sanctioned dirty-RAM interpreter. */
+extern void psx_native_bad_entry(CPUState* cpu, uint32_t owner, uint32_t pc);
+
+/* Dispatch — defined in generated/SCPH1001_dispatch.c */
+extern void psx_dispatch(CPUState* cpu, uint32_t target_addr);
+extern void psx_dispatch_call(CPUState* cpu, uint32_t target_addr, uint32_t return_addr);
+
+/* Cycle-budgeted precise event slicing — defined in runtime/src/dirty_ram_interp.c.
+ * Emitted at each compiled block leader: if it returns nonzero the block ran
+ * through the per-instruction interpreter (interrupt taken at the exact
+ * architectural instruction) and cpu->pc holds a dispatchable resume point, so
+ * the caller must `return` without executing its compiled body. See
+ * PRECISE_IRQ_SLICE.md.
+ *
+ * PARKED default OFF (g_psx_precise_slice=0). The hot inline returns 0 with no
+ * call; PSX_PRECISE_SLICE=1 enables the impl for A/B. Every compiled block
+ * leader hits this — MotK VLC alone issues millions of calls/s. */
+extern int g_psx_precise_slice;
+extern int psx_slice_block_impl(CPUState* cpu, uint32_t block_addr, uint32_t bcyc, int side_effects);
+void psx_precise_slice_init_from_env(void);
+#ifdef PSX_OVERLAY_DLL_BUILD
+int psx_slice_block(CPUState* cpu, uint32_t block_addr, uint32_t bcyc, int side_effects);
+#else
+static inline int psx_slice_block(CPUState* cpu, uint32_t block_addr, uint32_t bcyc, int side_effects) {
+ if (!g_psx_precise_slice) return 0;
+ return psx_slice_block_impl(cpu, block_addr, bcyc, side_effects);
+}
+#endif
+
+/* Unknown dispatch — defined in runtime/src/traps.c */
+extern void psx_unknown_dispatch(CPUState* cpu, uint32_t addr, uint32_t phys);
+
+/* GTE (COP2) — defined in runtime/src/gte.cpp */
+extern void gte_execute(CPUState* cpu, uint32_t cmd);
+/* Widescreen X-squash: display aspect num:den (4,3 = identity/off). Scales
+ * RTPS/RTPT screen-X around the game's OFX so a 4:3 frame stretched to the
+ * wide aspect shows a wider field of view. */
+extern void gte_set_display_aspect(int num, int den);
+extern void gte_ws_set_suppress(int on); /* 8C: un-squash far backdrop draws */
+extern void gte_ws_configure_dome_sites(const uint32_t* sites, int count);
+extern uint32_t gte_read_data(CPUState* cpu, uint8_t reg);
+extern uint32_t gte_read_ctrl(CPUState* cpu, uint8_t reg);
+extern void gte_write_data(CPUState* cpu, uint8_t reg, uint32_t val);
+extern void gte_write_ctrl(CPUState* cpu, uint8_t reg, uint32_t val);
+/* Normalize raw save-state/imported backing arrays to the architectural form
+ * expected by generated direct-register fast paths. This is not a guest
+ * register write: in particular, it preserves a computed FLAG bit 31. */
+extern void gte_canonicalize_cpu_state(CPUState* cpu);
+/* Drop host-only projection/geometry provenance after a raw machine-state
+ * rewind or discarded speculative pass. Guest-visible GTE registers are not
+ * changed. */
+extern void gte_precision_timeline_invalidate(void);
+/* Isolate a speculative native validation pass from host-only projection
+ * caches while preserving the preceding authoritative interpreter result. */
+extern void gte_precision_speculative_begin(void);
+extern void gte_precision_speculative_end(void);
+extern void gte_precision_store_word(uint32_t addr, uint8_t reg);
+extern void gte_precision_tracking_set(int enabled);
+/* Sub-pixel vertex precision ([video] geometry_correction). Enables the side
+ * cache that retains the 16.16 projection fraction the GTE discards when it
+ * saturates SXY to integer screen pixels. Guest-visible GTE state is
+ * unchanged — this is a visual-only enhancement, default off. */
+extern void gte_geometry_correction_set(int enabled);
+extern int gte_geometry_correction_enabled(void);
+/* Corrected vertices consumed since the last gte_geometry_correction_set —
+ * the "is this actually doing anything on this title" counter. */
+extern uint32_t gte_geometry_correction_hits(void);
+/* Lookup census: attempted, hit, and the two miss classes. The position table
+ * is exact, so miss_unrecorded counts genuine tracking-coverage gaps. */
+extern void gte_geometry_correction_stats(uint32_t *lookups, uint32_t *hits,
+ uint32_t *miss_unrecorded,
+ uint32_t *miss_ambiguous);
+
+/* Exact NCLIP audit coverage: precise = all three SXY shadows are coherent and
+ * word-validated; fallback = native integer-only; disagreements counts cases
+ * where sub-pixel and guest-visible integer signs differ. MAC0 stays native. */
+extern void gte_nclip_precise_stats(uint64_t *hits, uint64_t *fallbacks,
+ uint64_t *disagreements);
+extern int gte_nclip_native_wide_sign(int32_t native_mac0, int* sign);
+extern int gte_nclip_native_wide_previous_sign(int32_t native_mac0, int* sign);
+extern int psx_ws_nclip_branch(uint32_t pc, uint32_t instr, int32_t mac0, int vanilla);
+/* Title-scoped widescreen cull consumer ([widescreen.cull] nclip_exact_sites).
+ * Returns the sign (-1/0/1) the branch at `pc` should test: the exact tracked
+ * NCLIP sign only when it belongs to the supplied native MAC0, otherwise the
+ * native sign. Counts per-site use (gte_nclip_stats.h). Does not change
+ * guest-visible GTE state. */
+extern int32_t gte_nclip_exact_sign(int32_t native_mac0, uint32_t pc);
+
+/* PGXP dataflow-shadowing hook macros (PGXP_LOAD/STORE/ALU/MULDIV/COP2).
+ * The emitter writes them unconditionally; they expand to real calls only
+ * under -DPSX_PGXP=1 (the pgxp build variant) and to ((void)0) otherwise.
+ * Pulled in here so every generated translation unit sees them. */
+#include "pgxp_hooks.h"
+
+/* ============================================================================
+ * Dispatch call contract (Bug D / wild-return family fix)
+ * ----------------------------------------------------------------------------
+ * Generated C continuations mirror the guest call graph: after `jal F`, the C
+ * code calls F's C function and then falls into the continuation block. Real
+ * hardware has only one stack; if F's flow goes wild (returns to an address
+ * other than the call site's $ra, or with a shifted $sp — e.g. a mid-function
+ * entry running an epilogue for a frame it never pushed), the hardware simply
+ * keeps executing wherever the guest jumped, and the interrupted caller's
+ * code never resumes. Our C model, by contrast, resumes the suspended C
+ * continuation whenever the C call returns — re-executing tails on a moved
+ * guest stack (the Bug A/C/D zombie family).
+ *
+ * The contract: a C continuation may run ONLY if the guest actually arrived
+ * at it — i.e. the callee came back with $ra == the call site's return
+ * address and $sp == the caller's stack pointer at the call. When the
+ * contract is violated, we begin a "bail" unwind: cpu->pc is set to the
+ * guest's true target (the wild jr's destination), g_psx_call_bail is set,
+ * and every generated frame returns immediately without running its
+ * continuation. The unwind resolves at the first enclosing call site (or
+ * dispatch loop) whose (return address, sp) contract matches the guest's
+ * arrival state; if none matches, the outermost dispatch loop clears the
+ * flag and tail-dispatches the wild target with a clean host stack.
+ *
+ * g_psx_call_bail is defined in runtime/src/traps.c. Overlay DLLs share
+ * the runtime's state through pointers wired by overlay_init (the
+ * PSX_OVERLAY_DLL_BUILD branch; see overlay_api.h / compile_overlays.py).
+ * ========================================================================== */
+#ifdef PSX_OVERLAY_DLL_BUILD
+extern int *g_psx_call_bail_p;
+extern uint64_t *g_psx_bail_first_p;
+extern uint64_t *g_psx_bail_resolved_p;
+#define g_psx_call_bail (*g_psx_call_bail_p)
+#define g_psx_bail_first (*g_psx_bail_first_p)
+#define g_psx_bail_resolved (*g_psx_bail_resolved_p)
+/* The store-PC breadcrumb the emitter writes before every guest store is the
+ * runtime's, not the DLL's (ABI v24, overlay_api.h last_store_pc). */
+extern uint32_t *g_psx_last_store_pc_p;
+#define g_debug_last_store_pc (*g_psx_last_store_pc_p)
+#else
+extern int g_psx_call_bail;
+extern uint64_t g_psx_bail_first; /* contract violations detected */
+extern uint64_t g_psx_bail_resolved; /* unwinds resolved at a call site */
+extern uint64_t g_psx_bail_flattened; /* unwinds flattened at outermost */
+extern uint64_t g_psx_bail_anomaly; /* bail flag seen where impossible */
+#endif
+
+/* Deduped wild-return source ledger (traps.c). Not present in overlay DLLs
+ * (they share runtime bail state via pointers, not this recorder). */
+#ifndef PSX_OVERLAY_DLL_BUILD
+extern void psx_bail_record(uint32_t site_ra, uint32_t site_sp,
+ uint32_t wild_pc, uint32_t guest_sp);
+#endif
+
+/* Validate a direct call site after the callee's C return.
+ * Returns 1 if the caller must `return;` immediately (bail in progress),
+ * 0 if the continuation is valid. site_ra = the call's return address,
+ * site_sp = guest $sp recorded immediately before the call.
+ *
+ * The return PC is compared in full, segment included
+ * (docs/SEGMENT_AWARE_CODE.md §5.5): site_ra is the link the call wrote, in
+ * the segment of the body that made it, and a guest returning to another
+ * segment's alias of the call site did not return to that body. The BIOS
+ * dispatch loop (full_function_emitter.cpp) applies the same rule. */
+static inline int psx_call_contract(CPUState* cpu, uint32_t site_ra,
+ uint32_t site_sp) {
+ if (g_psx_call_bail) {
+ /* An inner frame began a bail unwind. Resolve here iff the guest's
+ * arrival state matches this site's contract. */
+ if (cpu->pc == site_ra && cpu->gpr[29] == site_sp) {
+ g_psx_call_bail = 0;
+ g_psx_bail_resolved++;
+ cpu->pc = 0;
+ return 0;
+ }
+ return 1;
+ }
+ if (cpu->gpr[29] != site_sp || cpu->gpr[31] != site_ra) {
+ /* First detection: the callee C-returned but the guest did not
+ * return here. $ra holds the wild jr's true destination (the
+ * longjmp-return emission sets cpu->pc = $ra before returning,
+ * which is the same value). */
+ g_psx_call_bail = 1;
+ g_psx_bail_first++;
+#ifndef PSX_OVERLAY_DLL_BUILD
+ psx_bail_record(site_ra, site_sp, cpu->gpr[31], cpu->gpr[29]);
+#endif
+ cpu->pc = cpu->gpr[31];
+ return 1;
+ }
+ return 0;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+/* R3000A load-delay interlock helpers (psx_cyc.h). Included LAST so CPUState is
+ * fully defined first; psx_cyc.h's own #include "cpu_state.h" is a guarded no-op.
+ * This makes the per-instruction timing API visible to EVERY generated file and
+ * runtime TU that includes cpu_state.h. */
+#include "psx_cyc.h"
+
+/* Release call-entry stamp — inlined into every generated BIOS/game TU that
+ * includes this header (MotK VLC entry tax). Debug builds use the out-of-line
+ * ring path in debug_server.c. */
+#ifdef PSX_NO_DEBUG_TOOLS
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern volatile uint32_t g_psx_last_fn_entry;
+#ifdef PSX_OVERLAY_DLL_BUILD
+void debug_server_log_call_entry(uint32_t func_addr);
+#else
+static inline void debug_server_log_call_entry(uint32_t func_addr) {
+ g_psx_last_fn_entry = func_addr;
+}
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif /* PSXRECOMP_CPU_STATE_H */
diff --git a/overlay_toolchain/include/crash_trace.h b/overlay_toolchain/include/crash_trace.h
new file mode 100644
index 00000000..2c6b8a87
--- /dev/null
+++ b/overlay_toolchain/include/crash_trace.h
@@ -0,0 +1,43 @@
+#ifndef PSXRECOMP_CRASH_TRACE_H
+#define PSXRECOMP_CRASH_TRACE_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Install signal/SEH/atexit handlers. Call once early in main(). */
+void psx_crash_trace_install_handlers(void);
+
+/* Manually trigger a crash dump. `reason` is a short string identifying
+ * the trigger (e.g. "fail_fast_unknown_dispatch", "trap_crash"). On
+ * Windows, `seh_info` is the EXCEPTION_POINTERS* from the SEH filter or
+ * NULL. Writes to psx_last_run_report.json (overwrite). */
+void psx_crash_trace_dump(const char *reason, void *seh_info);
+
+/* Tag a deliberate exit() so the atexit report can attribute it
+ * (e.g. "tcp_quit", "sdl_window_close"). An "atexit" report whose
+ * exit_origin is still "unknown" means an untagged exit fired. */
+void psx_crash_trace_set_exit_origin(const char *origin);
+
+/* Terminal stop for deliberate fatal sites (unhandled MMIO access,
+ * trap_crash, fail-fast unknown dispatch). Writes the structured crash
+ * report AND a full freeze-style ring dump, then:
+ * - debug-tools builds: halts emulation but keeps pumping the TCP
+ * debug server forever so every ring buffer stays queryable
+ * post-mortem (ring-buffer-first: the crash state is interrogated,
+ * not just snapshotted).
+ * - PSX_NO_DEBUG_TOOLS builds: exit(1) as before.
+ * Never returns. */
+void psx_fatal_halt(const char *reason);
+
+/* Set when psx_fatal_halt fires; the freeze heartbeat includes it so an
+ * external reader can tell a fatal halt from a wedge. NULL = healthy. */
+extern const char *g_psx_fatal_reason;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_CRASH_TRACE_H */
diff --git a/overlay_toolchain/include/crc32.h b/overlay_toolchain/include/crc32.h
new file mode 100644
index 00000000..080de009
--- /dev/null
+++ b/overlay_toolchain/include/crc32.h
@@ -0,0 +1,19 @@
+#pragma once
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Compute CRC32 (IEEE 802.3) over a byte buffer. */
+uint32_t crc32_compute(const uint8_t *data, size_t len);
+
+/* Incremental CRC32. Start from 0xFFFFFFFF, fold each chunk through
+ * crc32_update, then XOR the final running value with 0xFFFFFFFF. The result
+ * equals crc32_compute over the concatenation of the same chunks. */
+uint32_t crc32_update(uint32_t crc, const uint8_t *data, size_t len);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/overlay_toolchain/include/cue_sheet.h b/overlay_toolchain/include/cue_sheet.h
new file mode 100644
index 00000000..7900c35d
--- /dev/null
+++ b/overlay_toolchain/include/cue_sheet.h
@@ -0,0 +1,82 @@
+// cue_sheet.h — the single cue-sheet parser for the runtime.
+//
+// A .cue is the authoritative table of contents for a PS1 disc dump: it names
+// the backing BINARY file(s) and the TRACK/INDEX layout (data track, CD-DA
+// audio tracks, pregaps). Everything that needs to understand a cue goes
+// through here so the mount path (iso_reader.cpp), the identity/verify path
+// (disc_identity.cpp) and the picked-path resolver (disc_path.cpp) can never
+// disagree about what a given cue describes.
+//
+// Parsing is deliberately permissive about surface syntax (case, quoting,
+// leading whitespace) and strict about semantics: a FILE whose type is not
+// BINARY is reported rather than guessed at, because WAVE/MP3 payloads have no
+// fixed sector geometry and mis-mapping the TOC is worse than refusing the
+// image.
+
+#pragma once
+
+#include
+#include
+#include
+#include
+
+namespace PSXRecompV4 {
+
+// One FILE line, resolved against the cue's own directory.
+struct CueFileRef {
+ std::string name; // exactly as written in the cue
+ std::filesystem::path path; // resolved (absolute where possible)
+ bool is_binary = false; // FILE type token was BINARY
+ bool exists = false; // resolved path is a real file
+};
+
+// One TRACK, with its INDEX times still expressed relative to the OWNING FILE
+// (the cue's own convention). Converting to disc-relative LBAs needs each
+// file's sector count, which only the mounting code knows.
+struct CueTrackRef {
+ int number = 0;
+ bool is_audio = false;
+ size_t file_index = 0; // index into CueSheet::files
+ uint32_t index01 = 0; // track start, file-relative LBA
+ uint32_t index00 = 0; // pregap start, file-relative LBA
+ bool has_index00 = false;
+ // PREGAP / POSTGAP lengths in sectors. Unlike INDEX 00, these gaps are
+ // NOT stored in the file: the mount must insert them as silent sectors,
+ // shifting every later disc LBA (and the TOC) accordingly.
+ uint32_t pregap = 0;
+ uint32_t postgap = 0;
+};
+
+struct CueSheet {
+ bool opened = false; // the .cue itself was readable
+
+ std::vector files; // in cue order
+ std::vector tracks; // in cue order
+
+ // True when every FILE line named a BINARY payload that exists on disk —
+ // i.e. this cue can actually be mounted as written.
+ bool usable() const;
+
+ // True when at least one FILE line named a non-BINARY payload.
+ bool has_non_binary_file() const;
+
+ // Index of the file backing the first non-audio track, else 0. This is the
+ // file that carries SYSTEM.CNF / the ISO9660 header, so it is the one
+ // identity and CRC checks must read.
+ size_t data_file_index() const;
+};
+
+// Case-insensitive extension test. `dotted_ext` includes the dot, e.g. ".cue".
+bool path_has_extension_ci(const std::filesystem::path& p, const char* dotted_ext);
+
+// Resolve `name` (as written in a cue) against `dir`. Falls back to a
+// case-insensitive directory scan when the literal name does not exist, so a
+// redump cue written on Windows still mounts on a case-sensitive filesystem.
+// Returns the literal resolution when nothing matches.
+std::filesystem::path resolve_cue_relative_file(const std::filesystem::path& dir,
+ const std::string& name);
+
+// Parse `cue_path`. A sheet whose `opened` is false could not be read at all.
+CueSheet parse_cue_sheet(const std::filesystem::path& cue_path);
+
+} // namespace PSXRecompV4
diff --git a/overlay_toolchain/include/data_shards.h b/overlay_toolchain/include/data_shards.h
new file mode 100644
index 00000000..92c9343c
--- /dev/null
+++ b/overlay_toolchain/include/data_shards.h
@@ -0,0 +1,50 @@
+/* data_shards.h — memoized pure-function replay ("post-decompression shards").
+ *
+ * Design: docs/DATA_SHARDS.md. Functions listed in game.toml [data_shards]
+ * funcs get a gen-time entry hook (psx_datashard_enter) and return hooks
+ * (psx_datashard_ret). First encounter of a (function, inputs) pair runs
+ * NATIVELY under a read/write recorder fed from the memory chokepoints;
+ * the finalized shard stores the read-set (input proof), write-set (effect),
+ * caller-visible register results, and the guest cycle cost. Subsequent
+ * encounters byte-verify the read-set against live RAM (kernel-bless style)
+ * and, on match, apply the write-set, restore registers, and credit the
+ * recorded cycles through the normal advance/IRQ machinery — guest timing
+ * preserved, host executes ~a memcmp+memcpy instead of the function.
+ *
+ * Purity is proven per-capture: any MMIO access, DMA write into RAM, or
+ * abnormal exit during the recording window poisons the capture. FMV/MDEC
+ * streaming is out of scope by design (user directive 2026-07-10).
+ */
+#ifndef PSXRECOMP_DATA_SHARDS_H
+#define PSXRECOMP_DATA_SHARDS_H
+
+#include
+#include "cpu_state.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Gen-time hooks (emitted by code_generator for [data_shards] funcs). */
+int psx_datashard_enter(CPUState* cpu, uint32_t key); /* 1 = replayed, return now */
+void psx_datashard_ret(CPUState* cpu); /* at the function's jr $ra */
+
+/* Memory-chokepoint feeds (memory.c). Called only while g_ds_recording != 0,
+ * outside exception context. addr is the VIRTUAL address. */
+extern volatile int g_ds_recording;
+void ds_note_read(uint32_t addr, uint32_t size);
+void ds_note_write(uint32_t addr, uint32_t size);
+void ds_note_mmio(uint32_t addr, int is_read); /* purity poison */
+void ds_note_dma_write(void); /* DMA wrote RAM mid-window: poison */
+
+/* Runtime init (cache dir for persistence; NULL disables persistence). */
+void ds_init(const char* cache_dir, const char* game_id);
+
+/* Debug/TCP surface. */
+void ds_stats_json(char* buf, int cap);
+void ds_set_enabled(int on);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* PSXRECOMP_DATA_SHARDS_H */
diff --git a/overlay_toolchain/include/debug_server.h b/overlay_toolchain/include/debug_server.h
new file mode 100644
index 00000000..ba776a17
--- /dev/null
+++ b/overlay_toolchain/include/debug_server.h
@@ -0,0 +1,269 @@
+/*
+ * debug_server.h -- TCP debug server for PSX recomp v4
+ *
+ * Non-blocking TCP server on localhost (default port 4370).
+ * JSON-over-newline protocol, polled once per vblank.
+ * Includes a 36000-frame ring buffer for retroactive state queries.
+ *
+ * Same public API names as nesrecomp/snesrecomp debug servers
+ * so docs/TCP_COMMANDS.md and docs/internal/DEBUG.md documentation is
+ * reusable across projects.
+ */
+#ifndef PSXRECOMP_DEBUG_SERVER_H
+#define PSXRECOMP_DEBUG_SERVER_H
+
+#include
+#include
+
+#include "cpu_state.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ---- Ring buffer frame record ---- */
+
+#define FRAME_HISTORY_CAP 36000 /* ~10 min @ 60fps */
+#define MAX_FRAME_DIFFS 32
+#define RAM_SNAPSHOT_REGIONS 4
+#define RAM_SNAPSHOT_SIZE 128
+
+typedef struct {
+ uint16_t addr;
+ uint8_t mine;
+ uint8_t theirs;
+} FrameDiffEntry;
+
+typedef struct {
+ uint32_t frame_number;
+ int verify_pass; /* 1=pass, 0=fail, -1=not checked */
+ int diff_count;
+
+ /* ---- MIPS CPU state ---- */
+ uint32_t gpr[32];
+ uint32_t hi, lo;
+ uint32_t cop0_sr;
+ uint32_t cop0_cause;
+ uint32_t cop0_epc;
+
+ /* ---- Interrupt state ---- */
+ uint32_t i_stat;
+ uint32_t i_mask;
+
+ /* ---- GPU display state ---- */
+ uint16_t display_area_x, display_area_y;
+ uint16_t display_w, display_h;
+ uint8_t display_disabled;
+
+ /* ---- SIO state ---- */
+ uint16_t pad_buttons;
+ uint16_t sio_stat;
+ uint16_t sio_ctrl;
+
+ /* ---- Timing ---- */
+ uint32_t dispatch_count;
+ uint64_t total_dispatches;
+
+ /* ---- Game-specific (filled by hook) ---- */
+ uint8_t game_data[32];
+
+ /* ---- Last function name ---- */
+ char last_func[32];
+
+ /* ---- Configurable RAM snapshot regions ---- */
+ uint32_t snapshot_addr[RAM_SNAPSHOT_REGIONS];
+ uint8_t snapshot_data[RAM_SNAPSHOT_REGIONS][RAM_SNAPSHOT_SIZE];
+
+ /* ---- Divergence diffs (verify mode) ---- */
+ FrameDiffEntry diffs[MAX_FRAME_DIFFS];
+} PSXFrameRecord;
+
+/* ---- Public API (same names as NES version) ---- */
+
+/* Initialize the server. Call once at startup.
+ * port=0 uses the default (4370). */
+void debug_server_init(int port);
+
+/* Current listener status for heartbeat diagnostics. error is the platform
+ * socket error captured by init, or 0 when the listener is active. */
+void debug_server_get_status(int *listening, int *port, int *error);
+
+/* Poll for incoming connections and commands. Non-blocking.
+ * Call once per vblank. */
+void debug_server_poll(void);
+
+/* FMV quiet mode suppresses high-frequency trace rings while MDEC video is
+ * active. The TCP command pump stays live; expensive per-dispatch/per-frame
+ * recording backs off so debug builds can still play FMVs at speed. */
+void debug_server_set_fmv_quiet(int quiet);
+int debug_server_fmv_quiet(void);
+
+/* TCP serve-stall telemetry: cumulative main-thread ms spent inside
+ * bounded TCP sends, and clients dropped for exceeding the send budget.
+ * Surfaced in the freeze heartbeat / wedge dumps so a TCP-throttled run
+ * is never misattributed to a guest-side stall. */
+uint64_t debug_server_get_tcp_stall_ms(void);
+uint32_t debug_server_get_tcp_drops(void);
+
+/* Record the current frame's state into the ring buffer.
+ * Call after vblank processing. */
+void debug_server_record_frame(void);
+/* Operator capture mark (hotkey, present thread): freeze the always-on display
+ * and GP0 rings at this instant and save the presented native-wide frame, so a
+ * transient glitch can be read back afterwards over TCP (capture_mark). */
+void debug_server_capture_mark(void);
+
+/* Block while paused, polling TCP + SDL events.
+ * Call from vblank callback before frame processing. */
+void debug_server_wait_if_paused(void);
+
+/* Graceful shutdown. Call at exit. */
+void debug_server_shutdown(void);
+
+/* Check if a TCP client is connected. */
+int debug_server_is_connected(void);
+
+/* ---- Tier 1 reverse debugger: write trace ---- */
+
+/* Current dispatch target — set by psx_dispatch() before each call.
+ * Captured by the write-trace hook for function attribution. */
+extern uint32_t g_debug_current_func_addr;
+
+/* Multi-range write-trace check. Called from memory.c write paths.
+ * Iterates up to 8 configurable address ranges; records matching
+ * writes into the 1M-entry ring buffer with function + frame attribution. */
+void debug_server_trace_write_check(uint32_t phys, uint32_t old_val,
+ uint32_t new_val, uint8_t width);
+
+/* MMIO write trace — separate ring buffer for 0x1F801xxx writes. */
+void debug_server_trace_mmio_write(uint32_t addr, uint32_t val, uint8_t width);
+
+/* Dispatch trace — record every function dispatched. */
+void debug_server_trace_dispatch(uint32_t func_addr);
+void debug_server_trace_dispatch_return(uint32_t func_addr, CPUState *cpu);
+
+/* Direct-call entry hook — emitted by the recompiler at the top of every
+ * generated function. Release (PSX_NO_DEBUG_TOOLS): inlined in cpu_state.h
+ * (stamp g_psx_last_fn_entry). Debug builds use the out-of-line ring path. */
+extern volatile uint32_t g_psx_last_fn_entry;
+#ifndef PSX_NO_DEBUG_TOOLS
+void debug_server_log_call_entry(uint32_t func_addr);
+#endif
+void debug_server_log_call_entry_cpu(uint32_t func_addr, CPUState *cpu);
+/* Addressable stub for overlay CPS callbacks (always out-of-line). */
+void debug_server_log_call_entry_fn(uint32_t func_addr);
+
+/* Last store instruction PC — set by the recompiler before every memory
+ * store (sb/sh/sw/swl/swr/swc2). Read by SIO/MMIO write handlers to
+ * attribute the writing instruction without needing a full call-stack
+ * walk. Stale across non-store instructions but every store updates it. */
+extern uint32_t g_debug_last_store_pc;
+
+/* SIO write PC tracer ring — records (pc, addr, value, byte_seq) for every
+ * write to SIO_DATA / SIO_CTRL / SIO_STAT. Always-on; pulled via TCP cmd
+ * "sio_pc_trace". */
+void debug_server_log_sio_write(uint32_t addr, uint32_t value, uint8_t width);
+
+/* Targeted generated-PC probe ring used for narrow control-flow diagnostics. */
+void debug_server_log_probe(uint32_t pc, CPUState *cpu);
+
+/* RestoreState / exception longjmp tracer. Records nonlocal exception
+ * control-flow events that can skip normal function epilogues. */
+void debug_server_log_restore_event(uint32_t kind, uint32_t target_pc, uint32_t jmp_val);
+
+/* BIOS ChangeThread / TCB context tracer. Records runtime thread switches
+ * and the saved register block belonging to the selected TCB. */
+void debug_server_log_thread_event(uint32_t kind, CPUState *cpu,
+ uint32_t current_tcb,
+ uint32_t target_tcb,
+ uint32_t target_pc);
+void debug_server_log_thread_event_ex(uint32_t kind, CPUState *cpu,
+ uint32_t current_tcb,
+ uint32_t target_tcb,
+ uint32_t target_pc,
+ uintptr_t current_fiber,
+ uintptr_t target_fiber);
+
+/* Dirty-RAM dispatch break. Used by the dynamic-code interpreter to pause
+ * immediately when dispatch enters a configured address range, before a hot
+ * loop can overwrite the trace rings. */
+int debug_server_dirty_break_maybe_pause(uint32_t target, CPUState *cpu);
+
+/* ---- Watchpoint notifications ---- */
+
+void debug_server_check_watchpoints(void);
+
+/* ---- Input override ---- */
+
+/* Returns >= 0 if the debug server wants to override pad input,
+ * -1 if no override is active. Value is PS1 16-bit button mask. */
+int debug_server_get_input_override(void);
+
+/* Optional analog-stick override set alongside set_input (lx/ly/rx/ry,
+ * 0..255, 0x80 = centre). Returns 1 and fills st[lx,ly,rx,ry] when armed,
+ * 0 when the injection is buttons-only. */
+int debug_server_get_axis_override(unsigned char st[4]);
+
+/* TCP-controlled turbo mode. When enabled the frontend skips presentation and
+ * wall-clock pacing at vblank, matching the keyboard TAB turbo path. */
+int debug_server_turbo_enabled(void);
+
+/* TCP-controlled turbo mode. When enabled the frontend skips presentation and
+ * wall-clock pacing at vblank, matching the keyboard TAB turbo path. */
+int debug_server_turbo_enabled(void);
+
+/* ---- Send helpers (for extensions) ---- */
+
+/* Set the CPU state pointer for register queries. Call after CPU init. */
+void debug_server_set_cpu(CPUState *cpu);
+
+/* Global CPU pointer — set by debug_server_set_cpu(). Available for
+ * hardware simulation modules that need to read CPU state (e.g. GPU
+ * capturing stack values during A0 uploads). */
+extern CPUState *debug_cpu_ptr;
+
+void debug_server_send_line(const char *json);
+void debug_server_send_fmt(const char *fmt, ...);
+
+/* ---- Freeze auto-dump accessors ----
+ *
+ * Called from the freeze_heartbeat thread (NOT from TCP). Each function
+ * writes a JSON array `[entry1,entry2,...]` of the newest `max_count`
+ * entries from its ring directly to the given FILE*. Caller wraps with
+ * the field name (e.g. "wtrace_all":[ ... ]).
+ *
+ * Thread-safety: best-effort. The heartbeat thread fires these only
+ * after detecting a main-thread stall, so concurrent writers are rare,
+ * but a wedged loop that still touches RAM could tear an entry near the
+ * ring head. Forensic value is in the bulk of older entries which are
+ * stable. */
+void debug_server_freeze_dump_wtrace_all_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_wtrace_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_mmio_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_frame_history_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_sio_pc_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_thread_trace_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_restore_trace_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_irq_check_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_first_zero_restore_json(FILE *f);
+void debug_server_freeze_dump_entryint_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_cdrom_state_json(FILE *f);
+void debug_server_freeze_dump_cdrom_trace_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_cdrom_sector_history_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_dma_state_json(FILE *f);
+void debug_server_freeze_dump_dma_trace_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_exception_trace_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_thread_ctx_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_fn_entry_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_dirty_block_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_dirty_insn_json(FILE *f, uint32_t max_count);
+void debug_server_freeze_dump_evcb_json(FILE *f, uint32_t max_count);
+
+/* frame_fingerprint reset_on_load: called when a savestate load completes. */
+void debug_server_note_savestate_loaded(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_DEBUG_SERVER_H */
diff --git a/overlay_toolchain/include/debug_trace_ranges.h b/overlay_toolchain/include/debug_trace_ranges.h
new file mode 100644
index 00000000..5175333b
--- /dev/null
+++ b/overlay_toolchain/include/debug_trace_ranges.h
@@ -0,0 +1,30 @@
+#ifndef PSXRECOMP_DEBUG_TRACE_RANGES_H
+#define PSXRECOMP_DEBUG_TRACE_RANGES_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct PSXDebugTraceRange {
+ uint32_t lo;
+ uint32_t hi;
+} PSXDebugTraceRange;
+
+/*
+ * Parse "lo,hi[;lo,hi...]" into masked-physical, half-open ranges.
+ *
+ * Returns the number of ranges, or -1 for malformed/reversed input and -2
+ * when the destination is too small. Callers must discard the output on any
+ * negative result.
+ */
+int psx_debug_parse_trace_ranges(const char *spec,
+ PSXDebugTraceRange *ranges,
+ int capacity);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/overlay_toolchain/include/device_trace.h b/overlay_toolchain/include/device_trace.h
new file mode 100644
index 00000000..0274d5e2
--- /dev/null
+++ b/overlay_toolchain/include/device_trace.h
@@ -0,0 +1,73 @@
+/* device_trace.h — general two-process DEVICE-EVENT cycle ring.
+ *
+ * Purpose: name the device/IRQ event whose guest-cycle timing diverges between
+ * psx-runtime (code under test) and psx-beetle (independent oracle). Where
+ * parity_trace answers "which control-flow / gate-input diverged", this answers
+ * the level below it: "which hardware event (CD sector IRQ / DMA completion /
+ * RootCounter / VBlank / SPU) fired at a different guest cycle" — the producer
+ * of an over-fast or over-slow wait.
+ *
+ * Model (CLAUDE.md ring-buffer doctrine): ALWAYS-ON from boot, records one row
+ * per hardware IRQ-raise edge (the single choke point each backend funnels its
+ * device interrupts through — native psx_irq_raise(); Beetle mednafen
+ * IRQ_Assert rising edge), stamped with the deterministic guest-cycle ruler.
+ * A probe QUERIES the ring for a cycle window; it never arms-then-times.
+ *
+ * Generality: nothing here is title-specific. The SAME TU compiles into both
+ * binaries and emits IDENTICAL rows, so tools/devtrace_diff.py pulls both
+ * timelines and aligns them by guest cycle to find the first divergent event.
+ * This is the reusable device-timing audit substrate for the whole ecosystem
+ * (see recomp-template); the MMX6 cutscene asset-load over-fast wedge is its
+ * first user.
+ */
+#ifndef DEVICE_TRACE_H
+#define DEVICE_TRACE_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* IRQ source = the PSX I_STAT bit index. Identical on both backends (mednafen
+ * irq.h uses the same numbering). */
+typedef enum {
+ DEV_IRQ_VBLANK = 0,
+ DEV_IRQ_GPU = 1,
+ DEV_IRQ_CDROM = 2,
+ DEV_IRQ_DMA = 3,
+ DEV_IRQ_TIMER0 = 4,
+ DEV_IRQ_TIMER1 = 5,
+ DEV_IRQ_TIMER2 = 6,
+ DEV_IRQ_SIO0 = 7,
+ DEV_IRQ_SIO1 = 8,
+ DEV_IRQ_SPU = 9,
+ DEV_IRQ_PIO = 10,
+} dev_irq_source_t;
+
+typedef struct {
+ uint64_t seq; /* monotonic event index since boot */
+ uint64_t cycle; /* absolute guest CPU cycles at the raise (the ruler) */
+ uint32_t frame; /* host video frame at the raise */
+ uint32_t source; /* dev_irq_source_t — the I_STAT bit raised */
+ uint32_t detail; /* source-specific: DMA channel / timer index / 0 */
+} DevEvent;
+
+void device_trace_arm(int on); /* on=1 begins recording (idempotent) */
+void device_trace_reset(void); /* clear ring (keeps armed state) */
+int device_trace_is_armed(void); /* hot-path gate: cheap one-branch check */
+
+/* Record one device-IRQ raise edge. No-op unless armed. Stamps cycle+frame via
+ * the process's guest-cycle/frame accessors (shared with parity_trace). */
+void device_trace_note(uint32_t source, uint32_t detail);
+
+/* Readback: copies up to max_rows NEWEST events, oldest-first, into out[]. */
+uint32_t device_trace_get(DevEvent* out, uint32_t max_rows);
+uint64_t device_trace_total(void);
+const char* device_source_str(uint32_t source);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* DEVICE_TRACE_H */
diff --git a/overlay_toolchain/include/dirty_ram_interp.h b/overlay_toolchain/include/dirty_ram_interp.h
new file mode 100644
index 00000000..e9a9620f
--- /dev/null
+++ b/overlay_toolchain/include/dirty_ram_interp.h
@@ -0,0 +1,473 @@
+/* dirty_ram_interp.h — interpret-on-dispatch for install-at-runtime RAM.
+ *
+ * See CLAUDE.md Rule 18 and docs/dynamic_handler_install.md for the full
+ * rationale. The PS1 BIOS dynamically writes 4-instruction dispatch stubs
+ * into kernel RAM (notably RAM 0xCF0 for the SIO data-byte handler). A
+ * static recompiler can't see those bytes at compile time, so a small MIPS
+ * interpreter here runs them at dispatch time on the same CPUState.
+ *
+ * Scope: this is NOT a fallback for code the recompiler failed to translate.
+ * It runs only against PCs in pages that have been written-to since boot.
+ * Static-recompiled code continues to handle ROM-resident code and game
+ * RAM. See docs/dynamic_handler_install.md for the inline note about a
+ * potential future migration to runtime JIT (Option B).
+ */
+#ifndef PSXRECOMP_DIRTY_RAM_INTERP_H
+#define PSXRECOMP_DIRTY_RAM_INTERP_H
+
+#include
+#include
+#include "psx_memory.h"
+#include "cpu_state.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Returns 1 if `addr` lies in a dirty kernel-RAM page and the interpreter
+ * ran a basic block at that PC. Returns 0 if `addr` is clean (caller must
+ * fall back to the static dispatch table). On return with 1, cpu->pc is
+ * either 0 (block ended on jr $ra style return) or the target of a tail
+ * jump that the dispatch trampoline should re-enter.
+ *
+ * `stop_addr` is the dispatch loop's return contract (psx_dispatch_call's
+ * return_addr; 0 for plain tail dispatches). The interpreter's overlay
+ * local-flow chaining MUST NOT run past it: when a transfer (or fall-
+ * through) reaches stop_addr, the interpreter exits with cpu->pc ==
+ * stop_addr so the dispatch loop returns into the suspended native
+ * caller. Skipping this check lets the interp execute the native
+ * caller's tail itself; the suspended native host frame then resumes and
+ * double-executes that tail against a moved guest stack, restoring
+ * garbage callee-saved registers (the pig-throw blue-screen/MMIO-fatal
+ * corruption, 2026-06-10). */
+int dirty_ram_dispatch(CPUState* cpu, uint32_t addr, uint32_t stop_addr);
+
+/* Replay [start_pc, stop_pc) of already-loaded guest code from the CPU state
+ * given: every PC in the range is interpreted from its live RAM bytes, even
+ * where a compiled body or a compiled resume point (the return address of a
+ * call) begins, so a span can start in the middle of a compiled function.
+ * Calls the span makes run on their normal backend and return into it.
+ * Returns 1 when control reaches stop_pc, 0 when it leaves the range any other
+ * way (a return, a jump out, a nested span) or runs past max_insns
+ * interpreted instructions. The range is half-open, CODE identity, one span
+ * at a time. A span is a replay, not a function entry: it fires no
+ * function-entry hooks at its own PCs and stays out of capture, alias seeding
+ * and per-PC entry statistics. Instruction hooks fire as in compiled code.
+ * Mods reach it through psx_mod_run_guest_span (render passes only). */
+int dirty_ram_run_span(CPUState* cpu, uint32_t start_pc, uint32_t stop_pc,
+ uint64_t max_insns);
+/* Why the last span that failed stopped: 1 returned (pc 0), 2 left the range,
+ * 3 call-bail unwind, 4 instruction budget, 5 the interpreter declined the PC,
+ * 6 bad arguments or a span already open, 7 a call did not return to the
+ * span (`after`). `pc` is where control was. */
+typedef struct DirtyRamSpanFailure {
+ uint32_t reason, pc, start_pc, stop_pc;
+ uint32_t ra, after; /* $ra at the exit; pc after a call that did not return */
+ uint64_t insns;
+} DirtyRamSpanFailure;
+void dirty_ram_span_last_failure(DirtyRamSpanFailure *out);
+/* The open span (0,0 = none), for landings that longjmp past its exit. */
+void dirty_ram_span_get(uint32_t *lo, uint32_t *hi);
+void dirty_ram_span_set(uint32_t lo, uint32_t hi);
+
+/* Retire a deferred R3000A load-delay writeback (see dirty_ram_interp.c). The
+ * interpreter defers a load's destination-register write past the delay-slot
+ * instruction, as hardware does; call this anywhere control leaves the
+ * interpreter or an exception is delivered, so no register write is dropped. */
+void dirty_ram_ld_delay_flush(CPUState* cpu);
+
+/* Drop a deferred load-delay writeback WITHOUT applying it. Required on
+ * savestate/RB restore: the snap already has architectural GPRs, and a
+ * host-static pending load from the pre-load timeline must not stomp them
+ * on the next interp step (selfcheck MotK v0=countdown vs v0=1 forks). */
+void dirty_ram_ld_delay_discard(void);
+
+/* Save / put back the deferred load-delay writeback exactly. For a landing
+ * that longjmps out of interpreted code and then resumes the interrupted
+ * code (the render-pass watchdog abort, render_pass.c): the pass's pending
+ * load must not reach the resumed timeline, and the interrupted one's must
+ * survive. */
+typedef struct DirtyRamLoadDelay {
+ uint32_t rt, val, age;
+ int armed;
+} DirtyRamLoadDelay;
+void dirty_ram_ld_delay_save(DirtyRamLoadDelay *out);
+void dirty_ram_ld_delay_restore(const DirtyRamLoadDelay *in);
+
+/* Re-anchor host-only dirty IRQ pump ambient (entry-poll stride + 4096-insn
+ * gap) after snap restore. Not in boot_state — peers that drifted through FMV
+ * otherwise entered the post-FMV dirty wait on opposite poll phases. */
+void dirty_ram_irq_ambient_resync_after_restore(void);
+
+/* Overlay-cache windows — the address ranges eligible for capture, offline
+ * recompilation, and per-entry-validated native execution (Rule 18 code that
+ * does not exist in any compile-time image):
+ *
+ * Kernel RAM [0x00000, 0x10000): the BIOS part-2 image relocated to RAM
+ * plus install-at-runtime stubs (e.g. the SIO data-byte stub at 0xCF0).
+ * Dirty-tracked per CPU store (dirty_ram_mark_kernel_write).
+ * Overlay region [OVERLAY_REGION_FLOOR, live RAM end): game overlays loaded by
+ * CD DMA (dirty_ram_mark_executable_range).
+ *
+ * Main-EXE text [0x10000, OVERLAY_REGION_FLOOR): CLEAN pages are statically
+ * recompiled and never captured. But games that discard their boot/init code
+ * load gameplay overlays OVER this region (Tomba 2: hot gameplay code at
+ * 0x1DA88/0x24548/0x3116C, well below its 0x38800 floor). Post-baseline
+ * (dirty_ram_clear_image_baseline) a DIRTY page here is by definition live
+ * overlay code — the compiled image is stale for it — so dirty boot-text
+ * pages ARE a capture/candidate window (2026-07-06; before this they could
+ * only interpret, which dominated wall time at ~300ns/insn).
+ *
+ * The interpreter's LOCAL-FLOW gates (is_local_dirty_target /
+ * phys_is_overlay_flow_region) use DIRTY_RAM_KERNEL_WINDOW_END alone: only
+ * the kernel window stays per-block (it runs in exception context where the
+ * verified dispatch cadence is delicate). Native coverage for the kernel
+ * window comes from the overlay loader, not from interp chaining. */
+#define DIRTY_RAM_KERNEL_WINDOW_END 0x00010000u
+
+/* The overlay-region floor is the END of THIS game's statically-recompiled
+ * main-EXE text (phys). Everything at/above it is runtime-loaded overlay code,
+ * eligible for in-interpreter local-flow chaining and overlay-cache capture.
+ *
+ * It is a RUNTIME value (g_overlay_region_floor), NOT a compile-time constant,
+ * because it differs per game: Tomba 1's text ends at 0x98000 (0x10000+0x88000)
+ * but Tomba 2's boot EXE is only 0x28800 (text ends at 0x38800). A hardcoded
+ * 0x98000 misclassified Tomba 2's overlays (loaded at 0x85000+) as main-EXE
+ * text, forcing them onto the slow block-by-block dispatch path AND through the
+ * bail-prone non-local-call contract — the Whoopee-Camp splash freeze. main.cpp
+ * sets g_overlay_region_floor = (load_address + text_size) & 0x1FFFFFFF at game
+ * load; OVERLAY_REGION_FLOOR_DEFAULT applies for BIOS-only runs. */
+#define OVERLAY_REGION_FLOOR_DEFAULT 0x00098000u
+extern uint32_t g_overlay_region_floor;
+#define OVERLAY_REGION_FLOOR (g_overlay_region_floor)
+
+/* The text-image BASE (phys) = this game's main-EXE load address. The floor
+ * above only bounds the text from ABOVE; on its own it encodes the assumption
+ * that the boot EXE sits at the bottom of usable RAM, so that [KERNEL_END,
+ * FLOOR) is text and [FLOOR, RAM) is overlay. That holds for a load_address of
+ * 0x80010000 (text base == KERNEL_END, so the region below text is empty) but
+ * is FALSE for a boot EXE that loads HIGH and streams its gameplay code into
+ * the RAM BELOW itself: Klonoa loads at 0x80180000 (text 0x180000-0x18B000,
+ * overlays at 0x10000-0x130000), Street Fighter Alpha 3 at 0x80113B00,
+ * Bomberman Fantasy Race at 0x8003004C. For those the sub-text RAM was
+ * misclassified as main-EXE text — clear_image_baseline() wiped its dirty bits
+ * and the dispatch admit-heuristic refused it, so a JALR into an overlay page
+ * the CD DMA'd there fell through to psx_unknown_dispatch and fail-fast
+ * exit(1) (Klonoa, frame 687, target 0x80123D00).
+ *
+ * The overlay region is therefore BOTH sides of the text image, not just above
+ * it. main.cpp pins g_text_image_lo = load_address & 0x1FFFFFFF at game load;
+ * the default equals DIRTY_RAM_KERNEL_WINDOW_END so the below-text clause is
+ * empty for BIOS-only runs and for every bottom-loading game. */
+extern uint32_t g_text_image_lo;
+
+/* 1 iff phys is runtime-loaded overlay RAM rather than main-EXE text — either
+ * side of the text image. Identical to `phys >= FLOOR` whenever the game loads
+ * at the bottom of RAM (g_text_image_lo == KERNEL_WINDOW_END). */
+static inline int phys_is_overlay_region(uint32_t phys) {
+ return phys >= g_overlay_region_floor ||
+ (phys >= DIRTY_RAM_KERNEL_WINDOW_END && phys < g_text_image_lo);
+}
+
+/* Test whether a given physical kernel-RAM address is in a page that was
+ * written-to since boot. Defined in memory.c. */
+int dirty_ram_is_dirty(uint32_t phys);
+
+/* Kernel-image bless (memory.c). A dispatch key in the relocated kernel
+ * window (RAM [0x500,0x8500), the BIOS's boot-time copy of ROM 0x1FC10000+)
+ * may run its statically-recompiled native function IFF the live RAM bytes
+ * of the code reachable from it (emitter-supplied body extent) byte-match
+ * the ROM source. Lazily verified, cached per entry, invalidated precisely
+ * on writes into the body. Runtime-patched bodies (pad/SIO install stubs)
+ * never verify and keep interpreting — faithful either way. */
+int psx_kernel_bless_dispatchable(uint32_t phys);
+/* True when a declared kernel patch range ENDS at this RAM address. The
+ * emitter registered that PC as a continuation key, so the interpreter hands
+ * straight-line flow back to static dispatch there and only the guest's
+ * patched words interpret (memory.c psx_bios_kernel_patch_ranges). */
+int psx_kernel_patch_range_ends_at(uint32_t phys);
+void psx_kernel_bless_note_range(uint32_t phys, uint32_t len);
+void psx_kernel_bless_stats(uint64_t out[8]);
+void psx_kernel_bless_resync_after_restore(void);
+/* Soft-return rematch / BIOS switch: drop latched SCPH↔OpenBIOS window +
+ * CLEAN/MISMATCH so the next kbless_on() re-reads psx_bios_image. */
+void psx_kernel_bless_reset_for_boot(void);
+
+/* Capture/candidate window membership. Kernel window and overlay region are
+ * unconditional; main-EXE text [KERNEL_WINDOW_END, FLOOR) is included only
+ * when the page is dirty — i.e. a gameplay overlay overwrote the boot text
+ * after the game-start baseline, so the bytes there are runtime overlay code
+ * (see the window model note above). Clean boot text never enters the window
+ * (it runs compiled; capturing it would violate the static-first design). */
+static inline int overlay_cache_window_contains(uint32_t phys) {
+ return phys < DIRTY_RAM_KERNEL_WINDOW_END
+ || phys >= OVERLAY_REGION_FLOOR
+ || dirty_ram_is_dirty(phys);
+}
+uint32_t dirty_ram_get_bitmap(void);
+uint32_t dirty_ram_get_bitmap_word(uint32_t word_index);
+uint32_t dirty_ram_get_bitmap_word_count(void);
+void dirty_ram_set_bitmap_words(const uint32_t* words, uint32_t count);
+/* Rematch / session_reboot: wipe host dirty tracking so dig0 matches a cold
+ * process (memory_init clears RAM but used to leave these bitmaps sticky). */
+void dirty_ram_reset_for_boot(void);
+/* After bulk RAM restore (savestate): bump overlay page gens + lazy-miss epoch
+ * so native overlays re-hash against restored bytes; also drop sticky
+ * text_diverged/modified bitmaps (host-only — restored RAM may match ref). */
+void overlay_watch_invalidate_after_ram_restore(void);
+void dirty_ram_text_guard_resync_after_restore(void);
+void dirty_ram_mark_executable_range(uint32_t phys, uint32_t len);
+void dirty_ram_register_text_image(uint32_t phys_lo, const uint8_t *bytes,
+ uint32_t len);
+int dirty_ram_text_native_ok(uint32_t phys);
+/* Exact CFG ranges; exec_pc clips ranges that end before the resume PC. */
+int dirty_ram_text_native_ok_ranges_from(const uint32_t *lo_len_pairs,
+ uint32_t count,
+ uint32_t exec_pc);
+int dirty_ram_text_native_ok_ranges(const uint32_t *lo_len_pairs,
+ uint32_t count);
+int dirty_ram_text_image_registered(void);
+/* Bless an intentional runtime data patch (e.g. text_xlate string/glyph tables)
+ * into the text reference image so it is not mistaken for self-modifying code. */
+void dirty_ram_text_bless(uint32_t phys, const uint8_t *bytes, uint32_t len);
+uint64_t dirty_ram_text_native_blocked(void);
+uint32_t dirty_ram_text_diverged_pages(void);
+
+/* Counters for visibility / TCP debug. Increment in interpreter; expose
+ * via debug_server.c if helpful. */
+extern uint64_t g_dirty_ram_blocks_run; /* basic blocks interpreted */
+extern uint64_t g_dirty_ram_insns_run; /* instructions interpreted */
+extern uint64_t g_dirty_window_dispatches; /* interp dispatches inside a
+ * capture window (autocapture
+ * pressure signal, step 2.8) */
+extern uint64_t g_dirty_ram_aborts; /* unsupported-opcode aborts */
+extern uint64_t g_dirty_ram_guard_yields; /* long dirty loops yielded */
+extern uint64_t g_dirty_ram_unsupported_midblock;
+extern uint32_t g_dirty_ram_last_unsupported_entry;
+extern uint32_t g_dirty_ram_last_unsupported_entry_ra;
+extern uint32_t g_dirty_ram_last_unsupported_entry_sp;
+extern uint32_t g_dirty_ram_last_unsupported_insns;
+extern uint32_t g_dirty_ram_last_unsupported_pc;
+extern uint32_t g_dirty_ram_last_unsupported_insn;
+extern const char *g_dirty_ram_last_unsupported_reason;
+
+/* Per-entry-PC counters. Aggregate counters above hide which install
+ * stubs actually fire — a single noisy spurious-dispatch site can mask
+ * a legitimate handler that never runs. This open-addressed table keys
+ * on the entry PC of each interpreted block. */
+/* 65536 -> 262144 (2026-07-03): Tomba2's Trolley attract demo interprets a
+ * working set past 64K distinct PCs; a full table degraded every lookup to a
+ * full-table scan (0.3 fps host burn in pc_table_get_or_insert_in) and
+ * silently truncated overlay-capture seed lists (MAX_CAPTURE_PCS aliases
+ * this). Probe length is bounded in pc_table_get_or_insert_in either way. */
+#define DIRTY_RAM_PC_TABLE_SIZE 262144
+typedef struct {
+ uint32_t pc; /* entry PC, 0 = empty slot */
+ uint64_t hits; /* number of times dispatched here */
+ uint64_t insns; /* total instructions executed across hits */
+ uint64_t entry_hits; /* dispatches that arrived from NATIVE code (call /
+ * dispatch loop), not from the interpreter's own
+ * block-to-block chaining. `hits` conflates the two:
+ * below the local-flow floor every taken branch
+ * re-dispatches, so chain blocks dominate. entry_hits
+ * is the evidence stream for interior-alias seeds. */
+ /* Enrichment (2026-09-05, BoF3): make a bare interpreted PC explainable
+ * from a session-long per_pc snapshot alone, with no offline join and no
+ * live-ring window. Stamped only on EXTERNAL entries (arrived from native
+ * dispatch, addr != chain target), which is where the value is. */
+ uint32_t occ_crc; /* tier 1: psx_overlay_resident_crc_at(pc) at the last
+ * external entry -- the manifest CRC of the static
+ * variant whose code ranges span this PC (DLL path:
+ * last hash taken). Disambiguates a mixed band
+ * (0x801D0C00 carries BATTLE/ETC/SCENARIO/WORLD
+ * occupants) to the one actually loaded, which the
+ * offline enrich_pcs join cannot. 0 = nothing compiled
+ * spans this PC (BIOS / kernel / boot EXE). */
+ uint8_t occ_ok; /* 1 = that variant validated at the time (interior
+ * gap inside live native code: an Axis B seed);
+ * 0 = it is resident but CRC-missing (data inside the
+ * code range rewritten, or a different section than
+ * the one compiled) -- the whole band runs
+ * interpreted and no seed will fix it. */
+ uint32_t last_ext_ra;/* tier 2: gpr[31] (caller RA) at the most recent
+ * external entry — names the call site that reaches a
+ * function-pointer-table interior. This is the §9 (LOGO
+ * effect-handler tables) diagnosis made durable and
+ * session-long instead of ring-bounded; the full
+ * call/jalr/jr transfer split stays in the fp-log ring. */
+} DirtyRamPcEntry;
+extern DirtyRamPcEntry g_dirty_ram_pc_table[DIRTY_RAM_PC_TABLE_SIZE];
+/* Every aligned main-RAM word is a possible instruction PC. Execution
+ * coverage only needs presence, not a hit count, so record it in a direct
+ * bitmap instead of probing a large hash table for every retired instruction.
+ * This covers every word of the host RAM backing (the old 262K-entry hash
+ * could saturate) -- retail 2 MiB and the opt-in 8 MiB map alike -- and is
+ * also the execution-verified seed source used by overlay_capture. */
+#define DIRTY_RAM_EXEC_WORD_COUNT (PSX_MAIN_RAM_BACKING_BYTES / 4u)
+#define DIRTY_RAM_EXEC_BITMAP_WORDS ((DIRTY_RAM_EXEC_WORD_COUNT + 31u) / 32u)
+extern uint32_t g_dirty_ram_exec_pc_bitmap[DIRTY_RAM_EXEC_BITMAP_WORDS];
+/* One bit per 4 KiB page. RAM writes use this as a one-test stale-evidence
+ * guard; they clear that page's capture bits rather than serializing from the
+ * universal store hot path. */
+#define DIRTY_RAM_EXEC_PAGE_BITMAP_WORDS \
+ (((PSX_MAIN_RAM_BACKING_BYTES / 4096u) + 31u) / 32u)
+extern uint32_t g_dirty_ram_exec_page_bitmap[DIRTY_RAM_EXEC_PAGE_BITMAP_WORDS];
+/* Presence-only companion for interpreted block/dispatch entries. The richer
+ * counter table remains for telemetry, while capture can snapshot/reset this
+ * compact evidence independently at overlay-generation boundaries. */
+extern uint32_t g_dirty_ram_dispatch_pc_bitmap[DIRTY_RAM_EXEC_BITMAP_WORDS];
+
+/* The segment each interpreted dispatch entered through
+ * (docs/SEGMENT_AWARE_CODE.md §5.7). The bytes are segment-free, but a PC is
+ * not: a KUSEG, KSEG0 or KSEG1 entry of the same word links, traps and fetches
+ * in its own segment, so each needs its own compiled shard. The bitmap above
+ * keeps its meaning (dispatched in any segment); these siblings record which
+ * segments, one bit per word per segment, set at the same interpreted
+ * dispatch. The execution bitmap needs no segment: direct edges keep the
+ * entry's segment. Only the three segments that map physical memory have a
+ * sibling; a PC elsewhere (0x20000000-0x7FFFFFFF, KSEG2) addresses no RAM in
+ * Beetle and is never recorded. */
+#define PSX_CODE_SEGMENT_COUNT 3
+static inline int psx_code_segment_index(uint32_t pc) {
+ switch (pc & 0xE0000000u) {
+ case 0x00000000u: return 0; /* KUSEG */
+ case 0x80000000u: return 1; /* KSEG0 */
+ case 0xA0000000u: return 2; /* KSEG1 */
+ default: return -1;
+ }
+}
+static inline uint32_t psx_code_segment_base(int index) {
+ return index == 0 ? 0x00000000u : index == 1 ? 0x80000000u : 0xA0000000u;
+}
+/* The names the capture JSON and the per-segment cache directories use. */
+static inline const char *psx_code_segment_name(int index) {
+ return index == 0 ? "kuseg" : index == 1 ? "kseg0" : "kseg1";
+}
+extern uint32_t g_dirty_ram_dispatch_seg_bitmap[PSX_CODE_SEGMENT_COUNT]
+ [DIRTY_RAM_EXEC_BITMAP_WORDS];
+
+/* Clear dispatch evidence (the any-segment bitmap and its segment siblings)
+ * for `nwords` bitmap words from `first_word`. Every site that drops dispatch
+ * evidence goes through this, so a stale segment bit can never outlive its
+ * any-segment bit. */
+static inline void dirty_ram_dispatch_evidence_clear(uint32_t first_word,
+ uint32_t nwords) {
+ if (first_word >= DIRTY_RAM_EXEC_BITMAP_WORDS) return;
+ if (nwords > DIRTY_RAM_EXEC_BITMAP_WORDS - first_word)
+ nwords = DIRTY_RAM_EXEC_BITMAP_WORDS - first_word;
+ memset(&g_dirty_ram_dispatch_pc_bitmap[first_word], 0,
+ (size_t)nwords * sizeof(uint32_t));
+ for (int s = 0; s < PSX_CODE_SEGMENT_COUNT; s++)
+ memset(&g_dirty_ram_dispatch_seg_bitmap[s][first_word], 0,
+ (size_t)nwords * sizeof(uint32_t));
+}
+
+/* Block-entry ring buffer. Records every dispatch into dirty RAM with the
+ * caller's RA at entry, plus argument context — answers
+ * "who tried to JALR into this RAM stub, with what args".
+ * Always-on, eviction keeps memory bounded; callers query the window of
+ * interest (CLAUDE.md global rule on ring buffers).
+ *
+ * Limitation: this captures dispatches into RAM-resident code only. ROM
+ * recompiled-C → recompiled-C calls (direct C function calls in
+ * generated dispatch table) are NOT captured here. For BIOS shell
+ * investigation that's fine — shell code lives in RAM (0x800XXXXX).
+ *
+ * `ra` is cpu->gpr[31] at dispatch time. For normal JAL-style calls,
+ * (ra - 8) gives the caller's PC. For J/JR/tail-calls it's only a
+ * heuristic — treat ra as "ra_callsite_guess", not authoritative. */
+#ifdef PSX_NO_DEBUG_TOOLS
+/* Keep ABI-visible one-element sentinels so crash/debug stubs still link, while
+ * Release does not reserve the diagnostic rings' ~227 MiB of address space. */
+#define DIRTY_RAM_BLOCK_LOG_CAP 1u
+#else
+#define DIRTY_RAM_BLOCK_LOG_CAP (1u << 22) /* 4M entries (~224 MiB at 56 B each).
+ * At ~580K dispatches/s during boot, this retains ~7s of history; at
+ * ~10K/s during modal idle, ~400s. Sized for retroactive press-window
+ * analysis without the prior 16K ring's 28-ms eviction problem. */
+#endif
+typedef struct {
+ uint64_t seq; /* monotonic, unique per entry */
+ uint32_t target; /* entry PC (RAM address) */
+ uint32_t ra; /* cpu->gpr[31] at dispatch — caller's return target */
+ uint32_t a0; /* cpu->gpr[4] at dispatch */
+ uint32_t a1; /* cpu->gpr[5] at dispatch */
+ uint32_t a2; /* cpu->gpr[6] at dispatch */
+ uint32_t a3; /* cpu->gpr[7] at dispatch */
+ uint32_t t0; /* cpu->gpr[8] at dispatch */
+ uint32_t t1; /* cpu->gpr[9] at dispatch */
+ uint32_t t2; /* cpu->gpr[10] at dispatch */
+ uint32_t sp; /* cpu->gpr[29] at dispatch */
+ uint32_t frame; /* s_frame_count at the time of dispatch */
+} DirtyRamBlockLogEntry;
+extern DirtyRamBlockLogEntry g_dirty_ram_block_log[DIRTY_RAM_BLOCK_LOG_CAP];
+extern uint64_t g_dirty_ram_block_log_seq;
+
+#ifdef PSX_NO_DEBUG_TOOLS
+#define DIRTY_RAM_FLOW_LOG_CAP 1u
+#else
+#define DIRTY_RAM_FLOW_LOG_CAP (1u << 16)
+#endif
+typedef struct {
+ uint64_t seq;
+ uint32_t pc;
+ uint32_t target;
+ uint32_t ra;
+ uint32_t a0;
+ uint32_t a1;
+ uint32_t a2;
+ uint32_t a3;
+ uint32_t sp;
+ uint32_t frame;
+} DirtyRamFlowLogEntry;
+extern DirtyRamFlowLogEntry g_dirty_ram_flow_log[DIRTY_RAM_FLOW_LOG_CAP];
+extern uint64_t g_dirty_ram_flow_log_seq;
+
+#ifdef PSX_NO_DEBUG_TOOLS
+#define DIRTY_RAM_INSN_LOG_CAP 1u
+#else
+#define DIRTY_RAM_INSN_LOG_CAP (1u << 16)
+#endif
+typedef struct {
+ uint64_t seq;
+ uint32_t pc;
+ uint32_t insn;
+ uint32_t next_pc;
+ uint32_t target;
+ uint32_t before_s0;
+ uint32_t after_s0;
+ uint32_t sp;
+ uint32_t ra;
+ uint32_t v0;
+ uint32_t v1;
+ uint32_t a0;
+ uint32_t a1;
+ uint32_t a2;
+ uint32_t a3;
+ uint32_t t0;
+ uint32_t t1;
+ uint32_t t2;
+ /* Kernel scratch registers. $at is the assembler-temp that hand-written
+ * kernel asm uses to stash a base across a load-delay slot, and $k0/$k1
+ * are the exception handlers' only free registers — i.e. exactly the state
+ * that matters when debugging BIOS exception/handler code, which is what
+ * this interpreter mostly runs. */
+ uint32_t at;
+ uint32_t k0;
+ uint32_t k1;
+ uint32_t current_tcb;
+ uint32_t task_ptr;
+ uint32_t task_mode;
+ uint32_t task_submode;
+ uint32_t frame;
+ uint8_t transferred;
+ uint8_t pad[3];
+} DirtyRamInsnLogEntry;
+extern DirtyRamInsnLogEntry g_dirty_ram_insn_log[DIRTY_RAM_INSN_LOG_CAP];
+extern uint64_t g_dirty_ram_insn_log_seq;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PSXRECOMP_DIRTY_RAM_INTERP_H */
diff --git a/overlay_toolchain/include/disc_identity.h b/overlay_toolchain/include/disc_identity.h
new file mode 100644
index 00000000..c7003eab
--- /dev/null
+++ b/overlay_toolchain/include/disc_identity.h
@@ -0,0 +1,89 @@
+// disc_identity.h — disc-image identification + verification.
+//
+// Single source of truth for "is this the right disc?". Reads a .cue, raw
+// .bin/.iso/.img/.car, or CHD, checks for the ISO9660 PVD, extracts the volume id and the
+// PlayStation boot serial (from the actual SYSTEM.CNF directory entry, with
+// an early-image scan as fallback), derives the region from the
+// serial prefix, and optionally compares against an expected serial / CRC32.
+//
+// Also mounts the resolved path via ISOReader to capture TOC geometry
+// (track count, lead-out, per-track LBAs) and a stable disc_fp fingerprint
+// used by netplay peer matching — data-track CRC alone cannot catch a
+// Track-01-only mount vs a full Redump multi-track cue.
+//
+// Used both by the runtime's launch-time disc check (runtime/src/main.cpp)
+// and by the shared launcher's "Disc verified" badge, so
+// the two never drift apart.
+
+#pragma once
+
+#include
+#include
+#include
+
+namespace PSXRecompV4 {
+
+struct DiscIdentity {
+ bool opened = false; // data image opened (including decoded CHD)
+ bool has_header = false; // ISO9660 "CD001" PVD found at a PS1 disc offset
+ std::string volume_id; // PVD volume identifier (trimmed), "" if none
+ std::string detected_serial; // serial parsed from SYSTEM.CNF BOOT line, normalized
+ // to the "SCUS-94236" form; "" if not found
+ std::string region; // "NTSC-U" | "NTSC-J" | "PAL" derived from the serial
+ // prefix (detected first, else expected); "" if unknown
+
+ // Serial comparison vs the expected game id (only meaningful when one was given).
+ bool expected_serial_given = false;
+ bool serial_matches = false; // expected serial present in early disc metadata
+
+ // Full-file CRC32 (IEEE 802.3 over the data track / image bytes).
+ bool crc_computed = false;
+ uint32_t crc = 0;
+ bool expected_crc_given = false;
+ bool crc_matches = false;
+
+ // Mount / TOC (ISOReader on resolve_disc_path().mount).
+ bool from_cue = false; // mount path is a .cue
+ bool cue_fallback = false; // resolver fell back from a broken cue to a bin
+ bool upgraded_to_cue = false; // caller picked bin; mounted owning cue
+ bool toc_opened = false; // ISOReader::Open succeeded on mount
+ int track_count = 0; // >= 1 when toc_opened
+ uint32_t leadout_lba = 0; // iso sector count (GetTD track 0)
+ std::string disc_fp; // lowercase hex SHA-256 of canonical TOC
+
+ // Netplay gate (filled when NetplayDiscExpect is applied).
+ bool netplay_ok = true;
+ std::string netplay_detail; // why netplay_ok is false
+
+ std::string detail; // human-readable note (failure reason or extra info)
+};
+
+// Optional title policy from game.toml [netplay] (0 / empty = do not check).
+struct NetplayDiscExpect {
+ bool require_cue = false;
+ int required_tracks = 0; // exact iso_track_count; 0 = skip
+ bool has_required_leadout = false;
+ uint32_t required_leadout_lba = 0;
+ std::string required_disc_fp; // exact fingerprint; empty = skip
+};
+
+// Identify and (optionally) verify a disc image.
+// path : a .cue, raw .bin/.iso/.img/.car, or .chd image
+// expected_serial : the game id, e.g. "SCUS-94236" ("" skips the serial check)
+// expected_crc : full-file CRC32 to match against
+// has_expected_crc : whether expected_crc is meaningful
+// compute_crc : compute the full-file CRC32 (streamed; can be slow on big
+// images — callers typically only request it when there is an
+// expected CRC to compare against)
+// netplay_expect : optional TOC / cue policy; nullptr skips netplay_ok checks
+// (disc_fp / track_count are still computed when mount opens)
+DiscIdentity identify_disc(const std::filesystem::path& path,
+ const std::string& expected_serial,
+ uint32_t expected_crc, bool has_expected_crc,
+ bool compute_crc,
+ const NetplayDiscExpect* netplay_expect = nullptr);
+
+// Apply / re-apply netplay mount policy onto an already-identified disc.
+void apply_netplay_disc_expect(DiscIdentity& id, const NetplayDiscExpect& expect);
+
+} // namespace PSXRecompV4
diff --git a/overlay_toolchain/include/disc_path.h b/overlay_toolchain/include/disc_path.h
new file mode 100644
index 00000000..6b141842
--- /dev/null
+++ b/overlay_toolchain/include/disc_path.h
@@ -0,0 +1,53 @@
+// disc_path.h — canonicalize whatever disc file the user actually picked.
+//
+// Players do not reliably know whether to hand us the .cue or the .bin, and
+// both are legitimate things to find in a dump folder. Either pick must mount
+// and must verify identically, so every entry point that accepts a disc path
+// (game.toml [runtime] disc, --disc, the cached disc.cfg, the launcher's
+// "Change Disc" picker, the first-run file dialog) routes through
+// resolve_disc_path() first.
+//
+// The rule is "prefer the cue, but never require it":
+//
+// picked a .cue that resolves -> mount the cue (keeps the TOC)
+// picked a .cue with a missing bin -> mount a sibling image, if one exists
+// picked a raw .bin/.iso/.img/.car owned by a cue -> mount that cue
+// picked a raw .bin/.iso/.img/.car with no cue -> mount it directly
+// picked a .chd -> mount it directly (TOC embedded)
+//
+// Preferring the cue matters beyond tidiness: the cue is the only place the
+// CD-DA track layout lives. Silently swapping a cue for its same-named .bin
+// (which is what the runtime used to do) drops every audio track and pregap on
+// a single-file multi-track dump.
+//
+// `data` is always the binary carrying the ISO9660 header and SYSTEM.CNF, so
+// header / serial / CRC32 checks read the same bytes no matter which file the
+// user picked — that is what keeps the "Disc verified" verdict stable across
+// picks.
+
+#pragma once
+
+#include