diff --git a/docs/cakeEBNn3096.txt b/docs/cakeEBNn3096.txt new file mode 100644 index 00000000..ba2b2620 --- /dev/null +++ b/docs/cakeEBNn3096.txt @@ -0,0 +1,1206 @@ +// +// EBNF to be viewd at https://www.bottlecaps.de/rr/ui +// +// Copy and paste this at +// (IPV6) https://www.bottlecaps.de/rr/ui +// or (IPV4) https://rr.red-dove.com/ui +// in the 'Edit Grammar' tab +// then click the 'View Diagram' tab. +// + +// +//To facilitate start navigating +// + +std-c23 ::= + preprocessing-file? translation-unit + +//== c23-raw.txt +//N3096 working draft April 1, 2023 ISO/IEC 9899:2023 '(' E) + +//A.1 Lexical grammar +//A.1.1 Lexical elements +//(6.4) +token ::= + keyword + | identifier + | constant + | string-literal + | punctuator + +//(6.4) +preprocessing-token ::= + header-name + | identifier + | pp-number + | character-constant + | string-literal + | punctuator + | "each universal-character-name that cannot be one of the above" + | "each non-white-space character that cannot be one of the above" + +//A.1.2 Keywords +//(6.4.1) +keyword ::= //one of + "alignas" + | "alignof" + | "_Atomic" + | "auto" + | "_BitInt" + | "bool" + | "break" + | "case" + | "char" + | "_Complex" + | "const" + | "constexpr" + | "continue" + | "_Decimal128" + | "_Decimal32" + | "_Decimal64" + | "default" + | "do" + | "double" + | "else" + | "enum" + | "extern" + | "false" + | "float" + | "for" + | "_Generic" + | "goto" + | "if" + | "_Imaginary" + | "inline" + | "int" + | "long" + | "_Noreturn" + | "nullptr" + | "register" + | "restrict" + | "return" + | "short" + | "signed" + | "sizeof" + | "static" + | "static_assert" + | "struct" + | "switch" + | "thread_local" + | "true" + | "typedef" + | "typeof" + | "typeof_unqual" + | "union" + | "unsigned" + | "void" + | "volatile" + | "while" + | "_Owner" + | "_Out" + | "_Obj_owner" + | "_View" + | "_Opt" + | "static_debug" + | "static_state" + | "static_set" + | "defer" + | "try" + | "catch" + | "throw" + +//todo + +//A.1.3 Identifiers +//(6.4.2.1) +identifier ::= + identifier-start + | identifier identifier-continue + +//(6.4.2.1) +identifier-start ::= + nondigit + | "XID_Start character" + | "universal-character-name of class XID_Start" + +//(6.4.2.1) +identifier-continue ::= + digit + | nondigit + | "XID_Continue character" + | "universal-character-name of class XID_Continue" + +//(6.4.2.1) +nondigit ::= //one of + [A-Za-z_] + +//(6.4.2.1) +digit ::= //one of + [0-9] + +//A.1.4 Universal character names +//(6.4.3) +universal-character-name ::= + "\u" hex-quad + | "\U" hex-quad hex-quad + +//(6.4.3) +hex-quad ::= + hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit + +//A.1.5 Constants +//(6.4.4) +constant ::= + integer-constant + | floating-constant + | enumeration-constant + | character-constant + | predefined-constant + +//(6.4.4.1) +integer-constant ::= + decimal-constant integer-suffix? + | octal-constant integer-suffix? + | hexadecimal-constant integer-suffix? + | binary-constant integer-suffix? + +//(6.4.4.1) +decimal-constant ::= + nonzero-digit + | decimal-constant "'"? digit + +//(6.4.4.1) +octal-constant ::= + '0' octal-constant "'"? octal-digit + +//(6.4.4.1) +hexadecimal-constant ::= + hexadecimal-prefix hexadecimal-digit-sequence + +//(6.4.4.1) +binary-constant ::= + binary-prefix binary-digit + | binary-constant "'"? binary-digit + +//(6.4.4.1) +hexadecimal-prefix ::= //one of + "0x" | "0X" + +//(6.4.4.1) +binary-prefix ::= //one of + "0b" | "0B" + +//(6.4.4.1) +nonzero-digit ::= //one of + [1-9] + +//(6.4.4.1) +octal-digit ::= //one of + [0-7] + +hexadecimal-digit-sequence ::= + hexadecimal-digit + | hexadecimal-digit-sequence "'"? hexadecimal-digit + +//(6.4.4.1) +hexadecimal-digit ::= //one of + [A-Fa-f0-9] + +//(6.4.4.1) +binary-digit ::= //one of + [01] + +//(6.4.4.1) +integer-suffix ::= + unsigned-suffix long-suffix? + | unsigned-suffix long-long-suffix + | unsigned-suffix bit-precise-int-suffix + | long-suffix unsigned-suffix? + | long-long-suffix unsigned-suffix? + | bit-precise-int-suffix unsigned-suffix? + +//(6.4.4.1) +bit-precise-int-suffix ::= //one of + "wb" | "WB" + +//(6.4.4.1) +unsigned-suffix ::= //one of + 'u' | 'U' + +//(6.4.4.1) +long-suffix ::= //one of + 'l' | 'L' + +//(6.4.4.1) +long-long-suffix ::= //one of + "ll" | "LL" + +//(6.4.4.2) +floating-constant ::= + decimal-floating-constant + | hexadecimal-floating-constant + +//(6.4.4.2) +decimal-floating-constant ::= + fractional-constant exponent-part? floating-suffix? + | digit-sequence exponent-part floating-suffix? + +//(6.4.4.2) +hexadecimal-floating-constant ::= + hexadecimal-prefix hexadecimal-fractional-constant + binary-exponent-part floating-suffix? + | hexadecimal-prefix hexadecimal-digit-sequence + binary-exponent-part floating-suffix? + +//(6.4.4.2) +fractional-constant ::= + digit-sequence? '.' digit-sequence + | digit-sequence '.' + +//(6.4.4.2) +exponent-part ::= + [Ee] sign? digit-sequence + +//(6.4.4.2) +sign ::= //one of + [+-] + +//(6.4.4.2) +digit-sequence ::= + digit + | digit-sequence "'"? digit + +//(6.4.4.2) +hexadecimal-fractional-constant ::= + hexadecimal-digit-sequence? '.' hexadecimal-digit-sequence + | hexadecimal-digit-sequence '.' + +//(6.4.4.2) +binary-exponent-part ::= + [Pp] sign? digit-sequence + +//(6.4.4.2) +floating-suffix ::= //one of + "fl" | "FL" | "df" | "dd" | "dl" | "DF" | "DD" | "DL" + +//(6.4.4.3) +enumeration-constant ::= + identifier + +//(6.4.4.4) +character-constant ::= + encoding-prefix? "'" c-char-sequence "'" + +//(6.4.4.4) +encoding-prefix ::= //one of + "u8" | "u" | "U" | "L" + +//(6.4.4.4) +c-char-sequence ::= + c-char + | c-char-sequence c-char + +//(6.4.4.4) +c-char ::= + "any member of the source character set except the single-quote ', backslash \, or new-line character" + | escape-sequence + +//(6.4.4.4) +escape-sequence ::= + simple-escape-sequence + | octal-escape-sequence + | hexadecimal-escape-sequence + | universal-character-name + +//(6.4.4.4) +simple-escape-sequence ::= //one of + "\'" | '\"' | "\?" | "\\" | "\a" | "\b" | "\f" | "\n" | "\r" | "\t" | "\v" + +//(6.4.4.4) +octal-escape-sequence ::= + '\' octal-digit + | '\' octal-digit octal-digit + | '\' octal-digit octal-digit octal-digit + +//(6.4.4.4) +hexadecimal-escape-sequence ::= + "\x" hexadecimal-digit + | hexadecimal-escape-sequence hexadecimal-digit + +//(6.4.4.5) +predefined-constant ::= + "false" + | "true" + | "nullptr" + +//A.1.6 String literals +//(6.4.5) +string-literal ::= + encoding-prefix? '"' s-char-sequence? '"' + +//(6.4.5) +s-char-sequence ::= + s-char + | s-char-sequence s-char + +//(6.4.5) +s-char ::= + 'any member of the source character set except the double-quote ", backslash \, or new-line character' + | escape-sequence + +//A.1.7 Punctuators +//(6.4.6) +punctuator ::= //one of + "[" | "]" | "(" | ")" | "{" | "}" | "." | "->" + | "++" | "--" | "&" | "*" | "+" | "-" | "~" | "!" + | "/" | "%" | "<<" | ">>" | "<" | ">" | "<=" | ">=" | "==" | "!=" | "^" | "|" | "&&" | "||" + | "?" | ":" | "::" | ";" | "..." + | "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | "&=" | "^=" | "|=" + | "," | "#" | "##" + | "<:" | ":>" | "<%" | "%>" | "%:" | "%:%:" + +//A.1.8 Header names +//(6.4.7) +header-name ::= + '<' h-char-sequence '>' + | '"' q-char-sequence '"' + +//(6.4.7) +h-char-sequence ::= + h-char + | h-char-sequence h-char + +//(6.4.7) +h-char ::= + "any member of the source character set except the new-line character and >" + +//(6.4.7) +q-char-sequence ::= + q-char + | q-char-sequence q-char + +//(6.4.7) +q-char ::= + "any member of the source character set except the new-line character and " + +//A.1.9 Preprocessing numbers +//(6.4.8) +pp-number ::= + digit + | '.' digit + | pp-number identifier-continue + | pp-number "'" digit + | pp-number "'" nondigit + | pp-number 'e' sign + | pp-number 'E' sign + | pp-number 'p' sign + | pp-number 'P' sign + | pp-number '.' + +//A.2 Phrase structure grammar +//A.2.1 Expressions +//(6.5.1) +primary-expression ::= + identifier + | constant + | string-literal + | '(' expression ')' + | generic-selection + +//(6.5.1.1) +generic-selection ::= + "_Generic" '(' assignment-expression ',' generic-assoc-list ')' + | "_Generic" '(' type-name ',' generic-assoc-list ')' + +//(6.5.1.1) +generic-assoc-list ::= + generic-association + | generic-assoc-list ',' generic-association + +//(6.5.1.1) +generic-association ::= + type-name ':' assignment-expression + | default ':' assignment-expression + +//(6.5.2) +postfix-expression ::= + primary-expression + | postfix-expression '[' expression ']' + | postfix-expression '(' argument-expression-list? ')' + | postfix-expression '.' identifier + | postfix-expression "->" identifier + | postfix-expression "++" + | postfix-expression "--" + | compound-literal + +//(6.5.2) +argument-expression-list ::= + assignment-expression + | argument-expression-list ',' assignment-expression + +//(6.5.2.5) +compound-literal ::= + '(' storage-class-specifiers? type-name ')' braced-initializer + +//(6.5.2.5) +storage-class-specifiers ::= + storage-class-specifier + | storage-class-specifiers storage-class-specifier + +//(6.5.3) +unary-expression ::= + postfix-expression + | "++" unary-expression + | "--" unary-expression + | unary-operator cast-expression + | "sizeof" unary-expression + | "sizeof" '(' type-name ')' + | "alignof" '(' type-name ')' + +//(6.5.3) +unary-operator ::= //one of + '&' | '*' | '+' | '-' | '~' | '!' + +//(6.5.4) +cast-expression ::= + unary-expression + | '(' type-name ')' cast-expression + +//(6.5.5) +multiplicative-expression ::= + cast-expression + | multiplicative-expression '*' cast-expression + | multiplicative-expression '/' cast-expression + | multiplicative-expression '%' cast-expression + +//(6.5.6) +additive-expression ::= + multiplicative-expression + | additive-expression '+' multiplicative-expression + | additive-expression '-' multiplicative-expression + +//(6.5.7) +shift-expression ::= + additive-expression + | shift-expression "<<" additive-expression + | shift-expression ">>" additive-expression + +//(6.5.8) +relational-expression ::= + shift-expression + | relational-expression '<' shift-expression + | relational-expression '>' shift-expression + | relational-expression "<=" shift-expression + | relational-expression ">=" shift-expression + +//(6.5.9) +equality-expression ::= + relational-expression + | equality-expression "==" relational-expression + | equality-expression "!=" relational-expression + +//(6.5.10) +AND-expression ::= + equality-expression + | AND-expression '&' equality-expression + +//(6.5.11) +exclusive-OR-expression ::= + AND-expression + | exclusive-OR-expression '^' AND-expression + +//(6.5.12) +inclusive-OR-expression ::= + exclusive-OR-expression + | inclusive-OR-expression '|' exclusive-OR-expression + +//(6.5.13) +logical-AND-expression ::= + inclusive-OR-expression + | logical-AND-expression "&&" inclusive-OR-expression + +//(6.5.14) +logical-OR-expression ::= + logical-AND-expression + | logical-OR-expression "||" logical-AND-expression + +//(6.5.15) +conditional-expression ::= + logical-OR-expression + | logical-OR-expression '?' expression ':' conditional-expression + +//(6.5.16) +assignment-expression ::= + conditional-expression + | unary-expression assignment-operator assignment-expression + +//(6.5.16) +assignment-operator ::= //one of + "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | "&=" | "^=" | "|=" + +//(6.5.17) +expression ::= + assignment-expression + | expression ',' assignment-expression + +//(6.6) +constant-expression ::= + conditional-expression + +//A.2.2 Declarations +//(6.7) +declaration ::= + declaration-specifiers init-declarator-list? ';' + | attribute-specifier-sequence declaration-specifiers init-declarator-list ';' + | static_assert-declaration + | attribute-declaration + +//(6.7) +declaration-specifiers ::= + declaration-specifier attribute-specifier-sequence? + | declaration-specifier declaration-specifiers + +//(6.7) +declaration-specifier ::= + storage-class-specifier + | type-specifier-qualifier + | function-specifier + +//(6.7) +init-declarator-list ::= + init-declarator + | init-declarator-list ',' init-declarator + +//(6.7) +init-declarator ::= + declarator + | declarator '=' initializer + +//(6.7) +attribute-declaration ::= + attribute-specifier-sequence ';' + +//(6.7.1) +storage-class-specifier ::= + "auto" + | "constexpr" + | "extern" + | "register" + | "static" + | "thread_local" + | "typedef" + +//(6.7.2) +type-specifier ::= + "void" + | "char" + | "short" + | "int" + | "long" + | "float" + | "double" + | "signed" + | "unsigned" + | "_BitInt" '(' constant-expression ')' + | "bool" + | "_Complex" + | "_Decimal32" + | "_Decimal64" + | "_Decimal128" + | atomic-type-specifier + | struct-or-union-specifier + | enum-specifier + | typedef-name + | typeof-specifier + +//(6.7.2.1) +struct-or-union-specifier ::= + struct-or-union attribute-specifier-sequence? identifier? '{' member-declaration-list '}' + | struct-or-union attribute-specifier-sequence? identifier + +//(6.7.2.1) +struct-or-union ::= + "struct" + | "union" + +//(6.7.2.1) +member-declaration-list ::= + member-declaration + | member-declaration-list member-declaration + +//(6.7.2.1) +member-declaration ::= + attribute-specifier-sequence? specifier-qualifier-list member-declarator-list? ';' + | static_assert-declaration + +//(6.7.2.1) +specifier-qualifier-list ::= + type-specifier-qualifier attribute-specifier-sequence? + | type-specifier-qualifier specifier-qualifier-list + +//(6.7.2.1) +type-specifier-qualifier ::= + type-specifier + | type-qualifier + | alignment-specifier + +//(6.7.2.1) +member-declarator-list ::= + member-declarator + | member-declarator-list ',' member-declarator + +//(6.7.2.1) +member-declarator ::= + declarator + | declarator? ':' constant-expression + +//(6.7.2.2) +enum-specifier ::= + enum attribute-specifier-sequence? identifier? enum-type-specifier? + '{' enumerator-list '}' + | enum attribute-specifier-sequence? identifier? enum-type-specifier? + '{' enumerator-list ',' '}' + | enum identifier enum-type-specifier? + +//(6.7.2.2) +enumerator-list ::= + enumerator + | enumerator-list ',' enumerator + +//(6.7.2.2) +enumerator ::= + enumeration-constant attribute-specifier-sequence? + | enumeration-constant attribute-specifier-sequence? '=' constant-expression + +//(6.7.2.2) +enum-type-specifier ::= + ':' specifier-qualifier-list + +//(6.7.2.4) +atomic-type-specifier ::= + "_Atomic" '(' type-name ')' + +//(6.7.2.5) +typeof-specifier ::= + "typeof" '(' typeof-specifier-argument ')' + | "typeof_unqual" '(' typeof-specifier-argument ')' + +//(6.7.2.5) +typeof-specifier-argument ::= + expression + | type-name + +//(6.7.3) +type-qualifier ::= + "const" + | "restrict" + | "volatile" + | "_Atomic" + | "_Owner" + | "_Out" + | "_Obj_owner" + | "_View" + | "_Opt" + +//(6.7.4) +function-specifier ::= + "inline" + | "_Noreturn" + +//(6.7.5) +alignment-specifier ::= + "alignas" '(' type-name ')' + | "alignas" '(' constant-expression ')' + +//(6.7.6) +declarator ::= + pointer? direct-declarator + +//(6.7.6) +direct-declarator ::= + identifier attribute-specifier-sequence? + | '(' declarator ')' + | array-declarator attribute-specifier-sequence? + | function-declarator attribute-specifier-sequence? + +//(6.7.6) +array-declarator ::= + direct-declarator '[' type-qualifier-list? assignment-expression? ']' + | direct-declarator '[' static type-qualifier-list? assignment-expression ']' + | direct-declarator '[' type-qualifier-list static assignment-expression ']' + | direct-declarator '[' type-qualifier-list? * ']' + +//(6.7.6) +function-declarator ::= + direct-declarator '(' parameter-type-list? ')' + +//(6.7.6) +pointer ::= + '*' attribute-specifier-sequence? type-qualifier-list? + | '*' attribute-specifier-sequence? type-qualifier-list? pointer + +//(6.7.6) +type-qualifier-list ::= + type-qualifier + | type-qualifier-list type-qualifier + +//(6.7.6) +parameter-type-list ::= + parameter-list + | parameter-list ',' "..." + | "..." + +//(6.7.6) +parameter-list ::= + parameter-declaration + | parameter-list ',' parameter-declaration + +//(6.7.6) +parameter-declaration ::= + attribute-specifier-sequence? declaration-specifiers declarator + | attribute-specifier-sequence? declaration-specifiers abstract-declarator? + +//(6.7.7) +type-name ::= + specifier-qualifier-list abstract-declarator? + +//(6.7.7) +abstract-declarator ::= + pointer + | pointer? direct-abstract-declarator + +//(6.7.7) +direct-abstract-declarator ::= + '(' abstract-declarator ')' + | array-abstract-declarator attribute-specifier-sequence? + | function-abstract-declarator attribute-specifier-sequence? + +//(6.7.7) +array-abstract-declarator ::= + direct-abstract-declarator? '[' type-qualifier-list? assignment-expression? ']' + | direct-abstract-declarator? '[' static type-qualifier-list? assignment-expression ']' + | direct-abstract-declarator? '[' type-qualifier-list static assignment-expression ']' + | direct-abstract-declarator? '[' '*' ']' + +//(6.7.7) +function-abstract-declarator ::= + direct-abstract-declarator? '(' parameter-type-list? ')' + +//(6.7.8) +typedef-name ::= + identifier + +//(6.7.10) +braced-initializer ::= + '{' '}' + | '{' initializer-list '}' + | '{' initializer-list ',' '}' + +//(6.7.10) +initializer ::= + assignment-expression + | braced-initializer + +//(6.7.10) +initializer-list ::= + designation? initializer + | initializer-list ',' designation? initializer + +//(6.7.10) +designation ::= + designator-list '=' + +//(6.7.10) +designator-list ::= + designator + | designator-list designator + +//(6.7.10) +designator ::= + '[' constant-expression ']' + | '.' identifier + +//(6.7.11) +static_assert-declaration ::= + "static_assert" '(' constant-expression ',' string-literal ')' ';' + | "static_assert" '(' constant-expression ')' ';' + +//(6.7.12.1) +attribute-specifier-sequence ::= + attribute-specifier-sequence? attribute-specifier + +//(6.7.12.1) +attribute-specifier ::= + '[' '[' attribute-list ']' ']' + +//(6.7.12.1) +attribute-list ::= + attribute? + | attribute-list ',' attribute? + +//(6.7.12.1) +attribute ::= + attribute-token attribute-argument-clause? + +//(6.7.12.1) +attribute-token ::= + standard-attribute + | attribute-prefixed-token + +//(6.7.12.1) +standard-attribute ::= + identifier + +//(6.7.12.1) +attribute-prefixed-token ::= + attribute-prefix "::" identifier + +//(6.7.12.1) +attribute-prefix ::= + identifier + +//(6.7.12.1) +attribute-argument-clause ::= + '(' balanced-token-sequence? ')' + +//(6.7.12.1) +balanced-token-sequence ::= + balanced-token + | balanced-token-sequence balanced-token + +//(6.7.12.1) +balanced-token ::= + '(' balanced-token-sequence? ')' + | '[' balanced-token-sequence? ']' + | '{' balanced-token-sequence? '}' + | "any token other than a parenthesis, a bracket, or a brace" + +//A.2.3 Statements +//(6.8) +statement ::= + labeled-statement + | unlabeled-statement + +//(6.8) +unlabeled-statement ::= + expression-statement + | attribute-specifier-sequence? primary-block + | attribute-specifier-sequence? jump-statement + | defer-statement + | try-block + + +//extension +defer-statement ::= + "defer" secondary-block + +try-block ::= + "try" compound-statement + | "try" compound-statement "catch" compound-statement + +//(6.8) +primary-block ::= + compound-statement + | selection-statement + | iteration-statement + +//(6.8) +secondary-block ::= + statement + +//(6.8.1) +label ::= + attribute-specifier-sequence? identifier ':' + | attribute-specifier-sequence? case constant-expression ':' + | attribute-specifier-sequence? default ':' + +//(6.8.1) +labeled-statement ::= + label statement + +//(6.8.2) +compound-statement ::= + '{' block-item-list? '}' + +//(6.8.2) +block-item-list ::= + block-item + | block-item-list block-item + +//(6.8.2) +block-item ::= + declaration + | unlabeled-statement + | label + +//(6.8.3) +expression-statement ::= + expression? ';' + | attribute-specifier-sequence expression ';' + +//[-6ex] +//(6.8.4) +selection-statement ::= + "if" '(' expression ')' secondary-block + | "if" '(' expression ')' secondary-block "else" secondary-block + | "switch" '(' expression ')' secondary-block + +//[-6ex] +//(6.8.5) +iteration-statement ::= + "while" '(' expression ')' secondary-block + | "do" secondary-block "while" '(' expression ')' ';' + | "for" '(' expression? ';' expression? ';' expression? ')' secondary-block + | "for" '(' declaration expression? ';' expression? ')' secondary-block + +//[-6ex] +//(6.8.6) +jump-statement ::= + "goto" identifier ';' + | "continue" ';' + | "break" ';' + | "return" expression? ';' + +//[-6ex] +//A.2.4 External definitions +//(6.9) +translation-unit ::= + external-declaration + | translation-unit external-declaration + +//(6.9) +external-declaration ::= + function-definition + | declaration + +//(6.9.1) +function-definition ::= + attribute-specifier-sequence? declaration-specifiers declarator function-body + +//(6.9.1) +function-body ::= + compound-statement + +//A.3 Preprocessing directives +//(6.10) +preprocessing-file ::= + group? + +//(6.10) +group ::= + group-part + | group group-part + +//(6.10) +group-part ::= + if-section + | control-line + | text-line + | '#' non-directive + +//(6.10) +if-section ::= + if-group elif-groups? else-group? endif-line + +//(6.10) +if-group ::= + '#' "if" constant-expression new-line group? + | '#' "ifdef" identifier new-line group? + | '#' "ifndef" identifier new-line group? + +//(6.10) +elif-groups ::= + elif-group + | elif-groups elif-group + +//(6.10) +elif-group ::= + '#' "elif" constant-expression new-line group? + | '#' "elifdef" identifier new-line group? + | '#' "elifndef" identifier new-line group? + +//(6.10) +else-group ::= + '#' "else" new-line group? + +//(6.10) +endif-line ::= + '#' "endif" new-line + +//(6.10) +control-line ::= + '#' "include" pp-tokens new-line + | '#' "embed" pp-tokens new-line + | '#' "define" identifier replacement-list new-line + | '#' "define" identifier lparen identifier-list? ')' replacement-list new-line + | '#' "define" identifier lparen "..." ')' replacement-list new-line + | '#' "define" identifier lparen identifier-list ',' "..." ')' replacement-list new-line + | '#' "undef" identifier new-line + | '#' "line" pp-tokens new-line + | '#' "error" pp-tokens? new-line + | '#' "warning" pp-tokens? new-line + | '#' "pragma" pp-tokens? new-line + | '#' new-line + +//(6.10) +text-line ::= + pp-tokens? new-line + +//(6.10) +non-directive ::= + pp-tokens new-line + +//(6.10) +lparen ::= + "a '(' character not immediately preceded by white space" + +//(6.10) +replacement-list ::= + pp-tokens? + +//(6.10) +pp-tokens ::= + preprocessing-token + | pp-tokens preprocessing-token + +//(6.10) +new-line ::= + "the new-line character" + +//(6.10) +identifier-list ::= + identifier + | identifier-list ',' identifier + +//(6.10) +pp-parameter ::= + pp-parameter-name pp-parameter-clause? + +//(6.10) +pp-parameter-name ::= + pp-standard-parameter + | pp-prefixed-parameter + +//(6.10) +pp-standard-parameter ::= + identifier + +//(6.10) +pp-prefixed-parameter ::= + identifier "::" identifier + +//(6.10) +pp-parameter-clause ::= + '(' pp-balanced-token-sequence? ')' + +//(6.10) +pp-balanced-token-sequence ::= + pp-balanced-token + | pp-balanced-token-sequence pp-balanced-token + +//(6.10) +pp-balanced-token ::= + '(' pp-balanced-token-sequence? ')' + | '[' pp-balanced-token-sequence? ']' + | '{' pp-balanced-token-sequence? '}' + | "any pp-token other than a parenthesis, a bracket, or a brace" + +//(6.10) +embed-parameter-sequence ::= + pp-parameter + | embed-parameter-sequence pp-parameter + +defined-macro-expression ::= + "defined" identifier + | "defined" '(' identifier ')' + +h-preprocessing-token ::= + "any preprocessing-token other than >" + +h-pp-tokens ::= + h-preprocessing-token + | h-pp-tokens h-preprocessing-token + +header-name-tokens ::= + string-literal + | '<' h-pp-tokens '>' + +has-include-expression ::= + "__has_include" '(' header-name ')' + | "__has_include" '(' header-name-tokens ')' + +has-embed-expression ::= + "__has_embed" '(' header-name embed-parameter-sequence? ')' + | "__has_embed" '(' header-name-tokens pp-balanced-token-sequence? ')' + +has-c-attribute-express ::= + "__has_c_attribute" '(' pp-tokens ')' + +va-opt-replacement ::= + "__VA_OPT__" '(' pp-tokens? ')' + +//(6.10.7) +standard-pragma ::= + '#' "pragma" "STDC" "FP_CONTRACT" on-off-switch + | '#' "pragma" "STDC" "FENV_ACCESS" on-off-switch + | '#' "pragma" "STDC" "FENV_DEC_ROUND" dec-direction + | '#' "pragma" "STDC" "FENV_ROUND" direction + | '#' "pragma" "STDC" "CX_LIMITED_RANGE" on-off-switch + +//(6.10.7) +on-off-switch ::= //one of + "ON" + | "OFF" + | "DEFAULT" + +//(6.10.7) +direction ::= //one of + "FE_DOWNWARD" + | "FE_TONEAREST" + | "FE_TONEARESTFROMZERO" + | "FE_TOWARDZERO" + | "FE_UPWARD" + | "FE_DYNAMIC" + +//(6.10.7) +dec-direction ::= //one of + "FE_DEC_DOWNWARD" + | "FE_DEC_TONEAREST" + | "FE_DEC_TONEARESTFROMZERO" + | "FE_DEC_TOWARDZERO" + | "FE_DEC_UPWARD" + | "FE_DEC_DYNAMIC" + +//A.4 Floating-point subject sequence +//A.4.1 NaN char sequence +//(7.24.1.5) +n-char-sequence ::= + digit + | nondigit + | n-char-sequence digit + | n-char-sequence nondigit + +//A.4.2 NaN wchar_t sequence +//(7.31.4.1.2) +n-wchar-sequence ::= + digit + | nondigit + | n-wchar-sequence digit + | n-wchar-sequence nondigit + +//A.5 Decimal floating-point subject sequence +//A.5.1 NaN decimal char sequence +//(7.24.1.6) +d-char-sequence ::= + digit + | nondigit + | d-char-sequence digit + | d-char-sequence nondigit + +//A.5.2 NaN decimal wchar_t sequence +//(7.31.4.1.3) +d-wchar-sequence ::= + digit + | nondigit + | d-wchar-sequence digit + | d-wchar-sequence nondigit diff --git a/manual.md b/manual.md index 67ace973..13e08329 100644 --- a/manual.md +++ b/manual.md @@ -1,26 +1,26 @@ ## Intro -Cake works as an extension for MSVC on Windows and as an extension for GCC on Linux. This approach makes Cake useful in real and existing programs. +Cake works as an extension for MSVC on Windows and as an extension for GCC on Linux. This approach makes Cake useful in real and existing programs. When applicable, Cake uses the same command line options of MSVC and GCC. ## Include directories -On Windows, Cake can be used on the command line in the same way as MSVC. Cake will read the variable INCLUDE, which is the same variable used by MSVC to find the include directories. Additionally, you can run Cake outside the Visual Studio command prompt by adding the file 'cakeconfig.h' and specifying the directories using `pragma dir`. +On Windows, Cake can be used on the command line in the same way as MSVC. Cake will read the variable INCLUDE, which is the same variable used by MSVC to find the include directories. Additionally, you can run Cake outside the Visual Studio command prompt by adding the file 'cakeconfig.h' and specifying the directories using `pragma dir`. To discover what directories are included, you can run the command 'echo %INCLUDE%' at Visual Studio command prompt. - + ``` echo %INCLUDE% -``` +``` - -Copy this output to `cakeconfig.h`. + +Copy this output to `cakeconfig.h`. For instance: -``` - +``` + #pragma dir "C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.37.32820/include" #pragma dir "C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Auxiliary/VS/include" #pragma dir "C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/ucrt" @@ -30,15 +30,15 @@ For instance: #pragma dir "C:/Program Files (x86)/Windows Kits/10//include/10.0.22000.0/cppwinrt" ``` - -When cake runs it first tries to load cakeconfig.h, that must exist at same dir of cake.exe. - + +When cake runs it first tries to load cakeconfig.h, that must exist at same dir of cake.exe. + On Linux, the same file `cakeconfig.h` is used. To find out what are the directories used by GCC type ``` echo | gcc -E -Wp,-v - ``` - + Cake also includes standard header files. The objective is to allow usage even without installing GCC or MSVC. You can set this path on `cakeconfig.h` but mixing cake headers with other headers is not recommended. @@ -60,7 +60,7 @@ cake file.c -o file.cc && cl file.cc cake file.c -direct-compilation -o file.cc && cl file.cc Compiles file.c and outputs file.cc for direct compilation then use cl to compile file.cc - + ``` ### OPTIONS @@ -78,17 +78,20 @@ Copies preprocessor output to standard output #### -o name.c (same as GCC and MSVC) Defines the output name. used when we compile one file - -#### -remove-comments + +#### -remove-comments Remove all comments from the output file -#### -direct-compilation +#### -direct-compilation output code as compiler sees it without macros. -#### -target=standard +#### -target=standard Output target C standard (c89, c99, c11, c2x, cxx) C99 is the default and C89 (ANSI C) is the minimum target +#### -dump-tokens +Output tokens before preprocessor + #### -fi Format input (format before language conversion) @@ -96,7 +99,7 @@ Format input (format before language conversion) Format output (format after language conversion, result parsed again) -#### -Wname -Wno-name (same as GCC) +#### -Wname -Wno-name (same as GCC) Enables or disable warnings. See [warnings](warnings.html) @@ -107,14 +110,15 @@ Causes the compiler to output a list of the include files. The option also displ #### -Wall Enables all warnings -#### -sarif +#### -sarif Generates sarif files -#### -msvc-output -Output is compatible with visual studio IDE. We can click on the error message and IDE selects the line. +#### -msvc-output +Output is compatible with visual studio IDE. We can click on the error message and IDE selects the line. ### -analyze -Runs flow analysis and ownership checks +This option enables an static analysis of program flow. This is required for some +ownership checks ## Output @@ -154,7 +158,7 @@ output ├── file2.c ``` -## Setting the path +## Setting the path This command is useful on windows to add the current path to system path. (This is not persistent) ``` @@ -185,7 +189,7 @@ C89 is the minimum target. However the idea if C89 target is NOT support very old compilers, but generate code that can be compiled with C++. -C89 +C89 https://port70.net/~nsz/c/c89/c89-draft.html C99 @@ -209,9 +213,9 @@ void f(const char* /*restrict*/ s); N448 -### C99 Variable-length array (VLA) +### C99 Variable-length array (VLA) -The idea is not implement variable length arrays with automatic storage duration. (\_\_STDC\_NO\_VLA\_\_ 1). +The idea is not implement variable length arrays with automatic storage duration. (\_\_STDC\_NO\_VLA\_\_ 1). But there are other uses of VLA. @@ -241,11 +245,11 @@ Becomes C89 (not implemented) int main() { int n = 2; int m = 3; - + /*these variables are created to store the dynamic size*/ const int vla_1_n = n; const int vla_1_m = m; - + int (*p)[n][m] = malloc((vla_1_n*vla_1_m)*sizeof(int)); printf("%zu\n", (vla_1_n*vla_1_m)*sizeof(int)); @@ -262,7 +266,7 @@ https://www.open-std.org/jtc1/sc22/wg14/www/docs/n683.htm ```c struct s { int n; - double d[]; + double d[]; }; ``` @@ -284,28 +288,28 @@ struct s { void F(int a[static 5]) { } -int main() -{ +int main() +{ F(0); F(NULL); F(nullptr); - int a[] = {1, 2, 3}; + int a[] = {1, 2, 3}; F(a);//error - + int b[] = { 1, 2, 3 , 4, 5}; - F(b); + F(b); int c[] = { 1, 2, 3 , 4, 5, 6}; F(c); } ``` - + `static` is removed when target is < c99. Cakes verifies that the argument is an array of with equal or more elements. - + Cakes extend this check for arrays without static as well. ### C99 Complex and imaginary support @@ -319,7 +323,7 @@ TODO ```c double d = 0x1p+1; ``` - + Becomes in C89 ```c @@ -396,7 +400,7 @@ N494 https://www.open-std.org/jtc1/sc22/wg14/www/docs/n494.pdf ### C99 Line comments -When compiling to C89 line comments are converted to +When compiling to C89 line comments are converted to /*comments*/. ### C99 inline functions @@ -404,7 +408,7 @@ TODO https://www.open-std.org/jtc1/sc22/wg14/www/docs/n741.htm ### C99 _Pragma preprocessing operator -TODO +TODO ### C99 \_\_func\_\_ predefined identifier Parsed. C89 conversion not implemented yet. @@ -429,7 +433,7 @@ int main() debug("X = %d\n", 1); } ``` - + Becomes ```c @@ -628,7 +632,7 @@ Becomes < C11 ### C11 _Alignas or C23 alignas -Not implemented. +Not implemented. ## C23 Transformations @@ -652,23 +656,23 @@ https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1330.pdf ```c int main() -{ +{ static_assert(1 == 1, "error message"); static_assert(1 == 1); } ``` - + Becomes in C11 ```c int main() -{ +{ _Static_assert(1 == 1, "error message"); _Static_assert(1 == 1, "error"); } ``` - + In < C11 it is replaced by one space; ### C23 u8 character prefix @@ -685,16 +689,16 @@ int main(){ ``` -See also Remove support for function definitions with identifier lists +See also Remove support for function definitions with identifier lists https://open-std.org/JTC1/SC22/WG14/www/docs/n2432.pdf ### C23 Improved Tag Compatibility Not implemented yet. - + https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3037.pdf - + ```c struct foo { int a; } p; void bar(void) @@ -716,7 +720,7 @@ void bar(void) ``` ### C23 Unnamed parameters in function definitions - + ```c int f(int ); @@ -736,21 +740,21 @@ int main() int a = 1000'00; } ``` - + Becomes in < C23 ```c int main() { int a = 100000; -} +} ``` This transformation happens at token level, so even preprocessor and inactive blocks are transformed. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2626.pdf -### C23 Binary literals +### C23 Binary literals ```c #define X 0b1010 @@ -807,9 +811,9 @@ https://open-std.org/JTC1/SC22/WG14/www/docs/n3042.htm ### C23 Make false and true first-class language features -When compiling to C89 bool is replaced by unsigned char, true by 1 and false by 0. +When compiling to C89 bool is replaced by unsigned char, true by 1 and false by 0. -When compiling to C99 and C11 bool is replaced with **_Bool**, true is replaced with `((_Bool)1)` +When compiling to C99 and C11 bool is replaced with **_Bool**, true is replaced with `((_Bool)1)` and false with **(_Bool)0)** https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2935.pdf @@ -830,7 +834,7 @@ int main() { struct X x; } y = { {} }; -} +} ``` @@ -913,7 +917,7 @@ int main() /*Things get a little more complicated*/ int *array[2]; typeof(array) a1, a2; - + typeof(array) a3[3]; typeof(array) *a4[4]; @@ -925,7 +929,7 @@ int main() } ``` - + Becomes in < C23 ```c @@ -958,13 +962,13 @@ int main() /*Things get a little more complicated*/ int *array[2]; int *a1[2], *a2[2]; - + int *(a3[3])[2]; int *(*a4[4])[2]; /*abstract declarator*/ int k = sizeof(int*[2]); - + /*new way to declare pointer to functions?*/ void (*pf)(int) = ((void*)0); } @@ -977,7 +981,7 @@ https://open-std.org/JTC1/SC22/WG14/www/docs/n2930.pdf https://open-std.org/JTC1/SC22/WG14/www/docs/n3029.htm -### C23 constexpr +### C23 constexpr https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3018.htm @@ -1001,7 +1005,7 @@ int main() } ``` - + Becomes < C23 ```c @@ -1018,7 +1022,7 @@ int main() printf("%f", ((double)3.140000)); } ``` - + TODO: Maybe suffix like ULL etc makes the code easier to read. ### C23 Enhancements to Enumerations @@ -1029,7 +1033,7 @@ enum X : short { }; int main() { - enum X x = A; + enum X x = A; } ``` @@ -1041,7 +1045,7 @@ enum X { }; int main() { - short x = ((short)A); + short x = ((short)A); } ``` @@ -1110,13 +1114,13 @@ Its is implemented in cake. Conversion < C23 not defined. Maybe a define. ### C23 \#warning - + When compiling to versions < 23 it is commented out. ```c int main() { - #warning my warning message + #warning my warning message } ``` @@ -1125,7 +1129,7 @@ When target < C23 becomes ```c int main() { - /* #warning my warning message */ + /* #warning my warning message */ } ``` @@ -1216,7 +1220,7 @@ Becomes < C23 #endif ``` - + ### C23 \_\_VA_OPT\_\_ Implemented. Requires #pragma expand. (TODO make the expansion automatic) @@ -1242,7 +1246,7 @@ int main() int a = 1; int b = 2; int c = 3; - + F(a, b, c); F(); F(EMP); @@ -1278,7 +1282,7 @@ int main() int a = 1; int b = 2; int c = 3; - + f(0, a, b, c); f(0 ); f(0); @@ -1296,7 +1300,7 @@ https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3033.htm Not implemented ### C23 Compound Literals with storage specifier - + Not implemented yet. ```c @@ -1334,7 +1338,7 @@ https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2778.pdf ``` try-statement: try secondary-block - try secondary-block catch secondary-block + try secondary-block catch secondary-block ``` ``` @@ -1354,7 +1358,7 @@ try { for (int i = 0 ; i < 10; i++) { for (int j = 0 ; j < 10; j++) { - ... + ... if (error) throw; ... } @@ -1388,7 +1392,7 @@ int main() { FILE* f2 = fopen("out.txt", "w"); if (f2 == NULL) break; defer fclose(f2); - //... + //... } while(0); } @@ -1406,7 +1410,7 @@ int main() { FILE* f2 = fopen("out.txt", "w"); if (f2 == ((void*)0)) { fclose(f); break;} - + fclose(f2); fclose(f); } while(0); @@ -1469,8 +1473,8 @@ void create_app(const char* appname) } capture = { .name = strdup(appname) }; (void (void* p)) { - struct capture* capture = p; - }(&capture); + struct capture* capture = p; + }(&capture); } ``` Because struct capture was in function scope and the lambda function will be created at file scope the type **struct capture** had to be moved from function scope to file scope. @@ -1481,24 +1485,24 @@ extern char* strdup(const char* s); struct _capture0 { char * name; }; - + void _lit_func_0(void *p) { - struct _capture0* capture = p; + struct _capture0* capture = p; } void create_app(const char* appname) { struct _capture0 capture = { .name = strdup(appname) }; - _lit_func_0(&capture); + _lit_func_0(&capture); } ``` -### Extension #pragma dir +### Extension #pragma dir -```c +```c #pragma dir "C:/Program Files (x86)/Windows Kits/10//include/10.0.22000.0/cppwinrt" -``` - +``` + pragma dir makes the preprocessor include the directory when searching for includes. ### Extension #pragma expand @@ -1564,7 +1568,7 @@ _is_array Array type _is_function -A function type describes a function with specified return type. +A function type describes a function with specified return type. _is_floating_point float, double, and long double return true @@ -1574,7 +1578,7 @@ The standard signed integer types and standard unsigned integer types are collec standard integer types; _is_arithmetic -Integer and floating types are collectively called arithmetic types. +Integer and floating types are collectively called arithmetic types. _is_scalar Arithmetic types, pointer types, and the nullptr_t type are collectively called scalar types @@ -1587,7 +1591,7 @@ Arithmetic types, pointer types, and the nullptr_t type are collectively called Syntax: -``` +``` cast-expression: unary-expression ( type-name ) cast-expression @@ -1602,22 +1606,22 @@ Sample int a[2]; static_assert( a == (int[2]) ); - /* is array of ints? */ + /* is array of ints? */ static_assert( _is_array(a) && a[0] == (int) ); ``` Making operator ? be decided in compile time, this also could be an alternative to _Generic. - + ```c int main() { int a; - - int t1 = + + int t1 = a == (int) ? 1 : a == (double) ? 2 : 0; - - int t2 = + + int t2 = _Generic(a, int: 1, double: 2, default: 0); typeof( 1 ? (int) : (double)) b; @@ -1643,26 +1647,26 @@ See [ownership](ownership.html) ``` -and the lvalue conversion will not happen, allowing +and the lvalue conversion will not happen, allowing more precise (with qualifiers) type match. ### Extension assert declaration -Standard says "If NDEBUG is defined as a macro name at the point in the source file +Standard says "If NDEBUG is defined as a macro name at the point in the source file where is included, the assert macro is defined simply as ```c -#define assert(...) ((void)0) +#define assert(...) ((void)0) ``` -Cake keeps that. +Cake keeps that. If NDEBUG is NOT defined cake defines assert as ```c -#define assert(...) assert(__VA_ARGS__) +#define assert(...) assert(__VA_ARGS__) ``` Because Cake can be used as a static analyzer, reading existing headers not previously known by Cake, diff --git a/mk-it.sh b/mk-it.sh new file mode 100755 index 00000000..b29062d3 --- /dev/null +++ b/mk-it.sh @@ -0,0 +1,20 @@ +#!/bin/sh +cwd=$PWD +cd src +#gcc-13-env +gcc -g build.c -o build && ./build +#emsdk-env emcc -Wno-multichar -DMOCKFILES "lib.c" -o "web\cake.js" -s WASM=0 -s EXPORTED_FUNCTIONS=_CompileText -s EXPORTED_RUNTIME_METHODS=ccall,cwrap +cd $cwd +#myvalgrind src/cake -Iinclude /home/mingo/dev/dadbiz++/third-party/dad/sqlite3-orig/sqlite3.c +#myvalgrind ./cake -E /home/mingo/dev/dadbiz++/third-party/dad/sqlite3-orig/sqlite3.c +#./cake -analyze -D__x86_64__ -I/usr/lib/gcc/x86_64-linux-gnu/11/include/ -I/usr/local/include/ -I/usr/include/x86_64-linux-gnu/ -I/usr/include/ console.h tokenizer.h parser.h error.h fs.h hash.h object.h hashmap.h osstream.h options.h token.h type.h pre_expressions.h expressions.h visit.h format_visit.h token.c hash.c hashmap.c console.c tokenizer.c osstream.c fs.c options.c expressions.c pre_expressions.c type.c object.c parser.c visit.c flow_visit.c error.c format_visit.c tests.c +#./cake -analyze -I/usr/lib/gcc/x86_64-linux-gnu/11/include/ -I/usr/local/include/ -I/usr/include/x86_64-linux-gnu/ -I/usr/include/ console.c +#myvalgrind --vgdb-error=0 src/cake -Iinclude /home/mingo/dev/dadbiz++/third-party/dad/sqlite3-orig/sqlite3.c +#myvalgrind src/cake -Iinclude dad/test-va.c +#src/cake -dump-tokens dad/test-inf-nan.c +#src/cake -dump-tokens dad/test-wchar.c +#src/cake dad/test-type-pointer.c +#src/cake dad/test-align.c +#src/cake dad/test-double-free.c +#src/cake dad/test-generic.c +#src/cake dad/test-trigraph.c \ No newline at end of file diff --git a/ownership.md b/ownership.md index 6e7fb635..0436b90e 100644 --- a/ownership.md +++ b/ownership.md @@ -1023,7 +1023,11 @@ int main() **Rule:** Arguments must be valid. - + +Exception + +`malloc` and `calloc` have built in semantics. + **Listing 35 - Function Arguments cannot be in a moved or uninitialized state** diff --git a/src/build.c b/src/build.c index 2f59f7b4..1fe7fb10 100644 --- a/src/build.c +++ b/src/build.c @@ -8,6 +8,20 @@ #include "build.h" +static int mysytem(const char *cmd) +{ + printf("%s\n", cmd); + fflush(stdout); + return system(cmd); +} + +static int mychdir(const char *path) +{ + printf("chdir: %s\n", path); + fflush(stdout); + return chdir(path); +} + #ifdef BUILD_WINDOWS #define OUTPUT "cake.exe" #else @@ -30,8 +44,8 @@ " pre_expressions.h " \ " expressions.h " \ " visit.h " \ - " format_visit.h " - + " format_visit.h " + #define SOURCE_FILES \ " token.c " \ @@ -52,13 +66,13 @@ " error.c " \ " format_visit.c " \ " tests.c " - + void compile_cake() { #ifdef BUILD_WINDOWS_MSC - if (system("cl " SOURCE_FILES " main.c " + if (mysytem("cl " SOURCE_FILES " main.c " #ifdef DISABLE_COLORS " /DDISABLE_COLORS " @@ -106,7 +120,7 @@ void compile_cake() #ifdef BUILD_WINDOWS_CLANG - system("clang " SOURCE_FILES " main.c " + mysytem("clang " SOURCE_FILES " main.c " #if defined DEBUG " -D_DEBUG" #else @@ -129,7 +143,7 @@ void compile_cake() #endif #ifdef BUILD_LINUX_CLANG - system("clang " SOURCE_FILES " main.c " + mysytem("clang " SOURCE_FILES " main.c " #ifdef TEST "-DTEST" #endif @@ -141,11 +155,10 @@ void compile_cake() #if defined BUILD_LINUX_GCC || defined BUILD_WINDOWS_GCC // #define GCC_ANALIZER " -fanalyzer " - system("gcc " + mysytem("gcc " " -Wall " " -Wno-multichar " - " -Wno-switch " - " -g " SOURCE_FILES " main.c " + " -g -O2 " SOURCE_FILES " main.c " #if defined DEBUG " -D_DEBUG" @@ -160,7 +173,7 @@ void compile_cake() #endif #ifdef BUILD_WINDOWS_TCC - system(CC + mysytem(CC SOURCE_FILES " main.c " #if defined DEBUG @@ -204,11 +217,11 @@ void generate_doc(const char *mdfilename, const char *outfile) } char cmd[200]; snprintf(cmd, sizeof cmd, RUN "hoedown.exe --html-toc --toc-level 3 --autolink --fenced-code %s >> %s", mdfilename, outfile); - if (system(cmd) != 0) + if (mysytem(cmd) != 0) exit(1); snprintf(cmd, sizeof cmd, RUN "hoedown.exe --toc-level 3 --autolink --fenced-code %s >> %s", mdfilename, outfile); - if (system(cmd) != 0) + if (mysytem(cmd) != 0) exit(1); FILE *f3 = fopen(outfile /*"./web/index.html"*/, "a"); @@ -229,22 +242,22 @@ int main() #endif printf("Building tools-------------------------------------------\n"); - chdir("./tools"); + mychdir("./tools"); - if (system(CC " -D_CRT_SECURE_NO_WARNINGS maketest.c " OUT_OPT "../maketest.exe") != 0) + if (mysytem(CC " -D_CRT_SECURE_NO_WARNINGS maketest.c " OUT_OPT "../maketest.exe") != 0) exit(1); - if (system(CC " -D_CRT_SECURE_NO_WARNINGS amalgamator.c " OUT_OPT "../amalgamator.exe") != 0) + if (mysytem(CC " -D_CRT_SECURE_NO_WARNINGS amalgamator.c " OUT_OPT "../amalgamator.exe") != 0) exit(1); - chdir("./hoedown"); + mychdir("./hoedown"); #define HOEDOWN_SRC " autolink.c buffer.c document.c escape.c hoedown.c html.c html_blocks.c html_smartypants.c stack.c version.c" - if (system(CC HOEDOWN_SRC OUT_OPT "../../hoedown.exe") != 0) + if (mysytem(CC HOEDOWN_SRC OUT_OPT "../../hoedown.exe") != 0) exit(1); - chdir(".."); - chdir(".."); + mychdir(".."); + mychdir(".."); /* * Generates documentation from md files @@ -254,15 +267,15 @@ int main() generate_doc("../README.md", "./web/index.html"); generate_doc("../warnings.md", "./web/warnings.html"); generate_doc("../ownership.md", "./web/ownership.html"); - + remove("hoedown.exe"); - if (system(RUN "maketest.exe unit_test.c " SOURCE_FILES) != 0) + if (mysytem(RUN "maketest.exe unit_test.c " SOURCE_FILES) != 0) exit(1); remove("maketest.exe"); - if (system(RUN "amalgamator.exe -olib.c" SOURCE_FILES) != 0) + if (mysytem(RUN "amalgamator.exe -olib.c" SOURCE_FILES) != 0) exit(1); remove("amalgamator.exe"); @@ -277,7 +290,7 @@ int main() running cake on its own source code */ - //-flow-analysis + //-flow-analysis //-nullchecks #ifdef NULLCHECKS #define NC " -nullchecks " @@ -285,22 +298,23 @@ int main() #define NC " " #endif - if (system("cake.exe " NC " -Wstyle -analyze -Wno-unused-parameter -Wno-unused-variable -sarif " HEADER_FILES SOURCE_FILES) != 0) + if (mysytem("cake.exe " NC " -Wstyle -analyze -Wno-unused-parameter -Wno-unused-variable -sarif " HEADER_FILES SOURCE_FILES) != 0) exit(1); #endif #if defined BUILD_LINUX_GCC /* running cake on its own source code - To find GCC directories use + To find GCC directories use echo | gcc -E -Wp,-v - */ - if (system("./cake " + if (mysytem("./cake " " -D__x86_64__ " + " -analyze " " -I/usr/lib/gcc/x86_64-linux-gnu/11/include/ " " -I/usr/local/include/ " " -I/usr/include/x86_64-linux-gnu/ " - " -I/usr/include/ " + " -I/usr/include/ " HEADER_FILES SOURCE_FILES) != 0) { @@ -311,7 +325,7 @@ int main() #endif #ifdef TEST - int test_result = system(RUN OUTPUT); + int test_result = mysytem(RUN OUTPUT); if (test_result) { printf("\n"); diff --git a/src/build.h b/src/build.h index 490c64c1..607c6f2e 100644 --- a/src/build.h +++ b/src/build.h @@ -106,24 +106,28 @@ #endif - -#define ESC "\x1b" -#define CSI "\x1b[" -#define RESET ESC "[0m" -#define BLACK "\x1b[30m" -#define BLUE "\x1b[34m" -#define GREEN "\x1b[32m" -#define CYAN "\x1b[36m" -#define RED "\x1b[31;1m" -#define MAGENTA "\x1b[35m" -#define BROWN "\x1b[31m" -#define LIGHTGRAY "\x1b[30;1m" -#define DARKGRAY "\x1b[30m" -#define LIGHTBLUE "\x1b[34;1m" -#define LIGHTGREEN "\x1b[32,1m" -#define LIGHTCYAN "\x1b[36;1m" -#define LIGHTRED "\x1b[31;1m" -#define LIGHTMAGENTA "\x1b[35;1m" -#define YELLOW "\x1b[33;1m" -#define WHITE "\x1b[37;1m" +#ifdef WITH_ANSI_COLOR +#define COLOR_ESC(x) x +#else +#define COLOR_ESC(x) "" +#endif +#define ESC COLOR_ESC("\x1b") +#define CSI COLOR_ESC("\x1b[") +#define RESET ESC COLOR_ESC("[0m") +#define BLACK COLOR_ESC("\x1b[30m") +#define BLUE COLOR_ESC("\x1b[34m") +#define GREEN COLOR_ESC("\x1b[32m") +#define CYAN COLOR_ESC("\x1b[36m") +#define RED COLOR_ESC("\x1b[31;1m") +#define MAGENTA COLOR_ESC("\x1b[35m") +#define BROWN COLOR_ESC("\x1b[31m") +#define LIGHTGRAY COLOR_ESC("\x1b[30;1m") +#define DARKGRAY COLOR_ESC("\x1b[30m") +#define LIGHTBLUE COLOR_ESC("\x1b[34;1m") +#define LIGHTGREEN COLOR_ESC("\x1b[32,1m") +#define LIGHTCYAN COLOR_ESC("\x1b[36;1m") +#define LIGHTRED COLOR_ESC("\x1b[31;1m") +#define LIGHTMAGENTA COLOR_ESC("\x1b[35;1m") +#define YELLOW COLOR_ESC("\x1b[33;1m") +#define WHITE COLOR_ESC("\x1b[37;1m") diff --git a/src/console.c b/src/console.c index 4fa2ca0d..44dbb0fc 100644 --- a/src/console.c +++ b/src/console.c @@ -1,4 +1,3 @@ - #ifdef _WIN32 #include #else @@ -22,7 +21,8 @@ bool enable_vt_mode(void) int c_kbhit(void) { - struct termios oldt, newt; + struct termios oldt = {0}; + struct termios newt = {0}; int ch; int oldf; @@ -50,7 +50,8 @@ int c_kbhit(void) /* Read 1 character without echo */ int c_getch(void) { - struct termios old, new; + struct termios old = {0}; + struct termios new = {0}; int ch; tcgetattr(0, &old); @@ -72,7 +73,7 @@ int c_getch(void) bool enable_vt_mode(void) { //missing in mingw (installed with codeblocs) -#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING #define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 #endif diff --git a/src/console.h b/src/console.h index b4c64ee4..fe8a48d0 100644 --- a/src/console.h +++ b/src/console.h @@ -12,98 +12,67 @@ bool enable_vt_mode(void); -//#define DISABLE_COLORS 1 - -#ifdef DISABLE_COLORS - +/* + DISABLE_COLORS is defined to generate a + version of cake that does not ouput colors + A runtime flag msvcouput is already used.. + but some utility functions are not using +*/ +#ifdef ENABLE_COLORS +#define COLOR_ESC(x) x +#define COLOR_ESC_PRINT(x) x +#define ESC "\x1b" +#define CSI "\x1b[" +#else +#define COLOR_ESC(x) "" +#define COLOR_ESC_PRINT(x) #define ESC "" #define CSI "" -#define BLACK "" -#define BLUE "" -#define GREEN "" -#define CYAN "" -#define RED "" -#define MAGENTA "" -#define BROWN "" -#define LIGHTGRAY "" -#define DARKGRAY "" -#define LIGHTBLUE "" -#define LIGHTGREEN "" -#define LIGHTCYAN "" -#define LIGHTRED "" -#define LIGHTMAGENTA "" -#define YELLOW "" -#define WHITE "" - -//https//en.wikipedia.org/wiki/ANSI_escape_code - - -#define BK_BLACK "" -#define BK_BLUE "" -#define BK_GREEN "" -#define BK_CYAN "" -#define BK_RED "" -#define BK_MAGENTA "" -#define BK_BROWN "" -#define BK_LIGHTGRAY "" -#define BK_DARKGRAY "" -#define BK_LIGHTBLUE "" -#define BK_LIGHTGREEN "" -#define BK_LIGHTCYAN "" -#define BK_LIGHTRED "" -#define BK_LIGHTMAGENTA "" -#define BK_YELLOW "" -#define BK_WHITE "" -#define BK_BLINK "" -#define RESET ESC "" -#else +#endif + /*change foreground color*/ -#define ESC "\x1b" -#define CSI "\x1b[" -#define BLACK "\x1b[30m" -#define BLUE "\x1b[34m" -#define GREEN "\x1b[32m" -#define CYAN "\x1b[36m" -#define RED "\x1b[31;1m" -#define MAGENTA "\x1b[35m" -#define BROWN "\x1b[31m" -#define LIGHTGRAY "\x1b[37m" -#define DARKGRAY "\x1b[90m" -#define LIGHTBLUE "\x1b[34;1m" -#define LIGHTGREEN "\x1b[92m" -#define LIGHTCYAN "\x1b[36;1m" -#define LIGHTRED "\x1b[91m" -#define LIGHTMAGENTA "\x1b[95m" -#define YELLOW "\x1b[93m" -#define WHITE "\x1b[97m" +#define BLACK COLOR_ESC("\x1b[30m") +#define BLUE COLOR_ESC("\x1b[34m") +#define GREEN COLOR_ESC("\x1b[32m") +#define CYAN COLOR_ESC("\x1b[36m") +#define RED COLOR_ESC("\x1b[31;1m") +#define MAGENTA COLOR_ESC("\x1b[35m") +#define BROWN COLOR_ESC("\x1b[31m") +#define LIGHTGRAY COLOR_ESC("\x1b[37m") +#define DARKGRAY COLOR_ESC("\x1b[90m") +#define LIGHTBLUE COLOR_ESC("\x1b[34;1m") +#define LIGHTGREEN COLOR_ESC("\x1b[92m") +#define LIGHTCYAN COLOR_ESC("\x1b[36;1m") +#define LIGHTRED COLOR_ESC("\x1b[91m") +#define LIGHTMAGENTA COLOR_ESC("\x1b[95m") +#define YELLOW COLOR_ESC("\x1b[93m") +#define WHITE COLOR_ESC("\x1b[97m") //https//en.wikipedia.org/wiki/ANSI_escape_code -#define BK_BLACK "\x1b[40m" -#define BK_BLUE "\x1b[44m" -#define BK_GREEN "\x1b[42m" -#define BK_CYAN "\x1b[46m" -#define BK_RED "\x1b[41;1m" -#define BK_MAGENTA "\x1b[45m" -#define BK_BROWN "\x1b[41m" -#define BK_LIGHTGRAY "\x1b[40;1m" -#define BK_DARKGRAY "\x1b[40m" -#define BK_LIGHTBLUE "\x1b[44;1m" -#define BK_LIGHTGREEN "\x1b[42,1m" -#define BK_LIGHTCYAN "\x1b[46;1m" -#define BK_LIGHTRED "\x1b[41;1m" -#define BK_LIGHTMAGENTA "\x1b[45;1m" -#define BK_YELLOW "\x1b[43;1m" -#define BK_WHITE "\x1b[47;1m" -#define BK_BLINK "\x1b[40m" - -#define RESET ESC "[0m" - -#endif +#define BK_BLACK COLOR_ESC("\x1b[40m") +#define BK_BLUE COLOR_ESC("\x1b[44m") +#define BK_GREEN COLOR_ESC("\x1b[42m") +#define BK_CYAN COLOR_ESC("\x1b[46m") +#define BK_RED COLOR_ESC("\x1b[41;1m") +#define BK_MAGENTA COLOR_ESC("\x1b[45m") +#define BK_BROWN COLOR_ESC("\x1b[41m") +#define BK_LIGHTGRAY COLOR_ESC("\x1b[40;1m") +#define BK_DARKGRAY COLOR_ESC("\x1b[40m") +#define BK_LIGHTBLUE COLOR_ESC("\x1b[44;1m") +#define BK_LIGHTGREEN COLOR_ESC("\x1b[42,1m") +#define BK_LIGHTCYAN COLOR_ESC("\x1b[46;1m") +#define BK_LIGHTRED COLOR_ESC("\x1b[41;1m") +#define BK_LIGHTMAGENTA COLOR_ESC("\x1b[45;1m") +#define BK_YELLOW COLOR_ESC("\x1b[43;1m") +#define BK_WHITE COLOR_ESC("\x1b[47;1m") +#define BK_BLINK COLOR_ESC("\x1b[40m") + +#define RESET COLOR_ESC(ESC "[0m") int c_kbhit(void); diff --git a/src/expressions.c b/src/expressions.c index a891f6ac..fb8d9b8d 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -5,9 +5,7 @@ #include #include #include "expressions.h" -#include "hash.h" #include -#include "console.h" #include "parser.h" #include "type.h" @@ -23,7 +21,7 @@ struct constant_value make_constant_value_double(double d, bool disabled) { - struct constant_value r = {0}; + struct constant_value r = { 0 }; if (disabled) return r; r.dvalue = d; @@ -33,7 +31,7 @@ struct constant_value make_constant_value_double(double d, bool disabled) struct constant_value make_constant_value_ull(unsigned long long d, bool disabled) { - struct constant_value r= {0}; + struct constant_value r = { 0 }; if (disabled) return r; @@ -44,7 +42,7 @@ struct constant_value make_constant_value_ull(unsigned long long d, bool disable struct constant_value make_constant_value_ll(long long d, bool disabled) { - struct constant_value r= {0}; + struct constant_value r = { 0 }; if (disabled) return r; @@ -57,9 +55,11 @@ double constant_value_to_double(const struct constant_value* a) { switch (a->type) { - case TYPE_LONG_LONG: return (double) a->llvalue; - case TYPE_DOUBLE: return a->dvalue; - case TYPE_UNSIGNED_LONG_LONG: return (double) a->ullvalue; + case TYPE_LONG_LONG: return (double)a->llvalue; + case TYPE_DOUBLE: return a->dvalue; + case TYPE_UNSIGNED_LONG_LONG: return (double)a->ullvalue; + default: + return 0; } return 0; @@ -76,16 +76,18 @@ void constant_value_to_string(const struct constant_value* a, char buffer[], int buffer[0] = 0; switch (a->type) { - case TYPE_LONG_LONG: - snprintf(buffer, sz, "%lld", a->llvalue); - break; - case TYPE_DOUBLE: - snprintf(buffer, sz, "%f", a->dvalue); - break; + case TYPE_LONG_LONG: + snprintf(buffer, sz, "%lld", a->llvalue); + break; + case TYPE_DOUBLE: + snprintf(buffer, sz, "%f", a->dvalue); + break; - case TYPE_UNSIGNED_LONG_LONG: - snprintf(buffer, sz, "%llu", a->ullvalue); - break; + case TYPE_UNSIGNED_LONG_LONG: + snprintf(buffer, sz, "%llu", a->ullvalue); + break; + default: + return; } } @@ -93,9 +95,11 @@ unsigned long long constant_value_to_ull(const struct constant_value* a) { switch (a->type) { - case TYPE_LONG_LONG: return (unsigned long long)a->llvalue; - case TYPE_DOUBLE: return (unsigned long long)a->dvalue; - case TYPE_UNSIGNED_LONG_LONG: return (unsigned long long) a->ullvalue; + case TYPE_LONG_LONG: return (unsigned long long)a->llvalue; + case TYPE_DOUBLE: return (unsigned long long)a->dvalue; + case TYPE_UNSIGNED_LONG_LONG: return (unsigned long long) a->ullvalue; + default: + return 0; } return 0; @@ -104,9 +108,11 @@ long long constant_value_to_ll(const struct constant_value* a) { switch (a->type) { - case TYPE_LONG_LONG: return (long long) a->llvalue; - case TYPE_DOUBLE: return (long long) a->dvalue; - case TYPE_UNSIGNED_LONG_LONG: return (long long) a->ullvalue; + case TYPE_LONG_LONG: return (long long)a->llvalue; + case TYPE_DOUBLE: return (long long)a->dvalue; + case TYPE_UNSIGNED_LONG_LONG: return (long long)a->ullvalue; + default: + return 0; } return 0; @@ -115,9 +121,11 @@ bool constant_value_to_bool(const struct constant_value* a) { switch (a->type) { - case TYPE_LONG_LONG: return a->llvalue != 0; - case TYPE_DOUBLE: return a->dvalue != 0; - case TYPE_UNSIGNED_LONG_LONG: return a->ullvalue != 0; + case TYPE_LONG_LONG: return a->llvalue != 0; + case TYPE_DOUBLE: return a->dvalue != 0; + case TYPE_UNSIGNED_LONG_LONG: return a->ullvalue != 0; + default: + return 0; } return 0; @@ -134,30 +142,30 @@ struct constant_value constant_value_cast(const struct constant_value* a, enum c switch (type) { - case TYPE_NOT_CONSTANT: - case TYPE_EMPTY: - assert(false); - break; + case TYPE_NOT_CONSTANT: + case TYPE_EMPTY: + assert(false); + break; - case TYPE_LONG_LONG: - r.type = TYPE_LONG_LONG; - r.llvalue = constant_value_to_ll(a); - break; - case TYPE_DOUBLE: - r.type = TYPE_DOUBLE; - r.dvalue = constant_value_to_double(a); - break; - case TYPE_UNSIGNED_LONG_LONG: - r.type = TYPE_UNSIGNED_LONG_LONG; - r.ullvalue = constant_value_to_ull(a); - break; + case TYPE_LONG_LONG: + r.type = TYPE_LONG_LONG; + r.llvalue = constant_value_to_ll(a); + break; + case TYPE_DOUBLE: + r.type = TYPE_DOUBLE; + r.dvalue = constant_value_to_double(a); + break; + case TYPE_UNSIGNED_LONG_LONG: + r.type = TYPE_UNSIGNED_LONG_LONG; + r.ullvalue = constant_value_to_ull(a); + break; } return r; } struct constant_value constant_value_unary_op(const struct constant_value* a, int op) { - struct constant_value r = {0}; + struct constant_value r = { 0 }; if (!constant_value_is_valid(a)) { return r; @@ -168,13 +176,13 @@ struct constant_value constant_value_unary_op(const struct constant_value* a, in r.type = TYPE_DOUBLE; switch (op) { - case '!':r.dvalue = !a->dvalue; break; - //case '~':r.dvalue = ~ a->dvalue; break; - case '+':r.dvalue = +a->dvalue; break; - case '-':r.dvalue = -a->dvalue; break; - default: - assert(false); - break; + case '!':r.dvalue = !a->dvalue; break; + //case '~':r.dvalue = ~ a->dvalue; break; + case '+':r.dvalue = +a->dvalue; break; + case '-':r.dvalue = -a->dvalue; break; + default: + assert(false); + break; } return r; } @@ -183,16 +191,16 @@ struct constant_value constant_value_unary_op(const struct constant_value* a, in r.type = TYPE_UNSIGNED_LONG_LONG; switch (op) { - case '!':r.ullvalue = !a->ullvalue; break; - case '~':r.ullvalue = ~a->ullvalue; break; - case '+':r.ullvalue = a->ullvalue; break; - //case '-':r.dvalue = -a->ullvalue; break; - case '-': - r.dvalue = 0;// -a->ullvalue; - break; - default: - assert(false); - break; + case '!':r.ullvalue = !a->ullvalue; break; + case '~':r.ullvalue = ~a->ullvalue; break; + case '+':r.ullvalue = a->ullvalue; break; + //case '-':r.dvalue = -a->ullvalue; break; + case '-': + r.dvalue = 0;// -a->ullvalue; + break; + default: + assert(false); + break; } return r; } @@ -201,13 +209,13 @@ struct constant_value constant_value_unary_op(const struct constant_value* a, in r.type = TYPE_UNSIGNED_LONG_LONG; switch (op) { - case '!':r.llvalue = !((long long) a->llvalue); break; - case '~':r.llvalue = ~((long long) a->llvalue); break; - case '+':r.llvalue = +((long long) a->llvalue); break; - case '-':r.llvalue = -((long long) a->llvalue); break; - default: - assert(false); - break; + case '!':r.llvalue = !((long long)a->llvalue); break; + case '~':r.llvalue = ~((long long)a->llvalue); break; + case '+':r.llvalue = +((long long)a->llvalue); break; + case '-':r.llvalue = -((long long)a->llvalue); break; + default: + assert(false); + break; } return r; } @@ -219,7 +227,7 @@ struct constant_value constant_value_unary_op(const struct constant_value* a, in struct constant_value constant_value_op(const struct constant_value* a, const struct constant_value* b, int op) { //TODO https://github.com/thradams/checkedints - struct constant_value r = {0}; + struct constant_value r = { 0 }; if (!constant_value_is_valid(a) || !constant_value_is_valid(b)) { return r; @@ -234,40 +242,40 @@ struct constant_value constant_value_op(const struct constant_value* a, const st switch (op) { //Arithmetic Operators - case '+':r.dvalue = va + vb; break; - case '-':r.dvalue = va - vb; break; - case '*':r.dvalue = va * vb; break; - case '/': - if (vb != 0) - r.dvalue = va / vb; - else - r.type = TYPE_NOT_CONSTANT; - break; + case '+':r.dvalue = va + vb; break; + case '-':r.dvalue = va - vb; break; + case '*':r.dvalue = va * vb; break; + case '/': + if (vb != 0) + r.dvalue = va / vb; + else + r.type = TYPE_NOT_CONSTANT; + break; - //case '%':r.dvalue = va % vb; break; + //case '%':r.dvalue = va % vb; break; - //Relational Operators - case '==':r.dvalue = va == vb; break; - case '!=':r.dvalue = va != vb; break; - case '>':r.dvalue = va > vb; break; - case '<':r.dvalue = va < vb; break; - case '<=':r.dvalue = va <= vb; break; - case '>=':r.dvalue = va >= vb; break; + //Relational Operators + case '==':r.dvalue = va == vb; break; + case '!=':r.dvalue = va != vb; break; + case '>':r.dvalue = va > vb; break; + case '<':r.dvalue = va < vb; break; + case '<=':r.dvalue = va <= vb; break; + case '>=':r.dvalue = va >= vb; break; - //Logical Operators - case '&&':r.dvalue = va && vb; break; - case '||':r.dvalue = va || vb; break; + //Logical Operators + case '&&':r.dvalue = va && vb; break; + case '||':r.dvalue = va || vb; break; - //Bitwise Operators - //case '|':r.dvalue = va | vb; break; - //case '&':r.dvalue = va & vb; break; - //case '^':r.dvalue = va ^ vb; break; - //case '>>':r.dvalue = va >> vb; break; - //case '<<':r.dvalue = va << vb; break; + //Bitwise Operators + //case '|':r.dvalue = va | vb; break; + //case '&':r.dvalue = va & vb; break; + //case '^':r.dvalue = va ^ vb; break; + //case '>>':r.dvalue = va >> vb; break; + //case '<<':r.dvalue = va << vb; break; - default: - assert(false); - break; + default: + assert(false); + break; } return r; @@ -282,96 +290,96 @@ struct constant_value constant_value_op(const struct constant_value* a, const st switch (op) { //Arithmetic Operators - case '+':r.ullvalue = va + vb; break; - case '-':r.ullvalue = va - vb; break; - case '*':r.ullvalue = va * vb; break; - case '/': - if (vb != 0) - r.ullvalue = va / vb; - else - r.type = TYPE_NOT_CONSTANT; - break; - - case '%': - if (vb != 0) - r.ullvalue = va % vb; - else - r.type = TYPE_NOT_CONSTANT; - break; - - //Relational Operators - case '==':r.ullvalue = va == vb; break; - case '!=':r.ullvalue = va != vb; break; - case '>':r.ullvalue = va > vb; break; - case '<':r.ullvalue = va < vb; break; - case '<=':r.ullvalue = va <= vb; break; - case '>=':r.ullvalue = va >= vb; break; - - //Logical Operators - case '&&':r.ullvalue = va && vb; break; - case '||':r.ullvalue = va || vb; break; - - //Bitwise Operators - case '|':r.ullvalue = va | vb; break; - case '&':r.ullvalue = va & vb; break; - case '^':r.ullvalue = va ^ vb; break; - case '>>':r.ullvalue = va >> vb; break; - case '<<':r.ullvalue = va << vb; break; - - default: - assert(false); - break; - } - - return r; - } - - unsigned long long va = a->llvalue; - unsigned long long vb = b->llvalue; - r.type = TYPE_LONG_LONG; - switch (op) - { - //Arithmetic Operators - case '+':r.llvalue = va + vb; break; - case '-':r.llvalue = va - vb; break; - case '*':r.llvalue = va * vb; break; - + case '+':r.ullvalue = va + vb; break; + case '-':r.ullvalue = va - vb; break; + case '*':r.ullvalue = va * vb; break; case '/': if (vb != 0) - r.llvalue = va / vb; + r.ullvalue = va / vb; else r.type = TYPE_NOT_CONSTANT; break; case '%': if (vb != 0) - r.llvalue = va % vb; + r.ullvalue = va % vb; else r.type = TYPE_NOT_CONSTANT; break; //Relational Operators - case '==':r.llvalue = va == vb; break; - case '!=':r.llvalue = va != vb; break; - case '>':r.llvalue = va > vb; break; - case '<':r.llvalue = va < vb; break; - case '<=':r.llvalue = va <= vb; break; - case '>=':r.llvalue = va >= vb; break; + case '==':r.ullvalue = va == vb; break; + case '!=':r.ullvalue = va != vb; break; + case '>':r.ullvalue = va > vb; break; + case '<':r.ullvalue = va < vb; break; + case '<=':r.ullvalue = va <= vb; break; + case '>=':r.ullvalue = va >= vb; break; //Logical Operators - case '&&':r.llvalue = va && vb; break; - case '||':r.llvalue = va || vb; break; + case '&&':r.ullvalue = va && vb; break; + case '||':r.ullvalue = va || vb; break; //Bitwise Operators - case '|':r.llvalue = va | vb; break; - case '&':r.llvalue = va & vb; break; - case '^':r.llvalue = va ^ vb; break; - case '>>':r.llvalue = va >> vb; break; - case '<<':r.llvalue = va << vb; break; + case '|':r.ullvalue = va | vb; break; + case '&':r.ullvalue = va & vb; break; + case '^':r.ullvalue = va ^ vb; break; + case '>>':r.ullvalue = va >> vb; break; + case '<<':r.ullvalue = va << vb; break; default: assert(false); break; + } + + return r; + } + + unsigned long long va = a->llvalue; + unsigned long long vb = b->llvalue; + r.type = TYPE_LONG_LONG; + switch (op) + { + //Arithmetic Operators + case '+':r.llvalue = va + vb; break; + case '-':r.llvalue = va - vb; break; + case '*':r.llvalue = va * vb; break; + + case '/': + if (vb != 0) + r.llvalue = va / vb; + else + r.type = TYPE_NOT_CONSTANT; + break; + + case '%': + if (vb != 0) + r.llvalue = va % vb; + else + r.type = TYPE_NOT_CONSTANT; + break; + + //Relational Operators + case '==':r.llvalue = va == vb; break; + case '!=':r.llvalue = va != vb; break; + case '>':r.llvalue = va > vb; break; + case '<':r.llvalue = va < vb; break; + case '<=':r.llvalue = va <= vb; break; + case '>=':r.llvalue = va >= vb; break; + + //Logical Operators + case '&&':r.llvalue = va && vb; break; + case '||':r.llvalue = va || vb; break; + + //Bitwise Operators + case '|':r.llvalue = va | vb; break; + case '&':r.llvalue = va & vb; break; + case '^':r.llvalue = va ^ vb; break; + case '>>':r.llvalue = va >> vb; break; + case '<<':r.llvalue = va << vb; break; + + default: + assert(false); + break; } @@ -429,7 +437,7 @@ static int compare_function_arguments(struct parser_ctx* ctx, if (p_current_argument != NULL && !p_param_list->is_var_args) { - compiler_set_error_with_token(C_TOO_MANY_ARGUMENTS, ctx, + compiler_diagnostic_message(ERROR_TOO_MANY_ARGUMENTS, ctx, p_argument_expression_list->tail->expression->first_token, "too many arguments"); throw; @@ -439,13 +447,13 @@ static int compare_function_arguments(struct parser_ctx* ctx, { if (p_argument_expression_list->tail) { - compiler_set_error_with_token(C_TOO_FEW_ARGUMENTS, ctx, + compiler_diagnostic_message(ERROR_TOO_FEW_ARGUMENTS, ctx, p_argument_expression_list->tail->expression->first_token, "too few arguments"); } else { - compiler_set_error_with_token(C_TOO_FEW_ARGUMENTS, ctx, ctx->current, "too few arguments"); + compiler_diagnostic_message(ERROR_TOO_FEW_ARGUMENTS, ctx, ctx->current, "too few arguments"); } throw; } @@ -584,7 +592,7 @@ struct generic_association* owner generic_association(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "unexpected"); + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "unexpected"); } parser_match_tk(ctx, ':'); p_generic_association->expression = assignment_expression(ctx); @@ -598,7 +606,7 @@ struct generic_association* owner generic_association(struct parser_ctx* ctx) struct generic_assoc_list generic_association_list(struct parser_ctx* ctx) { - struct generic_assoc_list list = {0}; + struct generic_assoc_list list = { 0 }; try { struct generic_association* owner p_generic_association = @@ -623,7 +631,7 @@ struct generic_assoc_list generic_association_list(struct parser_ctx* ctx) } return list; } -void generic_association_delete(struct generic_association* owner p) +void generic_association_delete(struct generic_association* owner opt p) { if (p) { @@ -660,7 +668,7 @@ void generic_assoc_list_destroy(struct generic_assoc_list* obj_owner p) item = next; } } -void generic_selection_delete(struct generic_selection* owner p) +void generic_selection_delete(struct generic_selection* owner opt p) { if (p) { @@ -716,7 +724,7 @@ struct generic_selection* owner generic_selection(struct parser_ctx* ctx) p_generic_selection->generic_assoc_list = generic_association_list(ctx); - struct type lvalue_type = {0}; + struct type lvalue_type = { 0 }; struct type* p_type = NULL; @@ -732,7 +740,7 @@ struct generic_selection* owner generic_selection(struct parser_ctx* ctx) } } - else + else if(p_generic_selection->type_name) { p_type = &p_generic_selection->type_name->declarator->type; } @@ -801,26 +809,26 @@ const unsigned char* utf8_decode(const unsigned char* s, int* c) } else if ((s[0] & 0xe0) == 0xc0) { - *c = ((int) (s[0] & 0x1f) << 6) | - ((int) (s[1] & 0x3f) << 0); + *c = ((int)(s[0] & 0x1f) << 6) | + ((int)(s[1] & 0x3f) << 0); assert(*c >= 0x0080 && *c <= 0x07FF); next = s + 2; } else if ((s[0] & 0xf0) == 0xe0) { - *c = ((int) (s[0] & 0x0f) << 12) | - ((int) (s[1] & 0x3f) << 6) | - ((int) (s[2] & 0x3f) << 0); + *c = ((int)(s[0] & 0x0f) << 12) | + ((int)(s[1] & 0x3f) << 6) | + ((int)(s[2] & 0x3f) << 0); assert(*c >= 0x0800 && *c <= 0xFFFF); next = s + 3; } else if ((s[0] & 0xf8) == 0xf0 && (s[0] <= 0xf4)) { - *c = ((int) (s[0] & 0x07) << 18) | - ((int) (s[1] & 0x3f) << 12) | - ((int) (s[2] & 0x3f) << 6) | - ((int) (s[3] & 0x3f) << 0); - assert(*c >= 0x100000 && *c <= 0x10FFFF); + *c = ((int)(s[0] & 0x07) << 18) | + ((int)(s[1] & 0x3f) << 12) | + ((int)(s[2] & 0x3f) << 6) | + ((int)(s[3] & 0x3f) << 0); + assert(*c >= 0x10000 && *c <= 0x10FFFF); next = s + 4; } else @@ -848,7 +856,7 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) p_expression_node->type.attributes_flags |= CAKE_HIDDEN_ATTRIBUTE_LIKE_CHAR; p_expression_node->type.category = TYPE_CATEGORY_ITSELF; - const unsigned char* p = (const unsigned char* ) ctx->current->lexeme; + const unsigned char* p = (const unsigned char*)ctx->current->lexeme; if (p[0] == 'u' && p[1] == '8') { @@ -864,12 +872,12 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p && *p != '\'') { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); } if (c > 0x80) { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Character too large for enclosing character literal type."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Character too large for enclosing character literal type."); } @@ -888,12 +896,12 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p && *p != '\'') { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); } if (c > USHRT_MAX) { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Character too large for enclosing character literal type."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Character too large for enclosing character literal type."); } p_expression_node->constant_value = make_constant_value_ll(c, ctx->evaluation_is_disabled); @@ -911,7 +919,7 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p && *p != '\'') { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); } @@ -949,6 +957,12 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p == 0) break; value = value * 256 + c; + if (value > INT_MAX) + { + compiler_diagnostic_message(W_OUT_OF_BOUNDS, ctx, ctx->current, "character constant too long for its type", ctx->current->lexeme); + + break; + } } p_expression_node->constant_value = make_constant_value_ll(value, ctx->evaluation_is_disabled); @@ -976,6 +990,11 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p == 0) break; value = value * 256 + c; + if (value > INT_MAX) + { + compiler_diagnostic_message(W_OUT_OF_BOUNDS, ctx, ctx->current, "character constant too long for its type", ctx->current->lexeme); + break; + } } p_expression_node->constant_value = make_constant_value_ll(value, ctx->evaluation_is_disabled); } @@ -994,9 +1013,9 @@ int convert_to_number(struct token* token, struct expression* p_expression_node, /*copia removendo os separadores*/ //um dos maiores buffer necessarios seria 128 bits binario... - //0xb1'1'1.... + //0xb1'1'1.... int c = 0; - char buffer[128 * 2 + 4] = {0}; + char buffer[128 * 2 + 4] = { 0 }; const char* s = token->lexeme; while (*s) { @@ -1013,37 +1032,37 @@ int convert_to_number(struct token* token, struct expression* p_expression_node, switch (token->type) { - case TK_COMPILER_DECIMAL_CONSTANT: + case TK_COMPILER_DECIMAL_CONSTANT: - if (flags & TYPE_SPECIFIER_UNSIGNED) - { - p_expression_node->constant_value = make_constant_value_ull(strtoull(buffer, 0, 10), disabled); - } - else - { - p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer, 0, 10), disabled); - } + if (flags & TYPE_SPECIFIER_UNSIGNED) + { + p_expression_node->constant_value = make_constant_value_ull(strtoull(buffer, 0, 10), disabled); + } + else + { + p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer, 0, 10), disabled); + } - break; - case TK_COMPILER_OCTAL_CONSTANT: - p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer, 0, 8), disabled); + break; + case TK_COMPILER_OCTAL_CONSTANT: + p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer, 0, 8), disabled); - break; - case TK_COMPILER_HEXADECIMAL_CONSTANT: - p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer + 2, 0, 16), disabled); + break; + case TK_COMPILER_HEXADECIMAL_CONSTANT: + p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer + 2, 0, 16), disabled); - break; - case TK_COMPILER_BINARY_CONSTANT: - p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer + 2, 0, 2), disabled); - break; - case TK_COMPILER_DECIMAL_FLOATING_CONSTANT: - p_expression_node->constant_value = make_constant_value_double(strtod(buffer, 0), disabled); - break; - case TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT: - p_expression_node->constant_value = make_constant_value_double(strtod(buffer + 2, 0), disabled); - break; - default: - assert(false); + break; + case TK_COMPILER_BINARY_CONSTANT: + p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer + 2, 0, 2), disabled); + break; + case TK_COMPILER_DECIMAL_FLOATING_CONSTANT: + p_expression_node->constant_value = make_constant_value_double(strtod(buffer, 0), disabled); + break; + case TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT: + p_expression_node->constant_value = make_constant_value_double(strtod(buffer + 2, 0), disabled); + break; + default: + assert(false); } return 0; @@ -1123,7 +1142,7 @@ struct object* expression_get_object(struct expression* p_expression, struct typ return &p_obj->pointed->members.data[p_expression->member_index]; else { - assert(false); + return NULL; } } } @@ -1173,6 +1192,8 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) struct map_entry* p_entry = find_variables(ctx, ctx->current->lexeme, NULL); + + if (p_entry && p_entry->type == TAG_TYPE_ENUMERATOR) { struct enumerator* p_enumerator = p_entry->p; @@ -1199,13 +1220,13 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) if (type_is_deprecated(&p_declarator->type)) { - compiler_set_warning_with_token(W_DEPRECATED, ctx, ctx->current, "'%s' is deprecated", ctx->current->lexeme); + compiler_diagnostic_message(W_DEPRECATED, ctx, ctx->current, "'%s' is deprecated", ctx->current->lexeme); } p_declarator->num_uses++; p_expression_node->declarator = p_declarator; p_expression_node->expression_type = PRIMARY_EXPRESSION_DECLARATOR; - + p_expression_node->type = type_dup(&p_declarator->type); if (p_init_declarator) @@ -1238,11 +1259,11 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) p_expression_node->last_token = ctx->current; p_expression_node->type = type_make_literal_string(strlen(funcname) + 1, TYPE_SPECIFIER_CHAR); - + } else { - compiler_set_error_with_token(C_NOT_FOUND, ctx, ctx->current, "not found '%s'", ctx->current->lexeme); + compiler_diagnostic_message(ERROR_NOT_FOUND, ctx, ctx->current, "not found '%s'", ctx->current->lexeme); throw; } parser_match(ctx); @@ -1255,16 +1276,24 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) p_expression_node->expression_type = PRIMARY_EXPRESSION_STRING_LITERAL; p_expression_node->first_token = ctx->current; p_expression_node->last_token = ctx->current; - + enum type_specifier_flags char_type = TYPE_SPECIFIER_CHAR; if (get_char_type(ctx->current->lexeme) == 2) { - if (sizeof(wchar_t) == 2) - char_type = TYPE_SPECIFIER_UNSIGNED | TYPE_SPECIFIER_SHORT; - else if (sizeof(wchar_t) == 4) - char_type = TYPE_SPECIFIER_UNSIGNED | TYPE_SPECIFIER_INT; + /* + automatically finding out the type of wchar_t to copy + GCC or MSVC. + windows it is short linux is + */ + char_type = + _Generic((wchar_t)0, + short: TYPE_SPECIFIER_SHORT, + unsigned short : TYPE_SPECIFIER_UNSIGNED | TYPE_SPECIFIER_SHORT, + int : TYPE_SPECIFIER_INT, + unsigned int : TYPE_SPECIFIER_UNSIGNED | TYPE_SPECIFIER_INT + ); } p_expression_node->type = type_make_literal_string(string_literal_byte_size(ctx->current->lexeme), char_type); @@ -1359,7 +1388,7 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_NO_MATCH_FOR_GENERIC, ctx, ctx->current, "no match for generic"); + compiler_diagnostic_message(ERROR_NO_MATCH_FOR_GENERIC, ctx, ctx->current, "no match for generic"); } } else if (ctx->current->type == '(') @@ -1369,19 +1398,18 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) p_expression_node->first_token = ctx->current; parser_match(ctx); p_expression_node->right = expression(ctx); - - + if (p_expression_node->right == NULL) throw; p_expression_node->type = type_dup(&p_expression_node->right->type); p_expression_node->constant_value = p_expression_node->right->constant_value; - if (p_expression_node->right == NULL) throw; + p_expression_node->last_token = ctx->current; parser_match_tk(ctx, ')'); } else { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "unexpected"); + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "unexpected"); } } catch @@ -1396,7 +1424,7 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) } -void argument_expression_delete(struct argument_expression* owner p) +void argument_expression_delete(struct argument_expression* owner opt p) { if (p) { @@ -1422,7 +1450,7 @@ struct argument_expression_list argument_expression_list(struct parser_ctx* ctx) argument-expression-ctx , assignment-expression */ - struct argument_expression_list list = {0}; + struct argument_expression_list list = { 0 }; struct argument_expression* owner p_argument_expression = NULL; try @@ -1541,11 +1569,11 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct p_expression_node_new->first_token = ctx->current; p_expression_node_new->expression_type = POSTFIX_ARRAY; //the result of the subscription operator ([]) - + if (!type_is_pointer_or_array(&p_expression_node->type)) { - compiler_set_error_with_token(C_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, + compiler_diagnostic_message(ERROR_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, ctx, ctx->current, "subscripted value is neither array nor pointer"); @@ -1580,7 +1608,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct { if (index >= (unsigned long long) p_expression_node->type.array_size) { - compiler_set_error_with_token(C_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, + compiler_diagnostic_message(W_OUT_OF_BOUNDS, ctx, ctx->current, "index %d is past the end of the array", index); @@ -1605,7 +1633,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct if (!type_is_function_or_function_pointer(&p_expression_node->type)) { - compiler_set_error_with_token(C_CALLED_OBJECT_IS_NOT_FUNCTION_OR_FUNCTION_POINTER, + compiler_diagnostic_message(ERROR_CALLED_OBJECT_IS_NOT_FUNCTION_OR_FUNCTION_POINTER, ctx, ctx->current, "called object is not attr function or function pointer"); @@ -1635,14 +1663,15 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct p_expression_node_new->first_token = ctx->current; p_expression_node_new->expression_type = POSTFIX_DOT; p_expression_node_new->left = p_expression_node; - + p_expression_node = NULL; /*MOVED*/ + p_expression_node_new->declarator = p_expression_node_new->left->declarator; parser_match(ctx); - if (p_expression_node->type.type_specifier_flags & TYPE_SPECIFIER_STRUCT_OR_UNION) + if (p_expression_node_new->left->type.type_specifier_flags & TYPE_SPECIFIER_STRUCT_OR_UNION) { struct struct_or_union_specifier* p = - find_struct_or_union_specifier(ctx, p_expression_node->type.struct_or_union_specifier->tag_name); + find_struct_or_union_specifier(ctx, p_expression_node_new->left->type.struct_or_union_specifier->tag_name); p = get_complete_struct_or_union_specifier(p); if (p) { @@ -1661,7 +1690,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCT_MEMBER_NOT_FOUND, + compiler_diagnostic_message(ERROR_STRUCT_MEMBER_NOT_FOUND, ctx, ctx->current, "struct member '%s' not found in '%s'", @@ -1677,7 +1706,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCTURE_OR_UNION_REQUIRED, + compiler_diagnostic_message(ERROR_STRUCTURE_OR_UNION_REQUIRED, ctx, ctx->current, "structure or union required"); @@ -1691,19 +1720,19 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct static_set(*p_expression_node_new, "zero"); p_expression_node_new->first_token = ctx->current; p_expression_node_new->expression_type = POSTFIX_ARROW; - + //the result of a member access through pointer -> operator is lvalue - + parser_match(ctx); if (type_is_pointer_or_array(&p_expression_node->type)) { - struct type item_type = {0}; + struct type item_type = { 0 }; if (type_is_array(&p_expression_node->type)) { - compiler_set_info_with_token(W_STYLE, ctx, ctx->current, "using '->' in array as pointer to struct"); + compiler_diagnostic_message(W_STYLE, ctx, ctx->current, "using '->' in array as pointer to struct"); item_type = get_array_item_type(&p_expression_node->type); } else @@ -1730,7 +1759,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCT_MEMBER_NOT_FOUND, + compiler_diagnostic_message(ERROR_STRUCT_MEMBER_NOT_FOUND, ctx, ctx->current, "member '%s' not found in struct '%s'", @@ -1741,7 +1770,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCT_IS_INCOMPLETE, + compiler_diagnostic_message(ERROR_STRUCT_IS_INCOMPLETE, ctx, ctx->current, "struct '%s' is incomplete.", @@ -1751,7 +1780,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCTURE_OR_UNION_REQUIRED, + compiler_diagnostic_message(ERROR_STRUCTURE_OR_UNION_REQUIRED, ctx, ctx->current, "structure or union required"); @@ -1760,7 +1789,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCTURE_OR_UNION_REQUIRED, + compiler_diagnostic_message(ERROR_STRUCTURE_OR_UNION_REQUIRED, ctx, ctx->current, "structure or union required"); @@ -1773,7 +1802,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct { if (!expression_is_lvalue(p_expression_node)) { - compiler_set_error_with_token(C_OPERATOR_NEEDS_LVALUE, + compiler_diagnostic_message(ERROR_OPERATOR_NEEDS_LVALUE, ctx, p_expression_node->first_token, "lvalue required as increment operand"); @@ -1794,7 +1823,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct { if (!expression_is_lvalue(p_expression_node)) { - compiler_set_error_with_token(C_OPERATOR_NEEDS_LVALUE, + compiler_diagnostic_message(ERROR_OPERATOR_NEEDS_LVALUE, ctx, p_expression_node->first_token, "lvalue required as decrement operand"); @@ -1868,7 +1897,7 @@ struct expression* owner postfix_expression_type_name(struct parser_ctx* ctx, st { p_expression_node->expression_type = POSTFIX_EXPRESSION_COMPOUND_LITERAL; p_expression_node->braced_initializer = braced_initializer(ctx); - + } p_expression_node->last_token = ctx->previous; @@ -2062,7 +2091,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) //visual studio formater is adding spaces.. if (style_has_space(ctx->current)) { - compiler_set_info_with_token(W_STYLE, ctx, ctx->current, "don't use spaces"); + compiler_diagnostic_message(W_STYLE, ctx, ctx->current, "don't use spaces"); } #endif @@ -2097,7 +2126,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) new_expression->constant_value = constant_value_unary_op(&new_expression->right->constant_value, op); new_expression->type = type_dup(&new_expression->right->type); - + } else if (op == '+') { @@ -2106,22 +2135,35 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) new_expression->constant_value = constant_value_unary_op(&new_expression->right->constant_value, op); new_expression->type = type_dup(&new_expression->right->type); - + } else if (op == '*') { new_expression->expression_type = UNARY_EXPRESSION_CONTENT; //the result of the indirection(unary*) operator applied to a pointer to object - - if (!type_is_pointer(&new_expression->right->type)) + + if (!type_is_pointer_or_array(&new_expression->right->type)) { - compiler_set_error_with_token(C_INDIRECTION_REQUIRES_POINTER_OPERAND, + compiler_diagnostic_message(ERROR_INDIRECTION_REQUIRES_POINTER_OPERAND, ctx, op_position, "indirection requires pointer operand"); } - new_expression->type = type_remove_pointer(&new_expression->right->type); + if (type_is_pointer(&new_expression->right->type)) + { + new_expression->type = type_remove_pointer(&new_expression->right->type); + } + else + { + compiler_diagnostic_message(W_ARRAY_INDIRECTION, + ctx, + op_position, + "array indirection"); + if(new_expression->right->type.next) + new_expression->type = get_array_item_type(&new_expression->right->type); + else + new_expression->type = (struct type){0}; } } else if (op == '&') { @@ -2134,7 +2176,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) if (!expression_is_lvalue(new_expression->right)) { - compiler_set_error_with_token(C_ADDRESS_OF_REGISTER, + compiler_diagnostic_message(ERROR_ADDRESS_OF_REGISTER, ctx, new_expression->right->first_token, "lvalue required as unary '&' operand"); @@ -2144,7 +2186,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) { if (new_expression->right->declarator) { - compiler_set_error_with_token(C_ADDRESS_OF_REGISTER, + compiler_diagnostic_message(ERROR_ADDRESS_OF_REGISTER, ctx, new_expression->right->first_token, "address of register variable 'x' requested", @@ -2152,7 +2194,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_ADDRESS_OF_REGISTER, + compiler_diagnostic_message(ERROR_ADDRESS_OF_REGISTER, ctx, new_expression->right->first_token, "address of register variable requested - declarator?"); @@ -2166,7 +2208,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) else { expression_delete(new_expression); - compiler_set_error_with_token(C_INVALID_TOKEN, + compiler_diagnostic_message(ERROR_INVALID_TOKEN, ctx, ctx->current, "invalid token"); @@ -2275,48 +2317,48 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) switch (traits_token->type) { - case TK_KEYWORD_IS_LVALUE: - new_expression->constant_value = make_constant_value_ll(expression_is_lvalue(new_expression->right), false); - break; + case TK_KEYWORD_IS_LVALUE: + new_expression->constant_value = make_constant_value_ll(expression_is_lvalue(new_expression->right), false); + break; - case TK_KEYWORD_IS_CONST: - new_expression->constant_value = make_constant_value_ll(type_is_const(p_type), false); - break; - case TK_KEYWORD_IS_OWNER: - new_expression->constant_value = make_constant_value_ll(type_is_owner(p_type), false); - break; + case TK_KEYWORD_IS_CONST: + new_expression->constant_value = make_constant_value_ll(type_is_const(p_type), false); + break; + case TK_KEYWORD_IS_OWNER: + new_expression->constant_value = make_constant_value_ll(type_is_owner(p_type), false); + break; - case TK_KEYWORD_IS_POINTER: - new_expression->constant_value = make_constant_value_ll(type_is_pointer(p_type), false); + case TK_KEYWORD_IS_POINTER: + new_expression->constant_value = make_constant_value_ll(type_is_pointer(p_type), false); - break; - case TK_KEYWORD_IS_FUNCTION: - new_expression->constant_value = make_constant_value_ll(type_is_function(p_type), false); + break; + case TK_KEYWORD_IS_FUNCTION: + new_expression->constant_value = make_constant_value_ll(type_is_function(p_type), false); - break; - case TK_KEYWORD_IS_ARRAY: - new_expression->constant_value = make_constant_value_ll(type_is_array(p_type), false); + break; + case TK_KEYWORD_IS_ARRAY: + new_expression->constant_value = make_constant_value_ll(type_is_array(p_type), false); - break; - case TK_KEYWORD_IS_ARITHMETIC: - new_expression->constant_value = make_constant_value_ll(type_is_arithmetic(p_type), false); + break; + case TK_KEYWORD_IS_ARITHMETIC: + new_expression->constant_value = make_constant_value_ll(type_is_arithmetic(p_type), false); - break; - case TK_KEYWORD_IS_SCALAR: - new_expression->constant_value = make_constant_value_ll(type_is_scalar(p_type), false); + break; + case TK_KEYWORD_IS_SCALAR: + new_expression->constant_value = make_constant_value_ll(type_is_scalar(p_type), false); - break; - case TK_KEYWORD_IS_FLOATING_POINT: - new_expression->constant_value = make_constant_value_ll(type_is_floating_point(p_type), false); + break; + case TK_KEYWORD_IS_FLOATING_POINT: + new_expression->constant_value = make_constant_value_ll(type_is_floating_point(p_type), false); - break; - case TK_KEYWORD_IS_INTEGRAL: - new_expression->constant_value = make_constant_value_ll(type_is_integer(p_type), false); + break; + case TK_KEYWORD_IS_INTEGRAL: + new_expression->constant_value = make_constant_value_ll(type_is_integer(p_type), false); - break; + break; - default: - assert(false); + default: + assert(false); } @@ -2337,11 +2379,11 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) parser_match(ctx); parser_match_tk(ctx, '('); new_expression->right = expression(ctx); - + /*if (constant_value_is_valid(&new_expression->right->constant_value) && !constant_value_to_bool(&new_expression->right->constant_value)) { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx, + compiler_diagnostic_message(ERROR_STATIC_ASSERT_FAILED, ctx, new_expression->right->first_token, "assert failed"); }*/ @@ -2451,11 +2493,11 @@ struct expression* owner cast_expression(struct parser_ctx* ctx) if (type_is_pointer(&p_expression_node->left->type)) { //(int*) malloc(1) - compiler_set_error_with_token(C_DISCARDING_OWNER, ctx, p_expression_node->first_token, "discarding owner pointer"); + compiler_diagnostic_message(W_DISCARDING_OWNER, ctx, p_expression_node->first_token, "discarding owner pointer"); } else { - compiler_set_error_with_token(C_DISCARDING_OWNER, ctx, p_expression_node->first_token, "discarding owner"); + compiler_diagnostic_message(W_DISCARDING_OWNER, ctx, p_expression_node->first_token, "discarding owner"); } } } @@ -2505,7 +2547,7 @@ struct expression* owner cast_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "unexpected"); + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "unexpected"); } } catch @@ -2555,6 +2597,8 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) enum token_type op = ctx->current->type; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; //MOVED + new_expression->right = cast_expression(ctx); if (new_expression->left == NULL || @@ -2573,12 +2617,12 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) if (!type_is_arithmetic(&new_expression->left->type)) { - compiler_set_error_with_token(C_LEFT_IS_NOT_ARITHMETIC, ctx, ctx->current, "left * is not arithmetic"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_ARITHMETIC, ctx, ctx->current, "left * is not arithmetic"); } if (!type_is_arithmetic(&new_expression->right->type)) { - compiler_set_error_with_token(C_RIGHT_IS_NOT_ARITHMETIC, ctx, ctx->current, "right * is not arithmetic"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_ARITHMETIC, ctx, ctx->current, "right * is not arithmetic"); } } @@ -2593,17 +2637,17 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) if (constant_value_is_valid(&new_expression->right->constant_value) && constant_value_to_ll(&new_expression->right->constant_value) == 0) { - compiler_set_error_with_token(C_DIVIZION_BY_ZERO, ctx, ctx->current, "division by zero"); + compiler_diagnostic_message(W_DIVIZION_BY_ZERO, ctx, ctx->current, "division by zero"); } if (!type_is_arithmetic(&new_expression->left->type)) { - compiler_set_error_with_token(C_LEFT_IS_NOT_ARITHMETIC, ctx, ctx->current, "left / is not arithmetic"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_ARITHMETIC, ctx, ctx->current, "left / is not arithmetic"); } if (!type_is_arithmetic(&new_expression->right->type)) { - compiler_set_error_with_token(C_RIGHT_IS_NOT_ARITHMETIC, ctx, ctx->current, "right / is not arithmetic"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_ARITHMETIC, ctx, ctx->current, "right / is not arithmetic"); } } else if (op == '%') @@ -2613,18 +2657,18 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) if (!type_is_integer(&new_expression->left->type)) { - compiler_set_error_with_token(C_LEFT_IS_NOT_INTEGER, ctx, ctx->current, "left is not integer"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_INTEGER, ctx, ctx->current, "left is not integer"); } if (!type_is_integer(&new_expression->right->type)) { - compiler_set_error_with_token(C_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "right is not integer"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "right is not integer"); } if (constant_value_is_valid(&new_expression->right->constant_value) && constant_value_to_ll(&new_expression->right->constant_value) == 0) { - compiler_set_error_with_token(C_DIVIZION_BY_ZERO, ctx, ctx->current, "divizion by zero"); + compiler_diagnostic_message(W_DIVIZION_BY_ZERO, ctx, ctx->current, "divizion by zero"); } } @@ -2636,7 +2680,7 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) if (code != 0) { expression_delete(new_expression); - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid type multiplicative expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid type multiplicative expression"); throw; } @@ -2659,13 +2703,16 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) */ struct expression* owner p_expression_node = NULL; - struct expression* owner new_expression = NULL; + try { p_expression_node = multiplicative_expression(ctx); - if (p_expression_node == NULL) throw; - + if (p_expression_node == NULL) + { + compiler_diagnostic_message(ERROR_OUT_OF_MEM, ctx, ctx->current, "out of mem"); + throw; + } while (ctx->current != NULL && (ctx->current->type == '+' || @@ -2673,14 +2720,20 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) { struct token* operator_position = ctx->current; - assert(new_expression == NULL); - new_expression = calloc(1, sizeof * new_expression); + struct expression* owner new_expression = calloc(1, sizeof * new_expression); + if (new_expression == NULL) + { + compiler_diagnostic_message(ERROR_OUT_OF_MEM, ctx, ctx->current, "out of mem"); + throw; + } + new_expression->first_token = ctx->current; static_set(*new_expression, "zero"); enum token_type op = ctx->current->type; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ static int count = 0; count++; @@ -2696,11 +2749,11 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) if (!type_is_scalar(&new_expression->left->type)) { - compiler_set_error_with_token(C_LEFT_IS_NOT_SCALAR, ctx, operator_position, "left operator is not scalar"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_SCALAR, ctx, operator_position, "left operator is not scalar"); } if (!type_is_scalar(&new_expression->right->type)) { - compiler_set_error_with_token(C_RIGHT_IS_NOT_SCALAR, ctx, operator_position, "right operator is not scalar"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_SCALAR, ctx, operator_position, "right operator is not scalar"); } @@ -2725,7 +2778,9 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "internal error"); + expression_delete(new_expression); + new_expression = NULL; + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "internal error"); throw; } } @@ -2748,7 +2803,7 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "expected integer type on right"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "expected integer type on right"); } } else if (right_category == TYPE_CATEGORY_POINTER || right_category == TYPE_CATEGORY_ARRAY /*|| right_category == TYPE_CATEGORY_FUNCTION*/) @@ -2766,12 +2821,12 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_LEFT_IS_NOT_INTEGER, ctx, ctx->current, "expected integer type on left"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_INTEGER, ctx, ctx->current, "expected integer type on left"); } } else { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types additive expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types additive expression"); } } } @@ -2794,7 +2849,10 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "internal error type_common"); + expression_delete(new_expression); + new_expression = NULL; + + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "internal error type_common"); throw; } } @@ -2811,7 +2869,7 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) if (!type_is_same(&t1, &t2, false)) { - compiler_set_error_with_token(C_INCOMPATIBLE_POINTER_TYPES, ctx, ctx->current, "incompatible pointer types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_POINTER_TYPES, ctx, ctx->current, "incompatible pointer types"); } new_expression->type = type_make_int(); @@ -2827,13 +2885,13 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "right must be integer type"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "right must be integer type"); } } } else { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types for operator -"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types for operator -"); } } } @@ -2848,14 +2906,6 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) } catch { - if (p_expression_node) - { - //expression_node_delete(p_expression_node); - } - if (new_expression) - { - //expression_node_delete(p_expression_node); - } } @@ -2889,6 +2939,8 @@ struct expression* owner shift_expression(struct parser_ctx* ctx) enum token_type op = ctx->current->type; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = multiplicative_expression(ctx); if (new_expression->left == NULL || new_expression->right == NULL) { @@ -2916,7 +2968,7 @@ struct expression* owner shift_expression(struct parser_ctx* ctx) if (code != 0) { expression_delete(new_expression); - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid type shift expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid type shift expression"); throw; } @@ -2967,6 +3019,7 @@ struct expression* owner relational_expression(struct parser_ctx* ctx) enum token_type op = ctx->current->type; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ new_expression->right = shift_expression(ctx); if (new_expression->right == NULL) @@ -3031,7 +3084,7 @@ static void check_diferent_enuns(struct parser_ctx* ctx, if (right->type.enum_specifier->tag_token) righttag = right->type.enum_specifier->tag_token->lexeme; - compiler_set_warning_with_token(W_ENUN_CONVERSION, + compiler_diagnostic_message(W_ENUN_CONVERSION, ctx, operator_token, "implicit conversion from 'enum %s' to 'enum %s'", @@ -3107,6 +3160,8 @@ struct expression* owner equality_expression(struct parser_ctx* ctx) struct token* operator_token = ctx->current; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = relational_expression(ctx); if (new_expression->right == NULL) throw; @@ -3179,6 +3234,8 @@ struct expression* owner and_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = AND_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = equality_expression(ctx); if (new_expression->right == NULL) throw; @@ -3190,7 +3247,7 @@ struct expression* owner and_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types and expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types and expression"); throw; } @@ -3233,6 +3290,8 @@ struct expression* owner exclusive_or_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = EXCLUSIVE_OR_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = and_expression(ctx); if (new_expression->right == NULL) throw; @@ -3244,7 +3303,7 @@ struct expression* owner exclusive_or_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types or expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types or expression"); throw; } @@ -3284,6 +3343,8 @@ struct expression* owner inclusive_or_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = INCLUSIVE_OR_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = exclusive_or_expression(ctx); if (new_expression->right == NULL) { @@ -3300,7 +3361,7 @@ struct expression* owner inclusive_or_expression(struct parser_ctx* ctx) if (code != 0) { expression_delete(new_expression); - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types inclusive or expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types inclusive or expression"); throw; } @@ -3338,6 +3399,8 @@ struct expression* owner logical_and_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = INCLUSIVE_AND_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = inclusive_or_expression(ctx); if (new_expression->right == NULL) { @@ -3352,10 +3415,10 @@ struct expression* owner logical_and_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - expression_delete(new_expression); type_print(&new_expression->left->type); type_print(&new_expression->right->type); - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types logicl and expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types logicl and expression"); + expression_delete(new_expression); throw; } p_expression_node = new_expression; @@ -3392,6 +3455,8 @@ struct expression* owner logical_or_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = LOGICAL_OR_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = logical_and_expression(ctx); if (new_expression->right == NULL) { @@ -3407,14 +3472,14 @@ struct expression* owner logical_or_expression(struct parser_ctx* ctx) if (!type_is_scalar(&new_expression->left->type)) { expression_delete(new_expression); - compiler_set_error_with_token(C_LEFT_IS_NOT_SCALAR, ctx, ctx->current, "left type is not scalar for or expression"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_SCALAR, ctx, ctx->current, "left type is not scalar for or expression"); throw; } if (!type_is_scalar(&new_expression->right->type)) { expression_delete(new_expression); - compiler_set_error_with_token(C_RIGHT_IS_NOT_SCALAR, ctx, ctx->current, "right type is not scalar for or expression"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_SCALAR, ctx, ctx->current, "right type is not scalar for or expression"); throw; } @@ -3446,12 +3511,9 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) //aqui eh duvidoso mas conditional faz a unary tb. //a diferenca q nao eh qualquer expressao //que pode ser de atribuicao - struct expression* owner p_expression_node = NULL; - try + struct expression* owner p_expression_node = conditional_expression(ctx); + if (p_expression_node) { - p_expression_node = conditional_expression(ctx); - if (p_expression_node == NULL) throw; - while (ctx->current != NULL && (ctx->current->type == '=' || ctx->current->type == '*=' || @@ -3470,7 +3532,7 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) struct expression* owner new_expression = calloc(1, sizeof * new_expression); - if (new_expression == NULL) throw; + if (new_expression == NULL) break; //will return a half parsed expression static_set(*new_expression, "zero"); new_expression->first_token = ctx->current; @@ -3482,23 +3544,23 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) if (category == TYPE_CATEGORY_FUNCTION) { - compiler_set_error_with_token(C_ASSIGNMENT_OF_FUNCTION, ctx, ctx->current, "assignment of function"); + compiler_diagnostic_message(ERROR_ASSIGNMENT_OF_FUNCTION, ctx, ctx->current, "assignment of function"); } else if (category == TYPE_CATEGORY_ARRAY) { - compiler_set_error_with_token(C_ASSIGNMENT_TO_EXPRESSION_WITH_ARRAY_TYPE, ctx, ctx->current, "assignment to expression with array type"); + compiler_diagnostic_message(ERROR_ASSIGNMENT_TO_EXPRESSION_WITH_ARRAY_TYPE, ctx, ctx->current, "assignment to expression with array type"); } else { if (type_is_const(&new_expression->left->type)) { - compiler_set_error_with_token(C_ASSIGNMENT_OF_READ_ONLY_OBJECT, ctx, ctx->current, "assignment of read-only object"); + compiler_diagnostic_message(ERROR_ASSIGNMENT_OF_READ_ONLY_OBJECT, ctx, ctx->current, "assignment of read-only object"); } } if (!expression_is_lvalue(new_expression->left)) { - compiler_set_error_with_token(C_OPERATOR_NEEDS_LVALUE, + compiler_diagnostic_message(ERROR_OPERATOR_NEEDS_LVALUE, ctx, op_token, "lvalue required as left operand of assignment"); @@ -3508,7 +3570,7 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) if (new_expression->right == NULL) { expression_delete(new_expression); - throw; + return NULL; } @@ -3521,7 +3583,7 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) new_expression->last_token = new_expression->right->last_token; new_expression->type = type_dup(&new_expression->right->type); - + new_expression->type.storage_class_specifier_flags &= ~STORAGE_SPECIFIER_FUNCTION_RETURN; new_expression->type.storage_class_specifier_flags &= ~STORAGE_SPECIFIER_FUNCTION_RETURN_NODISCARD; @@ -3532,9 +3594,6 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) p_expression_node = new_expression; } } - catch - { - } return p_expression_node; } @@ -3550,7 +3609,7 @@ void argument_expression_list_destroy(struct argument_expression_list* obj_owner } } -void expression_delete(struct expression* owner p) +void expression_delete(struct expression* owner opt p) { if (p) { @@ -3591,6 +3650,7 @@ struct expression* owner expression(struct parser_ctx* ctx) p_expression_node_new->first_token = ctx->current; p_expression_node_new->expression_type = ASSIGNMENT_EXPRESSION; p_expression_node_new->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ p_expression_node_new->right = expression(ctx); if (p_expression_node_new->right == NULL) @@ -3598,7 +3658,7 @@ struct expression* owner expression(struct parser_ctx* ctx) expression_delete(p_expression_node_new); throw; } - p_expression_node->last_token = p_expression_node_new->right->last_token; + p_expression_node_new->left->last_token = p_expression_node_new->right->last_token; p_expression_node = p_expression_node_new; } @@ -3647,8 +3707,8 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) logical-OR-expression ? expression : conditional-expression */ struct expression* owner p_expression_node = NULL; - struct type left_type = {0}; - struct type right_type = {0}; + struct type left_type = { 0 }; + struct type right_type = { 0 }; try { p_expression_node = logical_or_expression(ctx); @@ -3663,6 +3723,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) p_conditional_expression->first_token = ctx->current; p_conditional_expression->expression_type = CONDITIONAL_EXPRESSION; p_conditional_expression->condition_expr = p_expression_node; + p_expression_node = NULL; /*MOVED*/ parser_match(ctx); //? @@ -3723,7 +3784,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) /*The first operand shall have scalar type*/ if (!type_is_scalar(&p_conditional_expression->condition_expr->type)) { - compiler_set_error_with_token(C_CONDITION_MUST_HAVE_SCALAR_TYPE, ctx, ctx->current, "condition must have scalar type"); + compiler_diagnostic_message(ERROR_CONDITION_MUST_HAVE_SCALAR_TYPE, ctx, ctx->current, "condition must have scalar type"); } else if (type_is_arithmetic(&left_type) && type_is_arithmetic(&right_type)) @@ -3741,7 +3802,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) */ if (!type_is_same(&left_type, &right_type, true)) { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); } type_swap(&p_conditional_expression->type, &right_type); @@ -3785,7 +3846,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) { //type_print(&left_type); //type_print(&right_type); - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, ctx->current, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, ctx->current, "incompatible types"); } else { @@ -3794,7 +3855,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); } } @@ -3816,7 +3877,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) } else if (!type_is_same(&left_type, &right_type, false)) { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); } else @@ -3826,13 +3887,14 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); } } else { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types??"); - assert(false); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types??"); + //assert(false); + return NULL; } p_expression_node = p_conditional_expression; } @@ -3856,7 +3918,7 @@ struct expression* owner constant_expression(struct parser_ctx* ctx, bool show_e p_expression && !constant_value_is_valid(&p_expression->constant_value)) { - compiler_set_error_with_token(C_EXPECTED_CONSTANT_EXPRESSION, ctx, ctx->current, "expected constant expression"); + compiler_diagnostic_message(ERROR_EXPECTED_CONSTANT_EXPRESSION, ctx, ctx->current, "expected constant expression"); } return p_expression; @@ -3868,16 +3930,16 @@ bool expression_is_lvalue(const struct expression* expr) switch (expr->expression_type) { - case PRIMARY_EXPRESSION_DECLARATOR: - case PRIMARY_EXPRESSION__FUNC__: - case PRIMARY_EXPRESSION_STRING_LITERAL: - case POSTFIX_ARRAY: - case POSTFIX_ARROW: - case POSTFIX_EXPRESSION_COMPOUND_LITERAL: - case UNARY_EXPRESSION_CONTENT: + case PRIMARY_EXPRESSION_DECLARATOR: + case PRIMARY_EXPRESSION__FUNC__: + case PRIMARY_EXPRESSION_STRING_LITERAL: + case POSTFIX_ARRAY: + case POSTFIX_ARROW: + case POSTFIX_EXPRESSION_COMPOUND_LITERAL: + case UNARY_EXPRESSION_CONTENT: return true; - default: - break; + default: + break; } if (expr->expression_type == PRIMARY_EXPRESSION_PARENTESIS) @@ -3886,7 +3948,7 @@ bool expression_is_lvalue(const struct expression* expr) } else if (expr->expression_type == POSTFIX_DOT) { - return expression_is_lvalue(expr->left); + return expression_is_lvalue(expr->left); } return false; @@ -3913,16 +3975,16 @@ bool expression_is_subjected_to_lvalue_conversion(struct expression* expression) switch (expression->expression_type) { - case UNARY_EXPRESSION_ADDRESSOF: - case UNARY_EXPRESSION_INCREMENT: - case UNARY_EXPRESSION_DECREMENT: - case POSTFIX_INCREMENT: - case POSTFIX_DECREMENT: - return false; + case UNARY_EXPRESSION_ADDRESSOF: + case UNARY_EXPRESSION_INCREMENT: + case UNARY_EXPRESSION_DECREMENT: + case POSTFIX_INCREMENT: + case POSTFIX_DECREMENT: + return false; + default: + if (expression->type.storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) + return true; } - if (expression->type.storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) - return true; - return true; } diff --git a/src/expressions.h b/src/expressions.h index 006bcd6a..1627300b 100644 --- a/src/expressions.h +++ b/src/expressions.h @@ -151,7 +151,7 @@ struct generic_selection struct token* last_token; }; -void generic_selection_delete(struct generic_selection * owner p); +void generic_selection_delete(struct generic_selection * owner opt p); enum constant_value_type { TYPE_NOT_CONSTANT, @@ -215,7 +215,7 @@ struct expression struct expression* owner right; }; -void expression_delete(struct expression* owner p); +void expression_delete(struct expression* owner opt p); struct expression* owner assignment_expression(struct parser_ctx* ctx); struct expression* owner expression(struct parser_ctx* ctx); diff --git a/src/file.c b/src/file.c index f0263953..43bea4d3 100644 --- a/src/file.c +++ b/src/file.c @@ -1,6 +1,9 @@ + +void F(int i); +_Owner int make(); int main() { - int j; - for (j = 0; j < 10; j++) {} - return j; //HERE -} \ No newline at end of file + F(make()); + +#pragma cake diagnostic check "-Wnon-owner-move" +} diff --git a/src/flow_visit.c b/src/flow_visit.c index 74c9ffea..053cf9e5 100644 --- a/src/flow_visit.c +++ b/src/flow_visit.c @@ -1,23 +1,22 @@ #include "ownership.h" -#include + #include #include -#include #include -#include -#include #include "flow_visit.h" #include "expressions.h" #include "ownership.h" #include +#include + /* - NULL - | - [function] (NULL <- child0 <- last_child) - | - [try] (NULL <- child0 <- last_child) - | + NULL + | + [function] (NULL <- child0 <- last_child) + | + [try] (NULL <- child0 <- last_child) + | tail_block-> [while] (NULL <- child0 <- last_child) */ @@ -25,23 +24,23 @@ tail_block-> [while] (NULL <- child0 <- last_child) struct flow_defer_scope { - //things must called at end of scope - struct declarator* declarator; // declarator - struct defer_statement* defer_statement; // defer + //things must called at end of scope + struct declarator* declarator; // declarator + struct defer_statement* defer_statement; // defer - //statements for controling where jump like break, throw stop. + //statements for controling where jump like break, throw stop. - struct try_statement* p_try_statement; //try - struct selection_statement* p_selection_statement; //if switch - struct iteration_statement* p_iteration_statement; //for do while - struct statement* p_statement;// - struct compound_statement* p_compound_statement; - struct compound_statement* p_function_body; - struct secondary_block* p_secondary_block; - struct primary_block* p_primary_block; + struct try_statement* p_try_statement; //try + struct selection_statement* p_selection_statement; //if switch + struct iteration_statement* p_iteration_statement; //for do while + struct statement* p_statement;// + struct compound_statement* p_compound_statement; + struct compound_statement* p_function_body; + struct secondary_block* p_secondary_block; + struct primary_block* p_primary_block; - struct flow_defer_scope* owner last_child; /**/ - struct flow_defer_scope* owner previous; + struct flow_defer_scope* owner last_child; /**/ + struct flow_defer_scope* owner previous; }; void flow_visit_declaration(struct flow_visit_ctx* ctx, struct declaration* p_declaration); @@ -55,384 +54,384 @@ static void flow_visit_enum_specifier(struct flow_visit_ctx* ctx, struct enum_sp static void flow_visit_type_specifier(struct flow_visit_ctx* ctx, struct type_specifier* p_type_specifier); struct visit_objects { - struct flow_defer_scope* current_block; - struct flow_defer_scope* next_child; + struct flow_defer_scope* current_block; + struct flow_defer_scope* next_child; }; struct object* visit_objects_next(struct visit_objects* visit_objects) { - while (visit_objects->current_block) - { - while (visit_objects->next_child) - { - if (visit_objects->next_child->declarator) - { - struct object* p = &visit_objects->next_child->declarator->object; - visit_objects->next_child = visit_objects->next_child->previous; - return p; - } - else - { - visit_objects->next_child = visit_objects->next_child->previous; - } - } + while (visit_objects->current_block) + { + while (visit_objects->next_child) + { + if (visit_objects->next_child->declarator) + { + struct object* p = &visit_objects->next_child->declarator->object; + visit_objects->next_child = visit_objects->next_child->previous; + return p; + } + else + { + visit_objects->next_child = visit_objects->next_child->previous; + } + } - visit_objects->current_block = visit_objects->current_block->previous; - if (visit_objects->current_block) - visit_objects->next_child = visit_objects->current_block->last_child; + visit_objects->current_block = visit_objects->current_block->previous; + if (visit_objects->current_block) + visit_objects->next_child = visit_objects->current_block->last_child; - } + } - return NULL; + return NULL; } struct flow_defer_scope* flow_visit_ctx_push_tail_block(struct flow_visit_ctx* ctx) { - struct flow_defer_scope* owner p_block = calloc(1, sizeof * p_block); - p_block->previous = ctx->tail_block; - ctx->tail_block = p_block; - return ctx->tail_block; + struct flow_defer_scope* owner p_block = calloc(1, sizeof * p_block); + p_block->previous = ctx->tail_block; + ctx->tail_block = p_block; + return ctx->tail_block; } struct flow_defer_scope* flow_visit_ctx_push_child(struct flow_visit_ctx* ctx) { - struct flow_defer_scope* owner child = calloc(1, sizeof * child); - child->previous = ctx->tail_block->last_child; - ctx->tail_block->last_child = child; - return ctx->tail_block->last_child; + struct flow_defer_scope* owner child = calloc(1, sizeof * child); + child->previous = ctx->tail_block->last_child; + ctx->tail_block->last_child = child; + return ctx->tail_block->last_child; } void flow_defer_scope_delete_one(struct flow_defer_scope* owner p) { - struct flow_defer_scope* owner p_block = p; - if (p_block != NULL) - { - struct flow_defer_scope* owner child = p_block->last_child; - while (child != NULL) - { - struct flow_defer_scope* owner previous = child->previous; - child->previous = NULL; - flow_defer_scope_delete_one(child); - child = previous; - } - assert(p_block->previous == NULL); - free(p_block); - } + struct flow_defer_scope* owner p_block = p; + if (p_block != NULL) + { + struct flow_defer_scope* owner child = p_block->last_child; + while (child != NULL) + { + struct flow_defer_scope* owner previous = child->previous; + child->previous = NULL; + flow_defer_scope_delete_one(child); + child = previous; + } + assert(p_block->previous == NULL); + free(p_block); + } } void flow_visit_ctx_pop_tail_block(struct flow_visit_ctx* ctx) { - if (ctx->tail_block) - { - struct flow_defer_scope* owner previous = ctx->tail_block->previous; - ctx->tail_block->previous = NULL; - flow_defer_scope_delete_one(ctx->tail_block); - ctx->tail_block = previous; - } + if (ctx->tail_block) + { + struct flow_defer_scope* owner previous = ctx->tail_block->previous; + ctx->tail_block->previous = NULL; + flow_defer_scope_delete_one(ctx->tail_block); + ctx->tail_block = previous; + } } static bool check_defer_and_variables(struct flow_visit_ctx* ctx, - struct flow_defer_scope* deferblock, - struct token* position_token) -{ - bool found_error = false; - - struct flow_defer_scope* deferchild = deferblock->last_child; - while (deferchild != NULL) - { - if (deferchild->defer_statement) - { - const int error_count = ctx->ctx->p_report->error_count; - const int warnings_count = ctx->ctx->p_report->warnings_count; - const int info_count = ctx->ctx->p_report->info_count; - - flow_visit_secondary_block(ctx, deferchild->defer_statement->secondary_block); - - if (error_count != ctx->ctx->p_report->error_count || - warnings_count != ctx->ctx->p_report->warnings_count || - info_count != ctx->ctx->p_report->info_count) - { - compiler_set_info_with_token(0, ctx->ctx, position_token, "defer end of scope"); - } - } - else if (deferchild->declarator) - { - struct declarator* p_declarator = deferchild->declarator; - const char* name = p_declarator->name ? p_declarator->name->lexeme : "?"; - - visit_object(ctx->ctx, &p_declarator->type, &p_declarator->object, position_token, name, false); - - } - deferchild = deferchild->previous; - } - return found_error; + struct flow_defer_scope* deferblock, + struct token* position_token) +{ + bool found_error = false; + + struct flow_defer_scope* deferchild = deferblock->last_child; + while (deferchild != NULL) + { + if (deferchild->defer_statement) + { + const int error_count = ctx->ctx->p_report->error_count; + const int warnings_count = ctx->ctx->p_report->warnings_count; + const int info_count = ctx->ctx->p_report->info_count; + + flow_visit_secondary_block(ctx, deferchild->defer_statement->secondary_block); + + if (error_count != ctx->ctx->p_report->error_count || + warnings_count != ctx->ctx->p_report->warnings_count || + info_count != ctx->ctx->p_report->info_count) + { + compiler_diagnostic_message(0, ctx->ctx, position_token, "defer end of scope"); + } + } + else if (deferchild->declarator) + { + struct declarator* p_declarator = deferchild->declarator; + const char* name = p_declarator->name ? p_declarator->name->lexeme : "?"; + + visit_object(ctx->ctx, &p_declarator->type, &p_declarator->object, position_token, name, false); + + } + deferchild = deferchild->previous; + } + return found_error; } static bool flow_find_label_unlabeled_statement(struct flow_visit_ctx* ctx, struct unlabeled_statement* p_unlabeled_statement, const char* label); static bool check_all_defer_until_try(struct flow_visit_ctx* ctx, struct flow_defer_scope* deferblock, - struct token* position_token) + struct token* position_token) { - bool found_error = false; - struct flow_defer_scope* p_defer = deferblock; - while (p_defer != NULL) - { - if (check_defer_and_variables(ctx, p_defer, position_token)) - found_error = true; + bool found_error = false; + struct flow_defer_scope* p_defer = deferblock; + while (p_defer != NULL) + { + if (check_defer_and_variables(ctx, p_defer, position_token)) + found_error = true; - if (p_defer->p_try_statement) - { - break; - } + if (p_defer->p_try_statement) + { + break; + } - p_defer = p_defer->previous; - } - return found_error; + p_defer = p_defer->previous; + } + return found_error; } static bool flow_find_label_block_item_list(struct flow_visit_ctx* ctx, struct block_item_list* p_block_item, const char* label) { - struct block_item* block_item = p_block_item->head; - while (block_item) - { - if (block_item && - block_item->label && - block_item->label->name && - strcmp(block_item->label->name->lexeme, label) == 0) - { - /*achou*/ - return true; - } - else if (block_item->unlabeled_statement) - { - if (flow_find_label_unlabeled_statement(ctx, block_item->unlabeled_statement, label)) - { - return true; - } - } - - block_item = block_item->next; - } - - return false; + struct block_item* block_item = p_block_item->head; + while (block_item) + { + if (block_item && + block_item->label && + block_item->label->name && + strcmp(block_item->label->name->lexeme, label) == 0) + { + /*achou*/ + return true; + } + else if (block_item->unlabeled_statement) + { + if (flow_find_label_unlabeled_statement(ctx, block_item->unlabeled_statement, label)) + { + return true; + } + } + + block_item = block_item->next; + } + + return false; } static bool flow_find_label_statement(struct flow_visit_ctx* ctx, struct statement* statement, const char* label); static bool flow_find_label_unlabeled_statement(struct flow_visit_ctx* ctx, struct unlabeled_statement* p_unlabeled_statement, const char* label) { - if (p_unlabeled_statement->primary_block) - { - if (p_unlabeled_statement->primary_block->compound_statement) - { - if (flow_find_label_block_item_list(ctx, - &p_unlabeled_statement->primary_block->compound_statement->block_item_list, - label)) - { - return true; - } - } - else if (p_unlabeled_statement->primary_block->selection_statement) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->secondary_block->statement, label)) - { - return true; - } - if (p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt->statement, label)) - { - return true; - } - } - } - else if (p_unlabeled_statement->primary_block->try_statement) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->secondary_block->statement, label)) - { - return true; - } - if (p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt->statement, label)) - { - return true; - } - } - } - else if (p_unlabeled_statement->primary_block->iteration_statement) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->iteration_statement->secondary_block->statement, label)) - { - return true; - } - } - } - return false; + if (p_unlabeled_statement->primary_block) + { + if (p_unlabeled_statement->primary_block->compound_statement) + { + if (flow_find_label_block_item_list(ctx, + &p_unlabeled_statement->primary_block->compound_statement->block_item_list, + label)) + { + return true; + } + } + else if (p_unlabeled_statement->primary_block->selection_statement) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->secondary_block->statement, label)) + { + return true; + } + if (p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt->statement, label)) + { + return true; + } + } + } + else if (p_unlabeled_statement->primary_block->try_statement) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->secondary_block->statement, label)) + { + return true; + } + if (p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt->statement, label)) + { + return true; + } + } + } + else if (p_unlabeled_statement->primary_block->iteration_statement) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->iteration_statement->secondary_block->statement, label)) + { + return true; + } + } + } + return false; } static bool flow_find_label_statement(struct flow_visit_ctx* ctx, struct statement* statement, const char* label) { - if (statement->labeled_statement) - { - if (statement->labeled_statement && - statement->labeled_statement->label && - strcmp(statement->labeled_statement->label->name->lexeme, label) == 0) - { - /*achou*/ - return true; - } - } - else if (statement->unlabeled_statement) - { - if (flow_find_label_unlabeled_statement(ctx, statement->unlabeled_statement, label)) - return true; - } - return false; + if (statement->labeled_statement) + { + if (statement->labeled_statement && + statement->labeled_statement->label && + strcmp(statement->labeled_statement->label->name->lexeme, label) == 0) + { + /*achou*/ + return true; + } + } + else if (statement->unlabeled_statement) + { + if (flow_find_label_unlabeled_statement(ctx, statement->unlabeled_statement, label)) + return true; + } + return false; } static bool flow_find_label_scope(struct flow_visit_ctx* ctx, struct flow_defer_scope* deferblock, const char* label) { - if (deferblock->p_iteration_statement) - { - if (deferblock->p_iteration_statement->secondary_block) - { - if (flow_find_label_statement(ctx, deferblock->p_iteration_statement->secondary_block->statement, label)) - return true; - } - } - else if (deferblock->p_selection_statement) - { - if (deferblock->p_selection_statement->secondary_block) - { - if (flow_find_label_statement(ctx, deferblock->p_selection_statement->secondary_block->statement, label)) - return true; - } - - if (deferblock->p_selection_statement->else_secondary_block_opt) - { - if (flow_find_label_statement(ctx, deferblock->p_selection_statement->else_secondary_block_opt->statement, label)) - return true; - } - } - else if (deferblock->p_try_statement) - { - if (deferblock->p_try_statement->secondary_block) - { - if (flow_find_label_statement(ctx, deferblock->p_try_statement->secondary_block->statement, label)) - return true; - } - - if (deferblock->p_try_statement->catch_secondary_block_opt) - { - if (flow_find_label_statement(ctx, deferblock->p_try_statement->catch_secondary_block_opt->statement, label)) - return true; - } - } - else if (deferblock->p_statement) - { - if (flow_find_label_statement(ctx, deferblock->p_statement, label)) - return true; - } - else if (deferblock->p_function_body) - { - if (flow_find_label_block_item_list(ctx, - &deferblock->p_function_body->block_item_list, - label)) - { - return true; - } - } - else if (deferblock->p_compound_statement) - { - if (flow_find_label_block_item_list(ctx, - &deferblock->p_compound_statement->block_item_list, - label)) - { - return true; - } - } - return false; + if (deferblock->p_iteration_statement) + { + if (deferblock->p_iteration_statement->secondary_block) + { + if (flow_find_label_statement(ctx, deferblock->p_iteration_statement->secondary_block->statement, label)) + return true; + } + } + else if (deferblock->p_selection_statement) + { + if (deferblock->p_selection_statement->secondary_block) + { + if (flow_find_label_statement(ctx, deferblock->p_selection_statement->secondary_block->statement, label)) + return true; + } + + if (deferblock->p_selection_statement->else_secondary_block_opt) + { + if (flow_find_label_statement(ctx, deferblock->p_selection_statement->else_secondary_block_opt->statement, label)) + return true; + } + } + else if (deferblock->p_try_statement) + { + if (deferblock->p_try_statement->secondary_block) + { + if (flow_find_label_statement(ctx, deferblock->p_try_statement->secondary_block->statement, label)) + return true; + } + + if (deferblock->p_try_statement->catch_secondary_block_opt) + { + if (flow_find_label_statement(ctx, deferblock->p_try_statement->catch_secondary_block_opt->statement, label)) + return true; + } + } + else if (deferblock->p_statement) + { + if (flow_find_label_statement(ctx, deferblock->p_statement, label)) + return true; + } + else if (deferblock->p_function_body) + { + if (flow_find_label_block_item_list(ctx, + &deferblock->p_function_body->block_item_list, + label)) + { + return true; + } + } + else if (deferblock->p_compound_statement) + { + if (flow_find_label_block_item_list(ctx, + &deferblock->p_compound_statement->block_item_list, + label)) + { + return true; + } + } + return false; } static bool check_all_defer_until_label(struct flow_visit_ctx* ctx, struct flow_defer_scope* deferblock, const char* label, - struct token* position_token) -{ - bool error_found = false; - /* - * Precisamos saber quantos escopos nós saimos até achar o label. - * Para isso procuramos no escopo atual aonde aparede o goto. - * Se o label não esta diretamente neste escopo ou dentro de algum escopo interno - * Não nós imprimos os defers pois estamos saindo do escopo e vamos para o escopo - * de cima. Assim vamos repetindo em cada saida de escopo imprimos o defer. - */ - struct flow_defer_scope* p_defer = deferblock; - - while (p_defer != NULL) - { - if (!flow_find_label_scope(ctx, p_defer, label)) - { - error_found = error_found || check_defer_and_variables(ctx, p_defer, position_token); - } - else - { - break; - } - p_defer = p_defer->previous; - } - return error_found; + struct token* position_token) +{ + bool error_found = false; + /* + * Precisamos saber quantos escopos nós saimos até achar o label. + * Para isso procuramos no escopo atual aonde aparede o goto. + * Se o label não esta diretamente neste escopo ou dentro de algum escopo interno + * Não nós imprimos os defers pois estamos saindo do escopo e vamos para o escopo + * de cima. Assim vamos repetindo em cada saida de escopo imprimos o defer. + */ + struct flow_defer_scope* p_defer = deferblock; + + while (p_defer != NULL) + { + if (!flow_find_label_scope(ctx, p_defer, label)) + { + error_found = error_found || check_defer_and_variables(ctx, p_defer, position_token); + } + else + { + break; + } + p_defer = p_defer->previous; + } + return error_found; } static bool check_all_defer_until_iter(struct flow_visit_ctx* ctx, - struct flow_defer_scope* deferblock, - struct token* position_token) -{ - bool error_found = false; - struct flow_defer_scope* p_defer = deferblock; - while (p_defer != NULL) - { - if (check_defer_and_variables(ctx, p_defer, position_token)) - error_found = true; - if (p_defer->p_iteration_statement) - { - break; - } - p_defer = p_defer->previous; - } - return error_found; + struct flow_defer_scope* deferblock, + struct token* position_token) +{ + bool error_found = false; + struct flow_defer_scope* p_defer = deferblock; + while (p_defer != NULL) + { + if (check_defer_and_variables(ctx, p_defer, position_token)) + error_found = true; + if (p_defer->p_iteration_statement) + { + break; + } + p_defer = p_defer->previous; + } + return error_found; } static bool check_all_defer_until_iteration_or_selection_statement(struct flow_visit_ctx* ctx, - struct flow_defer_scope* deferblock, - struct token* position_token) -{ - bool error_found = false; - struct flow_defer_scope* p_defer = deferblock; - while (p_defer != NULL) - { - if (check_defer_and_variables(ctx, p_defer, position_token)) - error_found = true; - if (p_defer->p_iteration_statement || p_defer->p_selection_statement) - { - //break pode ser usado em loops or switch - break; - } - p_defer = p_defer->previous; - } - return error_found; + struct flow_defer_scope* deferblock, + struct token* position_token) +{ + bool error_found = false; + struct flow_defer_scope* p_defer = deferblock; + while (p_defer != NULL) + { + if (check_defer_and_variables(ctx, p_defer, position_token)) + error_found = true; + if (p_defer->p_iteration_statement || p_defer->p_selection_statement) + { + //break pode ser usado em loops or switch + break; + } + p_defer = p_defer->previous; + } + return error_found; } static bool check_all_defer_until_end(struct flow_visit_ctx* ctx, struct flow_defer_scope* deferblock, struct token* position_token) { - bool found_found = false; - struct flow_defer_scope* p_defer = deferblock; - while (p_defer != NULL) - { - found_found = found_found || check_defer_and_variables(ctx, p_defer, position_token); - p_defer = p_defer->previous; - } - return found_found; + bool found_found = false; + struct flow_defer_scope* p_defer = deferblock; + while (p_defer != NULL) + { + found_found = found_found || check_defer_and_variables(ctx, p_defer, position_token); + p_defer = p_defer->previous; + } + return found_found; } @@ -440,484 +439,473 @@ static bool check_all_defer_until_end(struct flow_visit_ctx* ctx, struct flow_de static void flow_visit_secondary_block(struct flow_visit_ctx* ctx, struct secondary_block* p_secondary_block) { - flow_visit_statement(ctx, p_secondary_block->statement); + flow_visit_statement(ctx, p_secondary_block->statement); } static void flow_visit_defer_statement(struct flow_visit_ctx* ctx, struct defer_statement* p_defer_statement) { - - //adiciona como filho do ultimo bloco -// struct defer_scope* p_defer = visit_ctx_push_tail_child(ctx); - // p_defer->defer_statement = p_defer_statement; - - - - - struct flow_defer_scope* p_defer = flow_visit_ctx_push_child(ctx); - p_defer->defer_statement = p_defer_statement; - - - /* - We are not going to visit the secondary block here because - this is not the place were defer is executed. - */ + struct flow_defer_scope* p_defer = flow_visit_ctx_push_child(ctx); + p_defer->defer_statement = p_defer_statement; + /* + We are not going to visit the secondary block here because + this is not the place were defer is executed. + */ } static void flow_visit_try_statement(struct flow_visit_ctx* ctx, struct try_statement* p_try_statement) { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_try_statement = p_try_statement; + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_try_statement = p_try_statement; - if (p_try_statement->secondary_block) - flow_visit_secondary_block(ctx, p_try_statement->secondary_block); + if (p_try_statement->secondary_block) + flow_visit_secondary_block(ctx, p_try_statement->secondary_block); - check_defer_and_variables(ctx, p_defer, p_try_statement->secondary_block->last_token); + check_defer_and_variables(ctx, p_defer, p_try_statement->secondary_block->last_token); - flow_visit_ctx_pop_tail_block(ctx); + flow_visit_ctx_pop_tail_block(ctx); } static struct object* expression_is_comparing_owner_with_null(struct expression* p_expression) { - if (p_expression->expression_type == EQUALITY_EXPRESSION_EQUAL && - type_is_pointer(&p_expression->left->type) && - expression_is_null_pointer_constant(p_expression->right)) - { - // if ( pointer == NULL ) - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->left, &type); - type_destroy(&type); - return p_object; - } - - - if (p_expression->expression_type == EQUALITY_EXPRESSION_EQUAL && - expression_is_null_pointer_constant(p_expression->left) && - type_is_pointer(&p_expression->right->type)) - { - // if (NULL == pointer) - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->right, &type); - type_destroy(&type); - return p_object; - } - - - if (p_expression->expression_type == UNARY_EXPRESSION_NOT && - type_is_pointer(&p_expression->right->type)) - { - //if (!p) same as p == NULL - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->right, &type); - type_destroy(&type); - return p_object; - } - - return NULL; + if (p_expression->expression_type == EQUALITY_EXPRESSION_EQUAL && + type_is_pointer(&p_expression->left->type) && + expression_is_null_pointer_constant(p_expression->right)) + { + // if ( pointer == NULL ) + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->left, &type); + type_destroy(&type); + return p_object; + } + + + if (p_expression->expression_type == EQUALITY_EXPRESSION_EQUAL && + expression_is_null_pointer_constant(p_expression->left) && + type_is_pointer(&p_expression->right->type)) + { + // if (NULL == pointer) + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->right, &type); + type_destroy(&type); + return p_object; + } + + + if (p_expression->expression_type == UNARY_EXPRESSION_NOT && + type_is_pointer(&p_expression->right->type)) + { + //if (!p) same as p == NULL + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->right, &type); + type_destroy(&type); + return p_object; + } + + return NULL; } static struct object* expression_is_comparing_owner_with_not_null(struct expression* p_expression) { - - if (p_expression->expression_type == EQUALITY_EXPRESSION_NOT_EQUAL && - type_is_pointer(&p_expression->left->type) && - expression_is_null_pointer_constant(p_expression->right)) - { - //if (p != NULL) - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->left, &type); - type_destroy(&type); - return p_object; - } - - if (p_expression->expression_type == EQUALITY_EXPRESSION_NOT_EQUAL && - expression_is_null_pointer_constant(p_expression->right) && - type_is_pointer(&p_expression->left->type)) - { - //NULL != p - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->right, &type); - type_destroy(&type); - return p_object; - } - - - if (type_is_pointer(&p_expression->type)) - { - // if (p) same as p != NULL - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression, &type); - type_destroy(&type); - return p_object; - } - - return NULL; + if (p_expression->expression_type == EQUALITY_EXPRESSION_NOT_EQUAL && + type_is_pointer(&p_expression->left->type) && + expression_is_null_pointer_constant(p_expression->right)) + { + //if (p != NULL) + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->left, &type); + type_destroy(&type); + return p_object; + } + + if (p_expression->expression_type == EQUALITY_EXPRESSION_NOT_EQUAL && + expression_is_null_pointer_constant(p_expression->right) && + type_is_pointer(&p_expression->left->type)) + { + //NULL != p + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->right, &type); + type_destroy(&type); + return p_object; + } + + + if (type_is_pointer(&p_expression->type)) + { + // if (p) same as p != NULL + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression, &type); + type_destroy(&type); + return p_object; + } + + return NULL; } void push_copy_of_current_state(struct flow_visit_ctx* ctx) { - /* - top of stack constains the copy - */ + /* + top of stack constains the copy + */ - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_push_copy_current_state(p_object); - p_object = visit_objects_next(&v1); - } + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_push_copy_current_state(p_object); + p_object = visit_objects_next(&v1); + } } void restore_state(struct flow_visit_ctx* ctx, int state_index_to_restore) { - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_restore_state(p_object, state_index_to_restore); - p_object = visit_objects_next(&v1); - }; + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_restore_state(p_object, state_index_to_restore); + p_object = visit_objects_next(&v1); + }; } static void object_merge_states_with_current(struct object* object, - int dest_index, - int before_index, - int after_index) + int dest_index, + int before_index, + int after_index) { - if (dest_index == 0 || (object->object_state_stack.size - dest_index >= 0 && - object->object_state_stack.size - dest_index < object->object_state_stack.size)) - { - } - else - { - return; - } + if (dest_index == 0 || (object->object_state_stack.size - dest_index >= 0 && + object->object_state_stack.size - dest_index < object->object_state_stack.size)) + { + } + else + { + return; + } - enum object_state* dest = dest_index == 0 ? &object->state : - &object->object_state_stack.data[object->object_state_stack.size - dest_index]; + enum object_state* dest = dest_index == 0 ? &object->state : + &object->object_state_stack.data[object->object_state_stack.size - dest_index]; - if (before_index == 0 || (object->object_state_stack.size - before_index >= 0 && - object->object_state_stack.size - before_index < object->object_state_stack.size)) - { - } - else - { - return; - } - enum object_state state_before = before_index == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - before_index]; + if (before_index == 0 || (object->object_state_stack.size - before_index >= 0 && + object->object_state_stack.size - before_index < object->object_state_stack.size)) + { + } + else + { + return; + } + enum object_state state_before = before_index == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - before_index]; - if (after_index == 0 || - (object->object_state_stack.size - after_index >= 0 && - object->object_state_stack.size - after_index < object->object_state_stack.size)) - { - } - else - { + if (after_index == 0 || + (object->object_state_stack.size - after_index >= 0 && + object->object_state_stack.size - after_index < object->object_state_stack.size)) + { + } + else + { - return; - } - enum object_state state_after = after_index == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - after_index]; + return; + } + enum object_state state_after = after_index == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - after_index]; - *dest |= (state_before | state_after); + *dest |= (state_before | state_after); - if (object->pointed) - { - object_merge_states_with_current(object->pointed, dest_index, before_index, after_index); - } + if (object->pointed) + { + object_merge_states_with_current(object->pointed, dest_index, before_index, after_index); + } - for (int i = 0; i < object->members.size; i++) - { - object_merge_states_with_current(&object->members.data[i], dest_index, before_index, after_index); - } + for (int i = 0; i < object->members.size; i++) + { + object_merge_states_with_current(&object->members.data[i], dest_index, before_index, after_index); + } } void merge_states(struct flow_visit_ctx* ctx, - int dest_index, - int before_index, //before while - int after_index) + int dest_index, + int before_index, //before while + int after_index) { - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_merge_states_with_current(p_object, dest_index, - before_index, - after_index); - p_object = visit_objects_next(&v1); - }; + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_merge_states_with_current(p_object, dest_index, + before_index, + after_index); + p_object = visit_objects_next(&v1); + }; } static void object_merge_if_else_states(struct object* object, - int dest_index, - int original_state, - int true_branch_state, - int false_branch_state) -{ - if (dest_index == 0 || (object->object_state_stack.size - dest_index >= 0 && - object->object_state_stack.size - dest_index < object->object_state_stack.size)) - { - } - else - { - return; - } - if (original_state == 0 || (object->object_state_stack.size - original_state >= 0 && - object->object_state_stack.size - original_state < object->object_state_stack.size)) - { - } - else - { - - return; - } if (true_branch_state == 0 || - (object->object_state_stack.size - true_branch_state >= 0 && - object->object_state_stack.size - true_branch_state < object->object_state_stack.size)) - { - } - else - { - return; - } - if (false_branch_state == 0 || (object->object_state_stack.size - false_branch_state >= 0 && - object->object_state_stack.size - false_branch_state < object->object_state_stack.size)) - { - } - else - { - - return; - } - - - enum object_state* dest = dest_index == 0 ? &object->state : - &object->object_state_stack.data[object->object_state_stack.size - dest_index]; - - - enum object_state s_original = original_state == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - original_state]; - - - enum object_state s_true_branch = true_branch_state == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - true_branch_state]; - - - enum object_state s_false_branch = false_branch_state == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - false_branch_state]; - - - if (s_true_branch != s_original && - s_false_branch != s_original) - { - *dest |= (s_true_branch | s_false_branch); - } - else if (s_true_branch != s_original) - { - *dest |= (s_true_branch | s_original); - } - else if (s_false_branch != s_original) - { - *dest |= (s_false_branch | s_original); - } - else - { - *dest |= s_original; - } - - if (object->pointed) - { - object_merge_if_else_states(object->pointed, dest_index, original_state, true_branch_state, false_branch_state); - } - - for (int i = 0; i < object->members.size; i++) - { - object_merge_if_else_states(&object->members.data[i], dest_index, original_state, true_branch_state, false_branch_state); - } + int dest_index, + int original_state, + int true_branch_state, + int false_branch_state) +{ + if (dest_index == 0 || (object->object_state_stack.size - dest_index >= 0 && + object->object_state_stack.size - dest_index < object->object_state_stack.size)) + { + } + else + { + return; + } + if (original_state == 0 || (object->object_state_stack.size - original_state >= 0 && + object->object_state_stack.size - original_state < object->object_state_stack.size)) + { + } + else + { + + return; + } if (true_branch_state == 0 || + (object->object_state_stack.size - true_branch_state >= 0 && + object->object_state_stack.size - true_branch_state < object->object_state_stack.size)) + { + } + else + { + return; + } + if (false_branch_state == 0 || (object->object_state_stack.size - false_branch_state >= 0 && + object->object_state_stack.size - false_branch_state < object->object_state_stack.size)) + { + } + else + { + + return; + } + + + enum object_state* dest = dest_index == 0 ? &object->state : + &object->object_state_stack.data[object->object_state_stack.size - dest_index]; + + + enum object_state s_original = original_state == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - original_state]; + + + enum object_state s_true_branch = true_branch_state == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - true_branch_state]; + + + enum object_state s_false_branch = false_branch_state == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - false_branch_state]; + + + if (s_true_branch != s_original && + s_false_branch != s_original) + { + *dest |= (s_true_branch | s_false_branch); + } + else if (s_true_branch != s_original) + { + *dest |= (s_true_branch | s_original); + } + else if (s_false_branch != s_original) + { + *dest |= (s_false_branch | s_original); + } + else + { + *dest |= s_original; + } + + if (object->pointed) + { + object_merge_if_else_states(object->pointed, dest_index, original_state, true_branch_state, false_branch_state); + } + + for (int i = 0; i < object->members.size; i++) + { + object_merge_if_else_states(&object->members.data[i], dest_index, original_state, true_branch_state, false_branch_state); + } } void merge_if_else_states(struct flow_visit_ctx* ctx, - int dest_index, - int original_state, //original - int true_branch_state, //true branch - int false_branch_state) //false branch + int dest_index, + int original_state, //original + int true_branch_state, //true branch + int false_branch_state) //false branch { - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_merge_if_else_states(p_object, dest_index, - original_state, - true_branch_state, - false_branch_state); - p_object = visit_objects_next(&v1); - }; + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_merge_if_else_states(p_object, dest_index, + original_state, + true_branch_state, + false_branch_state); + p_object = visit_objects_next(&v1); + }; } void pop_states(struct flow_visit_ctx* ctx, int n) { - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_pop_states(p_object, n); - p_object = visit_objects_next(&v1); - }; + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_pop_states(p_object, n); + p_object = visit_objects_next(&v1); + }; } static void flow_visit_if_statement(struct flow_visit_ctx* ctx, struct selection_statement* p_selection_statement) { - assert(p_selection_statement->first_token->type == TK_KEYWORD_IF); - struct object* p_object_compared_with_null = NULL; - - if (p_selection_statement->expression) - { - p_object_compared_with_null = expression_is_comparing_owner_with_null(p_selection_statement->expression); - } - - struct object* p_object_compared_with_not_null = NULL; - if (p_selection_statement->expression) - { - p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_selection_statement->expression); - } - - - /* - This index is from the end of top of stack going to base of statck - */ - const int original = 2; - push_copy_of_current_state(ctx); - - if (p_object_compared_with_null) - { - //if (p == 0) { p is null } - p_object_compared_with_null->state = OBJECT_STATE_NULL; - } - if (p_object_compared_with_not_null) - { - //if (p != 0) { p is not null } - p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; - } - - if (p_selection_statement->secondary_block) - { - - flow_visit_secondary_block(ctx, p_selection_statement->secondary_block); - // check_defer_and_variables(ctx, p_defer, p_selection_statement->secondary_block->last_token); - - } - - bool was_last_statement_inside_true_branch_return = false; - if (ctx->p_last_jump_statement) - { - //TODO gotos etc... - - was_last_statement_inside_true_branch_return = - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; - } - - //enum object_state state_left_in_true_branch = 0; - //if (p_object_compared_with_null) - // state_left_in_true_branch = p_object_compared_with_null->state; - //else if (p_object_compared_with_not_null) - // state_left_in_true_branch = p_object_compared_with_not_null->state; - - /*let's make a copy of the state we left true branch*/ - const int true_branch = 1; - push_copy_of_current_state(ctx); - - restore_state(ctx, original); - - const int current = 0; - - /*when we dont have else block we have a empty imaginary one */ - /*we invert the object state*/ - if (p_object_compared_with_null) - { - // if (p == NULL) { } else { p is not null } - p_object_compared_with_null->state = OBJECT_STATE_NOT_NULL; - } - if (p_object_compared_with_not_null) - { - // if (p != NULL) { } else { p is null } - p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - } - - ctx->p_last_jump_statement = NULL; - if (p_selection_statement->else_secondary_block_opt) - { - //struct flow_defer_scope* owner p_defer = calloc(1, sizeof * p_defer); - //p_defer->previous = ctx->tail_block; - //ctx->tail_block = p_defer; - //p_defer->p_selection_statement = p_selection_statement; - flow_visit_secondary_block(ctx, p_selection_statement->else_secondary_block_opt); - //ctx->tail_block = ctx->tail_block->previous; //POP - - } - - bool was_last_statement_inside_else_branch_return = false; - if (ctx->p_last_jump_statement) - { - //TODO gotos etc... - was_last_statement_inside_else_branch_return = - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; - } - - - if (was_last_statement_inside_true_branch_return) - { - if (was_last_statement_inside_else_branch_return) - { - restore_state(ctx, original); - } - else - { - //the else state is the current state - } - } - else - { - if (was_last_statement_inside_else_branch_return) - { - restore_state(ctx, true_branch); - } - else - { - merge_if_else_states(ctx, current, original, true_branch, current); - } - } - - - pop_states(ctx, 2); + assert(p_selection_statement->first_token->type == TK_KEYWORD_IF); + struct object* p_object_compared_with_null = NULL; + + if (p_selection_statement->expression) + { + p_object_compared_with_null = expression_is_comparing_owner_with_null(p_selection_statement->expression); + } + + struct object* p_object_compared_with_not_null = NULL; + if (p_selection_statement->expression) + { + p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_selection_statement->expression); + } + + + /* + This index is from the end of top of stack going to base of statck + */ + const int original = 2; + push_copy_of_current_state(ctx); + + if (p_object_compared_with_null) + { + //if (p == 0) { p is null } + p_object_compared_with_null->state = OBJECT_STATE_NULL; + } + if (p_object_compared_with_not_null) + { + //if (p != 0) { p is not null } + p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; + } + + if (p_selection_statement->secondary_block) + { + + flow_visit_secondary_block(ctx, p_selection_statement->secondary_block); + // check_defer_and_variables(ctx, p_defer, p_selection_statement->secondary_block->last_token); + + } + + bool was_last_statement_inside_true_branch_return = false; + if (ctx->p_last_jump_statement) + { + //TODO gotos etc... + + was_last_statement_inside_true_branch_return = + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; + } + + //enum object_state state_left_in_true_branch = 0; + //if (p_object_compared_with_null) + // state_left_in_true_branch = p_object_compared_with_null->state; + //else if (p_object_compared_with_not_null) + // state_left_in_true_branch = p_object_compared_with_not_null->state; + + /*let's make a copy of the state we left true branch*/ + const int true_branch = 1; + push_copy_of_current_state(ctx); + + restore_state(ctx, original); + + const int current = 0; + + /*when we dont have else block we have a empty imaginary one */ + /*we invert the object state*/ + if (p_object_compared_with_null) + { + // if (p == NULL) { } else { p is not null } + p_object_compared_with_null->state = OBJECT_STATE_NOT_NULL; + } + if (p_object_compared_with_not_null) + { + // if (p != NULL) { } else { p is null } + p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + } + + ctx->p_last_jump_statement = NULL; + if (p_selection_statement->else_secondary_block_opt) + { + //struct flow_defer_scope* owner p_defer = calloc(1, sizeof * p_defer); + //p_defer->previous = ctx->tail_block; + //ctx->tail_block = p_defer; + //p_defer->p_selection_statement = p_selection_statement; + flow_visit_secondary_block(ctx, p_selection_statement->else_secondary_block_opt); + //ctx->tail_block = ctx->tail_block->previous; //POP + + } + + bool was_last_statement_inside_else_branch_return = false; + if (ctx->p_last_jump_statement) + { + //TODO gotos etc... + was_last_statement_inside_else_branch_return = + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; + } + + + if (was_last_statement_inside_true_branch_return) + { + if (was_last_statement_inside_else_branch_return) + { + restore_state(ctx, original); + } + else + { + //the else state is the current state + } + } + else + { + if (was_last_statement_inside_else_branch_return) + { + restore_state(ctx, true_branch); + } + else + { + merge_if_else_states(ctx, current, original, true_branch, current); + } + } + + + pop_states(ctx, 2); @@ -926,114 +914,114 @@ static void flow_visit_block_item(struct flow_visit_ctx* ctx, struct block_item* static void flow_visit_switch_statement(struct flow_visit_ctx* ctx, struct selection_statement* p_selection_statement) { - assert(p_selection_statement->first_token->type == TK_KEYWORD_SWITCH); - - int inverse_stack = 1; //we have 1 item - push_copy_of_current_state(ctx); //2 (permanent copy) - - - //const int current = 0; - - //const int nothing = -1; - - //bool has_default_case = false; - int default_index = -1; - - //for each case - // visit - // merge not so simple if set in all branches the initial cannot be merged - // restore - struct statement* p_statement = p_selection_statement->secondary_block->statement; - if (p_statement && - p_statement->unlabeled_statement && - p_statement->unlabeled_statement->primary_block && - p_statement->unlabeled_statement->primary_block->compound_statement) - { - struct compound_statement* p_compound_statement = - p_statement->unlabeled_statement->primary_block->compound_statement; - - struct block_item* item = p_compound_statement->block_item_list.head; - while (item) - { - if (item->label && item->first_token->type == TK_KEYWORD_CASE) - { - /* - Each time we find a case we restore the state to the state we - have before entering switch - */ - restore_state(ctx, inverse_stack); - } - if (item->label && item->first_token->type == TK_KEYWORD_DEFAULT) - { - default_index = inverse_stack; - /* - Each time we find a case we restore the state to the state we - have before entering switch - */ - restore_state(ctx, inverse_stack); - } - else if (item->unlabeled_statement && - item->unlabeled_statement->jump_statement && - item->first_token->type == TK_KEYWORD_BREAK) - { - /* - Each time we find a break we safe the state - pushing it - */ - push_copy_of_current_state(ctx); - inverse_stack++; - } - flow_visit_block_item(ctx, item); - - item = item->next; - } - } - - if (default_index == -1) - { - inverse_stack++; - default_index = inverse_stack; - push_copy_of_current_state(ctx); - - } - - const int original = inverse_stack; - - merge_if_else_states(ctx, 0, original, 2, default_index); - - for (int i = 3; i < inverse_stack; i++) - { - merge_if_else_states(ctx, 0, original, i, 0); - } - - - /* - we have a stack of states for each case label - now we need to merge them - */ - //The number of case we have is inverse_stack - 1 - - pop_states(ctx, inverse_stack); + assert(p_selection_statement->first_token->type == TK_KEYWORD_SWITCH); + + int inverse_stack = 1; //we have 1 item + push_copy_of_current_state(ctx); //2 (permanent copy) + + + //const int current = 0; + + //const int nothing = -1; + + //bool has_default_case = false; + int default_index = -1; + + //for each case + // visit + // merge not so simple if set in all branches the initial cannot be merged + // restore + struct statement* p_statement = p_selection_statement->secondary_block->statement; + if (p_statement && + p_statement->unlabeled_statement && + p_statement->unlabeled_statement->primary_block && + p_statement->unlabeled_statement->primary_block->compound_statement) + { + struct compound_statement* p_compound_statement = + p_statement->unlabeled_statement->primary_block->compound_statement; + + struct block_item* item = p_compound_statement->block_item_list.head; + while (item) + { + if (item->label && item->first_token->type == TK_KEYWORD_CASE) + { + /* + Each time we find a case we restore the state to the state we + have before entering switch + */ + restore_state(ctx, inverse_stack); + } + if (item->label && item->first_token->type == TK_KEYWORD_DEFAULT) + { + default_index = inverse_stack; + /* + Each time we find a case we restore the state to the state we + have before entering switch + */ + restore_state(ctx, inverse_stack); + } + else if (item->unlabeled_statement && + item->unlabeled_statement->jump_statement && + item->first_token->type == TK_KEYWORD_BREAK) + { + /* + Each time we find a break we safe the state + pushing it + */ + push_copy_of_current_state(ctx); + inverse_stack++; + } + flow_visit_block_item(ctx, item); + + item = item->next; + } + } + + if (default_index == -1) + { + inverse_stack++; + default_index = inverse_stack; + push_copy_of_current_state(ctx); + + } + + const int original = inverse_stack; + + merge_if_else_states(ctx, 0, original, 2, default_index); + + for (int i = 3; i < inverse_stack; i++) + { + merge_if_else_states(ctx, 0, original, i, 0); + } + + + /* + we have a stack of states for each case label + now we need to merge them + */ + //The number of case we have is inverse_stack - 1 + + pop_states(ctx, inverse_stack); } static void flow_visit_selection_statement(struct flow_visit_ctx* ctx, struct selection_statement* p_selection_statement) { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_selection_statement = p_selection_statement; + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_selection_statement = p_selection_statement; - if (p_selection_statement->first_token->type == TK_KEYWORD_IF) - { - flow_visit_if_statement(ctx, p_selection_statement); - } - else if (p_selection_statement->first_token->type == TK_KEYWORD_SWITCH) - { - flow_visit_switch_statement(ctx, p_selection_statement); - } - else - assert(false); + if (p_selection_statement->first_token->type == TK_KEYWORD_IF) + { + flow_visit_if_statement(ctx, p_selection_statement); + } + else if (p_selection_statement->first_token->type == TK_KEYWORD_SWITCH) + { + flow_visit_switch_statement(ctx, p_selection_statement); + } + else + assert(false); - flow_visit_ctx_pop_tail_block(ctx); + flow_visit_ctx_pop_tail_block(ctx); } static void flow_visit_compound_statement(struct flow_visit_ctx* ctx, struct compound_statement* p_compound_statement); @@ -1042,14 +1030,14 @@ static void flow_visit_initializer_list(struct flow_visit_ctx* ctx, struct initi static void flow_visit_bracket_initializer_list(struct flow_visit_ctx* ctx, struct braced_initializer* p_bracket_initializer_list) { - if (p_bracket_initializer_list->initializer_list == NULL) - { + if (p_bracket_initializer_list->initializer_list == NULL) + { - } - else - { - flow_visit_initializer_list(ctx, p_bracket_initializer_list->initializer_list); - } + } + else + { + flow_visit_initializer_list(ctx, p_bracket_initializer_list->initializer_list); + } } static void flow_visit_designation(struct flow_visit_ctx* ctx, struct designation* p_designation) @@ -1058,34 +1046,34 @@ static void flow_visit_designation(struct flow_visit_ctx* ctx, struct designatio static void flow_visit_initializer(struct flow_visit_ctx* ctx, struct initializer* p_initializer) { - if (p_initializer->p_attribute_specifier_sequence_opt) - { - flow_visit_attribute_specifier_sequence(ctx, p_initializer->p_attribute_specifier_sequence_opt); - } + if (p_initializer->p_attribute_specifier_sequence_opt) + { + flow_visit_attribute_specifier_sequence(ctx, p_initializer->p_attribute_specifier_sequence_opt); + } - if (p_initializer->designation) - { - flow_visit_designation(ctx, p_initializer->designation); - } + if (p_initializer->designation) + { + flow_visit_designation(ctx, p_initializer->designation); + } - if (p_initializer->assignment_expression) - { - flow_visit_expression(ctx, p_initializer->assignment_expression); - } - else if (p_initializer->braced_initializer) - { - flow_visit_bracket_initializer_list(ctx, p_initializer->braced_initializer); - } + if (p_initializer->assignment_expression) + { + flow_visit_expression(ctx, p_initializer->assignment_expression); + } + else if (p_initializer->braced_initializer) + { + flow_visit_bracket_initializer_list(ctx, p_initializer->braced_initializer); + } } static void flow_visit_initializer_list(struct flow_visit_ctx* ctx, struct initializer_list* p_initializer_list) { - struct initializer* p_initializer = p_initializer_list->head; - while (p_initializer) - { - flow_visit_initializer(ctx, p_initializer); - p_initializer = p_initializer->next; - } + struct initializer* p_initializer = p_initializer_list->head; + while (p_initializer) + { + flow_visit_initializer(ctx, p_initializer); + p_initializer = p_initializer->next; + } } static void flow_visit_type_qualifier(struct flow_visit_ctx* ctx, struct type_qualifier* p_type_qualifier) @@ -1095,941 +1083,970 @@ static void flow_visit_type_qualifier(struct flow_visit_ctx* ctx, struct type_qu static void flow_visit_specifier_qualifier(struct flow_visit_ctx* ctx, struct type_specifier_qualifier* p_specifier_qualifier) { - if (p_specifier_qualifier->type_specifier) - flow_visit_type_specifier(ctx, p_specifier_qualifier->type_specifier); + if (p_specifier_qualifier->type_specifier) + flow_visit_type_specifier(ctx, p_specifier_qualifier->type_specifier); - if (p_specifier_qualifier->type_qualifier) - flow_visit_type_qualifier(ctx, p_specifier_qualifier->type_qualifier); + if (p_specifier_qualifier->type_qualifier) + flow_visit_type_qualifier(ctx, p_specifier_qualifier->type_qualifier); } static void flow_visit_specifier_qualifier_list(struct flow_visit_ctx* ctx, struct specifier_qualifier_list* p_specifier_qualifier_list_opt, - struct type* p_type) -{ - if (p_specifier_qualifier_list_opt == NULL) - return; - - if (p_specifier_qualifier_list_opt->struct_or_union_specifier) - { - flow_visit_struct_or_union_specifier(ctx, p_specifier_qualifier_list_opt->struct_or_union_specifier); - } - else if (p_specifier_qualifier_list_opt->enum_specifier) - { - flow_visit_enum_specifier(ctx, p_specifier_qualifier_list_opt->enum_specifier); - } - else if (p_specifier_qualifier_list_opt->typedef_declarator) - { - //typedef name - } - //else if (p_specifier_qualifier_list->p_typeof_expression_opt) - //{ - // flow_visit_expression(ctx, p_specifier_qualifier_list->p_typeof_expression_opt); - //} - else - { - struct type_specifier_qualifier* p_specifier_qualifier = p_specifier_qualifier_list_opt->head; - while (p_specifier_qualifier) - { - flow_visit_specifier_qualifier(ctx, p_specifier_qualifier); - p_specifier_qualifier = p_specifier_qualifier->next; - } - } + struct type* p_type) +{ + if (p_specifier_qualifier_list_opt == NULL) + return; + + if (p_specifier_qualifier_list_opt->struct_or_union_specifier) + { + flow_visit_struct_or_union_specifier(ctx, p_specifier_qualifier_list_opt->struct_or_union_specifier); + } + else if (p_specifier_qualifier_list_opt->enum_specifier) + { + flow_visit_enum_specifier(ctx, p_specifier_qualifier_list_opt->enum_specifier); + } + else if (p_specifier_qualifier_list_opt->typedef_declarator) + { + //typedef name + } + //else if (p_specifier_qualifier_list->p_typeof_expression_opt) + //{ + // flow_visit_expression(ctx, p_specifier_qualifier_list->p_typeof_expression_opt); + //} + else + { + struct type_specifier_qualifier* p_specifier_qualifier = p_specifier_qualifier_list_opt->head; + while (p_specifier_qualifier) + { + flow_visit_specifier_qualifier(ctx, p_specifier_qualifier); + p_specifier_qualifier = p_specifier_qualifier->next; + } + } } static void flow_visit_declarator(struct flow_visit_ctx* ctx, struct declarator* p_declarator); static void flow_visit_type_name(struct flow_visit_ctx* ctx, struct type_name* p_type_name) { - flow_visit_specifier_qualifier_list(ctx, p_type_name->specifier_qualifier_list, &p_type_name->type); - flow_visit_declarator(ctx, p_type_name->declarator); + flow_visit_specifier_qualifier_list(ctx, p_type_name->specifier_qualifier_list, &p_type_name->type); + flow_visit_declarator(ctx, p_type_name->declarator); - /* - * Vamos esconder tudo e gerar um novo - * Exemplo - * (const typeof(int (*)())) -> * ( int (*const )() ) - */ + /* + * Vamos esconder tudo e gerar um novo + * Exemplo + * (const typeof(int (*)())) -> * ( int (*const )() ) + */ } static void flow_visit_argument_expression_list(struct flow_visit_ctx* ctx, struct argument_expression_list* p_argument_expression_list) { - struct argument_expression* p_argument_expression = - p_argument_expression_list->head; - while (p_argument_expression) - { - flow_visit_expression(ctx, p_argument_expression->expression); - p_argument_expression = p_argument_expression->next; - } + struct argument_expression* p_argument_expression = + p_argument_expression_list->head; + while (p_argument_expression) + { + flow_visit_expression(ctx, p_argument_expression->expression); + p_argument_expression = p_argument_expression->next; + } } static void flow_visit_generic_selection(struct flow_visit_ctx* ctx, struct generic_selection* p_generic_selection) { - if (p_generic_selection->expression) - { - flow_visit_expression(ctx, p_generic_selection->expression); - } - else if (p_generic_selection->type_name) - { - flow_visit_type_name(ctx, p_generic_selection->type_name); - } + if (p_generic_selection->expression) + { + flow_visit_expression(ctx, p_generic_selection->expression); + } + else if (p_generic_selection->type_name) + { + flow_visit_type_name(ctx, p_generic_selection->type_name); + } } static int compare_function_arguments2(struct parser_ctx* ctx, - struct type* p_type, - struct argument_expression_list* p_argument_expression_list) -{ - - struct param* p_current_parameter_type = NULL; - - const struct param_list* p_param_list = type_get_func_or_func_ptr_params(p_type); - - if (p_param_list) - { - p_current_parameter_type = p_param_list->head; - } - - int param_num = 1; - struct argument_expression* p_current_argument = p_argument_expression_list->head; - - while (p_current_argument && p_current_parameter_type) - { - struct type argument_object_type = { 0 }; - struct object* p_argument_object = - expression_get_object(p_current_argument->expression, &argument_object_type); - - bool bool_source_zero_value = constant_value_is_valid(&p_current_argument->expression->constant_value) && - constant_value_to_ull(&p_current_argument->expression->constant_value) == 0; - - struct type argument_object_type2 = { 0 }; - struct object* p_argument_object2 = - expression_get_object(p_current_argument->expression, &argument_object_type2); - - - if (ctx->options.null_checks) - { - if (type_is_pointer(&p_current_parameter_type->type) && - !(p_current_parameter_type->type.type_qualifier_flags & TYPE_QUALIFIER_OPT)) - { - - if (p_argument_object2 && - p_argument_object2->state & OBJECT_STATE_NULL) - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - p_current_argument->expression->first_token, - "pointer can be null, but the parameter is not optional"); - } - - type_destroy(&argument_object_type2); - } - } - - - /* - checking is some uninitialized or moved object is being used as parameter - */ - if (p_argument_object) - { - //TODO check if pointed object is const - bool check_pointed_object = !type_is_void_ptr(&p_current_parameter_type->type); - - bool pointer_to_out = false; - - if (type_is_pointer(&p_current_parameter_type->type) && - check_pointed_object) - { - struct type t2 = type_remove_pointer(&p_current_parameter_type->type); - if (type_is_out(&t2)) - { - pointer_to_out = true; - type_destroy(&t2); - } - } - - if (!pointer_to_out) - { - checked_read_object(ctx, - &argument_object_type, - p_argument_object, - p_current_argument->expression->first_token, - check_pointed_object); - - } - } - - if (type_is_any_owner(&p_current_parameter_type->type)) - { + struct type* p_type, + struct argument_expression_list* p_argument_expression_list) +{ + + struct param* p_current_parameter_type = NULL; + + const struct param_list* p_param_list = type_get_func_or_func_ptr_params(p_type); + + if (p_param_list) + { + p_current_parameter_type = p_param_list->head; + } + + int param_num = 1; + struct argument_expression* p_current_argument = p_argument_expression_list->head; + + while (p_current_argument && p_current_parameter_type) + { + struct type argument_object_type = { 0 }; + struct object* p_argument_object = + expression_get_object(p_current_argument->expression, &argument_object_type); + + bool bool_source_zero_value = constant_value_is_valid(&p_current_argument->expression->constant_value) && + constant_value_to_ull(&p_current_argument->expression->constant_value) == 0; + + struct type argument_object_type2 = { 0 }; + struct object* p_argument_object2 = + expression_get_object(p_current_argument->expression, &argument_object_type2); + + + if (ctx->options.null_checks) + { + if (type_is_pointer(&p_current_parameter_type->type) && + !(p_current_parameter_type->type.type_qualifier_flags & TYPE_QUALIFIER_OPT)) + { + + if (p_argument_object2 && + p_argument_object2->state & OBJECT_STATE_NULL) + { + compiler_diagnostic_message(W_ANALIZER_MAYBE_NULL_TO_NON_OPT_ARGUMENT, + ctx, + p_current_argument->expression->first_token, + "pointer can be null, but the parameter is not optional"); + } + + type_destroy(&argument_object_type2); + } + } + + + /* + checking is some uninitialized or moved object is being used as parameter + */ + if (p_argument_object) + { + //TODO check if pointed object is const + bool check_pointed_object = !type_is_void_ptr(&p_current_parameter_type->type); + + bool pointer_to_out = false; + + if (type_is_pointer(&p_current_parameter_type->type) && + check_pointed_object) + { + struct type t2 = type_remove_pointer(&p_current_parameter_type->type); + if (type_is_out(&t2)) + { + pointer_to_out = true; + } + type_destroy(&t2); + } + + if (!pointer_to_out) + { + checked_read_object(ctx, + &argument_object_type, + p_argument_object, + p_current_argument->expression->first_token, + check_pointed_object); + + } + } + + if (type_is_any_owner(&p_current_parameter_type->type)) + { #if 1 #endif - object_assignment(ctx, - p_argument_object, - &argument_object_type, - NULL, /*dest object*/ - &p_current_parameter_type->type, - p_current_argument->expression->first_token, - bool_source_zero_value, - OBJECT_STATE_UNINITIALIZED); - } - else - { - if (p_argument_object && - type_is_pointer(&p_current_parameter_type->type)) - { - struct type parameter_type = - type_remove_pointer(&p_current_parameter_type->type); - - if (!type_is_const(¶meter_type)) - { - if (type_is_void(¶meter_type)) - { - // - } - else - { - if (p_argument_object->pointed) - { - struct type pointed_type = type_remove_pointer(&argument_object_type); - object_set_unknown(&pointed_type, p_argument_object->pointed); - type_destroy(&pointed_type); - } - } - } - - type_destroy(¶meter_type); - } - } - p_current_argument = p_current_argument->next; - p_current_parameter_type = p_current_parameter_type->next; - param_num++; - - type_destroy(&argument_object_type); - } - - while (p_current_argument) { - /* - We have more argument than parameters, this happens with variadic functions - */ - struct type argument_object_type = { 0 }; - struct object* p_argument_object = - expression_get_object(p_current_argument->expression, &argument_object_type); - - checked_read_object(ctx, - &argument_object_type, - p_argument_object, - p_current_argument->expression->first_token, - false); - - p_current_argument = p_current_argument->next; - } - return 0; + object_assignment(ctx, + p_argument_object, + &argument_object_type, + NULL, /*dest object*/ + &p_current_parameter_type->type, + p_current_argument->expression->first_token, + bool_source_zero_value, + OBJECT_STATE_UNINITIALIZED); + } + else + { + if (p_argument_object && + type_is_pointer(&p_current_parameter_type->type)) + { + struct type parameter_type = + type_remove_pointer(&p_current_parameter_type->type); + + if (!type_is_const(¶meter_type)) + { + if (type_is_void(¶meter_type)) + { + // + } + else + { + if (p_argument_object->pointed) + { + struct type pointed_type = type_remove_pointer(&argument_object_type); + object_set_unknown(&pointed_type, p_argument_object->pointed); + type_destroy(&pointed_type); + } + } + } + + type_destroy(¶meter_type); + } + } + p_current_argument = p_current_argument->next; + p_current_parameter_type = p_current_parameter_type->next; + param_num++; + + type_destroy(&argument_object_type); + } + + while (p_current_argument) { + /* + We have more argument than parameters, this happens with variadic functions + */ + struct type argument_object_type = { 0 }; + struct object* p_argument_object = + expression_get_object(p_current_argument->expression, &argument_object_type); + + checked_read_object(ctx, + &argument_object_type, + p_argument_object, + p_current_argument->expression->first_token, + false); + + p_current_argument = p_current_argument->next; + } + return 0; } static void flow_visit_expression(struct flow_visit_ctx* ctx, struct expression* p_expression) { - if (p_expression == NULL) - return; - - switch (p_expression->expression_type) - { - case PRIMARY_EXPRESSION__FUNC__: - break; - case PRIMARY_IDENTIFIER: - break; - case PRIMARY_EXPRESSION_ENUMERATOR: - - break; - case PRIMARY_EXPRESSION_DECLARATOR: - - if (p_expression->declarator->object.state & OBJECT_STATE_UNINITIALIZED) - { - //TODO inside sizeof(v) is not an error. :D - //TODO function type... -#if 0 - compiler_set_warning_with_token(W_UNINITIALZED, - ctx->ctx, - p_expression->first_token, - "'%s' is uninitialized ", - p_expression->declarator->object_name->lexeme); -#endif - } + if (p_expression == NULL) + return; + + switch (p_expression->expression_type) + { + case PRIMARY_EXPRESSION__FUNC__: + break; + case PRIMARY_IDENTIFIER: + break; + case PRIMARY_EXPRESSION_ENUMERATOR: + + break; + case PRIMARY_EXPRESSION_DECLARATOR: - break; + if (p_expression->declarator->object.state & OBJECT_STATE_UNINITIALIZED) + { + //TODO inside sizeof(v) is not an error. :D + //TODO function type... - case PRIMARY_EXPRESSION_PARENTESIS: - flow_visit_expression(ctx, p_expression->right); - break; + if (!ctx->is_left_expression && + !ctx->expression_is_not_evaluated) + { + compiler_diagnostic_message(W_UNINITIALZED, + ctx->ctx, + p_expression->first_token, + "'%s' is uninitialized ", + p_expression->declarator->name->lexeme); + } + } - case PRIMARY_EXPRESSION_STRING_LITERAL: - break; - case PRIMARY_EXPRESSION_CHAR_LITERAL: - break; - case PRIMARY_EXPRESSION_NUMBER: - break; + break; - case PRIMARY_EXPRESSION_PREDEFINED_CONSTANT: + case PRIMARY_EXPRESSION_PARENTESIS: + flow_visit_expression(ctx, p_expression->right); + break; - break; + case PRIMARY_EXPRESSION_STRING_LITERAL: + break; + case PRIMARY_EXPRESSION_CHAR_LITERAL: + break; + case PRIMARY_EXPRESSION_NUMBER: + break; - case PRIMARY_EXPRESSION_GENERIC: - flow_visit_generic_selection(ctx, p_expression->generic_selection); - break; + case PRIMARY_EXPRESSION_PREDEFINED_CONSTANT: - case POSTFIX_DOT: - break; - case POSTFIX_ARROW: - break; - case POSTFIX_INCREMENT: - break; - case POSTFIX_DECREMENT: - break; - case POSTFIX_ARRAY: + break; - flow_visit_expression(ctx, p_expression->left); - flow_visit_expression(ctx, p_expression->right); + case PRIMARY_EXPRESSION_GENERIC: + flow_visit_generic_selection(ctx, p_expression->generic_selection); + break; - struct type t = { 0 }; - struct object* p_object = expression_get_object(p_expression->left, &t); + case POSTFIX_DOT: + break; + case POSTFIX_ARROW: + break; + case POSTFIX_INCREMENT: + break; + case POSTFIX_DECREMENT: + break; + case POSTFIX_ARRAY: { - if (p_object && p_object->state == OBJECT_STATE_UNINITIALIZED) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, - ctx->ctx, - p_expression->left->first_token, "using a uninitialized object"); - } - else if (p_object && p_object->state & OBJECT_STATE_UNINITIALIZED) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, - ctx->ctx, - p_expression->left->first_token, "maybe using a uninitialized object"); - } - type_destroy(&t); + flow_visit_expression(ctx, p_expression->left); + flow_visit_expression(ctx, p_expression->right); + + struct type t = { 0 }; + struct object* p_object = expression_get_object(p_expression->left, &t); + + if (p_object && p_object->state == OBJECT_STATE_UNINITIALIZED) + { + compiler_diagnostic_message(W_ANALYZER_UNINITIALIZED, + ctx->ctx, + p_expression->left->first_token, "using a uninitialized object"); + } + else if (p_object && p_object->state & OBJECT_STATE_UNINITIALIZED) + { + compiler_diagnostic_message(W_ANALYZER_UNINITIALIZED, + ctx->ctx, + p_expression->left->first_token, "maybe using a uninitialized object"); + } + type_destroy(&t); + } + break; + + case POSTFIX_FUNCTION_CALL: - break; + flow_visit_expression(ctx, p_expression->left); - case POSTFIX_FUNCTION_CALL: + flow_visit_argument_expression_list(ctx, &p_expression->argument_expression_list); + compare_function_arguments2(ctx->ctx, &p_expression->left->type, &p_expression->argument_expression_list); - flow_visit_expression(ctx, p_expression->left); + break; + case POSTFIX_EXPRESSION_FUNCTION_LITERAL: + + + flow_visit_compound_statement(ctx, p_expression->compound_statement); + + break; + + case POSTFIX_EXPRESSION_COMPOUND_LITERAL: + + if (p_expression->type_name) + { + flow_visit_type_name(ctx, p_expression->type_name); + } + + flow_visit_bracket_initializer_list(ctx, p_expression->braced_initializer); + + struct object temp2 = make_object(&p_expression->type, p_expression->type_name->declarator); + object_swap(&temp2, &p_expression->type_name->declarator->object); + object_destroy(&temp2); + + //TODO the state of object depends of the initializer + set_direct_state(&p_expression->type, &p_expression->type_name->declarator->object, OBJECT_STATE_ZERO); + + + assert(p_expression->left == NULL); + assert(p_expression->right == NULL); + + break; + + case UNARY_EXPRESSION_ALIGNOF: + + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } - flow_visit_argument_expression_list(ctx, &p_expression->argument_expression_list); - compare_function_arguments2(ctx->ctx, &p_expression->left->type, &p_expression->argument_expression_list); + if (p_expression->type_name) + { + /*sizeof*/ + flow_visit_type_name(ctx, p_expression->type_name); + } + break; - break; - case POSTFIX_EXPRESSION_FUNCTION_LITERAL: + case UNARY_EXPRESSION_ASSERT: + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); - flow_visit_compound_statement(ctx, p_expression->compound_statement); + struct object* p_object_compared_with_null = NULL; + if (p_expression->right) + { + p_object_compared_with_null = expression_is_comparing_owner_with_null(p_expression->right); + } - break; + struct object* p_object_compared_with_not_null = NULL; + if (p_expression->right) + { + p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_expression->right); + } + + if (p_object_compared_with_null) + { + //if (p == 0) { p is null } + p_object_compared_with_null->state = OBJECT_STATE_NULL; + } - case POSTFIX_EXPRESSION_COMPOUND_LITERAL: + if (p_object_compared_with_not_null) + { + //if (p != 0) { p is not null } + p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; + } + } - if (p_expression->type_name) - { - flow_visit_type_name(ctx, p_expression->type_name); - } + break; - flow_visit_bracket_initializer_list(ctx, p_expression->braced_initializer); + case UNARY_EXPRESSION_SIZEOF_EXPRESSION: - struct object temp2 = make_object(&p_expression->type, p_expression->type_name->declarator); - object_swap(&temp2, &p_expression->type_name->declarator->object); - object_destroy(&temp2); + if (p_expression->right) + { + const bool t2 = ctx->expression_is_not_evaluated; + ctx->expression_is_not_evaluated = true; + flow_visit_expression(ctx, p_expression->right); + ctx->expression_is_not_evaluated = t2; + } - //TODO the state of object depends of the initializer - set_direct_state(&p_expression->type, &p_expression->type_name->declarator->object, OBJECT_STATE_ZERO); + if (p_expression->type_name) + { + /*sizeof*/ + flow_visit_type_name(ctx, p_expression->type_name); + } - assert(p_expression->left == NULL); - assert(p_expression->right == NULL); + break; - break; + case UNARY_EXPRESSION_SIZEOF_TYPE: + case UNARY_EXPRESSION_INCREMENT: + case UNARY_EXPRESSION_DECREMENT: + case UNARY_EXPRESSION_NOT: + case UNARY_EXPRESSION_BITNOT: + case UNARY_EXPRESSION_NEG: + case UNARY_EXPRESSION_PLUS: - case UNARY_EXPRESSION_ALIGNOF: + case UNARY_EXPRESSION_ADDRESSOF: + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } + + if (p_expression->type_name) + { + /*sizeof*/ + flow_visit_type_name(ctx, p_expression->type_name); + } - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } - - if (p_expression->type_name) - { - /*sizeof*/ - flow_visit_type_name(ctx, p_expression->type_name); - } - break; - - case UNARY_EXPRESSION_ASSERT: - - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - - struct object* p_object_compared_with_null = NULL; - - if (p_expression->right) - { - p_object_compared_with_null = expression_is_comparing_owner_with_null(p_expression->right); - } - - struct object* p_object_compared_with_not_null = NULL; - if (p_expression->right) - { - p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_expression->right); - } - - if (p_object_compared_with_null) - { - //if (p == 0) { p is null } - p_object_compared_with_null->state = OBJECT_STATE_NULL; - } - - if (p_object_compared_with_not_null) - { - //if (p != 0) { p is not null } - p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; - } - } - - break; - - case UNARY_EXPRESSION_SIZEOF_EXPRESSION: - case UNARY_EXPRESSION_SIZEOF_TYPE: - case UNARY_EXPRESSION_INCREMENT: - case UNARY_EXPRESSION_DECREMENT: - case UNARY_EXPRESSION_NOT: - case UNARY_EXPRESSION_BITNOT: - case UNARY_EXPRESSION_NEG: - case UNARY_EXPRESSION_PLUS: - - case UNARY_EXPRESSION_ADDRESSOF: - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } - - if (p_expression->type_name) - { - /*sizeof*/ - flow_visit_type_name(ctx, p_expression->type_name); - } - - break; + break; #if 1 - case UNARY_EXPRESSION_CONTENT: - { - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } - - struct type t = { 0 }; - struct object* p_object = expression_get_object(p_expression->right, &t); - - if (p_object && p_object->state == OBJECT_STATE_UNINITIALIZED) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, - ctx->ctx, - p_expression->right->first_token, "using a uninitialized object"); - } - else if (p_object && p_object->state & OBJECT_STATE_NULL) - { - /* - *p = 1* - */ - if (ctx->is_left_expression) - { - //is - } - else - { - //TO many errors because the pointer can be null. - if (p_object && !(p_object->state & OBJECT_STATE_NOT_NULL)) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, - ctx->ctx, - p_expression->right->first_token, "deferencing a NULL object"); - } - } - } - type_destroy(&t); - - } - break; + case UNARY_EXPRESSION_CONTENT: + { + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } + + struct type t = { 0 }; + struct object* p_object = expression_get_object(p_expression->right, &t); + + if (p_object && p_object->state == OBJECT_STATE_UNINITIALIZED) + { + compiler_diagnostic_message(W_ANALYZER_UNINITIALIZED, + ctx->ctx, + p_expression->right->first_token, "using a uninitialized object"); + } + else if (p_object && p_object->state & OBJECT_STATE_NULL) + { + /* + *p = 1* + */ + if (!ctx->is_left_expression && + !ctx->expression_is_not_evaluated) + { + //TO many errors because the pointer can be null. + if (p_object && !(p_object->state & OBJECT_STATE_NOT_NULL)) + { + + compiler_diagnostic_message(W_ANALYZER_NULL_DEREFERENCE, + ctx->ctx, + p_expression->right->first_token, "dereference a NULL object"); + } + } + } + type_destroy(&t); + + } + break; #endif - case ASSIGNMENT_EXPRESSION: - { - - struct type right_object_type = { 0 }; - struct object* const p_right_object = expression_get_object(p_expression->right, &right_object_type); - - struct type dest_object_type = { 0 }; - struct object* const p_dest_object = expression_get_object(p_expression->left, &dest_object_type); - //print_object(&dest_object_type, p_dest_object); - - bool temp = ctx->is_left_expression = true; - flow_visit_expression(ctx, p_expression->left); - ctx->is_left_expression = temp; - - //print_object(&dest_object_type, p_dest_object); - flow_visit_expression(ctx, p_expression->right); - - - - bool bool_source_zero_value = constant_value_is_valid(&p_expression->right->constant_value) && - constant_value_to_ull(&p_expression->right->constant_value) == 0; - - if (p_expression->right && - p_expression->right->expression_type == POSTFIX_FUNCTION_CALL) - { - if (p_expression->right->left && - p_expression->right->left->declarator && - p_expression->right->left->declarator->name && - strcmp(p_expression->right->left->declarator->name->lexeme, "calloc") == 0) - { - bool_source_zero_value = true; - } - } - - object_assignment(ctx->ctx, - p_right_object, /*source*/ - &right_object_type, /*source type*/ - p_dest_object, /*dest object*/ - &dest_object_type, /*dest type*/ - p_expression->left->first_token, - bool_source_zero_value, - OBJECT_STATE_MOVED); - - type_destroy(&right_object_type); - type_destroy(&dest_object_type); - - } - break; - - case CAST_EXPRESSION: - case MULTIPLICATIVE_EXPRESSION_MULT: - case MULTIPLICATIVE_EXPRESSION_DIV: - case MULTIPLICATIVE_EXPRESSION_MOD: - case ADDITIVE_EXPRESSION_PLUS: - case ADDITIVE_EXPRESSION_MINUS: - case SHIFT_EXPRESSION_RIGHT: - case SHIFT_EXPRESSION_LEFT: - case RELATIONAL_EXPRESSION_BIGGER_THAN: - case RELATIONAL_EXPRESSION_LESS_THAN: - - - case EQUALITY_EXPRESSION_EQUAL: - flow_visit_expression(ctx, p_expression->left); - flow_visit_expression(ctx, p_expression->right); - - break; - - case EQUALITY_EXPRESSION_NOT_EQUAL: - flow_visit_expression(ctx, p_expression->left); - flow_visit_expression(ctx, p_expression->right); - break; - - case AND_EXPRESSION: - case EXCLUSIVE_OR_EXPRESSION: - case INCLUSIVE_OR_EXPRESSION: - case INCLUSIVE_AND_EXPRESSION: - case LOGICAL_OR_EXPRESSION: - case RELATIONAL_EXPRESSION_LESS_OR_EQUAL_THAN: - case RELATIONAL_EXPRESSION_BIGGER_OR_EQUAL_THAN: - - if (p_expression->left) - { - flow_visit_expression(ctx, p_expression->left); - } - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } - if (p_expression->type_name) - { - flow_visit_type_name(ctx, p_expression->type_name); - } - break; - - case UNARY_EXPRESSION_TRAITS: - { - - } - break; - - case UNARY_EXPRESSION_IS_SAME: - break; - - case UNARY_DECLARATOR_ATTRIBUTE_EXPR: - break; - - case CONDITIONAL_EXPRESSION: - if (p_expression->condition_expr) - { - flow_visit_expression(ctx, p_expression->condition_expr); - } - - if (p_expression->left) - { - flow_visit_expression(ctx, p_expression->left); - } - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } - - break; - - default: - break; - } + case ASSIGNMENT_EXPRESSION: + { + + struct type right_object_type = { 0 }; + struct object* const p_right_object = expression_get_object(p_expression->right, &right_object_type); + + struct type dest_object_type = { 0 }; + struct object* const p_dest_object = expression_get_object(p_expression->left, &dest_object_type); + //print_object(&dest_object_type, p_dest_object); + + bool temp = ctx->is_left_expression; + ctx->is_left_expression = true; + flow_visit_expression(ctx, p_expression->left); + ctx->is_left_expression = false; + flow_visit_expression(ctx, p_expression->right); + ctx->is_left_expression = temp; + + + bool bool_source_zero_value = constant_value_is_valid(&p_expression->right->constant_value) && + constant_value_to_ull(&p_expression->right->constant_value) == 0; + + if (p_expression->right && + p_expression->right->expression_type == POSTFIX_FUNCTION_CALL) + { + if (p_expression->right->left && + p_expression->right->left->declarator && + p_expression->right->left->declarator->name && + strcmp(p_expression->right->left->declarator->name->lexeme, "calloc") == 0) + { + bool_source_zero_value = true; + } + } + + object_assignment(ctx->ctx, + p_right_object, /*source*/ + &right_object_type, /*source type*/ + p_dest_object, /*dest object*/ + &dest_object_type, /*dest type*/ + p_expression->left->first_token, + bool_source_zero_value, + OBJECT_STATE_MOVED); + + type_destroy(&right_object_type); + type_destroy(&dest_object_type); + + } + break; + + case CAST_EXPRESSION: + case MULTIPLICATIVE_EXPRESSION_MULT: + case MULTIPLICATIVE_EXPRESSION_DIV: + case MULTIPLICATIVE_EXPRESSION_MOD: + case ADDITIVE_EXPRESSION_PLUS: + case ADDITIVE_EXPRESSION_MINUS: + case SHIFT_EXPRESSION_RIGHT: + case SHIFT_EXPRESSION_LEFT: + case RELATIONAL_EXPRESSION_BIGGER_THAN: + case RELATIONAL_EXPRESSION_LESS_THAN: + + + case EQUALITY_EXPRESSION_EQUAL: + flow_visit_expression(ctx, p_expression->left); + flow_visit_expression(ctx, p_expression->right); + + break; + + case EQUALITY_EXPRESSION_NOT_EQUAL: + flow_visit_expression(ctx, p_expression->left); + flow_visit_expression(ctx, p_expression->right); + break; + + case AND_EXPRESSION: + case EXCLUSIVE_OR_EXPRESSION: + case INCLUSIVE_OR_EXPRESSION: + case INCLUSIVE_AND_EXPRESSION: + case LOGICAL_OR_EXPRESSION: + case RELATIONAL_EXPRESSION_LESS_OR_EQUAL_THAN: + case RELATIONAL_EXPRESSION_BIGGER_OR_EQUAL_THAN: + + if (p_expression->left) + { + flow_visit_expression(ctx, p_expression->left); + } + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } + if (p_expression->type_name) + { + flow_visit_type_name(ctx, p_expression->type_name); + } + break; + + case UNARY_EXPRESSION_TRAITS: + { + + } + break; + + case UNARY_EXPRESSION_IS_SAME: + break; + + case UNARY_DECLARATOR_ATTRIBUTE_EXPR: + break; + + case CONDITIONAL_EXPRESSION: + if (p_expression->condition_expr) + { + flow_visit_expression(ctx, p_expression->condition_expr); + } + + if (p_expression->left) + { + flow_visit_expression(ctx, p_expression->left); + } + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } + + break; + + default: + break; + } } static void flow_visit_expression_statement(struct flow_visit_ctx* ctx, struct expression_statement* p_expression_statement) { - if (p_expression_statement->expression_opt) - flow_visit_expression(ctx, p_expression_statement->expression_opt); + if (p_expression_statement->expression_opt) + flow_visit_expression(ctx, p_expression_statement->expression_opt); } static void flow_visit_block_item_list(struct flow_visit_ctx* ctx, struct block_item_list* p_block_item_list); static void flow_visit_compound_statement(struct flow_visit_ctx* ctx, struct compound_statement* p_compound_statement) { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_compound_statement = p_compound_statement; - flow_visit_block_item_list(ctx, &p_compound_statement->block_item_list); - check_defer_and_variables(ctx, p_defer, p_compound_statement->last_token); + /*let's make a copy of the current post function diagnostic*/ + struct diagnostic current = ctx->ctx->options.diagnostic_stack[ctx->ctx->options.diagnostic_stack_top_index]; + + /*lets restore the diagnostic state it was initialize because static analysis is a second pass*/ + ctx->ctx->options.diagnostic_stack[ctx->ctx->options.diagnostic_stack_top_index] = p_compound_statement->diagnostic_flags; + + + + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_compound_statement = p_compound_statement; + + flow_visit_block_item_list(ctx, &p_compound_statement->block_item_list); + check_defer_and_variables(ctx, p_defer, p_compound_statement->last_token); + + flow_visit_ctx_pop_tail_block(ctx); + + /*restore the state we change*/ + ctx->ctx->options.diagnostic_stack[ctx->ctx->options.diagnostic_stack_top_index] = current; - flow_visit_ctx_pop_tail_block(ctx); } static void flow_visit_do_while_statement(struct flow_visit_ctx* ctx, struct iteration_statement* p_iteration_statement) { - assert(p_iteration_statement->first_token->type == TK_KEYWORD_DO); + assert(p_iteration_statement->first_token->type == TK_KEYWORD_DO); - struct object* p_object_compared_with_not_null = NULL; + struct object* p_object_compared_with_not_null = NULL; - if (p_iteration_statement->expression1) - { - p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_iteration_statement->expression1); - flow_visit_expression(ctx, p_iteration_statement->expression1); - } + if (p_iteration_statement->expression1) + { + p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_iteration_statement->expression1); + flow_visit_expression(ctx, p_iteration_statement->expression1); + } - if (p_iteration_statement->secondary_block) - { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_iteration_statement = p_iteration_statement; + if (p_iteration_statement->secondary_block) + { + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_iteration_statement = p_iteration_statement; - flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); - check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); + check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); - flow_visit_ctx_pop_tail_block(ctx); + flow_visit_ctx_pop_tail_block(ctx); - bool was_last_statement_inside_true_branch_return = false; - if (ctx->p_last_jump_statement) - { + bool was_last_statement_inside_true_branch_return = false; + if (ctx->p_last_jump_statement) + { - was_last_statement_inside_true_branch_return = - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; - } + was_last_statement_inside_true_branch_return = + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; + } - if (was_last_statement_inside_true_branch_return) - { - //restore_state(ctx, 0); - //if (p_object_compared_with_not_null) - //{ - //do {} while (p); - // p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - //} - } - else - { - //do { } while (p); + if (was_last_statement_inside_true_branch_return) + { + //restore_state(ctx, 0); + //if (p_object_compared_with_not_null) + //{ + //do {} while (p); + // p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + //} + } + else + { + //do { } while (p); - if (p_object_compared_with_not_null) - { - p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - } - } - } + if (p_object_compared_with_not_null) + { + p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + } + } + } } static void flow_visit_while_statement(struct flow_visit_ctx* ctx, struct iteration_statement* p_iteration_statement) { - assert(p_iteration_statement->first_token->type == TK_KEYWORD_WHILE); - - struct object* p_object_compared_with_not_null = NULL; - - if (p_iteration_statement->expression1) - { - p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_iteration_statement->expression1); - flow_visit_expression(ctx, p_iteration_statement->expression1); - } - - if (p_iteration_statement->secondary_block) - { - const int original = 1; - push_copy_of_current_state(ctx); - - const int current = 0; - - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_iteration_statement = p_iteration_statement; - - if (p_object_compared_with_not_null) - { - //while (p != 0) { p is not null } - p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; - } - - flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); - - check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); - - - bool was_last_statement_inside_true_branch_return = false; - if (ctx->p_last_jump_statement) - { - //TODO gotos etc... - was_last_statement_inside_true_branch_return = - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN; - } - - if (was_last_statement_inside_true_branch_return) - { - restore_state(ctx, original); - //if (p_object_compared_with_not_null) - //{ - /* - while (p) - { - return; - } - */ - // p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - //} - } - else - { - /* - while (p) - { - } - */ - //merge_if_else_states(ctx, current, current, original, -1 /*nothing*/); - merge_states(ctx, current, original, current); - if (p_object_compared_with_not_null) - { - p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - } - } - pop_states(ctx, 1); - flow_visit_ctx_pop_tail_block(ctx); - } + assert(p_iteration_statement->first_token->type == TK_KEYWORD_WHILE); + + struct object* p_object_compared_with_not_null = NULL; + + if (p_iteration_statement->expression1) + { + p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_iteration_statement->expression1); + flow_visit_expression(ctx, p_iteration_statement->expression1); + } + + if (p_iteration_statement->secondary_block) + { + const int original = 1; + push_copy_of_current_state(ctx); + + const int current = 0; + + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_iteration_statement = p_iteration_statement; + + if (p_object_compared_with_not_null) + { + //while (p != 0) { p is not null } + p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; + } + + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + + check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); + + + bool was_last_statement_inside_true_branch_return = false; + if (ctx->p_last_jump_statement) + { + //TODO gotos etc... + was_last_statement_inside_true_branch_return = + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN; + } + + if (was_last_statement_inside_true_branch_return) + { + restore_state(ctx, original); + //if (p_object_compared_with_not_null) + //{ + /* + while (p) + { + return; + } + */ + // p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + //} + } + else + { + /* + while (p) + { + } + */ + //merge_if_else_states(ctx, current, current, original, -1 /*nothing*/); + merge_states(ctx, current, original, current); + if (p_object_compared_with_not_null) + { + p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + } + } + pop_states(ctx, 1); + flow_visit_ctx_pop_tail_block(ctx); + } } static void flow_visit_for_statement(struct flow_visit_ctx* ctx, struct iteration_statement* p_iteration_statement) { - assert(p_iteration_statement->first_token->type == TK_KEYWORD_FOR); + assert(p_iteration_statement->first_token->type == TK_KEYWORD_FOR); - struct object* p_object_compared_with_not_null = NULL; - if (p_iteration_statement->expression0) - { - flow_visit_expression(ctx, p_iteration_statement->expression0); - } + if (p_iteration_statement->expression0) + { + flow_visit_expression(ctx, p_iteration_statement->expression0); + } - if (p_iteration_statement->expression1) - { - flow_visit_expression(ctx, p_iteration_statement->expression1); - } - if (p_iteration_statement->expression2) - { - flow_visit_expression(ctx, p_iteration_statement->expression2); - } + if (p_iteration_statement->expression1) + { + flow_visit_expression(ctx, p_iteration_statement->expression1); + } + if (p_iteration_statement->expression2) + { + flow_visit_expression(ctx, p_iteration_statement->expression2); + } - if (p_iteration_statement->secondary_block) - { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_iteration_statement = p_iteration_statement; - flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); - check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); - flow_visit_ctx_pop_tail_block(ctx); - } + if (p_iteration_statement->secondary_block) + { + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_iteration_statement = p_iteration_statement; + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); + flow_visit_ctx_pop_tail_block(ctx); + } } static void flow_visit_iteration_statement(struct flow_visit_ctx* ctx, struct iteration_statement* p_iteration_statement) { - switch (p_iteration_statement->first_token->type) - { - case TK_KEYWORD_WHILE: - flow_visit_while_statement(ctx, p_iteration_statement); - break; - case TK_KEYWORD_DO: - flow_visit_do_while_statement(ctx, p_iteration_statement); - break; - case TK_KEYWORD_FOR: - flow_visit_for_statement(ctx, p_iteration_statement); - break; - default: - assert(false); - break; - } + switch (p_iteration_statement->first_token->type) + { + case TK_KEYWORD_WHILE: + flow_visit_while_statement(ctx, p_iteration_statement); + break; + case TK_KEYWORD_DO: + flow_visit_do_while_statement(ctx, p_iteration_statement); + break; + case TK_KEYWORD_FOR: + flow_visit_for_statement(ctx, p_iteration_statement); + break; + default: + assert(false); + break; + } } static void flow_visit_jump_statement(struct flow_visit_ctx* ctx, struct jump_statement* p_jump_statement) { - ctx->p_last_jump_statement = p_jump_statement; - - - if (p_jump_statement->first_token->type == TK_KEYWORD_THROW) - { - check_all_defer_until_try(ctx, ctx->tail_block, p_jump_statement->first_token); - } - else if (p_jump_statement->first_token->type == TK_KEYWORD_RETURN) - { - if (p_jump_statement->expression_opt) - { - flow_visit_expression(ctx, p_jump_statement->expression_opt); - } - - /* - returning a declarator will move the onwership - */ - if (p_jump_statement->expression_opt) - { - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_jump_statement->expression_opt, &type); - bool bool_source_zero_value = constant_value_is_valid(&p_jump_statement->expression_opt->constant_value) && - constant_value_to_ull(&p_jump_statement->expression_opt->constant_value) == 0; - - - checked_read_object(ctx->ctx, - &type, - p_object, - p_jump_statement->expression_opt->first_token, - true); - - object_assignment(ctx->ctx, - p_object, /*source*/ - &type, /*source type*/ - NULL, /*dest object*/ - ctx->p_return_type, /*dest type*/ - p_jump_statement->expression_opt->first_token, - bool_source_zero_value, - OBJECT_STATE_UNINITIALIZED); - - type_destroy(&type); - - } - check_all_defer_until_end(ctx, ctx->tail_block, p_jump_statement->first_token); - } - else if (p_jump_statement->first_token->type == TK_KEYWORD_CONTINUE) - { - check_all_defer_until_iter(ctx, ctx->tail_block, p_jump_statement->first_token); - } - else if (p_jump_statement->first_token->type == TK_KEYWORD_BREAK) - { - check_all_defer_until_iteration_or_selection_statement(ctx, ctx->tail_block, p_jump_statement->first_token); - } - else if (p_jump_statement->first_token->type == TK_KEYWORD_GOTO) - { - check_all_defer_until_label(ctx, ctx->tail_block, p_jump_statement->label->lexeme, p_jump_statement->first_token); - - //set_all_until_end(ctx, ctx->tail_block, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); - } - else - { - assert(false); - } + ctx->p_last_jump_statement = p_jump_statement; + + + if (p_jump_statement->first_token->type == TK_KEYWORD_THROW) + { + check_all_defer_until_try(ctx, ctx->tail_block, p_jump_statement->first_token); + } + else if (p_jump_statement->first_token->type == TK_KEYWORD_RETURN) + { + if (p_jump_statement->expression_opt) + { + flow_visit_expression(ctx, p_jump_statement->expression_opt); + } + + /* + returning a declarator will move the onwership + */ + if (p_jump_statement->expression_opt) + { + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_jump_statement->expression_opt, &type); + bool bool_source_zero_value = constant_value_is_valid(&p_jump_statement->expression_opt->constant_value) && + constant_value_to_ull(&p_jump_statement->expression_opt->constant_value) == 0; + + + checked_read_object(ctx->ctx, + &type, + p_object, + p_jump_statement->expression_opt->first_token, + true); + + object_assignment(ctx->ctx, + p_object, /*source*/ + &type, /*source type*/ + NULL, /*dest object*/ + ctx->p_return_type, /*dest type*/ + p_jump_statement->expression_opt->first_token, + bool_source_zero_value, + OBJECT_STATE_UNINITIALIZED); + + type_destroy(&type); + + } + check_all_defer_until_end(ctx, ctx->tail_block, p_jump_statement->first_token); + } + else if (p_jump_statement->first_token->type == TK_KEYWORD_CONTINUE) + { + check_all_defer_until_iter(ctx, ctx->tail_block, p_jump_statement->first_token); + } + else if (p_jump_statement->first_token->type == TK_KEYWORD_BREAK) + { + check_all_defer_until_iteration_or_selection_statement(ctx, ctx->tail_block, p_jump_statement->first_token); + } + else if (p_jump_statement->first_token->type == TK_KEYWORD_GOTO) + { + check_all_defer_until_label(ctx, ctx->tail_block, p_jump_statement->label->lexeme, p_jump_statement->first_token); + + //set_all_until_end(ctx, ctx->tail_block, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); + } + else + { + assert(false); + } } static void flow_visit_label(struct flow_visit_ctx* ctx, struct label* p_label); static void flow_visit_labeled_statement(struct flow_visit_ctx* ctx, struct labeled_statement* p_labeled_statement) { - if (p_labeled_statement->label) - { - flow_visit_label(ctx, p_labeled_statement->label); - } + if (p_labeled_statement->label) + { + flow_visit_label(ctx, p_labeled_statement->label); + } - if (p_labeled_statement->statement) - { - flow_visit_statement(ctx, p_labeled_statement->statement); - } + if (p_labeled_statement->statement) + { + flow_visit_statement(ctx, p_labeled_statement->statement); + } } static void flow_visit_primary_block(struct flow_visit_ctx* ctx, struct primary_block* p_primary_block) { - if (p_primary_block->defer_statement) - { - flow_visit_defer_statement(ctx, p_primary_block->defer_statement); - } - else - { - if (p_primary_block->compound_statement) - { - flow_visit_compound_statement(ctx, p_primary_block->compound_statement); - } - else if (p_primary_block->iteration_statement) - { - flow_visit_iteration_statement(ctx, p_primary_block->iteration_statement); - } - else if (p_primary_block->selection_statement) - { - flow_visit_selection_statement(ctx, p_primary_block->selection_statement); - } - else if (p_primary_block->try_statement) - { - flow_visit_try_statement(ctx, p_primary_block->try_statement); - } - } + if (p_primary_block->defer_statement) + { + flow_visit_defer_statement(ctx, p_primary_block->defer_statement); + } + else + { + if (p_primary_block->compound_statement) + { + flow_visit_compound_statement(ctx, p_primary_block->compound_statement); + } + else if (p_primary_block->iteration_statement) + { + flow_visit_iteration_statement(ctx, p_primary_block->iteration_statement); + } + else if (p_primary_block->selection_statement) + { + flow_visit_selection_statement(ctx, p_primary_block->selection_statement); + } + else if (p_primary_block->try_statement) + { + flow_visit_try_statement(ctx, p_primary_block->try_statement); + } + } } static void flow_visit_unlabeled_statement(struct flow_visit_ctx* ctx, struct unlabeled_statement* p_unlabeled_statement) { - ctx->p_last_jump_statement = NULL; - if (p_unlabeled_statement->primary_block) - { - flow_visit_primary_block(ctx, p_unlabeled_statement->primary_block); - } - else if (p_unlabeled_statement->expression_statement) - { - flow_visit_expression_statement(ctx, p_unlabeled_statement->expression_statement); - } - else if (p_unlabeled_statement->jump_statement) - { - flow_visit_jump_statement(ctx, p_unlabeled_statement->jump_statement); - } - else - { - assert(false); - } + ctx->p_last_jump_statement = NULL; + if (p_unlabeled_statement->primary_block) + { + flow_visit_primary_block(ctx, p_unlabeled_statement->primary_block); + } + else if (p_unlabeled_statement->expression_statement) + { + flow_visit_expression_statement(ctx, p_unlabeled_statement->expression_statement); + } + else if (p_unlabeled_statement->jump_statement) + { + flow_visit_jump_statement(ctx, p_unlabeled_statement->jump_statement); + } + else + { + assert(false); + } } static void flow_visit_statement(struct flow_visit_ctx* ctx, struct statement* p_statement) { - ctx->p_last_jump_statement = NULL; + ctx->p_last_jump_statement = NULL; - if (p_statement->labeled_statement) - { - flow_visit_labeled_statement(ctx, p_statement->labeled_statement); - } - else if (p_statement->unlabeled_statement) - { - flow_visit_unlabeled_statement(ctx, p_statement->unlabeled_statement); - } + if (p_statement->labeled_statement) + { + flow_visit_labeled_statement(ctx, p_statement->labeled_statement); + } + else if (p_statement->unlabeled_statement) + { + flow_visit_unlabeled_statement(ctx, p_statement->unlabeled_statement); + } } static void flow_visit_label(struct flow_visit_ctx* ctx, struct label* p_label) @@ -2039,442 +2056,452 @@ static void flow_visit_label(struct flow_visit_ctx* ctx, struct label* p_label) static void flow_visit_block_item(struct flow_visit_ctx* ctx, struct block_item* p_block_item) { - ctx->p_last_jump_statement = NULL; - if (p_block_item->declaration) - { - flow_visit_declaration(ctx, p_block_item->declaration); - } - else if (p_block_item->unlabeled_statement) - { - flow_visit_unlabeled_statement(ctx, p_block_item->unlabeled_statement); - } - else if (p_block_item->label) - { - flow_visit_label(ctx, p_block_item->label); - } + ctx->p_last_jump_statement = NULL; + if (p_block_item->declaration) + { + flow_visit_declaration(ctx, p_block_item->declaration); + } + else if (p_block_item->unlabeled_statement) + { + flow_visit_unlabeled_statement(ctx, p_block_item->unlabeled_statement); + } + else if (p_block_item->label) + { + flow_visit_label(ctx, p_block_item->label); + } } static void flow_visit_block_item_list(struct flow_visit_ctx* ctx, struct block_item_list* p_block_item_list) { - struct block_item* p_block_item = p_block_item_list->head; - while (p_block_item) - { - flow_visit_block_item(ctx, p_block_item); - p_block_item = p_block_item->next; - } + struct block_item* p_block_item = p_block_item_list->head; + while (p_block_item) + { + flow_visit_block_item(ctx, p_block_item); + p_block_item = p_block_item->next; + } } enum object_state parse_string_state(const char* s, bool* invalid) { - *invalid = false; - - enum object_state e = 0; - const char* p = s; - - while (*p) - { - if (isalpha(*p)) - { - const char* start = p; - while (isalpha(*p) || *p == '-') - { - p++; - } - - if (strncmp(start, "moved", p - start) == 0) - e |= OBJECT_STATE_MOVED; - else if (strncmp(start, "null", p - start) == 0) - e |= OBJECT_STATE_NULL; - else if (strncmp(start, "not-null", p - start) == 0) - e |= OBJECT_STATE_NOT_NULL; - else if (strncmp(start, "maybe-null", p - start) == 0) - e |= (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL); - else if (strncmp(start, "uninitialized", p - start) == 0) - e |= OBJECT_STATE_UNINITIALIZED; - else if (strncmp(start, "zero", p - start) == 0) - e |= OBJECT_STATE_ZERO; - else if (strncmp(start, "not-zero", p - start) == 0) - e |= OBJECT_STATE_NOT_ZERO; - else if (strncmp(start, "any", p - start) == 0) - e |= (OBJECT_STATE_NOT_ZERO | OBJECT_STATE_ZERO); - else if (strncmp(start, "moved", p - start) == 0) - e |= OBJECT_STATE_MOVED; - else if (strncmp(start, "or", p - start) == 0) - { - //skiped - } - else - { - *invalid = true; - return 0; //error invalid name - } - } - else - { - p++; - } - } - - return e; + *invalid = false; + + enum object_state e = 0; + const char* p = s; + + while (*p) + { + if (isalpha(*p)) + { + const char* start = p; + while (isalpha(*p) || *p == '-') + { + p++; + } + + if (strncmp(start, "moved", p - start) == 0) + e |= OBJECT_STATE_MOVED; + else if (strncmp(start, "null", p - start) == 0) + e |= OBJECT_STATE_NULL; + else if (strncmp(start, "not-null", p - start) == 0) + e |= OBJECT_STATE_NOT_NULL; + else if (strncmp(start, "maybe-null", p - start) == 0) + e |= (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL); + else if (strncmp(start, "uninitialized", p - start) == 0) + e |= OBJECT_STATE_UNINITIALIZED; + else if (strncmp(start, "zero", p - start) == 0) + e |= OBJECT_STATE_ZERO; + else if (strncmp(start, "not-zero", p - start) == 0) + e |= OBJECT_STATE_NOT_ZERO; + else if (strncmp(start, "any", p - start) == 0) + e |= (OBJECT_STATE_NOT_ZERO | OBJECT_STATE_ZERO); + else if (strncmp(start, "moved", p - start) == 0) + e |= OBJECT_STATE_MOVED; + else if (strncmp(start, "or", p - start) == 0) + { + //skiped + } + else + { + *invalid = true; + return 0; //error invalid name + } + } + else + { + p++; + } + } + + return e; } static void flow_visit_static_assert_declaration(struct flow_visit_ctx* ctx, struct static_assert_declaration* p_static_assert_declaration) { - flow_visit_expression(ctx, p_static_assert_declaration->constant_expression); - - if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_DEBUG) - { - compiler_set_info_with_token(W_NONE, ctx->ctx, p_static_assert_declaration->first_token, "static_debug"); - - struct type t = { 0 }; - struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); - - - - if (p_obj) - { - print_object(&t, p_obj, true); - } - - type_destroy(&t); - } - else if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_STATE) - { - struct type t = { 0 }; - struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); - if (p_obj) - { - if (p_static_assert_declaration->string_literal_opt) - { - bool is_invalid = false; - enum object_state e = - parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); - if (!is_invalid) - { - if (e != p_obj->state) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "static_state failed"); - } - } - else - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); - } - } - - } - type_destroy(&t); - } - else if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_SET) - { - struct type t = { 0 }; - struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); - if (p_obj) - { - if (p_static_assert_declaration->string_literal_opt) - { - - const char* lexeme = - p_static_assert_declaration->string_literal_opt->lexeme; - - if (strcmp(lexeme, "\"zero\"") == 0) - { - //gives the semantics of {0} or calloc - set_direct_state(&t, p_obj, OBJECT_STATE_ZERO); - } - else - { - bool is_invalid = false; - enum object_state e = - parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); - - if (!is_invalid) - { - set_object(&t, p_obj, e); - } - else - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); - } - } - } - - } - type_destroy(&t); - } + const bool t2 = ctx->expression_is_not_evaluated; + ctx->expression_is_not_evaluated = true; + + flow_visit_expression(ctx, p_static_assert_declaration->constant_expression); + + ctx->expression_is_not_evaluated = t2; //restore + + + if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_DEBUG) + { + compiler_diagnostic_message(W_NOTE, ctx->ctx, p_static_assert_declaration->first_token, "static_debug"); + + struct type t = { 0 }; + struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); + + + + if (p_obj) + { + print_object(&t, p_obj, true); + } + + type_destroy(&t); + } + else if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_STATE) + { + /*TODO + check state + + */ + struct type t = { 0 }; + struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); + if (p_obj) + { + if (p_static_assert_declaration->string_literal_opt) + { + bool is_invalid = false; + enum object_state e = + parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); + if (!is_invalid) + { + if (e != p_obj->state) + { + compiler_diagnostic_message(ERROR_STATIC_STATE_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "static_state failed"); + } + } + else + { + compiler_diagnostic_message(ERROR_STATIC_STATE_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); + } + } + + } + type_destroy(&t); + } + else if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_SET) + { + struct type t = { 0 }; + struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); + if (p_obj) + { + if (p_static_assert_declaration->string_literal_opt) + { + + const char* lexeme = + p_static_assert_declaration->string_literal_opt->lexeme; + + if (strcmp(lexeme, "\"zero\"") == 0) + { + //gives the semantics of {0} or calloc + set_direct_state(&t, p_obj, OBJECT_STATE_ZERO); + } + else + { + bool is_invalid = false; + enum object_state e = + parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); + + if (!is_invalid) + { + set_object(&t, p_obj, e); + } + else + { + compiler_diagnostic_message(ERROR_STATIC_ASSERT_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); + } + } + } + + } + type_destroy(&t); + } } static void flow_visit_declaration_specifiers(struct flow_visit_ctx* ctx, - struct declaration_specifiers* p_declaration_specifiers, - struct type* p_type); + struct declaration_specifiers* p_declaration_specifiers, + struct type* p_type); static void flow_visit_direct_declarator(struct flow_visit_ctx* ctx, struct direct_declarator* p_direct_declarator) { - if (p_direct_declarator->function_declarator) - { - struct parameter_declaration* parameter = NULL; + if (p_direct_declarator->function_declarator) + { + struct parameter_declaration* parameter = NULL; - if (p_direct_declarator->function_declarator->parameter_type_list_opt) - { - parameter = p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; - } + if (p_direct_declarator->function_declarator->parameter_type_list_opt) + { + parameter = p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; + } - ctx->parameter_list++; + ctx->parameter_list++; - while (parameter) - { - if (parameter->attribute_specifier_sequence_opt) - { - flow_visit_attribute_specifier_sequence(ctx, parameter->attribute_specifier_sequence_opt); - } + while (parameter) + { + if (parameter->attribute_specifier_sequence_opt) + { + flow_visit_attribute_specifier_sequence(ctx, parameter->attribute_specifier_sequence_opt); + } - flow_visit_declaration_specifiers(ctx, parameter->declaration_specifiers, ¶meter->declarator->type); - flow_visit_declarator(ctx, parameter->declarator); - parameter = parameter->next; - } + flow_visit_declaration_specifiers(ctx, parameter->declaration_specifiers, ¶meter->declarator->type); + flow_visit_declarator(ctx, parameter->declarator); + parameter = parameter->next; + } - ctx->parameter_list--; + ctx->parameter_list--; - } - else if (p_direct_declarator->array_declarator) - { - if (p_direct_declarator->array_declarator->assignment_expression) - { - flow_visit_expression(ctx, p_direct_declarator->array_declarator->assignment_expression); - } + } + else if (p_direct_declarator->array_declarator) + { + if (p_direct_declarator->array_declarator->assignment_expression) + { + flow_visit_expression(ctx, p_direct_declarator->array_declarator->assignment_expression); + } - } + } } static void flow_visit_declarator(struct flow_visit_ctx* ctx, struct declarator* p_declarator) { - if (ctx->tail_block && - p_declarator->type.category != TYPE_CATEGORY_FUNCTION) - { - - if (ctx->parameter_list > 1) - { - /* - The objective here is to avoid including the arguments - of function pointers inside the scope. - Sample - void x_destroy(void (*f)(void * owner p)) - We add f but not p. - */ - return; - } - - struct flow_defer_scope* p_defer = flow_visit_ctx_push_child(ctx); - p_defer->declarator = p_declarator; - - - struct object temp = make_object(&p_declarator->type, p_declarator); - object_swap(&temp, &p_declarator->object); - object_destroy(&temp); - - if (p_declarator->declaration_specifiers && - p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) - { - if (type_is_pointer(&p_declarator->type)) - { - if (!ctx->ctx->options.null_checks || - (p_declarator->type.type_qualifier_flags & TYPE_QUALIFIER_OPT)) - { - set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); - } - else - { - set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL)); - } - } - else - { - set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); - } + if (ctx->tail_block && + p_declarator->type.category != TYPE_CATEGORY_FUNCTION) + { + + if (ctx->parameter_list > 1) + { + /* + The objective here is to avoid including the arguments + of function pointers inside the scope. + Sample + void x_destroy(void (*f)(void * owner p)) + We add f but not p. + */ + return; + } + + struct flow_defer_scope* p_defer = flow_visit_ctx_push_child(ctx); + p_defer->declarator = p_declarator; + + + struct object temp = make_object(&p_declarator->type, p_declarator); + object_swap(&temp, &p_declarator->object); + object_destroy(&temp); + + if (p_declarator->declaration_specifiers && + p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) + { + if (type_is_pointer(&p_declarator->type)) + { + if (!ctx->ctx->options.null_checks || + (p_declarator->type.type_qualifier_flags & TYPE_QUALIFIER_OPT)) + { + set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); + } + else + { + set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL)); + } + } + else + { + set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); + } #if 0 - if (type_is_pointer(&p_declarator->type)) - { - //TODO necessary? - struct type t2 = type_remove_pointer(&p_declarator->type); - if (p_declarator->object.pointed) - { - set_object(&t2, p_declarator->object.pointed, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); - } - type_destroy(&t2); - } + if (type_is_pointer(&p_declarator->type)) + { + //TODO necessary? + struct type t2 = type_remove_pointer(&p_declarator->type); + if (p_declarator->object.pointed) + { + set_object(&t2, p_declarator->object.pointed, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); + } + type_destroy(&t2); + } #endif - } - } + } + } - /*if (p_declarator->pointer) - { - struct pointer* p = p_declarator->pointer; - while (p) - { - p = p->pointer; - } - }*/ + /*if (p_declarator->pointer) + { + struct pointer* p = p_declarator->pointer; + while (p) + { + p = p->pointer; + } + }*/ - if (p_declarator->direct_declarator) - { - flow_visit_direct_declarator(ctx, p_declarator->direct_declarator); - } + if (p_declarator->direct_declarator) + { + flow_visit_direct_declarator(ctx, p_declarator->direct_declarator); + } } static void flow_visit_init_declarator_list(struct flow_visit_ctx* ctx, struct init_declarator_list* p_init_declarator_list) { - struct init_declarator* p_init_declarator = p_init_declarator_list->head; - - while (p_init_declarator) - { - if (p_init_declarator->p_declarator) - { - flow_visit_declarator(ctx, p_init_declarator->p_declarator); - } - - if (p_init_declarator->initializer) - { - if (p_init_declarator->initializer->assignment_expression) - { - flow_visit_expression(ctx, p_init_declarator->initializer->assignment_expression); - } - else - { - assert(p_init_declarator->initializer->braced_initializer != NULL); - if (p_init_declarator->initializer->braced_initializer) - { - flow_visit_bracket_initializer_list(ctx, - p_init_declarator->initializer->braced_initializer); - - //set zero - } - } - } - - if (p_init_declarator->p_declarator->type.category != TYPE_CATEGORY_FUNCTION) - { - if (p_init_declarator->initializer && - p_init_declarator->initializer->assignment_expression) - { - struct type right_object_type = { 0 }; - struct object* p_right_object = - expression_get_object(p_init_declarator->initializer->assignment_expression, &right_object_type); - - bool bool_source_zero_value = constant_value_is_valid(&p_init_declarator->initializer->assignment_expression->constant_value) && - constant_value_to_ull(&p_init_declarator->initializer->assignment_expression->constant_value) == 0; - - - //cast? - if (p_init_declarator->initializer->assignment_expression->expression_type == POSTFIX_FUNCTION_CALL && - p_init_declarator->initializer->assignment_expression->left && - p_init_declarator->initializer->assignment_expression->left->declarator && - p_init_declarator->initializer->assignment_expression->left->declarator->name) - { - if (strcmp(p_init_declarator->initializer->assignment_expression->left->declarator->name->lexeme, "calloc") == 0) - { - p_init_declarator->p_declarator->object.state = OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL; - - if (p_init_declarator->p_declarator->object.pointed) - { - struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); - set_direct_state(&t, p_init_declarator->p_declarator->object.pointed, OBJECT_STATE_ZERO); - type_destroy(&t); - } - } - else if (strcmp(p_init_declarator->initializer->assignment_expression->left->declarator->name->lexeme, "malloc") == 0) - { - p_init_declarator->p_declarator->object.state = OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL; - - struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); - set_direct_state(&t, p_init_declarator->p_declarator->object.pointed, OBJECT_STATE_UNINITIALIZED); - type_destroy(&t); - } - else - { - const struct token* const token_position = - p_init_declarator->p_declarator->name ? - p_init_declarator->p_declarator->name : - p_init_declarator->p_declarator->first_token - ; - - object_assignment(ctx->ctx, p_right_object, &right_object_type, - &p_init_declarator->p_declarator->object, - &p_init_declarator->p_declarator->type, - token_position, - bool_source_zero_value, - OBJECT_STATE_MOVED); - } - } - else - { - const struct token* const token_position = - p_init_declarator->p_declarator->name ? - p_init_declarator->p_declarator->name : - p_init_declarator->p_declarator->first_token - ; - - object_assignment(ctx->ctx, p_right_object, &right_object_type, - &p_init_declarator->p_declarator->object, - &p_init_declarator->p_declarator->type, - token_position, - bool_source_zero_value, - OBJECT_STATE_MOVED); - } - - type_destroy(&right_object_type); - } - else if (p_init_declarator->initializer && - p_init_declarator->initializer->braced_initializer) - { - bool is_zero_initialized = false; - if (p_init_declarator->initializer->braced_initializer->initializer_list == NULL) - { - is_zero_initialized = true; - } - else - { - if (p_init_declarator->initializer->braced_initializer->initializer_list->size == 1 && - p_init_declarator->initializer->braced_initializer->initializer_list->head->assignment_expression) - { - struct constant_value* p_constant_value = - &p_init_declarator->initializer->braced_initializer->initializer_list->head->assignment_expression->constant_value; - - if (constant_value_is_valid(p_constant_value) && - constant_value_to_ull(p_constant_value) == 0) - { - is_zero_initialized = true; - } - - } - } - - if (is_zero_initialized) - { - set_direct_state(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, OBJECT_STATE_ZERO); - } - else - { - set_direct_state(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, OBJECT_STATE_ZERO); - } - } - else - { - set_object(&p_init_declarator->p_declarator->type, - &p_init_declarator->p_declarator->object, - OBJECT_STATE_UNINITIALIZED); - } - } - - p_init_declarator = p_init_declarator->next; - } + struct init_declarator* p_init_declarator = p_init_declarator_list->head; + + while (p_init_declarator) + { + if (p_init_declarator->p_declarator) + { + flow_visit_declarator(ctx, p_init_declarator->p_declarator); + } + + if (p_init_declarator->initializer) + { + if (p_init_declarator->initializer->assignment_expression) + { + flow_visit_expression(ctx, p_init_declarator->initializer->assignment_expression); + } + else + { + assert(p_init_declarator->initializer->braced_initializer != NULL); + if (p_init_declarator->initializer->braced_initializer) + { + flow_visit_bracket_initializer_list(ctx, + p_init_declarator->initializer->braced_initializer); + + //set zero + } + } + } + + if (p_init_declarator->p_declarator->type.category != TYPE_CATEGORY_FUNCTION) + { + if (p_init_declarator->initializer && + p_init_declarator->initializer->assignment_expression) + { + struct type right_object_type = { 0 }; + struct object* p_right_object = + expression_get_object(p_init_declarator->initializer->assignment_expression, &right_object_type); + + bool bool_source_zero_value = constant_value_is_valid(&p_init_declarator->initializer->assignment_expression->constant_value) && + constant_value_to_ull(&p_init_declarator->initializer->assignment_expression->constant_value) == 0; + + + //cast? + if (p_init_declarator->initializer->assignment_expression->expression_type == POSTFIX_FUNCTION_CALL && + p_init_declarator->initializer->assignment_expression->left && + p_init_declarator->initializer->assignment_expression->left->declarator && + p_init_declarator->initializer->assignment_expression->left->declarator->name) + { + if (strcmp(p_init_declarator->initializer->assignment_expression->left->declarator->name->lexeme, "calloc") == 0) + { + p_init_declarator->p_declarator->object.state = OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL; + + if (p_init_declarator->p_declarator->object.pointed) + { + struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); + set_direct_state(&t, p_init_declarator->p_declarator->object.pointed, OBJECT_STATE_ZERO); + type_destroy(&t); + } + } + else if (strcmp(p_init_declarator->initializer->assignment_expression->left->declarator->name->lexeme, "malloc") == 0) + { + p_init_declarator->p_declarator->object.state = OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL; + + struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); + set_direct_state(&t, p_init_declarator->p_declarator->object.pointed, OBJECT_STATE_UNINITIALIZED); + type_destroy(&t); + } + else + { + const struct token* const token_position = + p_init_declarator->p_declarator->name ? + p_init_declarator->p_declarator->name : + p_init_declarator->p_declarator->first_token + ; + + object_assignment(ctx->ctx, p_right_object, &right_object_type, + &p_init_declarator->p_declarator->object, + &p_init_declarator->p_declarator->type, + token_position, + bool_source_zero_value, + OBJECT_STATE_MOVED); + } + } + else + { + const struct token* const token_position = + p_init_declarator->p_declarator->name ? + p_init_declarator->p_declarator->name : + p_init_declarator->p_declarator->first_token + ; + + object_assignment(ctx->ctx, p_right_object, &right_object_type, + &p_init_declarator->p_declarator->object, + &p_init_declarator->p_declarator->type, + token_position, + bool_source_zero_value, + OBJECT_STATE_MOVED); + } + + type_destroy(&right_object_type); + } + else if (p_init_declarator->initializer && + p_init_declarator->initializer->braced_initializer) + { + bool is_zero_initialized = false; + if (p_init_declarator->initializer->braced_initializer->initializer_list == NULL) + { + is_zero_initialized = true; + } + else + { + if (p_init_declarator->initializer->braced_initializer->initializer_list->size == 1 && + p_init_declarator->initializer->braced_initializer->initializer_list->head->assignment_expression) + { + struct constant_value* p_constant_value = + &p_init_declarator->initializer->braced_initializer->initializer_list->head->assignment_expression->constant_value; + + if (constant_value_is_valid(p_constant_value) && + constant_value_to_ull(p_constant_value) == 0) + { + is_zero_initialized = true; + } + + } + } + + if (is_zero_initialized) + { + set_direct_state(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, OBJECT_STATE_ZERO); + } + else + { + set_direct_state(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, OBJECT_STATE_ZERO); + } + } + else + { + set_object(&p_init_declarator->p_declarator->type, + &p_init_declarator->p_declarator->object, + OBJECT_STATE_UNINITIALIZED); + } + } + + p_init_declarator = p_init_declarator->next; + } @@ -2482,46 +2509,46 @@ static void flow_visit_init_declarator_list(struct flow_visit_ctx* ctx, struct i static void flow_visit_member_declarator(struct flow_visit_ctx* ctx, struct member_declarator* p_member_declarator) { - if (p_member_declarator->declarator) - { - flow_visit_declarator(ctx, p_member_declarator->declarator); - } + if (p_member_declarator->declarator) + { + flow_visit_declarator(ctx, p_member_declarator->declarator); + } } static void flow_visit_member_declarator_list(struct flow_visit_ctx* ctx, struct member_declarator_list* p_member_declarator_list) { - struct member_declarator* p_member_declarator = p_member_declarator_list->head; - while (p_member_declarator) - { - flow_visit_member_declarator(ctx, p_member_declarator); - p_member_declarator = p_member_declarator->next; - } + struct member_declarator* p_member_declarator = p_member_declarator_list->head; + while (p_member_declarator) + { + flow_visit_member_declarator(ctx, p_member_declarator); + p_member_declarator = p_member_declarator->next; + } } static void flow_visit_member_declaration(struct flow_visit_ctx* ctx, struct member_declaration* p_member_declaration) { - if (p_member_declaration->member_declarator_list_opt) - { - flow_visit_specifier_qualifier_list(ctx, - p_member_declaration->specifier_qualifier_list, - &p_member_declaration->member_declarator_list_opt->head->declarator->type); /*se nao tem?*/ - } + if (p_member_declaration->member_declarator_list_opt) + { + flow_visit_specifier_qualifier_list(ctx, + p_member_declaration->specifier_qualifier_list, + &p_member_declaration->member_declarator_list_opt->head->declarator->type); /*se nao tem?*/ + } - if (p_member_declaration->member_declarator_list_opt) - { - flow_visit_member_declarator_list(ctx, p_member_declaration->member_declarator_list_opt); - } + if (p_member_declaration->member_declarator_list_opt) + { + flow_visit_member_declarator_list(ctx, p_member_declaration->member_declarator_list_opt); + } } static void flow_visit_member_declaration_list(struct flow_visit_ctx* ctx, struct member_declaration_list* p_member_declaration_list) { - struct member_declaration* p_member_declaration = - p_member_declaration_list->head; - while (p_member_declaration) - { - flow_visit_member_declaration(ctx, p_member_declaration); - p_member_declaration = p_member_declaration->next; - } + struct member_declaration* p_member_declaration = + p_member_declaration_list->head; + while (p_member_declaration) + { + flow_visit_member_declaration(ctx, p_member_declaration); + p_member_declaration = p_member_declaration->next; + } } static void flow_visit_attribute_specifier(struct flow_visit_ctx* ctx, struct attribute_specifier* p_attribute_specifier) @@ -2531,52 +2558,52 @@ static void flow_visit_attribute_specifier(struct flow_visit_ctx* ctx, struct at static void flow_visit_attribute_specifier_sequence(struct flow_visit_ctx* ctx, struct attribute_specifier_sequence* p_visit_attribute_specifier_sequence) { - struct attribute_specifier* current = p_visit_attribute_specifier_sequence->head; - while (current) - { - flow_visit_attribute_specifier(ctx, current); - current = current->next; - } + struct attribute_specifier* current = p_visit_attribute_specifier_sequence->head; + while (current) + { + flow_visit_attribute_specifier(ctx, current); + current = current->next; + } } static void flow_visit_struct_or_union_specifier(struct flow_visit_ctx* ctx, struct struct_or_union_specifier* p_struct_or_union_specifier) { - if (p_struct_or_union_specifier->attribute_specifier_sequence_opt) - flow_visit_attribute_specifier_sequence(ctx, p_struct_or_union_specifier->attribute_specifier_sequence_opt); + if (p_struct_or_union_specifier->attribute_specifier_sequence_opt) + flow_visit_attribute_specifier_sequence(ctx, p_struct_or_union_specifier->attribute_specifier_sequence_opt); - //struct struct_or_union_specifier* p_complete = get_complete_struct_or_union_specifier(p_struct_or_union_specifier); + //struct struct_or_union_specifier* p_complete = get_complete_struct_or_union_specifier(p_struct_or_union_specifier); - flow_visit_member_declaration_list(ctx, &p_struct_or_union_specifier->member_declaration_list); + flow_visit_member_declaration_list(ctx, &p_struct_or_union_specifier->member_declaration_list); } static void flow_visit_enumerator(struct flow_visit_ctx* ctx, struct enumerator* p_enumerator) { - if (p_enumerator->constant_expression_opt) - flow_visit_expression(ctx, p_enumerator->constant_expression_opt); + if (p_enumerator->constant_expression_opt) + flow_visit_expression(ctx, p_enumerator->constant_expression_opt); } static void flow_visit_enumerator_list(struct flow_visit_ctx* ctx, struct enumerator_list* p_enumerator_list) { - struct enumerator* current = p_enumerator_list->head; - while (current) - { - flow_visit_enumerator(ctx, current); - current = current->next; - } + struct enumerator* current = p_enumerator_list->head; + while (current) + { + flow_visit_enumerator(ctx, current); + current = current->next; + } } static void flow_visit_enum_specifier(struct flow_visit_ctx* ctx, struct enum_specifier* p_enum_specifier) { - if (p_enum_specifier->attribute_specifier_sequence_opt) - { - flow_visit_attribute_specifier_sequence(ctx, p_enum_specifier->attribute_specifier_sequence_opt); - } + if (p_enum_specifier->attribute_specifier_sequence_opt) + { + flow_visit_attribute_specifier_sequence(ctx, p_enum_specifier->attribute_specifier_sequence_opt); + } - flow_visit_enumerator_list(ctx, &p_enum_specifier->enumerator_list); + flow_visit_enumerator_list(ctx, &p_enum_specifier->enumerator_list); } static void flow_visit_typeof_specifier(struct flow_visit_ctx* ctx, struct typeof_specifier* p_typeof_specifier) @@ -2585,99 +2612,99 @@ static void flow_visit_typeof_specifier(struct flow_visit_ctx* ctx, struct typeo static void flow_visit_type_specifier(struct flow_visit_ctx* ctx, struct type_specifier* p_type_specifier) { - if (p_type_specifier->typeof_specifier) - { - flow_visit_typeof_specifier(ctx, p_type_specifier->typeof_specifier); - } + if (p_type_specifier->typeof_specifier) + { + flow_visit_typeof_specifier(ctx, p_type_specifier->typeof_specifier); + } - if (p_type_specifier->struct_or_union_specifier) - { - flow_visit_struct_or_union_specifier(ctx, p_type_specifier->struct_or_union_specifier); - } + if (p_type_specifier->struct_or_union_specifier) + { + flow_visit_struct_or_union_specifier(ctx, p_type_specifier->struct_or_union_specifier); + } - if (p_type_specifier->enum_specifier) - { - flow_visit_enum_specifier(ctx, p_type_specifier->enum_specifier); - } + if (p_type_specifier->enum_specifier) + { + flow_visit_enum_specifier(ctx, p_type_specifier->enum_specifier); + } - if (p_type_specifier->atomic_type_specifier) - { - //visit_deped(ctx, p_type_specifier->enum_specifier); - } + if (p_type_specifier->atomic_type_specifier) + { + //visit_deped(ctx, p_type_specifier->enum_specifier); + } } static void flow_visit_type_specifier_qualifier(struct flow_visit_ctx* ctx, struct type_specifier_qualifier* p_type_specifier_qualifier) { - if (p_type_specifier_qualifier->type_qualifier) - { - } - else if (p_type_specifier_qualifier->type_specifier) - { - flow_visit_type_specifier(ctx, p_type_specifier_qualifier->type_specifier); - } - else if (p_type_specifier_qualifier->alignment_specifier) - { - } + if (p_type_specifier_qualifier->type_qualifier) + { + } + else if (p_type_specifier_qualifier->type_specifier) + { + flow_visit_type_specifier(ctx, p_type_specifier_qualifier->type_specifier); + } + else if (p_type_specifier_qualifier->alignment_specifier) + { + } } static void flow_visit_storage_class_specifier(struct flow_visit_ctx* ctx, struct storage_class_specifier* p_storage_class_specifier) { - if (p_storage_class_specifier->flags & STORAGE_SPECIFIER_AUTO) - { + if (p_storage_class_specifier->flags & STORAGE_SPECIFIER_AUTO) + { - } + } } static void flow_visit_declaration_specifier(struct flow_visit_ctx* ctx, struct declaration_specifier* p_declaration_specifier) { - if (p_declaration_specifier->function_specifier) - { + if (p_declaration_specifier->function_specifier) + { - } + } - if (p_declaration_specifier->storage_class_specifier) - { - flow_visit_storage_class_specifier(ctx, p_declaration_specifier->storage_class_specifier); + if (p_declaration_specifier->storage_class_specifier) + { + flow_visit_storage_class_specifier(ctx, p_declaration_specifier->storage_class_specifier); - } + } - if (p_declaration_specifier->type_specifier_qualifier) - { - flow_visit_type_specifier_qualifier(ctx, p_declaration_specifier->type_specifier_qualifier); + if (p_declaration_specifier->type_specifier_qualifier) + { + flow_visit_type_specifier_qualifier(ctx, p_declaration_specifier->type_specifier_qualifier); - } + } } static void flow_visit_declaration_specifiers(struct flow_visit_ctx* ctx, - struct declaration_specifiers* p_declaration_specifiers, - struct type* p_type_opt) + struct declaration_specifiers* p_declaration_specifiers, + struct type* p_type_opt) { - /* - * Se tiver typeof ou auto vamos apagar todos type specifiers. - * e trocar por um novo - * const typeof(int (*)()) a; - //a = 1; - auto p = (const typeof(int (*)())) 0; + /* + * Se tiver typeof ou auto vamos apagar todos type specifiers. + * e trocar por um novo + * const typeof(int (*)()) a; + //a = 1; + auto p = (const typeof(int (*)())) 0; - TODO esconder os type spefiver e qualifider , esconder auto. - o resto tipo static deixar. + TODO esconder os type spefiver e qualifider , esconder auto. + o resto tipo static deixar. - */ - // + */ + // - struct declaration_specifier* p_declaration_specifier = p_declaration_specifiers->head; + struct declaration_specifier* p_declaration_specifier = p_declaration_specifiers->head; - while (p_declaration_specifier) - { - flow_visit_declaration_specifier(ctx, p_declaration_specifier); - p_declaration_specifier = p_declaration_specifier->next; - } + while (p_declaration_specifier) + { + flow_visit_declaration_specifier(ctx, p_declaration_specifier); + p_declaration_specifier = p_declaration_specifier->next; + } } /* @@ -2685,111 +2712,111 @@ static void flow_visit_declaration_specifiers(struct flow_visit_ctx* ctx, */ static bool flow_is_last_item_return(struct compound_statement* p_compound_statement) { - if (p_compound_statement && - p_compound_statement->block_item_list.tail && - p_compound_statement->block_item_list.tail->unlabeled_statement && - p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement && - p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement->first_token && - p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement->first_token->type == TK_KEYWORD_RETURN) - { - return true; - } - return false; + if (p_compound_statement && + p_compound_statement->block_item_list.tail && + p_compound_statement->block_item_list.tail->unlabeled_statement && + p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement && + p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement->first_token && + p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement->first_token->type == TK_KEYWORD_RETURN) + { + return true; + } + return false; } void flow_visit_declaration(struct flow_visit_ctx* ctx, struct declaration* p_declaration) { - if (p_declaration->static_assert_declaration) - { - flow_visit_static_assert_declaration(ctx, p_declaration->static_assert_declaration); - } + if (p_declaration->static_assert_declaration) + { + flow_visit_static_assert_declaration(ctx, p_declaration->static_assert_declaration); + } - if (p_declaration->p_attribute_specifier_sequence_opt) - { - flow_visit_attribute_specifier_sequence(ctx, p_declaration->p_attribute_specifier_sequence_opt); - } + if (p_declaration->p_attribute_specifier_sequence_opt) + { + flow_visit_attribute_specifier_sequence(ctx, p_declaration->p_attribute_specifier_sequence_opt); + } - if (p_declaration->declaration_specifiers) - { - if (p_declaration->init_declarator_list.head) - { - flow_visit_declaration_specifiers(ctx, p_declaration->declaration_specifiers, - &p_declaration->init_declarator_list.head->p_declarator->type); - } - else - { - flow_visit_declaration_specifiers(ctx, p_declaration->declaration_specifiers, NULL); + if (p_declaration->declaration_specifiers) + { + if (p_declaration->init_declarator_list.head) + { + flow_visit_declaration_specifiers(ctx, p_declaration->declaration_specifiers, + &p_declaration->init_declarator_list.head->p_declarator->type); + } + else + { + flow_visit_declaration_specifiers(ctx, p_declaration->declaration_specifiers, NULL); - } + } - } + } - if (p_declaration->p_attribute_specifier_sequence_opt) - { - } + if (p_declaration->p_attribute_specifier_sequence_opt) + { + } - if (p_declaration->init_declarator_list.head) - { - flow_visit_init_declarator_list(ctx, &p_declaration->init_declarator_list); - } + if (p_declaration->init_declarator_list.head) + { + flow_visit_init_declarator_list(ctx, &p_declaration->init_declarator_list); + } - if (p_declaration->function_body) - { + if (p_declaration->function_body) + { - assert(ctx->p_return_type == NULL); + assert(ctx->p_return_type == NULL); - struct type type = get_function_return_type(&p_declaration->init_declarator_list.head->p_declarator->type); - ctx->p_return_type = &type; + struct type type = get_function_return_type(&p_declaration->init_declarator_list.head->p_declarator->type); + ctx->p_return_type = &type; - //struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - //p_defer->p_statement = p_declaration->function_body; + //struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + //p_defer->p_statement = p_declaration->function_body; - flow_visit_compound_statement(ctx, p_declaration->function_body); - type_destroy(&type); - ctx->p_return_type = NULL; + flow_visit_compound_statement(ctx, p_declaration->function_body); + type_destroy(&type); + ctx->p_return_type = NULL; - //flow_visit_ctx_pop_tail_block(ctx); - } + //flow_visit_ctx_pop_tail_block(ctx); + } } void flow_visit_function(struct flow_visit_ctx* ctx, struct declaration* p_declaration) { - assert(p_declaration->function_body); + assert(p_declaration->function_body); - assert(ctx->tail_block == NULL); - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - if (p_defer == NULL) - { - return; - } - p_defer->p_function_body = p_declaration->function_body; + assert(ctx->tail_block == NULL); + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + if (p_defer == NULL) + { + return; + } + p_defer->p_function_body = p_declaration->function_body; - flow_visit_declaration(ctx, p_declaration); + flow_visit_declaration(ctx, p_declaration); - if (!flow_is_last_item_return(p_declaration->function_body)) - { - check_defer_and_variables(ctx, p_defer, p_declaration->function_body->last_token); - } + if (!flow_is_last_item_return(p_declaration->function_body)) + { + check_defer_and_variables(ctx, p_defer, p_declaration->function_body->last_token); + } - flow_visit_ctx_pop_tail_block(ctx); + flow_visit_ctx_pop_tail_block(ctx); } void flow_visit_ctx_destroy(struct flow_visit_ctx* obj_owner p) { - assert(p->tail_block == NULL); + assert(p->tail_block == NULL); } void flow_analysis_visit(struct flow_visit_ctx* ctx) { - struct declaration* p_declaration = ctx->ast.declaration_list.head; - while (p_declaration) - { - flow_visit_declaration(ctx, p_declaration); - p_declaration = p_declaration->next; - } + struct declaration* p_declaration = ctx->ast.declaration_list.head; + while (p_declaration) + { + flow_visit_declaration(ctx, p_declaration); + p_declaration = p_declaration->next; + } } diff --git a/src/flow_visit.h b/src/flow_visit.h index ce9bff03..d11011d3 100644 --- a/src/flow_visit.h +++ b/src/flow_visit.h @@ -19,7 +19,8 @@ struct flow_visit_ctx int parameter_list; struct jump_statement* view p_last_jump_statement; - bool is_left_expression; //a = b + bool is_left_expression; //true when visiting left expression in assignment + bool expression_is_not_evaluated; //true when is expression for sizeof, missing state_set, typeof }; diff --git a/src/fs.c b/src/fs.c index b7dcd92b..04affae8 100644 --- a/src/fs.c +++ b/src/fs.c @@ -45,7 +45,7 @@ caso nao tenha este arquivos apt-get install uuid-dev bool path_is_absolute(const char* path) { #ifdef _WINDOWS_ - const char ch = tolower(path[0]); + const char ch = (char)tolower(path[0]); if (ch >= 'a' && ch <= 'z') { /* c:/ or c:\ */ @@ -75,7 +75,7 @@ bool path_is_relative(const char* path) #ifdef __CAKE__ #pragma CAKE diagnostic push -#pragma CAKE diagnostic ignore "-Wstyle" +#pragma CAKE diagnostic ignored "-Wstyle" #endif struct TAGDIR @@ -176,12 +176,15 @@ char* realpath(const char* restrict path, char* restrict resolved_path) created absolute path name (absPath) is greater than maxLength), the function returns NULL. */ char* p = _fullpath(resolved_path, path, MAX_PATH); - char* p2 = resolved_path; - while (*p2) + if(p) { - if (*p2 == '\\') - *p2 = '/'; - p2++; + char* p2 = resolved_path; + while (*p2) + { + if (*p2 == '\\') + *p2 = '/'; + p2++; + } } return p; } @@ -235,6 +238,7 @@ int copy_file(const char* pathfrom, const char* pathto) int copy_folder(const char* from, const char* to) { +#if !defined __EMSCRIPTEN__ int errcode = mkdir(to, 0700); if (errcode != 0) { @@ -278,6 +282,9 @@ int copy_folder(const char* from, const char* to) closedir(dir); return errcode; +#else + return -1; +#endif } #ifdef _WIN32 @@ -953,7 +960,7 @@ const char* file_ownership_h = "#define owner _Owner\n" "#define obj_owner _Obj_owner\n" "#define view _View\n" - "#define unchecked \"unchecked\"\n" + "\n" "#else\n" "#define out \n" @@ -963,7 +970,7 @@ const char* file_ownership_h = "#define view\n" "#define static_debug(x)\n" "#define static_set(x, s)\n" - "#define unchecked\n" + "#endif\n" "\n" "#endif\n" diff --git a/src/fs.h b/src/fs.h index 74af6c15..2c6197be 100644 --- a/src/fs.h +++ b/src/fs.h @@ -9,8 +9,8 @@ #include #ifdef __CAKE__ -#pragma CAKE diagnostic push -#pragma CAKE diagnostic ignore "-Wstyle" +#pragma cake diagnostic push +#pragma cake diagnostic ignored "-Wstyle" #endif @@ -19,12 +19,10 @@ #define rmdir _rmdir #define chdir _chdir - #ifdef __CAKE__ -#pragma CAKE diagnostic pop +#pragma cake diagnostic pop #endif - /* opendir, readdir closedir for windows. include dirent.h on linux @@ -57,7 +55,7 @@ struct dirent #ifdef __CAKE__ #pragma CAKE diagnostic push -#pragma CAKE diagnostic ignore "-Wstyle" +#pragma CAKE diagnostic ignored "-Wstyle" #endif struct TAGDIR; typedef struct TAGDIR DIR; @@ -75,7 +73,7 @@ struct dirent* readdir(DIR* dirp); typedef struct __dirstream DIR; DIR * owner opendir (const char *__name); - +int closedir(DIR* owner dirp); #define MAX_PATH 500 @@ -100,4 +98,4 @@ const char* get_posix_error_message(int error); bool path_is_relative(const char* path); -bool path_is_absolute(const char* path); \ No newline at end of file +bool path_is_absolute(const char* path); diff --git a/src/lib.c b/src/lib.c index 44b28088..78fe0589 100644 --- a/src/lib.c +++ b/src/lib.c @@ -1,6 +1,8 @@ +/* Start of: token.c */ +/* Start of: ownership.h */ #ifndef __OWNERSHIP_H__ @@ -42,9 +44,7 @@ int fclose(FILE* owner _Stream); #endif - - -#include +/* End of: ownership.h */ #include @@ -56,6 +56,11 @@ int fclose(FILE* owner _Stream); #include +#include + + + +/* Start of: console.h */ //#pragma once @@ -74,98 +79,67 @@ int fclose(FILE* owner _Stream); bool enable_vt_mode(void); -//#define DISABLE_COLORS 1 - -#ifdef DISABLE_COLORS - +/* + DISABLE_COLORS is defined to generate a + version of cake that does not ouput colors + A runtime flag msvcouput is already used.. + but some utility functions are not using +*/ +#ifdef ENABLE_COLORS +#define COLOR_ESC(x) x +#define COLOR_ESC_PRINT(x) x +#define ESC "\x1b" +#define CSI "\x1b[" +#else +#define COLOR_ESC(x) "" +#define COLOR_ESC_PRINT(x) #define ESC "" #define CSI "" -#define BLACK "" -#define BLUE "" -#define GREEN "" -#define CYAN "" -#define RED "" -#define MAGENTA "" -#define BROWN "" -#define LIGHTGRAY "" -#define DARKGRAY "" -#define LIGHTBLUE "" -#define LIGHTGREEN "" -#define LIGHTCYAN "" -#define LIGHTRED "" -#define LIGHTMAGENTA "" -#define YELLOW "" -#define WHITE "" - -//https//en.wikipedia.org/wiki/ANSI_escape_code - - -#define BK_BLACK "" -#define BK_BLUE "" -#define BK_GREEN "" -#define BK_CYAN "" -#define BK_RED "" -#define BK_MAGENTA "" -#define BK_BROWN "" -#define BK_LIGHTGRAY "" -#define BK_DARKGRAY "" -#define BK_LIGHTBLUE "" -#define BK_LIGHTGREEN "" -#define BK_LIGHTCYAN "" -#define BK_LIGHTRED "" -#define BK_LIGHTMAGENTA "" -#define BK_YELLOW "" -#define BK_WHITE "" -#define BK_BLINK "" -#define RESET ESC "" -#else +#endif + /*change foreground color*/ -#define ESC "\x1b" -#define CSI "\x1b[" -#define BLACK "\x1b[30m" -#define BLUE "\x1b[34m" -#define GREEN "\x1b[32m" -#define CYAN "\x1b[36m" -#define RED "\x1b[31;1m" -#define MAGENTA "\x1b[35m" -#define BROWN "\x1b[31m" -#define LIGHTGRAY "\x1b[37m" -#define DARKGRAY "\x1b[90m" -#define LIGHTBLUE "\x1b[34;1m" -#define LIGHTGREEN "\x1b[92m" -#define LIGHTCYAN "\x1b[36;1m" -#define LIGHTRED "\x1b[91m" -#define LIGHTMAGENTA "\x1b[95m" -#define YELLOW "\x1b[93m" -#define WHITE "\x1b[97m" +#define BLACK COLOR_ESC("\x1b[30m") +#define BLUE COLOR_ESC("\x1b[34m") +#define GREEN COLOR_ESC("\x1b[32m") +#define CYAN COLOR_ESC("\x1b[36m") +#define RED COLOR_ESC("\x1b[31;1m") +#define MAGENTA COLOR_ESC("\x1b[35m") +#define BROWN COLOR_ESC("\x1b[31m") +#define LIGHTGRAY COLOR_ESC("\x1b[37m") +#define DARKGRAY COLOR_ESC("\x1b[90m") +#define LIGHTBLUE COLOR_ESC("\x1b[34;1m") +#define LIGHTGREEN COLOR_ESC("\x1b[92m") +#define LIGHTCYAN COLOR_ESC("\x1b[36;1m") +#define LIGHTRED COLOR_ESC("\x1b[91m") +#define LIGHTMAGENTA COLOR_ESC("\x1b[95m") +#define YELLOW COLOR_ESC("\x1b[93m") +#define WHITE COLOR_ESC("\x1b[97m") //https//en.wikipedia.org/wiki/ANSI_escape_code -#define BK_BLACK "\x1b[40m" -#define BK_BLUE "\x1b[44m" -#define BK_GREEN "\x1b[42m" -#define BK_CYAN "\x1b[46m" -#define BK_RED "\x1b[41;1m" -#define BK_MAGENTA "\x1b[45m" -#define BK_BROWN "\x1b[41m" -#define BK_LIGHTGRAY "\x1b[40;1m" -#define BK_DARKGRAY "\x1b[40m" -#define BK_LIGHTBLUE "\x1b[44;1m" -#define BK_LIGHTGREEN "\x1b[42,1m" -#define BK_LIGHTCYAN "\x1b[46;1m" -#define BK_LIGHTRED "\x1b[41;1m" -#define BK_LIGHTMAGENTA "\x1b[45;1m" -#define BK_YELLOW "\x1b[43;1m" -#define BK_WHITE "\x1b[47;1m" -#define BK_BLINK "\x1b[40m" - -#define RESET ESC "[0m" +#define BK_BLACK COLOR_ESC("\x1b[40m") +#define BK_BLUE COLOR_ESC("\x1b[44m") +#define BK_GREEN COLOR_ESC("\x1b[42m") +#define BK_CYAN COLOR_ESC("\x1b[46m") +#define BK_RED COLOR_ESC("\x1b[41;1m") +#define BK_MAGENTA COLOR_ESC("\x1b[45m") +#define BK_BROWN COLOR_ESC("\x1b[41m") +#define BK_LIGHTGRAY COLOR_ESC("\x1b[40;1m") +#define BK_DARKGRAY COLOR_ESC("\x1b[40m") +#define BK_LIGHTBLUE COLOR_ESC("\x1b[44;1m") +#define BK_LIGHTGREEN COLOR_ESC("\x1b[42,1m") +#define BK_LIGHTCYAN COLOR_ESC("\x1b[46;1m") +#define BK_LIGHTRED COLOR_ESC("\x1b[41;1m") +#define BK_LIGHTMAGENTA COLOR_ESC("\x1b[45;1m") +#define BK_YELLOW COLOR_ESC("\x1b[43;1m") +#define BK_WHITE COLOR_ESC("\x1b[47;1m") +#define BK_BLINK COLOR_ESC("\x1b[40m") -#endif +#define RESET COLOR_ESC(ESC "[0m") int c_kbhit(void); @@ -173,8 +147,10 @@ int c_getch(void); void c_clrscr(); +/* End of: console.h */ +/* Start of: osstream.h */ //#pragma once @@ -197,11 +173,14 @@ int ss_putc(char ch, struct osstream* stream); void ss_clear(struct osstream* stream); void ss_swap(struct osstream* a, struct osstream* b); +/* End of: osstream.h */ +/* Start of: tokenizer.h */ //#pragma once +/* Start of: hashmap.h */ //#pragma once /* * tag allow more than one type of object be inserted at the same map @@ -261,12 +240,15 @@ void* owner owner_hashmap_remove(struct owner_hash_map* map, const char* key, e void* owner owner_hashmap_set(struct owner_hash_map* map, const char* key, const void* owner p, enum tag type); +/* End of: hashmap.h */ +/* Start of: token.h */ //#pragma once enum token_type { + /*When changing here we need also change in tokenizer.c::get_token_name*/ TK_NONE = 0, TK_NEWLINE = '\n', TK_WHITE_SPACE = ' ', @@ -543,8 +525,10 @@ do {\ bool style_has_space(const struct token* token); bool style_has_one_space(const struct token* token); +/* End of: token.h */ +/* Start of: error.h */ //#pragma once #ifndef __CAKE__ @@ -559,8 +543,10 @@ const char* get_posix_error_message(int error); int windows_error_to_posix(int i); +/* End of: error.h */ +/* Start of: options.h */ //#pragma once /* @@ -576,112 +562,149 @@ enum language_version LANGUAGE_CXX = 3, //experimental }; -enum warning { +enum diagnostic_id { W_NONE = 0, /*not a real warning, used in especial cases*/ - W_UNUSED_VARIABLE = 1 << 1, //-Wunused-variable - W_DEPRECATED = 1 << 2, - W_ENUN_CONVERSION = 1 << 3 ,//-Wenum-conversion - W_NON_NULL = 1 << 4, //-Wnonnull - W_ADDRESS = 1 << 5, //-Waddress (always true) - W_UNUSED_PARAMETER = 1 << 6, //-Wno-unused-parameter - W_DECLARATOR_HIDE = 1 << 7, // gcc no - W_TYPEOF_ARRAY_PARAMETER = 1 << 8,// - W_ATTRIBUTES = 1 << 9, //-Wattributes - W_UNUSED_VALUE = 1 << 10, //-Wunused-value - W_STYLE = 1 << 11, //-Wstyle - W_COMMENT = 1 << 12, - W_LINE_SLICING = 1 << 13, - W_STRING_SLICED = 1 << 14, - W_DISCARDED_QUALIFIERS = 1 << 15, - W_DECLARATOR_STATE = 1 << 16, - W_UNINITIALZED = 1 << 17, - - W_RETURN_LOCAL_ADDR = 1 << 20, + W_UNUSED_VARIABLE, //-Wunused-variable + W_DEPRECATED, + W_ENUN_CONVERSION,//-Wenum-conversion + W_NON_NULL, //-Wnonnull + W_ADDRESS, //-Waddress (always true) + W_UNUSED_PARAMETER, //-Wno-unused-parameter + W_DECLARATOR_HIDE, // gcc no + W_TYPEOF_ARRAY_PARAMETER,// + W_ATTRIBUTES, //-Wattributes + W_UNUSED_VALUE, //-Wunused-value + W_STYLE, //-Wstyle + W_COMMENT, + W_LINE_SLICING, + W_STRING_SLICED, + W_DISCARDED_QUALIFIERS, + W_DECLARATOR_STATE, + W_UNINITIALZED, + + W_RETURN_LOCAL_ADDR, + + W_MUST_USE_ADDRESSOF, + /*ownership type system errors*/ + W_OWNERSHIP_MISSING_OWNER_QUALIFIER, + W_OWNERSHIP_NOT_OWNER, + W_OWNERSHIP_USING_TEMPORARY_OWNER, + W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + + W_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, + W_DISCARDING_OWNER, + W_OWNERSHIP_NON_OWNER_MOVE, + W_ARRAY_INDIRECTION, + /*flow analysis errors*/ + W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + + + W_ANALYZER_UNINITIALIZED, + W_ANALYZER_NULL_DEREFERENCE, + + W_DIVIZION_BY_ZERO, + W_PASSING_NULL_AS_ARRAY, + W_ANALIZER_MAYBE_NULL_TO_NON_OPT_ARGUMENT, + W_INCOMPATIBLE_ENUN_TYPES, + W_MULTICHAR_ERROR, + W_OUT_OF_BOUNDS, + + + + + W_LOCATION, + W_NOTE, + + //AFTER THIS POINT (W_NOTE) MESSAGES ARE ALWAYS ERRORS + //////////////////////////////////////// + + //constraints violations are errors + C_UNEXPECTED, + //TODO ERROR MESSAGE MUST BE BASED ON CONSTRAINS + // -}; + /* + * 5.1.1.3 Diagnostics + A conforming implementation shall produce at least one diagnostic message (identified in an + implementation-defined manner) if a preprocessing translation unit or translation unit contains a + violation of any syntax rule or constraint, even if the behavior is also explicitly specified as undefined + or implementation-defined. Diagnostic messages need not be produced in other circumstances.9 + */ -enum error -{ - C_SUCCESS = 0, - C_UNEXPECTED, - C_TOO_MANY_ARGUMENTS, - C_TOO_FEW_ARGUMENTS, - C_NOT_FOUND, - C_NO_MATCH_FOR_GENERIC, - C_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, - C_CALLED_OBJECT_IS_NOT_FUNCTION_OR_FUNCTION_POINTER, - C_STRUCT_MEMBER_NOT_FOUND, - C_STRUCTURE_OR_UNION_REQUIRED, - C_STRUCT_IS_INCOMPLETE, - C_DECLARATOR_NOT_FOUND, - C_EXPECTED_DECLARATOR_NAME, - C_UNKNOWN_ATTRIBUTE_NAME, - C_INDIRECTION_REQUIRES_POINTER_OPERAND, - C_INVALID_TOKEN, - C_EXPECTED_STRUCT_TYPE, - C_EXPECTED_TYPE_NAME, - C_LEFT_IS_NOT_ARITHMETIC, - C_RIGHT_IS_NOT_ARITHMETIC, - C_DIVIZION_BY_ZERO, - C_LEFT_IS_NOT_INTEGER, - C_RIGHT_IS_NOT_INTEGER, - C_INVALID_TYPE, - C_LEFT_IS_NOT_SCALAR, - C_RIGHT_IS_NOT_SCALAR, - C_INCOMPATIBLE_POINTER_TYPES, - C_ASSIGNMENT_OF_FUNCTION, - C_ASSIGNMENT_TO_EXPRESSION_WITH_ARRAY_TYPE, - C_ASSIGNMENT_OF_READ_ONLY_OBJECT, - C_LVALUE_ASSIGNMENT, - C_CONDITION_MUST_HAVE_SCALAR_TYPE, - C_INCOMPATIBLE_TYPES, - C_EXPECTED_CONSTANT_EXPRESSION, - C_UNEXPECTED_TOKEN, - C_CANNOT_COMBINE_WITH_PREVIOUS_LONG_LONG, - C_EXPECTED_DECLARATION, - C_STATIC_OR_TYPE_QUALIFIERS_NOT_ALLOWED_IN_NON_PARAMETER, - C_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER, - C_REDECLARATION, - C_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, - C_MISSING_ENUM_TAG_NAME, - C_MULTIPLE_DEFINITION_ENUM, - C_STATIC_ASSERT_FAILED, - C_ATTR_UNBALANCED, - C_UNEXPECTED_END_OF_FILE, - C_THROW_STATEMENT_NOT_WITHIN_TRY_BLOCK, - C_VOID_FUNCTION_SHOULD_NOT_RETURN_VALUE, - C_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, - C_PASSING_NULL_AS_ARRAY, - C_DISCARDING_CONST_AT_ARGUMENT, - C_INCOMPATIBLE_ENUN_TYPES, - C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, - C_FILE_NOT_FOUND, - C_MISSING_CLOSE_PARENTHESIS, - C_EXPRESSION_ERROR, - C_PREPROCESSOR_ERROR_DIRECTIVE, - C_TOO_FEW_ARGUMENTS_TO_FUNCTION_LIKE_MACRO, - C_MACRO_INVALID_ARG, - C_MISSING_MACRO_ARGUMENT, - C_ADDRESS_OF_REGISTER, - C_OPERATOR_NEEDS_LVALUE, //C2105 - C_MULTICHAR_ERROR, - C_CHARACTER_TOO_LARGE, - C_OWNERSHIP_NON_OWNER_MOVE, - C_PRAGMA_ERROR, - /*ownership type system errors*/ - C_OWNERSHIP_MISSING_OWNER_QUALIFIER, - C_OWNERSHIP_NOT_OWNER, - C_OWNERSHIP_USING_TEMPORARY_OWNER, - C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + //SAMPLE + //Constrain : The number of arguments shall agree with the number of parameters. + ERROR_TOO_MANY_ARGUMENTS, + ERROR_TOO_FEW_ARGUMENTS, - C_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, - C_DISCARDING_OWNER, + //TODO.... more constrains + ERROR_NOT_FOUND, + ERROR_NO_MATCH_FOR_GENERIC, + ERROR_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, + ERROR_CALLED_OBJECT_IS_NOT_FUNCTION_OR_FUNCTION_POINTER, + ERROR_STRUCT_MEMBER_NOT_FOUND, + ERROR_STRUCTURE_OR_UNION_REQUIRED, + ERROR_STRUCT_IS_INCOMPLETE, + ERROR_DECLARATOR_NOT_FOUND, + ERROR_EXPECTED_DECLARATOR_NAME, + ERROR_UNKNOWN_ATTRIBUTE_NAME, + ERROR_INDIRECTION_REQUIRES_POINTER_OPERAND, + ERROR_INVALID_TOKEN, + ERROR_EXPECTED_STRUCT_TYPE, + ERROR_EXPECTED_TYPE_NAME, + ERROR_LEFT_IS_NOT_ARITHMETIC, + ERROR_RIGHT_IS_NOT_ARITHMETIC, - /*flow analysis errors*/ - C_OWNERSHIP_FLOW_MISSING_DTOR, + ERROR_LEFT_IS_NOT_INTEGER, + ERROR_RIGHT_IS_NOT_INTEGER, + ERROR_INVALID_TYPE, + ERROR_LEFT_IS_NOT_SCALAR, + ERROR_RIGHT_IS_NOT_SCALAR, + ERROR_INCOMPATIBLE_POINTER_TYPES, //warning? + ERROR_ASSIGNMENT_OF_FUNCTION, + ERROR_ASSIGNMENT_TO_EXPRESSION_WITH_ARRAY_TYPE, + ERROR_ASSIGNMENT_OF_READ_ONLY_OBJECT, + ERROR_LVALUE_ASSIGNMENT, + ERROR_CONDITION_MUST_HAVE_SCALAR_TYPE, + ERROR_INCOMPATIBLE_TYPES, + ERROR_EXPECTED_CONSTANT_EXPRESSION, + ERROR_UNEXPECTED_TOKEN, + ERROR_CANNOT_COMBINE_WITH_PREVIOUS_LONG_LONG, + ERROR_EXPECTED_DECLARATION, + ERROR_STATIC_OR_TYPE_QUALIFIERS_NOT_ALLOWED_IN_NON_PARAMETER, + ERROR_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER, + ERROR_REDECLARATION, + ERROR_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, + ERROR_MISSING_ENUM_TAG_NAME, + ERROR_MULTIPLE_DEFINITION_ENUM, + ERROR_STATIC_ASSERT_FAILED, + ERROR_STATIC_STATE_FAILED, + ERROR_ATTR_UNBALANCED, + ERROR_UNEXPECTED_END_OF_FILE, + ERROR_THROW_STATEMENT_NOT_WITHIN_TRY_BLOCK, + ERROR_VOID_FUNCTION_SHOULD_NOT_RETURN_VALUE, + ERROR_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, + + + ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, + ERROR_FILE_NOT_FOUND, + ERROR_MISSING_CLOSE_PARENTHESIS, + ERROR_EXPRESSION_ERROR, + ERROR_PREPROCESSOR_ERROR_DIRECTIVE, + ERROR_TOO_FEW_ARGUMENTS_TO_FUNCTION_LIKE_MACRO, + ERROR_PREPROCESSOR_MACRO_INVALID_ARG, + ERROR_PREPROCESSOR_MISSING_MACRO_ARGUMENT, + ERROR_ADDRESS_OF_REGISTER, + ERROR_OPERATOR_NEEDS_LVALUE, //C2105 + + ERROR_CHARACTER_TOO_LARGE, + + ERROR_PRAGMA_ERROR, + ERROR_OUT_OF_MEM, + }; -bool is_ownership_error(enum error e); + + enum style { @@ -689,27 +712,46 @@ enum style // https://llvm.org/docs/CodingStandards.html STYLE_LLVM,// A style complying with the LLVM coding standards - + //https://google.github.io/styleguide/cppguide.html STYLE_GOOGLE,// A style complying with Google’s C++ style guide //https://chromium.googlesource.com/chromium/src/+/refs/heads/main/styleguide/styleguide.md //https://www.kernel.org/doc/html/latest/process/coding-style.html STYLE_CHROMIUM,// A style complying with Chromium’s style guide - + //https://firefox-source-docs.mozilla.org/code-quality/coding-style/index.html STYLE_MOZILLA,// A style complying with Mozilla’s style guide - + //https://www.webkit.org/code-style-guidelines/ STYLE_WEBKIT,// A style complying with WebKit’s style guide - + STYLE_MICROSOFT,// A style complying with Microsoft’s style guide - + STYLE_GNU,// A style complying with the GNU coding standards - + +}; +const char* get_warning_name(enum diagnostic_id w); +unsigned long long get_warning_bit_mask(const char* wname); + +enum diagnostic_id get_warning(const char* wname); + +struct diagnostic +{ + /* + each message has number (0-63) that corresponds to the bit index + Messages bigger than W_NOTE are errors or bigger than 63 + */ + + /*set of diagnostics reported as errors*/ + unsigned long long errors; + /*set of diagnostics reported as warnings*/ + unsigned long long warnings; + /*set of diagnostics reported as notes*/ + unsigned long long notes; }; -const char* get_warning_name(enum warning w); -enum warning get_warning_flag(const char* wname); +int get_diagnostic_type(struct diagnostic* d, enum diagnostic_id w); +extern struct diagnostic default_diagnostic; struct options { @@ -722,27 +764,27 @@ struct options -target=c99 */ enum language_version target; - + /* #pragma CAKE diagnostic push #pragma CAKE diagnostic pop */ - int enabled_warnings_stack_top_index; - enum warning enabled_warnings_stack[10]; + int diagnostic_stack_top_index; + struct diagnostic diagnostic_stack[10]; enum style style; /* Causes the compiler to output a list of the include files. - The option also displays nested include files, that is, + The option also displays nested include files, that is, the files included by the files that you include. */ bool show_includes; /* - -remove-comments + -remove-comments */ - bool remove_comments; + bool remove_comments; /* -flow-analysis @@ -750,11 +792,11 @@ struct options bool flow_analysis; /* - -E + -E */ bool preprocess_only; - bool disable_ownership_errors; + bool clear_error_at_end; //used by tests /* -rm -direct-compilation @@ -768,17 +810,17 @@ struct options bool format_input; bool format_ouput; - - + + /* -no-output if true cake does not generate ouput */ bool no_output; - - /* + + /* -nullchecks - + */ bool null_checks; @@ -787,6 +829,18 @@ struct options */ bool visual_studio_ouput_format; + /* + -dump-tokens + print tokens before preprocessor + */ + bool dump_tokens; + + /* + -dump-pp-tokens + (print tokens after preprocessor) + */ + bool dump_pptokens; + /* -o filename defines the ouputfile when 1 file is used @@ -800,6 +854,7 @@ int fill_options(struct options* options, void print_help(); +/* End of: options.h */ struct include_dir { @@ -839,9 +894,7 @@ struct preprocessor_ctx }; void preprocessor_ctx_destroy( struct preprocessor_ctx* obj_owner p); -void preprocessor_set_info_with_token(struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...); -void preprocessor_set_warning_with_token(enum warning w, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...); -void preprocessor_set_error_with_token(enum error error, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...); +bool preprocessor_diagnostic_message(enum diagnostic_id w, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...); struct tokenizer_ctx @@ -891,6 +944,9 @@ int string_literal_byte_size(const char* s); int get_char_type(const char* s); void include_config_header(struct preprocessor_ctx* ctx); +/* End of: tokenizer.h */ + + #ifdef _WIN32 @@ -909,6 +965,20 @@ void include_config_header(struct preprocessor_ctx* ctx); #include #endif +/* + PROVISORY - unchecked was removed, now we control flow ownerhip error with pragma + TODO review alternatives from Domingo's branch. +*/ +#ifdef __CAKE__ +#pragma cake diagnostic push +#pragma cake diagnostic ignored "-Wdiscard-owner" +#pragma cake diagnostic ignored "-Wmissing-destructor" +#pragma cake diagnostic ignored "-Wnon-owner-move" +#pragma cake diagnostic ignored "-Wnon-owner-to-owner-move" +#endif + +//#pragma cake diagnostic pop + bool style_has_space(const struct token* token) { return token_is_blank(token->prev); @@ -968,33 +1038,31 @@ void token_range_add_flag(struct token* first, struct token* last, enum token_fl } } -void token_list_pop_back(struct token_list* list) unchecked +void token_list_pop_back(struct token_list* list) /*unchecked*/ { if (list->head == NULL) - return ; + return; - struct token* p = list->tail; if (list->head == list->tail) { + token_delete(list->head); list->head = NULL; list->tail = NULL; } else { - list->tail = list->tail->prev; + struct token* owner p = list->tail->prev->next; + list->tail = p->prev; list->tail->next = NULL; if (list->tail == list->head) { list->tail->prev = NULL; } + token_delete(p); } - p->next = NULL; - p->prev = NULL; - p->next = NULL; - token_delete(p); } -void token_list_pop_front(struct token_list* list) unchecked +void token_list_pop_front(struct token_list* list) /*unchecked*/ { if (list->head == NULL) return; @@ -1008,19 +1076,19 @@ void token_list_pop_front(struct token_list* list) unchecked } else { - list->head = list->head->next; + list->head = p->next; } p->next = NULL; - p->prev = NULL; + p->prev = NULL; token_delete(p); } -struct token* owner token_list_pop_front_get(struct token_list* list) unchecked +struct token* owner token_list_pop_front_get(struct token_list* list) /*unchecked*/ { if (list->head == NULL) return NULL; - struct token* p = list->head; + struct token* owner p = list->head; if (list->head == list->tail) { @@ -1029,7 +1097,7 @@ struct token* owner token_list_pop_front_get(struct token_list* list) unchecked } else { - list->head = list->head->next; + list->head = p->next; } p->next = NULL; p->prev = NULL; @@ -1037,7 +1105,7 @@ struct token* owner token_list_pop_front_get(struct token_list* list) unchecked return p; } -void token_list_swap(struct token_list* a, struct token_list* b) +void token_list_swap(struct token_list* a, struct token_list* b) { struct token_list temp = *a; *a = *b; @@ -1085,7 +1153,7 @@ void token_list_destroy(struct token_list* obj_owner list) char* owner token_list_join_tokens(struct token_list* list, bool bliteral) { - struct osstream ss = {0}; + struct osstream ss = { 0 }; if (bliteral) ss_fprintf(&ss, "\""); bool has_space = false; @@ -1130,7 +1198,7 @@ char* owner token_list_join_tokens(struct token_list* list, bool bliteral) return cstr; } -void token_list_insert_after(struct token_list* token_list, struct token* after, struct token_list* append_list) +void token_list_insert_after(struct token_list* token_list, struct token* after, struct token_list* append_list) { if (append_list->head == NULL) return; @@ -1167,7 +1235,7 @@ void token_list_insert_after(struct token_list* token_list, struct token* after, } -struct token* token_list_add(struct token_list* list, struct token* owner pnew) unchecked +struct token* token_list_add(struct token_list* list, struct token* owner pnew) /*unchecked*/ { /*evitar que sem querer esteja em 2 listas diferentes*/ assert(pnew->next == NULL); @@ -1238,7 +1306,7 @@ void token_list_append_list_at_beginning(struct token_list* dest, struct token_l source->tail = NULL; } -void token_list_append_list(struct token_list* dest, struct token_list* source) +void token_list_append_list(struct token_list* dest, struct token_list* source) { if (source->head == NULL) { @@ -1261,12 +1329,12 @@ void token_list_append_list(struct token_list* dest, struct token_list* source) } -struct token* owner clone_token(struct token* p) unchecked +struct token* owner clone_token(struct token* p) /*unchecked*/ { struct token* owner token = calloc(1, sizeof * token); if (token) { - *token = *p; + *token = *p; token->lexeme = strdup(p->lexeme); token->next = NULL; token->prev = NULL; @@ -1274,10 +1342,12 @@ struct token* owner clone_token(struct token* p) unchecked return token; } -struct token_list token_list_remove_get(struct token_list* list, struct token* first, struct token* last) unchecked + + +struct token_list token_list_remove_get(struct token_list* list, struct token* first, struct token* last) /*unchecked*/ { - struct token_list r = {0}; + struct token_list r = { 0 }; struct token* before_first = first->prev; struct token* owner after_last = last->next; @@ -1295,6 +1365,7 @@ struct token_list token_list_remove_get(struct token_list* list, struct token* f } + void token_list_remove(struct token_list* list, struct token* first, struct token* last) { struct token_list r = token_list_remove_get(list, first, last); @@ -1323,7 +1394,7 @@ void print_list(struct token_list* list) //printf("`"); } print_literal2(current->lexeme); - printf(RESET); + COLOR_ESC_PRINT(printf(RESET)); if (current == list->tail) { //printf("`"); @@ -1346,11 +1417,11 @@ void print_literal2(const char* s) { switch (*s) { - case '\n': - printf("\\n"); - break; - default: - printf("%c", *s); + case '\n': + printf("\\n"); + break; + default: + printf("%c", *s); } s++; } @@ -1365,18 +1436,18 @@ void print_token(struct token* p_token) printf(" "); } if (p_token->flags & TK_FLAG_FINAL) - printf(LIGHTGREEN); + COLOR_ESC_PRINT(printf(LIGHTGREEN)); else - printf(LIGHTGRAY); - char buffer0[50] = {0}; + COLOR_ESC_PRINT(printf(LIGHTGRAY)); + char buffer0[50] = { 0 }; snprintf(buffer0, sizeof buffer0, "%d:%d", p_token->line, p_token->col); printf("%-6s ", buffer0); printf("%-20s ", get_token_name(p_token->type)); if (p_token->flags & TK_FLAG_MACRO_EXPANDED) { - printf(LIGHTCYAN); + COLOR_ESC_PRINT(printf(LIGHTCYAN)); } - char buffer[50] = {0}; + char buffer[50] = { 0 }; strcat(buffer, "["); if (p_token->flags & TK_FLAG_FINAL) { @@ -1402,7 +1473,7 @@ void print_token(struct token* p_token) printf("%-20s ", buffer); print_literal2(p_token->lexeme); printf("\n"); - printf(RESET); + COLOR_ESC_PRINT(printf(RESET)); } void print_tokens(struct token* p_token) @@ -1416,7 +1487,7 @@ void print_tokens(struct token* p_token) } printf("\n"); printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" RESET); - printf(RESET); + COLOR_ESC_PRINT(printf(RESET)); } @@ -1530,9 +1601,9 @@ void print_line_and_token(const struct token* p_token, bool visual_studio_ouput_ int line = p_token->line; if (!visual_studio_ouput_format) - printf(LIGHTGRAY); + COLOR_ESC_PRINT(printf(LIGHTGRAY)); - char nbuffer[20] = {0}; + char nbuffer[20] = { 0 }; int n = snprintf(nbuffer, sizeof nbuffer, "%d", line); printf(" %s |", nbuffer); @@ -1577,7 +1648,7 @@ void print_line_and_token(const struct token* p_token, bool visual_studio_ouput_ printf("\n"); if (!visual_studio_ouput_format) - printf(LIGHTGRAY); + COLOR_ESC_PRINT(printf(LIGHTGRAY)); printf(" %*s |", n, " "); if (p_token) @@ -1589,11 +1660,11 @@ void print_line_and_token(const struct token* p_token, bool visual_studio_ouput_ } if (!visual_studio_ouput_format) - printf(LIGHTGREEN); + COLOR_ESC_PRINT(printf(LIGHTGREEN)); printf("^"); - char* p = p_token->lexeme + 1; + char* p = (p_token->lexeme && *p_token->lexeme) ? p_token->lexeme + 1 : NULL; while (p && *p) { printf("~"); @@ -1601,19 +1672,25 @@ void print_line_and_token(const struct token* p_token, bool visual_studio_ouput_ } if (!visual_studio_ouput_format) - printf(RESET); + COLOR_ESC_PRINT(printf(RESET)); printf("\n"); } +/* End of: token.c */ +/* Start of: hash.c */ + + +/* Start of: hash.h */ //#pragma once unsigned int string_hash(const char* key); +/* End of: hash.h */ unsigned int string_hash(const char* key) { @@ -1632,7 +1709,9 @@ unsigned int string_hash(const char* key) return (hash_val); } +/* End of: hash.c */ +/* Start of: hashmap.c */ #ifdef _WIN32 #endif @@ -1921,8 +2000,9 @@ void* owner owner_hashmap_set(struct owner_hash_map* map, const char* key, const } +/* End of: hashmap.c */ - +/* Start of: console.c */ #ifdef _WIN32 #else @@ -1948,7 +2028,8 @@ bool enable_vt_mode(void) int c_kbhit(void) { - struct termios oldt, newt; + struct termios oldt = {0}; + struct termios newt = {0}; int ch; int oldf; @@ -1976,7 +2057,8 @@ int c_kbhit(void) /* Read 1 character without echo */ int c_getch(void) { - struct termios old, new; + struct termios old = {0}; + struct termios new = {0}; int ch; tcgetattr(0, &old); @@ -1998,7 +2080,7 @@ int c_getch(void) bool enable_vt_mode(void) { //missing in mingw (installed with codeblocs) -#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING #define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 #endif @@ -2031,7 +2113,9 @@ void c_clrscr() fflush(stdout); } +/* End of: console.c */ +/* Start of: tokenizer.c */ /* @@ -2070,9 +2154,6 @@ void c_clrscr() #include -#include - - #include @@ -2082,6 +2163,7 @@ void c_clrscr() #include +/* Start of: fs.h */ //#pragma once @@ -2090,12 +2172,9 @@ void c_clrscr() #include - -#include - #ifdef __CAKE__ -#pragma CAKE diagnostic push -#pragma CAKE diagnostic ignore "-Wstyle" +#pragma cake diagnostic push +#pragma cake diagnostic ignored "-Wstyle" #endif @@ -2104,12 +2183,10 @@ void c_clrscr() #define rmdir _rmdir #define chdir _chdir - #ifdef __CAKE__ -#pragma CAKE diagnostic pop +#pragma cake diagnostic pop #endif - /* opendir, readdir closedir for windows. include dirent.h on linux @@ -2142,7 +2219,7 @@ struct dirent #ifdef __CAKE__ #pragma CAKE diagnostic push -#pragma CAKE diagnostic ignore "-Wstyle" +#pragma CAKE diagnostic ignored "-Wstyle" #endif struct TAGDIR; typedef struct TAGDIR DIR; @@ -2160,7 +2237,7 @@ struct dirent* readdir(DIR* dirp); typedef struct __dirstream DIR; DIR * owner opendir (const char *__name); - +int closedir(DIR* owner dirp); #define MAX_PATH 500 @@ -2185,8 +2262,11 @@ const char* get_posix_error_message(int error); bool path_is_relative(const char* path); bool path_is_absolute(const char* path); +/* End of: fs.h */ + +/* Start of: pre_expressions.h */ //#pragma once struct preprocessor_ctx; @@ -2194,6 +2274,7 @@ struct preprocessor_ctx; int pre_constant_expression(struct preprocessor_ctx* ctx, long long* pvalue); +/* End of: pre_expressions.h */ #ifdef _WIN32 #endif @@ -2214,11 +2295,7 @@ int pre_constant_expression(struct preprocessor_ctx* ctx, long long* pvalue); void naming_convention_macro(struct preprocessor_ctx* ctx, struct token* token); /////////////////////////////////////////////////////////////////////////////// -static bool preprocessor_is_warning_enabled(const struct preprocessor_ctx* ctx, enum warning w) -{ - return - (ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] & w) != 0; -} + struct macro_parameter { @@ -2315,81 +2392,63 @@ static void tokenizer_set_warning(struct tokenizer_ctx* ctx, struct stream* stre #endif } -void preprocessor_set_info_with_token(struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...) + +bool preprocessor_diagnostic_message(enum diagnostic_id w, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...) { -#ifndef TEST - if (p_token) - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); + bool is_error = false; + bool is_warning = false; + bool is_note = false; - char buffer[200] = { 0 }; - va_list args; - va_start(args, fmt); - /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); + if (p_token && p_token->level != 0) + { + //no message for include dir + return false; + } - if (ctx->options.visual_studio_ouput_format) - { - printf("note: " "%s\n", buffer); - } - else - { - printf(LIGHTCYAN "note: " WHITE "%s\n", buffer); - } - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); -#endif + if (w > W_NOTE) + { + is_error = true; + } + else + { + is_error = + (ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors & (1ULL << w)) != 0; -} + is_warning = + (ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings & (1ULL << w)) != 0; -void preprocessor_set_warning_with_token(enum warning w, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...) -{ - if (w != W_NONE) - { - /* - we dont warn ing code inside includes, except #warning (w == 0) - */ - if (p_token->level != 0) - return; + is_note = + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes & (1ULL << w)) != 0); + } - if (!preprocessor_is_warning_enabled(ctx, w)) - { - return; - } - } - ctx->n_warnings++; -#ifndef TEST - if (p_token) - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); - char buffer[200] = { 0 }; - va_list args; - va_start(args, fmt); - /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); - if (ctx->options.visual_studio_ouput_format) - { - printf("warning: " "%s\n", buffer); - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); - } - else - { - printf(LIGHTMAGENTA "warning: " WHITE "%s\n", buffer); - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); + if (is_error) + { + ctx->n_errors++; + } + else if (is_warning) + { + ctx->n_warnings++; + } + else if (is_note) + { + + } + else + { + return false; + } + - } -#endif -} -void preprocessor_set_error_with_token(enum error error, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...) -{ - ctx->n_errors++; #ifndef TEST - if (p_token) + if (p_token && p_token->token_origin) print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); char buffer[200] = { 0 }; @@ -2400,20 +2459,33 @@ void preprocessor_set_error_with_token(enum error error, struct preprocessor_ctx if (ctx->options.visual_studio_ouput_format) { - printf("error: " "%s\n", buffer); + if (is_warning) + printf("warning: " "%s\n", buffer); + else if (is_error) + printf("warning: " "%s\n", buffer); + else if (is_note) + printf("note: " "%s\n", buffer); + + print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); } else { - printf(LIGHTRED"error: " WHITE "%s\n", buffer); - } + if (is_error) + printf(LIGHTRED "error: " WHITE "%s\n", buffer); + else if (is_warning) + printf(LIGHTMAGENTA "warning: " WHITE "%s\n", buffer); + else if (is_note) + printf(LIGHTCYAN "note: " WHITE "%s\n", buffer); + + print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); + } #endif + return true; } - struct include_dir* include_dir_add(struct include_dir_list* list, const char* path) { struct include_dir* owner p_new_include_dir = calloc(1, sizeof * p_new_include_dir); @@ -2432,15 +2504,43 @@ struct include_dir* include_dir_add(struct include_dir_list* list, const char* p return list->tail; } +static char * owner readFilePath(struct preprocessor_ctx* ctx, + const char *current_file_dir, const char *path, + bool* p_already_included, + char full_path_out[], /*this is the final full path of the file*/ + int full_path_out_size) +{ + char newpath[200] = { 0 }; + snprintf(newpath, sizeof newpath, "%s/%s", current_file_dir, path); + +#ifdef __EMSCRIPTEN__ + /*realpath returns empty on emscriptem*/ + snprintf(full_path_out, full_path_out_size, "%s", newpath); +#else + if(!realpath(newpath, full_path_out)) + full_path_out[0] = '\0'; +#endif + + + if (hashmap_find(&ctx->pragma_once_map, full_path_out) != NULL) + { + *p_already_included = true; + return NULL; + } + + return read_file(full_path_out); +} + const char* owner find_and_read_include_file(struct preprocessor_ctx* ctx, const char* path, /*as in include*/ const char* current_file_dir, /*this is the dir of the file that includes*/ bool* p_already_included, /*out file alread included pragma once*/ + bool is_system_include, /* to decide the search order */ char full_path_out[], /*this is the final full path of the file*/ int full_path_out_size) { - + char* owner content; full_path_out[0] = '\0'; if (path_is_absolute(path)) @@ -2462,28 +2562,15 @@ const char* owner find_and_read_include_file(struct preprocessor_ctx* ctx, } - - char newpath[200] = { 0 }; - snprintf(newpath, sizeof newpath, "%s/%s", current_file_dir, path); - -#ifdef __EMSCRIPTEN__ - /*realpath returns empty on emscriptem*/ - snprintf(full_path_out, full_path_out_size, "%s", newpath); -#else - realpath(newpath, full_path_out); -#endif - - - if (hashmap_find(&ctx->pragma_once_map, full_path_out) != NULL) - { - *p_already_included = true; - return NULL; - } - - char* owner content = read_file(full_path_out); - if (content != NULL) - return content; - + if(!is_system_include) + { + content = readFilePath(ctx, current_file_dir, path, + p_already_included, full_path_out, full_path_out_size); + if (content != NULL) + return content; + if (*p_already_included) + return NULL; + } struct include_dir* current = ctx->include_dir.head; while (current) @@ -2511,6 +2598,15 @@ const char* owner find_and_read_include_file(struct preprocessor_ctx* ctx, } current = current->next; } + if(is_system_include) + { + content = readFilePath(ctx, current_file_dir, path, + p_already_included, full_path_out, full_path_out_size); + if (content != NULL) + return content; + if (*p_already_included) + return NULL; + } full_path_out[0] = '\0'; return NULL; } @@ -3385,11 +3481,11 @@ struct token* owner ppnumber(struct stream* stream) (stream->current[1] == '+' || stream->current[1] == '-')) { stream_match(stream);//e E p P - stream_match(stream);//sign + stream_match(stream);//sign } else if (stream->current[0] == '.') { - stream_match(stream);//. + stream_match(stream);//. } else if (is_digit(stream) || is_nondigit(stream)) { @@ -3425,15 +3521,15 @@ struct token_list embed_tokenizer(struct preprocessor_ctx* ctx, const char* file file = (FILE * owner)fopen(filename_opt, "rb"); if (file == NULL) { - preprocessor_set_error_with_token(C_FILE_NOT_FOUND, ctx, ctx->current, "file '%s' not found", filename_opt); + preprocessor_diagnostic_message(ERROR_FILE_NOT_FOUND, ctx, ctx->current, "file '%s' not found", filename_opt); throw; } #else /*web versions only text files that are included*/ - const char* textfile = read_file(filename_opt); + char* textfile = read_file(filename_opt); if (textfile == NULL) { - preprocessor_set_error_with_token(C_FILE_NOT_FOUND, ctx, ctx->current, "file '%s' not found", filename_opt); + preprocessor_diagnostic_message(ERROR_FILE_NOT_FOUND, ctx, ctx->current, "file '%s' not found", filename_opt); throw; } @@ -3449,7 +3545,7 @@ struct token_list embed_tokenizer(struct preprocessor_ctx* ctx, const char* file { ch = *pch; pch++; -#endif +#endif if (b_first) { b_first = false; @@ -3492,7 +3588,7 @@ struct token_list embed_tokenizer(struct preprocessor_ctx* ctx, const char* file count++; } -#ifdef MOCKFILES +#ifdef MOCKFILES free(textfile); #endif } @@ -3572,7 +3668,7 @@ struct token_list tokenizer(struct tokenizer_ctx* ctx, const char* text, const c //windows have case insensive paths for (char* p = p_new->lexeme; *p; p++) { - *p = tolower(*p); + *p = (char)tolower(*p); } #endif p_new->level = level; @@ -4136,7 +4232,7 @@ struct token_list process_defined(struct preprocessor_ctx* ctx, struct token_lis { if (input_list->head->type != ')') { - preprocessor_set_error_with_token(C_MISSING_CLOSE_PARENTHESIS, ctx, input_list->head, "missing )"); + preprocessor_diagnostic_message(ERROR_MISSING_CLOSE_PARENTHESIS, ctx, input_list->head, "missing )"); throw; } token_list_pop_front(input_list); @@ -4171,7 +4267,7 @@ struct token_list process_defined(struct preprocessor_ctx* ctx, struct token_lis strcat(path, input_list->head->lexeme); token_list_pop_front(input_list); //pop ( } - token_list_pop_front(input_list); //pop > + token_list_pop_front(input_list); //pop > } char fullpath[300] = { 0 }; @@ -4183,7 +4279,7 @@ struct token_list process_defined(struct preprocessor_ctx* ctx, struct token_lis const char* owner s = find_and_read_include_file(ctx, path, fullpath, - &already_included, + &already_included, false, full_path_result, sizeof full_path_result); @@ -4213,7 +4309,7 @@ struct token_list process_defined(struct preprocessor_ctx* ctx, struct token_lis strcat(path, input_list->head->lexeme); token_list_pop_front(input_list); //pop ( } - token_list_pop_front(input_list); //pop > + token_list_pop_front(input_list); //pop > /*nodiscard * The __has_c_attribute conditional inclusion expression (6.10.1) shall @@ -4406,7 +4502,7 @@ long long preprocessor_constant_expression(struct preprocessor_ctx* ctx, long long value = 0; if (pre_constant_expression(&pre_ctx, &value) != 0) { - preprocessor_set_error_with_token(C_EXPRESSION_ERROR, ctx, first, "expression error"); + preprocessor_diagnostic_message(ERROR_EXPRESSION_ERROR, ctx, first, "expression error"); } ctx->conditional_inclusion = false; @@ -4444,9 +4540,9 @@ int match_token_level(struct token_list* dest, struct token_list* input_list, en else { if (input_list->head) - preprocessor_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, input_list->head, "expected token %s got %s\n", get_token_name(type), get_token_name(input_list->head->type)); + preprocessor_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, input_list->head, "expected token %s got %s\n", get_token_name(type), get_token_name(input_list->head->type)); else - preprocessor_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, dest->tail, "expected EOF \n"); + preprocessor_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, dest->tail, "expected EOF \n"); throw; } @@ -4531,7 +4627,7 @@ struct token_list if_group(struct preprocessor_ctx* ctx, struct token_list* inpu else { - preprocessor_set_error_with_token(C_UNEXPECTED, ctx, input_list->head, "unexpected"); + preprocessor_diagnostic_message(C_UNEXPECTED, ctx, input_list->head, "unexpected"); throw; } struct token_list r2 = group_opt(ctx, input_list, is_active && *p_result, level); @@ -4815,7 +4911,7 @@ struct token_list replacement_list(struct preprocessor_ctx* ctx, struct macro* m struct token_list pp_tokens_opt(struct preprocessor_ctx* ctx, struct token_list* input_list, int level) { struct token_list r = { 0 }; - while (input_list->head->type != TK_NEWLINE) + while (input_list->head && input_list->head->type != TK_NEWLINE) { prematch_level(&r, input_list, level); } @@ -4931,6 +5027,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* match_token_level(&r, input_list, TK_NEWLINE, level, ctx); path[strlen(path) - 1] = '\0'; + bool is_system_included = path[0] == '<'; /*this is the dir of the current file*/ char current_file_dir[300] = { 0 }; @@ -4944,6 +5041,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* path + 1, current_file_dir, &already_included, + is_system_included, full_path_result, sizeof full_path_result); @@ -4970,12 +5068,12 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* { if (!already_included) { - preprocessor_set_error_with_token(C_FILE_NOT_FOUND, ctx, r.tail, "file %s not found", path + 1); + preprocessor_diagnostic_message(ERROR_FILE_NOT_FOUND, ctx, r.tail, "file %s not found", path + 1); for (struct include_dir* p = ctx->include_dir.head; p; p = p->next) { /*let's print the include path*/ - preprocessor_set_info_with_token(ctx, r.tail, "dir = '%s'", p->path); + preprocessor_diagnostic_message(W_NOTE, ctx, r.tail, "dir = '%s'", p->path); } } else @@ -5075,7 +5173,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* struct macro* owner macro = calloc(1, sizeof * macro); if (macro == NULL) { - preprocessor_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "out of mem"); + preprocessor_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "out of mem"); throw; } @@ -5107,6 +5205,11 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* macro->name = strdup(input_list->head->lexeme); struct macro* owner previous = owner_hashmap_set(&ctx->macros, input_list->head->lexeme, (void* owner)macro, 0); + + + /*macro still alive...but flow analsys will (correclty) think it is not*/ + + if (previous) { delete_macro(previous); @@ -5144,7 +5247,16 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* skip_blanks_level(ctx, &r, input_list, level); } else +#ifdef __CAKE__ +#pragma cake diagnostic push +#pragma cake diagnostic ignored "-Wuninitialized" +#endif + /* + flow analysys says macro is unitialized, this is because it has been moved + to a map, but we know it still exist. A refactroing map returning a view solve. + */ { + struct token_list r3 = identifier_list(ctx, macro, input_list, level); token_list_append_list(&r, &r3); token_list_destroy(&r3); @@ -5167,6 +5279,9 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* skip_blanks_level(ctx, &r, input_list, level); match_token_level(&r, input_list, ')', level, ctx); } +#ifdef __CAKE__ +#pragma cake diagnostic pop +#endif } else { @@ -5178,15 +5293,16 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* token_list_destroy(&r4); match_token_level(&r, input_list, TK_NEWLINE, level, ctx); - +#ifdef CAKE_ASSERT_IS_KEYWORD if (strcmp(macro->name, "assert") == 0) { // TODO create option for this? - // Cake overrides the definition of macro to be + // Cake overrides the definition of macro to be // #define assert(...) assert(__VA_ARGS__) // and assert is a keyword. The reason is the send // information to the static analyzer + //TODO detect GCC ((void)0) if (!is_empty_assert(¯o->replacement_list)) { @@ -5201,6 +5317,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* macro->replacement_list = tokenizer(&tctx, "assert(__VA_ARGS__)", NULL, level, TK_FLAG_NONE); } } +#endif if (macro_name_token) naming_convention_macro(ctx, macro_name_token); @@ -5247,7 +5364,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* ctx->n_warnings++; match_token_level(&r, input_list, TK_IDENTIFIER, level, ctx);//error struct token_list r6 = pp_tokens_opt(ctx, input_list, level); - preprocessor_set_error_with_token(C_PREPROCESSOR_ERROR_DIRECTIVE, ctx, input_list->head, "#error"); + preprocessor_diagnostic_message(ERROR_PREPROCESSOR_ERROR_DIRECTIVE, ctx, input_list->head, "#error"); token_list_append_list(&r, &r6); token_list_destroy(&r6); match_token_level(&r, input_list, TK_NEWLINE, level, ctx); @@ -5269,7 +5386,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* match_token_level(&r, input_list, TK_IDENTIFIER, level, ctx);//warning struct token_list r6 = pp_tokens_opt(ctx, input_list, level); - preprocessor_set_warning_with_token(W_NONE, ctx, input_list->head, "#warning"); + preprocessor_diagnostic_message(W_NONE, ctx, input_list->head, "#warning"); token_list_append_list(&r, &r6); match_token_level(&r, input_list, TK_NEWLINE, level, ctx); token_list_destroy(&r6); @@ -5334,21 +5451,22 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* { match_token_level(&r, input_list, TK_IDENTIFIER, level, ctx);//diagnostic //#pragma GCC diagnostic push - if (ctx->options.enabled_warnings_stack_top_index < - sizeof(ctx->options.enabled_warnings_stack) / sizeof(ctx->options.enabled_warnings_stack[0])) + if (ctx->options.diagnostic_stack_top_index < + sizeof(ctx->options.diagnostic_stack) / sizeof(ctx->options.diagnostic_stack[0])) { - ctx->options.enabled_warnings_stack_top_index++; - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index - 1]; + ctx->options.diagnostic_stack_top_index++; + + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index] = + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index - 1]; } } else if (input_list->head && strcmp(input_list->head->lexeme, "pop") == 0) { //#pragma GCC diagnostic pop match_token_level(&r, input_list, TK_IDENTIFIER, level, ctx);//pop - if (ctx->options.enabled_warnings_stack_top_index > 0) + if (ctx->options.diagnostic_stack_top_index > 0) { - ctx->options.enabled_warnings_stack_top_index--; + ctx->options.diagnostic_stack_top_index--; } } else if (input_list->head && strcmp(input_list->head->lexeme, "warning") == 0) @@ -5362,8 +5480,8 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* { match_token_level(&r, input_list, TK_STRING_LITERAL, level, ctx);//"" - enum warning w = get_warning_flag(input_list->head->lexeme + 1 + 2); - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] |= w; + unsigned long long w = get_warning_bit_mask(input_list->head->lexeme + 1 + 2); + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings |= w; } } else if (input_list->head && strcmp(input_list->head->lexeme, "ignore") == 0) @@ -5375,8 +5493,8 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* if (input_list->head && input_list->head->type == TK_STRING_LITERAL) { - enum warning w = get_warning_flag(input_list->head->lexeme + 1 + 2); - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] &= ~w; + unsigned long long w = get_warning_bit_mask(input_list->head->lexeme + 1 + 2); + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings &= ~w; } } } @@ -5474,7 +5592,7 @@ static struct macro_argument_list collect_macro_arguments(struct preprocessor_ct } else { - preprocessor_set_error_with_token(C_TOO_FEW_ARGUMENTS_TO_FUNCTION_LIKE_MACRO, ctx, macro_name_token, "too few arguments provided to function-like macro invocation\n"); + preprocessor_diagnostic_message(ERROR_TOO_FEW_ARGUMENTS_TO_FUNCTION_LIKE_MACRO, ctx, macro_name_token, "too few arguments provided to function-like macro invocation\n"); throw; } } @@ -5505,7 +5623,7 @@ static struct macro_argument_list collect_macro_arguments(struct preprocessor_ct p_current_parameter = p_current_parameter->next; if (p_current_parameter == NULL) { - preprocessor_set_error_with_token(C_MACRO_INVALID_ARG, ctx, macro_name_token, "invalid args"); + preprocessor_diagnostic_message(ERROR_PREPROCESSOR_MACRO_INVALID_ARG, ctx, macro_name_token, "invalid args"); macro_argument_delete(p_argument); p_argument = NULL; //DELETED throw; @@ -5562,7 +5680,7 @@ static struct token_list concatenate(struct preprocessor_ctx* ctx, struct token_ { if (r.tail == NULL) { - preprocessor_set_error_with_token(C_MISSING_MACRO_ARGUMENT, ctx, input_list->head, "missing macro argument (should be checked before)"); + preprocessor_diagnostic_message(ERROR_PREPROCESSOR_MISSING_MACRO_ARGUMENT, ctx, input_list->head, "missing macro argument (should be checked before)"); break; } /* @@ -5745,7 +5863,7 @@ static struct token_list replace_macro_arguments(struct preprocessor_ctx* ctx, s if (s == NULL) { token_list_destroy(&argumentlist); - preprocessor_set_error_with_token(C_UNEXPECTED, ctx, input_list->head, "unexpected"); + preprocessor_diagnostic_message(C_UNEXPECTED, ctx, input_list->head, "unexpected"); throw; } struct token* owner p_new_token = calloc(1, sizeof * p_new_token); @@ -6361,13 +6479,12 @@ static struct token_list text_line(struct preprocessor_ctx* ctx, struct token_li */ if (input_list->head->type == TK_STRING_LITERAL) { - if (preprocessor_is_warning_enabled(ctx, W_STRING_SLICED)) - preprocessor_set_info_with_token(ctx, input_list->head, "you can use \"adjacent\" \"strings\""); + preprocessor_diagnostic_message(W_NOTE, ctx, input_list->head, "you can use \"adjacent\" \"strings\""); } else if (input_list->head->type == TK_LINE_COMMENT) - preprocessor_set_warning_with_token(W_COMMENT, ctx, input_list->head, "multi-line //comment"); + preprocessor_diagnostic_message(W_COMMENT, ctx, input_list->head, "multi-line //comment"); else - preprocessor_set_warning_with_token(W_LINE_SLICING, ctx, input_list->head, "unnecessary line-slicing"); + preprocessor_diagnostic_message(W_LINE_SLICING, ctx, input_list->head, "unnecessary line-slicing"); } bool blanks = token_is_blank(input_list->head) || input_list->head->type == TK_NEWLINE; @@ -6555,11 +6672,13 @@ void check_unused_macros(struct owner_hash_map* map) void include_config_header(struct preprocessor_ctx* ctx) { - char executable_path[MAX_PATH] = { 0 }; +#define CAKE_CFG_FNAME "/cakeconfig.h" + char executable_path[MAX_PATH - sizeof(CAKE_CFG_FNAME)] = { 0 }; get_self_path(executable_path, sizeof(executable_path)); dirname(executable_path); char path[MAX_PATH] = { 0 }; - snprintf(path, sizeof path, "%s/cakeconfig.h", executable_path); + snprintf(path, sizeof path, "%s" CAKE_CFG_FNAME, executable_path); +#undef CAKE_CFG_FNAME /* * windows echo %INCLUDE% @@ -6570,8 +6689,8 @@ void include_config_header(struct preprocessor_ctx* ctx) char* owner str = read_file(path); - const enum warning w = - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index]; + const enum diagnostic_id w = + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings; @@ -6584,7 +6703,7 @@ void include_config_header(struct preprocessor_ctx* ctx) token_list_destroy(&l10); /*restore*/ - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = w; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings = w; } void add_standard_macros(struct preprocessor_ctx* ctx) @@ -6593,11 +6712,12 @@ void add_standard_macros(struct preprocessor_ctx* ctx) This command prints all macros used by gcc echo | gcc -dM -E - */ - const enum warning w = - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index]; + const struct diagnostic w = + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index]; /*we dont want warnings here*/ - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = W_NONE; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index] = + (struct diagnostic){0}; static char mon[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", @@ -6640,6 +6760,7 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define __COUNT__ 0\n" "#define _CONSOLE\n" "#define __STDC_OWNERSHIP__\n" + "#define _W_DIVIZION_BY_ZERO_ 29\n" #ifdef WIN32 @@ -6650,7 +6771,7 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define _WIN32 " TOSTRING(_WIN32) "\n" #endif -#ifdef _WIN64 +#ifdef _WIN64 "#define _WIN64 " TOSTRING(_WIN64) "\n" #endif @@ -6664,7 +6785,7 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define __pragma(a)\n" "#define __declspec(a)\n" "#define __crt_va_start(X) \n" - "#define __builtin_offsetof(type, member) 0\n"; //como nao defini msver ele pensa que eh gcc aqui + "#define __builtin_offsetof(type, member) 0\n"; #endif @@ -6676,8 +6797,9 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define __builtin_va_list\n" "#define __builtin_va_start(a, b)\n" "#define __builtin_va_end(a)\n" - "#define __builtin_va_arg(a, b)\n" + "#define __builtin_va_arg(a, b) ((b)a)\n" "#define __builtin_va_copy(a, b)\n" + "#define __builtin_offsetof(type, member) 0\n" "#define __CHAR_BIT__ " TOSTRING(__CHAR_BIT__) "\n" "#define __SIZE_TYPE__ " TOSTRING(__SIZE_TYPE__) "\n" @@ -6714,6 +6836,17 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define __INTPTR_TYPE__ " TOSTRING(__INTPTR_TYPE__) "\n" "#define __UINTPTR_TYPE__ " TOSTRING(__UINTPTR_TYPE__) "\n" + "#define __DBL_MAX__ " TOSTRING(__DBL_MAX__) "\n" + "#define __DBL_MIN__ " TOSTRING(__DBL_MIN__) "\n" + "#define __FLT_RADIX__ " TOSTRING(__FLT_RADIX__) "\n" + "#define __FLT_EPSILON__ " TOSTRING(__FLT_EPSILON__) "\n" + "#define __DBL_EPSILON__ " TOSTRING(__DBL_EPSILON__) "\n" + "#define __LDBL_EPSILON__ " TOSTRING(__LDBL_EPSILON__) "\n" + "#define __DBL_DECIMAL_DIG__ " TOSTRING(__DBL_DECIMAL_DIG__) "\n" + "#define __FLT_EVAL_METHOD__ " TOSTRING(__FLT_EVAL_METHOD__) "\n" + "#define __FLT_RADIX__ " TOSTRING(__FLT_RADIX__) "\n" + + "#define __SCHAR_MAX__ " TOSTRING(__SCHAR_MAX__) "\n" "#define __WCHAR_MAX__ " TOSTRING(__WCHAR_MAX__) "\n" "#define __SHRT_MAX__ " TOSTRING(__SHRT_MAX__) "\n" @@ -6813,7 +6946,7 @@ void add_standard_macros(struct preprocessor_ctx* ctx) token_list_destroy(&l10); /*restore*/ - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = w; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index] = w; } @@ -6823,9 +6956,9 @@ const char* get_token_name(enum token_type tk) { switch (tk) { - case TK_NONE: return "NONE"; - case TK_NEWLINE: return "NEWLINE"; - case TK_WHITE_SPACE: return "SPACE"; + case TK_NONE: return "TK_NONE"; + case TK_NEWLINE: return "TK_NEWLINE"; + case TK_WHITE_SPACE: return "TK_WHITE_SPACE"; case TK_EXCLAMATION_MARK: return "TK_EXCLAMATION_MARK"; case TK_QUOTATION_MARK: return "TK_QUOTATION_MARK"; case TK_NUMBER_SIGN: return "TK_NUMBER_SIGN"; @@ -6859,11 +6992,16 @@ const char* get_token_name(enum token_type tk) case TK_RIGHT_CURLY_BRACKET: return "TK_RIGHT_CURLY_BRACKET"; case TK_TILDE: return "TK_TILDE"; case TK_PREPROCESSOR_LINE: return "TK_PREPROCESSOR_LINE"; + case TK_PRAGMA: return "TK_PRAGMA"; case TK_STRING_LITERAL: return "TK_STRING_LITERAL"; + case TK_CHAR_CONSTANT: return "TK_CHAR_CONSTANT"; case TK_LINE_COMMENT: return "TK_LINE_COMMENT"; - case TK_COMMENT: return "TK_COMENT"; + case TK_COMMENT: return "TK_COMMENT"; case TK_PPNUMBER: return "TK_PPNUMBER"; - case ANY_OTHER_PP_TOKEN: return "ANY_OTHER_PP_TOKEN"; + + case ANY_OTHER_PP_TOKEN: return "ANY_OTHER_PP_TOKEN"; //@ por ex + + /*PPNUMBER sao convertidos para constantes antes do parse*/ case TK_COMPILER_DECIMAL_CONSTANT: return "TK_COMPILER_DECIMAL_CONSTANT"; case TK_COMPILER_OCTAL_CONSTANT: return "TK_COMPILER_OCTAL_CONSTANT"; case TK_COMPILER_HEXADECIMAL_CONSTANT: return "TK_COMPILER_HEXADECIMAL_CONSTANT"; @@ -6871,7 +7009,9 @@ const char* get_token_name(enum token_type tk) case TK_COMPILER_DECIMAL_FLOATING_CONSTANT: return "TK_COMPILER_DECIMAL_FLOATING_CONSTANT"; case TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT: return "TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT"; + case TK_PLACEMARKER: return "TK_PLACEMARKER"; + case TK_BLANKS: return "TK_BLANKS"; case TK_PLUSPLUS: return "TK_PLUSPLUS"; case TK_MINUSMINUS: return "TK_MINUSMINUS"; @@ -6880,10 +7020,15 @@ const char* get_token_name(enum token_type tk) case TK_SHIFTRIGHT: return "TK_SHIFTRIGHT"; case TK_LOGICAL_OPERATOR_OR: return "TK_LOGICAL_OPERATOR_OR"; case TK_LOGICAL_OPERATOR_AND: return "TK_LOGICAL_OPERATOR_AND"; + case TK_MACRO_CONCATENATE_OPERATOR: return "TK_MACRO_CONCATENATE_OPERATOR"; + case TK_IDENTIFIER: return "TK_IDENTIFIER"; - case TK_IDENTIFIER_RECURSIVE_MACRO: return "TK_IDENTIFIER_RECURSIVE_MACRO"; + case TK_IDENTIFIER_RECURSIVE_MACRO: return "TK_IDENTIFIER_RECURSIVE_MACRO"; /*usado para evitar recursao expansao macro*/ + case TK_BEGIN_OF_FILE: return "TK_BEGIN_OF_FILE"; + + //C23 keywords case TK_KEYWORD_AUTO: return "TK_KEYWORD_AUTO"; case TK_KEYWORD_BREAK: return "TK_KEYWORD_BREAK"; case TK_KEYWORD_CASE: return "TK_KEYWORD_CASE"; @@ -6891,8 +7036,10 @@ const char* get_token_name(enum token_type tk) case TK_KEYWORD_CHAR: return "TK_KEYWORD_CHAR"; case TK_KEYWORD_CONST: return "TK_KEYWORD_CONST"; case TK_KEYWORD_CONTINUE: return "TK_KEYWORD_CONTINUE"; + case TK_KEYWORD_CATCH: return "TK_KEYWORD_CATCH"; /*extension*/ case TK_KEYWORD_DEFAULT: return "TK_KEYWORD_DEFAULT"; case TK_KEYWORD_DO: return "TK_KEYWORD_DO"; + case TK_KEYWORD_DEFER: return "TK_KEYWORD_DEFER"; /*extension*/ case TK_KEYWORD_DOUBLE: return "TK_KEYWORD_DOUBLE"; case TK_KEYWORD_ELSE: return "TK_KEYWORD_ELSE"; case TK_KEYWORD_ENUM: return "TK_KEYWORD_ENUM"; @@ -6908,27 +7055,35 @@ const char* get_token_name(enum token_type tk) case TK_KEYWORD__INT16: return "TK_KEYWORD__INT16"; case TK_KEYWORD__INT32: return "TK_KEYWORD__INT32"; case TK_KEYWORD__INT64: return "TK_KEYWORD__INT64"; + case TK_KEYWORD_REGISTER: return "TK_KEYWORD_REGISTER"; case TK_KEYWORD_RESTRICT: return "TK_KEYWORD_RESTRICT"; case TK_KEYWORD_RETURN: return "TK_KEYWORD_RETURN"; case TK_KEYWORD_SHORT: return "TK_KEYWORD_SHORT"; case TK_KEYWORD_SIGNED: return "TK_KEYWORD_SIGNED"; case TK_KEYWORD_SIZEOF: return "TK_KEYWORD_SIZEOF"; - case TK_KEYWORD_STATIC_DEBUG: return "TK_KEYWORD_STATIC_DEBUG"; - case TK_KEYWORD_STATIC_STATE: return "TK_KEYWORD_STATIC_STATE"; - case TK_KEYWORD_STATIC_SET: return "TK_KEYWORD_STATIC_SET"; + case TK_KEYWORD_STATIC: return "TK_KEYWORD_STATIC"; case TK_KEYWORD_STRUCT: return "TK_KEYWORD_STRUCT"; case TK_KEYWORD_SWITCH: return "TK_KEYWORD_SWITCH"; case TK_KEYWORD_TYPEDEF: return "TK_KEYWORD_TYPEDEF"; + case TK_KEYWORD_TRY: return "TK_KEYWORD_TRY"; /*extension*/ + case TK_KEYWORD_THROW: return "TK_KEYWORD_THROW"; /*extension*/ case TK_KEYWORD_UNION: return "TK_KEYWORD_UNION"; case TK_KEYWORD_UNSIGNED: return "TK_KEYWORD_UNSIGNED"; case TK_KEYWORD_VOID: return "TK_KEYWORD_VOID"; case TK_KEYWORD_VOLATILE: return "TK_KEYWORD_VOLATILE"; case TK_KEYWORD_WHILE: return "TK_KEYWORD_WHILE"; + case TK_KEYWORD__ALIGNAS: return "TK_KEYWORD__ALIGNAS"; case TK_KEYWORD__ALIGNOF: return "TK_KEYWORD__ALIGNOF"; case TK_KEYWORD__ATOMIC: return "TK_KEYWORD__ATOMIC"; + //microsoft + //KEYWORD__FASTCALL, + //KEYWORD__STDCALL + // + case TK_KEYWORD__ASM: return "TK_KEYWORD__ASM"; + //end microsoft case TK_KEYWORD__BOOL: return "TK_KEYWORD__BOOL"; case TK_KEYWORD__COMPLEX: return "TK_KEYWORD__COMPLEX"; case TK_KEYWORD__DECIMAL128: return "TK_KEYWORD__DECIMAL128"; @@ -6938,23 +7093,50 @@ const char* get_token_name(enum token_type tk) case TK_KEYWORD__IMAGINARY: return "TK_KEYWORD__IMAGINARY"; case TK_KEYWORD__NORETURN: return "TK_KEYWORD__NORETURN"; case TK_KEYWORD__STATIC_ASSERT: return "TK_KEYWORD__STATIC_ASSERT"; + case TK_KEYWORD_ASSERT: return "TK_KEYWORD_ASSERT"; /*extension*/ case TK_KEYWORD__THREAD_LOCAL: return "TK_KEYWORD__THREAD_LOCAL"; - case TK_KEYWORD_TYPEOF: return "TK_KEYWORD_TYPEOF"; + case TK_KEYWORD_TYPEOF: return "TK_KEYWORD_TYPEOF"; /*C23*/ - case TK_KEYWORD_TRUE: return "TK_KEYWORD_TRUE"; - case TK_KEYWORD_FALSE: return "TK_KEYWORD_FALSE"; - case TK_KEYWORD_NULLPTR: return "TK_KEYWORD_NULLPTR"; - case TK_KEYWORD_DEFER: return "TK_KEYWORD_DEFER"; - case TK_KEYWORD__BITINT: return "TK_KEYWORD__BITINT"; - case TK_KEYWORD__ASM: return "TK_KEYWORD__ASM"; - case TK_KEYWORD_CATCH: return "TK_KEYWORD_CATCH"; - case TK_KEYWORD_TRY: return "TK_KEYWORD_TRY"; - case TK_KEYWORD_THROW: return "TK_KEYWORD_THROW"; + case TK_KEYWORD_TRUE: return "TK_KEYWORD_TRUE"; /*C23*/ + case TK_KEYWORD_FALSE: return "TK_KEYWORD_FALSE"; /*C23*/ + case TK_KEYWORD_NULLPTR: return "TK_KEYWORD_NULLPTR"; /*C23*/ + case TK_KEYWORD_TYPEOF_UNQUAL: return "TK_KEYWORD_TYPEOF_UNQUAL"; /*C23*/ + case TK_KEYWORD__BITINT: return "TK_KEYWORD__BITINT"; /*C23*/ - case TK_KEYWORD_TYPEOF_UNQUAL: return "TK_KEYWORD_TYPEOF_UNQUAL"; + + + /*cake extension*/ + case TK_KEYWORD__OWNER: return "TK_KEYWORD__OWNER"; + case TK_KEYWORD__OUT: return "TK_KEYWORD__OUT"; + case TK_KEYWORD__OBJ_OWNER: return "TK_KEYWORD__OBJ_OWNER"; + case TK_KEYWORD__VIEW: return "TK_KEYWORD__VIEW"; + case TK_KEYWORD__OPT: return "TK_KEYWORD__OPT"; + + /*extension compile time functions*/ + case TK_KEYWORD_STATIC_DEBUG: return "TK_KEYWORD_STATIC_DEBUG"; /*extension*/ + case TK_KEYWORD_STATIC_STATE: return "TK_KEYWORD_STATIC_STATE"; /*extension*/ + case TK_KEYWORD_STATIC_SET: return "TK_KEYWORD_STATIC_SET"; /*extension*/ + case TK_KEYWORD_ATTR_ADD: return "TK_KEYWORD_ATTR_ADD"; /*extension*/ + case TK_KEYWORD_ATTR_REMOVE: return "TK_KEYWORD_ATTR_REMOVE"; /*extension*/ + case TK_KEYWORD_ATTR_HAS: return "TK_KEYWORD_ATTR_HAS"; /*extension*/ + + /*https://en.cppreference.com/w/cpp/header/type_traits*/ + + case TK_KEYWORD_IS_POINTER: return "TK_KEYWORD_IS_POINTER"; + case TK_KEYWORD_IS_LVALUE: return "TK_KEYWORD_IS_LVALUE"; + case TK_KEYWORD_IS_CONST: return "TK_KEYWORD_IS_CONST"; + case TK_KEYWORD_IS_OWNER: return "TK_KEYWORD_IS_OWNER"; + case TK_KEYWORD_IS_ARRAY: return "TK_KEYWORD_IS_ARRAY"; + case TK_KEYWORD_IS_FUNCTION: return "TK_KEYWORD_IS_FUNCTION"; + case TK_KEYWORD_IS_SCALAR: return "TK_KEYWORD_IS_SCALAR"; + case TK_KEYWORD_IS_ARITHMETIC: return "TK_KEYWORD_IS_ARITHMETIC"; + case TK_KEYWORD_IS_FLOATING_POINT: return "TK_KEYWORD_IS_FLOATING_POINT"; + case TK_KEYWORD_IS_INTEGRAL: return "TK_KEYWORD_IS_INTEGRAL"; + + default: + return "TK_X_MISSING_NAME"; } - assert(false); return ""; }; @@ -7231,11 +7413,7 @@ static bool is_screaming_case(const char* text) if (text == NULL) return true; - if (!(text[0] >= 'A' && text[0] <= 'Z')) - { - /*first letter lower case*/ - return false; - } + bool screaming_case = false; while (*text) { @@ -7244,14 +7422,14 @@ static bool is_screaming_case(const char* text) (*text == '_')) { //ok + screaming_case = true; } else return false; text++; } - return true; - + return screaming_case; } void print_all_macros(struct preprocessor_ctx* prectx) @@ -7293,14 +7471,11 @@ void print_all_macros(struct preprocessor_ctx* prectx) } void naming_convention_macro(struct preprocessor_ctx* ctx, struct token* token) { - if (!preprocessor_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!is_screaming_case(token->lexeme)) { - preprocessor_set_info_with_token(ctx, token, "use SCREAMING_CASE for macros"); + preprocessor_diagnostic_message(W_NOTE, ctx, token, "use SCREAMING_CASE for macros"); } } @@ -7309,6 +7484,7 @@ void naming_convention_macro(struct preprocessor_ctx* ctx, struct token* token) #ifdef TEST +/* Start of: unit_test.h */ //#pragma once extern int g_unit_test_error_count; @@ -7349,6 +7525,7 @@ static void assert_func(int condition, const char* func, const char* file, int l #define assert(expression) assert_func(expression, __func__, __FILE__, __LINE__, #expression) +/* End of: unit_test.h */ void print_asserts(struct token* p_token) @@ -8431,7 +8608,9 @@ int test_line_continuation() #endif +/* End of: tokenizer.c */ +/* Start of: osstream.c */ void ss_swap(view struct osstream* a, view struct osstream* b) { @@ -8528,7 +8707,9 @@ int ss_fprintf(struct osstream* stream, const char* fmt, ...) } +/* End of: osstream.c */ +/* Start of: fs.c */ @@ -8563,7 +8744,7 @@ caso nao tenha este arquivos apt-get install uuid-dev bool path_is_absolute(const char* path) { #ifdef _WINDOWS_ - const char ch = tolower(path[0]); + const char ch = (char)tolower(path[0]); if (ch >= 'a' && ch <= 'z') { /* c:/ or c:\ */ @@ -8593,7 +8774,7 @@ bool path_is_relative(const char* path) #ifdef __CAKE__ #pragma CAKE diagnostic push -#pragma CAKE diagnostic ignore "-Wstyle" +#pragma CAKE diagnostic ignored "-Wstyle" #endif struct TAGDIR @@ -8694,12 +8875,15 @@ char* realpath(const char* restrict path, char* restrict resolved_path) created absolute path name (absPath) is greater than maxLength), the function returns NULL. */ char* p = _fullpath(resolved_path, path, MAX_PATH); - char* p2 = resolved_path; - while (*p2) + if(p) { - if (*p2 == '\\') - *p2 = '/'; - p2++; + char* p2 = resolved_path; + while (*p2) + { + if (*p2 == '\\') + *p2 = '/'; + p2++; + } } return p; } @@ -8753,6 +8937,7 @@ int copy_file(const char* pathfrom, const char* pathto) int copy_folder(const char* from, const char* to) { +#if !defined __EMSCRIPTEN__ int errcode = mkdir(to, 0700); if (errcode != 0) { @@ -8796,6 +8981,9 @@ int copy_folder(const char* from, const char* to) closedir(dir); return errcode; +#else + return -1; +#endif } #ifdef _WIN32 @@ -9471,7 +9659,7 @@ const char* file_ownership_h = "#define owner _Owner\n" "#define obj_owner _Obj_owner\n" "#define view _View\n" - "#define unchecked \"unchecked\"\n" + "\n" "#else\n" "#define out \n" @@ -9481,7 +9669,7 @@ const char* file_ownership_h = "#define view\n" "#define static_debug(x)\n" "#define static_set(x, s)\n" - "#define unchecked\n" + "#endif\n" "\n" "#endif\n" @@ -9515,25 +9703,22 @@ char* owner read_file(const char* path) +/* End of: fs.c */ +/* Start of: options.c */ -bool is_ownership_error(enum error e) -{ - switch (e) - { - case C_OWNERSHIP_MISSING_OWNER_QUALIFIER: - case C_OWNERSHIP_NOT_OWNER: - case C_OWNERSHIP_USING_TEMPORARY_OWNER: - case C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER: - case C_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN: - case C_OWNERSHIP_FLOW_MISSING_DTOR: - return true; - } - return false; -} + +struct diagnostic default_diagnostic = { + + .warnings = (~0ULL) & ~( + (1ULL << W_NOTE) | + (1ULL << W_STYLE) | + (1ULL << W_UNUSED_PARAMETER) | + (1ULL << W_UNUSED_VARIABLE)) +}; static struct w { - enum warning w; + enum diagnostic_id w; const char* name; } s_warnings[] = { @@ -9548,12 +9733,54 @@ s_warnings[] = { {W_ATTRIBUTES, "attributes"}, {W_UNUSED_VALUE, "unused-value"}, {W_STYLE, "style"}, + {W_COMMENT,"comment"}, + {W_LINE_SLICING,"line-slicing"}, + + {W_DISCARDED_QUALIFIERS, "discarded-qualifiers"}, {W_UNINITIALZED, "uninitialized"}, - {W_RETURN_LOCAL_ADDR, "return-local-addr"} + {W_RETURN_LOCAL_ADDR, "return-local-addr"}, + {W_DIVIZION_BY_ZERO,"div-by-zero"}, + + + {W_STRING_SLICED,"string-slicing"}, + {W_DECLARATOR_STATE,"declarator-state"}, + {W_OWNERSHIP_MISSING_OWNER_QUALIFIER, "missing-owner-qualifier"}, + {W_OWNERSHIP_NOT_OWNER,"not-owner"}, + {W_OWNERSHIP_USING_TEMPORARY_OWNER,"temp-owner"}, + {W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, "non-owner-move"}, + {W_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, "non-owner-to-owner-move"}, + {W_DISCARDING_OWNER, "discard-owner"}, + {W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, "missing-destructor"}, + {W_OWNERSHIP_NON_OWNER_MOVE, "non-owner-move"}, + {W_ANALYZER_UNINITIALIZED, "maybe-uninitialized"}, + {W_ANALYZER_NULL_DEREFERENCE, "analyzer-null-dereference"}, // -fanalyzer + {W_ANALIZER_MAYBE_NULL_TO_NON_OPT_ARGUMENT, "non-opt-arg"}, + {W_MUST_USE_ADDRESSOF, "must-use-address-of"}, + {W_PASSING_NULL_AS_ARRAY, "null-as-array"}, + {W_INCOMPATIBLE_ENUN_TYPES, "incompatible-enum"}, + {W_MULTICHAR_ERROR, "multi-char"} + }; -enum warning get_warning_flag(const char* wname) +static_assert((sizeof(s_warnings) / sizeof(s_warnings[0])) < 64); + +int get_diagnostic_type(struct diagnostic* d, enum diagnostic_id w) +{ + if ((d->errors & (1ULL << w)) != 0) + return 3; + + if ((d->warnings & (1ULL << w)) != 0) + return 2; + + if ((d->notes & (1ULL << w)) != 0) + return 1; + + return 0; + +} + +enum diagnostic_id get_warning(const char* wname) { for (int j = 0; j < sizeof(s_warnings) / sizeof(s_warnings[0]); j++) @@ -9566,31 +9793,30 @@ enum warning get_warning_flag(const char* wname) return 0; } -const char* get_warning_name(enum warning w) +unsigned long long get_warning_bit_mask(const char* wname) { - int lower_index = 0; - int upper_index = sizeof(s_warnings) / sizeof(s_warnings[0]) - 1; - while (lower_index <= upper_index) + for (int j = 0; j < sizeof(s_warnings) / sizeof(s_warnings[0]); j++) { - const int mid = (lower_index + upper_index) / 2; - const int cmp = w - s_warnings[mid].w; - - if (cmp == 0) - { - return s_warnings[mid].name; - } - else if (cmp < 0) + if (strncmp(s_warnings[j].name, wname, strlen(s_warnings[j].name)) == 0) { - upper_index = mid - 1; + return (1ULL << s_warnings[j].w); } - else + } + return 0; +} + +const char* get_warning_name(enum diagnostic_id w) +{ + //TODO because s_warnings is out of order .... + //this is a linear seatch instead of just index! TODOD + for (int j = 0; j < sizeof(s_warnings) / sizeof(s_warnings[0]); j++) + { + if (s_warnings[j].w == w) { - lower_index = mid + 1; + return s_warnings[j].name; } } - - assert(false); return ""; } @@ -9602,11 +9828,9 @@ int fill_options(struct options* options, /* default at this moment is same as -Wall */ - options->enabled_warnings_stack[0] = ~0; - options->enabled_warnings_stack[0] &= ~(W_STYLE | W_UNUSED_PARAMETER | W_UNUSED_VARIABLE); //default is OFF - - - + options->diagnostic_stack[0] = default_diagnostic; + + #ifdef __EMSCRIPTEN__ options->flow_analysis = true; @@ -9646,7 +9870,7 @@ int fill_options(struct options* options, } continue; } - + if (strcmp(argv[i], "-showIncludes") == 0) { options->show_includes = true; @@ -9784,17 +10008,17 @@ int fill_options(struct options* options, { if (strcmp(argv[i], "-Wall") == 0) { - options->enabled_warnings_stack[0] = ~0; + options->diagnostic_stack[0].warnings = ~0ULL; continue; } const bool disable_warning = (argv[i][2] == 'n' && argv[i][3] == 'o'); - enum warning w = 0; + enum diagnostic_id w = 0; if (disable_warning) - w = get_warning_flag(argv[i] + 5); + w = get_warning_bit_mask(argv[i] + 5); else - w = get_warning_flag(argv[i] + 2); + w = get_warning_bit_mask(argv[i] + 2); if (w == 0) { @@ -9805,15 +10029,30 @@ int fill_options(struct options* options, if (disable_warning) { - options->enabled_warnings_stack[0] &= ~w; + options->diagnostic_stack[0].warnings &= ~w; } else { - options->enabled_warnings_stack[0] |= w; + if (w == W_STYLE) + options->diagnostic_stack[0].warnings |= w; + else + options->diagnostic_stack[0].notes |= w; } continue; } + if (strcmp(argv[i], "-dump-tokens") == 0) + { + options->dump_tokens = true; + continue; + } + + if (strcmp(argv[i], "-dump-pp-tokens") == 0) + { + options->dump_pptokens = true; + continue; + } + printf("unknown option '%s'", argv[i]); return 1; } @@ -9876,22 +10115,50 @@ void print_help() "\n" WHITE " -msvc-output " RESET "Ouput is compatible with visual studio\n" "\n" + WHITE " -dump-tokens " RESET "Output tokens before preprocessor\n" + "\n" + WHITE " -dump-pp-tokens " RESET "Output tokens after preprocessor\n" + "\n" "More details at http://thradams.com/cake/manual.html\n" ; printf("%s", options); } +#ifdef TEST + +void test_get_warning_name() +{ + const char* name = get_warning_name(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR); + assert(strcmp(name, "missing-destructor") == 0); + + unsigned long long flags = get_warning_bit_mask(name); + assert(flags == (1ULL << W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR)); + + + const char* name2 = get_warning_name(W_STYLE); + assert(strcmp(name2, "style") == 0); + + unsigned long long flags2 = get_warning_bit_mask(name2); + assert(flags2 == (1ULL << W_STYLE)); +} + +#endif + +/* End of: options.c */ +/* Start of: expressions.c */ #include +/* Start of: expressions.h */ //#pragma once +/* Start of: type.h */ //#pragma once @@ -9903,7 +10170,7 @@ enum type_category TYPE_CATEGORY_ITSELF, TYPE_CATEGORY_FUNCTION, TYPE_CATEGORY_ARRAY, - TYPE_CATEGORY_POINTER, + TYPE_CATEGORY_POINTER, }; @@ -9917,7 +10184,7 @@ enum attribute_flags STD_ATTRIBUTE_NORETURN = 1 << 4, STD_ATTRIBUTE_UNSEQUENCED = 1 << 5, STD_ATTRIBUTE_REPRODUCIBLE = 1 << 6, - CAKE_ATTRIBUTE_IMPLICT= 1 << 7, + CAKE_ATTRIBUTE_IMPLICT = 1 << 7, /* 1 == 2 results in int in C lets add extra flag here @@ -9973,11 +10240,11 @@ enum type_qualifier_flags TYPE_QUALIFIER_CONST = 1 << 0, TYPE_QUALIFIER_RESTRICT = 1 << 1, TYPE_QUALIFIER_VOLATILE = 1 << 2, - TYPE_QUALIFIER__ATOMIC = 1 << 3 , - + TYPE_QUALIFIER__ATOMIC = 1 << 3, + /*ownership extensions*/ - TYPE_QUALIFIER_OWNER = 1 << 4, - TYPE_QUALIFIER_OBJ_OWNER = 1 << 5, + TYPE_QUALIFIER_OWNER = 1 << 4, + TYPE_QUALIFIER_OBJ_OWNER = 1 << 5, TYPE_QUALIFIER_VIEW = 1 << 6, TYPE_QUALIFIER_OPT = 1 << 7, TYPE_QUALIFIER_NOT_NULL = 1 << 8, @@ -9994,7 +10261,7 @@ enum storage_class_specifier_flags STORAGE_SPECIFIER_AUTO = 1 << 4, STORAGE_SPECIFIER_REGISTER = 1 << 5, STORAGE_SPECIFIER_CONSTEXPR = 1 << 6, - + /*extra flag just to annotate this*/ STORAGE_SPECIFIER_CONSTEXPR_STATIC = 1 << 7, @@ -10029,7 +10296,7 @@ struct param_list { void param_list_destroy(struct param_list* obj_owner p); -struct type +struct type { enum type_category category; @@ -10045,13 +10312,13 @@ struct type int array_size; bool static_array; - + /* address_of is true when the type is created by address of operator. This is used to create obj_owner pointer. */ bool address_of; - + struct param_list params; struct type* owner next; }; @@ -10067,7 +10334,7 @@ struct expression; void check_assigment(struct parser_ctx* ctx, struct type* left_type, - struct expression* right, + struct expression* right, bool return_assignment); void print_type(struct osstream* ss, const struct type* type); @@ -10075,7 +10342,7 @@ void print_item(struct osstream* ss, bool* first, const char* item); struct type type_dup(const struct type* p_type); void type_set(struct type* a, const struct type* b); -void type_destroy( struct type* obj_owner p_type); +void type_destroy(struct type* obj_owner p_type); @@ -10171,6 +10438,7 @@ void print_type_declarator(struct osstream* ss, const struct type* p_type); void type_remove_names(struct type* p_type); const struct type* type_get_specifer_part(const struct type* p_type); +/* End of: type.h */ struct parser_ctx; @@ -10320,7 +10588,7 @@ struct generic_selection struct token* last_token; }; -void generic_selection_delete(struct generic_selection * owner p); +void generic_selection_delete(struct generic_selection * owner opt p); enum constant_value_type { TYPE_NOT_CONSTANT, @@ -10384,7 +10652,7 @@ struct expression struct expression* owner right; }; -void expression_delete(struct expression* owner p); +void expression_delete(struct expression* owner opt p); struct expression* owner assignment_expression(struct parser_ctx* ctx); struct expression* owner expression(struct parser_ctx* ctx); @@ -10401,12 +10669,15 @@ void expression_evaluate_equal_not_equal(const struct expression* left, int op, bool disabled); +/* End of: expressions.h */ +/* Start of: parser.h */ //#pragma once +/* Start of: object.h */ /* Object represents "memory" and state. Used by flow analysis */ @@ -10484,7 +10755,7 @@ struct object struct object_state_stack object_state_stack; }; void object_destroy(struct object* obj_owner p); -void object_delete(struct object* owner p); +void object_delete(struct object* owner opt p); void object_swap(struct object* a, struct object* b); struct declarator; @@ -10538,6 +10809,7 @@ void checked_read_object(struct parser_ctx* ctx, const struct token* position_token, bool check_pointed_object); +/* End of: object.h */ #define CAKE_VERSION "0.7.4" @@ -10547,12 +10819,12 @@ struct scope int scope_level; struct hash_map tags; struct hash_map variables; - + struct scope* next; - struct scope* previous; + struct scope* previous; }; -void scope_destroy( struct scope* obj_owner p); +void scope_destroy(struct scope* obj_owner p); struct scope_list { @@ -10569,8 +10841,8 @@ struct report int error_count; int warnings_count; int info_count; - enum error last_error; - enum warning last_warning; + + enum diagnostic_id last_diagnostic_id; }; @@ -10579,12 +10851,12 @@ struct report struct parser_ctx { struct options options; - + /* file scope -> function params -> function -> inner scope */ struct scope_list scopes; - + /* * Points to the function we're in. Or null in file scope. */ @@ -10608,12 +10880,12 @@ struct parser_ctx bool evaluation_is_disabled; struct report* p_report; - + }; /////////////////////////////////////////////////////// -void parser_ctx_destroy( struct parser_ctx* obj_owner ctx); +void parser_ctx_destroy(struct parser_ctx* obj_owner ctx); struct token* parser_look_ahead(struct parser_ctx* ctx); @@ -10632,9 +10904,7 @@ void print_scope(struct scope_list* e); char* CompileText(const char* options, const char* content); -void compiler_set_error_with_token(enum error error, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...); -_Bool compiler_set_warning_with_token(enum warning w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...); -void compiler_set_info_with_token(enum warning w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...); +_Bool compiler_diagnostic_message(enum diagnostic_id w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...); int compile(int argc, const char** argv, struct report* error); @@ -10658,7 +10928,7 @@ struct declaration_specifier struct storage_class_specifier* owner storage_class_specifier; struct type_specifier_qualifier* owner type_specifier_qualifier; - + struct function_specifier* owner function_specifier; struct declaration_specifier* owner next; @@ -10708,20 +10978,20 @@ struct static_assert_declaration /* I am keeping the name static_assert_declaration but better is - + static_declaration: static_assert_declaration static_debug_declaration extension: - "static_debug" ( constant-expression ) ; - "static_debug" ( constant-expression , string-literal) ; + "static_debug" ( constant-expression ) ; + "static_debug" ( constant-expression , string-literal) ; */ - - struct token* first_token; - struct token* last_token; + + struct token* first_token; + struct token* last_token; struct expression* owner constant_expression; - struct token* string_literal_opt; + struct token* string_literal_opt; }; struct static_assert_declaration* owner static_assert_declaration(struct parser_ctx* ctx); void static_assert_declaration_delete(struct static_assert_declaration* owner p); @@ -10741,7 +11011,7 @@ struct attribute_specifier_sequence struct attribute_specifier* tail; }; struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt(struct parser_ctx* ctx); -void attribute_specifier_sequence_delete( struct attribute_specifier_sequence* owner p); +void attribute_specifier_sequence_delete(struct attribute_specifier_sequence* owner p); struct attribute_specifier { @@ -10755,8 +11025,8 @@ struct attribute_specifier struct attribute_specifier* owner next; }; -struct attribute_specifier* owner attribute_specifier(struct parser_ctx* ctx); -void attribute_specifier_delete( struct attribute_specifier* owner p); +struct attribute_specifier* owner attribute_specifier(struct parser_ctx* ctx); +void attribute_specifier_delete(struct attribute_specifier* owner p); struct attribute* owner attribute(struct parser_ctx* ctx); @@ -10789,8 +11059,8 @@ struct function_specifier */ struct token* token; }; -struct function_specifier* owner function_specifier(struct parser_ctx* ctx); -void function_specifier_delete(struct function_specifier* owner p); +struct function_specifier* owner function_specifier(struct parser_ctx* ctx); +void function_specifier_delete(struct function_specifier* owner p); struct typeof_specifier_argument { @@ -10813,10 +11083,10 @@ struct typeof_specifier */ struct token* first_token; struct token* last_token; - struct typeof_specifier_argument* owner typeof_specifier_argument; - struct type type; + struct typeof_specifier_argument* owner typeof_specifier_argument; + struct type type; }; -void typeof_specifier_delete(struct typeof_specifier * owner p); +void typeof_specifier_delete(struct typeof_specifier* owner p); struct type_specifier { @@ -10846,14 +11116,14 @@ struct type_specifier enum type_specifier_flags flags; struct token* token; struct struct_or_union_specifier* owner struct_or_union_specifier; - struct typeof_specifier* owner typeof_specifier; - struct enum_specifier* owner enum_specifier; - struct declarator* view typedef_declarator; + struct typeof_specifier* owner typeof_specifier; + struct enum_specifier* owner enum_specifier; + struct declarator* view typedef_declarator; struct atomic_type_specifier* owner atomic_type_specifier; }; -struct type_specifier* owner type_specifier(struct parser_ctx* ctx); -void type_specifier_delete(struct type_specifier* owner p); +struct type_specifier* owner type_specifier(struct parser_ctx* ctx); +void type_specifier_delete(struct type_specifier* owner p); struct init_declarator_list { @@ -10863,13 +11133,13 @@ struct init_declarator_list init-declarator-list , init-declarator */ struct init_declarator* owner head; - struct init_declarator* tail; + struct init_declarator* tail; }; struct init_declarator_list init_declarator_list(struct parser_ctx* ctx, struct declaration_specifiers* p_declaration_specifiers); -void init_declarator_list_destroy(struct init_declarator_list * obj_owner p); +void init_declarator_list_destroy(struct init_declarator_list* obj_owner p); struct declaration { @@ -10881,23 +11151,23 @@ struct declaration attribute-declaration */ struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt; - + struct static_assert_declaration* owner static_assert_declaration; - + struct declaration_specifiers* owner declaration_specifiers; struct init_declarator_list init_declarator_list; struct compound_statement* owner function_body; - struct declarator* contract_declarator; + struct declarator* contract_declarator; struct token* first_token; struct token* last_token; struct declaration* owner next; }; -void declaration_delete( struct declaration* owner p); -struct declaration* owner external_declaration(struct parser_ctx* ctx); +void declaration_delete(struct declaration* owner p); +struct declaration* owner external_declaration(struct parser_ctx* ctx); struct atomic_type_specifier { @@ -10909,8 +11179,8 @@ struct atomic_type_specifier struct type_name* owner type_name; }; -struct atomic_type_specifier* owner atomic_type_specifier(struct parser_ctx* ctx); -void atomic_type_specifier_delete(struct atomic_type_specifier* owner p); +struct atomic_type_specifier* owner atomic_type_specifier(struct parser_ctx* ctx); +void atomic_type_specifier_delete(struct atomic_type_specifier* owner p); struct enumerator_list { @@ -10924,36 +11194,36 @@ struct enumerator_list }; struct enumerator_list enumerator_list(struct parser_ctx* ctx, - const struct enum_specifier* p_enum_specifier - ); + const struct enum_specifier* p_enum_specifier +); + +void enumerator_list_destroy(struct enumerator_list* obj_owner p_enum_specifier); -void enumerator_list_destroy(struct enumerator_list* obj_owner p_enum_specifier); - struct enum_specifier { /* enum-type-specifier: : specifier-qualifier-lis - + enum-specifier: "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt { enumerator-list } "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt { enumerator-list , } "enum" identifier enum-type-specifier opt */ - struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; - struct specifier_qualifier_list* owner specifier_qualifier_list; - + struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; + struct specifier_qualifier_list* owner specifier_qualifier_list; + struct enumerator_list enumerator_list; - + struct token* tag_token; struct token* first_token; /*points to the complete enum (can be self pointed)*/ struct enum_specifier* complete_enum_specifier; }; -struct enum_specifier* owner enum_specifier(struct parser_ctx*); -void enum_specifier_delete(struct enum_specifier* owner p); +struct enum_specifier* owner enum_specifier(struct parser_ctx*); +void enum_specifier_delete(struct enum_specifier* owner p); struct member_declaration_list { @@ -10969,8 +11239,8 @@ struct member_declaration_list struct member_declaration* tail; }; -struct member_declaration_list member_declaration_list(struct parser_ctx* ctx, const struct struct_or_union_specifier*); -void member_declaration_list_destroy(struct member_declaration_list * obj_owner p ); +struct member_declaration_list member_declaration_list(struct parser_ctx* ctx, struct struct_or_union_specifier*); +void member_declaration_list_destroy(struct member_declaration_list* obj_owner p); struct member_declarator* find_member_declarator(struct member_declaration_list* list, const char* name, int* p_member_index); @@ -10983,10 +11253,10 @@ struct struct_or_union_specifier */ struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; struct member_declaration_list member_declaration_list; - + struct token* first_token; struct token* last_token; - + bool is_owner; /* @@ -11002,7 +11272,7 @@ struct struct_or_union_specifier int scope_level; /*nivel escopo 0 global*/ int visit_moved; /*nivel escopo 0 global*/ - + /* * This points to the first struct_or_union_specifier that will have it´s * complete_struct_or_union_specifier_indirection pointing to the complete @@ -11027,13 +11297,13 @@ struct init_declarator struct declarator* owner p_declarator; struct initializer* owner initializer; - struct init_declarator* owner next; + struct init_declarator* owner next; }; -void init_declarator_delete(struct init_declarator* owner p); -struct init_declarator* owner init_declarator(struct parser_ctx* ctx, +void init_declarator_delete(struct init_declarator* owner p); +struct init_declarator* owner init_declarator(struct parser_ctx* ctx, struct declaration_specifiers* p_declaration_specifiers - ); +); struct initializer { @@ -11043,11 +11313,11 @@ struct initializer braced-initializer */ struct token* first_token; - struct designation* owner designation; /*auxiliar para list??*/ - struct braced_initializer* owner braced_initializer; - struct expression* owner assignment_expression; + struct designation* owner designation; /*auxiliar para list??*/ + struct braced_initializer* owner braced_initializer; + struct expression* owner assignment_expression; struct initializer* owner next; - + /* cake extension int * p = [[cake::move]] p2; @@ -11071,24 +11341,24 @@ struct declarator struct token* last_token; - struct pointer* owner pointer; - struct direct_declarator* owner direct_declarator; + struct pointer* owner pointer; + struct direct_declarator* owner direct_declarator; + - struct declaration_specifiers* view declaration_specifiers; const struct specifier_qualifier_list* view specifier_qualifier_list; struct token* name; //shortcut struct compound_statement* view function_body; - + int num_uses; /*used to show not used warnings*/ - + /*user by flow analysis*/ struct object object; /*final declarator type (after auto, typeof etc)*/ - struct type type; + struct type type; }; enum type_specifier_flags declarator_get_type_specifier_flags(const struct declarator* p); @@ -11116,7 +11386,7 @@ struct array_declarator struct expression* owner assignment_expression; struct expression* owner expression; struct type_qualifier_list* owner type_qualifier_list_opt; - + struct token* token; struct token* static_token_opt; }; @@ -11136,7 +11406,7 @@ struct function_declarator struct scope parameters_scope; //usado para escopo parametros struct parameter_type_list* owner parameter_type_list_opt; }; -void function_declarator_delete(struct function_declarator * owner p); +void function_declarator_delete(struct function_declarator* owner p); struct direct_declarator { @@ -11151,17 +11421,17 @@ struct direct_declarator struct declarator* owner declarator; struct array_declarator* owner array_declarator; struct function_declarator* owner function_declarator; - struct attribute_specifier_sequence * owner p_attribute_specifier_sequence_opt; + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt; }; void direct_declarator_delete(struct direct_declarator* owner p); -struct direct_declarator* owner direct_declarator(struct parser_ctx* ctx, +struct direct_declarator* owner direct_declarator(struct parser_ctx* ctx, const struct specifier_qualifier_list* specifier_qualifier_list, struct declaration_specifiers* declaration_specifiers, bool abstract_acceptable, struct token** pptoken_name - ); +); struct parameter_type_list { @@ -11176,15 +11446,15 @@ struct parameter_type_list struct parameter_list* owner parameter_list; }; -struct parameter_type_list* owner parameter_type_list(struct parser_ctx* ctx); -void parameter_type_list_delete(struct parameter_type_list* owner p); +struct parameter_type_list* owner parameter_type_list(struct parser_ctx* ctx); +void parameter_type_list_delete(struct parameter_type_list* owner p); struct pointer { /* pointer: * attribute-specifier-sequence opt type-qualifier-list opt - * attribute-specifier-sequence opt type-qualifier-list opt pointer + * attribute-specifier-sequence opt type-qualifier-list opt pointer */ struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; struct type_qualifier_list* owner type_qualifier_list_opt; @@ -11192,8 +11462,8 @@ struct pointer struct pointer* owner pointer; }; -struct pointer* owner pointer_opt(struct parser_ctx* ctx); -void pointer_delete(struct pointer* owner p); +struct pointer* owner pointer_opt(struct parser_ctx* ctx); +void pointer_delete(struct pointer* owner p); struct parameter_list { /* @@ -11204,8 +11474,8 @@ struct parameter_list struct parameter_declaration* owner head; struct parameter_declaration* tail; }; -struct parameter_list* owner parameter_list(struct parser_ctx* ctx); -void parameter_list_delete(struct parameter_list* owner p); +struct parameter_list* owner parameter_list(struct parser_ctx* ctx); +void parameter_list_delete(struct parameter_list* owner p); struct parameter_declaration { @@ -11215,14 +11485,14 @@ struct parameter_declaration attribute-specifier-sequence opt declaration-specifiers abstract-declarator opt */ struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; - + struct declaration_specifiers* owner declaration_specifiers; struct declarator* owner declarator; - struct token * implicit_token; + struct token* implicit_token; struct parameter_declaration* owner next; }; -struct parameter_declaration* owner parameter_declaration(struct parser_ctx* ctx); -void parameter_declaration_delete(struct parameter_declaration* owner p); +struct parameter_declaration* owner parameter_declaration(struct parser_ctx* ctx); +void parameter_declaration_delete(struct parameter_declaration* owner p); struct type_name @@ -11239,12 +11509,12 @@ struct type_name struct type type; }; -struct type_name* owner type_name(struct parser_ctx* ctx); -void type_name_delete(struct type_name* owner p); +struct type_name* owner type_name(struct parser_ctx* ctx); +void type_name_delete(struct type_name* owner p); void print_type_name(struct osstream* ss, struct type_name* p); struct argument_expression -{ +{ struct expression* owner expression; struct argument_expression* owner next; }; @@ -11252,7 +11522,7 @@ struct argument_expression void argument_expression_delete(struct argument_expression* owner p); struct braced_initializer -{ +{ /* { } { initializer-list } @@ -11262,8 +11532,8 @@ struct braced_initializer struct token* first_token; struct initializer_list* owner initializer_list; }; -struct braced_initializer* owner braced_initializer(struct parser_ctx* ctx); -void braced_initializer_delete(struct braced_initializer* owner p); +struct braced_initializer* owner braced_initializer(struct parser_ctx* ctx); +void braced_initializer_delete(struct braced_initializer* owner opt p); struct type_specifier_qualifier { @@ -11280,8 +11550,8 @@ struct type_specifier_qualifier struct type_specifier_qualifier* owner next; }; -struct type_specifier_qualifier* owner type_specifier_qualifier(struct parser_ctx* ctx); -void type_specifier_qualifier_delete(struct type_specifier_qualifier* owner p); +struct type_specifier_qualifier* owner type_specifier_qualifier(struct parser_ctx* ctx); +void type_specifier_qualifier_delete(struct type_specifier_qualifier* owner p); struct specifier_qualifier_list @@ -11301,13 +11571,13 @@ struct specifier_qualifier_list struct enum_specifier* view enum_specifier; struct typeof_specifier* view typeof_specifier; struct declarator* view typedef_declarator; - + struct type_specifier_qualifier* owner head; struct type_specifier_qualifier* tail; struct token* first_token; struct token* last_token; - struct attribute_specifier_sequence * owner p_attribute_specifier_sequence; + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence; }; @@ -11324,12 +11594,12 @@ struct alignment_specifier "alignas" ( type-name ) "alignas" ( constant-expression ) */ - struct type_name * owner type_name; - struct expression * owner constant_expression; + struct type_name* owner type_name; + struct expression* owner constant_expression; struct token* token; }; -struct alignment_specifier* owner alignment_specifier(struct parser_ctx* ctx); -void alignment_specifier_delete(struct alignment_specifier* owner p); +struct alignment_specifier* owner alignment_specifier(struct parser_ctx* ctx); +void alignment_specifier_delete(struct alignment_specifier* owner p); struct type_qualifier @@ -11346,12 +11616,12 @@ struct type_qualifier /* Next is used when inside struct type_qualifier_list - Not used when inside struct type_specifier_qualifier + Not used when inside struct type_specifier_qualifier */ struct type_qualifier* owner next; }; -struct type_qualifier* owner type_qualifier(struct parser_ctx* ctx); +struct type_qualifier* owner type_qualifier(struct parser_ctx* ctx); struct member_declaration { @@ -11366,29 +11636,29 @@ struct member_declaration struct static_assert_declaration* owner static_assert_declaration; struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt; struct member_declaration* owner next; - + }; -struct member_declaration* owner member_declaration(struct parser_ctx* ctx, struct struct_or_union_specifier*); -void member_declaration_delete(struct member_declaration* owner p); +struct member_declaration* owner member_declaration(struct parser_ctx* ctx, struct struct_or_union_specifier*); +void member_declaration_delete(struct member_declaration* owner p); struct member_declarator { - /* + /* member-declarator: declarator declarator opt : constant-expression */ - + struct declarator* owner declarator; struct expression* owner constant_expression; struct member_declarator* owner next; }; -void member_declarator_delete(struct member_declarator * owner p); +void member_declarator_delete(struct member_declarator* owner p); struct member_declarator_list { - /* + /* member-declarator-list: member-declarator member-declarator-list , member-declarator @@ -11398,11 +11668,11 @@ struct member_declarator_list struct member_declarator* tail; }; -struct member_declarator_list* owner member_declarator_list(struct parser_ctx* ctx, - struct struct_or_union_specifier* , +struct member_declarator_list* owner member_declarator_list(struct parser_ctx* ctx, + struct struct_or_union_specifier*, const struct specifier_qualifier_list* specifier_qualifier_list - ); -void member_declarator_list_delete(struct member_declarator_list* owner p); +); +void member_declarator_list_delete(struct member_declarator_list* owner opt p); struct block_item_list { @@ -11416,7 +11686,7 @@ struct block_item_list }; struct block_item_list block_item_list(struct parser_ctx* ctx); -void block_item_list_destroy( struct block_item_list * obj_owner p); +void block_item_list_destroy(struct block_item_list* obj_owner p); struct compound_statement { @@ -11428,41 +11698,44 @@ struct compound_statement struct token* last_token; /*}*/ struct block_item_list block_item_list; + + //flow analysys flags + struct diagnostic diagnostic_flags; }; -struct compound_statement* owner compound_statement(struct parser_ctx* ctx); -void compound_statement_delete( struct compound_statement* owner p); +struct compound_statement* owner compound_statement(struct parser_ctx* ctx); +void compound_statement_delete(struct compound_statement* owner p); struct defer_statement { /* defer-statement: (extension) - "defer" secondary-block + "defer" secondary-block */ struct token* first_token; struct token* last_token; struct secondary_block* owner secondary_block; }; -void defer_statement_delete(struct defer_statement * owner opt p); +void defer_statement_delete(struct defer_statement* owner opt p); struct try_statement -{ - /* - try-statement: (extension) - "try" secondary-block - "try" secondary-block "catch" secondary-block - */ +{ + /* + try-statement: (extension) + "try" secondary-block + "try" secondary-block "catch" secondary-block + */ struct secondary_block* owner secondary_block; struct secondary_block* owner catch_secondary_block_opt; struct token* first_token; /*try*/ struct token* last_token; - struct token* catch_token_opt; /*catch*/ + struct token* catch_token_opt; /*catch*/ /*Used to generate label names*/ int try_catch_block_index; }; -struct try_statement* owner try_statement(struct parser_ctx* ctx); -void try_statement_delete(struct try_statement* owner p); +struct try_statement* owner try_statement(struct parser_ctx* ctx); +void try_statement_delete(struct try_statement* owner p); struct selection_statement { @@ -11483,10 +11756,10 @@ struct selection_statement struct token* first_token; struct token* last_token; - struct token* else_token_opt; + struct token* else_token_opt; }; -struct selection_statement* owner selection_statement(struct parser_ctx* ctx); +struct selection_statement* owner selection_statement(struct parser_ctx* ctx); void selection_statement_delete(struct selection_statement* owner p); struct iteration_statement { @@ -11498,7 +11771,7 @@ struct iteration_statement "for" ( declaration expression opt ; expression opt ) secondary-block "repeat" secondary-block (extension) */ - + struct token* first_token; struct token* second_token; /*do {} while*/ @@ -11506,11 +11779,11 @@ struct iteration_statement struct expression* owner expression1; struct expression* owner expression2; struct expression* owner expression0; - struct declaration * owner declaration; + struct declaration* owner declaration; }; -struct iteration_statement* owner iteration_statement(struct parser_ctx* ctx); -void iteration_statement_delete(struct iteration_statement*owner p); +struct iteration_statement* owner iteration_statement(struct parser_ctx* ctx); +void iteration_statement_delete(struct iteration_statement* owner p); struct jump_statement { @@ -11521,17 +11794,17 @@ struct jump_statement "break" ; "return" expression opt ; */ - + struct token* label; struct token* first_token; struct token* last_token; struct expression* owner expression_opt; - + int try_catch_block_index; }; -struct jump_statement* owner jump_statement(struct parser_ctx* ctx); -void jump_statement_delete(struct jump_statement* owner p); +struct jump_statement* owner jump_statement(struct parser_ctx* ctx); +void jump_statement_delete(struct jump_statement* owner p); struct expression_statement { @@ -11540,13 +11813,13 @@ struct expression_statement expression opt; attribute-specifier-sequence expression ; */ - + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt; struct expression* owner expression_opt; }; -struct expression_statement* owner expression_statement(struct parser_ctx* ctx); -void expression_statement_delete(struct expression_statement* owner p); +struct expression_statement* owner expression_statement(struct parser_ctx* ctx); +void expression_statement_delete(struct expression_statement* owner p); struct block_item { @@ -11557,17 +11830,17 @@ struct block_item label */ struct token* first_token; //?necessary - struct declaration* owner declaration; + struct declaration* owner declaration; struct unlabeled_statement* owner unlabeled_statement; struct label* owner label; struct block_item* owner next; }; -struct block_item* owner block_item(struct parser_ctx* ctx); -void block_item_delete( struct block_item* owner p); +struct block_item* owner block_item(struct parser_ctx* ctx); +void block_item_delete(struct block_item* owner p); -struct compound_statement* owner function_body(struct parser_ctx* ctx); +struct compound_statement* owner function_body(struct parser_ctx* ctx); struct designator { @@ -11580,8 +11853,8 @@ struct designator struct token* token; struct designator* owner next; }; -struct designator* owner designator(struct parser_ctx* ctx); -void designator_delete(struct designator* owner p); +struct designator* owner designator(struct parser_ctx* ctx); +void designator_delete(struct designator* owner p); struct initializer_list { /* @@ -11594,8 +11867,8 @@ struct initializer_list struct initializer* tail; int size; }; -struct initializer_list* owner initializer_list(struct parser_ctx* ctx); -void initializer_list_delete(struct initializer_list* owner p); +struct initializer_list* owner initializer_list(struct parser_ctx* ctx); +void initializer_list_delete(struct initializer_list* owner p); struct primary_block { @@ -11607,7 +11880,7 @@ struct primary_block defer-statement (extension) try-statement (extension) */ - + struct compound_statement* owner compound_statement; struct selection_statement* owner selection_statement; struct iteration_statement* owner iteration_statement; @@ -11615,7 +11888,7 @@ struct primary_block struct try_statement* owner try_statement; }; -void primary_block_delete(struct primary_block * owner p); +void primary_block_delete(struct primary_block* owner p); struct secondary_block { @@ -11628,7 +11901,7 @@ struct secondary_block struct statement* owner statement; }; -void secondary_block_delete(struct secondary_block * owner opt p); +void secondary_block_delete(struct secondary_block* owner opt p); struct unlabeled_statement { @@ -11639,13 +11912,13 @@ struct unlabeled_statement attribute-specifier-sequence opt jump-statement */ - struct expression_statement* owner expression_statement; - struct primary_block* owner primary_block; - struct jump_statement* owner jump_statement; + struct expression_statement* owner expression_statement; + struct primary_block* owner primary_block; + struct jump_statement* owner jump_statement; }; struct unlabeled_statement* owner unlabeled_statement(struct parser_ctx* ctx); -void unlabeled_statement_delete( struct unlabeled_statement* owner p); +void unlabeled_statement_delete(struct unlabeled_statement* owner p); struct labeled_statement { @@ -11657,10 +11930,10 @@ struct labeled_statement struct statement* owner statement; }; struct labeled_statement* owner labeled_statement(struct parser_ctx* ctx); -void labeled_statement_delete(struct labeled_statement * owner p); +void labeled_statement_delete(struct labeled_statement* owner p); struct statement -{ +{ /* statement: labeled-statement @@ -11692,7 +11965,7 @@ struct designation designation: designator-list = */ - struct designator_list * owner designator_list; + struct designator_list* owner designator_list; struct token* token; }; struct designation* owner designation(struct parser_ctx* ctx); @@ -11727,7 +12000,7 @@ struct attribute struct attribute_argument_clause* owner attribute_argument_clause; struct attribute* owner next; }; -void attribute_delete(struct attribute * owner p); +void attribute_delete(struct attribute* owner p); struct attribute_list { @@ -11736,34 +12009,34 @@ struct attribute_list struct attribute* tail; }; struct attribute_list* owner attribute_list(struct parser_ctx* ctx); -void attribute_list_destroy( struct attribute_list* obj_owner p); +void attribute_list_destroy(struct attribute_list* obj_owner p); struct enumerator { /* enumeration-constant: identifier - + enumerator: enumeration-constant attribute-specifier-sequence opt enumeration-constant attribute-specifier-sequence opt = constant-expression */ - + struct token* token; struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; struct expression* owner constant_expression_opt; - + /* having the enum specifier we have better information about the type */ const struct enum_specifier* view enum_specifier; struct enumerator* owner next; - long long value; + long long value; }; -struct enumerator* owner enumerator(struct parser_ctx* ctx, const struct enum_specifier* p_enum_specifier, long long *p_enumerator_value); +struct enumerator* owner enumerator(struct parser_ctx* ctx, const struct enum_specifier* p_enum_specifier, long long* p_enumerator_value); void enumerator_delete(struct enumerator* owner p); struct attribute_argument_clause @@ -11772,7 +12045,7 @@ struct attribute_argument_clause attribute-argument-clause: ( balanced-token-sequence opt ) */ - struct balanced_token_sequence * owner p_balanced_token_sequence; + struct balanced_token_sequence* owner p_balanced_token_sequence; struct token* token; }; @@ -11783,7 +12056,7 @@ bool first_of_attribute(struct parser_ctx* ctx); struct balanced_token { - struct token * token; + struct token* token; struct balanced_token* owner next; }; @@ -11808,7 +12081,7 @@ struct declaration_list }; struct declaration_list translation_unit(struct parser_ctx* ctx); -void declaration_list_destroy( struct declaration_list* obj_owner list); +void declaration_list_destroy(struct declaration_list* obj_owner list); struct label { @@ -11823,7 +12096,7 @@ struct label }; struct label* owner label(struct parser_ctx* ctx); -void label_delete( struct label* owner p); +void label_delete(struct label* owner p); struct ast { @@ -11833,13 +12106,14 @@ struct ast struct ast get_ast(struct options* options, const char* filename, const char* source, struct report* report); -void ast_destroy( struct ast* obj_owner ast); +void ast_destroy(struct ast* obj_owner ast); struct type make_type_using_declarator(struct parser_ctx* ctx, struct declarator* pdeclarator); struct declaration_list parse(struct parser_ctx* ctx, struct token_list* list); const char* owner compile_source(const char* pszoptions, const char* content, struct report* report); +/* End of: parser.h */ #ifdef _WIN32 #endif @@ -11850,7 +12124,7 @@ const char* owner compile_source(const char* pszoptions, const char* content, st struct constant_value make_constant_value_double(double d, bool disabled) { - struct constant_value r = {0}; + struct constant_value r = { 0 }; if (disabled) return r; r.dvalue = d; @@ -11860,7 +12134,7 @@ struct constant_value make_constant_value_double(double d, bool disabled) struct constant_value make_constant_value_ull(unsigned long long d, bool disabled) { - struct constant_value r= {0}; + struct constant_value r = { 0 }; if (disabled) return r; @@ -11871,7 +12145,7 @@ struct constant_value make_constant_value_ull(unsigned long long d, bool disable struct constant_value make_constant_value_ll(long long d, bool disabled) { - struct constant_value r= {0}; + struct constant_value r = { 0 }; if (disabled) return r; @@ -11884,9 +12158,11 @@ double constant_value_to_double(const struct constant_value* a) { switch (a->type) { - case TYPE_LONG_LONG: return (double) a->llvalue; - case TYPE_DOUBLE: return a->dvalue; - case TYPE_UNSIGNED_LONG_LONG: return (double) a->ullvalue; + case TYPE_LONG_LONG: return (double)a->llvalue; + case TYPE_DOUBLE: return a->dvalue; + case TYPE_UNSIGNED_LONG_LONG: return (double)a->ullvalue; + default: + return 0; } return 0; @@ -11903,16 +12179,18 @@ void constant_value_to_string(const struct constant_value* a, char buffer[], int buffer[0] = 0; switch (a->type) { - case TYPE_LONG_LONG: - snprintf(buffer, sz, "%lld", a->llvalue); - break; - case TYPE_DOUBLE: - snprintf(buffer, sz, "%f", a->dvalue); - break; + case TYPE_LONG_LONG: + snprintf(buffer, sz, "%lld", a->llvalue); + break; + case TYPE_DOUBLE: + snprintf(buffer, sz, "%f", a->dvalue); + break; - case TYPE_UNSIGNED_LONG_LONG: - snprintf(buffer, sz, "%llu", a->ullvalue); - break; + case TYPE_UNSIGNED_LONG_LONG: + snprintf(buffer, sz, "%llu", a->ullvalue); + break; + default: + return; } } @@ -11920,9 +12198,11 @@ unsigned long long constant_value_to_ull(const struct constant_value* a) { switch (a->type) { - case TYPE_LONG_LONG: return (unsigned long long)a->llvalue; - case TYPE_DOUBLE: return (unsigned long long)a->dvalue; - case TYPE_UNSIGNED_LONG_LONG: return (unsigned long long) a->ullvalue; + case TYPE_LONG_LONG: return (unsigned long long)a->llvalue; + case TYPE_DOUBLE: return (unsigned long long)a->dvalue; + case TYPE_UNSIGNED_LONG_LONG: return (unsigned long long) a->ullvalue; + default: + return 0; } return 0; @@ -11931,9 +12211,11 @@ long long constant_value_to_ll(const struct constant_value* a) { switch (a->type) { - case TYPE_LONG_LONG: return (long long) a->llvalue; - case TYPE_DOUBLE: return (long long) a->dvalue; - case TYPE_UNSIGNED_LONG_LONG: return (long long) a->ullvalue; + case TYPE_LONG_LONG: return (long long)a->llvalue; + case TYPE_DOUBLE: return (long long)a->dvalue; + case TYPE_UNSIGNED_LONG_LONG: return (long long)a->ullvalue; + default: + return 0; } return 0; @@ -11942,9 +12224,11 @@ bool constant_value_to_bool(const struct constant_value* a) { switch (a->type) { - case TYPE_LONG_LONG: return a->llvalue != 0; - case TYPE_DOUBLE: return a->dvalue != 0; - case TYPE_UNSIGNED_LONG_LONG: return a->ullvalue != 0; + case TYPE_LONG_LONG: return a->llvalue != 0; + case TYPE_DOUBLE: return a->dvalue != 0; + case TYPE_UNSIGNED_LONG_LONG: return a->ullvalue != 0; + default: + return 0; } return 0; @@ -11961,30 +12245,30 @@ struct constant_value constant_value_cast(const struct constant_value* a, enum c switch (type) { - case TYPE_NOT_CONSTANT: - case TYPE_EMPTY: - assert(false); - break; + case TYPE_NOT_CONSTANT: + case TYPE_EMPTY: + assert(false); + break; - case TYPE_LONG_LONG: - r.type = TYPE_LONG_LONG; - r.llvalue = constant_value_to_ll(a); - break; - case TYPE_DOUBLE: - r.type = TYPE_DOUBLE; - r.dvalue = constant_value_to_double(a); - break; - case TYPE_UNSIGNED_LONG_LONG: - r.type = TYPE_UNSIGNED_LONG_LONG; - r.ullvalue = constant_value_to_ull(a); - break; + case TYPE_LONG_LONG: + r.type = TYPE_LONG_LONG; + r.llvalue = constant_value_to_ll(a); + break; + case TYPE_DOUBLE: + r.type = TYPE_DOUBLE; + r.dvalue = constant_value_to_double(a); + break; + case TYPE_UNSIGNED_LONG_LONG: + r.type = TYPE_UNSIGNED_LONG_LONG; + r.ullvalue = constant_value_to_ull(a); + break; } return r; } struct constant_value constant_value_unary_op(const struct constant_value* a, int op) { - struct constant_value r = {0}; + struct constant_value r = { 0 }; if (!constant_value_is_valid(a)) { return r; @@ -11995,13 +12279,13 @@ struct constant_value constant_value_unary_op(const struct constant_value* a, in r.type = TYPE_DOUBLE; switch (op) { - case '!':r.dvalue = !a->dvalue; break; - //case '~':r.dvalue = ~ a->dvalue; break; - case '+':r.dvalue = +a->dvalue; break; - case '-':r.dvalue = -a->dvalue; break; - default: - assert(false); - break; + case '!':r.dvalue = !a->dvalue; break; + //case '~':r.dvalue = ~ a->dvalue; break; + case '+':r.dvalue = +a->dvalue; break; + case '-':r.dvalue = -a->dvalue; break; + default: + assert(false); + break; } return r; } @@ -12010,16 +12294,16 @@ struct constant_value constant_value_unary_op(const struct constant_value* a, in r.type = TYPE_UNSIGNED_LONG_LONG; switch (op) { - case '!':r.ullvalue = !a->ullvalue; break; - case '~':r.ullvalue = ~a->ullvalue; break; - case '+':r.ullvalue = a->ullvalue; break; - //case '-':r.dvalue = -a->ullvalue; break; - case '-': - r.dvalue = 0;// -a->ullvalue; - break; - default: - assert(false); - break; + case '!':r.ullvalue = !a->ullvalue; break; + case '~':r.ullvalue = ~a->ullvalue; break; + case '+':r.ullvalue = a->ullvalue; break; + //case '-':r.dvalue = -a->ullvalue; break; + case '-': + r.dvalue = 0;// -a->ullvalue; + break; + default: + assert(false); + break; } return r; } @@ -12028,13 +12312,13 @@ struct constant_value constant_value_unary_op(const struct constant_value* a, in r.type = TYPE_UNSIGNED_LONG_LONG; switch (op) { - case '!':r.llvalue = !((long long) a->llvalue); break; - case '~':r.llvalue = ~((long long) a->llvalue); break; - case '+':r.llvalue = +((long long) a->llvalue); break; - case '-':r.llvalue = -((long long) a->llvalue); break; - default: - assert(false); - break; + case '!':r.llvalue = !((long long)a->llvalue); break; + case '~':r.llvalue = ~((long long)a->llvalue); break; + case '+':r.llvalue = +((long long)a->llvalue); break; + case '-':r.llvalue = -((long long)a->llvalue); break; + default: + assert(false); + break; } return r; } @@ -12046,7 +12330,7 @@ struct constant_value constant_value_unary_op(const struct constant_value* a, in struct constant_value constant_value_op(const struct constant_value* a, const struct constant_value* b, int op) { //TODO https://github.com/thradams/checkedints - struct constant_value r = {0}; + struct constant_value r = { 0 }; if (!constant_value_is_valid(a) || !constant_value_is_valid(b)) { return r; @@ -12061,40 +12345,40 @@ struct constant_value constant_value_op(const struct constant_value* a, const st switch (op) { //Arithmetic Operators - case '+':r.dvalue = va + vb; break; - case '-':r.dvalue = va - vb; break; - case '*':r.dvalue = va * vb; break; - case '/': - if (vb != 0) - r.dvalue = va / vb; - else - r.type = TYPE_NOT_CONSTANT; - break; + case '+':r.dvalue = va + vb; break; + case '-':r.dvalue = va - vb; break; + case '*':r.dvalue = va * vb; break; + case '/': + if (vb != 0) + r.dvalue = va / vb; + else + r.type = TYPE_NOT_CONSTANT; + break; - //case '%':r.dvalue = va % vb; break; + //case '%':r.dvalue = va % vb; break; - //Relational Operators - case '==':r.dvalue = va == vb; break; - case '!=':r.dvalue = va != vb; break; - case '>':r.dvalue = va > vb; break; - case '<':r.dvalue = va < vb; break; - case '<=':r.dvalue = va <= vb; break; - case '>=':r.dvalue = va >= vb; break; + //Relational Operators + case '==':r.dvalue = va == vb; break; + case '!=':r.dvalue = va != vb; break; + case '>':r.dvalue = va > vb; break; + case '<':r.dvalue = va < vb; break; + case '<=':r.dvalue = va <= vb; break; + case '>=':r.dvalue = va >= vb; break; - //Logical Operators - case '&&':r.dvalue = va && vb; break; - case '||':r.dvalue = va || vb; break; + //Logical Operators + case '&&':r.dvalue = va && vb; break; + case '||':r.dvalue = va || vb; break; - //Bitwise Operators - //case '|':r.dvalue = va | vb; break; - //case '&':r.dvalue = va & vb; break; - //case '^':r.dvalue = va ^ vb; break; - //case '>>':r.dvalue = va >> vb; break; - //case '<<':r.dvalue = va << vb; break; + //Bitwise Operators + //case '|':r.dvalue = va | vb; break; + //case '&':r.dvalue = va & vb; break; + //case '^':r.dvalue = va ^ vb; break; + //case '>>':r.dvalue = va >> vb; break; + //case '<<':r.dvalue = va << vb; break; - default: - assert(false); - break; + default: + assert(false); + break; } return r; @@ -12109,96 +12393,96 @@ struct constant_value constant_value_op(const struct constant_value* a, const st switch (op) { //Arithmetic Operators - case '+':r.ullvalue = va + vb; break; - case '-':r.ullvalue = va - vb; break; - case '*':r.ullvalue = va * vb; break; - case '/': - if (vb != 0) - r.ullvalue = va / vb; - else - r.type = TYPE_NOT_CONSTANT; - break; - - case '%': - if (vb != 0) - r.ullvalue = va % vb; - else - r.type = TYPE_NOT_CONSTANT; - break; - - //Relational Operators - case '==':r.ullvalue = va == vb; break; - case '!=':r.ullvalue = va != vb; break; - case '>':r.ullvalue = va > vb; break; - case '<':r.ullvalue = va < vb; break; - case '<=':r.ullvalue = va <= vb; break; - case '>=':r.ullvalue = va >= vb; break; - - //Logical Operators - case '&&':r.ullvalue = va && vb; break; - case '||':r.ullvalue = va || vb; break; - - //Bitwise Operators - case '|':r.ullvalue = va | vb; break; - case '&':r.ullvalue = va & vb; break; - case '^':r.ullvalue = va ^ vb; break; - case '>>':r.ullvalue = va >> vb; break; - case '<<':r.ullvalue = va << vb; break; - - default: - assert(false); - break; - } - - return r; - } - - unsigned long long va = a->llvalue; - unsigned long long vb = b->llvalue; - r.type = TYPE_LONG_LONG; - switch (op) - { - //Arithmetic Operators - case '+':r.llvalue = va + vb; break; - case '-':r.llvalue = va - vb; break; - case '*':r.llvalue = va * vb; break; - + case '+':r.ullvalue = va + vb; break; + case '-':r.ullvalue = va - vb; break; + case '*':r.ullvalue = va * vb; break; case '/': if (vb != 0) - r.llvalue = va / vb; + r.ullvalue = va / vb; else r.type = TYPE_NOT_CONSTANT; break; case '%': if (vb != 0) - r.llvalue = va % vb; + r.ullvalue = va % vb; else r.type = TYPE_NOT_CONSTANT; break; //Relational Operators - case '==':r.llvalue = va == vb; break; - case '!=':r.llvalue = va != vb; break; - case '>':r.llvalue = va > vb; break; - case '<':r.llvalue = va < vb; break; - case '<=':r.llvalue = va <= vb; break; - case '>=':r.llvalue = va >= vb; break; + case '==':r.ullvalue = va == vb; break; + case '!=':r.ullvalue = va != vb; break; + case '>':r.ullvalue = va > vb; break; + case '<':r.ullvalue = va < vb; break; + case '<=':r.ullvalue = va <= vb; break; + case '>=':r.ullvalue = va >= vb; break; //Logical Operators - case '&&':r.llvalue = va && vb; break; - case '||':r.llvalue = va || vb; break; + case '&&':r.ullvalue = va && vb; break; + case '||':r.ullvalue = va || vb; break; //Bitwise Operators - case '|':r.llvalue = va | vb; break; - case '&':r.llvalue = va & vb; break; - case '^':r.llvalue = va ^ vb; break; - case '>>':r.llvalue = va >> vb; break; - case '<<':r.llvalue = va << vb; break; + case '|':r.ullvalue = va | vb; break; + case '&':r.ullvalue = va & vb; break; + case '^':r.ullvalue = va ^ vb; break; + case '>>':r.ullvalue = va >> vb; break; + case '<<':r.ullvalue = va << vb; break; default: assert(false); break; + } + + return r; + } + + unsigned long long va = a->llvalue; + unsigned long long vb = b->llvalue; + r.type = TYPE_LONG_LONG; + switch (op) + { + //Arithmetic Operators + case '+':r.llvalue = va + vb; break; + case '-':r.llvalue = va - vb; break; + case '*':r.llvalue = va * vb; break; + + case '/': + if (vb != 0) + r.llvalue = va / vb; + else + r.type = TYPE_NOT_CONSTANT; + break; + + case '%': + if (vb != 0) + r.llvalue = va % vb; + else + r.type = TYPE_NOT_CONSTANT; + break; + + //Relational Operators + case '==':r.llvalue = va == vb; break; + case '!=':r.llvalue = va != vb; break; + case '>':r.llvalue = va > vb; break; + case '<':r.llvalue = va < vb; break; + case '<=':r.llvalue = va <= vb; break; + case '>=':r.llvalue = va >= vb; break; + + //Logical Operators + case '&&':r.llvalue = va && vb; break; + case '||':r.llvalue = va || vb; break; + + //Bitwise Operators + case '|':r.llvalue = va | vb; break; + case '&':r.llvalue = va & vb; break; + case '^':r.llvalue = va ^ vb; break; + case '>>':r.llvalue = va >> vb; break; + case '<<':r.llvalue = va << vb; break; + + default: + assert(false); + break; } @@ -12256,7 +12540,7 @@ static int compare_function_arguments(struct parser_ctx* ctx, if (p_current_argument != NULL && !p_param_list->is_var_args) { - compiler_set_error_with_token(C_TOO_MANY_ARGUMENTS, ctx, + compiler_diagnostic_message(ERROR_TOO_MANY_ARGUMENTS, ctx, p_argument_expression_list->tail->expression->first_token, "too many arguments"); throw; @@ -12266,13 +12550,13 @@ static int compare_function_arguments(struct parser_ctx* ctx, { if (p_argument_expression_list->tail) { - compiler_set_error_with_token(C_TOO_FEW_ARGUMENTS, ctx, + compiler_diagnostic_message(ERROR_TOO_FEW_ARGUMENTS, ctx, p_argument_expression_list->tail->expression->first_token, "too few arguments"); } else { - compiler_set_error_with_token(C_TOO_FEW_ARGUMENTS, ctx, ctx->current, "too few arguments"); + compiler_diagnostic_message(ERROR_TOO_FEW_ARGUMENTS, ctx, ctx->current, "too few arguments"); } throw; } @@ -12411,7 +12695,7 @@ struct generic_association* owner generic_association(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "unexpected"); + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "unexpected"); } parser_match_tk(ctx, ':'); p_generic_association->expression = assignment_expression(ctx); @@ -12425,7 +12709,7 @@ struct generic_association* owner generic_association(struct parser_ctx* ctx) struct generic_assoc_list generic_association_list(struct parser_ctx* ctx) { - struct generic_assoc_list list = {0}; + struct generic_assoc_list list = { 0 }; try { struct generic_association* owner p_generic_association = @@ -12450,7 +12734,7 @@ struct generic_assoc_list generic_association_list(struct parser_ctx* ctx) } return list; } -void generic_association_delete(struct generic_association* owner p) +void generic_association_delete(struct generic_association* owner opt p) { if (p) { @@ -12487,7 +12771,7 @@ void generic_assoc_list_destroy(struct generic_assoc_list* obj_owner p) item = next; } } -void generic_selection_delete(struct generic_selection* owner p) +void generic_selection_delete(struct generic_selection* owner opt p) { if (p) { @@ -12543,7 +12827,7 @@ struct generic_selection* owner generic_selection(struct parser_ctx* ctx) p_generic_selection->generic_assoc_list = generic_association_list(ctx); - struct type lvalue_type = {0}; + struct type lvalue_type = { 0 }; struct type* p_type = NULL; @@ -12559,7 +12843,7 @@ struct generic_selection* owner generic_selection(struct parser_ctx* ctx) } } - else + else if(p_generic_selection->type_name) { p_type = &p_generic_selection->type_name->declarator->type; } @@ -12628,26 +12912,26 @@ const unsigned char* utf8_decode(const unsigned char* s, int* c) } else if ((s[0] & 0xe0) == 0xc0) { - *c = ((int) (s[0] & 0x1f) << 6) | - ((int) (s[1] & 0x3f) << 0); + *c = ((int)(s[0] & 0x1f) << 6) | + ((int)(s[1] & 0x3f) << 0); assert(*c >= 0x0080 && *c <= 0x07FF); next = s + 2; } else if ((s[0] & 0xf0) == 0xe0) { - *c = ((int) (s[0] & 0x0f) << 12) | - ((int) (s[1] & 0x3f) << 6) | - ((int) (s[2] & 0x3f) << 0); + *c = ((int)(s[0] & 0x0f) << 12) | + ((int)(s[1] & 0x3f) << 6) | + ((int)(s[2] & 0x3f) << 0); assert(*c >= 0x0800 && *c <= 0xFFFF); next = s + 3; } else if ((s[0] & 0xf8) == 0xf0 && (s[0] <= 0xf4)) { - *c = ((int) (s[0] & 0x07) << 18) | - ((int) (s[1] & 0x3f) << 12) | - ((int) (s[2] & 0x3f) << 6) | - ((int) (s[3] & 0x3f) << 0); - assert(*c >= 0x100000 && *c <= 0x10FFFF); + *c = ((int)(s[0] & 0x07) << 18) | + ((int)(s[1] & 0x3f) << 12) | + ((int)(s[2] & 0x3f) << 6) | + ((int)(s[3] & 0x3f) << 0); + assert(*c >= 0x10000 && *c <= 0x10FFFF); next = s + 4; } else @@ -12675,7 +12959,7 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) p_expression_node->type.attributes_flags |= CAKE_HIDDEN_ATTRIBUTE_LIKE_CHAR; p_expression_node->type.category = TYPE_CATEGORY_ITSELF; - const unsigned char* p = (const unsigned char* ) ctx->current->lexeme; + const unsigned char* p = (const unsigned char*)ctx->current->lexeme; if (p[0] == 'u' && p[1] == '8') { @@ -12691,12 +12975,12 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p && *p != '\'') { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); } if (c > 0x80) { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Character too large for enclosing character literal type."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Character too large for enclosing character literal type."); } @@ -12715,12 +12999,12 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p && *p != '\'') { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); } if (c > USHRT_MAX) { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Character too large for enclosing character literal type."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Character too large for enclosing character literal type."); } p_expression_node->constant_value = make_constant_value_ll(c, ctx->evaluation_is_disabled); @@ -12738,7 +13022,7 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p && *p != '\'') { - compiler_set_error_with_token(C_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); + compiler_diagnostic_message(W_MULTICHAR_ERROR, ctx, ctx->current, "Unicode character literals may not contain multiple characters."); } @@ -12776,6 +13060,12 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p == 0) break; value = value * 256 + c; + if (value > INT_MAX) + { + compiler_diagnostic_message(W_OUT_OF_BOUNDS, ctx, ctx->current, "character constant too long for its type", ctx->current->lexeme); + + break; + } } p_expression_node->constant_value = make_constant_value_ll(value, ctx->evaluation_is_disabled); @@ -12803,6 +13093,11 @@ struct expression* owner character_constant_expression(struct parser_ctx* ctx) if (p == 0) break; value = value * 256 + c; + if (value > INT_MAX) + { + compiler_diagnostic_message(W_OUT_OF_BOUNDS, ctx, ctx->current, "character constant too long for its type", ctx->current->lexeme); + break; + } } p_expression_node->constant_value = make_constant_value_ll(value, ctx->evaluation_is_disabled); } @@ -12823,7 +13118,7 @@ int convert_to_number(struct token* token, struct expression* p_expression_node, //um dos maiores buffer necessarios seria 128 bits binario... //0xb1'1'1.... int c = 0; - char buffer[128 * 2 + 4] = {0}; + char buffer[128 * 2 + 4] = { 0 }; const char* s = token->lexeme; while (*s) { @@ -12840,37 +13135,37 @@ int convert_to_number(struct token* token, struct expression* p_expression_node, switch (token->type) { - case TK_COMPILER_DECIMAL_CONSTANT: + case TK_COMPILER_DECIMAL_CONSTANT: - if (flags & TYPE_SPECIFIER_UNSIGNED) - { - p_expression_node->constant_value = make_constant_value_ull(strtoull(buffer, 0, 10), disabled); - } - else - { - p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer, 0, 10), disabled); - } + if (flags & TYPE_SPECIFIER_UNSIGNED) + { + p_expression_node->constant_value = make_constant_value_ull(strtoull(buffer, 0, 10), disabled); + } + else + { + p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer, 0, 10), disabled); + } - break; - case TK_COMPILER_OCTAL_CONSTANT: - p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer, 0, 8), disabled); + break; + case TK_COMPILER_OCTAL_CONSTANT: + p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer, 0, 8), disabled); - break; - case TK_COMPILER_HEXADECIMAL_CONSTANT: - p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer + 2, 0, 16), disabled); + break; + case TK_COMPILER_HEXADECIMAL_CONSTANT: + p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer + 2, 0, 16), disabled); - break; - case TK_COMPILER_BINARY_CONSTANT: - p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer + 2, 0, 2), disabled); - break; - case TK_COMPILER_DECIMAL_FLOATING_CONSTANT: - p_expression_node->constant_value = make_constant_value_double(strtod(buffer, 0), disabled); - break; - case TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT: - p_expression_node->constant_value = make_constant_value_double(strtod(buffer + 2, 0), disabled); - break; - default: - assert(false); + break; + case TK_COMPILER_BINARY_CONSTANT: + p_expression_node->constant_value = make_constant_value_ll(strtoll(buffer + 2, 0, 2), disabled); + break; + case TK_COMPILER_DECIMAL_FLOATING_CONSTANT: + p_expression_node->constant_value = make_constant_value_double(strtod(buffer, 0), disabled); + break; + case TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT: + p_expression_node->constant_value = make_constant_value_double(strtod(buffer + 2, 0), disabled); + break; + default: + assert(false); } return 0; @@ -12950,7 +13245,7 @@ struct object* expression_get_object(struct expression* p_expression, struct typ return &p_obj->pointed->members.data[p_expression->member_index]; else { - assert(false); + return NULL; } } } @@ -13000,6 +13295,8 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) struct map_entry* p_entry = find_variables(ctx, ctx->current->lexeme, NULL); + + if (p_entry && p_entry->type == TAG_TYPE_ENUMERATOR) { struct enumerator* p_enumerator = p_entry->p; @@ -13026,13 +13323,13 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) if (type_is_deprecated(&p_declarator->type)) { - compiler_set_warning_with_token(W_DEPRECATED, ctx, ctx->current, "'%s' is deprecated", ctx->current->lexeme); + compiler_diagnostic_message(W_DEPRECATED, ctx, ctx->current, "'%s' is deprecated", ctx->current->lexeme); } p_declarator->num_uses++; p_expression_node->declarator = p_declarator; p_expression_node->expression_type = PRIMARY_EXPRESSION_DECLARATOR; - + p_expression_node->type = type_dup(&p_declarator->type); if (p_init_declarator) @@ -13065,11 +13362,11 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) p_expression_node->last_token = ctx->current; p_expression_node->type = type_make_literal_string(strlen(funcname) + 1, TYPE_SPECIFIER_CHAR); - + } else { - compiler_set_error_with_token(C_NOT_FOUND, ctx, ctx->current, "not found '%s'", ctx->current->lexeme); + compiler_diagnostic_message(ERROR_NOT_FOUND, ctx, ctx->current, "not found '%s'", ctx->current->lexeme); throw; } parser_match(ctx); @@ -13082,16 +13379,24 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) p_expression_node->expression_type = PRIMARY_EXPRESSION_STRING_LITERAL; p_expression_node->first_token = ctx->current; p_expression_node->last_token = ctx->current; - + enum type_specifier_flags char_type = TYPE_SPECIFIER_CHAR; if (get_char_type(ctx->current->lexeme) == 2) { - if (sizeof(wchar_t) == 2) - char_type = TYPE_SPECIFIER_UNSIGNED | TYPE_SPECIFIER_SHORT; - else if (sizeof(wchar_t) == 4) - char_type = TYPE_SPECIFIER_UNSIGNED | TYPE_SPECIFIER_INT; + /* + automatically finding out the type of wchar_t to copy + GCC or MSVC. + windows it is short linux is + */ + char_type = + _Generic((wchar_t)0, + short: TYPE_SPECIFIER_SHORT, + unsigned short : TYPE_SPECIFIER_UNSIGNED | TYPE_SPECIFIER_SHORT, + int : TYPE_SPECIFIER_INT, + unsigned int : TYPE_SPECIFIER_UNSIGNED | TYPE_SPECIFIER_INT + ); } p_expression_node->type = type_make_literal_string(string_literal_byte_size(ctx->current->lexeme), char_type); @@ -13186,7 +13491,7 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_NO_MATCH_FOR_GENERIC, ctx, ctx->current, "no match for generic"); + compiler_diagnostic_message(ERROR_NO_MATCH_FOR_GENERIC, ctx, ctx->current, "no match for generic"); } } else if (ctx->current->type == '(') @@ -13196,19 +13501,18 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) p_expression_node->first_token = ctx->current; parser_match(ctx); p_expression_node->right = expression(ctx); - - + if (p_expression_node->right == NULL) throw; p_expression_node->type = type_dup(&p_expression_node->right->type); p_expression_node->constant_value = p_expression_node->right->constant_value; - if (p_expression_node->right == NULL) throw; + p_expression_node->last_token = ctx->current; parser_match_tk(ctx, ')'); } else { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "unexpected"); + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "unexpected"); } } catch @@ -13223,7 +13527,7 @@ struct expression* owner primary_expression(struct parser_ctx* ctx) } -void argument_expression_delete(struct argument_expression* owner p) +void argument_expression_delete(struct argument_expression* owner opt p) { if (p) { @@ -13249,7 +13553,7 @@ struct argument_expression_list argument_expression_list(struct parser_ctx* ctx) argument-expression-ctx , assignment-expression */ - struct argument_expression_list list = {0}; + struct argument_expression_list list = { 0 }; struct argument_expression* owner p_argument_expression = NULL; try @@ -13368,11 +13672,11 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct p_expression_node_new->first_token = ctx->current; p_expression_node_new->expression_type = POSTFIX_ARRAY; //the result of the subscription operator ([]) - + if (!type_is_pointer_or_array(&p_expression_node->type)) { - compiler_set_error_with_token(C_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, + compiler_diagnostic_message(ERROR_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, ctx, ctx->current, "subscripted value is neither array nor pointer"); @@ -13407,7 +13711,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct { if (index >= (unsigned long long) p_expression_node->type.array_size) { - compiler_set_error_with_token(C_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, + compiler_diagnostic_message(W_OUT_OF_BOUNDS, ctx, ctx->current, "index %d is past the end of the array", index); @@ -13432,7 +13736,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct if (!type_is_function_or_function_pointer(&p_expression_node->type)) { - compiler_set_error_with_token(C_CALLED_OBJECT_IS_NOT_FUNCTION_OR_FUNCTION_POINTER, + compiler_diagnostic_message(ERROR_CALLED_OBJECT_IS_NOT_FUNCTION_OR_FUNCTION_POINTER, ctx, ctx->current, "called object is not attr function or function pointer"); @@ -13462,14 +13766,15 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct p_expression_node_new->first_token = ctx->current; p_expression_node_new->expression_type = POSTFIX_DOT; p_expression_node_new->left = p_expression_node; - + p_expression_node = NULL; /*MOVED*/ + p_expression_node_new->declarator = p_expression_node_new->left->declarator; parser_match(ctx); - if (p_expression_node->type.type_specifier_flags & TYPE_SPECIFIER_STRUCT_OR_UNION) + if (p_expression_node_new->left->type.type_specifier_flags & TYPE_SPECIFIER_STRUCT_OR_UNION) { struct struct_or_union_specifier* p = - find_struct_or_union_specifier(ctx, p_expression_node->type.struct_or_union_specifier->tag_name); + find_struct_or_union_specifier(ctx, p_expression_node_new->left->type.struct_or_union_specifier->tag_name); p = get_complete_struct_or_union_specifier(p); if (p) { @@ -13488,7 +13793,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCT_MEMBER_NOT_FOUND, + compiler_diagnostic_message(ERROR_STRUCT_MEMBER_NOT_FOUND, ctx, ctx->current, "struct member '%s' not found in '%s'", @@ -13504,7 +13809,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCTURE_OR_UNION_REQUIRED, + compiler_diagnostic_message(ERROR_STRUCTURE_OR_UNION_REQUIRED, ctx, ctx->current, "structure or union required"); @@ -13518,19 +13823,19 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct static_set(*p_expression_node_new, "zero"); p_expression_node_new->first_token = ctx->current; p_expression_node_new->expression_type = POSTFIX_ARROW; - + //the result of a member access through pointer -> operator is lvalue - + parser_match(ctx); if (type_is_pointer_or_array(&p_expression_node->type)) { - struct type item_type = {0}; + struct type item_type = { 0 }; if (type_is_array(&p_expression_node->type)) { - compiler_set_info_with_token(W_STYLE, ctx, ctx->current, "using '->' in array as pointer to struct"); + compiler_diagnostic_message(W_STYLE, ctx, ctx->current, "using '->' in array as pointer to struct"); item_type = get_array_item_type(&p_expression_node->type); } else @@ -13557,7 +13862,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCT_MEMBER_NOT_FOUND, + compiler_diagnostic_message(ERROR_STRUCT_MEMBER_NOT_FOUND, ctx, ctx->current, "member '%s' not found in struct '%s'", @@ -13568,7 +13873,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCT_IS_INCOMPLETE, + compiler_diagnostic_message(ERROR_STRUCT_IS_INCOMPLETE, ctx, ctx->current, "struct '%s' is incomplete.", @@ -13578,7 +13883,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCTURE_OR_UNION_REQUIRED, + compiler_diagnostic_message(ERROR_STRUCTURE_OR_UNION_REQUIRED, ctx, ctx->current, "structure or union required"); @@ -13587,7 +13892,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct } else { - compiler_set_error_with_token(C_STRUCTURE_OR_UNION_REQUIRED, + compiler_diagnostic_message(ERROR_STRUCTURE_OR_UNION_REQUIRED, ctx, ctx->current, "structure or union required"); @@ -13600,7 +13905,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct { if (!expression_is_lvalue(p_expression_node)) { - compiler_set_error_with_token(C_OPERATOR_NEEDS_LVALUE, + compiler_diagnostic_message(ERROR_OPERATOR_NEEDS_LVALUE, ctx, p_expression_node->first_token, "lvalue required as increment operand"); @@ -13621,7 +13926,7 @@ struct expression* owner postfix_expression_tail(struct parser_ctx* ctx, struct { if (!expression_is_lvalue(p_expression_node)) { - compiler_set_error_with_token(C_OPERATOR_NEEDS_LVALUE, + compiler_diagnostic_message(ERROR_OPERATOR_NEEDS_LVALUE, ctx, p_expression_node->first_token, "lvalue required as decrement operand"); @@ -13695,7 +14000,7 @@ struct expression* owner postfix_expression_type_name(struct parser_ctx* ctx, st { p_expression_node->expression_type = POSTFIX_EXPRESSION_COMPOUND_LITERAL; p_expression_node->braced_initializer = braced_initializer(ctx); - + } p_expression_node->last_token = ctx->previous; @@ -13889,7 +14194,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) //visual studio formater is adding spaces.. if (style_has_space(ctx->current)) { - compiler_set_info_with_token(W_STYLE, ctx, ctx->current, "don't use spaces"); + compiler_diagnostic_message(W_STYLE, ctx, ctx->current, "don't use spaces"); } #endif @@ -13924,7 +14229,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) new_expression->constant_value = constant_value_unary_op(&new_expression->right->constant_value, op); new_expression->type = type_dup(&new_expression->right->type); - + } else if (op == '+') { @@ -13933,22 +14238,36 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) new_expression->constant_value = constant_value_unary_op(&new_expression->right->constant_value, op); new_expression->type = type_dup(&new_expression->right->type); - + } else if (op == '*') { new_expression->expression_type = UNARY_EXPRESSION_CONTENT; //the result of the indirection(unary*) operator applied to a pointer to object - - if (!type_is_pointer(&new_expression->right->type)) + + if (!type_is_pointer_or_array(&new_expression->right->type)) { - compiler_set_error_with_token(C_INDIRECTION_REQUIRES_POINTER_OPERAND, + compiler_diagnostic_message(ERROR_INDIRECTION_REQUIRES_POINTER_OPERAND, ctx, op_position, "indirection requires pointer operand"); } - new_expression->type = type_remove_pointer(&new_expression->right->type); + if (type_is_pointer(&new_expression->right->type)) + { + new_expression->type = type_remove_pointer(&new_expression->right->type); + } + else + { + compiler_diagnostic_message(W_ARRAY_INDIRECTION, + ctx, + op_position, + "array indirection"); + if(new_expression->right->type.next) + new_expression->type = get_array_item_type(&new_expression->right->type); + else + new_expression->type = (struct type){0}; + } } else if (op == '&') { @@ -13961,7 +14280,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) if (!expression_is_lvalue(new_expression->right)) { - compiler_set_error_with_token(C_ADDRESS_OF_REGISTER, + compiler_diagnostic_message(ERROR_ADDRESS_OF_REGISTER, ctx, new_expression->right->first_token, "lvalue required as unary '&' operand"); @@ -13971,7 +14290,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) { if (new_expression->right->declarator) { - compiler_set_error_with_token(C_ADDRESS_OF_REGISTER, + compiler_diagnostic_message(ERROR_ADDRESS_OF_REGISTER, ctx, new_expression->right->first_token, "address of register variable 'x' requested", @@ -13979,7 +14298,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_ADDRESS_OF_REGISTER, + compiler_diagnostic_message(ERROR_ADDRESS_OF_REGISTER, ctx, new_expression->right->first_token, "address of register variable requested - declarator?"); @@ -13993,7 +14312,7 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) else { expression_delete(new_expression); - compiler_set_error_with_token(C_INVALID_TOKEN, + compiler_diagnostic_message(ERROR_INVALID_TOKEN, ctx, ctx->current, "invalid token"); @@ -14102,48 +14421,48 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) switch (traits_token->type) { - case TK_KEYWORD_IS_LVALUE: - new_expression->constant_value = make_constant_value_ll(expression_is_lvalue(new_expression->right), false); - break; + case TK_KEYWORD_IS_LVALUE: + new_expression->constant_value = make_constant_value_ll(expression_is_lvalue(new_expression->right), false); + break; - case TK_KEYWORD_IS_CONST: - new_expression->constant_value = make_constant_value_ll(type_is_const(p_type), false); - break; - case TK_KEYWORD_IS_OWNER: - new_expression->constant_value = make_constant_value_ll(type_is_owner(p_type), false); - break; + case TK_KEYWORD_IS_CONST: + new_expression->constant_value = make_constant_value_ll(type_is_const(p_type), false); + break; + case TK_KEYWORD_IS_OWNER: + new_expression->constant_value = make_constant_value_ll(type_is_owner(p_type), false); + break; - case TK_KEYWORD_IS_POINTER: - new_expression->constant_value = make_constant_value_ll(type_is_pointer(p_type), false); + case TK_KEYWORD_IS_POINTER: + new_expression->constant_value = make_constant_value_ll(type_is_pointer(p_type), false); - break; - case TK_KEYWORD_IS_FUNCTION: - new_expression->constant_value = make_constant_value_ll(type_is_function(p_type), false); + break; + case TK_KEYWORD_IS_FUNCTION: + new_expression->constant_value = make_constant_value_ll(type_is_function(p_type), false); - break; - case TK_KEYWORD_IS_ARRAY: - new_expression->constant_value = make_constant_value_ll(type_is_array(p_type), false); + break; + case TK_KEYWORD_IS_ARRAY: + new_expression->constant_value = make_constant_value_ll(type_is_array(p_type), false); - break; - case TK_KEYWORD_IS_ARITHMETIC: - new_expression->constant_value = make_constant_value_ll(type_is_arithmetic(p_type), false); + break; + case TK_KEYWORD_IS_ARITHMETIC: + new_expression->constant_value = make_constant_value_ll(type_is_arithmetic(p_type), false); - break; - case TK_KEYWORD_IS_SCALAR: - new_expression->constant_value = make_constant_value_ll(type_is_scalar(p_type), false); + break; + case TK_KEYWORD_IS_SCALAR: + new_expression->constant_value = make_constant_value_ll(type_is_scalar(p_type), false); - break; - case TK_KEYWORD_IS_FLOATING_POINT: - new_expression->constant_value = make_constant_value_ll(type_is_floating_point(p_type), false); + break; + case TK_KEYWORD_IS_FLOATING_POINT: + new_expression->constant_value = make_constant_value_ll(type_is_floating_point(p_type), false); - break; - case TK_KEYWORD_IS_INTEGRAL: - new_expression->constant_value = make_constant_value_ll(type_is_integer(p_type), false); + break; + case TK_KEYWORD_IS_INTEGRAL: + new_expression->constant_value = make_constant_value_ll(type_is_integer(p_type), false); - break; + break; - default: - assert(false); + default: + assert(false); } @@ -14164,11 +14483,11 @@ struct expression* owner unary_expression(struct parser_ctx* ctx) parser_match(ctx); parser_match_tk(ctx, '('); new_expression->right = expression(ctx); - + /*if (constant_value_is_valid(&new_expression->right->constant_value) && !constant_value_to_bool(&new_expression->right->constant_value)) { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx, + compiler_diagnostic_message(ERROR_STATIC_ASSERT_FAILED, ctx, new_expression->right->first_token, "assert failed"); }*/ @@ -14278,11 +14597,11 @@ struct expression* owner cast_expression(struct parser_ctx* ctx) if (type_is_pointer(&p_expression_node->left->type)) { //(int*) malloc(1) - compiler_set_error_with_token(C_DISCARDING_OWNER, ctx, p_expression_node->first_token, "discarding owner pointer"); + compiler_diagnostic_message(W_DISCARDING_OWNER, ctx, p_expression_node->first_token, "discarding owner pointer"); } else { - compiler_set_error_with_token(C_DISCARDING_OWNER, ctx, p_expression_node->first_token, "discarding owner"); + compiler_diagnostic_message(W_DISCARDING_OWNER, ctx, p_expression_node->first_token, "discarding owner"); } } } @@ -14332,7 +14651,7 @@ struct expression* owner cast_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "unexpected"); + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "unexpected"); } } catch @@ -14382,6 +14701,8 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) enum token_type op = ctx->current->type; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; //MOVED + new_expression->right = cast_expression(ctx); if (new_expression->left == NULL || @@ -14400,12 +14721,12 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) if (!type_is_arithmetic(&new_expression->left->type)) { - compiler_set_error_with_token(C_LEFT_IS_NOT_ARITHMETIC, ctx, ctx->current, "left * is not arithmetic"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_ARITHMETIC, ctx, ctx->current, "left * is not arithmetic"); } if (!type_is_arithmetic(&new_expression->right->type)) { - compiler_set_error_with_token(C_RIGHT_IS_NOT_ARITHMETIC, ctx, ctx->current, "right * is not arithmetic"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_ARITHMETIC, ctx, ctx->current, "right * is not arithmetic"); } } @@ -14420,17 +14741,17 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) if (constant_value_is_valid(&new_expression->right->constant_value) && constant_value_to_ll(&new_expression->right->constant_value) == 0) { - compiler_set_error_with_token(C_DIVIZION_BY_ZERO, ctx, ctx->current, "division by zero"); + compiler_diagnostic_message(W_DIVIZION_BY_ZERO, ctx, ctx->current, "division by zero"); } if (!type_is_arithmetic(&new_expression->left->type)) { - compiler_set_error_with_token(C_LEFT_IS_NOT_ARITHMETIC, ctx, ctx->current, "left / is not arithmetic"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_ARITHMETIC, ctx, ctx->current, "left / is not arithmetic"); } if (!type_is_arithmetic(&new_expression->right->type)) { - compiler_set_error_with_token(C_RIGHT_IS_NOT_ARITHMETIC, ctx, ctx->current, "right / is not arithmetic"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_ARITHMETIC, ctx, ctx->current, "right / is not arithmetic"); } } else if (op == '%') @@ -14440,18 +14761,18 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) if (!type_is_integer(&new_expression->left->type)) { - compiler_set_error_with_token(C_LEFT_IS_NOT_INTEGER, ctx, ctx->current, "left is not integer"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_INTEGER, ctx, ctx->current, "left is not integer"); } if (!type_is_integer(&new_expression->right->type)) { - compiler_set_error_with_token(C_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "right is not integer"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "right is not integer"); } if (constant_value_is_valid(&new_expression->right->constant_value) && constant_value_to_ll(&new_expression->right->constant_value) == 0) { - compiler_set_error_with_token(C_DIVIZION_BY_ZERO, ctx, ctx->current, "divizion by zero"); + compiler_diagnostic_message(W_DIVIZION_BY_ZERO, ctx, ctx->current, "divizion by zero"); } } @@ -14463,7 +14784,7 @@ struct expression* owner multiplicative_expression(struct parser_ctx* ctx) if (code != 0) { expression_delete(new_expression); - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid type multiplicative expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid type multiplicative expression"); throw; } @@ -14486,13 +14807,16 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) */ struct expression* owner p_expression_node = NULL; - struct expression* owner new_expression = NULL; + try { p_expression_node = multiplicative_expression(ctx); - if (p_expression_node == NULL) throw; - + if (p_expression_node == NULL) + { + compiler_diagnostic_message(ERROR_OUT_OF_MEM, ctx, ctx->current, "out of mem"); + throw; + } while (ctx->current != NULL && (ctx->current->type == '+' || @@ -14500,14 +14824,20 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) { struct token* operator_position = ctx->current; - assert(new_expression == NULL); - new_expression = calloc(1, sizeof * new_expression); + struct expression* owner new_expression = calloc(1, sizeof * new_expression); + if (new_expression == NULL) + { + compiler_diagnostic_message(ERROR_OUT_OF_MEM, ctx, ctx->current, "out of mem"); + throw; + } + new_expression->first_token = ctx->current; static_set(*new_expression, "zero"); enum token_type op = ctx->current->type; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ static int count = 0; count++; @@ -14523,11 +14853,11 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) if (!type_is_scalar(&new_expression->left->type)) { - compiler_set_error_with_token(C_LEFT_IS_NOT_SCALAR, ctx, operator_position, "left operator is not scalar"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_SCALAR, ctx, operator_position, "left operator is not scalar"); } if (!type_is_scalar(&new_expression->right->type)) { - compiler_set_error_with_token(C_RIGHT_IS_NOT_SCALAR, ctx, operator_position, "right operator is not scalar"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_SCALAR, ctx, operator_position, "right operator is not scalar"); } @@ -14552,7 +14882,9 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "internal error"); + expression_delete(new_expression); + new_expression = NULL; + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "internal error"); throw; } } @@ -14575,7 +14907,7 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "expected integer type on right"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "expected integer type on right"); } } else if (right_category == TYPE_CATEGORY_POINTER || right_category == TYPE_CATEGORY_ARRAY /*|| right_category == TYPE_CATEGORY_FUNCTION*/) @@ -14593,12 +14925,12 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_LEFT_IS_NOT_INTEGER, ctx, ctx->current, "expected integer type on left"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_INTEGER, ctx, ctx->current, "expected integer type on left"); } } else { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types additive expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types additive expression"); } } } @@ -14621,7 +14953,10 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "internal error type_common"); + expression_delete(new_expression); + new_expression = NULL; + + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "internal error type_common"); throw; } } @@ -14638,7 +14973,7 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) if (!type_is_same(&t1, &t2, false)) { - compiler_set_error_with_token(C_INCOMPATIBLE_POINTER_TYPES, ctx, ctx->current, "incompatible pointer types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_POINTER_TYPES, ctx, ctx->current, "incompatible pointer types"); } new_expression->type = type_make_int(); @@ -14654,13 +14989,13 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "right must be integer type"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_INTEGER, ctx, ctx->current, "right must be integer type"); } } } else { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types for operator -"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types for operator -"); } } } @@ -14675,14 +15010,6 @@ struct expression* owner additive_expression(struct parser_ctx* ctx) } catch { - if (p_expression_node) - { - //expression_node_delete(p_expression_node); - } - if (new_expression) - { - //expression_node_delete(p_expression_node); - } } @@ -14716,6 +15043,8 @@ struct expression* owner shift_expression(struct parser_ctx* ctx) enum token_type op = ctx->current->type; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = multiplicative_expression(ctx); if (new_expression->left == NULL || new_expression->right == NULL) { @@ -14743,7 +15072,7 @@ struct expression* owner shift_expression(struct parser_ctx* ctx) if (code != 0) { expression_delete(new_expression); - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid type shift expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid type shift expression"); throw; } @@ -14794,6 +15123,7 @@ struct expression* owner relational_expression(struct parser_ctx* ctx) enum token_type op = ctx->current->type; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ new_expression->right = shift_expression(ctx); if (new_expression->right == NULL) @@ -14858,7 +15188,7 @@ static void check_diferent_enuns(struct parser_ctx* ctx, if (right->type.enum_specifier->tag_token) righttag = right->type.enum_specifier->tag_token->lexeme; - compiler_set_warning_with_token(W_ENUN_CONVERSION, + compiler_diagnostic_message(W_ENUN_CONVERSION, ctx, operator_token, "implicit conversion from 'enum %s' to 'enum %s'", @@ -14934,6 +15264,8 @@ struct expression* owner equality_expression(struct parser_ctx* ctx) struct token* operator_token = ctx->current; parser_match(ctx); new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = relational_expression(ctx); if (new_expression->right == NULL) throw; @@ -15006,6 +15338,8 @@ struct expression* owner and_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = AND_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = equality_expression(ctx); if (new_expression->right == NULL) throw; @@ -15017,7 +15351,7 @@ struct expression* owner and_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types and expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types and expression"); throw; } @@ -15060,6 +15394,8 @@ struct expression* owner exclusive_or_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = EXCLUSIVE_OR_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = and_expression(ctx); if (new_expression->right == NULL) throw; @@ -15071,7 +15407,7 @@ struct expression* owner exclusive_or_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types or expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types or expression"); throw; } @@ -15111,6 +15447,8 @@ struct expression* owner inclusive_or_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = INCLUSIVE_OR_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = exclusive_or_expression(ctx); if (new_expression->right == NULL) { @@ -15127,7 +15465,7 @@ struct expression* owner inclusive_or_expression(struct parser_ctx* ctx) if (code != 0) { expression_delete(new_expression); - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types inclusive or expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types inclusive or expression"); throw; } @@ -15165,6 +15503,8 @@ struct expression* owner logical_and_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = INCLUSIVE_AND_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = inclusive_or_expression(ctx); if (new_expression->right == NULL) { @@ -15179,10 +15519,10 @@ struct expression* owner logical_and_expression(struct parser_ctx* ctx) int code = type_common(&new_expression->left->type, &new_expression->right->type, &new_expression->type); if (code != 0) { - expression_delete(new_expression); type_print(&new_expression->left->type); type_print(&new_expression->right->type); - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid types logicl and expression"); + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid types logicl and expression"); + expression_delete(new_expression); throw; } p_expression_node = new_expression; @@ -15219,6 +15559,8 @@ struct expression* owner logical_or_expression(struct parser_ctx* ctx) new_expression->first_token = ctx->current; new_expression->expression_type = LOGICAL_OR_EXPRESSION; new_expression->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ + new_expression->right = logical_and_expression(ctx); if (new_expression->right == NULL) { @@ -15234,14 +15576,14 @@ struct expression* owner logical_or_expression(struct parser_ctx* ctx) if (!type_is_scalar(&new_expression->left->type)) { expression_delete(new_expression); - compiler_set_error_with_token(C_LEFT_IS_NOT_SCALAR, ctx, ctx->current, "left type is not scalar for or expression"); + compiler_diagnostic_message(ERROR_LEFT_IS_NOT_SCALAR, ctx, ctx->current, "left type is not scalar for or expression"); throw; } if (!type_is_scalar(&new_expression->right->type)) { expression_delete(new_expression); - compiler_set_error_with_token(C_RIGHT_IS_NOT_SCALAR, ctx, ctx->current, "right type is not scalar for or expression"); + compiler_diagnostic_message(ERROR_RIGHT_IS_NOT_SCALAR, ctx, ctx->current, "right type is not scalar for or expression"); throw; } @@ -15273,12 +15615,9 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) //aqui eh duvidoso mas conditional faz a unary tb. //a diferenca q nao eh qualquer expressao //que pode ser de atribuicao - struct expression* owner p_expression_node = NULL; - try + struct expression* owner p_expression_node = conditional_expression(ctx); + if (p_expression_node) { - p_expression_node = conditional_expression(ctx); - if (p_expression_node == NULL) throw; - while (ctx->current != NULL && (ctx->current->type == '=' || ctx->current->type == '*=' || @@ -15297,7 +15636,7 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) struct expression* owner new_expression = calloc(1, sizeof * new_expression); - if (new_expression == NULL) throw; + if (new_expression == NULL) break; //will return a half parsed expression static_set(*new_expression, "zero"); new_expression->first_token = ctx->current; @@ -15309,23 +15648,23 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) if (category == TYPE_CATEGORY_FUNCTION) { - compiler_set_error_with_token(C_ASSIGNMENT_OF_FUNCTION, ctx, ctx->current, "assignment of function"); + compiler_diagnostic_message(ERROR_ASSIGNMENT_OF_FUNCTION, ctx, ctx->current, "assignment of function"); } else if (category == TYPE_CATEGORY_ARRAY) { - compiler_set_error_with_token(C_ASSIGNMENT_TO_EXPRESSION_WITH_ARRAY_TYPE, ctx, ctx->current, "assignment to expression with array type"); + compiler_diagnostic_message(ERROR_ASSIGNMENT_TO_EXPRESSION_WITH_ARRAY_TYPE, ctx, ctx->current, "assignment to expression with array type"); } else { if (type_is_const(&new_expression->left->type)) { - compiler_set_error_with_token(C_ASSIGNMENT_OF_READ_ONLY_OBJECT, ctx, ctx->current, "assignment of read-only object"); + compiler_diagnostic_message(ERROR_ASSIGNMENT_OF_READ_ONLY_OBJECT, ctx, ctx->current, "assignment of read-only object"); } } if (!expression_is_lvalue(new_expression->left)) { - compiler_set_error_with_token(C_OPERATOR_NEEDS_LVALUE, + compiler_diagnostic_message(ERROR_OPERATOR_NEEDS_LVALUE, ctx, op_token, "lvalue required as left operand of assignment"); @@ -15335,7 +15674,7 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) if (new_expression->right == NULL) { expression_delete(new_expression); - throw; + return NULL; } @@ -15348,7 +15687,7 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) new_expression->last_token = new_expression->right->last_token; new_expression->type = type_dup(&new_expression->right->type); - + new_expression->type.storage_class_specifier_flags &= ~STORAGE_SPECIFIER_FUNCTION_RETURN; new_expression->type.storage_class_specifier_flags &= ~STORAGE_SPECIFIER_FUNCTION_RETURN_NODISCARD; @@ -15359,9 +15698,6 @@ struct expression* owner assignment_expression(struct parser_ctx* ctx) p_expression_node = new_expression; } } - catch - { - } return p_expression_node; } @@ -15377,7 +15713,7 @@ void argument_expression_list_destroy(struct argument_expression_list* obj_owner } } -void expression_delete(struct expression* owner p) +void expression_delete(struct expression* owner opt p) { if (p) { @@ -15418,6 +15754,7 @@ struct expression* owner expression(struct parser_ctx* ctx) p_expression_node_new->first_token = ctx->current; p_expression_node_new->expression_type = ASSIGNMENT_EXPRESSION; p_expression_node_new->left = p_expression_node; + p_expression_node = NULL; /*MOVED*/ p_expression_node_new->right = expression(ctx); if (p_expression_node_new->right == NULL) @@ -15425,7 +15762,7 @@ struct expression* owner expression(struct parser_ctx* ctx) expression_delete(p_expression_node_new); throw; } - p_expression_node->last_token = p_expression_node_new->right->last_token; + p_expression_node_new->left->last_token = p_expression_node_new->right->last_token; p_expression_node = p_expression_node_new; } @@ -15474,8 +15811,8 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) logical-OR-expression ? expression : conditional-expression */ struct expression* owner p_expression_node = NULL; - struct type left_type = {0}; - struct type right_type = {0}; + struct type left_type = { 0 }; + struct type right_type = { 0 }; try { p_expression_node = logical_or_expression(ctx); @@ -15490,6 +15827,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) p_conditional_expression->first_token = ctx->current; p_conditional_expression->expression_type = CONDITIONAL_EXPRESSION; p_conditional_expression->condition_expr = p_expression_node; + p_expression_node = NULL; /*MOVED*/ parser_match(ctx); //? @@ -15550,7 +15888,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) /*The first operand shall have scalar type*/ if (!type_is_scalar(&p_conditional_expression->condition_expr->type)) { - compiler_set_error_with_token(C_CONDITION_MUST_HAVE_SCALAR_TYPE, ctx, ctx->current, "condition must have scalar type"); + compiler_diagnostic_message(ERROR_CONDITION_MUST_HAVE_SCALAR_TYPE, ctx, ctx->current, "condition must have scalar type"); } else if (type_is_arithmetic(&left_type) && type_is_arithmetic(&right_type)) @@ -15568,7 +15906,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) */ if (!type_is_same(&left_type, &right_type, true)) { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); } type_swap(&p_conditional_expression->type, &right_type); @@ -15612,7 +15950,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) { //type_print(&left_type); //type_print(&right_type); - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, ctx->current, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, ctx->current, "incompatible types"); } else { @@ -15621,7 +15959,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); } } @@ -15643,7 +15981,7 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) } else if (!type_is_same(&left_type, &right_type, false)) { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); } else @@ -15653,13 +15991,14 @@ struct expression* owner conditional_expression(struct parser_ctx* ctx) } else { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types"); } } else { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types??"); - assert(false); + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, p_conditional_expression->condition_expr->first_token, "incompatible types??"); + //assert(false); + return NULL; } p_expression_node = p_conditional_expression; } @@ -15683,7 +16022,7 @@ struct expression* owner constant_expression(struct parser_ctx* ctx, bool show_e p_expression && !constant_value_is_valid(&p_expression->constant_value)) { - compiler_set_error_with_token(C_EXPECTED_CONSTANT_EXPRESSION, ctx, ctx->current, "expected constant expression"); + compiler_diagnostic_message(ERROR_EXPECTED_CONSTANT_EXPRESSION, ctx, ctx->current, "expected constant expression"); } return p_expression; @@ -15695,16 +16034,16 @@ bool expression_is_lvalue(const struct expression* expr) switch (expr->expression_type) { - case PRIMARY_EXPRESSION_DECLARATOR: - case PRIMARY_EXPRESSION__FUNC__: - case PRIMARY_EXPRESSION_STRING_LITERAL: - case POSTFIX_ARRAY: - case POSTFIX_ARROW: - case POSTFIX_EXPRESSION_COMPOUND_LITERAL: - case UNARY_EXPRESSION_CONTENT: + case PRIMARY_EXPRESSION_DECLARATOR: + case PRIMARY_EXPRESSION__FUNC__: + case PRIMARY_EXPRESSION_STRING_LITERAL: + case POSTFIX_ARRAY: + case POSTFIX_ARROW: + case POSTFIX_EXPRESSION_COMPOUND_LITERAL: + case UNARY_EXPRESSION_CONTENT: return true; - default: - break; + default: + break; } if (expr->expression_type == PRIMARY_EXPRESSION_PARENTESIS) @@ -15713,7 +16052,7 @@ bool expression_is_lvalue(const struct expression* expr) } else if (expr->expression_type == POSTFIX_DOT) { - return expression_is_lvalue(expr->left); + return expression_is_lvalue(expr->left); } return false; @@ -15740,32 +16079,34 @@ bool expression_is_subjected_to_lvalue_conversion(struct expression* expression) switch (expression->expression_type) { - case UNARY_EXPRESSION_ADDRESSOF: - case UNARY_EXPRESSION_INCREMENT: - case UNARY_EXPRESSION_DECREMENT: - case POSTFIX_INCREMENT: - case POSTFIX_DECREMENT: - return false; + case UNARY_EXPRESSION_ADDRESSOF: + case UNARY_EXPRESSION_INCREMENT: + case UNARY_EXPRESSION_DECREMENT: + case POSTFIX_INCREMENT: + case POSTFIX_DECREMENT: + return false; + default: + if (expression->type.storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) + return true; } - if (expression->type.storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) - return true; - return true; } +/* End of: expressions.c */ +/* Start of: pre_expressions.c */ /* For performance reasons we will separate expression from preprocessor from compiler. */ + #ifdef _WIN32 #endif #if defined _MSC_VER && !defined __POCC__ #endif - /*contexto expressoes preprocessador*/ struct pre_expression_ctx { @@ -15773,38 +16114,35 @@ struct pre_expression_ctx long long value; }; - -static void pre_postfix_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_cast_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_multiplicative_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_additive_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_shift_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_and_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_exclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_inclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_logical_and_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_logical_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); - - +static void pre_postfix_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_cast_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_multiplicative_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_unary_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_additive_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_shift_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_relational_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_equality_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_and_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_exclusive_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_inclusive_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_logical_and_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_logical_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_conditional_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_conditional_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); /* -* preprocessor uses long long -*/ -static int ppnumber_to_longlong(struct token* token, long long* result) + * preprocessor uses long long + */ +static int ppnumber_to_longlong(struct token *token, long long *result) { /*copia removendo os separadores*/ - //um dos maiores buffer necessarios seria 128 bits binario... - //0xb1'1'1.... + // um dos maiores buffer necessarios seria 128 bits binario... + // 0xb1'1'1.... int c = 0; - char buffer[128 * 2 + 4] = { 0 }; - const char* s = token->lexeme; + char buffer[128 * 2 + 4] = {0}; + const char *s = token->lexeme; while (*s) { if (*s != '\'') @@ -15818,27 +16156,26 @@ static int ppnumber_to_longlong(struct token* token, long long* result) if (buffer[0] == '0' && buffer[1] == 'x') { - //hex + // hex *result = strtoll(buffer + 2, 0, 16); } else if (buffer[0] == '0' && - buffer[1] == 'b') + buffer[1] == 'b') { - //binario + // binario *result = strtoll(buffer + 2, 0, 2); } else if (buffer[0] == '0') { - //octal + // octal *result = strtoll(buffer, 0, 8); } else { - //decimal + // decimal *result = strtoll(buffer, 0, 10); } - return 0; } @@ -15848,7 +16185,7 @@ static int ppnumber_to_longlong(struct token* token, long long* result) into another so the head of the input list is the current. We could use the same concept here removing current. */ -static struct token* pre_match(struct preprocessor_ctx* ctx) +static struct token *pre_match(struct preprocessor_ctx *ctx) { ctx->current = ctx->current->next; @@ -15860,7 +16197,7 @@ static struct token* pre_match(struct preprocessor_ctx* ctx) return ctx->current; } -static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_primary_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* primary-expression: @@ -15874,7 +16211,7 @@ static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expre { if (ctx->current->type == TK_CHAR_CONSTANT) { - const char* p = ctx->current->lexeme + 1; + const char *p = ctx->current->lexeme + 1; ectx->value = 0; int count = 0; while (*p != '\'') @@ -15884,7 +16221,7 @@ static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expre count++; if (count > 4) { - preprocessor_set_warning_with_token(W_NONE, ctx, ctx->current, "character constant too long for its type"); + preprocessor_diagnostic_message(W_NOTE, ctx, ctx->current, "character constant too long for its type"); } } @@ -15898,24 +16235,24 @@ static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expre else if (ctx->current->type == '(') { pre_match(ctx); - pre_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (ctx->current && ctx->current->type != ')') { - preprocessor_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "expected )"); + preprocessor_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "expected )"); throw; } pre_match(ctx); } else { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, - ctx, - ctx->current, - "token '%s' is not valid in preprocessor expressions", - ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, + ctx, + ctx->current, + "token '%s' is not valid in preprocessor expressions", + ctx->current->lexeme); throw; - } } catch @@ -15923,10 +16260,7 @@ static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expre } } - - - -static void pre_postfix_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_postfix_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* postfix-expression: @@ -15946,16 +16280,16 @@ static void pre_postfix_expression(struct preprocessor_ctx* ctx,struct pre_expre */ try { - pre_primary_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_primary_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; } catch { } } - -static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_unary_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* unary-expression: @@ -15973,25 +16307,21 @@ static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_express { if (ctx->current->type == '++' || ctx->current->type == '--') { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, - ctx, - ctx->current, - "token '%s' is not valid in preprocessor expressions", - ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, + ctx, + ctx->current, + "token '%s' is not valid in preprocessor expressions", + ctx->current->lexeme); throw; } else if (ctx->current != NULL && - (ctx->current->type == '&' - || ctx->current->type == '*' - || ctx->current->type == '+' - || ctx->current->type == '-' - || ctx->current->type == '~' - || ctx->current->type == '!')) + (ctx->current->type == '&' || ctx->current->type == '*' || ctx->current->type == '+' || ctx->current->type == '-' || ctx->current->type == '~' || ctx->current->type == '!')) { enum token_type op = ctx->current->type; pre_match(ctx); - pre_cast_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_cast_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '!') ectx->value = !ectx->value; @@ -16003,20 +16333,20 @@ static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_express ectx->value = +ectx->value; else if (op == '*') { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); } else if (op == '&') { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); } else { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); } } - else + else { - pre_postfix_expression(ctx, ectx); + pre_postfix_expression(ctx, ectx); } } catch @@ -16024,17 +16354,17 @@ static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_express } } -static void pre_cast_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_cast_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* cast-expression: unary-expression ( type-name ) cast-expression */ - pre_unary_expression(ctx, ectx); + pre_unary_expression(ctx, ectx); } -static void pre_multiplicative_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_multiplicative_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* multiplicative-expression: @@ -16045,19 +16375,21 @@ static void pre_multiplicative_expression(struct preprocessor_ctx* ctx,struct pr */ try { - pre_cast_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_cast_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '*' || + (ctx->current->type == '*' || ctx->current->type == '/' || ctx->current->type == '%')) { enum token_type op = ctx->current->type; pre_match(ctx); long long left_value = ectx->value; - pre_cast_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_cast_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '*') { @@ -16078,7 +16410,7 @@ static void pre_multiplicative_expression(struct preprocessor_ctx* ctx,struct pr } } -static void pre_additive_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_additive_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* additive-expression: @@ -16088,23 +16420,25 @@ static void pre_additive_expression(struct preprocessor_ctx* ctx,struct pre_expr */ try { - pre_multiplicative_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '+' || + (ctx->current->type == '+' || ctx->current->type == '-')) { enum token_type op = ctx->current->type; pre_match(ctx); if (ctx->current == NULL) { - preprocessor_set_error_with_token(C_UNEXPECTED_END_OF_FILE, ctx, ctx->current, "unexpected end of file"); + preprocessor_diagnostic_message(ERROR_UNEXPECTED_END_OF_FILE, ctx, ctx->current, "unexpected end of file"); throw; } long long left_value = ectx->value; - pre_multiplicative_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '+') { @@ -16121,7 +16455,7 @@ static void pre_additive_expression(struct preprocessor_ctx* ctx,struct pre_expr } } -static void pre_shift_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_shift_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* shift-expression: @@ -16131,18 +16465,20 @@ static void pre_shift_expression(struct preprocessor_ctx* ctx,struct pre_express */ try { - pre_additive_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_additive_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '>>' || + (ctx->current->type == '>>' || ctx->current->type == '<<')) { enum token_type op = ctx->current->type; pre_match(ctx); long long left_value = ectx->value; - pre_multiplicative_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '>>') { @@ -16159,7 +16495,7 @@ static void pre_shift_expression(struct preprocessor_ctx* ctx,struct pre_express } } -static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_relational_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* relational-expression: @@ -16171,11 +16507,12 @@ static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_ex */ try { - pre_shift_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_shift_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '>' || + (ctx->current->type == '>' || ctx->current->type == '<' || ctx->current->type == '>=' || ctx->current->type == '<=')) @@ -16183,8 +16520,9 @@ static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_ex enum token_type op = ctx->current->type; pre_match(ctx); long long left_value = ectx->value; - pre_shift_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_shift_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '>') { @@ -16209,7 +16547,7 @@ static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_ex } } -static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_equality_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* equality-expression: @@ -16229,18 +16567,20 @@ static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expr */ try { - pre_relational_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_relational_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '==' || + (ctx->current->type == '==' || ctx->current->type == '!=')) { enum token_type op = ctx->current->type; pre_match(ctx); long long left_value = ectx->value; - pre_multiplicative_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '==') { @@ -16249,7 +16589,7 @@ static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expr else if (op == '!=') { ectx->value = left_value != ectx->value; - } + } } } catch @@ -16257,7 +16597,7 @@ static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expr } } -static void pre_and_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_and_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* AND-expression: @@ -16266,15 +16606,17 @@ static void pre_and_expression(struct preprocessor_ctx* ctx,struct pre_expressio */ try { - pre_equality_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_equality_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '&')) + (ctx->current->type == '&')) { pre_match(ctx); long long left_value = ectx->value; - pre_equality_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_equality_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; ectx->value = left_value & ectx->value; } } @@ -16283,7 +16625,7 @@ static void pre_and_expression(struct preprocessor_ctx* ctx,struct pre_expressio } } -static void pre_exclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_exclusive_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* exclusive-OR-expression: @@ -16293,16 +16635,17 @@ static void pre_exclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_ try { pre_and_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; - while (ctx->current != NULL && - (ctx->current->type == '^')) + (ctx->current->type == '^')) { pre_match(ctx); long long left_value = ectx->value; - pre_and_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; ectx->value = left_value ^ ectx->value; } } @@ -16311,7 +16654,7 @@ static void pre_exclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_ } } -static void pre_inclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_inclusive_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* inclusive-OR-expression: @@ -16321,15 +16664,17 @@ static void pre_inclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_ try { pre_exclusive_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '|')) + (ctx->current->type == '|')) { pre_match(ctx); long long left_value = ectx->value; pre_exclusive_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; ectx->value = left_value | ectx->value; } @@ -16339,7 +16684,7 @@ static void pre_inclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_ } } -static void pre_logical_and_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_logical_and_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* logical-AND-expression: @@ -16349,15 +16694,17 @@ static void pre_logical_and_expression(struct preprocessor_ctx* ctx,struct pre_e try { pre_inclusive_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '&&')) + (ctx->current->type == '&&')) { pre_match(ctx); long long left_value = ectx->value; - pre_inclusive_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_inclusive_or_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; ectx->value = left_value && ectx->value; } @@ -16367,7 +16714,7 @@ static void pre_logical_and_expression(struct preprocessor_ctx* ctx,struct pre_e } } -static void pre_logical_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_logical_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* logical-OR-expression: @@ -16376,19 +16723,20 @@ static void pre_logical_or_expression(struct preprocessor_ctx* ctx,struct pre_ex */ try { - pre_logical_and_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_logical_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '||')) + (ctx->current->type == '||')) { pre_match(ctx); long long left_value = ectx->value; - pre_logical_and_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_logical_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; ectx->value = left_value || ectx->value; - } } catch @@ -16396,30 +16744,28 @@ static void pre_logical_or_expression(struct preprocessor_ctx* ctx,struct pre_ex } } - - -static void pre_assignment_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_assignment_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* assignment-expression: conditional-expression unary-expression assignment-operator assignment-expression */ - /* - assignment-operator: one of - = *= /= %= += -= <<= >>= &= ^= |= - */ - //aqui eh duvidoso mas conditional faz a unary tb. - //a diferenca q nao eh qualquer expressao - //que pode ser de atribuicao + /* + assignment-operator: one of + = *= /= %= += -= <<= >>= &= ^= |= + */ + // aqui eh duvidoso mas conditional faz a unary tb. + // a diferenca q nao eh qualquer expressao + // que pode ser de atribuicao try { pre_conditional_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; - while (ctx->current != NULL && - (ctx->current->type == '=' || + (ctx->current->type == '=' || ctx->current->type == '*=' || ctx->current->type == '/=' || ctx->current->type == '+=' || @@ -16430,7 +16776,7 @@ static void pre_assignment_expression(struct preprocessor_ctx* ctx,struct pre_ex ctx->current->type == '^=' || ctx->current->type == '|=')) { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); throw; } } @@ -16439,7 +16785,7 @@ static void pre_assignment_expression(struct preprocessor_ctx* ctx,struct pre_ex } } -static void pre_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /*expression: assignment-expression @@ -16448,13 +16794,15 @@ static void pre_expression(struct preprocessor_ctx* ctx,struct pre_expression_ct try { pre_assignment_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; - + if (ctx->n_errors > 0) + throw; + while (ctx->current->type == ',') { pre_match(ctx); pre_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; } } catch @@ -16462,9 +16810,7 @@ static void pre_expression(struct preprocessor_ctx* ctx,struct pre_expression_ct } } - - -static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_conditional_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* conditional-expression: @@ -16474,7 +16820,8 @@ static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_e try { pre_logical_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; if (ctx->current && ctx->current->type == '?') { @@ -16482,22 +16829,26 @@ static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_e if (ectx->value) { pre_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; pre_match(ctx); //: struct pre_expression_ctx temp = {0}; - pre_conditional_expression(ctx, &temp); - if (ctx->n_errors > 0) throw; + pre_conditional_expression(ctx, &temp); + if (ctx->n_errors > 0) + throw; } else { struct pre_expression_ctx temp = {0}; pre_expression(ctx, &temp); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; pre_match(ctx); //: pre_conditional_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; } } } @@ -16506,15 +16857,17 @@ static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_e } } -int pre_constant_expression(struct preprocessor_ctx* ctx,long long* pvalue) +int pre_constant_expression(struct preprocessor_ctx *ctx, long long *pvalue) { - struct pre_expression_ctx ectx = { 0 }; + struct pre_expression_ctx ectx = {0}; pre_conditional_expression(ctx, &ectx); *pvalue = ectx.value; return ctx->n_errors > 0; } +/* End of: pre_expressions.c */ +/* Start of: type.c */ void print_item(struct osstream* ss, bool* first, const char* item) @@ -16531,58 +16884,58 @@ bool print_type_specifier_flags(struct osstream* ss, bool* first, enum type_spec if (e_type_specifier_flags & TYPE_SPECIFIER_VOID) print_item(ss, first, "void"); - if (e_type_specifier_flags & TYPE_SPECIFIER_SIGNED) + else if (e_type_specifier_flags & TYPE_SPECIFIER_SIGNED) print_item(ss, first, "signed"); - if (e_type_specifier_flags & TYPE_SPECIFIER_UNSIGNED) + else if (e_type_specifier_flags & TYPE_SPECIFIER_UNSIGNED) print_item(ss, first, "unsigned"); - if (e_type_specifier_flags & TYPE_SPECIFIER_INT) + else if (e_type_specifier_flags & TYPE_SPECIFIER_INT) print_item(ss, first, "int"); - if (e_type_specifier_flags & TYPE_SPECIFIER_SHORT) + else if (e_type_specifier_flags & TYPE_SPECIFIER_SHORT) print_item(ss, first, "short"); - if (e_type_specifier_flags & TYPE_SPECIFIER_LONG) + else if (e_type_specifier_flags & TYPE_SPECIFIER_LONG) print_item(ss, first, "long"); - if (e_type_specifier_flags & TYPE_SPECIFIER_LONG_LONG) + else if (e_type_specifier_flags & TYPE_SPECIFIER_LONG_LONG) print_item(ss, first, "long long"); - if (e_type_specifier_flags & TYPE_SPECIFIER_INT16) + else if (e_type_specifier_flags & TYPE_SPECIFIER_INT16) print_item(ss, first, "__int16"); - if (e_type_specifier_flags & TYPE_SPECIFIER_INT32) + else if (e_type_specifier_flags & TYPE_SPECIFIER_INT32) print_item(ss, first, "__int32"); - if (e_type_specifier_flags & TYPE_SPECIFIER_INT64) + else if (e_type_specifier_flags & TYPE_SPECIFIER_INT64) print_item(ss, first, "__int64"); - if (e_type_specifier_flags & TYPE_SPECIFIER_CHAR) + else if (e_type_specifier_flags & TYPE_SPECIFIER_CHAR) print_item(ss, first, "char"); - if (e_type_specifier_flags & TYPE_SPECIFIER_DOUBLE) + else if (e_type_specifier_flags & TYPE_SPECIFIER_DOUBLE) print_item(ss, first, "double"); - if (e_type_specifier_flags & TYPE_SPECIFIER_FLOAT) + else if (e_type_specifier_flags & TYPE_SPECIFIER_FLOAT) print_item(ss, first, "float"); - if (e_type_specifier_flags & TYPE_SPECIFIER_BOOL) + else if (e_type_specifier_flags & TYPE_SPECIFIER_BOOL) print_item(ss, first, "_Bool"); - if (e_type_specifier_flags & TYPE_SPECIFIER_COMPLEX) + else if (e_type_specifier_flags & TYPE_SPECIFIER_COMPLEX) print_item(ss, first, "_Complex"); - if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL32) + else if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL32) print_item(ss, first, "_Decimal32"); - if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL64) + else if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL64) print_item(ss, first, "_Decimal64"); - if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL128) + else if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL128) print_item(ss, first, "_Decimal128"); - if (e_type_specifier_flags & TYPE_SPECIFIER_NULLPTR_T) + else if (e_type_specifier_flags & TYPE_SPECIFIER_NULLPTR_T) print_item(ss, first, "nullptr_t"); return *first; @@ -16596,10 +16949,10 @@ void print_type_qualifier_flags(struct osstream* ss, bool* first, enum type_qual if (e_type_qualifier_flags & TYPE_QUALIFIER_CONST) print_item(ss, first, "const"); - if (e_type_qualifier_flags & TYPE_QUALIFIER_RESTRICT) + else if (e_type_qualifier_flags & TYPE_QUALIFIER_RESTRICT) print_item(ss, first, "restrict"); - if (e_type_qualifier_flags & TYPE_QUALIFIER_VOLATILE) + else if (e_type_qualifier_flags & TYPE_QUALIFIER_VOLATILE) print_item(ss, first, "volatile"); } @@ -16771,7 +17124,7 @@ void print_type_core(struct osstream* ss, const struct type* p_type, bool onlyde ss_fprintf(ss, " "); first = false; } - ss_fprintf(ss, "%s", p->name_opt); + ss_fprintf(ss, " => %s", p->name_opt); } struct osstream local2 = { 0 }; @@ -16910,7 +17263,7 @@ void type_print(const struct type* a) struct osstream ss = { 0 }; print_type(&ss, a); puts(ss.c_str); - puts("\n"); + //puts("\n"); //it seems to have a better output without it ss_close(&ss); } @@ -17318,7 +17671,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx //ok if (current_argument->expression->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) { - compiler_set_error_with_token(C_OWNERSHIP_USING_TEMPORARY_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_USING_TEMPORARY_OWNER, ctx, current_argument->expression->first_token, "passing a temporary owner to a view"); @@ -17327,7 +17680,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx }//////////////////////////////////////////////////////////// else if (argument_is_obj_owner && paramer_is_owner) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, current_argument->expression->first_token, "cannot move obj_owner to owner"); @@ -17342,7 +17695,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx //ok if (current_argument->expression->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) { - compiler_set_error_with_token(C_OWNERSHIP_USING_TEMPORARY_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_USING_TEMPORARY_OWNER, ctx, current_argument->expression->first_token, "passing a temporary owner to a view"); @@ -17354,7 +17707,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx { if (!expression_is_zero(current_argument->expression)) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, current_argument->expression->first_token, "passing a view argument to a owner parameter"); @@ -17369,7 +17722,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx if (!type_is_owner(&t2)) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, current_argument->expression->first_token, "pointed object is not owner"); @@ -17377,11 +17730,11 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx } else { - //pointer object is owner + //pointer object is owner if (!argument_type->address_of) { //we need something created with address of. - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_MUST_USE_ADDRESSOF, ctx, current_argument->expression->first_token, "obj_owner pointer must be created using address of operator &"); @@ -17394,7 +17747,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx { if (!expression_is_zero(current_argument->expression)) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, current_argument->expression->first_token, "passing a view argument to a obj_owner parameter"); @@ -17423,7 +17776,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (type_is_pointer(¤t_argument->expression->type) && !type_is_pointer_to_owner(¤t_argument->expression->type)) { - compiler_set_error_with_token(C_OWNERSHIP_NOT_OWNER, ctx, + compiler_diagnostic_message(W_OWNERSHIP_NOT_OWNER, ctx, current_argument->expression->first_token, "parameter %d requires a pointer to owner object", param_num); @@ -17431,7 +17784,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, } else { - compiler_set_error_with_token(C_OWNERSHIP_NOT_OWNER, ctx, + compiler_diagnostic_message(W_OWNERSHIP_NOT_OWNER, ctx, current_argument->expression->first_token, "parameter %d requires a pointer to owner type", param_num); @@ -17450,7 +17803,8 @@ void check_argument_and_parameter(struct parser_ctx* ctx, type_lvalue_conversion(paramer_type) : type_dup(paramer_type); - + //why we get current_argument->expression == NULL here ? + assert(current_argument->expression != NULL); struct type argument_type_converted = expression_is_subjected_to_lvalue_conversion(current_argument->expression) ? type_lvalue_conversion(argument_type) : @@ -17464,7 +17818,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, { if (!type_is_same(argument_type, paramer_type, false)) { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, current_argument->expression->first_token, " incompatible types at argument %d", param_num); } @@ -17496,7 +17850,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (is_null_pointer_constant && type_is_pointer(paramer_type)) { //TODO void F(int * [[opt]] p) - // F(0) when passing null we will check if the parameter + // F(0) when passing null we will check if the parameter //have the anotation [[opt]] /*can be converted to any type*/ @@ -17513,7 +17867,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (is_null_pointer_constant && type_is_array(paramer_type)) { - compiler_set_warning_with_token(W_NON_NULL, + compiler_diagnostic_message(W_NON_NULL, ctx, current_argument->expression->first_token, " passing null as array"); @@ -17574,7 +17928,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (parameter_array_size != 0 && argument_array_size < parameter_array_size) { - compiler_set_error_with_token(C_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, + compiler_diagnostic_message(ERROR_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, ctx, current_argument->expression->first_token, " argument of size [%d] is smaller than parameter of size [%d]", argument_array_size, parameter_array_size); @@ -17582,7 +17936,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, } else if (is_null_pointer_constant || type_is_nullptr_t(argument_type)) { - compiler_set_error_with_token(C_PASSING_NULL_AS_ARRAY, + compiler_diagnostic_message(W_PASSING_NULL_AS_ARRAY, ctx, current_argument->expression->first_token, " passing null as array"); @@ -17593,10 +17947,11 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (!type_is_same(&argument_type_converted, ¶meter_type_converted, false)) { + puts("type mismatch:"); type_print(&argument_type_converted); type_print(¶meter_type_converted); - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, current_argument->expression->first_token, " incompatible types at argument %d", param_num); //disabled for now util it works correctly @@ -17613,7 +17968,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, !type_is_const(¶meter_pointer_to) && !type_is_any_owner(¶meter_pointer_to)) { - compiler_set_error_with_token(C_DISCARDING_CONST_AT_ARGUMENT, ctx, + compiler_diagnostic_message(W_DISCARDED_QUALIFIERS, ctx, current_argument->expression->first_token, " discarding const at argument %d", param_num); } @@ -17626,7 +17981,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, //TODO //if (!type_is_same(paramer_type, ¤t_argument->expression->type, false)) //{ - // compiler_set_error_with_token(C1, ctx, + // compiler_diagnostic_message(C1, ctx, // current_argument->expression->first_token, // " incompatible types at argument %d ", param_num); //} @@ -17678,15 +18033,15 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, right->type.next && right->type.next->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTOMATIC_STORAGE) { - compiler_set_warning_with_token(W_RETURN_LOCAL_ADDR, + compiler_diagnostic_message(W_RETURN_LOCAL_ADDR, ctx, right->first_token, "function returns address of local variable"); } - if (type_is_array(&right->type) && + if (type_is_array(&right->type) && right->type.storage_class_specifier_flags & STORAGE_SPECIFIER_AUTOMATIC_STORAGE) { - compiler_set_warning_with_token(W_RETURN_LOCAL_ADDR, + compiler_diagnostic_message(W_RETURN_LOCAL_ADDR, ctx, right->first_token, "function returns address of local variable"); @@ -17700,8 +18055,8 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, { if (type_is_owner(left_type)) { - //returning a owning variable to a owner result - // * explicit if local variable + //returning a owning variable to a owner result + // * explicit if local variable // * non explicit if param or external // ok if external @@ -17714,7 +18069,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, // * ok if external or param if (right->type.storage_class_specifier_flags & STORAGE_SPECIFIER_AUTOMATIC_STORAGE) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, right->first_token, "returning a owner variable to a non owner result"); @@ -17734,7 +18089,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, else { //returning a non owning variable to owner - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, right->first_token, "returning a non owner variable to a owner"); @@ -17761,7 +18116,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, //owner = non-owner if (!is_null_pointer_constant) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, right->first_token, "move assignment needs a owner type on right side"); @@ -17777,7 +18132,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, if (right->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) { //non owner = (owner) f() - compiler_set_error_with_token(C_OWNERSHIP_NON_OWNER_MOVE, + compiler_diagnostic_message(W_OWNERSHIP_NON_OWNER_MOVE, ctx, right->first_token, "cannot move a temporary owner to non-owner"); @@ -17801,7 +18156,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, //p = f(); if (!type_is_owner(left_type)) { - compiler_set_error_with_token(C_OWNERSHIP_MISSING_OWNER_QUALIFIER, ctx, right->first_token, "left type must be owner qualified "); + compiler_diagnostic_message(W_OWNERSHIP_MISSING_OWNER_QUALIFIER, ctx, right->first_token, "left type must be owner qualified "); } } } @@ -17846,7 +18201,7 @@ void check_assigment(struct parser_ctx* ctx, { if (!is_null_pointer_constant) { - compiler_set_error_with_token(C_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, ctx, right->first_token, "cannot assign a non owner to owner"); + compiler_diagnostic_message(W_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, ctx, right->first_token, "cannot assign a non owner to owner"); check_owner_rules_assigment(ctx, left_type, @@ -17868,7 +18223,7 @@ void check_assigment(struct parser_ctx* ctx, { if (!type_is_same(p_right_type, left_type, false)) { - compiler_set_error_with_token(C_INCOMPATIBLE_ENUN_TYPES, ctx, + compiler_diagnostic_message(W_INCOMPATIBLE_ENUN_TYPES, ctx, right->first_token, " incompatible types "); } @@ -17896,7 +18251,7 @@ void check_assigment(struct parser_ctx* ctx, if (is_null_pointer_constant && type_is_pointer(left_type)) { //TODO void F(int * [[opt]] p) - // F(0) when passing null we will check if the parameter + // F(0) when passing null we will check if the parameter //have the anotation [[opt]] /*can be converted to any type*/ @@ -17911,7 +18266,7 @@ void check_assigment(struct parser_ctx* ctx, if (is_null_pointer_constant && type_is_array(left_type)) { - compiler_set_warning_with_token(W_NON_NULL, + compiler_diagnostic_message(W_NON_NULL, ctx, right->first_token, " passing null as array"); @@ -17966,14 +18321,14 @@ void check_assigment(struct parser_ctx* ctx, if (parameter_array_size != 0 && argument_array_size < parameter_array_size) { - compiler_set_error_with_token(C_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, ctx, + compiler_diagnostic_message(ERROR_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, ctx, right->first_token, " argument of size [%d] is smaller than parameter of size [%d]", argument_array_size, parameter_array_size); } } else if (is_null_pointer_constant || type_is_nullptr_t(p_right_type)) { - compiler_set_error_with_token(C_PASSING_NULL_AS_ARRAY, ctx, + compiler_diagnostic_message(W_PASSING_NULL_AS_ARRAY, ctx, right->first_token, " passing null as array"); } @@ -17991,7 +18346,7 @@ void check_assigment(struct parser_ctx* ctx, type_print(&lvalue_right_type); type_print(&t2); - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, right->first_token, " incompatible types at argument "); //disabled for now util it works correctly @@ -18006,7 +18361,7 @@ void check_assigment(struct parser_ctx* ctx, struct type parameter_pointer_to = type_remove_pointer(&t2); if (type_is_const(&argument_pointer_to) && !type_is_const(¶meter_pointer_to)) { - compiler_set_error_with_token(C_DISCARDING_CONST_AT_ARGUMENT, ctx, + compiler_diagnostic_message(W_DISCARDED_QUALIFIERS, ctx, right->first_token, " discarding const at argument "); } @@ -18019,8 +18374,8 @@ void check_assigment(struct parser_ctx* ctx, if (!type_is_same(left_type, &lvalue_right_type, false)) { //TODO more rules..but it is good to check worst case! - // - // compiler_set_error_with_token(C1, ctx, + // + // compiler_diagnostic_message(C1, ctx, // right->first_token, // " incompatible types "); } @@ -18830,7 +19185,7 @@ void type_set_attributes(struct type* p_type, struct declarator* pdeclarator) struct type make_type_using_declarator(struct parser_ctx* ctx, struct declarator* pdeclarator); -#if 0 +#if 0 /*this sample is useful to try in compiler explorer*/ @@ -19123,7 +19478,7 @@ bool type_is_same(const struct type* a, const struct type* b, bool compare_quali if (pa->struct_or_union_specifier->complete_struct_or_union_specifier_indirection != pb->struct_or_union_specifier->complete_struct_or_union_specifier_indirection) { - //this should work but it is not... + //this should work but it is not... } if (strcmp(pa->struct_or_union_specifier->tag_name, pb->struct_or_union_specifier->tag_name) != 0) @@ -19667,6 +20022,9 @@ const struct type* type_get_specifer_part(const struct type* p_type) return p; } +/* End of: type.c */ + +/* Start of: object.c */ #include @@ -19674,1713 +20032,1719 @@ const struct type* type_get_specifer_part(const struct type* p_type) void object_swap(struct object* a, struct object* b) { - struct object temp = *a; - *a = *b; - *b = temp; + struct object temp = *a; + *a = *b; + *b = temp; } void object_delete(struct object* owner p) { - if (p) - { - object_destroy(p); - free(p); - } + if (p) + { + object_destroy(p); + free(p); + } } void object_destroy(struct object* obj_owner p) { - object_delete(p->pointed); - objects_destroy(&p->members); - object_state_stack_destroy(&p->object_state_stack); + object_delete(p->pointed); + objects_destroy(&p->members); + object_state_stack_destroy(&p->object_state_stack); } void object_state_stack_destroy(struct object_state_stack* obj_owner p) { - free(p->data); + free(p->data); } -int object_state_stack_reserve(struct object_state_stack* p, int n) unchecked +int object_state_stack_reserve(struct object_state_stack* p, int n) /*unchecked*/ { - if (n > p->capacity) - { - if ((size_t)n > (SIZE_MAX / (sizeof(p->data[0])))) - { - return EOVERFLOW; - } + if (n > p->capacity) + { + if ((size_t) n > (SIZE_MAX / (sizeof(p->data[0])))) + { + return EOVERFLOW; + } - void* owner pnew = realloc(p->data, n * sizeof(p->data[0])); - if (pnew == NULL) return ENOMEM; + void* owner pnew = realloc(p->data, n * sizeof(p->data[0])); + if (pnew == NULL) return ENOMEM; - p->data = pnew; - p->capacity = n; - } - return 0; + p->data = pnew; + p->capacity = n; + } + return 0; } int object_state_stack_push_back(struct object_state_stack* p, enum object_state e) { - if (p->size == INT_MAX) - { - return EOVERFLOW; - } + if (p->size == INT_MAX) + { + return EOVERFLOW; + } - if (p->size + 1 > p->capacity) - { - int new_capacity = 0; - if (p->capacity > (INT_MAX - p->capacity / 2)) - { - /*overflow*/ - new_capacity = INT_MAX; - } - else - { - new_capacity = p->capacity + p->capacity / 2; - if (new_capacity < p->size + 1) - { - new_capacity = p->size + 1; - } - } + if (p->size + 1 > p->capacity) + { + int new_capacity = 0; + if (p->capacity > (INT_MAX - p->capacity / 2)) + { + /*overflow*/ + new_capacity = INT_MAX; + } + else + { + new_capacity = p->capacity + p->capacity / 2; + if (new_capacity < p->size + 1) + { + new_capacity = p->size + 1; + } + } - int error = object_state_stack_reserve(p, new_capacity); - if (error != 0) - { - return error; - } - } + int error = object_state_stack_reserve(p, new_capacity); + if (error != 0) + { + return error; + } + } - p->data[p->size] = e; - p->size++; + p->data[p->size] = e; + p->size++; - return 0; + return 0; } -void objects_destroy(struct objects* obj_owner p) unchecked +void objects_destroy(struct objects* obj_owner p) /*unchecked*/ { - for (int i = 0; i < p->size; i++) - { - object_destroy(&p->data[i]); - } - free(p->data); + for (int i = 0; i < p->size; i++) + { + object_destroy(&p->data[i]); + } + free(p->data); } -int objects_reserve(struct objects* p, int n) unchecked +int objects_reserve(struct objects* p, int n) { - if (n > p->capacity) - { - if ((size_t)n > (SIZE_MAX / (sizeof(p->data[0])))) - { - return EOVERFLOW; - } + if (n > p->capacity) + { + if ((size_t) n > (SIZE_MAX / (sizeof(p->data[0])))) + { + return EOVERFLOW; + } - void* owner pnew = realloc(p->data, n * sizeof(p->data[0])); - if (pnew == NULL) return ENOMEM; + void* owner pnew = realloc(p->data, n * sizeof(p->data[0])); + if (pnew == NULL) return ENOMEM; + + static_set(p->data, "moved"); //p->data was moved to pnew - p->data = pnew; - p->capacity = n; - } - return 0; + p->data = pnew; + p->capacity = n; + } + return 0; } int objects_push_back(struct objects* p, struct object* obj_owner p_object) { - if (p->size == INT_MAX) - { - object_destroy(p_object); - return EOVERFLOW; - } + if (p->size == INT_MAX) + { + object_destroy(p_object); + return EOVERFLOW; + } - if (p->size + 1 > p->capacity) - { - int new_capacity = 0; - if (p->capacity > (INT_MAX - p->capacity / 2)) - { - /*overflow*/ - new_capacity = INT_MAX; - } - else - { - new_capacity = p->capacity + p->capacity / 2; - if (new_capacity < p->size + 1) - { - new_capacity = p->size + 1; - } - } + if (p->size + 1 > p->capacity) + { + int new_capacity = 0; + if (p->capacity > (INT_MAX - p->capacity / 2)) + { + /*overflow*/ + new_capacity = INT_MAX; + } + else + { + new_capacity = p->capacity + p->capacity / 2; + if (new_capacity < p->size + 1) + { + new_capacity = p->size + 1; + } + } - int error = objects_reserve(p, new_capacity); - if (error != 0) - { - object_destroy(p_object); - return error; - } - } + int error = objects_reserve(p, new_capacity); + if (error != 0) + { + object_destroy(p_object); + return error; + } + } - p->data[p->size] = *p_object; /*COPIED*/ + p->data[p->size] = *p_object; /*COPIED*/ - p->size++; + p->size++; - return 0; + return 0; } struct object_name_list { - const char* name; - struct object_name_list* previous; + const char* name; + struct object_name_list* previous; }; bool has_name(const char* name, struct object_name_list* list) { - struct object_name_list* p = list; + struct object_name_list* p = list; - while (p) - { - if (strcmp(p->name, name) == 0) - { - return true; - } - p = p->previous; - } - return false; + while (p) + { + if (strcmp(p->name, name) == 0) + { + return true; + } + p = p->previous; + } + return false; } struct object make_object_core(struct type* p_type, struct object_name_list* list, int deep, const struct declarator* declarator) { - struct object obj = { 0 }; - obj.declarator = declarator; + struct object obj = {0}; + obj.declarator = declarator; - if (p_type->struct_or_union_specifier) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_type->struct_or_union_specifier) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - if (p_struct_or_union_specifier) - { - obj.state = OBJECT_STATE_NOT_APPLICABLE; + if (p_struct_or_union_specifier) + { + obj.state = OBJECT_STATE_NOT_APPLICABLE; - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; - struct object_name_list l = { 0 }; - l.name = p_struct_or_union_specifier->tag_name; - l.previous = list; - //int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; + struct object_name_list l = {0}; + l.name = p_struct_or_union_specifier->tag_name; + l.previous = list; + //int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - char* tag = NULL; - if (p_member_declarator->declarator->type.struct_or_union_specifier) - { - tag = p_member_declarator->declarator->type.struct_or_union_specifier->tag_name; - } - else if (p_member_declarator->declarator->type.next && - p_member_declarator->declarator->type.next->struct_or_union_specifier) - { - tag = p_member_declarator->declarator->type.next->struct_or_union_specifier->tag_name; + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + char* tag = NULL; + if (p_member_declarator->declarator->type.struct_or_union_specifier) + { + tag = p_member_declarator->declarator->type.struct_or_union_specifier->tag_name; + } + else if (p_member_declarator->declarator->type.next && + p_member_declarator->declarator->type.next->struct_or_union_specifier) + { + tag = p_member_declarator->declarator->type.next->struct_or_union_specifier->tag_name; - } + } - if (tag && has_name(tag, &l)) - { - struct object member_obj = { 0 }; - member_obj.declarator = declarator; - member_obj.state = OBJECT_STATE_NOT_APPLICABLE; - objects_push_back(&obj.members, &member_obj); - } - else - { - struct object member_obj = make_object_core(&p_member_declarator->declarator->type, &l, deep, declarator); - objects_push_back(&obj.members, &member_obj); - } + if (tag && has_name(tag, &l)) + { + struct object member_obj = {0}; + member_obj.declarator = declarator; + member_obj.state = OBJECT_STATE_NOT_APPLICABLE; + objects_push_back(&obj.members, &member_obj); + } + else + { + struct object member_obj = make_object_core(&p_member_declarator->declarator->type, &l, deep, declarator); + objects_push_back(&obj.members, &member_obj); + } - //member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - else - { - if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) - { - //struct object obj = {0}; - //obj.state = OBJECT_STATE_STRUCT; - //objects_push_back(&obj.members, &obj); - - - struct type t = { 0 }; - t.category = TYPE_CATEGORY_ITSELF; - t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; - t.type_specifier_flags = TYPE_SPECIFIER_STRUCT_OR_UNION; - struct object member_obj = make_object_core(&t, &l, deep, declarator); - objects_push_back(&obj.members, &member_obj); - type_destroy(&t); - } - } - p_member_declaration = p_member_declaration->next; - } - } - } + //member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + //struct object obj = {0}; + //obj.state = OBJECT_STATE_STRUCT; + //objects_push_back(&obj.members, &obj); + + + struct type t = {0}; + t.category = TYPE_CATEGORY_ITSELF; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = TYPE_SPECIFIER_STRUCT_OR_UNION; + struct object member_obj = make_object_core(&t, &l, deep, declarator); + objects_push_back(&obj.members, &member_obj); + type_destroy(&t); + } + } + p_member_declaration = p_member_declaration->next; + } + } + } - else if (type_is_array(p_type)) - { - //p_object->state = flags; - //if (p_object->members_size > 0) - //{ - // //not sure if we instanticate all items of array - // p_object->members[0].state = flags; - //} - } - else if (type_is_pointer(p_type)) - { - obj.state = OBJECT_STATE_NOT_APPLICABLE; + else if (type_is_array(p_type)) + { + //p_object->state = flags; + //if (p_object->members_size > 0) + //{ + // //not sure if we instanticate all items of array + // p_object->members[0].state = flags; + //} + } + else if (type_is_pointer(p_type)) + { + obj.state = OBJECT_STATE_NOT_APPLICABLE; - if (deep < 1) - { - struct type t2 = type_remove_pointer(p_type); - if (type_is_struct_or_union(&t2)) - { - struct object* owner p_object = calloc(1, sizeof(struct object)); - *p_object = make_object_core(&t2, list, deep + 1, declarator); - obj.pointed = p_object; - } + if (deep < 1) + { + struct type t2 = type_remove_pointer(p_type); + if (type_is_struct_or_union(&t2)) + { + struct object* owner p_object = calloc(1, sizeof(struct object)); + *p_object = make_object_core(&t2, list, deep + 1, declarator); + obj.pointed = p_object; + } - type_destroy(&t2); - //(*p_deep)++; - } - } - else - { - //assert(p_object->members_size == 0); - //p_object->state = flags; - obj.state = OBJECT_STATE_NOT_APPLICABLE; - } + type_destroy(&t2); + //(*p_deep)++; + } + } + else + { + //assert(p_object->members_size == 0); + //p_object->state = flags; + obj.state = OBJECT_STATE_NOT_APPLICABLE; + } - return obj; + return obj; } struct object make_object(struct type* p_type, const struct declarator* declarator) { - assert(declarator); - struct object_name_list list = { .name = "" }; - return make_object_core(p_type, &list, 0, declarator); + assert(declarator); + struct object_name_list list = {.name = ""}; + return make_object_core(p_type, &list, 0, declarator); } void object_push_copy_current_state(struct object* object) { - object_state_stack_push_back(&object->object_state_stack, object->state); + object_state_stack_push_back(&object->object_state_stack, object->state); - if (object->pointed) - { - object_push_copy_current_state(object->pointed); - } + if (object->pointed) + { + object_push_copy_current_state(object->pointed); + } - for (int i = 0; i < object->members.size; i++) - { - object_push_copy_current_state(&object->members.data[i]); - } + for (int i = 0; i < object->members.size; i++) + { + object_push_copy_current_state(&object->members.data[i]); + } } void object_pop_states(struct object* object, int n) { - if (object->object_state_stack.size < n) - { - //assert(false); - return; - } + if (object->object_state_stack.size < n) + { + //assert(false); + return; + } - object->object_state_stack.size = - object->object_state_stack.size - n; + object->object_state_stack.size = + object->object_state_stack.size - n; - if (object->pointed) - { - object_pop_states(object->pointed, n); - } + if (object->pointed) + { + object_pop_states(object->pointed, n); + } - for (int i = 0; i < object->members.size; i++) - { - object_pop_states(&object->members.data[i], n); - } + for (int i = 0; i < object->members.size; i++) + { + object_pop_states(&object->members.data[i], n); + } } void object_restore_state(struct object* object, int state_to_restore) { - assert(state_to_restore > 0); + assert(state_to_restore > 0); - //0 zero is top of stack - //1 is the before top - int index = object->object_state_stack.size - state_to_restore; - if (index >= 0 && index < object->object_state_stack.size) - { - } - else - { - //assert(false); - return; - } + //0 zero is top of stack + //1 is the before top + int index = object->object_state_stack.size - state_to_restore; + if (index >= 0 && index < object->object_state_stack.size) + { + } + else + { + //assert(false); + return; + } - enum object_state sstate = object->object_state_stack.data[index]; - object->state = sstate; + enum object_state sstate = object->object_state_stack.data[index]; + object->state = sstate; - if (object->pointed) - { - object_restore_state(object->pointed, state_to_restore); - } + if (object->pointed) + { + object_restore_state(object->pointed, state_to_restore); + } - for (int i = 0; i < object->members.size; i++) - { - object_restore_state(&object->members.data[i], state_to_restore); - } + for (int i = 0; i < object->members.size; i++) + { + object_restore_state(&object->members.data[i], state_to_restore); + } } void print_object_core(int ident, struct type* p_type, struct object* p_object, const char* previous_names, bool is_pointer, bool short_version) { - if (p_object == NULL) - { - return; - } + if (p_object == NULL) + { + return; + } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - if (p_struct_or_union_specifier) - { - if (p_object == NULL) - { - printf("%*c", ident, ' '); - printf("%s %s\n", previous_names, "-"); - return; - } - //obj.state = OBJECT_STATE_STRUCT; + if (p_struct_or_union_specifier) + { + if (p_object == NULL) + { + printf("%*c", ident, ' '); + printf("%s %s\n", previous_names, "-"); + return; + } + //obj.state = OBJECT_STATE_STRUCT; - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; - int member_index = 0; - while (p_member_declaration) - { + int member_index = 0; + while (p_member_declaration) + { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : ""; + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : ""; - char buffer[200] = { 0 }; - if (is_pointer) - snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); - else - snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); + char buffer[200] = {0}; + if (is_pointer) + snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); + else + snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); - print_object_core(ident + 1, &p_member_declarator->declarator->type, - &p_object->members.data[member_index], buffer, - type_is_pointer(&p_member_declarator->declarator->type), short_version); + print_object_core(ident + 1, &p_member_declarator->declarator->type, + &p_object->members.data[member_index], buffer, + type_is_pointer(&p_member_declarator->declarator->type), short_version); - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - else - { - //char buffer[200] = {0}; - //if (is_pointer) - // snprintf(buffer, sizeof buffer, "%s", previous_names, ""); - //else - // snprintf(buffer, sizeof buffer, "%s", previous_names, ""); + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + //char buffer[200] = {0}; + //if (is_pointer) + // snprintf(buffer, sizeof buffer, "%s", previous_names, ""); + //else + // snprintf(buffer, sizeof buffer, "%s", previous_names, ""); - struct type t = { 0 }; - t.category = TYPE_CATEGORY_ITSELF; - t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; - t.type_specifier_flags = TYPE_SPECIFIER_STRUCT_OR_UNION; + struct type t = {0}; + t.category = TYPE_CATEGORY_ITSELF; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = TYPE_SPECIFIER_STRUCT_OR_UNION; - print_object_core(ident + 1, &t, &p_object->members.data[member_index], previous_names, false, short_version); + print_object_core(ident + 1, &t, &p_object->members.data[member_index], previous_names, false, short_version); - member_index++; - type_destroy(&t); - } - p_member_declaration = p_member_declaration->next; - } + member_index++; + type_destroy(&t); + } + p_member_declaration = p_member_declaration->next; + } - } - } - else if (type_is_array(p_type)) - { - //p_object->state = flags; - //if (p_object->members_size > 0) - //{ - // //not sure if we instanticate all items of array - // p_object->members[0].state = flags; - //} - } - else if (type_is_pointer(p_type)) - { - struct type t2 = type_remove_pointer(p_type); - printf("%*c", ident, ' '); - if (p_object) - { - if (short_version) - { - printf("%s == ", previous_names); - object_state_to_string(p_object->state); - } - else - { - printf("%p:%s == ", p_object, previous_names); - printf("{"); - for (int i = 0; i < p_object->object_state_stack.size; i++) - { - object_state_to_string(p_object->object_state_stack.data[i]); - printf(","); - } - printf("*"); - object_state_to_string(p_object->state); - printf("}"); - } - printf("\n"); + } + } + else if (type_is_array(p_type)) + { + //p_object->state = flags; + //if (p_object->members_size > 0) + //{ + // //not sure if we instanticate all items of array + // p_object->members[0].state = flags; + //} + } + else if (type_is_pointer(p_type)) + { + struct type t2 = type_remove_pointer(p_type); + printf("%*c", ident, ' '); + if (p_object) + { + if (short_version) + { + printf("%s == ", previous_names); + object_state_to_string(p_object->state); + } + else + { + printf("%p:%s == ", p_object, previous_names); + printf("{"); + for (int i = 0; i < p_object->object_state_stack.size; i++) + { + object_state_to_string(p_object->object_state_stack.data[i]); + printf(","); + } + printf("*"); + object_state_to_string(p_object->state); + printf("}"); + } + printf("\n"); - if (p_object->pointed) - { - char buffer[200] = { 0 }; - if (type_is_struct_or_union(&t2)) - { - snprintf(buffer, sizeof buffer, "%s", previous_names); - } - else - { - snprintf(buffer, sizeof buffer, "*%s", previous_names); - } + if (p_object->pointed) + { + char buffer[200] = {0}; + if (type_is_struct_or_union(&t2)) + { + snprintf(buffer, sizeof buffer, "%s", previous_names); + } + else + { + snprintf(buffer, sizeof buffer, "*%s", previous_names); + } - print_object_core(ident + 1, &t2, p_object->pointed, buffer, is_pointer, short_version); - } - else - { - //printf("%s %s\n"); - } - } - type_destroy(&t2); - } - else - { - printf("%*c", ident, ' '); - if (p_object) - { - if (short_version) - { - printf("%s == ", previous_names); - object_state_to_string(p_object->state); - } - else - { - printf("%p:%s == ", p_object, previous_names); - printf("{"); - for (int i = 0; i < p_object->object_state_stack.size; i++) - { - object_state_to_string(p_object->object_state_stack.data[i]); - printf(","); - } - object_state_to_string(p_object->state); - printf("}"); - } + print_object_core(ident + 1, &t2, p_object->pointed, buffer, is_pointer, short_version); + } + else + { + //printf("%s %s\n"); + } + } + type_destroy(&t2); + } + else + { + printf("%*c", ident, ' '); + if (p_object) + { + if (short_version) + { + printf("%s == ", previous_names); + object_state_to_string(p_object->state); + } + else + { + printf("%p:%s == ", p_object, previous_names); + printf("{"); + for (int i = 0; i < p_object->object_state_stack.size; i++) + { + object_state_to_string(p_object->object_state_stack.data[i]); + printf(","); + } + object_state_to_string(p_object->state); + printf("}"); + } - printf("\n"); - } - } + printf("\n"); + } + } } enum object_state state_merge(enum object_state before, enum object_state after) { - enum object_state e = before | after; + enum object_state e = before | after; - return e; + return e; } void object_get_name(const struct type* p_type, - const struct object* p_object, - char* outname, - int out_size); + const struct object* p_object, + char* outname, + int out_size); void print_object(struct type* p_type, struct object* p_object, bool short_version) { - if (p_object == NULL) - { - printf("null object"); - return; - } - char name[100] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); + if (p_object == NULL) + { + printf("null object"); + return; + } + char name[100] = {0}; + object_get_name(p_type, p_object, name, sizeof name); - print_object_core(0, p_type, p_object, name, type_is_pointer(p_type), short_version); + print_object_core(0, p_type, p_object, name, type_is_pointer(p_type), short_version); } void set_object( - struct type* p_type, - struct object* p_object, - enum object_state flags); + struct type* p_type, + struct object* p_object, + enum object_state flags); void set_object_state( - struct parser_ctx* ctx, - struct type* p_type, - struct object* p_object, - const struct type* p_source_type, - const struct object* p_object_source, - const struct token* error_position) + struct parser_ctx* ctx, + struct type* p_type, + struct object* p_object, + const struct type* p_source_type, + const struct object* p_object_source, + const struct token* error_position) { - if (p_object_source == NULL) - { - return; - } - if (p_object == NULL || p_type == NULL) - { - return; - } - - - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_object_source == NULL) + { + return; + } + if (p_object == NULL || p_type == NULL) + { + return; + } - if (p_struct_or_union_specifier) - { - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - int member_index = 0; - while (p_member_declaration) - { + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; + if (p_struct_or_union_specifier) + { + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - if (member_index < p_object->members.size) - { - set_object_state(ctx, - &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - &p_object_source->members.data[member_index].declarator->type, - &p_object_source->members.data[member_index], - error_position); - } - else - { - //TODO BUG union? - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - assert(p_object->members.size == 0); - p_object->state = p_object_source->state; - } - } - else if (type_is_array(p_type)) - { - p_object->state = p_object_source->state; - if (p_object->members.size > 0) - { - //not sure if we instantiate all items of array - p_object->members.data[0].state = p_object_source->members.data[0].state; - } - } - else if (type_is_pointer(p_type)) - { - if (p_object_source) - { - if (p_object_source->state == OBJECT_STATE_UNINITIALIZED) - { - char buffer[100] = { 0 }; - object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "source object '%s' is uninitialized", buffer); - } - else if (p_object_source->state & OBJECT_STATE_UNINITIALIZED) - { - char buffer[100] = { 0 }; - object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); + int member_index = 0; + while (p_member_declaration) + { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "source object '%s' may be uninitialized", buffer); - } + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; - if (type_is_any_owner(p_type) && - type_is_any_owner(p_source_type)) - { - if (p_object_source->state == OBJECT_STATE_MOVED) - { - char buffer[100] = { 0 }; - object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index < p_object->members.size) + { + set_object_state(ctx, + &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + &p_object_source->members.data[member_index].declarator->type, + &p_object_source->members.data[member_index], + error_position); + } + else + { + //TODO BUG union? + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + assert(p_object->members.size == 0); + p_object->state = p_object_source->state; + } + } + else if (type_is_array(p_type)) + { + p_object->state = p_object_source->state; + if (p_object->members.size > 0) + { + //not sure if we instantiate all items of array + p_object->members.data[0].state = p_object_source->members.data[0].state; + } + } + else if (type_is_pointer(p_type)) + { + if (p_object_source) + { + if (p_object_source->state == OBJECT_STATE_UNINITIALIZED) + { + char buffer[100] = {0}; + object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + error_position, + "source object '%s' is uninitialized", buffer); + } + else if (p_object_source->state & OBJECT_STATE_UNINITIALIZED) + { + char buffer[100] = {0}; + object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "source object '%s' have been moved", buffer); - } - else if (p_object_source->state & OBJECT_STATE_MOVED) - { - char buffer[100] = { 0 }; - object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + error_position, + "source object '%s' may be uninitialized", buffer); + } - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "source object '%s' may have been moved", buffer); - } - } + if (type_is_any_owner(p_type) && + type_is_any_owner(p_source_type)) + { + if (p_object_source->state == OBJECT_STATE_MOVED) + { + char buffer[100] = {0}; + object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); - } + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + error_position, + "source object '%s' have been moved", buffer); + } + else if (p_object_source->state & OBJECT_STATE_MOVED) + { + char buffer[100] = {0}; + object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + error_position, + "source object '%s' may have been moved", buffer); + } + } - if (type_is_any_owner(p_type)) - { - p_object->state = p_object_source->state; - } - else - { - //MOVED state is not applicable to non owner objects - p_object->state = p_object_source->state & ~OBJECT_STATE_MOVED; - } + } - if (p_object->pointed) - { - struct type t2 = type_remove_pointer(p_type); - if (p_object_source->pointed) - { - set_object_state(ctx, &t2, p_object->pointed, p_source_type, p_object_source->pointed, error_position); - } - else - { - set_object(&t2, p_object->pointed, OBJECT_STATE_NULL | OBJECT_STATE_NOT_NULL); - } - type_destroy(&t2); - } - } - else - { + if (type_is_any_owner(p_type)) + { + p_object->state = p_object_source->state; + } + else + { + //MOVED state is not applicable to non owner objects + p_object->state = p_object_source->state & ~OBJECT_STATE_MOVED; + } - //assert(p_object->members.size == 0); //enum? - p_object->state = p_object_source->state; - } + if (p_object->pointed) + { + struct type t2 = type_remove_pointer(p_type); + if (p_object_source->pointed) + { + set_object_state(ctx, &t2, p_object->pointed, p_source_type, p_object_source->pointed, error_position); + } + else + { + set_object(&t2, p_object->pointed, OBJECT_STATE_NULL | OBJECT_STATE_NOT_NULL); + } + type_destroy(&t2); + } + } + else + { + + + //assert(p_object->members.size == 0); //enum? + p_object->state = p_object_source->state; + } } void set_direct_state( - struct type* p_type, - struct object* p_object, - enum object_state flags) + struct type* p_type, + struct object* p_object, + enum object_state flags) { - if (p_object == NULL || p_type == NULL) - { - return; - } + if (p_object == NULL || p_type == NULL) + { + return; + } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - if (p_struct_or_union_specifier) - { - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; + if (p_struct_or_union_specifier) + { + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; - int member_index = 0; - while (p_member_declaration) - { + int member_index = 0; + while (p_member_declaration) + { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - if (member_index < p_object->members.size) - { - set_direct_state(&p_member_declarator->declarator->type, &p_object->members.data[member_index], flags); - } - else - { - //TODO BUG union? - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - assert(p_object->members.size == 0); - p_object->state = flags; - } - } + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index < p_object->members.size) + { + set_direct_state(&p_member_declarator->declarator->type, &p_object->members.data[member_index], flags); + } + else + { + //TODO BUG union? + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + assert(p_object->members.size == 0); + p_object->state = flags; + } + } - if (type_is_pointer(p_type)) - { - if (flags == OBJECT_STATE_ZERO) - { - /*zero for pointers is null*/ - p_object->state = OBJECT_STATE_NULL; - } - else - { - p_object->state = flags; - } - } - else - { - p_object->state = flags; - } + if (type_is_pointer(p_type)) + { + if (flags == OBJECT_STATE_ZERO) + { + /*zero for pointers is null*/ + p_object->state = OBJECT_STATE_NULL; + } + else + { + p_object->state = flags; + } + } + else + { + p_object->state = flags; + } } void set_object( - struct type* p_type, - struct object* p_object, - enum object_state flags) + struct type* p_type, + struct object* p_object, + enum object_state flags) { - if (p_object == NULL || p_type == NULL) - { - return; - } + if (p_object == NULL || p_type == NULL) + { + return; + } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - if (p_struct_or_union_specifier) - { - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; + if (p_struct_or_union_specifier) + { + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; - int member_index = 0; - while (p_member_declaration) - { + int member_index = 0; + while (p_member_declaration) + { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - if (member_index < p_object->members.size) - { - set_object(&p_member_declarator->declarator->type, &p_object->members.data[member_index], flags); - } - else - { - //TODO BUG union? - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - assert(p_object->members.size == 0); - p_object->state = flags; - } - } - else if (type_is_array(p_type)) - { - p_object->state = flags; - if (p_object->members.size > 0) - { - //not sure if we instantiate all items of array - p_object->members.data[0].state = flags; - } - } - else if (type_is_pointer(p_type)) - { - p_object->state = flags; + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index < p_object->members.size) + { + set_object(&p_member_declarator->declarator->type, &p_object->members.data[member_index], flags); + } + else + { + //TODO BUG union? + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + assert(p_object->members.size == 0); + p_object->state = flags; + } + } + else if (type_is_array(p_type)) + { + p_object->state = flags; + if (p_object->members.size > 0) + { + //not sure if we instantiate all items of array + p_object->members.data[0].state = flags; + } + } + else if (type_is_pointer(p_type)) + { + p_object->state = flags; - if (p_object->pointed) - { - struct type t2 = type_remove_pointer(p_type); - if (type_is_out(&t2)) - { - flags = OBJECT_STATE_UNINITIALIZED; - } - set_object(&t2, p_object->pointed, flags); - type_destroy(&t2); - } - } - else - { - //assert(p_object->members.size == 0); //enum? - p_object->state = flags; - } + if (p_object->pointed) + { + struct type t2 = type_remove_pointer(p_type); + if (type_is_out(&t2)) + { + flags = OBJECT_STATE_UNINITIALIZED; + } + set_object(&t2, p_object->pointed, flags); + type_destroy(&t2); + } + } + else + { + //assert(p_object->members.size == 0); //enum? + p_object->state = flags; + } } void object_set_unknown(struct type* p_type, struct object* p_object) { - if (p_object == NULL || p_type == NULL) - { - return; - } + if (p_object == NULL || p_type == NULL) + { + return; + } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - if (p_struct_or_union_specifier) - { - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; + if (p_struct_or_union_specifier) + { + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - if (member_index < p_object->members.size) - { - object_set_unknown(&p_member_declarator->declarator->type, &p_object->members.data[member_index]); - } - else - { - //TODO BUG union? - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - return; - } - } + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index < p_object->members.size) + { + object_set_unknown(&p_member_declarator->declarator->type, &p_object->members.data[member_index]); + } + else + { + //TODO BUG union? + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + } - if (type_is_pointer(p_type)) - { - p_object->state = OBJECT_STATE_NULL | OBJECT_STATE_NOT_NULL; + if (type_is_pointer(p_type)) + { + p_object->state = OBJECT_STATE_NULL | OBJECT_STATE_NOT_NULL; - if (p_object->pointed) - { - struct type t2 = type_remove_pointer(p_type); - object_set_unknown(&t2, p_object->pointed); - type_destroy(&t2); - } - } - else - { - p_object->state = OBJECT_STATE_ZERO | OBJECT_STATE_NOT_ZERO; - } + if (p_object->pointed) + { + struct type t2 = type_remove_pointer(p_type); + object_set_unknown(&t2, p_object->pointed); + type_destroy(&t2); + } + } + else + { + p_object->state = OBJECT_STATE_ZERO | OBJECT_STATE_NOT_ZERO; + } } //returns true if all parts that need to be moved weren't moved. bool object_check(struct type* p_type, struct object* p_object) { - if (p_object == NULL) - { - return false; - } - if (p_type->type_qualifier_flags & TYPE_QUALIFIER_VIEW) - { - return false; - } + if (p_object == NULL) + { + return false; + } + if (p_type->type_qualifier_flags & TYPE_QUALIFIER_VIEW) + { + return false; + } - if (!type_is_any_owner(p_type)) - { - return false; - } + if (!type_is_any_owner(p_type)) + { + return false; + } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - int possible_need_destroy_count = 0; - int need_destroy_count = 0; - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + int possible_need_destroy_count = 0; + int need_destroy_count = 0; + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { - if (p_member_declarator->declarator) - { - if (type_is_owner(&p_member_declarator->declarator->type)) - { - possible_need_destroy_count++; - } + if (p_member_declarator->declarator) + { + if (type_is_owner(&p_member_declarator->declarator->type)) + { + possible_need_destroy_count++; + } - if (object_check(&p_member_declarator->declarator->type, - &p_object->members.data[member_index])) - { - need_destroy_count++; - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } + if (object_check(&p_member_declarator->declarator->type, + &p_object->members.data[member_index])) + { + need_destroy_count++; + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } - return need_destroy_count > 1 && (need_destroy_count == possible_need_destroy_count); - } - else - { - bool should_had_been_moved = false; - if (type_is_pointer(p_type)) - { - should_had_been_moved = (p_object->state & OBJECT_STATE_NOT_NULL); - } - else - { - if (p_object->state == OBJECT_STATE_UNINITIALIZED || - p_object->state == OBJECT_STATE_MOVED || - p_object->state == OBJECT_STATE_NOT_NULL || - p_object->state == (OBJECT_STATE_UNINITIALIZED | OBJECT_STATE_MOVED)) - { - } - else - { - should_had_been_moved = true; - } - } + return need_destroy_count > 1 && (need_destroy_count == possible_need_destroy_count); + } + else + { + bool should_had_been_moved = false; + if (type_is_pointer(p_type)) + { + should_had_been_moved = (p_object->state & OBJECT_STATE_NOT_NULL); + } + else + { + if (p_object->state == OBJECT_STATE_UNINITIALIZED || + p_object->state == OBJECT_STATE_MOVED || + p_object->state == OBJECT_STATE_NOT_NULL || + p_object->state == (OBJECT_STATE_UNINITIALIZED | OBJECT_STATE_MOVED)) + { + } + else + { + should_had_been_moved = true; + } + } - return should_had_been_moved; - } + return should_had_been_moved; + } - return false; + return false; } void object_get_name_core( - const struct type* p_type, - const struct object* p_object, - const struct object* p_object_target, - const char* previous_names, - char* outname, - int out_size) + const struct type* p_type, + const struct object* p_object, + const struct object* p_object_target, + const char* previous_names, + char* outname, + int out_size) { - if (p_object == NULL) - { - return; - } + if (p_object == NULL) + { + return; + } - if (p_object == p_object_target) - { - snprintf(outname, out_size, "%s", previous_names); - return; - } + if (p_object == p_object_target) + { + snprintf(outname, out_size, "%s", previous_names); + return; + } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { - if (p_member_declarator->declarator) - { - const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : ""; - char buffer[200] = { 0 }; - if (type_is_pointer(p_type)) - snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); - else - snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); + if (p_member_declarator->declarator) + { + const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : ""; + char buffer[200] = {0}; + if (type_is_pointer(p_type)) + snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); + else + snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); - object_get_name_core( - &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - p_object_target, - buffer, - outname, - out_size); + object_get_name_core( + &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + p_object_target, + buffer, + outname, + out_size); - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } - } - else - { - if (type_is_pointer(p_type)) - { - char buffer[100] = { 0 }; - snprintf(buffer, sizeof buffer, "%s", previous_names); + } + else + { + if (type_is_pointer(p_type)) + { + char buffer[100] = {0}; + snprintf(buffer, sizeof buffer, "%s", previous_names); - struct type t2 = type_remove_pointer(p_type); - if (type_is_owner(&t2)) - { - object_get_name_core( - &t2, - p_object->pointed, - p_object_target, - buffer, - outname, - out_size); - } - type_destroy(&t2); - } - } + struct type t2 = type_remove_pointer(p_type); + if (type_is_owner(&t2)) + { + object_get_name_core( + &t2, + p_object->pointed, + p_object_target, + buffer, + outname, + out_size); + } + type_destroy(&t2); + } + } } void object_get_name(const struct type* p_type, - const struct object* p_object, - char* outname, - int out_size) + const struct object* p_object, + char* outname, + int out_size) { - if (p_object->declarator == NULL) - { - outname[0] = '?'; - outname[1] = '\0'; - return; - } + if (p_object->declarator == NULL) + { + outname[0] = '?'; + outname[1] = '\0'; + return; + } - const char* root_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; - const struct object* root = &p_object->declarator->object; + const char* root_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; + const struct object* root = &p_object->declarator->object; - object_get_name_core(&p_object->declarator->type, root, p_object, root_name, outname, out_size); + object_get_name_core(&p_object->declarator->type, root, p_object, root_name, outname, out_size); } void checked_moved(struct parser_ctx* ctx, - struct type* p_type, - struct object* p_object, - const struct token* position_token) + struct type* p_type, + struct object* p_object, + const struct token* position_token) { - if (p_object == NULL) - { - return; - } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_object == NULL) + { + return; + } + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; - /* - * Some parts of the object needs to be moved.. - * we need to print error one by one - */ - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - - if (p_member_declarator->declarator) - { - checked_moved(ctx, &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - position_token); + /* + * Some parts of the object needs to be moved.. + * we need to print error one by one + */ + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - if (type_is_pointer(p_type) && !type_is_any_owner(p_type)) - { - struct type t2 = type_remove_pointer(p_type); - checked_moved(ctx, - &t2, - p_object->pointed, - position_token); - type_destroy(&t2); - } + if (p_member_declarator->declarator) + { + checked_moved(ctx, &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + position_token); - if (p_object->state & OBJECT_STATE_MOVED) - { - struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + if (type_is_pointer(p_type) && !type_is_any_owner(p_type)) + { + struct type t2 = type_remove_pointer(p_type); + checked_moved(ctx, + &t2, + p_object->pointed, + position_token); + type_destroy(&t2); + } - char name[200] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "parameter '%s' is leaving scoped with a moved object '%s'", - parameter_name, - name); + if (p_object->state & OBJECT_STATE_MOVED) + { + struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; - compiler_set_info_with_token(W_NONE, ctx, name_pos, "parameter", name); - } + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + if (compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "parameter '%s' is leaving scoped with a moved object '%s'", + parameter_name, + name)) + { + compiler_diagnostic_message(W_LOCATION, ctx, name_pos, "parameter", name); + } + } - if (p_object->state & OBJECT_STATE_UNINITIALIZED) - { - struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; + if (p_object->state & OBJECT_STATE_UNINITIALIZED) + { + struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; - char name[200] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "parameter '%s' is leaving scoped with a uninitialized object '%s'", - parameter_name, - name); + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "parameter '%s' is leaving scoped with a uninitialized object '%s'", + parameter_name, + name); - compiler_set_info_with_token(W_NONE, ctx, name_pos, "parameter", name); - } - } + compiler_diagnostic_message(W_LOCATION, ctx, name_pos, "parameter", name); + } + } } void checked_read_object(struct parser_ctx* ctx, - struct type* p_type, - struct object* p_object, - const struct token* position_token, - bool check_pointed_object) + struct type* p_type, + struct object* p_object, + const struct token* position_token, + bool check_pointed_object) { - if (p_object == NULL) - { - return; - } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_object == NULL) + { + return; + } + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier ? - p_struct_or_union_specifier->member_declaration_list.head : - NULL; + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier ? + p_struct_or_union_specifier->member_declaration_list.head : + NULL; - /* - * Some parts of the object needs to be moved.. - * we need to print error one by one - */ - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { + /* + * Some parts of the object needs to be moved.. + * we need to print error one by one + */ + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { - if (p_member_declarator->declarator) - { - checked_read_object(ctx, &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - position_token, - check_pointed_object); + if (p_member_declarator->declarator) + { + checked_read_object(ctx, &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + position_token, + check_pointed_object); - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - if (type_is_pointer(p_type) && - check_pointed_object && - p_object->state & OBJECT_STATE_NOT_NULL /*we don't need to check pointed object*/ - ) - { - struct type t2 = type_remove_pointer(p_type); - checked_read_object(ctx, - &t2, - p_object->pointed, - position_token, - true); - type_destroy(&t2); - } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + if (type_is_pointer(p_type) && + check_pointed_object && + p_object->state & OBJECT_STATE_NOT_NULL /*we don't need to check pointed object*/ + ) + { + struct type t2 = type_remove_pointer(p_type); + checked_read_object(ctx, + &t2, + p_object->pointed, + position_token, + true); + type_destroy(&t2); + } - if (p_object->state & OBJECT_STATE_MOVED) - { - //struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - //const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; + if (p_object->state & OBJECT_STATE_MOVED) + { + //struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + //const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; - char name[200] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "object '%s' was moved", - name); - } + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "object '%s' was moved", + name); + } - if (p_object->state & OBJECT_STATE_UNINITIALIZED) - { - char name[200] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "uninitialized object '%s'", - name); - } - } + if (p_object->state & OBJECT_STATE_UNINITIALIZED) + { + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + compiler_diagnostic_message(W_ANALYZER_UNINITIALIZED, + ctx, + position_token, + "uninitialized object '%s'", + name); + } + } } void visit_object(struct parser_ctx* ctx, - struct type* p_type, - struct object* p_object, - const struct token* position_token, - const char* previous_names, - bool is_assigment) + struct type* p_type, + struct object* p_object, + const struct token* position_token, + const char* previous_names, + bool is_assigment) { - if (p_object == NULL) - { - return; - } - if (p_type->type_qualifier_flags & TYPE_QUALIFIER_VIEW) - { - return; - } + if (p_object == NULL) + { + return; + } + if (p_type->type_qualifier_flags & TYPE_QUALIFIER_VIEW) + { + return; + } - if (!type_is_any_owner(p_type)) - { - if (p_type->storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) - { - //for view parameters we need to check if they left something moved.. - checked_moved(ctx, - p_type, - p_object, - position_token); + if (!type_is_any_owner(p_type)) + { + if (p_type->storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) + { + //for view parameters we need to check if they left something moved.. + checked_moved(ctx, + p_type, + p_object, + position_token); - } - return; - } + } + return; + } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; - if (object_check(p_type, p_object)) - { - /* - * All parts of the object needs to be moved, so instead of - * describing each part we will just say that the object should - * have been moved. - */ - const struct token* const name = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - name, - "object '%s' was not moved/destroyed", - previous_names); + if (object_check(p_type, p_object)) + { + /* + * All parts of the object needs to be moved, so instead of + * describing each part we will just say that the object should + * have been moved. + */ + const struct token* const name = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + name, + "object '%s' was not moved/destroyed", + previous_names); - if (p_object->declarator) - compiler_set_info_with_token(W_NONE, ctx, position_token, "end of '%s' scope", previous_names); - } - else - { - /* - * Some parts of the object needs to be moved.. - * we need to print error one by one - */ + if (p_object->declarator) + compiler_diagnostic_message(W_LOCATION, ctx, position_token, "end of '%s' scope", previous_names); + } + else + { + /* + * Some parts of the object needs to be moved.. + * we need to print error one by one + */ - int member_index = 0; - while (p_member_declaration) - { + int member_index = 0; + while (p_member_declaration) + { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { - if (p_member_declarator->declarator) - { - const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : "?"; + if (p_member_declarator->declarator) + { + const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : "?"; - char buffer[200] = { 0 }; - if (type_is_pointer(p_type)) - snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); - else - snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); + char buffer[200] = {0}; + if (type_is_pointer(p_type)) + snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); + else + snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); - visit_object(ctx, &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - position_token, - buffer, - is_assigment); + visit_object(ctx, &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + position_token, + buffer, + is_assigment); - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } - } - else - { - const char* name = previous_names; - const struct token* const position = - p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + } + else + { + const char* name = previous_names; + const struct token* const position = + p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - if (name[0] == '\0') - { - /*function arguments without name*/ - name = "?"; - } - bool should_had_been_moved = false; + if (name[0] == '\0') + { + /*function arguments without name*/ + name = "?"; + } + bool should_had_been_moved = false; - /* - Despite the name OBJECT_STATE_NOT_NULL does not means null, it means - the reference is not referring an object, the value could be -1 for instance. - */ - if (type_is_pointer(p_type)) - { - should_had_been_moved = (p_object->state & OBJECT_STATE_NOT_NULL); - } - else - { - if (p_object->state == OBJECT_STATE_UNINITIALIZED || - p_object->state == OBJECT_STATE_MOVED || - p_object->state == OBJECT_STATE_NULL) - { - } - else - { - should_had_been_moved = true; - } - } + /* + Despite the name OBJECT_STATE_NOT_NULL does not means null, it means + the reference is not referring an object, the value could be -1 for instance. + */ + if (type_is_pointer(p_type)) + { + should_had_been_moved = (p_object->state & OBJECT_STATE_NOT_NULL); + } + else + { + if (p_object->state == OBJECT_STATE_UNINITIALIZED || + p_object->state == OBJECT_STATE_MOVED || + p_object->state == OBJECT_STATE_NULL) + { + } + else + { + should_had_been_moved = true; + } + } - if (type_is_pointer(p_type)) - { - if (should_had_been_moved) - { - char buffer[100] = { 0 }; - snprintf(buffer, sizeof buffer, "%s", previous_names); + if (type_is_pointer(p_type)) + { + if (should_had_been_moved) + { + char buffer[100] = {0}; + snprintf(buffer, sizeof buffer, "%s", previous_names); - struct type t2 = type_remove_pointer(p_type); - if (type_is_owner(&t2)) - { - visit_object(ctx, - &t2, - p_object->pointed, - position_token, - buffer, - is_assigment); - } - type_destroy(&t2); - } + struct type t2 = type_remove_pointer(p_type); + if (type_is_owner(&t2)) + { + visit_object(ctx, + &t2, + p_object->pointed, + position_token, + buffer, + is_assigment); + } + type_destroy(&t2); + } - } + } - if (should_had_been_moved) - { - if (type_is_obj_owner(p_type)) - { + if (should_had_been_moved) + { + if (type_is_obj_owner(p_type)) + { - } - else - { - if (type_is_pointer(p_type)) - { - struct type t2 = type_remove_pointer(p_type); - bool pointed_is_out = type_is_out(&t2); - type_destroy(&t2); + } + else + { + if (type_is_pointer(p_type)) + { + struct type t2 = type_remove_pointer(p_type); + bool pointed_is_out = type_is_out(&t2); + type_destroy(&t2); - if (!pointed_is_out) - { - if (is_assigment) - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "memory pointed by '%s' was not released before assignment.", - name); - } - else - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position, - "memory pointed by '%s' was not released.", - name); - if (p_object->declarator) - { - compiler_set_info_with_token(W_NONE, ctx, position_token, "end of '%s' scope", name); - } - } - } - } - else - { - if (is_assigment) - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "previous members of '%s' were not moved before this assignment.", - name); - } - else - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position, - "object '%s' was not moved.", - name); - if (p_object->declarator) - { - compiler_set_info_with_token(W_NONE, ctx, position_token, "end of '%s' scope", name); - } - } - } - } - } - } + if (!pointed_is_out) + { + if (is_assigment) + { + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "memory pointed by '%s' was not released before assignment.", + name); + } + else + { + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position, + "memory pointed by '%s' was not released.", + name); + if (p_object->declarator) + { + compiler_diagnostic_message(W_LOCATION, ctx, position_token, "end of '%s' scope", name); + } + } + } + } + else + { + if (is_assigment) + { + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "previous members of '%s' were not moved before this assignment.", + name); + } + else + { + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position, + "object '%s' was not moved.", + name); + if (p_object->declarator) + { + compiler_diagnostic_message(W_LOCATION, ctx, position_token, "end of '%s' scope", name); + } + } + } + } + } + } } void object_assignment(struct parser_ctx* ctx, - struct object* p_source_obj_opt, - struct type* p_source_obj_type, + struct object* p_source_obj_opt, + struct type* p_source_obj_type, - struct object* p_dest_obj_opt, - struct type* p_dest_obj_type, + struct object* p_dest_obj_opt, + struct type* p_dest_obj_type, - const struct token* error_position, - bool bool_source_zero_value, - enum object_state source_state_after) + const struct token* error_position, + bool bool_source_zero_value, + enum object_state source_state_after) { - if (p_dest_obj_opt) - { - if (type_is_owner(p_dest_obj_type) && !type_is_out(p_dest_obj_type)) - { - char buffer[100] = { 0 }; - object_get_name(p_dest_obj_type, p_dest_obj_opt, buffer, sizeof buffer); - visit_object(ctx, - p_dest_obj_type, - p_dest_obj_opt, - error_position, - buffer, - true); - } - } - + if (p_dest_obj_opt) + { + if (type_is_owner(p_dest_obj_type) && !type_is_out(p_dest_obj_type)) + { + char buffer[100] = {0}; + object_get_name(p_dest_obj_type, p_dest_obj_opt, buffer, sizeof buffer); + visit_object(ctx, + p_dest_obj_type, + p_dest_obj_opt, + error_position, + buffer, + true); + } + } - if (p_dest_obj_opt) - { - if (bool_source_zero_value) - { - set_object(p_dest_obj_type, p_dest_obj_opt, OBJECT_STATE_NULL); - } - else - { - if (p_source_obj_opt) - { - set_object_state(ctx, p_dest_obj_type, p_dest_obj_opt, p_source_obj_type, p_source_obj_opt, error_position); - } - else - { - object_set_unknown(p_dest_obj_type, p_dest_obj_opt); - } - } - } + if (p_dest_obj_opt) + { + if (bool_source_zero_value) + { + set_object(p_dest_obj_type, p_dest_obj_opt, OBJECT_STATE_NULL); + } + else + { + if (p_source_obj_opt) + { + set_object_state(ctx, p_dest_obj_type, p_dest_obj_opt, p_source_obj_type, p_source_obj_opt, error_position); + } + else + { + object_set_unknown(p_dest_obj_type, p_dest_obj_opt); + } + } + } - if (type_is_any_owner(p_source_obj_type) && - !type_is_owner(p_dest_obj_type) && - p_source_obj_type->storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) - { - /* - int main() - { - struct X * p = (struct X * owner) malloc(1); - } - */ - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "Object must be owner qualified."); - } + if (type_is_any_owner(p_source_obj_type) && + !type_is_owner(p_dest_obj_type) && + p_source_obj_type->storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) + { + /* + int main() + { + struct X * p = (struct X * owner) malloc(1); + } + */ - if (type_is_any_owner(p_dest_obj_type) && type_is_any_owner(p_source_obj_type) && type_is_pointer(p_source_obj_type)) - { - if (type_is_void_ptr(p_dest_obj_type)) - { - if (p_source_obj_opt) - { - struct type t2 = type_remove_pointer(p_source_obj_type); - const char* name = p_source_obj_opt->declarator->name ? - p_source_obj_opt->declarator->name->lexeme : - "?"; - - visit_object(ctx, - &t2, - p_source_obj_opt->pointed, - error_position, - name, - true); - p_source_obj_opt->state = source_state_after; - type_destroy(&t2); - } - } - else if (type_is_obj_owner(p_dest_obj_type)) - { - if (type_is_owner(p_source_obj_type)) - { - if (p_source_obj_opt->pointed) - { - struct type t = type_remove_pointer(p_source_obj_type); - set_object(&t, p_source_obj_opt->pointed, source_state_after); - type_destroy(&t); - } - } - else if (type_is_obj_owner(p_source_obj_type)) - { - if (p_source_obj_opt->pointed) - { - struct type t = type_remove_pointer(p_source_obj_type); - set_object(&t, p_source_obj_opt->pointed, source_state_after); - type_destroy(&t); - } - } - } - else - { + compiler_diagnostic_message(W_OWNERSHIP_MISSING_OWNER_QUALIFIER, + ctx, + error_position, + "Object must be owner qualified."); + } - if (p_source_obj_opt) - { - set_object(p_source_obj_type, p_source_obj_opt, source_state_after); - } - } - } - else if (type_is_any_owner(p_dest_obj_type) && type_is_any_owner(p_source_obj_type)) - { - /*everthing is moved*/ - if (p_source_obj_opt) - set_object(p_source_obj_type, p_source_obj_opt, source_state_after); - } - else - { - /*nothing changes*/ - } + if (type_is_any_owner(p_dest_obj_type) && type_is_any_owner(p_source_obj_type) && type_is_pointer(p_source_obj_type)) + { + if (type_is_void_ptr(p_dest_obj_type)) + { + if (p_source_obj_opt) + { + struct type t2 = type_remove_pointer(p_source_obj_type); + const char* name = p_source_obj_opt->declarator->name ? + p_source_obj_opt->declarator->name->lexeme : + "?"; + + visit_object(ctx, + &t2, + p_source_obj_opt->pointed, + error_position, + name, + true); + p_source_obj_opt->state = source_state_after; + type_destroy(&t2); + } + } + else if (type_is_obj_owner(p_dest_obj_type)) + { + if (type_is_owner(p_source_obj_type)) + { + if (p_source_obj_opt->pointed) + { + struct type t = type_remove_pointer(p_source_obj_type); + set_object(&t, p_source_obj_opt->pointed, source_state_after); + type_destroy(&t); + } + } + else if (type_is_obj_owner(p_source_obj_type)) + { + if (p_source_obj_opt->pointed) + { + struct type t = type_remove_pointer(p_source_obj_type); + set_object(&t, p_source_obj_opt->pointed, source_state_after); + type_destroy(&t); + } + } + } + else + { + + if (p_source_obj_opt) + { + set_object(p_source_obj_type, p_source_obj_opt, source_state_after); + } + } + } + else if (type_is_any_owner(p_dest_obj_type) && type_is_any_owner(p_source_obj_type)) + { + /*everthing is moved*/ + if (p_source_obj_opt) + set_object(p_source_obj_type, p_source_obj_opt, source_state_after); + } + else + { + /*nothing changes*/ + } } +/* End of: object.c */ +/* Start of: parser.c */ +/* Start of: format_visit.h */ //#pragma once struct format_visit_ctx @@ -21391,8 +21755,10 @@ struct format_visit_ctx void format_visit(struct format_visit_ctx* ctx); +/* End of: format_visit.h */ +/* Start of: flow_visit.h */ //#pragma once /* @@ -21413,7 +21779,8 @@ struct flow_visit_ctx int parameter_list; struct jump_statement* view p_last_jump_statement; - bool is_left_expression; //a = b + bool is_left_expression; //true when visiting left expression in assignment + bool expression_is_not_evaluated; //true when is expression for sizeof, missing state_set, typeof }; @@ -21421,6 +21788,7 @@ void flow_visit_ctx_destroy(struct flow_visit_ctx* obj_owner p); void flow_visit_function(struct flow_visit_ctx* ctx, struct declaration* p_declaration); +/* End of: flow_visit.h */ #ifdef _WIN32 #endif @@ -21430,6 +21798,7 @@ void flow_visit_function(struct flow_visit_ctx* ctx, struct declaration* p_decla +/* Start of: visit.h */ //#pragma once struct defer_scope @@ -21473,72 +21842,79 @@ struct visit_ctx void visit(struct visit_ctx* ctx); void visit_ctx_destroy( struct visit_ctx* obj_owner ctx); +/* End of: visit.h */ + +#ifdef PATH_MAX +#define MYMAX_PATH PATH_MAX //Linux uses it in realpath +#else +#define MYMAX_PATH MAX_PATH +#endif void object_state_to_string(enum object_state e) { - bool first = true; + bool first = true; - printf("\""); - if (e & OBJECT_STATE_UNINITIALIZED) - { - if (first) first = false; else printf(" or "); - printf("uninitialized"); - } + printf("\""); + if (e & OBJECT_STATE_UNINITIALIZED) + { + if (first) first = false; else printf(" or "); + printf("uninitialized"); + } - if (e & OBJECT_STATE_NOT_NULL && - e & OBJECT_STATE_NULL) - { - if (first) first = false; else printf(" or "); - printf("maybe-null"); - } - else if (e & OBJECT_STATE_NOT_NULL) - { - if (first) first = false; else printf(" or "); - printf("not-null"); - } - else if (e & OBJECT_STATE_NULL) - { - if (first) first = false; else printf(" or "); - printf("null"); - } + if (e & OBJECT_STATE_NOT_NULL && + e & OBJECT_STATE_NULL) + { + if (first) first = false; else printf(" or "); + printf("maybe-null"); + } + else if (e & OBJECT_STATE_NOT_NULL) + { + if (first) first = false; else printf(" or "); + printf("not-null"); + } + else if (e & OBJECT_STATE_NULL) + { + if (first) first = false; else printf(" or "); + printf("null"); + } - if (e & OBJECT_STATE_NOT_ZERO && - e & OBJECT_STATE_ZERO) - { - if (first) first = false; else printf(" or "); - printf("any"); - } - else if (e & OBJECT_STATE_ZERO) - { - if (first) first = false; else printf(" or "); - printf("zero"); - } - else if (e & OBJECT_STATE_NOT_ZERO) - { - if (first) first = false; else printf(" or "); - printf("not-zero"); - } + if (e & OBJECT_STATE_NOT_ZERO && + e & OBJECT_STATE_ZERO) + { + if (first) first = false; else printf(" or "); + printf("any"); + } + else if (e & OBJECT_STATE_ZERO) + { + if (first) first = false; else printf(" or "); + printf("zero"); + } + else if (e & OBJECT_STATE_NOT_ZERO) + { + if (first) first = false; else printf(" or "); + printf("not-zero"); + } - if (e & OBJECT_STATE_MOVED) - { - if (first) first = false; else printf(" or "); - printf("moved"); - } + if (e & OBJECT_STATE_MOVED) + { + if (first) first = false; else printf(" or "); + printf("moved"); + } - printf("\""); + printf("\""); } struct defer_statement* owner defer_statement(struct parser_ctx* ctx); void defer_statement_delete(struct defer_statement* owner opt p) { - if (p) - { - secondary_block_delete(p->secondary_block); - free(p); - } + if (p) + { + secondary_block_delete(p->secondary_block); + free(p); + } } static int s_anonymous_struct_count = 0; @@ -21555,103 +21931,111 @@ void naming_convention_local_var(struct parser_ctx* ctx, struct token* token, st /////////////////////////////////////////////////////////////////////////////// -static bool parser_is_warning_enabled(const struct parser_ctx* ctx, enum warning w) +static bool parser_is_diagnostic_enabled(const struct parser_ctx* ctx, enum diagnostic_id w) { - return - (ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] & w) != 0; + if (w > W_NOTE) + return true; + + return + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors & w) != 0) || + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings & w) != 0) || + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes & w) != 0); + } + + static void check_open_brace_style(struct parser_ctx* ctx, struct token* token) { - //token points to { + //token points to { - if (token->level == 0 && - !(token->flags & TK_FLAG_MACRO_EXPANDED) && - token->type == '{' && - parser_is_warning_enabled(ctx, W_STYLE)) - { - if (ctx->options.style == STYLE_CAKE) - { - if (token->prev->type == TK_BLANKS && - token->prev->prev->type == TK_NEWLINE) - { - } - else - { - compiler_set_info_with_token(W_STYLE, ctx, token, "not following correct brace style {"); - } - } - } + if (token->level == 0 && + !(token->flags & TK_FLAG_MACRO_EXPANDED) && + token->type == '{' && + parser_is_diagnostic_enabled(ctx, W_STYLE)) + { + if (ctx->options.style == STYLE_CAKE) + { + if (token->prev->type == TK_BLANKS && + token->prev->prev->type == TK_NEWLINE) + { + } + else + { + compiler_diagnostic_message(W_STYLE, ctx, token, "not following correct brace style {"); + } + } + } } static void check_close_brace_style(struct parser_ctx* ctx, struct token* token) { - //token points to { + //token points to { - if (token->level == 0 && - !(token->flags & TK_FLAG_MACRO_EXPANDED) && - token->type == '}' && - parser_is_warning_enabled(ctx, W_STYLE)) - { - if (ctx->options.style == STYLE_CAKE) - { - if (token->prev->type == TK_BLANKS && - token->prev->prev->type == TK_NEWLINE) - { - } - else - { - compiler_set_info_with_token(W_STYLE, ctx, token, "not following correct close brace style }"); - } - } - } + if (token->level == 0 && + !(token->flags & TK_FLAG_MACRO_EXPANDED) && + token->type == '}' && + parser_is_diagnostic_enabled(ctx, W_STYLE)) + { + if (ctx->options.style == STYLE_CAKE) + { + if (token->prev->type == TK_BLANKS && + token->prev->prev->type == TK_NEWLINE) + { + } + else + { + compiler_diagnostic_message(W_STYLE, ctx, token, "not following correct close brace style }"); + } + } + } } static void check_func_open_brace_style(struct parser_ctx* ctx, struct token* token) { - //token points to { + //token points to { - if (token->level == 0 && - !(token->flags & TK_FLAG_MACRO_EXPANDED) && - token->type == '{' && - parser_is_warning_enabled(ctx, W_STYLE)) - { - if (ctx->options.style == STYLE_CAKE) - { - if (token->prev->type == TK_NEWLINE) - { - } - else - { - compiler_set_info_with_token(W_STYLE, ctx, token, "not following correct brace style {"); - } - } - } + if (token->level == 0 && + !(token->flags & TK_FLAG_MACRO_EXPANDED) && + token->type == '{' && + parser_is_diagnostic_enabled(ctx, W_STYLE)) + { + if (ctx->options.style == STYLE_CAKE) + { + if (token->prev->type == TK_NEWLINE) + { + } + else + { + compiler_diagnostic_message(W_STYLE, ctx, token, "not following correct brace style {"); + } + } + } } - +/* static void check_func_close_brace_style(struct parser_ctx* ctx, struct token* token) { - //token points to { + //token points to { - if (token->level == 0 && - !(token->flags & TK_FLAG_MACRO_EXPANDED) && - token->type == '}' && - parser_is_warning_enabled(ctx, W_STYLE)) - { - if (ctx->options.style == STYLE_CAKE) - { - if (token->prev->prev->type == TK_NEWLINE) - { - } - else - { - compiler_set_info_with_token(W_STYLE, ctx, token, "not following correct close brace style }"); - } - } - } + if (token->level == 0 && + !(token->flags & TK_FLAG_MACRO_EXPANDED) && + token->type == '}' && + parser_is_warning_enabled(ctx, W_STYLE)) + { + if (ctx->options.style == STYLE_CAKE) + { + if (token->prev->prev->type == TK_NEWLINE) + { + } + else + { + compiler_diagnostic_message(W_STYLE, ctx, token, "not following correct close brace style }"); + } + } + } } - +*/ #ifdef TEST int printf_nothing(const char* fmt, ...) { return 0; } @@ -21659,525 +22043,393 @@ int printf_nothing(const char* fmt, ...) { return 0; } void scope_destroy(struct scope* obj_owner p) { - hashmap_destroy(&p->tags); - hashmap_destroy(&p->variables); + hashmap_destroy(&p->tags); + hashmap_destroy(&p->variables); } void scope_list_push(struct scope_list* list, struct scope* pnew) { - if (list->tail) - pnew->scope_level = list->tail->scope_level + 1; + if (list->tail) + pnew->scope_level = list->tail->scope_level + 1; - if (list->head == NULL) - { - list->head = pnew; - list->tail = pnew; - //pnew->prev = list->tail; - } - else - { - pnew->previous = list->tail; - list->tail->next = pnew; - list->tail = pnew; - } + if (list->head == NULL) + { + list->head = pnew; + list->tail = pnew; + //pnew->prev = list->tail; + } + else + { + pnew->previous = list->tail; + list->tail->next = pnew; + list->tail = pnew; + } } void scope_list_pop(struct scope_list* list) { - if (list->head == NULL) - return; - - struct scope* p = list->tail; - if (list->head == list->tail) - { - list->head = NULL; - list->tail = NULL; - } - else - { - - list->tail = list->tail->previous; - if (list->tail == list->head) - { - list->tail->next = NULL; - list->tail->previous = NULL; - } - } - p->next = NULL; - p->previous = NULL; -} - - -void parser_ctx_destroy(struct parser_ctx* obj_owner ctx) -{ - if (ctx->sarif_file) - { - fclose(ctx->sarif_file); - } - -} - - -void compiler_set_error_with_token(enum error error, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...) -{ - if (p_token == NULL) - return; - if (p_token->level > 0) - return; - - if (ctx->options.disable_ownership_errors && is_ownership_error(error)) - { - return; - } - - - ctx->p_report->error_count++; - ctx->p_report->last_error = error; - char buffer[200] = { 0 }; - -#ifndef TEST - - if (p_token) - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); - - - va_list args; - va_start(args, fmt); - vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); - if (ctx->options.visual_studio_ouput_format) - { - printf("error: " "%s\n", buffer); - } - else - { - printf(LIGHTRED "error: " WHITE "%s\n", buffer); - - } - - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); -#endif - const char* func_name = "module"; - if (ctx->p_current_function_opt) - { - func_name = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme; - } - - if (ctx->sarif_file) - { - const char* file_name = "?"; - int line = 0; - int col = 0; - if (p_token) - { - file_name = p_token->token_origin->lexeme; - line = p_token->line; - col = p_token->col; - } - - if (ctx->p_report->error_count + ctx->p_report->warnings_count + ctx->p_report->info_count > 1) - { - fprintf(ctx->sarif_file, ",\n"); - } - - fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"ruleId\":\"%s\",\n", "error"); - fprintf(ctx->sarif_file, " \"level\":\"error\",\n"); - fprintf(ctx->sarif_file, " \"message\": {\n"); - fprintf(ctx->sarif_file, " \"text\": \"%s\"\n", buffer); - fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"locations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); - - fprintf(ctx->sarif_file, " \"physicalLocation\": {\n"); - - fprintf(ctx->sarif_file, " \"artifactLocation\": {\n"); - fprintf(ctx->sarif_file, " \"uri\": \"file:///%s\"\n", file_name); - fprintf(ctx->sarif_file, " },\n"); - - fprintf(ctx->sarif_file, " \"region\": {\n"); - fprintf(ctx->sarif_file, " \"startLine\": %d,\n", line); - fprintf(ctx->sarif_file, " \"startColumn\": %d,\n", col); - fprintf(ctx->sarif_file, " \"endLine\": %d,\n", line); - fprintf(ctx->sarif_file, " \"endColumn\": %d\n", col); - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " },\n"); - - fprintf(ctx->sarif_file, " \"logicalLocations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); - - fprintf(ctx->sarif_file, " \"fullyQualifiedName\": \"%s\",\n", func_name); - fprintf(ctx->sarif_file, " \"decoratedName\": \"%s\",\n", func_name); - - fprintf(ctx->sarif_file, " \"kind\": \"%s\"\n", "function"); - fprintf(ctx->sarif_file, " }\n"); - - fprintf(ctx->sarif_file, " ]\n"); - - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " ]\n"); + if (list->head == NULL) + return; - fprintf(ctx->sarif_file, " }\n"); - } + struct scope* p = list->tail; + if (list->head == list->tail) + { + list->head = NULL; + list->tail = NULL; + } + else + { + list->tail = list->tail->previous; + if (list->tail == list->head) + { + list->tail->next = NULL; + list->tail->previous = NULL; + } + } + p->next = NULL; + p->previous = NULL; } -_Bool compiler_set_warning_with_token(enum warning w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...) -{ - if (w != W_NONE) - { - if (p_token && p_token->level != 0) - { - /*we dont warning code inside includes*/ - return false; - } - - if (!parser_is_warning_enabled(ctx, w)) - { - return false; - } - } +void parser_ctx_destroy(struct parser_ctx* obj_owner ctx) +{ + if (ctx->sarif_file) + { + fclose(ctx->sarif_file); + } - ctx->p_report->warnings_count++; - ctx->p_report->last_warning |= w; +} - const char* func_name = "module"; - if (ctx->p_current_function_opt) - { - func_name = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme; - } - char buffer[200] = { 0 }; +_Bool compiler_diagnostic_message(enum diagnostic_id w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...) +{ -#ifndef TEST - if (p_token) - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); + if (p_token && p_token->level != 0) + { + return false; + } + bool is_error = false; + bool is_warning = false; + bool is_note = false; + if (w > W_NOTE) + { + is_error = true; + } + else if (w == W_LOCATION) + { + is_note = true; + } + else + { + is_error = + (ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors & (1ULL << w)) != 0; - va_list args; - va_start(args, fmt); - /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); + is_warning = + (ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings & (1ULL << w)) != 0; - if (w != W_NONE) - { - if (ctx->options.visual_studio_ouput_format) - { - printf("warning: " "%s [" "-W%s" "]\n", buffer, get_warning_name(w)); - } - else - { - printf(LIGHTMAGENTA "warning: " WHITE "%s [" LIGHTMAGENTA "-W%s" WHITE "]\n" RESET, buffer, get_warning_name(w)); - } + is_note = + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes & (1ULL << w)) != 0); + } - } - else - { - if (ctx->options.visual_studio_ouput_format) - { - printf("warning: " "%s\n", buffer); - } - else - { - printf(LIGHTMAGENTA "warning: " WHITE "%s\n" RESET, buffer); - } - } - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); -#endif - if (ctx->sarif_file) - { - if (ctx->p_report->error_count + ctx->p_report->warnings_count + ctx->p_report->info_count > 1) - { - fprintf(ctx->sarif_file, ",\n"); - } - fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"ruleId\":\"%s\",\n", get_warning_name(w)); - fprintf(ctx->sarif_file, " \"level\":\"warning\",\n"); - fprintf(ctx->sarif_file, " \"message\": {\n"); - fprintf(ctx->sarif_file, " \"text\": \"%s\"\n", buffer); - fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"locations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"physicalLocation\": {\n"); - fprintf(ctx->sarif_file, " \"artifactLocation\": {\n"); - fprintf(ctx->sarif_file, " \"uri\": \"file:///%s\"\n", p_token->token_origin->lexeme); - fprintf(ctx->sarif_file, " },\n"); + if (is_error) + { + ctx->p_report->error_count++; + } + else if (is_warning) + { + ctx->p_report->warnings_count++; + } + else if (is_note) + { + if (w != W_LOCATION) + ctx->p_report->info_count++; + } + else + { + return false; + } - fprintf(ctx->sarif_file, " \"region\": {\n"); - fprintf(ctx->sarif_file, " \"startLine\": %d,\n", p_token->line); - fprintf(ctx->sarif_file, " \"startColumn\": %d,\n", p_token->col); - fprintf(ctx->sarif_file, " \"endLine\": %d,\n", p_token->line); - fprintf(ctx->sarif_file, " \"endColumn\": %d\n", p_token->col); - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " },\n"); + if (w != W_LOCATION) + ctx->p_report->last_diagnostic_id = w; - fprintf(ctx->sarif_file, " \"logicalLocations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); + const char* func_name = "module"; + if (ctx->p_current_function_opt) + { + func_name = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme; + } - fprintf(ctx->sarif_file, " \"fullyQualifiedName\": \"%s\",\n", func_name); - fprintf(ctx->sarif_file, " \"decoratedName\": \"%s\",\n", func_name); + char buffer[200] = {0}; - fprintf(ctx->sarif_file, " \"kind\": \"%s\"\n", "function"); - fprintf(ctx->sarif_file, " }\n"); +#ifndef TEST + if (p_token) + print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); - fprintf(ctx->sarif_file, " ]\n"); - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " ]\n"); + va_list args; + va_start(args, fmt); + /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); + va_end(args); - fprintf(ctx->sarif_file, " }\n"); - } + bool show_warning_name = w < W_NOTE && w != W_LOCATION; - return 1; -} + if (ctx->options.visual_studio_ouput_format) + { + if (is_error) + printf("error: "); + else if (is_warning) + printf("warning: "); + else if (is_note) + printf("note: "); + printf("%s", buffer); -void compiler_set_info_with_token(enum warning w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...) -{ - if (w != W_NONE) - { - if (p_token->level != 0) - { - /*we dont warning code inside includes*/ - return; - } + if (show_warning_name) + printf(" [" "-W%s" "]\n", get_warning_name(w)); + } + else + { + if (is_error) + { + if (show_warning_name) + printf(LIGHTRED "error: " WHITE "%s [" LIGHTRED "-W%s" WHITE "]\n" RESET, buffer, get_warning_name(w)); + else + printf(LIGHTRED "error: " WHITE "%s\n" RESET, buffer); + } + else if (is_warning) + { + if (show_warning_name) + printf(LIGHTMAGENTA "warning: " WHITE "%s [" LIGHTMAGENTA "-W%s" WHITE "]\n" RESET, buffer, get_warning_name(w)); + else + printf(LIGHTMAGENTA "warning: " WHITE "%s\n" RESET, buffer); - if (!parser_is_warning_enabled(ctx, w)) - { - return; - } - } - const char* func_name = "module"; - if (ctx->p_current_function_opt) - { - func_name = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme; - } - ctx->p_report->info_count++; - ctx->p_report->last_warning |= w; - char buffer[200] = { 0 }; + } + else if (is_note) + { + if (show_warning_name) + printf(LIGHTCYAN "note: " WHITE "%s [" LIGHTCYAN "-W%s" WHITE "]\n" RESET, buffer, get_warning_name(w)); + else + printf(LIGHTCYAN "note: " WHITE "%s\n" RESET, buffer); + } -#ifndef TEST - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); + } - va_list args; - va_start(args, fmt); - /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); - if (ctx->options.visual_studio_ouput_format) - { - printf("note: " "%s\n", buffer); - } - else - { - printf(LIGHTCYAN "note: " WHITE "%s\n", buffer); - } + print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); +#endif - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); -#endif // !TEST + if (ctx->sarif_file) + { + if (ctx->p_report->error_count + ctx->p_report->warnings_count + ctx->p_report->info_count > 1) + { + fprintf(ctx->sarif_file, ",\n"); + } + fprintf(ctx->sarif_file, " {\n"); + fprintf(ctx->sarif_file, " \"ruleId\":\"%s\",\n", get_warning_name(w)); - if (ctx->sarif_file) - { - if (ctx->p_report->error_count + ctx->p_report->warnings_count + ctx->p_report->info_count > 1) - { - fprintf(ctx->sarif_file, ",\n"); - } + fprintf(ctx->sarif_file, " \"level\":\"warning\",\n"); - fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"ruleId\":\"%s\",\n", "info"); - fprintf(ctx->sarif_file, " \"level\":\"note\",\n"); - fprintf(ctx->sarif_file, " \"message\": {\n"); - fprintf(ctx->sarif_file, " \"text\": \"%s\"\n", buffer); - fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"locations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); + fprintf(ctx->sarif_file, " \"message\": {\n"); + fprintf(ctx->sarif_file, " \"text\": \"%s\"\n", buffer); + fprintf(ctx->sarif_file, " },\n"); + fprintf(ctx->sarif_file, " \"locations\": [\n"); + fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"physicalLocation\": {\n"); + fprintf(ctx->sarif_file, " \"physicalLocation\": {\n"); - fprintf(ctx->sarif_file, " \"artifactLocation\": {\n"); - fprintf(ctx->sarif_file, " \"uri\": \"file:///%s\"\n", p_token->token_origin->lexeme); - fprintf(ctx->sarif_file, " },\n"); + fprintf(ctx->sarif_file, " \"artifactLocation\": {\n"); + fprintf(ctx->sarif_file, " \"uri\": \"file:///%s\"\n", p_token->token_origin->lexeme); + fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"region\": {\n"); - fprintf(ctx->sarif_file, " \"startLine\": %d,\n", p_token->line); - fprintf(ctx->sarif_file, " \"startColumn\": %d,\n", p_token->col); - fprintf(ctx->sarif_file, " \"endLine\": %d,\n", p_token->line); - fprintf(ctx->sarif_file, " \"endColumn\": %d\n", p_token->col); - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " },\n"); + fprintf(ctx->sarif_file, " \"region\": {\n"); + fprintf(ctx->sarif_file, " \"startLine\": %d,\n", p_token->line); + fprintf(ctx->sarif_file, " \"startColumn\": %d,\n", p_token->col); + fprintf(ctx->sarif_file, " \"endLine\": %d,\n", p_token->line); + fprintf(ctx->sarif_file, " \"endColumn\": %d\n", p_token->col); + fprintf(ctx->sarif_file, " }\n"); + fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"logicalLocations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); + fprintf(ctx->sarif_file, " \"logicalLocations\": [\n"); + fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"fullyQualifiedName\": \"%s\",\n", func_name); - fprintf(ctx->sarif_file, " \"decoratedName\": \"%s\",\n", func_name); + fprintf(ctx->sarif_file, " \"fullyQualifiedName\": \"%s\",\n", func_name); + fprintf(ctx->sarif_file, " \"decoratedName\": \"%s\",\n", func_name); - fprintf(ctx->sarif_file, " \"kind\": \"%s\"\n", "function"); - fprintf(ctx->sarif_file, " }\n"); + fprintf(ctx->sarif_file, " \"kind\": \"%s\"\n", "function"); + fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " ]\n"); + fprintf(ctx->sarif_file, " ]\n"); - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " ]\n"); + fprintf(ctx->sarif_file, " }\n"); + fprintf(ctx->sarif_file, " ]\n"); - fprintf(ctx->sarif_file, " }\n"); - } + fprintf(ctx->sarif_file, " }\n"); + } + return 1; } + void print_scope(struct scope_list* e) { - printf("--- begin of scope---\n"); - struct scope* p = e->head; - int level = 0; - while (p) - { - for (int i = 0; i < p->variables.capacity; i++) - { - if (p->variables.table[i]) - { - for (int k = 0; k < level; k++) - printf(" "); - printf("%s\n", p->variables.table[i]->key); - } - } + printf("--- begin of scope---\n"); + struct scope* p = e->head; + int level = 0; + while (p) + { + if(p->variables.table) //we start with capacity=5 and no allocations ? + { + for (int i = 0; i < p->variables.capacity; i++) + { + if (p->variables.table[i]) + { + for (int k = 0; k < level; k++) + printf(" "); + printf("%s\n", p->variables.table[i]->key); + } + } + } - for (int i = 0; i < p->tags.capacity; i++) - { - if (p->tags.table[i]) - { - for (int k = 0; k < level; k++) - printf(" "); - printf("tag %s\n", p->tags.table[i]->key); - } - } + if(p->tags.table) //we start with capacity=1 and no allocations ? + { + for (int i = 0; i < p->tags.capacity; i++) + { + if (p->tags.table[i]) + { + for (int k = 0; k < level; k++) + printf(" "); + printf("tag %s\n", p->tags.table[i]->key); + } + } + } - level++; - p = p->next; - } - printf("--- end of scope---\n"); + if(p == e->tail) break; //somehow we are going after tail + level++; + p = p->next; + } + printf("--- end of scope---\n"); } bool first_of_function_specifier_token(struct token* token) { - if (token == NULL) - return false; + if (token == NULL) + return false; - return token->type == TK_KEYWORD_INLINE || - token->type == TK_KEYWORD__NORETURN; + return token->type == TK_KEYWORD_INLINE || + token->type == TK_KEYWORD__NORETURN; } bool first_is(struct parser_ctx* ctx, enum token_type type) { - return ctx->current != NULL && ctx->current->type == type; + return ctx->current != NULL && ctx->current->type == type; } bool first_of_function_specifier(struct parser_ctx* ctx) { - return first_of_function_specifier_token(ctx->current); + return first_of_function_specifier_token(ctx->current); } bool first_of_enum_specifier_token(struct token* token) { - if (token == NULL) - return false; - return token->type == TK_KEYWORD_ENUM; + if (token == NULL) + return false; + return token->type == TK_KEYWORD_ENUM; } bool first_of_enum_specifier(struct parser_ctx* ctx) { - return first_of_enum_specifier_token(ctx->current); + return first_of_enum_specifier_token(ctx->current); } bool first_of_alignment_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; - return ctx->current->type == TK_KEYWORD__ALIGNAS; + if (ctx->current == NULL) + return false; + return ctx->current->type == TK_KEYWORD__ALIGNAS; } bool first_of_atomic_type_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - /* - If the _Atomic keyword is immediately followed by a left parenthesis, it is interpreted - as a type specifier (with a type name), not as a type qualifier. - */ + /* + If the _Atomic keyword is immediately followed by a left parenthesis, it is interpreted + as a type specifier (with a type name), not as a type qualifier. + */ - if (ctx->current->type == TK_KEYWORD__ATOMIC) - { - struct token* ahead = parser_look_ahead(ctx); - if (ahead != NULL) - { - return ahead->type == '('; + if (ctx->current->type == TK_KEYWORD__ATOMIC) + { + struct token* ahead = parser_look_ahead(ctx); + if (ahead != NULL) + { + return ahead->type == '('; - } - } - return false; + } + } + return false; } bool first_of_storage_class_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD_TYPEDEF || - ctx->current->type == TK_KEYWORD_CONSTEXPR || - ctx->current->type == TK_KEYWORD_EXTERN || - ctx->current->type == TK_KEYWORD_STATIC || - ctx->current->type == TK_KEYWORD__THREAD_LOCAL || - ctx->current->type == TK_KEYWORD_AUTO || - ctx->current->type == TK_KEYWORD_REGISTER; + return ctx->current->type == TK_KEYWORD_TYPEDEF || + ctx->current->type == TK_KEYWORD_CONSTEXPR || + ctx->current->type == TK_KEYWORD_EXTERN || + ctx->current->type == TK_KEYWORD_STATIC || + ctx->current->type == TK_KEYWORD__THREAD_LOCAL || + ctx->current->type == TK_KEYWORD_AUTO || + ctx->current->type == TK_KEYWORD_REGISTER; } bool first_of_struct_or_union_token(struct token* token) { - return token->type == TK_KEYWORD_STRUCT || token->type == TK_KEYWORD_UNION; + return token->type == TK_KEYWORD_STRUCT || token->type == TK_KEYWORD_UNION; } bool first_of_struct_or_union(struct parser_ctx* ctx) { - return first_of_struct_or_union_token(ctx->current); + return first_of_struct_or_union_token(ctx->current); } bool first_of_type_qualifier_token(struct token* p_token) { - if (p_token == NULL) - return false; + if (p_token == NULL) + return false; - return p_token->type == TK_KEYWORD_CONST || - p_token->type == TK_KEYWORD_RESTRICT || - p_token->type == TK_KEYWORD_VOLATILE || - p_token->type == TK_KEYWORD__ATOMIC || + return p_token->type == TK_KEYWORD_CONST || + p_token->type == TK_KEYWORD_RESTRICT || + p_token->type == TK_KEYWORD_VOLATILE || + p_token->type == TK_KEYWORD__ATOMIC || - /*extensions*/ - p_token->type == TK_KEYWORD__OUT || - p_token->type == TK_KEYWORD__OWNER || - p_token->type == TK_KEYWORD__OBJ_OWNER || - p_token->type == TK_KEYWORD__VIEW || - p_token->type == TK_KEYWORD__OPT; + /*extensions*/ + p_token->type == TK_KEYWORD__OUT || + p_token->type == TK_KEYWORD__OWNER || + p_token->type == TK_KEYWORD__OBJ_OWNER || + p_token->type == TK_KEYWORD__VIEW || + p_token->type == TK_KEYWORD__OPT; - //__fastcall - //__stdcall + //__fastcall + //__stdcall } bool first_of_type_qualifier(struct parser_ctx* ctx) { - return first_of_type_qualifier_token(ctx->current); + return first_of_type_qualifier_token(ctx->current); } @@ -22185,153 +22437,153 @@ bool first_of_type_qualifier(struct parser_ctx* ctx) struct map_entry* find_tag(struct parser_ctx* ctx, const char* lexeme) { - struct scope* scope = ctx->scopes.tail; - while (scope) - { - struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); - if (p_entry) - { - return p_entry; - } - scope = scope->previous; - } - return NULL; + struct scope* scope = ctx->scopes.tail; + while (scope) + { + struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); + if (p_entry) + { + return p_entry; + } + scope = scope->previous; + } + return NULL; } struct map_entry* find_variables(struct parser_ctx* ctx, const char* lexeme, struct scope** ppscope_opt) { - if (ppscope_opt != NULL) - *ppscope_opt = NULL; //out + if (ppscope_opt != NULL) + *ppscope_opt = NULL; //out - struct scope* scope = ctx->scopes.tail; - while (scope) - { - struct map_entry* p_entry = hashmap_find(&scope->variables, lexeme); - if (p_entry) - { - if (ppscope_opt) - *ppscope_opt = scope; - return p_entry; - } - scope = scope->previous; - } - return NULL; + struct scope* scope = ctx->scopes.tail; + while (scope) + { + struct map_entry* p_entry = hashmap_find(&scope->variables, lexeme); + if (p_entry) + { + if (ppscope_opt) + *ppscope_opt = scope; + return p_entry; + } + scope = scope->previous; + } + return NULL; } struct enum_specifier* find_enum_specifier(struct parser_ctx* ctx, const char* lexeme) { - struct enum_specifier* best = NULL; - struct scope* scope = ctx->scopes.tail; - while (scope) - { - struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); - if (p_entry && - p_entry->type == TAG_TYPE_ENUN_SPECIFIER) - { - best = p_entry->p; - if (best->enumerator_list.head != NULL) - return best; //OK bem completo - else - { - //nao eh completo vamos continuar subindo - } + struct enum_specifier* best = NULL; + struct scope* scope = ctx->scopes.tail; + while (scope) + { + struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); + if (p_entry && + p_entry->type == TAG_TYPE_ENUN_SPECIFIER) + { + best = p_entry->p; + if (best->enumerator_list.head != NULL) + return best; //OK bem completo + else + { + //nao eh completo vamos continuar subindo + } - } - scope = scope->previous; - } - return best; //mesmo que nao seja tao completo vamos retornar. + } + scope = scope->previous; + } + return best; //mesmo que nao seja tao completo vamos retornar. } struct struct_or_union_specifier* find_struct_or_union_specifier(struct parser_ctx* ctx, const char* lexeme) { - struct struct_or_union_specifier* p = NULL; - struct scope* scope = ctx->scopes.tail; - while (scope) - { - struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); - if (p_entry && - p_entry->type == TAG_TYPE_STRUCT_OR_UNION_SPECIFIER) - { - p = p_entry->p; - break; - } - scope = scope->previous; - } - return p; + struct struct_or_union_specifier* p = NULL; + struct scope* scope = ctx->scopes.tail; + while (scope) + { + struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); + if (p_entry && + p_entry->type == TAG_TYPE_STRUCT_OR_UNION_SPECIFIER) + { + p = p_entry->p; + break; + } + scope = scope->previous; + } + return p; } struct declarator* find_declarator(struct parser_ctx* ctx, const char* lexeme, struct scope** ppscope_opt) { - struct map_entry* p_entry = find_variables(ctx, lexeme, ppscope_opt); + struct map_entry* p_entry = find_variables(ctx, lexeme, ppscope_opt); - if (p_entry) - { - if (p_entry->type == TAG_TYPE_INIT_DECLARATOR) - { - struct init_declarator* p_init_declarator = p_entry->p; - return (struct declarator*)p_init_declarator->p_declarator; - } - else if (p_entry->type == TAG_TYPE_ONLY_DECLARATOR) - { - return p_entry->p; - } - } + if (p_entry) + { + if (p_entry->type == TAG_TYPE_INIT_DECLARATOR) + { + struct init_declarator* p_init_declarator = p_entry->p; + return (struct declarator*) p_init_declarator->p_declarator; + } + else if (p_entry->type == TAG_TYPE_ONLY_DECLARATOR) + { + return p_entry->p; + } + } - return NULL; + return NULL; } struct enumerator* find_enumerator(struct parser_ctx* ctx, const char* lexeme, struct scope** ppscope_opt) { - struct map_entry* p_entry = find_variables(ctx, lexeme, ppscope_opt); + struct map_entry* p_entry = find_variables(ctx, lexeme, ppscope_opt); - if (p_entry && p_entry->type == TAG_TYPE_ENUMERATOR) - return p_entry->p; + if (p_entry && p_entry->type == TAG_TYPE_ENUMERATOR) + return p_entry->p; - return NULL; + return NULL; } bool first_of_typedef_name(struct parser_ctx* ctx, struct token* p_token) { - if (p_token == NULL) - return false; + if (p_token == NULL) + return false; - if (p_token->type != TK_IDENTIFIER) - { - //nao precisa verificar - return false; - } - if (p_token->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) - { - //ja foi verificado que eh typedef - return true; - } - if (p_token->flags & TK_FLAG_IDENTIFIER_IS_NOT_TYPEDEF) - { - //ja foi verificado que NAO eh typedef - return false; - } + if (p_token->type != TK_IDENTIFIER) + { + //nao precisa verificar + return false; + } + if (p_token->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) + { + //ja foi verificado que eh typedef + return true; + } + if (p_token->flags & TK_FLAG_IDENTIFIER_IS_NOT_TYPEDEF) + { + //ja foi verificado que NAO eh typedef + return false; + } - struct declarator* pdeclarator = find_declarator(ctx, p_token->lexeme, NULL); + struct declarator* pdeclarator = find_declarator(ctx, p_token->lexeme, NULL); - //pdeclarator->declaration_specifiers-> - if (pdeclarator && - pdeclarator->declaration_specifiers && - (pdeclarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_TYPEDEF)) - { - pdeclarator->num_uses++; - p_token->flags |= TK_FLAG_IDENTIFIER_IS_TYPEDEF; - return true; - } - else - { - p_token->flags |= TK_FLAG_IDENTIFIER_IS_NOT_TYPEDEF; - } - return false; + //pdeclarator->declaration_specifiers-> + if (pdeclarator && + pdeclarator->declaration_specifiers && + (pdeclarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_TYPEDEF)) + { + pdeclarator->num_uses++; + p_token->flags |= TK_FLAG_IDENTIFIER_IS_TYPEDEF; + return true; + } + else + { + p_token->flags |= TK_FLAG_IDENTIFIER_IS_NOT_TYPEDEF; + } + return false; } bool first_of_type_specifier(struct parser_ctx* ctx); @@ -22341,752 +22593,758 @@ bool first_of_type_specifier_token(struct parser_ctx* ctx, struct token* token); bool first_of_type_name_ahead(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - if (ctx->current->type != '(') - return false; - struct token* token_ahead = parser_look_ahead(ctx); - return first_of_type_specifier_token(ctx, token_ahead) || - first_of_type_qualifier_token(token_ahead); + if (ctx->current->type != '(') + return false; + struct token* token_ahead = parser_look_ahead(ctx); + return first_of_type_specifier_token(ctx, token_ahead) || + first_of_type_qualifier_token(token_ahead); } bool first_of_type_name(struct parser_ctx* ctx) { - return first_of_type_specifier(ctx) || first_of_type_qualifier(ctx); + return first_of_type_specifier(ctx) || first_of_type_qualifier(ctx); } bool first_of_type_specifier_token(struct parser_ctx* ctx, struct token* p_token) { - if (p_token == NULL) - return false; + if (p_token == NULL) + return false; - //if (ctx->) - return p_token->type == TK_KEYWORD_VOID || - p_token->type == TK_KEYWORD_CHAR || - p_token->type == TK_KEYWORD_SHORT || - p_token->type == TK_KEYWORD_INT || - p_token->type == TK_KEYWORD_LONG || - - //microsoft extension - p_token->type == TK_KEYWORD__INT8 || - p_token->type == TK_KEYWORD__INT16 || - p_token->type == TK_KEYWORD__INT32 || - p_token->type == TK_KEYWORD__INT64 || - //end microsoft - - p_token->type == TK_KEYWORD_FLOAT || - p_token->type == TK_KEYWORD_DOUBLE || - p_token->type == TK_KEYWORD_SIGNED || - p_token->type == TK_KEYWORD_UNSIGNED || - p_token->type == TK_KEYWORD__BOOL || - p_token->type == TK_KEYWORD__COMPLEX || - p_token->type == TK_KEYWORD__DECIMAL32 || - p_token->type == TK_KEYWORD__DECIMAL64 || - p_token->type == TK_KEYWORD__DECIMAL128 || - p_token->type == TK_KEYWORD_TYPEOF || //C23 - p_token->type == TK_KEYWORD_TYPEOF_UNQUAL || //C23 - first_of_atomic_type_specifier(ctx) || - first_of_struct_or_union_token(p_token) || - first_of_enum_specifier_token(p_token) || - first_of_typedef_name(ctx, p_token); + //if (ctx->) + return p_token->type == TK_KEYWORD_VOID || + p_token->type == TK_KEYWORD_CHAR || + p_token->type == TK_KEYWORD_SHORT || + p_token->type == TK_KEYWORD_INT || + p_token->type == TK_KEYWORD_LONG || + + //microsoft extension + p_token->type == TK_KEYWORD__INT8 || + p_token->type == TK_KEYWORD__INT16 || + p_token->type == TK_KEYWORD__INT32 || + p_token->type == TK_KEYWORD__INT64 || + //end microsoft + + p_token->type == TK_KEYWORD_FLOAT || + p_token->type == TK_KEYWORD_DOUBLE || + p_token->type == TK_KEYWORD_SIGNED || + p_token->type == TK_KEYWORD_UNSIGNED || + p_token->type == TK_KEYWORD__BOOL || + p_token->type == TK_KEYWORD__COMPLEX || + p_token->type == TK_KEYWORD__DECIMAL32 || + p_token->type == TK_KEYWORD__DECIMAL64 || + p_token->type == TK_KEYWORD__DECIMAL128 || + p_token->type == TK_KEYWORD_TYPEOF || //C23 + p_token->type == TK_KEYWORD_TYPEOF_UNQUAL || //C23 + first_of_atomic_type_specifier(ctx) || + first_of_struct_or_union_token(p_token) || + first_of_enum_specifier_token(p_token) || + first_of_typedef_name(ctx, p_token); } bool first_of_type_specifier(struct parser_ctx* ctx) { - return first_of_type_specifier_token(ctx, ctx->current); + return first_of_type_specifier_token(ctx, ctx->current); } bool first_of_type_specifier_qualifier(struct parser_ctx* ctx) { - return first_of_type_specifier(ctx) || - first_of_type_qualifier(ctx) || - first_of_alignment_specifier(ctx); + return first_of_type_specifier(ctx) || + first_of_type_qualifier(ctx) || + first_of_alignment_specifier(ctx); } bool first_of_compound_statement(struct parser_ctx* ctx) { - return first_is(ctx, '{'); + return first_is(ctx, '{'); } bool first_of_jump_statement(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD_GOTO || - ctx->current->type == TK_KEYWORD_CONTINUE || - ctx->current->type == TK_KEYWORD_BREAK || - ctx->current->type == TK_KEYWORD_RETURN || - ctx->current->type == TK_KEYWORD_THROW /*extension*/; + return ctx->current->type == TK_KEYWORD_GOTO || + ctx->current->type == TK_KEYWORD_CONTINUE || + ctx->current->type == TK_KEYWORD_BREAK || + ctx->current->type == TK_KEYWORD_RETURN || + ctx->current->type == TK_KEYWORD_THROW /*extension*/; } bool first_of_selection_statement(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD_IF || - ctx->current->type == TK_KEYWORD_SWITCH; + return ctx->current->type == TK_KEYWORD_IF || + ctx->current->type == TK_KEYWORD_SWITCH; } bool first_of_iteration_statement(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return - ctx->current->type == TK_KEYWORD_WHILE || - ctx->current->type == TK_KEYWORD_DO || - ctx->current->type == TK_KEYWORD_FOR; + return + ctx->current->type == TK_KEYWORD_WHILE || + ctx->current->type == TK_KEYWORD_DO || + ctx->current->type == TK_KEYWORD_FOR; } bool first_of_label(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - if (ctx->current->type == TK_IDENTIFIER) - { - struct token* next = parser_look_ahead(ctx); - return next && next->type == ':'; - } - else if (ctx->current->type == TK_KEYWORD_CASE) - { - return true; - } - else if (ctx->current->type == TK_KEYWORD_DEFAULT) - { - return true; - } + if (ctx->current->type == TK_IDENTIFIER) + { + struct token* next = parser_look_ahead(ctx); + return next && next->type == ':'; + } + else if (ctx->current->type == TK_KEYWORD_CASE) + { + return true; + } + else if (ctx->current->type == TK_KEYWORD_DEFAULT) + { + return true; + } - return false; + return false; } bool first_of_declaration_specifier(struct parser_ctx* ctx) { - /* - declaration-specifier: - storage-class-specifier - type-specifier-qualifier - function-specifier - */ - return first_of_storage_class_specifier(ctx) || - first_of_function_specifier(ctx) || - first_of_type_specifier_qualifier(ctx); + /* + declaration-specifier: + storage-class-specifier + type-specifier-qualifier + function-specifier + */ + return first_of_storage_class_specifier(ctx) || + first_of_function_specifier(ctx) || + first_of_type_specifier_qualifier(ctx); } bool first_of_static_assert_declaration(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD__STATIC_ASSERT || - ctx->current->type == TK_KEYWORD_STATIC_DEBUG || - ctx->current->type == TK_KEYWORD_STATIC_STATE || - ctx->current->type == TK_KEYWORD_STATIC_SET; + return ctx->current->type == TK_KEYWORD__STATIC_ASSERT || + ctx->current->type == TK_KEYWORD_STATIC_DEBUG || + ctx->current->type == TK_KEYWORD_STATIC_STATE || + ctx->current->type == TK_KEYWORD_STATIC_SET; } bool first_of_attribute_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - if (ctx->current->type != '[') - { - return false; - } - struct token* p_token = parser_look_ahead(ctx); - return p_token != NULL && p_token->type == '['; + if (ctx->current->type != '[') + { + return false; + } + struct token* p_token = parser_look_ahead(ctx); + return p_token != NULL && p_token->type == '['; } bool first_of_labeled_statement(struct parser_ctx* ctx) { - return first_of_label(ctx); + return first_of_label(ctx); } bool first_of_designator(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == '[' || ctx->current->type == '.'; + return ctx->current->type == '[' || ctx->current->type == '.'; } struct token* previous_parser_token(struct token* token) { - if (token == NULL) - { - return NULL; - } - struct token* r = token->prev; - while (!(r->flags & TK_FLAG_FINAL)) - { - r = r->prev; - } + if (token == NULL) + { + return NULL; + } + struct token* r = token->prev; + while (!(r->flags & TK_FLAG_FINAL)) + { + r = r->prev; + } - return r; + return r; } enum token_type is_keyword(const char* text) { - enum token_type result = 0; - switch (text[0]) - { - case 'a': - if (strcmp("alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; - else if (strcmp("auto", text) == 0) result = TK_KEYWORD_AUTO; - else if (strcmp("alignas", text) == 0) result = TK_KEYWORD__ALIGNAS; /*C23 alternate spelling _Alignas*/ - else if (strcmp("alignof", text) == 0) result = TK_KEYWORD__ALIGNAS; /*C23 alternate spelling _Alignof*/ - else if (strcmp("assert", text) == 0) result = TK_KEYWORD_ASSERT; /*extension*/ - break; - case 'b': - if (strcmp("break", text) == 0) result = TK_KEYWORD_BREAK; - else if (strcmp("bool", text) == 0) result = TK_KEYWORD__BOOL; /*C23 alternate spelling _Bool*/ + enum token_type result = 0; + switch (text[0]) + { + case 'a': + if (strcmp("alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; + else if (strcmp("auto", text) == 0) result = TK_KEYWORD_AUTO; + else if (strcmp("alignas", text) == 0) result = TK_KEYWORD__ALIGNAS; /*C23 alternate spelling _Alignas*/ + else if (strcmp("alignof", text) == 0) result = TK_KEYWORD__ALIGNAS; /*C23 alternate spelling _Alignof*/ + else if (strcmp("assert", text) == 0) result = TK_KEYWORD_ASSERT; /*extension*/ +#ifdef CAKE_ASSERT_IS_KEYWORD + else if (strcmp("assert", text) == 0) result = TK_KEYWORD_ASSERT; /*extension*/ +#endif + break; + case 'b': + if (strcmp("break", text) == 0) result = TK_KEYWORD_BREAK; + else if (strcmp("bool", text) == 0) result = TK_KEYWORD__BOOL; /*C23 alternate spelling _Bool*/ - break; - case 'c': - if (strcmp("case", text) == 0) result = TK_KEYWORD_CASE; - else if (strcmp("char", text) == 0) result = TK_KEYWORD_CHAR; - else if (strcmp("const", text) == 0) result = TK_KEYWORD_CONST; - else if (strcmp("constexpr", text) == 0) result = TK_KEYWORD_CONSTEXPR; - else if (strcmp("continue", text) == 0) result = TK_KEYWORD_CONTINUE; - else if (strcmp("catch", text) == 0) result = TK_KEYWORD_CATCH; - break; - case 'd': - if (strcmp("default", text) == 0) result = TK_KEYWORD_DEFAULT; - else if (strcmp("do", text) == 0) result = TK_KEYWORD_DO; - else if (strcmp("defer", text) == 0) result = TK_KEYWORD_DEFER; - else if (strcmp("double", text) == 0) result = TK_KEYWORD_DOUBLE; - break; - case 'e': - if (strcmp("else", text) == 0) result = TK_KEYWORD_ELSE; - else if (strcmp("enum", text) == 0) result = TK_KEYWORD_ENUM; - else if (strcmp("extern", text) == 0) result = TK_KEYWORD_EXTERN; - break; - case 'f': - if (strcmp("float", text) == 0) result = TK_KEYWORD_FLOAT; - else if (strcmp("for", text) == 0) result = TK_KEYWORD_FOR; - else if (strcmp("false", text) == 0) result = TK_KEYWORD_FALSE; - break; - case 'g': - if (strcmp("goto", text) == 0) result = TK_KEYWORD_GOTO; - break; - case 'i': - if (strcmp("if", text) == 0) result = TK_KEYWORD_IF; - else if (strcmp("inline", text) == 0) result = TK_KEYWORD_INLINE; - else if (strcmp("int", text) == 0) result = TK_KEYWORD_INT; - break; - case 'n': - if (strcmp("nullptr", text) == 0) result = TK_KEYWORD_NULLPTR; - break; + break; + case 'c': + if (strcmp("case", text) == 0) result = TK_KEYWORD_CASE; + else if (strcmp("char", text) == 0) result = TK_KEYWORD_CHAR; + else if (strcmp("const", text) == 0) result = TK_KEYWORD_CONST; + else if (strcmp("constexpr", text) == 0) result = TK_KEYWORD_CONSTEXPR; + else if (strcmp("continue", text) == 0) result = TK_KEYWORD_CONTINUE; + else if (strcmp("catch", text) == 0) result = TK_KEYWORD_CATCH; + break; + case 'd': + if (strcmp("default", text) == 0) result = TK_KEYWORD_DEFAULT; + else if (strcmp("do", text) == 0) result = TK_KEYWORD_DO; + else if (strcmp("defer", text) == 0) result = TK_KEYWORD_DEFER; + else if (strcmp("double", text) == 0) result = TK_KEYWORD_DOUBLE; + break; + case 'e': + if (strcmp("else", text) == 0) result = TK_KEYWORD_ELSE; + else if (strcmp("enum", text) == 0) result = TK_KEYWORD_ENUM; + else if (strcmp("extern", text) == 0) result = TK_KEYWORD_EXTERN; + break; + case 'f': + if (strcmp("float", text) == 0) result = TK_KEYWORD_FLOAT; + else if (strcmp("for", text) == 0) result = TK_KEYWORD_FOR; + else if (strcmp("false", text) == 0) result = TK_KEYWORD_FALSE; + break; + case 'g': + if (strcmp("goto", text) == 0) result = TK_KEYWORD_GOTO; + break; + case 'i': + if (strcmp("if", text) == 0) result = TK_KEYWORD_IF; + else if (strcmp("inline", text) == 0) result = TK_KEYWORD_INLINE; + else if (strcmp("int", text) == 0) result = TK_KEYWORD_INT; + break; + case 'n': + if (strcmp("nullptr", text) == 0) result = TK_KEYWORD_NULLPTR; + break; - case 'l': - if (strcmp("long", text) == 0) result = TK_KEYWORD_LONG; - break; - case 'r': - if (strcmp("register", text) == 0) result = TK_KEYWORD_REGISTER; - else if (strcmp("restrict", text) == 0) result = TK_KEYWORD_RESTRICT; - else if (strcmp("return", text) == 0) result = TK_KEYWORD_RETURN; + case 'l': + if (strcmp("long", text) == 0) result = TK_KEYWORD_LONG; + break; + case 'r': + if (strcmp("register", text) == 0) result = TK_KEYWORD_REGISTER; + else if (strcmp("restrict", text) == 0) result = TK_KEYWORD_RESTRICT; + else if (strcmp("return", text) == 0) result = TK_KEYWORD_RETURN; - break; - case 's': - if (strcmp("short", text) == 0) result = TK_KEYWORD_SHORT; - else if (strcmp("signed", text) == 0) result = TK_KEYWORD_SIGNED; - else if (strcmp("sizeof", text) == 0) result = TK_KEYWORD_SIZEOF; - else if (strcmp("static", text) == 0) result = TK_KEYWORD_STATIC; - else if (strcmp("struct", text) == 0) result = TK_KEYWORD_STRUCT; - else if (strcmp("switch", text) == 0) result = TK_KEYWORD_SWITCH; - else if (strcmp("static_assert", text) == 0) result = TK_KEYWORD__STATIC_ASSERT; /*C23 alternate spelling _Static_assert*/ - else if (strcmp("static_debug", text) == 0) result = TK_KEYWORD_STATIC_DEBUG; - else if (strcmp("static_state", text) == 0) result = TK_KEYWORD_STATIC_STATE; - else if (strcmp("static_set", text) == 0) result = TK_KEYWORD_STATIC_SET; + break; + case 's': + if (strcmp("short", text) == 0) result = TK_KEYWORD_SHORT; + else if (strcmp("signed", text) == 0) result = TK_KEYWORD_SIGNED; + else if (strcmp("sizeof", text) == 0) result = TK_KEYWORD_SIZEOF; + else if (strcmp("static", text) == 0) result = TK_KEYWORD_STATIC; + else if (strcmp("struct", text) == 0) result = TK_KEYWORD_STRUCT; + else if (strcmp("switch", text) == 0) result = TK_KEYWORD_SWITCH; + else if (strcmp("static_assert", text) == 0) result = TK_KEYWORD__STATIC_ASSERT; /*C23 alternate spelling _Static_assert*/ + else if (strcmp("static_debug", text) == 0) result = TK_KEYWORD_STATIC_DEBUG; + else if (strcmp("static_state", text) == 0) result = TK_KEYWORD_STATIC_STATE; + else if (strcmp("static_set", text) == 0) result = TK_KEYWORD_STATIC_SET; - break; - case 't': - if (strcmp("typedef", text) == 0) result = TK_KEYWORD_TYPEDEF; - else if (strcmp("typeof", text) == 0) result = TK_KEYWORD_TYPEOF; /*C23*/ - else if (strcmp("typeof_unqual", text) == 0) result = TK_KEYWORD_TYPEOF_UNQUAL; /*C23*/ - else if (strcmp("true", text) == 0) result = TK_KEYWORD_TRUE; /*C23*/ - else if (strcmp("thread_local", text) == 0) result = TK_KEYWORD__THREAD_LOCAL; /*C23 alternate spelling _Thread_local*/ - else if (strcmp("try", text) == 0) result = TK_KEYWORD_TRY; - else if (strcmp("throw", text) == 0) result = TK_KEYWORD_THROW; - break; - case 'u': - if (strcmp("union", text) == 0) result = TK_KEYWORD_UNION; - else if (strcmp("unsigned", text) == 0) result = TK_KEYWORD_UNSIGNED; - break; - case 'v': - if (strcmp("void", text) == 0) result = TK_KEYWORD_VOID; - else if (strcmp("volatile", text) == 0) result = TK_KEYWORD_VOLATILE; + break; + case 't': + if (strcmp("typedef", text) == 0) result = TK_KEYWORD_TYPEDEF; + else if (strcmp("typeof", text) == 0) result = TK_KEYWORD_TYPEOF; /*C23*/ + else if (strcmp("typeof_unqual", text) == 0) result = TK_KEYWORD_TYPEOF_UNQUAL; /*C23*/ + else if (strcmp("true", text) == 0) result = TK_KEYWORD_TRUE; /*C23*/ + else if (strcmp("thread_local", text) == 0) result = TK_KEYWORD__THREAD_LOCAL; /*C23 alternate spelling _Thread_local*/ + else if (strcmp("try", text) == 0) result = TK_KEYWORD_TRY; + else if (strcmp("throw", text) == 0) result = TK_KEYWORD_THROW; + break; + case 'u': + if (strcmp("union", text) == 0) result = TK_KEYWORD_UNION; + else if (strcmp("unsigned", text) == 0) result = TK_KEYWORD_UNSIGNED; + break; + case 'v': + if (strcmp("void", text) == 0) result = TK_KEYWORD_VOID; + else if (strcmp("volatile", text) == 0) result = TK_KEYWORD_VOLATILE; - break; - case 'w': - if (strcmp("while", text) == 0) result = TK_KEYWORD_WHILE; - break; - case '_': - - - //begin microsoft - if (strcmp("__int8", text) == 0) result = TK_KEYWORD__INT8; - else if (strcmp("__int16", text) == 0) result = TK_KEYWORD__INT16; - else if (strcmp("__int32", text) == 0) result = TK_KEYWORD__INT32; - else if (strcmp("__int64", text) == 0) result = TK_KEYWORD__INT64; - else if (strcmp("__forceinline", text) == 0) result = TK_KEYWORD_INLINE; - else if (strcmp("__inline", text) == 0) result = TK_KEYWORD_INLINE; - else if (strcmp("_asm", text) == 0 || strcmp("__asm", text) == 0) result = TK_KEYWORD__ASM; - else if (strcmp("__alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; - // - //end microsoft - - /*ownership*/ - else if (strcmp("_Out", text) == 0) result = TK_KEYWORD__OUT; /*extension*/ - else if (strcmp("_Owner", text) == 0) result = TK_KEYWORD__OWNER; /*extension*/ - else if (strcmp("_Obj_owner", text) == 0) result = TK_KEYWORD__OBJ_OWNER; /*extension*/ - else if (strcmp("_Opt", text) == 0) result = TK_KEYWORD__OPT; /*extension*/ - else if (strcmp("_View", text) == 0) result = TK_KEYWORD__VIEW; /*extension*/ - - /*EXPERIMENTAL EXTENSION*/ - else if (strcmp("_has_attr", text) == 0) result = TK_KEYWORD_ATTR_HAS; - else if (strcmp("_add_attr", text) == 0) result = TK_KEYWORD_ATTR_ADD; - else if (strcmp("_del_attr", text) == 0) result = TK_KEYWORD_ATTR_REMOVE; - /*EXPERIMENTAL EXTENSION*/ - - /*TRAITS EXTENSION*/ - else if (strcmp("_is_lvalue", text) == 0) result = TK_KEYWORD_IS_LVALUE; - else if (strcmp("_is_const", text) == 0) result = TK_KEYWORD_IS_CONST; - else if (strcmp("_is_owner", text) == 0) result = TK_KEYWORD_IS_OWNER; - else if (strcmp("_is_pointer", text) == 0) result = TK_KEYWORD_IS_POINTER; - else if (strcmp("_is_array", text) == 0) result = TK_KEYWORD_IS_ARRAY; - else if (strcmp("_is_function", text) == 0) result = TK_KEYWORD_IS_FUNCTION; - else if (strcmp("_is_arithmetic", text) == 0) result = TK_KEYWORD_IS_ARITHMETIC; - else if (strcmp("_is_floating_point", text) == 0) result = TK_KEYWORD_IS_FLOATING_POINT; - else if (strcmp("_is_integral", text) == 0) result = TK_KEYWORD_IS_INTEGRAL; - else if (strcmp("_is_scalar", text) == 0) result = TK_KEYWORD_IS_SCALAR; - /*TRAITS EXTENSION*/ - - else if (strcmp("_Alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; - else if (strcmp("_Alignas", text) == 0) result = TK_KEYWORD__ALIGNAS; - else if (strcmp("_Atomic", text) == 0) result = TK_KEYWORD__ATOMIC; - else if (strcmp("_Bool", text) == 0) result = TK_KEYWORD__BOOL; - else if (strcmp("_Complex", text) == 0) result = TK_KEYWORD__COMPLEX; - else if (strcmp("_Decimal128", text) == 0) result = TK_KEYWORD__DECIMAL32; - else if (strcmp("_Decimal64", text) == 0) result = TK_KEYWORD__DECIMAL64; - else if (strcmp("_Decimal128", text) == 0) result = TK_KEYWORD__DECIMAL128; - else if (strcmp("_Generic", text) == 0) result = TK_KEYWORD__GENERIC; - else if (strcmp("_Imaginary", text) == 0) result = TK_KEYWORD__IMAGINARY; - else if (strcmp("_Noreturn", text) == 0) result = TK_KEYWORD__NORETURN; /*_Noreturn deprecated C23*/ - else if (strcmp("_Static_assert", text) == 0) result = TK_KEYWORD__STATIC_ASSERT; - else if (strcmp("_Thread_local", text) == 0) result = TK_KEYWORD__THREAD_LOCAL; - else if (strcmp("_BitInt", text) == 0) result = TK_KEYWORD__BITINT; /*(C23)*/ + break; + case 'w': + if (strcmp("while", text) == 0) result = TK_KEYWORD_WHILE; + break; + case '_': + + + //begin microsoft + if (strcmp("__int8", text) == 0) result = TK_KEYWORD__INT8; + else if (strcmp("__int16", text) == 0) result = TK_KEYWORD__INT16; + else if (strcmp("__int32", text) == 0) result = TK_KEYWORD__INT32; + else if (strcmp("__int64", text) == 0) result = TK_KEYWORD__INT64; + else if (strcmp("__forceinline", text) == 0) result = TK_KEYWORD_INLINE; + else if (strcmp("__inline", text) == 0) result = TK_KEYWORD_INLINE; + else if (strcmp("_asm", text) == 0 || strcmp("__asm", text) == 0 + || strcmp("__asm__", text) == 0) result = TK_KEYWORD__ASM; + else if (strcmp("__alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; + // + //end microsoft + + /*ownership*/ + else if (strcmp("_Out", text) == 0) result = TK_KEYWORD__OUT; /*extension*/ + else if (strcmp("_Owner", text) == 0) result = TK_KEYWORD__OWNER; /*extension*/ + else if (strcmp("_Obj_owner", text) == 0) result = TK_KEYWORD__OBJ_OWNER; /*extension*/ + else if (strcmp("_Opt", text) == 0) result = TK_KEYWORD__OPT; /*extension*/ + else if (strcmp("_View", text) == 0) result = TK_KEYWORD__VIEW; /*extension*/ + + /*EXPERIMENTAL EXTENSION*/ + else if (strcmp("_has_attr", text) == 0) result = TK_KEYWORD_ATTR_HAS; + else if (strcmp("_add_attr", text) == 0) result = TK_KEYWORD_ATTR_ADD; + else if (strcmp("_del_attr", text) == 0) result = TK_KEYWORD_ATTR_REMOVE; + /*EXPERIMENTAL EXTENSION*/ + + /*TRAITS EXTENSION*/ + else if (strcmp("_is_lvalue", text) == 0) result = TK_KEYWORD_IS_LVALUE; + else if (strcmp("_is_const", text) == 0) result = TK_KEYWORD_IS_CONST; + else if (strcmp("_is_owner", text) == 0) result = TK_KEYWORD_IS_OWNER; + else if (strcmp("_is_pointer", text) == 0) result = TK_KEYWORD_IS_POINTER; + else if (strcmp("_is_array", text) == 0) result = TK_KEYWORD_IS_ARRAY; + else if (strcmp("_is_function", text) == 0) result = TK_KEYWORD_IS_FUNCTION; + else if (strcmp("_is_arithmetic", text) == 0) result = TK_KEYWORD_IS_ARITHMETIC; + else if (strcmp("_is_floating_point", text) == 0) result = TK_KEYWORD_IS_FLOATING_POINT; + else if (strcmp("_is_integral", text) == 0) result = TK_KEYWORD_IS_INTEGRAL; + else if (strcmp("_is_scalar", text) == 0) result = TK_KEYWORD_IS_SCALAR; + /*TRAITS EXTENSION*/ + + else if (strcmp("_Alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; + else if (strcmp("_Alignas", text) == 0) result = TK_KEYWORD__ALIGNAS; + else if (strcmp("_Atomic", text) == 0) result = TK_KEYWORD__ATOMIC; + else if (strcmp("_Bool", text) == 0) result = TK_KEYWORD__BOOL; + else if (strcmp("_Complex", text) == 0) result = TK_KEYWORD__COMPLEX; + else if (strcmp("_Decimal128", text) == 0) result = TK_KEYWORD__DECIMAL32; + else if (strcmp("_Decimal64", text) == 0) result = TK_KEYWORD__DECIMAL64; + else if (strcmp("_Decimal128", text) == 0) result = TK_KEYWORD__DECIMAL128; + else if (strcmp("_Generic", text) == 0) result = TK_KEYWORD__GENERIC; + else if (strcmp("_Imaginary", text) == 0) result = TK_KEYWORD__IMAGINARY; + else if (strcmp("_Noreturn", text) == 0) result = TK_KEYWORD__NORETURN; /*_Noreturn deprecated C23*/ + else if (strcmp("_Static_assert", text) == 0) result = TK_KEYWORD__STATIC_ASSERT; + else if (strcmp("_Thread_local", text) == 0) result = TK_KEYWORD__THREAD_LOCAL; + else if (strcmp("_BitInt", text) == 0) result = TK_KEYWORD__BITINT; /*(C23)*/ + + else if (strcmp("__typeof__", text) == 0) result = TK_KEYWORD_TYPEOF; /*C23*/ - break; - default: - break; - } - return result; + break; + default: + break; + } + return result; } static void token_promote(struct token* token) { - if (token->type == TK_IDENTIFIER_RECURSIVE_MACRO) - { - //talvez desse para remover antesisso.. - //assim que sai do tetris - //virou passado - token->type = TK_IDENTIFIER; /*nao precisamos mais disso*/ - } + if (token->type == TK_IDENTIFIER_RECURSIVE_MACRO) + { + //talvez desse para remover antesisso.. + //assim que sai do tetris + //virou passado + token->type = TK_IDENTIFIER; /*nao precisamos mais disso*/ + } - if (token->type == TK_IDENTIFIER) - { - enum token_type t = is_keyword(token->lexeme); - if (t != TK_NONE) - token->type = t; - } - else if (token->type == TK_PPNUMBER) - { - token->type = parse_number(token->lexeme, NULL); - } + if (token->type == TK_IDENTIFIER) + { + enum token_type t = is_keyword(token->lexeme); + if (t != TK_NONE) + token->type = t; + } + else if (token->type == TK_PPNUMBER) + { + token->type = parse_number(token->lexeme, NULL); + } } struct token* parser_look_ahead(struct parser_ctx* ctx) { - struct token* p = ctx->current->next; - while (p && !(p->flags & TK_FLAG_FINAL)) - { - p = p->next; - } + struct token* p = ctx->current->next; + while (p && !(p->flags & TK_FLAG_FINAL)) + { + p = p->next; + } - if (p) - { + if (p) + { - token_promote(p); - } + token_promote(p); + } - return p; + return p; } bool is_binary_digit(struct stream* stream) { - return stream->current[0] >= '0' && stream->current[0] <= '1'; + return stream->current[0] >= '0' && stream->current[0] <= '1'; } bool is_hexadecimal_digit(struct stream* stream) { - return (stream->current[0] >= '0' && stream->current[0] <= '9') || - (stream->current[0] >= 'a' && stream->current[0] <= 'f') || - (stream->current[0] >= 'A' && stream->current[0] <= 'F'); + return (stream->current[0] >= '0' && stream->current[0] <= '9') || + (stream->current[0] >= 'a' && stream->current[0] <= 'f') || + (stream->current[0] >= 'A' && stream->current[0] <= 'F'); } bool is_octal_digit(struct stream* stream) { - return stream->current[0] >= '0' && stream->current[0] <= '7'; + return stream->current[0] >= '0' && stream->current[0] <= '7'; } void digit_sequence(struct stream* stream) { - while (is_digit(stream)) - { - stream_match(stream); - } + while (is_digit(stream)) + { + stream_match(stream); + } } static void binary_exponent_part(struct stream* stream) { - //p signopt digit - sequence - //P signopt digit - sequence + //p signopt digit - sequence + //P signopt digit - sequence - stream_match(stream); //p or P - if (stream->current[0] == '+' || stream->current[0] == '-') - { - stream_match(stream); //p or P - } - digit_sequence(stream); + stream_match(stream); //p or P + if (stream->current[0] == '+' || stream->current[0] == '-') + { + stream_match(stream); //p or P + } + digit_sequence(stream); } void hexadecimal_digit_sequence(struct stream* stream) { - /* - hexadecimal-digit-sequence: - hexadecimal-digit - hexadecimal-digit ’opt hexadecimal-digit - */ + /* + hexadecimal-digit-sequence: + hexadecimal-digit + hexadecimal-digit ’opt hexadecimal-digit + */ - stream_match(stream); - while (stream->current[0] == '\'' || - is_hexadecimal_digit(stream)) - { - if (stream->current[0] == '\'') - { - stream_match(stream); - if (!is_hexadecimal_digit(stream)) - { - //erro - } - stream_match(stream); - } - else - stream_match(stream); - } + stream_match(stream); + while (stream->current[0] == '\'' || + is_hexadecimal_digit(stream)) + { + if (stream->current[0] == '\'') + { + stream_match(stream); + if (!is_hexadecimal_digit(stream)) + { + //erro + } + stream_match(stream); + } + else + stream_match(stream); + } } bool first_of_unsigned_suffix(struct stream* stream) { - /* - unsigned-suffix: one of - u U - */ - return (stream->current[0] == 'u' || - stream->current[0] == 'U'); + /* + unsigned-suffix: one of + u U + */ + return (stream->current[0] == 'u' || + stream->current[0] == 'U'); } void unsigned_suffix_opt(struct stream* stream) { - /* + /* unsigned-suffix: one of - u U + u U */ - if (stream->current[0] == 'u' || - stream->current[0] == 'U') - { - stream_match(stream); - } + if (stream->current[0] == 'u' || + stream->current[0] == 'U') + { + stream_match(stream); + } } void integer_suffix_opt(struct stream* stream, enum type_specifier_flags* flags_opt) { - /* - integer-suffix: - unsigned-suffix long-suffixopt - unsigned-suffix long-long-suffix - long-suffix unsigned-suffixopt - long-long-suffix unsigned-suffixopt - */ - - if (/*unsigned-suffix*/ - stream->current[0] == 'U' || stream->current[0] == 'u') - { - stream_match(stream); + /* + integer-suffix: + unsigned-suffix long-suffixopt + unsigned-suffix long-long-suffix + long-suffix unsigned-suffixopt + long-long-suffix unsigned-suffixopt + */ - if (flags_opt) - { - *flags_opt |= TYPE_SPECIFIER_UNSIGNED; - } + if (/*unsigned-suffix*/ + stream->current[0] == 'U' || stream->current[0] == 'u') + { + stream_match(stream); - /*long-suffixopt*/ - if (stream->current[0] == 'l' || stream->current[0] == 'L') - { - if (flags_opt) - { - *flags_opt = *flags_opt & ~TYPE_SPECIFIER_INT; - *flags_opt |= TYPE_SPECIFIER_LONG; - } - stream_match(stream); - } + if (flags_opt) + { + *flags_opt |= TYPE_SPECIFIER_UNSIGNED; + } - /*long-long-suffix*/ - if (stream->current[0] == 'l' || stream->current[0] == 'L') - { - if (flags_opt) - { - *flags_opt = *flags_opt & ~TYPE_SPECIFIER_LONG; - *flags_opt |= TYPE_SPECIFIER_LONG_LONG; - } + /*long-suffixopt*/ + if (stream->current[0] == 'l' || stream->current[0] == 'L') + { + if (flags_opt) + { + *flags_opt = *flags_opt & ~TYPE_SPECIFIER_INT; + *flags_opt |= TYPE_SPECIFIER_LONG; + } + stream_match(stream); + } - stream_match(stream); - } - } - else if ((stream->current[0] == 'l' || stream->current[0] == 'L')) - { - if (flags_opt) - { - *flags_opt = *flags_opt & ~TYPE_SPECIFIER_INT; - *flags_opt |= TYPE_SPECIFIER_LONG; - } + /*long-long-suffix*/ + if (stream->current[0] == 'l' || stream->current[0] == 'L') + { + if (flags_opt) + { + *flags_opt = *flags_opt & ~TYPE_SPECIFIER_LONG; + *flags_opt |= TYPE_SPECIFIER_LONG_LONG; + } - /*long-suffix*/ - stream_match(stream); + stream_match(stream); + } + } + else if ((stream->current[0] == 'l' || stream->current[0] == 'L')) + { + if (flags_opt) + { + *flags_opt = *flags_opt & ~TYPE_SPECIFIER_INT; + *flags_opt |= TYPE_SPECIFIER_LONG; + } - /*long-long-suffix*/ - if ((stream->current[0] == 'l' || stream->current[0] == 'L')) - { - if (flags_opt) - { - *flags_opt = *flags_opt & ~TYPE_SPECIFIER_LONG; - *flags_opt |= TYPE_SPECIFIER_LONG_LONG; - } - stream_match(stream); - } + /*long-suffix*/ + stream_match(stream); - if (/*unsigned-suffix*/ - stream->current[0] == 'U' || stream->current[0] == 'u') - { - if (flags_opt) - { - *flags_opt |= TYPE_SPECIFIER_UNSIGNED; - } - stream_match(stream); - } - } + /*long-long-suffix*/ + if ((stream->current[0] == 'l' || stream->current[0] == 'L')) + { + if (flags_opt) + { + *flags_opt = *flags_opt & ~TYPE_SPECIFIER_LONG; + *flags_opt |= TYPE_SPECIFIER_LONG_LONG; + } + stream_match(stream); + } + + if (/*unsigned-suffix*/ + stream->current[0] == 'U' || stream->current[0] == 'u') + { + if (flags_opt) + { + *flags_opt |= TYPE_SPECIFIER_UNSIGNED; + } + stream_match(stream); + } + } } void exponent_part_opt(struct stream* stream) { - /* - exponent-part: - e signopt digit-sequence - E signopt digit-sequence - */ - if (stream->current[0] == 'e' || stream->current[0] == 'E') - { - stream_match(stream); + /* + exponent-part: + e signopt digit-sequence + E signopt digit-sequence + */ + if (stream->current[0] == 'e' || stream->current[0] == 'E') + { + stream_match(stream); - if (stream->current[0] == '-' || stream->current[0] == '+') - { - stream_match(stream); - } - digit_sequence(stream); - } + if (stream->current[0] == '-' || stream->current[0] == '+') + { + stream_match(stream); + } + digit_sequence(stream); + } } enum type_specifier_flags floating_suffix_opt(struct stream* stream) { - enum type_specifier_flags f = TYPE_SPECIFIER_DOUBLE; + enum type_specifier_flags f = TYPE_SPECIFIER_DOUBLE; - if (stream->current[0] == 'l' || stream->current[0] == 'L') - { - f = TYPE_SPECIFIER_LONG | TYPE_SPECIFIER_DOUBLE; - stream_match(stream); - } - else if (stream->current[0] == 'f' || stream->current[0] == 'F') - { - f = TYPE_SPECIFIER_FLOAT; - stream_match(stream); - } + if (stream->current[0] == 'l' || stream->current[0] == 'L') + { + f = TYPE_SPECIFIER_LONG | TYPE_SPECIFIER_DOUBLE; + stream_match(stream); + } + else if (stream->current[0] == 'f' || stream->current[0] == 'F') + { + f = TYPE_SPECIFIER_FLOAT; + stream_match(stream); + } - return f; + return f; } bool is_nonzero_digit(struct stream* stream) { - return stream->current[0] >= '1' && stream->current[0] <= '9'; + return stream->current[0] >= '1' && stream->current[0] <= '9'; } enum token_type parse_number_core(struct stream* stream, enum type_specifier_flags* flags_opt) { - if (flags_opt) - { - *flags_opt = TYPE_SPECIFIER_INT; - } + if (flags_opt) + { + *flags_opt = TYPE_SPECIFIER_INT; + } - enum token_type type = TK_NONE; - if (stream->current[0] == '.') - { - type = TK_COMPILER_DECIMAL_FLOATING_CONSTANT; - stream_match(stream); - digit_sequence(stream); - exponent_part_opt(stream); - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - else if (stream->current[0] == '0' && (stream->current[1] == 'x' || stream->current[1] == 'X')) - { - type = TK_COMPILER_HEXADECIMAL_CONSTANT; + enum token_type type = TK_NONE; + if (stream->current[0] == '.') + { + type = TK_COMPILER_DECIMAL_FLOATING_CONSTANT; + stream_match(stream); + digit_sequence(stream); + exponent_part_opt(stream); + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + else if (stream->current[0] == '0' && (stream->current[1] == 'x' || stream->current[1] == 'X')) + { + type = TK_COMPILER_HEXADECIMAL_CONSTANT; - stream_match(stream); - stream_match(stream); - while (is_hexadecimal_digit(stream)) - { - stream_match(stream); - } + stream_match(stream); + stream_match(stream); + while (is_hexadecimal_digit(stream)) + { + stream_match(stream); + } - integer_suffix_opt(stream, flags_opt); + integer_suffix_opt(stream, flags_opt); - if (stream->current[0] == '.') - { - type = TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT; - hexadecimal_digit_sequence(stream); - } + if (stream->current[0] == '.') + { + type = TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT; + hexadecimal_digit_sequence(stream); + } - if (stream->current[0] == 'p' || - stream->current[0] == 'P') - { - type = TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT; - binary_exponent_part(stream); - } + if (stream->current[0] == 'p' || + stream->current[0] == 'P') + { + type = TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT; + binary_exponent_part(stream); + } - if (type == TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT) - { - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - } - else if (stream->current[0] == '0' && (stream->current[1] == 'b' || stream->current[1] == 'B')) - { - type = TK_COMPILER_BINARY_CONSTANT; - stream_match(stream); - stream_match(stream); - while (is_binary_digit(stream)) - { - stream_match(stream); - } - integer_suffix_opt(stream, flags_opt); - } - else if (stream->current[0] == '0') //octal - { - type = TK_COMPILER_OCTAL_CONSTANT; + if (type == TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT) + { + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + } + else if (stream->current[0] == '0' && (stream->current[1] == 'b' || stream->current[1] == 'B')) + { + type = TK_COMPILER_BINARY_CONSTANT; + stream_match(stream); + stream_match(stream); + while (is_binary_digit(stream)) + { + stream_match(stream); + } + integer_suffix_opt(stream, flags_opt); + } + else if (stream->current[0] == '0') //octal + { + type = TK_COMPILER_OCTAL_CONSTANT; - stream_match(stream); - while (is_octal_digit(stream)) - { - stream_match(stream); - } - integer_suffix_opt(stream, flags_opt); + stream_match(stream); + while (is_octal_digit(stream)) + { + stream_match(stream); + } + integer_suffix_opt(stream, flags_opt); - if (stream->current[0] == '.') - { - hexadecimal_digit_sequence(stream); - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - } - else if (is_nonzero_digit(stream)) //decimal - { - type = TK_COMPILER_DECIMAL_CONSTANT; + if (stream->current[0] == '.') + { + hexadecimal_digit_sequence(stream); + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + } + else if (is_nonzero_digit(stream)) //decimal + { + type = TK_COMPILER_DECIMAL_CONSTANT; - stream_match(stream); - while (is_digit(stream)) - { - stream_match(stream); - } - integer_suffix_opt(stream, flags_opt); + stream_match(stream); + while (is_digit(stream)) + { + stream_match(stream); + } + integer_suffix_opt(stream, flags_opt); - if (stream->current[0] == 'e' || stream->current[0] == 'E') - { - exponent_part_opt(stream); - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - else if (stream->current[0] == '.') - { - stream_match(stream); - type = TK_COMPILER_DECIMAL_FLOATING_CONSTANT; - digit_sequence(stream); - exponent_part_opt(stream); - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - } + if (stream->current[0] == 'e' || stream->current[0] == 'E') + { + exponent_part_opt(stream); + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + else if (stream->current[0] == '.') + { + stream_match(stream); + type = TK_COMPILER_DECIMAL_FLOATING_CONSTANT; + digit_sequence(stream); + exponent_part_opt(stream); + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + } - return type; + return type; } enum token_type parse_number(const char* lexeme, enum type_specifier_flags* flags_opt) { - struct stream stream = { .source = lexeme, .current = lexeme, .line = 1, .col = 1 }; - return parse_number_core(&stream, flags_opt); + struct stream stream = {.source = lexeme, .current = lexeme, .line = 1, .col = 1}; + return parse_number_core(&stream, flags_opt); } static void pragma_skip_blanks(struct parser_ctx* ctx) { - while (ctx->current && ctx->current->type == TK_BLANKS) - { - ctx->current = ctx->current->next; - } + while (ctx->current && ctx->current->type == TK_BLANKS) + { + ctx->current = ctx->current->next; + } } /* @@ -23094,627 +23352,653 @@ static void pragma_skip_blanks(struct parser_ctx* ctx) */ static void parse_pragma(struct parser_ctx* ctx, struct token* token) { - if (ctx->current->type == TK_PRAGMA) - { - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); + if (ctx->current->type == TK_PRAGMA) + { + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); - if (ctx->current && strcmp(ctx->current->lexeme, "CAKE") == 0) - { - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - } + if (ctx->current && + (strcmp(ctx->current->lexeme, "CAKE") == 0 || + strcmp(ctx->current->lexeme, "cake") == 0) + ) + { + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + } - if (ctx->current && strcmp(ctx->current->lexeme, "nullchecks") == 0) - { - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); + if (ctx->current && strcmp(ctx->current->lexeme, "nullchecks") == 0) + { + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); - //Isso nao esta funcionando pois esta informao precisa estar na AST. - //pois eh usada em um segundo passo. - bool onoff = false; - if (ctx->current && strcmp(ctx->current->lexeme, "ON") == 0) - { - onoff = true; - } - else if (ctx->current && strcmp(ctx->current->lexeme, "OFF") == 0) - { - onoff = false; - } - else - { - compiler_set_error_with_token(C_PRAGMA_ERROR, ctx, ctx->current, "nullchecks pragma needs to use ON OFF"); - } - ctx->options.null_checks = onoff; - } + //Isso nao esta funcionando pois esta informao precisa estar na AST. + //pois eh usada em um segundo passo. + bool onoff = false; + if (ctx->current && strcmp(ctx->current->lexeme, "ON") == 0) + { + onoff = true; + } + else if (ctx->current && strcmp(ctx->current->lexeme, "OFF") == 0) + { + onoff = false; + } + else + { + compiler_diagnostic_message(ERROR_PRAGMA_ERROR, ctx, ctx->current, "nullchecks pragma needs to use ON OFF"); + } + ctx->options.null_checks = onoff; + } - if (ctx->current && strcmp(ctx->current->lexeme, "diagnostic") == 0) - { - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); + if (ctx->current && strcmp(ctx->current->lexeme, "diagnostic") == 0) + { + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); - if (ctx->current && strcmp(ctx->current->lexeme, "push") == 0) - { - //#pragma GCC diagnostic push - if (ctx->options.enabled_warnings_stack_top_index < - sizeof(ctx->options.enabled_warnings_stack) / sizeof(ctx->options.enabled_warnings_stack[0])) - { - ctx->options.enabled_warnings_stack_top_index++; - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index - 1]; - } - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - } - else if (ctx->current && strcmp(ctx->current->lexeme, "pop") == 0) - { - //#pragma CAKE diagnostic pop - if (ctx->options.enabled_warnings_stack_top_index > 0) - { - ctx->options.enabled_warnings_stack_top_index--; - } - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - } - else if (ctx->current && strcmp(ctx->current->lexeme, "warning") == 0) - { - //#pragma CAKE diagnostic warning "-Wenum-compare" + if (ctx->current && strcmp(ctx->current->lexeme, "push") == 0) + { + //#pragma GCC diagnostic push + if (ctx->options.diagnostic_stack_top_index < + sizeof(ctx->options.diagnostic_stack) / sizeof(ctx->options.diagnostic_stack[0])) + { + ctx->options.diagnostic_stack_top_index++; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index] = + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index - 1]; + } + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + } + else if (ctx->current && strcmp(ctx->current->lexeme, "pop") == 0) + { + //#pragma CAKE diagnostic pop + if (ctx->options.diagnostic_stack_top_index > 0) + { + ctx->options.diagnostic_stack_top_index--; + } + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + } + else if (ctx->current && + (strcmp(ctx->current->lexeme, "error") == 0 || + strcmp(ctx->current->lexeme, "warning") == 0 || + strcmp(ctx->current->lexeme, "note") == 0 || + strcmp(ctx->current->lexeme, "ignored") == 0) + ) + { + const bool is_error = strcmp(ctx->current->lexeme, "error") == 0; + const bool is_warning = strcmp(ctx->current->lexeme, "warning") == 0; + const bool is_note = strcmp(ctx->current->lexeme, "note") == 0; - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - if (ctx->current && ctx->current->type == TK_STRING_LITERAL) - { - enum warning w = get_warning_flag(ctx->current->lexeme + 1 + 2); - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] |= w; - } - } - else if (ctx->current && strcmp(ctx->current->lexeme, "ignore") == 0) - { - //#pragma CAKE diagnostic ignore "-Wenum-compare" + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); + if (ctx->current && ctx->current->type == TK_STRING_LITERAL) + { - if (ctx->current && ctx->current->type == TK_STRING_LITERAL) - { - enum warning w = get_warning_flag(ctx->current->lexeme + 1 + 2); - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] &= ~w; - } - } - } - } -} + unsigned long long w = get_warning_bit_mask(ctx->current->lexeme + 1 + 2); + + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors &= ~w; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes &= ~w; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings &= ~w; + if (is_error) + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors |= w; + else if (is_warning) + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings |= w; + else if (is_note) + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes |= w; + } + } + else if (ctx->current && + (strcmp(ctx->current->lexeme, "check") == 0) + ) + { + //TODO better name . Ack. : means ‘alarm acknowledged’ ? + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + + if (ctx->current && ctx->current->type == TK_STRING_LITERAL) + { + enum diagnostic_id id = get_warning(ctx->current->lexeme + 1 + 2); + if (ctx->p_report->last_diagnostic_id == id) + { + //lets remove this error/warning/info from the final report. + + int t = + get_diagnostic_type(&ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index], + id); + if (t == 3) + ctx->p_report->error_count--; + else if (t == 2) + ctx->p_report->warnings_count--; + else if (t == 1) + ctx->p_report->info_count--; + + + } + else + { + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "pragma check failed"); + + } + } + } + + } + } +} static struct token* parser_skip_blanks(struct parser_ctx* ctx) { - while (ctx->current && !(ctx->current->flags & TK_FLAG_FINAL)) - { + while (ctx->current && !(ctx->current->flags & TK_FLAG_FINAL)) + { - if (ctx->current->type == TK_PRAGMA) - { - /*only active block have TK_PRAGMA*/ - parse_pragma(ctx, ctx->current); - } + if (ctx->current->type == TK_PRAGMA) + { + /*only active block have TK_PRAGMA*/ + parse_pragma(ctx, ctx->current); + } - if (ctx->current) - ctx->current = ctx->current->next; - } + if (ctx->current) + ctx->current = ctx->current->next; + } - if (ctx->current) - { - token_promote(ctx->current); //transforma para token de parser - } + if (ctx->current) + { + token_promote(ctx->current); //transforma para token de parser + } - return ctx->current; + return ctx->current; } struct token* parser_match(struct parser_ctx* ctx) { - ctx->previous = ctx->current; - ctx->current = ctx->current->next; - parser_skip_blanks(ctx); + ctx->previous = ctx->current; + ctx->current = ctx->current->next; + parser_skip_blanks(ctx); - return ctx->current; + return ctx->current; } int parser_match_tk(struct parser_ctx* ctx, enum token_type type) { - int error = 0; - if (ctx->current != NULL) - { - if (ctx->current->type != type) - { - compiler_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, ctx->current, "expected %s", get_token_name(type)); - error = 1; - } + int error = 0; + if (ctx->current != NULL) + { + if (ctx->current->type != type) + { + compiler_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, ctx->current, "expected %s", get_token_name(type)); + error = 1; + } - ctx->previous = ctx->current; - ctx->current = ctx->current->next; - parser_skip_blanks(ctx); - } - else - { - compiler_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, ctx->input_list.tail, "unexpected end of file after"); - error = 1; - } + ctx->previous = ctx->current; + ctx->current = ctx->current->next; + parser_skip_blanks(ctx); + } + else + { + compiler_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, ctx->input_list.tail, "unexpected end of file after"); + error = 1; + } - return error; + return error; } void print_declaration_specifiers(struct osstream* ss, struct declaration_specifiers* p_declaration_specifiers) { - bool first = true; - print_type_qualifier_flags(ss, &first, p_declaration_specifiers->type_qualifier_flags); + bool first = true; + print_type_qualifier_flags(ss, &first, p_declaration_specifiers->type_qualifier_flags); - if (p_declaration_specifiers->enum_specifier) - { + if (p_declaration_specifiers->enum_specifier) + { - if (p_declaration_specifiers->enum_specifier->tag_token) - { - ss_fprintf(ss, "enum %s", p_declaration_specifiers->enum_specifier->tag_token->lexeme); - } - else - { - assert(false); - } - } - else if (p_declaration_specifiers->struct_or_union_specifier) - { - ss_fprintf(ss, "struct %s", p_declaration_specifiers->struct_or_union_specifier->tag_name); - } - else if (p_declaration_specifiers->typedef_declarator) - { - print_item(ss, &first, p_declaration_specifiers->typedef_declarator->name->lexeme); - } - else - { - print_type_specifier_flags(ss, &first, p_declaration_specifiers->type_specifier_flags); - } + if (p_declaration_specifiers->enum_specifier->tag_token) + { + ss_fprintf(ss, "enum %s", p_declaration_specifiers->enum_specifier->tag_token->lexeme); + } + else + { + assert(false); + } + } + else if (p_declaration_specifiers->struct_or_union_specifier) + { + ss_fprintf(ss, "struct %s", p_declaration_specifiers->struct_or_union_specifier->tag_name); + } + else if (p_declaration_specifiers->typedef_declarator) + { + print_item(ss, &first, p_declaration_specifiers->typedef_declarator->name->lexeme); + } + else + { + print_type_specifier_flags(ss, &first, p_declaration_specifiers->type_specifier_flags); + } } bool type_specifier_is_integer(enum type_specifier_flags flags) { - if ((flags & TYPE_SPECIFIER_CHAR) || - (flags & TYPE_SPECIFIER_SHORT) || - (flags & TYPE_SPECIFIER_INT) || - (flags & TYPE_SPECIFIER_LONG) || - (flags & TYPE_SPECIFIER_INT) || - (flags & TYPE_SPECIFIER_INT8) || - (flags & TYPE_SPECIFIER_INT16) || - (flags & TYPE_SPECIFIER_INT32) || - (flags & TYPE_SPECIFIER_INT64) || - (flags & TYPE_SPECIFIER_LONG_LONG)) - { - return true; - } - return false; + if ((flags & TYPE_SPECIFIER_CHAR) || + (flags & TYPE_SPECIFIER_SHORT) || + (flags & TYPE_SPECIFIER_INT) || + (flags & TYPE_SPECIFIER_LONG) || + (flags & TYPE_SPECIFIER_INT) || + (flags & TYPE_SPECIFIER_INT8) || + (flags & TYPE_SPECIFIER_INT16) || + (flags & TYPE_SPECIFIER_INT32) || + (flags & TYPE_SPECIFIER_INT64) || + (flags & TYPE_SPECIFIER_LONG_LONG)) + { + return true; + } + return false; } int final_specifier(struct parser_ctx* ctx, enum type_specifier_flags* flags) { - if (((*flags) & TYPE_SPECIFIER_UNSIGNED) || - ((*flags) & TYPE_SPECIFIER_SIGNED)) - { - if (!type_specifier_is_integer(*flags)) - { - //se nao especificou nada vira integer - (*flags) |= TYPE_SPECIFIER_INT; - } - } + if (((*flags) & TYPE_SPECIFIER_UNSIGNED) || + ((*flags) & TYPE_SPECIFIER_SIGNED)) + { + if (!type_specifier_is_integer(*flags)) + { + //se nao especificou nada vira integer + (*flags) |= TYPE_SPECIFIER_INT; + } + } - return 0; + return 0; } int add_specifier(struct parser_ctx* ctx, - enum type_specifier_flags* flags, - enum type_specifier_flags new_flag + enum type_specifier_flags* flags, + enum type_specifier_flags new_flag ) { - /* - * Verifica as combinaçòes possíveis - */ + /* + * Verifica as combinaçòes possíveis + */ - if (new_flag & TYPE_SPECIFIER_LONG) //adicionando um long - { - if ((*flags) & TYPE_SPECIFIER_LONG_LONG) //ja tinha long long - { - compiler_set_error_with_token(C_CANNOT_COMBINE_WITH_PREVIOUS_LONG_LONG, ctx, ctx->current, "cannot combine with previous 'long long' declaration specifier"); - return 1; - } - else if ((*flags) & TYPE_SPECIFIER_LONG) //ja tinha um long - { - (*flags) = (*flags) & ~TYPE_SPECIFIER_LONG; - (*flags) |= TYPE_SPECIFIER_LONG_LONG; - } - else //nao tinha nenhum long - { - (*flags) = (*flags) & ~TYPE_SPECIFIER_INT; - (*flags) |= TYPE_SPECIFIER_LONG; - } - } - else - { - (*flags) |= new_flag; - } - return 0; + if (new_flag & TYPE_SPECIFIER_LONG) //adicionando um long + { + if ((*flags) & TYPE_SPECIFIER_LONG_LONG) //ja tinha long long + { + compiler_diagnostic_message(ERROR_CANNOT_COMBINE_WITH_PREVIOUS_LONG_LONG, ctx, ctx->current, "cannot combine with previous 'long long' declaration specifier"); + return 1; + } + else if ((*flags) & TYPE_SPECIFIER_LONG) //ja tinha um long + { + (*flags) = (*flags) & ~TYPE_SPECIFIER_LONG; + (*flags) |= TYPE_SPECIFIER_LONG_LONG; + } + else //nao tinha nenhum long + { + (*flags) = (*flags) & ~TYPE_SPECIFIER_INT; + (*flags) |= TYPE_SPECIFIER_LONG; + } + } + else + { + (*flags) |= new_flag; + } + return 0; } -void declaration_specifiers_delete(struct declaration_specifiers* owner p) +void declaration_specifiers_delete(struct declaration_specifiers* owner opt p) { - if (p) - { - struct declaration_specifier* owner item = p->head; - while (item) - { - struct declaration_specifier* owner next = item->next; - item->next = NULL; - declaration_specifier_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct declaration_specifier* owner item = p->head; + while (item) + { + struct declaration_specifier* owner next = item->next; + item->next = NULL; + declaration_specifier_delete(item); + item = next; + } + free(p); + } } struct declaration_specifiers* owner declaration_specifiers(struct parser_ctx* ctx, - enum storage_class_specifier_flags default_storage_flag) + enum storage_class_specifier_flags default_storage_flag) { - /* - declaration-specifiers: - declaration-specifier attribute-specifier-sequence_opt - declaration-specifier declaration-specifiers - */ + /* + declaration-specifiers: + declaration-specifier attribute-specifier-sequence_opt + declaration-specifier declaration-specifiers + */ - /* - Ao fazer parser do segundo o X ja existe mas ele nao deve ser usado - typedef char X; - typedef char X; - */ + /* + Ao fazer parser do segundo o X ja existe mas ele nao deve ser usado + typedef char X; + typedef char X; + */ - struct declaration_specifiers* owner p_declaration_specifiers = calloc(1, sizeof(struct declaration_specifiers)); + struct declaration_specifiers* owner p_declaration_specifiers = calloc(1, sizeof(struct declaration_specifiers)); - try - { - if (p_declaration_specifiers == NULL) - throw; + try + { + if (p_declaration_specifiers == NULL) + throw; - static_set(p_declaration_specifiers, "not-null"); - p_declaration_specifiers->first_token = ctx->current; + static_set(p_declaration_specifiers, "not-null"); + p_declaration_specifiers->first_token = ctx->current; - while (first_of_declaration_specifier(ctx)) - { - if (ctx->current->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) - { - if (p_declaration_specifiers->type_specifier_flags != TYPE_SPECIFIER_NONE) - { - //typedef tem que aparecer sozinho - //exemplo Socket eh nome e nao typdef - //typedef int Socket; - //struct X {int Socket;}; - break; - } - } + while (first_of_declaration_specifier(ctx)) + { + if (ctx->current->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) + { + if (p_declaration_specifiers->type_specifier_flags != TYPE_SPECIFIER_NONE) + { + //typedef tem que aparecer sozinho + //exemplo Socket eh nome e nao typdef + //typedef int Socket; + //struct X {int Socket;}; + break; + } + } - struct declaration_specifier* owner p_declaration_specifier = declaration_specifier(ctx); + struct declaration_specifier* owner p_declaration_specifier = declaration_specifier(ctx); - if (p_declaration_specifier->type_specifier_qualifier) - { - if (p_declaration_specifier->type_specifier_qualifier) - { - if (p_declaration_specifier->type_specifier_qualifier->type_specifier) - { + if (p_declaration_specifier->type_specifier_qualifier) + { + if (p_declaration_specifier->type_specifier_qualifier) + { + if (p_declaration_specifier->type_specifier_qualifier->type_specifier) + { - if (add_specifier(ctx, - &p_declaration_specifiers->type_specifier_flags, - p_declaration_specifier->type_specifier_qualifier->type_specifier->flags) != 0) - { - declaration_specifier_delete(p_declaration_specifier); - throw; - } + if (add_specifier(ctx, + &p_declaration_specifiers->type_specifier_flags, + p_declaration_specifier->type_specifier_qualifier->type_specifier->flags) != 0) + { + declaration_specifier_delete(p_declaration_specifier); + throw; + } - if (p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier) - { - p_declaration_specifiers->struct_or_union_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier; - } - else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->enum_specifier) - { - p_declaration_specifiers->enum_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->enum_specifier; - } - else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->typeof_specifier) - { - p_declaration_specifiers->typeof_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->typeof_specifier; - } - else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->token && - p_declaration_specifier->type_specifier_qualifier->type_specifier->token->type == TK_IDENTIFIER) - { - p_declaration_specifiers->typedef_declarator = - find_declarator(ctx, - p_declaration_specifier->type_specifier_qualifier->type_specifier->token->lexeme, - NULL); + if (p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier) + { + p_declaration_specifiers->struct_or_union_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier; + } + else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->enum_specifier) + { + p_declaration_specifiers->enum_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->enum_specifier; + } + else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->typeof_specifier) + { + p_declaration_specifiers->typeof_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->typeof_specifier; + } + else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->token && + p_declaration_specifier->type_specifier_qualifier->type_specifier->token->type == TK_IDENTIFIER) + { + p_declaration_specifiers->typedef_declarator = + find_declarator(ctx, + p_declaration_specifier->type_specifier_qualifier->type_specifier->token->lexeme, + NULL); - //p_declaration_specifiers->typedef_declarator = p_declaration_specifier->type_specifier_qualifier->pType_specifier->token->lexeme; - } - } - else if (p_declaration_specifier->type_specifier_qualifier->type_qualifier) - { - p_declaration_specifiers->type_qualifier_flags |= p_declaration_specifier->type_specifier_qualifier->type_qualifier->flags; + //p_declaration_specifiers->typedef_declarator = p_declaration_specifier->type_specifier_qualifier->pType_specifier->token->lexeme; + } + } + else if (p_declaration_specifier->type_specifier_qualifier->type_qualifier) + { + p_declaration_specifiers->type_qualifier_flags |= p_declaration_specifier->type_specifier_qualifier->type_qualifier->flags; - } - } - } - else if (p_declaration_specifier->storage_class_specifier) - { - p_declaration_specifiers->storage_class_specifier_flags |= p_declaration_specifier->storage_class_specifier->flags; - } + } + } + } + else if (p_declaration_specifier->storage_class_specifier) + { + p_declaration_specifiers->storage_class_specifier_flags |= p_declaration_specifier->storage_class_specifier->flags; + } - LIST_ADD(p_declaration_specifiers, p_declaration_specifier); - //attribute_specifier_sequence_opt(ctx); + LIST_ADD(p_declaration_specifiers, p_declaration_specifier); + //attribute_specifier_sequence_opt(ctx); - if (ctx->current->type == TK_IDENTIFIER && - p_declaration_specifiers->type_specifier_flags != TYPE_SPECIFIER_NONE) - { - //typedef nao pode aparecer com outro especifier - //entao ja tem tem algo e vier identifier signfica que acabou - //exemplo - /* - typedef char X; - typedef char X; - */ - break; - } - } - p_declaration_specifiers->last_token = previous_parser_token(ctx->current); - } - catch - { - } + if (ctx->current->type == TK_IDENTIFIER && + p_declaration_specifiers->type_specifier_flags != TYPE_SPECIFIER_NONE) + { + //typedef nao pode aparecer com outro especifier + //entao ja tem tem algo e vier identifier signfica que acabou + //exemplo + /* + typedef char X; + typedef char X; + */ + break; + } + } + p_declaration_specifiers->last_token = previous_parser_token(ctx->current); + } + catch + { + } - if (p_declaration_specifiers) - { - //int main() { static int i; } // i is not automatic - final_specifier(ctx, &p_declaration_specifiers->type_specifier_flags); - } + if (p_declaration_specifiers) + { + //int main() { static int i; } // i is not automatic + final_specifier(ctx, &p_declaration_specifiers->type_specifier_flags); + } - p_declaration_specifiers->storage_class_specifier_flags |= default_storage_flag; + p_declaration_specifiers->storage_class_specifier_flags |= default_storage_flag; - if (p_declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_STATIC) - { - // - p_declaration_specifiers->storage_class_specifier_flags &= ~STORAGE_SPECIFIER_AUTOMATIC_STORAGE; - } + if (p_declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_STATIC) + { + // + p_declaration_specifiers->storage_class_specifier_flags &= ~STORAGE_SPECIFIER_AUTOMATIC_STORAGE; + } - return p_declaration_specifiers; + return p_declaration_specifiers; } struct declaration* owner declaration_core(struct parser_ctx* ctx, - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt /*SINK*/, - bool can_be_function_definition, - bool* is_function_definition, - bool* flow_analysis, - enum storage_class_specifier_flags default_storage_class_specifier_flags + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt /*SINK*/, + bool can_be_function_definition, + bool* is_function_definition, + enum storage_class_specifier_flags default_storage_class_specifier_flags ) { - /* - declaration-specifiers init-declarator-list_opt ; - attribute-specifier-sequence declaration-specifiers init-declarator-list ; - static_assert-declaration - attribute-declaration + /* + declaration-specifiers init-declarator-list_opt ; + attribute-specifier-sequence declaration-specifiers init-declarator-list ; + static_assert-declaration + attribute-declaration */ - struct declaration* owner p_declaration = calloc(1, sizeof(struct declaration)); + struct declaration* owner p_declaration = calloc(1, sizeof(struct declaration)); - p_declaration->p_attribute_specifier_sequence_opt = p_attribute_specifier_sequence_opt; + p_declaration->p_attribute_specifier_sequence_opt = p_attribute_specifier_sequence_opt; - p_declaration->first_token = ctx->current; + p_declaration->first_token = ctx->current; - if (ctx->current->type == ';') - { - parser_match_tk(ctx, ';'); - //declaracao vazia nao eh erro - return p_declaration; - } - - if (first_of_static_assert_declaration(ctx)) - { - p_declaration->static_assert_declaration = static_assert_declaration(ctx); - } - else - { + if (ctx->current->type == ';') + { + parser_match_tk(ctx, ';'); + //declaracao vazia nao eh erro + return p_declaration; + } - if (first_of_declaration_specifier(ctx)) - { - p_declaration->declaration_specifiers = declaration_specifiers(ctx, default_storage_class_specifier_flags); + if (first_of_static_assert_declaration(ctx)) + { + p_declaration->static_assert_declaration = static_assert_declaration(ctx); + } + else + { - if (p_declaration->p_attribute_specifier_sequence_opt) - { - p_declaration->declaration_specifiers->attributes_flags = - p_declaration->p_attribute_specifier_sequence_opt->attributes_flags; - } + if (first_of_declaration_specifier(ctx)) + { + p_declaration->declaration_specifiers = declaration_specifiers(ctx, default_storage_class_specifier_flags); - if (ctx->current->type != ';') - { - p_declaration->init_declarator_list = init_declarator_list(ctx, - p_declaration->declaration_specifiers); - } + if (p_declaration->p_attribute_specifier_sequence_opt) + { + p_declaration->declaration_specifiers->attributes_flags = + p_declaration->p_attribute_specifier_sequence_opt->attributes_flags; + } + if (ctx->current->type != ';') + { + p_declaration->init_declarator_list = init_declarator_list(ctx, + p_declaration->declaration_specifiers); + } - p_declaration->last_token = ctx->current; - if (ctx->current->type == '{') - { - if (can_be_function_definition) - *is_function_definition = true; - } - else if (ctx->current->type == TK_STRING_LITERAL && - strcmp(ctx->current->lexeme, "\"unchecked\"") == 0) - { - parser_match(ctx); - if (can_be_function_definition) - *is_function_definition = true; - if (flow_analysis) - *flow_analysis = false; + p_declaration->last_token = ctx->current; - } - else - parser_match_tk(ctx, ';'); - } - else - { - if (ctx->current->type == TK_IDENTIFIER) - { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid type '%s'", ctx->current->lexeme); - } - else - { - compiler_set_error_with_token(C_EXPECTED_DECLARATION, ctx, ctx->current, "expected declaration not '%s'", ctx->current->lexeme); - } - parser_match(ctx); //we need to go ahead - } - } + if (ctx->current->type == '{') + { + if (can_be_function_definition) + *is_function_definition = true; + } + else + parser_match_tk(ctx, ';'); + } + else + { + if (ctx->current->type == TK_IDENTIFIER) + { + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid type '%s'", ctx->current->lexeme); + } + else + { + compiler_diagnostic_message(ERROR_EXPECTED_DECLARATION, ctx, ctx->current, "expected declaration not '%s'", ctx->current->lexeme); + } + parser_match(ctx); //we need to go ahead + } + } - return p_declaration; + return p_declaration; } struct declaration* owner function_definition_or_declaration(struct parser_ctx* ctx) { - /* - function-definition: - attribute-specifier-sequence opt declaration-specifiers declarator function-body - */ + /* + function-definition: + attribute-specifier-sequence opt declaration-specifiers declarator function-body + */ - /* - declaration: - declaration-specifiers init-declarator-list opt ; - attribute-specifier-sequence declaration-specifiers init-declarator-list ; - static_assert-declaration - attribute-declaration - */ + /* + declaration: + declaration-specifiers init-declarator-list opt ; + attribute-specifier-sequence declaration-specifiers init-declarator-list ; + static_assert-declaration + attribute-declaration + */ - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - bool is_function_definition = false; - bool flow_analysis = true; - struct declaration* owner p_declaration = declaration_core(ctx, p_attribute_specifier_sequence_opt, true, &is_function_definition, &flow_analysis, STORAGE_SPECIFIER_EXTERN); - if (is_function_definition) - { + bool is_function_definition = false; + + struct declaration* owner p_declaration = declaration_core(ctx, p_attribute_specifier_sequence_opt, true, &is_function_definition, STORAGE_SPECIFIER_EXTERN); + if (is_function_definition) + { - ctx->p_current_function_opt = p_declaration; - //tem que ter 1 so - //tem 1 que ter 1 cara e ser funcao - assert(p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator); + ctx->p_current_function_opt = p_declaration; + //tem que ter 1 so + //tem 1 que ter 1 cara e ser funcao + assert(p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator); - /* - scope of parameters is the inner declarator + /* + scope of parameters is the inner declarator - void (*f(int i))(void) { - i = 1; - return 0; - } - */ + void (*f(int i))(void) { + i = 1; + return 0; + } + */ - struct declarator* inner = p_declaration->init_declarator_list.head->p_declarator; - for (;;) - { - if (inner->direct_declarator && - inner->direct_declarator->function_declarator && - inner->direct_declarator->function_declarator->direct_declarator && - inner->direct_declarator->function_declarator->direct_declarator->declarator) - { - inner = inner->direct_declarator->function_declarator->direct_declarator->declarator; - } - else - break; - } + struct declarator* inner = p_declaration->init_declarator_list.head->p_declarator; + for (;;) + { + if (inner->direct_declarator && + inner->direct_declarator->function_declarator && + inner->direct_declarator->function_declarator->direct_declarator && + inner->direct_declarator->function_declarator->direct_declarator->declarator) + { + inner = inner->direct_declarator->function_declarator->direct_declarator->declarator; + } + else + break; + } - struct scope* parameters_scope = &inner->direct_declarator->function_declarator->parameters_scope; - scope_list_push(&ctx->scopes, parameters_scope); + struct scope* parameters_scope = &inner->direct_declarator->function_declarator->parameters_scope; + scope_list_push(&ctx->scopes, parameters_scope); - check_func_open_brace_style(ctx, ctx->current); + check_func_open_brace_style(ctx, ctx->current); - bool disable_ownership_errors = ctx->options.disable_ownership_errors; - if (!flow_analysis) - { - /*let's disable ownership type error*/ - ctx->options.disable_ownership_errors = true; - } + - assert(p_declaration->function_body == NULL); - p_declaration->function_body = function_body(ctx); + assert(p_declaration->function_body == NULL); + p_declaration->function_body = function_body(ctx); - ctx->options.disable_ownership_errors = disable_ownership_errors; /*restore*/ + - p_declaration->init_declarator_list.head->p_declarator->function_body = p_declaration->function_body; + p_declaration->init_declarator_list.head->p_declarator->function_body = p_declaration->function_body; - if (ctx->options.flow_analysis && flow_analysis) - { - /* - Now we have the full function AST let´s visit to analise - jumps - */ + if (ctx->options.flow_analysis) + { + /* + Now we have the full function AST let´s visit to analise + jumps + */ - struct flow_visit_ctx ctx2 = { 0 }; - ctx2.ctx = ctx; - flow_visit_function(&ctx2, p_declaration); - flow_visit_ctx_destroy(&ctx2); - } + struct flow_visit_ctx ctx2 = { 0 }; + ctx2.ctx = ctx; + flow_visit_function(&ctx2, p_declaration); + flow_visit_ctx_destroy(&ctx2); + } - struct parameter_declaration* parameter = NULL; + struct parameter_declaration* parameter = NULL; - if (p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator && - p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt && - p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt->parameter_list) - { - parameter = p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; - } + if (p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator && + p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt && + p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt->parameter_list) + { + parameter = p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; + } - /*parametros nao usados*/ - while (parameter) - { - if (!type_is_maybe_unused(¶meter->declarator->type) && - parameter->declarator->num_uses == 0) - { - if (parameter->declarator->name && - parameter->declarator->name->level == 0 /*direct source*/ - ) - { - compiler_set_warning_with_token(W_UNUSED_PARAMETER, - ctx, - parameter->declarator->name, - "'%s': unreferenced formal parameter", - parameter->declarator->name->lexeme); - } - } - parameter = parameter->next; - } + /*parametros nao usados*/ + while (parameter) + { + if (!type_is_maybe_unused(¶meter->declarator->type) && + parameter->declarator->num_uses == 0) + { + if (parameter->declarator->name && + parameter->declarator->name->level == 0 /*direct source*/ + ) + { + compiler_diagnostic_message(W_UNUSED_PARAMETER, + ctx, + parameter->declarator->name, + "'%s': unreferenced formal parameter", + parameter->declarator->name->lexeme); + } + } + parameter = parameter->next; + } - scope_list_pop(&ctx->scopes); - ctx->p_current_function_opt = NULL; - } + scope_list_pop(&ctx->scopes); + ctx->p_current_function_opt = NULL; + } - return p_declaration; + return p_declaration; } struct declaration* owner declaration(struct parser_ctx* ctx, - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt, - enum storage_class_specifier_flags storage_specifier_flags + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt, + enum storage_class_specifier_flags storage_specifier_flags ) { - bool is_function_definition = false; - bool flow_analysis = false; - return declaration_core(ctx, p_attribute_specifier_sequence_opt, false, &is_function_definition, &flow_analysis, storage_specifier_flags); + bool is_function_definition = false; + return declaration_core(ctx, p_attribute_specifier_sequence_opt, false, &is_function_definition, storage_specifier_flags); } @@ -23725,1817 +24009,1823 @@ struct declaration* owner declaration(struct parser_ctx* ctx, void declaration_specifier_delete(struct declaration_specifier* owner p) { - if (p) - { - free(p->function_specifier); - type_specifier_qualifier_delete(p->type_specifier_qualifier); - free(p->storage_class_specifier); - assert(p->next == NULL); - free(p); - } + if (p) + { + free(p->function_specifier); + type_specifier_qualifier_delete(p->type_specifier_qualifier); + free(p->storage_class_specifier); + assert(p->next == NULL); + free(p); + } } struct declaration_specifier* owner declaration_specifier(struct parser_ctx* ctx) { - // storage-class-specifier - // type-specifier-qualifier - // function-specifier - struct declaration_specifier* owner p_declaration_specifier = calloc(1, sizeof * p_declaration_specifier); - if (first_of_storage_class_specifier(ctx)) - { - p_declaration_specifier->storage_class_specifier = storage_class_specifier(ctx); - } - else if (first_of_type_specifier_qualifier(ctx)) - { - p_declaration_specifier->type_specifier_qualifier = type_specifier_qualifier(ctx); - } - else if (first_of_function_specifier(ctx)) - { - p_declaration_specifier->function_specifier = function_specifier(ctx); - } - else - { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "unexpected"); - } - return p_declaration_specifier; + // storage-class-specifier + // type-specifier-qualifier + // function-specifier + struct declaration_specifier* owner p_declaration_specifier = calloc(1, sizeof * p_declaration_specifier); + if (first_of_storage_class_specifier(ctx)) + { + p_declaration_specifier->storage_class_specifier = storage_class_specifier(ctx); + } + else if (first_of_type_specifier_qualifier(ctx)) + { + p_declaration_specifier->type_specifier_qualifier = type_specifier_qualifier(ctx); + } + else if (first_of_function_specifier(ctx)) + { + p_declaration_specifier->function_specifier = function_specifier(ctx); + } + else + { + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "unexpected"); + } + return p_declaration_specifier; } void init_declarator_delete(struct init_declarator* owner p) { - if (p) - { - initializer_delete(p->initializer); - declarator_delete(p->p_declarator); - assert(p->next == NULL); - free(p); - } + if (p) + { + initializer_delete(p->initializer); + declarator_delete(p->p_declarator); + assert(p->next == NULL); + free(p); + } } struct init_declarator* owner init_declarator(struct parser_ctx* ctx, - struct declaration_specifiers* p_declaration_specifiers) + struct declaration_specifiers* p_declaration_specifiers) { - /* - init-declarator: - declarator - declarator = initializer - */ - struct init_declarator* owner p_init_declarator = calloc(1, sizeof(struct init_declarator)); - try - { - struct token* tkname = 0; - p_init_declarator->p_declarator = declarator(ctx, - NULL, - p_declaration_specifiers, - false, - &tkname); - - if (p_init_declarator->p_declarator == NULL) throw; - p_init_declarator->p_declarator->name = tkname; + /* + init-declarator: + declarator + declarator = initializer + */ + struct init_declarator* owner p_init_declarator = calloc(1, sizeof(struct init_declarator)); + try + { + struct token* tkname = 0; + p_init_declarator->p_declarator = declarator(ctx, + NULL, + p_declaration_specifiers, + false, + &tkname); - if (tkname == NULL) - { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "empty declarator name?? unexpected"); - return p_init_declarator; - } + if (p_init_declarator->p_declarator == NULL) throw; + p_init_declarator->p_declarator->name = tkname; - p_init_declarator->p_declarator->declaration_specifiers = p_declaration_specifiers; - p_init_declarator->p_declarator->name = tkname; + if (tkname == NULL) + { + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "empty declarator name?? unexpected"); + return p_init_declarator; + } - if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTO) - { - /* - auto requires we find the type after initializer - */ - } - else - { - assert(p_init_declarator->p_declarator->type.type_specifier_flags == 0); - p_init_declarator->p_declarator->type = make_type_using_declarator(ctx, p_init_declarator->p_declarator); - } + p_init_declarator->p_declarator->declaration_specifiers = p_declaration_specifiers; + p_init_declarator->p_declarator->name = tkname; - const char* name = p_init_declarator->p_declarator->name->lexeme; - if (name) - { - if (tkname) - { - /* - Checking nameming conventions - */ - if (ctx->scopes.tail->scope_level == 0) - { - if (type_is_function(&p_init_declarator->p_declarator->type)) - { - naming_convention_global_var(ctx, - tkname, - &p_init_declarator->p_declarator->type, - p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags); - } - else - { - naming_convention_global_var(ctx, - tkname, - &p_init_declarator->p_declarator->type, - p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags); - } - } - } + if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTO) + { + /* + auto requires we find the type after initializer + */ + } + else + { + assert(p_init_declarator->p_declarator->type.type_specifier_flags == 0); + p_init_declarator->p_declarator->type = make_type_using_declarator(ctx, p_init_declarator->p_declarator); + } - struct scope* out_scope = NULL; - struct declarator* previous = find_declarator(ctx, name, &out_scope); - if (previous) - { - if (out_scope->scope_level == ctx->scopes.tail->scope_level) - { - if (out_scope->scope_level == 0) - { - /*file scope*/ - if (!type_is_same(&previous->type, &p_init_declarator->p_declarator->type, true)) - { - //TODO failing on windows headers - //parser_seterror_with_token(ctx, p_init_declarator->declarator->name, "redeclaration of '%s' with diferent types", previous->name->lexeme); - //parser_set_info_with_token(ctx, previous->name, "previous declaration"); - } - } - else - { - compiler_set_error_with_token(C_REDECLARATION, ctx, ctx->current, "redeclaration"); - compiler_set_info_with_token(W_NONE, ctx, previous->name, "previous declaration"); - } - } - else - { - hashmap_set(&ctx->scopes.tail->variables, name, p_init_declarator, TAG_TYPE_INIT_DECLARATOR); + const char* name = p_init_declarator->p_declarator->name->lexeme; + if (name) + { + if (tkname) + { + /* + Checking nameming conventions + */ + if (ctx->scopes.tail->scope_level == 0) + { + if (type_is_function(&p_init_declarator->p_declarator->type)) + { + naming_convention_global_var(ctx, + tkname, + &p_init_declarator->p_declarator->type, + p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags); + } + else + { + naming_convention_global_var(ctx, + tkname, + &p_init_declarator->p_declarator->type, + p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags); + } + } + } - /*global scope no warning...*/ - if (out_scope->scope_level != 0) - { - /*but redeclaration at function scope we show warning*/ - if (compiler_set_warning_with_token(W_DECLARATOR_HIDE, ctx, p_init_declarator->p_declarator->first_token, "declaration of '%s' hides previous declaration", name)) - { - compiler_set_info_with_token(W_NONE, ctx, previous->first_token, "previous declaration is here"); - } - } - } - } - else - { - /*first time we see this declarator*/ - hashmap_set(&ctx->scopes.tail->variables, name, p_init_declarator, TAG_TYPE_INIT_DECLARATOR); - } - } - else - { - assert(false); - } + struct scope* out_scope = NULL; + struct declarator* previous = find_declarator(ctx, name, &out_scope); + if (previous) + { + if (out_scope->scope_level == ctx->scopes.tail->scope_level) + { + if (out_scope->scope_level == 0) + { + /*file scope*/ + if (!type_is_same(&previous->type, &p_init_declarator->p_declarator->type, true)) + { + //TODO failing on windows headers + //parser_seterror_with_token(ctx, p_init_declarator->declarator->name, "redeclaration of '%s' with diferent types", previous->name->lexeme); + //parser_set_info_with_token(ctx, previous->name, "previous declaration"); + } + } + else + { + compiler_diagnostic_message(ERROR_REDECLARATION, ctx, ctx->current, "redeclaration"); + compiler_diagnostic_message(W_NOTE, ctx, previous->name, "previous declaration"); + } + } + else + { + hashmap_set(&ctx->scopes.tail->variables, name, p_init_declarator, TAG_TYPE_INIT_DECLARATOR); - if (ctx->current && ctx->current->type == '=') - { - parser_match(ctx); - p_init_declarator->initializer = initializer(ctx); - if (p_init_declarator->initializer->braced_initializer) - { - if (type_is_array(&p_init_declarator->p_declarator->type)) - { - const int sz = type_get_array_size(&p_init_declarator->p_declarator->type); - if (sz == 0) - { - /*int a[] = {1, 2, 3}*/ - const int braced_initializer_size = - p_init_declarator->initializer->braced_initializer->initializer_list->size; - type_set_array_size(&p_init_declarator->p_declarator->type, braced_initializer_size); - } - } + /*global scope no warning...*/ + if (out_scope->scope_level != 0) + { + /*but redeclaration at function scope we show warning*/ + if (compiler_diagnostic_message(W_DECLARATOR_HIDE, ctx, p_init_declarator->p_declarator->first_token, "declaration of '%s' hides previous declaration", name)) + { + compiler_diagnostic_message(W_NOTE, ctx, previous->first_token, "previous declaration is here"); + } + } + } + } + else + { + /*first time we see this declarator*/ + hashmap_set(&ctx->scopes.tail->variables, name, p_init_declarator, TAG_TYPE_INIT_DECLARATOR); + } + } + else + { + assert(false); + } - /* - Fixing the type of auto declarator - ?? - */ - } - else if (p_init_declarator->initializer->assignment_expression) - { - /* - Fixing the type of auto declarator - */ - if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTO) - { - struct type t = { 0 }; + if (ctx->current && ctx->current->type == '=') + { + parser_match(ctx); + p_init_declarator->initializer = initializer(ctx); + if (p_init_declarator->initializer && p_init_declarator->initializer->braced_initializer) + { + if (type_is_array(&p_init_declarator->p_declarator->type)) + { + const int sz = type_get_array_size(&p_init_declarator->p_declarator->type); + if (sz == 0) + { + /*int a[] = {1, 2, 3}*/ + assert(p_init_declarator->initializer->braced_initializer->initializer_list != NULL); + const int braced_initializer_size = + p_init_declarator->initializer->braced_initializer->initializer_list->size; + type_set_array_size(&p_init_declarator->p_declarator->type, braced_initializer_size); + } + } - if (p_init_declarator->initializer->assignment_expression->expression_type == UNARY_EXPRESSION_ADDRESSOF) - { - t = type_dup(&p_init_declarator->initializer->assignment_expression->type); - } - else - { - struct type t2 = type_lvalue_conversion(&p_init_declarator->initializer->assignment_expression->type); - type_swap(&t2, &t); - type_destroy(&t2); - } + /* + Fixing the type of auto declarator + ?? + */ + } + else if (p_init_declarator->initializer->assignment_expression) + { + /* + Fixing the type of auto declarator + */ + if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTO) + { + struct type t = { 0 }; - type_remove_names(&t); - assert(t.name_opt == NULL); - t.name_opt = strdup(p_init_declarator->p_declarator->name->lexeme); + if (p_init_declarator->initializer->assignment_expression->expression_type == UNARY_EXPRESSION_ADDRESSOF) + { + t = type_dup(&p_init_declarator->initializer->assignment_expression->type); + } + else + { + struct type t2 = type_lvalue_conversion(&p_init_declarator->initializer->assignment_expression->type); + type_swap(&t2, &t); + type_destroy(&t2); + } - type_set_qualifiers_using_declarator(&t, p_init_declarator->p_declarator); - //storage qualifiers? + type_remove_names(&t); + assert(t.name_opt == NULL); + t.name_opt = strdup(p_init_declarator->p_declarator->name->lexeme); - type_visit_to_mark_anonymous(&t); - type_swap(&p_init_declarator->p_declarator->type, &t); - type_destroy(&t); - } + type_set_qualifiers_using_declarator(&t, p_init_declarator->p_declarator); + //storage qualifiers? - /* - Checking for "const qualifier discarded" - */ - if (type_is_pointer_to_const(&p_init_declarator->initializer->assignment_expression->type)) - { - if (p_init_declarator->p_declarator && - !type_is_pointer_to_const(&p_init_declarator->p_declarator->type)) - { - compiler_set_warning_with_token(W_DISCARDED_QUALIFIERS, ctx, ctx->current, "const qualifier discarded"); - } - } + type_visit_to_mark_anonymous(&t); + type_swap(&p_init_declarator->p_declarator->type, &t); + type_destroy(&t); + } - if (type_is_owner(&p_init_declarator->initializer->assignment_expression->type)) - { - if (p_init_declarator->initializer->assignment_expression->expression_type == POSTFIX_FUNCTION_CALL) - { - //type * p = f(); - if (!type_is_owner(&p_init_declarator->p_declarator->type)) - { - compiler_set_error_with_token(C_OWNERSHIP_MISSING_OWNER_QUALIFIER, ctx, p_init_declarator->p_declarator->first_token, "missing owner qualifier"); - } - } - } + /* + Checking for "const qualifier discarded" + */ + if (type_is_pointer_to_const(&p_init_declarator->initializer->assignment_expression->type)) + { + if (p_init_declarator->p_declarator && + !type_is_pointer_to_const(&p_init_declarator->p_declarator->type)) + { + compiler_diagnostic_message(W_DISCARDED_QUALIFIERS, ctx, ctx->current, "const qualifier discarded"); + } + } - if (type_is_owner(&p_init_declarator->p_declarator->type)) - { - if (!type_is_owner(&p_init_declarator->initializer->assignment_expression->type)) - { - const bool is_zero = - constant_value_is_valid(&p_init_declarator->initializer->assignment_expression->constant_value) && - constant_value_to_bool(&p_init_declarator->initializer->assignment_expression->constant_value) == false; + if (type_is_owner(&p_init_declarator->initializer->assignment_expression->type)) + { + if (p_init_declarator->initializer->assignment_expression->expression_type == POSTFIX_FUNCTION_CALL) + { + //type * p = f(); + if (!type_is_owner(&p_init_declarator->p_declarator->type)) + { + compiler_diagnostic_message(W_OWNERSHIP_MISSING_OWNER_QUALIFIER, ctx, p_init_declarator->p_declarator->first_token, "missing owner qualifier"); + } + } + } - if (!is_zero) - { - compiler_set_error_with_token(C_OWNERSHIP_MISSING_OWNER_QUALIFIER, - ctx, - p_init_declarator->p_declarator->first_token, "cannot initialize an owner type with a non owner"); - } - else - { - /* - T * owner p = NULL; // OK - */ - } - } - } + if (type_is_owner(&p_init_declarator->p_declarator->type)) + { + if (!type_is_owner(&p_init_declarator->initializer->assignment_expression->type)) + { + const bool is_zero = + constant_value_is_valid(&p_init_declarator->initializer->assignment_expression->constant_value) && + constant_value_to_bool(&p_init_declarator->initializer->assignment_expression->constant_value) == false; - } - } - } - catch - { - } + if (!is_zero) + { + compiler_diagnostic_message(W_OWNERSHIP_MISSING_OWNER_QUALIFIER, + ctx, + p_init_declarator->p_declarator->first_token, "cannot initialize an owner type with a non owner"); + } + else + { + /* + T * owner p = NULL; // OK + */ + } + } + } - /* - checking usage of [static ] other than in function arguments - */ - if (p_init_declarator->p_declarator) - { - if (type_is_array(&p_init_declarator->p_declarator->type)) - if (p_init_declarator->p_declarator->type.type_qualifier_flags != 0 || - p_init_declarator->p_declarator->type.static_array) - { - compiler_set_error_with_token(C_STATIC_OR_TYPE_QUALIFIERS_NOT_ALLOWED_IN_NON_PARAMETER, - ctx, - p_init_declarator->p_declarator->first_token, - "static or type qualifiers are not allowed in non-parameter array declarator"); - } + } + } + } + catch + { + } + + /* + checking usage of [static ] other than in function arguments + */ + if (p_init_declarator->p_declarator) + { + if (type_is_array(&p_init_declarator->p_declarator->type)) + if (p_init_declarator->p_declarator->type.type_qualifier_flags != 0 || + p_init_declarator->p_declarator->type.static_array) + { + compiler_diagnostic_message(ERROR_STATIC_OR_TYPE_QUALIFIERS_NOT_ALLOWED_IN_NON_PARAMETER, + ctx, + p_init_declarator->p_declarator->first_token, + "static or type qualifiers are not allowed in non-parameter array declarator"); + } - if (!type_is_pointer(&p_init_declarator->p_declarator->type) && - p_init_declarator->p_declarator->type.type_qualifier_flags & TYPE_QUALIFIER_OBJ_OWNER) - { - compiler_set_error_with_token(C_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER, - ctx, - p_init_declarator->p_declarator->first_token, - "obj_owner qualifier can only be used with pointers"); - } - } + if (!type_is_pointer(&p_init_declarator->p_declarator->type) && + p_init_declarator->p_declarator->type.type_qualifier_flags & TYPE_QUALIFIER_OBJ_OWNER) + { + compiler_diagnostic_message(ERROR_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER, + ctx, + p_init_declarator->p_declarator->first_token, + "obj_owner qualifier can only be used with pointers"); + } + } - return p_init_declarator; + return p_init_declarator; } void init_declarator_list_destroy(struct init_declarator_list* obj_owner p) { - struct init_declarator* owner item = p->head; - while (item) - { - struct init_declarator* owner next = item->next; - item->next = NULL; - init_declarator_delete(item); - item = next; - } + struct init_declarator* owner item = p->head; + while (item) + { + struct init_declarator* owner next = item->next; + item->next = NULL; + init_declarator_delete(item); + item = next; + } } struct init_declarator_list init_declarator_list(struct parser_ctx* ctx, - struct declaration_specifiers* p_declaration_specifiers) + struct declaration_specifiers* p_declaration_specifiers) { - /* - init-declarator-list: - init-declarator - init-declarator-list , init-declarator - */ - struct init_declarator_list init_declarator_list = { 0 }; - struct init_declarator* owner p_init_declarator = NULL; + /* + init-declarator-list: + init-declarator + init-declarator-list , init-declarator + */ + struct init_declarator_list init_declarator_list = { 0 }; + struct init_declarator* owner p_init_declarator = NULL; - try - { - p_init_declarator = init_declarator(ctx, p_declaration_specifiers); + try + { + p_init_declarator = init_declarator(ctx, p_declaration_specifiers); - if (p_init_declarator == NULL) throw; - LIST_ADD(&init_declarator_list, p_init_declarator); - p_init_declarator = NULL; /*MOVED*/ + if (p_init_declarator == NULL) throw; + LIST_ADD(&init_declarator_list, p_init_declarator); + p_init_declarator = NULL; /*MOVED*/ - while (ctx->current != NULL && ctx->current->type == ',') - { - parser_match(ctx); - p_init_declarator = init_declarator(ctx, p_declaration_specifiers); - if (p_init_declarator == NULL) throw; - LIST_ADD(&init_declarator_list, p_init_declarator); - p_init_declarator = NULL; /*MOVED*/ - } - } - catch - { - } + while (ctx->current != NULL && ctx->current->type == ',') + { + parser_match(ctx); + p_init_declarator = init_declarator(ctx, p_declaration_specifiers); + if (p_init_declarator == NULL) throw; + LIST_ADD(&init_declarator_list, p_init_declarator); + p_init_declarator = NULL; /*MOVED*/ + } + } + catch + { + } - return init_declarator_list; + return init_declarator_list; } void storage_class_specifier_delete(struct storage_class_specifier* owner p) { - if (p) - { - free(p); - } + if (p) + { + free(p); + } } struct storage_class_specifier* owner storage_class_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return NULL; + if (ctx->current == NULL) + return NULL; - struct storage_class_specifier* owner new_storage_class_specifier = calloc(1, sizeof(struct storage_class_specifier)); - if (new_storage_class_specifier == NULL) - return NULL; + struct storage_class_specifier* owner new_storage_class_specifier = calloc(1, sizeof(struct storage_class_specifier)); + if (new_storage_class_specifier == NULL) + return NULL; - new_storage_class_specifier->token = ctx->current; - switch (ctx->current->type) - { - case TK_KEYWORD_TYPEDEF: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_TYPEDEF; - break; - case TK_KEYWORD_EXTERN: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_EXTERN; - break; - case TK_KEYWORD_CONSTEXPR: + new_storage_class_specifier->token = ctx->current; + switch (ctx->current->type) + { + case TK_KEYWORD_TYPEDEF: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_TYPEDEF; + break; + case TK_KEYWORD_EXTERN: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_EXTERN; + break; + case TK_KEYWORD_CONSTEXPR: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_CONSTEXPR; - if (ctx->scopes.tail->scope_level == 0) - new_storage_class_specifier->flags |= STORAGE_SPECIFIER_CONSTEXPR_STATIC; - break; - case TK_KEYWORD_STATIC: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_STATIC; - break; - case TK_KEYWORD__THREAD_LOCAL: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_THREAD_LOCAL; - break; - case TK_KEYWORD_AUTO: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_AUTO; - break; - case TK_KEYWORD_REGISTER: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_REGISTER; - break; - default: - assert(false); - } + new_storage_class_specifier->flags = STORAGE_SPECIFIER_CONSTEXPR; + if (ctx->scopes.tail->scope_level == 0) + new_storage_class_specifier->flags |= STORAGE_SPECIFIER_CONSTEXPR_STATIC; + break; + case TK_KEYWORD_STATIC: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_STATIC; + break; + case TK_KEYWORD__THREAD_LOCAL: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_THREAD_LOCAL; + break; + case TK_KEYWORD_AUTO: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_AUTO; + break; + case TK_KEYWORD_REGISTER: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_REGISTER; + break; + default: + assert(false); + } - /* - TODO - thread_local may appear with static or extern, - auto may appear with all the others except typedef138), and - constexpr may appear with auto, register, or static. - */ + /* + TODO + thread_local may appear with static or extern, + auto may appear with all the others except typedef138), and + constexpr may appear with auto, register, or static. + */ - parser_match(ctx); - return new_storage_class_specifier; + parser_match(ctx); + return new_storage_class_specifier; } struct typeof_specifier_argument* owner typeof_specifier_argument(struct parser_ctx* ctx) { - struct typeof_specifier_argument* owner new_typeof_specifier_argument = calloc(1, sizeof(struct typeof_specifier_argument)); - if (new_typeof_specifier_argument == NULL) - return NULL; - try - { - if (first_of_type_name(ctx)) - { - new_typeof_specifier_argument->type_name = type_name(ctx); - } - else - { - const bool disable_evaluation_copy = ctx->evaluation_is_disabled; - ctx->evaluation_is_disabled = true; - new_typeof_specifier_argument->expression = expression(ctx); - /*restore*/ - ctx->evaluation_is_disabled = disable_evaluation_copy; + struct typeof_specifier_argument* owner new_typeof_specifier_argument = calloc(1, sizeof(struct typeof_specifier_argument)); + if (new_typeof_specifier_argument == NULL) + return NULL; + try + { + if (first_of_type_name(ctx)) + { + new_typeof_specifier_argument->type_name = type_name(ctx); + } + else + { + const bool disable_evaluation_copy = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = true; + new_typeof_specifier_argument->expression = expression(ctx); + /*restore*/ + ctx->evaluation_is_disabled = disable_evaluation_copy; - if (new_typeof_specifier_argument->expression == NULL) throw; + if (new_typeof_specifier_argument->expression == NULL) throw; - //declarator_type_clear_name(new_typeof_specifier_argument->expression->type.declarator_type); - } - } - catch - { - } - return new_typeof_specifier_argument; + //declarator_type_clear_name(new_typeof_specifier_argument->expression->type.declarator_type); + } + } + catch + { + } + return new_typeof_specifier_argument; } bool first_of_typeof_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD_TYPEOF || - ctx->current->type == TK_KEYWORD_TYPEOF_UNQUAL; + return ctx->current->type == TK_KEYWORD_TYPEOF || + ctx->current->type == TK_KEYWORD_TYPEOF_UNQUAL; } struct typeof_specifier* owner typeof_specifier(struct parser_ctx* ctx) { - struct typeof_specifier* owner p_typeof_specifier = NULL; - try - { - p_typeof_specifier = calloc(1, sizeof(struct typeof_specifier)); - if (p_typeof_specifier == NULL) throw; + struct typeof_specifier* owner p_typeof_specifier = NULL; + try + { + p_typeof_specifier = calloc(1, sizeof(struct typeof_specifier)); + if (p_typeof_specifier == NULL) throw; - p_typeof_specifier->first_token = ctx->current; + p_typeof_specifier->first_token = ctx->current; - const bool is_typeof_unqual = ctx->current->type == TK_KEYWORD_TYPEOF_UNQUAL; - parser_match(ctx); - if (parser_match_tk(ctx, '(') != 0) throw; + const bool is_typeof_unqual = ctx->current->type == TK_KEYWORD_TYPEOF_UNQUAL; + parser_match(ctx); + if (parser_match_tk(ctx, '(') != 0) throw; - p_typeof_specifier->typeof_specifier_argument = typeof_specifier_argument(ctx); - if (p_typeof_specifier->typeof_specifier_argument == NULL) throw; + p_typeof_specifier->typeof_specifier_argument = typeof_specifier_argument(ctx); + if (p_typeof_specifier->typeof_specifier_argument == NULL) throw; - if (p_typeof_specifier->typeof_specifier_argument->expression) - { - p_typeof_specifier->type = type_dup(&p_typeof_specifier->typeof_specifier_argument->expression->type); - } - else if (p_typeof_specifier->typeof_specifier_argument->type_name) - { - p_typeof_specifier->type = type_dup(&p_typeof_specifier->typeof_specifier_argument->type_name->declarator->type); - } + if (p_typeof_specifier->typeof_specifier_argument->expression) + { + p_typeof_specifier->type = type_dup(&p_typeof_specifier->typeof_specifier_argument->expression->type); + } + else if (p_typeof_specifier->typeof_specifier_argument->type_name) + { + p_typeof_specifier->type = type_dup(&p_typeof_specifier->typeof_specifier_argument->type_name->declarator->type); + } - if (p_typeof_specifier->type.storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) - { - compiler_set_warning_with_token(W_TYPEOF_ARRAY_PARAMETER, ctx, ctx->current, "typeof used in array arguments"); + if (p_typeof_specifier->type.storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) + { + compiler_diagnostic_message(W_TYPEOF_ARRAY_PARAMETER, ctx, ctx->current, "typeof used in array arguments"); - if (type_is_array(&p_typeof_specifier->type)) - { - struct type t = type_param_array_to_pointer(&p_typeof_specifier->type); - type_swap(&t, &p_typeof_specifier->type); - type_destroy(&t); - } + if (type_is_array(&p_typeof_specifier->type)) + { + struct type t = type_param_array_to_pointer(&p_typeof_specifier->type); + type_swap(&t, &p_typeof_specifier->type); + type_destroy(&t); + } - } + } - if (is_typeof_unqual) - { - type_remove_qualifiers(&p_typeof_specifier->type); - } + if (is_typeof_unqual) + { + type_remove_qualifiers(&p_typeof_specifier->type); + } - type_visit_to_mark_anonymous(&p_typeof_specifier->type); + type_visit_to_mark_anonymous(&p_typeof_specifier->type); - free((void* owner) p_typeof_specifier->type.name_opt); - p_typeof_specifier->type.name_opt = NULL; + free((void* owner) p_typeof_specifier->type.name_opt); + p_typeof_specifier->type.name_opt = NULL; - p_typeof_specifier->last_token = ctx->current; - parser_match_tk(ctx, ')'); - } - catch - { - } + p_typeof_specifier->last_token = ctx->current; + parser_match_tk(ctx, ')'); + } + catch + { + } - return p_typeof_specifier; + return p_typeof_specifier; } void typeof_specifier_argument_delete(struct typeof_specifier_argument* owner p) { - if (p) - { - expression_delete(p->expression); - type_name_delete(p->type_name); - free(p); - } + if (p) + { + expression_delete(p->expression); + type_name_delete(p->type_name); + free(p); + } } void typeof_specifier_delete(struct typeof_specifier* owner p) { - if (p) - { - typeof_specifier_argument_delete(p->typeof_specifier_argument); - type_destroy(&p->type); - free(p); - } + if (p) + { + typeof_specifier_argument_delete(p->typeof_specifier_argument); + type_destroy(&p->type); + free(p); + } } void type_specifier_delete(struct type_specifier* owner p) { - if (p) - { - struct_or_union_specifier_delete(p->struct_or_union_specifier); - typeof_specifier_delete(p->typeof_specifier); - enum_specifier_delete(p->enum_specifier); - atomic_type_specifier_delete(p->atomic_type_specifier); - free(p); - } + if (p) + { + struct_or_union_specifier_delete(p->struct_or_union_specifier); + typeof_specifier_delete(p->typeof_specifier); + enum_specifier_delete(p->enum_specifier); + atomic_type_specifier_delete(p->atomic_type_specifier); + free(p); + } } struct type_specifier* owner type_specifier(struct parser_ctx* ctx) { - /* - type-specifier: - void - char - short - int - long - float - double - signed - unsigned - _BitInt ( constant-expression ) - bool C23 - _Complex - _Decimal32 - _Decimal64 - _Decimal128 - atomic-type-specifier - struct-or-union-specifier - enum-specifier - typedef-name - typeof-specifier C23 - */ - - struct type_specifier* owner p_type_specifier = calloc(1, sizeof * p_type_specifier); - if (p_type_specifier == NULL) - return NULL; - - - - - switch (ctx->current->type) - { - case TK_KEYWORD_VOID: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_VOID; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_CHAR: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_CHAR; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_SHORT: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_SHORT; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_INT: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - //microsoft - case TK_KEYWORD__INT8: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT8; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD__INT16: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT16; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - case TK_KEYWORD__INT32: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT32; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - case TK_KEYWORD__INT64: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT64; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - //end microsoft - - case TK_KEYWORD_LONG: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_LONG; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_FLOAT: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_FLOAT; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_DOUBLE: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_DOUBLE; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_SIGNED: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_SIGNED; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_UNSIGNED: - - p_type_specifier->flags = TYPE_SPECIFIER_UNSIGNED; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD__BOOL: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_BOOL; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; + /* + type-specifier: + void + char + short + int + long + float + double + signed + unsigned + _BitInt ( constant-expression ) + bool C23 + _Complex + _Decimal32 + _Decimal64 + _Decimal128 + atomic-type-specifier + struct-or-union-specifier + enum-specifier + typedef-name + typeof-specifier C23 + */ - case TK_KEYWORD__COMPLEX: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_COMPLEX; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; + struct type_specifier* owner p_type_specifier = calloc(1, sizeof * p_type_specifier); + if (p_type_specifier == NULL) + return NULL; - case TK_KEYWORD__DECIMAL32: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL32; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - case TK_KEYWORD__DECIMAL64: - p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL64; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - case TK_KEYWORD__DECIMAL128: - p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL128; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; + switch (ctx->current->type) + { + case TK_KEYWORD_VOID: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_VOID; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_CHAR: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_CHAR; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_SHORT: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_SHORT; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_INT: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + //microsoft + case TK_KEYWORD__INT8: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT8; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__INT16: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT16; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case TK_KEYWORD__INT32: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT32; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case TK_KEYWORD__INT64: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT64; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + //end microsoft + + case TK_KEYWORD_LONG: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_LONG; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_FLOAT: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_FLOAT; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_DOUBLE: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_DOUBLE; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_SIGNED: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_SIGNED; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_UNSIGNED: + + p_type_specifier->flags = TYPE_SPECIFIER_UNSIGNED; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__BOOL: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_BOOL; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__COMPLEX: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_COMPLEX; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__DECIMAL32: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL32; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__DECIMAL64: + + p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL64; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__DECIMAL128: + p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL128; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + default: + // Do nothing + break; - } + } - if (first_of_typeof_specifier(ctx)) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_TYPEOF; - p_type_specifier->typeof_specifier = typeof_specifier(ctx); - } - else if (first_of_atomic_type_specifier(ctx)) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_ATOMIC; - p_type_specifier->atomic_type_specifier = atomic_type_specifier(ctx); - } - else if (first_of_struct_or_union(ctx)) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_STRUCT_OR_UNION; - p_type_specifier->struct_or_union_specifier = struct_or_union_specifier(ctx); - } - else if (first_of_enum_specifier(ctx)) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_ENUM; - p_type_specifier->enum_specifier = enum_specifier(ctx); - } - else if (ctx->current->type == TK_IDENTIFIER) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_TYPEDEF; + if (first_of_typeof_specifier(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_TYPEOF; + p_type_specifier->typeof_specifier = typeof_specifier(ctx); + } + else if (first_of_atomic_type_specifier(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_ATOMIC; + p_type_specifier->atomic_type_specifier = atomic_type_specifier(ctx); + } + else if (first_of_struct_or_union(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_STRUCT_OR_UNION; + p_type_specifier->struct_or_union_specifier = struct_or_union_specifier(ctx); + } + else if (first_of_enum_specifier(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_ENUM; + p_type_specifier->enum_specifier = enum_specifier(ctx); + } + else if (ctx->current->type == TK_IDENTIFIER) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_TYPEDEF; - p_type_specifier->typedef_declarator = - find_declarator(ctx, ctx->current->lexeme, NULL); + p_type_specifier->typedef_declarator = + find_declarator(ctx, ctx->current->lexeme, NULL); - //Ser chegou aqui já tem que exitir (reaprovecitar?) - assert(p_type_specifier->typedef_declarator != NULL); + //Ser chegou aqui já tem que exitir (reaprovecitar?) + assert(p_type_specifier->typedef_declarator != NULL); - parser_match(ctx); - } + parser_match(ctx); + } - return p_type_specifier; + return p_type_specifier; } struct struct_or_union_specifier* get_complete_struct_or_union_specifier(struct struct_or_union_specifier* p_struct_or_union_specifier) -{ - if (p_struct_or_union_specifier == NULL) - return NULL; - - if (p_struct_or_union_specifier->member_declaration_list.head) - { - /*p_struct_or_union_specifier is complete*/ - return p_struct_or_union_specifier; - } - else if (p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection && - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->member_declaration_list.head) - { - /*p_struct_or_union_specifier is the first seem tag tag points directly to complete*/ - return p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection; - } - else if (p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection && - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection && - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection->member_declaration_list.head) - { - /* all others points to the first seem that points to the complete*/ - return p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection; - } +{ + if (p_struct_or_union_specifier == NULL) + return NULL; - return NULL; + if (p_struct_or_union_specifier->member_declaration_list.head) + { + /*p_struct_or_union_specifier is complete*/ + return p_struct_or_union_specifier; + } + else if (p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection && + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->member_declaration_list.head) + { + /*p_struct_or_union_specifier is the first seem tag tag points directly to complete*/ + return p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection; + } + else if (p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection && + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection && + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection->member_declaration_list.head) + { + /* all others points to the first seem that points to the complete*/ + return p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection; + } + + return NULL; } bool struct_or_union_specifier_is_complete(struct struct_or_union_specifier* p_struct_or_union_specifier) { - return - get_complete_struct_or_union_specifier(p_struct_or_union_specifier) != NULL; + return + get_complete_struct_or_union_specifier(p_struct_or_union_specifier) != NULL; } void struct_or_union_specifier_delete(struct struct_or_union_specifier* owner p) { - if (p) - { - member_declaration_list_destroy(&p->member_declaration_list); - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - free(p); - } + if (p) + { + member_declaration_list_destroy(&p->member_declaration_list); + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + free(p); + } } struct struct_or_union_specifier* owner struct_or_union_specifier(struct parser_ctx* ctx) { - struct struct_or_union_specifier* owner p_struct_or_union_specifier = calloc(1, sizeof * p_struct_or_union_specifier); + struct struct_or_union_specifier* owner p_struct_or_union_specifier = calloc(1, sizeof * p_struct_or_union_specifier); - if (p_struct_or_union_specifier == NULL) - return NULL; + if (p_struct_or_union_specifier == NULL) + return NULL; - static_set(*p_struct_or_union_specifier, "zero"); + static_set(*p_struct_or_union_specifier, "zero"); - if (ctx->current->type == TK_KEYWORD_STRUCT || - ctx->current->type == TK_KEYWORD_UNION) - { - p_struct_or_union_specifier->first_token = ctx->current; - parser_match(ctx); - } - else - { - assert(false); - } + if (ctx->current->type == TK_KEYWORD_STRUCT || + ctx->current->type == TK_KEYWORD_UNION) + { + p_struct_or_union_specifier->first_token = ctx->current; + parser_match(ctx); + } + else + { + assert(false); + } - p_struct_or_union_specifier->attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + p_struct_or_union_specifier->attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - struct struct_or_union_specifier* p_first_tag_in_this_scope = NULL; + struct struct_or_union_specifier* p_first_tag_in_this_scope = NULL; - if (ctx->current->type == TK_IDENTIFIER) - { - p_struct_or_union_specifier->tagtoken = ctx->current; - /* - Structure, union, and enumeration tags have scope that begins just after the - appearance of the tag in a type specifier that declares the tag. - */ + if (ctx->current->type == TK_IDENTIFIER) + { + p_struct_or_union_specifier->tagtoken = ctx->current; + /* + Structure, union, and enumeration tags have scope that begins just after the + appearance of the tag in a type specifier that declares the tag. + */ - snprintf(p_struct_or_union_specifier->tag_name, sizeof p_struct_or_union_specifier->tag_name, "%s", ctx->current->lexeme); + snprintf(p_struct_or_union_specifier->tag_name, sizeof p_struct_or_union_specifier->tag_name, "%s", ctx->current->lexeme); - struct map_entry* p_entry = hashmap_find(&ctx->scopes.tail->tags, ctx->current->lexeme); - if (p_entry) - { - /*this tag already exist in this scope*/ - if (p_entry->type == TAG_TYPE_STRUCT_OR_UNION_SPECIFIER) - { - p_first_tag_in_this_scope = p_entry->p; - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_in_this_scope; - } - else - { - compiler_set_error_with_token(C_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, - ctx, - ctx->current, - "use of '%s' with tag type that does not match previous declaration.", - ctx->current->lexeme); - } - } - else - { - /*tag does not exist in the current scope, let search on upper scopes*/ - struct struct_or_union_specifier* p_first_tag_previous_scopes = find_struct_or_union_specifier(ctx, ctx->current->lexeme); - if (p_first_tag_previous_scopes == NULL) - { - /*tag not found, so it is the first appearence*/ - p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; - hashmap_set(&ctx->scopes.tail->tags, ctx->current->lexeme, p_struct_or_union_specifier, TAG_TYPE_STRUCT_OR_UNION_SPECIFIER); + struct map_entry* p_entry = hashmap_find(&ctx->scopes.tail->tags, ctx->current->lexeme); + if (p_entry) + { + /*this tag already exist in this scope*/ + if (p_entry->type == TAG_TYPE_STRUCT_OR_UNION_SPECIFIER) + { + p_first_tag_in_this_scope = p_entry->p; + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_in_this_scope; + } + else + { + compiler_diagnostic_message(ERROR_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, + ctx, + ctx->current, + "use of '%s' with tag type that does not match previous declaration.", + ctx->current->lexeme); + } + } + else + { + /*tag does not exist in the current scope, let search on upper scopes*/ + struct struct_or_union_specifier* p_first_tag_previous_scopes = find_struct_or_union_specifier(ctx, ctx->current->lexeme); + if (p_first_tag_previous_scopes == NULL) + { + /*tag not found, so it is the first appearence*/ + p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; + hashmap_set(&ctx->scopes.tail->tags, ctx->current->lexeme, p_struct_or_union_specifier, TAG_TYPE_STRUCT_OR_UNION_SPECIFIER); - } - else - { - /*tag already exists in some scope*/ - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_previous_scopes; - } - } + } + else + { + /*tag already exists in some scope*/ + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_previous_scopes; + } + } - parser_match(ctx); - } - else - { - /*struct without a tag, in this case we make one*/ - snprintf(p_struct_or_union_specifier->tag_name, sizeof p_struct_or_union_specifier->tag_name, "_anonymous_struct_%d", s_anonymous_struct_count); - s_anonymous_struct_count++; - p_struct_or_union_specifier->has_anonymous_tag = true; - p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; - hashmap_set(&ctx->scopes.tail->tags, p_struct_or_union_specifier->tag_name, p_struct_or_union_specifier, TAG_TYPE_STRUCT_OR_UNION_SPECIFIER); - } + parser_match(ctx); + } + else + { + /*struct without a tag, in this case we make one*/ + snprintf(p_struct_or_union_specifier->tag_name, sizeof p_struct_or_union_specifier->tag_name, "_anonymous_struct_%d", s_anonymous_struct_count); + s_anonymous_struct_count++; + p_struct_or_union_specifier->has_anonymous_tag = true; + p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; + hashmap_set(&ctx->scopes.tail->tags, p_struct_or_union_specifier->tag_name, p_struct_or_union_specifier, TAG_TYPE_STRUCT_OR_UNION_SPECIFIER); + } - if (ctx->current->type == '{') - { - /* - this is the complete struct - */ + if (ctx->current->type == '{') + { + /* + this is the complete struct + */ - struct struct_or_union_specifier* first = find_struct_or_union_specifier(ctx, p_struct_or_union_specifier->tag_name); + struct struct_or_union_specifier* first = find_struct_or_union_specifier(ctx, p_struct_or_union_specifier->tag_name); - if (first) - { - /* - The first tag (will the one at symbol table) will point to the complete struct - */ - first->complete_struct_or_union_specifier_indirection = p_struct_or_union_specifier; - } + if (first) + { + /* + The first tag (will the one at symbol table) will point to the complete struct + */ + first->complete_struct_or_union_specifier_indirection = p_struct_or_union_specifier; + } - if (p_struct_or_union_specifier->tagtoken) - naming_convention_struct_tag(ctx, p_struct_or_union_specifier->tagtoken); + if (p_struct_or_union_specifier->tagtoken) + naming_convention_struct_tag(ctx, p_struct_or_union_specifier->tagtoken); - struct token* firsttoken = ctx->current; - parser_match(ctx); + struct token* firsttoken = ctx->current; + parser_match(ctx); - p_struct_or_union_specifier->member_declaration_list = member_declaration_list(ctx, p_struct_or_union_specifier); - p_struct_or_union_specifier->member_declaration_list.first_token = firsttoken; - p_struct_or_union_specifier->last_token = ctx->current; - p_struct_or_union_specifier->member_declaration_list.last_token = ctx->current; - parser_match_tk(ctx, '}'); + p_struct_or_union_specifier->member_declaration_list = member_declaration_list(ctx, p_struct_or_union_specifier); + p_struct_or_union_specifier->member_declaration_list.first_token = firsttoken; + p_struct_or_union_specifier->last_token = ctx->current; + p_struct_or_union_specifier->member_declaration_list.last_token = ctx->current; + parser_match_tk(ctx, '}'); - } - else - { - p_struct_or_union_specifier->last_token = ctx->current; - } + } + else + { + p_struct_or_union_specifier->last_token = ctx->current; + } - struct struct_or_union_specifier* p_complete = - get_complete_struct_or_union_specifier(p_struct_or_union_specifier); + struct struct_or_union_specifier* p_complete = + get_complete_struct_or_union_specifier(p_struct_or_union_specifier); - /*check if complete struct is deprecated*/ - if (p_complete) - { - if (p_complete->attribute_specifier_sequence_opt && - p_complete->attribute_specifier_sequence_opt->attributes_flags & STD_ATTRIBUTE_DEPRECATED) - { - if (p_struct_or_union_specifier->tagtoken) - { - //TODO add deprecated message - compiler_set_warning_with_token(W_DEPRECATED, ctx, p_struct_or_union_specifier->first_token, "'%s' is deprecated", p_struct_or_union_specifier->tagtoken->lexeme); - } - else - { - compiler_set_warning_with_token(W_DEPRECATED, ctx, p_struct_or_union_specifier->first_token, "deprecated"); - } - } - } + /*check if complete struct is deprecated*/ + if (p_complete) + { + if (p_complete->attribute_specifier_sequence_opt && + p_complete->attribute_specifier_sequence_opt->attributes_flags & STD_ATTRIBUTE_DEPRECATED) + { + if (p_struct_or_union_specifier->tagtoken) + { + //TODO add deprecated message + compiler_diagnostic_message(W_DEPRECATED, ctx, p_struct_or_union_specifier->first_token, "'%s' is deprecated", p_struct_or_union_specifier->tagtoken->lexeme); + } + else + { + compiler_diagnostic_message(W_DEPRECATED, ctx, p_struct_or_union_specifier->first_token, "deprecated"); + } + } + } - return p_struct_or_union_specifier; + return p_struct_or_union_specifier; } struct member_declarator* owner member_declarator( - struct parser_ctx* ctx, - struct struct_or_union_specifier* p_struct_or_union_specifier, - const struct specifier_qualifier_list* p_specifier_qualifier_list + struct parser_ctx* ctx, + struct struct_or_union_specifier* p_struct_or_union_specifier, + const struct specifier_qualifier_list* p_specifier_qualifier_list ) { - /* - member-declarator: - declarator - declaratoropt : constant-expression - */ - struct member_declarator* owner p_member_declarator = calloc(1, sizeof(struct member_declarator)); + /* + member-declarator: + declarator + declaratoropt : constant-expression + */ + struct member_declarator* owner p_member_declarator = calloc(1, sizeof(struct member_declarator)); - struct token* p_token_name = NULL; + struct token* p_token_name = NULL; - p_member_declarator->declarator = declarator(ctx, p_specifier_qualifier_list, /*declaration_specifiers*/NULL, false, &p_token_name); - p_member_declarator->declarator->name = p_token_name; - p_member_declarator->declarator->specifier_qualifier_list = p_specifier_qualifier_list; + p_member_declarator->declarator = declarator(ctx, p_specifier_qualifier_list, /*declaration_specifiers*/NULL, false, &p_token_name); + p_member_declarator->declarator->name = p_token_name; + p_member_declarator->declarator->specifier_qualifier_list = p_specifier_qualifier_list; - p_member_declarator->declarator->type = make_type_using_declarator(ctx, p_member_declarator->declarator); + p_member_declarator->declarator->type = make_type_using_declarator(ctx, p_member_declarator->declarator); - /*extension*/ - if (type_is_owner(&p_member_declarator->declarator->type)) - { - /*having at least 1 owner member, the struct type is owner by default*/ - p_struct_or_union_specifier->is_owner = true; - } + /*extension*/ + if (type_is_owner(&p_member_declarator->declarator->type)) + { + /*having at least 1 owner member, the struct type is owner by default*/ + p_struct_or_union_specifier->is_owner = true; + } - if (p_member_declarator->declarator->name) - naming_convention_struct_member(ctx, p_member_declarator->declarator->name, &p_member_declarator->declarator->type); + if (p_member_declarator->declarator->name) + naming_convention_struct_member(ctx, p_member_declarator->declarator->name, &p_member_declarator->declarator->type); - if (ctx->current->type == ':') - { - parser_match(ctx); - p_member_declarator->constant_expression = constant_expression(ctx, true); - } - return p_member_declarator; + if (ctx->current->type == ':') + { + parser_match(ctx); + p_member_declarator->constant_expression = constant_expression(ctx, true); + } + return p_member_declarator; } void member_declarator_delete(struct member_declarator* owner p) { - if (p) - { - expression_delete(p->constant_expression); - assert(p->next == NULL); - declarator_delete(p->declarator); - free(p); - } + if (p) + { + expression_delete(p->constant_expression); + assert(p->next == NULL); + declarator_delete(p->declarator); + free(p); + } } -void member_declarator_list_delete(struct member_declarator_list* owner p) +void member_declarator_list_delete(struct member_declarator_list* owner opt p) { - if (p) - { - struct member_declarator* owner item = p->head; - while (item) - { - struct member_declarator* owner next = item->next; - item->next = NULL; - member_declarator_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct member_declarator* owner item = p->head; + while (item) + { + struct member_declarator* owner next = item->next; + item->next = NULL; + member_declarator_delete(item); + item = next; + } + free(p); + } } struct member_declarator_list* owner member_declarator_list( - struct parser_ctx* ctx, - struct struct_or_union_specifier* p_struct_or_union_specifier, - const struct specifier_qualifier_list* p_specifier_qualifier_list) + struct parser_ctx* ctx, + struct struct_or_union_specifier* p_struct_or_union_specifier, + const struct specifier_qualifier_list* p_specifier_qualifier_list) { - struct member_declarator_list* owner p_member_declarator_list = calloc(1, sizeof(struct member_declarator_list)); - LIST_ADD(p_member_declarator_list, member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list)); - while (ctx->current->type == ',') - { - parser_match(ctx); - LIST_ADD(p_member_declarator_list, member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list)); - } - return p_member_declarator_list; + struct member_declarator_list* owner p_member_declarator_list = calloc(1, sizeof(struct member_declarator_list)); + LIST_ADD(p_member_declarator_list, member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list)); + while (ctx->current->type == ',') + { + parser_match(ctx); + LIST_ADD(p_member_declarator_list, member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list)); + } + return p_member_declarator_list; } void member_declaration_list_destroy(struct member_declaration_list* obj_owner p) { - struct member_declaration* owner item = p->head; - while (item) - { - struct member_declaration* owner next = item->next; - item->next = NULL; - member_declaration_delete(item); - item = next; - } + struct member_declaration* owner item = p->head; + while (item) + { + struct member_declaration* owner next = item->next; + item->next = NULL; + member_declaration_delete(item); + item = next; + } } -struct member_declaration_list member_declaration_list(struct parser_ctx* ctx, const struct struct_or_union_specifier* p_struct_or_union_specifier) +struct member_declaration_list member_declaration_list(struct parser_ctx* ctx, struct struct_or_union_specifier* p_struct_or_union_specifier) { - struct member_declaration_list list = { 0 }; - //member_declaration - //member_declaration_list member_declaration + struct member_declaration_list list = { 0 }; + //member_declaration + //member_declaration_list member_declaration - struct member_declaration* owner p_member_declaration = NULL; + struct member_declaration* owner p_member_declaration = NULL; - try - { - p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); + try + { + p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); - if (p_member_declaration == NULL) throw; - LIST_ADD(&list, p_member_declaration); - p_member_declaration = NULL; /*MOVED*/ + if (p_member_declaration == NULL) throw; + LIST_ADD(&list, p_member_declaration); + p_member_declaration = NULL; /*MOVED*/ - while (ctx->current && ctx->current->type != '}') - { - p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); - if (p_member_declaration == NULL) throw; - LIST_ADD(&list, p_member_declaration); - p_member_declaration = NULL; /*MOVED*/ - } - } - catch - { - } + while (ctx->current && ctx->current->type != '}') + { + p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); + if (p_member_declaration == NULL) throw; + LIST_ADD(&list, p_member_declaration); + p_member_declaration = NULL; /*MOVED*/ + } + } + catch + { + } - return list; + return list; } void member_declaration_delete(struct member_declaration* owner p) { - if (p) - { - assert(p->next == NULL); - specifier_qualifier_list_delete(p->specifier_qualifier_list); - member_declarator_list_delete(p->member_declarator_list_opt); - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - static_assert_declaration_delete(p->static_assert_declaration); - free(p); - } + if (p) + { + assert(p->next == NULL); + specifier_qualifier_list_delete(p->specifier_qualifier_list); + member_declarator_list_delete(p->member_declarator_list_opt); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + static_assert_declaration_delete(p->static_assert_declaration); + free(p); + } } struct member_declaration* owner member_declaration(struct parser_ctx* ctx, - struct struct_or_union_specifier* p_struct_or_union_specifier) + struct struct_or_union_specifier* p_struct_or_union_specifier) { - struct member_declaration* owner p_member_declaration = calloc(1, sizeof(struct member_declaration)); - //attribute_specifier_sequence_opt specifier_qualifier_list member_declarator_list_opt ';' - //static_assert_declaration - if (ctx->current->type == TK_KEYWORD__STATIC_ASSERT) - { - p_member_declaration->static_assert_declaration = static_assert_declaration(ctx); - } - else - { - p_member_declaration->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + struct member_declaration* owner p_member_declaration = calloc(1, sizeof(struct member_declaration)); + //attribute_specifier_sequence_opt specifier_qualifier_list member_declarator_list_opt ';' + //static_assert_declaration + if (ctx->current->type == TK_KEYWORD__STATIC_ASSERT) + { + p_member_declaration->static_assert_declaration = static_assert_declaration(ctx); + } + else + { + p_member_declaration->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); - p_member_declaration->specifier_qualifier_list = specifier_qualifier_list(ctx); - if (ctx->current->type != ';') - { - p_member_declaration->member_declarator_list_opt = member_declarator_list(ctx, - p_struct_or_union_specifier, - p_member_declaration->specifier_qualifier_list); - } - parser_match_tk(ctx, ';'); - } - return p_member_declaration; + p_member_declaration->specifier_qualifier_list = specifier_qualifier_list(ctx); + if (ctx->current->type != ';') + { + p_member_declaration->member_declarator_list_opt = member_declarator_list(ctx, + p_struct_or_union_specifier, + p_member_declaration->specifier_qualifier_list); + } + parser_match_tk(ctx, ';'); + } + return p_member_declaration; } struct member_declarator* find_member_declarator(struct member_declaration_list* list, const char* name, int* p_member_index) { - int member_index = 0; - - struct member_declaration* p_member_declaration = list->head; - while (p_member_declaration) - { - struct member_declarator* p_member_declarator = NULL; - - if (p_member_declaration->member_declarator_list_opt) - { - p_member_declarator = p_member_declaration->member_declarator_list_opt->head; - - while (p_member_declarator) - { - if (strcmp(p_member_declarator->declarator->name->lexeme, name) == 0) - { - *p_member_index = member_index; - return p_member_declarator; - } + int member_index = 0; - member_index++; - p_member_declarator = p_member_declarator->next; - } - } - else if (p_member_declaration->specifier_qualifier_list) - { - /* - struct X { - union { - unsigned char Byte[16]; - unsigned short Word[8]; - }; - }; + struct member_declaration* p_member_declaration = list->head; + while (p_member_declaration) + { + struct member_declarator* p_member_declarator = NULL; - struct X* a; - a.Byte[0] & 0xe0; - */ + if (p_member_declaration->member_declarator_list_opt) + { + p_member_declarator = p_member_declaration->member_declarator_list_opt->head; - if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) - { - struct member_declaration_list* p_member_declaration_list = - &p_member_declaration->specifier_qualifier_list->struct_or_union_specifier->member_declaration_list; - int inner_member_index = 0; - struct member_declarator* p = find_member_declarator(p_member_declaration_list, name, &inner_member_index); - if (p) - { - *p_member_index = member_index + inner_member_index; - return p; - } - } - } - else - { - assert(p_member_declaration->static_assert_declaration != NULL); - } + while (p_member_declarator) + { + if (strcmp(p_member_declarator->declarator->name->lexeme, name) == 0) + { + *p_member_index = member_index; + return p_member_declarator; + } + member_index++; + p_member_declarator = p_member_declarator->next; + } + } + else if (p_member_declaration->specifier_qualifier_list) + { + /* + struct X { + union { + unsigned char Byte[16]; + unsigned short Word[8]; + }; + }; + + struct X* a; + a.Byte[0] & 0xe0; + */ - p_member_declaration = p_member_declaration->next; - } - return NULL; + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct member_declaration_list* p_member_declaration_list = + &p_member_declaration->specifier_qualifier_list->struct_or_union_specifier->member_declaration_list; + int inner_member_index = 0; + struct member_declarator* p = find_member_declarator(p_member_declaration_list, name, &inner_member_index); + if (p) + { + *p_member_index = member_index + inner_member_index; + return p; + } + } + } + else + { + assert(p_member_declaration->static_assert_declaration != NULL); + } + + + p_member_declaration = p_member_declaration->next; + } + return NULL; } void print_specifier_qualifier_list(struct osstream* ss, bool* first, struct specifier_qualifier_list* p_specifier_qualifier_list) { - print_type_qualifier_flags(ss, first, p_specifier_qualifier_list->type_qualifier_flags); + print_type_qualifier_flags(ss, first, p_specifier_qualifier_list->type_qualifier_flags); - if (p_specifier_qualifier_list->enum_specifier) - { + if (p_specifier_qualifier_list->enum_specifier) + { - //TODO - assert(false); + //TODO + assert(false); - } - else if (p_specifier_qualifier_list->struct_or_union_specifier) - { - ss_fprintf(ss, "struct %s", p_specifier_qualifier_list->struct_or_union_specifier->tag_name); - } - else if (p_specifier_qualifier_list->typedef_declarator) - { - print_item(ss, first, p_specifier_qualifier_list->typedef_declarator->name->lexeme); - } - else - { - print_type_specifier_flags(ss, first, p_specifier_qualifier_list->type_specifier_flags); - } + } + else if (p_specifier_qualifier_list->struct_or_union_specifier) + { + ss_fprintf(ss, "struct %s", p_specifier_qualifier_list->struct_or_union_specifier->tag_name); + } + else if (p_specifier_qualifier_list->typedef_declarator) + { + print_item(ss, first, p_specifier_qualifier_list->typedef_declarator->name->lexeme); + } + else + { + print_type_specifier_flags(ss, first, p_specifier_qualifier_list->type_specifier_flags); + } } void specifier_qualifier_list_delete(struct specifier_qualifier_list* owner p) { - if (p) - { - struct type_specifier_qualifier* owner item = p->head; - while (item) - { - struct type_specifier_qualifier* owner next = item->next; - item->next = NULL; - type_specifier_qualifier_delete(item); - item = next; - } + if (p) + { + struct type_specifier_qualifier* owner item = p->head; + while (item) + { + struct type_specifier_qualifier* owner next = item->next; + item->next = NULL; + type_specifier_qualifier_delete(item); + item = next; + } - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence); - free(p); - } + free(p); + } } struct specifier_qualifier_list* owner specifier_qualifier_list(struct parser_ctx* ctx) { - struct specifier_qualifier_list* owner p_specifier_qualifier_list = calloc(1, sizeof(struct specifier_qualifier_list)); - if (p_specifier_qualifier_list == NULL) - return NULL; + struct specifier_qualifier_list* owner p_specifier_qualifier_list = calloc(1, sizeof(struct specifier_qualifier_list)); + if (p_specifier_qualifier_list == NULL) + return NULL; - static_set(*p_specifier_qualifier_list, "zero"); + static_set(*p_specifier_qualifier_list, "zero"); - /* - type_specifier_qualifier attribute_specifier_sequence_opt - type_specifier_qualifier specifier_qualifier_list - */ - try - { - p_specifier_qualifier_list->first_token = ctx->current; + /* + type_specifier_qualifier attribute_specifier_sequence_opt + type_specifier_qualifier specifier_qualifier_list + */ + try + { + p_specifier_qualifier_list->first_token = ctx->current; - while (ctx->current != NULL && - (first_of_type_specifier(ctx) || - first_of_type_qualifier(ctx))) - { + while (ctx->current != NULL && + (first_of_type_specifier(ctx) || + first_of_type_qualifier(ctx))) + { - if (ctx->current->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) - { - if (p_specifier_qualifier_list->type_specifier_flags != TYPE_SPECIFIER_NONE) - { - //typedef tem que aparecer sozinho - //exemplo Socket eh nome e nao typdef - //typedef int Socket; - //struct X {int Socket;}; - break; - } - } + if (ctx->current->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) + { + if (p_specifier_qualifier_list->type_specifier_flags != TYPE_SPECIFIER_NONE) + { + //typedef tem que aparecer sozinho + //exemplo Socket eh nome e nao typdef + //typedef int Socket; + //struct X {int Socket;}; + break; + } + } - struct type_specifier_qualifier* owner p_type_specifier_qualifier = type_specifier_qualifier(ctx); + struct type_specifier_qualifier* owner p_type_specifier_qualifier = type_specifier_qualifier(ctx); - if (p_type_specifier_qualifier->type_specifier) - { - if (add_specifier(ctx, - &p_specifier_qualifier_list->type_specifier_flags, - p_type_specifier_qualifier->type_specifier->flags) != 0) - { - type_specifier_qualifier_delete(p_type_specifier_qualifier); - throw; - } + if (p_type_specifier_qualifier->type_specifier) + { + if (add_specifier(ctx, + &p_specifier_qualifier_list->type_specifier_flags, + p_type_specifier_qualifier->type_specifier->flags) != 0) + { + type_specifier_qualifier_delete(p_type_specifier_qualifier); + throw; + } - if (p_type_specifier_qualifier->type_specifier->struct_or_union_specifier) - { - p_specifier_qualifier_list->struct_or_union_specifier = p_type_specifier_qualifier->type_specifier->struct_or_union_specifier; - } - else if (p_type_specifier_qualifier->type_specifier->enum_specifier) - { - p_specifier_qualifier_list->enum_specifier = p_type_specifier_qualifier->type_specifier->enum_specifier; - } - else if (p_type_specifier_qualifier->type_specifier->typeof_specifier) - { - p_specifier_qualifier_list->typeof_specifier = p_type_specifier_qualifier->type_specifier->typeof_specifier; - } - else if (p_type_specifier_qualifier->type_specifier->token->type == TK_IDENTIFIER) - { - p_specifier_qualifier_list->typedef_declarator = - find_declarator(ctx, - p_type_specifier_qualifier->type_specifier->token->lexeme, - NULL); - } + if (p_type_specifier_qualifier->type_specifier->struct_or_union_specifier) + { + p_specifier_qualifier_list->struct_or_union_specifier = p_type_specifier_qualifier->type_specifier->struct_or_union_specifier; + } + else if (p_type_specifier_qualifier->type_specifier->enum_specifier) + { + p_specifier_qualifier_list->enum_specifier = p_type_specifier_qualifier->type_specifier->enum_specifier; + } + else if (p_type_specifier_qualifier->type_specifier->typeof_specifier) + { + p_specifier_qualifier_list->typeof_specifier = p_type_specifier_qualifier->type_specifier->typeof_specifier; + } + else if (p_type_specifier_qualifier->type_specifier->token->type == TK_IDENTIFIER) + { + p_specifier_qualifier_list->typedef_declarator = + find_declarator(ctx, + p_type_specifier_qualifier->type_specifier->token->lexeme, + NULL); + } - } - else if (p_type_specifier_qualifier->type_qualifier) - { - p_specifier_qualifier_list->type_qualifier_flags |= p_type_specifier_qualifier->type_qualifier->flags; - } + } + else if (p_type_specifier_qualifier->type_qualifier) + { + p_specifier_qualifier_list->type_qualifier_flags |= p_type_specifier_qualifier->type_qualifier->flags; + } - LIST_ADD(p_specifier_qualifier_list, p_type_specifier_qualifier); - p_specifier_qualifier_list->p_attribute_specifier_sequence = attribute_specifier_sequence_opt(ctx); - } - } - catch - { - } + LIST_ADD(p_specifier_qualifier_list, p_type_specifier_qualifier); + p_specifier_qualifier_list->p_attribute_specifier_sequence = attribute_specifier_sequence_opt(ctx); + } + } + catch + { + } - final_specifier(ctx, &p_specifier_qualifier_list->type_specifier_flags); - p_specifier_qualifier_list->last_token = previous_parser_token(ctx->current); - return p_specifier_qualifier_list; + final_specifier(ctx, &p_specifier_qualifier_list->type_specifier_flags); + p_specifier_qualifier_list->last_token = previous_parser_token(ctx->current); + return p_specifier_qualifier_list; } void type_specifier_qualifier_delete(struct type_specifier_qualifier* owner p) { - if (p) - { - assert(p->next == NULL); - if (p->type_qualifier) - { - assert(p->type_qualifier->next == NULL); - free(p->type_qualifier); - } - alignment_specifier_delete(p->alignment_specifier); + if (p) + { + assert(p->next == NULL); + if (p->type_qualifier) + { + assert(p->type_qualifier->next == NULL); + free(p->type_qualifier); + } + alignment_specifier_delete(p->alignment_specifier); - type_specifier_delete(p->type_specifier); - free(p); - } + type_specifier_delete(p->type_specifier); + free(p); + } } struct type_specifier_qualifier* owner type_specifier_qualifier(struct parser_ctx* ctx) { - struct type_specifier_qualifier* owner type_specifier_qualifier = calloc(1, sizeof * type_specifier_qualifier); - //type_specifier - //type_qualifier - //alignment_specifier - if (first_of_type_specifier(ctx)) - { - type_specifier_qualifier->type_specifier = type_specifier(ctx); - } - else if (first_of_type_qualifier(ctx)) - { - type_specifier_qualifier->type_qualifier = type_qualifier(ctx); - } - else if (first_of_alignment_specifier(ctx)) - { - type_specifier_qualifier->alignment_specifier = alignment_specifier(ctx); - } - else - { - assert(false); - } - return type_specifier_qualifier; + struct type_specifier_qualifier* owner type_specifier_qualifier = calloc(1, sizeof * type_specifier_qualifier); + //type_specifier + //type_qualifier + //alignment_specifier + if (first_of_type_specifier(ctx)) + { + type_specifier_qualifier->type_specifier = type_specifier(ctx); + } + else if (first_of_type_qualifier(ctx)) + { + type_specifier_qualifier->type_qualifier = type_qualifier(ctx); + } + else if (first_of_alignment_specifier(ctx)) + { + type_specifier_qualifier->alignment_specifier = alignment_specifier(ctx); + } + else + { + assert(false); + } + return type_specifier_qualifier; } void enum_specifier_delete(struct enum_specifier* owner p) { - if (p) - { - specifier_qualifier_list_delete(p->specifier_qualifier_list); - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - enumerator_list_destroy(&p->enumerator_list); - free(p); - } + if (p) + { + specifier_qualifier_list_delete(p->specifier_qualifier_list); + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + enumerator_list_destroy(&p->enumerator_list); + free(p); + } } struct enum_specifier* owner enum_specifier(struct parser_ctx* ctx) { - /* - enum-type-specifier: - : specifier-qualifier-list - */ - - /* - enum-specifier: + /* + enum-type-specifier: + : specifier-qualifier-list + */ - "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt - { enumerator-list } + /* + enum-specifier: - "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt - { enumerator-list , } - enum identifier enum-type-specifier opt - */ - struct enum_specifier* owner p_enum_specifier = NULL; - try - { - p_enum_specifier = calloc(1, sizeof * p_enum_specifier); + "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt + { enumerator-list } - p_enum_specifier->first_token = ctx->current; - parser_match_tk(ctx, TK_KEYWORD_ENUM); + "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt + { enumerator-list , } + enum identifier enum-type-specifier opt + */ + struct enum_specifier* owner p_enum_specifier = NULL; + try + { + p_enum_specifier = calloc(1, sizeof * p_enum_specifier); - p_enum_specifier->attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + p_enum_specifier->first_token = ctx->current; + parser_match_tk(ctx, TK_KEYWORD_ENUM); + p_enum_specifier->attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - struct enum_specifier* p_previous_tag_in_this_scope = NULL; - bool has_identifier = false; - if (ctx->current->type == TK_IDENTIFIER) - { - has_identifier = true; - p_enum_specifier->tag_token = ctx->current; - parser_match(ctx); - } - if (ctx->current->type == ':') - { - /*C23*/ - parser_match(ctx); - p_enum_specifier->specifier_qualifier_list = specifier_qualifier_list(ctx); - } + struct enum_specifier* p_previous_tag_in_this_scope = NULL; + bool has_identifier = false; + if (ctx->current->type == TK_IDENTIFIER) + { + has_identifier = true; + p_enum_specifier->tag_token = ctx->current; + parser_match(ctx); + } - if (ctx->current->type == '{') - { - if (p_enum_specifier->tag_token) - naming_convention_enum_tag(ctx, p_enum_specifier->tag_token); + if (ctx->current->type == ':') + { + /*C23*/ + parser_match(ctx); + p_enum_specifier->specifier_qualifier_list = specifier_qualifier_list(ctx); + } - /*points to itself*/ - p_enum_specifier->complete_enum_specifier = p_enum_specifier; + if (ctx->current->type == '{') + { + if (p_enum_specifier->tag_token) + naming_convention_enum_tag(ctx, p_enum_specifier->tag_token); - parser_match_tk(ctx, '{'); - p_enum_specifier->enumerator_list = enumerator_list(ctx, p_enum_specifier); - if (ctx->current->type == ',') - { - parser_match(ctx); - } - parser_match_tk(ctx, '}'); - } - else - { - if (!has_identifier) - { - compiler_set_error_with_token(C_MISSING_ENUM_TAG_NAME, ctx, ctx->current, "missing enum tag name"); - throw; - } - } + /*points to itself*/ + p_enum_specifier->complete_enum_specifier = p_enum_specifier; - /* - * Let's search for this tag at current scope only - */ - struct map_entry* p_entry = NULL; + parser_match_tk(ctx, '{'); + p_enum_specifier->enumerator_list = enumerator_list(ctx, p_enum_specifier); + if (ctx->current->type == ',') + { + parser_match(ctx); + } + parser_match_tk(ctx, '}'); + } + else + { + if (!has_identifier) + { + compiler_diagnostic_message(ERROR_MISSING_ENUM_TAG_NAME, ctx, ctx->current, "missing enum tag name"); + throw; + } + } - if (p_enum_specifier->tag_token && - p_enum_specifier->tag_token->lexeme) - { - p_entry = hashmap_find(&ctx->scopes.tail->tags, p_enum_specifier->tag_token->lexeme); - } - if (p_entry) - { - /* - ok.. we have this tag at this scope - */ - if (p_entry->type == TAG_TYPE_ENUN_SPECIFIER) - { - p_previous_tag_in_this_scope = p_entry->p; + /* + * Let's search for this tag at current scope only + */ + struct map_entry* p_entry = NULL; - if (p_previous_tag_in_this_scope->enumerator_list.head != NULL && - p_enum_specifier->enumerator_list.head != NULL) - { - compiler_set_error_with_token(C_MULTIPLE_DEFINITION_ENUM, - ctx, - p_enum_specifier->tag_token, - "multiple definition of 'enum %s'", - p_enum_specifier->tag_token->lexeme); - } - else if (p_previous_tag_in_this_scope->enumerator_list.head != NULL) - { - p_enum_specifier->complete_enum_specifier = p_previous_tag_in_this_scope; - } - else if (p_enum_specifier->enumerator_list.head != NULL) - { - p_previous_tag_in_this_scope->complete_enum_specifier = p_enum_specifier; - } - } - else - { - compiler_set_error_with_token(C_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, - ctx, - ctx->current, "use of '%s' with tag type that does not match previous declaration.", - ctx->current->lexeme); - throw; - } - } - else - { - /* - * we didn't find at current scope let's search in previous scopes - */ - struct enum_specifier* p_other = NULL; + if (p_enum_specifier->tag_token && + p_enum_specifier->tag_token->lexeme) + { + p_entry = hashmap_find(&ctx->scopes.tail->tags, p_enum_specifier->tag_token->lexeme); + } + if (p_entry) + { + /* + ok.. we have this tag at this scope + */ + if (p_entry->type == TAG_TYPE_ENUN_SPECIFIER) + { + p_previous_tag_in_this_scope = p_entry->p; - if (p_enum_specifier->tag_token) - { - p_other = find_enum_specifier(ctx, p_enum_specifier->tag_token->lexeme); - } + if (p_previous_tag_in_this_scope->enumerator_list.head != NULL && + p_enum_specifier->enumerator_list.head != NULL) + { + compiler_diagnostic_message(ERROR_MULTIPLE_DEFINITION_ENUM, + ctx, + p_enum_specifier->tag_token, + "multiple definition of 'enum %s'", + p_enum_specifier->tag_token->lexeme); + } + else if (p_previous_tag_in_this_scope->enumerator_list.head != NULL) + { + p_enum_specifier->complete_enum_specifier = p_previous_tag_in_this_scope; + } + else if (p_enum_specifier->enumerator_list.head != NULL) + { + p_previous_tag_in_this_scope->complete_enum_specifier = p_enum_specifier; + } + } + else + { + compiler_diagnostic_message(ERROR_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, + ctx, + ctx->current, "use of '%s' with tag type that does not match previous declaration.", + ctx->current->lexeme); + throw; + } + } + else + { + /* + * we didn't find at current scope let's search in previous scopes + */ + struct enum_specifier* p_other = NULL; - if (p_other == NULL) - { - /* - * we didn't find, so this is the first time this tag is used - */ - if (p_enum_specifier->tag_token) - { - hashmap_set(&ctx->scopes.tail->tags, p_enum_specifier->tag_token->lexeme, p_enum_specifier, TAG_TYPE_ENUN_SPECIFIER); - } - else - { - //make a name? - } - } - else - { + if (p_enum_specifier->tag_token) + { + p_other = find_enum_specifier(ctx, p_enum_specifier->tag_token->lexeme); + } + if (p_other == NULL) + { + /* + * we didn't find, so this is the first time this tag is used + */ + if (p_enum_specifier->tag_token) + { + hashmap_set(&ctx->scopes.tail->tags, p_enum_specifier->tag_token->lexeme, p_enum_specifier, TAG_TYPE_ENUN_SPECIFIER); + } + else + { + //make a name? + } + } + else + { - /* - * we found this enum tag in previous scopes - */ - if (p_enum_specifier->enumerator_list.head != NULL) - { - /*it is a new definition - itself*/ - //p_enum_specifier->complete_enum_specifier = p_enum_specifier; - } - else if (p_other->enumerator_list.head != NULL) - { - /*previous enum is complete*/ - p_enum_specifier->complete_enum_specifier = p_other; - } - } - } + /* + * we found this enum tag in previous scopes + */ - } - catch - { - } + if (p_enum_specifier->enumerator_list.head != NULL) + { + /*it is a new definition - itself*/ + //p_enum_specifier->complete_enum_specifier = p_enum_specifier; + } + else if (p_other->enumerator_list.head != NULL) + { + /*previous enum is complete*/ + p_enum_specifier->complete_enum_specifier = p_other; + } + } + } + + } + catch + { + } - return p_enum_specifier; + return p_enum_specifier; } void enumerator_list_destroy(struct enumerator_list* obj_owner p) { - struct enumerator* owner item = p->head; - while (item) - { - struct enumerator* owner next = item->next; - item->next = NULL; - enumerator_delete(item); - item = next; - } + struct enumerator* owner item = p->head; + while (item) + { + struct enumerator* owner next = item->next; + item->next = NULL; + enumerator_delete(item); + item = next; + } } struct enumerator_list enumerator_list(struct parser_ctx* ctx, const struct enum_specifier* p_enum_specifier) { - /* - enumerator - enumerator_list ',' enumerator - */ - long long next_enumerator_value = 0; + /* + enumerator + enumerator_list ',' enumerator + */ + long long next_enumerator_value = 0; - struct enumerator_list enumeratorlist = { 0 }; - struct enumerator* owner p_enumerator = NULL; - try - { - p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); - if (p_enumerator == NULL) throw; + struct enumerator_list enumeratorlist = { 0 }; + struct enumerator* owner p_enumerator = NULL; + try + { + p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); + if (p_enumerator == NULL) throw; - LIST_ADD(&enumeratorlist, p_enumerator); + LIST_ADD(&enumeratorlist, p_enumerator); - while (ctx->current != NULL && ctx->current->type == ',') - { - parser_match(ctx); /*pode ter uma , vazia no fim*/ + while (ctx->current != NULL && ctx->current->type == ',') + { + parser_match(ctx); /*pode ter uma , vazia no fim*/ - if (ctx->current && ctx->current->type != '}') - { - p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); - if (p_enumerator == NULL) throw; - LIST_ADD(&enumeratorlist, p_enumerator); - } - } - } - catch - { - } + if (ctx->current && ctx->current->type != '}') + { + p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); + if (p_enumerator == NULL) throw; + LIST_ADD(&enumeratorlist, p_enumerator); + } + } + } + catch + { + } - return enumeratorlist; + return enumeratorlist; } void enumerator_delete(struct enumerator* owner p) { - if (p) - { - assert(p->next == NULL); - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - expression_delete(p->constant_expression_opt); + if (p) + { + assert(p->next == NULL); + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + expression_delete(p->constant_expression_opt); - free(p); - } + free(p); + } } struct enumerator* owner enumerator(struct parser_ctx* ctx, - const struct enum_specifier* p_enum_specifier, - long long* p_next_enumerator_value) + const struct enum_specifier* p_enum_specifier, + long long* p_next_enumerator_value) { - //TODO VALUE - struct enumerator* owner p_enumerator = calloc(1, sizeof(struct enumerator)); - p_enumerator->enum_specifier = p_enum_specifier; - struct token* name = ctx->current; + //TODO VALUE + struct enumerator* owner p_enumerator = calloc(1, sizeof(struct enumerator)); + p_enumerator->enum_specifier = p_enum_specifier; + struct token* name = ctx->current; - naming_convention_enumerator(ctx, name); + naming_convention_enumerator(ctx, name); - parser_match_tk(ctx, TK_IDENTIFIER); + parser_match_tk(ctx, TK_IDENTIFIER); - p_enumerator->attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + p_enumerator->attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); - p_enumerator->token = name; - hashmap_set(&ctx->scopes.tail->variables, p_enumerator->token->lexeme, p_enumerator, TAG_TYPE_ENUMERATOR); + p_enumerator->token = name; + hashmap_set(&ctx->scopes.tail->variables, p_enumerator->token->lexeme, p_enumerator, TAG_TYPE_ENUMERATOR); - if (ctx->current->type == '=') - { - parser_match(ctx); - p_enumerator->constant_expression_opt = constant_expression(ctx, true); - p_enumerator->value = constant_value_to_ll(&p_enumerator->constant_expression_opt->constant_value); - *p_next_enumerator_value = p_enumerator->value; - (*p_next_enumerator_value)++; //TODO overflow and size check - } - else - { - p_enumerator->value = *p_next_enumerator_value; - (*p_next_enumerator_value)++; //TODO overflow and size check - } + if (ctx->current->type == '=') + { + parser_match(ctx); + p_enumerator->constant_expression_opt = constant_expression(ctx, true); + p_enumerator->value = constant_value_to_ll(&p_enumerator->constant_expression_opt->constant_value); + *p_next_enumerator_value = p_enumerator->value; + (*p_next_enumerator_value)++; //TODO overflow and size check + } + else + { + p_enumerator->value = *p_next_enumerator_value; + (*p_next_enumerator_value)++; //TODO overflow and size check + } - return p_enumerator; + return p_enumerator; } void alignment_specifier_delete(struct alignment_specifier* owner p) { - if (p) - { - expression_delete(p->constant_expression); - type_name_delete(p->type_name); - free(p); - } + if (p) + { + expression_delete(p->constant_expression); + type_name_delete(p->type_name); + free(p); + } } struct alignment_specifier* owner alignment_specifier(struct parser_ctx* ctx) { - struct alignment_specifier* owner alignment_specifier = calloc(1, sizeof * alignment_specifier); - alignment_specifier->token = ctx->current; - parser_match_tk(ctx, TK_KEYWORD__ALIGNAS); - parser_match_tk(ctx, '('); - if (first_of_type_name(ctx)) - { - alignment_specifier->type_name = type_name(ctx); - } - else - { - alignment_specifier->constant_expression = constant_expression(ctx, true); - } - parser_match_tk(ctx, ')'); - return alignment_specifier; + struct alignment_specifier* owner alignment_specifier = calloc(1, sizeof * alignment_specifier); + alignment_specifier->token = ctx->current; + parser_match_tk(ctx, TK_KEYWORD__ALIGNAS); + parser_match_tk(ctx, '('); + if (first_of_type_name(ctx)) + { + alignment_specifier->type_name = type_name(ctx); + } + else + { + alignment_specifier->constant_expression = constant_expression(ctx, true); + } + parser_match_tk(ctx, ')'); + return alignment_specifier; } void atomic_type_specifier_delete(struct atomic_type_specifier* owner p) { - if (p) - { - type_name_delete(p->type_name); - free(p); - } + if (p) + { + type_name_delete(p->type_name); + free(p); + } } struct atomic_type_specifier* owner atomic_type_specifier(struct parser_ctx* ctx) { - //'_Atomic' '(' type_name ')' - struct atomic_type_specifier* owner p = calloc(1, sizeof * p); - p->token = ctx->current; - parser_match_tk(ctx, TK_KEYWORD__ATOMIC); - parser_match_tk(ctx, '('); - p->type_name = type_name(ctx); - parser_match_tk(ctx, ')'); - return p; + //'_Atomic' '(' type_name ')' + struct atomic_type_specifier* owner p = calloc(1, sizeof * p); + p->token = ctx->current; + parser_match_tk(ctx, TK_KEYWORD__ATOMIC); + parser_match_tk(ctx, '('); + p->type_name = type_name(ctx); + parser_match_tk(ctx, ')'); + return p; } struct type_qualifier* owner type_qualifier(struct parser_ctx* ctx) { - struct type_qualifier* owner p_type_qualifier = calloc(1, sizeof * p_type_qualifier); - - switch (ctx->current->type) - { - case TK_KEYWORD_CONST: - p_type_qualifier->flags = TYPE_QUALIFIER_CONST; - break; - case TK_KEYWORD_RESTRICT: - p_type_qualifier->flags = TYPE_QUALIFIER_RESTRICT; - break; - case TK_KEYWORD_VOLATILE: - p_type_qualifier->flags = TYPE_QUALIFIER_VOLATILE; - break; - case TK_KEYWORD__ATOMIC: - p_type_qualifier->flags = TYPE_QUALIFIER__ATOMIC; - break; + struct type_qualifier* owner p_type_qualifier = calloc(1, sizeof * p_type_qualifier); - /* - ownership extensions - */ + switch (ctx->current->type) + { + case TK_KEYWORD_CONST: + p_type_qualifier->flags = TYPE_QUALIFIER_CONST; + break; + case TK_KEYWORD_RESTRICT: + p_type_qualifier->flags = TYPE_QUALIFIER_RESTRICT; + break; + case TK_KEYWORD_VOLATILE: + p_type_qualifier->flags = TYPE_QUALIFIER_VOLATILE; + break; + case TK_KEYWORD__ATOMIC: + p_type_qualifier->flags = TYPE_QUALIFIER__ATOMIC; + break; - case TK_KEYWORD__OUT: - p_type_qualifier->flags = TYPE_QUALIFIER_OUT; - break; + /* + ownership extensions + */ - case TK_KEYWORD__OWNER: - p_type_qualifier->flags = TYPE_QUALIFIER_OWNER; - break; + case TK_KEYWORD__OUT: + p_type_qualifier->flags = TYPE_QUALIFIER_OUT; + break; - case TK_KEYWORD__OPT: - p_type_qualifier->flags = TYPE_QUALIFIER_OPT; - break; + case TK_KEYWORD__OWNER: + p_type_qualifier->flags = TYPE_QUALIFIER_OWNER; + break; - case TK_KEYWORD__OBJ_OWNER: - p_type_qualifier->flags = TYPE_QUALIFIER_OBJ_OWNER; - break; - case TK_KEYWORD__VIEW: - p_type_qualifier->flags = TYPE_QUALIFIER_VIEW; - break; + case TK_KEYWORD__OPT: + p_type_qualifier->flags = TYPE_QUALIFIER_OPT; + break; - } + case TK_KEYWORD__OBJ_OWNER: + p_type_qualifier->flags = TYPE_QUALIFIER_OBJ_OWNER; + break; + case TK_KEYWORD__VIEW: + p_type_qualifier->flags = TYPE_QUALIFIER_VIEW; + break; + default: + // do nothing + break; + } - p_type_qualifier->token = ctx->current; + p_type_qualifier->token = ctx->current; - //'const' - //'restrict' - //'volatile' - //'_Atomic' - parser_match(ctx); - return p_type_qualifier; + //'const' + //'restrict' + //'volatile' + //'_Atomic' + parser_match(ctx); + return p_type_qualifier; } // struct type_qualifier* owner type_qualifier_opt(struct parser_ctx* ctx) { - if (first_of_type_qualifier(ctx)) - { - return type_qualifier(ctx); - } - return NULL; + if (first_of_type_qualifier(ctx)) + { + return type_qualifier(ctx); + } + return NULL; } void function_specifier_delete(struct function_specifier* owner p) { - if (p) - { - free(p); - } + if (p) + { + free(p); + } } struct function_specifier* owner function_specifier(struct parser_ctx* ctx) { - if (ctx->current->type == TK_KEYWORD__NORETURN) - { - compiler_set_info_with_token(W_STYLE, ctx, ctx->current, "_Noreturn is deprecated use attributes"); - } + if (ctx->current->type == TK_KEYWORD__NORETURN) + { + compiler_diagnostic_message(W_STYLE, ctx, ctx->current, "_Noreturn is deprecated use attributes"); + } - struct function_specifier* owner p_function_specifier = NULL; - try - { - p_function_specifier = calloc(1, sizeof * p_function_specifier); - if (p_function_specifier == NULL) throw; + struct function_specifier* owner p_function_specifier = NULL; + try + { + p_function_specifier = calloc(1, sizeof * p_function_specifier); + if (p_function_specifier == NULL) throw; - p_function_specifier->token = ctx->current; - parser_match(ctx); + p_function_specifier->token = ctx->current; + parser_match(ctx); - } - catch - { - } + } + catch + { + } - return p_function_specifier; + return p_function_specifier; } void declarator_delete(struct declarator* owner p) { - if (p) - { - type_destroy(&p->type); - direct_declarator_delete(p->direct_declarator); - pointer_delete(p->pointer); - object_destroy(&p->object); - free(p); - } + if (p) + { + type_destroy(&p->type); + direct_declarator_delete(p->direct_declarator); + pointer_delete(p->pointer); + object_destroy(&p->object); + free(p); + } } struct declarator* owner declarator(struct parser_ctx* ctx, - const struct specifier_qualifier_list* p_specifier_qualifier_list, - struct declaration_specifiers* p_declaration_specifiers, - bool abstract_acceptable, - struct token** pp_token_name) + const struct specifier_qualifier_list* p_specifier_qualifier_list, + struct declaration_specifiers* p_declaration_specifiers, + bool abstract_acceptable, + struct token** pp_token_name) { - /* - declarator: - pointer_opt direct-declarator - */ - struct declarator* owner p_declarator = calloc(1, sizeof(struct declarator)); - p_declarator->first_token = ctx->current; - p_declarator->pointer = pointer_opt(ctx); - p_declarator->direct_declarator = direct_declarator(ctx, p_specifier_qualifier_list, p_declaration_specifiers, abstract_acceptable, pp_token_name); + /* + declarator: + pointer_opt direct-declarator + */ + struct declarator* owner p_declarator = calloc(1, sizeof(struct declarator)); + p_declarator->first_token = ctx->current; + p_declarator->pointer = pointer_opt(ctx); + p_declarator->direct_declarator = direct_declarator(ctx, p_specifier_qualifier_list, p_declaration_specifiers, abstract_acceptable, pp_token_name); - if (ctx->current != p_declarator->first_token) - { - p_declarator->last_token = previous_parser_token(ctx->current); - } - else - { - /*empty declarator*/ + if (ctx->current != p_declarator->first_token) + { + p_declarator->last_token = previous_parser_token(ctx->current); + } + else + { + /*empty declarator*/ - p_declarator->last_token = p_declarator->first_token; - p_declarator->first_token = NULL; /*this is the way we can know...first is null*/ - } + p_declarator->last_token = p_declarator->first_token; + p_declarator->first_token = NULL; /*this is the way we can know...first is null*/ + } - return p_declarator; + return p_declarator; } const char* declarator_get_name(struct declarator* p_declarator) { - if (p_declarator->direct_declarator) - { - if (p_declarator->direct_declarator->name_opt) - return p_declarator->direct_declarator->name_opt->lexeme; - } + if (p_declarator->direct_declarator) + { + if (p_declarator->direct_declarator->name_opt) + return p_declarator->direct_declarator->name_opt->lexeme; + } - return NULL; + return NULL; } bool declarator_is_function(struct declarator* p_declarator) { - return (p_declarator->direct_declarator && - p_declarator->direct_declarator->function_declarator != NULL); + return (p_declarator->direct_declarator && + p_declarator->direct_declarator->function_declarator != NULL); } @@ -25544,583 +25834,583 @@ struct function_declarator* owner function_declarator(struct direct_declarator* void function_declarator_delete(struct function_declarator* owner p) { - if (p) - { - direct_declarator_delete(p->direct_declarator); - scope_destroy(&p->parameters_scope); - parameter_type_list_delete(p->parameter_type_list_opt); - free(p); - } + if (p) + { + direct_declarator_delete(p->direct_declarator); + scope_destroy(&p->parameters_scope); + parameter_type_list_delete(p->parameter_type_list_opt); + free(p); + } } void direct_declarator_delete(struct direct_declarator* owner p) { - if (p) - { - declarator_delete(p->declarator); - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - array_declarator_delete(p->array_declarator); - function_declarator_delete(p->function_declarator); + if (p) + { + declarator_delete(p->declarator); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + array_declarator_delete(p->array_declarator); + function_declarator_delete(p->function_declarator); - free(p); - } + free(p); + } } struct direct_declarator* owner direct_declarator(struct parser_ctx* ctx, - const struct specifier_qualifier_list* p_specifier_qualifier_list, - struct declaration_specifiers* p_declaration_specifiers, - bool abstract_acceptable, - struct token** pptoken_name) + const struct specifier_qualifier_list* p_specifier_qualifier_list, + struct declaration_specifiers* p_declaration_specifiers, + bool abstract_acceptable, + struct token** pptoken_name) { - /* - direct-declarator: - identifier attribute-specifier-sequenceopt - ( declarator ) + /* + direct-declarator: + identifier attribute-specifier-sequenceopt + ( declarator ) - array-declarator attribute-specifier-sequenceopt - function-declarator attribute-specifier-sequenceopt - */ - struct direct_declarator* owner p_direct_declarator = calloc(1, sizeof(struct direct_declarator)); - try - { - if (ctx->current == NULL) throw; + array-declarator attribute-specifier-sequenceopt + function-declarator attribute-specifier-sequenceopt + */ + struct direct_declarator* owner p_direct_declarator = calloc(1, sizeof(struct direct_declarator)); + try + { + if (ctx->current == NULL) throw; - struct token* p_token_ahead = parser_look_ahead(ctx); - if (ctx->current->type == TK_IDENTIFIER) - { - p_direct_declarator->name_opt = ctx->current; - if (pptoken_name != NULL) - { - *pptoken_name = ctx->current; - } + struct token* p_token_ahead = parser_look_ahead(ctx); + if (ctx->current->type == TK_IDENTIFIER) + { + p_direct_declarator->name_opt = ctx->current; + if (pptoken_name != NULL) + { + *pptoken_name = ctx->current; + } - parser_match(ctx); - p_direct_declarator->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); - } - else if (ctx->current->type == '(') - { - struct token* ahead = parser_look_ahead(ctx); + parser_match(ctx); + p_direct_declarator->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + } + else if (ctx->current->type == '(') + { + struct token* ahead = parser_look_ahead(ctx); - if (!first_of_type_specifier_token(ctx, p_token_ahead) && - !first_of_type_qualifier_token(p_token_ahead) && - ahead->type != ')' && - ahead->type != '...') - { - //look ahead para nao confundir (declarator) com parametros funcao ex void (int) - //or function int () + if (!first_of_type_specifier_token(ctx, p_token_ahead) && + !first_of_type_qualifier_token(p_token_ahead) && + ahead->type != ')' && + ahead->type != '...') + { + //look ahead para nao confundir (declarator) com parametros funcao ex void (int) + //or function int () - parser_match(ctx); + parser_match(ctx); - p_direct_declarator->declarator = declarator(ctx, - p_specifier_qualifier_list, - p_declaration_specifiers, - abstract_acceptable, - pptoken_name); + p_direct_declarator->declarator = declarator(ctx, + p_specifier_qualifier_list, + p_declaration_specifiers, + abstract_acceptable, + pptoken_name); - parser_match(ctx); //) - } - } + parser_match(ctx); //) + } + } - while (ctx->current != NULL && - (ctx->current->type == '[' || ctx->current->type == '(')) - { - struct direct_declarator* owner p_direct_declarator2 = calloc(1, sizeof(struct direct_declarator)); - static_set(*p_direct_declarator2, "zero"); - if (ctx->current->type == '[') - { - p_direct_declarator2->array_declarator = array_declarator(p_direct_declarator, ctx); - } - else - { - p_direct_declarator2->function_declarator = function_declarator(p_direct_declarator, ctx); - } - p_direct_declarator = p_direct_declarator2; - } - } - catch - { - } + while (ctx->current != NULL && + (ctx->current->type == '[' || ctx->current->type == '(')) + { + struct direct_declarator* owner p_direct_declarator2 = calloc(1, sizeof(struct direct_declarator)); + static_set(*p_direct_declarator2, "zero"); + if (ctx->current->type == '[') + { + p_direct_declarator2->array_declarator = array_declarator(p_direct_declarator, ctx); + } + else + { + p_direct_declarator2->function_declarator = function_declarator(p_direct_declarator, ctx); + } + p_direct_declarator = p_direct_declarator2; + } + } + catch + { + } - return p_direct_declarator; + return p_direct_declarator; } void array_declarator_delete(struct array_declarator* owner p) { - if (p) - { - expression_delete(p->assignment_expression); - direct_declarator_delete(p->direct_declarator); - expression_delete(p->expression); - type_qualifier_list_delete(p->type_qualifier_list_opt); + if (p) + { + expression_delete(p->assignment_expression); + direct_declarator_delete(p->direct_declarator); + expression_delete(p->expression); + type_qualifier_list_delete(p->type_qualifier_list_opt); - free(p); - } + free(p); + } } unsigned long long array_declarator_get_size(struct array_declarator* p_array_declarator) { - if (p_array_declarator->assignment_expression) - { - if (constant_value_is_valid(&p_array_declarator->assignment_expression->constant_value)) - { - return - constant_value_to_ull(&p_array_declarator->assignment_expression->constant_value); - } - } - return 0; + if (p_array_declarator->assignment_expression) + { + if (constant_value_is_valid(&p_array_declarator->assignment_expression->constant_value)) + { + return + constant_value_to_ull(&p_array_declarator->assignment_expression->constant_value); + } + } + return 0; } struct array_declarator* owner array_declarator(struct direct_declarator* owner p_direct_declarator, struct parser_ctx* ctx) { - //direct_declarator '[' type_qualifier_list_opt assignment_expression_opt ']' - //direct_declarator '[' 'static' type_qualifier_list_opt assignment_expression ']' - //direct_declarator '[' type_qualifier_list 'static' assignment_expression ']' - //direct_declarator '[' type_qualifier_list_opt '*' ']' + //direct_declarator '[' type_qualifier_list_opt assignment_expression_opt ']' + //direct_declarator '[' 'static' type_qualifier_list_opt assignment_expression ']' + //direct_declarator '[' type_qualifier_list 'static' assignment_expression ']' + //direct_declarator '[' type_qualifier_list_opt '*' ']' - struct array_declarator* owner p_array_declarator = NULL; - try - { - p_array_declarator = calloc(1, sizeof * p_array_declarator); - if (p_array_declarator == NULL) throw; + struct array_declarator* owner p_array_declarator = NULL; + try + { + p_array_declarator = calloc(1, sizeof * p_array_declarator); + if (p_array_declarator == NULL) throw; - p_array_declarator->direct_declarator = p_direct_declarator; - parser_match_tk(ctx, '['); + p_array_declarator->direct_declarator = p_direct_declarator; + parser_match_tk(ctx, '['); - bool has_static = false; - if (ctx->current->type == TK_KEYWORD_STATIC) - { - p_array_declarator->static_token_opt = ctx->current; - parser_match(ctx); - has_static = true; - } + bool has_static = false; + if (ctx->current->type == TK_KEYWORD_STATIC) + { + p_array_declarator->static_token_opt = ctx->current; + parser_match(ctx); + has_static = true; + } - if (first_of_type_qualifier(ctx)) - { - p_array_declarator->type_qualifier_list_opt = type_qualifier_list(ctx); - } + if (first_of_type_qualifier(ctx)) + { + p_array_declarator->type_qualifier_list_opt = type_qualifier_list(ctx); + } - if (!has_static) - { - if (ctx->current->type == TK_KEYWORD_STATIC) - { - parser_match(ctx); - has_static = true; - } - } + if (!has_static) + { + if (ctx->current->type == TK_KEYWORD_STATIC) + { + parser_match(ctx); + has_static = true; + } + } - if (has_static) - { - //tem que ter.. + if (has_static) + { + //tem que ter.. - const bool evaluation_is_disabled = ctx->evaluation_is_disabled; - ctx->evaluation_is_disabled = false; - p_array_declarator->assignment_expression = assignment_expression(ctx); - /*restore*/ - ctx->evaluation_is_disabled = evaluation_is_disabled; + const bool evaluation_is_disabled = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = false; + p_array_declarator->assignment_expression = assignment_expression(ctx); + /*restore*/ + ctx->evaluation_is_disabled = evaluation_is_disabled; - if (p_array_declarator->assignment_expression == NULL) throw; - } - else - { - //opcional - if (ctx->current->type == '*') - { - parser_match(ctx); - } - else if (ctx->current->type != ']') - { - const bool evaluation_is_disabled = ctx->evaluation_is_disabled; - ctx->evaluation_is_disabled = false; - p_array_declarator->assignment_expression = assignment_expression(ctx); - /*restore*/ - ctx->evaluation_is_disabled = evaluation_is_disabled; - if (p_array_declarator->assignment_expression == NULL) throw; - } - else - { - } - } + if (p_array_declarator->assignment_expression == NULL) throw; + } + else + { + //opcional + if (ctx->current->type == '*') + { + parser_match(ctx); + } + else if (ctx->current->type != ']') + { + const bool evaluation_is_disabled = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = false; + p_array_declarator->assignment_expression = assignment_expression(ctx); + /*restore*/ + ctx->evaluation_is_disabled = evaluation_is_disabled; + if (p_array_declarator->assignment_expression == NULL) throw; + } + else + { + } + } - parser_match_tk(ctx, ']'); - } - catch - { - if (p_array_declarator) - { - } - } + parser_match_tk(ctx, ']'); + } + catch + { + if (p_array_declarator) + { + } + } - return p_array_declarator; + return p_array_declarator; } struct function_declarator* owner function_declarator(struct direct_declarator* owner p_direct_declarator, struct parser_ctx* ctx) { - struct function_declarator* owner p_function_declarator = calloc(1, sizeof(struct function_declarator)); - //faz um push da funcion_scope_declarator_list que esta vivendo mais em cima - //eh feito o pop mais em cima tb.. aqui dentro do decide usar. - //ctx->funcion_scope_declarator_list->outer_scope = ctx->current_scope; - //ctx->current_scope = ctx->funcion_scope_declarator_list; - //direct_declarator '(' parameter_type_list_opt ')' + struct function_declarator* owner p_function_declarator = calloc(1, sizeof(struct function_declarator)); + //faz um push da funcion_scope_declarator_list que esta vivendo mais em cima + //eh feito o pop mais em cima tb.. aqui dentro do decide usar. + //ctx->funcion_scope_declarator_list->outer_scope = ctx->current_scope; + //ctx->current_scope = ctx->funcion_scope_declarator_list; + //direct_declarator '(' parameter_type_list_opt ')' - p_function_declarator->direct_declarator = p_direct_declarator; - p_function_declarator->parameters_scope.scope_level = ctx->scopes.tail->scope_level + 1; - p_function_declarator->parameters_scope.variables.capacity = 5; - p_function_declarator->parameters_scope.tags.capacity = 1; + p_function_declarator->direct_declarator = p_direct_declarator; + p_function_declarator->parameters_scope.scope_level = ctx->scopes.tail->scope_level + 1; + p_function_declarator->parameters_scope.variables.capacity = 5; + p_function_declarator->parameters_scope.tags.capacity = 1; - scope_list_push(&ctx->scopes, &p_function_declarator->parameters_scope); + scope_list_push(&ctx->scopes, &p_function_declarator->parameters_scope); - //print_scope(&ctx->scopes); + //print_scope(&ctx->scopes); - parser_match_tk(ctx, '('); - if (ctx->current->type != ')') - { - p_function_declarator->parameter_type_list_opt = parameter_type_list(ctx); - } - parser_match_tk(ctx, ')'); + parser_match_tk(ctx, '('); + if (ctx->current->type != ')') + { + p_function_declarator->parameter_type_list_opt = parameter_type_list(ctx); + } + parser_match_tk(ctx, ')'); - //print_scope(&ctx->scopes); + //print_scope(&ctx->scopes); - scope_list_pop(&ctx->scopes); + scope_list_pop(&ctx->scopes); - //print_scope(&ctx->scopes); + //print_scope(&ctx->scopes); - return p_function_declarator; + return p_function_declarator; } void pointer_delete(struct pointer* owner p) { - if (p) - { - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - type_qualifier_list_delete(p->type_qualifier_list_opt); + if (p) + { + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + type_qualifier_list_delete(p->type_qualifier_list_opt); - struct pointer* owner item = p->pointer; - while (item) - { - struct pointer* owner next = item->pointer; - attribute_specifier_sequence_delete(item->attribute_specifier_sequence_opt); - type_qualifier_list_delete(item->type_qualifier_list_opt); - free(item); - item = next; - } + struct pointer* owner item = p->pointer; + while (item) + { + struct pointer* owner next = item->pointer; + attribute_specifier_sequence_delete(item->attribute_specifier_sequence_opt); + type_qualifier_list_delete(item->type_qualifier_list_opt); + free(item); + item = next; + } - free(p); - } + free(p); + } } struct pointer* owner pointer_opt(struct parser_ctx* ctx) { - struct pointer* owner p = NULL; - struct pointer* owner p_pointer = NULL; - try - { - while (ctx->current != NULL && ctx->current->type == '*') - { - p_pointer = calloc(1, sizeof(struct pointer)); - if (p_pointer == NULL) throw; + struct pointer* owner p = NULL; + struct pointer* owner p_pointer = NULL; + try + { + while (ctx->current != NULL && ctx->current->type == '*') + { + p_pointer = calloc(1, sizeof(struct pointer)); + if (p_pointer == NULL) throw; - static_set(*p_pointer, "zero"); + static_set(*p_pointer, "zero"); - p = p_pointer; - parser_match(ctx); + p = p_pointer; + parser_match(ctx); - p_pointer->attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + p_pointer->attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - if (first_of_type_qualifier(ctx)) - { - p_pointer->type_qualifier_list_opt = type_qualifier_list(ctx); - } + if (first_of_type_qualifier(ctx)) + { + p_pointer->type_qualifier_list_opt = type_qualifier_list(ctx); + } - while (ctx->current != NULL && ctx->current->type == '*') - { - p_pointer->pointer = pointer_opt(ctx); - if (p_pointer->pointer == NULL) - throw; - } - } - } - catch - { - } + while (ctx->current != NULL && ctx->current->type == '*') + { + p_pointer->pointer = pointer_opt(ctx); + if (p_pointer->pointer == NULL) + throw; + } + } + } + catch + { + } - //'*' attribute_specifier_sequence_opt type_qualifier_list_opt - //'*' attribute_specifier_sequence_opt type_qualifier_list_opt pointer - return p; + //'*' attribute_specifier_sequence_opt type_qualifier_list_opt + //'*' attribute_specifier_sequence_opt type_qualifier_list_opt pointer + return p; } void type_qualifier_list_delete(struct type_qualifier_list* owner p) { - if (p) - { - struct type_qualifier* owner item = p->head; - while (item) - { - struct type_qualifier* owner next = item->next; - item->next = NULL; - free(item); - item = next; - } - free(p); - } + if (p) + { + struct type_qualifier* owner item = p->head; + while (item) + { + struct type_qualifier* owner next = item->next; + item->next = NULL; + free(item); + item = next; + } + free(p); + } } struct type_qualifier_list* owner type_qualifier_list(struct parser_ctx* ctx) { - //type_qualifier - //type_qualifier_list type_qualifier + //type_qualifier + //type_qualifier_list type_qualifier - struct type_qualifier_list* owner p_type_qualifier_list = NULL; - struct type_qualifier* owner p_type_qualifier = NULL; + struct type_qualifier_list* owner p_type_qualifier_list = NULL; + struct type_qualifier* owner p_type_qualifier = NULL; - try - { - p_type_qualifier_list = calloc(1, sizeof(struct type_qualifier_list)); - if (p_type_qualifier_list == NULL) throw; + try + { + p_type_qualifier_list = calloc(1, sizeof(struct type_qualifier_list)); + if (p_type_qualifier_list == NULL) throw; - p_type_qualifier = type_qualifier(ctx); - if (p_type_qualifier == NULL) throw; + p_type_qualifier = type_qualifier(ctx); + if (p_type_qualifier == NULL) throw; - p_type_qualifier_list->flags |= p_type_qualifier->flags; - LIST_ADD(p_type_qualifier_list, p_type_qualifier); - p_type_qualifier = NULL; /*MOVED*/ + p_type_qualifier_list->flags |= p_type_qualifier->flags; + LIST_ADD(p_type_qualifier_list, p_type_qualifier); + p_type_qualifier = NULL; /*MOVED*/ - while (ctx->current != NULL && first_of_type_qualifier(ctx)) - { - p_type_qualifier = type_qualifier(ctx); - if (p_type_qualifier == NULL) throw; + while (ctx->current != NULL && first_of_type_qualifier(ctx)) + { + p_type_qualifier = type_qualifier(ctx); + if (p_type_qualifier == NULL) throw; - p_type_qualifier_list->flags |= p_type_qualifier->flags; - LIST_ADD(p_type_qualifier_list, p_type_qualifier); - p_type_qualifier = NULL; /*MOVED*/ - } - } - catch - { - } + p_type_qualifier_list->flags |= p_type_qualifier->flags; + LIST_ADD(p_type_qualifier_list, p_type_qualifier); + p_type_qualifier = NULL; /*MOVED*/ + } + } + catch + { + } - return p_type_qualifier_list; + return p_type_qualifier_list; } void parameter_type_list_delete(struct parameter_type_list* owner p) { - if (p) - { - parameter_list_delete(p->parameter_list); - free(p); - } + if (p) + { + parameter_list_delete(p->parameter_list); + free(p); + } } struct parameter_type_list* owner parameter_type_list(struct parser_ctx* ctx) { - struct parameter_type_list* owner p_parameter_type_list = calloc(1, sizeof(struct parameter_type_list)); - //parameter_list - //parameter_list ',' '...' - p_parameter_type_list->parameter_list = parameter_list(ctx); + struct parameter_type_list* owner p_parameter_type_list = calloc(1, sizeof(struct parameter_type_list)); + //parameter_list + //parameter_list ',' '...' + p_parameter_type_list->parameter_list = parameter_list(ctx); - if (p_parameter_type_list->parameter_list->head == - p_parameter_type_list->parameter_list->tail) - { - if (type_is_void(&p_parameter_type_list->parameter_list->head->declarator->type)) - { - p_parameter_type_list->is_void = true; - } - } + if (p_parameter_type_list->parameter_list->head == + p_parameter_type_list->parameter_list->tail) + { + if (type_is_void(&p_parameter_type_list->parameter_list->head->declarator->type)) + { + p_parameter_type_list->is_void = true; + } + } - /*ja esta saindo com a virgula consumida do parameter_list para evitar ahead*/ - if (ctx->current->type == '...') - { - parser_match(ctx); - //parser_match_tk(ctx, '...'); - p_parameter_type_list->is_var_args = true; - } - return p_parameter_type_list; + /*ja esta saindo com a virgula consumida do parameter_list para evitar ahead*/ + if (ctx->current->type == '...') + { + parser_match(ctx); + //parser_match_tk(ctx, '...'); + p_parameter_type_list->is_var_args = true; + } + return p_parameter_type_list; } void parameter_list_delete(struct parameter_list* owner p) { - if (p) - { - struct parameter_declaration* owner item = p->head; - while (item) - { - struct parameter_declaration* owner next = item->next; - item->next = NULL; - parameter_declaration_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct parameter_declaration* owner item = p->head; + while (item) + { + struct parameter_declaration* owner next = item->next; + item->next = NULL; + parameter_declaration_delete(item); + item = next; + } + free(p); + } } struct parameter_list* owner parameter_list(struct parser_ctx* ctx) { - /* - parameter_list - parameter_declaration - parameter_list ',' parameter_declaration - */ - struct parameter_list* owner p_parameter_list = NULL; - struct parameter_declaration* owner p_parameter_declaration = NULL; - try - { - p_parameter_list = calloc(1, sizeof(struct parameter_list)); - if (p_parameter_list == NULL) throw; + /* + parameter_list + parameter_declaration + parameter_list ',' parameter_declaration + */ + struct parameter_list* owner p_parameter_list = NULL; + struct parameter_declaration* owner p_parameter_declaration = NULL; + try + { + p_parameter_list = calloc(1, sizeof(struct parameter_list)); + if (p_parameter_list == NULL) throw; - p_parameter_declaration = parameter_declaration(ctx); - if (p_parameter_declaration == NULL) throw; + p_parameter_declaration = parameter_declaration(ctx); + if (p_parameter_declaration == NULL) throw; - LIST_ADD(p_parameter_list, p_parameter_declaration); - p_parameter_declaration = NULL; /*MOVED*/ + LIST_ADD(p_parameter_list, p_parameter_declaration); + p_parameter_declaration = NULL; /*MOVED*/ - while (ctx->current != NULL && ctx->current->type == ',') - { - parser_match(ctx); - if (ctx->current->type == '...') - { - //follow - break; - } + while (ctx->current != NULL && ctx->current->type == ',') + { + parser_match(ctx); + if (ctx->current->type == '...') + { + //follow + break; + } - p_parameter_declaration = parameter_declaration(ctx); - if (p_parameter_declaration == NULL) throw; + p_parameter_declaration = parameter_declaration(ctx); + if (p_parameter_declaration == NULL) throw; - LIST_ADD(p_parameter_list, p_parameter_declaration); - p_parameter_declaration = NULL; /*MOVED*/ - } - } - catch - { - } - return p_parameter_list; + LIST_ADD(p_parameter_list, p_parameter_declaration); + p_parameter_declaration = NULL; /*MOVED*/ + } + } + catch + { + } + return p_parameter_list; } void parameter_declaration_delete(struct parameter_declaration* owner p) { - if (p) - { - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - declaration_specifiers_delete(p->declaration_specifiers); - declarator_delete(p->declarator); + if (p) + { + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + declaration_specifiers_delete(p->declaration_specifiers); + declarator_delete(p->declarator); - assert(p->next == NULL); - free(p); - } + assert(p->next == NULL); + free(p); + } } struct parameter_declaration* owner parameter_declaration(struct parser_ctx* ctx) { - struct parameter_declaration* owner p_parameter_declaration = calloc(1, sizeof(struct parameter_declaration)); - + struct parameter_declaration* owner p_parameter_declaration = calloc(1, sizeof(struct parameter_declaration)); - p_parameter_declaration->attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); - p_parameter_declaration->declaration_specifiers = declaration_specifiers(ctx, STORAGE_SPECIFIER_PARAMETER); + p_parameter_declaration->attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); + p_parameter_declaration->declaration_specifiers = declaration_specifiers(ctx, STORAGE_SPECIFIER_PARAMETER); - //talvez no ctx colocar um flag que esta em argumentos - //TODO se tiver uma struct tag novo... - //warning: declaration of 'struct X' will not be visible outside of this function [-Wvisibility] - struct token* p_token_name = 0; - p_parameter_declaration->declarator = declarator(ctx, - /*specifier_qualifier_list*/NULL, - p_parameter_declaration->declaration_specifiers, - true/*can be abstract*/, - &p_token_name); - p_parameter_declaration->declarator->name = p_token_name; + //talvez no ctx colocar um flag que esta em argumentos + //TODO se tiver uma struct tag novo... + //warning: declaration of 'struct X' will not be visible outside of this function [-Wvisibility] + struct token* p_token_name = 0; + p_parameter_declaration->declarator = declarator(ctx, + /*specifier_qualifier_list*/NULL, + p_parameter_declaration->declaration_specifiers, + true/*can be abstract*/, + &p_token_name); + p_parameter_declaration->declarator->name = p_token_name; - p_parameter_declaration->declarator->declaration_specifiers = p_parameter_declaration->declaration_specifiers; - p_parameter_declaration->declarator->type = make_type_using_declarator(ctx, p_parameter_declaration->declarator); + p_parameter_declaration->declarator->declaration_specifiers = p_parameter_declaration->declaration_specifiers; - if (p_parameter_declaration->attribute_specifier_sequence_opt) - { - p_parameter_declaration->declarator->type.attributes_flags |= - p_parameter_declaration->attribute_specifier_sequence_opt->attributes_flags; - } + p_parameter_declaration->declarator->type = make_type_using_declarator(ctx, p_parameter_declaration->declarator); - p_parameter_declaration->declarator->type.storage_class_specifier_flags |= STORAGE_SPECIFIER_PARAMETER; + if (p_parameter_declaration->attribute_specifier_sequence_opt) + { + p_parameter_declaration->declarator->type.attributes_flags |= + p_parameter_declaration->attribute_specifier_sequence_opt->attributes_flags; + } - if (p_parameter_declaration->implicit_token) - { - p_parameter_declaration->declarator->type.attributes_flags |= CAKE_ATTRIBUTE_IMPLICT; - } + p_parameter_declaration->declarator->type.storage_class_specifier_flags |= STORAGE_SPECIFIER_PARAMETER; - if (p_parameter_declaration->declarator->name) - naming_convention_parameter(ctx, p_parameter_declaration->declarator->name, &p_parameter_declaration->declarator->type); + if (p_parameter_declaration->implicit_token) + { + p_parameter_declaration->declarator->type.attributes_flags |= CAKE_ATTRIBUTE_IMPLICT; + } - //coloca o pametro no escpo atual que deve apontar para escopo paramtros - // da funcao . - // - //assert ctx->current_scope->variables parametrosd - if (p_parameter_declaration->declarator->name) - { - //parametro void nao te name - hashmap_set(&ctx->scopes.tail->variables, - p_parameter_declaration->declarator->name->lexeme, - p_parameter_declaration->declarator, - TAG_TYPE_ONLY_DECLARATOR); - //print_scope(ctx->current_scope); - } - return p_parameter_declaration; + if (p_parameter_declaration->declarator->name) + naming_convention_parameter(ctx, p_parameter_declaration->declarator->name, &p_parameter_declaration->declarator->type); + + //coloca o pametro no escpo atual que deve apontar para escopo paramtros + // da funcao . + // + //assert ctx->current_scope->variables parametrosd + if (p_parameter_declaration->declarator->name) + { + //parametro void nao te name + hashmap_set(&ctx->scopes.tail->variables, + p_parameter_declaration->declarator->name->lexeme, + p_parameter_declaration->declarator, + TAG_TYPE_ONLY_DECLARATOR); + //print_scope(ctx->current_scope); + } + return p_parameter_declaration; } struct specifier_qualifier_list* owner copy(struct declaration_specifiers* p_declaration_specifiers) { - struct specifier_qualifier_list* owner p_specifier_qualifier_list = calloc(1, sizeof(struct specifier_qualifier_list)); + struct specifier_qualifier_list* owner p_specifier_qualifier_list = calloc(1, sizeof(struct specifier_qualifier_list)); - p_specifier_qualifier_list->type_qualifier_flags = p_declaration_specifiers->type_qualifier_flags; - p_specifier_qualifier_list->type_specifier_flags = p_declaration_specifiers->type_specifier_flags; + p_specifier_qualifier_list->type_qualifier_flags = p_declaration_specifiers->type_qualifier_flags; + p_specifier_qualifier_list->type_specifier_flags = p_declaration_specifiers->type_specifier_flags; - struct declaration_specifier* p_declaration_specifier = - p_declaration_specifiers->head; + struct declaration_specifier* p_declaration_specifier = + p_declaration_specifiers->head; - while (p_declaration_specifier) - { - if (p_declaration_specifier->type_specifier_qualifier) - { - struct type_specifier_qualifier* owner p_specifier_qualifier = calloc(1, sizeof(struct type_specifier_qualifier)); + while (p_declaration_specifier) + { + if (p_declaration_specifier->type_specifier_qualifier) + { + struct type_specifier_qualifier* owner p_specifier_qualifier = calloc(1, sizeof(struct type_specifier_qualifier)); - if (p_declaration_specifier->type_specifier_qualifier->type_qualifier) - { - struct type_qualifier* owner p_type_qualifier = calloc(1, sizeof(struct type_qualifier)); + if (p_declaration_specifier->type_specifier_qualifier->type_qualifier) + { + struct type_qualifier* owner p_type_qualifier = calloc(1, sizeof(struct type_qualifier)); - p_type_qualifier->flags = p_declaration_specifier->type_specifier_qualifier->type_qualifier->flags; + p_type_qualifier->flags = p_declaration_specifier->type_specifier_qualifier->type_qualifier->flags; - p_type_qualifier->token = p_declaration_specifier->type_specifier_qualifier->type_qualifier->token; - p_specifier_qualifier->type_qualifier = p_type_qualifier; - } - else if (p_declaration_specifier->type_specifier_qualifier->type_specifier) - { - struct type_specifier* owner p_type_specifier = calloc(1, sizeof(struct type_specifier)); + p_type_qualifier->token = p_declaration_specifier->type_specifier_qualifier->type_qualifier->token; + p_specifier_qualifier->type_qualifier = p_type_qualifier; + } + else if (p_declaration_specifier->type_specifier_qualifier->type_specifier) + { + struct type_specifier* owner p_type_specifier = calloc(1, sizeof(struct type_specifier)); - p_type_specifier->flags = p_declaration_specifier->type_specifier_qualifier->type_specifier->flags; + p_type_specifier->flags = p_declaration_specifier->type_specifier_qualifier->type_specifier->flags; - //todo - assert(p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier == NULL); + //todo + assert(p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier == NULL); - p_type_specifier->token = p_declaration_specifier->type_specifier_qualifier->type_specifier->token; - p_specifier_qualifier->type_specifier = p_type_specifier; - } + p_type_specifier->token = p_declaration_specifier->type_specifier_qualifier->type_specifier->token; + p_specifier_qualifier->type_specifier = p_type_specifier; + } - LIST_ADD(p_specifier_qualifier_list, p_specifier_qualifier); - } - p_declaration_specifier = p_declaration_specifier->next; - } - return p_specifier_qualifier_list; + LIST_ADD(p_specifier_qualifier_list, p_specifier_qualifier); + } + p_declaration_specifier = p_declaration_specifier->next; + } + return p_specifier_qualifier_list; } @@ -26129,1852 +26419,1863 @@ void print_declarator(struct osstream* ss, struct declarator* p_declarator, bool void print_direct_declarator(struct osstream* ss, struct direct_declarator* p_direct_declarator, bool is_abstract) { - if (p_direct_declarator->declarator) - { - ss_fprintf(ss, "("); - print_declarator(ss, p_direct_declarator->declarator, is_abstract); - ss_fprintf(ss, ")"); - } + if (p_direct_declarator->declarator) + { + ss_fprintf(ss, "("); + print_declarator(ss, p_direct_declarator->declarator, is_abstract); + ss_fprintf(ss, ")"); + } - if (p_direct_declarator->name_opt && !is_abstract) - { - //Se is_abstract for true é pedido para nao imprimir o nome do indentificador - ss_fprintf(ss, "%s", p_direct_declarator->name_opt->lexeme); - } + if (p_direct_declarator->name_opt && !is_abstract) + { + //Se is_abstract for true é pedido para nao imprimir o nome do indentificador + ss_fprintf(ss, "%s", p_direct_declarator->name_opt->lexeme); + } - if (p_direct_declarator->function_declarator) - { - print_direct_declarator(ss, p_direct_declarator->function_declarator->direct_declarator, is_abstract); + if (p_direct_declarator->function_declarator) + { + print_direct_declarator(ss, p_direct_declarator->function_declarator->direct_declarator, is_abstract); - ss_fprintf(ss, "("); - struct parameter_declaration* p_parameter_declaration = - p_direct_declarator->function_declarator->parameter_type_list_opt ? - p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head : NULL; + ss_fprintf(ss, "("); + struct parameter_declaration* p_parameter_declaration = + p_direct_declarator->function_declarator->parameter_type_list_opt ? + p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head : NULL; - while (p_parameter_declaration) - { - if (p_parameter_declaration != p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head) - ss_fprintf(ss, ","); + while (p_parameter_declaration) + { + if (p_parameter_declaration != p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head) + ss_fprintf(ss, ","); - print_declaration_specifiers(ss, p_parameter_declaration->declaration_specifiers); - ss_fprintf(ss, " "); - print_declarator(ss, p_parameter_declaration->declarator, is_abstract); + print_declaration_specifiers(ss, p_parameter_declaration->declaration_specifiers); + ss_fprintf(ss, " "); + print_declarator(ss, p_parameter_declaration->declarator, is_abstract); - p_parameter_declaration = p_parameter_declaration->next; - } - //... TODO - ss_fprintf(ss, ")"); - } - if (p_direct_declarator->array_declarator) - { - //TODO - ss_fprintf(ss, "[]"); - } + p_parameter_declaration = p_parameter_declaration->next; + } + //... TODO + ss_fprintf(ss, ")"); + } + if (p_direct_declarator->array_declarator) + { + //TODO + ss_fprintf(ss, "[]"); + } } enum type_specifier_flags declarator_get_type_specifier_flags(const struct declarator* p) { - if (p->declaration_specifiers) - return p->declaration_specifiers->type_specifier_flags; - if (p->specifier_qualifier_list) - return p->specifier_qualifier_list->type_specifier_flags; - return 0; + if (p->declaration_specifiers) + return p->declaration_specifiers->type_specifier_flags; + if (p->specifier_qualifier_list) + return p->specifier_qualifier_list->type_specifier_flags; + return 0; } void print_declarator(struct osstream* ss, struct declarator* p_declarator, bool is_abstract) { - bool first = true; - if (p_declarator->pointer) - { - struct pointer* p = p_declarator->pointer; - while (p) - { - if (p->type_qualifier_list_opt) - { - print_type_qualifier_flags(ss, &first, p->type_qualifier_list_opt->flags); - } - ss_fprintf(ss, "*"); - p = p->pointer; - } - } - print_direct_declarator(ss, p_declarator->direct_declarator, is_abstract); + bool first = true; + if (p_declarator->pointer) + { + struct pointer* p = p_declarator->pointer; + while (p) + { + if (p->type_qualifier_list_opt) + { + print_type_qualifier_flags(ss, &first, p->type_qualifier_list_opt->flags); + } + ss_fprintf(ss, "*"); + p = p->pointer; + } + } + print_direct_declarator(ss, p_declarator->direct_declarator, is_abstract); } void print_type_name(struct osstream* ss, struct type_name* p) { - bool first = true; - print_specifier_qualifier_list(ss, &first, p->specifier_qualifier_list); - print_declarator(ss, p->declarator, true); + bool first = true; + print_specifier_qualifier_list(ss, &first, p->specifier_qualifier_list); + print_declarator(ss, p->declarator, true); } void type_name_delete(struct type_name* owner p) { - if (p) - { - specifier_qualifier_list_delete(p->specifier_qualifier_list); - type_destroy(&p->type); - declarator_delete(p->declarator); - free(p); - } + if (p) + { + specifier_qualifier_list_delete(p->specifier_qualifier_list); + type_destroy(&p->type); + declarator_delete(p->declarator); + free(p); + } } struct type_name* owner type_name(struct parser_ctx* ctx) { - struct type_name* owner p_type_name = calloc(1, sizeof(struct type_name)); + struct type_name* owner p_type_name = calloc(1, sizeof(struct type_name)); - p_type_name->first_token = ctx->current; + p_type_name->first_token = ctx->current; - p_type_name->specifier_qualifier_list = specifier_qualifier_list(ctx); + p_type_name->specifier_qualifier_list = specifier_qualifier_list(ctx); - p_type_name->declarator = declarator(ctx, - p_type_name->specifier_qualifier_list,//?? - /*declaration_specifiers*/ NULL, - true /*DEVE SER TODO*/, - NULL); - p_type_name->declarator->specifier_qualifier_list = p_type_name->specifier_qualifier_list; - p_type_name->declarator->type = make_type_using_declarator(ctx, p_type_name->declarator); + p_type_name->declarator = declarator(ctx, + p_type_name->specifier_qualifier_list,//?? + /*declaration_specifiers*/ NULL, + true /*DEVE SER TODO*/, + NULL); + p_type_name->declarator->specifier_qualifier_list = p_type_name->specifier_qualifier_list; + p_type_name->declarator->type = make_type_using_declarator(ctx, p_type_name->declarator); - p_type_name->last_token = ctx->current->prev; - p_type_name->type = type_dup(&p_type_name->declarator->type); + p_type_name->last_token = ctx->current->prev; + p_type_name->type = type_dup(&p_type_name->declarator->type); - return p_type_name; + return p_type_name; } -void braced_initializer_delete(struct braced_initializer* owner p) +void braced_initializer_delete(struct braced_initializer* owner opt p) { - if (p) - { - initializer_list_delete(p->initializer_list); - free(p); - } + if (p) + { + initializer_list_delete(p->initializer_list); + free(p); + } } struct braced_initializer* owner braced_initializer(struct parser_ctx* ctx) { - /* - { } - { initializer-list } - { initializer-list , } - */ + /* + { } + { initializer-list } + { initializer-list , } + */ - struct braced_initializer* owner p_bracket_initializer_list = calloc(1, sizeof(struct braced_initializer)); - p_bracket_initializer_list->first_token = ctx->current; - parser_match_tk(ctx, '{'); - if (ctx->current->type != '}') - { - p_bracket_initializer_list->initializer_list = initializer_list(ctx); - } - parser_match_tk(ctx, '}'); - return p_bracket_initializer_list; + struct braced_initializer* owner p_bracket_initializer_list = calloc(1, sizeof(struct braced_initializer)); + p_bracket_initializer_list->first_token = ctx->current; + parser_match_tk(ctx, '{'); + if (ctx->current->type != '}') + { + p_bracket_initializer_list->initializer_list = initializer_list(ctx); + } + parser_match_tk(ctx, '}'); + return p_bracket_initializer_list; } void initializer_delete(struct initializer* owner p) { - if (p) - { - assert(p->next == NULL); - expression_delete(p->assignment_expression); - braced_initializer_delete(p->braced_initializer); - designation_delete(p->designation); - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - free(p); - } + if (p) + { + assert(p->next == NULL); + expression_delete(p->assignment_expression); + braced_initializer_delete(p->braced_initializer); + designation_delete(p->designation); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + free(p); + } } struct initializer* owner initializer(struct parser_ctx* ctx) { - /* - initializer: - assignment-expression - braced-initializer - */ + /* + initializer: + assignment-expression + braced-initializer + */ - struct initializer* owner p_initializer = calloc(1, sizeof(struct initializer)); + struct initializer* owner p_initializer = calloc(1, sizeof(struct initializer)); - p_initializer->first_token = ctx->current; + p_initializer->first_token = ctx->current; - if (ctx->current->type == '{') - { - p_initializer->braced_initializer = braced_initializer(ctx); - } - else - { - p_initializer->p_attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + if (ctx->current->type == '{') + { + p_initializer->braced_initializer = braced_initializer(ctx); + } + else + { + p_initializer->p_attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - p_initializer->assignment_expression = assignment_expression(ctx); - } - return p_initializer; + p_initializer->assignment_expression = assignment_expression(ctx); + } + return p_initializer; } void initializer_list_delete(struct initializer_list* owner p) { - if (p) - { - struct initializer* owner item = p->head; - while (item) - { - struct initializer* owner next = item->next; - item->next = NULL; - initializer_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct initializer* owner item = p->head; + while (item) + { + struct initializer* owner next = item->next; + item->next = NULL; + initializer_delete(item); + item = next; + } + free(p); + } } struct initializer_list* owner initializer_list(struct parser_ctx* ctx) { - /* - initializer-list: - designation opt initializer - initializer-list , designation opt initializer - */ + /* + initializer-list: + designation opt initializer + initializer-list , designation opt initializer + */ - struct initializer_list* owner p_initializer_list = calloc(1, sizeof(struct initializer_list)); + struct initializer_list* owner p_initializer_list = calloc(1, sizeof(struct initializer_list)); - p_initializer_list->first_token = ctx->current; + p_initializer_list->first_token = ctx->current; - struct designation* owner p_designation = NULL; - if (first_of_designator(ctx)) - { - p_designation = designation(ctx); - } - struct initializer* owner p_initializer = initializer(ctx); + struct designation* owner p_designation = NULL; + if (first_of_designator(ctx)) + { + p_designation = designation(ctx); + } + struct initializer* owner p_initializer = initializer(ctx); - assert(p_initializer->designation == NULL); - p_initializer->designation = p_designation; + assert(p_initializer->designation == NULL); + p_initializer->designation = p_designation; - LIST_ADD(p_initializer_list, p_initializer); - p_initializer_list->size++; + LIST_ADD(p_initializer_list, p_initializer); + p_initializer_list->size++; - while (ctx->current != NULL && ctx->current->type == ',') - { - parser_match(ctx); - if (ctx->current->type == '}') - break; //follow + while (ctx->current != NULL && ctx->current->type == ',') + { + parser_match(ctx); + if (ctx->current->type == '}') + break; //follow - struct designation* owner p_designation2 = NULL; - if (first_of_designator(ctx)) - { - p_designation2 = designation(ctx); - } - struct initializer* owner p_initializer2 = initializer(ctx); + struct designation* owner p_designation2 = NULL; + if (first_of_designator(ctx)) + { + p_designation2 = designation(ctx); + } + struct initializer* owner p_initializer2 = initializer(ctx); - assert(p_initializer2->designation == NULL); - p_initializer2->designation = p_designation2; + assert(p_initializer2->designation == NULL); + p_initializer2->designation = p_designation2; - LIST_ADD(p_initializer_list, p_initializer2); - p_initializer_list->size++; - } + LIST_ADD(p_initializer_list, p_initializer2); + p_initializer_list->size++; + } - return p_initializer_list; + return p_initializer_list; } void designation_delete(struct designation* owner p) { - if (p) - { - designator_list_delete(p->designator_list); - free(p); - } + if (p) + { + designator_list_delete(p->designator_list); + free(p); + } } struct designation* owner designation(struct parser_ctx* ctx) { - //designator_list '=' - struct designation* owner p_designation = calloc(1, sizeof(struct designation)); - p_designation->designator_list = designator_list(ctx); - parser_match_tk(ctx, '='); - return p_designation; + //designator_list '=' + struct designation* owner p_designation = calloc(1, sizeof(struct designation)); + p_designation->designator_list = designator_list(ctx); + parser_match_tk(ctx, '='); + return p_designation; } void designator_list_delete(struct designator_list* owner p) { - if (p) - { - struct designator* owner item = p->head; - while (item) - { - struct designator* owner next = item->next; - item->next = NULL; - designator_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct designator* owner item = p->head; + while (item) + { + struct designator* owner next = item->next; + item->next = NULL; + designator_delete(item); + item = next; + } + free(p); + } } struct designator_list* owner designator_list(struct parser_ctx* ctx) { - //designator - //designator_list designator - struct designator_list* owner p_designator_list = NULL; - struct designator* owner p_designator = NULL; - try - { - p_designator_list = calloc(1, sizeof(struct designator_list)); - if (p_designator_list == NULL) throw; + //designator + //designator_list designator + struct designator_list* owner p_designator_list = NULL; + struct designator* owner p_designator = NULL; + try + { + p_designator_list = calloc(1, sizeof(struct designator_list)); + if (p_designator_list == NULL) throw; - p_designator = designator(ctx); - if (p_designator == NULL) throw; - LIST_ADD(p_designator_list, p_designator); - p_designator = NULL; /*MOVED*/ + p_designator = designator(ctx); + if (p_designator == NULL) throw; + LIST_ADD(p_designator_list, p_designator); + p_designator = NULL; /*MOVED*/ - while (ctx->current != NULL && first_of_designator(ctx)) - { - p_designator = designator(ctx); - if (p_designator == NULL) throw; - LIST_ADD(p_designator_list, p_designator); - p_designator = NULL; /*MOVED*/ - } - } - catch - { - } + while (ctx->current != NULL && first_of_designator(ctx)) + { + p_designator = designator(ctx); + if (p_designator == NULL) throw; + LIST_ADD(p_designator_list, p_designator); + p_designator = NULL; /*MOVED*/ + } + } + catch + { + } - return p_designator_list; + return p_designator_list; } void designator_delete(struct designator* owner p) { - if (p) - { - assert(p->next == NULL); - expression_delete(p->constant_expression_opt); - free(p); - } + if (p) + { + assert(p->next == NULL); + expression_delete(p->constant_expression_opt); + free(p); + } } struct designator* owner designator(struct parser_ctx* ctx) { - //'[' constant_expression ']' - //'.' identifier - struct designator* owner p_designator = calloc(1, sizeof(struct designator)); - if (ctx->current->type == '[') - { - parser_match_tk(ctx, '['); - p_designator->constant_expression_opt = constant_expression(ctx, true); - parser_match_tk(ctx, ']'); - } - else if (ctx->current->type == '.') - { - parser_match(ctx); - parser_match_tk(ctx, TK_IDENTIFIER); - } - return p_designator; + //'[' constant_expression ']' + //'.' identifier + struct designator* owner p_designator = calloc(1, sizeof(struct designator)); + if (ctx->current->type == '[') + { + parser_match_tk(ctx, '['); + p_designator->constant_expression_opt = constant_expression(ctx, true); + parser_match_tk(ctx, ']'); + } + else if (ctx->current->type == '.') + { + parser_match(ctx); + parser_match_tk(ctx, TK_IDENTIFIER); + } + return p_designator; } void static_assert_declaration_delete(struct static_assert_declaration* owner p) { - if (p) - { - expression_delete(p->constant_expression); - free(p); - } + if (p) + { + expression_delete(p->constant_expression); + free(p); + } } struct static_assert_declaration* owner static_assert_declaration(struct parser_ctx* ctx) { - /* - static_assert-declaration: - "static_assert" ( constant-expression , string-literal ) ; - "static_assert" ( constant-expression ) ; - */ + /* + static_assert-declaration: + "static_assert" ( constant-expression , string-literal ) ; + "static_assert" ( constant-expression ) ; + */ - struct static_assert_declaration* owner p_static_assert_declaration = NULL; - try - { - p_static_assert_declaration = calloc(1, sizeof(struct static_assert_declaration)); - if (p_static_assert_declaration == NULL) throw; + struct static_assert_declaration* owner p_static_assert_declaration = NULL; + try + { + p_static_assert_declaration = calloc(1, sizeof(struct static_assert_declaration)); + if (p_static_assert_declaration == NULL) throw; - p_static_assert_declaration->first_token = ctx->current; - struct token* position = ctx->current; + p_static_assert_declaration->first_token = ctx->current; + struct token* position = ctx->current; - parser_match(ctx); + parser_match(ctx); - parser_match_tk(ctx, '('); + parser_match_tk(ctx, '('); - /* - When flow analysis is enabled static assert is evaluated there - */ - bool show_error_if_not_constant = false; - if (p_static_assert_declaration->first_token->type == TK_KEYWORD__STATIC_ASSERT) - { - show_error_if_not_constant = true; - } + /* + When flow analysis is enabled static assert is evaluated there + */ + bool show_error_if_not_constant = false; + if (p_static_assert_declaration->first_token->type == TK_KEYWORD__STATIC_ASSERT) + { + show_error_if_not_constant = true; + } - p_static_assert_declaration->constant_expression = constant_expression(ctx, show_error_if_not_constant); - if (p_static_assert_declaration->constant_expression == NULL) throw; - if (ctx->current->type == ',') - { - parser_match(ctx); - p_static_assert_declaration->string_literal_opt = ctx->current; - parser_match_tk(ctx, TK_STRING_LITERAL); - } + p_static_assert_declaration->constant_expression = constant_expression(ctx, show_error_if_not_constant); + if (p_static_assert_declaration->constant_expression == NULL) throw; - parser_match_tk(ctx, ')'); - p_static_assert_declaration->last_token = ctx->current; - parser_match_tk(ctx, ';'); + if (ctx->current->type == ',') + { + parser_match(ctx); + p_static_assert_declaration->string_literal_opt = ctx->current; + parser_match_tk(ctx, TK_STRING_LITERAL); + } - if (position->type == TK_KEYWORD__STATIC_ASSERT) - { - if (!constant_value_to_bool(&p_static_assert_declaration->constant_expression->constant_value)) - { - if (p_static_assert_declaration->string_literal_opt) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx, position, "_Static_assert failed %s\n", - p_static_assert_declaration->string_literal_opt->lexeme); - } - else - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx, position, "_Static_assert failed"); - } - } - } + parser_match_tk(ctx, ')'); + p_static_assert_declaration->last_token = ctx->current; + parser_match_tk(ctx, ';'); - } - catch - { - } + if (position->type == TK_KEYWORD__STATIC_ASSERT) + { + if (!constant_value_to_bool(&p_static_assert_declaration->constant_expression->constant_value)) + { + if (p_static_assert_declaration->string_literal_opt) + { + compiler_diagnostic_message(ERROR_STATIC_ASSERT_FAILED, ctx, position, "_Static_assert failed %s\n", + p_static_assert_declaration->string_literal_opt->lexeme); + } + else + { + compiler_diagnostic_message(ERROR_STATIC_ASSERT_FAILED, ctx, position, "_Static_assert failed"); + } + } + } - return p_static_assert_declaration; + } + catch + { + } + + return p_static_assert_declaration; } void attribute_specifier_sequence_delete(struct attribute_specifier_sequence* owner p) { - if (p) - { - struct attribute_specifier* owner item = p->head; - while (item) - { - struct attribute_specifier* owner next = item->next; - item->next = NULL; - attribute_specifier_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct attribute_specifier* owner item = p->head; + while (item) + { + struct attribute_specifier* owner next = item->next; + item->next = NULL; + attribute_specifier_delete(item); + item = next; + } + free(p); + } } struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt(struct parser_ctx* ctx) { - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence = NULL; + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence = NULL; - if (first_of_attribute_specifier(ctx)) - { - p_attribute_specifier_sequence = calloc(1, sizeof(struct attribute_specifier_sequence)); + if (first_of_attribute_specifier(ctx)) + { + p_attribute_specifier_sequence = calloc(1, sizeof(struct attribute_specifier_sequence)); - p_attribute_specifier_sequence->first_token = ctx->current; + p_attribute_specifier_sequence->first_token = ctx->current; - while (ctx->current != NULL && - first_of_attribute_specifier(ctx)) - { - struct attribute_specifier* owner p_attribute_specifier = attribute_specifier(ctx); + while (ctx->current != NULL && + first_of_attribute_specifier(ctx)) + { + struct attribute_specifier* owner p_attribute_specifier = attribute_specifier(ctx); - p_attribute_specifier_sequence->attributes_flags |= - p_attribute_specifier->attribute_list->attributes_flags; + p_attribute_specifier_sequence->attributes_flags |= + p_attribute_specifier->attribute_list->attributes_flags; - LIST_ADD(p_attribute_specifier_sequence, p_attribute_specifier); - } - p_attribute_specifier_sequence->last_token = ctx->previous; - } + LIST_ADD(p_attribute_specifier_sequence, p_attribute_specifier); + } + p_attribute_specifier_sequence->last_token = ctx->previous; + } - return p_attribute_specifier_sequence; + return p_attribute_specifier_sequence; } struct attribute_specifier_sequence* owner attribute_specifier_sequence(struct parser_ctx* ctx) { - //attribute_specifier_sequence_opt attribute_specifier - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence = calloc(1, sizeof(struct attribute_specifier_sequence)); - while (ctx->current != NULL && first_of_attribute_specifier(ctx)) - { - LIST_ADD(p_attribute_specifier_sequence, attribute_specifier(ctx)); - } - return p_attribute_specifier_sequence; + //attribute_specifier_sequence_opt attribute_specifier + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence = calloc(1, sizeof(struct attribute_specifier_sequence)); + while (ctx->current != NULL && first_of_attribute_specifier(ctx)) + { + LIST_ADD(p_attribute_specifier_sequence, attribute_specifier(ctx)); + } + return p_attribute_specifier_sequence; } void attribute_specifier_delete(struct attribute_specifier* owner p) { - if (p) - { - attribute_list_destroy(p->attribute_list); - free(p->attribute_list); - assert(p->next == NULL); - free(p); - } + if (p) + { + attribute_list_destroy(p->attribute_list); + free(p->attribute_list); + assert(p->next == NULL); + free(p); + } } struct attribute_specifier* owner attribute_specifier(struct parser_ctx* ctx) { - struct attribute_specifier* owner p_attribute_specifier = calloc(1, sizeof(struct attribute_specifier)); + struct attribute_specifier* owner p_attribute_specifier = calloc(1, sizeof(struct attribute_specifier)); - p_attribute_specifier->first_token = ctx->current; + p_attribute_specifier->first_token = ctx->current; - //'[' '[' attribute_list ']' ']' - parser_match_tk(ctx, '['); - parser_match_tk(ctx, '['); - p_attribute_specifier->attribute_list = attribute_list(ctx); - parser_match_tk(ctx, ']'); - p_attribute_specifier->last_token = ctx->current; - parser_match_tk(ctx, ']'); - return p_attribute_specifier; + //'[' '[' attribute_list ']' ']' + parser_match_tk(ctx, '['); + parser_match_tk(ctx, '['); + p_attribute_specifier->attribute_list = attribute_list(ctx); + parser_match_tk(ctx, ']'); + p_attribute_specifier->last_token = ctx->current; + parser_match_tk(ctx, ']'); + return p_attribute_specifier; } void attribute_delete(struct attribute* owner p) { - if (p) - { - attribute_token_delete(p->attribute_token); - attribute_argument_clause_delete(p->attribute_argument_clause); - assert(p->next == NULL); - free(p); - } + if (p) + { + attribute_token_delete(p->attribute_token); + attribute_argument_clause_delete(p->attribute_argument_clause); + assert(p->next == NULL); + free(p); + } } void attribute_list_destroy(struct attribute_list* obj_owner p) { - struct attribute* owner item = p->head; - while (item) - { - struct attribute* owner next = item->next; - item->next = NULL; - attribute_delete(item); - item = next; - } + struct attribute* owner item = p->head; + while (item) + { + struct attribute* owner next = item->next; + item->next = NULL; + attribute_delete(item); + item = next; + } } struct attribute_list* owner attribute_list(struct parser_ctx* ctx) { - struct attribute_list* owner p_attribute_list = calloc(1, sizeof(struct attribute_list)); - // - //attribute_list ',' attribute_opt - while (ctx->current != NULL && ( - first_of_attribute(ctx) || - ctx->current->type == ',')) - { - if (first_of_attribute(ctx)) - { - struct attribute* owner p_attribute = attribute(ctx); - p_attribute_list->attributes_flags |= p_attribute->attributes_flags; - LIST_ADD(p_attribute_list, p_attribute); - } - if (ctx->current->type == ',') - { - parser_match(ctx); - } - } - return p_attribute_list; + struct attribute_list* owner p_attribute_list = calloc(1, sizeof(struct attribute_list)); + // + //attribute_list ',' attribute_opt + while (ctx->current != NULL && ( + first_of_attribute(ctx) || + ctx->current->type == ',')) + { + if (first_of_attribute(ctx)) + { + struct attribute* owner p_attribute = attribute(ctx); + p_attribute_list->attributes_flags |= p_attribute->attributes_flags; + LIST_ADD(p_attribute_list, p_attribute); + } + if (ctx->current->type == ',') + { + parser_match(ctx); + } + } + return p_attribute_list; } bool first_of_attribute(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; - return ctx->current->type == TK_IDENTIFIER; + if (ctx->current == NULL) + return false; + return ctx->current->type == TK_IDENTIFIER; } struct attribute* owner attribute(struct parser_ctx* ctx) { - struct attribute* owner p_attribute = calloc(1, sizeof(struct attribute)); - //attribute_token attribute_argument_clause_opt - p_attribute->attribute_token = attribute_token(ctx); - p_attribute->attributes_flags = p_attribute->attribute_token->attributes_flags; - if (ctx->current->type == '(') //first - { - p_attribute->attribute_argument_clause = attribute_argument_clause(ctx); - } - return p_attribute; + struct attribute* owner p_attribute = calloc(1, sizeof(struct attribute)); + //attribute_token attribute_argument_clause_opt + p_attribute->attribute_token = attribute_token(ctx); + p_attribute->attributes_flags = p_attribute->attribute_token->attributes_flags; + if (ctx->current->type == '(') //first + { + p_attribute->attribute_argument_clause = attribute_argument_clause(ctx); + } + return p_attribute; } void attribute_token_delete(struct attribute_token* owner p) { - if (p) - { - free(p); - } + if (p) + { + free(p); + } } struct attribute_token* owner attribute_token(struct parser_ctx* ctx) { - struct attribute_token* owner p_attribute_token = calloc(1, sizeof(struct attribute_token)); + struct attribute_token* owner p_attribute_token = calloc(1, sizeof(struct attribute_token)); - struct token* attr_token = ctx->current; + struct token* attr_token = ctx->current; - bool is_standard_attribute = false; - if (strcmp(attr_token->lexeme, "deprecated") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_DEPRECATED; - } - else if (strcmp(attr_token->lexeme, "fallthrough") == 0) - { - is_standard_attribute = true; - } - else if (strcmp(attr_token->lexeme, "maybe_unused") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_MAYBE_UNUSED; - } - else if (strcmp(attr_token->lexeme, "noreturn") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_NORETURN; - } - else if (strcmp(attr_token->lexeme, "reproducible") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_REPRODUCIBLE; - } - else if (strcmp(attr_token->lexeme, "unsequenced") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_UNSEQUENCED; - } - else if (strcmp(attr_token->lexeme, "nodiscard") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_NODISCARD; - } + bool is_standard_attribute = false; + if (strcmp(attr_token->lexeme, "deprecated") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_DEPRECATED; + } + else if (strcmp(attr_token->lexeme, "fallthrough") == 0) + { + is_standard_attribute = true; + } + else if (strcmp(attr_token->lexeme, "maybe_unused") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_MAYBE_UNUSED; + } + else if (strcmp(attr_token->lexeme, "noreturn") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_NORETURN; + } + else if (strcmp(attr_token->lexeme, "reproducible") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_REPRODUCIBLE; + } + else if (strcmp(attr_token->lexeme, "unsequenced") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_UNSEQUENCED; + } + else if (strcmp(attr_token->lexeme, "nodiscard") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_NODISCARD; + } - const bool is_cake_attr = - strcmp(attr_token->lexeme, "cake") == 0; + const bool is_cake_attr = + strcmp(attr_token->lexeme, "cake") == 0; - parser_match_tk(ctx, TK_IDENTIFIER); + parser_match_tk(ctx, TK_IDENTIFIER); - if (ctx->current->type == '::') - { - parser_match(ctx); - if (is_cake_attr) - { + if (ctx->current->type == '::') + { + parser_match(ctx); + if (is_cake_attr) + { - compiler_set_warning_with_token(W_ATTRIBUTES, ctx, attr_token, "warning '%s' is not an cake attribute", ctx->current->lexeme); + compiler_diagnostic_message(W_ATTRIBUTES, ctx, attr_token, "warning '%s' is not an cake attribute", ctx->current->lexeme); - } - parser_match_tk(ctx, TK_IDENTIFIER); - } - else - { - /* - * Each implementation should choose a distinctive name for the attribute prefix in an attribute - * prefixed token. Implementations should not define attributes without an attribute prefix unless it is - * a standard attribute as specified in this document. - */ - if (!is_standard_attribute) - { - compiler_set_warning_with_token(W_ATTRIBUTES, ctx, attr_token, "warning '%s' is not an standard attribute", attr_token->lexeme); - } - } - return p_attribute_token; + } + parser_match_tk(ctx, TK_IDENTIFIER); + } + else + { + /* + * Each implementation should choose a distinctive name for the attribute prefix in an attribute + * prefixed token. Implementations should not define attributes without an attribute prefix unless it is + * a standard attribute as specified in this document. + */ + if (!is_standard_attribute) + { + compiler_diagnostic_message(W_ATTRIBUTES, ctx, attr_token, "warning '%s' is not an standard attribute", attr_token->lexeme); + } + } + return p_attribute_token; } void attribute_argument_clause_delete(struct attribute_argument_clause* owner p) { - if (p) - { - balanced_token_sequence_delete(p->p_balanced_token_sequence); - free(p); - } + if (p) + { + balanced_token_sequence_delete(p->p_balanced_token_sequence); + free(p); + } } struct attribute_argument_clause* owner attribute_argument_clause(struct parser_ctx* ctx) { - struct attribute_argument_clause* owner p_attribute_argument_clause = calloc(1, sizeof(struct attribute_argument_clause)); - //'(' balanced_token_sequence_opt ')' - parser_match_tk(ctx, '('); - p_attribute_argument_clause->p_balanced_token_sequence = balanced_token_sequence_opt(ctx); - parser_match_tk(ctx, ')'); - return p_attribute_argument_clause; + struct attribute_argument_clause* owner p_attribute_argument_clause = calloc(1, sizeof(struct attribute_argument_clause)); + //'(' balanced_token_sequence_opt ')' + parser_match_tk(ctx, '('); + p_attribute_argument_clause->p_balanced_token_sequence = balanced_token_sequence_opt(ctx); + parser_match_tk(ctx, ')'); + return p_attribute_argument_clause; } void balanced_token_sequence_delete(struct balanced_token_sequence* owner p) { - if (p) - { - struct balanced_token* owner item = p->head; - while (item) - { - struct balanced_token* owner next = item->next; - free(item); - item = next; - } - free(p); - } + if (p) + { + struct balanced_token* owner item = p->head; + while (item) + { + struct balanced_token* owner next = item->next; + free(item); + item = next; + } + free(p); + } } struct balanced_token_sequence* owner balanced_token_sequence_opt(struct parser_ctx* ctx) { - struct balanced_token_sequence* owner p_balanced_token_sequence = calloc(1, sizeof(struct balanced_token_sequence)); - //balanced_token - //balanced_token_sequence balanced_token - int count1 = 0; - int count2 = 0; - int count3 = 0; - for (; ctx->current;) - { - if (ctx->current->type == '(') - count1++; - else if (ctx->current->type == '[') - count2++; - else if (ctx->current->type == '{') - count3++; - else if (ctx->current->type == ')') - { - if (count1 == 0) - { - //parser_match(ctx); - break; - } - count1--; - } - else if (ctx->current->type == '[') - count2--; - else if (ctx->current->type == '{') - count3--; - parser_match(ctx); - } - if (count2 != 0) - { - compiler_set_error_with_token(C_ATTR_UNBALANCED, ctx, ctx->current, "expected ']' before ')'"); + struct balanced_token_sequence* owner p_balanced_token_sequence = calloc(1, sizeof(struct balanced_token_sequence)); + //balanced_token + //balanced_token_sequence balanced_token + int count1 = 0; + int count2 = 0; + int count3 = 0; + for (; ctx->current;) + { + if (ctx->current->type == '(') + count1++; + else if (ctx->current->type == '[') + count2++; + else if (ctx->current->type == '{') + count3++; + else if (ctx->current->type == ')') + { + if (count1 == 0) + { + //parser_match(ctx); + break; + } + count1--; + } + else if (ctx->current->type == '[') + count2--; + else if (ctx->current->type == '{') + count3--; + parser_match(ctx); + } + if (count2 != 0) + { + compiler_diagnostic_message(ERROR_ATTR_UNBALANCED, ctx, ctx->current, "expected ']' before ')'"); - } - if (count3 != 0) - { - compiler_set_error_with_token(C_ATTR_UNBALANCED, ctx, ctx->current, "expected '}' before ')'"); + } + if (count3 != 0) + { + compiler_diagnostic_message(ERROR_ATTR_UNBALANCED, ctx, ctx->current, "expected '}' before ')'"); - } - return p_balanced_token_sequence; + } + return p_balanced_token_sequence; } void statement_delete(struct statement* owner p) { - if (p) - { - labeled_statement_delete(p->labeled_statement); - unlabeled_statement_delete(p->unlabeled_statement); - free(p); - } + if (p) + { + labeled_statement_delete(p->labeled_statement); + unlabeled_statement_delete(p->unlabeled_statement); + free(p); + } } struct statement* owner statement(struct parser_ctx* ctx) { - struct statement* owner p_statement = calloc(1, sizeof(struct statement)); - if (first_of_labeled_statement(ctx)) - { - p_statement->labeled_statement = labeled_statement(ctx); - } - else - { - p_statement->unlabeled_statement = unlabeled_statement(ctx); - } + struct statement* owner p_statement = calloc(1, sizeof(struct statement)); + if (first_of_labeled_statement(ctx)) + { + p_statement->labeled_statement = labeled_statement(ctx); + } + else + { + p_statement->unlabeled_statement = unlabeled_statement(ctx); + } - return p_statement; + return p_statement; } struct primary_block* owner primary_block(struct parser_ctx* ctx) { - assert(ctx->current != NULL); - struct primary_block* owner p_primary_block = calloc(1, sizeof(struct primary_block)); - if (first_of_compound_statement(ctx)) - { - p_primary_block->compound_statement = compound_statement(ctx); - } - else if (first_of_selection_statement(ctx)) - { - p_primary_block->selection_statement = selection_statement(ctx); - } - else if (first_of_iteration_statement(ctx)) - { - p_primary_block->iteration_statement = iteration_statement(ctx); - } - else if (ctx->current->type == TK_KEYWORD_DEFER) - { - p_primary_block->defer_statement = defer_statement(ctx); - } - else if (ctx->current->type == TK_KEYWORD_TRY) - { - p_primary_block->try_statement = try_statement(ctx); - } - else - { - compiler_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, ctx->current, "unexpected token"); - } - return p_primary_block; + assert(ctx->current != NULL); + struct primary_block* owner p_primary_block = calloc(1, sizeof(struct primary_block)); + if (first_of_compound_statement(ctx)) + { + p_primary_block->compound_statement = compound_statement(ctx); + } + else if (first_of_selection_statement(ctx)) + { + p_primary_block->selection_statement = selection_statement(ctx); + } + else if (first_of_iteration_statement(ctx)) + { + p_primary_block->iteration_statement = iteration_statement(ctx); + } + else if (ctx->current->type == TK_KEYWORD_DEFER) + { + p_primary_block->defer_statement = defer_statement(ctx); + } + else if (ctx->current->type == TK_KEYWORD_TRY) + { + p_primary_block->try_statement = try_statement(ctx); + } + else + { + compiler_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, ctx->current, "unexpected token"); + } + return p_primary_block; } struct secondary_block* owner secondary_block(struct parser_ctx* ctx) { - check_open_brace_style(ctx, ctx->current); + check_open_brace_style(ctx, ctx->current); - struct secondary_block* owner p_secondary_block = calloc(1, sizeof(struct secondary_block)); - p_secondary_block->first_token = ctx->current; + struct secondary_block* owner p_secondary_block = calloc(1, sizeof(struct secondary_block)); + p_secondary_block->first_token = ctx->current; - p_secondary_block->statement = statement(ctx); + p_secondary_block->statement = statement(ctx); - p_secondary_block->last_token = ctx->previous; + p_secondary_block->last_token = ctx->previous; - check_close_brace_style(ctx, p_secondary_block->last_token); + check_close_brace_style(ctx, p_secondary_block->last_token); - return p_secondary_block; + return p_secondary_block; } void secondary_block_delete(struct secondary_block* owner opt p) { - if (p) - { - statement_delete(p->statement); - free(p); - } + if (p) + { + statement_delete(p->statement); + free(p); + } } void primary_block_delete(struct primary_block* owner p) { - if (p) - { - compound_statement_delete(p->compound_statement); - defer_statement_delete(p->defer_statement); - iteration_statement_delete(p->iteration_statement); - selection_statement_delete(p->selection_statement); - try_statement_delete(p->try_statement); - free(p); - } + if (p) + { + compound_statement_delete(p->compound_statement); + defer_statement_delete(p->defer_statement); + iteration_statement_delete(p->iteration_statement); + selection_statement_delete(p->selection_statement); + try_statement_delete(p->try_statement); + free(p); + } } bool first_of_primary_block(struct parser_ctx* ctx) { - if (first_of_compound_statement(ctx) || - first_of_selection_statement(ctx) || - first_of_iteration_statement(ctx) || - ctx->current->type == TK_KEYWORD_DEFER /*extension*/ || - ctx->current->type == TK_KEYWORD_TRY/*extension*/ - ) - { - return true; - } - return false; + if (first_of_compound_statement(ctx) || + first_of_selection_statement(ctx) || + first_of_iteration_statement(ctx) || + ctx->current->type == TK_KEYWORD_DEFER /*extension*/ || + ctx->current->type == TK_KEYWORD_TRY/*extension*/ + ) + { + return true; + } + return false; } void unlabeled_statement_delete(struct unlabeled_statement* owner p) { - if (p) - { - expression_statement_delete(p->expression_statement); - jump_statement_delete(p->jump_statement); - primary_block_delete(p->primary_block); - free(p); - } + if (p) + { + expression_statement_delete(p->expression_statement); + jump_statement_delete(p->jump_statement); + primary_block_delete(p->primary_block); + free(p); + } } struct unlabeled_statement* owner unlabeled_statement(struct parser_ctx* ctx) { - /* - unlabeled-statement: - expression-statement - attribute-specifier-sequence opt primary-block - attribute-specifier-sequence opt jump-statement - */ - struct unlabeled_statement* owner p_unlabeled_statement = calloc(1, sizeof(struct unlabeled_statement)); + /* + unlabeled-statement: + expression-statement + attribute-specifier-sequence opt primary-block + attribute-specifier-sequence opt jump-statement + */ + struct unlabeled_statement* owner p_unlabeled_statement = calloc(1, sizeof(struct unlabeled_statement)); - if (first_of_primary_block(ctx)) - { - p_unlabeled_statement->primary_block = primary_block(ctx); - } - else if (first_of_jump_statement(ctx)) - { - p_unlabeled_statement->jump_statement = jump_statement(ctx); - } - else - { - p_unlabeled_statement->expression_statement = expression_statement(ctx); - if (p_unlabeled_statement->expression_statement) - { - if (p_unlabeled_statement->expression_statement->expression_opt) - { - if (!type_is_void(&p_unlabeled_statement->expression_statement->expression_opt->type) && - type_is_nodiscard(&p_unlabeled_statement->expression_statement->expression_opt->type) && - p_unlabeled_statement->expression_statement->expression_opt->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) - { + if (first_of_primary_block(ctx)) + { + p_unlabeled_statement->primary_block = primary_block(ctx); + } + else if (first_of_jump_statement(ctx)) + { + p_unlabeled_statement->jump_statement = jump_statement(ctx); + } + else + { + p_unlabeled_statement->expression_statement = expression_statement(ctx); + if (p_unlabeled_statement->expression_statement) + { + if (p_unlabeled_statement->expression_statement->expression_opt) + { + if (!type_is_void(&p_unlabeled_statement->expression_statement->expression_opt->type) && + type_is_nodiscard(&p_unlabeled_statement->expression_statement->expression_opt->type) && + p_unlabeled_statement->expression_statement->expression_opt->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) + { - if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) - { - compiler_set_warning_with_token(W_ATTRIBUTES, ctx, - p_unlabeled_statement->expression_statement->expression_opt->first_token, - "ignoring return value of function declared with 'nodiscard' attribute"); - } + if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) + { + compiler_diagnostic_message(W_ATTRIBUTES, ctx, + p_unlabeled_statement->expression_statement->expression_opt->first_token, + "ignoring return value of function declared with 'nodiscard' attribute"); + } - } - if (type_is_owner(&p_unlabeled_statement->expression_statement->expression_opt->type) && - p_unlabeled_statement->expression_statement->expression_opt->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) - { + } + if (type_is_owner(&p_unlabeled_statement->expression_statement->expression_opt->type) && + p_unlabeled_statement->expression_statement->expression_opt->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) + { - if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) - { - compiler_set_warning_with_token(W_ATTRIBUTES, ctx, - p_unlabeled_statement->expression_statement->expression_opt->first_token, - "ignoring the result of owner type "); - } + if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) + { + compiler_diagnostic_message(W_ATTRIBUTES, ctx, + p_unlabeled_statement->expression_statement->expression_opt->first_token, + "ignoring the result of owner type "); + } - } - } - if (p_unlabeled_statement->expression_statement->expression_opt && - p_unlabeled_statement->expression_statement->expression_opt->expression_type == POSTFIX_FUNCTION_CALL) - { + } + } + if (p_unlabeled_statement->expression_statement->expression_opt && + p_unlabeled_statement->expression_statement->expression_opt->expression_type == POSTFIX_FUNCTION_CALL) + { - } - else - { - /* - * The objective here is to detect expression with not effect - * a == b; etc - */ - if (p_unlabeled_statement != NULL && - p_unlabeled_statement->jump_statement == NULL && - p_unlabeled_statement->expression_statement != NULL && - p_unlabeled_statement->expression_statement->expression_opt && - !type_is_void(&p_unlabeled_statement->expression_statement->expression_opt->type) && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != ASSIGNMENT_EXPRESSION && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_FUNCTION_CALL && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_INCREMENT && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_DECREMENT && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_INCREMENT && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_DECREMENT && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_DECLARATOR_ATTRIBUTE_EXPR && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_ASSERT) - { - if (ctx->current && - ctx->current->level == 0) - { + } + else + { + /* + * The objective here is to detect expression with not effect + * a == b; etc + */ + if (p_unlabeled_statement != NULL && + p_unlabeled_statement->jump_statement == NULL && + p_unlabeled_statement->expression_statement != NULL && + p_unlabeled_statement->expression_statement->expression_opt && + !type_is_void(&p_unlabeled_statement->expression_statement->expression_opt->type) && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != ASSIGNMENT_EXPRESSION && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_FUNCTION_CALL && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_INCREMENT && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_DECREMENT && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_INCREMENT && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_DECREMENT && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_DECLARATOR_ATTRIBUTE_EXPR && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_ASSERT) + { + if (ctx->current && + ctx->current->level == 0) + { #if 0 - //too many false..alerts. - //make list of for sure ... - compiler_set_warning_with_token(W_UNUSED_VALUE, - ctx, - p_unlabeled_statement->expression_statement->expression_opt->first_token, - "expression not used"); + //too many false..alerts. + //make list of for sure ... + compiler_diagnostic_message(W_UNUSED_VALUE, + ctx, + p_unlabeled_statement->expression_statement->expression_opt->first_token, + "expression not used"); #endif - } - } - } - } - } - - return p_unlabeled_statement; + } + } + } + } } + return p_unlabeled_statement; + } + void label_delete(struct label* owner p) { - if (p) - { - expression_delete(p->constant_expression); - free(p); - } + if (p) + { + expression_delete(p->constant_expression); + free(p); + } } struct label* owner label(struct parser_ctx* ctx) { - struct label* owner p_label = calloc(1, sizeof(struct label)); - if (ctx->current->type == TK_IDENTIFIER) - { - p_label->name = ctx->current; - parser_match(ctx); - parser_match_tk(ctx, ':'); - } - else if (ctx->current->type == TK_KEYWORD_CASE) - { - parser_match(ctx); - p_label->constant_expression = constant_expression(ctx, true); - parser_match_tk(ctx, ':'); - } - else if (ctx->current->type == TK_KEYWORD_DEFAULT) - { - parser_match(ctx); - parser_match_tk(ctx, ':'); - } - //attribute_specifier_sequence_opt identifier ':' - //attribute_specifier_sequence_opt 'case' constant_expression ':' - //attribute_specifier_sequence_opt 'default' ':' - return p_label; + struct label* owner p_label = calloc(1, sizeof(struct label)); + if (ctx->current->type == TK_IDENTIFIER) + { + p_label->name = ctx->current; + parser_match(ctx); + parser_match_tk(ctx, ':'); + } + else if (ctx->current->type == TK_KEYWORD_CASE) + { + parser_match(ctx); + p_label->constant_expression = constant_expression(ctx, true); + parser_match_tk(ctx, ':'); + } + else if (ctx->current->type == TK_KEYWORD_DEFAULT) + { + parser_match(ctx); + parser_match_tk(ctx, ':'); + } + //attribute_specifier_sequence_opt identifier ':' + //attribute_specifier_sequence_opt 'case' constant_expression ':' + //attribute_specifier_sequence_opt 'default' ':' + return p_label; } void labeled_statement_delete(struct labeled_statement* owner p) { - if (p) - { - label_delete(p->label); - statement_delete(p->statement); - free(p); - } + if (p) + { + label_delete(p->label); + statement_delete(p->statement); + free(p); + } } struct labeled_statement* owner labeled_statement(struct parser_ctx* ctx) { - struct labeled_statement* owner p_labeled_statement = calloc(1, sizeof(struct labeled_statement)); - //label statement - p_labeled_statement->label = label(ctx); - p_labeled_statement->statement = statement(ctx); - return p_labeled_statement; + struct labeled_statement* owner p_labeled_statement = calloc(1, sizeof(struct labeled_statement)); + //label statement + p_labeled_statement->label = label(ctx); + p_labeled_statement->statement = statement(ctx); + return p_labeled_statement; } void compound_statement_delete(struct compound_statement* owner p) { - if (p) - { - block_item_list_destroy(&p->block_item_list); - free(p); - } + if (p) + { + block_item_list_destroy(&p->block_item_list); + free(p); + } } struct compound_statement* owner compound_statement(struct parser_ctx* ctx) { - //'{' block_item_list_opt '}' - struct compound_statement* owner p_compound_statement = calloc(1, sizeof(struct compound_statement)); - struct scope block_scope = { .variables.capacity = 10 }; - scope_list_push(&ctx->scopes, &block_scope); + - p_compound_statement->first_token = ctx->current; - parser_match_tk(ctx, '{'); + //'{' block_item_list_opt '}' + struct compound_statement* owner p_compound_statement = calloc(1, sizeof(struct compound_statement)); - if (ctx->current->type != '}') - { - p_compound_statement->block_item_list = block_item_list(ctx); - } + if (p_compound_statement == NULL) + return NULL; + + p_compound_statement->diagnostic_flags = ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index]; - p_compound_statement->last_token = ctx->current; - parser_match_tk(ctx, '}'); + struct scope block_scope = {.variables.capacity = 10}; + scope_list_push(&ctx->scopes, &block_scope); - //TODO ver quem nao foi usado. + p_compound_statement->first_token = ctx->current; + parser_match_tk(ctx, '{'); - for (int i = 0; i < block_scope.variables.capacity; i++) - { - if (block_scope.variables.table == NULL) - continue; - struct map_entry* entry = block_scope.variables.table[i]; - while (entry) - { + if (ctx->current->type != '}') + { + p_compound_statement->block_item_list = block_item_list(ctx); + } - if (entry->type != TAG_TYPE_ONLY_DECLARATOR && - entry->type != TAG_TYPE_INIT_DECLARATOR) - { - entry = entry->next; - continue; - } + p_compound_statement->last_token = ctx->current; + parser_match_tk(ctx, '}'); - struct declarator* p_declarator = NULL; - struct init_declarator* p_init_declarator = NULL; - if (entry->type == TAG_TYPE_INIT_DECLARATOR) - { - p_init_declarator = entry->p; - p_declarator = p_init_declarator->p_declarator; - } - else - { - p_declarator = entry->p; - } + //TODO ver quem nao foi usado. - if (p_declarator) - { + for (int i = 0; i < block_scope.variables.capacity; i++) + { + if (block_scope.variables.table == NULL) + continue; + struct map_entry* entry = block_scope.variables.table[i]; + while (entry) + { + if (entry->type != TAG_TYPE_ONLY_DECLARATOR && + entry->type != TAG_TYPE_INIT_DECLARATOR) + { + entry = entry->next; + continue; + } - if (!type_is_maybe_unused(&p_declarator->type) && - p_declarator->num_uses == 0) - { - if (p_declarator->name->token_origin->level == 0) - { - compiler_set_warning_with_token(W_UNUSED_VARIABLE, - ctx, - p_declarator->name, - "'%s': unreferenced declarator", - p_declarator->name->lexeme); - } - } - } + struct declarator* p_declarator = NULL; + struct init_declarator* p_init_declarator = NULL; + if (entry->type == TAG_TYPE_INIT_DECLARATOR) + { + p_init_declarator = entry->p; + p_declarator = p_init_declarator->p_declarator; + } + else + { + p_declarator = entry->p; + } - entry = entry->next; - } - } + if (p_declarator) + { + + + if (!type_is_maybe_unused(&p_declarator->type) && + p_declarator->num_uses == 0) + { + if (p_declarator->name->token_origin->level == 0) + { + compiler_diagnostic_message(W_UNUSED_VARIABLE, + ctx, + p_declarator->name, + "'%s': unreferenced declarator", + p_declarator->name->lexeme); + } + } + } + + entry = entry->next; + } + } - scope_list_pop(&ctx->scopes); + scope_list_pop(&ctx->scopes); - scope_destroy(&block_scope); + scope_destroy(&block_scope); - return p_compound_statement; + return p_compound_statement; } void block_item_list_destroy(struct block_item_list* obj_owner list) { - struct block_item* owner item = list->head; - while (item) - { - struct block_item* owner next = item->next; - item->next = NULL; - block_item_delete(item); - item = next; - } + struct block_item* owner item = list->head; + while (item) + { + struct block_item* owner next = item->next; + item->next = NULL; + block_item_delete(item); + item = next; + } } struct block_item_list block_item_list(struct parser_ctx* ctx) { - /* - block_item_list: - block_item - block_item_list block_item - */ - struct block_item_list block_item_list = { 0 }; - struct block_item* owner p_block_item = NULL; - try - { - p_block_item = block_item(ctx); - if (p_block_item == NULL) throw; - LIST_ADD(&block_item_list, p_block_item); - p_block_item = NULL; /*MOVED*/ + /* + block_item_list: + block_item + block_item_list block_item + */ + struct block_item_list block_item_list = { 0 }; + struct block_item* owner p_block_item = NULL; + try + { + p_block_item = block_item(ctx); + if (p_block_item == NULL) throw; + LIST_ADD(&block_item_list, p_block_item); + p_block_item = NULL; /*MOVED*/ - while (ctx->current != NULL && ctx->current->type != '}') //follow - { - p_block_item = block_item(ctx); - if (p_block_item == NULL) throw; - LIST_ADD(&block_item_list, p_block_item); - p_block_item = NULL; /*MOVED*/ - } - } - catch - { - } + while (ctx->current != NULL && ctx->current->type != '}') //follow + { + p_block_item = block_item(ctx); + if (p_block_item == NULL) throw; + LIST_ADD(&block_item_list, p_block_item); + p_block_item = NULL; /*MOVED*/ + } + } + catch + { + } - return block_item_list; + return block_item_list; } void block_item_delete(struct block_item* owner p) { - if (p) - { - declaration_delete(p->declaration); - label_delete(p->label); - unlabeled_statement_delete(p->unlabeled_statement); - assert(p->next == NULL); - free(p); - } + if (p) + { + declaration_delete(p->declaration); + label_delete(p->label); + unlabeled_statement_delete(p->unlabeled_statement); + assert(p->next == NULL); + free(p); + } } struct block_item* owner block_item(struct parser_ctx* ctx) { - // declaration - // unlabeled_statement - // label - struct block_item* owner p_block_item = calloc(1, sizeof(struct block_item)); + // declaration + // unlabeled_statement + // label + struct block_item* owner p_block_item = calloc(1, sizeof(struct block_item)); - /* - * Attributes can be first of declaration, labels etc.. - * so it is better to parse it in advance. - */ - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + /* + * Attributes can be first of declaration, labels etc.. + * so it is better to parse it in advance. + */ + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - p_block_item->first_token = ctx->current; + p_block_item->first_token = ctx->current; - if (ctx->current->type == TK_KEYWORD__ASM) - { /* - asm-block: - __asm assembly-instruction ;opt - __asm { assembly-instruction-list } ;opt + if (ctx->current->type == TK_KEYWORD__ASM) + { /* + asm-block: + __asm assembly-instruction ;opt + __asm { assembly-instruction-list } ;opt assembly-instruction-list: - assembly-instruction ;opt - assembly-instruction ; assembly-instruction-list ;opt - */ + assembly-instruction ;opt + assembly-instruction ; assembly-instruction-list ;opt + */ - parser_match(ctx); - if (ctx->current->type == '{') - { - parser_match(ctx); - while (ctx->current->type != '}') - { - parser_match(ctx); - } - parser_match(ctx); - } - else - { - while (ctx->current->type != TK_NEWLINE) - { - ctx->current = ctx->current->next; - } - parser_match(ctx); + parser_match(ctx); + if (ctx->current->type == '{') + { + parser_match(ctx); + while (ctx->current->type != '}') + { + parser_match(ctx); + } + parser_match(ctx); + } + else + { + while (ctx->current->type != TK_NEWLINE) + { + ctx->current = ctx->current->next; + } + parser_match(ctx); - } - if (ctx->current->type == ';') - parser_match(ctx); - } - else if (first_of_declaration_specifier(ctx) || - first_of_static_assert_declaration(ctx)) - { - p_block_item->declaration = declaration(ctx, p_attribute_specifier_sequence_opt, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); + } + if (ctx->current->type == ';') + parser_match(ctx); + } + else if (first_of_declaration_specifier(ctx) || + first_of_static_assert_declaration(ctx)) + { + p_block_item->declaration = declaration(ctx, p_attribute_specifier_sequence_opt, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); - p_attribute_specifier_sequence_opt = NULL; /*MOVED*/ + p_attribute_specifier_sequence_opt = NULL; /*MOVED*/ - struct init_declarator* p = p_block_item->declaration->init_declarator_list.head; - while (p) - { - if (p->p_declarator && p->p_declarator->name) - { - naming_convention_local_var(ctx, p->p_declarator->name, &p->p_declarator->type); - } - p = p->next; - } - } - else if (first_of_label(ctx)) - { - //so identifier confunde com expression - p_block_item->label = label(ctx); - } - else - { - p_block_item->unlabeled_statement = unlabeled_statement(ctx); - } - /* - declaration-specifiers init-declarator-list_opt; - attribute-specifier-sequence declaration-specifiers init-declarator-list; - static_assert-declaration attribute_declaration - */ - /* - unlabeled-statement: - expression-statement - attribute-specifier-sequenceopt compound-statement - attribute-specifier-sequenceopt selection-statement - attribute-specifier-sequenceopt iteration-statement - attribute-specifier-sequenceopt jump-statement - - label: - attribute-specifier-sequenceopt identifier : - attribute-specifier-sequenceopt case constant-expression : - attribute-specifier-sequenceopt default : - */ + struct init_declarator* p = p_block_item->declaration->init_declarator_list.head; + while (p) + { + if (p->p_declarator && p->p_declarator->name) + { + naming_convention_local_var(ctx, p->p_declarator->name, &p->p_declarator->type); + } + p = p->next; + } + } + else if (first_of_label(ctx)) + { + //so identifier confunde com expression + p_block_item->label = label(ctx); + } + else + { + p_block_item->unlabeled_statement = unlabeled_statement(ctx); + } + /* + declaration-specifiers init-declarator-list_opt; + attribute-specifier-sequence declaration-specifiers init-declarator-list; + static_assert-declaration attribute_declaration + */ + /* + unlabeled-statement: + expression-statement + attribute-specifier-sequenceopt compound-statement + attribute-specifier-sequenceopt selection-statement + attribute-specifier-sequenceopt iteration-statement + attribute-specifier-sequenceopt jump-statement + + label: + attribute-specifier-sequenceopt identifier : + attribute-specifier-sequenceopt case constant-expression : + attribute-specifier-sequenceopt default : + */ - attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); - return p_block_item; + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + return p_block_item; } void try_statement_delete(struct try_statement* owner p) { - if (p) - { - secondary_block_delete(p->catch_secondary_block_opt); - secondary_block_delete(p->secondary_block); - free(p); - } + if (p) + { + secondary_block_delete(p->catch_secondary_block_opt); + secondary_block_delete(p->secondary_block); + free(p); + } } struct try_statement* owner try_statement(struct parser_ctx* ctx) { - struct try_statement* owner p_try_statement = calloc(1, sizeof(struct try_statement)); + struct try_statement* owner p_try_statement = calloc(1, sizeof(struct try_statement)); - p_try_statement->first_token = ctx->current; + p_try_statement->first_token = ctx->current; - assert(ctx->current->type == TK_KEYWORD_TRY); - const struct try_statement* try_statement_copy_opt = ctx->p_current_try_statement_opt; - ctx->p_current_try_statement_opt = p_try_statement; - ctx->try_catch_block_index++; - p_try_statement->try_catch_block_index = ctx->try_catch_block_index; - parser_match_tk(ctx, TK_KEYWORD_TRY); + assert(ctx->current->type == TK_KEYWORD_TRY); + const struct try_statement* try_statement_copy_opt = ctx->p_current_try_statement_opt; + ctx->p_current_try_statement_opt = p_try_statement; + ctx->try_catch_block_index++; + p_try_statement->try_catch_block_index = ctx->try_catch_block_index; + parser_match_tk(ctx, TK_KEYWORD_TRY); - p_try_statement->secondary_block = secondary_block(ctx); - /*retores the previous one*/ - ctx->p_current_try_statement_opt = try_statement_copy_opt; + p_try_statement->secondary_block = secondary_block(ctx); + /*retores the previous one*/ + ctx->p_current_try_statement_opt = try_statement_copy_opt; - if (ctx->current->type == TK_KEYWORD_CATCH) - { - p_try_statement->catch_token_opt = ctx->current; - parser_match(ctx); + if (ctx->current->type == TK_KEYWORD_CATCH) + { + p_try_statement->catch_token_opt = ctx->current; + parser_match(ctx); - p_try_statement->catch_secondary_block_opt = secondary_block(ctx); - } - p_try_statement->last_token = ctx->previous; + p_try_statement->catch_secondary_block_opt = secondary_block(ctx); + } + p_try_statement->last_token = ctx->previous; - return p_try_statement; + return p_try_statement; } void selection_statement_delete(struct selection_statement* owner p) { - if (p) - { - secondary_block_delete(p->else_secondary_block_opt); - init_declarator_delete(p->init_declarator); - secondary_block_delete(p->secondary_block); - declaration_specifiers_delete(p->declaration_specifiers); - expression_delete(p->expression); - free(p); - } + if (p) + { + secondary_block_delete(p->else_secondary_block_opt); + init_declarator_delete(p->init_declarator); + secondary_block_delete(p->secondary_block); + declaration_specifiers_delete(p->declaration_specifiers); + expression_delete(p->expression); + free(p); + } } struct selection_statement* owner selection_statement(struct parser_ctx* ctx) { - /* - init-statement: - expression-statement - simple-declaration - */ - /* - 'if' '(' init_statement_opt expression ')' statement - 'if' '(' init_statement_opt expression ')' statement 'else' statement - 'switch' '(' expression ')' statement - */ - /* - 'if' '(' expression ')' statement - 'if' '(' expression ')' statement 'else' statement - 'switch' '(' expression ')' statement - */ - struct selection_statement* owner p_selection_statement = calloc(1, sizeof(struct selection_statement)); + /* + init-statement: + expression-statement + simple-declaration + */ + /* + 'if' '(' init_statement_opt expression ')' statement + 'if' '(' init_statement_opt expression ')' statement 'else' statement + 'switch' '(' expression ')' statement + */ + /* + 'if' '(' expression ')' statement + 'if' '(' expression ')' statement 'else' statement + 'switch' '(' expression ')' statement + */ + struct selection_statement* owner p_selection_statement = calloc(1, sizeof(struct selection_statement)); - p_selection_statement->first_token = ctx->current; + p_selection_statement->first_token = ctx->current; - struct scope if_scope = { 0 }; - scope_list_push(&ctx->scopes, &if_scope); //variaveis decladas no if + struct scope if_scope = { 0 }; + scope_list_push(&ctx->scopes, &if_scope); //variaveis decladas no if - if (ctx->current->type == TK_KEYWORD_IF) - { - parser_match(ctx); + if (ctx->current->type == TK_KEYWORD_IF) + { + parser_match(ctx); - if (!(ctx->current->flags & TK_FLAG_MACRO_EXPANDED) - && !style_has_one_space(ctx->current)) - { - compiler_set_info_with_token(W_STYLE, ctx, ctx->current, "one space"); - } + if (!(ctx->current->flags & TK_FLAG_MACRO_EXPANDED) + && !style_has_one_space(ctx->current)) + { + compiler_diagnostic_message(W_STYLE, ctx, ctx->current, "one space"); + } - parser_match_tk(ctx, '('); - if (first_of_declaration_specifier(ctx)) - { - p_selection_statement->declaration_specifiers = declaration_specifiers(ctx, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); - struct init_declarator_list list = init_declarator_list(ctx, p_selection_statement->declaration_specifiers); - p_selection_statement->init_declarator = list.head; //only one - parser_match_tk(ctx, ';'); - } + parser_match_tk(ctx, '('); + if (first_of_declaration_specifier(ctx)) + { + p_selection_statement->declaration_specifiers = declaration_specifiers(ctx, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); + struct init_declarator_list list = init_declarator_list(ctx, p_selection_statement->declaration_specifiers); + p_selection_statement->init_declarator = list.head; //only one + parser_match_tk(ctx, ';'); + } - p_selection_statement->expression = expression(ctx); + p_selection_statement->expression = expression(ctx); - if (constant_value_is_valid(&p_selection_statement->expression->constant_value)) - { - //parser_setwarning_with_token(ctx, p_selection_statement->expression->first_token, "conditional expression is constant"); - } + if (p_selection_statement->expression && constant_value_is_valid(&p_selection_statement->expression->constant_value)) + { + //parser_setwarning_with_token(ctx, p_selection_statement->expression->first_token, "conditional expression is constant"); + } - if (type_is_function(&p_selection_statement->expression->type) || - type_is_array(&p_selection_statement->expression->type)) - { - compiler_set_warning_with_token(W_ADDRESS, ctx, ctx->current, "always true"); - } + if (p_selection_statement->expression && + (type_is_function(&p_selection_statement->expression->type) || + type_is_array(&p_selection_statement->expression->type))) + { + compiler_diagnostic_message(W_ADDRESS, ctx, ctx->current, "always true"); + } - parser_match_tk(ctx, ')'); + parser_match_tk(ctx, ')'); - p_selection_statement->secondary_block = secondary_block(ctx); + p_selection_statement->secondary_block = secondary_block(ctx); - if (ctx->current) - { - if (ctx->current->type == TK_KEYWORD_ELSE) - { - p_selection_statement->else_token_opt = ctx->current; - parser_match(ctx); - p_selection_statement->else_secondary_block_opt = secondary_block(ctx); - } - } - else - { - compiler_set_error_with_token(C_UNEXPECTED_END_OF_FILE, ctx, ctx->input_list.tail, "unexpected end of file"); - } - } - else if (ctx->current->type == TK_KEYWORD_SWITCH) - { - parser_match(ctx); - parser_match_tk(ctx, '('); + if (ctx->current) + { + if (ctx->current->type == TK_KEYWORD_ELSE) + { + p_selection_statement->else_token_opt = ctx->current; + parser_match(ctx); + p_selection_statement->else_secondary_block_opt = secondary_block(ctx); + } + } + else + { + compiler_diagnostic_message(ERROR_UNEXPECTED_END_OF_FILE, ctx, ctx->input_list.tail, "unexpected end of file"); + } + } + else if (ctx->current->type == TK_KEYWORD_SWITCH) + { + parser_match(ctx); + parser_match_tk(ctx, '('); - p_selection_statement->expression = expression(ctx); - parser_match_tk(ctx, ')'); + p_selection_statement->expression = expression(ctx); + parser_match_tk(ctx, ')'); - p_selection_statement->secondary_block = secondary_block(ctx); + p_selection_statement->secondary_block = secondary_block(ctx); - } - else - { - assert(false); - compiler_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, ctx->input_list.tail, "unexpected token"); - } + } + else + { + assert(false); + compiler_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, ctx->input_list.tail, "unexpected token"); + } - p_selection_statement->last_token = ctx->previous; + p_selection_statement->last_token = ctx->previous; - scope_list_pop(&ctx->scopes); + scope_list_pop(&ctx->scopes); - scope_destroy(&if_scope); + scope_destroy(&if_scope); - return p_selection_statement; + return p_selection_statement; } struct defer_statement* owner defer_statement(struct parser_ctx* ctx) { - struct defer_statement* owner p_defer_statement = calloc(1, sizeof(struct defer_statement)); - if (ctx->current->type == TK_KEYWORD_DEFER) - { - p_defer_statement->first_token = ctx->current; - parser_match(ctx); - p_defer_statement->secondary_block = secondary_block(ctx); - p_defer_statement->last_token = ctx->previous; - } - return p_defer_statement; + struct defer_statement* owner p_defer_statement = calloc(1, sizeof(struct defer_statement)); + if (ctx->current->type == TK_KEYWORD_DEFER) + { + p_defer_statement->first_token = ctx->current; + parser_match(ctx); + p_defer_statement->secondary_block = secondary_block(ctx); + p_defer_statement->last_token = ctx->previous; + } + return p_defer_statement; } void iteration_statement_delete(struct iteration_statement* owner p) { - if (p) - { - expression_delete(p->expression0); - expression_delete(p->expression1); - expression_delete(p->expression2); - declaration_delete(p->declaration); - secondary_block_delete(p->secondary_block); - free(p); - } + if (p) + { + expression_delete(p->expression0); + expression_delete(p->expression1); + expression_delete(p->expression2); + declaration_delete(p->declaration); + secondary_block_delete(p->secondary_block); + free(p); + } } struct iteration_statement* owner iteration_statement(struct parser_ctx* ctx) { - /* - iteration-statement: - while ( expression ) statement - do statement while ( expression ) ; - for ( expressionopt ; expressionopt ; expressionopt ) statement - for ( declaration expressionopt ; expressionopt ) statement - */ - struct iteration_statement* owner p_iteration_statement = calloc(1, sizeof(struct iteration_statement)); + /* + iteration-statement: + while ( expression ) statement + do statement while ( expression ) ; + for ( expressionopt ; expressionopt ; expressionopt ) statement + for ( declaration expressionopt ; expressionopt ) statement + */ + struct iteration_statement* owner p_iteration_statement = calloc(1, sizeof(struct iteration_statement)); - p_iteration_statement->first_token = ctx->current; - if (ctx->current->type == TK_KEYWORD_DO) - { - parser_match(ctx); - p_iteration_statement->secondary_block = secondary_block(ctx); - p_iteration_statement->second_token = ctx->current; - parser_match_tk(ctx, TK_KEYWORD_WHILE); - parser_match_tk(ctx, '('); + p_iteration_statement->first_token = ctx->current; + if (ctx->current->type == TK_KEYWORD_DO) + { + parser_match(ctx); + p_iteration_statement->secondary_block = secondary_block(ctx); + p_iteration_statement->second_token = ctx->current; + parser_match_tk(ctx, TK_KEYWORD_WHILE); + parser_match_tk(ctx, '('); - p_iteration_statement->expression1 = expression(ctx); - parser_match_tk(ctx, ')'); - parser_match_tk(ctx, ';'); - } - else if (ctx->current->type == TK_KEYWORD_WHILE) - { - parser_match(ctx); - parser_match_tk(ctx, '('); + p_iteration_statement->expression1 = expression(ctx); + parser_match_tk(ctx, ')'); + parser_match_tk(ctx, ';'); + } + else if (ctx->current->type == TK_KEYWORD_WHILE) + { + parser_match(ctx); + parser_match_tk(ctx, '('); - p_iteration_statement->expression1 = expression(ctx); - parser_match_tk(ctx, ')'); - p_iteration_statement->secondary_block = secondary_block(ctx); - } - else if (ctx->current->type == TK_KEYWORD_FOR) - { - parser_match(ctx); - parser_match_tk(ctx, '('); - if (first_of_declaration_specifier(ctx)) - { - struct scope for_scope = { 0 }; - scope_list_push(&ctx->scopes, &for_scope); + p_iteration_statement->expression1 = expression(ctx); + parser_match_tk(ctx, ')'); + p_iteration_statement->secondary_block = secondary_block(ctx); + } + else if (ctx->current->type == TK_KEYWORD_FOR) + { + parser_match(ctx); + parser_match_tk(ctx, '('); + if (first_of_declaration_specifier(ctx)) + { + struct scope for_scope = { 0 }; + scope_list_push(&ctx->scopes, &for_scope); - p_iteration_statement->declaration = declaration(ctx, NULL, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); - if (ctx->current->type != ';') - { - p_iteration_statement->expression1 = expression(ctx); - } - parser_match_tk(ctx, ';'); - if (ctx->current->type != ')') - p_iteration_statement->expression2 = expression(ctx); + p_iteration_statement->declaration = declaration(ctx, NULL, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); + if (ctx->current->type != ';') + { + p_iteration_statement->expression1 = expression(ctx); + } + parser_match_tk(ctx, ';'); + if (ctx->current->type != ')') + p_iteration_statement->expression2 = expression(ctx); - parser_match_tk(ctx, ')'); + parser_match_tk(ctx, ')'); - p_iteration_statement->secondary_block = secondary_block(ctx); + p_iteration_statement->secondary_block = secondary_block(ctx); - scope_list_pop(&ctx->scopes); + scope_list_pop(&ctx->scopes); - scope_destroy(&for_scope); - } - else - { - /* - * int i; - * for (i = 0; i < 10; i++) - * { - * } - */ + scope_destroy(&for_scope); + } + else + { + /* + * int i; + * for (i = 0; i < 10; i++) + * { + * } + */ - if (ctx->current->type != ';') - p_iteration_statement->expression0 = expression(ctx); - parser_match_tk(ctx, ';'); - if (ctx->current->type != ';') - p_iteration_statement->expression1 = expression(ctx); - parser_match_tk(ctx, ';'); - if (ctx->current->type != ')') - p_iteration_statement->expression2 = expression(ctx); - parser_match_tk(ctx, ')'); + if (ctx->current->type != ';') + p_iteration_statement->expression0 = expression(ctx); + parser_match_tk(ctx, ';'); + if (ctx->current->type != ';') + p_iteration_statement->expression1 = expression(ctx); + parser_match_tk(ctx, ';'); + if (ctx->current->type != ')') + p_iteration_statement->expression2 = expression(ctx); + parser_match_tk(ctx, ')'); - p_iteration_statement->secondary_block = secondary_block(ctx); - } - } - return p_iteration_statement; + p_iteration_statement->secondary_block = secondary_block(ctx); + } + } + return p_iteration_statement; } void jump_statement_delete(struct jump_statement* owner p) { - if (p) - { - expression_delete(p->expression_opt); - free(p); - } + if (p) + { + expression_delete(p->expression_opt); + free(p); + } } struct jump_statement* owner jump_statement(struct parser_ctx* ctx) { - /* - jump-statement: - goto identifier ; - continue ; - break ; - return expressionopt ; - */ + /* + jump-statement: + goto identifier ; + continue ; + break ; + return expressionopt ; + */ - /* - throw; (extension) - */ + /* + throw; (extension) + */ - struct jump_statement* owner p_jump_statement = calloc(1, sizeof(struct jump_statement)); + struct jump_statement* owner p_jump_statement = calloc(1, sizeof(struct jump_statement)); - p_jump_statement->first_token = ctx->current; + p_jump_statement->first_token = ctx->current; - if (ctx->current->type == TK_KEYWORD_GOTO) - { - parser_match(ctx); - p_jump_statement->label = ctx->current; - parser_match_tk(ctx, TK_IDENTIFIER); - } - else if (ctx->current->type == TK_KEYWORD_CONTINUE) - { - parser_match(ctx); - } - else if (ctx->current->type == TK_KEYWORD_BREAK) - { - parser_match(ctx); - } - else if (ctx->current->type == TK_KEYWORD_THROW) - { - if (ctx->p_current_try_statement_opt == NULL) - { + if (ctx->current->type == TK_KEYWORD_GOTO) + { + parser_match(ctx); + p_jump_statement->label = ctx->current; + parser_match_tk(ctx, TK_IDENTIFIER); + } + else if (ctx->current->type == TK_KEYWORD_CONTINUE) + { + parser_match(ctx); + } + else if (ctx->current->type == TK_KEYWORD_BREAK) + { + parser_match(ctx); + } + else if (ctx->current->type == TK_KEYWORD_THROW) + { + if (ctx->p_current_try_statement_opt == NULL) + { - compiler_set_error_with_token(C_THROW_STATEMENT_NOT_WITHIN_TRY_BLOCK, ctx, ctx->current, "throw statement not within try block"); - } - else - { - p_jump_statement->try_catch_block_index = ctx->p_current_try_statement_opt->try_catch_block_index; - } + compiler_diagnostic_message(ERROR_THROW_STATEMENT_NOT_WITHIN_TRY_BLOCK, ctx, ctx->current, "throw statement not within try block"); + } + else + { + p_jump_statement->try_catch_block_index = ctx->p_current_try_statement_opt->try_catch_block_index; + } - parser_match(ctx); - } - else if (ctx->current->type == TK_KEYWORD_RETURN) - { - const struct token* const p_return_token = ctx->current; - parser_match(ctx); + parser_match(ctx); + } + else if (ctx->current->type == TK_KEYWORD_RETURN) + { + const struct token* const p_return_token = ctx->current; + parser_match(ctx); - if (ctx->current->type != ';') - { - p_jump_statement->expression_opt = expression(ctx); + if (ctx->current->type != ';') + { + p_jump_statement->expression_opt = expression(ctx); - if (p_jump_statement->expression_opt) - { - /* - * Check is return type is compatible with function return - */ - struct type return_type = - get_function_return_type(&ctx->p_current_function_opt->init_declarator_list.head->p_declarator->type); + if (p_jump_statement->expression_opt) + { + /* + * Check is return type is compatible with function return + */ + struct type return_type = + get_function_return_type(&ctx->p_current_function_opt->init_declarator_list.head->p_declarator->type); - if (type_is_void(&return_type)) - { - compiler_set_error_with_token(C_VOID_FUNCTION_SHOULD_NOT_RETURN_VALUE, - ctx, - p_return_token, - "void function '%s' should not return a value", - ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme); - } - else - { - if (p_jump_statement->expression_opt) - { - check_assigment(ctx, - &return_type, - p_jump_statement->expression_opt, - true); + if (type_is_void(&return_type)) + { + compiler_diagnostic_message(ERROR_VOID_FUNCTION_SHOULD_NOT_RETURN_VALUE, + ctx, + p_return_token, + "void function '%s' should not return a value", + ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme); + } + else + { + if (p_jump_statement->expression_opt) + { + check_assigment(ctx, + &return_type, + p_jump_statement->expression_opt, + true); - } - } + } + } - type_destroy(&return_type); - } - } - } - else - { - assert(false); - } - p_jump_statement->last_token = ctx->current; - parser_match_tk(ctx, ';'); - return p_jump_statement; + type_destroy(&return_type); + } + } + } + else + { + assert(false); + } + p_jump_statement->last_token = ctx->current; + parser_match_tk(ctx, ';'); + return p_jump_statement; } void expression_statement_delete(struct expression_statement* owner p) { - if (p) - { - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - expression_delete(p->expression_opt); - free(p); - } + if (p) + { + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + expression_delete(p->expression_opt); + free(p); + } } struct expression_statement* owner expression_statement(struct parser_ctx* ctx) { - struct expression_statement* owner p_expression_statement = calloc(1, sizeof(struct expression_statement)); - /* - expression-statement: - expression opt ; - attribute-specifier-sequence expression ; - */ + struct expression_statement* owner p_expression_statement = calloc(1, sizeof(struct expression_statement)); + /* + expression-statement: + expression opt ; + attribute-specifier-sequence expression ; + */ - p_expression_statement->p_attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + p_expression_statement->p_attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - if (ctx->current->type != ';') - { - p_expression_statement->expression_opt = expression(ctx); - } + if (ctx->current->type != ';') + { + p_expression_statement->expression_opt = expression(ctx); + } - parser_match_tk(ctx, ';'); + parser_match_tk(ctx, ';'); - return p_expression_statement; + return p_expression_statement; } void declaration_list_add(struct declaration_list* list, struct declaration* owner p_declaration) { - if (list->head == NULL) - { - list->head = p_declaration; - } - else - { - assert(list->tail->next == NULL); - list->tail->next = p_declaration; - } - list->tail = p_declaration; + if (list->head == NULL) + { + list->head = p_declaration; + } + else + { + assert(list->tail->next == NULL); + list->tail->next = p_declaration; + } + list->tail = p_declaration; } void declaration_delete(struct declaration* owner p) { - if (p) - { + if (p) + { - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - static_assert_declaration_delete(p->static_assert_declaration); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + static_assert_declaration_delete(p->static_assert_declaration); - declaration_specifiers_delete(p->declaration_specifiers); + declaration_specifiers_delete(p->declaration_specifiers); - compound_statement_delete(p->function_body); + compound_statement_delete(p->function_body); - init_declarator_list_destroy(&p->init_declarator_list); - assert(p->next == NULL); - free(p); - } + init_declarator_list_destroy(&p->init_declarator_list); + assert(p->next == NULL); + free(p); + } } void declaration_list_destroy(struct declaration_list* obj_owner list) { - struct declaration* owner p = list->head; - while (p) - { - struct declaration* owner next = p->next; - p->next = NULL; - declaration_delete(p); - p = next; - } + struct declaration* owner p = list->head; + while (p) + { + struct declaration* owner next = p->next; + p->next = NULL; + declaration_delete(p); + p = next; + } } struct declaration_list translation_unit(struct parser_ctx* ctx) { - struct declaration_list declaration_list = { 0 }; - /* - translation_unit: - external_declaration - translation_unit external_declaration - */ - while (ctx->current != NULL) - { - declaration_list_add(&declaration_list, external_declaration(ctx)); - } - return declaration_list; + struct declaration_list declaration_list = { 0 }; + /* + translation_unit: + external_declaration + translation_unit external_declaration + */ + while (ctx->current != NULL) + { + declaration_list_add(&declaration_list, external_declaration(ctx)); + } + return declaration_list; } struct declaration* owner external_declaration(struct parser_ctx* ctx) { - /* - function_definition - declaration - */ - return function_definition_or_declaration(ctx); + /* + function_definition + declaration + */ + return function_definition_or_declaration(ctx); } struct compound_statement* owner function_body(struct parser_ctx* ctx) { - /* - * Used to give an unique index (inside the function) - * for try-catch blocks - */ - ctx->try_catch_block_index = 0; - ctx->p_current_try_statement_opt = NULL; - return compound_statement(ctx); + + /* + * Used to give an unique index (inside the function) + * for try-catch blocks + */ + ctx->try_catch_block_index = 0; + ctx->p_current_try_statement_opt = NULL; + return compound_statement(ctx); } static void show_unused_file_scope(struct parser_ctx* ctx) { - for (int i = 0; i < ctx->scopes.head->variables.capacity; i++) - { - if (ctx->scopes.head->variables.table == NULL) - continue; - struct map_entry* entry = ctx->scopes.head->variables.table[i]; - while (entry) - { + for (int i = 0; i < ctx->scopes.head->variables.capacity; i++) + { + if (ctx->scopes.head->variables.table == NULL) + continue; + struct map_entry* entry = ctx->scopes.head->variables.table[i]; + while (entry) + { - if (entry->type != TAG_TYPE_ONLY_DECLARATOR && - entry->type != TAG_TYPE_INIT_DECLARATOR) - { - entry = entry->next; - continue; - } + if (entry->type != TAG_TYPE_ONLY_DECLARATOR && + entry->type != TAG_TYPE_INIT_DECLARATOR) + { + entry = entry->next; + continue; + } - struct declarator* p_declarator = NULL; - struct init_declarator* p_init_declarator = NULL; - if (entry->type == TAG_TYPE_INIT_DECLARATOR) - { - p_init_declarator = entry->p; - p_declarator = p_init_declarator->p_declarator; - } - else - { - p_declarator = entry->p; - } + struct declarator* p_declarator = NULL; + struct init_declarator* p_init_declarator = NULL; + if (entry->type == TAG_TYPE_INIT_DECLARATOR) + { + p_init_declarator = entry->p; + p_declarator = p_init_declarator->p_declarator; + } + else + { + p_declarator = entry->p; + } - if (p_declarator && - p_declarator->first_token && - p_declarator->first_token->level == 0 && - declarator_is_function(p_declarator) && - (p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_STATIC)) - { - if (!type_is_maybe_unused(&p_declarator->type) && - p_declarator->num_uses == 0) - { - compiler_set_warning_with_token(W_UNUSED_VARIABLE, - ctx, - p_declarator->name, - "declarator '%s' not used", p_declarator->name->lexeme); - } - } + if (p_declarator && + p_declarator->first_token && + p_declarator->first_token->level == 0 && + declarator_is_function(p_declarator) && + (p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_STATIC)) + { + if (!type_is_maybe_unused(&p_declarator->type) && + p_declarator->num_uses == 0) + { + compiler_diagnostic_message(W_UNUSED_VARIABLE, + ctx, + p_declarator->name, + "declarator '%s' not used", p_declarator->name->lexeme); + } + } - entry = entry->next; - } - } + entry = entry->next; + } + } } struct declaration_list parse(struct parser_ctx* ctx, - struct token_list* list) + struct token_list* list) { - s_anonymous_struct_count = 0; + s_anonymous_struct_count = 0; - struct scope file_scope = { 0 }; + struct scope file_scope = { 0 }; - scope_list_push(&ctx->scopes, &file_scope); - ctx->input_list = *list; - ctx->current = ctx->input_list.head; - parser_skip_blanks(ctx); + scope_list_push(&ctx->scopes, &file_scope); + ctx->input_list = *list; + ctx->current = ctx->input_list.head; + parser_skip_blanks(ctx); - struct declaration_list l = translation_unit(ctx); - show_unused_file_scope(ctx); + struct declaration_list l = translation_unit(ctx); + show_unused_file_scope(ctx); - scope_destroy(&file_scope); + scope_destroy(&file_scope); - return l; + return l; } int fill_preprocessor_options(int argc, const char** argv, struct preprocessor_ctx* prectx) { - /*first loop used to collect options*/ - for (int i = 1; i < argc; i++) - { - if (argv[i][0] != '-') - continue; + /*first loop used to collect options*/ + for (int i = 1; i < argc; i++) + { + if (argv[i][0] != '-') + continue; - if (argv[i][1] == 'I') - { - include_dir_add(&prectx->include_dir, argv[i] + 2); - continue; - } - if (argv[i][1] == 'D') - { - char buffer[200]; - snprintf(buffer, sizeof buffer, "#define %s \n", argv[i] + 2); + if (argv[i][1] == 'I') + { + include_dir_add(&prectx->include_dir, argv[i] + 2); + continue; + } + if (argv[i][1] == 'D') + { + char buffer[200] = { 0 }; + snprintf(buffer, sizeof buffer, "#define %s \n", argv[i] + 2); - /*TODO make it more precise*/ - char* p = &buffer[7]; - while (*p) - { - if (*p == '=') - { - *p = ' '; - break; - } - p++; - } + /*TODO make it more precise*/ + char* p = &buffer[7]; + while (*p) + { + if (*p == '=') + { + *p = ' '; + break; + } + p++; + } - struct tokenizer_ctx tctx = { 0 }; - struct token_list l1 = tokenizer(&tctx, buffer, "", 0, TK_FLAG_NONE); - struct token_list r = preprocessor(prectx, &l1, 0); - token_list_destroy(&l1); - token_list_destroy(&r); - continue; - } - } - return 0; + struct tokenizer_ctx tctx = { 0 }; + struct token_list l1 = tokenizer(&tctx, buffer, "", 0, TK_FLAG_NONE); + struct token_list r = preprocessor(prectx, &l1, 0); + token_list_destroy(&l1); + token_list_destroy(&r); + continue; + } + } + return 0; } #ifdef _WIN32 unsigned long __stdcall GetEnvironmentVariableA( - const char* lpname, - char* lpbuffer, - unsigned long nsize + const char* lpname, + char* lpbuffer, + unsigned long nsize ); #else unsigned long GetEnvironmentVariableA( - const char* lpname, - char* lpbuffer, - unsigned long nsize + const char* lpname, + char* lpbuffer, + unsigned long nsize ) { - + return 0; } #endif @@ -27984,105 +28285,105 @@ void append_msvc_include_dir(struct preprocessor_ctx* prectx) #ifdef _WIN32 - char env[2000] = { 0 }; - int n = GetEnvironmentVariableA("INCLUDE", env, sizeof(env)); + char env[2000] = { 0 }; + int n = GetEnvironmentVariableA("INCLUDE", env, sizeof(env)); - if (n > 0) - { + if (n > 0) + { - const char* p = env; - for (;;) - { - if (*p == '\0') - { - break; - } - char filename_local[500] = { 0 }; - int count = 0; - while (*p != '\0' && (*p != ';' && *p != '\n')) - { - filename_local[count] = *p; - p++; - count++; - } - filename_local[count] = 0; - if (count > 0) - { - strcat(filename_local, "/"); - include_dir_add(&prectx->include_dir, filename_local); - } - if (*p == '\0') - { - break; - } - p++; - } - } + const char* p = env; + for (;;) + { + if (*p == '\0') + { + break; + } + char filename_local[500] = { 0 }; + int count = 0; + while (*p != '\0' && (*p != ';' && *p != '\n')) + { + filename_local[count] = *p; + p++; + count++; + } + filename_local[count] = 0; + if (count > 0) + { + strcat(filename_local, "/"); + include_dir_add(&prectx->include_dir, filename_local); + } + if (*p == '\0') + { + break; + } + p++; + } + } #endif } const char* owner format_code(struct options* options, const char* content) { - struct ast ast = { 0 }; - const char* owner s = NULL; + struct ast ast = { 0 }; + const char* owner s = NULL; - struct preprocessor_ctx prectx = { 0 }; + struct preprocessor_ctx prectx = { 0 }; - prectx.macros.capacity = 5000; - add_standard_macros(&prectx); + prectx.macros.capacity = 5000; + add_standard_macros(&prectx); - struct report report = { 0 }; - struct parser_ctx ctx = { 0 }; - ctx.options = *options; - ctx.p_report = &report; - struct tokenizer_ctx tctx = { 0 }; - struct token_list tokens = { 0 }; + struct report report = { 0 }; + struct parser_ctx ctx = { 0 }; + ctx.options = *options; + ctx.p_report = &report; + struct tokenizer_ctx tctx = { 0 }; + struct token_list tokens = { 0 }; - try - { - prectx.options = *options; - append_msvc_include_dir(&prectx); + try + { + prectx.options = *options; + append_msvc_include_dir(&prectx); - tokens = tokenizer(&tctx, content, "", 0, TK_FLAG_NONE); - ast.token_list = preprocessor(&prectx, &tokens, 0); - if (prectx.n_errors != 0) throw; + tokens = tokenizer(&tctx, content, "", 0, TK_FLAG_NONE); + ast.token_list = preprocessor(&prectx, &tokens, 0); + if (prectx.n_errors != 0) throw; - ast.declaration_list = parse(&ctx, &ast.token_list); - if (report.error_count > 0) throw; + ast.declaration_list = parse(&ctx, &ast.token_list); + if (report.error_count > 0) throw; - struct format_visit_ctx visit_ctx = { 0 }; - visit_ctx.ast = ast; - format_visit(&visit_ctx); + struct format_visit_ctx visit_ctx = { 0 }; + visit_ctx.ast = ast; + format_visit(&visit_ctx); - if (options->direct_compilation) - s = get_code_as_compiler_see(&visit_ctx.ast.token_list); - else - s = get_code_as_we_see(&visit_ctx.ast.token_list, options->remove_comments); + if (options->direct_compilation) + s = get_code_as_compiler_see(&visit_ctx.ast.token_list); + else + s = get_code_as_we_see(&visit_ctx.ast.token_list, options->remove_comments); - } - catch - { + } + catch + { - } + } - token_list_destroy(&tokens); + token_list_destroy(&tokens); - parser_ctx_destroy(&ctx); - ast_destroy(&ast); - preprocessor_ctx_destroy(&prectx); - return s; + parser_ctx_destroy(&ctx); + ast_destroy(&ast); + preprocessor_ctx_destroy(&prectx); + return s; } void ast_format_visit(struct ast* ast) { - /*format input source before transformation*/ - struct format_visit_ctx visit_ctx = { 0 }; - visit_ctx.ast = *ast; - format_visit(&visit_ctx); + /*format input source before transformation*/ + struct format_visit_ctx visit_ctx = { 0 }; + visit_ctx.ast = *ast; + format_visit(&visit_ctx); } void c_visit(struct ast* ast) @@ -28091,160 +28392,170 @@ void c_visit(struct ast* ast) } int compile_one_file(const char* file_name, - struct options* options, - const char* out_file_name, - int argc, - const char** argv, - struct report* report) + struct options* options, + const char* out_file_name, + int argc, + const char** argv, + struct report* report) { - printf("%s\n", file_name); - struct preprocessor_ctx prectx = { 0 }; + printf("%s\n", file_name); + struct preprocessor_ctx prectx = { 0 }; - prectx.macros.capacity = 5000; + prectx.macros.capacity = 5000; - add_standard_macros(&prectx); + add_standard_macros(&prectx); - include_config_header(&prectx); - //print_all_macros(&prectx); + include_config_header(&prectx); + //print_all_macros(&prectx); - struct ast ast = { 0 }; + struct ast ast = { 0 }; - const char* owner s = NULL; + const char* owner s = NULL; - struct parser_ctx ctx = { 0 }; - struct visit_ctx visit_ctx = { 0 }; - struct tokenizer_ctx tctx = { 0 }; - struct token_list tokens = { 0 }; + struct parser_ctx ctx = { 0 }; + struct visit_ctx visit_ctx = { 0 }; + struct tokenizer_ctx tctx = { 0 }; + struct token_list tokens = { 0 }; - ctx.options = *options; - ctx.p_report = report; - char* owner content = NULL; + ctx.options = *options; + ctx.p_report = report; + char* owner content = NULL; - try - { + try + { - if (fill_preprocessor_options(argc, argv, &prectx) != 0) - { - throw; - } + if (fill_preprocessor_options(argc, argv, &prectx) != 0) + { + throw; + } - prectx.options = *options; - append_msvc_include_dir(&prectx); + prectx.options = *options; + append_msvc_include_dir(&prectx); - content = read_file(file_name); - if (content == NULL) - { - report->error_count++; - printf("file not found '%s'\n", file_name); - throw; - } + content = read_file(file_name); + if (content == NULL) + { + report->error_count++; + printf("file not found '%s'\n", file_name); + throw; + } - if (options->sarif_output) - { - char sarif_file_name[260] = { 0 }; - strcpy(sarif_file_name, file_name); - strcat(sarif_file_name, ".sarif"); - ctx.sarif_file = (FILE * owner) fopen(sarif_file_name, "w"); - if (ctx.sarif_file) - { - const char* begin_sarif = - "{\n" - " \"version\": \"2.1.0\",\n" - //" \"$schema\": \"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json\",\n" - " \"$schema\": \"https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json\",\n" - " \"runs\": [\n" - " {\n" - " \"results\": [\n" - "\n"; - - fprintf(ctx.sarif_file, "%s", begin_sarif); - } - else - { - report->error_count++; - printf("cannot open sarif output file '%s'\n", sarif_file_name); - throw; - } - } + if (options->sarif_output) + { + char sarif_file_name[260] = { 0 }; + strcpy(sarif_file_name, file_name); + strcat(sarif_file_name, ".sarif"); + ctx.sarif_file = (FILE * owner) fopen(sarif_file_name, "w"); + if (ctx.sarif_file) + { + const char* begin_sarif = + "{\n" + " \"version\": \"2.1.0\",\n" + //" \"$schema\": \"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json\",\n" + " \"$schema\": \"https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json\",\n" + " \"runs\": [\n" + " {\n" + " \"results\": [\n" + "\n"; + + fprintf(ctx.sarif_file, "%s", begin_sarif); + } + else + { + report->error_count++; + printf("cannot open sarif output file '%s'\n", sarif_file_name); + throw; + } + } - tokens = tokenizer(&tctx, content, file_name, 0, TK_FLAG_NONE); + tokens = tokenizer(&tctx, content, file_name, 0, TK_FLAG_NONE); - ast.token_list = preprocessor(&prectx, &tokens, 0); - if (prectx.n_errors > 0) throw; + if (options->dump_tokens) + { + print_tokens(tokens.head); + } - if (options->preprocess_only) - { - const char* owner s2 = print_preprocessed_to_string2(ast.token_list.head); - printf("%s", s2); - free((void* owner)s2); - } - else - { + ast.token_list = preprocessor(&prectx, &tokens, 0); + if (prectx.n_errors > 0) throw; - ast.declaration_list = parse(&ctx, &ast.token_list); - if (report->error_count > 0) throw; + if (options->dump_pptokens) + { + print_tokens(ast.token_list.head); + } - //ast_wasm_visit(&ast); + if (options->preprocess_only) + { + const char* owner s2 = print_preprocessed_to_string2(ast.token_list.head); + printf("%s", s2); + free((void* owner)s2); + } + else + { - if (!options->no_output) - { - if (options->format_input) - { - struct format_visit_ctx f = { .ast = ast, .indentation = 4 }; - format_visit(&f); - } + ast.declaration_list = parse(&ctx, &ast.token_list); + if (report->error_count > 0) throw; - visit_ctx.target = options->target; - visit_ctx.hide_non_used_declarations = options->direct_compilation; + //ast_wasm_visit(&ast); - visit_ctx.ast = ast; - visit(&visit_ctx); + if (!options->no_output) + { + if (options->format_input) + { + struct format_visit_ctx f = {.ast = ast, .indentation = 4}; + format_visit(&f); + } - if (options->direct_compilation) - s = get_code_as_compiler_see(&visit_ctx.ast.token_list); - else - s = get_code_as_we_see(&visit_ctx.ast.token_list, options->remove_comments); + visit_ctx.target = options->target; + visit_ctx.hide_non_used_declarations = options->direct_compilation; - if (options->format_ouput) - { - /*re-parser ouput and format*/ - const char* owner s2 = format_code(options, s); - free((void* owner)s); - s = s2; - } + visit_ctx.ast = ast; + visit(&visit_ctx); - FILE* owner outfile = fopen(out_file_name, "w"); - if (outfile) - { - if (s) - fprintf(outfile, "%s", s); + if (options->direct_compilation) + s = get_code_as_compiler_see(&visit_ctx.ast.token_list); + else + s = get_code_as_we_see(&visit_ctx.ast.token_list, options->remove_comments); - fclose(outfile); - //printf("%-30s ", path); - } - else - { - report->error_count++; - printf("cannot open output file '%s' - %s\n", out_file_name, get_posix_error_message(errno)); - throw; - } + if (options->format_ouput) + { + /*re-parser ouput and format*/ + const char* owner s2 = format_code(options, s); + free((void* owner)s); + s = s2; + } + FILE* owner outfile = fopen(out_file_name, "w"); + if (outfile) + { + if (s) + fprintf(outfile, "%s", s); - } - } - } - catch - { - //printf("Error %s\n", error->message); - } + fclose(outfile); + //printf("%-30s ", path); + } + else + { + report->error_count++; + printf("cannot open output file '%s' - %s\n", out_file_name, get_posix_error_message(errno)); + throw; + } - if (ctx.sarif_file) - { - if (ctx.sarif_file) - { + + } + } + } + catch + { + //printf("Error %s\n", error->message); + } + + if (ctx.sarif_file) + { + if (ctx.sarif_file) + { #define END \ " ],\n"\ " \"tool\": {\n"\ @@ -28259,203 +28570,212 @@ int compile_one_file(const char* file_name, " ]\n"\ "}\n"\ "\n" - fprintf(ctx.sarif_file, "%s", END); - } - fclose(ctx.sarif_file); - ctx.sarif_file = NULL; - } - token_list_destroy(&tokens); - visit_ctx_destroy(&visit_ctx); - parser_ctx_destroy(&ctx); - free((void* owner)s); - free(content); - ast_destroy(&ast); - preprocessor_ctx_destroy(&prectx); + fprintf(ctx.sarif_file, "%s", END); + } + fclose(ctx.sarif_file); + ctx.sarif_file = NULL; + } + token_list_destroy(&tokens); + visit_ctx_destroy(&visit_ctx); + parser_ctx_destroy(&ctx); + free((void* owner)s); + free(content); + ast_destroy(&ast); + preprocessor_ctx_destroy(&prectx); - return report->error_count > 0; + return report->error_count > 0; } -static void longest_common_path(int argc, const char** argv, char root_dir[MAX_PATH]) +static void longest_common_path(int argc, const char** argv, char root_dir[MYMAX_PATH]) { - /* - find the longest common path - */ - for (int i = 1; i < argc; i++) - { - if (argv[i][0] == '-') - continue; + /* + find the longest common path + */ + for (int i = 1; i < argc; i++) + { + if (argv[i][0] == '-') + continue; - char fullpath_i[MAX_PATH] = { 0 }; - realpath(argv[i], fullpath_i); - strcpy(root_dir, fullpath_i); - dirname(root_dir); + char fullpath_i[MYMAX_PATH]; + if(!realpath(argv[i], fullpath_i)) + fullpath_i[0] = '\0'; + strcpy(root_dir, fullpath_i); + dirname(root_dir); - for (int k = 0; ; k++) - { - const char ch = fullpath_i[k]; - for (int j = 2; j < argc; j++) - { - if (argv[j][0] == '-') - continue; + for (int k = 0; k < MYMAX_PATH; k++) + { + const char ch = fullpath_i[k]; + for (int j = 2; j < argc; j++) + { + if (argv[j][0] == '-') + continue; - char fullpath_j[MAX_PATH] = { 0 }; - realpath(argv[j], fullpath_j); - if (fullpath_j[k] != ch) - { - strncpy(root_dir, fullpath_j, k); - root_dir[k] = '\0'; - dirname(root_dir); - goto exit; - } - } - if (ch == '\0') - break; - } - } + char fullpath_j[MYMAX_PATH]; + if(!realpath(argv[j], fullpath_j)) + fullpath_j[0] = '\0'; + if (fullpath_j[k] != ch) + { + strncpy(root_dir, fullpath_j, k); + root_dir[k] = '\0'; + dirname(root_dir); + goto exit; + } + } + if (ch == '\0') + break; + } + } exit:; } static int create_multiple_paths(const char* root, const char* outdir) { - /* - This function creates all dirs (folder1, forder2 ..) after root - root : C:/folder - outdir : C:/folder/folder1/folder2 ... - */ - - const char* p = outdir + strlen(root) + 1; - for (;;) - { - if (*p != '\0' && *p != '/' && *p != '\\') - { - p++; - continue; - } + /* + This function creates all dirs (folder1, forder2 ..) after root + root : C:/folder + outdir : C:/folder/folder1/folder2 ... + */ +#if !defined __EMSCRIPTEN__ + const char* p = outdir + strlen(root) + 1; + for (;;) + { + if (*p != '\0' && *p != '/' && *p != '\\') + { + p++; + continue; + } - char temp[MAX_PATH] = { 0 }; - strncpy(temp, outdir, p - outdir); + char temp[MYMAX_PATH] = { 0 }; + strncpy(temp, outdir, p - outdir); - int er = mkdir(temp, 0777); - if (er != 0) - { - er = errno; - if (er != EEXIST) - { - printf("error creating output folder '%s' - %s\n", temp, get_posix_error_message(er)); - return er; - } - } - if (*p == '\0') - break; - p++; - } - return 0; -} + int er = mkdir(temp, 0777); + if (er != 0) + { + er = errno; + if (er != EEXIST) + { + printf("error creating output folder '%s' - %s\n", temp, get_posix_error_message(er)); + return er; + } + } + if (*p == '\0') + break; + p++; + } + return 0; +#else + return -1; +#endif + } int compile(int argc, const char** argv, struct report* report) { - struct options options = { 0 }; - if (fill_options(&options, argc, argv) != 0) - { - return 1; - } + struct options options = { 0 }; + if (fill_options(&options, argc, argv) != 0) + { + return 1; + } - clock_t begin_clock = clock(); - int no_files = 0; + clock_t begin_clock = clock(); + int no_files = 0; - char root_dir[MAX_PATH] = { 0 }; + char root_dir[MYMAX_PATH]; + root_dir[0] = '\0'; - if (!options.no_output) - { - longest_common_path(argc, argv, root_dir); - } + if (!options.no_output) + { + longest_common_path(argc, argv, root_dir); + } - const int root_dir_len = strlen(root_dir); + const int root_dir_len = strlen(root_dir); - /*second loop to compile each file*/ - for (int i = 1; i < argc; i++) - { - if (argv[i][0] == '-') - continue; - no_files++; - char output_file[400] = { 0 }; + /*second loop to compile each file*/ + for (int i = 1; i < argc; i++) + { + if (argv[i][0] == '-') + continue; + no_files++; + char output_file[MYMAX_PATH]; + output_file[0] = '\0'; - if (!options.no_output) - { - if (no_files == 1 && options.output[0] != '\0') - { - /* - -o outputname - works when we compile just one file - */ - strcat(output_file, options.output); - } - else - { - char fullpath[MAX_PATH] = { 0 }; - realpath(argv[i], fullpath); + if (!options.no_output) + { + if (no_files == 1 && options.output[0] != '\0') + { + /* + -o outputname + works when we compile just one file + */ + strcat(output_file, options.output); + } + else + { + char fullpath[MYMAX_PATH]; + if(!realpath(argv[i], fullpath)) + fullpath[0] = '\0'; - strcpy(output_file, root_dir); - strcat(output_file, "/out"); + strcpy(output_file, root_dir); + strcat(output_file, "/out"); - strcat(output_file, fullpath + root_dir_len); + strcat(output_file, fullpath + root_dir_len); - char outdir[MAX_PATH]; - strcpy(outdir, output_file); - dirname(outdir); - if (create_multiple_paths(root_dir, outdir) != 0) - { - return 1; - } - } - } + char outdir[MYMAX_PATH]; + strcpy(outdir, output_file); + dirname(outdir); + if (create_multiple_paths(root_dir, outdir) != 0) + { + return 1; + } + } + } - char fullpath[260]; - realpath(argv[i], fullpath); - compile_one_file(fullpath, &options, output_file, argc, argv, report); - } + char fullpath[MYMAX_PATH]; + if(!realpath(argv[i], fullpath)) + fullpath[0] = '\0'; + compile_one_file(fullpath, &options, output_file, argc, argv, report); + } - clock_t end_clock = clock(); - double cpu_time_used = ((double)(end_clock - begin_clock)) / CLOCKS_PER_SEC; - report->no_files = no_files; - report->cpu_time_used_sec = cpu_time_used; - return 0; + clock_t end_clock = clock(); + double cpu_time_used = ((double) (end_clock - begin_clock)) / CLOCKS_PER_SEC; + report->no_files = no_files; + report->cpu_time_used_sec = cpu_time_used; + return 0; } struct ast get_ast(struct options* options, - const char* filename, - const char* source, - struct report* report) + const char* filename, + const char* source, + struct report* report) { - struct ast ast = { 0 }; - struct tokenizer_ctx tctx = { 0 }; + struct ast ast = { 0 }; + struct tokenizer_ctx tctx = { 0 }; - struct token_list list = tokenizer(&tctx, source, filename, 0, TK_FLAG_NONE); + struct token_list list = tokenizer(&tctx, source, filename, 0, TK_FLAG_NONE); - struct preprocessor_ctx prectx = { 0 }; - prectx.options = *options; - prectx.macros.capacity = 5000; + struct preprocessor_ctx prectx = { 0 }; + prectx.options = *options; + prectx.macros.capacity = 5000; - add_standard_macros(&prectx); + add_standard_macros(&prectx); - ast.token_list = preprocessor(&prectx, &list, 0); + ast.token_list = preprocessor(&prectx, &list, 0); - if (prectx.n_errors == 0) - { - struct parser_ctx ctx = { 0 }; - ctx.options = *options; - ctx.p_report = report; - ast.declaration_list = parse(&ctx, &ast.token_list); - parser_ctx_destroy(&ctx); - } + if (prectx.n_errors == 0) + { + struct parser_ctx ctx = { 0 }; + ctx.options = *options; + ctx.p_report = report; + ast.declaration_list = parse(&ctx, &ast.token_list); + parser_ctx_destroy(&ctx); + } - token_list_destroy(&list); - preprocessor_ctx_destroy(&prectx); + token_list_destroy(&list); + preprocessor_ctx_destroy(&prectx); - return ast; + return ast; } /* @@ -28464,220 +28784,220 @@ struct ast get_ast(struct options* options, */ int strtoargv(char* s, int n, const char* argv[/*n*/]) { - int argvc = 0; - char* p = s; - while (*p) - { - while (*p == ' ') - p++; - if (*p == 0) - break; - argv[argvc] = p; - argvc++; - while (*p != ' ' && *p != '\0') - p++; - if (*p == 0) - break; - *p = 0; - p++; - if (argvc >= n) - break;/*nao tem mais lugares*/ - } - return argvc; + int argvc = 0; + char* p = s; + while (*p) + { + while (*p == ' ') + p++; + if (*p == 0) + break; + argv[argvc] = p; + argvc++; + while (*p != ' ' && *p != '\0') + p++; + if (*p == 0) + break; + *p = 0; + p++; + if (argvc >= n) + break;/*nao tem mais lugares*/ + } + return argvc; } const char* owner compile_source(const char* pszoptions, const char* content, struct report* report) { - const char* argv[100] = { 0 }; - char string[200] = { 0 }; - snprintf(string, sizeof string, "exepath %s", pszoptions); + const char* argv[100] = { 0 }; + char string[200] = { 0 }; + snprintf(string, sizeof string, "exepath %s", pszoptions); - const int argc = strtoargv(string, 10, argv); + const int argc = strtoargv(string, 10, argv); - const char* owner s = NULL; + const char* owner s = NULL; - struct preprocessor_ctx prectx = { 0 }; - struct ast ast = { 0 }; - struct options options = { .input = LANGUAGE_CXX }; + struct preprocessor_ctx prectx = { 0 }; + struct ast ast = { 0 }; + struct options options = {.input = LANGUAGE_CXX}; - struct visit_ctx visit_ctx = { 0 }; - try - { - if (fill_options(&options, argc, argv) != 0) - { - throw; - } + struct visit_ctx visit_ctx = { 0 }; + try + { + if (fill_options(&options, argc, argv) != 0) + { + throw; + } - visit_ctx.target = options.target; - visit_ctx.hide_non_used_declarations = options.direct_compilation; - prectx.options = options; - add_standard_macros(&prectx); + visit_ctx.target = options.target; + visit_ctx.hide_non_used_declarations = options.direct_compilation; + prectx.options = options; + add_standard_macros(&prectx); - if (options.preprocess_only) - { - struct tokenizer_ctx tctx = { 0 }; - struct token_list tokens = tokenizer(&tctx, content, "c:/main.c", 0, TK_FLAG_NONE); + if (options.preprocess_only) + { + struct tokenizer_ctx tctx = { 0 }; + struct token_list tokens = tokenizer(&tctx, content, "c:/main.c", 0, TK_FLAG_NONE); - struct token_list token_list = preprocessor(&prectx, &tokens, 0); - if (prectx.n_errors == 0) - { - s = print_preprocessed_to_string2(token_list.head); - } + struct token_list token_list = preprocessor(&prectx, &tokens, 0); + if (prectx.n_errors == 0) + { + s = print_preprocessed_to_string2(token_list.head); + } - token_list_destroy(&tokens); - token_list_destroy(&token_list); - } - else - { + token_list_destroy(&tokens); + token_list_destroy(&token_list); + } + else + { - ast = get_ast(&options, "c:/main.c", content, report); - if (report->error_count > 0) throw; + ast = get_ast(&options, "c:/main.c", content, report); + if (report->error_count > 0) throw; - visit_ctx.ast = ast; - visit(&visit_ctx); + visit_ctx.ast = ast; + visit(&visit_ctx); - if (options.direct_compilation) - { - s = get_code_as_compiler_see(&visit_ctx.ast.token_list); - } - else - { - s = get_code_as_we_see(&visit_ctx.ast.token_list, options.remove_comments); - } - if (options.format_ouput) - { + if (options.direct_compilation) + { + s = get_code_as_compiler_see(&visit_ctx.ast.token_list); + } + else + { + s = get_code_as_we_see(&visit_ctx.ast.token_list, options.remove_comments); + } + if (options.format_ouput) + { - /*re-parser ouput and format*/ - const char* owner s2 = format_code(&options, s); - free((void* owner) s); - s = s2; - } + /*re-parser ouput and format*/ + const char* owner s2 = format_code(&options, s); + free((void* owner) s); + s = s2; + } - } - } - catch - { - } + } + } + catch + { + } - preprocessor_ctx_destroy(&prectx); - visit_ctx_destroy(&visit_ctx); - ast_destroy(&ast); + preprocessor_ctx_destroy(&prectx); + visit_ctx_destroy(&visit_ctx); + ast_destroy(&ast); - return s; + return s; } char* owner CompileText(const char* pszoptions, const char* content) { - /* - This function is called by the web playground - */ - printf(WHITE "Cake " CAKE_VERSION RESET "\n"); - struct report report = { 0 }; - return (char* owner) compile_source(pszoptions, content, &report); + /* + This function is called by the web playground + */ + printf(WHITE "Cake " CAKE_VERSION RESET "\n"); + struct report report = { 0 }; + return (char* owner) compile_source(pszoptions, content, &report); } void ast_destroy(struct ast* obj_owner ast) { - token_list_destroy(&ast->token_list); - declaration_list_destroy(&ast->declaration_list); + token_list_destroy(&ast->token_list); + declaration_list_destroy(&ast->declaration_list); } static bool is_all_upper(const char* text) { - const char* p = text; - while (*p) - { - if (*p != toupper(*p)) - { - return false; - } - p++; - } - return true; + const char* p = text; + while (*p) + { + if (*p != toupper(*p)) + { + return false; + } + p++; + } + return true; } static bool is_snake_case(const char* text) { - if (text == NULL) - return true; + if (text == NULL) + return true; - if (!(*text >= 'a' && *text <= 'z')) - { - return false; - } + if (!(*text >= 'a' && *text <= 'z')) + { + return false; + } - while (*text) - { - if ((*text >= 'a' && *text <= 'z') || - *text == '_' || - (*text >= '0' && *text <= '9')) + while (*text) + { + if ((*text >= 'a' && *text <= 'z') || + *text == '_' || + (*text >= '0' && *text <= '9')) - { - //ok - } - else - return false; - text++; - } + { + //ok + } + else + return false; + text++; + } - return true; + return true; } static bool is_camel_case(const char* text) { - if (text == NULL) - return true; + if (text == NULL) + return true; - if (!(*text >= 'a' && *text <= 'z')) - { - return false; - } + if (!(*text >= 'a' && *text <= 'z')) + { + return false; + } - while (*text) - { - if ((*text >= 'a' && *text <= 'z') || - (*text >= 'A' && *text <= 'Z') || - (*text >= '0' && *text <= '9')) - { - //ok - } - else - return false; - text++; - } + while (*text) + { + if ((*text >= 'a' && *text <= 'z') || + (*text >= 'A' && *text <= 'Z') || + (*text >= '0' && *text <= '9')) + { + //ok + } + else + return false; + text++; + } - return true; + return true; } static bool is_pascal_case(const char* text) { - if (text == NULL) - return true; + if (text == NULL) + return true; - if (!(text[0] >= 'A' && text[0] <= 'Z')) - { - /*first letter uppepr case*/ - return false; - } + if (!(text[0] >= 'A' && text[0] <= 'Z')) + { + /*first letter uppepr case*/ + return false; + } - while (*text) - { - if ((*text >= 'a' && *text <= 'z') || - (*text >= 'A' && *text <= 'Z') || - (*text >= '0' && *text <= '9')) - { - //ok - } - else - return false; - text++; - } + while (*text) + { + if ((*text >= 'a' && *text <= 'z') || + (*text >= 'A' && *text <= 'Z') || + (*text >= '0' && *text <= '9')) + { + //ok + } + else + return false; + text++; + } - return true; + return true; } /* @@ -28686,168 +29006,170 @@ static bool is_pascal_case(const char* text) */ void naming_convention_struct_tag(struct parser_ctx* ctx, struct token* token) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (ctx->options.style == STYLE_CAKE) - { - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for struct/union tags"); - } - } - else if (ctx->options.style == STYLE_MICROSOFT) - { - if (!is_pascal_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use camelCase for struct/union tags"); - } - } + if (ctx->options.style == STYLE_CAKE) + { + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for struct/union tags"); + } + } + else if (ctx->options.style == STYLE_MICROSOFT) + { + if (!is_pascal_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use camelCase for struct/union tags"); + } + } } void naming_convention_enum_tag(struct parser_ctx* ctx, struct token* token) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (ctx->options.style == STYLE_CAKE) - { - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for enum tags"); - } - } - else if (ctx->options.style == STYLE_MICROSOFT) - { - if (!is_pascal_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use PascalCase for enum tags"); - } - } + if (ctx->options.style == STYLE_CAKE) + { + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for enum tags"); + } + } + else if (ctx->options.style == STYLE_MICROSOFT) + { + if (!is_pascal_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use PascalCase for enum tags"); + } + } } void naming_convention_function(struct parser_ctx* ctx, struct token* token) { - if (token == NULL) - return; + if (token == NULL) + return; - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (ctx->options.style == STYLE_CAKE) - { - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for functions"); - } - } - else if (ctx->options.style == STYLE_MICROSOFT) - { - if (!is_pascal_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use PascalCase for functions"); - } - } + if (ctx->options.style == STYLE_CAKE) + { + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for functions"); + } + } + else if (ctx->options.style == STYLE_MICROSOFT) + { + if (!is_pascal_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use PascalCase for functions"); + } + } } void naming_convention_global_var(struct parser_ctx* ctx, struct token* token, struct type* type, enum storage_class_specifier_flags storage) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (!type_is_function_or_function_pointer(type)) - { - if (storage & STORAGE_SPECIFIER_STATIC) - { - if (token->lexeme[0] != 's' || token->lexeme[1] != '_') - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use prefix s_ for static global variables"); - } - } - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case global variables"); - } - } + if (!type_is_function_or_function_pointer(type)) + { + if (storage & STORAGE_SPECIFIER_STATIC) + { + if (token->lexeme[0] != 's' || token->lexeme[1] != '_') + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use prefix s_ for static global variables"); + } + } + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case global variables"); + } + } } void naming_convention_local_var(struct parser_ctx* ctx, struct token* token, struct type* type) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (ctx->options.style == STYLE_CAKE) - { - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for local variables"); - } - } - else if (ctx->options.style == STYLE_MICROSOFT) - { - if (!is_camel_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use camelCase for local variables"); - } - } + if (ctx->options.style == STYLE_CAKE) + { + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for local variables"); + } + } + else if (ctx->options.style == STYLE_MICROSOFT) + { + if (!is_camel_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use camelCase for local variables"); + } + } } void naming_convention_enumerator(struct parser_ctx* ctx, struct token* token) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (!is_all_upper(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use UPPERCASE for enumerators"); - } + if (!is_all_upper(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use UPPERCASE for enumerators"); + } } void naming_convention_struct_member(struct parser_ctx* ctx, struct token* token, struct type* type) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for struct members"); - } + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for struct members"); + } } void naming_convention_parameter(struct parser_ctx* ctx, struct token* token, struct type* type) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for arguments"); - } + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for arguments"); + } } +/* End of: parser.c */ +/* Start of: visit.c */ void defer_scope_delete_all(struct defer_scope* owner p); @@ -29513,7 +29835,7 @@ static void visit_generic_selection(struct visit_ctx* ctx, struct generic_select struct generic_association* p = p_generic_selection->generic_assoc_list.head; while (p) { - visit_type_name(ctx, p->p_type_name); + if(p->p_type_name) visit_type_name(ctx, p->p_type_name); visit_expression(ctx, p->expression); p = p->next; } @@ -30428,7 +30750,6 @@ static void visit_init_declarator_list(struct visit_ctx* ctx, struct init_declar } else { - assert(p_init_declarator->initializer->braced_initializer != NULL); if (p_init_declarator->initializer->braced_initializer) { visit_bracket_initializer_list(ctx, @@ -30518,7 +30839,7 @@ static void visit_struct_or_union_specifier(struct visit_ctx* ctx, struct struct struct token* first = p_struct_or_union_specifier->first_token; const char* tag = p_struct_or_union_specifier->tag_name; - char buffer[200] = { 0 }; + char buffer[sizeof(p_struct_or_union_specifier->tag_name)+8] = { 0 }; snprintf(buffer, sizeof buffer, " %s", tag); struct tokenizer_ctx tctx = { 0 }; struct token_list l2 = tokenizer(&tctx, buffer, NULL, 0, TK_FLAG_FINAL); @@ -31277,15 +31598,19 @@ void visit(struct visit_ctx* ctx) } +/* End of: visit.c */ + +/* Start of: flow_visit.c */ + /* - NULL - | - [function] (NULL <- child0 <- last_child) - | - [try] (NULL <- child0 <- last_child) - | + NULL + | + [function] (NULL <- child0 <- last_child) + | + [try] (NULL <- child0 <- last_child) + | tail_block-> [while] (NULL <- child0 <- last_child) */ @@ -31293,23 +31618,23 @@ tail_block-> [while] (NULL <- child0 <- last_child) struct flow_defer_scope { - //things must called at end of scope - struct declarator* declarator; // declarator - struct defer_statement* defer_statement; // defer + //things must called at end of scope + struct declarator* declarator; // declarator + struct defer_statement* defer_statement; // defer - //statements for controling where jump like break, throw stop. + //statements for controling where jump like break, throw stop. - struct try_statement* p_try_statement; //try - struct selection_statement* p_selection_statement; //if switch - struct iteration_statement* p_iteration_statement; //for do while - struct statement* p_statement;// - struct compound_statement* p_compound_statement; - struct compound_statement* p_function_body; - struct secondary_block* p_secondary_block; - struct primary_block* p_primary_block; + struct try_statement* p_try_statement; //try + struct selection_statement* p_selection_statement; //if switch + struct iteration_statement* p_iteration_statement; //for do while + struct statement* p_statement;// + struct compound_statement* p_compound_statement; + struct compound_statement* p_function_body; + struct secondary_block* p_secondary_block; + struct primary_block* p_primary_block; - struct flow_defer_scope* owner last_child; /**/ - struct flow_defer_scope* owner previous; + struct flow_defer_scope* owner last_child; /**/ + struct flow_defer_scope* owner previous; }; void flow_visit_declaration(struct flow_visit_ctx* ctx, struct declaration* p_declaration); @@ -31323,384 +31648,384 @@ static void flow_visit_enum_specifier(struct flow_visit_ctx* ctx, struct enum_sp static void flow_visit_type_specifier(struct flow_visit_ctx* ctx, struct type_specifier* p_type_specifier); struct visit_objects { - struct flow_defer_scope* current_block; - struct flow_defer_scope* next_child; + struct flow_defer_scope* current_block; + struct flow_defer_scope* next_child; }; struct object* visit_objects_next(struct visit_objects* visit_objects) { - while (visit_objects->current_block) - { - while (visit_objects->next_child) - { - if (visit_objects->next_child->declarator) - { - struct object* p = &visit_objects->next_child->declarator->object; - visit_objects->next_child = visit_objects->next_child->previous; - return p; - } - else - { - visit_objects->next_child = visit_objects->next_child->previous; - } - } + while (visit_objects->current_block) + { + while (visit_objects->next_child) + { + if (visit_objects->next_child->declarator) + { + struct object* p = &visit_objects->next_child->declarator->object; + visit_objects->next_child = visit_objects->next_child->previous; + return p; + } + else + { + visit_objects->next_child = visit_objects->next_child->previous; + } + } - visit_objects->current_block = visit_objects->current_block->previous; - if (visit_objects->current_block) - visit_objects->next_child = visit_objects->current_block->last_child; + visit_objects->current_block = visit_objects->current_block->previous; + if (visit_objects->current_block) + visit_objects->next_child = visit_objects->current_block->last_child; - } + } - return NULL; + return NULL; } struct flow_defer_scope* flow_visit_ctx_push_tail_block(struct flow_visit_ctx* ctx) { - struct flow_defer_scope* owner p_block = calloc(1, sizeof * p_block); - p_block->previous = ctx->tail_block; - ctx->tail_block = p_block; - return ctx->tail_block; + struct flow_defer_scope* owner p_block = calloc(1, sizeof * p_block); + p_block->previous = ctx->tail_block; + ctx->tail_block = p_block; + return ctx->tail_block; } struct flow_defer_scope* flow_visit_ctx_push_child(struct flow_visit_ctx* ctx) { - struct flow_defer_scope* owner child = calloc(1, sizeof * child); - child->previous = ctx->tail_block->last_child; - ctx->tail_block->last_child = child; - return ctx->tail_block->last_child; + struct flow_defer_scope* owner child = calloc(1, sizeof * child); + child->previous = ctx->tail_block->last_child; + ctx->tail_block->last_child = child; + return ctx->tail_block->last_child; } void flow_defer_scope_delete_one(struct flow_defer_scope* owner p) { - struct flow_defer_scope* owner p_block = p; - if (p_block != NULL) - { - struct flow_defer_scope* owner child = p_block->last_child; - while (child != NULL) - { - struct flow_defer_scope* owner previous = child->previous; - child->previous = NULL; - flow_defer_scope_delete_one(child); - child = previous; - } - assert(p_block->previous == NULL); - free(p_block); - } + struct flow_defer_scope* owner p_block = p; + if (p_block != NULL) + { + struct flow_defer_scope* owner child = p_block->last_child; + while (child != NULL) + { + struct flow_defer_scope* owner previous = child->previous; + child->previous = NULL; + flow_defer_scope_delete_one(child); + child = previous; + } + assert(p_block->previous == NULL); + free(p_block); + } } void flow_visit_ctx_pop_tail_block(struct flow_visit_ctx* ctx) { - if (ctx->tail_block) - { - struct flow_defer_scope* owner previous = ctx->tail_block->previous; - ctx->tail_block->previous = NULL; - flow_defer_scope_delete_one(ctx->tail_block); - ctx->tail_block = previous; - } + if (ctx->tail_block) + { + struct flow_defer_scope* owner previous = ctx->tail_block->previous; + ctx->tail_block->previous = NULL; + flow_defer_scope_delete_one(ctx->tail_block); + ctx->tail_block = previous; + } } static bool check_defer_and_variables(struct flow_visit_ctx* ctx, - struct flow_defer_scope* deferblock, - struct token* position_token) + struct flow_defer_scope* deferblock, + struct token* position_token) { - bool found_error = false; + bool found_error = false; - struct flow_defer_scope* deferchild = deferblock->last_child; - while (deferchild != NULL) - { - if (deferchild->defer_statement) - { - const int error_count = ctx->ctx->p_report->error_count; - const int warnings_count = ctx->ctx->p_report->warnings_count; - const int info_count = ctx->ctx->p_report->info_count; + struct flow_defer_scope* deferchild = deferblock->last_child; + while (deferchild != NULL) + { + if (deferchild->defer_statement) + { + const int error_count = ctx->ctx->p_report->error_count; + const int warnings_count = ctx->ctx->p_report->warnings_count; + const int info_count = ctx->ctx->p_report->info_count; - flow_visit_secondary_block(ctx, deferchild->defer_statement->secondary_block); + flow_visit_secondary_block(ctx, deferchild->defer_statement->secondary_block); - if (error_count != ctx->ctx->p_report->error_count || - warnings_count != ctx->ctx->p_report->warnings_count || - info_count != ctx->ctx->p_report->info_count) - { - compiler_set_info_with_token(0, ctx->ctx, position_token, "defer end of scope"); - } - } - else if (deferchild->declarator) - { - struct declarator* p_declarator = deferchild->declarator; - const char* name = p_declarator->name ? p_declarator->name->lexeme : "?"; + if (error_count != ctx->ctx->p_report->error_count || + warnings_count != ctx->ctx->p_report->warnings_count || + info_count != ctx->ctx->p_report->info_count) + { + compiler_diagnostic_message(0, ctx->ctx, position_token, "defer end of scope"); + } + } + else if (deferchild->declarator) + { + struct declarator* p_declarator = deferchild->declarator; + const char* name = p_declarator->name ? p_declarator->name->lexeme : "?"; - visit_object(ctx->ctx, &p_declarator->type, &p_declarator->object, position_token, name, false); + visit_object(ctx->ctx, &p_declarator->type, &p_declarator->object, position_token, name, false); - } - deferchild = deferchild->previous; - } - return found_error; + } + deferchild = deferchild->previous; + } + return found_error; } static bool flow_find_label_unlabeled_statement(struct flow_visit_ctx* ctx, struct unlabeled_statement* p_unlabeled_statement, const char* label); static bool check_all_defer_until_try(struct flow_visit_ctx* ctx, struct flow_defer_scope* deferblock, - struct token* position_token) + struct token* position_token) { - bool found_error = false; - struct flow_defer_scope* p_defer = deferblock; - while (p_defer != NULL) - { - if (check_defer_and_variables(ctx, p_defer, position_token)) - found_error = true; + bool found_error = false; + struct flow_defer_scope* p_defer = deferblock; + while (p_defer != NULL) + { + if (check_defer_and_variables(ctx, p_defer, position_token)) + found_error = true; - if (p_defer->p_try_statement) - { - break; - } + if (p_defer->p_try_statement) + { + break; + } - p_defer = p_defer->previous; - } - return found_error; + p_defer = p_defer->previous; + } + return found_error; } static bool flow_find_label_block_item_list(struct flow_visit_ctx* ctx, struct block_item_list* p_block_item, const char* label) { - struct block_item* block_item = p_block_item->head; - while (block_item) - { - if (block_item && - block_item->label && - block_item->label->name && - strcmp(block_item->label->name->lexeme, label) == 0) - { - /*achou*/ - return true; - } - else if (block_item->unlabeled_statement) - { - if (flow_find_label_unlabeled_statement(ctx, block_item->unlabeled_statement, label)) - { - return true; - } - } + struct block_item* block_item = p_block_item->head; + while (block_item) + { + if (block_item && + block_item->label && + block_item->label->name && + strcmp(block_item->label->name->lexeme, label) == 0) + { + /*achou*/ + return true; + } + else if (block_item->unlabeled_statement) + { + if (flow_find_label_unlabeled_statement(ctx, block_item->unlabeled_statement, label)) + { + return true; + } + } - block_item = block_item->next; - } + block_item = block_item->next; + } - return false; + return false; } static bool flow_find_label_statement(struct flow_visit_ctx* ctx, struct statement* statement, const char* label); static bool flow_find_label_unlabeled_statement(struct flow_visit_ctx* ctx, struct unlabeled_statement* p_unlabeled_statement, const char* label) { - if (p_unlabeled_statement->primary_block) - { - if (p_unlabeled_statement->primary_block->compound_statement) - { - if (flow_find_label_block_item_list(ctx, - &p_unlabeled_statement->primary_block->compound_statement->block_item_list, - label)) - { - return true; - } - } - else if (p_unlabeled_statement->primary_block->selection_statement) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->secondary_block->statement, label)) - { - return true; - } - if (p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt->statement, label)) - { - return true; - } - } - } - else if (p_unlabeled_statement->primary_block->try_statement) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->secondary_block->statement, label)) - { - return true; - } - if (p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt->statement, label)) - { - return true; - } - } - } - else if (p_unlabeled_statement->primary_block->iteration_statement) - { - if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->iteration_statement->secondary_block->statement, label)) - { - return true; - } - } - } - return false; + if (p_unlabeled_statement->primary_block) + { + if (p_unlabeled_statement->primary_block->compound_statement) + { + if (flow_find_label_block_item_list(ctx, + &p_unlabeled_statement->primary_block->compound_statement->block_item_list, + label)) + { + return true; + } + } + else if (p_unlabeled_statement->primary_block->selection_statement) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->secondary_block->statement, label)) + { + return true; + } + if (p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt->statement, label)) + { + return true; + } + } + } + else if (p_unlabeled_statement->primary_block->try_statement) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->secondary_block->statement, label)) + { + return true; + } + if (p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt->statement, label)) + { + return true; + } + } + } + else if (p_unlabeled_statement->primary_block->iteration_statement) + { + if (flow_find_label_statement(ctx, p_unlabeled_statement->primary_block->iteration_statement->secondary_block->statement, label)) + { + return true; + } + } + } + return false; } static bool flow_find_label_statement(struct flow_visit_ctx* ctx, struct statement* statement, const char* label) { - if (statement->labeled_statement) - { - if (statement->labeled_statement && - statement->labeled_statement->label && - strcmp(statement->labeled_statement->label->name->lexeme, label) == 0) - { - /*achou*/ - return true; - } - } - else if (statement->unlabeled_statement) - { - if (flow_find_label_unlabeled_statement(ctx, statement->unlabeled_statement, label)) - return true; - } - return false; + if (statement->labeled_statement) + { + if (statement->labeled_statement && + statement->labeled_statement->label && + strcmp(statement->labeled_statement->label->name->lexeme, label) == 0) + { + /*achou*/ + return true; + } + } + else if (statement->unlabeled_statement) + { + if (flow_find_label_unlabeled_statement(ctx, statement->unlabeled_statement, label)) + return true; + } + return false; } static bool flow_find_label_scope(struct flow_visit_ctx* ctx, struct flow_defer_scope* deferblock, const char* label) { - if (deferblock->p_iteration_statement) - { - if (deferblock->p_iteration_statement->secondary_block) - { - if (flow_find_label_statement(ctx, deferblock->p_iteration_statement->secondary_block->statement, label)) - return true; - } - } - else if (deferblock->p_selection_statement) - { - if (deferblock->p_selection_statement->secondary_block) - { - if (flow_find_label_statement(ctx, deferblock->p_selection_statement->secondary_block->statement, label)) - return true; - } + if (deferblock->p_iteration_statement) + { + if (deferblock->p_iteration_statement->secondary_block) + { + if (flow_find_label_statement(ctx, deferblock->p_iteration_statement->secondary_block->statement, label)) + return true; + } + } + else if (deferblock->p_selection_statement) + { + if (deferblock->p_selection_statement->secondary_block) + { + if (flow_find_label_statement(ctx, deferblock->p_selection_statement->secondary_block->statement, label)) + return true; + } - if (deferblock->p_selection_statement->else_secondary_block_opt) - { - if (flow_find_label_statement(ctx, deferblock->p_selection_statement->else_secondary_block_opt->statement, label)) - return true; - } - } - else if (deferblock->p_try_statement) - { - if (deferblock->p_try_statement->secondary_block) - { - if (flow_find_label_statement(ctx, deferblock->p_try_statement->secondary_block->statement, label)) - return true; - } + if (deferblock->p_selection_statement->else_secondary_block_opt) + { + if (flow_find_label_statement(ctx, deferblock->p_selection_statement->else_secondary_block_opt->statement, label)) + return true; + } + } + else if (deferblock->p_try_statement) + { + if (deferblock->p_try_statement->secondary_block) + { + if (flow_find_label_statement(ctx, deferblock->p_try_statement->secondary_block->statement, label)) + return true; + } - if (deferblock->p_try_statement->catch_secondary_block_opt) - { - if (flow_find_label_statement(ctx, deferblock->p_try_statement->catch_secondary_block_opt->statement, label)) - return true; - } - } - else if (deferblock->p_statement) - { - if (flow_find_label_statement(ctx, deferblock->p_statement, label)) - return true; - } - else if (deferblock->p_function_body) - { - if (flow_find_label_block_item_list(ctx, - &deferblock->p_function_body->block_item_list, - label)) - { - return true; - } - } - else if (deferblock->p_compound_statement) - { - if (flow_find_label_block_item_list(ctx, - &deferblock->p_compound_statement->block_item_list, - label)) - { - return true; - } - } - return false; + if (deferblock->p_try_statement->catch_secondary_block_opt) + { + if (flow_find_label_statement(ctx, deferblock->p_try_statement->catch_secondary_block_opt->statement, label)) + return true; + } + } + else if (deferblock->p_statement) + { + if (flow_find_label_statement(ctx, deferblock->p_statement, label)) + return true; + } + else if (deferblock->p_function_body) + { + if (flow_find_label_block_item_list(ctx, + &deferblock->p_function_body->block_item_list, + label)) + { + return true; + } + } + else if (deferblock->p_compound_statement) + { + if (flow_find_label_block_item_list(ctx, + &deferblock->p_compound_statement->block_item_list, + label)) + { + return true; + } + } + return false; } static bool check_all_defer_until_label(struct flow_visit_ctx* ctx, struct flow_defer_scope* deferblock, const char* label, - struct token* position_token) + struct token* position_token) { - bool error_found = false; - /* - * Precisamos saber quantos escopos nós saimos até achar o label. - * Para isso procuramos no escopo atual aonde aparede o goto. - * Se o label não esta diretamente neste escopo ou dentro de algum escopo interno - * Não nós imprimos os defers pois estamos saindo do escopo e vamos para o escopo - * de cima. Assim vamos repetindo em cada saida de escopo imprimos o defer. - */ - struct flow_defer_scope* p_defer = deferblock; + bool error_found = false; + /* + * Precisamos saber quantos escopos nós saimos até achar o label. + * Para isso procuramos no escopo atual aonde aparede o goto. + * Se o label não esta diretamente neste escopo ou dentro de algum escopo interno + * Não nós imprimos os defers pois estamos saindo do escopo e vamos para o escopo + * de cima. Assim vamos repetindo em cada saida de escopo imprimos o defer. + */ + struct flow_defer_scope* p_defer = deferblock; - while (p_defer != NULL) - { - if (!flow_find_label_scope(ctx, p_defer, label)) - { - error_found = error_found || check_defer_and_variables(ctx, p_defer, position_token); - } - else - { - break; - } - p_defer = p_defer->previous; - } - return error_found; + while (p_defer != NULL) + { + if (!flow_find_label_scope(ctx, p_defer, label)) + { + error_found = error_found || check_defer_and_variables(ctx, p_defer, position_token); + } + else + { + break; + } + p_defer = p_defer->previous; + } + return error_found; } static bool check_all_defer_until_iter(struct flow_visit_ctx* ctx, - struct flow_defer_scope* deferblock, - struct token* position_token) + struct flow_defer_scope* deferblock, + struct token* position_token) { - bool error_found = false; - struct flow_defer_scope* p_defer = deferblock; - while (p_defer != NULL) - { - if (check_defer_and_variables(ctx, p_defer, position_token)) - error_found = true; - if (p_defer->p_iteration_statement) - { - break; - } - p_defer = p_defer->previous; - } - return error_found; + bool error_found = false; + struct flow_defer_scope* p_defer = deferblock; + while (p_defer != NULL) + { + if (check_defer_and_variables(ctx, p_defer, position_token)) + error_found = true; + if (p_defer->p_iteration_statement) + { + break; + } + p_defer = p_defer->previous; + } + return error_found; } static bool check_all_defer_until_iteration_or_selection_statement(struct flow_visit_ctx* ctx, - struct flow_defer_scope* deferblock, - struct token* position_token) + struct flow_defer_scope* deferblock, + struct token* position_token) { - bool error_found = false; - struct flow_defer_scope* p_defer = deferblock; - while (p_defer != NULL) - { - if (check_defer_and_variables(ctx, p_defer, position_token)) - error_found = true; - if (p_defer->p_iteration_statement || p_defer->p_selection_statement) - { - //break pode ser usado em loops or switch - break; - } - p_defer = p_defer->previous; - } - return error_found; + bool error_found = false; + struct flow_defer_scope* p_defer = deferblock; + while (p_defer != NULL) + { + if (check_defer_and_variables(ctx, p_defer, position_token)) + error_found = true; + if (p_defer->p_iteration_statement || p_defer->p_selection_statement) + { + //break pode ser usado em loops or switch + break; + } + p_defer = p_defer->previous; + } + return error_found; } static bool check_all_defer_until_end(struct flow_visit_ctx* ctx, struct flow_defer_scope* deferblock, struct token* position_token) { - bool found_found = false; - struct flow_defer_scope* p_defer = deferblock; - while (p_defer != NULL) - { - found_found = found_found || check_defer_and_variables(ctx, p_defer, position_token); - p_defer = p_defer->previous; - } - return found_found; + bool found_found = false; + struct flow_defer_scope* p_defer = deferblock; + while (p_defer != NULL) + { + found_found = found_found || check_defer_and_variables(ctx, p_defer, position_token); + p_defer = p_defer->previous; + } + return found_found; } @@ -31708,600 +32033,589 @@ static bool check_all_defer_until_end(struct flow_visit_ctx* ctx, struct flow_de static void flow_visit_secondary_block(struct flow_visit_ctx* ctx, struct secondary_block* p_secondary_block) { - flow_visit_statement(ctx, p_secondary_block->statement); + flow_visit_statement(ctx, p_secondary_block->statement); } static void flow_visit_defer_statement(struct flow_visit_ctx* ctx, struct defer_statement* p_defer_statement) { - - //adiciona como filho do ultimo bloco -// struct defer_scope* p_defer = visit_ctx_push_tail_child(ctx); - // p_defer->defer_statement = p_defer_statement; - - - - - struct flow_defer_scope* p_defer = flow_visit_ctx_push_child(ctx); - p_defer->defer_statement = p_defer_statement; - - - /* - We are not going to visit the secondary block here because - this is not the place were defer is executed. - */ + struct flow_defer_scope* p_defer = flow_visit_ctx_push_child(ctx); + p_defer->defer_statement = p_defer_statement; + /* + We are not going to visit the secondary block here because + this is not the place were defer is executed. + */ } static void flow_visit_try_statement(struct flow_visit_ctx* ctx, struct try_statement* p_try_statement) { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_try_statement = p_try_statement; + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_try_statement = p_try_statement; - if (p_try_statement->secondary_block) - flow_visit_secondary_block(ctx, p_try_statement->secondary_block); + if (p_try_statement->secondary_block) + flow_visit_secondary_block(ctx, p_try_statement->secondary_block); - check_defer_and_variables(ctx, p_defer, p_try_statement->secondary_block->last_token); + check_defer_and_variables(ctx, p_defer, p_try_statement->secondary_block->last_token); - flow_visit_ctx_pop_tail_block(ctx); + flow_visit_ctx_pop_tail_block(ctx); } static struct object* expression_is_comparing_owner_with_null(struct expression* p_expression) { - if (p_expression->expression_type == EQUALITY_EXPRESSION_EQUAL && - type_is_pointer(&p_expression->left->type) && - expression_is_null_pointer_constant(p_expression->right)) - { - // if ( pointer == NULL ) - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->left, &type); - type_destroy(&type); - return p_object; - } + if (p_expression->expression_type == EQUALITY_EXPRESSION_EQUAL && + type_is_pointer(&p_expression->left->type) && + expression_is_null_pointer_constant(p_expression->right)) + { + // if ( pointer == NULL ) + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->left, &type); + type_destroy(&type); + return p_object; + } - if (p_expression->expression_type == EQUALITY_EXPRESSION_EQUAL && - expression_is_null_pointer_constant(p_expression->left) && - type_is_pointer(&p_expression->right->type)) - { - // if (NULL == pointer) - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->right, &type); - type_destroy(&type); - return p_object; - } + if (p_expression->expression_type == EQUALITY_EXPRESSION_EQUAL && + expression_is_null_pointer_constant(p_expression->left) && + type_is_pointer(&p_expression->right->type)) + { + // if (NULL == pointer) + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->right, &type); + type_destroy(&type); + return p_object; + } - if (p_expression->expression_type == UNARY_EXPRESSION_NOT && - type_is_pointer(&p_expression->right->type)) - { - //if (!p) same as p == NULL - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->right, &type); - type_destroy(&type); - return p_object; - } + if (p_expression->expression_type == UNARY_EXPRESSION_NOT && + type_is_pointer(&p_expression->right->type)) + { + //if (!p) same as p == NULL + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->right, &type); + type_destroy(&type); + return p_object; + } - return NULL; + return NULL; } static struct object* expression_is_comparing_owner_with_not_null(struct expression* p_expression) { + if (p_expression->expression_type == EQUALITY_EXPRESSION_NOT_EQUAL && + type_is_pointer(&p_expression->left->type) && + expression_is_null_pointer_constant(p_expression->right)) + { + //if (p != NULL) + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->left, &type); + type_destroy(&type); + return p_object; + } - if (p_expression->expression_type == EQUALITY_EXPRESSION_NOT_EQUAL && - type_is_pointer(&p_expression->left->type) && - expression_is_null_pointer_constant(p_expression->right)) - { - //if (p != NULL) - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->left, &type); - type_destroy(&type); - return p_object; - } - - if (p_expression->expression_type == EQUALITY_EXPRESSION_NOT_EQUAL && - expression_is_null_pointer_constant(p_expression->right) && - type_is_pointer(&p_expression->left->type)) - { - //NULL != p - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression->right, &type); - type_destroy(&type); - return p_object; - } + if (p_expression->expression_type == EQUALITY_EXPRESSION_NOT_EQUAL && + expression_is_null_pointer_constant(p_expression->right) && + type_is_pointer(&p_expression->left->type)) + { + //NULL != p + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression->right, &type); + type_destroy(&type); + return p_object; + } - if (type_is_pointer(&p_expression->type)) - { - // if (p) same as p != NULL - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_expression, &type); - type_destroy(&type); - return p_object; - } + if (type_is_pointer(&p_expression->type)) + { + // if (p) same as p != NULL + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_expression, &type); + type_destroy(&type); + return p_object; + } - return NULL; + return NULL; } void push_copy_of_current_state(struct flow_visit_ctx* ctx) { - /* - top of stack constains the copy - */ + /* + top of stack constains the copy + */ - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_push_copy_current_state(p_object); - p_object = visit_objects_next(&v1); - } + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_push_copy_current_state(p_object); + p_object = visit_objects_next(&v1); + } } void restore_state(struct flow_visit_ctx* ctx, int state_index_to_restore) { - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_restore_state(p_object, state_index_to_restore); - p_object = visit_objects_next(&v1); - }; + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_restore_state(p_object, state_index_to_restore); + p_object = visit_objects_next(&v1); + }; } static void object_merge_states_with_current(struct object* object, - int dest_index, - int before_index, - int after_index) + int dest_index, + int before_index, + int after_index) { - if (dest_index == 0 || (object->object_state_stack.size - dest_index >= 0 && - object->object_state_stack.size - dest_index < object->object_state_stack.size)) - { - } - else - { - return; - } + if (dest_index == 0 || (object->object_state_stack.size - dest_index >= 0 && + object->object_state_stack.size - dest_index < object->object_state_stack.size)) + { + } + else + { + return; + } - enum object_state* dest = dest_index == 0 ? &object->state : - &object->object_state_stack.data[object->object_state_stack.size - dest_index]; + enum object_state* dest = dest_index == 0 ? &object->state : + &object->object_state_stack.data[object->object_state_stack.size - dest_index]; - if (before_index == 0 || (object->object_state_stack.size - before_index >= 0 && - object->object_state_stack.size - before_index < object->object_state_stack.size)) - { - } - else - { - return; - } - enum object_state state_before = before_index == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - before_index]; + if (before_index == 0 || (object->object_state_stack.size - before_index >= 0 && + object->object_state_stack.size - before_index < object->object_state_stack.size)) + { + } + else + { + return; + } + enum object_state state_before = before_index == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - before_index]; - if (after_index == 0 || - (object->object_state_stack.size - after_index >= 0 && - object->object_state_stack.size - after_index < object->object_state_stack.size)) - { - } - else - { + if (after_index == 0 || + (object->object_state_stack.size - after_index >= 0 && + object->object_state_stack.size - after_index < object->object_state_stack.size)) + { + } + else + { - return; - } - enum object_state state_after = after_index == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - after_index]; + return; + } + enum object_state state_after = after_index == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - after_index]; - *dest |= (state_before | state_after); + *dest |= (state_before | state_after); - if (object->pointed) - { - object_merge_states_with_current(object->pointed, dest_index, before_index, after_index); - } + if (object->pointed) + { + object_merge_states_with_current(object->pointed, dest_index, before_index, after_index); + } - for (int i = 0; i < object->members.size; i++) - { - object_merge_states_with_current(&object->members.data[i], dest_index, before_index, after_index); - } + for (int i = 0; i < object->members.size; i++) + { + object_merge_states_with_current(&object->members.data[i], dest_index, before_index, after_index); + } } void merge_states(struct flow_visit_ctx* ctx, - int dest_index, - int before_index, //before while - int after_index) + int dest_index, + int before_index, //before while + int after_index) { - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_merge_states_with_current(p_object, dest_index, - before_index, - after_index); - p_object = visit_objects_next(&v1); - }; + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_merge_states_with_current(p_object, dest_index, + before_index, + after_index); + p_object = visit_objects_next(&v1); + }; } static void object_merge_if_else_states(struct object* object, - int dest_index, - int original_state, - int true_branch_state, - int false_branch_state) + int dest_index, + int original_state, + int true_branch_state, + int false_branch_state) { - if (dest_index == 0 || (object->object_state_stack.size - dest_index >= 0 && - object->object_state_stack.size - dest_index < object->object_state_stack.size)) - { - } - else - { - return; - } - if (original_state == 0 || (object->object_state_stack.size - original_state >= 0 && - object->object_state_stack.size - original_state < object->object_state_stack.size)) - { - } - else - { + if (dest_index == 0 || (object->object_state_stack.size - dest_index >= 0 && + object->object_state_stack.size - dest_index < object->object_state_stack.size)) + { + } + else + { + return; + } + if (original_state == 0 || (object->object_state_stack.size - original_state >= 0 && + object->object_state_stack.size - original_state < object->object_state_stack.size)) + { + } + else + { - return; - } if (true_branch_state == 0 || - (object->object_state_stack.size - true_branch_state >= 0 && - object->object_state_stack.size - true_branch_state < object->object_state_stack.size)) - { - } - else - { - return; - } - if (false_branch_state == 0 || (object->object_state_stack.size - false_branch_state >= 0 && - object->object_state_stack.size - false_branch_state < object->object_state_stack.size)) - { - } - else - { + return; + } if (true_branch_state == 0 || + (object->object_state_stack.size - true_branch_state >= 0 && + object->object_state_stack.size - true_branch_state < object->object_state_stack.size)) + { + } + else + { + return; + } + if (false_branch_state == 0 || (object->object_state_stack.size - false_branch_state >= 0 && + object->object_state_stack.size - false_branch_state < object->object_state_stack.size)) + { + } + else + { - return; - } + return; + } - enum object_state* dest = dest_index == 0 ? &object->state : - &object->object_state_stack.data[object->object_state_stack.size - dest_index]; + enum object_state* dest = dest_index == 0 ? &object->state : + &object->object_state_stack.data[object->object_state_stack.size - dest_index]; - enum object_state s_original = original_state == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - original_state]; + enum object_state s_original = original_state == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - original_state]; - enum object_state s_true_branch = true_branch_state == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - true_branch_state]; + enum object_state s_true_branch = true_branch_state == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - true_branch_state]; - enum object_state s_false_branch = false_branch_state == 0 ? object->state : - object->object_state_stack.data[object->object_state_stack.size - false_branch_state]; + enum object_state s_false_branch = false_branch_state == 0 ? object->state : + object->object_state_stack.data[object->object_state_stack.size - false_branch_state]; - if (s_true_branch != s_original && - s_false_branch != s_original) - { - *dest |= (s_true_branch | s_false_branch); - } - else if (s_true_branch != s_original) - { - *dest |= (s_true_branch | s_original); - } - else if (s_false_branch != s_original) - { - *dest |= (s_false_branch | s_original); - } - else - { - *dest |= s_original; - } + if (s_true_branch != s_original && + s_false_branch != s_original) + { + *dest |= (s_true_branch | s_false_branch); + } + else if (s_true_branch != s_original) + { + *dest |= (s_true_branch | s_original); + } + else if (s_false_branch != s_original) + { + *dest |= (s_false_branch | s_original); + } + else + { + *dest |= s_original; + } - if (object->pointed) - { - object_merge_if_else_states(object->pointed, dest_index, original_state, true_branch_state, false_branch_state); - } + if (object->pointed) + { + object_merge_if_else_states(object->pointed, dest_index, original_state, true_branch_state, false_branch_state); + } - for (int i = 0; i < object->members.size; i++) - { - object_merge_if_else_states(&object->members.data[i], dest_index, original_state, true_branch_state, false_branch_state); - } + for (int i = 0; i < object->members.size; i++) + { + object_merge_if_else_states(&object->members.data[i], dest_index, original_state, true_branch_state, false_branch_state); + } } void merge_if_else_states(struct flow_visit_ctx* ctx, - int dest_index, - int original_state, //original - int true_branch_state, //true branch - int false_branch_state) //false branch -{ - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; - - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_merge_if_else_states(p_object, dest_index, - original_state, - true_branch_state, - false_branch_state); - p_object = visit_objects_next(&v1); - }; + int dest_index, + int original_state, //original + int true_branch_state, //true branch + int false_branch_state) //false branch +{ + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; + + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_merge_if_else_states(p_object, dest_index, + original_state, + true_branch_state, + false_branch_state); + p_object = visit_objects_next(&v1); + }; } void pop_states(struct flow_visit_ctx* ctx, int n) { - struct visit_objects v1 = { .current_block = ctx->tail_block, - .next_child = ctx->tail_block->last_child }; + struct visit_objects v1 = { .current_block = ctx->tail_block, + .next_child = ctx->tail_block->last_child }; - struct object* p_object = visit_objects_next(&v1); - while (p_object) - { - object_pop_states(p_object, n); - p_object = visit_objects_next(&v1); - }; + struct object* p_object = visit_objects_next(&v1); + while (p_object) + { + object_pop_states(p_object, n); + p_object = visit_objects_next(&v1); + }; } static void flow_visit_if_statement(struct flow_visit_ctx* ctx, struct selection_statement* p_selection_statement) { - assert(p_selection_statement->first_token->type == TK_KEYWORD_IF); - struct object* p_object_compared_with_null = NULL; + assert(p_selection_statement->first_token->type == TK_KEYWORD_IF); + struct object* p_object_compared_with_null = NULL; - if (p_selection_statement->expression) - { - p_object_compared_with_null = expression_is_comparing_owner_with_null(p_selection_statement->expression); - } + if (p_selection_statement->expression) + { + p_object_compared_with_null = expression_is_comparing_owner_with_null(p_selection_statement->expression); + } - struct object* p_object_compared_with_not_null = NULL; - if (p_selection_statement->expression) - { - p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_selection_statement->expression); - } + struct object* p_object_compared_with_not_null = NULL; + if (p_selection_statement->expression) + { + p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_selection_statement->expression); + } - /* - This index is from the end of top of stack going to base of statck - */ - const int original = 2; - push_copy_of_current_state(ctx); + /* + This index is from the end of top of stack going to base of statck + */ + const int original = 2; + push_copy_of_current_state(ctx); - if (p_object_compared_with_null) - { - //if (p == 0) { p is null } - p_object_compared_with_null->state = OBJECT_STATE_NULL; - } - if (p_object_compared_with_not_null) - { - //if (p != 0) { p is not null } - p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; - } + if (p_object_compared_with_null) + { + //if (p == 0) { p is null } + p_object_compared_with_null->state = OBJECT_STATE_NULL; + } + if (p_object_compared_with_not_null) + { + //if (p != 0) { p is not null } + p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; + } - if (p_selection_statement->secondary_block) - { + if (p_selection_statement->secondary_block) + { - flow_visit_secondary_block(ctx, p_selection_statement->secondary_block); - // check_defer_and_variables(ctx, p_defer, p_selection_statement->secondary_block->last_token); + flow_visit_secondary_block(ctx, p_selection_statement->secondary_block); + // check_defer_and_variables(ctx, p_defer, p_selection_statement->secondary_block->last_token); - } + } - bool was_last_statement_inside_true_branch_return = false; - if (ctx->p_last_jump_statement) - { - //TODO gotos etc... + bool was_last_statement_inside_true_branch_return = false; + if (ctx->p_last_jump_statement) + { + //TODO gotos etc... - was_last_statement_inside_true_branch_return = - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; - } + was_last_statement_inside_true_branch_return = + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; + } - //enum object_state state_left_in_true_branch = 0; - //if (p_object_compared_with_null) - // state_left_in_true_branch = p_object_compared_with_null->state; - //else if (p_object_compared_with_not_null) - // state_left_in_true_branch = p_object_compared_with_not_null->state; + //enum object_state state_left_in_true_branch = 0; + //if (p_object_compared_with_null) + // state_left_in_true_branch = p_object_compared_with_null->state; + //else if (p_object_compared_with_not_null) + // state_left_in_true_branch = p_object_compared_with_not_null->state; - /*let's make a copy of the state we left true branch*/ - const int true_branch = 1; - push_copy_of_current_state(ctx); + /*let's make a copy of the state we left true branch*/ + const int true_branch = 1; + push_copy_of_current_state(ctx); - restore_state(ctx, original); + restore_state(ctx, original); - const int current = 0; + const int current = 0; - /*when we dont have else block we have a empty imaginary one */ - /*we invert the object state*/ - if (p_object_compared_with_null) - { - // if (p == NULL) { } else { p is not null } - p_object_compared_with_null->state = OBJECT_STATE_NOT_NULL; - } - if (p_object_compared_with_not_null) - { - // if (p != NULL) { } else { p is null } - p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - } + /*when we dont have else block we have a empty imaginary one */ + /*we invert the object state*/ + if (p_object_compared_with_null) + { + // if (p == NULL) { } else { p is not null } + p_object_compared_with_null->state = OBJECT_STATE_NOT_NULL; + } + if (p_object_compared_with_not_null) + { + // if (p != NULL) { } else { p is null } + p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + } - ctx->p_last_jump_statement = NULL; - if (p_selection_statement->else_secondary_block_opt) - { - //struct flow_defer_scope* owner p_defer = calloc(1, sizeof * p_defer); - //p_defer->previous = ctx->tail_block; - //ctx->tail_block = p_defer; - //p_defer->p_selection_statement = p_selection_statement; - flow_visit_secondary_block(ctx, p_selection_statement->else_secondary_block_opt); - //ctx->tail_block = ctx->tail_block->previous; //POP + ctx->p_last_jump_statement = NULL; + if (p_selection_statement->else_secondary_block_opt) + { + //struct flow_defer_scope* owner p_defer = calloc(1, sizeof * p_defer); + //p_defer->previous = ctx->tail_block; + //ctx->tail_block = p_defer; + //p_defer->p_selection_statement = p_selection_statement; + flow_visit_secondary_block(ctx, p_selection_statement->else_secondary_block_opt); + //ctx->tail_block = ctx->tail_block->previous; //POP - } + } - bool was_last_statement_inside_else_branch_return = false; - if (ctx->p_last_jump_statement) - { - //TODO gotos etc... - was_last_statement_inside_else_branch_return = - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; - } + bool was_last_statement_inside_else_branch_return = false; + if (ctx->p_last_jump_statement) + { + //TODO gotos etc... + was_last_statement_inside_else_branch_return = + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; + } - if (was_last_statement_inside_true_branch_return) - { - if (was_last_statement_inside_else_branch_return) - { - restore_state(ctx, original); - } - else - { - //the else state is the current state - } - } - else - { - if (was_last_statement_inside_else_branch_return) - { - restore_state(ctx, true_branch); - } - else - { - merge_if_else_states(ctx, current, original, true_branch, current); - } - } + if (was_last_statement_inside_true_branch_return) + { + if (was_last_statement_inside_else_branch_return) + { + restore_state(ctx, original); + } + else + { + //the else state is the current state + } + } + else + { + if (was_last_statement_inside_else_branch_return) + { + restore_state(ctx, true_branch); + } + else + { + merge_if_else_states(ctx, current, original, true_branch, current); + } + } - pop_states(ctx, 2); + pop_states(ctx, 2); } static void flow_visit_block_item(struct flow_visit_ctx* ctx, struct block_item* p_block_item); -static void flow_visit_switch_statement(struct flow_visit_ctx* ctx, struct selection_statement* p_selection_statement) -{ - assert(p_selection_statement->first_token->type == TK_KEYWORD_SWITCH); - - int inverse_stack = 1; //we have 1 item - push_copy_of_current_state(ctx); //2 (permanent copy) - - - //const int current = 0; - - //const int nothing = -1; - - //bool has_default_case = false; - int default_index = -1; - - //for each case - // visit - // merge not so simple if set in all branches the initial cannot be merged - // restore - struct statement* p_statement = p_selection_statement->secondary_block->statement; - if (p_statement && - p_statement->unlabeled_statement && - p_statement->unlabeled_statement->primary_block && - p_statement->unlabeled_statement->primary_block->compound_statement) - { - struct compound_statement* p_compound_statement = - p_statement->unlabeled_statement->primary_block->compound_statement; - - struct block_item* item = p_compound_statement->block_item_list.head; - while (item) - { - if (item->label && item->first_token->type == TK_KEYWORD_CASE) - { - /* - Each time we find a case we restore the state to the state we - have before entering switch - */ - restore_state(ctx, inverse_stack); - } - if (item->label && item->first_token->type == TK_KEYWORD_DEFAULT) - { - default_index = inverse_stack; - /* - Each time we find a case we restore the state to the state we - have before entering switch - */ - restore_state(ctx, inverse_stack); - } - else if (item->unlabeled_statement && - item->unlabeled_statement->jump_statement && - item->first_token->type == TK_KEYWORD_BREAK) - { - /* - Each time we find a break we safe the state - pushing it - */ - push_copy_of_current_state(ctx); - inverse_stack++; - } - flow_visit_block_item(ctx, item); +static void flow_visit_switch_statement(struct flow_visit_ctx* ctx, struct selection_statement* p_selection_statement) +{ + assert(p_selection_statement->first_token->type == TK_KEYWORD_SWITCH); - item = item->next; - } - } + int inverse_stack = 1; //we have 1 item + push_copy_of_current_state(ctx); //2 (permanent copy) - if (default_index == -1) - { - inverse_stack++; - default_index = inverse_stack; - push_copy_of_current_state(ctx); - } + //const int current = 0; - const int original = inverse_stack; + //const int nothing = -1; - merge_if_else_states(ctx, 0, original, 2, default_index); + //bool has_default_case = false; + int default_index = -1; - for (int i = 3; i < inverse_stack; i++) - { - merge_if_else_states(ctx, 0, original, i, 0); - } + //for each case + // visit + // merge not so simple if set in all branches the initial cannot be merged + // restore + struct statement* p_statement = p_selection_statement->secondary_block->statement; + if (p_statement && + p_statement->unlabeled_statement && + p_statement->unlabeled_statement->primary_block && + p_statement->unlabeled_statement->primary_block->compound_statement) + { + struct compound_statement* p_compound_statement = + p_statement->unlabeled_statement->primary_block->compound_statement; + + struct block_item* item = p_compound_statement->block_item_list.head; + while (item) + { + if (item->label && item->first_token->type == TK_KEYWORD_CASE) + { + /* + Each time we find a case we restore the state to the state we + have before entering switch + */ + restore_state(ctx, inverse_stack); + } + if (item->label && item->first_token->type == TK_KEYWORD_DEFAULT) + { + default_index = inverse_stack; + /* + Each time we find a case we restore the state to the state we + have before entering switch + */ + restore_state(ctx, inverse_stack); + } + else if (item->unlabeled_statement && + item->unlabeled_statement->jump_statement && + item->first_token->type == TK_KEYWORD_BREAK) + { + /* + Each time we find a break we safe the state + pushing it + */ + push_copy_of_current_state(ctx); + inverse_stack++; + } + flow_visit_block_item(ctx, item); + + item = item->next; + } + } + if (default_index == -1) + { + inverse_stack++; + default_index = inverse_stack; + push_copy_of_current_state(ctx); - /* - we have a stack of states for each case label - now we need to merge them - */ - //The number of case we have is inverse_stack - 1 + } + + const int original = inverse_stack; + + merge_if_else_states(ctx, 0, original, 2, default_index); - pop_states(ctx, inverse_stack); + for (int i = 3; i < inverse_stack; i++) + { + merge_if_else_states(ctx, 0, original, i, 0); + } + + + /* + we have a stack of states for each case label + now we need to merge them + */ + //The number of case we have is inverse_stack - 1 + + pop_states(ctx, inverse_stack); } static void flow_visit_selection_statement(struct flow_visit_ctx* ctx, struct selection_statement* p_selection_statement) { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_selection_statement = p_selection_statement; + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_selection_statement = p_selection_statement; - if (p_selection_statement->first_token->type == TK_KEYWORD_IF) - { - flow_visit_if_statement(ctx, p_selection_statement); - } - else if (p_selection_statement->first_token->type == TK_KEYWORD_SWITCH) - { - flow_visit_switch_statement(ctx, p_selection_statement); - } - else - assert(false); + if (p_selection_statement->first_token->type == TK_KEYWORD_IF) + { + flow_visit_if_statement(ctx, p_selection_statement); + } + else if (p_selection_statement->first_token->type == TK_KEYWORD_SWITCH) + { + flow_visit_switch_statement(ctx, p_selection_statement); + } + else + assert(false); - flow_visit_ctx_pop_tail_block(ctx); + flow_visit_ctx_pop_tail_block(ctx); } static void flow_visit_compound_statement(struct flow_visit_ctx* ctx, struct compound_statement* p_compound_statement); @@ -32310,14 +32624,14 @@ static void flow_visit_initializer_list(struct flow_visit_ctx* ctx, struct initi static void flow_visit_bracket_initializer_list(struct flow_visit_ctx* ctx, struct braced_initializer* p_bracket_initializer_list) { - if (p_bracket_initializer_list->initializer_list == NULL) - { + if (p_bracket_initializer_list->initializer_list == NULL) + { - } - else - { - flow_visit_initializer_list(ctx, p_bracket_initializer_list->initializer_list); - } + } + else + { + flow_visit_initializer_list(ctx, p_bracket_initializer_list->initializer_list); + } } static void flow_visit_designation(struct flow_visit_ctx* ctx, struct designation* p_designation) @@ -32326,34 +32640,34 @@ static void flow_visit_designation(struct flow_visit_ctx* ctx, struct designatio static void flow_visit_initializer(struct flow_visit_ctx* ctx, struct initializer* p_initializer) { - if (p_initializer->p_attribute_specifier_sequence_opt) - { - flow_visit_attribute_specifier_sequence(ctx, p_initializer->p_attribute_specifier_sequence_opt); - } + if (p_initializer->p_attribute_specifier_sequence_opt) + { + flow_visit_attribute_specifier_sequence(ctx, p_initializer->p_attribute_specifier_sequence_opt); + } - if (p_initializer->designation) - { - flow_visit_designation(ctx, p_initializer->designation); - } + if (p_initializer->designation) + { + flow_visit_designation(ctx, p_initializer->designation); + } - if (p_initializer->assignment_expression) - { - flow_visit_expression(ctx, p_initializer->assignment_expression); - } - else if (p_initializer->braced_initializer) - { - flow_visit_bracket_initializer_list(ctx, p_initializer->braced_initializer); - } + if (p_initializer->assignment_expression) + { + flow_visit_expression(ctx, p_initializer->assignment_expression); + } + else if (p_initializer->braced_initializer) + { + flow_visit_bracket_initializer_list(ctx, p_initializer->braced_initializer); + } } static void flow_visit_initializer_list(struct flow_visit_ctx* ctx, struct initializer_list* p_initializer_list) { - struct initializer* p_initializer = p_initializer_list->head; - while (p_initializer) - { - flow_visit_initializer(ctx, p_initializer); - p_initializer = p_initializer->next; - } + struct initializer* p_initializer = p_initializer_list->head; + while (p_initializer) + { + flow_visit_initializer(ctx, p_initializer); + p_initializer = p_initializer->next; + } } static void flow_visit_type_qualifier(struct flow_visit_ctx* ctx, struct type_qualifier* p_type_qualifier) @@ -32363,941 +32677,970 @@ static void flow_visit_type_qualifier(struct flow_visit_ctx* ctx, struct type_qu static void flow_visit_specifier_qualifier(struct flow_visit_ctx* ctx, struct type_specifier_qualifier* p_specifier_qualifier) { - if (p_specifier_qualifier->type_specifier) - flow_visit_type_specifier(ctx, p_specifier_qualifier->type_specifier); + if (p_specifier_qualifier->type_specifier) + flow_visit_type_specifier(ctx, p_specifier_qualifier->type_specifier); - if (p_specifier_qualifier->type_qualifier) - flow_visit_type_qualifier(ctx, p_specifier_qualifier->type_qualifier); + if (p_specifier_qualifier->type_qualifier) + flow_visit_type_qualifier(ctx, p_specifier_qualifier->type_qualifier); } static void flow_visit_specifier_qualifier_list(struct flow_visit_ctx* ctx, struct specifier_qualifier_list* p_specifier_qualifier_list_opt, - struct type* p_type) + struct type* p_type) { - if (p_specifier_qualifier_list_opt == NULL) - return; + if (p_specifier_qualifier_list_opt == NULL) + return; - if (p_specifier_qualifier_list_opt->struct_or_union_specifier) - { - flow_visit_struct_or_union_specifier(ctx, p_specifier_qualifier_list_opt->struct_or_union_specifier); - } - else if (p_specifier_qualifier_list_opt->enum_specifier) - { - flow_visit_enum_specifier(ctx, p_specifier_qualifier_list_opt->enum_specifier); - } - else if (p_specifier_qualifier_list_opt->typedef_declarator) - { - //typedef name - } - //else if (p_specifier_qualifier_list->p_typeof_expression_opt) - //{ - // flow_visit_expression(ctx, p_specifier_qualifier_list->p_typeof_expression_opt); - //} - else - { - struct type_specifier_qualifier* p_specifier_qualifier = p_specifier_qualifier_list_opt->head; - while (p_specifier_qualifier) - { - flow_visit_specifier_qualifier(ctx, p_specifier_qualifier); - p_specifier_qualifier = p_specifier_qualifier->next; - } - } + if (p_specifier_qualifier_list_opt->struct_or_union_specifier) + { + flow_visit_struct_or_union_specifier(ctx, p_specifier_qualifier_list_opt->struct_or_union_specifier); + } + else if (p_specifier_qualifier_list_opt->enum_specifier) + { + flow_visit_enum_specifier(ctx, p_specifier_qualifier_list_opt->enum_specifier); + } + else if (p_specifier_qualifier_list_opt->typedef_declarator) + { + //typedef name + } + //else if (p_specifier_qualifier_list->p_typeof_expression_opt) + //{ + // flow_visit_expression(ctx, p_specifier_qualifier_list->p_typeof_expression_opt); + //} + else + { + struct type_specifier_qualifier* p_specifier_qualifier = p_specifier_qualifier_list_opt->head; + while (p_specifier_qualifier) + { + flow_visit_specifier_qualifier(ctx, p_specifier_qualifier); + p_specifier_qualifier = p_specifier_qualifier->next; + } + } } static void flow_visit_declarator(struct flow_visit_ctx* ctx, struct declarator* p_declarator); static void flow_visit_type_name(struct flow_visit_ctx* ctx, struct type_name* p_type_name) { - flow_visit_specifier_qualifier_list(ctx, p_type_name->specifier_qualifier_list, &p_type_name->type); - flow_visit_declarator(ctx, p_type_name->declarator); + flow_visit_specifier_qualifier_list(ctx, p_type_name->specifier_qualifier_list, &p_type_name->type); + flow_visit_declarator(ctx, p_type_name->declarator); - /* - * Vamos esconder tudo e gerar um novo - * Exemplo - * (const typeof(int (*)())) -> * ( int (*const )() ) - */ + /* + * Vamos esconder tudo e gerar um novo + * Exemplo + * (const typeof(int (*)())) -> * ( int (*const )() ) + */ } static void flow_visit_argument_expression_list(struct flow_visit_ctx* ctx, struct argument_expression_list* p_argument_expression_list) { - struct argument_expression* p_argument_expression = - p_argument_expression_list->head; - while (p_argument_expression) - { - flow_visit_expression(ctx, p_argument_expression->expression); - p_argument_expression = p_argument_expression->next; - } + struct argument_expression* p_argument_expression = + p_argument_expression_list->head; + while (p_argument_expression) + { + flow_visit_expression(ctx, p_argument_expression->expression); + p_argument_expression = p_argument_expression->next; + } } static void flow_visit_generic_selection(struct flow_visit_ctx* ctx, struct generic_selection* p_generic_selection) { - if (p_generic_selection->expression) - { - flow_visit_expression(ctx, p_generic_selection->expression); - } - else if (p_generic_selection->type_name) - { - flow_visit_type_name(ctx, p_generic_selection->type_name); - } + if (p_generic_selection->expression) + { + flow_visit_expression(ctx, p_generic_selection->expression); + } + else if (p_generic_selection->type_name) + { + flow_visit_type_name(ctx, p_generic_selection->type_name); + } } static int compare_function_arguments2(struct parser_ctx* ctx, - struct type* p_type, - struct argument_expression_list* p_argument_expression_list) + struct type* p_type, + struct argument_expression_list* p_argument_expression_list) { - struct param* p_current_parameter_type = NULL; + struct param* p_current_parameter_type = NULL; - const struct param_list* p_param_list = type_get_func_or_func_ptr_params(p_type); + const struct param_list* p_param_list = type_get_func_or_func_ptr_params(p_type); - if (p_param_list) - { - p_current_parameter_type = p_param_list->head; - } + if (p_param_list) + { + p_current_parameter_type = p_param_list->head; + } - int param_num = 1; - struct argument_expression* p_current_argument = p_argument_expression_list->head; + int param_num = 1; + struct argument_expression* p_current_argument = p_argument_expression_list->head; - while (p_current_argument && p_current_parameter_type) - { - struct type argument_object_type = { 0 }; - struct object* p_argument_object = - expression_get_object(p_current_argument->expression, &argument_object_type); + while (p_current_argument && p_current_parameter_type) + { + struct type argument_object_type = { 0 }; + struct object* p_argument_object = + expression_get_object(p_current_argument->expression, &argument_object_type); - bool bool_source_zero_value = constant_value_is_valid(&p_current_argument->expression->constant_value) && - constant_value_to_ull(&p_current_argument->expression->constant_value) == 0; + bool bool_source_zero_value = constant_value_is_valid(&p_current_argument->expression->constant_value) && + constant_value_to_ull(&p_current_argument->expression->constant_value) == 0; - struct type argument_object_type2 = { 0 }; - struct object* p_argument_object2 = - expression_get_object(p_current_argument->expression, &argument_object_type2); + struct type argument_object_type2 = { 0 }; + struct object* p_argument_object2 = + expression_get_object(p_current_argument->expression, &argument_object_type2); - if (ctx->options.null_checks) - { - if (type_is_pointer(&p_current_parameter_type->type) && - !(p_current_parameter_type->type.type_qualifier_flags & TYPE_QUALIFIER_OPT)) - { + if (ctx->options.null_checks) + { + if (type_is_pointer(&p_current_parameter_type->type) && + !(p_current_parameter_type->type.type_qualifier_flags & TYPE_QUALIFIER_OPT)) + { - if (p_argument_object2 && - p_argument_object2->state & OBJECT_STATE_NULL) - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - p_current_argument->expression->first_token, - "pointer can be null, but the parameter is not optional"); - } + if (p_argument_object2 && + p_argument_object2->state & OBJECT_STATE_NULL) + { + compiler_diagnostic_message(W_ANALIZER_MAYBE_NULL_TO_NON_OPT_ARGUMENT, + ctx, + p_current_argument->expression->first_token, + "pointer can be null, but the parameter is not optional"); + } - type_destroy(&argument_object_type2); - } - } + type_destroy(&argument_object_type2); + } + } - /* - checking is some uninitialized or moved object is being used as parameter - */ - if (p_argument_object) - { - //TODO check if pointed object is const - bool check_pointed_object = !type_is_void_ptr(&p_current_parameter_type->type); + /* + checking is some uninitialized or moved object is being used as parameter + */ + if (p_argument_object) + { + //TODO check if pointed object is const + bool check_pointed_object = !type_is_void_ptr(&p_current_parameter_type->type); - bool pointer_to_out = false; + bool pointer_to_out = false; - if (type_is_pointer(&p_current_parameter_type->type) && - check_pointed_object) - { - struct type t2 = type_remove_pointer(&p_current_parameter_type->type); - if (type_is_out(&t2)) - { - pointer_to_out = true; - type_destroy(&t2); - } - } + if (type_is_pointer(&p_current_parameter_type->type) && + check_pointed_object) + { + struct type t2 = type_remove_pointer(&p_current_parameter_type->type); + if (type_is_out(&t2)) + { + pointer_to_out = true; + } + type_destroy(&t2); + } - if (!pointer_to_out) - { - checked_read_object(ctx, - &argument_object_type, - p_argument_object, - p_current_argument->expression->first_token, - check_pointed_object); + if (!pointer_to_out) + { + checked_read_object(ctx, + &argument_object_type, + p_argument_object, + p_current_argument->expression->first_token, + check_pointed_object); - } - } + } + } - if (type_is_any_owner(&p_current_parameter_type->type)) - { + if (type_is_any_owner(&p_current_parameter_type->type)) + { #if 1 #endif - object_assignment(ctx, - p_argument_object, - &argument_object_type, - NULL, /*dest object*/ - &p_current_parameter_type->type, - p_current_argument->expression->first_token, - bool_source_zero_value, - OBJECT_STATE_UNINITIALIZED); - } - else - { - if (p_argument_object && - type_is_pointer(&p_current_parameter_type->type)) - { - struct type parameter_type = - type_remove_pointer(&p_current_parameter_type->type); + object_assignment(ctx, + p_argument_object, + &argument_object_type, + NULL, /*dest object*/ + &p_current_parameter_type->type, + p_current_argument->expression->first_token, + bool_source_zero_value, + OBJECT_STATE_UNINITIALIZED); + } + else + { + if (p_argument_object && + type_is_pointer(&p_current_parameter_type->type)) + { + struct type parameter_type = + type_remove_pointer(&p_current_parameter_type->type); - if (!type_is_const(¶meter_type)) - { - if (type_is_void(¶meter_type)) - { - // - } - else - { - if (p_argument_object->pointed) - { - struct type pointed_type = type_remove_pointer(&argument_object_type); - object_set_unknown(&pointed_type, p_argument_object->pointed); - type_destroy(&pointed_type); - } - } - } + if (!type_is_const(¶meter_type)) + { + if (type_is_void(¶meter_type)) + { + // + } + else + { + if (p_argument_object->pointed) + { + struct type pointed_type = type_remove_pointer(&argument_object_type); + object_set_unknown(&pointed_type, p_argument_object->pointed); + type_destroy(&pointed_type); + } + } + } - type_destroy(¶meter_type); - } - } - p_current_argument = p_current_argument->next; - p_current_parameter_type = p_current_parameter_type->next; - param_num++; + type_destroy(¶meter_type); + } + } + p_current_argument = p_current_argument->next; + p_current_parameter_type = p_current_parameter_type->next; + param_num++; - type_destroy(&argument_object_type); - } + type_destroy(&argument_object_type); + } - while (p_current_argument) { - /* - We have more argument than parameters, this happens with variadic functions - */ - struct type argument_object_type = { 0 }; - struct object* p_argument_object = - expression_get_object(p_current_argument->expression, &argument_object_type); + while (p_current_argument) { + /* + We have more argument than parameters, this happens with variadic functions + */ + struct type argument_object_type = { 0 }; + struct object* p_argument_object = + expression_get_object(p_current_argument->expression, &argument_object_type); - checked_read_object(ctx, - &argument_object_type, - p_argument_object, - p_current_argument->expression->first_token, - false); + checked_read_object(ctx, + &argument_object_type, + p_argument_object, + p_current_argument->expression->first_token, + false); - p_current_argument = p_current_argument->next; - } - return 0; + p_current_argument = p_current_argument->next; + } + return 0; } static void flow_visit_expression(struct flow_visit_ctx* ctx, struct expression* p_expression) { - if (p_expression == NULL) - return; + if (p_expression == NULL) + return; - switch (p_expression->expression_type) - { - case PRIMARY_EXPRESSION__FUNC__: - break; - case PRIMARY_IDENTIFIER: - break; - case PRIMARY_EXPRESSION_ENUMERATOR: + switch (p_expression->expression_type) + { + case PRIMARY_EXPRESSION__FUNC__: + break; + case PRIMARY_IDENTIFIER: + break; + case PRIMARY_EXPRESSION_ENUMERATOR: + + break; + case PRIMARY_EXPRESSION_DECLARATOR: + + if (p_expression->declarator->object.state & OBJECT_STATE_UNINITIALIZED) + { + //TODO inside sizeof(v) is not an error. :D + //TODO function type... + + if (!ctx->is_left_expression && + !ctx->expression_is_not_evaluated) + { + compiler_diagnostic_message(W_UNINITIALZED, + ctx->ctx, + p_expression->first_token, + "'%s' is uninitialized ", + p_expression->declarator->name->lexeme); + } + } - break; - case PRIMARY_EXPRESSION_DECLARATOR: + break; - if (p_expression->declarator->object.state & OBJECT_STATE_UNINITIALIZED) - { - //TODO inside sizeof(v) is not an error. :D - //TODO function type... -#if 0 - compiler_set_warning_with_token(W_UNINITIALZED, - ctx->ctx, - p_expression->first_token, - "'%s' is uninitialized ", - p_expression->declarator->object_name->lexeme); -#endif - } + case PRIMARY_EXPRESSION_PARENTESIS: + flow_visit_expression(ctx, p_expression->right); + break; - break; + case PRIMARY_EXPRESSION_STRING_LITERAL: + break; + case PRIMARY_EXPRESSION_CHAR_LITERAL: + break; + case PRIMARY_EXPRESSION_NUMBER: + break; - case PRIMARY_EXPRESSION_PARENTESIS: - flow_visit_expression(ctx, p_expression->right); - break; + case PRIMARY_EXPRESSION_PREDEFINED_CONSTANT: - case PRIMARY_EXPRESSION_STRING_LITERAL: - break; - case PRIMARY_EXPRESSION_CHAR_LITERAL: - break; - case PRIMARY_EXPRESSION_NUMBER: - break; + break; - case PRIMARY_EXPRESSION_PREDEFINED_CONSTANT: + case PRIMARY_EXPRESSION_GENERIC: + flow_visit_generic_selection(ctx, p_expression->generic_selection); + break; - break; + case POSTFIX_DOT: + break; + case POSTFIX_ARROW: + break; + case POSTFIX_INCREMENT: + break; + case POSTFIX_DECREMENT: + break; + case POSTFIX_ARRAY: { - case PRIMARY_EXPRESSION_GENERIC: - flow_visit_generic_selection(ctx, p_expression->generic_selection); - break; + flow_visit_expression(ctx, p_expression->left); + flow_visit_expression(ctx, p_expression->right); - case POSTFIX_DOT: - break; - case POSTFIX_ARROW: - break; - case POSTFIX_INCREMENT: - break; - case POSTFIX_DECREMENT: - break; - case POSTFIX_ARRAY: + struct type t = { 0 }; + struct object* p_object = expression_get_object(p_expression->left, &t); - flow_visit_expression(ctx, p_expression->left); - flow_visit_expression(ctx, p_expression->right); + if (p_object && p_object->state == OBJECT_STATE_UNINITIALIZED) + { + compiler_diagnostic_message(W_ANALYZER_UNINITIALIZED, + ctx->ctx, + p_expression->left->first_token, "using a uninitialized object"); + } + else if (p_object && p_object->state & OBJECT_STATE_UNINITIALIZED) + { + compiler_diagnostic_message(W_ANALYZER_UNINITIALIZED, + ctx->ctx, + p_expression->left->first_token, "maybe using a uninitialized object"); + } + type_destroy(&t); + } + break; - struct type t = { 0 }; - struct object* p_object = expression_get_object(p_expression->left, &t); + case POSTFIX_FUNCTION_CALL: - if (p_object && p_object->state == OBJECT_STATE_UNINITIALIZED) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, - ctx->ctx, - p_expression->left->first_token, "using a uninitialized object"); - } - else if (p_object && p_object->state & OBJECT_STATE_UNINITIALIZED) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, - ctx->ctx, - p_expression->left->first_token, "maybe using a uninitialized object"); - } - type_destroy(&t); + flow_visit_expression(ctx, p_expression->left); - break; + flow_visit_argument_expression_list(ctx, &p_expression->argument_expression_list); + compare_function_arguments2(ctx->ctx, &p_expression->left->type, &p_expression->argument_expression_list); - case POSTFIX_FUNCTION_CALL: + break; + case POSTFIX_EXPRESSION_FUNCTION_LITERAL: - flow_visit_expression(ctx, p_expression->left); - flow_visit_argument_expression_list(ctx, &p_expression->argument_expression_list); - compare_function_arguments2(ctx->ctx, &p_expression->left->type, &p_expression->argument_expression_list); + flow_visit_compound_statement(ctx, p_expression->compound_statement); - break; - case POSTFIX_EXPRESSION_FUNCTION_LITERAL: + break; + case POSTFIX_EXPRESSION_COMPOUND_LITERAL: - flow_visit_compound_statement(ctx, p_expression->compound_statement); + if (p_expression->type_name) + { + flow_visit_type_name(ctx, p_expression->type_name); + } + flow_visit_bracket_initializer_list(ctx, p_expression->braced_initializer); - break; + struct object temp2 = make_object(&p_expression->type, p_expression->type_name->declarator); + object_swap(&temp2, &p_expression->type_name->declarator->object); + object_destroy(&temp2); - case POSTFIX_EXPRESSION_COMPOUND_LITERAL: + //TODO the state of object depends of the initializer + set_direct_state(&p_expression->type, &p_expression->type_name->declarator->object, OBJECT_STATE_ZERO); - if (p_expression->type_name) - { - flow_visit_type_name(ctx, p_expression->type_name); - } - flow_visit_bracket_initializer_list(ctx, p_expression->braced_initializer); + assert(p_expression->left == NULL); + assert(p_expression->right == NULL); - struct object temp2 = make_object(&p_expression->type, p_expression->type_name->declarator); - object_swap(&temp2, &p_expression->type_name->declarator->object); - object_destroy(&temp2); + break; - //TODO the state of object depends of the initializer - set_direct_state(&p_expression->type, &p_expression->type_name->declarator->object, OBJECT_STATE_ZERO); + case UNARY_EXPRESSION_ALIGNOF: + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } - assert(p_expression->left == NULL); - assert(p_expression->right == NULL); + if (p_expression->type_name) + { + /*sizeof*/ + flow_visit_type_name(ctx, p_expression->type_name); + } + break; - break; + case UNARY_EXPRESSION_ASSERT: - case UNARY_EXPRESSION_ALIGNOF: + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } + struct object* p_object_compared_with_null = NULL; - if (p_expression->type_name) - { - /*sizeof*/ - flow_visit_type_name(ctx, p_expression->type_name); - } - break; + if (p_expression->right) + { + p_object_compared_with_null = expression_is_comparing_owner_with_null(p_expression->right); + } - case UNARY_EXPRESSION_ASSERT: + struct object* p_object_compared_with_not_null = NULL; + if (p_expression->right) + { + p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_expression->right); + } - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); + if (p_object_compared_with_null) + { + //if (p == 0) { p is null } + p_object_compared_with_null->state = OBJECT_STATE_NULL; + } - struct object* p_object_compared_with_null = NULL; + if (p_object_compared_with_not_null) + { + //if (p != 0) { p is not null } + p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; + } + } - if (p_expression->right) - { - p_object_compared_with_null = expression_is_comparing_owner_with_null(p_expression->right); - } + break; - struct object* p_object_compared_with_not_null = NULL; - if (p_expression->right) - { - p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_expression->right); - } + case UNARY_EXPRESSION_SIZEOF_EXPRESSION: - if (p_object_compared_with_null) - { - //if (p == 0) { p is null } - p_object_compared_with_null->state = OBJECT_STATE_NULL; - } + if (p_expression->right) + { + const bool t2 = ctx->expression_is_not_evaluated; + ctx->expression_is_not_evaluated = true; + flow_visit_expression(ctx, p_expression->right); + ctx->expression_is_not_evaluated = t2; + } - if (p_object_compared_with_not_null) - { - //if (p != 0) { p is not null } - p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; - } - } + if (p_expression->type_name) + { + /*sizeof*/ + flow_visit_type_name(ctx, p_expression->type_name); + } - break; - case UNARY_EXPRESSION_SIZEOF_EXPRESSION: - case UNARY_EXPRESSION_SIZEOF_TYPE: - case UNARY_EXPRESSION_INCREMENT: - case UNARY_EXPRESSION_DECREMENT: - case UNARY_EXPRESSION_NOT: - case UNARY_EXPRESSION_BITNOT: - case UNARY_EXPRESSION_NEG: - case UNARY_EXPRESSION_PLUS: + break; - case UNARY_EXPRESSION_ADDRESSOF: - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } + case UNARY_EXPRESSION_SIZEOF_TYPE: + case UNARY_EXPRESSION_INCREMENT: + case UNARY_EXPRESSION_DECREMENT: + case UNARY_EXPRESSION_NOT: + case UNARY_EXPRESSION_BITNOT: + case UNARY_EXPRESSION_NEG: + case UNARY_EXPRESSION_PLUS: - if (p_expression->type_name) - { - /*sizeof*/ - flow_visit_type_name(ctx, p_expression->type_name); - } + case UNARY_EXPRESSION_ADDRESSOF: + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } - break; -#if 1 - case UNARY_EXPRESSION_CONTENT: - { - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } + if (p_expression->type_name) + { + /*sizeof*/ + flow_visit_type_name(ctx, p_expression->type_name); + } - struct type t = { 0 }; - struct object* p_object = expression_get_object(p_expression->right, &t); + break; +#if 1 + case UNARY_EXPRESSION_CONTENT: + { + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } - if (p_object && p_object->state == OBJECT_STATE_UNINITIALIZED) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, - ctx->ctx, - p_expression->right->first_token, "using a uninitialized object"); - } - else if (p_object && p_object->state & OBJECT_STATE_NULL) - { - /* - *p = 1* - */ - if (ctx->is_left_expression) - { - //is - } - else - { - //TO many errors because the pointer can be null. - if (p_object && !(p_object->state & OBJECT_STATE_NOT_NULL)) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, - ctx->ctx, - p_expression->right->first_token, "deferencing a NULL object"); - } - } - } - type_destroy(&t); + struct type t = { 0 }; + struct object* p_object = expression_get_object(p_expression->right, &t); - } - break; -#endif + if (p_object && p_object->state == OBJECT_STATE_UNINITIALIZED) + { + compiler_diagnostic_message(W_ANALYZER_UNINITIALIZED, + ctx->ctx, + p_expression->right->first_token, "using a uninitialized object"); + } + else if (p_object && p_object->state & OBJECT_STATE_NULL) + { + /* + *p = 1* + */ + if (!ctx->is_left_expression && + !ctx->expression_is_not_evaluated) + { + //TO many errors because the pointer can be null. + if (p_object && !(p_object->state & OBJECT_STATE_NOT_NULL)) + { + compiler_diagnostic_message(W_ANALYZER_NULL_DEREFERENCE, + ctx->ctx, + p_expression->right->first_token, "dereference a NULL object"); + } + } + } + type_destroy(&t); + } + break; +#endif - case ASSIGNMENT_EXPRESSION: - { - struct type right_object_type = { 0 }; - struct object* const p_right_object = expression_get_object(p_expression->right, &right_object_type); - struct type dest_object_type = { 0 }; - struct object* const p_dest_object = expression_get_object(p_expression->left, &dest_object_type); - //print_object(&dest_object_type, p_dest_object); + case ASSIGNMENT_EXPRESSION: + { - bool temp = ctx->is_left_expression = true; - flow_visit_expression(ctx, p_expression->left); - ctx->is_left_expression = temp; + struct type right_object_type = { 0 }; + struct object* const p_right_object = expression_get_object(p_expression->right, &right_object_type); - //print_object(&dest_object_type, p_dest_object); - flow_visit_expression(ctx, p_expression->right); + struct type dest_object_type = { 0 }; + struct object* const p_dest_object = expression_get_object(p_expression->left, &dest_object_type); + //print_object(&dest_object_type, p_dest_object); + bool temp = ctx->is_left_expression; + ctx->is_left_expression = true; + flow_visit_expression(ctx, p_expression->left); + ctx->is_left_expression = false; + flow_visit_expression(ctx, p_expression->right); + ctx->is_left_expression = temp; - bool bool_source_zero_value = constant_value_is_valid(&p_expression->right->constant_value) && - constant_value_to_ull(&p_expression->right->constant_value) == 0; + bool bool_source_zero_value = constant_value_is_valid(&p_expression->right->constant_value) && + constant_value_to_ull(&p_expression->right->constant_value) == 0; - if (p_expression->right && - p_expression->right->expression_type == POSTFIX_FUNCTION_CALL) - { - if (p_expression->right->left && - p_expression->right->left->declarator && - p_expression->right->left->declarator->name && - strcmp(p_expression->right->left->declarator->name->lexeme, "calloc") == 0) - { - bool_source_zero_value = true; - } - } + if (p_expression->right && + p_expression->right->expression_type == POSTFIX_FUNCTION_CALL) + { + if (p_expression->right->left && + p_expression->right->left->declarator && + p_expression->right->left->declarator->name && + strcmp(p_expression->right->left->declarator->name->lexeme, "calloc") == 0) + { + bool_source_zero_value = true; + } + } - object_assignment(ctx->ctx, - p_right_object, /*source*/ - &right_object_type, /*source type*/ - p_dest_object, /*dest object*/ - &dest_object_type, /*dest type*/ - p_expression->left->first_token, - bool_source_zero_value, - OBJECT_STATE_MOVED); + object_assignment(ctx->ctx, + p_right_object, /*source*/ + &right_object_type, /*source type*/ + p_dest_object, /*dest object*/ + &dest_object_type, /*dest type*/ + p_expression->left->first_token, + bool_source_zero_value, + OBJECT_STATE_MOVED); - type_destroy(&right_object_type); - type_destroy(&dest_object_type); + type_destroy(&right_object_type); + type_destroy(&dest_object_type); - } - break; + } + break; - case CAST_EXPRESSION: - case MULTIPLICATIVE_EXPRESSION_MULT: - case MULTIPLICATIVE_EXPRESSION_DIV: - case MULTIPLICATIVE_EXPRESSION_MOD: - case ADDITIVE_EXPRESSION_PLUS: - case ADDITIVE_EXPRESSION_MINUS: - case SHIFT_EXPRESSION_RIGHT: - case SHIFT_EXPRESSION_LEFT: - case RELATIONAL_EXPRESSION_BIGGER_THAN: - case RELATIONAL_EXPRESSION_LESS_THAN: + case CAST_EXPRESSION: + case MULTIPLICATIVE_EXPRESSION_MULT: + case MULTIPLICATIVE_EXPRESSION_DIV: + case MULTIPLICATIVE_EXPRESSION_MOD: + case ADDITIVE_EXPRESSION_PLUS: + case ADDITIVE_EXPRESSION_MINUS: + case SHIFT_EXPRESSION_RIGHT: + case SHIFT_EXPRESSION_LEFT: + case RELATIONAL_EXPRESSION_BIGGER_THAN: + case RELATIONAL_EXPRESSION_LESS_THAN: - case EQUALITY_EXPRESSION_EQUAL: - flow_visit_expression(ctx, p_expression->left); - flow_visit_expression(ctx, p_expression->right); + case EQUALITY_EXPRESSION_EQUAL: + flow_visit_expression(ctx, p_expression->left); + flow_visit_expression(ctx, p_expression->right); - break; + break; - case EQUALITY_EXPRESSION_NOT_EQUAL: - flow_visit_expression(ctx, p_expression->left); - flow_visit_expression(ctx, p_expression->right); - break; + case EQUALITY_EXPRESSION_NOT_EQUAL: + flow_visit_expression(ctx, p_expression->left); + flow_visit_expression(ctx, p_expression->right); + break; - case AND_EXPRESSION: - case EXCLUSIVE_OR_EXPRESSION: - case INCLUSIVE_OR_EXPRESSION: - case INCLUSIVE_AND_EXPRESSION: - case LOGICAL_OR_EXPRESSION: - case RELATIONAL_EXPRESSION_LESS_OR_EQUAL_THAN: - case RELATIONAL_EXPRESSION_BIGGER_OR_EQUAL_THAN: + case AND_EXPRESSION: + case EXCLUSIVE_OR_EXPRESSION: + case INCLUSIVE_OR_EXPRESSION: + case INCLUSIVE_AND_EXPRESSION: + case LOGICAL_OR_EXPRESSION: + case RELATIONAL_EXPRESSION_LESS_OR_EQUAL_THAN: + case RELATIONAL_EXPRESSION_BIGGER_OR_EQUAL_THAN: - if (p_expression->left) - { - flow_visit_expression(ctx, p_expression->left); - } - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } - if (p_expression->type_name) - { - flow_visit_type_name(ctx, p_expression->type_name); - } - break; + if (p_expression->left) + { + flow_visit_expression(ctx, p_expression->left); + } + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } + if (p_expression->type_name) + { + flow_visit_type_name(ctx, p_expression->type_name); + } + break; - case UNARY_EXPRESSION_TRAITS: - { + case UNARY_EXPRESSION_TRAITS: + { - } - break; + } + break; - case UNARY_EXPRESSION_IS_SAME: - break; + case UNARY_EXPRESSION_IS_SAME: + break; - case UNARY_DECLARATOR_ATTRIBUTE_EXPR: - break; + case UNARY_DECLARATOR_ATTRIBUTE_EXPR: + break; - case CONDITIONAL_EXPRESSION: - if (p_expression->condition_expr) - { - flow_visit_expression(ctx, p_expression->condition_expr); - } + case CONDITIONAL_EXPRESSION: + if (p_expression->condition_expr) + { + flow_visit_expression(ctx, p_expression->condition_expr); + } - if (p_expression->left) - { - flow_visit_expression(ctx, p_expression->left); - } - if (p_expression->right) - { - flow_visit_expression(ctx, p_expression->right); - } + if (p_expression->left) + { + flow_visit_expression(ctx, p_expression->left); + } + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right); + } - break; + break; - default: - break; - } + default: + break; + } } static void flow_visit_expression_statement(struct flow_visit_ctx* ctx, struct expression_statement* p_expression_statement) { - if (p_expression_statement->expression_opt) - flow_visit_expression(ctx, p_expression_statement->expression_opt); + if (p_expression_statement->expression_opt) + flow_visit_expression(ctx, p_expression_statement->expression_opt); } static void flow_visit_block_item_list(struct flow_visit_ctx* ctx, struct block_item_list* p_block_item_list); static void flow_visit_compound_statement(struct flow_visit_ctx* ctx, struct compound_statement* p_compound_statement) { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_compound_statement = p_compound_statement; - flow_visit_block_item_list(ctx, &p_compound_statement->block_item_list); - check_defer_and_variables(ctx, p_defer, p_compound_statement->last_token); + /*let's make a copy of the current post function diagnostic*/ + struct diagnostic current = ctx->ctx->options.diagnostic_stack[ctx->ctx->options.diagnostic_stack_top_index]; + + /*lets restore the diagnostic state it was initialize because static analysis is a second pass*/ + ctx->ctx->options.diagnostic_stack[ctx->ctx->options.diagnostic_stack_top_index] = p_compound_statement->diagnostic_flags; + + + + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_compound_statement = p_compound_statement; + + flow_visit_block_item_list(ctx, &p_compound_statement->block_item_list); + check_defer_and_variables(ctx, p_defer, p_compound_statement->last_token); + + flow_visit_ctx_pop_tail_block(ctx); + + /*restore the state we change*/ + ctx->ctx->options.diagnostic_stack[ctx->ctx->options.diagnostic_stack_top_index] = current; - flow_visit_ctx_pop_tail_block(ctx); } static void flow_visit_do_while_statement(struct flow_visit_ctx* ctx, struct iteration_statement* p_iteration_statement) { - assert(p_iteration_statement->first_token->type == TK_KEYWORD_DO); + assert(p_iteration_statement->first_token->type == TK_KEYWORD_DO); - struct object* p_object_compared_with_not_null = NULL; + struct object* p_object_compared_with_not_null = NULL; - if (p_iteration_statement->expression1) - { - p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_iteration_statement->expression1); - flow_visit_expression(ctx, p_iteration_statement->expression1); - } + if (p_iteration_statement->expression1) + { + p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_iteration_statement->expression1); + flow_visit_expression(ctx, p_iteration_statement->expression1); + } - if (p_iteration_statement->secondary_block) - { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_iteration_statement = p_iteration_statement; + if (p_iteration_statement->secondary_block) + { + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_iteration_statement = p_iteration_statement; - flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); - check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); + check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); - flow_visit_ctx_pop_tail_block(ctx); + flow_visit_ctx_pop_tail_block(ctx); - bool was_last_statement_inside_true_branch_return = false; - if (ctx->p_last_jump_statement) - { + bool was_last_statement_inside_true_branch_return = false; + if (ctx->p_last_jump_statement) + { - was_last_statement_inside_true_branch_return = - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; - } + was_last_statement_inside_true_branch_return = + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_BREAK || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_THROW || + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_CONTINUE; + } - if (was_last_statement_inside_true_branch_return) - { - //restore_state(ctx, 0); - //if (p_object_compared_with_not_null) - //{ - //do {} while (p); - // p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - //} - } - else - { - //do { } while (p); + if (was_last_statement_inside_true_branch_return) + { + //restore_state(ctx, 0); + //if (p_object_compared_with_not_null) + //{ + //do {} while (p); + // p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + //} + } + else + { + //do { } while (p); - if (p_object_compared_with_not_null) - { - p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - } - } - } + if (p_object_compared_with_not_null) + { + p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + } + } + } } static void flow_visit_while_statement(struct flow_visit_ctx* ctx, struct iteration_statement* p_iteration_statement) { - assert(p_iteration_statement->first_token->type == TK_KEYWORD_WHILE); + assert(p_iteration_statement->first_token->type == TK_KEYWORD_WHILE); - struct object* p_object_compared_with_not_null = NULL; + struct object* p_object_compared_with_not_null = NULL; - if (p_iteration_statement->expression1) - { - p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_iteration_statement->expression1); - flow_visit_expression(ctx, p_iteration_statement->expression1); - } + if (p_iteration_statement->expression1) + { + p_object_compared_with_not_null = expression_is_comparing_owner_with_not_null(p_iteration_statement->expression1); + flow_visit_expression(ctx, p_iteration_statement->expression1); + } - if (p_iteration_statement->secondary_block) - { - const int original = 1; - push_copy_of_current_state(ctx); + if (p_iteration_statement->secondary_block) + { + const int original = 1; + push_copy_of_current_state(ctx); - const int current = 0; + const int current = 0; - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_iteration_statement = p_iteration_statement; + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_iteration_statement = p_iteration_statement; - if (p_object_compared_with_not_null) - { - //while (p != 0) { p is not null } - p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; - } + if (p_object_compared_with_not_null) + { + //while (p != 0) { p is not null } + p_object_compared_with_not_null->state = OBJECT_STATE_NOT_NULL; + } - flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); - check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); + check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); - bool was_last_statement_inside_true_branch_return = false; - if (ctx->p_last_jump_statement) - { - //TODO gotos etc... - was_last_statement_inside_true_branch_return = - ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN; - } + bool was_last_statement_inside_true_branch_return = false; + if (ctx->p_last_jump_statement) + { + //TODO gotos etc... + was_last_statement_inside_true_branch_return = + ctx->p_last_jump_statement->first_token->type == TK_KEYWORD_RETURN; + } - if (was_last_statement_inside_true_branch_return) - { - restore_state(ctx, original); - //if (p_object_compared_with_not_null) - //{ - /* - while (p) - { - return; - } - */ - // p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - //} - } - else - { - /* - while (p) - { - } - */ - //merge_if_else_states(ctx, current, current, original, -1 /*nothing*/); - merge_states(ctx, current, original, current); - if (p_object_compared_with_not_null) - { - p_object_compared_with_not_null->state = OBJECT_STATE_NULL; - } - } - pop_states(ctx, 1); - flow_visit_ctx_pop_tail_block(ctx); - } + if (was_last_statement_inside_true_branch_return) + { + restore_state(ctx, original); + //if (p_object_compared_with_not_null) + //{ + /* + while (p) + { + return; + } + */ + // p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + //} + } + else + { + /* + while (p) + { + } + */ + //merge_if_else_states(ctx, current, current, original, -1 /*nothing*/); + merge_states(ctx, current, original, current); + if (p_object_compared_with_not_null) + { + p_object_compared_with_not_null->state = OBJECT_STATE_NULL; + } + } + pop_states(ctx, 1); + flow_visit_ctx_pop_tail_block(ctx); + } } static void flow_visit_for_statement(struct flow_visit_ctx* ctx, struct iteration_statement* p_iteration_statement) { - assert(p_iteration_statement->first_token->type == TK_KEYWORD_FOR); + assert(p_iteration_statement->first_token->type == TK_KEYWORD_FOR); - struct object* p_object_compared_with_not_null = NULL; - if (p_iteration_statement->expression0) - { - flow_visit_expression(ctx, p_iteration_statement->expression0); - } + if (p_iteration_statement->expression0) + { + flow_visit_expression(ctx, p_iteration_statement->expression0); + } - if (p_iteration_statement->expression1) - { - flow_visit_expression(ctx, p_iteration_statement->expression1); - } - if (p_iteration_statement->expression2) - { - flow_visit_expression(ctx, p_iteration_statement->expression2); - } + if (p_iteration_statement->expression1) + { + flow_visit_expression(ctx, p_iteration_statement->expression1); + } + if (p_iteration_statement->expression2) + { + flow_visit_expression(ctx, p_iteration_statement->expression2); + } - if (p_iteration_statement->secondary_block) - { - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - p_defer->p_iteration_statement = p_iteration_statement; - flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); - check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); - flow_visit_ctx_pop_tail_block(ctx); - } + if (p_iteration_statement->secondary_block) + { + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + p_defer->p_iteration_statement = p_iteration_statement; + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + check_defer_and_variables(ctx, p_defer, p_iteration_statement->secondary_block->last_token); + flow_visit_ctx_pop_tail_block(ctx); + } } static void flow_visit_iteration_statement(struct flow_visit_ctx* ctx, struct iteration_statement* p_iteration_statement) { - switch (p_iteration_statement->first_token->type) - { - case TK_KEYWORD_WHILE: - flow_visit_while_statement(ctx, p_iteration_statement); - break; - case TK_KEYWORD_DO: - flow_visit_do_while_statement(ctx, p_iteration_statement); - break; - case TK_KEYWORD_FOR: - flow_visit_for_statement(ctx, p_iteration_statement); - break; - default: - assert(false); - break; - } + switch (p_iteration_statement->first_token->type) + { + case TK_KEYWORD_WHILE: + flow_visit_while_statement(ctx, p_iteration_statement); + break; + case TK_KEYWORD_DO: + flow_visit_do_while_statement(ctx, p_iteration_statement); + break; + case TK_KEYWORD_FOR: + flow_visit_for_statement(ctx, p_iteration_statement); + break; + default: + assert(false); + break; + } } static void flow_visit_jump_statement(struct flow_visit_ctx* ctx, struct jump_statement* p_jump_statement) { - ctx->p_last_jump_statement = p_jump_statement; + ctx->p_last_jump_statement = p_jump_statement; - if (p_jump_statement->first_token->type == TK_KEYWORD_THROW) - { - check_all_defer_until_try(ctx, ctx->tail_block, p_jump_statement->first_token); - } - else if (p_jump_statement->first_token->type == TK_KEYWORD_RETURN) - { - if (p_jump_statement->expression_opt) - { - flow_visit_expression(ctx, p_jump_statement->expression_opt); - } + if (p_jump_statement->first_token->type == TK_KEYWORD_THROW) + { + check_all_defer_until_try(ctx, ctx->tail_block, p_jump_statement->first_token); + } + else if (p_jump_statement->first_token->type == TK_KEYWORD_RETURN) + { + if (p_jump_statement->expression_opt) + { + flow_visit_expression(ctx, p_jump_statement->expression_opt); + } - /* - returning a declarator will move the onwership - */ - if (p_jump_statement->expression_opt) - { - struct type type = { 0 }; - struct object* p_object = expression_get_object(p_jump_statement->expression_opt, &type); - bool bool_source_zero_value = constant_value_is_valid(&p_jump_statement->expression_opt->constant_value) && - constant_value_to_ull(&p_jump_statement->expression_opt->constant_value) == 0; - - - checked_read_object(ctx->ctx, - &type, - p_object, - p_jump_statement->expression_opt->first_token, - true); - - object_assignment(ctx->ctx, - p_object, /*source*/ - &type, /*source type*/ - NULL, /*dest object*/ - ctx->p_return_type, /*dest type*/ - p_jump_statement->expression_opt->first_token, - bool_source_zero_value, - OBJECT_STATE_UNINITIALIZED); + /* + returning a declarator will move the onwership + */ + if (p_jump_statement->expression_opt) + { + struct type type = { 0 }; + struct object* p_object = expression_get_object(p_jump_statement->expression_opt, &type); + bool bool_source_zero_value = constant_value_is_valid(&p_jump_statement->expression_opt->constant_value) && + constant_value_to_ull(&p_jump_statement->expression_opt->constant_value) == 0; - type_destroy(&type); - } - check_all_defer_until_end(ctx, ctx->tail_block, p_jump_statement->first_token); - } - else if (p_jump_statement->first_token->type == TK_KEYWORD_CONTINUE) - { - check_all_defer_until_iter(ctx, ctx->tail_block, p_jump_statement->first_token); - } - else if (p_jump_statement->first_token->type == TK_KEYWORD_BREAK) - { - check_all_defer_until_iteration_or_selection_statement(ctx, ctx->tail_block, p_jump_statement->first_token); - } - else if (p_jump_statement->first_token->type == TK_KEYWORD_GOTO) - { - check_all_defer_until_label(ctx, ctx->tail_block, p_jump_statement->label->lexeme, p_jump_statement->first_token); + checked_read_object(ctx->ctx, + &type, + p_object, + p_jump_statement->expression_opt->first_token, + true); - //set_all_until_end(ctx, ctx->tail_block, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); - } - else - { - assert(false); - } + object_assignment(ctx->ctx, + p_object, /*source*/ + &type, /*source type*/ + NULL, /*dest object*/ + ctx->p_return_type, /*dest type*/ + p_jump_statement->expression_opt->first_token, + bool_source_zero_value, + OBJECT_STATE_UNINITIALIZED); + + type_destroy(&type); + + } + check_all_defer_until_end(ctx, ctx->tail_block, p_jump_statement->first_token); + } + else if (p_jump_statement->first_token->type == TK_KEYWORD_CONTINUE) + { + check_all_defer_until_iter(ctx, ctx->tail_block, p_jump_statement->first_token); + } + else if (p_jump_statement->first_token->type == TK_KEYWORD_BREAK) + { + check_all_defer_until_iteration_or_selection_statement(ctx, ctx->tail_block, p_jump_statement->first_token); + } + else if (p_jump_statement->first_token->type == TK_KEYWORD_GOTO) + { + check_all_defer_until_label(ctx, ctx->tail_block, p_jump_statement->label->lexeme, p_jump_statement->first_token); + + //set_all_until_end(ctx, ctx->tail_block, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); + } + else + { + assert(false); + } } static void flow_visit_label(struct flow_visit_ctx* ctx, struct label* p_label); static void flow_visit_labeled_statement(struct flow_visit_ctx* ctx, struct labeled_statement* p_labeled_statement) { - if (p_labeled_statement->label) - { - flow_visit_label(ctx, p_labeled_statement->label); - } + if (p_labeled_statement->label) + { + flow_visit_label(ctx, p_labeled_statement->label); + } - if (p_labeled_statement->statement) - { - flow_visit_statement(ctx, p_labeled_statement->statement); - } + if (p_labeled_statement->statement) + { + flow_visit_statement(ctx, p_labeled_statement->statement); + } } static void flow_visit_primary_block(struct flow_visit_ctx* ctx, struct primary_block* p_primary_block) { - if (p_primary_block->defer_statement) - { - flow_visit_defer_statement(ctx, p_primary_block->defer_statement); - } - else - { - if (p_primary_block->compound_statement) - { - flow_visit_compound_statement(ctx, p_primary_block->compound_statement); - } - else if (p_primary_block->iteration_statement) - { - flow_visit_iteration_statement(ctx, p_primary_block->iteration_statement); - } - else if (p_primary_block->selection_statement) - { - flow_visit_selection_statement(ctx, p_primary_block->selection_statement); - } - else if (p_primary_block->try_statement) - { - flow_visit_try_statement(ctx, p_primary_block->try_statement); - } - } + if (p_primary_block->defer_statement) + { + flow_visit_defer_statement(ctx, p_primary_block->defer_statement); + } + else + { + if (p_primary_block->compound_statement) + { + flow_visit_compound_statement(ctx, p_primary_block->compound_statement); + } + else if (p_primary_block->iteration_statement) + { + flow_visit_iteration_statement(ctx, p_primary_block->iteration_statement); + } + else if (p_primary_block->selection_statement) + { + flow_visit_selection_statement(ctx, p_primary_block->selection_statement); + } + else if (p_primary_block->try_statement) + { + flow_visit_try_statement(ctx, p_primary_block->try_statement); + } + } } static void flow_visit_unlabeled_statement(struct flow_visit_ctx* ctx, struct unlabeled_statement* p_unlabeled_statement) { - ctx->p_last_jump_statement = NULL; - if (p_unlabeled_statement->primary_block) - { - flow_visit_primary_block(ctx, p_unlabeled_statement->primary_block); - } - else if (p_unlabeled_statement->expression_statement) - { - flow_visit_expression_statement(ctx, p_unlabeled_statement->expression_statement); - } - else if (p_unlabeled_statement->jump_statement) - { - flow_visit_jump_statement(ctx, p_unlabeled_statement->jump_statement); - } - else - { - assert(false); - } + ctx->p_last_jump_statement = NULL; + if (p_unlabeled_statement->primary_block) + { + flow_visit_primary_block(ctx, p_unlabeled_statement->primary_block); + } + else if (p_unlabeled_statement->expression_statement) + { + flow_visit_expression_statement(ctx, p_unlabeled_statement->expression_statement); + } + else if (p_unlabeled_statement->jump_statement) + { + flow_visit_jump_statement(ctx, p_unlabeled_statement->jump_statement); + } + else + { + assert(false); + } } static void flow_visit_statement(struct flow_visit_ctx* ctx, struct statement* p_statement) { - ctx->p_last_jump_statement = NULL; + ctx->p_last_jump_statement = NULL; - if (p_statement->labeled_statement) - { - flow_visit_labeled_statement(ctx, p_statement->labeled_statement); - } - else if (p_statement->unlabeled_statement) - { - flow_visit_unlabeled_statement(ctx, p_statement->unlabeled_statement); - } + if (p_statement->labeled_statement) + { + flow_visit_labeled_statement(ctx, p_statement->labeled_statement); + } + else if (p_statement->unlabeled_statement) + { + flow_visit_unlabeled_statement(ctx, p_statement->unlabeled_statement); + } } static void flow_visit_label(struct flow_visit_ctx* ctx, struct label* p_label) @@ -33307,442 +33650,452 @@ static void flow_visit_label(struct flow_visit_ctx* ctx, struct label* p_label) static void flow_visit_block_item(struct flow_visit_ctx* ctx, struct block_item* p_block_item) { - ctx->p_last_jump_statement = NULL; - if (p_block_item->declaration) - { - flow_visit_declaration(ctx, p_block_item->declaration); - } - else if (p_block_item->unlabeled_statement) - { - flow_visit_unlabeled_statement(ctx, p_block_item->unlabeled_statement); - } - else if (p_block_item->label) - { - flow_visit_label(ctx, p_block_item->label); - } + ctx->p_last_jump_statement = NULL; + if (p_block_item->declaration) + { + flow_visit_declaration(ctx, p_block_item->declaration); + } + else if (p_block_item->unlabeled_statement) + { + flow_visit_unlabeled_statement(ctx, p_block_item->unlabeled_statement); + } + else if (p_block_item->label) + { + flow_visit_label(ctx, p_block_item->label); + } } static void flow_visit_block_item_list(struct flow_visit_ctx* ctx, struct block_item_list* p_block_item_list) { - struct block_item* p_block_item = p_block_item_list->head; - while (p_block_item) - { - flow_visit_block_item(ctx, p_block_item); - p_block_item = p_block_item->next; - } + struct block_item* p_block_item = p_block_item_list->head; + while (p_block_item) + { + flow_visit_block_item(ctx, p_block_item); + p_block_item = p_block_item->next; + } } enum object_state parse_string_state(const char* s, bool* invalid) { - *invalid = false; + *invalid = false; - enum object_state e = 0; - const char* p = s; + enum object_state e = 0; + const char* p = s; - while (*p) - { - if (isalpha(*p)) - { - const char* start = p; - while (isalpha(*p) || *p == '-') - { - p++; - } + while (*p) + { + if (isalpha(*p)) + { + const char* start = p; + while (isalpha(*p) || *p == '-') + { + p++; + } - if (strncmp(start, "moved", p - start) == 0) - e |= OBJECT_STATE_MOVED; - else if (strncmp(start, "null", p - start) == 0) - e |= OBJECT_STATE_NULL; - else if (strncmp(start, "not-null", p - start) == 0) - e |= OBJECT_STATE_NOT_NULL; - else if (strncmp(start, "maybe-null", p - start) == 0) - e |= (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL); - else if (strncmp(start, "uninitialized", p - start) == 0) - e |= OBJECT_STATE_UNINITIALIZED; - else if (strncmp(start, "zero", p - start) == 0) - e |= OBJECT_STATE_ZERO; - else if (strncmp(start, "not-zero", p - start) == 0) - e |= OBJECT_STATE_NOT_ZERO; - else if (strncmp(start, "any", p - start) == 0) - e |= (OBJECT_STATE_NOT_ZERO | OBJECT_STATE_ZERO); - else if (strncmp(start, "moved", p - start) == 0) - e |= OBJECT_STATE_MOVED; - else if (strncmp(start, "or", p - start) == 0) - { - //skiped - } - else - { - *invalid = true; - return 0; //error invalid name - } - } - else - { - p++; - } - } + if (strncmp(start, "moved", p - start) == 0) + e |= OBJECT_STATE_MOVED; + else if (strncmp(start, "null", p - start) == 0) + e |= OBJECT_STATE_NULL; + else if (strncmp(start, "not-null", p - start) == 0) + e |= OBJECT_STATE_NOT_NULL; + else if (strncmp(start, "maybe-null", p - start) == 0) + e |= (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL); + else if (strncmp(start, "uninitialized", p - start) == 0) + e |= OBJECT_STATE_UNINITIALIZED; + else if (strncmp(start, "zero", p - start) == 0) + e |= OBJECT_STATE_ZERO; + else if (strncmp(start, "not-zero", p - start) == 0) + e |= OBJECT_STATE_NOT_ZERO; + else if (strncmp(start, "any", p - start) == 0) + e |= (OBJECT_STATE_NOT_ZERO | OBJECT_STATE_ZERO); + else if (strncmp(start, "moved", p - start) == 0) + e |= OBJECT_STATE_MOVED; + else if (strncmp(start, "or", p - start) == 0) + { + //skiped + } + else + { + *invalid = true; + return 0; //error invalid name + } + } + else + { + p++; + } + } - return e; + return e; } static void flow_visit_static_assert_declaration(struct flow_visit_ctx* ctx, struct static_assert_declaration* p_static_assert_declaration) { - flow_visit_expression(ctx, p_static_assert_declaration->constant_expression); + const bool t2 = ctx->expression_is_not_evaluated; + ctx->expression_is_not_evaluated = true; - if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_DEBUG) - { - compiler_set_info_with_token(W_NONE, ctx->ctx, p_static_assert_declaration->first_token, "static_debug"); + flow_visit_expression(ctx, p_static_assert_declaration->constant_expression); + + ctx->expression_is_not_evaluated = t2; //restore - struct type t = { 0 }; - struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); + if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_DEBUG) + { + compiler_diagnostic_message(W_NOTE, ctx->ctx, p_static_assert_declaration->first_token, "static_debug"); + struct type t = { 0 }; + struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); - if (p_obj) - { - print_object(&t, p_obj, true); - } - type_destroy(&t); - } - else if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_STATE) - { - struct type t = { 0 }; - struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); - if (p_obj) - { - if (p_static_assert_declaration->string_literal_opt) - { - bool is_invalid = false; - enum object_state e = - parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); - if (!is_invalid) - { - if (e != p_obj->state) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "static_state failed"); - } - } - else - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); - } - } - } - type_destroy(&t); - } - else if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_SET) - { - struct type t = { 0 }; - struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); - if (p_obj) - { - if (p_static_assert_declaration->string_literal_opt) - { + if (p_obj) + { + print_object(&t, p_obj, true); + } - const char* lexeme = - p_static_assert_declaration->string_literal_opt->lexeme; + type_destroy(&t); + } + else if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_STATE) + { + /*TODO + check state + + */ + struct type t = { 0 }; + struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); + if (p_obj) + { + if (p_static_assert_declaration->string_literal_opt) + { + bool is_invalid = false; + enum object_state e = + parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); + if (!is_invalid) + { + if (e != p_obj->state) + { + compiler_diagnostic_message(ERROR_STATIC_STATE_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "static_state failed"); + } + } + else + { + compiler_diagnostic_message(ERROR_STATIC_STATE_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); + } + } - if (strcmp(lexeme, "\"zero\"") == 0) - { - //gives the semantics of {0} or calloc - set_direct_state(&t, p_obj, OBJECT_STATE_ZERO); - } - else - { - bool is_invalid = false; - enum object_state e = - parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); + } + type_destroy(&t); + } + else if (p_static_assert_declaration->first_token->type == TK_KEYWORD_STATIC_SET) + { + struct type t = { 0 }; + struct object* p_obj = expression_get_object(p_static_assert_declaration->constant_expression, &t); + if (p_obj) + { + if (p_static_assert_declaration->string_literal_opt) + { - if (!is_invalid) - { - set_object(&t, p_obj, e); - } - else - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); - } - } - } + const char* lexeme = + p_static_assert_declaration->string_literal_opt->lexeme; - } - type_destroy(&t); - } + if (strcmp(lexeme, "\"zero\"") == 0) + { + //gives the semantics of {0} or calloc + set_direct_state(&t, p_obj, OBJECT_STATE_ZERO); + } + else + { + bool is_invalid = false; + enum object_state e = + parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); + + if (!is_invalid) + { + set_object(&t, p_obj, e); + } + else + { + compiler_diagnostic_message(ERROR_STATIC_ASSERT_FAILED, ctx->ctx, p_static_assert_declaration->first_token, "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); + } + } + } + + } + type_destroy(&t); + } } static void flow_visit_declaration_specifiers(struct flow_visit_ctx* ctx, - struct declaration_specifiers* p_declaration_specifiers, - struct type* p_type); + struct declaration_specifiers* p_declaration_specifiers, + struct type* p_type); static void flow_visit_direct_declarator(struct flow_visit_ctx* ctx, struct direct_declarator* p_direct_declarator) { - if (p_direct_declarator->function_declarator) - { - struct parameter_declaration* parameter = NULL; + if (p_direct_declarator->function_declarator) + { + struct parameter_declaration* parameter = NULL; - if (p_direct_declarator->function_declarator->parameter_type_list_opt) - { - parameter = p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; - } + if (p_direct_declarator->function_declarator->parameter_type_list_opt) + { + parameter = p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; + } - ctx->parameter_list++; + ctx->parameter_list++; - while (parameter) - { - if (parameter->attribute_specifier_sequence_opt) - { - flow_visit_attribute_specifier_sequence(ctx, parameter->attribute_specifier_sequence_opt); - } + while (parameter) + { + if (parameter->attribute_specifier_sequence_opt) + { + flow_visit_attribute_specifier_sequence(ctx, parameter->attribute_specifier_sequence_opt); + } - flow_visit_declaration_specifiers(ctx, parameter->declaration_specifiers, ¶meter->declarator->type); - flow_visit_declarator(ctx, parameter->declarator); - parameter = parameter->next; - } + flow_visit_declaration_specifiers(ctx, parameter->declaration_specifiers, ¶meter->declarator->type); + flow_visit_declarator(ctx, parameter->declarator); + parameter = parameter->next; + } - ctx->parameter_list--; + ctx->parameter_list--; - } - else if (p_direct_declarator->array_declarator) - { - if (p_direct_declarator->array_declarator->assignment_expression) - { - flow_visit_expression(ctx, p_direct_declarator->array_declarator->assignment_expression); - } + } + else if (p_direct_declarator->array_declarator) + { + if (p_direct_declarator->array_declarator->assignment_expression) + { + flow_visit_expression(ctx, p_direct_declarator->array_declarator->assignment_expression); + } - } + } } static void flow_visit_declarator(struct flow_visit_ctx* ctx, struct declarator* p_declarator) { - if (ctx->tail_block && - p_declarator->type.category != TYPE_CATEGORY_FUNCTION) - { + if (ctx->tail_block && + p_declarator->type.category != TYPE_CATEGORY_FUNCTION) + { - if (ctx->parameter_list > 1) - { - /* - The objective here is to avoid including the arguments - of function pointers inside the scope. - Sample - void x_destroy(void (*f)(void * owner p)) - We add f but not p. - */ - return; - } + if (ctx->parameter_list > 1) + { + /* + The objective here is to avoid including the arguments + of function pointers inside the scope. + Sample + void x_destroy(void (*f)(void * owner p)) + We add f but not p. + */ + return; + } - struct flow_defer_scope* p_defer = flow_visit_ctx_push_child(ctx); - p_defer->declarator = p_declarator; + struct flow_defer_scope* p_defer = flow_visit_ctx_push_child(ctx); + p_defer->declarator = p_declarator; - struct object temp = make_object(&p_declarator->type, p_declarator); - object_swap(&temp, &p_declarator->object); - object_destroy(&temp); + struct object temp = make_object(&p_declarator->type, p_declarator); + object_swap(&temp, &p_declarator->object); + object_destroy(&temp); - if (p_declarator->declaration_specifiers && - p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) - { - if (type_is_pointer(&p_declarator->type)) - { - if (!ctx->ctx->options.null_checks || - (p_declarator->type.type_qualifier_flags & TYPE_QUALIFIER_OPT)) - { - set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); - } - else - { - set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL)); - } - } - else - { - set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); - } + if (p_declarator->declaration_specifiers && + p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) + { + if (type_is_pointer(&p_declarator->type)) + { + if (!ctx->ctx->options.null_checks || + (p_declarator->type.type_qualifier_flags & TYPE_QUALIFIER_OPT)) + { + set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); + } + else + { + set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL)); + } + } + else + { + set_object(&p_declarator->type, &p_declarator->object, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); + } #if 0 - if (type_is_pointer(&p_declarator->type)) - { - //TODO necessary? - struct type t2 = type_remove_pointer(&p_declarator->type); - if (p_declarator->object.pointed) - { - set_object(&t2, p_declarator->object.pointed, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); - } - type_destroy(&t2); - } + if (type_is_pointer(&p_declarator->type)) + { + //TODO necessary? + struct type t2 = type_remove_pointer(&p_declarator->type); + if (p_declarator->object.pointed) + { + set_object(&t2, p_declarator->object.pointed, (OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL)); + } + type_destroy(&t2); + } #endif - } - } + } + } - /*if (p_declarator->pointer) - { - struct pointer* p = p_declarator->pointer; - while (p) - { - p = p->pointer; - } - }*/ + /*if (p_declarator->pointer) + { + struct pointer* p = p_declarator->pointer; + while (p) + { + p = p->pointer; + } + }*/ - if (p_declarator->direct_declarator) - { - flow_visit_direct_declarator(ctx, p_declarator->direct_declarator); - } + if (p_declarator->direct_declarator) + { + flow_visit_direct_declarator(ctx, p_declarator->direct_declarator); + } } static void flow_visit_init_declarator_list(struct flow_visit_ctx* ctx, struct init_declarator_list* p_init_declarator_list) { - struct init_declarator* p_init_declarator = p_init_declarator_list->head; + struct init_declarator* p_init_declarator = p_init_declarator_list->head; - while (p_init_declarator) - { - if (p_init_declarator->p_declarator) - { - flow_visit_declarator(ctx, p_init_declarator->p_declarator); - } + while (p_init_declarator) + { + if (p_init_declarator->p_declarator) + { + flow_visit_declarator(ctx, p_init_declarator->p_declarator); + } - if (p_init_declarator->initializer) - { - if (p_init_declarator->initializer->assignment_expression) - { - flow_visit_expression(ctx, p_init_declarator->initializer->assignment_expression); - } - else - { - assert(p_init_declarator->initializer->braced_initializer != NULL); - if (p_init_declarator->initializer->braced_initializer) - { - flow_visit_bracket_initializer_list(ctx, - p_init_declarator->initializer->braced_initializer); + if (p_init_declarator->initializer) + { + if (p_init_declarator->initializer->assignment_expression) + { + flow_visit_expression(ctx, p_init_declarator->initializer->assignment_expression); + } + else + { + assert(p_init_declarator->initializer->braced_initializer != NULL); + if (p_init_declarator->initializer->braced_initializer) + { + flow_visit_bracket_initializer_list(ctx, + p_init_declarator->initializer->braced_initializer); - //set zero - } - } - } + //set zero + } + } + } - if (p_init_declarator->p_declarator->type.category != TYPE_CATEGORY_FUNCTION) - { - if (p_init_declarator->initializer && - p_init_declarator->initializer->assignment_expression) - { - struct type right_object_type = { 0 }; - struct object* p_right_object = - expression_get_object(p_init_declarator->initializer->assignment_expression, &right_object_type); + if (p_init_declarator->p_declarator->type.category != TYPE_CATEGORY_FUNCTION) + { + if (p_init_declarator->initializer && + p_init_declarator->initializer->assignment_expression) + { + struct type right_object_type = { 0 }; + struct object* p_right_object = + expression_get_object(p_init_declarator->initializer->assignment_expression, &right_object_type); - bool bool_source_zero_value = constant_value_is_valid(&p_init_declarator->initializer->assignment_expression->constant_value) && - constant_value_to_ull(&p_init_declarator->initializer->assignment_expression->constant_value) == 0; + bool bool_source_zero_value = constant_value_is_valid(&p_init_declarator->initializer->assignment_expression->constant_value) && + constant_value_to_ull(&p_init_declarator->initializer->assignment_expression->constant_value) == 0; - //cast? - if (p_init_declarator->initializer->assignment_expression->expression_type == POSTFIX_FUNCTION_CALL && - p_init_declarator->initializer->assignment_expression->left && - p_init_declarator->initializer->assignment_expression->left->declarator && - p_init_declarator->initializer->assignment_expression->left->declarator->name) - { - if (strcmp(p_init_declarator->initializer->assignment_expression->left->declarator->name->lexeme, "calloc") == 0) - { - p_init_declarator->p_declarator->object.state = OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL; + //cast? + if (p_init_declarator->initializer->assignment_expression->expression_type == POSTFIX_FUNCTION_CALL && + p_init_declarator->initializer->assignment_expression->left && + p_init_declarator->initializer->assignment_expression->left->declarator && + p_init_declarator->initializer->assignment_expression->left->declarator->name) + { + if (strcmp(p_init_declarator->initializer->assignment_expression->left->declarator->name->lexeme, "calloc") == 0) + { + p_init_declarator->p_declarator->object.state = OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL; - if (p_init_declarator->p_declarator->object.pointed) - { - struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); - set_direct_state(&t, p_init_declarator->p_declarator->object.pointed, OBJECT_STATE_ZERO); - type_destroy(&t); - } - } - else if (strcmp(p_init_declarator->initializer->assignment_expression->left->declarator->name->lexeme, "malloc") == 0) - { - p_init_declarator->p_declarator->object.state = OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL; + if (p_init_declarator->p_declarator->object.pointed) + { + struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); + set_direct_state(&t, p_init_declarator->p_declarator->object.pointed, OBJECT_STATE_ZERO); + type_destroy(&t); + } + } + else if (strcmp(p_init_declarator->initializer->assignment_expression->left->declarator->name->lexeme, "malloc") == 0) + { + p_init_declarator->p_declarator->object.state = OBJECT_STATE_NOT_NULL | OBJECT_STATE_NULL; - struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); - set_direct_state(&t, p_init_declarator->p_declarator->object.pointed, OBJECT_STATE_UNINITIALIZED); - type_destroy(&t); - } - else - { - const struct token* const token_position = - p_init_declarator->p_declarator->name ? - p_init_declarator->p_declarator->name : - p_init_declarator->p_declarator->first_token - ; - - object_assignment(ctx->ctx, p_right_object, &right_object_type, - &p_init_declarator->p_declarator->object, - &p_init_declarator->p_declarator->type, - token_position, - bool_source_zero_value, - OBJECT_STATE_MOVED); - } - } - else - { - const struct token* const token_position = - p_init_declarator->p_declarator->name ? - p_init_declarator->p_declarator->name : - p_init_declarator->p_declarator->first_token - ; - - object_assignment(ctx->ctx, p_right_object, &right_object_type, - &p_init_declarator->p_declarator->object, - &p_init_declarator->p_declarator->type, - token_position, - bool_source_zero_value, - OBJECT_STATE_MOVED); - } + struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); + set_direct_state(&t, p_init_declarator->p_declarator->object.pointed, OBJECT_STATE_UNINITIALIZED); + type_destroy(&t); + } + else + { + const struct token* const token_position = + p_init_declarator->p_declarator->name ? + p_init_declarator->p_declarator->name : + p_init_declarator->p_declarator->first_token + ; + + object_assignment(ctx->ctx, p_right_object, &right_object_type, + &p_init_declarator->p_declarator->object, + &p_init_declarator->p_declarator->type, + token_position, + bool_source_zero_value, + OBJECT_STATE_MOVED); + } + } + else + { + const struct token* const token_position = + p_init_declarator->p_declarator->name ? + p_init_declarator->p_declarator->name : + p_init_declarator->p_declarator->first_token + ; + + object_assignment(ctx->ctx, p_right_object, &right_object_type, + &p_init_declarator->p_declarator->object, + &p_init_declarator->p_declarator->type, + token_position, + bool_source_zero_value, + OBJECT_STATE_MOVED); + } - type_destroy(&right_object_type); - } - else if (p_init_declarator->initializer && - p_init_declarator->initializer->braced_initializer) - { - bool is_zero_initialized = false; - if (p_init_declarator->initializer->braced_initializer->initializer_list == NULL) - { - is_zero_initialized = true; - } - else - { - if (p_init_declarator->initializer->braced_initializer->initializer_list->size == 1 && - p_init_declarator->initializer->braced_initializer->initializer_list->head->assignment_expression) - { - struct constant_value* p_constant_value = - &p_init_declarator->initializer->braced_initializer->initializer_list->head->assignment_expression->constant_value; + type_destroy(&right_object_type); + } + else if (p_init_declarator->initializer && + p_init_declarator->initializer->braced_initializer) + { + bool is_zero_initialized = false; + if (p_init_declarator->initializer->braced_initializer->initializer_list == NULL) + { + is_zero_initialized = true; + } + else + { + if (p_init_declarator->initializer->braced_initializer->initializer_list->size == 1 && + p_init_declarator->initializer->braced_initializer->initializer_list->head->assignment_expression) + { + struct constant_value* p_constant_value = + &p_init_declarator->initializer->braced_initializer->initializer_list->head->assignment_expression->constant_value; - if (constant_value_is_valid(p_constant_value) && - constant_value_to_ull(p_constant_value) == 0) - { - is_zero_initialized = true; - } + if (constant_value_is_valid(p_constant_value) && + constant_value_to_ull(p_constant_value) == 0) + { + is_zero_initialized = true; + } - } - } + } + } - if (is_zero_initialized) - { - set_direct_state(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, OBJECT_STATE_ZERO); - } - else - { - set_direct_state(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, OBJECT_STATE_ZERO); - } - } - else - { - set_object(&p_init_declarator->p_declarator->type, - &p_init_declarator->p_declarator->object, - OBJECT_STATE_UNINITIALIZED); - } - } + if (is_zero_initialized) + { + set_direct_state(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, OBJECT_STATE_ZERO); + } + else + { + set_direct_state(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, OBJECT_STATE_ZERO); + } + } + else + { + set_object(&p_init_declarator->p_declarator->type, + &p_init_declarator->p_declarator->object, + OBJECT_STATE_UNINITIALIZED); + } + } - p_init_declarator = p_init_declarator->next; - } + p_init_declarator = p_init_declarator->next; + } @@ -33750,46 +34103,46 @@ static void flow_visit_init_declarator_list(struct flow_visit_ctx* ctx, struct i static void flow_visit_member_declarator(struct flow_visit_ctx* ctx, struct member_declarator* p_member_declarator) { - if (p_member_declarator->declarator) - { - flow_visit_declarator(ctx, p_member_declarator->declarator); - } + if (p_member_declarator->declarator) + { + flow_visit_declarator(ctx, p_member_declarator->declarator); + } } static void flow_visit_member_declarator_list(struct flow_visit_ctx* ctx, struct member_declarator_list* p_member_declarator_list) { - struct member_declarator* p_member_declarator = p_member_declarator_list->head; - while (p_member_declarator) - { - flow_visit_member_declarator(ctx, p_member_declarator); - p_member_declarator = p_member_declarator->next; - } + struct member_declarator* p_member_declarator = p_member_declarator_list->head; + while (p_member_declarator) + { + flow_visit_member_declarator(ctx, p_member_declarator); + p_member_declarator = p_member_declarator->next; + } } static void flow_visit_member_declaration(struct flow_visit_ctx* ctx, struct member_declaration* p_member_declaration) { - if (p_member_declaration->member_declarator_list_opt) - { - flow_visit_specifier_qualifier_list(ctx, - p_member_declaration->specifier_qualifier_list, - &p_member_declaration->member_declarator_list_opt->head->declarator->type); /*se nao tem?*/ - } + if (p_member_declaration->member_declarator_list_opt) + { + flow_visit_specifier_qualifier_list(ctx, + p_member_declaration->specifier_qualifier_list, + &p_member_declaration->member_declarator_list_opt->head->declarator->type); /*se nao tem?*/ + } - if (p_member_declaration->member_declarator_list_opt) - { - flow_visit_member_declarator_list(ctx, p_member_declaration->member_declarator_list_opt); - } + if (p_member_declaration->member_declarator_list_opt) + { + flow_visit_member_declarator_list(ctx, p_member_declaration->member_declarator_list_opt); + } } static void flow_visit_member_declaration_list(struct flow_visit_ctx* ctx, struct member_declaration_list* p_member_declaration_list) { - struct member_declaration* p_member_declaration = - p_member_declaration_list->head; - while (p_member_declaration) - { - flow_visit_member_declaration(ctx, p_member_declaration); - p_member_declaration = p_member_declaration->next; - } + struct member_declaration* p_member_declaration = + p_member_declaration_list->head; + while (p_member_declaration) + { + flow_visit_member_declaration(ctx, p_member_declaration); + p_member_declaration = p_member_declaration->next; + } } static void flow_visit_attribute_specifier(struct flow_visit_ctx* ctx, struct attribute_specifier* p_attribute_specifier) @@ -33799,52 +34152,52 @@ static void flow_visit_attribute_specifier(struct flow_visit_ctx* ctx, struct at static void flow_visit_attribute_specifier_sequence(struct flow_visit_ctx* ctx, struct attribute_specifier_sequence* p_visit_attribute_specifier_sequence) { - struct attribute_specifier* current = p_visit_attribute_specifier_sequence->head; - while (current) - { - flow_visit_attribute_specifier(ctx, current); - current = current->next; - } + struct attribute_specifier* current = p_visit_attribute_specifier_sequence->head; + while (current) + { + flow_visit_attribute_specifier(ctx, current); + current = current->next; + } } static void flow_visit_struct_or_union_specifier(struct flow_visit_ctx* ctx, struct struct_or_union_specifier* p_struct_or_union_specifier) { - if (p_struct_or_union_specifier->attribute_specifier_sequence_opt) - flow_visit_attribute_specifier_sequence(ctx, p_struct_or_union_specifier->attribute_specifier_sequence_opt); + if (p_struct_or_union_specifier->attribute_specifier_sequence_opt) + flow_visit_attribute_specifier_sequence(ctx, p_struct_or_union_specifier->attribute_specifier_sequence_opt); - //struct struct_or_union_specifier* p_complete = get_complete_struct_or_union_specifier(p_struct_or_union_specifier); + //struct struct_or_union_specifier* p_complete = get_complete_struct_or_union_specifier(p_struct_or_union_specifier); - flow_visit_member_declaration_list(ctx, &p_struct_or_union_specifier->member_declaration_list); + flow_visit_member_declaration_list(ctx, &p_struct_or_union_specifier->member_declaration_list); } static void flow_visit_enumerator(struct flow_visit_ctx* ctx, struct enumerator* p_enumerator) { - if (p_enumerator->constant_expression_opt) - flow_visit_expression(ctx, p_enumerator->constant_expression_opt); + if (p_enumerator->constant_expression_opt) + flow_visit_expression(ctx, p_enumerator->constant_expression_opt); } static void flow_visit_enumerator_list(struct flow_visit_ctx* ctx, struct enumerator_list* p_enumerator_list) { - struct enumerator* current = p_enumerator_list->head; - while (current) - { - flow_visit_enumerator(ctx, current); - current = current->next; - } + struct enumerator* current = p_enumerator_list->head; + while (current) + { + flow_visit_enumerator(ctx, current); + current = current->next; + } } static void flow_visit_enum_specifier(struct flow_visit_ctx* ctx, struct enum_specifier* p_enum_specifier) { - if (p_enum_specifier->attribute_specifier_sequence_opt) - { - flow_visit_attribute_specifier_sequence(ctx, p_enum_specifier->attribute_specifier_sequence_opt); - } + if (p_enum_specifier->attribute_specifier_sequence_opt) + { + flow_visit_attribute_specifier_sequence(ctx, p_enum_specifier->attribute_specifier_sequence_opt); + } - flow_visit_enumerator_list(ctx, &p_enum_specifier->enumerator_list); + flow_visit_enumerator_list(ctx, &p_enum_specifier->enumerator_list); } static void flow_visit_typeof_specifier(struct flow_visit_ctx* ctx, struct typeof_specifier* p_typeof_specifier) @@ -33853,99 +34206,99 @@ static void flow_visit_typeof_specifier(struct flow_visit_ctx* ctx, struct typeo static void flow_visit_type_specifier(struct flow_visit_ctx* ctx, struct type_specifier* p_type_specifier) { - if (p_type_specifier->typeof_specifier) - { - flow_visit_typeof_specifier(ctx, p_type_specifier->typeof_specifier); - } + if (p_type_specifier->typeof_specifier) + { + flow_visit_typeof_specifier(ctx, p_type_specifier->typeof_specifier); + } - if (p_type_specifier->struct_or_union_specifier) - { - flow_visit_struct_or_union_specifier(ctx, p_type_specifier->struct_or_union_specifier); - } + if (p_type_specifier->struct_or_union_specifier) + { + flow_visit_struct_or_union_specifier(ctx, p_type_specifier->struct_or_union_specifier); + } - if (p_type_specifier->enum_specifier) - { - flow_visit_enum_specifier(ctx, p_type_specifier->enum_specifier); - } + if (p_type_specifier->enum_specifier) + { + flow_visit_enum_specifier(ctx, p_type_specifier->enum_specifier); + } - if (p_type_specifier->atomic_type_specifier) - { - //visit_deped(ctx, p_type_specifier->enum_specifier); - } + if (p_type_specifier->atomic_type_specifier) + { + //visit_deped(ctx, p_type_specifier->enum_specifier); + } } static void flow_visit_type_specifier_qualifier(struct flow_visit_ctx* ctx, struct type_specifier_qualifier* p_type_specifier_qualifier) { - if (p_type_specifier_qualifier->type_qualifier) - { - } - else if (p_type_specifier_qualifier->type_specifier) - { - flow_visit_type_specifier(ctx, p_type_specifier_qualifier->type_specifier); - } - else if (p_type_specifier_qualifier->alignment_specifier) - { - } + if (p_type_specifier_qualifier->type_qualifier) + { + } + else if (p_type_specifier_qualifier->type_specifier) + { + flow_visit_type_specifier(ctx, p_type_specifier_qualifier->type_specifier); + } + else if (p_type_specifier_qualifier->alignment_specifier) + { + } } static void flow_visit_storage_class_specifier(struct flow_visit_ctx* ctx, struct storage_class_specifier* p_storage_class_specifier) { - if (p_storage_class_specifier->flags & STORAGE_SPECIFIER_AUTO) - { + if (p_storage_class_specifier->flags & STORAGE_SPECIFIER_AUTO) + { - } + } } static void flow_visit_declaration_specifier(struct flow_visit_ctx* ctx, struct declaration_specifier* p_declaration_specifier) { - if (p_declaration_specifier->function_specifier) - { + if (p_declaration_specifier->function_specifier) + { - } + } - if (p_declaration_specifier->storage_class_specifier) - { - flow_visit_storage_class_specifier(ctx, p_declaration_specifier->storage_class_specifier); + if (p_declaration_specifier->storage_class_specifier) + { + flow_visit_storage_class_specifier(ctx, p_declaration_specifier->storage_class_specifier); - } + } - if (p_declaration_specifier->type_specifier_qualifier) - { - flow_visit_type_specifier_qualifier(ctx, p_declaration_specifier->type_specifier_qualifier); + if (p_declaration_specifier->type_specifier_qualifier) + { + flow_visit_type_specifier_qualifier(ctx, p_declaration_specifier->type_specifier_qualifier); - } + } } static void flow_visit_declaration_specifiers(struct flow_visit_ctx* ctx, - struct declaration_specifiers* p_declaration_specifiers, - struct type* p_type_opt) + struct declaration_specifiers* p_declaration_specifiers, + struct type* p_type_opt) { - /* - * Se tiver typeof ou auto vamos apagar todos type specifiers. - * e trocar por um novo - * const typeof(int (*)()) a; - //a = 1; - auto p = (const typeof(int (*)())) 0; + /* + * Se tiver typeof ou auto vamos apagar todos type specifiers. + * e trocar por um novo + * const typeof(int (*)()) a; + //a = 1; + auto p = (const typeof(int (*)())) 0; - TODO esconder os type spefiver e qualifider , esconder auto. - o resto tipo static deixar. + TODO esconder os type spefiver e qualifider , esconder auto. + o resto tipo static deixar. - */ - // + */ + // - struct declaration_specifier* p_declaration_specifier = p_declaration_specifiers->head; + struct declaration_specifier* p_declaration_specifier = p_declaration_specifiers->head; - while (p_declaration_specifier) - { - flow_visit_declaration_specifier(ctx, p_declaration_specifier); - p_declaration_specifier = p_declaration_specifier->next; - } + while (p_declaration_specifier) + { + flow_visit_declaration_specifier(ctx, p_declaration_specifier); + p_declaration_specifier = p_declaration_specifier->next; + } } /* @@ -33953,116 +34306,118 @@ static void flow_visit_declaration_specifiers(struct flow_visit_ctx* ctx, */ static bool flow_is_last_item_return(struct compound_statement* p_compound_statement) { - if (p_compound_statement && - p_compound_statement->block_item_list.tail && - p_compound_statement->block_item_list.tail->unlabeled_statement && - p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement && - p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement->first_token && - p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement->first_token->type == TK_KEYWORD_RETURN) - { - return true; - } - return false; + if (p_compound_statement && + p_compound_statement->block_item_list.tail && + p_compound_statement->block_item_list.tail->unlabeled_statement && + p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement && + p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement->first_token && + p_compound_statement->block_item_list.tail->unlabeled_statement->jump_statement->first_token->type == TK_KEYWORD_RETURN) + { + return true; + } + return false; } void flow_visit_declaration(struct flow_visit_ctx* ctx, struct declaration* p_declaration) { - if (p_declaration->static_assert_declaration) - { - flow_visit_static_assert_declaration(ctx, p_declaration->static_assert_declaration); - } - - - if (p_declaration->p_attribute_specifier_sequence_opt) - { - flow_visit_attribute_specifier_sequence(ctx, p_declaration->p_attribute_specifier_sequence_opt); - } - + if (p_declaration->static_assert_declaration) + { + flow_visit_static_assert_declaration(ctx, p_declaration->static_assert_declaration); + } - if (p_declaration->declaration_specifiers) - { - if (p_declaration->init_declarator_list.head) - { - flow_visit_declaration_specifiers(ctx, p_declaration->declaration_specifiers, - &p_declaration->init_declarator_list.head->p_declarator->type); - } - else - { - flow_visit_declaration_specifiers(ctx, p_declaration->declaration_specifiers, NULL); - } + if (p_declaration->p_attribute_specifier_sequence_opt) + { + flow_visit_attribute_specifier_sequence(ctx, p_declaration->p_attribute_specifier_sequence_opt); + } - } - if (p_declaration->p_attribute_specifier_sequence_opt) - { - } + if (p_declaration->declaration_specifiers) + { + if (p_declaration->init_declarator_list.head) + { + flow_visit_declaration_specifiers(ctx, p_declaration->declaration_specifiers, + &p_declaration->init_declarator_list.head->p_declarator->type); + } + else + { + flow_visit_declaration_specifiers(ctx, p_declaration->declaration_specifiers, NULL); - if (p_declaration->init_declarator_list.head) - { - flow_visit_init_declarator_list(ctx, &p_declaration->init_declarator_list); - } + } - if (p_declaration->function_body) - { + } + + if (p_declaration->p_attribute_specifier_sequence_opt) + { + } + + if (p_declaration->init_declarator_list.head) + { + flow_visit_init_declarator_list(ctx, &p_declaration->init_declarator_list); + } + + if (p_declaration->function_body) + { - assert(ctx->p_return_type == NULL); + assert(ctx->p_return_type == NULL); - struct type type = get_function_return_type(&p_declaration->init_declarator_list.head->p_declarator->type); - ctx->p_return_type = &type; + struct type type = get_function_return_type(&p_declaration->init_declarator_list.head->p_declarator->type); + ctx->p_return_type = &type; - //struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - //p_defer->p_statement = p_declaration->function_body; + //struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + //p_defer->p_statement = p_declaration->function_body; - flow_visit_compound_statement(ctx, p_declaration->function_body); - type_destroy(&type); - ctx->p_return_type = NULL; + flow_visit_compound_statement(ctx, p_declaration->function_body); + type_destroy(&type); + ctx->p_return_type = NULL; - //flow_visit_ctx_pop_tail_block(ctx); - } + //flow_visit_ctx_pop_tail_block(ctx); + } } void flow_visit_function(struct flow_visit_ctx* ctx, struct declaration* p_declaration) { - assert(p_declaration->function_body); + assert(p_declaration->function_body); - assert(ctx->tail_block == NULL); - struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); - if (p_defer == NULL) - { - return; - } - p_defer->p_function_body = p_declaration->function_body; + assert(ctx->tail_block == NULL); + struct flow_defer_scope* p_defer = flow_visit_ctx_push_tail_block(ctx); + if (p_defer == NULL) + { + return; + } + p_defer->p_function_body = p_declaration->function_body; - flow_visit_declaration(ctx, p_declaration); + flow_visit_declaration(ctx, p_declaration); - if (!flow_is_last_item_return(p_declaration->function_body)) - { - check_defer_and_variables(ctx, p_defer, p_declaration->function_body->last_token); - } + if (!flow_is_last_item_return(p_declaration->function_body)) + { + check_defer_and_variables(ctx, p_defer, p_declaration->function_body->last_token); + } - flow_visit_ctx_pop_tail_block(ctx); + flow_visit_ctx_pop_tail_block(ctx); } void flow_visit_ctx_destroy(struct flow_visit_ctx* obj_owner p) { - assert(p->tail_block == NULL); + assert(p->tail_block == NULL); } void flow_analysis_visit(struct flow_visit_ctx* ctx) { - struct declaration* p_declaration = ctx->ast.declaration_list.head; - while (p_declaration) - { - flow_visit_declaration(ctx, p_declaration); - p_declaration = p_declaration->next; - } + struct declaration* p_declaration = ctx->ast.declaration_list.head; + while (p_declaration) + { + flow_visit_declaration(ctx, p_declaration); + p_declaration = p_declaration->next; + } } +/* End of: flow_visit.c */ +/* Start of: error.c */ #ifdef _WIN32 @@ -34512,7 +34867,9 @@ int GetWindowsOrLinuxSocketLastErrorAsPosix(void) */ +/* End of: error.c */ +/* Start of: format_visit.c */ @@ -34877,923 +35234,951 @@ void format_visit(struct format_visit_ctx* ctx) } } +/* End of: format_visit.c */ +/* Start of: tests.c */ #ifdef TEST +#define WARNING_FLAG(x) (1ULL << (x)) static bool compile_without_errors(bool flow_analysis, bool nullchecks, const char* src) { - struct options options = { .input = LANGUAGE_C99, .flow_analysis = flow_analysis, .null_checks = nullchecks }; - struct report report = { 0 }; - get_ast(&options, "source", src, &report); - return report.error_count == 0; + struct options options = { .input = LANGUAGE_C99, + .flow_analysis = flow_analysis, + .null_checks = nullchecks, + .diagnostic_stack[0] = default_diagnostic + }; + struct report report = { 0 }; + get_ast(&options, "source", src, &report); + return report.error_count == 0; } static bool compile_with_errors(bool flow_analysis, bool nullchecks, const char* src) { + struct options options = + { + .input = LANGUAGE_C99, + .flow_analysis = flow_analysis, + .null_checks = nullchecks, + .diagnostic_stack[0].warnings = ~0ULL + }; + struct report report = { 0 }; + get_ast(&options, "source", src, &report); + return report.error_count != 0; +} - struct options options = { .input = LANGUAGE_C99, .flow_analysis = flow_analysis, .null_checks = nullchecks }; - struct report report = { 0 }; - get_ast(&options, "source", src, &report); - return report.error_count != 0; +static bool compile_with_warnings(bool flow_analysis, bool nullchecks, const char* src) +{ + struct options options = + { + .input = LANGUAGE_C99, + .flow_analysis = flow_analysis, + .null_checks = nullchecks + }; + struct report report = { 0 }; + get_ast(&options, "source", src, &report); + return report.warnings_count != 0; } + void parser_specifier_test() { - const char* src = "long long long i;"; - assert(compile_with_errors(false, false, src)); + const char* src = "long long long i;"; + assert(compile_with_errors(false, false, src)); } void char_constants() { - const char* source - = - "#define TYPE_IS(e, T) _Generic(typeof(e), T : 1, default: 0)\n" - "\n" - "static_assert(U'ç' == 231);\n" - "static_assert(u'ç' == 231);\n" - "//static_assert('ç' == 231);\n" - "\n" - "static_assert(TYPE_IS('a', int));\n" - "static_assert(TYPE_IS(u8'a', unsigned char));\n" - "static_assert(TYPE_IS(u'a', unsigned short));\n" - "static_assert(TYPE_IS(U'a', unsigned int));"; + const char* source + = + "#define TYPE_IS(e, T) _Generic(typeof(e), T : 1, default: 0)\n" + "\n" + "static_assert(U'ç' == 231);\n" + "static_assert(u'ç' == 231);\n" + "//static_assert('ç' == 231);\n" + "\n" + "static_assert(TYPE_IS('a', int));\n" + "static_assert(TYPE_IS(u8'a', unsigned char));\n" + "static_assert(TYPE_IS(u'a', unsigned short));\n" + "static_assert(TYPE_IS(U'a', unsigned int));"; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void array_item_type_test() { - const char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "void (*pf[10])(void* val);\n" - "static_assert(_is_same(typeof(pf[0]), void (*)(void* val)));\n"; - assert(compile_without_errors(false, false, src)); + const char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "void (*pf[10])(void* val);\n" + "static_assert(_is_same(typeof(pf[0]), void (*)(void* val)));\n"; + assert(compile_without_errors(false, false, src)); } void take_address_type_test() { - const char* src = - "void F(char(*p)[10])" - "{" - " (*p)[0] = 'a';" - "}"; - assert(compile_without_errors(false, false, src)); + const char* src = + "void F(char(*p)[10])" + "{" + " (*p)[0] = 'a';" + "}"; + assert(compile_without_errors(false, false, src)); } void parser_scope_test() { - const char* src = "void f() {int i; char i;}"; - assert(compile_with_errors(false, false, src)); + const char* src = "void f() {int i; char i;}"; + assert(compile_with_errors(false, false, src)); } void parser_tag_test() { - //mudou tipo do tag no mesmo escopo - const char* src = "enum E { A }; struct E { int i; };"; - assert(compile_with_errors(false, false, src)); + //mudou tipo do tag no mesmo escopo + const char* src = "enum E { A }; struct E { int i; };"; + assert(compile_with_errors(false, false, src)); } void string_concatenation_test() { - const char* src = " const char* s = \"part1\" \"part2\";"; - assert(compile_without_errors(false, false, src)); + const char* src = " const char* s = \"part1\" \"part2\";"; + assert(compile_without_errors(false, false, src)); } void test_digit_separator() { - struct report report = { 0 }; - char* result = compile_source("-std=c99", "int i = 1'000;", &report); - assert(strcmp(result, "int i = 1000;") == 0); - free(result); + struct report report = { 0 }; + char* result = compile_source("-std=c99", "int i = 1'000;", &report); + assert(strcmp(result, "int i = 1000;") == 0); + free(result); } void test_lit() { - struct report report = { 0 }; - char* result = compile_source("-std=c99", "char * s = u8\"maçã\";", &report); - assert(strcmp(result, "char * s = \"ma\\xc3\\xa7\\xc3\\xa3\";") == 0); - free(result); + struct report report = { 0 }; + char* result = compile_source("-std=c99", "char * s = u8\"maçã\";", &report); + assert(strcmp(result, "char * s = \"ma\\xc3\\xa7\\xc3\\xa3\";") == 0); + free(result); } void type_test2() { - char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "int a[10];\n" - " static_assert(_is_same(typeof(&a) ,int (*)[10]));\n" - ; + char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "int a[10];\n" + " static_assert(_is_same(typeof(&a) ,int (*)[10]));\n" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void type_test3() { - char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "int i;" - "int (*f)(void);" - " static_assert(_is_same(typeof(&i), int *));" - " static_assert(_is_same(typeof(&f), int (**)(void)));" - ; + char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "int i;" + "int (*f)(void);" + " static_assert(_is_same(typeof(&i), int *));" + " static_assert(_is_same(typeof(&f), int (**)(void)));" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void crazy_decl() { - const char* src = - "void (*f(int i))(void)\n" - "{\n" - " i = 1; \n" - " return 0;\n" - "}\n"; + const char* src = + "void (*f(int i))(void)\n" + "{\n" + " i = 1; \n" + " return 0;\n" + "}\n"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void crazy_decl2() { - const char* src = - "void (*f(int i))(void)\n" - "{\n" - " i = 1; \n" - " return 0;\n" - "}\n" - "int main()\n" - "{\n" - " f(1);\n" - "}\n"; + const char* src = + "void (*f(int i))(void)\n" + "{\n" + " i = 1; \n" + " return 0;\n" + "}\n" + "int main()\n" + "{\n" + " f(1);\n" + "}\n"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void crazy_decl4() { - const char* src = - "void (*F(int a, int b))(void) { return 0; }\n" - "void (*(*PF)(int a, int b))(void) = F;\n" - "int main() {\n" - " PF(1, 2);\n" - "}\n"; + const char* src = + "void (*F(int a, int b))(void) { return 0; }\n" + "void (*(*PF)(int a, int b))(void) = F;\n" + "int main() {\n" + " PF(1, 2);\n" + "}\n"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void sizeof_not_evaluated() { - assert(compile_without_errors(false, false, "int i = sizeof(1/0);\n")); + assert(compile_without_errors(false, false, "int i = sizeof(1/0);\n")); } void sizeof_array_test() { - assert(compile_without_errors(false, - false, - "int main() {\n" - "int a[] = { 1, 2, 3 };\n" - "static_assert(sizeof(a) == sizeof(int) * 3);\n" - "}\n" - )); + assert(compile_without_errors(false, + false, + "int main() {\n" + "int a[] = { 1, 2, 3 };\n" + "static_assert(sizeof(a) == sizeof(int) * 3);\n" + "}\n" + )); } void sizeof_test() { - const char* src = - "static_assert(sizeof(\"ABC\") == 4);" - "char a[10];" - "char b[10][2];" - "static_assert(sizeof(a) == 10);" - "static_assert(sizeof(b) == sizeof(char)*10*2);" - "char *p[10];" - "static_assert(sizeof(p) == 40);" - "static_assert(sizeof(int) == 4);" - "static_assert(sizeof(long) == 4);" - "static_assert(sizeof(char) == 1);" - "static_assert(sizeof(short) == 4);" - "static_assert(sizeof(unsigned int) == 4);" - "static_assert(sizeof(void (*pf)(int i)) == sizeof(void*));" - ; + const char* src = + "static_assert(sizeof(\"ABC\") == 4);" + "char a[10];" + "char b[10][2];" + "static_assert(sizeof(a) == 10);" + "static_assert(sizeof(b) == sizeof(char)*10*2);" + "char *p[10];" + "static_assert(sizeof(p) == 40);" + "static_assert(sizeof(int) == 4);" + "static_assert(sizeof(long) == 4);" + "static_assert(sizeof(char) == 1);" + "static_assert(sizeof(short) == 4);" + "static_assert(sizeof(unsigned int) == 4);" + "static_assert(sizeof(void (*pf)(int i)) == sizeof(void*));" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void alignof_test() { - const char* src = - "struct X { char s; double c; char s2;};\n" - "static_assert(alignof(struct X) == 8);" - "static_assert(sizeof(struct X) == 24);" - ; + const char* src = + "struct X { char s; double c; char s2;};\n" + "static_assert(alignof(struct X) == 8);" + "static_assert(sizeof(struct X) == 24);" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void indirection_struct_size() { - const char* src = - "typedef struct X X;\n" - "struct X {\n" - " void* data;\n" - "};\n" - "static_assert(sizeof(X) == sizeof(void*));" - ; + const char* src = + "typedef struct X X;\n" + "struct X {\n" + " void* data;\n" + "};\n" + "static_assert(sizeof(X) == sizeof(void*));" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void traits_test() { - //https://en.cppreference.com/w/cpp/header/type_traits - const char* src = - "void (*F)();\n" - "static_assert(_is_pointer(F));\n" - "static_assert(_is_integral(1));\n" - "int a[2];\n" - "static_assert(_is_array(a));\n" - "int((a2))[10];\n" - "static_assert(_is_array(a2));" - ; - assert(compile_without_errors(false, false, src)); + //https://en.cppreference.com/w/cpp/header/type_traits + const char* src = + "void (*F)();\n" + "static_assert(_is_pointer(F));\n" + "static_assert(_is_integral(1));\n" + "int a[2];\n" + "static_assert(_is_array(a));\n" + "int((a2))[10];\n" + "static_assert(_is_array(a2));" + ; + assert(compile_without_errors(false, false, src)); } void comp_error1() { - const char* src = - "void F() {\n" - " char* z;\n" - " *z-- = '\\0';\n" - "}\n"; + const char* src = + "void F() {\n" + " char* z;\n" + " *z-- = '\\0';\n" + "}\n"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void array_size() { - const char* src = - "void (*f[2][3])(int i);\n" - "int main() {\n" - "static_assert(sizeof(void (*[2])(int i)) == sizeof(void*) * 2);\n" - "static_assert(sizeof(f) == sizeof(void (*[2])(int i)) * 3);\n" - "}" - ; + const char* src = + "void (*f[2][3])(int i);\n" + "int main() {\n" + "static_assert(sizeof(void (*[2])(int i)) == sizeof(void*) * 2);\n" + "static_assert(sizeof(f) == sizeof(void (*[2])(int i)) * 3);\n" + "}" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void expr_type() { - const char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "static_assert(_is_same(typeof(1 + 2.0), double));"; + const char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "static_assert(_is_same(typeof(1 + 2.0), double));"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void expand_test() { - char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "typedef int A[2];" - "typedef A *B [1];" - "static_assert(_is_same(typeof(B), int (*[1])[2]));"; - ; + char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "typedef int A[2];" + "typedef A *B [1];" + "static_assert(_is_same(typeof(B), int (*[1])[2]));"; + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); - //https://godbolt.org/z/WbK9zP7zM + //https://godbolt.org/z/WbK9zP7zM } void expand_test2() { - const char* source - = - "\n" - "\n" - "typedef char* A;\n" - "typedef const A* B; \n" - "static_assert(_Generic(typeof(B), char * const * : 1));\n" - "\n" - "typedef const int T;\n" - "T i;\n" - "static_assert(_Generic(typeof(i), const int : 1));\n" - "\n" - "const T i2;\n" - "static_assert(_Generic(typeof(i2), const int : 1));\n" - "\n" - "typedef int T3;\n" - "const T3 i3;\n" - "static_assert(_Generic(typeof(i3), const int : 1));\n" - ""; + const char* source + = + "\n" + "\n" + "typedef char* A;\n" + "typedef const A* B; \n" + "static_assert(_Generic(typeof(B), char * const * : 1));\n" + "\n" + "typedef const int T;\n" + "T i;\n" + "static_assert(_Generic(typeof(i), const int : 1));\n" + "\n" + "const T i2;\n" + "static_assert(_Generic(typeof(i2), const int : 1));\n" + "\n" + "typedef int T3;\n" + "const T3 i3;\n" + "static_assert(_Generic(typeof(i3), const int : 1));\n" + ""; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); - //https://godbolt.org/z/WbK9zP7zM + //https://godbolt.org/z/WbK9zP7zM } void expand_test3() { - char* src3 = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "typedef char* T1;" - "typedef T1(*f[3])(int); " - "static_assert(_is_same(typeof(f), char* (* [3])(int)));"; + char* src3 = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "typedef char* T1;" + "typedef T1(*f[3])(int); " + "static_assert(_is_same(typeof(f), char* (* [3])(int)));"; - assert(compile_without_errors(false, false, src3)); + assert(compile_without_errors(false, false, src3)); - //https://godbolt.org/z/WbK9zP7zM + //https://godbolt.org/z/WbK9zP7zM } void bigtest() { - const char* str = - "\n" - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "\n" - "struct X { int i; };\n" - "\n" - "struct Y { double d;};\n" - "\n" - "enum E { A = 1 };\n" - "enum E e1;\n" - "\n" - "struct X* F() { return 0; }\n" - "\n" - "int main()\n" - "{\n" - " enum E { B } e2;\n" - " static_assert(_is_same(typeof(e2), enum E));\n" - "\n" - " static_assert(!_is_same(typeof(e2), typeof(e1)));\n" - "\n" - "\n" - " struct X x;\n" - " struct Y y;\n" - "\n" - " static_assert(_is_same(typeof(x), struct X));\n" - " static_assert(!_is_same(typeof(x), struct Y));\n" - "\n" - " static_assert(!_is_same(int(double), int()));\n" - "\n" - " int aa[10];\n" - "\n" - " static_assert(_is_same(typeof(*F()), struct X));\n" - " static_assert(_is_same(typeof(&aa), int(*)[10]));\n" - "\n" - " int* p = 0;\n" - " static_assert(_is_same(typeof(*(p + 1)), int));\n" - "\n" - " static_assert(_is_same(typeof(1), int));\n" - "\n" - " static_assert(_is_same(typeof(main), int()));\n" - "\n" - "\n" - " static_assert(!_is_same(typeof(main), int(double)));\n" - " static_assert(!_is_same(typeof(main), int));\n" - "\n" - "\n" - " struct X x2;\n" - " enum E e;\n" - " static_assert(_is_same(typeof(e), enum E));\n" - " static_assert(_is_same(typeof(x2), struct X));\n" - " static_assert(!_is_same(typeof(e), struct X));\n" - "\n" - "\n" - "\n" - " static_assert(_is_same(typeof(1L), long));\n" - " static_assert(_is_same(typeof(1UL) , unsigned long));\n" - " static_assert(_is_same(typeof(1ULL), unsigned long long));\n" - " \n" - " //static_assert(_is_same(typeof(A), int));\n" - "\n" - " static_assert(_is_same(typeof(1.0), double));\n" - " static_assert(_is_same(typeof(1.0f), float));\n" - " static_assert(_is_same(typeof(1.0L), long double));\n" - " \n" - " \n" - " static_assert(_is_same(typeof(((int*)0) + 1), int*));\n" - " static_assert(_is_same(typeof(*(((int*)0) + 1)), int));\n" - "\n" - "}\n" - "\n" - "\n" - ; - assert(compile_without_errors(false, false, str)); + const char* str = + "\n" + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "\n" + "struct X { int i; };\n" + "\n" + "struct Y { double d;};\n" + "\n" + "enum E { A = 1 };\n" + "enum E e1;\n" + "\n" + "struct X* F() { return 0; }\n" + "\n" + "int main()\n" + "{\n" + " enum E { B } e2;\n" + " static_assert(_is_same(typeof(e2), enum E));\n" + "\n" + " static_assert(!_is_same(typeof(e2), typeof(e1)));\n" + "\n" + "\n" + " struct X x;\n" + " struct Y y;\n" + "\n" + " static_assert(_is_same(typeof(x), struct X));\n" + " static_assert(!_is_same(typeof(x), struct Y));\n" + "\n" + " static_assert(!_is_same(int(double), int()));\n" + "\n" + " int aa[10];\n" + "\n" + " static_assert(_is_same(typeof(*F()), struct X));\n" + " static_assert(_is_same(typeof(&aa), int(*)[10]));\n" + "\n" + " int* p = 0;\n" + " static_assert(_is_same(typeof(*(p + 1)), int));\n" + "\n" + " static_assert(_is_same(typeof(1), int));\n" + "\n" + " static_assert(_is_same(typeof(main), int()));\n" + "\n" + "\n" + " static_assert(!_is_same(typeof(main), int(double)));\n" + " static_assert(!_is_same(typeof(main), int));\n" + "\n" + "\n" + " struct X x2;\n" + " enum E e;\n" + " static_assert(_is_same(typeof(e), enum E));\n" + " static_assert(_is_same(typeof(x2), struct X));\n" + " static_assert(!_is_same(typeof(e), struct X));\n" + "\n" + "\n" + "\n" + " static_assert(_is_same(typeof(1L), long));\n" + " static_assert(_is_same(typeof(1UL) , unsigned long));\n" + " static_assert(_is_same(typeof(1ULL), unsigned long long));\n" + " \n" + " //static_assert(_is_same(typeof(A), int));\n" + "\n" + " static_assert(_is_same(typeof(1.0), double));\n" + " static_assert(_is_same(typeof(1.0f), float));\n" + " static_assert(_is_same(typeof(1.0L), long double));\n" + " \n" + " \n" + " static_assert(_is_same(typeof(((int*)0) + 1), int*));\n" + " static_assert(_is_same(typeof(*(((int*)0) + 1)), int));\n" + "\n" + "}\n" + "\n" + "\n" + ; + assert(compile_without_errors(false, false, str)); } void literal_string_type() { - const char* source = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - " static_assert(_is_same(typeof(\"A\"), char [2]));\n" - " static_assert(_is_same(typeof(\"AB\"), char [3]));\n" - ; + const char* source = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + " static_assert(_is_same(typeof(\"A\"), char [2]));\n" + " static_assert(_is_same(typeof(\"AB\"), char [3]));\n" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void digit_separator_test() { - const char* source = - "static_assert(1'00'00 == 10000);" - ; + const char* source = + "static_assert(1'00'00 == 10000);" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void numbers_test() { - const char* source = - "#if 0xA1 == 161\n" - "_Static_assert(0xA1 == 161); \n" - "#endif" - ; + const char* source = + "#if 0xA1 == 161\n" + "_Static_assert(0xA1 == 161); \n" + "#endif" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void binary_digits_test() { - const char* source = - "_Static_assert(0b101010 == 42);" - "_Static_assert(0b1010'10 == 42);" - "_Static_assert(052 == 42);" - ; + const char* source = + "_Static_assert(0b101010 == 42);" + "_Static_assert(0b1010'10 == 42);" + "_Static_assert(052 == 42);" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void type_suffix_test() { - const char* source = - "\n" - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "\n" - "static_assert(_is_same(typeof(1), int));\n" - "static_assert(_is_same(typeof(1L), long));\n" - "static_assert(_is_same(typeof(1LL), long long));\n" - "static_assert(_is_same(typeof(1U), unsigned int));\n" - "static_assert(_is_same(typeof(1ULL), unsigned long long));\n" - "static_assert(_is_same(typeof(1), int));\n" - "static_assert(_is_same(typeof(1l), long));\n" - "static_assert(_is_same(typeof(1ll), long long) );\n" - "static_assert(_is_same(typeof(1u), unsigned int));\n" - "static_assert(_is_same(typeof(1ull), unsigned long long));\n" - "static_assert(_is_same(typeof(0x1), int));\n" - "static_assert(_is_same(typeof(0x1L), long));\n" - "static_assert(_is_same(typeof(0x1LL), long long));\n" - "static_assert(_is_same(typeof(0x1U), unsigned int));\n" - "static_assert(_is_same(typeof(0x1ULL), unsigned long long)); \n" - "static_assert(_is_same(typeof(0x1), int));\n" - "static_assert(_is_same(typeof(0x1l), long));\n" - "static_assert(_is_same(typeof(0x1ll), long long));\n" - "static_assert(_is_same(typeof(0x1u), unsigned int));\n" - "static_assert(_is_same(typeof(0x1ull), unsigned long long));\n" - "static_assert(_is_same(typeof(0b1), int));\n" - "static_assert(_is_same(typeof(0b1L), long));\n" - "static_assert(_is_same(typeof(0b1LL), long long));\n" - "static_assert(_is_same(typeof(0b1U), unsigned int));\n" - "static_assert(_is_same(typeof(0b1ULL), unsigned long long));\n" - "static_assert(_is_same(typeof(0b1l), long));\n" - "static_assert(_is_same(typeof(0b1ll), long long));\n" - "static_assert(_is_same(typeof(0b1ul), unsigned long));\n" - "static_assert(_is_same(typeof(0b1ull), unsigned long long));\n" - "static_assert(_is_same(typeof(1.0f), float));\n" - "static_assert(_is_same(typeof(1.0), double));\n" - "static_assert(_is_same(typeof(1.0L), long double));\n" - ; + const char* source = + "\n" + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "\n" + "static_assert(_is_same(typeof(1), int));\n" + "static_assert(_is_same(typeof(1L), long));\n" + "static_assert(_is_same(typeof(1LL), long long));\n" + "static_assert(_is_same(typeof(1U), unsigned int));\n" + "static_assert(_is_same(typeof(1ULL), unsigned long long));\n" + "static_assert(_is_same(typeof(1), int));\n" + "static_assert(_is_same(typeof(1l), long));\n" + "static_assert(_is_same(typeof(1ll), long long) );\n" + "static_assert(_is_same(typeof(1u), unsigned int));\n" + "static_assert(_is_same(typeof(1ull), unsigned long long));\n" + "static_assert(_is_same(typeof(0x1), int));\n" + "static_assert(_is_same(typeof(0x1L), long));\n" + "static_assert(_is_same(typeof(0x1LL), long long));\n" + "static_assert(_is_same(typeof(0x1U), unsigned int));\n" + "static_assert(_is_same(typeof(0x1ULL), unsigned long long)); \n" + "static_assert(_is_same(typeof(0x1), int));\n" + "static_assert(_is_same(typeof(0x1l), long));\n" + "static_assert(_is_same(typeof(0x1ll), long long));\n" + "static_assert(_is_same(typeof(0x1u), unsigned int));\n" + "static_assert(_is_same(typeof(0x1ull), unsigned long long));\n" + "static_assert(_is_same(typeof(0b1), int));\n" + "static_assert(_is_same(typeof(0b1L), long));\n" + "static_assert(_is_same(typeof(0b1LL), long long));\n" + "static_assert(_is_same(typeof(0b1U), unsigned int));\n" + "static_assert(_is_same(typeof(0b1ULL), unsigned long long));\n" + "static_assert(_is_same(typeof(0b1l), long));\n" + "static_assert(_is_same(typeof(0b1ll), long long));\n" + "static_assert(_is_same(typeof(0b1ul), unsigned long));\n" + "static_assert(_is_same(typeof(0b1ull), unsigned long long));\n" + "static_assert(_is_same(typeof(1.0f), float));\n" + "static_assert(_is_same(typeof(1.0), double));\n" + "static_assert(_is_same(typeof(1.0L), long double));\n" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void type_test() { - const char* source = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "int * p = 0;" - "static_assert(_is_same( typeof( *(p + 1) ), int) );" - ; + const char* source = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "int * p = 0;" + "static_assert(_is_same( typeof( *(p + 1) ), int) );" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void is_pointer_test() { - const char* source = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "\n" - "int main()\n" - "{\n" - " int i;\n" - " static_assert(_is_integral(i));\n" - " static_assert(_is_floating_point(double) && _is_floating_point(float));\n" - " static_assert(_is_function(main));\n" - "\n" - " char * p;\n" - " static_assert(_is_scalar(p));\n" - " static_assert(_is_scalar(nullptr));\n" - "\n" - " int a[10];\n" - " static_assert(_is_array(a));\n" - "\n" - " /*pf = pointer to function (void) returning array 10 of int*/\n" - " int (*pf)(void)[10];\n" - " static_assert(!_is_array(pf));\n" - " static_assert(_is_pointer(pf));\n" - "\n" - " static_assert(_is_same(int, typeof(i)));\n" - "\n" - " static_assert(_is_const(const int));\n" - " static_assert(!_is_const(const int*));\n" - " static_assert(_is_const(int* const));\n" - "\n" - "}\n" - ; - assert(compile_without_errors(false, false, source)); + const char* source = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "\n" + "int main()\n" + "{\n" + " int i;\n" + " static_assert(_is_integral(i));\n" + " static_assert(_is_floating_point(double) && _is_floating_point(float));\n" + " static_assert(_is_function(main));\n" + "\n" + " char * p;\n" + " static_assert(_is_scalar(p));\n" + " static_assert(_is_scalar(nullptr));\n" + "\n" + " int a[10];\n" + " static_assert(_is_array(a));\n" + "\n" + " /*pf = pointer to function (void) returning array 10 of int*/\n" + " int (*pf)(void)[10];\n" + " static_assert(!_is_array(pf));\n" + " static_assert(_is_pointer(pf));\n" + "\n" + " static_assert(_is_same(int, typeof(i)));\n" + "\n" + " static_assert(_is_const(const int));\n" + " static_assert(!_is_const(const int*));\n" + " static_assert(_is_const(int* const));\n" + "\n" + "}\n" + ; + assert(compile_without_errors(false, false, source)); } void params_test() { - const char* source = - "void f1();" - "void f2(void);" - "void f3(char * s, ...);" - "int main()" - "{" - " f1();" - " f2();" - " f3(\"\");" - " f3(\"\", 1, 2, 3);" - "}" - ; + const char* source = + "void f1();" + "void f2(void);" + "void f3(char * s, ...);" + "int main()" + "{" + " f1();" + " f2();" + " f3(\"\");" + " f3(\"\", 1, 2, 3);" + "}" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void test_compiler_constant_expression() { - const char* source = - "int main()" - "{" - " static_assert('ab' == 'a'*256+'b');\n" - " static_assert(sizeof(char) == 1);\n" - " static_assert(true == 1);\n" - " static_assert(false == 0);\n" - "}" - ; + const char* source = + "int main()" + "{" + " static_assert('ab' == 'a'*256+'b');\n" + " static_assert(sizeof(char) == 1);\n" + " static_assert(true == 1);\n" + " static_assert(false == 0);\n" + "}" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void zerodiv() { - const char* source = - "int main()" - "{" - " int a = 2/0;\n" - "}" - ; + const char* source + = + "int main()\n" + "{\n" + " int a = 2/0;\n" + "#pragma cake diagnostic check \"-Wdiv-by-zero\"\n" + "}\n" + ""; - assert(compile_with_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void function_result_test() { - const char* source = - "int (*(*F1)(void))(int, int*);\n" - "int (* F2(void) )(int, int*);\n" - "static_assert(_Generic(F1(), int (*)(int, int*) : 1));\n" - "static_assert(_Generic(F2(), int (*)(int, int*) : 1));\n" - ; + const char* source = + "int (*(*F1)(void))(int, int*);\n" + "int (* F2(void) )(int, int*);\n" + "static_assert(_Generic(F1(), int (*)(int, int*) : 1));\n" + "static_assert(_Generic(F2(), int (*)(int, int*) : 1));\n" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void type_normalization() { - const char* source = - "char ((a1));\n" - "char b1;\n" - "static_assert((typeof(a1)) == (typeof(b1)));\n" - "\n" - "char ((a2))[2];\n" - "char b2[2];\n" - "static_assert((typeof(a2)) == (typeof(b2)));\n" - "\n" - "char ((a3))(int (a));\n" - "char (b3)(int a);\n" - "static_assert((typeof(a3)) == (typeof(b3)));\n" - ; + const char* source = + "char ((a1));\n" + "char b1;\n" + "static_assert((typeof(a1)) == (typeof(b1)));\n" + "\n" + "char ((a2))[2];\n" + "char b2[2];\n" + "static_assert((typeof(a2)) == (typeof(b2)));\n" + "\n" + "char ((a3))(int (a));\n" + "char (b3)(int a);\n" + "static_assert((typeof(a3)) == (typeof(b3)));\n" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void auto_test() { - const char* source = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - " int main()\n" - " {\n" - " double const x = 78.9;\n" - " double y = 78.9;\n" - " auto q = x;\n" - " static_assert( (typeof(q)) == (double));\n" - " auto const p = &x;\n" - " static_assert( (typeof(p)) == (const double * const));\n" - " auto const r = &y;\n" - " static_assert( (typeof(r)) == (double * const));\n" - " auto s = \"test\";\n" - " static_assert(_is_same(typeof(s), char *));\n" - " }\n" - ; + const char* source = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + " int main()\n" + " {\n" + " double const x = 78.9;\n" + " double y = 78.9;\n" + " auto q = x;\n" + " static_assert( (typeof(q)) == (double));\n" + " auto const p = &x;\n" + " static_assert( (typeof(p)) == (const double * const));\n" + " auto const r = &y;\n" + " static_assert( (typeof(r)) == (double * const));\n" + " auto s = \"test\";\n" + " static_assert(_is_same(typeof(s), char *));\n" + " }\n" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void visit_test_auto_typeof() { - const char* source = "auto p2 = (typeof(int[2])*) 0;"; + const char* source = "auto p2 = (typeof(int[2])*) 0;"; - struct report report = { 0 }; - char* result = compile_source("-std=c99", source, &report); - assert(strcmp(result, "int (* p2)[2] = (int(*)[2]) 0;") == 0); - free(result); + struct report report = { 0 }; + char* result = compile_source("-std=c99", source, &report); + assert(strcmp(result, "int (* p2)[2] = (int(*)[2]) 0;") == 0); + free(result); } void enum_scope() { - const char* source = - "enum E { A = 1 };\n" - "int main()\n" - "{\n" - " enum E { B } e2; \n" - " static_assert( (typeof(e2)), (enum E) ); \n" - "}\n"; - assert(compile_without_errors(false, false, source)); + const char* source = + "enum E { A = 1 };\n" + "int main()\n" + "{\n" + " enum E { B } e2; \n" + " static_assert( (typeof(e2)), (enum E) ); \n" + "}\n"; + assert(compile_without_errors(false, false, source)); } void const_member() { - const char* source - = - "struct X {\n" - " int i;\n" - "};\n" - "void f() {\n" - " const struct X x = {0};\n" - " x.i = 1;\n" //error x.i is constant - "}\n" - ""; + const char* source + = + "struct X {\n" + " int i;\n" + "};\n" + "void f() {\n" + " const struct X x = {0};\n" + " x.i = 1;\n" //error x.i is constant + "}\n" + ""; - struct options options = { .input = LANGUAGE_C99 }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && - report.last_error == C_ASSIGNMENT_OF_READ_ONLY_OBJECT); + struct options options = { .input = LANGUAGE_C99 }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& + report.last_error == ERROR_ASSIGNMENT_OF_READ_ONLY_OBJECT*/); } void register_struct_member() { - const char* source - = - "struct X {\n" - " int i;\n" - "};\n" - "\n" - "int main() {\n" - " register struct X x = {0};\n" - " int * p = &x.i;\n" //error: address of register variable 'x' requested - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1); + const char* source + = + "struct X {\n" + " int i;\n" + "};\n" + "\n" + "int main() {\n" + " register struct X x = {0};\n" + " int * p = &x.i;\n" //error: address of register variable 'x' requested + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1); } void address_of_const() { - const char* source = - "const int i;\n" - "static_assert(_Generic(&i, const int * : 1 ));\n" - "\n" - "const int * const p;\n" - "static_assert(_Generic(&p, const int * const * : 1 ));\n" - ""; + const char* source = + "const int i;\n" + "static_assert(_Generic(&i, const int * : 1 ));\n" + "\n" + "const int * const p;\n" + "static_assert(_Generic(&p, const int * const * : 1 ));\n" + ""; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void lvalue_test() { - //https://en.cppreference.com/w/c/language/value_category - - const char* source - = - "//https://en.cppreference.com/w/c/language/value_category\n" - "\n" - "struct X\n" - "{\n" - " int i;\n" - "};\n" - "\n" - "struct X f() { struct X x = {0}; return x; }\n" - "\n" - "const int i;\n" - "static_assert(_Generic(&i, const int* : 1));\n" - "\n" - "const int* const p;\n" - "static_assert(_Generic(&p, const int* const* : 1));\n" - "\n" - "\n" - "int main() {\n" - " static_assert(!_is_lvalue(1));\n" - " static_assert(_is_lvalue(\"a\"));\n" - " static_assert(_is_lvalue((int) { 0 }));\n" - "\n" - " int a;\n" - " static_assert(_is_lvalue(a));\n" - " static_assert(_is_lvalue((a)));\n" - "\n" - " enum E { A };\n" - " static_assert(!_is_lvalue(A));\n" - "\n" - "\n" - " struct X x = {0};\n" - " static_assert(_is_lvalue(x.i));\n" - "\n" - " struct X *px = 0;\n" - " static_assert(_is_lvalue(px->i));\n" - "\n" - " //== Non-lvalue object expressions ==\n" - " // \n" - " //integer, character, and floating constants \n" - " static_assert(!_is_lvalue(1));\n" - " static_assert(!_is_lvalue(1.2));\n" - " static_assert(!_is_lvalue('a'));\n" - "\n" - " //any function call expression\n" - " static_assert(!_is_lvalue(f()));\n" - " \n" - " //any cast expression\n" - " static_assert(!_is_lvalue((int)(0)));\n" - "\n" - " //member access operator (dot) applied to a non-lvalue structure/union\n" - " static_assert(!_is_lvalue(f().i));\n" - " \n" - " //results of all arithmetic, relational, logical, and bitwise operators\n" - " static_assert(!_is_lvalue(1 + 2));\n" - " static_assert(!_is_lvalue(1 && 2));\n" - " static_assert(!_is_lvalue(~1));\n" - "\n" - " //results of increment and decrement operators \n" - " static_assert(!_is_lvalue(a++));\n" - " \n" - " //results of assignment operators\n" - "\n" - " //the conditional operator\n" - " static_assert(!_is_lvalue(a ? a : a));\n" - "\n" - " //the comma operator\n" - " static_assert(!_is_lvalue(a , a)); \n" - " \n" - " //the address-of operator, even if neutralized by application to the result of unary * operator \n" - " static_assert(!_is_lvalue(&a));\n" - "\n" - "}\n" - ""; - ; - - - assert(compile_without_errors(false, false, source)); + //https://en.cppreference.com/w/c/language/value_category + + const char* source + = + "//https://en.cppreference.com/w/c/language/value_category\n" + "\n" + "struct X\n" + "{\n" + " int i;\n" + "};\n" + "\n" + "struct X f() { struct X x = {0}; return x; }\n" + "\n" + "const int i;\n" + "static_assert(_Generic(&i, const int* : 1));\n" + "\n" + "const int* const p;\n" + "static_assert(_Generic(&p, const int* const* : 1));\n" + "\n" + "\n" + "int main() {\n" + " static_assert(!_is_lvalue(1));\n" + " static_assert(_is_lvalue(\"a\"));\n" + " static_assert(_is_lvalue((int) { 0 }));\n" + "\n" + " int a;\n" + " static_assert(_is_lvalue(a));\n" + " static_assert(_is_lvalue((a)));\n" + "\n" + " enum E { A };\n" + " static_assert(!_is_lvalue(A));\n" + "\n" + "\n" + " struct X x = {0};\n" + " static_assert(_is_lvalue(x.i));\n" + "\n" + " struct X *px = 0;\n" + " static_assert(_is_lvalue(px->i));\n" + "\n" + " //== Non-lvalue object expressions ==\n" + " // \n" + " //integer, character, and floating constants \n" + " static_assert(!_is_lvalue(1));\n" + " static_assert(!_is_lvalue(1.2));\n" + " static_assert(!_is_lvalue('a'));\n" + "\n" + " //any function call expression\n" + " static_assert(!_is_lvalue(f()));\n" + " \n" + " //any cast expression\n" + " static_assert(!_is_lvalue((int)(0)));\n" + "\n" + " //member access operator (dot) applied to a non-lvalue structure/union\n" + " static_assert(!_is_lvalue(f().i));\n" + " \n" + " //results of all arithmetic, relational, logical, and bitwise operators\n" + " static_assert(!_is_lvalue(1 + 2));\n" + " static_assert(!_is_lvalue(1 && 2));\n" + " static_assert(!_is_lvalue(~1));\n" + "\n" + " //results of increment and decrement operators \n" + " static_assert(!_is_lvalue(a++));\n" + " \n" + " //results of assignment operators\n" + "\n" + " //the conditional operator\n" + " static_assert(!_is_lvalue(a ? a : a));\n" + "\n" + " //the comma operator\n" + " static_assert(!_is_lvalue(a , a)); \n" + " \n" + " //the address-of operator, even if neutralized by application to the result of unary * operator \n" + " static_assert(!_is_lvalue(&a));\n" + "\n" + "}\n" + ""; + ; + + + assert(compile_without_errors(false, false, source)); } void simple_no_discard_test() { - const char* source - = - "[[nodiscard]] int destroy();\n" - "\n" - "int main()\n" - "{\n" - " destroy();\n" - "}\n" - ""; + const char* source + = + "[[nodiscard]] int destroy();\n" + "\n" + "int main()\n" + "{\n" + " destroy();\n" + "}\n" + ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 1 && report.last_warning == W_ATTRIBUTES); + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1 /*&& report.last_warning == W_ATTRIBUTES*/); } void simple_no_discard_test2() { - const char* source - = - "[[nodiscard]] int destroy();\n" - "\n" - "int main()\n" - "{\n" - " int i;\n" - " i = destroy();\n" - "}\n" - ""; + const char* source + = + "[[nodiscard]] int destroy();\n" + "\n" + "int main()\n" + "{\n" + " int i;\n" + " i = destroy();\n" + "}\n" + ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 0 && report.error_count == 0); + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 0 && report.error_count == 0); } void address_of_register() { - const char* source - = - "struct X\n" - "{\n" - " int i;\n" - "};\n" - "\n" - "void f()\n" - "{\n" - " register struct X x;\n" - " &x;\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_ADDRESS_OF_REGISTER); + const char* source + = + "struct X\n" + "{\n" + " int i;\n" + "};\n" + "\n" + "void f()\n" + "{\n" + " register struct X x;\n" + " &x;\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& report.last_error == ERROR_ADDRESS_OF_REGISTER*/); } void return_address_of_local() { - const char* source - = - "struct X\n" - "{\n" - " int i;\n" - "};\n" - "\n" - "int* f()\n" - "{\n" - " struct X x;\n" - " return &x.i;\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 1 && report.last_warning == W_RETURN_LOCAL_ADDR); + const char* source + = + "struct X\n" + "{\n" + " int i;\n" + "};\n" + "\n" + "int* f()\n" + "{\n" + " struct X x;\n" + " return &x.i;\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1 /*&& report.last_warning == W_RETURN_LOCAL_ADDR*/); } void return_address_of_local2() { - const char* source - = - "\n" - "char* f() {\n" - " char str[] = \".\";\n" - " return str;\n" - "}\n" - ; + const char* source + = + "\n" + "char* f() {\n" + " char str[] = \".\";\n" + " return str;\n" + "}\n" + ; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 1 && report.last_warning == W_RETURN_LOCAL_ADDR); + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1 /*&& report.last_warning == W_RETURN_LOCAL_ADDR*/); } void assignment_of_read_only_object() { - const char* source - = - "struct X\n" - "{\n" - " int i;\n" - "};\n" - "\n" - "int* f()\n" - "{\n" - " const struct X * p;\n" - " p->i = 1;\n" - "}\n"; - - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_ASSIGNMENT_OF_READ_ONLY_OBJECT); + const char* source + = + "struct X\n" + "{\n" + " int i;\n" + "};\n" + "\n" + "int* f()\n" + "{\n" + " const struct X * p;\n" + " p->i = 1;\n" + "}\n"; + + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& report.last_error == ERROR_ASSIGNMENT_OF_READ_ONLY_OBJECT*/); } ////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -35804,971 +36189,993 @@ void assignment_of_read_only_object() void simple_move() { - const char* source - = - "char * _Owner f() {\n" - " char * _Owner p = 0;\n" - " return p; /*implicit move*/\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "char * _Owner f() {\n" + " char * _Owner p = 0;\n" + " return p; /*implicit move*/\n" + "}"; + assert(compile_without_errors(true, false, source)); } void simple_move_error() { - const char* source - = - "char * f() {\n" - " char * _Owner p = 0;\n" - " return p; \n" - "}"; + const char* source = + "char* f() {\n" + " char* _Owner p = 0;\n" + " return p;\n" + "#pragma cake diagnostic check \"-Wnon-owner-move\"\n" + "}\n"; - struct options options = { .input = LANGUAGE_C99 }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && - report.last_error == C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER); + assert(compile_without_errors(true, false, source)); } void parameter_view() { - const char* source - = - "\n" - "struct X { char * _Owner owner_variable; };\n" - "char * f(struct X *parameter) \n" - "{\n" - " return parameter->owner_variable;\n" //ok to move from parameter - "}\n"; + const char* source + = + "\n" + "struct X { char * _Owner owner_variable; };\n" + "char * f(struct X *parameter) \n" + "{\n" + " return parameter->owner_variable;\n" //ok to move from parameter + "}\n"; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void move_from_extern() { - const char* source - = - "struct X { char * _Owner owner_variable; };\n" - "struct X global;\n" - "char * f() \n" - "{\n" - " return global.owner_variable;\n" /*makes a _View*/ - "}\n"; + const char* source + = + "struct X { char * _Owner owner_variable; };\n" + "struct X global;\n" + "char * f() \n" + "{\n" + " return global.owner_variable;\n" /*makes a _View*/ + "}\n"; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void owner_type_test() { - const char* source - = - "\n" - "struct Y { \n" - " char * _Owner owner_variable; \n" - " char * non_owner_variable; \n" - "};\n" - "\n" - "struct X { \n" - " char * _Owner owner_variable; \n" - " char * non_owner_variable; \n" - " struct Y y1;\n" - " _View struct Y y2;\n" - "};\n" - "\n" - "void f()\n" - "{\n" - " struct X x;\n" - " \n" - " static_assert(_is_owner(typeof(x)));\n" - " static_assert(_is_owner(typeof(x.owner_variable)));\n" - " static_assert(!_is_owner(typeof(x.non_owner_variable)));\n" - " static_assert(_is_owner(struct X));\n" - " static_assert(_is_owner(typeof(x.y1)));\n" - " static_assert(!_is_owner(typeof(x.y2)));\n" - " \n" - " static_assert(_is_owner(typeof(x.y1.owner_variable)));\n" - " static_assert(!_is_owner(typeof(x.y1.non_owner_variable)));\n" - "\n" - " static_assert(!_is_owner(typeof(x.y2.owner_variable)));\n" - " static_assert(!_is_owner(typeof(x.y2.non_owner_variable)));\n" - "\n" - " _View struct X x2;\n" - " static_assert(!_is_owner(typeof(x2)));\n" - " static_assert(!_is_owner(typeof(x2.owner_variable)));\n" - " static_assert(!_is_owner(typeof(x2.non_owner_variable)));\n" - "\n" - " _Owner char * p;\n" - " static_assert(!_is_owner(typeof(p)));\n" - " static_assert(_is_owner(typeof(*p))); \n" - "}\n"; - - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "struct Y { \n" + " char * _Owner owner_variable; \n" + " char * non_owner_variable; \n" + "};\n" + "\n" + "struct X { \n" + " char * _Owner owner_variable; \n" + " char * non_owner_variable; \n" + " struct Y y1;\n" + " _View struct Y y2;\n" + "};\n" + "\n" + "void f()\n" + "{\n" + " struct X x;\n" + " \n" + " static_assert(_is_owner(typeof(x)));\n" + " static_assert(_is_owner(typeof(x.owner_variable)));\n" + " static_assert(!_is_owner(typeof(x.non_owner_variable)));\n" + " static_assert(_is_owner(struct X));\n" + " static_assert(_is_owner(typeof(x.y1)));\n" + " static_assert(!_is_owner(typeof(x.y2)));\n" + " \n" + " static_assert(_is_owner(typeof(x.y1.owner_variable)));\n" + " static_assert(!_is_owner(typeof(x.y1.non_owner_variable)));\n" + "\n" + " static_assert(!_is_owner(typeof(x.y2.owner_variable)));\n" + " static_assert(!_is_owner(typeof(x.y2.non_owner_variable)));\n" + "\n" + " _View struct X x2;\n" + " static_assert(!_is_owner(typeof(x2)));\n" + " static_assert(!_is_owner(typeof(x2.owner_variable)));\n" + " static_assert(!_is_owner(typeof(x2.non_owner_variable)));\n" + "\n" + " _Owner char * p;\n" + " static_assert(!_is_owner(typeof(p)));\n" + " static_assert(_is_owner(typeof(*p))); \n" + "}\n"; + + assert(compile_without_errors(true, false, source)); } void correct_move_assigment() { - const char* source - = - "\n" - "struct Y { \n" - " int i;\n" - "};\n" - "\n" - "struct X { \n" - " char * _Owner name;\n" - "};\n" - "\n" - "int main()\n" - "{\n" - " struct Y y1 = {};\n" - " struct Y y2 = {};\n" - " y1 = y2; //ok\n" - "\n" - " struct X x1 = {};\n" - " struct X x2 = {};\n" - " x1 = x2; //ok\n" - "\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "struct Y { \n" + " int i;\n" + "};\n" + "\n" + "struct X { \n" + " char * _Owner name;\n" + "};\n" + "\n" + "int main()\n" + "{\n" + " struct Y y1 = {};\n" + " struct Y y2 = {};\n" + " y1 = y2; //ok\n" + "\n" + " struct X x1 = {};\n" + " struct X x2 = {};\n" + " x1 = x2; //ok\n" + "\n" + "}"; + assert(compile_without_errors(true, false, source)); } void no_explicit_move_required() { - const char* source - = - "char * _Owner create();\n" - "void f(char * _Owner p);\n" - "\n" - "int main()\n" - "{\n" - " f(create());\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "char * _Owner create();\n" + "void f(char * _Owner p);\n" + "\n" + "int main()\n" + "{\n" + " f(create());\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void no_explicit_move_with_function_result() { - const char* source - = - "void destroy(char* _Owner x);\n" - "char * _Owner get();\n" - "\n" - "int main()\n" - "{\n" - " destroy(get());\n" - "}\n"; + const char* source + = + "void destroy(char* _Owner x);\n" + "char * _Owner get();\n" + "\n" + "int main()\n" + "{\n" + " destroy(get());\n" + "}\n"; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void cannot_ignore_owner_result() { - const char* source - = - "struct X {\n" - " char * _Owner name;\n" - "};\n" - "\n" - "struct X f();\n" - "\n" - "int main()\n" - "{\n" - " f();\n" - "}\n"; - - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 1); + const char* source + = + "struct X {\n" + " char * _Owner name;\n" + "};\n" + "\n" + "struct X f();\n" + "\n" + "int main()\n" + "{\n" + " f();\n" + "}\n"; + + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1); } void can_ignore_owner_result() { - const char* source - = - "struct X {\n" - " char * _Owner name;\n" - "};\n" - "\n" - "_View struct X f();\n" - "\n" - "int main()\n" - "{\n" - " f();\n" - "}\n"; + const char* source + = + "struct X {\n" + " char * _Owner name;\n" + "};\n" + "\n" + "_View struct X f();\n" + "\n" + "int main()\n" + "{\n" + " f();\n" + "}\n"; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void move_not_necessary_on_return() { - const char* source - = - "struct X {\n" - " char * _Owner name;\n" - "};\n" - "\n" - "struct X f();\n" - "struct X f2()\n" - "{\n" - " return f();\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct X {\n" + " char * _Owner name;\n" + "};\n" + "\n" + "struct X f();\n" + "struct X f2()\n" + "{\n" + " return f();\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void explicit_move_not_required() { - const char* source - = - "#define NULL ((void*)0)\n" - "\n" - "int main()\n" - "{\n" - " const char * _Owner s;\n" - " s = NULL; \n" - " s = 0; \n" - " s = nullptr; \n" - "}\n" - ; - assert(compile_without_errors(true, false, source)); + const char* source + = + "#define NULL ((void*)0)\n" + "\n" + "int main()\n" + "{\n" + " const char * _Owner s;\n" + " s = NULL; \n" + " s = 0; \n" + " s = nullptr; \n" + "}\n" + ; + assert(compile_without_errors(true, false, source)); } void error_using_temporary_owner() { - const char* source - = - "\n" - "void F(int i);\n" - "_Owner int make();\n" - "int main()\n" - "{\n" - " F(make());\n" - "}"; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_USING_TEMPORARY_OWNER); + const char* source + = + "\n" + "void F(int i);\n" + "_Owner int make();\n" + "int main()\n" + "{\n" + " F(make());\n" + "}\n" + "#pragma cake diagnostic check \"-Wtemp-owner\"\n" + ""; + assert(compile_without_errors(true, false, source)); } void passing_view_to_owner() { - const char* source - = - "void destroy(_Owner int i);\n" - "\n" - "int main()\n" - "{\n" - " _Owner int i = 0;\n" - " int v = i;\n" - " destroy(v);\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER); + const char* source + = + "void destroy(_Owner int i);\n" + "\n" + "int main()\n" + "{\n" + " _Owner int i = 0;\n" + " int v = i;\n" + " destroy(v);\n" + "}\n" + "\n" + "#pragma cake diagnostic check \"-Wnon-owner-move\""; + assert(compile_without_errors(true, false, source)); } void obj_owner_cannot_be_used_in_non_pointer() { - const char* source - = - "void f() {\n" - " _Obj_owner int i;\n" - "}\n" - ; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER); + const char* source + = + "void f() {\n" + " _Obj_owner int i;\n" + "}\n" + ; + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& report.last_error == ERROR_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER*/); } void ownership_flow_test_null_ptr_at_end_of_scope() { - const char* source - = - "void f() {\n" - " _Owner int * p = 0;\n" - "}\n" - " "; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void f() {\n" + " _Owner int * p = 0;\n" + "}\n" + " "; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_pointer_must_be_deleted() { - const char* source - = - "\n" - "int* _Owner get();\n" - "\n" - "void f() {\n" - " int * _Owner p = 0;\n" - " p = get();\n" - "}\n" - " "; - struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_FLOW_MISSING_DTOR); + const char* source + = + "\n" + "int* _Owner get();\n" + "\n" + "void f() \n" + "{\n" + " int* _Owner p = 0;\n" + " p = get();\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + "\n" + ""; + + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_basic_pointer_check() { - const char* source - = - "\n" - "int* _Owner get();\n" - "void dtor(int* _Owner p);\n" - "\n" - "void f(int a)\n" - "{\n" - " int* _Owner p = 0;\n" - " p = get(); \n" - " dtor(p); \n" - "}\n" - ""; + const char* source + = + "\n" + "int* _Owner get();\n" + "void dtor(int* _Owner p);\n" + "\n" + "void f(int a)\n" + "{\n" + " int* _Owner p = 0;\n" + " p = get(); \n" + " dtor(p); \n" + "}\n" + ""; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_struct_member_missing_free() { - const char* source - = - "\n" - "char * _Owner strdup(const char* s);\n" - "void free(void* _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void f(int a)\n" - "{\n" - " struct X x = {0};\n" - " x.text = strdup(\"a\");\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_FLOW_MISSING_DTOR); - ////TODO return ROOT object! + const char* source + = + "char* _Owner strdup(const char* s);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X \n" + "{\n" + " char* _Owner text;\n" + "};\n" + "\n" + "void f(int a)\n" + "{\n" + " struct X x = { 0 };\n" + " x.text = strdup(\"a\");\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_struct_member_free() { - const char* source - = - "\n" - "char * _Owner strdup(const char* s);\n" - "void free(void* _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void f(int a)\n" - "{\n" - " struct X x = {0};\n" - " x.text = strdup(\"a\");\n" - " free(x.text);\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "char * _Owner strdup(const char* s);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + "};\n" + "\n" + "void f(int a)\n" + "{\n" + " struct X x = {0};\n" + " x.text = strdup(\"a\");\n" + " free(x.text);\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_move_inside_if() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "void f(int c) \n" - "{\n" - " int * _Owner p = malloc(sizeof (int)); \n" - " if (c) {\n" - " free(p);\n" - " }\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1); + const char* source + = + "void free(void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "void f(int c)\n" + "{\n" + " int* _Owner p = malloc(sizeof(int));\n" + " if (c) {\n" + " free(p);\n" + " }\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + ""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_goto_same_scope() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "void f(int condition) \n" - "{\n" - " int * _Owner p = malloc(sizeof(int));\n" - " \n" - " if (condition)\n" - " goto end;\n" - " end:\n" - " free(p);\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "void f(int condition) \n" + "{\n" + " int * _Owner p = malloc(sizeof(int));\n" + " \n" + " if (condition)\n" + " goto end;\n" + " end:\n" + " free(p);\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_jump_labels() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "void f(int condition)\n" - "{\n" - " int* _Owner p = malloc(sizeof(int));\n" - "\n" - " if (condition)\n" - " goto end;\n" - "\n" - " free(p);\n" - "end:\n" - "\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_FLOW_MISSING_DTOR); + const char* source + = + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "void f(int condition)\n" + "{\n" + " int* _Owner p = malloc(sizeof(int));\n" + "\n" + " if (condition)\n" + " goto end;\n" + "\n" + " free(p);\n" + "end:\n" + "\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& report.last_error == W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR*/); } void ownership_flow_test_owner_if_pattern_1() { - const char* source - = - "\n" - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "int main()\n" - "{\n" - " int* _Owner p = malloc(sizeof(int));\n" - " if (p)\n" - " {\n" - " free(p); \n" - " }\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "int main()\n" + "{\n" + " int* _Owner p = malloc(sizeof(int));\n" + " if (p)\n" + " {\n" + " free(p); \n" + " }\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_owner_if_pattern_2() { - const char* source - = - "\n" - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "int main()\n" - "{\n" - " int* _Owner p = malloc(sizeof(int));\n" - " if (p != 0)\n" - " {\n" - " free(p); \n" - " }\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "int main()\n" + "{\n" + " int* _Owner p = malloc(sizeof(int));\n" + " if (p != 0)\n" + " {\n" + " free(p); \n" + " }\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_missing_destructor() { - const char* source - = - "struct X {\n" - " _Owner i;\n" - "};\n" - "void f() {\n" - " const struct X x = {0};\n" - "}\n" - ""; - - - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_FLOW_MISSING_DTOR); + const char* source + = + "struct X {\n" + " _Owner i;\n" + "};\n" + "void f() {\n" + " const struct X x = { 0 };\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_no_warning() { - const char* source - = - "void free( void * _Owner p);\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "void x_delete( struct X * _Owner p)\n" - "{\n" - " if (p)\n" - " {\n" - " free(p->text);\n" - " free(p);\n" - " }\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free( void * _Owner p);\n" + "struct X {\n" + " char * _Owner text;\n" + "};\n" + "void x_delete( struct X * _Owner p)\n" + "{\n" + " if (p)\n" + " {\n" + " free(p->text);\n" + " free(p);\n" + " }\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_moved_if_not_null() { - const char* source - = - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X { int i; };\n" - "struct Y { struct X * _Owner p; };\n" - "\n" - "int main() {\n" - " struct Y y = {0};\n" - " struct X * _Owner p = malloc(sizeof(struct X));\n" - " if (p){\n" - " y.p = p;\n" - " }\n" - " free(y.p);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void * _Owner malloc(int i);\n" + "void free( void * _Owner p);\n" + "\n" + "struct X { int i; };\n" + "struct Y { struct X * _Owner p; };\n" + "\n" + "int main() {\n" + " struct Y y = {0};\n" + " struct X * _Owner p = malloc(sizeof(struct X));\n" + " if (p){\n" + " y.p = p;\n" + " }\n" + " free(y.p);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_struct_moved() { - const char* source - = - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name;\n" - "};\n" - "\n" - "void x_destroy( struct X * _Obj_owner p);\n" - "\n" - "struct Y {\n" - " struct X x;\n" - "};\n" - "\n" - "void y_destroy(struct Y * _Obj_owner p) {\n" - " x_destroy(&p->x);\n" - "}\n" - ; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free( void * _Owner p);\n" + "\n" + "struct X {\n" + " char * _Owner name;\n" + "};\n" + "\n" + "void x_destroy( struct X * _Obj_owner p);\n" + "\n" + "struct Y {\n" + " struct X x;\n" + "};\n" + "\n" + "void y_destroy(struct Y * _Obj_owner p) {\n" + " x_destroy(&p->x);\n" + "}\n" + ; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_scope_error() { - const char* source - = - "void * _Owner malloc(int i);\n" - "void free( void* _Owner p);\n" - "\n" - "int main() {\n" - " try\n" - " {\n" - " if (1)\n" - " {\n" - " char * _Owner s = malloc(1);\n" - " free(s);\n" - " }\n" - " else\n" - " {\n" - " throw;\n" - " }\n" - " }\n" - " catch\n" - " {\n" - " }\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void * _Owner malloc(int i);\n" + "void free( void* _Owner p);\n" + "\n" + "int main() {\n" + " try\n" + " {\n" + " if (1)\n" + " {\n" + " char * _Owner s = malloc(1);\n" + " free(s);\n" + " }\n" + " else\n" + " {\n" + " throw;\n" + " }\n" + " }\n" + " catch\n" + " {\n" + " }\n" + "}"; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_void_destroy() { - /*TODO moving to void* requires object is moved before*/ - const char* source - = - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "int main() {\n" - " struct X * _Owner p = malloc(sizeof * p);\n" - " free(p); \n" - "} \n" - ; + /*TODO moving to void* requires object is moved before*/ + const char* source + = + "void * _Owner malloc(int i);\n" + "void free( void * _Owner p);\n" + "\n" + "struct X {\n" + " char * _Owner name; \n" + "};\n" + "\n" + "int main() {\n" + " struct X * _Owner p = malloc(sizeof * p);\n" + " free(p); \n" + "} \n" + ; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_void_destroy_ok() { - /*TODO moving to void* requires object is moved before*/ - const char* source - = - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "int main() {\n" - " struct X * _Owner p = malloc(sizeof * p);\n" - " p->name = malloc(10);\n" - " free(p->name);\n" - " free(p); \n" - "} \n" - ; - assert(compile_without_errors(true, false, source)); + /*TODO moving to void* requires object is moved before*/ + const char* source + = + "void * _Owner malloc(int i);\n" + "void free( void * _Owner p);\n" + "\n" + "struct X {\n" + " char * _Owner name; \n" + "};\n" + "\n" + "int main() {\n" + " struct X * _Owner p = malloc(sizeof * p);\n" + " p->name = malloc(10);\n" + " free(p->name);\n" + " free(p); \n" + "} \n" + ; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_moving_owner_pointer() { - const char* source - = - "\n" - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "void x_delete( struct X * _Owner p)\n" - "{\n" - " if (p) {\n" - " free(p->name);\n" - " free(p);\n" - " }\n" - "}\n" - "\n" - "int main() {\n" - " struct X * _Owner p = malloc(sizeof * p); \n" - " x_delete(p); \n" - "} \n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(int i);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "void x_delete(struct X* _Owner p)\n" + "{\n" + " if (p) {\n" + " free(p->name);\n" + " free(p);\n" + " }\n" + "}\n" + "\n" + "int main() {\n" + " struct X* _Owner p = malloc(sizeof * p);\n" + " x_delete(p);\n" + "}\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); + } void ownership_flow_test_moving_owner_pointer_missing() { - const char* source - = - "\n" - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "void x_delete( struct X * _Owner p)\n" - "{\n" - " if (p) {\n" - " //free(p->name);\n" - " free(p);\n" - " }\n" - "}\n" - "\n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + const char* source + = + "\n" + "void* _Owner malloc(int i);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "void x_delete(struct X* _Owner p)\n" + "{\n" + " if (p) {\n" + " //free(p->name);\n" + " free(p);\n" + " }\n" + "}\n" + "\n" + "\n" + "void dummy() {}\n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_error() { - const char* source - = - "\n" - "void* _Owner malloc(int size);\n" - "\n" - "struct X { \n" - " char * _Owner name;\n" - "};\n" - "\n" - "void * _Owner f1(){\n" - " struct X * _Owner p = malloc(sizeof (struct X));\n" - " p->name = malloc(1); \n" - " return p;\n" - "}\n" - ""; - - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + const char* source + = + "\n" + "void* _Owner malloc(int size);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "void* _Owner f1() {\n" + " struct X* _Owner p = malloc(sizeof(struct X));\n" + " p->name = malloc(1);\n" + " return p;\n" + "}\n" + "\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_setting_owner_pointer_to_null() { - const char* source - = - "\n" - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "int main() {\n" - " struct X * _Owner p = malloc(sizeof * p); \n" - " p = 0;\n" - "} \n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + const char* source + = + "\n" + "void* _Owner malloc(int i);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "int main() {\n" + " struct X* _Owner p = malloc(sizeof * p);\n" + " p = 0;\n" + "}\n" + "\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_while_not_null() { - const char* source - = - "struct item {\n" - " struct item * _Owner next;\n" - "};\n" - "void item_delete( struct item * _Owner p);\n" - "\n" - "struct list {\n" - " struct item * _Owner head;\n" - " struct item * tail;\n" - "};\n" - "int main()\n" - "{\n" - " struct list list = {0};\n" - " struct item * _Owner p = list.head;\n" - " while (p){\n" - " struct item * _Owner next = p->next;\n" - " p->next = 0;\n" - " item_delete(p);\n" - " p = next;\n" - " } \n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct item {\n" + " struct item * _Owner next;\n" + "};\n" + "void item_delete( struct item * _Owner p);\n" + "\n" + "struct list {\n" + " struct item * _Owner head;\n" + " struct item * tail;\n" + "};\n" + "int main()\n" + "{\n" + " struct list list = {0};\n" + " struct item * _Owner p = list.head;\n" + " while (p){\n" + " struct item * _Owner next = p->next;\n" + " p->next = 0;\n" + " item_delete(p);\n" + " p = next;\n" + " } \n" + "}"; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_if_state() { - const char* source - = - "\n" - "int* _Owner make();\n" - "void free(int * _Owner p);\n" - "\n" - "\n" - "void f(int condition)\n" - "{\n" - " int * _Owner p = 0;\n" - " static_state(p, \"null\");\n" - " \n" - " if (condition)\n" - " {\n" - " static_state(p, \"null\"); \n" - " p = make();\n" - " static_state(p, \"maybe-null\");\n" - " }\n" - " else\n" - " {\n" - " static_state(p, \"null\");\n" - " }\n" - " free(p);\n" - "}\n" - "\n" - ""; - - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "int* _Owner make();\n" + "void free(int * _Owner p);\n" + "\n" + "\n" + "void f(int condition)\n" + "{\n" + " int * _Owner p = 0;\n" + " static_state(p, \"null\");\n" + " \n" + " if (condition)\n" + " {\n" + " static_state(p, \"null\"); \n" + " p = make();\n" + " static_state(p, \"maybe-null\");\n" + " }\n" + " else\n" + " {\n" + " static_state(p, \"null\");\n" + " }\n" + " free(p);\n" + "}\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void ownership_types_test_error_owner() { - const char* source - = - "void * f();\n" - "int main() {\n" - " void * _Owner p = f(); \n" - "}\n" - ; - struct options options = { .input = LANGUAGE_C99 }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + const char* source + = + "void* f();\n" + "int main() {\n" + " void* _Owner p = f();\n" + "#pragma cake diagnostic check \"-Wmissing-owner-qualifier\"\n" + "}\n" + "\n" + "\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_if_variant() { - const char* source - = - "void * _Owner f();\n" - "void free( void *_Owner p);\n" - "int main() {\n" - " void * _Owner p = f(); \n" - " if (p)\n" - " {\n" - " free(p);\n" - " p = f(); \n" - " }\n" - "}\n" - ""; + const char* source + = + "void* _Owner f();\n" + "void free(void* _Owner p);\n" + "int main() {\n" + " void* _Owner p = f();\n" + " if (p)\n" + " {\n" + " free(p);\n" + " p = f();\n" + " }\n" + "}\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; - - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + assert(compile_without_errors(true, false, source)); } void check_leaks_on_else_block() { - const char* source - = - "void * _Owner malloc(int sz);\n" - "\n" - "void f(int i) { \n" - " if (i){\n" - " } \n" - " else {\n" - " int * _Owner p3 = malloc(1);\n" - " }\n" - "}\n" - ; + const char* source + = + "void* _Owner malloc(int sz);\n" + "\n" + "void f(int i) {\n" + " if (i) {\n" + " }\n" + " else {\n" + " int* _Owner p3 = malloc(1);\n" + " }\n" + "}\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_two_ifs() { - const char* source - = - "void * _Owner malloc(int sz);\n" - "void free( void * _Owner opt p);\n" - "\n" - "\n" - "void f(int i) { \n" - " void * _Owner p = 0;\n" - " if (i)\n" - " {\n" - " if (i)\n" - " {\n" - " p = malloc(1);\n" - " }\n" - " else\n" - " {\n" - " p = malloc(1);\n" - " } \n" - " }\n" - " \n" - " free(p);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void * _Owner malloc(int sz);\n" + "void free( void * _Owner _Opt p);\n" + "\n" + "\n" + "void f(int i) { \n" + " void * _Owner p = 0;\n" + " if (i)\n" + " {\n" + " if (i)\n" + " {\n" + " p = malloc(1);\n" + " }\n" + " else\n" + " {\n" + " p = malloc(1);\n" + " } \n" + " }\n" + " \n" + " free(p);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_no_name_parameter() { - const char* source - = - "void free( void * _Owner){ }\n" - ""; + const char* source + = + "void free(void* _Owner) { }\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; - assert(compile_with_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void ownership_flow_switch_case() { - const char* source - = - "void* _Owner make();\n" - "void free( void* _Owner p);\n" - "\n" - "void f(condition)\n" - "{\n" - " void* _Owner p = make();\n" - "\n" - "\n" - " switch (condition)\n" - " {\n" - " case 1:\n" - " {\n" - " free(p);\n" - " }\n" - " break;\n" - " case 2:\n" - " {\n" - " free(p);\n" - " }\n" - " break;\n" - "\n" - " default:\n" - " free(p);\n" - " break;\n" - " } \n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void* _Owner make();\n" + "void free( void* _Owner p);\n" + "\n" + "void f(condition)\n" + "{\n" + " void* _Owner p = make();\n" + "\n" + "\n" + " switch (condition)\n" + " {\n" + " case 1:\n" + " {\n" + " free(p);\n" + " }\n" + " break;\n" + " case 2:\n" + " {\n" + " free(p);\n" + " }\n" + " break;\n" + "\n" + " default:\n" + " free(p);\n" + " break;\n" + " } \n" + "}"; + assert(compile_without_errors(true, false, source)); } void state_inner_objects_preserved() { - const char* source - = - "void *_Owner malloc(int i);\n" - "void free(void *_Owner);\n" - "\n" - "struct X{\n" - " char * _Owner name;\n" - "};\n" - "\n" - "int main()\n" - "{\n" - " struct X * _Owner p = malloc(sizeof(struct X)); \n" - " if (p)\n" - " {\n" - " p->name = malloc(1);\n" - " }\n" - " else \n" - " { \n" - " p->name = malloc(1);\n" - " }\n" - " free(p->name);\n" - " free(p);\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void *_Owner malloc(int i);\n" + "void free(void *_Owner);\n" + "\n" + "struct X{\n" + " char * _Owner name;\n" + "};\n" + "\n" + "int main()\n" + "{\n" + " struct X * _Owner p = malloc(sizeof(struct X)); \n" + " if (p)\n" + " {\n" + " p->name = malloc(1);\n" + " }\n" + " else \n" + " { \n" + " p->name = malloc(1);\n" + " }\n" + " free(p->name);\n" + " free(p);\n" + "}"; + assert(compile_without_errors(true, false, source)); } //TODO make test with @@ -36776,1308 +37183,1451 @@ void state_inner_objects_preserved() // void owner_parameter_must_be_ignored() { - const char* source = "void f(void (*pf)(void* _Owner p)){}"; - assert(compile_without_errors(true, false, source)); + const char* source = "void f(void (*pf)(void* _Owner p)){}"; + assert(compile_without_errors(true, false, source)); } void taking_address() { - const char* source - = - "struct X {\n" - " void * _Owner text;\n" - "};\n" - "\n" - "void x_change(struct X* list);\n" - "void x_destroy(struct X* _Obj_owner p);\n" - "\n" - "int main()\n" - "{\n" - " struct X x = {};\n" - " static_debug(x);\n" - " x_change(&x);\n" - " //list_destroy(&list);\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1); + const char* source + = + "struct X {\n" + " void * _Owner text;\n" + "};\n" + "\n" + "void x_change(struct X* list);\n" + "void x_destroy(struct X* _Obj_owner p);\n" + "\n" + "int main()\n" + "{\n" + " struct X x = {};\n" + " static_debug(x);\n" + " x_change(&x);\n" + " //list_destroy(&list);\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1); } void taking_address_const() { - const char* source - = - "struct X {\n" - " void * _Owner text;\n" - "};\n" - "\n" - "void f(const struct X* list);\n" - "\n" - "int main()\n" - "{\n" - " struct X x = {};\n" - " f(&x);\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct X {\n" + " void * _Owner text;\n" + "};\n" + "\n" + "void f(const struct X* list);\n" + "\n" + "int main()\n" + "{\n" + " struct X x = {};\n" + " f(&x);\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void pointer_argument() { - const char* source - = - "void * _Owner malloc(int i);\n" - "\n" - "struct X {\n" - " void * _Owner text;\n" - "};\n" - "\n" - "void x_change( struct X* list);\n" - "\n" - "int main()\n" - "{\n" - " struct X * _Owner x = malloc(sizeof * x);\n" - " x_change(x);\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 3); + const char* source + = + "void * _Owner malloc(int i);\n" + "\n" + "struct X {\n" + " void * _Owner text;\n" + "};\n" + "\n" + "void x_change( struct X* list);\n" + "\n" + "int main()\n" + "{\n" + " struct X * _Owner x = malloc(sizeof * x);\n" + " x_change(x);\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .flow_analysis = true , .diagnostic_stack[0] = default_diagnostic }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 3); } void do_while() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "int main() {\n" - " void * _Owner p = malloc(1);\n" - " do{\n" - " free(p);\n" - " }\n" - " while(0); \n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "int main() {\n" + " void * _Owner p = malloc(1);\n" + " do{\n" + " free(p);\n" + " }\n" + " while(0); \n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void switch_cases_state() { - const char* source - = - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "void* _Owner f(int i)\n" - "{\n" - " void* _Owner p = malloc(1);\n" - " switch (i)\n" - " {\n" - " case 1:\n" - " break;\n" - " case 2:\n" - " break;\n" - " }\n" - "\n" - " return p;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "void* _Owner f(int i)\n" + "{\n" + " void* _Owner p = malloc(1);\n" + " switch (i)\n" + " {\n" + " case 1:\n" + " break;\n" + " case 2:\n" + " break;\n" + " }\n" + "\n" + " return p;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void switch_break() { - const char* source - = - "void * _Owner malloc(int i);\n" - "\n" - "void* _Owner f(int i)\n" - "{\n" - " void* _Owner p = malloc(1); \n" - " switch (i) {\n" - " case 1: break;\n" - " }\n" - " return p;\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void * _Owner malloc(int i);\n" + "\n" + "void* _Owner f(int i)\n" + "{\n" + " void* _Owner p = malloc(1); \n" + " switch (i) {\n" + " case 1: break;\n" + " }\n" + " return p;\n" + "}"; + assert(compile_without_errors(true, false, source)); } void passing_non_owner() { - /* - We need to analuse better this case... - - */ - const char* source - = - "struct X { \n" - " char * _Owner p;\n" - "};\n" - "void x_destroy(struct X * _Obj_owner p);\n" - "void f(struct X* x)\n" - "{\n" - " x_destroy(x); \n" - "}\n" - ""; + const char* source + = + "struct X {\n" + " char* _Owner p;\n" + "};\n" + "void x_destroy(struct X* _Obj_owner p);\n" + "void f(struct X* x)\n" + "{\n" + " x_destroy(x);\n" + "}\n" + "\n" + "#pragma cake diagnostic check \"-Wmust-use-address-of\"\n" + ""; - assert(compile_with_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void flow_analysis_else() { - const char* source - - = - "void * _Owner malloc(int i);\n" - "void free(void * _Owner p);\n" - "\n" - "int main() {\n" - " int * _Owner p1 = 0;\n" - " int * _Owner p2 = malloc(1);\n" - "\n" - " if (p2 == 0) {\n" - " return 1;\n" - " }\n" - " else\n" - " {\n" - " p1 = p2;\n" - " }\n" - " static_state(p2, \"moved\");\n" - " free(p1);\n" - " return 0;\n" - "}"; - - "}"; - - assert(compile_without_errors(true, false, source)); + const char* source + + = + "void * _Owner malloc(int i);\n" + "void free(void * _Owner p);\n" + "\n" + "int main() {\n" + " int * _Owner p1 = 0;\n" + " int * _Owner p2 = malloc(1);\n" + "\n" + " if (p2 == 0) {\n" + " return 1;\n" + " }\n" + " else\n" + " {\n" + " p1 = p2;\n" + " }\n" + " static_state(p2, \"moved\");\n" + " free(p1);\n" + " return 0;\n" + "}"; + + "}"; + + assert(compile_without_errors(true, false, source)); } void moving_content_of_owner() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "\n" - "struct X { char *_Owner name; };\n" - "struct Y { struct X x; };\n" - "\n" - "void f(struct Y * y, struct X * _Obj_owner p) \n" - "{\n" - " free(y->x.name);\n" - " y->x = *p;\n" - "}\n" - ; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "\n" + "struct X { char *_Owner name; };\n" + "struct Y { struct X x; };\n" + "\n" + "void f(struct Y * y, struct X * _Obj_owner p) \n" + "{\n" + " free(y->x.name);\n" + " y->x = *p;\n" + "}\n" + ; + assert(compile_without_errors(true, false, source)); } void switch_scope() { - const char* source - = - "\n" - "void* _Owner calloc(unsigned n, unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char* _Owner name;\n" - "};\n" - "\n" - "struct X* _Owner F(int i)\n" - "{\n" - " struct X* _Owner p1 = 0;\n" - "\n" - " switch (i)\n" - " {\n" - " case 1:\n" - " struct X* _Owner p2 = calloc(1, sizeof * p2);\n" - " if (p2)\n" - " {\n" - " static_set(*p2, \"zero\");\n" - " p1 = p2;\n" - " }\n" - " break;\n" - " case 2:\n" - " break;\n" - " }\n" - "\n" - " return p1;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner calloc(unsigned n, unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "struct X* _Owner F(int i)\n" + "{\n" + " struct X* _Owner p1 = 0;\n" + "\n" + " switch (i)\n" + " {\n" + " case 1:\n" + " struct X* _Owner p2 = calloc(1, sizeof * p2);\n" + " if (p2)\n" + " {\n" + " static_set(*p2, \"zero\");\n" + " p1 = p2;\n" + " }\n" + " break;\n" + " case 2:\n" + " break;\n" + " }\n" + "\n" + " return p1;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void swith_and_while() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char* _Owner name;\n" - "};\n" - "\n" - "struct X* _Owner F(int i)\n" - "{\n" - "\n" - " struct X* _Owner p1 = 0;\n" - " try\n" - " {\n" - " if (i == 1)\n" - " {\n" - " p1 = malloc(sizeof * p1); \n" - " while (0){} \n" - " }\n" - " else if (i == 3)\n" - " {\n" - " p1 = malloc(sizeof * p1);\n" - " }\n" - " }\n" - " catch\n" - " {\n" - " }\n" - "\n" - " return p1;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "struct X* _Owner F(int i)\n" + "{\n" + "\n" + " struct X* _Owner p1 = 0;\n" + " try\n" + " {\n" + " if (i == 1)\n" + " {\n" + " p1 = malloc(sizeof * p1); \n" + " while (0){} \n" + " }\n" + " else if (i == 3)\n" + " {\n" + " p1 = malloc(sizeof * p1);\n" + " }\n" + " }\n" + " catch\n" + " {\n" + " }\n" + "\n" + " return p1;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void owner_to_non_owner() { - const char* source - = - "void * f();\n" - "int main() {\n" - " void * _Owner p = f();\n" - "}"; + const char* source + = + "\n" + "void* f();\n" + "int main() {\n" + " void* _Owner p = f();\n" + " #pragma cake diagnostic check \"-Wmissing-owner-qualifier\"\n" + "}\n" + "\n" + "void dummy() {}\n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + ""; - assert(compile_with_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void owner_to_non_owner_zero() { - const char* source - = - "void * f();\n" - "int main() {\n" - " void * _Owner p = 0;\n" - "}"; - assert(compile_without_errors(true, false, source)); + + const char* source + = + "void * f();\n" + "int main() {\n" + " void * _Owner p = 0;\n" + "}"; + + assert(compile_without_errors(true, false, source)); } void incomplete_struct() { - const char* source - = - "void free(void * _Owner p);\n" - "struct X;\n" - "struct X f();\n" - "struct X { char * _Owner p; };\n" - "int main()\n" - "{\n" - " struct X x = 1 ? f() : f(); \n" - " free(x.p);\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free(void * _Owner p);\n" + "struct X;\n" + "struct X f();\n" + "struct X { char * _Owner p; };\n" + "int main()\n" + "{\n" + " struct X x = 1 ? f() : f(); \n" + " free(x.p);\n" + "}"; + assert(compile_without_errors(true, false, source)); } void switch_pop_problem() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "\n" - "void f(int i)\n" - "{\n" - " void * _Owner p1 = malloc(1);\n" - " switch(i)\n" - " {\n" - " case 1:\n" - " {\n" - " void * _Owner p2 = malloc(1);\n" - " free(p2);\n" - " }\n" - " break;\n" - "\n" - " case 2:\n" - " {\n" - " void * _Owner p3 = malloc(1);\n" - " free(p3);\n" - " }\n" - " break;\n" - " }\n" - "\n" - " free(p1);\n" - " \n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "\n" + "void f(int i)\n" + "{\n" + " void * _Owner p1 = malloc(1);\n" + " switch(i)\n" + " {\n" + " case 1:\n" + " {\n" + " void * _Owner p2 = malloc(1);\n" + " free(p2);\n" + " }\n" + " break;\n" + "\n" + " case 2:\n" + " {\n" + " void * _Owner p3 = malloc(1);\n" + " free(p3);\n" + " }\n" + " break;\n" + " }\n" + "\n" + " free(p1);\n" + " \n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void switch_pop2() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "\n" - "void f(int i)\n" - "{\n" - " void* _Owner p1 = malloc(1);\n" - " switch (i)\n" - " {\n" - " case 1:\n" - " void* _Owner p2 = malloc(1);\n" - " free(p2);\n" - " break;\n" - "\n" - " case 3:\n" - " void* _Owner p3 = malloc(1);\n" - " free(p3);\n" - " break;\n" - " }\n" - "\n" - " free(p1);\n" - "\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "\n" + "void f(int i)\n" + "{\n" + " void* _Owner p1 = malloc(1);\n" + " switch (i)\n" + " {\n" + " case 1:\n" + " void* _Owner p2 = malloc(1);\n" + " free(p2);\n" + " break;\n" + "\n" + " case 3:\n" + " void* _Owner p3 = malloc(1);\n" + " free(p3);\n" + " break;\n" + " }\n" + "\n" + " free(p1);\n" + "\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void scopes_pop() { - const char* source - = - "\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X { char* _Owner name; };\n" - "\n" - "void x_destroy(struct X* _Obj_owner p);\n" - "struct X f();\n" - "\n" - "void f()\n" - "{\n" - " {\n" - " struct X x = {0}; \n" - " \n" - " if (1)\n" - " { \n" - " x = f();\n" - " }\n" - " else\n" - " { \n" - " x = f();\n" - " }\n" - " x_destroy(&x);\n" - " }\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X { char* _Owner name; };\n" + "\n" + "void x_destroy(struct X* _Obj_owner p);\n" + "struct X f();\n" + "\n" + "void f()\n" + "{\n" + " {\n" + " struct X x = {0}; \n" + " \n" + " if (1)\n" + " { \n" + " x = f();\n" + " }\n" + " else\n" + " { \n" + " x = f();\n" + " }\n" + " x_destroy(&x);\n" + " }\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void owner_moved() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "struct X { char * _Owner text; };\n" - "\n" - "void x_destroy(struct X* _Obj_owner p)\n" - "{\n" - " free(p->text);\n" - "}\n" - "\n" - "void x_delete(struct X* _Owner p)\n" - "{\n" - " if (p)\n" - " {\n" - " x_destroy(p);\n" - " free(p);\n" - " }\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "struct X { char * _Owner text; };\n" + "\n" + "void x_destroy(struct X* _Obj_owner p)\n" + "{\n" + " free(p->text);\n" + "}\n" + "\n" + "void x_delete(struct X* _Owner p)\n" + "{\n" + " if (p)\n" + " {\n" + " x_destroy(p);\n" + " free(p);\n" + " }\n" + "}"; + assert(compile_without_errors(true, false, source)); } void partially_owner_moved() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "struct X { char * _Owner text; };\n" - "\n" - "void x_destroy(struct X* _Obj_owner p)\n" - "{\n" - " free(p->text);\n" - "}\n" - "\n" - "void x_delete(struct X* _Owner p)\n" - "{\n" - " if (p)\n" - " {\n" - " x_destroy(p);\n" - " }\n" - "}"; - assert(compile_with_errors(true, false, source)); + const char* source + = + "#pragma cake diagnostic error \"-Wmissing-destructor\"\n" + "\n" + "void free(void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "struct X { char* _Owner text; };\n" + "\n" + "void x_destroy(struct X* _Obj_owner p)\n" + "{\n" + " free(p->text);\n" + "}\n" + "\n" + "void x_delete(struct X* _Owner p)\n" + "{\n" + " if (p)\n" + " {\n" + " x_destroy(p);\n" + " }\n" + "}\n" + "\n" + "\n" + "\n" + ""; + + assert(compile_with_errors(true, false, source)); } void use_after_destroy() { - const char* source - = - "\n" - "char* _Owner strdup(const char* s);\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "void x_destroy(struct X * _Obj_owner p) {\n" - " free(p->name);\n" - "}\n" - "\n" - "void x_print(struct X * p) \n" - "{\n" - " //printf(\"%s\", p->name);\n" - "}\n" - "\n" - "int main() {\n" - " struct X x = {0};\n" - " x.name = strdup(\"a\");\n" - " x_destroy(&x);\n" - " x_print(&x);\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "\n" + "char* _Owner strdup(const char* s);\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "void x_destroy(struct X* _Obj_owner p) {\n" + " free(p->name);\n" + "}\n" + "\n" + "void x_print(struct X* p)\n" + "{\n" + " //printf(\"%s\", p->name);\n" + "}\n" + "\n" + "int main() {\n" + " struct X x = { 0 };\n" + " x.name = strdup(\"a\");\n" + " x_destroy(&x);\n" + " x_print(&x);\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void obj_owner_must_be_from_addressof() { - const char* source - = - "void free(void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "char * _Owner strdup(const char* );\n" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "struct Y {\n" - " struct X x;\n" - " struct X * px;\n" - "};\n" - "\n" - "void x_destroy(struct X * _Obj_owner p) \n" - "{\n" - " free(p->name);\n" - "}\n" - "\n" - "void f(struct Y * p)\n" - "{ \n" - " x_destroy(p->px);\n" - "}\n" - "\n" - "int main() {\n" - " struct Y y = {}; \n" - " struct * p = &y.x;\n" - " x_destroy(&y.x);\n" - "}\n" - "\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "void free(void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "char* _Owner strdup(const char*);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "struct Y {\n" + " struct X x;\n" + " struct X* px;\n" + "};\n" + "\n" + "void x_destroy(struct X* _Obj_owner p)\n" + "{\n" + " free(p->name);\n" + "}\n" + "\n" + "void f(struct Y* p)\n" + "{\n" + " x_destroy(p->px);\n" + "}\n" + "\n" + "int main() {\n" + " struct Y y = {};\n" + " struct* p = &y.x;\n" + " x_destroy(&y.x);\n" + "}\n" + "\n" + "\n" + "\n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmust-use-address-of\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void discarding_owner() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "int main()\n" - "{ \n" - " struct X * p = (struct X * _Owner) malloc(1);\n" - "}"; - assert(compile_with_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "int main()\n" + "{\n" + " struct X* p = (struct X* _Owner) malloc(1);\n" + "}\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmissing-owner-qualifier\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void using_uninitialized() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void x_delete(struct X * _Owner p);\n" - "\n" - "int main() { \n" - " struct X * _Owner p = malloc(sizeof(struct X)); \n" - " x_delete(p); /*uninitialized*/\n" - "}\n" - "\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char* _Owner text;\n" + "};\n" + "\n" + "void x_delete(struct X* _Owner p);\n" + "\n" + "int main() {\n" + " struct X* _Owner p = malloc(sizeof(struct X));\n" + " x_delete(p); /*uninitialized*/\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void using_uninitialized_struct() { - const char* source - = - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void x_destroy(struct X * _Obj_owner p);\n" - "\n" - "\n" - "int main() { \n" - " struct X x;\n" - " x_destroy(&x);\n" - "}\n" - "\n" - ""; - - assert(compile_with_errors(true, false, source)); + const char* source + = + "struct X {\n" + " char* _Owner text;\n" + "};\n" + "\n" + "void x_destroy(struct X* _Obj_owner p);\n" + "\n" + "\n" + "int main() {\n" + " struct X x;\n" + " x_destroy(&x);\n" + "}\n" + "\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + ""; + + + assert(compile_without_errors(true, false, source)); } void zero_initialized() { - const char* source - = - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "int main() { \n" - " struct X x = {0}; \n" - " static_state(x.text, \"null\");\n" - " static_state(x.p1, \"null\");\n" - " static_state(x.i, \"zero\");\n" - " static_state(x.pY, \"null\");\n" - " static_state(x.pY->p0, \"\");\n" - " static_state(x.pY->p2, \"\");\n" - " static_state(x.pY->i2, \"\");\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "int main() { \n" + " struct X x = {0}; \n" + " static_state(x.text, \"null\");\n" + " static_state(x.p1, \"null\");\n" + " static_state(x.i, \"zero\");\n" + " static_state(x.pY, \"null\");\n" + " static_state(x.pY->p0, \"\");\n" + " static_state(x.pY->p2, \"\");\n" + " static_state(x.pY->i2, \"\");\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void empty_initialized() { - const char* source - = - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "int main() { \n" - " struct X x = {}; \n" - " static_state(x.text, \"null\");\n" - " static_state(x.p1, \"null\");\n" - " static_state(x.i, \"zero\");\n" - " static_state(x.pY, \"null\");\n" - " static_state(x.pY->p0, \"\");\n" - " static_state(x.pY->p2, \"\");\n" - " static_state(x.pY->i2, \"\");\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "int main() { \n" + " struct X x = {}; \n" + " static_state(x.text, \"null\");\n" + " static_state(x.p1, \"null\");\n" + " static_state(x.i, \"zero\");\n" + " static_state(x.pY, \"null\");\n" + " static_state(x.pY->p0, \"\");\n" + " static_state(x.pY->p2, \"\");\n" + " static_state(x.pY->i2, \"\");\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void calloc_state() { - const char* source - = - "\n" - "void* _Owner calloc(unsigned long n , unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "int main() { \n" - " struct X * _Owner x = calloc(1,sizeof * x);\n" - " static_state(x, \"maybe-null\");\n" - "\n" - " static_state(x->p1, \"null\");\n" - " static_state(x->i, \"zero\");\n" - " static_state(x->pY, \"null\");\n" - " static_state(x->pY->p0, \"uninitialized\");\n" - " static_state(x->pY->p2, \"uninitialized\");\n" - " static_state(x->pY->i2, \"uninitialized\"); \n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner calloc(unsigned long n , unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "int main() { \n" + " struct X * _Owner x = calloc(1,sizeof * x);\n" + " static_state(x, \"maybe-null\");\n" + "\n" + " static_state(x->p1, \"null\");\n" + " static_state(x->i, \"zero\");\n" + " static_state(x->pY, \"null\");\n" + " static_state(x->pY->p0, \"uninitialized\");\n" + " static_state(x->pY->p2, \"uninitialized\");\n" + " static_state(x->pY->i2, \"uninitialized\"); \n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void malloc_initialization() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "int main() { \n" - " struct X * _Owner x = malloc(sizeof * x);\n" - " static_state(x, \"maybe-null\");\n" - "\n" - " static_state(x->p1, \"uninitialized\");\n" - " static_state(x->i, \"uninitialized\");\n" - " static_state(x->pY, \"uninitialized\");\n" - " static_state(x->pY->p0, \"\");\n" - " static_state(x->pY->p2, \"\");\n" - " static_state(x->pY->i2, \"\"); \n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "int main() { \n" + " struct X * _Owner x = malloc(sizeof * x);\n" + " static_state(x, \"maybe-null\");\n" + "\n" + " static_state(x->p1, \"uninitialized\");\n" + " static_state(x->i, \"uninitialized\");\n" + " static_state(x->pY, \"uninitialized\");\n" + " static_state(x->pY->p0, \"\");\n" + " static_state(x->pY->p2, \"\");\n" + " static_state(x->pY->i2, \"\"); \n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void valid_but_unkown_result() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "struct X f();\n" - "\n" - "int main() { \n" - " struct X x;\n" - " x = f();\n" - "\n" - " static_state(x.p1, \"maybe-null\");\n" - " static_state(x.i, \"any\");\n" - " static_state(x.pY, \"maybe-null\");\n" - " static_state(x.pY->p0, \"maybe-null\");\n" - " static_state(x.pY->p2, \"maybe-null\");\n" - " static_state(x.pY->i2, \"any\"); \n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "struct X f();\n" + "\n" + "int main() { \n" + " struct X x;\n" + " x = f();\n" + "\n" + " static_state(x.p1, \"maybe-null\");\n" + " static_state(x.i, \"any\");\n" + " static_state(x.pY, \"maybe-null\");\n" + " static_state(x.pY->p0, \"maybe-null\");\n" + " static_state(x.pY->p2, \"maybe-null\");\n" + " static_state(x.pY->i2, \"any\"); \n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void calling_non_const_func() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "void init(struct X * p);\n" - "\n" - "int main() { \n" - " struct X x;\n" - " /*lying here, to avoid error of using uninitialized*/\n" - " static_set(x,\"zero\");\n" - " init(&x);\n" - "\n" - " static_state(x.p1, \"maybe-null\");\n" - " static_state(x.i, \"any\");\n" - " static_state(x.pY, \"maybe-null\");\n" - " static_state(x.pY->p0, \"maybe-null\");\n" - " static_state(x.pY->p2, \"maybe-null\");\n" - " static_state(x.pY->i2, \"any\"); \n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "void init(struct X * p);\n" + "\n" + "int main() { \n" + " struct X x;\n" + " /*lying here, to avoid error of using uninitialized*/\n" + " static_set(x,\"zero\");\n" + " init(&x);\n" + "\n" + " static_state(x.p1, \"maybe-null\");\n" + " static_state(x.i, \"any\");\n" + " static_state(x.pY, \"maybe-null\");\n" + " static_state(x.pY->p0, \"maybe-null\");\n" + " static_state(x.pY->p2, \"maybe-null\");\n" + " static_state(x.pY->i2, \"any\"); \n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void calling_const_func() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char* _Owner p0;\n" - " int* _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char* _Owner text;\n" - " int* _Owner p1;\n" - " int i;\n" - " struct Y* pY;\n" - "};\n" - "\n" - "void f(const struct X* p);\n" - "\n" - "int main()\n" - "{\n" - " struct X x = {0};\n" - " f(&x);\n" - "\n" - " static_state(x.p1, \"null\");\n" - " static_state(x.i, \"zero\");\n" - " static_state(x.pY, \"null\");\n" - " static_state(x.pY->p0, \"\");\n" - " static_state(x.pY->p2, \"\");\n" - " static_state(x.pY->i2, \"\");\n" - "\n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char* _Owner p0;\n" + " int* _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char* _Owner text;\n" + " int* _Owner p1;\n" + " int i;\n" + " struct Y* pY;\n" + "};\n" + "\n" + "void f(const struct X* p);\n" + "\n" + "int main()\n" + "{\n" + " struct X x = {0};\n" + " f(&x);\n" + "\n" + " static_state(x.p1, \"null\");\n" + " static_state(x.i, \"zero\");\n" + " static_state(x.pY, \"null\");\n" + " static_state(x.pY->p0, \"\");\n" + " static_state(x.pY->p2, \"\");\n" + " static_state(x.pY->i2, \"\");\n" + "\n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void pointer_to_owner() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void f(struct X * _Owner p1, struct X * _Owner* p2){\n" - " *p2 = p1;\n" - "}\n" - "\n" - "int main() { \n" - " struct X * _Owner p1 = malloc(sizeof * p1);\n" - " p1->text = 0;\n" - " struct X * _Owner p2 = 0;\n" - " f(p1, &p2);\n" - " \n" - " free(p2->text);\n" - " free(p2);\n" - "}\n" - "\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + "};\n" + "\n" + "void f(struct X * _Owner p1, struct X * _Owner* p2){\n" + " *p2 = p1;\n" + "}\n" + "\n" + "int main() { \n" + " struct X * _Owner p1 = malloc(sizeof * p1);\n" + " p1->text = 0;\n" + " struct X * _Owner p2 = 0;\n" + " f(p1, &p2);\n" + " \n" + " free(p2->text);\n" + " free(p2);\n" + "}\n" + "\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void socket_sample() { - const char* source - = - "_Owner int socket();\n" - "void close(_Owner int fd);\n" - "\n" - "int main()\n" - "{\n" - " _Owner int fd;\n" - " \n" - " fd = socket();\n" - " if (fd < 0)\n" - " {\n" - " static_set(fd, \"null\"); \n" - " return 1;\n" - " }\n" - " close(fd);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "_Owner int socket();\n" + "void close(_Owner int fd);\n" + "\n" + "int main()\n" + "{\n" + " _Owner int fd;\n" + " \n" + " fd = socket();\n" + " if (fd < 0)\n" + " {\n" + " static_set(fd, \"null\"); \n" + " return 1;\n" + " }\n" + " close(fd);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void return_object() { - const char* source - = - "char * _Owner strdup(const char* s);\n" - "void free(void * _Owner p);\n" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "struct X make()\n" - "{\n" - " struct X x = {0};\n" - " x.name = strdup(\"text\"); \n" - " return x;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "char * _Owner strdup(const char* s);\n" + "void free(void * _Owner p);\n" + "\n" + "struct X {\n" + " char *_Owner name;\n" + "};\n" + "\n" + "struct X make()\n" + "{\n" + " struct X x = {0};\n" + " x.name = strdup(\"text\"); \n" + " return x;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void return_bad_object() { - const char* source - = - "char * _Owner strdup(const char* s);\n" - "void free(void * _Owner p);\n" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "struct X make()\n" - "{\n" - " struct X x = {0};\n" - " x.name = strdup(\"text\"); \n" - " free(x.name)\n" - " return x;\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "char * _Owner strdup(const char* s);\n" + "void free(void * _Owner p);\n" + "\n" + "struct X {\n" + " char *_Owner name;\n" + "};\n" + "\n" + "struct X make()\n" + "{\n" + " struct X x = {0};\n" + " x.name = strdup(\"text\"); \n" + " free(x.name)\n" + " return x;\n" + "}\n" + ""; + assert(compile_with_errors(true, false, source)); } void null_to_owner() { - const char* source - = - "\n" - "void f(int * _Owner p);\n" - "int main()\n" - "{\n" - " int * _Owner p = 0;\n" - " p = ((void *) 0); \n" - " f(0);\n" - " f((void *) 0);\n" - " f(nullptr);\n" - "}\n"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void f(int * _Owner p);\n" + "int main()\n" + "{\n" + " int * _Owner p = 0;\n" + " p = ((void *) 0); \n" + " f(0);\n" + " f((void *) 0);\n" + " f(nullptr);\n" + "}\n"; + assert(compile_without_errors(true, false, source)); } void return_true_branch() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "void f5()\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (p) {\n" - " free(p);\n" - " return;\n" - " }\n" - " \n" - " static_state(p, \"null\"); \n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "void f5()\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (p) {\n" + " free(p);\n" + " return;\n" + " }\n" + " \n" + " static_state(p, \"null\"); \n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void flow_tests() { - const char* source - = - "\n" - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "void f1()\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " if (p) {\n" - " static_state(p, \"not-null\");\n" - " }\n" - "\n" - " static_state(p, \"maybe-null\");\n" - " free(p);\n" - "}\n" - "\n" - "void f2(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " if (condition) {\n" - " static_state(p, \"maybe-null\");\n" - " }\n" - "\n" - " static_state(p, \"maybe-null\");\n" - " static_set(p, \"null\");\n" - "}\n" - "\n" - "void f3(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (condition) {\n" - " free(p);\n" - " }\n" - " else {\n" - " free(p);\n" - " }\n" - "\n" - " static_state(p, \"uninitialized\"); \n" - "}\n" - "\n" - "void f3(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (condition) {\n" - " \n" - " }\n" - " else {\n" - " free(p);\n" - " }\n" - "\n" - " static_state(p, \"uninitialized or maybe_null\"); \n" - " static_set(p, \"null\");\n" - "}\n" - "\n" - "\n" - "void f4(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (condition) {\n" - " free(p);\n" - " }\n" - " else {\n" - " \n" - " }\n" - "\n" - " static_state(p, \"uninitialized or maybe_null\"); \n" - " static_set(p, \"null\");\n" - "}\n" - "\n" - "void f5(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (p) {\n" - " free(p);\n" - " return;\n" - " }\n" - " \n" - " static_state(p, \"null\"); \n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "void f1()\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " if (p) {\n" + " static_state(p, \"not-null\");\n" + " }\n" + "\n" + " static_state(p, \"maybe-null\");\n" + " free(p);\n" + "}\n" + "\n" + "void f2(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " if (condition) {\n" + " static_state(p, \"maybe-null\");\n" + " }\n" + "\n" + " static_state(p, \"maybe-null\");\n" + " static_set(p, \"null\");\n" + "}\n" + "\n" + "void f3(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (condition) {\n" + " free(p);\n" + " }\n" + " else {\n" + " free(p);\n" + " }\n" + "\n" + " static_state(p, \"uninitialized\"); \n" + "}\n" + "\n" + "void f3(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (condition) {\n" + " \n" + " }\n" + " else {\n" + " free(p);\n" + " }\n" + "\n" + " static_state(p, \"uninitialized or maybe_null\"); \n" + " static_set(p, \"null\");\n" + "}\n" + "\n" + "\n" + "void f4(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (condition) {\n" + " free(p);\n" + " }\n" + " else {\n" + " \n" + " }\n" + "\n" + " static_state(p, \"uninitialized or maybe_null\"); \n" + " static_set(p, \"null\");\n" + "}\n" + "\n" + "void f5(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (p) {\n" + " free(p);\n" + " return;\n" + " }\n" + " \n" + " static_state(p, \"null\"); \n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void member() { - const char* source - = - "struct X {\n" - " union {\n" - " struct {\n" - " int *pSelect;\n" - " } view;\n" - " }u;\n" - "};\n" - "\n" - "int main()\n" - "{\n" - " struct X t;\n" - " t.u.view.pSelect = 0;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct X {\n" + " union {\n" + " struct {\n" + " int *pSelect;\n" + " } view;\n" + " }u;\n" + "};\n" + "\n" + "int main()\n" + "{\n" + " struct X t;\n" + " t.u.view.pSelect = 0;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void loop_leak() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "int main() {\n" - " void * _Owner p = 0;\n" - " for (int i=0; i < 2; i++) {\n" - " p = malloc(1);\n" - " }\n" - " free(p);\n" - "}"; - assert(compile_with_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "int main() {\n" + " void * _Owner p = 0;\n" + " for (int i=0; i < 2; i++) {\n" + " p = malloc(1);\n" + " }\n" + " free(p);\n" + "}"; + assert(compile_with_errors(true, false, source)); } void out_parameter() { - const char* source - = - "void free(void* _Owner p);\n" - "char* _Owner strdup(const char* s);\n" - "\n" - "struct X {\n" - " char* _Owner s;\n" - "};\n" - "void init(_Out struct X * px)\n" - "{\n" - " static_state(px, \"maybe-null\");\n" - " static_state(px->s, \"uninitialized\");\n" - " px->s = strdup(\"a\");\n" - "}\n" - "\n" - "int main() {\n" - " struct X x;\n" - " init(&x);\n" - " free(x.s);\n" - "}"; - - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free(void* _Owner p);\n" + "char* _Owner strdup(const char* s);\n" + "\n" + "struct X {\n" + " char* _Owner s;\n" + "};\n" + "void init(_Out struct X * px)\n" + "{\n" + " static_state(px, \"maybe-null\");\n" + " static_state(px->s, \"uninitialized\");\n" + " px->s = strdup(\"a\");\n" + "}\n" + "\n" + "int main() {\n" + " struct X x;\n" + " init(&x);\n" + " free(x.s);\n" + "}"; + + assert(compile_without_errors(true, false, source)); } void lvalue_required_1() { - const char* source - = - "int main()\n" - "{\n" - " 1++;\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "int main()\n" + "{\n" + " 1++;\n" + "}\n" + ""; + assert(compile_with_errors(true, false, source)); } void lvalue_required_2() { - const char* source - = - "int main()\n" - "{\n" - " 1--;\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "int main()\n" + "{\n" + " 1--;\n" + "}\n" + ""; + assert(compile_with_errors(true, false, source)); } void lvalue_required_3() { - const char* source - = - "int main()\n" - "{\n" - " int * p = &1;\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "int main()\n" + "{\n" + " int * p = &1;\n" + "}\n" + ""; + assert(compile_with_errors(true, false, source)); } void lvalue_required_4() { - const char* source - = - "struct X { int i; };\n" - "struct X f() {\n" - " struct X x = {};\n" - " return x;\n" - "}\n" - "int main() {\n" - " f().i = 1;\n" - "}\n" - "\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "struct X { int i; };\n" + "struct X f() {\n" + " struct X x = {};\n" + " return x;\n" + "}\n" + "int main() {\n" + " f().i = 1;\n" + "}\n" + "\n" + ""; + assert(compile_with_errors(true, false, source)); } void null_check_1() { - const char* source - = - "void f(int *p)\n" - "{\n" - " static_state(p, \"not-null\");\n" - "}\n" - ""; - assert(compile_without_errors(true, true, source)); + const char* source + = + "void f(int *p)\n" + "{\n" + " static_state(p, \"not-null\");\n" + "}\n" + ""; + assert(compile_without_errors(true, true, source)); } void null_check_2() { - const char* source - = - "void f(int *p)\n" - "{\n" - " static_state(p, \"maybe-null\");\n" - "}\n" - ""; - assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "void f(int *p)\n" + "{\n" + " static_state(p, \"maybe-null\");\n" + "}\n" + ""; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } void compound_literal_object() { - const char* source - = - "struct X { int i; void* p; }\n" - "int main() {\n" - " struct X x;\n" - " x = (struct X){ 0 };\n" - " static_state(x.i, \"zero\");\n" - " static_state(x.p, \"null\");\n" - "}"; - assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "struct X { int i; void* p; }\n" + "int main() {\n" + " struct X x;\n" + " x = (struct X){ 0 };\n" + " static_state(x.i, \"zero\");\n" + " static_state(x.p, \"null\");\n" + "}"; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } void bounds_check1() { - const char* source - = - "int main() {\n" - " int a[5];\n" - " int i = a[5];\n" - "}"; - assert(compile_with_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "int main() {\n" + " int a[5] = {0};\n" + " int i = a[5];\n" + "}\n" + "#pragma cake diagnostic check \"-Wout-of-bounds\""; + + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } void bounds_check2() { - const char* source - = - "void f1(int array[5])\n" - "{\n" - " int i = array[5];\n" - "}\n" - ""; - - assert(compile_with_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "void f1(int array[5])\n" + "{\n" + " int i = array[5];\n" + "}\n" + "#pragma cake diagnostic check \"-Wout-of-bounds\"\n"; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } void uninitialized_objects_passed_to_variadic_function() { - const char* source - = - "void f(char* s, ...);\n" - "int main() {\n" - " int i;\n" - " f(\"\", i);\n" - " return 0;\n" - "}"; - assert(compile_with_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "void f(char* s, ...);\n" + "int main() {\n" + " int i;\n" + " f(\"\", i);\n" + "//first pass analyze\n" + "#pragma cake diagnostic check \"-uninitialized\"\n" + " return 0;\n" + "}\n" + "void dummy()\n" + "{\n" + "} \n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void nullderef() { - const char* source - = - "\n" - "int main() {\n" - " int* ptr = 0;\n" - " int k = *ptr;\n" - " k = 0;\n" - " return 0;\n" - "}"; + const char* source + = + "\n" + "int main() {\n" + " int* ptr = 0;\n" + " int k = *ptr;\n" + " k = 0;\n" + " return 0;\n" + "}\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wanalyzer-null-dereference\"\n" + ""; - assert(compile_with_errors(true, false /*nullcheck disabled*/, source)); + + + assert(compile_without_errors(true, false, source)); } void for_loop_visit() { - const char* source - = - "int main()\n" - "{\n" - " int j;\n" - " for (j = 0; j <10; j++) {}\n" - " return j;\n" - "}"; - assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); + /* checks state of j #84 */ + const char* source + = + "int main()\n" + "{\n" + " int j;\n" + " for (j = 0; j <10; j++) {}\n" + " return j;\n" + "}"; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); +} + +void uninitialized_object() +{ + const char* source + = + "int main() {\n" + " int i;\n" + " int k;\n" + " k = 1 + i;\n" + "}"; + + struct options options = { .input = LANGUAGE_C99, .flow_analysis = true, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1); +} + +void calloc_builtin_semantics() { + const char* source + = + "struct X { int i; void* p; };\n" + "void* _Owner calloc(int i, int sz);\n" + "int main() \n" + "{\n" + " struct X* _Owner p = calloc(1, 1);\n" + " static_state(p, \"maybe-null\");\n" + " static_state(p->i, \"zero\");\n" //if p is not null then.. + " static_state(p->p, \"null\");\n" //if p is not null then.. + "}\n" + ""; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); +} +void malloc_builtin_semantics() { +const char* source += +"struct X { int i; void* p; };\n" +"void* _Owner malloc(int sz);\n" +"int main() \n" +"{\n" +" struct X* _Owner p = malloc(1);\n" +" static_state(p, \"maybe-null\");\n" +" static_state(p->i, \"uninitialized\");\n" +" static_state(p->p, \"uninitialized\");\n" +"}\n" +"\n" +"\n" +"void dummy() {}\n" +"#pragma cake diagnostic check \"-Wmissing-destructor\""; +assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); +} +void discard_qualifier_test() +{ + const char* source + = + "struct X { int i; void* p; };\n" + "void f(struct X* p) {}\n" + "\n" + "int main()\n" + "{\n" + " const struct X x = {0};\n" + " f(&x);\n" + "}\n" + "#pragma cake diagnostic check \"-Wdiscarded-qualifiers\""; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } #endif +/* End of: tests.c */ diff --git a/src/object.c b/src/object.c index a487eff7..9f77f440 100644 --- a/src/object.c +++ b/src/object.c @@ -1,1713 +1,1716 @@ #include "ownership.h" #include "object.h" -#include #include "parser.h" #include #include #include #include +#include void object_swap(struct object* a, struct object* b) { - struct object temp = *a; - *a = *b; - *b = temp; + struct object temp = *a; + *a = *b; + *b = temp; } void object_delete(struct object* owner p) { - if (p) - { - object_destroy(p); - free(p); - } + if (p) + { + object_destroy(p); + free(p); + } } void object_destroy(struct object* obj_owner p) { - object_delete(p->pointed); - objects_destroy(&p->members); - object_state_stack_destroy(&p->object_state_stack); + object_delete(p->pointed); + objects_destroy(&p->members); + object_state_stack_destroy(&p->object_state_stack); } void object_state_stack_destroy(struct object_state_stack* obj_owner p) { - free(p->data); + free(p->data); } -int object_state_stack_reserve(struct object_state_stack* p, int n) unchecked +int object_state_stack_reserve(struct object_state_stack* p, int n) /*unchecked*/ { - if (n > p->capacity) - { - if ((size_t)n > (SIZE_MAX / (sizeof(p->data[0])))) - { - return EOVERFLOW; - } - - void* owner pnew = realloc(p->data, n * sizeof(p->data[0])); - if (pnew == NULL) return ENOMEM; - - p->data = pnew; - p->capacity = n; - } - return 0; + if (n > p->capacity) + { + if ((size_t) n > (SIZE_MAX / (sizeof(p->data[0])))) + { + return EOVERFLOW; + } + + void* owner pnew = realloc(p->data, n * sizeof(p->data[0])); + if (pnew == NULL) return ENOMEM; + + p->data = pnew; + p->capacity = n; + } + return 0; } int object_state_stack_push_back(struct object_state_stack* p, enum object_state e) { - if (p->size == INT_MAX) - { - return EOVERFLOW; - } - - if (p->size + 1 > p->capacity) - { - int new_capacity = 0; - if (p->capacity > (INT_MAX - p->capacity / 2)) - { - /*overflow*/ - new_capacity = INT_MAX; - } - else - { - new_capacity = p->capacity + p->capacity / 2; - if (new_capacity < p->size + 1) - { - new_capacity = p->size + 1; - } - } - - int error = object_state_stack_reserve(p, new_capacity); - if (error != 0) - { - return error; - } - } - - p->data[p->size] = e; - p->size++; - - return 0; + if (p->size == INT_MAX) + { + return EOVERFLOW; + } + + if (p->size + 1 > p->capacity) + { + int new_capacity = 0; + if (p->capacity > (INT_MAX - p->capacity / 2)) + { + /*overflow*/ + new_capacity = INT_MAX; + } + else + { + new_capacity = p->capacity + p->capacity / 2; + if (new_capacity < p->size + 1) + { + new_capacity = p->size + 1; + } + } + + int error = object_state_stack_reserve(p, new_capacity); + if (error != 0) + { + return error; + } + } + + p->data[p->size] = e; + p->size++; + + return 0; } -void objects_destroy(struct objects* obj_owner p) unchecked +void objects_destroy(struct objects* obj_owner p) /*unchecked*/ { - for (int i = 0; i < p->size; i++) - { - object_destroy(&p->data[i]); - } - free(p->data); + for (int i = 0; i < p->size; i++) + { + object_destroy(&p->data[i]); + } + free(p->data); } -int objects_reserve(struct objects* p, int n) unchecked +int objects_reserve(struct objects* p, int n) { - if (n > p->capacity) - { - if ((size_t)n > (SIZE_MAX / (sizeof(p->data[0])))) - { - return EOVERFLOW; - } - - void* owner pnew = realloc(p->data, n * sizeof(p->data[0])); - if (pnew == NULL) return ENOMEM; - - p->data = pnew; - p->capacity = n; - } - return 0; + if (n > p->capacity) + { + if ((size_t) n > (SIZE_MAX / (sizeof(p->data[0])))) + { + return EOVERFLOW; + } + + void* owner pnew = realloc(p->data, n * sizeof(p->data[0])); + if (pnew == NULL) return ENOMEM; + + static_set(p->data, "moved"); //p->data was moved to pnew + + p->data = pnew; + p->capacity = n; + } + return 0; } int objects_push_back(struct objects* p, struct object* obj_owner p_object) { - if (p->size == INT_MAX) - { - object_destroy(p_object); - return EOVERFLOW; - } - - if (p->size + 1 > p->capacity) - { - int new_capacity = 0; - if (p->capacity > (INT_MAX - p->capacity / 2)) - { - /*overflow*/ - new_capacity = INT_MAX; - } - else - { - new_capacity = p->capacity + p->capacity / 2; - if (new_capacity < p->size + 1) - { - new_capacity = p->size + 1; - } - } - - int error = objects_reserve(p, new_capacity); - if (error != 0) - { - object_destroy(p_object); - return error; - } - } - - p->data[p->size] = *p_object; /*COPIED*/ - - - p->size++; - - return 0; + if (p->size == INT_MAX) + { + object_destroy(p_object); + return EOVERFLOW; + } + + if (p->size + 1 > p->capacity) + { + int new_capacity = 0; + if (p->capacity > (INT_MAX - p->capacity / 2)) + { + /*overflow*/ + new_capacity = INT_MAX; + } + else + { + new_capacity = p->capacity + p->capacity / 2; + if (new_capacity < p->size + 1) + { + new_capacity = p->size + 1; + } + } + + int error = objects_reserve(p, new_capacity); + if (error != 0) + { + object_destroy(p_object); + return error; + } + } + + p->data[p->size] = *p_object; /*COPIED*/ + + + p->size++; + + return 0; } struct object_name_list { - const char* name; - struct object_name_list* previous; + const char* name; + struct object_name_list* previous; }; bool has_name(const char* name, struct object_name_list* list) { - struct object_name_list* p = list; - - while (p) - { - if (strcmp(p->name, name) == 0) - { - return true; - } - p = p->previous; - } - return false; + struct object_name_list* p = list; + + while (p) + { + if (strcmp(p->name, name) == 0) + { + return true; + } + p = p->previous; + } + return false; } struct object make_object_core(struct type* p_type, struct object_name_list* list, int deep, const struct declarator* declarator) { - struct object obj = { 0 }; - obj.declarator = declarator; - - if (p_type->struct_or_union_specifier) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - if (p_struct_or_union_specifier) - { - obj.state = OBJECT_STATE_NOT_APPLICABLE; - - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - - struct object_name_list l = { 0 }; - l.name = p_struct_or_union_specifier->tag_name; - l.previous = list; - //int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - char* tag = NULL; - if (p_member_declarator->declarator->type.struct_or_union_specifier) - { - tag = p_member_declarator->declarator->type.struct_or_union_specifier->tag_name; - } - else if (p_member_declarator->declarator->type.next && - p_member_declarator->declarator->type.next->struct_or_union_specifier) - { - tag = p_member_declarator->declarator->type.next->struct_or_union_specifier->tag_name; - - } - - if (tag && has_name(tag, &l)) - { - struct object member_obj = { 0 }; - member_obj.declarator = declarator; - member_obj.state = OBJECT_STATE_NOT_APPLICABLE; - objects_push_back(&obj.members, &member_obj); - } - else - { - struct object member_obj = make_object_core(&p_member_declarator->declarator->type, &l, deep, declarator); - objects_push_back(&obj.members, &member_obj); - } - - //member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - else - { - if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) - { - //struct object obj = {0}; - //obj.state = OBJECT_STATE_STRUCT; - //objects_push_back(&obj.members, &obj); - - - struct type t = { 0 }; - t.category = TYPE_CATEGORY_ITSELF; - t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; - t.type_specifier_flags = TYPE_SPECIFIER_STRUCT_OR_UNION; - struct object member_obj = make_object_core(&t, &l, deep, declarator); - objects_push_back(&obj.members, &member_obj); - type_destroy(&t); - } - } - p_member_declaration = p_member_declaration->next; - } - } - } - - - else if (type_is_array(p_type)) - { - //p_object->state = flags; - //if (p_object->members_size > 0) - //{ - // //not sure if we instanticate all items of array - // p_object->members[0].state = flags; - //} - } - else if (type_is_pointer(p_type)) - { - obj.state = OBJECT_STATE_NOT_APPLICABLE; - - if (deep < 1) - { - struct type t2 = type_remove_pointer(p_type); - if (type_is_struct_or_union(&t2)) - { - struct object* owner p_object = calloc(1, sizeof(struct object)); - *p_object = make_object_core(&t2, list, deep + 1, declarator); - obj.pointed = p_object; - } - - type_destroy(&t2); - //(*p_deep)++; - } - } - else - { - //assert(p_object->members_size == 0); - //p_object->state = flags; - obj.state = OBJECT_STATE_NOT_APPLICABLE; - } - - return obj; + struct object obj = {0}; + obj.declarator = declarator; + + if (p_type->struct_or_union_specifier) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + if (p_struct_or_union_specifier) + { + obj.state = OBJECT_STATE_NOT_APPLICABLE; + + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + + struct object_name_list l = {0}; + l.name = p_struct_or_union_specifier->tag_name; + l.previous = list; + //int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + char* tag = NULL; + if (p_member_declarator->declarator->type.struct_or_union_specifier) + { + tag = p_member_declarator->declarator->type.struct_or_union_specifier->tag_name; + } + else if (p_member_declarator->declarator->type.next && + p_member_declarator->declarator->type.next->struct_or_union_specifier) + { + tag = p_member_declarator->declarator->type.next->struct_or_union_specifier->tag_name; + + } + + if (tag && has_name(tag, &l)) + { + struct object member_obj = {0}; + member_obj.declarator = declarator; + member_obj.state = OBJECT_STATE_NOT_APPLICABLE; + objects_push_back(&obj.members, &member_obj); + } + else + { + struct object member_obj = make_object_core(&p_member_declarator->declarator->type, &l, deep, declarator); + objects_push_back(&obj.members, &member_obj); + } + + //member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + //struct object obj = {0}; + //obj.state = OBJECT_STATE_STRUCT; + //objects_push_back(&obj.members, &obj); + + + struct type t = {0}; + t.category = TYPE_CATEGORY_ITSELF; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = TYPE_SPECIFIER_STRUCT_OR_UNION; + struct object member_obj = make_object_core(&t, &l, deep, declarator); + objects_push_back(&obj.members, &member_obj); + type_destroy(&t); + } + } + p_member_declaration = p_member_declaration->next; + } + } + } + + + else if (type_is_array(p_type)) + { + //p_object->state = flags; + //if (p_object->members_size > 0) + //{ + // //not sure if we instanticate all items of array + // p_object->members[0].state = flags; + //} + } + else if (type_is_pointer(p_type)) + { + obj.state = OBJECT_STATE_NOT_APPLICABLE; + + if (deep < 1) + { + struct type t2 = type_remove_pointer(p_type); + if (type_is_struct_or_union(&t2)) + { + struct object* owner p_object = calloc(1, sizeof(struct object)); + *p_object = make_object_core(&t2, list, deep + 1, declarator); + obj.pointed = p_object; + } + + type_destroy(&t2); + //(*p_deep)++; + } + } + else + { + //assert(p_object->members_size == 0); + //p_object->state = flags; + obj.state = OBJECT_STATE_NOT_APPLICABLE; + } + + return obj; } struct object make_object(struct type* p_type, const struct declarator* declarator) { - assert(declarator); - struct object_name_list list = { .name = "" }; - return make_object_core(p_type, &list, 0, declarator); + assert(declarator); + struct object_name_list list = {.name = ""}; + return make_object_core(p_type, &list, 0, declarator); } void object_push_copy_current_state(struct object* object) { - object_state_stack_push_back(&object->object_state_stack, object->state); + object_state_stack_push_back(&object->object_state_stack, object->state); - if (object->pointed) - { - object_push_copy_current_state(object->pointed); - } + if (object->pointed) + { + object_push_copy_current_state(object->pointed); + } - for (int i = 0; i < object->members.size; i++) - { - object_push_copy_current_state(&object->members.data[i]); - } + for (int i = 0; i < object->members.size; i++) + { + object_push_copy_current_state(&object->members.data[i]); + } } void object_pop_states(struct object* object, int n) { - if (object->object_state_stack.size < n) - { - //assert(false); - return; - } + if (object->object_state_stack.size < n) + { + //assert(false); + return; + } - object->object_state_stack.size = - object->object_state_stack.size - n; + object->object_state_stack.size = + object->object_state_stack.size - n; - if (object->pointed) - { - object_pop_states(object->pointed, n); - } + if (object->pointed) + { + object_pop_states(object->pointed, n); + } - for (int i = 0; i < object->members.size; i++) - { - object_pop_states(&object->members.data[i], n); - } + for (int i = 0; i < object->members.size; i++) + { + object_pop_states(&object->members.data[i], n); + } } void object_restore_state(struct object* object, int state_to_restore) { - assert(state_to_restore > 0); - - //0 zero is top of stack - //1 is the before top - int index = object->object_state_stack.size - state_to_restore; - if (index >= 0 && index < object->object_state_stack.size) - { - } - else - { - //assert(false); - return; - } - - enum object_state sstate = object->object_state_stack.data[index]; - object->state = sstate; - - if (object->pointed) - { - object_restore_state(object->pointed, state_to_restore); - } - - for (int i = 0; i < object->members.size; i++) - { - object_restore_state(&object->members.data[i], state_to_restore); - } + assert(state_to_restore > 0); + + //0 zero is top of stack + //1 is the before top + int index = object->object_state_stack.size - state_to_restore; + if (index >= 0 && index < object->object_state_stack.size) + { + } + else + { + //assert(false); + return; + } + + enum object_state sstate = object->object_state_stack.data[index]; + object->state = sstate; + + if (object->pointed) + { + object_restore_state(object->pointed, state_to_restore); + } + + for (int i = 0; i < object->members.size; i++) + { + object_restore_state(&object->members.data[i], state_to_restore); + } } void print_object_core(int ident, struct type* p_type, struct object* p_object, const char* previous_names, bool is_pointer, bool short_version) { - if (p_object == NULL) - { - return; - } - - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - if (p_struct_or_union_specifier) - { - if (p_object == NULL) - { - printf("%*c", ident, ' '); - printf("%s %s\n", previous_names, "-"); - return; - } - //obj.state = OBJECT_STATE_STRUCT; - - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - - int member_index = 0; - while (p_member_declaration) - { - - - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : ""; - - char buffer[200] = { 0 }; - if (is_pointer) - snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); - else - snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); - - - print_object_core(ident + 1, &p_member_declarator->declarator->type, - &p_object->members.data[member_index], buffer, - type_is_pointer(&p_member_declarator->declarator->type), short_version); - - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - else - { - //char buffer[200] = {0}; - //if (is_pointer) - // snprintf(buffer, sizeof buffer, "%s", previous_names, ""); - //else - // snprintf(buffer, sizeof buffer, "%s", previous_names, ""); - - struct type t = { 0 }; - t.category = TYPE_CATEGORY_ITSELF; - t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; - t.type_specifier_flags = TYPE_SPECIFIER_STRUCT_OR_UNION; - - print_object_core(ident + 1, &t, &p_object->members.data[member_index], previous_names, false, short_version); - - member_index++; - type_destroy(&t); - } - p_member_declaration = p_member_declaration->next; - } - - } - } - else if (type_is_array(p_type)) - { - //p_object->state = flags; - //if (p_object->members_size > 0) - //{ - // //not sure if we instanticate all items of array - // p_object->members[0].state = flags; - //} - } - else if (type_is_pointer(p_type)) - { - struct type t2 = type_remove_pointer(p_type); - printf("%*c", ident, ' '); - if (p_object) - { - if (short_version) - { - printf("%s == ", previous_names); - object_state_to_string(p_object->state); - } - else - { - printf("%p:%s == ", p_object, previous_names); - printf("{"); - for (int i = 0; i < p_object->object_state_stack.size; i++) - { - object_state_to_string(p_object->object_state_stack.data[i]); - printf(","); - } - printf("*"); - object_state_to_string(p_object->state); - printf("}"); - } - printf("\n"); - - - if (p_object->pointed) - { - char buffer[200] = { 0 }; - if (type_is_struct_or_union(&t2)) - { - snprintf(buffer, sizeof buffer, "%s", previous_names); - } - else - { - snprintf(buffer, sizeof buffer, "*%s", previous_names); - } - - - - print_object_core(ident + 1, &t2, p_object->pointed, buffer, is_pointer, short_version); - } - else - { - //printf("%s %s\n"); - } - } - type_destroy(&t2); - } - else - { - printf("%*c", ident, ' '); - if (p_object) - { - if (short_version) - { - printf("%s == ", previous_names); - object_state_to_string(p_object->state); - } - else - { - printf("%p:%s == ", p_object, previous_names); - printf("{"); - for (int i = 0; i < p_object->object_state_stack.size; i++) - { - object_state_to_string(p_object->object_state_stack.data[i]); - printf(","); - } - object_state_to_string(p_object->state); - printf("}"); - } - - - printf("\n"); - } - } + if (p_object == NULL) + { + return; + } + + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + if (p_struct_or_union_specifier) + { + if (p_object == NULL) + { + printf("%*c", ident, ' '); + printf("%s %s\n", previous_names, "-"); + return; + } + //obj.state = OBJECT_STATE_STRUCT; + + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + + int member_index = 0; + while (p_member_declaration) + { + + + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : ""; + + char buffer[200] = {0}; + if (is_pointer) + snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); + else + snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); + + + print_object_core(ident + 1, &p_member_declarator->declarator->type, + &p_object->members.data[member_index], buffer, + type_is_pointer(&p_member_declarator->declarator->type), short_version); + + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + //char buffer[200] = {0}; + //if (is_pointer) + // snprintf(buffer, sizeof buffer, "%s", previous_names, ""); + //else + // snprintf(buffer, sizeof buffer, "%s", previous_names, ""); + + struct type t = {0}; + t.category = TYPE_CATEGORY_ITSELF; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = TYPE_SPECIFIER_STRUCT_OR_UNION; + + print_object_core(ident + 1, &t, &p_object->members.data[member_index], previous_names, false, short_version); + + member_index++; + type_destroy(&t); + } + p_member_declaration = p_member_declaration->next; + } + + } + } + else if (type_is_array(p_type)) + { + //p_object->state = flags; + //if (p_object->members_size > 0) + //{ + // //not sure if we instanticate all items of array + // p_object->members[0].state = flags; + //} + } + else if (type_is_pointer(p_type)) + { + struct type t2 = type_remove_pointer(p_type); + printf("%*c", ident, ' '); + if (p_object) + { + if (short_version) + { + printf("%s == ", previous_names); + object_state_to_string(p_object->state); + } + else + { + printf("%p:%s == ", p_object, previous_names); + printf("{"); + for (int i = 0; i < p_object->object_state_stack.size; i++) + { + object_state_to_string(p_object->object_state_stack.data[i]); + printf(","); + } + printf("*"); + object_state_to_string(p_object->state); + printf("}"); + } + printf("\n"); + + + if (p_object->pointed) + { + char buffer[200] = {0}; + if (type_is_struct_or_union(&t2)) + { + snprintf(buffer, sizeof buffer, "%s", previous_names); + } + else + { + snprintf(buffer, sizeof buffer, "*%s", previous_names); + } + + + + print_object_core(ident + 1, &t2, p_object->pointed, buffer, is_pointer, short_version); + } + else + { + //printf("%s %s\n"); + } + } + type_destroy(&t2); + } + else + { + printf("%*c", ident, ' '); + if (p_object) + { + if (short_version) + { + printf("%s == ", previous_names); + object_state_to_string(p_object->state); + } + else + { + printf("%p:%s == ", p_object, previous_names); + printf("{"); + for (int i = 0; i < p_object->object_state_stack.size; i++) + { + object_state_to_string(p_object->object_state_stack.data[i]); + printf(","); + } + object_state_to_string(p_object->state); + printf("}"); + } + + + printf("\n"); + } + } } enum object_state state_merge(enum object_state before, enum object_state after) { - enum object_state e = before | after; + enum object_state e = before | after; - return e; + return e; } void object_get_name(const struct type* p_type, - const struct object* p_object, - char* outname, - int out_size); + const struct object* p_object, + char* outname, + int out_size); void print_object(struct type* p_type, struct object* p_object, bool short_version) { - if (p_object == NULL) - { - printf("null object"); - return; - } - char name[100] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); + if (p_object == NULL) + { + printf("null object"); + return; + } + char name[100] = {0}; + object_get_name(p_type, p_object, name, sizeof name); - print_object_core(0, p_type, p_object, name, type_is_pointer(p_type), short_version); + print_object_core(0, p_type, p_object, name, type_is_pointer(p_type), short_version); } void set_object( - struct type* p_type, - struct object* p_object, - enum object_state flags); + struct type* p_type, + struct object* p_object, + enum object_state flags); void set_object_state( - struct parser_ctx* ctx, - struct type* p_type, - struct object* p_object, - const struct type* p_source_type, - const struct object* p_object_source, - const struct token* error_position) + struct parser_ctx* ctx, + struct type* p_type, + struct object* p_object, + const struct type* p_source_type, + const struct object* p_object_source, + const struct token* error_position) { - if (p_object_source == NULL) - { - return; - } - if (p_object == NULL || p_type == NULL) - { - return; - } - - - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - if (p_struct_or_union_specifier) - { - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - - int member_index = 0; - while (p_member_declaration) - { - - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - if (member_index < p_object->members.size) - { - set_object_state(ctx, - &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - &p_object_source->members.data[member_index].declarator->type, - &p_object_source->members.data[member_index], - error_position); - } - else - { - //TODO BUG union? - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - assert(p_object->members.size == 0); - p_object->state = p_object_source->state; - } - } - else if (type_is_array(p_type)) - { - p_object->state = p_object_source->state; - if (p_object->members.size > 0) - { - //not sure if we instantiate all items of array - p_object->members.data[0].state = p_object_source->members.data[0].state; - } - } - else if (type_is_pointer(p_type)) - { - if (p_object_source) - { - if (p_object_source->state == OBJECT_STATE_UNINITIALIZED) - { - char buffer[100] = { 0 }; - object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "source object '%s' is uninitialized", buffer); - } - else if (p_object_source->state & OBJECT_STATE_UNINITIALIZED) - { - char buffer[100] = { 0 }; - object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); - - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "source object '%s' may be uninitialized", buffer); - } - - if (type_is_any_owner(p_type) && - type_is_any_owner(p_source_type)) - { - if (p_object_source->state == OBJECT_STATE_MOVED) - { - char buffer[100] = { 0 }; - object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); - - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "source object '%s' have been moved", buffer); - } - else if (p_object_source->state & OBJECT_STATE_MOVED) - { - char buffer[100] = { 0 }; - object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); - - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "source object '%s' may have been moved", buffer); - } - } - - } - - - if (type_is_any_owner(p_type)) - { - p_object->state = p_object_source->state; - } - else - { - //MOVED state is not applicable to non owner objects - p_object->state = p_object_source->state & ~OBJECT_STATE_MOVED; - } - - - if (p_object->pointed) - { - struct type t2 = type_remove_pointer(p_type); - if (p_object_source->pointed) - { - set_object_state(ctx, &t2, p_object->pointed, p_source_type, p_object_source->pointed, error_position); - } - else - { - set_object(&t2, p_object->pointed, OBJECT_STATE_NULL | OBJECT_STATE_NOT_NULL); - } - type_destroy(&t2); - } - } - else - { - - - //assert(p_object->members.size == 0); //enum? - p_object->state = p_object_source->state; - } + if (p_object_source == NULL) + { + return; + } + if (p_object == NULL || p_type == NULL) + { + return; + } + + + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + if (p_struct_or_union_specifier) + { + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + + int member_index = 0; + while (p_member_declaration) + { + + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index < p_object->members.size) + { + set_object_state(ctx, + &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + &p_object_source->members.data[member_index].declarator->type, + &p_object_source->members.data[member_index], + error_position); + } + else + { + //TODO BUG union? + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + assert(p_object->members.size == 0); + p_object->state = p_object_source->state; + } + } + else if (type_is_array(p_type)) + { + p_object->state = p_object_source->state; + if (p_object->members.size > 0) + { + //not sure if we instantiate all items of array + p_object->members.data[0].state = p_object_source->members.data[0].state; + } + } + else if (type_is_pointer(p_type)) + { + if (p_object_source) + { + if (p_object_source->state == OBJECT_STATE_UNINITIALIZED) + { + char buffer[100] = {0}; + object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + error_position, + "source object '%s' is uninitialized", buffer); + } + else if (p_object_source->state & OBJECT_STATE_UNINITIALIZED) + { + char buffer[100] = {0}; + object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); + + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + error_position, + "source object '%s' may be uninitialized", buffer); + } + + if (type_is_any_owner(p_type) && + type_is_any_owner(p_source_type)) + { + if (p_object_source->state == OBJECT_STATE_MOVED) + { + char buffer[100] = {0}; + object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); + + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + error_position, + "source object '%s' have been moved", buffer); + } + else if (p_object_source->state & OBJECT_STATE_MOVED) + { + char buffer[100] = {0}; + object_get_name(p_source_type, p_object_source, buffer, sizeof buffer); + + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + error_position, + "source object '%s' may have been moved", buffer); + } + } + + } + + + if (type_is_any_owner(p_type)) + { + p_object->state = p_object_source->state; + } + else + { + //MOVED state is not applicable to non owner objects + p_object->state = p_object_source->state & ~OBJECT_STATE_MOVED; + } + + + if (p_object->pointed) + { + struct type t2 = type_remove_pointer(p_type); + if (p_object_source->pointed) + { + set_object_state(ctx, &t2, p_object->pointed, p_source_type, p_object_source->pointed, error_position); + } + else + { + set_object(&t2, p_object->pointed, OBJECT_STATE_NULL | OBJECT_STATE_NOT_NULL); + } + type_destroy(&t2); + } + } + else + { + + + //assert(p_object->members.size == 0); //enum? + p_object->state = p_object_source->state; + } } void set_direct_state( - struct type* p_type, - struct object* p_object, - enum object_state flags) + struct type* p_type, + struct object* p_object, + enum object_state flags) { - if (p_object == NULL || p_type == NULL) - { - return; - } - - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - if (p_struct_or_union_specifier) - { - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - - int member_index = 0; - while (p_member_declaration) - { - - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - if (member_index < p_object->members.size) - { - set_direct_state(&p_member_declarator->declarator->type, &p_object->members.data[member_index], flags); - } - else - { - //TODO BUG union? - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - assert(p_object->members.size == 0); - p_object->state = flags; - } - } - - if (type_is_pointer(p_type)) - { - if (flags == OBJECT_STATE_ZERO) - { - /*zero for pointers is null*/ - p_object->state = OBJECT_STATE_NULL; - } - else - { - p_object->state = flags; - } - } - else - { - p_object->state = flags; - } + if (p_object == NULL || p_type == NULL) + { + return; + } + + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + if (p_struct_or_union_specifier) + { + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + + int member_index = 0; + while (p_member_declaration) + { + + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index < p_object->members.size) + { + set_direct_state(&p_member_declarator->declarator->type, &p_object->members.data[member_index], flags); + } + else + { + //TODO BUG union? + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + assert(p_object->members.size == 0); + p_object->state = flags; + } + } + + if (type_is_pointer(p_type)) + { + if (flags == OBJECT_STATE_ZERO) + { + /*zero for pointers is null*/ + p_object->state = OBJECT_STATE_NULL; + } + else + { + p_object->state = flags; + } + } + else + { + p_object->state = flags; + } } void set_object( - struct type* p_type, - struct object* p_object, - enum object_state flags) + struct type* p_type, + struct object* p_object, + enum object_state flags) { - if (p_object == NULL || p_type == NULL) - { - return; - } - - - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - if (p_struct_or_union_specifier) - { - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - - int member_index = 0; - while (p_member_declaration) - { - - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - if (member_index < p_object->members.size) - { - set_object(&p_member_declarator->declarator->type, &p_object->members.data[member_index], flags); - } - else - { - //TODO BUG union? - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - assert(p_object->members.size == 0); - p_object->state = flags; - } - } - else if (type_is_array(p_type)) - { - p_object->state = flags; - if (p_object->members.size > 0) - { - //not sure if we instantiate all items of array - p_object->members.data[0].state = flags; - } - } - else if (type_is_pointer(p_type)) - { - p_object->state = flags; - - if (p_object->pointed) - { - struct type t2 = type_remove_pointer(p_type); - if (type_is_out(&t2)) - { - flags = OBJECT_STATE_UNINITIALIZED; - } - set_object(&t2, p_object->pointed, flags); - type_destroy(&t2); - } - } - else - { - //assert(p_object->members.size == 0); //enum? - p_object->state = flags; - } + if (p_object == NULL || p_type == NULL) + { + return; + } + + + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + if (p_struct_or_union_specifier) + { + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + + int member_index = 0; + while (p_member_declaration) + { + + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index < p_object->members.size) + { + set_object(&p_member_declarator->declarator->type, &p_object->members.data[member_index], flags); + } + else + { + //TODO BUG union? + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + assert(p_object->members.size == 0); + p_object->state = flags; + } + } + else if (type_is_array(p_type)) + { + p_object->state = flags; + if (p_object->members.size > 0) + { + //not sure if we instantiate all items of array + p_object->members.data[0].state = flags; + } + } + else if (type_is_pointer(p_type)) + { + p_object->state = flags; + + if (p_object->pointed) + { + struct type t2 = type_remove_pointer(p_type); + if (type_is_out(&t2)) + { + flags = OBJECT_STATE_UNINITIALIZED; + } + set_object(&t2, p_object->pointed, flags); + type_destroy(&t2); + } + } + else + { + //assert(p_object->members.size == 0); //enum? + p_object->state = flags; + } } void object_set_unknown(struct type* p_type, struct object* p_object) { - if (p_object == NULL || p_type == NULL) - { - return; - } - - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - if (p_struct_or_union_specifier) - { - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - - while (p_member_declarator) - { - if (p_member_declarator->declarator) - { - if (member_index < p_object->members.size) - { - object_set_unknown(&p_member_declarator->declarator->type, &p_object->members.data[member_index]); - } - else - { - //TODO BUG union? - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - return; - } - } - - if (type_is_pointer(p_type)) - { - p_object->state = OBJECT_STATE_NULL | OBJECT_STATE_NOT_NULL; - - if (p_object->pointed) - { - struct type t2 = type_remove_pointer(p_type); - object_set_unknown(&t2, p_object->pointed); - type_destroy(&t2); - } - } - else - { - p_object->state = OBJECT_STATE_ZERO | OBJECT_STATE_NOT_ZERO; - } + if (p_object == NULL || p_type == NULL) + { + return; + } + + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + if (p_struct_or_union_specifier) + { + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index < p_object->members.size) + { + object_set_unknown(&p_member_declarator->declarator->type, &p_object->members.data[member_index]); + } + else + { + //TODO BUG union? + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + } + + if (type_is_pointer(p_type)) + { + p_object->state = OBJECT_STATE_NULL | OBJECT_STATE_NOT_NULL; + + if (p_object->pointed) + { + struct type t2 = type_remove_pointer(p_type); + object_set_unknown(&t2, p_object->pointed); + type_destroy(&t2); + } + } + else + { + p_object->state = OBJECT_STATE_ZERO | OBJECT_STATE_NOT_ZERO; + } } //returns true if all parts that need to be moved weren't moved. bool object_check(struct type* p_type, struct object* p_object) { - if (p_object == NULL) - { - return false; - } - if (p_type->type_qualifier_flags & TYPE_QUALIFIER_VIEW) - { - return false; - } - - if (!type_is_any_owner(p_type)) - { - return false; - } - - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - int possible_need_destroy_count = 0; - int need_destroy_count = 0; - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - - if (p_member_declarator->declarator) - { - if (type_is_owner(&p_member_declarator->declarator->type)) - { - possible_need_destroy_count++; - } - - if (object_check(&p_member_declarator->declarator->type, - &p_object->members.data[member_index])) - { - need_destroy_count++; - } - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - - return need_destroy_count > 1 && (need_destroy_count == possible_need_destroy_count); - } - else - { - bool should_had_been_moved = false; - if (type_is_pointer(p_type)) - { - should_had_been_moved = (p_object->state & OBJECT_STATE_NOT_NULL); - } - else - { - if (p_object->state == OBJECT_STATE_UNINITIALIZED || - p_object->state == OBJECT_STATE_MOVED || - p_object->state == OBJECT_STATE_NOT_NULL || - p_object->state == (OBJECT_STATE_UNINITIALIZED | OBJECT_STATE_MOVED)) - { - } - else - { - should_had_been_moved = true; - } - } - - return should_had_been_moved; - } - - return false; + if (p_object == NULL) + { + return false; + } + if (p_type->type_qualifier_flags & TYPE_QUALIFIER_VIEW) + { + return false; + } + + if (!type_is_any_owner(p_type)) + { + return false; + } + + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + int possible_need_destroy_count = 0; + int need_destroy_count = 0; + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + + if (p_member_declarator->declarator) + { + if (type_is_owner(&p_member_declarator->declarator->type)) + { + possible_need_destroy_count++; + } + + if (object_check(&p_member_declarator->declarator->type, + &p_object->members.data[member_index])) + { + need_destroy_count++; + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + + return need_destroy_count > 1 && (need_destroy_count == possible_need_destroy_count); + } + else + { + bool should_had_been_moved = false; + if (type_is_pointer(p_type)) + { + should_had_been_moved = (p_object->state & OBJECT_STATE_NOT_NULL); + } + else + { + if (p_object->state == OBJECT_STATE_UNINITIALIZED || + p_object->state == OBJECT_STATE_MOVED || + p_object->state == OBJECT_STATE_NOT_NULL || + p_object->state == (OBJECT_STATE_UNINITIALIZED | OBJECT_STATE_MOVED)) + { + } + else + { + should_had_been_moved = true; + } + } + + return should_had_been_moved; + } + + return false; } void object_get_name_core( - const struct type* p_type, - const struct object* p_object, - const struct object* p_object_target, - const char* previous_names, - char* outname, - int out_size) + const struct type* p_type, + const struct object* p_object, + const struct object* p_object_target, + const char* previous_names, + char* outname, + int out_size) { - if (p_object == NULL) - { - return; - } - - if (p_object == p_object_target) - { - snprintf(outname, out_size, "%s", previous_names); - return; - } - - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - - if (p_member_declarator->declarator) - { - const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : ""; - char buffer[200] = { 0 }; - if (type_is_pointer(p_type)) - snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); - else - snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); - - object_get_name_core( - &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - p_object_target, - buffer, - outname, - out_size); - - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - - } - else - { - if (type_is_pointer(p_type)) - { - char buffer[100] = { 0 }; - snprintf(buffer, sizeof buffer, "%s", previous_names); - - struct type t2 = type_remove_pointer(p_type); - if (type_is_owner(&t2)) - { - object_get_name_core( - &t2, - p_object->pointed, - p_object_target, - buffer, - outname, - out_size); - } - type_destroy(&t2); - } - } + if (p_object == NULL) + { + return; + } + + if (p_object == p_object_target) + { + snprintf(outname, out_size, "%s", previous_names); + return; + } + + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + + if (p_member_declarator->declarator) + { + const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : ""; + char buffer[200] = {0}; + if (type_is_pointer(p_type)) + snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); + else + snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); + + object_get_name_core( + &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + p_object_target, + buffer, + outname, + out_size); + + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + + } + else + { + if (type_is_pointer(p_type)) + { + char buffer[100] = {0}; + snprintf(buffer, sizeof buffer, "%s", previous_names); + + struct type t2 = type_remove_pointer(p_type); + if (type_is_owner(&t2)) + { + object_get_name_core( + &t2, + p_object->pointed, + p_object_target, + buffer, + outname, + out_size); + } + type_destroy(&t2); + } + } } void object_get_name(const struct type* p_type, - const struct object* p_object, - char* outname, - int out_size) + const struct object* p_object, + char* outname, + int out_size) { - if (p_object->declarator == NULL) - { - outname[0] = '?'; - outname[1] = '\0'; - return; - } + if (p_object->declarator == NULL) + { + outname[0] = '?'; + outname[1] = '\0'; + return; + } - const char* root_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; - const struct object* root = &p_object->declarator->object; + const char* root_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; + const struct object* root = &p_object->declarator->object; - object_get_name_core(&p_object->declarator->type, root, p_object, root_name, outname, out_size); + object_get_name_core(&p_object->declarator->type, root, p_object, root_name, outname, out_size); } void checked_moved(struct parser_ctx* ctx, - struct type* p_type, - struct object* p_object, - const struct token* position_token) + struct type* p_type, + struct object* p_object, + const struct token* position_token) { - if (p_object == NULL) - { - return; - } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - - /* - * Some parts of the object needs to be moved.. - * we need to print error one by one - */ - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - - if (p_member_declarator->declarator) - { - checked_moved(ctx, &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - position_token); - - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - if (type_is_pointer(p_type) && !type_is_any_owner(p_type)) - { - struct type t2 = type_remove_pointer(p_type); - checked_moved(ctx, - &t2, - p_object->pointed, - position_token); - type_destroy(&t2); - } - - if (p_object->state & OBJECT_STATE_MOVED) - { - struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; - - char name[200] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "parameter '%s' is leaving scoped with a moved object '%s'", - parameter_name, - name); - - compiler_set_info_with_token(W_NONE, ctx, name_pos, "parameter", name); - } - - if (p_object->state & OBJECT_STATE_UNINITIALIZED) - { - struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; - - char name[200] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "parameter '%s' is leaving scoped with a uninitialized object '%s'", - parameter_name, - name); - - compiler_set_info_with_token(W_NONE, ctx, name_pos, "parameter", name); - } - } + if (p_object == NULL) + { + return; + } + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + + /* + * Some parts of the object needs to be moved.. + * we need to print error one by one + */ + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + + if (p_member_declarator->declarator) + { + checked_moved(ctx, &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + position_token); + + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + if (type_is_pointer(p_type) && !type_is_any_owner(p_type)) + { + struct type t2 = type_remove_pointer(p_type); + checked_moved(ctx, + &t2, + p_object->pointed, + position_token); + type_destroy(&t2); + } + + if (p_object->state & OBJECT_STATE_MOVED) + { + struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; + + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + if (compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "parameter '%s' is leaving scoped with a moved object '%s'", + parameter_name, + name)) + { + compiler_diagnostic_message(W_LOCATION, ctx, name_pos, "parameter", name); + } + } + + if (p_object->state & OBJECT_STATE_UNINITIALIZED) + { + struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; + + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "parameter '%s' is leaving scoped with a uninitialized object '%s'", + parameter_name, + name); + + compiler_diagnostic_message(W_LOCATION, ctx, name_pos, "parameter", name); + } + } } void checked_read_object(struct parser_ctx* ctx, - struct type* p_type, - struct object* p_object, - const struct token* position_token, - bool check_pointed_object) + struct type* p_type, + struct object* p_object, + const struct token* position_token, + bool check_pointed_object) { - if (p_object == NULL) - { - return; - } - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier ? - p_struct_or_union_specifier->member_declaration_list.head : - NULL; - - /* - * Some parts of the object needs to be moved.. - * we need to print error one by one - */ - int member_index = 0; - while (p_member_declaration) - { - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - - if (p_member_declarator->declarator) - { - checked_read_object(ctx, &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - position_token, - check_pointed_object); - - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - else - { - if (type_is_pointer(p_type) && - check_pointed_object && - p_object->state & OBJECT_STATE_NOT_NULL /*we don't need to check pointed object*/ - ) - { - struct type t2 = type_remove_pointer(p_type); - checked_read_object(ctx, - &t2, - p_object->pointed, - position_token, - true); - type_destroy(&t2); - } - - if (p_object->state & OBJECT_STATE_MOVED) - { - //struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - //const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; - - char name[200] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "object '%s' was moved", - name); - } - - if (p_object->state & OBJECT_STATE_UNINITIALIZED) - { - char name[200] = { 0 }; - object_get_name(p_type, p_object, name, sizeof name); - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "uninitialized object '%s'", - name); - } - } + if (p_object == NULL) + { + return; + } + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier ? + p_struct_or_union_specifier->member_declaration_list.head : + NULL; + + /* + * Some parts of the object needs to be moved.. + * we need to print error one by one + */ + int member_index = 0; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + + if (p_member_declarator->declarator) + { + checked_read_object(ctx, &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + position_token, + check_pointed_object); + + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + if (type_is_pointer(p_type) && + check_pointed_object && + p_object->state & OBJECT_STATE_NOT_NULL /*we don't need to check pointed object*/ + ) + { + struct type t2 = type_remove_pointer(p_type); + checked_read_object(ctx, + &t2, + p_object->pointed, + position_token, + true); + type_destroy(&t2); + } + + if (p_object->state & OBJECT_STATE_MOVED) + { + //struct token* name_pos = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + //const char* parameter_name = p_object->declarator->name ? p_object->declarator->name->lexeme : "?"; + + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "object '%s' was moved", + name); + } + + if (p_object->state & OBJECT_STATE_UNINITIALIZED) + { + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + compiler_diagnostic_message(W_ANALYZER_UNINITIALIZED, + ctx, + position_token, + "uninitialized object '%s'", + name); + } + } } void visit_object(struct parser_ctx* ctx, - struct type* p_type, - struct object* p_object, - const struct token* position_token, - const char* previous_names, - bool is_assigment) + struct type* p_type, + struct object* p_object, + const struct token* position_token, + const char* previous_names, + bool is_assigment) { - if (p_object == NULL) - { - return; - } - if (p_type->type_qualifier_flags & TYPE_QUALIFIER_VIEW) - { - return; - } - - if (!type_is_any_owner(p_type)) - { - if (p_type->storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) - { - //for view parameters we need to check if they left something moved.. - checked_moved(ctx, - p_type, - p_object, - position_token); - - } - return; - } - - - if (p_type->struct_or_union_specifier && p_object->members.size > 0) - { - struct struct_or_union_specifier* p_struct_or_union_specifier = - get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); - - struct member_declaration* p_member_declaration = - p_struct_or_union_specifier->member_declaration_list.head; - - if (object_check(p_type, p_object)) - { - /* - * All parts of the object needs to be moved, so instead of - * describing each part we will just say that the object should - * have been moved. - */ - const struct token* const name = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - name, - "object '%s' was not moved/destroyed", - previous_names); - - if (p_object->declarator) - compiler_set_info_with_token(W_NONE, ctx, position_token, "end of '%s' scope", previous_names); - } - else - { - /* - * Some parts of the object needs to be moved.. - * we need to print error one by one - */ - - int member_index = 0; - while (p_member_declaration) - { - - if (p_member_declaration->member_declarator_list_opt) - { - struct member_declarator* p_member_declarator = - p_member_declaration->member_declarator_list_opt->head; - while (p_member_declarator) - { - - if (p_member_declarator->declarator) - { - const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : "?"; - - char buffer[200] = { 0 }; - if (type_is_pointer(p_type)) - snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); - else - snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); - - visit_object(ctx, &p_member_declarator->declarator->type, - &p_object->members.data[member_index], - position_token, - buffer, - is_assigment); - - member_index++; - } - p_member_declarator = p_member_declarator->next; - } - } - p_member_declaration = p_member_declaration->next; - } - } - - - } - else - { - const char* name = previous_names; - const struct token* const position = - p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; - - if (name[0] == '\0') - { - /*function arguments without name*/ - name = "?"; - } - bool should_had_been_moved = false; - - - /* - Despite the name OBJECT_STATE_NOT_NULL does not means null, it means - the reference is not referring an object, the value could be -1 for instance. - */ - if (type_is_pointer(p_type)) - { - should_had_been_moved = (p_object->state & OBJECT_STATE_NOT_NULL); - } - else - { - if (p_object->state == OBJECT_STATE_UNINITIALIZED || - p_object->state == OBJECT_STATE_MOVED || - p_object->state == OBJECT_STATE_NULL) - { - } - else - { - should_had_been_moved = true; - } - } - - - if (type_is_pointer(p_type)) - { - if (should_had_been_moved) - { - char buffer[100] = { 0 }; - snprintf(buffer, sizeof buffer, "%s", previous_names); - - struct type t2 = type_remove_pointer(p_type); - if (type_is_owner(&t2)) - { - visit_object(ctx, - &t2, - p_object->pointed, - position_token, - buffer, - is_assigment); - } - type_destroy(&t2); - } - - } - - - if (should_had_been_moved) - { - if (type_is_obj_owner(p_type)) - { - - } - else - { - if (type_is_pointer(p_type)) - { - struct type t2 = type_remove_pointer(p_type); - bool pointed_is_out = type_is_out(&t2); - type_destroy(&t2); - - if (!pointed_is_out) - { - if (is_assigment) - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "memory pointed by '%s' was not released before assignment.", - name); - } - else - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position, - "memory pointed by '%s' was not released.", - name); - if (p_object->declarator) - { - compiler_set_info_with_token(W_NONE, ctx, position_token, "end of '%s' scope", name); - } - } - } - } - else - { - if (is_assigment) - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position_token, - "previous members of '%s' were not moved before this assignment.", - name); - } - else - { - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - position, - "object '%s' was not moved.", - name); - if (p_object->declarator) - { - compiler_set_info_with_token(W_NONE, ctx, position_token, "end of '%s' scope", name); - } - } - } - } - } - } + if (p_object == NULL) + { + return; + } + if (p_type->type_qualifier_flags & TYPE_QUALIFIER_VIEW) + { + return; + } + + if (!type_is_any_owner(p_type)) + { + if (p_type->storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) + { + //for view parameters we need to check if they left something moved.. + checked_moved(ctx, + p_type, + p_object, + position_token); + + } + return; + } + + + if (p_type->struct_or_union_specifier && p_object->members.size > 0) + { + struct struct_or_union_specifier* p_struct_or_union_specifier = + get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + + struct member_declaration* p_member_declaration = + p_struct_or_union_specifier->member_declaration_list.head; + + if (object_check(p_type, p_object)) + { + /* + * All parts of the object needs to be moved, so instead of + * describing each part we will just say that the object should + * have been moved. + */ + const struct token* const name = p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + name, + "object '%s' was not moved/destroyed", + previous_names); + + if (p_object->declarator) + compiler_diagnostic_message(W_LOCATION, ctx, position_token, "end of '%s' scope", previous_names); + } + else + { + /* + * Some parts of the object needs to be moved.. + * we need to print error one by one + */ + + int member_index = 0; + while (p_member_declaration) + { + + if (p_member_declaration->member_declarator_list_opt) + { + struct member_declarator* p_member_declarator = + p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + + if (p_member_declarator->declarator) + { + const char* name = p_member_declarator->declarator->name ? p_member_declarator->declarator->name->lexeme : "?"; + + char buffer[200] = {0}; + if (type_is_pointer(p_type)) + snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); + else + snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); + + visit_object(ctx, &p_member_declarator->declarator->type, + &p_object->members.data[member_index], + position_token, + buffer, + is_assigment); + + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + p_member_declaration = p_member_declaration->next; + } + } + + + } + else + { + const char* name = previous_names; + const struct token* const position = + p_object->declarator->name ? p_object->declarator->name : p_object->declarator->first_token; + + if (name[0] == '\0') + { + /*function arguments without name*/ + name = "?"; + } + bool should_had_been_moved = false; + + + /* + Despite the name OBJECT_STATE_NOT_NULL does not means null, it means + the reference is not referring an object, the value could be -1 for instance. + */ + if (type_is_pointer(p_type)) + { + should_had_been_moved = (p_object->state & OBJECT_STATE_NOT_NULL); + } + else + { + if (p_object->state == OBJECT_STATE_UNINITIALIZED || + p_object->state == OBJECT_STATE_MOVED || + p_object->state == OBJECT_STATE_NULL) + { + } + else + { + should_had_been_moved = true; + } + } + + + if (type_is_pointer(p_type)) + { + if (should_had_been_moved) + { + char buffer[100] = {0}; + snprintf(buffer, sizeof buffer, "%s", previous_names); + + struct type t2 = type_remove_pointer(p_type); + if (type_is_owner(&t2)) + { + visit_object(ctx, + &t2, + p_object->pointed, + position_token, + buffer, + is_assigment); + } + type_destroy(&t2); + } + + } + + + if (should_had_been_moved) + { + if (type_is_obj_owner(p_type)) + { + + } + else + { + if (type_is_pointer(p_type)) + { + struct type t2 = type_remove_pointer(p_type); + bool pointed_is_out = type_is_out(&t2); + type_destroy(&t2); + + if (!pointed_is_out) + { + if (is_assigment) + { + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "memory pointed by '%s' was not released before assignment.", + name); + } + else + { + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position, + "memory pointed by '%s' was not released.", + name); + if (p_object->declarator) + { + compiler_diagnostic_message(W_LOCATION, ctx, position_token, "end of '%s' scope", name); + } + } + } + } + else + { + if (is_assigment) + { + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position_token, + "previous members of '%s' were not moved before this assignment.", + name); + } + else + { + compiler_diagnostic_message(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + ctx, + position, + "object '%s' was not moved.", + name); + if (p_object->declarator) + { + compiler_diagnostic_message(W_LOCATION, ctx, position_token, "end of '%s' scope", name); + } + } + } + } + } + } } void object_assignment(struct parser_ctx* ctx, - struct object* p_source_obj_opt, - struct type* p_source_obj_type, + struct object* p_source_obj_opt, + struct type* p_source_obj_type, - struct object* p_dest_obj_opt, - struct type* p_dest_obj_type, + struct object* p_dest_obj_opt, + struct type* p_dest_obj_type, - const struct token* error_position, - bool bool_source_zero_value, - enum object_state source_state_after) + const struct token* error_position, + bool bool_source_zero_value, + enum object_state source_state_after) { - if (p_dest_obj_opt) - { - if (type_is_owner(p_dest_obj_type) && !type_is_out(p_dest_obj_type)) - { - char buffer[100] = { 0 }; - object_get_name(p_dest_obj_type, p_dest_obj_opt, buffer, sizeof buffer); - visit_object(ctx, - p_dest_obj_type, - p_dest_obj_opt, - error_position, - buffer, - true); - } - } - - - if (p_dest_obj_opt) - { - if (bool_source_zero_value) - { - set_object(p_dest_obj_type, p_dest_obj_opt, OBJECT_STATE_NULL); - } - else - { - if (p_source_obj_opt) - { - set_object_state(ctx, p_dest_obj_type, p_dest_obj_opt, p_source_obj_type, p_source_obj_opt, error_position); - } - else - { - object_set_unknown(p_dest_obj_type, p_dest_obj_opt); - } - } - - } - - - if (type_is_any_owner(p_source_obj_type) && - !type_is_owner(p_dest_obj_type) && - p_source_obj_type->storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) - { - /* - int main() - { - struct X * p = (struct X * owner) malloc(1); - } - */ - - compiler_set_error_with_token(C_OWNERSHIP_FLOW_MISSING_DTOR, - ctx, - error_position, - "Object must be owner qualified."); - } - - if (type_is_any_owner(p_dest_obj_type) && type_is_any_owner(p_source_obj_type) && type_is_pointer(p_source_obj_type)) - { - if (type_is_void_ptr(p_dest_obj_type)) - { - if (p_source_obj_opt) - { - struct type t2 = type_remove_pointer(p_source_obj_type); - const char* name = p_source_obj_opt->declarator->name ? - p_source_obj_opt->declarator->name->lexeme : - "?"; - - visit_object(ctx, - &t2, - p_source_obj_opt->pointed, - error_position, - name, - true); - p_source_obj_opt->state = source_state_after; - type_destroy(&t2); - } - } - else if (type_is_obj_owner(p_dest_obj_type)) - { - if (type_is_owner(p_source_obj_type)) - { - if (p_source_obj_opt->pointed) - { - struct type t = type_remove_pointer(p_source_obj_type); - set_object(&t, p_source_obj_opt->pointed, source_state_after); - type_destroy(&t); - } - } - else if (type_is_obj_owner(p_source_obj_type)) - { - if (p_source_obj_opt->pointed) - { - struct type t = type_remove_pointer(p_source_obj_type); - set_object(&t, p_source_obj_opt->pointed, source_state_after); - type_destroy(&t); - } - } - } - else - { - - if (p_source_obj_opt) - { - set_object(p_source_obj_type, p_source_obj_opt, source_state_after); - } - } - } - else if (type_is_any_owner(p_dest_obj_type) && type_is_any_owner(p_source_obj_type)) - { - /*everthing is moved*/ - if (p_source_obj_opt) - set_object(p_source_obj_type, p_source_obj_opt, source_state_after); - } - else - { - /*nothing changes*/ - } + if (p_dest_obj_opt) + { + if (type_is_owner(p_dest_obj_type) && !type_is_out(p_dest_obj_type)) + { + char buffer[100] = {0}; + object_get_name(p_dest_obj_type, p_dest_obj_opt, buffer, sizeof buffer); + visit_object(ctx, + p_dest_obj_type, + p_dest_obj_opt, + error_position, + buffer, + true); + } + } + + + if (p_dest_obj_opt) + { + if (bool_source_zero_value) + { + set_object(p_dest_obj_type, p_dest_obj_opt, OBJECT_STATE_NULL); + } + else + { + if (p_source_obj_opt) + { + set_object_state(ctx, p_dest_obj_type, p_dest_obj_opt, p_source_obj_type, p_source_obj_opt, error_position); + } + else + { + object_set_unknown(p_dest_obj_type, p_dest_obj_opt); + } + } + + } + + + if (type_is_any_owner(p_source_obj_type) && + !type_is_owner(p_dest_obj_type) && + p_source_obj_type->storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) + { + /* + int main() + { + struct X * p = (struct X * owner) malloc(1); + } + */ + + compiler_diagnostic_message(W_OWNERSHIP_MISSING_OWNER_QUALIFIER, + ctx, + error_position, + "Object must be owner qualified."); + } + + if (type_is_any_owner(p_dest_obj_type) && type_is_any_owner(p_source_obj_type) && type_is_pointer(p_source_obj_type)) + { + if (type_is_void_ptr(p_dest_obj_type)) + { + if (p_source_obj_opt) + { + struct type t2 = type_remove_pointer(p_source_obj_type); + const char* name = p_source_obj_opt->declarator->name ? + p_source_obj_opt->declarator->name->lexeme : + "?"; + + visit_object(ctx, + &t2, + p_source_obj_opt->pointed, + error_position, + name, + true); + p_source_obj_opt->state = source_state_after; + type_destroy(&t2); + } + } + else if (type_is_obj_owner(p_dest_obj_type)) + { + if (type_is_owner(p_source_obj_type)) + { + if (p_source_obj_opt->pointed) + { + struct type t = type_remove_pointer(p_source_obj_type); + set_object(&t, p_source_obj_opt->pointed, source_state_after); + type_destroy(&t); + } + } + else if (type_is_obj_owner(p_source_obj_type)) + { + if (p_source_obj_opt->pointed) + { + struct type t = type_remove_pointer(p_source_obj_type); + set_object(&t, p_source_obj_opt->pointed, source_state_after); + type_destroy(&t); + } + } + } + else + { + + if (p_source_obj_opt) + { + set_object(p_source_obj_type, p_source_obj_opt, source_state_after); + } + } + } + else if (type_is_any_owner(p_dest_obj_type) && type_is_any_owner(p_source_obj_type)) + { + /*everthing is moved*/ + if (p_source_obj_opt) + set_object(p_source_obj_type, p_source_obj_opt, source_state_after); + } + else + { + /*nothing changes*/ + } } diff --git a/src/object.h b/src/object.h index 8bb4720b..48532a19 100644 --- a/src/object.h +++ b/src/object.h @@ -77,7 +77,7 @@ struct object struct object_state_stack object_state_stack; }; void object_destroy(struct object* obj_owner p); -void object_delete(struct object* owner p); +void object_delete(struct object* owner opt p); void object_swap(struct object* a, struct object* b); struct declarator; diff --git a/src/options.c b/src/options.c index 8a196d79..3241b918 100644 --- a/src/options.c +++ b/src/options.c @@ -4,23 +4,18 @@ #include #include -bool is_ownership_error(enum error e) -{ - switch (e) - { - case C_OWNERSHIP_MISSING_OWNER_QUALIFIER: - case C_OWNERSHIP_NOT_OWNER: - case C_OWNERSHIP_USING_TEMPORARY_OWNER: - case C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER: - case C_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN: - case C_OWNERSHIP_FLOW_MISSING_DTOR: - return true; - } - return false; -} + +struct diagnostic default_diagnostic = { + + .warnings = (~0ULL) & ~( + (1ULL << W_NOTE) | + (1ULL << W_STYLE) | + (1ULL << W_UNUSED_PARAMETER) | + (1ULL << W_UNUSED_VARIABLE)) +}; static struct w { - enum warning w; + enum diagnostic_id w; const char* name; } s_warnings[] = { @@ -35,12 +30,54 @@ s_warnings[] = { {W_ATTRIBUTES, "attributes"}, {W_UNUSED_VALUE, "unused-value"}, {W_STYLE, "style"}, + {W_COMMENT,"comment"}, + {W_LINE_SLICING,"line-slicing"}, + + {W_DISCARDED_QUALIFIERS, "discarded-qualifiers"}, {W_UNINITIALZED, "uninitialized"}, - {W_RETURN_LOCAL_ADDR, "return-local-addr"} + {W_RETURN_LOCAL_ADDR, "return-local-addr"}, + {W_DIVIZION_BY_ZERO,"div-by-zero"}, + + + {W_STRING_SLICED,"string-slicing"}, + {W_DECLARATOR_STATE,"declarator-state"}, + {W_OWNERSHIP_MISSING_OWNER_QUALIFIER, "missing-owner-qualifier"}, + {W_OWNERSHIP_NOT_OWNER,"not-owner"}, + {W_OWNERSHIP_USING_TEMPORARY_OWNER,"temp-owner"}, + {W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, "non-owner-move"}, + {W_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, "non-owner-to-owner-move"}, + {W_DISCARDING_OWNER, "discard-owner"}, + {W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, "missing-destructor"}, + {W_OWNERSHIP_NON_OWNER_MOVE, "non-owner-move"}, + {W_ANALYZER_UNINITIALIZED, "maybe-uninitialized"}, + {W_ANALYZER_NULL_DEREFERENCE, "analyzer-null-dereference"}, // -fanalyzer + {W_ANALIZER_MAYBE_NULL_TO_NON_OPT_ARGUMENT, "non-opt-arg"}, + {W_MUST_USE_ADDRESSOF, "must-use-address-of"}, + {W_PASSING_NULL_AS_ARRAY, "null-as-array"}, + {W_INCOMPATIBLE_ENUN_TYPES, "incompatible-enum"}, + {W_MULTICHAR_ERROR, "multi-char"} + }; -enum warning get_warning_flag(const char* wname) +static_assert((sizeof(s_warnings) / sizeof(s_warnings[0])) < 64); + +int get_diagnostic_type(struct diagnostic* d, enum diagnostic_id w) +{ + if ((d->errors & (1ULL << w)) != 0) + return 3; + + if ((d->warnings & (1ULL << w)) != 0) + return 2; + + if ((d->notes & (1ULL << w)) != 0) + return 1; + + return 0; + +} + +enum diagnostic_id get_warning(const char* wname) { for (int j = 0; j < sizeof(s_warnings) / sizeof(s_warnings[0]); j++) @@ -53,31 +90,30 @@ enum warning get_warning_flag(const char* wname) return 0; } -const char* get_warning_name(enum warning w) +unsigned long long get_warning_bit_mask(const char* wname) { - int lower_index = 0; - int upper_index = sizeof(s_warnings) / sizeof(s_warnings[0]) - 1; - while (lower_index <= upper_index) + for (int j = 0; j < sizeof(s_warnings) / sizeof(s_warnings[0]); j++) { - const int mid = (lower_index + upper_index) / 2; - const int cmp = w - s_warnings[mid].w; - - if (cmp == 0) - { - return s_warnings[mid].name; - } - else if (cmp < 0) + if (strncmp(s_warnings[j].name, wname, strlen(s_warnings[j].name)) == 0) { - upper_index = mid - 1; + return (1ULL << s_warnings[j].w); } - else + } + return 0; +} + +const char* get_warning_name(enum diagnostic_id w) +{ + //TODO because s_warnings is out of order .... + //this is a linear seatch instead of just index! TODOD + for (int j = 0; j < sizeof(s_warnings) / sizeof(s_warnings[0]); j++) + { + if (s_warnings[j].w == w) { - lower_index = mid + 1; + return s_warnings[j].name; } } - - assert(false); return ""; } @@ -89,11 +125,9 @@ int fill_options(struct options* options, /* default at this moment is same as -Wall */ - options->enabled_warnings_stack[0] = ~0; - options->enabled_warnings_stack[0] &= ~(W_STYLE | W_UNUSED_PARAMETER | W_UNUSED_VARIABLE); //default is OFF - - - + options->diagnostic_stack[0] = default_diagnostic; + + #ifdef __EMSCRIPTEN__ options->flow_analysis = true; @@ -133,7 +167,7 @@ int fill_options(struct options* options, } continue; } - + if (strcmp(argv[i], "-showIncludes") == 0) { options->show_includes = true; @@ -271,17 +305,17 @@ int fill_options(struct options* options, { if (strcmp(argv[i], "-Wall") == 0) { - options->enabled_warnings_stack[0] = ~0; + options->diagnostic_stack[0].warnings = ~0ULL; continue; } const bool disable_warning = (argv[i][2] == 'n' && argv[i][3] == 'o'); - enum warning w = 0; + enum diagnostic_id w = 0; if (disable_warning) - w = get_warning_flag(argv[i] + 5); + w = get_warning_bit_mask(argv[i] + 5); else - w = get_warning_flag(argv[i] + 2); + w = get_warning_bit_mask(argv[i] + 2); if (w == 0) { @@ -292,15 +326,30 @@ int fill_options(struct options* options, if (disable_warning) { - options->enabled_warnings_stack[0] &= ~w; + options->diagnostic_stack[0].warnings &= ~w; } else { - options->enabled_warnings_stack[0] |= w; + if (w == W_STYLE) + options->diagnostic_stack[0].warnings |= w; + else + options->diagnostic_stack[0].notes |= w; } continue; } + if (strcmp(argv[i], "-dump-tokens") == 0) + { + options->dump_tokens = true; + continue; + } + + if (strcmp(argv[i], "-dump-pp-tokens") == 0) + { + options->dump_pptokens = true; + continue; + } + printf("unknown option '%s'", argv[i]); return 1; } @@ -363,8 +412,34 @@ void print_help() "\n" WHITE " -msvc-output " RESET "Ouput is compatible with visual studio\n" "\n" + WHITE " -dump-tokens " RESET "Output tokens before preprocessor\n" + "\n" + WHITE " -dump-pp-tokens " RESET "Output tokens after preprocessor\n" + "\n" "More details at http://thradams.com/cake/manual.html\n" ; printf("%s", options); } + +#ifdef TEST +#include "unit_test.h" +#include + +void test_get_warning_name() +{ + const char* name = get_warning_name(W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR); + assert(strcmp(name, "missing-destructor") == 0); + + unsigned long long flags = get_warning_bit_mask(name); + assert(flags == (1ULL << W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR)); + + + const char* name2 = get_warning_name(W_STYLE); + assert(strcmp(name2, "style") == 0); + + unsigned long long flags2 = get_warning_bit_mask(name2); + assert(flags2 == (1ULL << W_STYLE)); +} + +#endif diff --git a/src/options.h b/src/options.h index 9351d588..1f00dfbe 100644 --- a/src/options.h +++ b/src/options.h @@ -14,112 +14,149 @@ enum language_version LANGUAGE_CXX = 3, //experimental }; -enum warning { +enum diagnostic_id { W_NONE = 0, /*not a real warning, used in especial cases*/ - W_UNUSED_VARIABLE = 1 << 1, //-Wunused-variable - W_DEPRECATED = 1 << 2, - W_ENUN_CONVERSION = 1 << 3 ,//-Wenum-conversion - W_NON_NULL = 1 << 4, //-Wnonnull - W_ADDRESS = 1 << 5, //-Waddress (always true) - W_UNUSED_PARAMETER = 1 << 6, //-Wno-unused-parameter - W_DECLARATOR_HIDE = 1 << 7, // gcc no - W_TYPEOF_ARRAY_PARAMETER = 1 << 8,// - W_ATTRIBUTES = 1 << 9, //-Wattributes - W_UNUSED_VALUE = 1 << 10, //-Wunused-value - W_STYLE = 1 << 11, //-Wstyle - W_COMMENT = 1 << 12, - W_LINE_SLICING = 1 << 13, - W_STRING_SLICED = 1 << 14, - W_DISCARDED_QUALIFIERS = 1 << 15, - W_DECLARATOR_STATE = 1 << 16, - W_UNINITIALZED = 1 << 17, - - W_RETURN_LOCAL_ADDR = 1 << 20, - -}; + W_UNUSED_VARIABLE, //-Wunused-variable + W_DEPRECATED, + W_ENUN_CONVERSION,//-Wenum-conversion + W_NON_NULL, //-Wnonnull + W_ADDRESS, //-Waddress (always true) + W_UNUSED_PARAMETER, //-Wno-unused-parameter + W_DECLARATOR_HIDE, // gcc no + W_TYPEOF_ARRAY_PARAMETER,// + W_ATTRIBUTES, //-Wattributes + W_UNUSED_VALUE, //-Wunused-value + W_STYLE, //-Wstyle + W_COMMENT, + W_LINE_SLICING, + W_STRING_SLICED, + W_DISCARDED_QUALIFIERS, + W_DECLARATOR_STATE, + W_UNINITIALZED, + + W_RETURN_LOCAL_ADDR, -enum error -{ - C_SUCCESS = 0, - C_UNEXPECTED, - C_TOO_MANY_ARGUMENTS, - C_TOO_FEW_ARGUMENTS, - C_NOT_FOUND, - C_NO_MATCH_FOR_GENERIC, - C_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, - C_CALLED_OBJECT_IS_NOT_FUNCTION_OR_FUNCTION_POINTER, - C_STRUCT_MEMBER_NOT_FOUND, - C_STRUCTURE_OR_UNION_REQUIRED, - C_STRUCT_IS_INCOMPLETE, - C_DECLARATOR_NOT_FOUND, - C_EXPECTED_DECLARATOR_NAME, - C_UNKNOWN_ATTRIBUTE_NAME, - C_INDIRECTION_REQUIRES_POINTER_OPERAND, - C_INVALID_TOKEN, - C_EXPECTED_STRUCT_TYPE, - C_EXPECTED_TYPE_NAME, - C_LEFT_IS_NOT_ARITHMETIC, - C_RIGHT_IS_NOT_ARITHMETIC, - C_DIVIZION_BY_ZERO, - C_LEFT_IS_NOT_INTEGER, - C_RIGHT_IS_NOT_INTEGER, - C_INVALID_TYPE, - C_LEFT_IS_NOT_SCALAR, - C_RIGHT_IS_NOT_SCALAR, - C_INCOMPATIBLE_POINTER_TYPES, - C_ASSIGNMENT_OF_FUNCTION, - C_ASSIGNMENT_TO_EXPRESSION_WITH_ARRAY_TYPE, - C_ASSIGNMENT_OF_READ_ONLY_OBJECT, - C_LVALUE_ASSIGNMENT, - C_CONDITION_MUST_HAVE_SCALAR_TYPE, - C_INCOMPATIBLE_TYPES, - C_EXPECTED_CONSTANT_EXPRESSION, - C_UNEXPECTED_TOKEN, - C_CANNOT_COMBINE_WITH_PREVIOUS_LONG_LONG, - C_EXPECTED_DECLARATION, - C_STATIC_OR_TYPE_QUALIFIERS_NOT_ALLOWED_IN_NON_PARAMETER, - C_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER, - C_REDECLARATION, - C_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, - C_MISSING_ENUM_TAG_NAME, - C_MULTIPLE_DEFINITION_ENUM, - C_STATIC_ASSERT_FAILED, - C_ATTR_UNBALANCED, - C_UNEXPECTED_END_OF_FILE, - C_THROW_STATEMENT_NOT_WITHIN_TRY_BLOCK, - C_VOID_FUNCTION_SHOULD_NOT_RETURN_VALUE, - C_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, - C_PASSING_NULL_AS_ARRAY, - C_DISCARDING_CONST_AT_ARGUMENT, - C_INCOMPATIBLE_ENUN_TYPES, - C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, - C_FILE_NOT_FOUND, - C_MISSING_CLOSE_PARENTHESIS, - C_EXPRESSION_ERROR, - C_PREPROCESSOR_ERROR_DIRECTIVE, - C_TOO_FEW_ARGUMENTS_TO_FUNCTION_LIKE_MACRO, - C_MACRO_INVALID_ARG, - C_MISSING_MACRO_ARGUMENT, - C_ADDRESS_OF_REGISTER, - C_OPERATOR_NEEDS_LVALUE, //C2105 - C_MULTICHAR_ERROR, - C_CHARACTER_TOO_LARGE, - C_OWNERSHIP_NON_OWNER_MOVE, - C_PRAGMA_ERROR, + W_MUST_USE_ADDRESSOF, /*ownership type system errors*/ - C_OWNERSHIP_MISSING_OWNER_QUALIFIER, - C_OWNERSHIP_NOT_OWNER, - C_OWNERSHIP_USING_TEMPORARY_OWNER, - C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + W_OWNERSHIP_MISSING_OWNER_QUALIFIER, + W_OWNERSHIP_NOT_OWNER, + W_OWNERSHIP_USING_TEMPORARY_OWNER, + W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + + W_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, + W_DISCARDING_OWNER, + W_OWNERSHIP_NON_OWNER_MOVE, + W_ARRAY_INDIRECTION, + /*flow analysis errors*/ + W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR, + + + W_ANALYZER_UNINITIALIZED, + W_ANALYZER_NULL_DEREFERENCE, + + W_DIVIZION_BY_ZERO, + W_PASSING_NULL_AS_ARRAY, + W_ANALIZER_MAYBE_NULL_TO_NON_OPT_ARGUMENT, + W_INCOMPATIBLE_ENUN_TYPES, + W_MULTICHAR_ERROR, + W_OUT_OF_BOUNDS, + + + + + W_LOCATION, + W_NOTE, + + //AFTER THIS POINT (W_NOTE) MESSAGES ARE ALWAYS ERRORS + //////////////////////////////////////// + + //constraints violations are errors + C_UNEXPECTED, + //TODO ERROR MESSAGE MUST BE BASED ON CONSTRAINS + // - C_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, - C_DISCARDING_OWNER, + /* + * 5.1.1.3 Diagnostics + A conforming implementation shall produce at least one diagnostic message (identified in an + implementation-defined manner) if a preprocessing translation unit or translation unit contains a + violation of any syntax rule or constraint, even if the behavior is also explicitly specified as undefined + or implementation-defined. Diagnostic messages need not be produced in other circumstances.9 + */ + + //SAMPLE + //Constrain : The number of arguments shall agree with the number of parameters. + ERROR_TOO_MANY_ARGUMENTS, + ERROR_TOO_FEW_ARGUMENTS, - /*flow analysis errors*/ - C_OWNERSHIP_FLOW_MISSING_DTOR, + //TODO.... more constrains + ERROR_NOT_FOUND, + ERROR_NO_MATCH_FOR_GENERIC, + ERROR_SUBSCRIPTED_VALUE_IS_NEITHER_ARRAY_NOR_POINTER, + ERROR_CALLED_OBJECT_IS_NOT_FUNCTION_OR_FUNCTION_POINTER, + ERROR_STRUCT_MEMBER_NOT_FOUND, + ERROR_STRUCTURE_OR_UNION_REQUIRED, + ERROR_STRUCT_IS_INCOMPLETE, + ERROR_DECLARATOR_NOT_FOUND, + ERROR_EXPECTED_DECLARATOR_NAME, + ERROR_UNKNOWN_ATTRIBUTE_NAME, + ERROR_INDIRECTION_REQUIRES_POINTER_OPERAND, + ERROR_INVALID_TOKEN, + ERROR_EXPECTED_STRUCT_TYPE, + ERROR_EXPECTED_TYPE_NAME, + ERROR_LEFT_IS_NOT_ARITHMETIC, + ERROR_RIGHT_IS_NOT_ARITHMETIC, + + ERROR_LEFT_IS_NOT_INTEGER, + ERROR_RIGHT_IS_NOT_INTEGER, + ERROR_INVALID_TYPE, + ERROR_LEFT_IS_NOT_SCALAR, + ERROR_RIGHT_IS_NOT_SCALAR, + ERROR_INCOMPATIBLE_POINTER_TYPES, //warning? + ERROR_ASSIGNMENT_OF_FUNCTION, + ERROR_ASSIGNMENT_TO_EXPRESSION_WITH_ARRAY_TYPE, + ERROR_ASSIGNMENT_OF_READ_ONLY_OBJECT, + ERROR_LVALUE_ASSIGNMENT, + ERROR_CONDITION_MUST_HAVE_SCALAR_TYPE, + ERROR_INCOMPATIBLE_TYPES, + ERROR_EXPECTED_CONSTANT_EXPRESSION, + ERROR_UNEXPECTED_TOKEN, + ERROR_CANNOT_COMBINE_WITH_PREVIOUS_LONG_LONG, + ERROR_EXPECTED_DECLARATION, + ERROR_STATIC_OR_TYPE_QUALIFIERS_NOT_ALLOWED_IN_NON_PARAMETER, + ERROR_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER, + ERROR_REDECLARATION, + ERROR_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, + ERROR_MISSING_ENUM_TAG_NAME, + ERROR_MULTIPLE_DEFINITION_ENUM, + ERROR_STATIC_ASSERT_FAILED, + ERROR_STATIC_STATE_FAILED, + ERROR_ATTR_UNBALANCED, + ERROR_UNEXPECTED_END_OF_FILE, + ERROR_THROW_STATEMENT_NOT_WITHIN_TRY_BLOCK, + ERROR_VOID_FUNCTION_SHOULD_NOT_RETURN_VALUE, + ERROR_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, + + + ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, + ERROR_FILE_NOT_FOUND, + ERROR_MISSING_CLOSE_PARENTHESIS, + ERROR_EXPRESSION_ERROR, + ERROR_PREPROCESSOR_ERROR_DIRECTIVE, + ERROR_TOO_FEW_ARGUMENTS_TO_FUNCTION_LIKE_MACRO, + ERROR_PREPROCESSOR_MACRO_INVALID_ARG, + ERROR_PREPROCESSOR_MISSING_MACRO_ARGUMENT, + ERROR_ADDRESS_OF_REGISTER, + ERROR_OPERATOR_NEEDS_LVALUE, //C2105 + + ERROR_CHARACTER_TOO_LARGE, + + ERROR_PRAGMA_ERROR, + ERROR_OUT_OF_MEM, + }; -bool is_ownership_error(enum error e); + + enum style { @@ -127,27 +164,46 @@ enum style // https://llvm.org/docs/CodingStandards.html STYLE_LLVM,// A style complying with the LLVM coding standards - + //https://google.github.io/styleguide/cppguide.html STYLE_GOOGLE,// A style complying with Google’s C++ style guide //https://chromium.googlesource.com/chromium/src/+/refs/heads/main/styleguide/styleguide.md //https://www.kernel.org/doc/html/latest/process/coding-style.html STYLE_CHROMIUM,// A style complying with Chromium’s style guide - + //https://firefox-source-docs.mozilla.org/code-quality/coding-style/index.html STYLE_MOZILLA,// A style complying with Mozilla’s style guide - + //https://www.webkit.org/code-style-guidelines/ STYLE_WEBKIT,// A style complying with WebKit’s style guide - + STYLE_MICROSOFT,// A style complying with Microsoft’s style guide - + STYLE_GNU,// A style complying with the GNU coding standards - + }; -const char* get_warning_name(enum warning w); -enum warning get_warning_flag(const char* wname); +const char* get_warning_name(enum diagnostic_id w); +unsigned long long get_warning_bit_mask(const char* wname); + +enum diagnostic_id get_warning(const char* wname); + +struct diagnostic +{ + /* + each message has number (0-63) that corresponds to the bit index + Messages bigger than W_NOTE are errors or bigger than 63 + */ + + /*set of diagnostics reported as errors*/ + unsigned long long errors; + /*set of diagnostics reported as warnings*/ + unsigned long long warnings; + /*set of diagnostics reported as notes*/ + unsigned long long notes; +}; +int get_diagnostic_type(struct diagnostic* d, enum diagnostic_id w); +extern struct diagnostic default_diagnostic; struct options { @@ -160,27 +216,27 @@ struct options -target=c99 */ enum language_version target; - + /* #pragma CAKE diagnostic push #pragma CAKE diagnostic pop */ - int enabled_warnings_stack_top_index; - enum warning enabled_warnings_stack[10]; + int diagnostic_stack_top_index; + struct diagnostic diagnostic_stack[10]; enum style style; /* Causes the compiler to output a list of the include files. - The option also displays nested include files, that is, + The option also displays nested include files, that is, the files included by the files that you include. */ bool show_includes; /* - -remove-comments + -remove-comments */ - bool remove_comments; + bool remove_comments; /* -flow-analysis @@ -188,11 +244,11 @@ struct options bool flow_analysis; /* - -E + -E */ bool preprocess_only; - bool disable_ownership_errors; + bool clear_error_at_end; //used by tests /* -rm -direct-compilation @@ -206,17 +262,17 @@ struct options bool format_input; bool format_ouput; - - + + /* -no-output if true cake does not generate ouput */ bool no_output; - - /* + + /* -nullchecks - + */ bool null_checks; @@ -225,6 +281,18 @@ struct options */ bool visual_studio_ouput_format; + /* + -dump-tokens + print tokens before preprocessor + */ + bool dump_tokens; + + /* + -dump-pp-tokens + (print tokens after preprocessor) + */ + bool dump_pptokens; + /* -o filename defines the ouputfile when 1 file is used diff --git a/src/parser.c b/src/parser.c index 44b99022..f90d6109 100644 --- a/src/parser.c +++ b/src/parser.c @@ -30,71 +30,77 @@ #include "visit.h" #include +#ifdef PATH_MAX +#define MYMAX_PATH PATH_MAX //Linux uses it in realpath +#else +#define MYMAX_PATH MAX_PATH +#endif + void object_state_to_string(enum object_state e) { - bool first = true; - - printf("\""); - if (e & OBJECT_STATE_UNINITIALIZED) - { - if (first) first = false; else printf(" or "); - printf("uninitialized"); - } - - - if (e & OBJECT_STATE_NOT_NULL && - e & OBJECT_STATE_NULL) - { - if (first) first = false; else printf(" or "); - printf("maybe-null"); - } - else if (e & OBJECT_STATE_NOT_NULL) - { - if (first) first = false; else printf(" or "); - printf("not-null"); - } - else if (e & OBJECT_STATE_NULL) - { - if (first) first = false; else printf(" or "); - printf("null"); - } - - if (e & OBJECT_STATE_NOT_ZERO && - e & OBJECT_STATE_ZERO) - { - if (first) first = false; else printf(" or "); - printf("any"); - } - else if (e & OBJECT_STATE_ZERO) - { - if (first) first = false; else printf(" or "); - printf("zero"); - } - else if (e & OBJECT_STATE_NOT_ZERO) - { - if (first) first = false; else printf(" or "); - printf("not-zero"); - } - - if (e & OBJECT_STATE_MOVED) - { - if (first) first = false; else printf(" or "); - printf("moved"); - } - - printf("\""); + bool first = true; + + printf("\""); + if (e & OBJECT_STATE_UNINITIALIZED) + { + if (first) first = false; else printf(" or "); + printf("uninitialized"); + } + + + if (e & OBJECT_STATE_NOT_NULL && + e & OBJECT_STATE_NULL) + { + if (first) first = false; else printf(" or "); + printf("maybe-null"); + } + else if (e & OBJECT_STATE_NOT_NULL) + { + if (first) first = false; else printf(" or "); + printf("not-null"); + } + else if (e & OBJECT_STATE_NULL) + { + if (first) first = false; else printf(" or "); + printf("null"); + } + + if (e & OBJECT_STATE_NOT_ZERO && + e & OBJECT_STATE_ZERO) + { + if (first) first = false; else printf(" or "); + printf("any"); + } + else if (e & OBJECT_STATE_ZERO) + { + if (first) first = false; else printf(" or "); + printf("zero"); + } + else if (e & OBJECT_STATE_NOT_ZERO) + { + if (first) first = false; else printf(" or "); + printf("not-zero"); + } + + if (e & OBJECT_STATE_MOVED) + { + if (first) first = false; else printf(" or "); + printf("moved"); + } + + printf("\""); } struct defer_statement* owner defer_statement(struct parser_ctx* ctx); void defer_statement_delete(struct defer_statement* owner opt p) { - if (p) - { - secondary_block_delete(p->secondary_block); - free(p); - } + if (p) + { + secondary_block_delete(p->secondary_block); + free(p); + } } static int s_anonymous_struct_count = 0; @@ -111,103 +117,111 @@ void naming_convention_local_var(struct parser_ctx* ctx, struct token* token, st /////////////////////////////////////////////////////////////////////////////// -static bool parser_is_warning_enabled(const struct parser_ctx* ctx, enum warning w) +static bool parser_is_diagnostic_enabled(const struct parser_ctx* ctx, enum diagnostic_id w) { - return - (ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] & w) != 0; + if (w > W_NOTE) + return true; + + return + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors & w) != 0) || + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings & w) != 0) || + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes & w) != 0); + } + + static void check_open_brace_style(struct parser_ctx* ctx, struct token* token) { - //token points to { - - if (token->level == 0 && - !(token->flags & TK_FLAG_MACRO_EXPANDED) && - token->type == '{' && - parser_is_warning_enabled(ctx, W_STYLE)) - { - if (ctx->options.style == STYLE_CAKE) - { - if (token->prev->type == TK_BLANKS && - token->prev->prev->type == TK_NEWLINE) - { - } - else - { - compiler_set_info_with_token(W_STYLE, ctx, token, "not following correct brace style {"); - } - } - } + //token points to { + + if (token->level == 0 && + !(token->flags & TK_FLAG_MACRO_EXPANDED) && + token->type == '{' && + parser_is_diagnostic_enabled(ctx, W_STYLE)) + { + if (ctx->options.style == STYLE_CAKE) + { + if (token->prev->type == TK_BLANKS && + token->prev->prev->type == TK_NEWLINE) + { + } + else + { + compiler_diagnostic_message(W_STYLE, ctx, token, "not following correct brace style {"); + } + } + } } static void check_close_brace_style(struct parser_ctx* ctx, struct token* token) { - //token points to { - - if (token->level == 0 && - !(token->flags & TK_FLAG_MACRO_EXPANDED) && - token->type == '}' && - parser_is_warning_enabled(ctx, W_STYLE)) - { - if (ctx->options.style == STYLE_CAKE) - { - if (token->prev->type == TK_BLANKS && - token->prev->prev->type == TK_NEWLINE) - { - } - else - { - compiler_set_info_with_token(W_STYLE, ctx, token, "not following correct close brace style }"); - } - } - } + //token points to { + + if (token->level == 0 && + !(token->flags & TK_FLAG_MACRO_EXPANDED) && + token->type == '}' && + parser_is_diagnostic_enabled(ctx, W_STYLE)) + { + if (ctx->options.style == STYLE_CAKE) + { + if (token->prev->type == TK_BLANKS && + token->prev->prev->type == TK_NEWLINE) + { + } + else + { + compiler_diagnostic_message(W_STYLE, ctx, token, "not following correct close brace style }"); + } + } + } } static void check_func_open_brace_style(struct parser_ctx* ctx, struct token* token) { - //token points to { - - if (token->level == 0 && - !(token->flags & TK_FLAG_MACRO_EXPANDED) && - token->type == '{' && - parser_is_warning_enabled(ctx, W_STYLE)) - { - if (ctx->options.style == STYLE_CAKE) - { - if (token->prev->type == TK_NEWLINE) - { - } - else - { - compiler_set_info_with_token(W_STYLE, ctx, token, "not following correct brace style {"); - } - } - } + //token points to { + + if (token->level == 0 && + !(token->flags & TK_FLAG_MACRO_EXPANDED) && + token->type == '{' && + parser_is_diagnostic_enabled(ctx, W_STYLE)) + { + if (ctx->options.style == STYLE_CAKE) + { + if (token->prev->type == TK_NEWLINE) + { + } + else + { + compiler_diagnostic_message(W_STYLE, ctx, token, "not following correct brace style {"); + } + } + } } - +/* static void check_func_close_brace_style(struct parser_ctx* ctx, struct token* token) { - //token points to { - - if (token->level == 0 && - !(token->flags & TK_FLAG_MACRO_EXPANDED) && - token->type == '}' && - parser_is_warning_enabled(ctx, W_STYLE)) - { - if (ctx->options.style == STYLE_CAKE) - { - if (token->prev->prev->type == TK_NEWLINE) - { - } - else - { - compiler_set_info_with_token(W_STYLE, ctx, token, "not following correct close brace style }"); - } - } - } + //token points to { + + if (token->level == 0 && + !(token->flags & TK_FLAG_MACRO_EXPANDED) && + token->type == '}' && + parser_is_warning_enabled(ctx, W_STYLE)) + { + if (ctx->options.style == STYLE_CAKE) + { + if (token->prev->prev->type == TK_NEWLINE) + { + } + else + { + compiler_diagnostic_message(W_STYLE, ctx, token, "not following correct close brace style }"); + } + } + } } - +*/ #ifdef TEST int printf_nothing(const char* fmt, ...) { return 0; } @@ -215,525 +229,393 @@ int printf_nothing(const char* fmt, ...) { return 0; } void scope_destroy(struct scope* obj_owner p) { - hashmap_destroy(&p->tags); - hashmap_destroy(&p->variables); + hashmap_destroy(&p->tags); + hashmap_destroy(&p->variables); } void scope_list_push(struct scope_list* list, struct scope* pnew) { - if (list->tail) - pnew->scope_level = list->tail->scope_level + 1; + if (list->tail) + pnew->scope_level = list->tail->scope_level + 1; - if (list->head == NULL) - { - list->head = pnew; - list->tail = pnew; - //pnew->prev = list->tail; - } - else - { - pnew->previous = list->tail; - list->tail->next = pnew; - list->tail = pnew; - } + if (list->head == NULL) + { + list->head = pnew; + list->tail = pnew; + //pnew->prev = list->tail; + } + else + { + pnew->previous = list->tail; + list->tail->next = pnew; + list->tail = pnew; + } } void scope_list_pop(struct scope_list* list) { - if (list->head == NULL) - return; + if (list->head == NULL) + return; - struct scope* p = list->tail; - if (list->head == list->tail) - { - list->head = NULL; - list->tail = NULL; - } - else - { + struct scope* p = list->tail; + if (list->head == list->tail) + { + list->head = NULL; + list->tail = NULL; + } + else + { - list->tail = list->tail->previous; - if (list->tail == list->head) - { - list->tail->next = NULL; - list->tail->previous = NULL; - } - } - p->next = NULL; - p->previous = NULL; + list->tail = list->tail->previous; + if (list->tail == list->head) + { + list->tail->next = NULL; + list->tail->previous = NULL; + } + } + p->next = NULL; + p->previous = NULL; } void parser_ctx_destroy(struct parser_ctx* obj_owner ctx) { - if (ctx->sarif_file) - { - fclose(ctx->sarif_file); - } + if (ctx->sarif_file) + { + fclose(ctx->sarif_file); + } } -void compiler_set_error_with_token(enum error error, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...) +_Bool compiler_diagnostic_message(enum diagnostic_id w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...) { - if (p_token == NULL) - return; - if (p_token->level > 0) - return; - if (ctx->options.disable_ownership_errors && is_ownership_error(error)) - { - return; - } + if (p_token && p_token->level != 0) + { + return false; + } + bool is_error = false; + bool is_warning = false; + bool is_note = false; + if (w > W_NOTE) + { + is_error = true; + } + else if (w == W_LOCATION) + { + is_note = true; + } + else + { + is_error = + (ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors & (1ULL << w)) != 0; - ctx->p_report->error_count++; - ctx->p_report->last_error = error; - char buffer[200] = { 0 }; + is_warning = + (ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings & (1ULL << w)) != 0; -#ifndef TEST + is_note = + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes & (1ULL << w)) != 0); + } - if (p_token) - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); - va_list args; - va_start(args, fmt); - vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); - if (ctx->options.visual_studio_ouput_format) - { - printf("error: " "%s\n", buffer); - } - else - { - printf(LIGHTRED "error: " WHITE "%s\n", buffer); - } - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); -#endif - const char* func_name = "module"; - if (ctx->p_current_function_opt) - { - func_name = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme; - } - - if (ctx->sarif_file) - { - const char* file_name = "?"; - int line = 0; - int col = 0; - if (p_token) - { - file_name = p_token->token_origin->lexeme; - line = p_token->line; - col = p_token->col; - } - - if (ctx->p_report->error_count + ctx->p_report->warnings_count + ctx->p_report->info_count > 1) - { - fprintf(ctx->sarif_file, ",\n"); - } - - fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"ruleId\":\"%s\",\n", "error"); - fprintf(ctx->sarif_file, " \"level\":\"error\",\n"); - fprintf(ctx->sarif_file, " \"message\": {\n"); - fprintf(ctx->sarif_file, " \"text\": \"%s\"\n", buffer); - fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"locations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); - - fprintf(ctx->sarif_file, " \"physicalLocation\": {\n"); - - fprintf(ctx->sarif_file, " \"artifactLocation\": {\n"); - fprintf(ctx->sarif_file, " \"uri\": \"file:///%s\"\n", file_name); - fprintf(ctx->sarif_file, " },\n"); - - fprintf(ctx->sarif_file, " \"region\": {\n"); - fprintf(ctx->sarif_file, " \"startLine\": %d,\n", line); - fprintf(ctx->sarif_file, " \"startColumn\": %d,\n", col); - fprintf(ctx->sarif_file, " \"endLine\": %d,\n", line); - fprintf(ctx->sarif_file, " \"endColumn\": %d\n", col); - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " },\n"); - - fprintf(ctx->sarif_file, " \"logicalLocations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); - - fprintf(ctx->sarif_file, " \"fullyQualifiedName\": \"%s\",\n", func_name); - fprintf(ctx->sarif_file, " \"decoratedName\": \"%s\",\n", func_name); - - fprintf(ctx->sarif_file, " \"kind\": \"%s\"\n", "function"); - fprintf(ctx->sarif_file, " }\n"); - - fprintf(ctx->sarif_file, " ]\n"); - - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " ]\n"); - - fprintf(ctx->sarif_file, " }\n"); - } - -} - - -_Bool compiler_set_warning_with_token(enum warning w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...) -{ - if (w != W_NONE) - { - if (p_token && p_token->level != 0) - { - /*we dont warning code inside includes*/ - return false; - } - - if (!parser_is_warning_enabled(ctx, w)) - { - return false; - } - } - - ctx->p_report->warnings_count++; - ctx->p_report->last_warning |= w; - - const char* func_name = "module"; - if (ctx->p_current_function_opt) - { - func_name = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme; - } - - char buffer[200] = { 0 }; + if (is_error) + { + ctx->p_report->error_count++; + } + else if (is_warning) + { + ctx->p_report->warnings_count++; + } + else if (is_note) + { + if (w != W_LOCATION) + ctx->p_report->info_count++; + } + else + { + return false; + } -#ifndef TEST - if (p_token) - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); - - - va_list args; - va_start(args, fmt); - /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); - - if (w != W_NONE) - { - if (ctx->options.visual_studio_ouput_format) - { - printf("warning: " "%s [" "-W%s" "]\n", buffer, get_warning_name(w)); - } - else - { - printf(LIGHTMAGENTA "warning: " WHITE "%s [" LIGHTMAGENTA "-W%s" WHITE "]\n" RESET, buffer, get_warning_name(w)); - } - - } - else - { - if (ctx->options.visual_studio_ouput_format) - { - printf("warning: " "%s\n", buffer); - } - else - { - printf(LIGHTMAGENTA "warning: " WHITE "%s\n" RESET, buffer); - } - } - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); -#endif - - if (ctx->sarif_file) - { - if (ctx->p_report->error_count + ctx->p_report->warnings_count + ctx->p_report->info_count > 1) - { - fprintf(ctx->sarif_file, ",\n"); - } - - fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"ruleId\":\"%s\",\n", get_warning_name(w)); - fprintf(ctx->sarif_file, " \"level\":\"warning\",\n"); - fprintf(ctx->sarif_file, " \"message\": {\n"); - fprintf(ctx->sarif_file, " \"text\": \"%s\"\n", buffer); - fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"locations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); - - fprintf(ctx->sarif_file, " \"physicalLocation\": {\n"); - - fprintf(ctx->sarif_file, " \"artifactLocation\": {\n"); - fprintf(ctx->sarif_file, " \"uri\": \"file:///%s\"\n", p_token->token_origin->lexeme); - fprintf(ctx->sarif_file, " },\n"); - - fprintf(ctx->sarif_file, " \"region\": {\n"); - fprintf(ctx->sarif_file, " \"startLine\": %d,\n", p_token->line); - fprintf(ctx->sarif_file, " \"startColumn\": %d,\n", p_token->col); - fprintf(ctx->sarif_file, " \"endLine\": %d,\n", p_token->line); - fprintf(ctx->sarif_file, " \"endColumn\": %d\n", p_token->col); - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " },\n"); - - fprintf(ctx->sarif_file, " \"logicalLocations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); - - fprintf(ctx->sarif_file, " \"fullyQualifiedName\": \"%s\",\n", func_name); - fprintf(ctx->sarif_file, " \"decoratedName\": \"%s\",\n", func_name); - - fprintf(ctx->sarif_file, " \"kind\": \"%s\"\n", "function"); - fprintf(ctx->sarif_file, " }\n"); - - fprintf(ctx->sarif_file, " ]\n"); - - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " ]\n"); - - fprintf(ctx->sarif_file, " }\n"); - } - - return 1; -} - - -void compiler_set_info_with_token(enum warning w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...) -{ - if (w != W_NONE) - { - if (p_token->level != 0) - { - /*we dont warning code inside includes*/ - return; - } - - if (!parser_is_warning_enabled(ctx, w)) - { - return; - } - } - const char* func_name = "module"; - if (ctx->p_current_function_opt) - { - func_name = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme; - } - ctx->p_report->info_count++; - ctx->p_report->last_warning |= w; - char buffer[200] = { 0 }; + if (w != W_LOCATION) + ctx->p_report->last_diagnostic_id = w; -#ifndef TEST - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); + const char* func_name = "module"; + if (ctx->p_current_function_opt) + { + func_name = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme; + } - va_list args; - va_start(args, fmt); - /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); + char buffer[200] = {0}; - if (ctx->options.visual_studio_ouput_format) - { - printf("note: " "%s\n", buffer); - } - else - { - printf(LIGHTCYAN "note: " WHITE "%s\n", buffer); - } +#ifndef TEST + if (p_token) + print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); + + + va_list args; + va_start(args, fmt); + /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); + va_end(args); + + bool show_warning_name = w < W_NOTE && w != W_LOCATION; + + if (ctx->options.visual_studio_ouput_format) + { + if (is_error) + printf("error: "); + else if (is_warning) + printf("warning: "); + else if (is_note) + printf("note: "); + + printf("%s", buffer); + + if (show_warning_name) + printf(" [" "-W%s" "]\n", get_warning_name(w)); + } + else + { + if (is_error) + { + if (show_warning_name) + printf(LIGHTRED "error: " WHITE "%s [" LIGHTRED "-W%s" WHITE "]\n" RESET, buffer, get_warning_name(w)); + else + printf(LIGHTRED "error: " WHITE "%s\n" RESET, buffer); + } + else if (is_warning) + { + if (show_warning_name) + printf(LIGHTMAGENTA "warning: " WHITE "%s [" LIGHTMAGENTA "-W%s" WHITE "]\n" RESET, buffer, get_warning_name(w)); + else + printf(LIGHTMAGENTA "warning: " WHITE "%s\n" RESET, buffer); + + } + else if (is_note) + { + if (show_warning_name) + printf(LIGHTCYAN "note: " WHITE "%s [" LIGHTCYAN "-W%s" WHITE "]\n" RESET, buffer, get_warning_name(w)); + else + printf(LIGHTCYAN "note: " WHITE "%s\n" RESET, buffer); + } + + } + + + print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); +#endif - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); -#endif // !TEST + if (ctx->sarif_file) + { + if (ctx->p_report->error_count + ctx->p_report->warnings_count + ctx->p_report->info_count > 1) + { + fprintf(ctx->sarif_file, ",\n"); + } + fprintf(ctx->sarif_file, " {\n"); + fprintf(ctx->sarif_file, " \"ruleId\":\"%s\",\n", get_warning_name(w)); - if (ctx->sarif_file) - { - if (ctx->p_report->error_count + ctx->p_report->warnings_count + ctx->p_report->info_count > 1) - { - fprintf(ctx->sarif_file, ",\n"); - } + fprintf(ctx->sarif_file, " \"level\":\"warning\",\n"); - fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"ruleId\":\"%s\",\n", "info"); - fprintf(ctx->sarif_file, " \"level\":\"note\",\n"); - fprintf(ctx->sarif_file, " \"message\": {\n"); - fprintf(ctx->sarif_file, " \"text\": \"%s\"\n", buffer); - fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"locations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); + fprintf(ctx->sarif_file, " \"message\": {\n"); + fprintf(ctx->sarif_file, " \"text\": \"%s\"\n", buffer); + fprintf(ctx->sarif_file, " },\n"); + fprintf(ctx->sarif_file, " \"locations\": [\n"); + fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"physicalLocation\": {\n"); + fprintf(ctx->sarif_file, " \"physicalLocation\": {\n"); - fprintf(ctx->sarif_file, " \"artifactLocation\": {\n"); - fprintf(ctx->sarif_file, " \"uri\": \"file:///%s\"\n", p_token->token_origin->lexeme); - fprintf(ctx->sarif_file, " },\n"); + fprintf(ctx->sarif_file, " \"artifactLocation\": {\n"); + fprintf(ctx->sarif_file, " \"uri\": \"file:///%s\"\n", p_token->token_origin->lexeme); + fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"region\": {\n"); - fprintf(ctx->sarif_file, " \"startLine\": %d,\n", p_token->line); - fprintf(ctx->sarif_file, " \"startColumn\": %d,\n", p_token->col); - fprintf(ctx->sarif_file, " \"endLine\": %d,\n", p_token->line); - fprintf(ctx->sarif_file, " \"endColumn\": %d\n", p_token->col); - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " },\n"); + fprintf(ctx->sarif_file, " \"region\": {\n"); + fprintf(ctx->sarif_file, " \"startLine\": %d,\n", p_token->line); + fprintf(ctx->sarif_file, " \"startColumn\": %d,\n", p_token->col); + fprintf(ctx->sarif_file, " \"endLine\": %d,\n", p_token->line); + fprintf(ctx->sarif_file, " \"endColumn\": %d\n", p_token->col); + fprintf(ctx->sarif_file, " }\n"); + fprintf(ctx->sarif_file, " },\n"); - fprintf(ctx->sarif_file, " \"logicalLocations\": [\n"); - fprintf(ctx->sarif_file, " {\n"); + fprintf(ctx->sarif_file, " \"logicalLocations\": [\n"); + fprintf(ctx->sarif_file, " {\n"); - fprintf(ctx->sarif_file, " \"fullyQualifiedName\": \"%s\",\n", func_name); - fprintf(ctx->sarif_file, " \"decoratedName\": \"%s\",\n", func_name); + fprintf(ctx->sarif_file, " \"fullyQualifiedName\": \"%s\",\n", func_name); + fprintf(ctx->sarif_file, " \"decoratedName\": \"%s\",\n", func_name); - fprintf(ctx->sarif_file, " \"kind\": \"%s\"\n", "function"); - fprintf(ctx->sarif_file, " }\n"); + fprintf(ctx->sarif_file, " \"kind\": \"%s\"\n", "function"); + fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " ]\n"); + fprintf(ctx->sarif_file, " ]\n"); - fprintf(ctx->sarif_file, " }\n"); - fprintf(ctx->sarif_file, " ]\n"); + fprintf(ctx->sarif_file, " }\n"); + fprintf(ctx->sarif_file, " ]\n"); - fprintf(ctx->sarif_file, " }\n"); - } + fprintf(ctx->sarif_file, " }\n"); + } + return 1; } + void print_scope(struct scope_list* e) { - printf("--- begin of scope---\n"); - struct scope* p = e->head; - int level = 0; - while (p) - { - for (int i = 0; i < p->variables.capacity; i++) - { - if (p->variables.table[i]) - { - for (int k = 0; k < level; k++) - printf(" "); - printf("%s\n", p->variables.table[i]->key); - } - } - - for (int i = 0; i < p->tags.capacity; i++) - { - if (p->tags.table[i]) - { - for (int k = 0; k < level; k++) - printf(" "); - printf("tag %s\n", p->tags.table[i]->key); - } - } - - level++; - p = p->next; - } - printf("--- end of scope---\n"); + printf("--- begin of scope---\n"); + struct scope* p = e->head; + int level = 0; + while (p) + { + if(p->variables.table) //we start with capacity=5 and no allocations ? + { + for (int i = 0; i < p->variables.capacity; i++) + { + if (p->variables.table[i]) + { + for (int k = 0; k < level; k++) + printf(" "); + printf("%s\n", p->variables.table[i]->key); + } + } + } + + if(p->tags.table) //we start with capacity=1 and no allocations ? + { + for (int i = 0; i < p->tags.capacity; i++) + { + if (p->tags.table[i]) + { + for (int k = 0; k < level; k++) + printf(" "); + printf("tag %s\n", p->tags.table[i]->key); + } + } + } + + if(p == e->tail) break; //somehow we are going after tail + level++; + p = p->next; + } + printf("--- end of scope---\n"); } bool first_of_function_specifier_token(struct token* token) { - if (token == NULL) - return false; + if (token == NULL) + return false; - return token->type == TK_KEYWORD_INLINE || - token->type == TK_KEYWORD__NORETURN; + return token->type == TK_KEYWORD_INLINE || + token->type == TK_KEYWORD__NORETURN; } bool first_is(struct parser_ctx* ctx, enum token_type type) { - return ctx->current != NULL && ctx->current->type == type; + return ctx->current != NULL && ctx->current->type == type; } bool first_of_function_specifier(struct parser_ctx* ctx) { - return first_of_function_specifier_token(ctx->current); + return first_of_function_specifier_token(ctx->current); } bool first_of_enum_specifier_token(struct token* token) { - if (token == NULL) - return false; - return token->type == TK_KEYWORD_ENUM; + if (token == NULL) + return false; + return token->type == TK_KEYWORD_ENUM; } bool first_of_enum_specifier(struct parser_ctx* ctx) { - return first_of_enum_specifier_token(ctx->current); + return first_of_enum_specifier_token(ctx->current); } bool first_of_alignment_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; - return ctx->current->type == TK_KEYWORD__ALIGNAS; + if (ctx->current == NULL) + return false; + return ctx->current->type == TK_KEYWORD__ALIGNAS; } bool first_of_atomic_type_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - /* - If the _Atomic keyword is immediately followed by a left parenthesis, it is interpreted - as a type specifier (with a type name), not as a type qualifier. - */ + /* + If the _Atomic keyword is immediately followed by a left parenthesis, it is interpreted + as a type specifier (with a type name), not as a type qualifier. + */ - if (ctx->current->type == TK_KEYWORD__ATOMIC) - { - struct token* ahead = parser_look_ahead(ctx); - if (ahead != NULL) - { - return ahead->type == '('; + if (ctx->current->type == TK_KEYWORD__ATOMIC) + { + struct token* ahead = parser_look_ahead(ctx); + if (ahead != NULL) + { + return ahead->type == '('; - } - } - return false; + } + } + return false; } bool first_of_storage_class_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD_TYPEDEF || - ctx->current->type == TK_KEYWORD_CONSTEXPR || - ctx->current->type == TK_KEYWORD_EXTERN || - ctx->current->type == TK_KEYWORD_STATIC || - ctx->current->type == TK_KEYWORD__THREAD_LOCAL || - ctx->current->type == TK_KEYWORD_AUTO || - ctx->current->type == TK_KEYWORD_REGISTER; + return ctx->current->type == TK_KEYWORD_TYPEDEF || + ctx->current->type == TK_KEYWORD_CONSTEXPR || + ctx->current->type == TK_KEYWORD_EXTERN || + ctx->current->type == TK_KEYWORD_STATIC || + ctx->current->type == TK_KEYWORD__THREAD_LOCAL || + ctx->current->type == TK_KEYWORD_AUTO || + ctx->current->type == TK_KEYWORD_REGISTER; } bool first_of_struct_or_union_token(struct token* token) { - return token->type == TK_KEYWORD_STRUCT || token->type == TK_KEYWORD_UNION; + return token->type == TK_KEYWORD_STRUCT || token->type == TK_KEYWORD_UNION; } bool first_of_struct_or_union(struct parser_ctx* ctx) { - return first_of_struct_or_union_token(ctx->current); + return first_of_struct_or_union_token(ctx->current); } bool first_of_type_qualifier_token(struct token* p_token) { - if (p_token == NULL) - return false; + if (p_token == NULL) + return false; - return p_token->type == TK_KEYWORD_CONST || - p_token->type == TK_KEYWORD_RESTRICT || - p_token->type == TK_KEYWORD_VOLATILE || - p_token->type == TK_KEYWORD__ATOMIC || + return p_token->type == TK_KEYWORD_CONST || + p_token->type == TK_KEYWORD_RESTRICT || + p_token->type == TK_KEYWORD_VOLATILE || + p_token->type == TK_KEYWORD__ATOMIC || - /*extensions*/ - p_token->type == TK_KEYWORD__OUT || - p_token->type == TK_KEYWORD__OWNER || - p_token->type == TK_KEYWORD__OBJ_OWNER || - p_token->type == TK_KEYWORD__VIEW || - p_token->type == TK_KEYWORD__OPT; + /*extensions*/ + p_token->type == TK_KEYWORD__OUT || + p_token->type == TK_KEYWORD__OWNER || + p_token->type == TK_KEYWORD__OBJ_OWNER || + p_token->type == TK_KEYWORD__VIEW || + p_token->type == TK_KEYWORD__OPT; - //__fastcall - //__stdcall + //__fastcall + //__stdcall } bool first_of_type_qualifier(struct parser_ctx* ctx) { - return first_of_type_qualifier_token(ctx->current); + return first_of_type_qualifier_token(ctx->current); } @@ -741,153 +623,153 @@ bool first_of_type_qualifier(struct parser_ctx* ctx) struct map_entry* find_tag(struct parser_ctx* ctx, const char* lexeme) { - struct scope* scope = ctx->scopes.tail; - while (scope) - { - struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); - if (p_entry) - { - return p_entry; - } - scope = scope->previous; - } - return NULL; + struct scope* scope = ctx->scopes.tail; + while (scope) + { + struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); + if (p_entry) + { + return p_entry; + } + scope = scope->previous; + } + return NULL; } struct map_entry* find_variables(struct parser_ctx* ctx, const char* lexeme, struct scope** ppscope_opt) { - if (ppscope_opt != NULL) - *ppscope_opt = NULL; //out + if (ppscope_opt != NULL) + *ppscope_opt = NULL; //out - struct scope* scope = ctx->scopes.tail; - while (scope) - { - struct map_entry* p_entry = hashmap_find(&scope->variables, lexeme); - if (p_entry) - { - if (ppscope_opt) - *ppscope_opt = scope; - return p_entry; - } - scope = scope->previous; - } - return NULL; + struct scope* scope = ctx->scopes.tail; + while (scope) + { + struct map_entry* p_entry = hashmap_find(&scope->variables, lexeme); + if (p_entry) + { + if (ppscope_opt) + *ppscope_opt = scope; + return p_entry; + } + scope = scope->previous; + } + return NULL; } struct enum_specifier* find_enum_specifier(struct parser_ctx* ctx, const char* lexeme) { - struct enum_specifier* best = NULL; - struct scope* scope = ctx->scopes.tail; - while (scope) - { - struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); - if (p_entry && - p_entry->type == TAG_TYPE_ENUN_SPECIFIER) - { - best = p_entry->p; - if (best->enumerator_list.head != NULL) - return best; //OK bem completo - else - { - //nao eh completo vamos continuar subindo - } - - } - scope = scope->previous; - } - return best; //mesmo que nao seja tao completo vamos retornar. + struct enum_specifier* best = NULL; + struct scope* scope = ctx->scopes.tail; + while (scope) + { + struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); + if (p_entry && + p_entry->type == TAG_TYPE_ENUN_SPECIFIER) + { + best = p_entry->p; + if (best->enumerator_list.head != NULL) + return best; //OK bem completo + else + { + //nao eh completo vamos continuar subindo + } + + } + scope = scope->previous; + } + return best; //mesmo que nao seja tao completo vamos retornar. } struct struct_or_union_specifier* find_struct_or_union_specifier(struct parser_ctx* ctx, const char* lexeme) { - struct struct_or_union_specifier* p = NULL; - struct scope* scope = ctx->scopes.tail; - while (scope) - { - struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); - if (p_entry && - p_entry->type == TAG_TYPE_STRUCT_OR_UNION_SPECIFIER) - { - p = p_entry->p; - break; - } - scope = scope->previous; - } - return p; + struct struct_or_union_specifier* p = NULL; + struct scope* scope = ctx->scopes.tail; + while (scope) + { + struct map_entry* p_entry = hashmap_find(&scope->tags, lexeme); + if (p_entry && + p_entry->type == TAG_TYPE_STRUCT_OR_UNION_SPECIFIER) + { + p = p_entry->p; + break; + } + scope = scope->previous; + } + return p; } struct declarator* find_declarator(struct parser_ctx* ctx, const char* lexeme, struct scope** ppscope_opt) { - struct map_entry* p_entry = find_variables(ctx, lexeme, ppscope_opt); + struct map_entry* p_entry = find_variables(ctx, lexeme, ppscope_opt); - if (p_entry) - { - if (p_entry->type == TAG_TYPE_INIT_DECLARATOR) - { - struct init_declarator* p_init_declarator = p_entry->p; - return (struct declarator*)p_init_declarator->p_declarator; - } - else if (p_entry->type == TAG_TYPE_ONLY_DECLARATOR) - { - return p_entry->p; - } - } + if (p_entry) + { + if (p_entry->type == TAG_TYPE_INIT_DECLARATOR) + { + struct init_declarator* p_init_declarator = p_entry->p; + return (struct declarator*) p_init_declarator->p_declarator; + } + else if (p_entry->type == TAG_TYPE_ONLY_DECLARATOR) + { + return p_entry->p; + } + } - return NULL; + return NULL; } struct enumerator* find_enumerator(struct parser_ctx* ctx, const char* lexeme, struct scope** ppscope_opt) { - struct map_entry* p_entry = find_variables(ctx, lexeme, ppscope_opt); + struct map_entry* p_entry = find_variables(ctx, lexeme, ppscope_opt); - if (p_entry && p_entry->type == TAG_TYPE_ENUMERATOR) - return p_entry->p; + if (p_entry && p_entry->type == TAG_TYPE_ENUMERATOR) + return p_entry->p; - return NULL; + return NULL; } bool first_of_typedef_name(struct parser_ctx* ctx, struct token* p_token) { - if (p_token == NULL) - return false; - - if (p_token->type != TK_IDENTIFIER) - { - //nao precisa verificar - return false; - } - if (p_token->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) - { - //ja foi verificado que eh typedef - return true; - } - if (p_token->flags & TK_FLAG_IDENTIFIER_IS_NOT_TYPEDEF) - { - //ja foi verificado que NAO eh typedef - return false; - } - - - struct declarator* pdeclarator = find_declarator(ctx, p_token->lexeme, NULL); - - //pdeclarator->declaration_specifiers-> - if (pdeclarator && - pdeclarator->declaration_specifiers && - (pdeclarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_TYPEDEF)) - { - pdeclarator->num_uses++; - p_token->flags |= TK_FLAG_IDENTIFIER_IS_TYPEDEF; - return true; - } - else - { - p_token->flags |= TK_FLAG_IDENTIFIER_IS_NOT_TYPEDEF; - } - return false; + if (p_token == NULL) + return false; + + if (p_token->type != TK_IDENTIFIER) + { + //nao precisa verificar + return false; + } + if (p_token->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) + { + //ja foi verificado que eh typedef + return true; + } + if (p_token->flags & TK_FLAG_IDENTIFIER_IS_NOT_TYPEDEF) + { + //ja foi verificado que NAO eh typedef + return false; + } + + + struct declarator* pdeclarator = find_declarator(ctx, p_token->lexeme, NULL); + + //pdeclarator->declaration_specifiers-> + if (pdeclarator && + pdeclarator->declaration_specifiers && + (pdeclarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_TYPEDEF)) + { + pdeclarator->num_uses++; + p_token->flags |= TK_FLAG_IDENTIFIER_IS_TYPEDEF; + return true; + } + else + { + p_token->flags |= TK_FLAG_IDENTIFIER_IS_NOT_TYPEDEF; + } + return false; } bool first_of_type_specifier(struct parser_ctx* ctx); @@ -897,752 +779,758 @@ bool first_of_type_specifier_token(struct parser_ctx* ctx, struct token* token); bool first_of_type_name_ahead(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - if (ctx->current->type != '(') - return false; - struct token* token_ahead = parser_look_ahead(ctx); - return first_of_type_specifier_token(ctx, token_ahead) || - first_of_type_qualifier_token(token_ahead); + if (ctx->current->type != '(') + return false; + struct token* token_ahead = parser_look_ahead(ctx); + return first_of_type_specifier_token(ctx, token_ahead) || + first_of_type_qualifier_token(token_ahead); } bool first_of_type_name(struct parser_ctx* ctx) { - return first_of_type_specifier(ctx) || first_of_type_qualifier(ctx); + return first_of_type_specifier(ctx) || first_of_type_qualifier(ctx); } bool first_of_type_specifier_token(struct parser_ctx* ctx, struct token* p_token) { - if (p_token == NULL) - return false; - - //if (ctx->) - return p_token->type == TK_KEYWORD_VOID || - p_token->type == TK_KEYWORD_CHAR || - p_token->type == TK_KEYWORD_SHORT || - p_token->type == TK_KEYWORD_INT || - p_token->type == TK_KEYWORD_LONG || - - //microsoft extension - p_token->type == TK_KEYWORD__INT8 || - p_token->type == TK_KEYWORD__INT16 || - p_token->type == TK_KEYWORD__INT32 || - p_token->type == TK_KEYWORD__INT64 || - //end microsoft - - p_token->type == TK_KEYWORD_FLOAT || - p_token->type == TK_KEYWORD_DOUBLE || - p_token->type == TK_KEYWORD_SIGNED || - p_token->type == TK_KEYWORD_UNSIGNED || - p_token->type == TK_KEYWORD__BOOL || - p_token->type == TK_KEYWORD__COMPLEX || - p_token->type == TK_KEYWORD__DECIMAL32 || - p_token->type == TK_KEYWORD__DECIMAL64 || - p_token->type == TK_KEYWORD__DECIMAL128 || - p_token->type == TK_KEYWORD_TYPEOF || //C23 - p_token->type == TK_KEYWORD_TYPEOF_UNQUAL || //C23 - first_of_atomic_type_specifier(ctx) || - first_of_struct_or_union_token(p_token) || - first_of_enum_specifier_token(p_token) || - first_of_typedef_name(ctx, p_token); + if (p_token == NULL) + return false; + + //if (ctx->) + return p_token->type == TK_KEYWORD_VOID || + p_token->type == TK_KEYWORD_CHAR || + p_token->type == TK_KEYWORD_SHORT || + p_token->type == TK_KEYWORD_INT || + p_token->type == TK_KEYWORD_LONG || + + //microsoft extension + p_token->type == TK_KEYWORD__INT8 || + p_token->type == TK_KEYWORD__INT16 || + p_token->type == TK_KEYWORD__INT32 || + p_token->type == TK_KEYWORD__INT64 || + //end microsoft + + p_token->type == TK_KEYWORD_FLOAT || + p_token->type == TK_KEYWORD_DOUBLE || + p_token->type == TK_KEYWORD_SIGNED || + p_token->type == TK_KEYWORD_UNSIGNED || + p_token->type == TK_KEYWORD__BOOL || + p_token->type == TK_KEYWORD__COMPLEX || + p_token->type == TK_KEYWORD__DECIMAL32 || + p_token->type == TK_KEYWORD__DECIMAL64 || + p_token->type == TK_KEYWORD__DECIMAL128 || + p_token->type == TK_KEYWORD_TYPEOF || //C23 + p_token->type == TK_KEYWORD_TYPEOF_UNQUAL || //C23 + first_of_atomic_type_specifier(ctx) || + first_of_struct_or_union_token(p_token) || + first_of_enum_specifier_token(p_token) || + first_of_typedef_name(ctx, p_token); } bool first_of_type_specifier(struct parser_ctx* ctx) { - return first_of_type_specifier_token(ctx, ctx->current); + return first_of_type_specifier_token(ctx, ctx->current); } bool first_of_type_specifier_qualifier(struct parser_ctx* ctx) { - return first_of_type_specifier(ctx) || - first_of_type_qualifier(ctx) || - first_of_alignment_specifier(ctx); + return first_of_type_specifier(ctx) || + first_of_type_qualifier(ctx) || + first_of_alignment_specifier(ctx); } bool first_of_compound_statement(struct parser_ctx* ctx) { - return first_is(ctx, '{'); + return first_is(ctx, '{'); } bool first_of_jump_statement(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD_GOTO || - ctx->current->type == TK_KEYWORD_CONTINUE || - ctx->current->type == TK_KEYWORD_BREAK || - ctx->current->type == TK_KEYWORD_RETURN || - ctx->current->type == TK_KEYWORD_THROW /*extension*/; + return ctx->current->type == TK_KEYWORD_GOTO || + ctx->current->type == TK_KEYWORD_CONTINUE || + ctx->current->type == TK_KEYWORD_BREAK || + ctx->current->type == TK_KEYWORD_RETURN || + ctx->current->type == TK_KEYWORD_THROW /*extension*/; } bool first_of_selection_statement(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD_IF || - ctx->current->type == TK_KEYWORD_SWITCH; + return ctx->current->type == TK_KEYWORD_IF || + ctx->current->type == TK_KEYWORD_SWITCH; } bool first_of_iteration_statement(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return - ctx->current->type == TK_KEYWORD_WHILE || - ctx->current->type == TK_KEYWORD_DO || - ctx->current->type == TK_KEYWORD_FOR; + return + ctx->current->type == TK_KEYWORD_WHILE || + ctx->current->type == TK_KEYWORD_DO || + ctx->current->type == TK_KEYWORD_FOR; } bool first_of_label(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - if (ctx->current->type == TK_IDENTIFIER) - { - struct token* next = parser_look_ahead(ctx); - return next && next->type == ':'; - } - else if (ctx->current->type == TK_KEYWORD_CASE) - { - return true; - } - else if (ctx->current->type == TK_KEYWORD_DEFAULT) - { - return true; - } + if (ctx->current->type == TK_IDENTIFIER) + { + struct token* next = parser_look_ahead(ctx); + return next && next->type == ':'; + } + else if (ctx->current->type == TK_KEYWORD_CASE) + { + return true; + } + else if (ctx->current->type == TK_KEYWORD_DEFAULT) + { + return true; + } - return false; + return false; } bool first_of_declaration_specifier(struct parser_ctx* ctx) { - /* - declaration-specifier: - storage-class-specifier - type-specifier-qualifier - function-specifier - */ - return first_of_storage_class_specifier(ctx) || - first_of_function_specifier(ctx) || - first_of_type_specifier_qualifier(ctx); + /* + declaration-specifier: + storage-class-specifier + type-specifier-qualifier + function-specifier + */ + return first_of_storage_class_specifier(ctx) || + first_of_function_specifier(ctx) || + first_of_type_specifier_qualifier(ctx); } bool first_of_static_assert_declaration(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD__STATIC_ASSERT || - ctx->current->type == TK_KEYWORD_STATIC_DEBUG || - ctx->current->type == TK_KEYWORD_STATIC_STATE || - ctx->current->type == TK_KEYWORD_STATIC_SET; + return ctx->current->type == TK_KEYWORD__STATIC_ASSERT || + ctx->current->type == TK_KEYWORD_STATIC_DEBUG || + ctx->current->type == TK_KEYWORD_STATIC_STATE || + ctx->current->type == TK_KEYWORD_STATIC_SET; } bool first_of_attribute_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - if (ctx->current->type != '[') - { - return false; - } - struct token* p_token = parser_look_ahead(ctx); - return p_token != NULL && p_token->type == '['; + if (ctx->current->type != '[') + { + return false; + } + struct token* p_token = parser_look_ahead(ctx); + return p_token != NULL && p_token->type == '['; } bool first_of_labeled_statement(struct parser_ctx* ctx) { - return first_of_label(ctx); + return first_of_label(ctx); } bool first_of_designator(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == '[' || ctx->current->type == '.'; + return ctx->current->type == '[' || ctx->current->type == '.'; } struct token* previous_parser_token(struct token* token) { - if (token == NULL) - { - return NULL; - } - struct token* r = token->prev; - while (!(r->flags & TK_FLAG_FINAL)) - { - r = r->prev; - } + if (token == NULL) + { + return NULL; + } + struct token* r = token->prev; + while (!(r->flags & TK_FLAG_FINAL)) + { + r = r->prev; + } - return r; + return r; } enum token_type is_keyword(const char* text) { - enum token_type result = 0; - switch (text[0]) - { - case 'a': - if (strcmp("alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; - else if (strcmp("auto", text) == 0) result = TK_KEYWORD_AUTO; - else if (strcmp("alignas", text) == 0) result = TK_KEYWORD__ALIGNAS; /*C23 alternate spelling _Alignas*/ - else if (strcmp("alignof", text) == 0) result = TK_KEYWORD__ALIGNAS; /*C23 alternate spelling _Alignof*/ - else if (strcmp("assert", text) == 0) result = TK_KEYWORD_ASSERT; /*extension*/ - break; - case 'b': - if (strcmp("break", text) == 0) result = TK_KEYWORD_BREAK; - else if (strcmp("bool", text) == 0) result = TK_KEYWORD__BOOL; /*C23 alternate spelling _Bool*/ - - break; - case 'c': - if (strcmp("case", text) == 0) result = TK_KEYWORD_CASE; - else if (strcmp("char", text) == 0) result = TK_KEYWORD_CHAR; - else if (strcmp("const", text) == 0) result = TK_KEYWORD_CONST; - else if (strcmp("constexpr", text) == 0) result = TK_KEYWORD_CONSTEXPR; - else if (strcmp("continue", text) == 0) result = TK_KEYWORD_CONTINUE; - else if (strcmp("catch", text) == 0) result = TK_KEYWORD_CATCH; - break; - case 'd': - if (strcmp("default", text) == 0) result = TK_KEYWORD_DEFAULT; - else if (strcmp("do", text) == 0) result = TK_KEYWORD_DO; - else if (strcmp("defer", text) == 0) result = TK_KEYWORD_DEFER; - else if (strcmp("double", text) == 0) result = TK_KEYWORD_DOUBLE; - break; - case 'e': - if (strcmp("else", text) == 0) result = TK_KEYWORD_ELSE; - else if (strcmp("enum", text) == 0) result = TK_KEYWORD_ENUM; - else if (strcmp("extern", text) == 0) result = TK_KEYWORD_EXTERN; - break; - case 'f': - if (strcmp("float", text) == 0) result = TK_KEYWORD_FLOAT; - else if (strcmp("for", text) == 0) result = TK_KEYWORD_FOR; - else if (strcmp("false", text) == 0) result = TK_KEYWORD_FALSE; - break; - case 'g': - if (strcmp("goto", text) == 0) result = TK_KEYWORD_GOTO; - break; - case 'i': - if (strcmp("if", text) == 0) result = TK_KEYWORD_IF; - else if (strcmp("inline", text) == 0) result = TK_KEYWORD_INLINE; - else if (strcmp("int", text) == 0) result = TK_KEYWORD_INT; - break; - case 'n': - if (strcmp("nullptr", text) == 0) result = TK_KEYWORD_NULLPTR; - break; - - - case 'l': - if (strcmp("long", text) == 0) result = TK_KEYWORD_LONG; - break; - case 'r': - if (strcmp("register", text) == 0) result = TK_KEYWORD_REGISTER; - else if (strcmp("restrict", text) == 0) result = TK_KEYWORD_RESTRICT; - else if (strcmp("return", text) == 0) result = TK_KEYWORD_RETURN; - - break; - case 's': - if (strcmp("short", text) == 0) result = TK_KEYWORD_SHORT; - else if (strcmp("signed", text) == 0) result = TK_KEYWORD_SIGNED; - else if (strcmp("sizeof", text) == 0) result = TK_KEYWORD_SIZEOF; - else if (strcmp("static", text) == 0) result = TK_KEYWORD_STATIC; - else if (strcmp("struct", text) == 0) result = TK_KEYWORD_STRUCT; - else if (strcmp("switch", text) == 0) result = TK_KEYWORD_SWITCH; - else if (strcmp("static_assert", text) == 0) result = TK_KEYWORD__STATIC_ASSERT; /*C23 alternate spelling _Static_assert*/ - else if (strcmp("static_debug", text) == 0) result = TK_KEYWORD_STATIC_DEBUG; - else if (strcmp("static_state", text) == 0) result = TK_KEYWORD_STATIC_STATE; - else if (strcmp("static_set", text) == 0) result = TK_KEYWORD_STATIC_SET; - - break; - case 't': - if (strcmp("typedef", text) == 0) result = TK_KEYWORD_TYPEDEF; - else if (strcmp("typeof", text) == 0) result = TK_KEYWORD_TYPEOF; /*C23*/ - else if (strcmp("typeof_unqual", text) == 0) result = TK_KEYWORD_TYPEOF_UNQUAL; /*C23*/ - else if (strcmp("true", text) == 0) result = TK_KEYWORD_TRUE; /*C23*/ - else if (strcmp("thread_local", text) == 0) result = TK_KEYWORD__THREAD_LOCAL; /*C23 alternate spelling _Thread_local*/ - else if (strcmp("try", text) == 0) result = TK_KEYWORD_TRY; - else if (strcmp("throw", text) == 0) result = TK_KEYWORD_THROW; - break; - case 'u': - if (strcmp("union", text) == 0) result = TK_KEYWORD_UNION; - else if (strcmp("unsigned", text) == 0) result = TK_KEYWORD_UNSIGNED; - break; - case 'v': - if (strcmp("void", text) == 0) result = TK_KEYWORD_VOID; - else if (strcmp("volatile", text) == 0) result = TK_KEYWORD_VOLATILE; - - break; - case 'w': - if (strcmp("while", text) == 0) result = TK_KEYWORD_WHILE; - break; - case '_': - - - //begin microsoft - if (strcmp("__int8", text) == 0) result = TK_KEYWORD__INT8; - else if (strcmp("__int16", text) == 0) result = TK_KEYWORD__INT16; - else if (strcmp("__int32", text) == 0) result = TK_KEYWORD__INT32; - else if (strcmp("__int64", text) == 0) result = TK_KEYWORD__INT64; - else if (strcmp("__forceinline", text) == 0) result = TK_KEYWORD_INLINE; - else if (strcmp("__inline", text) == 0) result = TK_KEYWORD_INLINE; - else if (strcmp("_asm", text) == 0 || strcmp("__asm", text) == 0) result = TK_KEYWORD__ASM; - else if (strcmp("__alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; - // - //end microsoft - - /*ownership*/ - else if (strcmp("_Out", text) == 0) result = TK_KEYWORD__OUT; /*extension*/ - else if (strcmp("_Owner", text) == 0) result = TK_KEYWORD__OWNER; /*extension*/ - else if (strcmp("_Obj_owner", text) == 0) result = TK_KEYWORD__OBJ_OWNER; /*extension*/ - else if (strcmp("_Opt", text) == 0) result = TK_KEYWORD__OPT; /*extension*/ - else if (strcmp("_View", text) == 0) result = TK_KEYWORD__VIEW; /*extension*/ - - /*EXPERIMENTAL EXTENSION*/ - else if (strcmp("_has_attr", text) == 0) result = TK_KEYWORD_ATTR_HAS; - else if (strcmp("_add_attr", text) == 0) result = TK_KEYWORD_ATTR_ADD; - else if (strcmp("_del_attr", text) == 0) result = TK_KEYWORD_ATTR_REMOVE; - /*EXPERIMENTAL EXTENSION*/ - - /*TRAITS EXTENSION*/ - else if (strcmp("_is_lvalue", text) == 0) result = TK_KEYWORD_IS_LVALUE; - else if (strcmp("_is_const", text) == 0) result = TK_KEYWORD_IS_CONST; - else if (strcmp("_is_owner", text) == 0) result = TK_KEYWORD_IS_OWNER; - else if (strcmp("_is_pointer", text) == 0) result = TK_KEYWORD_IS_POINTER; - else if (strcmp("_is_array", text) == 0) result = TK_KEYWORD_IS_ARRAY; - else if (strcmp("_is_function", text) == 0) result = TK_KEYWORD_IS_FUNCTION; - else if (strcmp("_is_arithmetic", text) == 0) result = TK_KEYWORD_IS_ARITHMETIC; - else if (strcmp("_is_floating_point", text) == 0) result = TK_KEYWORD_IS_FLOATING_POINT; - else if (strcmp("_is_integral", text) == 0) result = TK_KEYWORD_IS_INTEGRAL; - else if (strcmp("_is_scalar", text) == 0) result = TK_KEYWORD_IS_SCALAR; - /*TRAITS EXTENSION*/ - - else if (strcmp("_Alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; - else if (strcmp("_Alignas", text) == 0) result = TK_KEYWORD__ALIGNAS; - else if (strcmp("_Atomic", text) == 0) result = TK_KEYWORD__ATOMIC; - else if (strcmp("_Bool", text) == 0) result = TK_KEYWORD__BOOL; - else if (strcmp("_Complex", text) == 0) result = TK_KEYWORD__COMPLEX; - else if (strcmp("_Decimal128", text) == 0) result = TK_KEYWORD__DECIMAL32; - else if (strcmp("_Decimal64", text) == 0) result = TK_KEYWORD__DECIMAL64; - else if (strcmp("_Decimal128", text) == 0) result = TK_KEYWORD__DECIMAL128; - else if (strcmp("_Generic", text) == 0) result = TK_KEYWORD__GENERIC; - else if (strcmp("_Imaginary", text) == 0) result = TK_KEYWORD__IMAGINARY; - else if (strcmp("_Noreturn", text) == 0) result = TK_KEYWORD__NORETURN; /*_Noreturn deprecated C23*/ - else if (strcmp("_Static_assert", text) == 0) result = TK_KEYWORD__STATIC_ASSERT; - else if (strcmp("_Thread_local", text) == 0) result = TK_KEYWORD__THREAD_LOCAL; - else if (strcmp("_BitInt", text) == 0) result = TK_KEYWORD__BITINT; /*(C23)*/ - - - - break; - default: - break; - } - return result; + enum token_type result = 0; + switch (text[0]) + { + case 'a': + if (strcmp("alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; + else if (strcmp("auto", text) == 0) result = TK_KEYWORD_AUTO; + else if (strcmp("alignas", text) == 0) result = TK_KEYWORD__ALIGNAS; /*C23 alternate spelling _Alignas*/ + else if (strcmp("alignof", text) == 0) result = TK_KEYWORD__ALIGNAS; /*C23 alternate spelling _Alignof*/ + else if (strcmp("assert", text) == 0) result = TK_KEYWORD_ASSERT; /*extension*/ +#ifdef CAKE_ASSERT_IS_KEYWORD + else if (strcmp("assert", text) == 0) result = TK_KEYWORD_ASSERT; /*extension*/ +#endif + break; + case 'b': + if (strcmp("break", text) == 0) result = TK_KEYWORD_BREAK; + else if (strcmp("bool", text) == 0) result = TK_KEYWORD__BOOL; /*C23 alternate spelling _Bool*/ + + break; + case 'c': + if (strcmp("case", text) == 0) result = TK_KEYWORD_CASE; + else if (strcmp("char", text) == 0) result = TK_KEYWORD_CHAR; + else if (strcmp("const", text) == 0) result = TK_KEYWORD_CONST; + else if (strcmp("constexpr", text) == 0) result = TK_KEYWORD_CONSTEXPR; + else if (strcmp("continue", text) == 0) result = TK_KEYWORD_CONTINUE; + else if (strcmp("catch", text) == 0) result = TK_KEYWORD_CATCH; + break; + case 'd': + if (strcmp("default", text) == 0) result = TK_KEYWORD_DEFAULT; + else if (strcmp("do", text) == 0) result = TK_KEYWORD_DO; + else if (strcmp("defer", text) == 0) result = TK_KEYWORD_DEFER; + else if (strcmp("double", text) == 0) result = TK_KEYWORD_DOUBLE; + break; + case 'e': + if (strcmp("else", text) == 0) result = TK_KEYWORD_ELSE; + else if (strcmp("enum", text) == 0) result = TK_KEYWORD_ENUM; + else if (strcmp("extern", text) == 0) result = TK_KEYWORD_EXTERN; + break; + case 'f': + if (strcmp("float", text) == 0) result = TK_KEYWORD_FLOAT; + else if (strcmp("for", text) == 0) result = TK_KEYWORD_FOR; + else if (strcmp("false", text) == 0) result = TK_KEYWORD_FALSE; + break; + case 'g': + if (strcmp("goto", text) == 0) result = TK_KEYWORD_GOTO; + break; + case 'i': + if (strcmp("if", text) == 0) result = TK_KEYWORD_IF; + else if (strcmp("inline", text) == 0) result = TK_KEYWORD_INLINE; + else if (strcmp("int", text) == 0) result = TK_KEYWORD_INT; + break; + case 'n': + if (strcmp("nullptr", text) == 0) result = TK_KEYWORD_NULLPTR; + break; + + + case 'l': + if (strcmp("long", text) == 0) result = TK_KEYWORD_LONG; + break; + case 'r': + if (strcmp("register", text) == 0) result = TK_KEYWORD_REGISTER; + else if (strcmp("restrict", text) == 0) result = TK_KEYWORD_RESTRICT; + else if (strcmp("return", text) == 0) result = TK_KEYWORD_RETURN; + + break; + case 's': + if (strcmp("short", text) == 0) result = TK_KEYWORD_SHORT; + else if (strcmp("signed", text) == 0) result = TK_KEYWORD_SIGNED; + else if (strcmp("sizeof", text) == 0) result = TK_KEYWORD_SIZEOF; + else if (strcmp("static", text) == 0) result = TK_KEYWORD_STATIC; + else if (strcmp("struct", text) == 0) result = TK_KEYWORD_STRUCT; + else if (strcmp("switch", text) == 0) result = TK_KEYWORD_SWITCH; + else if (strcmp("static_assert", text) == 0) result = TK_KEYWORD__STATIC_ASSERT; /*C23 alternate spelling _Static_assert*/ + else if (strcmp("static_debug", text) == 0) result = TK_KEYWORD_STATIC_DEBUG; + else if (strcmp("static_state", text) == 0) result = TK_KEYWORD_STATIC_STATE; + else if (strcmp("static_set", text) == 0) result = TK_KEYWORD_STATIC_SET; + + break; + case 't': + if (strcmp("typedef", text) == 0) result = TK_KEYWORD_TYPEDEF; + else if (strcmp("typeof", text) == 0) result = TK_KEYWORD_TYPEOF; /*C23*/ + else if (strcmp("typeof_unqual", text) == 0) result = TK_KEYWORD_TYPEOF_UNQUAL; /*C23*/ + else if (strcmp("true", text) == 0) result = TK_KEYWORD_TRUE; /*C23*/ + else if (strcmp("thread_local", text) == 0) result = TK_KEYWORD__THREAD_LOCAL; /*C23 alternate spelling _Thread_local*/ + else if (strcmp("try", text) == 0) result = TK_KEYWORD_TRY; + else if (strcmp("throw", text) == 0) result = TK_KEYWORD_THROW; + break; + case 'u': + if (strcmp("union", text) == 0) result = TK_KEYWORD_UNION; + else if (strcmp("unsigned", text) == 0) result = TK_KEYWORD_UNSIGNED; + break; + case 'v': + if (strcmp("void", text) == 0) result = TK_KEYWORD_VOID; + else if (strcmp("volatile", text) == 0) result = TK_KEYWORD_VOLATILE; + + break; + case 'w': + if (strcmp("while", text) == 0) result = TK_KEYWORD_WHILE; + break; + case '_': + + + //begin microsoft + if (strcmp("__int8", text) == 0) result = TK_KEYWORD__INT8; + else if (strcmp("__int16", text) == 0) result = TK_KEYWORD__INT16; + else if (strcmp("__int32", text) == 0) result = TK_KEYWORD__INT32; + else if (strcmp("__int64", text) == 0) result = TK_KEYWORD__INT64; + else if (strcmp("__forceinline", text) == 0) result = TK_KEYWORD_INLINE; + else if (strcmp("__inline", text) == 0) result = TK_KEYWORD_INLINE; + else if (strcmp("_asm", text) == 0 || strcmp("__asm", text) == 0 + || strcmp("__asm__", text) == 0) result = TK_KEYWORD__ASM; + else if (strcmp("__alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; + // + //end microsoft + + /*ownership*/ + else if (strcmp("_Out", text) == 0) result = TK_KEYWORD__OUT; /*extension*/ + else if (strcmp("_Owner", text) == 0) result = TK_KEYWORD__OWNER; /*extension*/ + else if (strcmp("_Obj_owner", text) == 0) result = TK_KEYWORD__OBJ_OWNER; /*extension*/ + else if (strcmp("_Opt", text) == 0) result = TK_KEYWORD__OPT; /*extension*/ + else if (strcmp("_View", text) == 0) result = TK_KEYWORD__VIEW; /*extension*/ + + /*EXPERIMENTAL EXTENSION*/ + else if (strcmp("_has_attr", text) == 0) result = TK_KEYWORD_ATTR_HAS; + else if (strcmp("_add_attr", text) == 0) result = TK_KEYWORD_ATTR_ADD; + else if (strcmp("_del_attr", text) == 0) result = TK_KEYWORD_ATTR_REMOVE; + /*EXPERIMENTAL EXTENSION*/ + + /*TRAITS EXTENSION*/ + else if (strcmp("_is_lvalue", text) == 0) result = TK_KEYWORD_IS_LVALUE; + else if (strcmp("_is_const", text) == 0) result = TK_KEYWORD_IS_CONST; + else if (strcmp("_is_owner", text) == 0) result = TK_KEYWORD_IS_OWNER; + else if (strcmp("_is_pointer", text) == 0) result = TK_KEYWORD_IS_POINTER; + else if (strcmp("_is_array", text) == 0) result = TK_KEYWORD_IS_ARRAY; + else if (strcmp("_is_function", text) == 0) result = TK_KEYWORD_IS_FUNCTION; + else if (strcmp("_is_arithmetic", text) == 0) result = TK_KEYWORD_IS_ARITHMETIC; + else if (strcmp("_is_floating_point", text) == 0) result = TK_KEYWORD_IS_FLOATING_POINT; + else if (strcmp("_is_integral", text) == 0) result = TK_KEYWORD_IS_INTEGRAL; + else if (strcmp("_is_scalar", text) == 0) result = TK_KEYWORD_IS_SCALAR; + /*TRAITS EXTENSION*/ + + else if (strcmp("_Alignof", text) == 0) result = TK_KEYWORD__ALIGNOF; + else if (strcmp("_Alignas", text) == 0) result = TK_KEYWORD__ALIGNAS; + else if (strcmp("_Atomic", text) == 0) result = TK_KEYWORD__ATOMIC; + else if (strcmp("_Bool", text) == 0) result = TK_KEYWORD__BOOL; + else if (strcmp("_Complex", text) == 0) result = TK_KEYWORD__COMPLEX; + else if (strcmp("_Decimal128", text) == 0) result = TK_KEYWORD__DECIMAL32; + else if (strcmp("_Decimal64", text) == 0) result = TK_KEYWORD__DECIMAL64; + else if (strcmp("_Decimal128", text) == 0) result = TK_KEYWORD__DECIMAL128; + else if (strcmp("_Generic", text) == 0) result = TK_KEYWORD__GENERIC; + else if (strcmp("_Imaginary", text) == 0) result = TK_KEYWORD__IMAGINARY; + else if (strcmp("_Noreturn", text) == 0) result = TK_KEYWORD__NORETURN; /*_Noreturn deprecated C23*/ + else if (strcmp("_Static_assert", text) == 0) result = TK_KEYWORD__STATIC_ASSERT; + else if (strcmp("_Thread_local", text) == 0) result = TK_KEYWORD__THREAD_LOCAL; + else if (strcmp("_BitInt", text) == 0) result = TK_KEYWORD__BITINT; /*(C23)*/ + + else if (strcmp("__typeof__", text) == 0) result = TK_KEYWORD_TYPEOF; /*C23*/ + + + + break; + default: + break; + } + return result; } static void token_promote(struct token* token) { - if (token->type == TK_IDENTIFIER_RECURSIVE_MACRO) - { - //talvez desse para remover antesisso.. - //assim que sai do tetris - //virou passado - token->type = TK_IDENTIFIER; /*nao precisamos mais disso*/ - } - - if (token->type == TK_IDENTIFIER) - { - enum token_type t = is_keyword(token->lexeme); - if (t != TK_NONE) - token->type = t; - } - else if (token->type == TK_PPNUMBER) - { - token->type = parse_number(token->lexeme, NULL); - } + if (token->type == TK_IDENTIFIER_RECURSIVE_MACRO) + { + //talvez desse para remover antesisso.. + //assim que sai do tetris + //virou passado + token->type = TK_IDENTIFIER; /*nao precisamos mais disso*/ + } + + if (token->type == TK_IDENTIFIER) + { + enum token_type t = is_keyword(token->lexeme); + if (t != TK_NONE) + token->type = t; + } + else if (token->type == TK_PPNUMBER) + { + token->type = parse_number(token->lexeme, NULL); + } } struct token* parser_look_ahead(struct parser_ctx* ctx) { - struct token* p = ctx->current->next; - while (p && !(p->flags & TK_FLAG_FINAL)) - { - p = p->next; - } + struct token* p = ctx->current->next; + while (p && !(p->flags & TK_FLAG_FINAL)) + { + p = p->next; + } - if (p) - { + if (p) + { - token_promote(p); - } + token_promote(p); + } - return p; + return p; } bool is_binary_digit(struct stream* stream) { - return stream->current[0] >= '0' && stream->current[0] <= '1'; + return stream->current[0] >= '0' && stream->current[0] <= '1'; } bool is_hexadecimal_digit(struct stream* stream) { - return (stream->current[0] >= '0' && stream->current[0] <= '9') || - (stream->current[0] >= 'a' && stream->current[0] <= 'f') || - (stream->current[0] >= 'A' && stream->current[0] <= 'F'); + return (stream->current[0] >= '0' && stream->current[0] <= '9') || + (stream->current[0] >= 'a' && stream->current[0] <= 'f') || + (stream->current[0] >= 'A' && stream->current[0] <= 'F'); } bool is_octal_digit(struct stream* stream) { - return stream->current[0] >= '0' && stream->current[0] <= '7'; + return stream->current[0] >= '0' && stream->current[0] <= '7'; } void digit_sequence(struct stream* stream) { - while (is_digit(stream)) - { - stream_match(stream); - } + while (is_digit(stream)) + { + stream_match(stream); + } } static void binary_exponent_part(struct stream* stream) { - //p signopt digit - sequence - //P signopt digit - sequence + //p signopt digit - sequence + //P signopt digit - sequence - stream_match(stream); //p or P - if (stream->current[0] == '+' || stream->current[0] == '-') - { - stream_match(stream); //p or P - } - digit_sequence(stream); + stream_match(stream); //p or P + if (stream->current[0] == '+' || stream->current[0] == '-') + { + stream_match(stream); //p or P + } + digit_sequence(stream); } void hexadecimal_digit_sequence(struct stream* stream) { - /* - hexadecimal-digit-sequence: - hexadecimal-digit - hexadecimal-digit ’opt hexadecimal-digit - */ - - stream_match(stream); - while (stream->current[0] == '\'' || - is_hexadecimal_digit(stream)) - { - if (stream->current[0] == '\'') - { - stream_match(stream); - if (!is_hexadecimal_digit(stream)) - { - //erro - } - stream_match(stream); - } - else - stream_match(stream); - } + /* + hexadecimal-digit-sequence: + hexadecimal-digit + hexadecimal-digit ’opt hexadecimal-digit + */ + + stream_match(stream); + while (stream->current[0] == '\'' || + is_hexadecimal_digit(stream)) + { + if (stream->current[0] == '\'') + { + stream_match(stream); + if (!is_hexadecimal_digit(stream)) + { + //erro + } + stream_match(stream); + } + else + stream_match(stream); + } } bool first_of_unsigned_suffix(struct stream* stream) { - /* - unsigned-suffix: one of - u U - */ - return (stream->current[0] == 'u' || - stream->current[0] == 'U'); + /* + unsigned-suffix: one of + u U + */ + return (stream->current[0] == 'u' || + stream->current[0] == 'U'); } void unsigned_suffix_opt(struct stream* stream) { - /* + /* unsigned-suffix: one of - u U + u U */ - if (stream->current[0] == 'u' || - stream->current[0] == 'U') - { - stream_match(stream); - } + if (stream->current[0] == 'u' || + stream->current[0] == 'U') + { + stream_match(stream); + } } void integer_suffix_opt(struct stream* stream, enum type_specifier_flags* flags_opt) { - /* - integer-suffix: - unsigned-suffix long-suffixopt - unsigned-suffix long-long-suffix - long-suffix unsigned-suffixopt - long-long-suffix unsigned-suffixopt - */ - - if (/*unsigned-suffix*/ - stream->current[0] == 'U' || stream->current[0] == 'u') - { - stream_match(stream); - - if (flags_opt) - { - *flags_opt |= TYPE_SPECIFIER_UNSIGNED; - } - - /*long-suffixopt*/ - if (stream->current[0] == 'l' || stream->current[0] == 'L') - { - if (flags_opt) - { - *flags_opt = *flags_opt & ~TYPE_SPECIFIER_INT; - *flags_opt |= TYPE_SPECIFIER_LONG; - } - stream_match(stream); - } - - /*long-long-suffix*/ - if (stream->current[0] == 'l' || stream->current[0] == 'L') - { - if (flags_opt) - { - *flags_opt = *flags_opt & ~TYPE_SPECIFIER_LONG; - *flags_opt |= TYPE_SPECIFIER_LONG_LONG; - } - - stream_match(stream); - } - } - else if ((stream->current[0] == 'l' || stream->current[0] == 'L')) - { - if (flags_opt) - { - *flags_opt = *flags_opt & ~TYPE_SPECIFIER_INT; - *flags_opt |= TYPE_SPECIFIER_LONG; - } - - /*long-suffix*/ - stream_match(stream); - - /*long-long-suffix*/ - if ((stream->current[0] == 'l' || stream->current[0] == 'L')) - { - if (flags_opt) - { - *flags_opt = *flags_opt & ~TYPE_SPECIFIER_LONG; - *flags_opt |= TYPE_SPECIFIER_LONG_LONG; - } - stream_match(stream); - } - - if (/*unsigned-suffix*/ - stream->current[0] == 'U' || stream->current[0] == 'u') - { - if (flags_opt) - { - *flags_opt |= TYPE_SPECIFIER_UNSIGNED; - } - stream_match(stream); - } - } + /* + integer-suffix: + unsigned-suffix long-suffixopt + unsigned-suffix long-long-suffix + long-suffix unsigned-suffixopt + long-long-suffix unsigned-suffixopt + */ + + if (/*unsigned-suffix*/ + stream->current[0] == 'U' || stream->current[0] == 'u') + { + stream_match(stream); + + if (flags_opt) + { + *flags_opt |= TYPE_SPECIFIER_UNSIGNED; + } + + /*long-suffixopt*/ + if (stream->current[0] == 'l' || stream->current[0] == 'L') + { + if (flags_opt) + { + *flags_opt = *flags_opt & ~TYPE_SPECIFIER_INT; + *flags_opt |= TYPE_SPECIFIER_LONG; + } + stream_match(stream); + } + + /*long-long-suffix*/ + if (stream->current[0] == 'l' || stream->current[0] == 'L') + { + if (flags_opt) + { + *flags_opt = *flags_opt & ~TYPE_SPECIFIER_LONG; + *flags_opt |= TYPE_SPECIFIER_LONG_LONG; + } + + stream_match(stream); + } + } + else if ((stream->current[0] == 'l' || stream->current[0] == 'L')) + { + if (flags_opt) + { + *flags_opt = *flags_opt & ~TYPE_SPECIFIER_INT; + *flags_opt |= TYPE_SPECIFIER_LONG; + } + + /*long-suffix*/ + stream_match(stream); + + /*long-long-suffix*/ + if ((stream->current[0] == 'l' || stream->current[0] == 'L')) + { + if (flags_opt) + { + *flags_opt = *flags_opt & ~TYPE_SPECIFIER_LONG; + *flags_opt |= TYPE_SPECIFIER_LONG_LONG; + } + stream_match(stream); + } + + if (/*unsigned-suffix*/ + stream->current[0] == 'U' || stream->current[0] == 'u') + { + if (flags_opt) + { + *flags_opt |= TYPE_SPECIFIER_UNSIGNED; + } + stream_match(stream); + } + } } void exponent_part_opt(struct stream* stream) { - /* - exponent-part: - e signopt digit-sequence - E signopt digit-sequence - */ - if (stream->current[0] == 'e' || stream->current[0] == 'E') - { - stream_match(stream); + /* + exponent-part: + e signopt digit-sequence + E signopt digit-sequence + */ + if (stream->current[0] == 'e' || stream->current[0] == 'E') + { + stream_match(stream); - if (stream->current[0] == '-' || stream->current[0] == '+') - { - stream_match(stream); - } - digit_sequence(stream); - } + if (stream->current[0] == '-' || stream->current[0] == '+') + { + stream_match(stream); + } + digit_sequence(stream); + } } enum type_specifier_flags floating_suffix_opt(struct stream* stream) { - enum type_specifier_flags f = TYPE_SPECIFIER_DOUBLE; + enum type_specifier_flags f = TYPE_SPECIFIER_DOUBLE; - if (stream->current[0] == 'l' || stream->current[0] == 'L') - { - f = TYPE_SPECIFIER_LONG | TYPE_SPECIFIER_DOUBLE; - stream_match(stream); - } - else if (stream->current[0] == 'f' || stream->current[0] == 'F') - { - f = TYPE_SPECIFIER_FLOAT; - stream_match(stream); - } + if (stream->current[0] == 'l' || stream->current[0] == 'L') + { + f = TYPE_SPECIFIER_LONG | TYPE_SPECIFIER_DOUBLE; + stream_match(stream); + } + else if (stream->current[0] == 'f' || stream->current[0] == 'F') + { + f = TYPE_SPECIFIER_FLOAT; + stream_match(stream); + } - return f; + return f; } bool is_nonzero_digit(struct stream* stream) { - return stream->current[0] >= '1' && stream->current[0] <= '9'; + return stream->current[0] >= '1' && stream->current[0] <= '9'; } enum token_type parse_number_core(struct stream* stream, enum type_specifier_flags* flags_opt) { - if (flags_opt) - { - *flags_opt = TYPE_SPECIFIER_INT; - } - - - enum token_type type = TK_NONE; - if (stream->current[0] == '.') - { - type = TK_COMPILER_DECIMAL_FLOATING_CONSTANT; - stream_match(stream); - digit_sequence(stream); - exponent_part_opt(stream); - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - else if (stream->current[0] == '0' && (stream->current[1] == 'x' || stream->current[1] == 'X')) - { - type = TK_COMPILER_HEXADECIMAL_CONSTANT; - - stream_match(stream); - stream_match(stream); - while (is_hexadecimal_digit(stream)) - { - stream_match(stream); - } - - integer_suffix_opt(stream, flags_opt); - - if (stream->current[0] == '.') - { - type = TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT; - hexadecimal_digit_sequence(stream); - } - - if (stream->current[0] == 'p' || - stream->current[0] == 'P') - { - type = TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT; - binary_exponent_part(stream); - } - - if (type == TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT) - { - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - } - else if (stream->current[0] == '0' && (stream->current[1] == 'b' || stream->current[1] == 'B')) - { - type = TK_COMPILER_BINARY_CONSTANT; - stream_match(stream); - stream_match(stream); - while (is_binary_digit(stream)) - { - stream_match(stream); - } - integer_suffix_opt(stream, flags_opt); - } - else if (stream->current[0] == '0') //octal - { - type = TK_COMPILER_OCTAL_CONSTANT; - - stream_match(stream); - while (is_octal_digit(stream)) - { - stream_match(stream); - } - integer_suffix_opt(stream, flags_opt); - - if (stream->current[0] == '.') - { - hexadecimal_digit_sequence(stream); - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - } - else if (is_nonzero_digit(stream)) //decimal - { - type = TK_COMPILER_DECIMAL_CONSTANT; - - stream_match(stream); - while (is_digit(stream)) - { - stream_match(stream); - } - integer_suffix_opt(stream, flags_opt); - - if (stream->current[0] == 'e' || stream->current[0] == 'E') - { - exponent_part_opt(stream); - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - else if (stream->current[0] == '.') - { - stream_match(stream); - type = TK_COMPILER_DECIMAL_FLOATING_CONSTANT; - digit_sequence(stream); - exponent_part_opt(stream); - enum type_specifier_flags f = floating_suffix_opt(stream); - if (flags_opt) - { - *flags_opt = f; - } - } - } - - - - - return type; + if (flags_opt) + { + *flags_opt = TYPE_SPECIFIER_INT; + } + + + enum token_type type = TK_NONE; + if (stream->current[0] == '.') + { + type = TK_COMPILER_DECIMAL_FLOATING_CONSTANT; + stream_match(stream); + digit_sequence(stream); + exponent_part_opt(stream); + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + else if (stream->current[0] == '0' && (stream->current[1] == 'x' || stream->current[1] == 'X')) + { + type = TK_COMPILER_HEXADECIMAL_CONSTANT; + + stream_match(stream); + stream_match(stream); + while (is_hexadecimal_digit(stream)) + { + stream_match(stream); + } + + integer_suffix_opt(stream, flags_opt); + + if (stream->current[0] == '.') + { + type = TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT; + hexadecimal_digit_sequence(stream); + } + + if (stream->current[0] == 'p' || + stream->current[0] == 'P') + { + type = TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT; + binary_exponent_part(stream); + } + + if (type == TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT) + { + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + } + else if (stream->current[0] == '0' && (stream->current[1] == 'b' || stream->current[1] == 'B')) + { + type = TK_COMPILER_BINARY_CONSTANT; + stream_match(stream); + stream_match(stream); + while (is_binary_digit(stream)) + { + stream_match(stream); + } + integer_suffix_opt(stream, flags_opt); + } + else if (stream->current[0] == '0') //octal + { + type = TK_COMPILER_OCTAL_CONSTANT; + + stream_match(stream); + while (is_octal_digit(stream)) + { + stream_match(stream); + } + integer_suffix_opt(stream, flags_opt); + + if (stream->current[0] == '.') + { + hexadecimal_digit_sequence(stream); + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + } + else if (is_nonzero_digit(stream)) //decimal + { + type = TK_COMPILER_DECIMAL_CONSTANT; + + stream_match(stream); + while (is_digit(stream)) + { + stream_match(stream); + } + integer_suffix_opt(stream, flags_opt); + + if (stream->current[0] == 'e' || stream->current[0] == 'E') + { + exponent_part_opt(stream); + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + else if (stream->current[0] == '.') + { + stream_match(stream); + type = TK_COMPILER_DECIMAL_FLOATING_CONSTANT; + digit_sequence(stream); + exponent_part_opt(stream); + enum type_specifier_flags f = floating_suffix_opt(stream); + if (flags_opt) + { + *flags_opt = f; + } + } + } + + + + + return type; } enum token_type parse_number(const char* lexeme, enum type_specifier_flags* flags_opt) { - struct stream stream = { .source = lexeme, .current = lexeme, .line = 1, .col = 1 }; - return parse_number_core(&stream, flags_opt); + struct stream stream = {.source = lexeme, .current = lexeme, .line = 1, .col = 1}; + return parse_number_core(&stream, flags_opt); } static void pragma_skip_blanks(struct parser_ctx* ctx) { - while (ctx->current && ctx->current->type == TK_BLANKS) - { - ctx->current = ctx->current->next; - } + while (ctx->current && ctx->current->type == TK_BLANKS) + { + ctx->current = ctx->current->next; + } } /* @@ -1650,627 +1538,653 @@ static void pragma_skip_blanks(struct parser_ctx* ctx) */ static void parse_pragma(struct parser_ctx* ctx, struct token* token) { - if (ctx->current->type == TK_PRAGMA) - { - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - - if (ctx->current && strcmp(ctx->current->lexeme, "CAKE") == 0) - { - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - } - - if (ctx->current && strcmp(ctx->current->lexeme, "nullchecks") == 0) - { - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - - //Isso nao esta funcionando pois esta informao precisa estar na AST. - //pois eh usada em um segundo passo. - bool onoff = false; - if (ctx->current && strcmp(ctx->current->lexeme, "ON") == 0) - { - onoff = true; - } - else if (ctx->current && strcmp(ctx->current->lexeme, "OFF") == 0) - { - onoff = false; - } - else - { - compiler_set_error_with_token(C_PRAGMA_ERROR, ctx, ctx->current, "nullchecks pragma needs to use ON OFF"); - } - ctx->options.null_checks = onoff; - } - - if (ctx->current && strcmp(ctx->current->lexeme, "diagnostic") == 0) - { - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - - if (ctx->current && strcmp(ctx->current->lexeme, "push") == 0) - { - //#pragma GCC diagnostic push - if (ctx->options.enabled_warnings_stack_top_index < - sizeof(ctx->options.enabled_warnings_stack) / sizeof(ctx->options.enabled_warnings_stack[0])) - { - ctx->options.enabled_warnings_stack_top_index++; - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index - 1]; - } - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - } - else if (ctx->current && strcmp(ctx->current->lexeme, "pop") == 0) - { - //#pragma CAKE diagnostic pop - if (ctx->options.enabled_warnings_stack_top_index > 0) - { - ctx->options.enabled_warnings_stack_top_index--; - } - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - } - else if (ctx->current && strcmp(ctx->current->lexeme, "warning") == 0) - { - //#pragma CAKE diagnostic warning "-Wenum-compare" - - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - - if (ctx->current && ctx->current->type == TK_STRING_LITERAL) - { - enum warning w = get_warning_flag(ctx->current->lexeme + 1 + 2); - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] |= w; - } - } - else if (ctx->current && strcmp(ctx->current->lexeme, "ignore") == 0) - { - //#pragma CAKE diagnostic ignore "-Wenum-compare" - - ctx->current = ctx->current->next; - pragma_skip_blanks(ctx); - - if (ctx->current && ctx->current->type == TK_STRING_LITERAL) - { - enum warning w = get_warning_flag(ctx->current->lexeme + 1 + 2); - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] &= ~w; - } - } - } - } + if (ctx->current->type == TK_PRAGMA) + { + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + + if (ctx->current && + (strcmp(ctx->current->lexeme, "CAKE") == 0 || + strcmp(ctx->current->lexeme, "cake") == 0) + ) + { + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + } + + if (ctx->current && strcmp(ctx->current->lexeme, "nullchecks") == 0) + { + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + + //Isso nao esta funcionando pois esta informao precisa estar na AST. + //pois eh usada em um segundo passo. + bool onoff = false; + if (ctx->current && strcmp(ctx->current->lexeme, "ON") == 0) + { + onoff = true; + } + else if (ctx->current && strcmp(ctx->current->lexeme, "OFF") == 0) + { + onoff = false; + } + else + { + compiler_diagnostic_message(ERROR_PRAGMA_ERROR, ctx, ctx->current, "nullchecks pragma needs to use ON OFF"); + } + ctx->options.null_checks = onoff; + } + + if (ctx->current && strcmp(ctx->current->lexeme, "diagnostic") == 0) + { + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + + if (ctx->current && strcmp(ctx->current->lexeme, "push") == 0) + { + //#pragma GCC diagnostic push + if (ctx->options.diagnostic_stack_top_index < + sizeof(ctx->options.diagnostic_stack) / sizeof(ctx->options.diagnostic_stack[0])) + { + ctx->options.diagnostic_stack_top_index++; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index] = + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index - 1]; + } + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + } + else if (ctx->current && strcmp(ctx->current->lexeme, "pop") == 0) + { + //#pragma CAKE diagnostic pop + if (ctx->options.diagnostic_stack_top_index > 0) + { + ctx->options.diagnostic_stack_top_index--; + } + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + } + else if (ctx->current && + (strcmp(ctx->current->lexeme, "error") == 0 || + strcmp(ctx->current->lexeme, "warning") == 0 || + strcmp(ctx->current->lexeme, "note") == 0 || + strcmp(ctx->current->lexeme, "ignored") == 0) + ) + { + const bool is_error = strcmp(ctx->current->lexeme, "error") == 0; + const bool is_warning = strcmp(ctx->current->lexeme, "warning") == 0; + const bool is_note = strcmp(ctx->current->lexeme, "note") == 0; + + + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + + if (ctx->current && ctx->current->type == TK_STRING_LITERAL) + { + + unsigned long long w = get_warning_bit_mask(ctx->current->lexeme + 1 + 2); + + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors &= ~w; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes &= ~w; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings &= ~w; + + if (is_error) + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors |= w; + else if (is_warning) + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings |= w; + else if (is_note) + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes |= w; + } + } + else if (ctx->current && + (strcmp(ctx->current->lexeme, "check") == 0) + ) + { + //TODO better name . Ack. : means ‘alarm acknowledged’ ? + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + + if (ctx->current && ctx->current->type == TK_STRING_LITERAL) + { + enum diagnostic_id id = get_warning(ctx->current->lexeme + 1 + 2); + if (ctx->p_report->last_diagnostic_id == id) + { + //lets remove this error/warning/info from the final report. + + int t = + get_diagnostic_type(&ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index], + id); + if (t == 3) + ctx->p_report->error_count--; + else if (t == 2) + ctx->p_report->warnings_count--; + else if (t == 1) + ctx->p_report->info_count--; + + + } + else + { + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "pragma check failed"); + + } + } + } + + } + } } - static struct token* parser_skip_blanks(struct parser_ctx* ctx) { - while (ctx->current && !(ctx->current->flags & TK_FLAG_FINAL)) - { + while (ctx->current && !(ctx->current->flags & TK_FLAG_FINAL)) + { - if (ctx->current->type == TK_PRAGMA) - { - /*only active block have TK_PRAGMA*/ - parse_pragma(ctx, ctx->current); - } + if (ctx->current->type == TK_PRAGMA) + { + /*only active block have TK_PRAGMA*/ + parse_pragma(ctx, ctx->current); + } - if (ctx->current) - ctx->current = ctx->current->next; - } + if (ctx->current) + ctx->current = ctx->current->next; + } - if (ctx->current) - { - token_promote(ctx->current); //transforma para token de parser - } + if (ctx->current) + { + token_promote(ctx->current); //transforma para token de parser + } - return ctx->current; + return ctx->current; } struct token* parser_match(struct parser_ctx* ctx) { - ctx->previous = ctx->current; - ctx->current = ctx->current->next; - parser_skip_blanks(ctx); + ctx->previous = ctx->current; + ctx->current = ctx->current->next; + parser_skip_blanks(ctx); - return ctx->current; + return ctx->current; } int parser_match_tk(struct parser_ctx* ctx, enum token_type type) { - int error = 0; - if (ctx->current != NULL) - { - if (ctx->current->type != type) - { - compiler_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, ctx->current, "expected %s", get_token_name(type)); - error = 1; - } + int error = 0; + if (ctx->current != NULL) + { + if (ctx->current->type != type) + { + compiler_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, ctx->current, "expected %s", get_token_name(type)); + error = 1; + } - ctx->previous = ctx->current; - ctx->current = ctx->current->next; - parser_skip_blanks(ctx); - } - else - { - compiler_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, ctx->input_list.tail, "unexpected end of file after"); - error = 1; - } + ctx->previous = ctx->current; + ctx->current = ctx->current->next; + parser_skip_blanks(ctx); + } + else + { + compiler_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, ctx->input_list.tail, "unexpected end of file after"); + error = 1; + } - return error; + return error; } void print_declaration_specifiers(struct osstream* ss, struct declaration_specifiers* p_declaration_specifiers) { - bool first = true; - print_type_qualifier_flags(ss, &first, p_declaration_specifiers->type_qualifier_flags); - - if (p_declaration_specifiers->enum_specifier) - { - - if (p_declaration_specifiers->enum_specifier->tag_token) - { - ss_fprintf(ss, "enum %s", p_declaration_specifiers->enum_specifier->tag_token->lexeme); - } - else - { - assert(false); - } - } - else if (p_declaration_specifiers->struct_or_union_specifier) - { - ss_fprintf(ss, "struct %s", p_declaration_specifiers->struct_or_union_specifier->tag_name); - } - else if (p_declaration_specifiers->typedef_declarator) - { - print_item(ss, &first, p_declaration_specifiers->typedef_declarator->name->lexeme); - } - else - { - print_type_specifier_flags(ss, &first, p_declaration_specifiers->type_specifier_flags); - } + bool first = true; + print_type_qualifier_flags(ss, &first, p_declaration_specifiers->type_qualifier_flags); + + if (p_declaration_specifiers->enum_specifier) + { + + if (p_declaration_specifiers->enum_specifier->tag_token) + { + ss_fprintf(ss, "enum %s", p_declaration_specifiers->enum_specifier->tag_token->lexeme); + } + else + { + assert(false); + } + } + else if (p_declaration_specifiers->struct_or_union_specifier) + { + ss_fprintf(ss, "struct %s", p_declaration_specifiers->struct_or_union_specifier->tag_name); + } + else if (p_declaration_specifiers->typedef_declarator) + { + print_item(ss, &first, p_declaration_specifiers->typedef_declarator->name->lexeme); + } + else + { + print_type_specifier_flags(ss, &first, p_declaration_specifiers->type_specifier_flags); + } } bool type_specifier_is_integer(enum type_specifier_flags flags) { - if ((flags & TYPE_SPECIFIER_CHAR) || - (flags & TYPE_SPECIFIER_SHORT) || - (flags & TYPE_SPECIFIER_INT) || - (flags & TYPE_SPECIFIER_LONG) || - (flags & TYPE_SPECIFIER_INT) || - (flags & TYPE_SPECIFIER_INT8) || - (flags & TYPE_SPECIFIER_INT16) || - (flags & TYPE_SPECIFIER_INT32) || - (flags & TYPE_SPECIFIER_INT64) || - (flags & TYPE_SPECIFIER_LONG_LONG)) - { - return true; - } - return false; + if ((flags & TYPE_SPECIFIER_CHAR) || + (flags & TYPE_SPECIFIER_SHORT) || + (flags & TYPE_SPECIFIER_INT) || + (flags & TYPE_SPECIFIER_LONG) || + (flags & TYPE_SPECIFIER_INT) || + (flags & TYPE_SPECIFIER_INT8) || + (flags & TYPE_SPECIFIER_INT16) || + (flags & TYPE_SPECIFIER_INT32) || + (flags & TYPE_SPECIFIER_INT64) || + (flags & TYPE_SPECIFIER_LONG_LONG)) + { + return true; + } + return false; } int final_specifier(struct parser_ctx* ctx, enum type_specifier_flags* flags) { - if (((*flags) & TYPE_SPECIFIER_UNSIGNED) || - ((*flags) & TYPE_SPECIFIER_SIGNED)) - { - if (!type_specifier_is_integer(*flags)) - { - //se nao especificou nada vira integer - (*flags) |= TYPE_SPECIFIER_INT; - } - } + if (((*flags) & TYPE_SPECIFIER_UNSIGNED) || + ((*flags) & TYPE_SPECIFIER_SIGNED)) + { + if (!type_specifier_is_integer(*flags)) + { + //se nao especificou nada vira integer + (*flags) |= TYPE_SPECIFIER_INT; + } + } - return 0; + return 0; } int add_specifier(struct parser_ctx* ctx, - enum type_specifier_flags* flags, - enum type_specifier_flags new_flag + enum type_specifier_flags* flags, + enum type_specifier_flags new_flag ) { - /* - * Verifica as combinaçòes possíveis - */ - - if (new_flag & TYPE_SPECIFIER_LONG) //adicionando um long - { - if ((*flags) & TYPE_SPECIFIER_LONG_LONG) //ja tinha long long - { - compiler_set_error_with_token(C_CANNOT_COMBINE_WITH_PREVIOUS_LONG_LONG, ctx, ctx->current, "cannot combine with previous 'long long' declaration specifier"); - return 1; - } - else if ((*flags) & TYPE_SPECIFIER_LONG) //ja tinha um long - { - (*flags) = (*flags) & ~TYPE_SPECIFIER_LONG; - (*flags) |= TYPE_SPECIFIER_LONG_LONG; - } - else //nao tinha nenhum long - { - (*flags) = (*flags) & ~TYPE_SPECIFIER_INT; - (*flags) |= TYPE_SPECIFIER_LONG; - } - } - else - { - (*flags) |= new_flag; - } - return 0; -} - -void declaration_specifiers_delete(struct declaration_specifiers* owner p) -{ - if (p) - { - struct declaration_specifier* owner item = p->head; - while (item) - { - struct declaration_specifier* owner next = item->next; - item->next = NULL; - declaration_specifier_delete(item); - item = next; - } - free(p); - } + /* + * Verifica as combinaçòes possíveis + */ + + if (new_flag & TYPE_SPECIFIER_LONG) //adicionando um long + { + if ((*flags) & TYPE_SPECIFIER_LONG_LONG) //ja tinha long long + { + compiler_diagnostic_message(ERROR_CANNOT_COMBINE_WITH_PREVIOUS_LONG_LONG, ctx, ctx->current, "cannot combine with previous 'long long' declaration specifier"); + return 1; + } + else if ((*flags) & TYPE_SPECIFIER_LONG) //ja tinha um long + { + (*flags) = (*flags) & ~TYPE_SPECIFIER_LONG; + (*flags) |= TYPE_SPECIFIER_LONG_LONG; + } + else //nao tinha nenhum long + { + (*flags) = (*flags) & ~TYPE_SPECIFIER_INT; + (*flags) |= TYPE_SPECIFIER_LONG; + } + } + else + { + (*flags) |= new_flag; + } + return 0; +} + +void declaration_specifiers_delete(struct declaration_specifiers* owner opt p) +{ + if (p) + { + struct declaration_specifier* owner item = p->head; + while (item) + { + struct declaration_specifier* owner next = item->next; + item->next = NULL; + declaration_specifier_delete(item); + item = next; + } + free(p); + } } struct declaration_specifiers* owner declaration_specifiers(struct parser_ctx* ctx, - enum storage_class_specifier_flags default_storage_flag) -{ - /* - declaration-specifiers: - declaration-specifier attribute-specifier-sequence_opt - declaration-specifier declaration-specifiers - */ - - /* - Ao fazer parser do segundo o X ja existe mas ele nao deve ser usado - typedef char X; - typedef char X; - */ - - struct declaration_specifiers* owner p_declaration_specifiers = calloc(1, sizeof(struct declaration_specifiers)); - - try - { - if (p_declaration_specifiers == NULL) - throw; - - static_set(p_declaration_specifiers, "not-null"); - p_declaration_specifiers->first_token = ctx->current; - - while (first_of_declaration_specifier(ctx)) - { - if (ctx->current->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) - { - if (p_declaration_specifiers->type_specifier_flags != TYPE_SPECIFIER_NONE) - { - //typedef tem que aparecer sozinho - //exemplo Socket eh nome e nao typdef - //typedef int Socket; - //struct X {int Socket;}; - break; - } - } - - struct declaration_specifier* owner p_declaration_specifier = declaration_specifier(ctx); - - if (p_declaration_specifier->type_specifier_qualifier) - { - if (p_declaration_specifier->type_specifier_qualifier) - { - if (p_declaration_specifier->type_specifier_qualifier->type_specifier) - { - - if (add_specifier(ctx, - &p_declaration_specifiers->type_specifier_flags, - p_declaration_specifier->type_specifier_qualifier->type_specifier->flags) != 0) - { - declaration_specifier_delete(p_declaration_specifier); - throw; - } - - - if (p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier) - { - p_declaration_specifiers->struct_or_union_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier; - } - else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->enum_specifier) - { - p_declaration_specifiers->enum_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->enum_specifier; - } - else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->typeof_specifier) - { - p_declaration_specifiers->typeof_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->typeof_specifier; - } - else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->token && - p_declaration_specifier->type_specifier_qualifier->type_specifier->token->type == TK_IDENTIFIER) - { - p_declaration_specifiers->typedef_declarator = - find_declarator(ctx, - p_declaration_specifier->type_specifier_qualifier->type_specifier->token->lexeme, - NULL); - - //p_declaration_specifiers->typedef_declarator = p_declaration_specifier->type_specifier_qualifier->pType_specifier->token->lexeme; - } - } - else if (p_declaration_specifier->type_specifier_qualifier->type_qualifier) - { - p_declaration_specifiers->type_qualifier_flags |= p_declaration_specifier->type_specifier_qualifier->type_qualifier->flags; - - } - } - } - else if (p_declaration_specifier->storage_class_specifier) - { - p_declaration_specifiers->storage_class_specifier_flags |= p_declaration_specifier->storage_class_specifier->flags; - } - - LIST_ADD(p_declaration_specifiers, p_declaration_specifier); - //attribute_specifier_sequence_opt(ctx); - - if (ctx->current->type == TK_IDENTIFIER && - p_declaration_specifiers->type_specifier_flags != TYPE_SPECIFIER_NONE) - { - //typedef nao pode aparecer com outro especifier - //entao ja tem tem algo e vier identifier signfica que acabou - //exemplo - /* - typedef char X; - typedef char X; - */ - break; - } - } - p_declaration_specifiers->last_token = previous_parser_token(ctx->current); - } - catch - { - } - - if (p_declaration_specifiers) - { - //int main() { static int i; } // i is not automatic - final_specifier(ctx, &p_declaration_specifiers->type_specifier_flags); - } - - - p_declaration_specifiers->storage_class_specifier_flags |= default_storage_flag; - - if (p_declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_STATIC) - { - // - p_declaration_specifiers->storage_class_specifier_flags &= ~STORAGE_SPECIFIER_AUTOMATIC_STORAGE; - } - - return p_declaration_specifiers; + enum storage_class_specifier_flags default_storage_flag) +{ + /* + declaration-specifiers: + declaration-specifier attribute-specifier-sequence_opt + declaration-specifier declaration-specifiers + */ + + /* + Ao fazer parser do segundo o X ja existe mas ele nao deve ser usado + typedef char X; + typedef char X; + */ + + struct declaration_specifiers* owner p_declaration_specifiers = calloc(1, sizeof(struct declaration_specifiers)); + + try + { + if (p_declaration_specifiers == NULL) + throw; + + static_set(p_declaration_specifiers, "not-null"); + p_declaration_specifiers->first_token = ctx->current; + + while (first_of_declaration_specifier(ctx)) + { + if (ctx->current->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) + { + if (p_declaration_specifiers->type_specifier_flags != TYPE_SPECIFIER_NONE) + { + //typedef tem que aparecer sozinho + //exemplo Socket eh nome e nao typdef + //typedef int Socket; + //struct X {int Socket;}; + break; + } + } + + struct declaration_specifier* owner p_declaration_specifier = declaration_specifier(ctx); + + if (p_declaration_specifier->type_specifier_qualifier) + { + if (p_declaration_specifier->type_specifier_qualifier) + { + if (p_declaration_specifier->type_specifier_qualifier->type_specifier) + { + + if (add_specifier(ctx, + &p_declaration_specifiers->type_specifier_flags, + p_declaration_specifier->type_specifier_qualifier->type_specifier->flags) != 0) + { + declaration_specifier_delete(p_declaration_specifier); + throw; + } + + + if (p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier) + { + p_declaration_specifiers->struct_or_union_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier; + } + else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->enum_specifier) + { + p_declaration_specifiers->enum_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->enum_specifier; + } + else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->typeof_specifier) + { + p_declaration_specifiers->typeof_specifier = p_declaration_specifier->type_specifier_qualifier->type_specifier->typeof_specifier; + } + else if (p_declaration_specifier->type_specifier_qualifier->type_specifier->token && + p_declaration_specifier->type_specifier_qualifier->type_specifier->token->type == TK_IDENTIFIER) + { + p_declaration_specifiers->typedef_declarator = + find_declarator(ctx, + p_declaration_specifier->type_specifier_qualifier->type_specifier->token->lexeme, + NULL); + + //p_declaration_specifiers->typedef_declarator = p_declaration_specifier->type_specifier_qualifier->pType_specifier->token->lexeme; + } + } + else if (p_declaration_specifier->type_specifier_qualifier->type_qualifier) + { + p_declaration_specifiers->type_qualifier_flags |= p_declaration_specifier->type_specifier_qualifier->type_qualifier->flags; + + } + } + } + else if (p_declaration_specifier->storage_class_specifier) + { + p_declaration_specifiers->storage_class_specifier_flags |= p_declaration_specifier->storage_class_specifier->flags; + } + + LIST_ADD(p_declaration_specifiers, p_declaration_specifier); + //attribute_specifier_sequence_opt(ctx); + + if (ctx->current->type == TK_IDENTIFIER && + p_declaration_specifiers->type_specifier_flags != TYPE_SPECIFIER_NONE) + { + //typedef nao pode aparecer com outro especifier + //entao ja tem tem algo e vier identifier signfica que acabou + //exemplo + /* + typedef char X; + typedef char X; + */ + break; + } + } + p_declaration_specifiers->last_token = previous_parser_token(ctx->current); + } + catch + { + } + + if (p_declaration_specifiers) + { + //int main() { static int i; } // i is not automatic + final_specifier(ctx, &p_declaration_specifiers->type_specifier_flags); + } + + + p_declaration_specifiers->storage_class_specifier_flags |= default_storage_flag; + + if (p_declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_STATIC) + { + // + p_declaration_specifiers->storage_class_specifier_flags &= ~STORAGE_SPECIFIER_AUTOMATIC_STORAGE; + } + + return p_declaration_specifiers; } struct declaration* owner declaration_core(struct parser_ctx* ctx, - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt /*SINK*/, - bool can_be_function_definition, - bool* is_function_definition, - bool* flow_analysis, - enum storage_class_specifier_flags default_storage_class_specifier_flags + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt /*SINK*/, + bool can_be_function_definition, + bool* is_function_definition, + enum storage_class_specifier_flags default_storage_class_specifier_flags ) { - /* - declaration-specifiers init-declarator-list_opt ; - attribute-specifier-sequence declaration-specifiers init-declarator-list ; - static_assert-declaration - attribute-declaration + /* + declaration-specifiers init-declarator-list_opt ; + attribute-specifier-sequence declaration-specifiers init-declarator-list ; + static_assert-declaration + attribute-declaration */ - struct declaration* owner p_declaration = calloc(1, sizeof(struct declaration)); - - p_declaration->p_attribute_specifier_sequence_opt = p_attribute_specifier_sequence_opt; - - p_declaration->first_token = ctx->current; - - if (ctx->current->type == ';') - { - parser_match_tk(ctx, ';'); - //declaracao vazia nao eh erro - return p_declaration; - } - - if (first_of_static_assert_declaration(ctx)) - { - p_declaration->static_assert_declaration = static_assert_declaration(ctx); - } - else - { - - if (first_of_declaration_specifier(ctx)) - { - p_declaration->declaration_specifiers = declaration_specifiers(ctx, default_storage_class_specifier_flags); - - if (p_declaration->p_attribute_specifier_sequence_opt) - { - p_declaration->declaration_specifiers->attributes_flags = - p_declaration->p_attribute_specifier_sequence_opt->attributes_flags; - } - - if (ctx->current->type != ';') - { - p_declaration->init_declarator_list = init_declarator_list(ctx, - p_declaration->declaration_specifiers); - } - - - p_declaration->last_token = ctx->current; - - if (ctx->current->type == '{') - { - if (can_be_function_definition) - *is_function_definition = true; - } - else if (ctx->current->type == TK_STRING_LITERAL && - strcmp(ctx->current->lexeme, "\"unchecked\"") == 0) - { - parser_match(ctx); - if (can_be_function_definition) - *is_function_definition = true; - if (flow_analysis) - *flow_analysis = false; - - } - else - parser_match_tk(ctx, ';'); - } - else - { - if (ctx->current->type == TK_IDENTIFIER) - { - compiler_set_error_with_token(C_INVALID_TYPE, ctx, ctx->current, "invalid type '%s'", ctx->current->lexeme); - } - else - { - compiler_set_error_with_token(C_EXPECTED_DECLARATION, ctx, ctx->current, "expected declaration not '%s'", ctx->current->lexeme); - } - parser_match(ctx); //we need to go ahead - } - } - - - return p_declaration; + struct declaration* owner p_declaration = calloc(1, sizeof(struct declaration)); + + p_declaration->p_attribute_specifier_sequence_opt = p_attribute_specifier_sequence_opt; + + p_declaration->first_token = ctx->current; + + if (ctx->current->type == ';') + { + parser_match_tk(ctx, ';'); + //declaracao vazia nao eh erro + return p_declaration; + } + + if (first_of_static_assert_declaration(ctx)) + { + p_declaration->static_assert_declaration = static_assert_declaration(ctx); + } + else + { + + if (first_of_declaration_specifier(ctx)) + { + p_declaration->declaration_specifiers = declaration_specifiers(ctx, default_storage_class_specifier_flags); + + if (p_declaration->p_attribute_specifier_sequence_opt) + { + p_declaration->declaration_specifiers->attributes_flags = + p_declaration->p_attribute_specifier_sequence_opt->attributes_flags; + } + + if (ctx->current->type != ';') + { + p_declaration->init_declarator_list = init_declarator_list(ctx, + p_declaration->declaration_specifiers); + } + + + p_declaration->last_token = ctx->current; + + if (ctx->current->type == '{') + { + if (can_be_function_definition) + *is_function_definition = true; + } + else + parser_match_tk(ctx, ';'); + } + else + { + if (ctx->current->type == TK_IDENTIFIER) + { + compiler_diagnostic_message(ERROR_INVALID_TYPE, ctx, ctx->current, "invalid type '%s'", ctx->current->lexeme); + } + else + { + compiler_diagnostic_message(ERROR_EXPECTED_DECLARATION, ctx, ctx->current, "expected declaration not '%s'", ctx->current->lexeme); + } + parser_match(ctx); //we need to go ahead + } + } + + + return p_declaration; } struct declaration* owner function_definition_or_declaration(struct parser_ctx* ctx) { - /* - function-definition: - attribute-specifier-sequence opt declaration-specifiers declarator function-body - */ - - /* - declaration: - declaration-specifiers init-declarator-list opt ; - attribute-specifier-sequence declaration-specifiers init-declarator-list ; - static_assert-declaration - attribute-declaration - */ - - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); - - - bool is_function_definition = false; - bool flow_analysis = true; - struct declaration* owner p_declaration = declaration_core(ctx, p_attribute_specifier_sequence_opt, true, &is_function_definition, &flow_analysis, STORAGE_SPECIFIER_EXTERN); - if (is_function_definition) - { - - ctx->p_current_function_opt = p_declaration; - //tem que ter 1 so - //tem 1 que ter 1 cara e ser funcao - assert(p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator); - - /* - scope of parameters is the inner declarator - - void (*f(int i))(void) { - i = 1; - return 0; - } - */ - - struct declarator* inner = p_declaration->init_declarator_list.head->p_declarator; - for (;;) - { - if (inner->direct_declarator && - inner->direct_declarator->function_declarator && - inner->direct_declarator->function_declarator->direct_declarator && - inner->direct_declarator->function_declarator->direct_declarator->declarator) - { - inner = inner->direct_declarator->function_declarator->direct_declarator->declarator; - } - else - break; - } - - struct scope* parameters_scope = &inner->direct_declarator->function_declarator->parameters_scope; - scope_list_push(&ctx->scopes, parameters_scope); - - - check_func_open_brace_style(ctx, ctx->current); - - bool disable_ownership_errors = ctx->options.disable_ownership_errors; - if (!flow_analysis) - { - /*let's disable ownership type error*/ - ctx->options.disable_ownership_errors = true; - } - - assert(p_declaration->function_body == NULL); - p_declaration->function_body = function_body(ctx); - - ctx->options.disable_ownership_errors = disable_ownership_errors; /*restore*/ - - p_declaration->init_declarator_list.head->p_declarator->function_body = p_declaration->function_body; - - - if (ctx->options.flow_analysis && flow_analysis) - { - /* - Now we have the full function AST let´s visit to analise - jumps - */ - - struct flow_visit_ctx ctx2 = { 0 }; - ctx2.ctx = ctx; - flow_visit_function(&ctx2, p_declaration); - flow_visit_ctx_destroy(&ctx2); - } - - struct parameter_declaration* parameter = NULL; - - if (p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator && - p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt && - p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt->parameter_list) - { - parameter = p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; - } - - /*parametros nao usados*/ - while (parameter) - { - if (!type_is_maybe_unused(¶meter->declarator->type) && - parameter->declarator->num_uses == 0) - { - if (parameter->declarator->name && - parameter->declarator->name->level == 0 /*direct source*/ - ) - { - compiler_set_warning_with_token(W_UNUSED_PARAMETER, - ctx, - parameter->declarator->name, - "'%s': unreferenced formal parameter", - parameter->declarator->name->lexeme); - } - } - parameter = parameter->next; - } - - - scope_list_pop(&ctx->scopes); - ctx->p_current_function_opt = NULL; - } - - - return p_declaration; + /* + function-definition: + attribute-specifier-sequence opt declaration-specifiers declarator function-body + */ + + /* + declaration: + declaration-specifiers init-declarator-list opt ; + attribute-specifier-sequence declaration-specifiers init-declarator-list ; + static_assert-declaration + attribute-declaration + */ + + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); + + + bool is_function_definition = false; + + struct declaration* owner p_declaration = declaration_core(ctx, p_attribute_specifier_sequence_opt, true, &is_function_definition, STORAGE_SPECIFIER_EXTERN); + if (is_function_definition) + { + + ctx->p_current_function_opt = p_declaration; + //tem que ter 1 so + //tem 1 que ter 1 cara e ser funcao + assert(p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator); + + /* + scope of parameters is the inner declarator + + void (*f(int i))(void) { + i = 1; + return 0; + } + */ + + struct declarator* inner = p_declaration->init_declarator_list.head->p_declarator; + for (;;) + { + if (inner->direct_declarator && + inner->direct_declarator->function_declarator && + inner->direct_declarator->function_declarator->direct_declarator && + inner->direct_declarator->function_declarator->direct_declarator->declarator) + { + inner = inner->direct_declarator->function_declarator->direct_declarator->declarator; + } + else + break; + } + + struct scope* parameters_scope = &inner->direct_declarator->function_declarator->parameters_scope; + scope_list_push(&ctx->scopes, parameters_scope); + + + check_func_open_brace_style(ctx, ctx->current); + + + + assert(p_declaration->function_body == NULL); + p_declaration->function_body = function_body(ctx); + + + + p_declaration->init_declarator_list.head->p_declarator->function_body = p_declaration->function_body; + + + if (ctx->options.flow_analysis) + { + /* + Now we have the full function AST let´s visit to analise + jumps + */ + + struct flow_visit_ctx ctx2 = { 0 }; + ctx2.ctx = ctx; + flow_visit_function(&ctx2, p_declaration); + flow_visit_ctx_destroy(&ctx2); + } + + struct parameter_declaration* parameter = NULL; + + if (p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator && + p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt && + p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt->parameter_list) + { + parameter = p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; + } + + /*parametros nao usados*/ + while (parameter) + { + if (!type_is_maybe_unused(¶meter->declarator->type) && + parameter->declarator->num_uses == 0) + { + if (parameter->declarator->name && + parameter->declarator->name->level == 0 /*direct source*/ + ) + { + compiler_diagnostic_message(W_UNUSED_PARAMETER, + ctx, + parameter->declarator->name, + "'%s': unreferenced formal parameter", + parameter->declarator->name->lexeme); + } + } + parameter = parameter->next; + } + + + scope_list_pop(&ctx->scopes); + ctx->p_current_function_opt = NULL; + } + + + return p_declaration; } struct declaration* owner declaration(struct parser_ctx* ctx, - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt, - enum storage_class_specifier_flags storage_specifier_flags + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt, + enum storage_class_specifier_flags storage_specifier_flags ) { - bool is_function_definition = false; - bool flow_analysis = false; - return declaration_core(ctx, p_attribute_specifier_sequence_opt, false, &is_function_definition, &flow_analysis, storage_specifier_flags); + bool is_function_definition = false; + return declaration_core(ctx, p_attribute_specifier_sequence_opt, false, &is_function_definition, storage_specifier_flags); } @@ -2281,1817 +2195,1823 @@ struct declaration* owner declaration(struct parser_ctx* ctx, void declaration_specifier_delete(struct declaration_specifier* owner p) { - if (p) - { - free(p->function_specifier); - type_specifier_qualifier_delete(p->type_specifier_qualifier); - free(p->storage_class_specifier); - assert(p->next == NULL); - free(p); - } + if (p) + { + free(p->function_specifier); + type_specifier_qualifier_delete(p->type_specifier_qualifier); + free(p->storage_class_specifier); + assert(p->next == NULL); + free(p); + } } struct declaration_specifier* owner declaration_specifier(struct parser_ctx* ctx) { - // storage-class-specifier - // type-specifier-qualifier - // function-specifier - struct declaration_specifier* owner p_declaration_specifier = calloc(1, sizeof * p_declaration_specifier); - if (first_of_storage_class_specifier(ctx)) - { - p_declaration_specifier->storage_class_specifier = storage_class_specifier(ctx); - } - else if (first_of_type_specifier_qualifier(ctx)) - { - p_declaration_specifier->type_specifier_qualifier = type_specifier_qualifier(ctx); - } - else if (first_of_function_specifier(ctx)) - { - p_declaration_specifier->function_specifier = function_specifier(ctx); - } - else - { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "unexpected"); - } - return p_declaration_specifier; + // storage-class-specifier + // type-specifier-qualifier + // function-specifier + struct declaration_specifier* owner p_declaration_specifier = calloc(1, sizeof * p_declaration_specifier); + if (first_of_storage_class_specifier(ctx)) + { + p_declaration_specifier->storage_class_specifier = storage_class_specifier(ctx); + } + else if (first_of_type_specifier_qualifier(ctx)) + { + p_declaration_specifier->type_specifier_qualifier = type_specifier_qualifier(ctx); + } + else if (first_of_function_specifier(ctx)) + { + p_declaration_specifier->function_specifier = function_specifier(ctx); + } + else + { + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "unexpected"); + } + return p_declaration_specifier; } void init_declarator_delete(struct init_declarator* owner p) { - if (p) - { - initializer_delete(p->initializer); - declarator_delete(p->p_declarator); - assert(p->next == NULL); - free(p); - } + if (p) + { + initializer_delete(p->initializer); + declarator_delete(p->p_declarator); + assert(p->next == NULL); + free(p); + } } struct init_declarator* owner init_declarator(struct parser_ctx* ctx, - struct declaration_specifiers* p_declaration_specifiers) -{ - /* - init-declarator: - declarator - declarator = initializer - */ - struct init_declarator* owner p_init_declarator = calloc(1, sizeof(struct init_declarator)); - try - { - struct token* tkname = 0; - p_init_declarator->p_declarator = declarator(ctx, - NULL, - p_declaration_specifiers, - false, - &tkname); - - if (p_init_declarator->p_declarator == NULL) throw; - p_init_declarator->p_declarator->name = tkname; - - if (tkname == NULL) - { - compiler_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "empty declarator name?? unexpected"); - return p_init_declarator; - } - - p_init_declarator->p_declarator->declaration_specifiers = p_declaration_specifiers; - p_init_declarator->p_declarator->name = tkname; - - if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTO) - { - /* - auto requires we find the type after initializer - */ - } - else - { - assert(p_init_declarator->p_declarator->type.type_specifier_flags == 0); - p_init_declarator->p_declarator->type = make_type_using_declarator(ctx, p_init_declarator->p_declarator); - } - - const char* name = p_init_declarator->p_declarator->name->lexeme; - if (name) - { - if (tkname) - { - /* - Checking nameming conventions - */ - if (ctx->scopes.tail->scope_level == 0) - { - if (type_is_function(&p_init_declarator->p_declarator->type)) - { - naming_convention_global_var(ctx, - tkname, - &p_init_declarator->p_declarator->type, - p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags); - } - else - { - naming_convention_global_var(ctx, - tkname, - &p_init_declarator->p_declarator->type, - p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags); - } - } - } - - struct scope* out_scope = NULL; - struct declarator* previous = find_declarator(ctx, name, &out_scope); - if (previous) - { - if (out_scope->scope_level == ctx->scopes.tail->scope_level) - { - if (out_scope->scope_level == 0) - { - /*file scope*/ - if (!type_is_same(&previous->type, &p_init_declarator->p_declarator->type, true)) - { - //TODO failing on windows headers - //parser_seterror_with_token(ctx, p_init_declarator->declarator->name, "redeclaration of '%s' with diferent types", previous->name->lexeme); - //parser_set_info_with_token(ctx, previous->name, "previous declaration"); - } - } - else - { - compiler_set_error_with_token(C_REDECLARATION, ctx, ctx->current, "redeclaration"); - compiler_set_info_with_token(W_NONE, ctx, previous->name, "previous declaration"); - } - } - else - { - hashmap_set(&ctx->scopes.tail->variables, name, p_init_declarator, TAG_TYPE_INIT_DECLARATOR); - - /*global scope no warning...*/ - if (out_scope->scope_level != 0) - { - /*but redeclaration at function scope we show warning*/ - if (compiler_set_warning_with_token(W_DECLARATOR_HIDE, ctx, p_init_declarator->p_declarator->first_token, "declaration of '%s' hides previous declaration", name)) - { - compiler_set_info_with_token(W_NONE, ctx, previous->first_token, "previous declaration is here"); - } - } - } - } - else - { - /*first time we see this declarator*/ - hashmap_set(&ctx->scopes.tail->variables, name, p_init_declarator, TAG_TYPE_INIT_DECLARATOR); - } - } - else - { - assert(false); - } - - if (ctx->current && ctx->current->type == '=') - { - parser_match(ctx); - p_init_declarator->initializer = initializer(ctx); - if (p_init_declarator->initializer->braced_initializer) - { - if (type_is_array(&p_init_declarator->p_declarator->type)) - { - const int sz = type_get_array_size(&p_init_declarator->p_declarator->type); - if (sz == 0) - { - /*int a[] = {1, 2, 3}*/ - const int braced_initializer_size = - p_init_declarator->initializer->braced_initializer->initializer_list->size; - type_set_array_size(&p_init_declarator->p_declarator->type, braced_initializer_size); - } - } - - /* - Fixing the type of auto declarator - ?? - */ - } - else if (p_init_declarator->initializer->assignment_expression) - { - /* - Fixing the type of auto declarator - */ - if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTO) - { - struct type t = { 0 }; - - if (p_init_declarator->initializer->assignment_expression->expression_type == UNARY_EXPRESSION_ADDRESSOF) - { - t = type_dup(&p_init_declarator->initializer->assignment_expression->type); - } - else - { - struct type t2 = type_lvalue_conversion(&p_init_declarator->initializer->assignment_expression->type); - type_swap(&t2, &t); - type_destroy(&t2); - } - - type_remove_names(&t); - assert(t.name_opt == NULL); - t.name_opt = strdup(p_init_declarator->p_declarator->name->lexeme); - - type_set_qualifiers_using_declarator(&t, p_init_declarator->p_declarator); - //storage qualifiers? - - type_visit_to_mark_anonymous(&t); - type_swap(&p_init_declarator->p_declarator->type, &t); - type_destroy(&t); - } - - /* - Checking for "const qualifier discarded" - */ - if (type_is_pointer_to_const(&p_init_declarator->initializer->assignment_expression->type)) - { - if (p_init_declarator->p_declarator && - !type_is_pointer_to_const(&p_init_declarator->p_declarator->type)) - { - compiler_set_warning_with_token(W_DISCARDED_QUALIFIERS, ctx, ctx->current, "const qualifier discarded"); - } - } - - if (type_is_owner(&p_init_declarator->initializer->assignment_expression->type)) - { - if (p_init_declarator->initializer->assignment_expression->expression_type == POSTFIX_FUNCTION_CALL) - { - //type * p = f(); - if (!type_is_owner(&p_init_declarator->p_declarator->type)) - { - compiler_set_error_with_token(C_OWNERSHIP_MISSING_OWNER_QUALIFIER, ctx, p_init_declarator->p_declarator->first_token, "missing owner qualifier"); - } - } - } - - if (type_is_owner(&p_init_declarator->p_declarator->type)) - { - if (!type_is_owner(&p_init_declarator->initializer->assignment_expression->type)) - { - const bool is_zero = - constant_value_is_valid(&p_init_declarator->initializer->assignment_expression->constant_value) && - constant_value_to_bool(&p_init_declarator->initializer->assignment_expression->constant_value) == false; - - if (!is_zero) - { - compiler_set_error_with_token(C_OWNERSHIP_MISSING_OWNER_QUALIFIER, - ctx, - p_init_declarator->p_declarator->first_token, "cannot initialize an owner type with a non owner"); - } - else - { - /* - T * owner p = NULL; // OK - */ - } - } - } - - } - } - } - catch - { - } - - /* - checking usage of [static ] other than in function arguments - */ - if (p_init_declarator->p_declarator) - { - if (type_is_array(&p_init_declarator->p_declarator->type)) - if (p_init_declarator->p_declarator->type.type_qualifier_flags != 0 || - p_init_declarator->p_declarator->type.static_array) - { - compiler_set_error_with_token(C_STATIC_OR_TYPE_QUALIFIERS_NOT_ALLOWED_IN_NON_PARAMETER, - ctx, - p_init_declarator->p_declarator->first_token, - "static or type qualifiers are not allowed in non-parameter array declarator"); - } - - - if (!type_is_pointer(&p_init_declarator->p_declarator->type) && - p_init_declarator->p_declarator->type.type_qualifier_flags & TYPE_QUALIFIER_OBJ_OWNER) - { - compiler_set_error_with_token(C_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER, - ctx, - p_init_declarator->p_declarator->first_token, - "obj_owner qualifier can only be used with pointers"); - } - } - - return p_init_declarator; + struct declaration_specifiers* p_declaration_specifiers) +{ + /* + init-declarator: + declarator + declarator = initializer + */ + struct init_declarator* owner p_init_declarator = calloc(1, sizeof(struct init_declarator)); + try + { + struct token* tkname = 0; + p_init_declarator->p_declarator = declarator(ctx, + NULL, + p_declaration_specifiers, + false, + &tkname); + + if (p_init_declarator->p_declarator == NULL) throw; + p_init_declarator->p_declarator->name = tkname; + + if (tkname == NULL) + { + compiler_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "empty declarator name?? unexpected"); + return p_init_declarator; + } + + p_init_declarator->p_declarator->declaration_specifiers = p_declaration_specifiers; + p_init_declarator->p_declarator->name = tkname; + + if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTO) + { + /* + auto requires we find the type after initializer + */ + } + else + { + assert(p_init_declarator->p_declarator->type.type_specifier_flags == 0); + p_init_declarator->p_declarator->type = make_type_using_declarator(ctx, p_init_declarator->p_declarator); + } + + const char* name = p_init_declarator->p_declarator->name->lexeme; + if (name) + { + if (tkname) + { + /* + Checking nameming conventions + */ + if (ctx->scopes.tail->scope_level == 0) + { + if (type_is_function(&p_init_declarator->p_declarator->type)) + { + naming_convention_global_var(ctx, + tkname, + &p_init_declarator->p_declarator->type, + p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags); + } + else + { + naming_convention_global_var(ctx, + tkname, + &p_init_declarator->p_declarator->type, + p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags); + } + } + } + + struct scope* out_scope = NULL; + struct declarator* previous = find_declarator(ctx, name, &out_scope); + if (previous) + { + if (out_scope->scope_level == ctx->scopes.tail->scope_level) + { + if (out_scope->scope_level == 0) + { + /*file scope*/ + if (!type_is_same(&previous->type, &p_init_declarator->p_declarator->type, true)) + { + //TODO failing on windows headers + //parser_seterror_with_token(ctx, p_init_declarator->declarator->name, "redeclaration of '%s' with diferent types", previous->name->lexeme); + //parser_set_info_with_token(ctx, previous->name, "previous declaration"); + } + } + else + { + compiler_diagnostic_message(ERROR_REDECLARATION, ctx, ctx->current, "redeclaration"); + compiler_diagnostic_message(W_NOTE, ctx, previous->name, "previous declaration"); + } + } + else + { + hashmap_set(&ctx->scopes.tail->variables, name, p_init_declarator, TAG_TYPE_INIT_DECLARATOR); + + /*global scope no warning...*/ + if (out_scope->scope_level != 0) + { + /*but redeclaration at function scope we show warning*/ + if (compiler_diagnostic_message(W_DECLARATOR_HIDE, ctx, p_init_declarator->p_declarator->first_token, "declaration of '%s' hides previous declaration", name)) + { + compiler_diagnostic_message(W_NOTE, ctx, previous->first_token, "previous declaration is here"); + } + } + } + } + else + { + /*first time we see this declarator*/ + hashmap_set(&ctx->scopes.tail->variables, name, p_init_declarator, TAG_TYPE_INIT_DECLARATOR); + } + } + else + { + assert(false); + } + + if (ctx->current && ctx->current->type == '=') + { + parser_match(ctx); + p_init_declarator->initializer = initializer(ctx); + if (p_init_declarator->initializer && p_init_declarator->initializer->braced_initializer) + { + if (type_is_array(&p_init_declarator->p_declarator->type)) + { + const int sz = type_get_array_size(&p_init_declarator->p_declarator->type); + if (sz == 0) + { + /*int a[] = {1, 2, 3}*/ + assert(p_init_declarator->initializer->braced_initializer->initializer_list != NULL); + const int braced_initializer_size = + p_init_declarator->initializer->braced_initializer->initializer_list->size; + type_set_array_size(&p_init_declarator->p_declarator->type, braced_initializer_size); + } + } + + /* + Fixing the type of auto declarator + ?? + */ + } + else if (p_init_declarator->initializer->assignment_expression) + { + /* + Fixing the type of auto declarator + */ + if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTO) + { + struct type t = { 0 }; + + if (p_init_declarator->initializer->assignment_expression->expression_type == UNARY_EXPRESSION_ADDRESSOF) + { + t = type_dup(&p_init_declarator->initializer->assignment_expression->type); + } + else + { + struct type t2 = type_lvalue_conversion(&p_init_declarator->initializer->assignment_expression->type); + type_swap(&t2, &t); + type_destroy(&t2); + } + + type_remove_names(&t); + assert(t.name_opt == NULL); + t.name_opt = strdup(p_init_declarator->p_declarator->name->lexeme); + + type_set_qualifiers_using_declarator(&t, p_init_declarator->p_declarator); + //storage qualifiers? + + type_visit_to_mark_anonymous(&t); + type_swap(&p_init_declarator->p_declarator->type, &t); + type_destroy(&t); + } + + /* + Checking for "const qualifier discarded" + */ + if (type_is_pointer_to_const(&p_init_declarator->initializer->assignment_expression->type)) + { + if (p_init_declarator->p_declarator && + !type_is_pointer_to_const(&p_init_declarator->p_declarator->type)) + { + compiler_diagnostic_message(W_DISCARDED_QUALIFIERS, ctx, ctx->current, "const qualifier discarded"); + } + } + + if (type_is_owner(&p_init_declarator->initializer->assignment_expression->type)) + { + if (p_init_declarator->initializer->assignment_expression->expression_type == POSTFIX_FUNCTION_CALL) + { + //type * p = f(); + if (!type_is_owner(&p_init_declarator->p_declarator->type)) + { + compiler_diagnostic_message(W_OWNERSHIP_MISSING_OWNER_QUALIFIER, ctx, p_init_declarator->p_declarator->first_token, "missing owner qualifier"); + } + } + } + + if (type_is_owner(&p_init_declarator->p_declarator->type)) + { + if (!type_is_owner(&p_init_declarator->initializer->assignment_expression->type)) + { + const bool is_zero = + constant_value_is_valid(&p_init_declarator->initializer->assignment_expression->constant_value) && + constant_value_to_bool(&p_init_declarator->initializer->assignment_expression->constant_value) == false; + + if (!is_zero) + { + compiler_diagnostic_message(W_OWNERSHIP_MISSING_OWNER_QUALIFIER, + ctx, + p_init_declarator->p_declarator->first_token, "cannot initialize an owner type with a non owner"); + } + else + { + /* + T * owner p = NULL; // OK + */ + } + } + } + + } + } + } + catch + { + } + + /* + checking usage of [static ] other than in function arguments + */ + if (p_init_declarator->p_declarator) + { + if (type_is_array(&p_init_declarator->p_declarator->type)) + if (p_init_declarator->p_declarator->type.type_qualifier_flags != 0 || + p_init_declarator->p_declarator->type.static_array) + { + compiler_diagnostic_message(ERROR_STATIC_OR_TYPE_QUALIFIERS_NOT_ALLOWED_IN_NON_PARAMETER, + ctx, + p_init_declarator->p_declarator->first_token, + "static or type qualifiers are not allowed in non-parameter array declarator"); + } + + + if (!type_is_pointer(&p_init_declarator->p_declarator->type) && + p_init_declarator->p_declarator->type.type_qualifier_flags & TYPE_QUALIFIER_OBJ_OWNER) + { + compiler_diagnostic_message(ERROR_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER, + ctx, + p_init_declarator->p_declarator->first_token, + "obj_owner qualifier can only be used with pointers"); + } + } + + return p_init_declarator; } void init_declarator_list_destroy(struct init_declarator_list* obj_owner p) { - struct init_declarator* owner item = p->head; - while (item) - { - struct init_declarator* owner next = item->next; - item->next = NULL; - init_declarator_delete(item); - item = next; - } + struct init_declarator* owner item = p->head; + while (item) + { + struct init_declarator* owner next = item->next; + item->next = NULL; + init_declarator_delete(item); + item = next; + } } struct init_declarator_list init_declarator_list(struct parser_ctx* ctx, - struct declaration_specifiers* p_declaration_specifiers) -{ - /* - init-declarator-list: - init-declarator - init-declarator-list , init-declarator - */ - struct init_declarator_list init_declarator_list = { 0 }; - struct init_declarator* owner p_init_declarator = NULL; - - try - { - p_init_declarator = init_declarator(ctx, p_declaration_specifiers); - - if (p_init_declarator == NULL) throw; - LIST_ADD(&init_declarator_list, p_init_declarator); - p_init_declarator = NULL; /*MOVED*/ - - while (ctx->current != NULL && ctx->current->type == ',') - { - parser_match(ctx); - p_init_declarator = init_declarator(ctx, p_declaration_specifiers); - if (p_init_declarator == NULL) throw; - LIST_ADD(&init_declarator_list, p_init_declarator); - p_init_declarator = NULL; /*MOVED*/ - } - } - catch - { - } - - return init_declarator_list; + struct declaration_specifiers* p_declaration_specifiers) +{ + /* + init-declarator-list: + init-declarator + init-declarator-list , init-declarator + */ + struct init_declarator_list init_declarator_list = { 0 }; + struct init_declarator* owner p_init_declarator = NULL; + + try + { + p_init_declarator = init_declarator(ctx, p_declaration_specifiers); + + if (p_init_declarator == NULL) throw; + LIST_ADD(&init_declarator_list, p_init_declarator); + p_init_declarator = NULL; /*MOVED*/ + + while (ctx->current != NULL && ctx->current->type == ',') + { + parser_match(ctx); + p_init_declarator = init_declarator(ctx, p_declaration_specifiers); + if (p_init_declarator == NULL) throw; + LIST_ADD(&init_declarator_list, p_init_declarator); + p_init_declarator = NULL; /*MOVED*/ + } + } + catch + { + } + + return init_declarator_list; } void storage_class_specifier_delete(struct storage_class_specifier* owner p) { - if (p) - { - free(p); - } + if (p) + { + free(p); + } } struct storage_class_specifier* owner storage_class_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return NULL; - - struct storage_class_specifier* owner new_storage_class_specifier = calloc(1, sizeof(struct storage_class_specifier)); - if (new_storage_class_specifier == NULL) - return NULL; - - new_storage_class_specifier->token = ctx->current; - switch (ctx->current->type) - { - case TK_KEYWORD_TYPEDEF: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_TYPEDEF; - break; - case TK_KEYWORD_EXTERN: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_EXTERN; - break; - case TK_KEYWORD_CONSTEXPR: - - new_storage_class_specifier->flags = STORAGE_SPECIFIER_CONSTEXPR; - if (ctx->scopes.tail->scope_level == 0) - new_storage_class_specifier->flags |= STORAGE_SPECIFIER_CONSTEXPR_STATIC; - break; - case TK_KEYWORD_STATIC: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_STATIC; - break; - case TK_KEYWORD__THREAD_LOCAL: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_THREAD_LOCAL; - break; - case TK_KEYWORD_AUTO: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_AUTO; - break; - case TK_KEYWORD_REGISTER: - new_storage_class_specifier->flags = STORAGE_SPECIFIER_REGISTER; - break; - default: - assert(false); - } - - /* - TODO - thread_local may appear with static or extern, - auto may appear with all the others except typedef138), and - constexpr may appear with auto, register, or static. - */ - - parser_match(ctx); - return new_storage_class_specifier; + if (ctx->current == NULL) + return NULL; + + struct storage_class_specifier* owner new_storage_class_specifier = calloc(1, sizeof(struct storage_class_specifier)); + if (new_storage_class_specifier == NULL) + return NULL; + + new_storage_class_specifier->token = ctx->current; + switch (ctx->current->type) + { + case TK_KEYWORD_TYPEDEF: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_TYPEDEF; + break; + case TK_KEYWORD_EXTERN: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_EXTERN; + break; + case TK_KEYWORD_CONSTEXPR: + + new_storage_class_specifier->flags = STORAGE_SPECIFIER_CONSTEXPR; + if (ctx->scopes.tail->scope_level == 0) + new_storage_class_specifier->flags |= STORAGE_SPECIFIER_CONSTEXPR_STATIC; + break; + case TK_KEYWORD_STATIC: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_STATIC; + break; + case TK_KEYWORD__THREAD_LOCAL: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_THREAD_LOCAL; + break; + case TK_KEYWORD_AUTO: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_AUTO; + break; + case TK_KEYWORD_REGISTER: + new_storage_class_specifier->flags = STORAGE_SPECIFIER_REGISTER; + break; + default: + assert(false); + } + + /* + TODO + thread_local may appear with static or extern, + auto may appear with all the others except typedef138), and + constexpr may appear with auto, register, or static. + */ + + parser_match(ctx); + return new_storage_class_specifier; } struct typeof_specifier_argument* owner typeof_specifier_argument(struct parser_ctx* ctx) { - struct typeof_specifier_argument* owner new_typeof_specifier_argument = calloc(1, sizeof(struct typeof_specifier_argument)); - if (new_typeof_specifier_argument == NULL) - return NULL; - try - { - if (first_of_type_name(ctx)) - { - new_typeof_specifier_argument->type_name = type_name(ctx); - } - else - { - const bool disable_evaluation_copy = ctx->evaluation_is_disabled; - ctx->evaluation_is_disabled = true; - new_typeof_specifier_argument->expression = expression(ctx); - /*restore*/ - ctx->evaluation_is_disabled = disable_evaluation_copy; - - if (new_typeof_specifier_argument->expression == NULL) throw; - - //declarator_type_clear_name(new_typeof_specifier_argument->expression->type.declarator_type); - } - } - catch - { - } - return new_typeof_specifier_argument; + struct typeof_specifier_argument* owner new_typeof_specifier_argument = calloc(1, sizeof(struct typeof_specifier_argument)); + if (new_typeof_specifier_argument == NULL) + return NULL; + try + { + if (first_of_type_name(ctx)) + { + new_typeof_specifier_argument->type_name = type_name(ctx); + } + else + { + const bool disable_evaluation_copy = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = true; + new_typeof_specifier_argument->expression = expression(ctx); + /*restore*/ + ctx->evaluation_is_disabled = disable_evaluation_copy; + + if (new_typeof_specifier_argument->expression == NULL) throw; + + //declarator_type_clear_name(new_typeof_specifier_argument->expression->type.declarator_type); + } + } + catch + { + } + return new_typeof_specifier_argument; } bool first_of_typeof_specifier(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; + if (ctx->current == NULL) + return false; - return ctx->current->type == TK_KEYWORD_TYPEOF || - ctx->current->type == TK_KEYWORD_TYPEOF_UNQUAL; + return ctx->current->type == TK_KEYWORD_TYPEOF || + ctx->current->type == TK_KEYWORD_TYPEOF_UNQUAL; } struct typeof_specifier* owner typeof_specifier(struct parser_ctx* ctx) { - struct typeof_specifier* owner p_typeof_specifier = NULL; - try - { - p_typeof_specifier = calloc(1, sizeof(struct typeof_specifier)); - if (p_typeof_specifier == NULL) throw; + struct typeof_specifier* owner p_typeof_specifier = NULL; + try + { + p_typeof_specifier = calloc(1, sizeof(struct typeof_specifier)); + if (p_typeof_specifier == NULL) throw; - p_typeof_specifier->first_token = ctx->current; + p_typeof_specifier->first_token = ctx->current; - const bool is_typeof_unqual = ctx->current->type == TK_KEYWORD_TYPEOF_UNQUAL; - parser_match(ctx); - if (parser_match_tk(ctx, '(') != 0) throw; + const bool is_typeof_unqual = ctx->current->type == TK_KEYWORD_TYPEOF_UNQUAL; + parser_match(ctx); + if (parser_match_tk(ctx, '(') != 0) throw; - p_typeof_specifier->typeof_specifier_argument = typeof_specifier_argument(ctx); - if (p_typeof_specifier->typeof_specifier_argument == NULL) throw; + p_typeof_specifier->typeof_specifier_argument = typeof_specifier_argument(ctx); + if (p_typeof_specifier->typeof_specifier_argument == NULL) throw; - if (p_typeof_specifier->typeof_specifier_argument->expression) - { - p_typeof_specifier->type = type_dup(&p_typeof_specifier->typeof_specifier_argument->expression->type); - } - else if (p_typeof_specifier->typeof_specifier_argument->type_name) - { - p_typeof_specifier->type = type_dup(&p_typeof_specifier->typeof_specifier_argument->type_name->declarator->type); - } + if (p_typeof_specifier->typeof_specifier_argument->expression) + { + p_typeof_specifier->type = type_dup(&p_typeof_specifier->typeof_specifier_argument->expression->type); + } + else if (p_typeof_specifier->typeof_specifier_argument->type_name) + { + p_typeof_specifier->type = type_dup(&p_typeof_specifier->typeof_specifier_argument->type_name->declarator->type); + } - if (p_typeof_specifier->type.storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) - { - compiler_set_warning_with_token(W_TYPEOF_ARRAY_PARAMETER, ctx, ctx->current, "typeof used in array arguments"); + if (p_typeof_specifier->type.storage_class_specifier_flags & STORAGE_SPECIFIER_PARAMETER) + { + compiler_diagnostic_message(W_TYPEOF_ARRAY_PARAMETER, ctx, ctx->current, "typeof used in array arguments"); - if (type_is_array(&p_typeof_specifier->type)) - { - struct type t = type_param_array_to_pointer(&p_typeof_specifier->type); - type_swap(&t, &p_typeof_specifier->type); - type_destroy(&t); - } + if (type_is_array(&p_typeof_specifier->type)) + { + struct type t = type_param_array_to_pointer(&p_typeof_specifier->type); + type_swap(&t, &p_typeof_specifier->type); + type_destroy(&t); + } - } + } - if (is_typeof_unqual) - { - type_remove_qualifiers(&p_typeof_specifier->type); - } + if (is_typeof_unqual) + { + type_remove_qualifiers(&p_typeof_specifier->type); + } - type_visit_to_mark_anonymous(&p_typeof_specifier->type); + type_visit_to_mark_anonymous(&p_typeof_specifier->type); - free((void* owner) p_typeof_specifier->type.name_opt); - p_typeof_specifier->type.name_opt = NULL; + free((void* owner) p_typeof_specifier->type.name_opt); + p_typeof_specifier->type.name_opt = NULL; - p_typeof_specifier->last_token = ctx->current; - parser_match_tk(ctx, ')'); - } - catch - { - } + p_typeof_specifier->last_token = ctx->current; + parser_match_tk(ctx, ')'); + } + catch + { + } - return p_typeof_specifier; + return p_typeof_specifier; } void typeof_specifier_argument_delete(struct typeof_specifier_argument* owner p) { - if (p) - { - expression_delete(p->expression); - type_name_delete(p->type_name); - free(p); - } + if (p) + { + expression_delete(p->expression); + type_name_delete(p->type_name); + free(p); + } } void typeof_specifier_delete(struct typeof_specifier* owner p) { - if (p) - { - typeof_specifier_argument_delete(p->typeof_specifier_argument); - type_destroy(&p->type); - free(p); - } + if (p) + { + typeof_specifier_argument_delete(p->typeof_specifier_argument); + type_destroy(&p->type); + free(p); + } } void type_specifier_delete(struct type_specifier* owner p) { - if (p) - { - struct_or_union_specifier_delete(p->struct_or_union_specifier); - typeof_specifier_delete(p->typeof_specifier); - enum_specifier_delete(p->enum_specifier); - atomic_type_specifier_delete(p->atomic_type_specifier); - free(p); - } + if (p) + { + struct_or_union_specifier_delete(p->struct_or_union_specifier); + typeof_specifier_delete(p->typeof_specifier); + enum_specifier_delete(p->enum_specifier); + atomic_type_specifier_delete(p->atomic_type_specifier); + free(p); + } } struct type_specifier* owner type_specifier(struct parser_ctx* ctx) { - /* - type-specifier: - void - char - short - int - long - float - double - signed - unsigned - _BitInt ( constant-expression ) - bool C23 - _Complex - _Decimal32 - _Decimal64 - _Decimal128 - atomic-type-specifier - struct-or-union-specifier - enum-specifier - typedef-name - typeof-specifier C23 - */ - - struct type_specifier* owner p_type_specifier = calloc(1, sizeof * p_type_specifier); - if (p_type_specifier == NULL) - return NULL; - - - - - switch (ctx->current->type) - { - case TK_KEYWORD_VOID: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_VOID; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_CHAR: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_CHAR; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_SHORT: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_SHORT; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_INT: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - //microsoft - case TK_KEYWORD__INT8: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT8; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD__INT16: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT16; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - case TK_KEYWORD__INT32: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT32; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - case TK_KEYWORD__INT64: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_INT64; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - //end microsoft - - case TK_KEYWORD_LONG: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_LONG; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_FLOAT: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_FLOAT; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_DOUBLE: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_DOUBLE; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_SIGNED: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_SIGNED; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD_UNSIGNED: - - p_type_specifier->flags = TYPE_SPECIFIER_UNSIGNED; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD__BOOL: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_BOOL; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD__COMPLEX: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_COMPLEX; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD__DECIMAL32: - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL32; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD__DECIMAL64: - - p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL64; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - case TK_KEYWORD__DECIMAL128: - p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL128; - p_type_specifier->token = ctx->current; - parser_match(ctx); - return p_type_specifier; - - - } - - - - if (first_of_typeof_specifier(ctx)) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_TYPEOF; - p_type_specifier->typeof_specifier = typeof_specifier(ctx); - } - else if (first_of_atomic_type_specifier(ctx)) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_ATOMIC; - p_type_specifier->atomic_type_specifier = atomic_type_specifier(ctx); - } - else if (first_of_struct_or_union(ctx)) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_STRUCT_OR_UNION; - p_type_specifier->struct_or_union_specifier = struct_or_union_specifier(ctx); - } - else if (first_of_enum_specifier(ctx)) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_ENUM; - p_type_specifier->enum_specifier = enum_specifier(ctx); - } - else if (ctx->current->type == TK_IDENTIFIER) - { - p_type_specifier->token = ctx->current; - p_type_specifier->flags = TYPE_SPECIFIER_TYPEDEF; - - p_type_specifier->typedef_declarator = - find_declarator(ctx, ctx->current->lexeme, NULL); - - //Ser chegou aqui já tem que exitir (reaprovecitar?) - assert(p_type_specifier->typedef_declarator != NULL); - - parser_match(ctx); - } - - - return p_type_specifier; + /* + type-specifier: + void + char + short + int + long + float + double + signed + unsigned + _BitInt ( constant-expression ) + bool C23 + _Complex + _Decimal32 + _Decimal64 + _Decimal128 + atomic-type-specifier + struct-or-union-specifier + enum-specifier + typedef-name + typeof-specifier C23 + */ + + struct type_specifier* owner p_type_specifier = calloc(1, sizeof * p_type_specifier); + if (p_type_specifier == NULL) + return NULL; + + + + + switch (ctx->current->type) + { + case TK_KEYWORD_VOID: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_VOID; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_CHAR: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_CHAR; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_SHORT: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_SHORT; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_INT: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + //microsoft + case TK_KEYWORD__INT8: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT8; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__INT16: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT16; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case TK_KEYWORD__INT32: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT32; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case TK_KEYWORD__INT64: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_INT64; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + //end microsoft + + case TK_KEYWORD_LONG: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_LONG; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_FLOAT: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_FLOAT; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_DOUBLE: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_DOUBLE; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_SIGNED: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_SIGNED; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD_UNSIGNED: + + p_type_specifier->flags = TYPE_SPECIFIER_UNSIGNED; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__BOOL: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_BOOL; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__COMPLEX: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_COMPLEX; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__DECIMAL32: + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL32; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__DECIMAL64: + + p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL64; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + case TK_KEYWORD__DECIMAL128: + p_type_specifier->flags = TYPE_SPECIFIER_DECIMAL128; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + + default: + // Do nothing + break; + + } + + + + if (first_of_typeof_specifier(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_TYPEOF; + p_type_specifier->typeof_specifier = typeof_specifier(ctx); + } + else if (first_of_atomic_type_specifier(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_ATOMIC; + p_type_specifier->atomic_type_specifier = atomic_type_specifier(ctx); + } + else if (first_of_struct_or_union(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_STRUCT_OR_UNION; + p_type_specifier->struct_or_union_specifier = struct_or_union_specifier(ctx); + } + else if (first_of_enum_specifier(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_ENUM; + p_type_specifier->enum_specifier = enum_specifier(ctx); + } + else if (ctx->current->type == TK_IDENTIFIER) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = TYPE_SPECIFIER_TYPEDEF; + + p_type_specifier->typedef_declarator = + find_declarator(ctx, ctx->current->lexeme, NULL); + + //Ser chegou aqui já tem que exitir (reaprovecitar?) + assert(p_type_specifier->typedef_declarator != NULL); + + parser_match(ctx); + } + + + return p_type_specifier; } struct struct_or_union_specifier* get_complete_struct_or_union_specifier(struct struct_or_union_specifier* p_struct_or_union_specifier) { - if (p_struct_or_union_specifier == NULL) - return NULL; - - if (p_struct_or_union_specifier->member_declaration_list.head) - { - /*p_struct_or_union_specifier is complete*/ - return p_struct_or_union_specifier; - } - else if (p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection && - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->member_declaration_list.head) - { - /*p_struct_or_union_specifier is the first seem tag tag points directly to complete*/ - return p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection; - } - else if (p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection && - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection && - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection->member_declaration_list.head) - { - /* all others points to the first seem that points to the complete*/ - return p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection; - } - - return NULL; + if (p_struct_or_union_specifier == NULL) + return NULL; + + if (p_struct_or_union_specifier->member_declaration_list.head) + { + /*p_struct_or_union_specifier is complete*/ + return p_struct_or_union_specifier; + } + else if (p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection && + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->member_declaration_list.head) + { + /*p_struct_or_union_specifier is the first seem tag tag points directly to complete*/ + return p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection; + } + else if (p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection && + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection && + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection->member_declaration_list.head) + { + /* all others points to the first seem that points to the complete*/ + return p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection; + } + + return NULL; } bool struct_or_union_specifier_is_complete(struct struct_or_union_specifier* p_struct_or_union_specifier) { - return - get_complete_struct_or_union_specifier(p_struct_or_union_specifier) != NULL; + return + get_complete_struct_or_union_specifier(p_struct_or_union_specifier) != NULL; } void struct_or_union_specifier_delete(struct struct_or_union_specifier* owner p) { - if (p) - { - member_declaration_list_destroy(&p->member_declaration_list); - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - free(p); - } + if (p) + { + member_declaration_list_destroy(&p->member_declaration_list); + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + free(p); + } } struct struct_or_union_specifier* owner struct_or_union_specifier(struct parser_ctx* ctx) { - struct struct_or_union_specifier* owner p_struct_or_union_specifier = calloc(1, sizeof * p_struct_or_union_specifier); - - if (p_struct_or_union_specifier == NULL) - return NULL; - - static_set(*p_struct_or_union_specifier, "zero"); - - if (ctx->current->type == TK_KEYWORD_STRUCT || - ctx->current->type == TK_KEYWORD_UNION) - { - p_struct_or_union_specifier->first_token = ctx->current; - parser_match(ctx); - } - else - { - assert(false); - } - - p_struct_or_union_specifier->attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); - - struct struct_or_union_specifier* p_first_tag_in_this_scope = NULL; - - if (ctx->current->type == TK_IDENTIFIER) - { - p_struct_or_union_specifier->tagtoken = ctx->current; - /* - Structure, union, and enumeration tags have scope that begins just after the - appearance of the tag in a type specifier that declares the tag. - */ - - snprintf(p_struct_or_union_specifier->tag_name, sizeof p_struct_or_union_specifier->tag_name, "%s", ctx->current->lexeme); - - struct map_entry* p_entry = hashmap_find(&ctx->scopes.tail->tags, ctx->current->lexeme); - if (p_entry) - { - /*this tag already exist in this scope*/ - if (p_entry->type == TAG_TYPE_STRUCT_OR_UNION_SPECIFIER) - { - p_first_tag_in_this_scope = p_entry->p; - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_in_this_scope; - } - else - { - compiler_set_error_with_token(C_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, - ctx, - ctx->current, - "use of '%s' with tag type that does not match previous declaration.", - ctx->current->lexeme); - } - } - else - { - /*tag does not exist in the current scope, let search on upper scopes*/ - struct struct_or_union_specifier* p_first_tag_previous_scopes = find_struct_or_union_specifier(ctx, ctx->current->lexeme); - if (p_first_tag_previous_scopes == NULL) - { - /*tag not found, so it is the first appearence*/ - p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; - hashmap_set(&ctx->scopes.tail->tags, ctx->current->lexeme, p_struct_or_union_specifier, TAG_TYPE_STRUCT_OR_UNION_SPECIFIER); - - } - else - { - /*tag already exists in some scope*/ - p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_previous_scopes; - } - } - - parser_match(ctx); - } - else - { - /*struct without a tag, in this case we make one*/ - snprintf(p_struct_or_union_specifier->tag_name, sizeof p_struct_or_union_specifier->tag_name, "_anonymous_struct_%d", s_anonymous_struct_count); - s_anonymous_struct_count++; - p_struct_or_union_specifier->has_anonymous_tag = true; - p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; - hashmap_set(&ctx->scopes.tail->tags, p_struct_or_union_specifier->tag_name, p_struct_or_union_specifier, TAG_TYPE_STRUCT_OR_UNION_SPECIFIER); - } - - - - if (ctx->current->type == '{') - { - /* - this is the complete struct - */ - - struct struct_or_union_specifier* first = find_struct_or_union_specifier(ctx, p_struct_or_union_specifier->tag_name); - - if (first) - { - /* - The first tag (will the one at symbol table) will point to the complete struct - */ - first->complete_struct_or_union_specifier_indirection = p_struct_or_union_specifier; - } - - if (p_struct_or_union_specifier->tagtoken) - naming_convention_struct_tag(ctx, p_struct_or_union_specifier->tagtoken); - - struct token* firsttoken = ctx->current; - parser_match(ctx); - - p_struct_or_union_specifier->member_declaration_list = member_declaration_list(ctx, p_struct_or_union_specifier); - p_struct_or_union_specifier->member_declaration_list.first_token = firsttoken; - p_struct_or_union_specifier->last_token = ctx->current; - p_struct_or_union_specifier->member_declaration_list.last_token = ctx->current; - parser_match_tk(ctx, '}'); - - } - else - { - p_struct_or_union_specifier->last_token = ctx->current; - } - - struct struct_or_union_specifier* p_complete = - get_complete_struct_or_union_specifier(p_struct_or_union_specifier); - - /*check if complete struct is deprecated*/ - if (p_complete) - { - if (p_complete->attribute_specifier_sequence_opt && - p_complete->attribute_specifier_sequence_opt->attributes_flags & STD_ATTRIBUTE_DEPRECATED) - { - if (p_struct_or_union_specifier->tagtoken) - { - //TODO add deprecated message - compiler_set_warning_with_token(W_DEPRECATED, ctx, p_struct_or_union_specifier->first_token, "'%s' is deprecated", p_struct_or_union_specifier->tagtoken->lexeme); - } - else - { - compiler_set_warning_with_token(W_DEPRECATED, ctx, p_struct_or_union_specifier->first_token, "deprecated"); - } - } - } - - return p_struct_or_union_specifier; + struct struct_or_union_specifier* owner p_struct_or_union_specifier = calloc(1, sizeof * p_struct_or_union_specifier); + + if (p_struct_or_union_specifier == NULL) + return NULL; + + static_set(*p_struct_or_union_specifier, "zero"); + + if (ctx->current->type == TK_KEYWORD_STRUCT || + ctx->current->type == TK_KEYWORD_UNION) + { + p_struct_or_union_specifier->first_token = ctx->current; + parser_match(ctx); + } + else + { + assert(false); + } + + p_struct_or_union_specifier->attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); + + struct struct_or_union_specifier* p_first_tag_in_this_scope = NULL; + + if (ctx->current->type == TK_IDENTIFIER) + { + p_struct_or_union_specifier->tagtoken = ctx->current; + /* + Structure, union, and enumeration tags have scope that begins just after the + appearance of the tag in a type specifier that declares the tag. + */ + + snprintf(p_struct_or_union_specifier->tag_name, sizeof p_struct_or_union_specifier->tag_name, "%s", ctx->current->lexeme); + + struct map_entry* p_entry = hashmap_find(&ctx->scopes.tail->tags, ctx->current->lexeme); + if (p_entry) + { + /*this tag already exist in this scope*/ + if (p_entry->type == TAG_TYPE_STRUCT_OR_UNION_SPECIFIER) + { + p_first_tag_in_this_scope = p_entry->p; + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_in_this_scope; + } + else + { + compiler_diagnostic_message(ERROR_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, + ctx, + ctx->current, + "use of '%s' with tag type that does not match previous declaration.", + ctx->current->lexeme); + } + } + else + { + /*tag does not exist in the current scope, let search on upper scopes*/ + struct struct_or_union_specifier* p_first_tag_previous_scopes = find_struct_or_union_specifier(ctx, ctx->current->lexeme); + if (p_first_tag_previous_scopes == NULL) + { + /*tag not found, so it is the first appearence*/ + p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; + hashmap_set(&ctx->scopes.tail->tags, ctx->current->lexeme, p_struct_or_union_specifier, TAG_TYPE_STRUCT_OR_UNION_SPECIFIER); + + } + else + { + /*tag already exists in some scope*/ + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_previous_scopes; + } + } + + parser_match(ctx); + } + else + { + /*struct without a tag, in this case we make one*/ + snprintf(p_struct_or_union_specifier->tag_name, sizeof p_struct_or_union_specifier->tag_name, "_anonymous_struct_%d", s_anonymous_struct_count); + s_anonymous_struct_count++; + p_struct_or_union_specifier->has_anonymous_tag = true; + p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; + hashmap_set(&ctx->scopes.tail->tags, p_struct_or_union_specifier->tag_name, p_struct_or_union_specifier, TAG_TYPE_STRUCT_OR_UNION_SPECIFIER); + } + + + + if (ctx->current->type == '{') + { + /* + this is the complete struct + */ + + struct struct_or_union_specifier* first = find_struct_or_union_specifier(ctx, p_struct_or_union_specifier->tag_name); + + if (first) + { + /* + The first tag (will the one at symbol table) will point to the complete struct + */ + first->complete_struct_or_union_specifier_indirection = p_struct_or_union_specifier; + } + + if (p_struct_or_union_specifier->tagtoken) + naming_convention_struct_tag(ctx, p_struct_or_union_specifier->tagtoken); + + struct token* firsttoken = ctx->current; + parser_match(ctx); + + p_struct_or_union_specifier->member_declaration_list = member_declaration_list(ctx, p_struct_or_union_specifier); + p_struct_or_union_specifier->member_declaration_list.first_token = firsttoken; + p_struct_or_union_specifier->last_token = ctx->current; + p_struct_or_union_specifier->member_declaration_list.last_token = ctx->current; + parser_match_tk(ctx, '}'); + + } + else + { + p_struct_or_union_specifier->last_token = ctx->current; + } + + struct struct_or_union_specifier* p_complete = + get_complete_struct_or_union_specifier(p_struct_or_union_specifier); + + /*check if complete struct is deprecated*/ + if (p_complete) + { + if (p_complete->attribute_specifier_sequence_opt && + p_complete->attribute_specifier_sequence_opt->attributes_flags & STD_ATTRIBUTE_DEPRECATED) + { + if (p_struct_or_union_specifier->tagtoken) + { + //TODO add deprecated message + compiler_diagnostic_message(W_DEPRECATED, ctx, p_struct_or_union_specifier->first_token, "'%s' is deprecated", p_struct_or_union_specifier->tagtoken->lexeme); + } + else + { + compiler_diagnostic_message(W_DEPRECATED, ctx, p_struct_or_union_specifier->first_token, "deprecated"); + } + } + } + + return p_struct_or_union_specifier; } struct member_declarator* owner member_declarator( - struct parser_ctx* ctx, - struct struct_or_union_specifier* p_struct_or_union_specifier, - const struct specifier_qualifier_list* p_specifier_qualifier_list + struct parser_ctx* ctx, + struct struct_or_union_specifier* p_struct_or_union_specifier, + const struct specifier_qualifier_list* p_specifier_qualifier_list ) { - /* - member-declarator: - declarator - declaratoropt : constant-expression - */ - struct member_declarator* owner p_member_declarator = calloc(1, sizeof(struct member_declarator)); + /* + member-declarator: + declarator + declaratoropt : constant-expression + */ + struct member_declarator* owner p_member_declarator = calloc(1, sizeof(struct member_declarator)); - struct token* p_token_name = NULL; + struct token* p_token_name = NULL; - p_member_declarator->declarator = declarator(ctx, p_specifier_qualifier_list, /*declaration_specifiers*/NULL, false, &p_token_name); - p_member_declarator->declarator->name = p_token_name; - p_member_declarator->declarator->specifier_qualifier_list = p_specifier_qualifier_list; + p_member_declarator->declarator = declarator(ctx, p_specifier_qualifier_list, /*declaration_specifiers*/NULL, false, &p_token_name); + p_member_declarator->declarator->name = p_token_name; + p_member_declarator->declarator->specifier_qualifier_list = p_specifier_qualifier_list; - p_member_declarator->declarator->type = make_type_using_declarator(ctx, p_member_declarator->declarator); + p_member_declarator->declarator->type = make_type_using_declarator(ctx, p_member_declarator->declarator); - /*extension*/ - if (type_is_owner(&p_member_declarator->declarator->type)) - { - /*having at least 1 owner member, the struct type is owner by default*/ - p_struct_or_union_specifier->is_owner = true; - } + /*extension*/ + if (type_is_owner(&p_member_declarator->declarator->type)) + { + /*having at least 1 owner member, the struct type is owner by default*/ + p_struct_or_union_specifier->is_owner = true; + } - if (p_member_declarator->declarator->name) - naming_convention_struct_member(ctx, p_member_declarator->declarator->name, &p_member_declarator->declarator->type); + if (p_member_declarator->declarator->name) + naming_convention_struct_member(ctx, p_member_declarator->declarator->name, &p_member_declarator->declarator->type); - if (ctx->current->type == ':') - { - parser_match(ctx); - p_member_declarator->constant_expression = constant_expression(ctx, true); - } - return p_member_declarator; + if (ctx->current->type == ':') + { + parser_match(ctx); + p_member_declarator->constant_expression = constant_expression(ctx, true); + } + return p_member_declarator; } void member_declarator_delete(struct member_declarator* owner p) { - if (p) - { - expression_delete(p->constant_expression); - assert(p->next == NULL); - declarator_delete(p->declarator); - free(p); - } -} - -void member_declarator_list_delete(struct member_declarator_list* owner p) -{ - if (p) - { - struct member_declarator* owner item = p->head; - while (item) - { - struct member_declarator* owner next = item->next; - item->next = NULL; - member_declarator_delete(item); - item = next; - } - free(p); - } + if (p) + { + expression_delete(p->constant_expression); + assert(p->next == NULL); + declarator_delete(p->declarator); + free(p); + } +} + +void member_declarator_list_delete(struct member_declarator_list* owner opt p) +{ + if (p) + { + struct member_declarator* owner item = p->head; + while (item) + { + struct member_declarator* owner next = item->next; + item->next = NULL; + member_declarator_delete(item); + item = next; + } + free(p); + } } struct member_declarator_list* owner member_declarator_list( - struct parser_ctx* ctx, - struct struct_or_union_specifier* p_struct_or_union_specifier, - const struct specifier_qualifier_list* p_specifier_qualifier_list) + struct parser_ctx* ctx, + struct struct_or_union_specifier* p_struct_or_union_specifier, + const struct specifier_qualifier_list* p_specifier_qualifier_list) { - struct member_declarator_list* owner p_member_declarator_list = calloc(1, sizeof(struct member_declarator_list)); - LIST_ADD(p_member_declarator_list, member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list)); - while (ctx->current->type == ',') - { - parser_match(ctx); - LIST_ADD(p_member_declarator_list, member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list)); - } - return p_member_declarator_list; + struct member_declarator_list* owner p_member_declarator_list = calloc(1, sizeof(struct member_declarator_list)); + LIST_ADD(p_member_declarator_list, member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list)); + while (ctx->current->type == ',') + { + parser_match(ctx); + LIST_ADD(p_member_declarator_list, member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list)); + } + return p_member_declarator_list; } void member_declaration_list_destroy(struct member_declaration_list* obj_owner p) { - struct member_declaration* owner item = p->head; - while (item) - { - struct member_declaration* owner next = item->next; - item->next = NULL; - member_declaration_delete(item); - item = next; - } + struct member_declaration* owner item = p->head; + while (item) + { + struct member_declaration* owner next = item->next; + item->next = NULL; + member_declaration_delete(item); + item = next; + } } -struct member_declaration_list member_declaration_list(struct parser_ctx* ctx, const struct struct_or_union_specifier* p_struct_or_union_specifier) +struct member_declaration_list member_declaration_list(struct parser_ctx* ctx, struct struct_or_union_specifier* p_struct_or_union_specifier) { - struct member_declaration_list list = { 0 }; - //member_declaration - //member_declaration_list member_declaration + struct member_declaration_list list = { 0 }; + //member_declaration + //member_declaration_list member_declaration - struct member_declaration* owner p_member_declaration = NULL; + struct member_declaration* owner p_member_declaration = NULL; - try - { - p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); + try + { + p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); - if (p_member_declaration == NULL) throw; - LIST_ADD(&list, p_member_declaration); - p_member_declaration = NULL; /*MOVED*/ + if (p_member_declaration == NULL) throw; + LIST_ADD(&list, p_member_declaration); + p_member_declaration = NULL; /*MOVED*/ - while (ctx->current && ctx->current->type != '}') - { - p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); - if (p_member_declaration == NULL) throw; - LIST_ADD(&list, p_member_declaration); - p_member_declaration = NULL; /*MOVED*/ - } - } - catch - { - } + while (ctx->current && ctx->current->type != '}') + { + p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); + if (p_member_declaration == NULL) throw; + LIST_ADD(&list, p_member_declaration); + p_member_declaration = NULL; /*MOVED*/ + } + } + catch + { + } - return list; + return list; } void member_declaration_delete(struct member_declaration* owner p) { - if (p) - { - assert(p->next == NULL); - specifier_qualifier_list_delete(p->specifier_qualifier_list); - member_declarator_list_delete(p->member_declarator_list_opt); - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - static_assert_declaration_delete(p->static_assert_declaration); - free(p); - } + if (p) + { + assert(p->next == NULL); + specifier_qualifier_list_delete(p->specifier_qualifier_list); + member_declarator_list_delete(p->member_declarator_list_opt); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + static_assert_declaration_delete(p->static_assert_declaration); + free(p); + } } struct member_declaration* owner member_declaration(struct parser_ctx* ctx, - struct struct_or_union_specifier* p_struct_or_union_specifier) -{ - struct member_declaration* owner p_member_declaration = calloc(1, sizeof(struct member_declaration)); - //attribute_specifier_sequence_opt specifier_qualifier_list member_declarator_list_opt ';' - //static_assert_declaration - if (ctx->current->type == TK_KEYWORD__STATIC_ASSERT) - { - p_member_declaration->static_assert_declaration = static_assert_declaration(ctx); - } - else - { - p_member_declaration->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); - - p_member_declaration->specifier_qualifier_list = specifier_qualifier_list(ctx); - if (ctx->current->type != ';') - { - p_member_declaration->member_declarator_list_opt = member_declarator_list(ctx, - p_struct_or_union_specifier, - p_member_declaration->specifier_qualifier_list); - } - parser_match_tk(ctx, ';'); - } - return p_member_declaration; + struct struct_or_union_specifier* p_struct_or_union_specifier) +{ + struct member_declaration* owner p_member_declaration = calloc(1, sizeof(struct member_declaration)); + //attribute_specifier_sequence_opt specifier_qualifier_list member_declarator_list_opt ';' + //static_assert_declaration + if (ctx->current->type == TK_KEYWORD__STATIC_ASSERT) + { + p_member_declaration->static_assert_declaration = static_assert_declaration(ctx); + } + else + { + p_member_declaration->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + + p_member_declaration->specifier_qualifier_list = specifier_qualifier_list(ctx); + if (ctx->current->type != ';') + { + p_member_declaration->member_declarator_list_opt = member_declarator_list(ctx, + p_struct_or_union_specifier, + p_member_declaration->specifier_qualifier_list); + } + parser_match_tk(ctx, ';'); + } + return p_member_declaration; } struct member_declarator* find_member_declarator(struct member_declaration_list* list, const char* name, int* p_member_index) { - int member_index = 0; - - struct member_declaration* p_member_declaration = list->head; - while (p_member_declaration) - { - struct member_declarator* p_member_declarator = NULL; - - if (p_member_declaration->member_declarator_list_opt) - { - p_member_declarator = p_member_declaration->member_declarator_list_opt->head; - - while (p_member_declarator) - { - if (strcmp(p_member_declarator->declarator->name->lexeme, name) == 0) - { - *p_member_index = member_index; - return p_member_declarator; - } - - member_index++; - p_member_declarator = p_member_declarator->next; - } - } - else if (p_member_declaration->specifier_qualifier_list) - { - /* - struct X { - union { - unsigned char Byte[16]; - unsigned short Word[8]; - }; - }; - - struct X* a; - a.Byte[0] & 0xe0; - */ - - if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) - { - struct member_declaration_list* p_member_declaration_list = - &p_member_declaration->specifier_qualifier_list->struct_or_union_specifier->member_declaration_list; - int inner_member_index = 0; - struct member_declarator* p = find_member_declarator(p_member_declaration_list, name, &inner_member_index); - if (p) - { - *p_member_index = member_index + inner_member_index; - return p; - } - } - } - else - { - assert(p_member_declaration->static_assert_declaration != NULL); - } - - - p_member_declaration = p_member_declaration->next; - } - return NULL; + int member_index = 0; + + struct member_declaration* p_member_declaration = list->head; + while (p_member_declaration) + { + struct member_declarator* p_member_declarator = NULL; + + if (p_member_declaration->member_declarator_list_opt) + { + p_member_declarator = p_member_declaration->member_declarator_list_opt->head; + + while (p_member_declarator) + { + if (strcmp(p_member_declarator->declarator->name->lexeme, name) == 0) + { + *p_member_index = member_index; + return p_member_declarator; + } + + member_index++; + p_member_declarator = p_member_declarator->next; + } + } + else if (p_member_declaration->specifier_qualifier_list) + { + /* + struct X { + union { + unsigned char Byte[16]; + unsigned short Word[8]; + }; + }; + + struct X* a; + a.Byte[0] & 0xe0; + */ + + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct member_declaration_list* p_member_declaration_list = + &p_member_declaration->specifier_qualifier_list->struct_or_union_specifier->member_declaration_list; + int inner_member_index = 0; + struct member_declarator* p = find_member_declarator(p_member_declaration_list, name, &inner_member_index); + if (p) + { + *p_member_index = member_index + inner_member_index; + return p; + } + } + } + else + { + assert(p_member_declaration->static_assert_declaration != NULL); + } + + + p_member_declaration = p_member_declaration->next; + } + return NULL; } void print_specifier_qualifier_list(struct osstream* ss, bool* first, struct specifier_qualifier_list* p_specifier_qualifier_list) { - print_type_qualifier_flags(ss, first, p_specifier_qualifier_list->type_qualifier_flags); + print_type_qualifier_flags(ss, first, p_specifier_qualifier_list->type_qualifier_flags); - if (p_specifier_qualifier_list->enum_specifier) - { + if (p_specifier_qualifier_list->enum_specifier) + { - //TODO - assert(false); + //TODO + assert(false); - } - else if (p_specifier_qualifier_list->struct_or_union_specifier) - { - ss_fprintf(ss, "struct %s", p_specifier_qualifier_list->struct_or_union_specifier->tag_name); - } - else if (p_specifier_qualifier_list->typedef_declarator) - { - print_item(ss, first, p_specifier_qualifier_list->typedef_declarator->name->lexeme); - } - else - { - print_type_specifier_flags(ss, first, p_specifier_qualifier_list->type_specifier_flags); - } + } + else if (p_specifier_qualifier_list->struct_or_union_specifier) + { + ss_fprintf(ss, "struct %s", p_specifier_qualifier_list->struct_or_union_specifier->tag_name); + } + else if (p_specifier_qualifier_list->typedef_declarator) + { + print_item(ss, first, p_specifier_qualifier_list->typedef_declarator->name->lexeme); + } + else + { + print_type_specifier_flags(ss, first, p_specifier_qualifier_list->type_specifier_flags); + } } void specifier_qualifier_list_delete(struct specifier_qualifier_list* owner p) { - if (p) - { - struct type_specifier_qualifier* owner item = p->head; - while (item) - { - struct type_specifier_qualifier* owner next = item->next; - item->next = NULL; - type_specifier_qualifier_delete(item); - item = next; - } + if (p) + { + struct type_specifier_qualifier* owner item = p->head; + while (item) + { + struct type_specifier_qualifier* owner next = item->next; + item->next = NULL; + type_specifier_qualifier_delete(item); + item = next; + } - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence); - free(p); - } + free(p); + } } struct specifier_qualifier_list* owner specifier_qualifier_list(struct parser_ctx* ctx) { - struct specifier_qualifier_list* owner p_specifier_qualifier_list = calloc(1, sizeof(struct specifier_qualifier_list)); - if (p_specifier_qualifier_list == NULL) - return NULL; - - static_set(*p_specifier_qualifier_list, "zero"); - - /* - type_specifier_qualifier attribute_specifier_sequence_opt - type_specifier_qualifier specifier_qualifier_list - */ - try - { - p_specifier_qualifier_list->first_token = ctx->current; - - while (ctx->current != NULL && - (first_of_type_specifier(ctx) || - first_of_type_qualifier(ctx))) - { - - if (ctx->current->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) - { - if (p_specifier_qualifier_list->type_specifier_flags != TYPE_SPECIFIER_NONE) - { - //typedef tem que aparecer sozinho - //exemplo Socket eh nome e nao typdef - //typedef int Socket; - //struct X {int Socket;}; - break; - } - } - - struct type_specifier_qualifier* owner p_type_specifier_qualifier = type_specifier_qualifier(ctx); - - if (p_type_specifier_qualifier->type_specifier) - { - if (add_specifier(ctx, - &p_specifier_qualifier_list->type_specifier_flags, - p_type_specifier_qualifier->type_specifier->flags) != 0) - { - type_specifier_qualifier_delete(p_type_specifier_qualifier); - throw; - } - - if (p_type_specifier_qualifier->type_specifier->struct_or_union_specifier) - { - p_specifier_qualifier_list->struct_or_union_specifier = p_type_specifier_qualifier->type_specifier->struct_or_union_specifier; - } - else if (p_type_specifier_qualifier->type_specifier->enum_specifier) - { - p_specifier_qualifier_list->enum_specifier = p_type_specifier_qualifier->type_specifier->enum_specifier; - } - else if (p_type_specifier_qualifier->type_specifier->typeof_specifier) - { - p_specifier_qualifier_list->typeof_specifier = p_type_specifier_qualifier->type_specifier->typeof_specifier; - } - else if (p_type_specifier_qualifier->type_specifier->token->type == TK_IDENTIFIER) - { - p_specifier_qualifier_list->typedef_declarator = - find_declarator(ctx, - p_type_specifier_qualifier->type_specifier->token->lexeme, - NULL); - } - - } - else if (p_type_specifier_qualifier->type_qualifier) - { - p_specifier_qualifier_list->type_qualifier_flags |= p_type_specifier_qualifier->type_qualifier->flags; - } - - LIST_ADD(p_specifier_qualifier_list, p_type_specifier_qualifier); - p_specifier_qualifier_list->p_attribute_specifier_sequence = attribute_specifier_sequence_opt(ctx); - } - } - catch - { - } - - final_specifier(ctx, &p_specifier_qualifier_list->type_specifier_flags); - p_specifier_qualifier_list->last_token = previous_parser_token(ctx->current); - return p_specifier_qualifier_list; + struct specifier_qualifier_list* owner p_specifier_qualifier_list = calloc(1, sizeof(struct specifier_qualifier_list)); + if (p_specifier_qualifier_list == NULL) + return NULL; + + static_set(*p_specifier_qualifier_list, "zero"); + + /* + type_specifier_qualifier attribute_specifier_sequence_opt + type_specifier_qualifier specifier_qualifier_list + */ + try + { + p_specifier_qualifier_list->first_token = ctx->current; + + while (ctx->current != NULL && + (first_of_type_specifier(ctx) || + first_of_type_qualifier(ctx))) + { + + if (ctx->current->flags & TK_FLAG_IDENTIFIER_IS_TYPEDEF) + { + if (p_specifier_qualifier_list->type_specifier_flags != TYPE_SPECIFIER_NONE) + { + //typedef tem que aparecer sozinho + //exemplo Socket eh nome e nao typdef + //typedef int Socket; + //struct X {int Socket;}; + break; + } + } + + struct type_specifier_qualifier* owner p_type_specifier_qualifier = type_specifier_qualifier(ctx); + + if (p_type_specifier_qualifier->type_specifier) + { + if (add_specifier(ctx, + &p_specifier_qualifier_list->type_specifier_flags, + p_type_specifier_qualifier->type_specifier->flags) != 0) + { + type_specifier_qualifier_delete(p_type_specifier_qualifier); + throw; + } + + if (p_type_specifier_qualifier->type_specifier->struct_or_union_specifier) + { + p_specifier_qualifier_list->struct_or_union_specifier = p_type_specifier_qualifier->type_specifier->struct_or_union_specifier; + } + else if (p_type_specifier_qualifier->type_specifier->enum_specifier) + { + p_specifier_qualifier_list->enum_specifier = p_type_specifier_qualifier->type_specifier->enum_specifier; + } + else if (p_type_specifier_qualifier->type_specifier->typeof_specifier) + { + p_specifier_qualifier_list->typeof_specifier = p_type_specifier_qualifier->type_specifier->typeof_specifier; + } + else if (p_type_specifier_qualifier->type_specifier->token->type == TK_IDENTIFIER) + { + p_specifier_qualifier_list->typedef_declarator = + find_declarator(ctx, + p_type_specifier_qualifier->type_specifier->token->lexeme, + NULL); + } + + } + else if (p_type_specifier_qualifier->type_qualifier) + { + p_specifier_qualifier_list->type_qualifier_flags |= p_type_specifier_qualifier->type_qualifier->flags; + } + + LIST_ADD(p_specifier_qualifier_list, p_type_specifier_qualifier); + p_specifier_qualifier_list->p_attribute_specifier_sequence = attribute_specifier_sequence_opt(ctx); + } + } + catch + { + } + + final_specifier(ctx, &p_specifier_qualifier_list->type_specifier_flags); + p_specifier_qualifier_list->last_token = previous_parser_token(ctx->current); + return p_specifier_qualifier_list; } void type_specifier_qualifier_delete(struct type_specifier_qualifier* owner p) { - if (p) - { - assert(p->next == NULL); - if (p->type_qualifier) - { - assert(p->type_qualifier->next == NULL); - free(p->type_qualifier); - } - alignment_specifier_delete(p->alignment_specifier); + if (p) + { + assert(p->next == NULL); + if (p->type_qualifier) + { + assert(p->type_qualifier->next == NULL); + free(p->type_qualifier); + } + alignment_specifier_delete(p->alignment_specifier); - type_specifier_delete(p->type_specifier); - free(p); - } + type_specifier_delete(p->type_specifier); + free(p); + } } struct type_specifier_qualifier* owner type_specifier_qualifier(struct parser_ctx* ctx) { - struct type_specifier_qualifier* owner type_specifier_qualifier = calloc(1, sizeof * type_specifier_qualifier); - //type_specifier - //type_qualifier - //alignment_specifier - if (first_of_type_specifier(ctx)) - { - type_specifier_qualifier->type_specifier = type_specifier(ctx); - } - else if (first_of_type_qualifier(ctx)) - { - type_specifier_qualifier->type_qualifier = type_qualifier(ctx); - } - else if (first_of_alignment_specifier(ctx)) - { - type_specifier_qualifier->alignment_specifier = alignment_specifier(ctx); - } - else - { - assert(false); - } - return type_specifier_qualifier; + struct type_specifier_qualifier* owner type_specifier_qualifier = calloc(1, sizeof * type_specifier_qualifier); + //type_specifier + //type_qualifier + //alignment_specifier + if (first_of_type_specifier(ctx)) + { + type_specifier_qualifier->type_specifier = type_specifier(ctx); + } + else if (first_of_type_qualifier(ctx)) + { + type_specifier_qualifier->type_qualifier = type_qualifier(ctx); + } + else if (first_of_alignment_specifier(ctx)) + { + type_specifier_qualifier->alignment_specifier = alignment_specifier(ctx); + } + else + { + assert(false); + } + return type_specifier_qualifier; } void enum_specifier_delete(struct enum_specifier* owner p) { - if (p) - { - specifier_qualifier_list_delete(p->specifier_qualifier_list); - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - enumerator_list_destroy(&p->enumerator_list); - free(p); - } + if (p) + { + specifier_qualifier_list_delete(p->specifier_qualifier_list); + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + enumerator_list_destroy(&p->enumerator_list); + free(p); + } } struct enum_specifier* owner enum_specifier(struct parser_ctx* ctx) { - /* - enum-type-specifier: - : specifier-qualifier-list - */ - - /* - enum-specifier: - - "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt - { enumerator-list } - - "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt - { enumerator-list , } - enum identifier enum-type-specifier opt - */ - struct enum_specifier* owner p_enum_specifier = NULL; - try - { - p_enum_specifier = calloc(1, sizeof * p_enum_specifier); - - p_enum_specifier->first_token = ctx->current; - parser_match_tk(ctx, TK_KEYWORD_ENUM); - - p_enum_specifier->attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); - - - struct enum_specifier* p_previous_tag_in_this_scope = NULL; - bool has_identifier = false; - if (ctx->current->type == TK_IDENTIFIER) - { - has_identifier = true; - p_enum_specifier->tag_token = ctx->current; - parser_match(ctx); - } - - if (ctx->current->type == ':') - { - /*C23*/ - parser_match(ctx); - p_enum_specifier->specifier_qualifier_list = specifier_qualifier_list(ctx); - } - - if (ctx->current->type == '{') - { - if (p_enum_specifier->tag_token) - naming_convention_enum_tag(ctx, p_enum_specifier->tag_token); - - /*points to itself*/ - p_enum_specifier->complete_enum_specifier = p_enum_specifier; - - parser_match_tk(ctx, '{'); - p_enum_specifier->enumerator_list = enumerator_list(ctx, p_enum_specifier); - if (ctx->current->type == ',') - { - parser_match(ctx); - } - parser_match_tk(ctx, '}'); - } - else - { - if (!has_identifier) - { - compiler_set_error_with_token(C_MISSING_ENUM_TAG_NAME, ctx, ctx->current, "missing enum tag name"); - throw; - } - } - - /* - * Let's search for this tag at current scope only - */ - struct map_entry* p_entry = NULL; - - if (p_enum_specifier->tag_token && - p_enum_specifier->tag_token->lexeme) - { - p_entry = hashmap_find(&ctx->scopes.tail->tags, p_enum_specifier->tag_token->lexeme); - } - if (p_entry) - { - /* - ok.. we have this tag at this scope - */ - if (p_entry->type == TAG_TYPE_ENUN_SPECIFIER) - { - p_previous_tag_in_this_scope = p_entry->p; - - if (p_previous_tag_in_this_scope->enumerator_list.head != NULL && - p_enum_specifier->enumerator_list.head != NULL) - { - compiler_set_error_with_token(C_MULTIPLE_DEFINITION_ENUM, - ctx, - p_enum_specifier->tag_token, - "multiple definition of 'enum %s'", - p_enum_specifier->tag_token->lexeme); - } - else if (p_previous_tag_in_this_scope->enumerator_list.head != NULL) - { - p_enum_specifier->complete_enum_specifier = p_previous_tag_in_this_scope; - } - else if (p_enum_specifier->enumerator_list.head != NULL) - { - p_previous_tag_in_this_scope->complete_enum_specifier = p_enum_specifier; - } - } - else - { - compiler_set_error_with_token(C_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, - ctx, - ctx->current, "use of '%s' with tag type that does not match previous declaration.", - ctx->current->lexeme); - throw; - } - } - else - { - /* - * we didn't find at current scope let's search in previous scopes - */ - struct enum_specifier* p_other = NULL; - - if (p_enum_specifier->tag_token) - { - p_other = find_enum_specifier(ctx, p_enum_specifier->tag_token->lexeme); - } - - if (p_other == NULL) - { - /* - * we didn't find, so this is the first time this tag is used - */ - if (p_enum_specifier->tag_token) - { - hashmap_set(&ctx->scopes.tail->tags, p_enum_specifier->tag_token->lexeme, p_enum_specifier, TAG_TYPE_ENUN_SPECIFIER); - } - else - { - //make a name? - } - } - else - { - - - /* - * we found this enum tag in previous scopes - */ - - if (p_enum_specifier->enumerator_list.head != NULL) - { - /*it is a new definition - itself*/ - //p_enum_specifier->complete_enum_specifier = p_enum_specifier; - } - else if (p_other->enumerator_list.head != NULL) - { - /*previous enum is complete*/ - p_enum_specifier->complete_enum_specifier = p_other; - } - } - } - - } - catch - { - } - - return p_enum_specifier; + /* + enum-type-specifier: + : specifier-qualifier-list + */ + + /* + enum-specifier: + + "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt + { enumerator-list } + + "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt + { enumerator-list , } + enum identifier enum-type-specifier opt + */ + struct enum_specifier* owner p_enum_specifier = NULL; + try + { + p_enum_specifier = calloc(1, sizeof * p_enum_specifier); + + p_enum_specifier->first_token = ctx->current; + parser_match_tk(ctx, TK_KEYWORD_ENUM); + + p_enum_specifier->attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); + + + struct enum_specifier* p_previous_tag_in_this_scope = NULL; + bool has_identifier = false; + if (ctx->current->type == TK_IDENTIFIER) + { + has_identifier = true; + p_enum_specifier->tag_token = ctx->current; + parser_match(ctx); + } + + if (ctx->current->type == ':') + { + /*C23*/ + parser_match(ctx); + p_enum_specifier->specifier_qualifier_list = specifier_qualifier_list(ctx); + } + + if (ctx->current->type == '{') + { + if (p_enum_specifier->tag_token) + naming_convention_enum_tag(ctx, p_enum_specifier->tag_token); + + /*points to itself*/ + p_enum_specifier->complete_enum_specifier = p_enum_specifier; + + parser_match_tk(ctx, '{'); + p_enum_specifier->enumerator_list = enumerator_list(ctx, p_enum_specifier); + if (ctx->current->type == ',') + { + parser_match(ctx); + } + parser_match_tk(ctx, '}'); + } + else + { + if (!has_identifier) + { + compiler_diagnostic_message(ERROR_MISSING_ENUM_TAG_NAME, ctx, ctx->current, "missing enum tag name"); + throw; + } + } + + /* + * Let's search for this tag at current scope only + */ + struct map_entry* p_entry = NULL; + + if (p_enum_specifier->tag_token && + p_enum_specifier->tag_token->lexeme) + { + p_entry = hashmap_find(&ctx->scopes.tail->tags, p_enum_specifier->tag_token->lexeme); + } + if (p_entry) + { + /* + ok.. we have this tag at this scope + */ + if (p_entry->type == TAG_TYPE_ENUN_SPECIFIER) + { + p_previous_tag_in_this_scope = p_entry->p; + + if (p_previous_tag_in_this_scope->enumerator_list.head != NULL && + p_enum_specifier->enumerator_list.head != NULL) + { + compiler_diagnostic_message(ERROR_MULTIPLE_DEFINITION_ENUM, + ctx, + p_enum_specifier->tag_token, + "multiple definition of 'enum %s'", + p_enum_specifier->tag_token->lexeme); + } + else if (p_previous_tag_in_this_scope->enumerator_list.head != NULL) + { + p_enum_specifier->complete_enum_specifier = p_previous_tag_in_this_scope; + } + else if (p_enum_specifier->enumerator_list.head != NULL) + { + p_previous_tag_in_this_scope->complete_enum_specifier = p_enum_specifier; + } + } + else + { + compiler_diagnostic_message(ERROR_TAG_TYPE_DOES_NOT_MATCH_PREVIOUS_DECLARATION, + ctx, + ctx->current, "use of '%s' with tag type that does not match previous declaration.", + ctx->current->lexeme); + throw; + } + } + else + { + /* + * we didn't find at current scope let's search in previous scopes + */ + struct enum_specifier* p_other = NULL; + + if (p_enum_specifier->tag_token) + { + p_other = find_enum_specifier(ctx, p_enum_specifier->tag_token->lexeme); + } + + if (p_other == NULL) + { + /* + * we didn't find, so this is the first time this tag is used + */ + if (p_enum_specifier->tag_token) + { + hashmap_set(&ctx->scopes.tail->tags, p_enum_specifier->tag_token->lexeme, p_enum_specifier, TAG_TYPE_ENUN_SPECIFIER); + } + else + { + //make a name? + } + } + else + { + + + /* + * we found this enum tag in previous scopes + */ + + if (p_enum_specifier->enumerator_list.head != NULL) + { + /*it is a new definition - itself*/ + //p_enum_specifier->complete_enum_specifier = p_enum_specifier; + } + else if (p_other->enumerator_list.head != NULL) + { + /*previous enum is complete*/ + p_enum_specifier->complete_enum_specifier = p_other; + } + } + } + + } + catch + { + } + + return p_enum_specifier; } void enumerator_list_destroy(struct enumerator_list* obj_owner p) { - struct enumerator* owner item = p->head; - while (item) - { - struct enumerator* owner next = item->next; - item->next = NULL; - enumerator_delete(item); - item = next; - } + struct enumerator* owner item = p->head; + while (item) + { + struct enumerator* owner next = item->next; + item->next = NULL; + enumerator_delete(item); + item = next; + } } struct enumerator_list enumerator_list(struct parser_ctx* ctx, const struct enum_specifier* p_enum_specifier) { - /* - enumerator - enumerator_list ',' enumerator - */ - long long next_enumerator_value = 0; + /* + enumerator + enumerator_list ',' enumerator + */ + long long next_enumerator_value = 0; - struct enumerator_list enumeratorlist = { 0 }; - struct enumerator* owner p_enumerator = NULL; - try - { - p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); - if (p_enumerator == NULL) throw; + struct enumerator_list enumeratorlist = { 0 }; + struct enumerator* owner p_enumerator = NULL; + try + { + p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); + if (p_enumerator == NULL) throw; - LIST_ADD(&enumeratorlist, p_enumerator); + LIST_ADD(&enumeratorlist, p_enumerator); - while (ctx->current != NULL && ctx->current->type == ',') - { - parser_match(ctx); /*pode ter uma , vazia no fim*/ + while (ctx->current != NULL && ctx->current->type == ',') + { + parser_match(ctx); /*pode ter uma , vazia no fim*/ - if (ctx->current && ctx->current->type != '}') - { - p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); - if (p_enumerator == NULL) throw; - LIST_ADD(&enumeratorlist, p_enumerator); - } - } - } - catch - { - } + if (ctx->current && ctx->current->type != '}') + { + p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); + if (p_enumerator == NULL) throw; + LIST_ADD(&enumeratorlist, p_enumerator); + } + } + } + catch + { + } - return enumeratorlist; + return enumeratorlist; } void enumerator_delete(struct enumerator* owner p) { - if (p) - { - assert(p->next == NULL); - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - expression_delete(p->constant_expression_opt); + if (p) + { + assert(p->next == NULL); + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + expression_delete(p->constant_expression_opt); - free(p); - } + free(p); + } } struct enumerator* owner enumerator(struct parser_ctx* ctx, - const struct enum_specifier* p_enum_specifier, - long long* p_next_enumerator_value) + const struct enum_specifier* p_enum_specifier, + long long* p_next_enumerator_value) { - //TODO VALUE - struct enumerator* owner p_enumerator = calloc(1, sizeof(struct enumerator)); - p_enumerator->enum_specifier = p_enum_specifier; - struct token* name = ctx->current; + //TODO VALUE + struct enumerator* owner p_enumerator = calloc(1, sizeof(struct enumerator)); + p_enumerator->enum_specifier = p_enum_specifier; + struct token* name = ctx->current; - naming_convention_enumerator(ctx, name); + naming_convention_enumerator(ctx, name); - parser_match_tk(ctx, TK_IDENTIFIER); + parser_match_tk(ctx, TK_IDENTIFIER); - p_enumerator->attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + p_enumerator->attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); - p_enumerator->token = name; - hashmap_set(&ctx->scopes.tail->variables, p_enumerator->token->lexeme, p_enumerator, TAG_TYPE_ENUMERATOR); + p_enumerator->token = name; + hashmap_set(&ctx->scopes.tail->variables, p_enumerator->token->lexeme, p_enumerator, TAG_TYPE_ENUMERATOR); - if (ctx->current->type == '=') - { - parser_match(ctx); - p_enumerator->constant_expression_opt = constant_expression(ctx, true); - p_enumerator->value = constant_value_to_ll(&p_enumerator->constant_expression_opt->constant_value); - *p_next_enumerator_value = p_enumerator->value; - (*p_next_enumerator_value)++; //TODO overflow and size check - } - else - { - p_enumerator->value = *p_next_enumerator_value; - (*p_next_enumerator_value)++; //TODO overflow and size check - } + if (ctx->current->type == '=') + { + parser_match(ctx); + p_enumerator->constant_expression_opt = constant_expression(ctx, true); + p_enumerator->value = constant_value_to_ll(&p_enumerator->constant_expression_opt->constant_value); + *p_next_enumerator_value = p_enumerator->value; + (*p_next_enumerator_value)++; //TODO overflow and size check + } + else + { + p_enumerator->value = *p_next_enumerator_value; + (*p_next_enumerator_value)++; //TODO overflow and size check + } - return p_enumerator; + return p_enumerator; } void alignment_specifier_delete(struct alignment_specifier* owner p) { - if (p) - { - expression_delete(p->constant_expression); - type_name_delete(p->type_name); - free(p); - } + if (p) + { + expression_delete(p->constant_expression); + type_name_delete(p->type_name); + free(p); + } } struct alignment_specifier* owner alignment_specifier(struct parser_ctx* ctx) { - struct alignment_specifier* owner alignment_specifier = calloc(1, sizeof * alignment_specifier); - alignment_specifier->token = ctx->current; - parser_match_tk(ctx, TK_KEYWORD__ALIGNAS); - parser_match_tk(ctx, '('); - if (first_of_type_name(ctx)) - { - alignment_specifier->type_name = type_name(ctx); - } - else - { - alignment_specifier->constant_expression = constant_expression(ctx, true); - } - parser_match_tk(ctx, ')'); - return alignment_specifier; + struct alignment_specifier* owner alignment_specifier = calloc(1, sizeof * alignment_specifier); + alignment_specifier->token = ctx->current; + parser_match_tk(ctx, TK_KEYWORD__ALIGNAS); + parser_match_tk(ctx, '('); + if (first_of_type_name(ctx)) + { + alignment_specifier->type_name = type_name(ctx); + } + else + { + alignment_specifier->constant_expression = constant_expression(ctx, true); + } + parser_match_tk(ctx, ')'); + return alignment_specifier; } void atomic_type_specifier_delete(struct atomic_type_specifier* owner p) { - if (p) - { - type_name_delete(p->type_name); - free(p); - } + if (p) + { + type_name_delete(p->type_name); + free(p); + } } struct atomic_type_specifier* owner atomic_type_specifier(struct parser_ctx* ctx) { - //'_Atomic' '(' type_name ')' - struct atomic_type_specifier* owner p = calloc(1, sizeof * p); - p->token = ctx->current; - parser_match_tk(ctx, TK_KEYWORD__ATOMIC); - parser_match_tk(ctx, '('); - p->type_name = type_name(ctx); - parser_match_tk(ctx, ')'); - return p; + //'_Atomic' '(' type_name ')' + struct atomic_type_specifier* owner p = calloc(1, sizeof * p); + p->token = ctx->current; + parser_match_tk(ctx, TK_KEYWORD__ATOMIC); + parser_match_tk(ctx, '('); + p->type_name = type_name(ctx); + parser_match_tk(ctx, ')'); + return p; } struct type_qualifier* owner type_qualifier(struct parser_ctx* ctx) { - struct type_qualifier* owner p_type_qualifier = calloc(1, sizeof * p_type_qualifier); - - switch (ctx->current->type) - { - case TK_KEYWORD_CONST: - p_type_qualifier->flags = TYPE_QUALIFIER_CONST; - break; - case TK_KEYWORD_RESTRICT: - p_type_qualifier->flags = TYPE_QUALIFIER_RESTRICT; - break; - case TK_KEYWORD_VOLATILE: - p_type_qualifier->flags = TYPE_QUALIFIER_VOLATILE; - break; - case TK_KEYWORD__ATOMIC: - p_type_qualifier->flags = TYPE_QUALIFIER__ATOMIC; - break; - - /* - ownership extensions - */ - - case TK_KEYWORD__OUT: - p_type_qualifier->flags = TYPE_QUALIFIER_OUT; - break; - - case TK_KEYWORD__OWNER: - p_type_qualifier->flags = TYPE_QUALIFIER_OWNER; - break; - - case TK_KEYWORD__OPT: - p_type_qualifier->flags = TYPE_QUALIFIER_OPT; - break; - - case TK_KEYWORD__OBJ_OWNER: - p_type_qualifier->flags = TYPE_QUALIFIER_OBJ_OWNER; - break; - case TK_KEYWORD__VIEW: - p_type_qualifier->flags = TYPE_QUALIFIER_VIEW; - break; - - } - - p_type_qualifier->token = ctx->current; - - //'const' - //'restrict' - //'volatile' - //'_Atomic' - parser_match(ctx); - return p_type_qualifier; + struct type_qualifier* owner p_type_qualifier = calloc(1, sizeof * p_type_qualifier); + + switch (ctx->current->type) + { + case TK_KEYWORD_CONST: + p_type_qualifier->flags = TYPE_QUALIFIER_CONST; + break; + case TK_KEYWORD_RESTRICT: + p_type_qualifier->flags = TYPE_QUALIFIER_RESTRICT; + break; + case TK_KEYWORD_VOLATILE: + p_type_qualifier->flags = TYPE_QUALIFIER_VOLATILE; + break; + case TK_KEYWORD__ATOMIC: + p_type_qualifier->flags = TYPE_QUALIFIER__ATOMIC; + break; + + /* + ownership extensions + */ + + case TK_KEYWORD__OUT: + p_type_qualifier->flags = TYPE_QUALIFIER_OUT; + break; + + case TK_KEYWORD__OWNER: + p_type_qualifier->flags = TYPE_QUALIFIER_OWNER; + break; + + case TK_KEYWORD__OPT: + p_type_qualifier->flags = TYPE_QUALIFIER_OPT; + break; + + case TK_KEYWORD__OBJ_OWNER: + p_type_qualifier->flags = TYPE_QUALIFIER_OBJ_OWNER; + break; + case TK_KEYWORD__VIEW: + p_type_qualifier->flags = TYPE_QUALIFIER_VIEW; + break; + default: + // do nothing + break; + } + + p_type_qualifier->token = ctx->current; + + //'const' + //'restrict' + //'volatile' + //'_Atomic' + parser_match(ctx); + return p_type_qualifier; } // struct type_qualifier* owner type_qualifier_opt(struct parser_ctx* ctx) { - if (first_of_type_qualifier(ctx)) - { - return type_qualifier(ctx); - } - return NULL; + if (first_of_type_qualifier(ctx)) + { + return type_qualifier(ctx); + } + return NULL; } void function_specifier_delete(struct function_specifier* owner p) { - if (p) - { - free(p); - } + if (p) + { + free(p); + } } struct function_specifier* owner function_specifier(struct parser_ctx* ctx) { - if (ctx->current->type == TK_KEYWORD__NORETURN) - { - compiler_set_info_with_token(W_STYLE, ctx, ctx->current, "_Noreturn is deprecated use attributes"); - } + if (ctx->current->type == TK_KEYWORD__NORETURN) + { + compiler_diagnostic_message(W_STYLE, ctx, ctx->current, "_Noreturn is deprecated use attributes"); + } - struct function_specifier* owner p_function_specifier = NULL; - try - { - p_function_specifier = calloc(1, sizeof * p_function_specifier); - if (p_function_specifier == NULL) throw; + struct function_specifier* owner p_function_specifier = NULL; + try + { + p_function_specifier = calloc(1, sizeof * p_function_specifier); + if (p_function_specifier == NULL) throw; - p_function_specifier->token = ctx->current; - parser_match(ctx); + p_function_specifier->token = ctx->current; + parser_match(ctx); - } - catch - { - } + } + catch + { + } - return p_function_specifier; + return p_function_specifier; } void declarator_delete(struct declarator* owner p) { - if (p) - { - type_destroy(&p->type); - direct_declarator_delete(p->direct_declarator); - pointer_delete(p->pointer); - object_destroy(&p->object); - free(p); - } + if (p) + { + type_destroy(&p->type); + direct_declarator_delete(p->direct_declarator); + pointer_delete(p->pointer); + object_destroy(&p->object); + free(p); + } } struct declarator* owner declarator(struct parser_ctx* ctx, - const struct specifier_qualifier_list* p_specifier_qualifier_list, - struct declaration_specifiers* p_declaration_specifiers, - bool abstract_acceptable, - struct token** pp_token_name) + const struct specifier_qualifier_list* p_specifier_qualifier_list, + struct declaration_specifiers* p_declaration_specifiers, + bool abstract_acceptable, + struct token** pp_token_name) { - /* - declarator: - pointer_opt direct-declarator - */ - struct declarator* owner p_declarator = calloc(1, sizeof(struct declarator)); - p_declarator->first_token = ctx->current; - p_declarator->pointer = pointer_opt(ctx); - p_declarator->direct_declarator = direct_declarator(ctx, p_specifier_qualifier_list, p_declaration_specifiers, abstract_acceptable, pp_token_name); + /* + declarator: + pointer_opt direct-declarator + */ + struct declarator* owner p_declarator = calloc(1, sizeof(struct declarator)); + p_declarator->first_token = ctx->current; + p_declarator->pointer = pointer_opt(ctx); + p_declarator->direct_declarator = direct_declarator(ctx, p_specifier_qualifier_list, p_declaration_specifiers, abstract_acceptable, pp_token_name); - if (ctx->current != p_declarator->first_token) - { - p_declarator->last_token = previous_parser_token(ctx->current); - } - else - { - /*empty declarator*/ + if (ctx->current != p_declarator->first_token) + { + p_declarator->last_token = previous_parser_token(ctx->current); + } + else + { + /*empty declarator*/ - p_declarator->last_token = p_declarator->first_token; - p_declarator->first_token = NULL; /*this is the way we can know...first is null*/ - } + p_declarator->last_token = p_declarator->first_token; + p_declarator->first_token = NULL; /*this is the way we can know...first is null*/ + } - return p_declarator; + return p_declarator; } const char* declarator_get_name(struct declarator* p_declarator) { - if (p_declarator->direct_declarator) - { - if (p_declarator->direct_declarator->name_opt) - return p_declarator->direct_declarator->name_opt->lexeme; - } + if (p_declarator->direct_declarator) + { + if (p_declarator->direct_declarator->name_opt) + return p_declarator->direct_declarator->name_opt->lexeme; + } - return NULL; + return NULL; } bool declarator_is_function(struct declarator* p_declarator) { - return (p_declarator->direct_declarator && - p_declarator->direct_declarator->function_declarator != NULL); + return (p_declarator->direct_declarator && + p_declarator->direct_declarator->function_declarator != NULL); } @@ -4100,583 +4020,583 @@ struct function_declarator* owner function_declarator(struct direct_declarator* void function_declarator_delete(struct function_declarator* owner p) { - if (p) - { - direct_declarator_delete(p->direct_declarator); - scope_destroy(&p->parameters_scope); - parameter_type_list_delete(p->parameter_type_list_opt); - free(p); - } + if (p) + { + direct_declarator_delete(p->direct_declarator); + scope_destroy(&p->parameters_scope); + parameter_type_list_delete(p->parameter_type_list_opt); + free(p); + } } void direct_declarator_delete(struct direct_declarator* owner p) { - if (p) - { - declarator_delete(p->declarator); - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - array_declarator_delete(p->array_declarator); - function_declarator_delete(p->function_declarator); + if (p) + { + declarator_delete(p->declarator); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + array_declarator_delete(p->array_declarator); + function_declarator_delete(p->function_declarator); - free(p); - } + free(p); + } } struct direct_declarator* owner direct_declarator(struct parser_ctx* ctx, - const struct specifier_qualifier_list* p_specifier_qualifier_list, - struct declaration_specifiers* p_declaration_specifiers, - bool abstract_acceptable, - struct token** pptoken_name) -{ - /* - direct-declarator: - identifier attribute-specifier-sequenceopt - ( declarator ) - - array-declarator attribute-specifier-sequenceopt - function-declarator attribute-specifier-sequenceopt - */ - struct direct_declarator* owner p_direct_declarator = calloc(1, sizeof(struct direct_declarator)); - try - { - if (ctx->current == NULL) throw; - - struct token* p_token_ahead = parser_look_ahead(ctx); - if (ctx->current->type == TK_IDENTIFIER) - { - p_direct_declarator->name_opt = ctx->current; - if (pptoken_name != NULL) - { - *pptoken_name = ctx->current; - } - - - parser_match(ctx); - p_direct_declarator->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); - } - else if (ctx->current->type == '(') - { - struct token* ahead = parser_look_ahead(ctx); - - if (!first_of_type_specifier_token(ctx, p_token_ahead) && - !first_of_type_qualifier_token(p_token_ahead) && - ahead->type != ')' && - ahead->type != '...') - { - //look ahead para nao confundir (declarator) com parametros funcao ex void (int) - //or function int () - - parser_match(ctx); - - p_direct_declarator->declarator = declarator(ctx, - p_specifier_qualifier_list, - p_declaration_specifiers, - abstract_acceptable, - pptoken_name); - - - parser_match(ctx); //) - } - } - - - while (ctx->current != NULL && - (ctx->current->type == '[' || ctx->current->type == '(')) - { - struct direct_declarator* owner p_direct_declarator2 = calloc(1, sizeof(struct direct_declarator)); - static_set(*p_direct_declarator2, "zero"); - if (ctx->current->type == '[') - { - p_direct_declarator2->array_declarator = array_declarator(p_direct_declarator, ctx); - } - else - { - p_direct_declarator2->function_declarator = function_declarator(p_direct_declarator, ctx); - } - p_direct_declarator = p_direct_declarator2; - } - } - catch - { - } - - return p_direct_declarator; + const struct specifier_qualifier_list* p_specifier_qualifier_list, + struct declaration_specifiers* p_declaration_specifiers, + bool abstract_acceptable, + struct token** pptoken_name) +{ + /* + direct-declarator: + identifier attribute-specifier-sequenceopt + ( declarator ) + + array-declarator attribute-specifier-sequenceopt + function-declarator attribute-specifier-sequenceopt + */ + struct direct_declarator* owner p_direct_declarator = calloc(1, sizeof(struct direct_declarator)); + try + { + if (ctx->current == NULL) throw; + + struct token* p_token_ahead = parser_look_ahead(ctx); + if (ctx->current->type == TK_IDENTIFIER) + { + p_direct_declarator->name_opt = ctx->current; + if (pptoken_name != NULL) + { + *pptoken_name = ctx->current; + } + + + parser_match(ctx); + p_direct_declarator->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + } + else if (ctx->current->type == '(') + { + struct token* ahead = parser_look_ahead(ctx); + + if (!first_of_type_specifier_token(ctx, p_token_ahead) && + !first_of_type_qualifier_token(p_token_ahead) && + ahead->type != ')' && + ahead->type != '...') + { + //look ahead para nao confundir (declarator) com parametros funcao ex void (int) + //or function int () + + parser_match(ctx); + + p_direct_declarator->declarator = declarator(ctx, + p_specifier_qualifier_list, + p_declaration_specifiers, + abstract_acceptable, + pptoken_name); + + + parser_match(ctx); //) + } + } + + + while (ctx->current != NULL && + (ctx->current->type == '[' || ctx->current->type == '(')) + { + struct direct_declarator* owner p_direct_declarator2 = calloc(1, sizeof(struct direct_declarator)); + static_set(*p_direct_declarator2, "zero"); + if (ctx->current->type == '[') + { + p_direct_declarator2->array_declarator = array_declarator(p_direct_declarator, ctx); + } + else + { + p_direct_declarator2->function_declarator = function_declarator(p_direct_declarator, ctx); + } + p_direct_declarator = p_direct_declarator2; + } + } + catch + { + } + + return p_direct_declarator; } void array_declarator_delete(struct array_declarator* owner p) { - if (p) - { - expression_delete(p->assignment_expression); - direct_declarator_delete(p->direct_declarator); - expression_delete(p->expression); - type_qualifier_list_delete(p->type_qualifier_list_opt); + if (p) + { + expression_delete(p->assignment_expression); + direct_declarator_delete(p->direct_declarator); + expression_delete(p->expression); + type_qualifier_list_delete(p->type_qualifier_list_opt); - free(p); - } + free(p); + } } unsigned long long array_declarator_get_size(struct array_declarator* p_array_declarator) { - if (p_array_declarator->assignment_expression) - { - if (constant_value_is_valid(&p_array_declarator->assignment_expression->constant_value)) - { - return - constant_value_to_ull(&p_array_declarator->assignment_expression->constant_value); - } - } - return 0; + if (p_array_declarator->assignment_expression) + { + if (constant_value_is_valid(&p_array_declarator->assignment_expression->constant_value)) + { + return + constant_value_to_ull(&p_array_declarator->assignment_expression->constant_value); + } + } + return 0; } struct array_declarator* owner array_declarator(struct direct_declarator* owner p_direct_declarator, struct parser_ctx* ctx) { - //direct_declarator '[' type_qualifier_list_opt assignment_expression_opt ']' - //direct_declarator '[' 'static' type_qualifier_list_opt assignment_expression ']' - //direct_declarator '[' type_qualifier_list 'static' assignment_expression ']' - //direct_declarator '[' type_qualifier_list_opt '*' ']' - - struct array_declarator* owner p_array_declarator = NULL; - try - { - p_array_declarator = calloc(1, sizeof * p_array_declarator); - if (p_array_declarator == NULL) throw; - - p_array_declarator->direct_declarator = p_direct_declarator; - parser_match_tk(ctx, '['); - - bool has_static = false; - if (ctx->current->type == TK_KEYWORD_STATIC) - { - p_array_declarator->static_token_opt = ctx->current; - parser_match(ctx); - has_static = true; - } - - if (first_of_type_qualifier(ctx)) - { - p_array_declarator->type_qualifier_list_opt = type_qualifier_list(ctx); - } - - if (!has_static) - { - if (ctx->current->type == TK_KEYWORD_STATIC) - { - parser_match(ctx); - has_static = true; - } - } - - if (has_static) - { - //tem que ter.. - - const bool evaluation_is_disabled = ctx->evaluation_is_disabled; - ctx->evaluation_is_disabled = false; - p_array_declarator->assignment_expression = assignment_expression(ctx); - /*restore*/ - ctx->evaluation_is_disabled = evaluation_is_disabled; - - if (p_array_declarator->assignment_expression == NULL) throw; - } - else - { - //opcional - if (ctx->current->type == '*') - { - parser_match(ctx); - } - else if (ctx->current->type != ']') - { - const bool evaluation_is_disabled = ctx->evaluation_is_disabled; - ctx->evaluation_is_disabled = false; - p_array_declarator->assignment_expression = assignment_expression(ctx); - /*restore*/ - ctx->evaluation_is_disabled = evaluation_is_disabled; - if (p_array_declarator->assignment_expression == NULL) throw; - } - else - { - } - } - - parser_match_tk(ctx, ']'); - } - catch - { - if (p_array_declarator) - { - } - } - - - - return p_array_declarator; + //direct_declarator '[' type_qualifier_list_opt assignment_expression_opt ']' + //direct_declarator '[' 'static' type_qualifier_list_opt assignment_expression ']' + //direct_declarator '[' type_qualifier_list 'static' assignment_expression ']' + //direct_declarator '[' type_qualifier_list_opt '*' ']' + + struct array_declarator* owner p_array_declarator = NULL; + try + { + p_array_declarator = calloc(1, sizeof * p_array_declarator); + if (p_array_declarator == NULL) throw; + + p_array_declarator->direct_declarator = p_direct_declarator; + parser_match_tk(ctx, '['); + + bool has_static = false; + if (ctx->current->type == TK_KEYWORD_STATIC) + { + p_array_declarator->static_token_opt = ctx->current; + parser_match(ctx); + has_static = true; + } + + if (first_of_type_qualifier(ctx)) + { + p_array_declarator->type_qualifier_list_opt = type_qualifier_list(ctx); + } + + if (!has_static) + { + if (ctx->current->type == TK_KEYWORD_STATIC) + { + parser_match(ctx); + has_static = true; + } + } + + if (has_static) + { + //tem que ter.. + + const bool evaluation_is_disabled = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = false; + p_array_declarator->assignment_expression = assignment_expression(ctx); + /*restore*/ + ctx->evaluation_is_disabled = evaluation_is_disabled; + + if (p_array_declarator->assignment_expression == NULL) throw; + } + else + { + //opcional + if (ctx->current->type == '*') + { + parser_match(ctx); + } + else if (ctx->current->type != ']') + { + const bool evaluation_is_disabled = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = false; + p_array_declarator->assignment_expression = assignment_expression(ctx); + /*restore*/ + ctx->evaluation_is_disabled = evaluation_is_disabled; + if (p_array_declarator->assignment_expression == NULL) throw; + } + else + { + } + } + + parser_match_tk(ctx, ']'); + } + catch + { + if (p_array_declarator) + { + } + } + + + + return p_array_declarator; } struct function_declarator* owner function_declarator(struct direct_declarator* owner p_direct_declarator, struct parser_ctx* ctx) { - struct function_declarator* owner p_function_declarator = calloc(1, sizeof(struct function_declarator)); - //faz um push da funcion_scope_declarator_list que esta vivendo mais em cima - //eh feito o pop mais em cima tb.. aqui dentro do decide usar. - //ctx->funcion_scope_declarator_list->outer_scope = ctx->current_scope; - //ctx->current_scope = ctx->funcion_scope_declarator_list; - //direct_declarator '(' parameter_type_list_opt ')' + struct function_declarator* owner p_function_declarator = calloc(1, sizeof(struct function_declarator)); + //faz um push da funcion_scope_declarator_list que esta vivendo mais em cima + //eh feito o pop mais em cima tb.. aqui dentro do decide usar. + //ctx->funcion_scope_declarator_list->outer_scope = ctx->current_scope; + //ctx->current_scope = ctx->funcion_scope_declarator_list; + //direct_declarator '(' parameter_type_list_opt ')' - p_function_declarator->direct_declarator = p_direct_declarator; - p_function_declarator->parameters_scope.scope_level = ctx->scopes.tail->scope_level + 1; - p_function_declarator->parameters_scope.variables.capacity = 5; - p_function_declarator->parameters_scope.tags.capacity = 1; + p_function_declarator->direct_declarator = p_direct_declarator; + p_function_declarator->parameters_scope.scope_level = ctx->scopes.tail->scope_level + 1; + p_function_declarator->parameters_scope.variables.capacity = 5; + p_function_declarator->parameters_scope.tags.capacity = 1; - scope_list_push(&ctx->scopes, &p_function_declarator->parameters_scope); + scope_list_push(&ctx->scopes, &p_function_declarator->parameters_scope); - //print_scope(&ctx->scopes); + //print_scope(&ctx->scopes); - parser_match_tk(ctx, '('); - if (ctx->current->type != ')') - { - p_function_declarator->parameter_type_list_opt = parameter_type_list(ctx); - } - parser_match_tk(ctx, ')'); + parser_match_tk(ctx, '('); + if (ctx->current->type != ')') + { + p_function_declarator->parameter_type_list_opt = parameter_type_list(ctx); + } + parser_match_tk(ctx, ')'); - //print_scope(&ctx->scopes); + //print_scope(&ctx->scopes); - scope_list_pop(&ctx->scopes); + scope_list_pop(&ctx->scopes); - //print_scope(&ctx->scopes); + //print_scope(&ctx->scopes); - return p_function_declarator; + return p_function_declarator; } void pointer_delete(struct pointer* owner p) { - if (p) - { - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - type_qualifier_list_delete(p->type_qualifier_list_opt); + if (p) + { + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + type_qualifier_list_delete(p->type_qualifier_list_opt); - struct pointer* owner item = p->pointer; - while (item) - { - struct pointer* owner next = item->pointer; - attribute_specifier_sequence_delete(item->attribute_specifier_sequence_opt); - type_qualifier_list_delete(item->type_qualifier_list_opt); - free(item); - item = next; - } + struct pointer* owner item = p->pointer; + while (item) + { + struct pointer* owner next = item->pointer; + attribute_specifier_sequence_delete(item->attribute_specifier_sequence_opt); + type_qualifier_list_delete(item->type_qualifier_list_opt); + free(item); + item = next; + } - free(p); - } + free(p); + } } struct pointer* owner pointer_opt(struct parser_ctx* ctx) { - struct pointer* owner p = NULL; - struct pointer* owner p_pointer = NULL; - try - { - while (ctx->current != NULL && ctx->current->type == '*') - { - p_pointer = calloc(1, sizeof(struct pointer)); - if (p_pointer == NULL) throw; + struct pointer* owner p = NULL; + struct pointer* owner p_pointer = NULL; + try + { + while (ctx->current != NULL && ctx->current->type == '*') + { + p_pointer = calloc(1, sizeof(struct pointer)); + if (p_pointer == NULL) throw; - static_set(*p_pointer, "zero"); + static_set(*p_pointer, "zero"); - p = p_pointer; - parser_match(ctx); + p = p_pointer; + parser_match(ctx); - p_pointer->attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + p_pointer->attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - if (first_of_type_qualifier(ctx)) - { - p_pointer->type_qualifier_list_opt = type_qualifier_list(ctx); - } + if (first_of_type_qualifier(ctx)) + { + p_pointer->type_qualifier_list_opt = type_qualifier_list(ctx); + } - while (ctx->current != NULL && ctx->current->type == '*') - { - p_pointer->pointer = pointer_opt(ctx); - if (p_pointer->pointer == NULL) - throw; - } - } - } - catch - { - } + while (ctx->current != NULL && ctx->current->type == '*') + { + p_pointer->pointer = pointer_opt(ctx); + if (p_pointer->pointer == NULL) + throw; + } + } + } + catch + { + } - //'*' attribute_specifier_sequence_opt type_qualifier_list_opt - //'*' attribute_specifier_sequence_opt type_qualifier_list_opt pointer - return p; + //'*' attribute_specifier_sequence_opt type_qualifier_list_opt + //'*' attribute_specifier_sequence_opt type_qualifier_list_opt pointer + return p; } void type_qualifier_list_delete(struct type_qualifier_list* owner p) { - if (p) - { - struct type_qualifier* owner item = p->head; - while (item) - { - struct type_qualifier* owner next = item->next; - item->next = NULL; - free(item); - item = next; - } - free(p); - } + if (p) + { + struct type_qualifier* owner item = p->head; + while (item) + { + struct type_qualifier* owner next = item->next; + item->next = NULL; + free(item); + item = next; + } + free(p); + } } struct type_qualifier_list* owner type_qualifier_list(struct parser_ctx* ctx) { - //type_qualifier - //type_qualifier_list type_qualifier + //type_qualifier + //type_qualifier_list type_qualifier - struct type_qualifier_list* owner p_type_qualifier_list = NULL; - struct type_qualifier* owner p_type_qualifier = NULL; + struct type_qualifier_list* owner p_type_qualifier_list = NULL; + struct type_qualifier* owner p_type_qualifier = NULL; - try - { - p_type_qualifier_list = calloc(1, sizeof(struct type_qualifier_list)); - if (p_type_qualifier_list == NULL) throw; + try + { + p_type_qualifier_list = calloc(1, sizeof(struct type_qualifier_list)); + if (p_type_qualifier_list == NULL) throw; - p_type_qualifier = type_qualifier(ctx); - if (p_type_qualifier == NULL) throw; + p_type_qualifier = type_qualifier(ctx); + if (p_type_qualifier == NULL) throw; - p_type_qualifier_list->flags |= p_type_qualifier->flags; - LIST_ADD(p_type_qualifier_list, p_type_qualifier); - p_type_qualifier = NULL; /*MOVED*/ + p_type_qualifier_list->flags |= p_type_qualifier->flags; + LIST_ADD(p_type_qualifier_list, p_type_qualifier); + p_type_qualifier = NULL; /*MOVED*/ - while (ctx->current != NULL && first_of_type_qualifier(ctx)) - { - p_type_qualifier = type_qualifier(ctx); - if (p_type_qualifier == NULL) throw; + while (ctx->current != NULL && first_of_type_qualifier(ctx)) + { + p_type_qualifier = type_qualifier(ctx); + if (p_type_qualifier == NULL) throw; - p_type_qualifier_list->flags |= p_type_qualifier->flags; - LIST_ADD(p_type_qualifier_list, p_type_qualifier); - p_type_qualifier = NULL; /*MOVED*/ - } - } - catch - { - } + p_type_qualifier_list->flags |= p_type_qualifier->flags; + LIST_ADD(p_type_qualifier_list, p_type_qualifier); + p_type_qualifier = NULL; /*MOVED*/ + } + } + catch + { + } - return p_type_qualifier_list; + return p_type_qualifier_list; } void parameter_type_list_delete(struct parameter_type_list* owner p) { - if (p) - { - parameter_list_delete(p->parameter_list); - free(p); - } + if (p) + { + parameter_list_delete(p->parameter_list); + free(p); + } } struct parameter_type_list* owner parameter_type_list(struct parser_ctx* ctx) { - struct parameter_type_list* owner p_parameter_type_list = calloc(1, sizeof(struct parameter_type_list)); - //parameter_list - //parameter_list ',' '...' - p_parameter_type_list->parameter_list = parameter_list(ctx); + struct parameter_type_list* owner p_parameter_type_list = calloc(1, sizeof(struct parameter_type_list)); + //parameter_list + //parameter_list ',' '...' + p_parameter_type_list->parameter_list = parameter_list(ctx); - if (p_parameter_type_list->parameter_list->head == - p_parameter_type_list->parameter_list->tail) - { - if (type_is_void(&p_parameter_type_list->parameter_list->head->declarator->type)) - { - p_parameter_type_list->is_void = true; - } - } + if (p_parameter_type_list->parameter_list->head == + p_parameter_type_list->parameter_list->tail) + { + if (type_is_void(&p_parameter_type_list->parameter_list->head->declarator->type)) + { + p_parameter_type_list->is_void = true; + } + } - /*ja esta saindo com a virgula consumida do parameter_list para evitar ahead*/ - if (ctx->current->type == '...') - { - parser_match(ctx); - //parser_match_tk(ctx, '...'); - p_parameter_type_list->is_var_args = true; - } - return p_parameter_type_list; + /*ja esta saindo com a virgula consumida do parameter_list para evitar ahead*/ + if (ctx->current->type == '...') + { + parser_match(ctx); + //parser_match_tk(ctx, '...'); + p_parameter_type_list->is_var_args = true; + } + return p_parameter_type_list; } void parameter_list_delete(struct parameter_list* owner p) { - if (p) - { - struct parameter_declaration* owner item = p->head; - while (item) - { - struct parameter_declaration* owner next = item->next; - item->next = NULL; - parameter_declaration_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct parameter_declaration* owner item = p->head; + while (item) + { + struct parameter_declaration* owner next = item->next; + item->next = NULL; + parameter_declaration_delete(item); + item = next; + } + free(p); + } } struct parameter_list* owner parameter_list(struct parser_ctx* ctx) { - /* - parameter_list - parameter_declaration - parameter_list ',' parameter_declaration - */ - struct parameter_list* owner p_parameter_list = NULL; - struct parameter_declaration* owner p_parameter_declaration = NULL; - try - { - p_parameter_list = calloc(1, sizeof(struct parameter_list)); - if (p_parameter_list == NULL) throw; - - p_parameter_declaration = parameter_declaration(ctx); - if (p_parameter_declaration == NULL) throw; - - LIST_ADD(p_parameter_list, p_parameter_declaration); - p_parameter_declaration = NULL; /*MOVED*/ - - while (ctx->current != NULL && ctx->current->type == ',') - { - parser_match(ctx); - if (ctx->current->type == '...') - { - //follow - break; - } - - p_parameter_declaration = parameter_declaration(ctx); - if (p_parameter_declaration == NULL) throw; - - LIST_ADD(p_parameter_list, p_parameter_declaration); - p_parameter_declaration = NULL; /*MOVED*/ - } - } - catch - { - } - return p_parameter_list; + /* + parameter_list + parameter_declaration + parameter_list ',' parameter_declaration + */ + struct parameter_list* owner p_parameter_list = NULL; + struct parameter_declaration* owner p_parameter_declaration = NULL; + try + { + p_parameter_list = calloc(1, sizeof(struct parameter_list)); + if (p_parameter_list == NULL) throw; + + p_parameter_declaration = parameter_declaration(ctx); + if (p_parameter_declaration == NULL) throw; + + LIST_ADD(p_parameter_list, p_parameter_declaration); + p_parameter_declaration = NULL; /*MOVED*/ + + while (ctx->current != NULL && ctx->current->type == ',') + { + parser_match(ctx); + if (ctx->current->type == '...') + { + //follow + break; + } + + p_parameter_declaration = parameter_declaration(ctx); + if (p_parameter_declaration == NULL) throw; + + LIST_ADD(p_parameter_list, p_parameter_declaration); + p_parameter_declaration = NULL; /*MOVED*/ + } + } + catch + { + } + return p_parameter_list; } void parameter_declaration_delete(struct parameter_declaration* owner p) { - if (p) - { - attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); - declaration_specifiers_delete(p->declaration_specifiers); - declarator_delete(p->declarator); + if (p) + { + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + declaration_specifiers_delete(p->declaration_specifiers); + declarator_delete(p->declarator); - assert(p->next == NULL); - free(p); - } + assert(p->next == NULL); + free(p); + } } struct parameter_declaration* owner parameter_declaration(struct parser_ctx* ctx) { - struct parameter_declaration* owner p_parameter_declaration = calloc(1, sizeof(struct parameter_declaration)); + struct parameter_declaration* owner p_parameter_declaration = calloc(1, sizeof(struct parameter_declaration)); - p_parameter_declaration->attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + p_parameter_declaration->attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - p_parameter_declaration->declaration_specifiers = declaration_specifiers(ctx, STORAGE_SPECIFIER_PARAMETER); + p_parameter_declaration->declaration_specifiers = declaration_specifiers(ctx, STORAGE_SPECIFIER_PARAMETER); - //talvez no ctx colocar um flag que esta em argumentos - //TODO se tiver uma struct tag novo... - //warning: declaration of 'struct X' will not be visible outside of this function [-Wvisibility] - struct token* p_token_name = 0; - p_parameter_declaration->declarator = declarator(ctx, - /*specifier_qualifier_list*/NULL, - p_parameter_declaration->declaration_specifiers, - true/*can be abstract*/, - &p_token_name); - p_parameter_declaration->declarator->name = p_token_name; + //talvez no ctx colocar um flag que esta em argumentos + //TODO se tiver uma struct tag novo... + //warning: declaration of 'struct X' will not be visible outside of this function [-Wvisibility] + struct token* p_token_name = 0; + p_parameter_declaration->declarator = declarator(ctx, + /*specifier_qualifier_list*/NULL, + p_parameter_declaration->declaration_specifiers, + true/*can be abstract*/, + &p_token_name); + p_parameter_declaration->declarator->name = p_token_name; - p_parameter_declaration->declarator->declaration_specifiers = p_parameter_declaration->declaration_specifiers; + p_parameter_declaration->declarator->declaration_specifiers = p_parameter_declaration->declaration_specifiers; - p_parameter_declaration->declarator->type = make_type_using_declarator(ctx, p_parameter_declaration->declarator); + p_parameter_declaration->declarator->type = make_type_using_declarator(ctx, p_parameter_declaration->declarator); - if (p_parameter_declaration->attribute_specifier_sequence_opt) - { - p_parameter_declaration->declarator->type.attributes_flags |= - p_parameter_declaration->attribute_specifier_sequence_opt->attributes_flags; - } + if (p_parameter_declaration->attribute_specifier_sequence_opt) + { + p_parameter_declaration->declarator->type.attributes_flags |= + p_parameter_declaration->attribute_specifier_sequence_opt->attributes_flags; + } - p_parameter_declaration->declarator->type.storage_class_specifier_flags |= STORAGE_SPECIFIER_PARAMETER; + p_parameter_declaration->declarator->type.storage_class_specifier_flags |= STORAGE_SPECIFIER_PARAMETER; - if (p_parameter_declaration->implicit_token) - { - p_parameter_declaration->declarator->type.attributes_flags |= CAKE_ATTRIBUTE_IMPLICT; - } + if (p_parameter_declaration->implicit_token) + { + p_parameter_declaration->declarator->type.attributes_flags |= CAKE_ATTRIBUTE_IMPLICT; + } - if (p_parameter_declaration->declarator->name) - naming_convention_parameter(ctx, p_parameter_declaration->declarator->name, &p_parameter_declaration->declarator->type); + if (p_parameter_declaration->declarator->name) + naming_convention_parameter(ctx, p_parameter_declaration->declarator->name, &p_parameter_declaration->declarator->type); - //coloca o pametro no escpo atual que deve apontar para escopo paramtros - // da funcao . - // - //assert ctx->current_scope->variables parametrosd - if (p_parameter_declaration->declarator->name) - { - //parametro void nao te name - hashmap_set(&ctx->scopes.tail->variables, - p_parameter_declaration->declarator->name->lexeme, - p_parameter_declaration->declarator, - TAG_TYPE_ONLY_DECLARATOR); - //print_scope(ctx->current_scope); - } - return p_parameter_declaration; + //coloca o pametro no escpo atual que deve apontar para escopo paramtros + // da funcao . + // + //assert ctx->current_scope->variables parametrosd + if (p_parameter_declaration->declarator->name) + { + //parametro void nao te name + hashmap_set(&ctx->scopes.tail->variables, + p_parameter_declaration->declarator->name->lexeme, + p_parameter_declaration->declarator, + TAG_TYPE_ONLY_DECLARATOR); + //print_scope(ctx->current_scope); + } + return p_parameter_declaration; } struct specifier_qualifier_list* owner copy(struct declaration_specifiers* p_declaration_specifiers) { - struct specifier_qualifier_list* owner p_specifier_qualifier_list = calloc(1, sizeof(struct specifier_qualifier_list)); + struct specifier_qualifier_list* owner p_specifier_qualifier_list = calloc(1, sizeof(struct specifier_qualifier_list)); - p_specifier_qualifier_list->type_qualifier_flags = p_declaration_specifiers->type_qualifier_flags; - p_specifier_qualifier_list->type_specifier_flags = p_declaration_specifiers->type_specifier_flags; + p_specifier_qualifier_list->type_qualifier_flags = p_declaration_specifiers->type_qualifier_flags; + p_specifier_qualifier_list->type_specifier_flags = p_declaration_specifiers->type_specifier_flags; - struct declaration_specifier* p_declaration_specifier = - p_declaration_specifiers->head; + struct declaration_specifier* p_declaration_specifier = + p_declaration_specifiers->head; - while (p_declaration_specifier) - { - if (p_declaration_specifier->type_specifier_qualifier) - { - struct type_specifier_qualifier* owner p_specifier_qualifier = calloc(1, sizeof(struct type_specifier_qualifier)); + while (p_declaration_specifier) + { + if (p_declaration_specifier->type_specifier_qualifier) + { + struct type_specifier_qualifier* owner p_specifier_qualifier = calloc(1, sizeof(struct type_specifier_qualifier)); - if (p_declaration_specifier->type_specifier_qualifier->type_qualifier) - { - struct type_qualifier* owner p_type_qualifier = calloc(1, sizeof(struct type_qualifier)); + if (p_declaration_specifier->type_specifier_qualifier->type_qualifier) + { + struct type_qualifier* owner p_type_qualifier = calloc(1, sizeof(struct type_qualifier)); - p_type_qualifier->flags = p_declaration_specifier->type_specifier_qualifier->type_qualifier->flags; + p_type_qualifier->flags = p_declaration_specifier->type_specifier_qualifier->type_qualifier->flags; - p_type_qualifier->token = p_declaration_specifier->type_specifier_qualifier->type_qualifier->token; - p_specifier_qualifier->type_qualifier = p_type_qualifier; - } - else if (p_declaration_specifier->type_specifier_qualifier->type_specifier) - { - struct type_specifier* owner p_type_specifier = calloc(1, sizeof(struct type_specifier)); + p_type_qualifier->token = p_declaration_specifier->type_specifier_qualifier->type_qualifier->token; + p_specifier_qualifier->type_qualifier = p_type_qualifier; + } + else if (p_declaration_specifier->type_specifier_qualifier->type_specifier) + { + struct type_specifier* owner p_type_specifier = calloc(1, sizeof(struct type_specifier)); - p_type_specifier->flags = p_declaration_specifier->type_specifier_qualifier->type_specifier->flags; + p_type_specifier->flags = p_declaration_specifier->type_specifier_qualifier->type_specifier->flags; - //todo - assert(p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier == NULL); + //todo + assert(p_declaration_specifier->type_specifier_qualifier->type_specifier->struct_or_union_specifier == NULL); - p_type_specifier->token = p_declaration_specifier->type_specifier_qualifier->type_specifier->token; - p_specifier_qualifier->type_specifier = p_type_specifier; - } + p_type_specifier->token = p_declaration_specifier->type_specifier_qualifier->type_specifier->token; + p_specifier_qualifier->type_specifier = p_type_specifier; + } - LIST_ADD(p_specifier_qualifier_list, p_specifier_qualifier); - } - p_declaration_specifier = p_declaration_specifier->next; - } - return p_specifier_qualifier_list; + LIST_ADD(p_specifier_qualifier_list, p_specifier_qualifier); + } + p_declaration_specifier = p_declaration_specifier->next; + } + return p_specifier_qualifier_list; } @@ -4685,1852 +4605,1863 @@ void print_declarator(struct osstream* ss, struct declarator* p_declarator, bool void print_direct_declarator(struct osstream* ss, struct direct_declarator* p_direct_declarator, bool is_abstract) { - if (p_direct_declarator->declarator) - { - ss_fprintf(ss, "("); - print_declarator(ss, p_direct_declarator->declarator, is_abstract); - ss_fprintf(ss, ")"); - } + if (p_direct_declarator->declarator) + { + ss_fprintf(ss, "("); + print_declarator(ss, p_direct_declarator->declarator, is_abstract); + ss_fprintf(ss, ")"); + } - if (p_direct_declarator->name_opt && !is_abstract) - { - //Se is_abstract for true é pedido para nao imprimir o nome do indentificador - ss_fprintf(ss, "%s", p_direct_declarator->name_opt->lexeme); - } + if (p_direct_declarator->name_opt && !is_abstract) + { + //Se is_abstract for true é pedido para nao imprimir o nome do indentificador + ss_fprintf(ss, "%s", p_direct_declarator->name_opt->lexeme); + } - if (p_direct_declarator->function_declarator) - { - print_direct_declarator(ss, p_direct_declarator->function_declarator->direct_declarator, is_abstract); + if (p_direct_declarator->function_declarator) + { + print_direct_declarator(ss, p_direct_declarator->function_declarator->direct_declarator, is_abstract); - ss_fprintf(ss, "("); - struct parameter_declaration* p_parameter_declaration = - p_direct_declarator->function_declarator->parameter_type_list_opt ? - p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head : NULL; + ss_fprintf(ss, "("); + struct parameter_declaration* p_parameter_declaration = + p_direct_declarator->function_declarator->parameter_type_list_opt ? + p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head : NULL; - while (p_parameter_declaration) - { - if (p_parameter_declaration != p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head) - ss_fprintf(ss, ","); + while (p_parameter_declaration) + { + if (p_parameter_declaration != p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head) + ss_fprintf(ss, ","); - print_declaration_specifiers(ss, p_parameter_declaration->declaration_specifiers); - ss_fprintf(ss, " "); - print_declarator(ss, p_parameter_declaration->declarator, is_abstract); + print_declaration_specifiers(ss, p_parameter_declaration->declaration_specifiers); + ss_fprintf(ss, " "); + print_declarator(ss, p_parameter_declaration->declarator, is_abstract); - p_parameter_declaration = p_parameter_declaration->next; - } - //... TODO - ss_fprintf(ss, ")"); - } - if (p_direct_declarator->array_declarator) - { - //TODO - ss_fprintf(ss, "[]"); - } + p_parameter_declaration = p_parameter_declaration->next; + } + //... TODO + ss_fprintf(ss, ")"); + } + if (p_direct_declarator->array_declarator) + { + //TODO + ss_fprintf(ss, "[]"); + } } enum type_specifier_flags declarator_get_type_specifier_flags(const struct declarator* p) { - if (p->declaration_specifiers) - return p->declaration_specifiers->type_specifier_flags; - if (p->specifier_qualifier_list) - return p->specifier_qualifier_list->type_specifier_flags; - return 0; + if (p->declaration_specifiers) + return p->declaration_specifiers->type_specifier_flags; + if (p->specifier_qualifier_list) + return p->specifier_qualifier_list->type_specifier_flags; + return 0; } void print_declarator(struct osstream* ss, struct declarator* p_declarator, bool is_abstract) { - bool first = true; - if (p_declarator->pointer) - { - struct pointer* p = p_declarator->pointer; - while (p) - { - if (p->type_qualifier_list_opt) - { - print_type_qualifier_flags(ss, &first, p->type_qualifier_list_opt->flags); - } - ss_fprintf(ss, "*"); - p = p->pointer; - } - } - print_direct_declarator(ss, p_declarator->direct_declarator, is_abstract); + bool first = true; + if (p_declarator->pointer) + { + struct pointer* p = p_declarator->pointer; + while (p) + { + if (p->type_qualifier_list_opt) + { + print_type_qualifier_flags(ss, &first, p->type_qualifier_list_opt->flags); + } + ss_fprintf(ss, "*"); + p = p->pointer; + } + } + print_direct_declarator(ss, p_declarator->direct_declarator, is_abstract); } void print_type_name(struct osstream* ss, struct type_name* p) { - bool first = true; - print_specifier_qualifier_list(ss, &first, p->specifier_qualifier_list); - print_declarator(ss, p->declarator, true); + bool first = true; + print_specifier_qualifier_list(ss, &first, p->specifier_qualifier_list); + print_declarator(ss, p->declarator, true); } void type_name_delete(struct type_name* owner p) { - if (p) - { - specifier_qualifier_list_delete(p->specifier_qualifier_list); - type_destroy(&p->type); - declarator_delete(p->declarator); - free(p); - } + if (p) + { + specifier_qualifier_list_delete(p->specifier_qualifier_list); + type_destroy(&p->type); + declarator_delete(p->declarator); + free(p); + } } struct type_name* owner type_name(struct parser_ctx* ctx) { - struct type_name* owner p_type_name = calloc(1, sizeof(struct type_name)); + struct type_name* owner p_type_name = calloc(1, sizeof(struct type_name)); - p_type_name->first_token = ctx->current; + p_type_name->first_token = ctx->current; - p_type_name->specifier_qualifier_list = specifier_qualifier_list(ctx); + p_type_name->specifier_qualifier_list = specifier_qualifier_list(ctx); - p_type_name->declarator = declarator(ctx, - p_type_name->specifier_qualifier_list,//?? - /*declaration_specifiers*/ NULL, - true /*DEVE SER TODO*/, - NULL); - p_type_name->declarator->specifier_qualifier_list = p_type_name->specifier_qualifier_list; - p_type_name->declarator->type = make_type_using_declarator(ctx, p_type_name->declarator); + p_type_name->declarator = declarator(ctx, + p_type_name->specifier_qualifier_list,//?? + /*declaration_specifiers*/ NULL, + true /*DEVE SER TODO*/, + NULL); + p_type_name->declarator->specifier_qualifier_list = p_type_name->specifier_qualifier_list; + p_type_name->declarator->type = make_type_using_declarator(ctx, p_type_name->declarator); - p_type_name->last_token = ctx->current->prev; - p_type_name->type = type_dup(&p_type_name->declarator->type); + p_type_name->last_token = ctx->current->prev; + p_type_name->type = type_dup(&p_type_name->declarator->type); - return p_type_name; + return p_type_name; } -void braced_initializer_delete(struct braced_initializer* owner p) +void braced_initializer_delete(struct braced_initializer* owner opt p) { - if (p) - { - initializer_list_delete(p->initializer_list); - free(p); - } + if (p) + { + initializer_list_delete(p->initializer_list); + free(p); + } } struct braced_initializer* owner braced_initializer(struct parser_ctx* ctx) { - /* - { } - { initializer-list } - { initializer-list , } - */ + /* + { } + { initializer-list } + { initializer-list , } + */ - struct braced_initializer* owner p_bracket_initializer_list = calloc(1, sizeof(struct braced_initializer)); - p_bracket_initializer_list->first_token = ctx->current; - parser_match_tk(ctx, '{'); - if (ctx->current->type != '}') - { - p_bracket_initializer_list->initializer_list = initializer_list(ctx); - } - parser_match_tk(ctx, '}'); - return p_bracket_initializer_list; + struct braced_initializer* owner p_bracket_initializer_list = calloc(1, sizeof(struct braced_initializer)); + p_bracket_initializer_list->first_token = ctx->current; + parser_match_tk(ctx, '{'); + if (ctx->current->type != '}') + { + p_bracket_initializer_list->initializer_list = initializer_list(ctx); + } + parser_match_tk(ctx, '}'); + return p_bracket_initializer_list; } void initializer_delete(struct initializer* owner p) { - if (p) - { - assert(p->next == NULL); - expression_delete(p->assignment_expression); - braced_initializer_delete(p->braced_initializer); - designation_delete(p->designation); - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - free(p); - } + if (p) + { + assert(p->next == NULL); + expression_delete(p->assignment_expression); + braced_initializer_delete(p->braced_initializer); + designation_delete(p->designation); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + free(p); + } } struct initializer* owner initializer(struct parser_ctx* ctx) { - /* - initializer: - assignment-expression - braced-initializer - */ + /* + initializer: + assignment-expression + braced-initializer + */ - struct initializer* owner p_initializer = calloc(1, sizeof(struct initializer)); + struct initializer* owner p_initializer = calloc(1, sizeof(struct initializer)); - p_initializer->first_token = ctx->current; + p_initializer->first_token = ctx->current; - if (ctx->current->type == '{') - { - p_initializer->braced_initializer = braced_initializer(ctx); - } - else - { - p_initializer->p_attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + if (ctx->current->type == '{') + { + p_initializer->braced_initializer = braced_initializer(ctx); + } + else + { + p_initializer->p_attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - p_initializer->assignment_expression = assignment_expression(ctx); - } - return p_initializer; + p_initializer->assignment_expression = assignment_expression(ctx); + } + return p_initializer; } void initializer_list_delete(struct initializer_list* owner p) { - if (p) - { - struct initializer* owner item = p->head; - while (item) - { - struct initializer* owner next = item->next; - item->next = NULL; - initializer_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct initializer* owner item = p->head; + while (item) + { + struct initializer* owner next = item->next; + item->next = NULL; + initializer_delete(item); + item = next; + } + free(p); + } } struct initializer_list* owner initializer_list(struct parser_ctx* ctx) { - /* - initializer-list: - designation opt initializer - initializer-list , designation opt initializer - */ + /* + initializer-list: + designation opt initializer + initializer-list , designation opt initializer + */ - struct initializer_list* owner p_initializer_list = calloc(1, sizeof(struct initializer_list)); + struct initializer_list* owner p_initializer_list = calloc(1, sizeof(struct initializer_list)); - p_initializer_list->first_token = ctx->current; + p_initializer_list->first_token = ctx->current; - struct designation* owner p_designation = NULL; - if (first_of_designator(ctx)) - { - p_designation = designation(ctx); - } - struct initializer* owner p_initializer = initializer(ctx); + struct designation* owner p_designation = NULL; + if (first_of_designator(ctx)) + { + p_designation = designation(ctx); + } + struct initializer* owner p_initializer = initializer(ctx); - assert(p_initializer->designation == NULL); - p_initializer->designation = p_designation; + assert(p_initializer->designation == NULL); + p_initializer->designation = p_designation; - LIST_ADD(p_initializer_list, p_initializer); - p_initializer_list->size++; + LIST_ADD(p_initializer_list, p_initializer); + p_initializer_list->size++; - while (ctx->current != NULL && ctx->current->type == ',') - { - parser_match(ctx); - if (ctx->current->type == '}') - break; //follow + while (ctx->current != NULL && ctx->current->type == ',') + { + parser_match(ctx); + if (ctx->current->type == '}') + break; //follow - struct designation* owner p_designation2 = NULL; - if (first_of_designator(ctx)) - { - p_designation2 = designation(ctx); - } - struct initializer* owner p_initializer2 = initializer(ctx); + struct designation* owner p_designation2 = NULL; + if (first_of_designator(ctx)) + { + p_designation2 = designation(ctx); + } + struct initializer* owner p_initializer2 = initializer(ctx); - assert(p_initializer2->designation == NULL); - p_initializer2->designation = p_designation2; + assert(p_initializer2->designation == NULL); + p_initializer2->designation = p_designation2; - LIST_ADD(p_initializer_list, p_initializer2); - p_initializer_list->size++; - } + LIST_ADD(p_initializer_list, p_initializer2); + p_initializer_list->size++; + } - return p_initializer_list; + return p_initializer_list; } void designation_delete(struct designation* owner p) { - if (p) - { - designator_list_delete(p->designator_list); - free(p); - } + if (p) + { + designator_list_delete(p->designator_list); + free(p); + } } struct designation* owner designation(struct parser_ctx* ctx) { - //designator_list '=' - struct designation* owner p_designation = calloc(1, sizeof(struct designation)); - p_designation->designator_list = designator_list(ctx); - parser_match_tk(ctx, '='); - return p_designation; + //designator_list '=' + struct designation* owner p_designation = calloc(1, sizeof(struct designation)); + p_designation->designator_list = designator_list(ctx); + parser_match_tk(ctx, '='); + return p_designation; } void designator_list_delete(struct designator_list* owner p) { - if (p) - { - struct designator* owner item = p->head; - while (item) - { - struct designator* owner next = item->next; - item->next = NULL; - designator_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct designator* owner item = p->head; + while (item) + { + struct designator* owner next = item->next; + item->next = NULL; + designator_delete(item); + item = next; + } + free(p); + } } struct designator_list* owner designator_list(struct parser_ctx* ctx) { - //designator - //designator_list designator - struct designator_list* owner p_designator_list = NULL; - struct designator* owner p_designator = NULL; - try - { - p_designator_list = calloc(1, sizeof(struct designator_list)); - if (p_designator_list == NULL) throw; + //designator + //designator_list designator + struct designator_list* owner p_designator_list = NULL; + struct designator* owner p_designator = NULL; + try + { + p_designator_list = calloc(1, sizeof(struct designator_list)); + if (p_designator_list == NULL) throw; - p_designator = designator(ctx); - if (p_designator == NULL) throw; - LIST_ADD(p_designator_list, p_designator); - p_designator = NULL; /*MOVED*/ + p_designator = designator(ctx); + if (p_designator == NULL) throw; + LIST_ADD(p_designator_list, p_designator); + p_designator = NULL; /*MOVED*/ - while (ctx->current != NULL && first_of_designator(ctx)) - { - p_designator = designator(ctx); - if (p_designator == NULL) throw; - LIST_ADD(p_designator_list, p_designator); - p_designator = NULL; /*MOVED*/ - } - } - catch - { - } + while (ctx->current != NULL && first_of_designator(ctx)) + { + p_designator = designator(ctx); + if (p_designator == NULL) throw; + LIST_ADD(p_designator_list, p_designator); + p_designator = NULL; /*MOVED*/ + } + } + catch + { + } - return p_designator_list; + return p_designator_list; } void designator_delete(struct designator* owner p) { - if (p) - { - assert(p->next == NULL); - expression_delete(p->constant_expression_opt); - free(p); - } + if (p) + { + assert(p->next == NULL); + expression_delete(p->constant_expression_opt); + free(p); + } } struct designator* owner designator(struct parser_ctx* ctx) { - //'[' constant_expression ']' - //'.' identifier - struct designator* owner p_designator = calloc(1, sizeof(struct designator)); - if (ctx->current->type == '[') - { - parser_match_tk(ctx, '['); - p_designator->constant_expression_opt = constant_expression(ctx, true); - parser_match_tk(ctx, ']'); - } - else if (ctx->current->type == '.') - { - parser_match(ctx); - parser_match_tk(ctx, TK_IDENTIFIER); - } - return p_designator; + //'[' constant_expression ']' + //'.' identifier + struct designator* owner p_designator = calloc(1, sizeof(struct designator)); + if (ctx->current->type == '[') + { + parser_match_tk(ctx, '['); + p_designator->constant_expression_opt = constant_expression(ctx, true); + parser_match_tk(ctx, ']'); + } + else if (ctx->current->type == '.') + { + parser_match(ctx); + parser_match_tk(ctx, TK_IDENTIFIER); + } + return p_designator; } void static_assert_declaration_delete(struct static_assert_declaration* owner p) { - if (p) - { - expression_delete(p->constant_expression); - free(p); - } + if (p) + { + expression_delete(p->constant_expression); + free(p); + } } struct static_assert_declaration* owner static_assert_declaration(struct parser_ctx* ctx) { - /* - static_assert-declaration: - "static_assert" ( constant-expression , string-literal ) ; - "static_assert" ( constant-expression ) ; - */ - - struct static_assert_declaration* owner p_static_assert_declaration = NULL; - try - { - p_static_assert_declaration = calloc(1, sizeof(struct static_assert_declaration)); - if (p_static_assert_declaration == NULL) throw; - - p_static_assert_declaration->first_token = ctx->current; - struct token* position = ctx->current; - - parser_match(ctx); - - parser_match_tk(ctx, '('); - - /* - When flow analysis is enabled static assert is evaluated there - */ - bool show_error_if_not_constant = false; - if (p_static_assert_declaration->first_token->type == TK_KEYWORD__STATIC_ASSERT) - { - show_error_if_not_constant = true; - } - - p_static_assert_declaration->constant_expression = constant_expression(ctx, show_error_if_not_constant); - if (p_static_assert_declaration->constant_expression == NULL) throw; - - if (ctx->current->type == ',') - { - parser_match(ctx); - p_static_assert_declaration->string_literal_opt = ctx->current; - parser_match_tk(ctx, TK_STRING_LITERAL); - } - - parser_match_tk(ctx, ')'); - p_static_assert_declaration->last_token = ctx->current; - parser_match_tk(ctx, ';'); - - if (position->type == TK_KEYWORD__STATIC_ASSERT) - { - if (!constant_value_to_bool(&p_static_assert_declaration->constant_expression->constant_value)) - { - if (p_static_assert_declaration->string_literal_opt) - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx, position, "_Static_assert failed %s\n", - p_static_assert_declaration->string_literal_opt->lexeme); - } - else - { - compiler_set_error_with_token(C_STATIC_ASSERT_FAILED, ctx, position, "_Static_assert failed"); - } - } - } - - } - catch - { - } - - return p_static_assert_declaration; + /* + static_assert-declaration: + "static_assert" ( constant-expression , string-literal ) ; + "static_assert" ( constant-expression ) ; + */ + + struct static_assert_declaration* owner p_static_assert_declaration = NULL; + try + { + p_static_assert_declaration = calloc(1, sizeof(struct static_assert_declaration)); + if (p_static_assert_declaration == NULL) throw; + + p_static_assert_declaration->first_token = ctx->current; + struct token* position = ctx->current; + + parser_match(ctx); + + parser_match_tk(ctx, '('); + + /* + When flow analysis is enabled static assert is evaluated there + */ + bool show_error_if_not_constant = false; + if (p_static_assert_declaration->first_token->type == TK_KEYWORD__STATIC_ASSERT) + { + show_error_if_not_constant = true; + } + + + p_static_assert_declaration->constant_expression = constant_expression(ctx, show_error_if_not_constant); + if (p_static_assert_declaration->constant_expression == NULL) throw; + + if (ctx->current->type == ',') + { + parser_match(ctx); + p_static_assert_declaration->string_literal_opt = ctx->current; + parser_match_tk(ctx, TK_STRING_LITERAL); + } + + parser_match_tk(ctx, ')'); + p_static_assert_declaration->last_token = ctx->current; + parser_match_tk(ctx, ';'); + + if (position->type == TK_KEYWORD__STATIC_ASSERT) + { + if (!constant_value_to_bool(&p_static_assert_declaration->constant_expression->constant_value)) + { + if (p_static_assert_declaration->string_literal_opt) + { + compiler_diagnostic_message(ERROR_STATIC_ASSERT_FAILED, ctx, position, "_Static_assert failed %s\n", + p_static_assert_declaration->string_literal_opt->lexeme); + } + else + { + compiler_diagnostic_message(ERROR_STATIC_ASSERT_FAILED, ctx, position, "_Static_assert failed"); + } + } + } + + } + catch + { + } + + return p_static_assert_declaration; } void attribute_specifier_sequence_delete(struct attribute_specifier_sequence* owner p) { - if (p) - { - struct attribute_specifier* owner item = p->head; - while (item) - { - struct attribute_specifier* owner next = item->next; - item->next = NULL; - attribute_specifier_delete(item); - item = next; - } - free(p); - } + if (p) + { + struct attribute_specifier* owner item = p->head; + while (item) + { + struct attribute_specifier* owner next = item->next; + item->next = NULL; + attribute_specifier_delete(item); + item = next; + } + free(p); + } } struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt(struct parser_ctx* ctx) { - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence = NULL; + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence = NULL; - if (first_of_attribute_specifier(ctx)) - { - p_attribute_specifier_sequence = calloc(1, sizeof(struct attribute_specifier_sequence)); + if (first_of_attribute_specifier(ctx)) + { + p_attribute_specifier_sequence = calloc(1, sizeof(struct attribute_specifier_sequence)); - p_attribute_specifier_sequence->first_token = ctx->current; + p_attribute_specifier_sequence->first_token = ctx->current; - while (ctx->current != NULL && - first_of_attribute_specifier(ctx)) - { - struct attribute_specifier* owner p_attribute_specifier = attribute_specifier(ctx); + while (ctx->current != NULL && + first_of_attribute_specifier(ctx)) + { + struct attribute_specifier* owner p_attribute_specifier = attribute_specifier(ctx); - p_attribute_specifier_sequence->attributes_flags |= - p_attribute_specifier->attribute_list->attributes_flags; + p_attribute_specifier_sequence->attributes_flags |= + p_attribute_specifier->attribute_list->attributes_flags; - LIST_ADD(p_attribute_specifier_sequence, p_attribute_specifier); - } - p_attribute_specifier_sequence->last_token = ctx->previous; - } + LIST_ADD(p_attribute_specifier_sequence, p_attribute_specifier); + } + p_attribute_specifier_sequence->last_token = ctx->previous; + } - return p_attribute_specifier_sequence; + return p_attribute_specifier_sequence; } struct attribute_specifier_sequence* owner attribute_specifier_sequence(struct parser_ctx* ctx) { - //attribute_specifier_sequence_opt attribute_specifier - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence = calloc(1, sizeof(struct attribute_specifier_sequence)); - while (ctx->current != NULL && first_of_attribute_specifier(ctx)) - { - LIST_ADD(p_attribute_specifier_sequence, attribute_specifier(ctx)); - } - return p_attribute_specifier_sequence; + //attribute_specifier_sequence_opt attribute_specifier + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence = calloc(1, sizeof(struct attribute_specifier_sequence)); + while (ctx->current != NULL && first_of_attribute_specifier(ctx)) + { + LIST_ADD(p_attribute_specifier_sequence, attribute_specifier(ctx)); + } + return p_attribute_specifier_sequence; } void attribute_specifier_delete(struct attribute_specifier* owner p) { - if (p) - { - attribute_list_destroy(p->attribute_list); - free(p->attribute_list); - assert(p->next == NULL); - free(p); - } + if (p) + { + attribute_list_destroy(p->attribute_list); + free(p->attribute_list); + assert(p->next == NULL); + free(p); + } } struct attribute_specifier* owner attribute_specifier(struct parser_ctx* ctx) { - struct attribute_specifier* owner p_attribute_specifier = calloc(1, sizeof(struct attribute_specifier)); + struct attribute_specifier* owner p_attribute_specifier = calloc(1, sizeof(struct attribute_specifier)); - p_attribute_specifier->first_token = ctx->current; + p_attribute_specifier->first_token = ctx->current; - //'[' '[' attribute_list ']' ']' - parser_match_tk(ctx, '['); - parser_match_tk(ctx, '['); - p_attribute_specifier->attribute_list = attribute_list(ctx); - parser_match_tk(ctx, ']'); - p_attribute_specifier->last_token = ctx->current; - parser_match_tk(ctx, ']'); - return p_attribute_specifier; + //'[' '[' attribute_list ']' ']' + parser_match_tk(ctx, '['); + parser_match_tk(ctx, '['); + p_attribute_specifier->attribute_list = attribute_list(ctx); + parser_match_tk(ctx, ']'); + p_attribute_specifier->last_token = ctx->current; + parser_match_tk(ctx, ']'); + return p_attribute_specifier; } void attribute_delete(struct attribute* owner p) { - if (p) - { - attribute_token_delete(p->attribute_token); - attribute_argument_clause_delete(p->attribute_argument_clause); - assert(p->next == NULL); - free(p); - } + if (p) + { + attribute_token_delete(p->attribute_token); + attribute_argument_clause_delete(p->attribute_argument_clause); + assert(p->next == NULL); + free(p); + } } void attribute_list_destroy(struct attribute_list* obj_owner p) { - struct attribute* owner item = p->head; - while (item) - { - struct attribute* owner next = item->next; - item->next = NULL; - attribute_delete(item); - item = next; - } + struct attribute* owner item = p->head; + while (item) + { + struct attribute* owner next = item->next; + item->next = NULL; + attribute_delete(item); + item = next; + } } struct attribute_list* owner attribute_list(struct parser_ctx* ctx) { - struct attribute_list* owner p_attribute_list = calloc(1, sizeof(struct attribute_list)); - // - //attribute_list ',' attribute_opt - while (ctx->current != NULL && ( - first_of_attribute(ctx) || - ctx->current->type == ',')) - { - if (first_of_attribute(ctx)) - { - struct attribute* owner p_attribute = attribute(ctx); - p_attribute_list->attributes_flags |= p_attribute->attributes_flags; - LIST_ADD(p_attribute_list, p_attribute); - } - if (ctx->current->type == ',') - { - parser_match(ctx); - } - } - return p_attribute_list; + struct attribute_list* owner p_attribute_list = calloc(1, sizeof(struct attribute_list)); + // + //attribute_list ',' attribute_opt + while (ctx->current != NULL && ( + first_of_attribute(ctx) || + ctx->current->type == ',')) + { + if (first_of_attribute(ctx)) + { + struct attribute* owner p_attribute = attribute(ctx); + p_attribute_list->attributes_flags |= p_attribute->attributes_flags; + LIST_ADD(p_attribute_list, p_attribute); + } + if (ctx->current->type == ',') + { + parser_match(ctx); + } + } + return p_attribute_list; } bool first_of_attribute(struct parser_ctx* ctx) { - if (ctx->current == NULL) - return false; - return ctx->current->type == TK_IDENTIFIER; + if (ctx->current == NULL) + return false; + return ctx->current->type == TK_IDENTIFIER; } struct attribute* owner attribute(struct parser_ctx* ctx) { - struct attribute* owner p_attribute = calloc(1, sizeof(struct attribute)); - //attribute_token attribute_argument_clause_opt - p_attribute->attribute_token = attribute_token(ctx); - p_attribute->attributes_flags = p_attribute->attribute_token->attributes_flags; - if (ctx->current->type == '(') //first - { - p_attribute->attribute_argument_clause = attribute_argument_clause(ctx); - } - return p_attribute; + struct attribute* owner p_attribute = calloc(1, sizeof(struct attribute)); + //attribute_token attribute_argument_clause_opt + p_attribute->attribute_token = attribute_token(ctx); + p_attribute->attributes_flags = p_attribute->attribute_token->attributes_flags; + if (ctx->current->type == '(') //first + { + p_attribute->attribute_argument_clause = attribute_argument_clause(ctx); + } + return p_attribute; } void attribute_token_delete(struct attribute_token* owner p) { - if (p) - { - free(p); - } + if (p) + { + free(p); + } } struct attribute_token* owner attribute_token(struct parser_ctx* ctx) { - struct attribute_token* owner p_attribute_token = calloc(1, sizeof(struct attribute_token)); - - struct token* attr_token = ctx->current; - - bool is_standard_attribute = false; - if (strcmp(attr_token->lexeme, "deprecated") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_DEPRECATED; - } - else if (strcmp(attr_token->lexeme, "fallthrough") == 0) - { - is_standard_attribute = true; - } - else if (strcmp(attr_token->lexeme, "maybe_unused") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_MAYBE_UNUSED; - } - else if (strcmp(attr_token->lexeme, "noreturn") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_NORETURN; - } - else if (strcmp(attr_token->lexeme, "reproducible") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_REPRODUCIBLE; - } - else if (strcmp(attr_token->lexeme, "unsequenced") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_UNSEQUENCED; - } - else if (strcmp(attr_token->lexeme, "nodiscard") == 0) - { - is_standard_attribute = true; - p_attribute_token->attributes_flags = STD_ATTRIBUTE_NODISCARD; - } - - const bool is_cake_attr = - strcmp(attr_token->lexeme, "cake") == 0; - - parser_match_tk(ctx, TK_IDENTIFIER); - - if (ctx->current->type == '::') - { - parser_match(ctx); - if (is_cake_attr) - { - - compiler_set_warning_with_token(W_ATTRIBUTES, ctx, attr_token, "warning '%s' is not an cake attribute", ctx->current->lexeme); - - } - parser_match_tk(ctx, TK_IDENTIFIER); - } - else - { - /* - * Each implementation should choose a distinctive name for the attribute prefix in an attribute - * prefixed token. Implementations should not define attributes without an attribute prefix unless it is - * a standard attribute as specified in this document. - */ - if (!is_standard_attribute) - { - compiler_set_warning_with_token(W_ATTRIBUTES, ctx, attr_token, "warning '%s' is not an standard attribute", attr_token->lexeme); - } - } - return p_attribute_token; + struct attribute_token* owner p_attribute_token = calloc(1, sizeof(struct attribute_token)); + + struct token* attr_token = ctx->current; + + bool is_standard_attribute = false; + if (strcmp(attr_token->lexeme, "deprecated") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_DEPRECATED; + } + else if (strcmp(attr_token->lexeme, "fallthrough") == 0) + { + is_standard_attribute = true; + } + else if (strcmp(attr_token->lexeme, "maybe_unused") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_MAYBE_UNUSED; + } + else if (strcmp(attr_token->lexeme, "noreturn") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_NORETURN; + } + else if (strcmp(attr_token->lexeme, "reproducible") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_REPRODUCIBLE; + } + else if (strcmp(attr_token->lexeme, "unsequenced") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_UNSEQUENCED; + } + else if (strcmp(attr_token->lexeme, "nodiscard") == 0) + { + is_standard_attribute = true; + p_attribute_token->attributes_flags = STD_ATTRIBUTE_NODISCARD; + } + + const bool is_cake_attr = + strcmp(attr_token->lexeme, "cake") == 0; + + parser_match_tk(ctx, TK_IDENTIFIER); + + if (ctx->current->type == '::') + { + parser_match(ctx); + if (is_cake_attr) + { + + compiler_diagnostic_message(W_ATTRIBUTES, ctx, attr_token, "warning '%s' is not an cake attribute", ctx->current->lexeme); + + } + parser_match_tk(ctx, TK_IDENTIFIER); + } + else + { + /* + * Each implementation should choose a distinctive name for the attribute prefix in an attribute + * prefixed token. Implementations should not define attributes without an attribute prefix unless it is + * a standard attribute as specified in this document. + */ + if (!is_standard_attribute) + { + compiler_diagnostic_message(W_ATTRIBUTES, ctx, attr_token, "warning '%s' is not an standard attribute", attr_token->lexeme); + } + } + return p_attribute_token; } void attribute_argument_clause_delete(struct attribute_argument_clause* owner p) { - if (p) - { - balanced_token_sequence_delete(p->p_balanced_token_sequence); - free(p); - } + if (p) + { + balanced_token_sequence_delete(p->p_balanced_token_sequence); + free(p); + } } struct attribute_argument_clause* owner attribute_argument_clause(struct parser_ctx* ctx) { - struct attribute_argument_clause* owner p_attribute_argument_clause = calloc(1, sizeof(struct attribute_argument_clause)); - //'(' balanced_token_sequence_opt ')' - parser_match_tk(ctx, '('); - p_attribute_argument_clause->p_balanced_token_sequence = balanced_token_sequence_opt(ctx); - parser_match_tk(ctx, ')'); - return p_attribute_argument_clause; + struct attribute_argument_clause* owner p_attribute_argument_clause = calloc(1, sizeof(struct attribute_argument_clause)); + //'(' balanced_token_sequence_opt ')' + parser_match_tk(ctx, '('); + p_attribute_argument_clause->p_balanced_token_sequence = balanced_token_sequence_opt(ctx); + parser_match_tk(ctx, ')'); + return p_attribute_argument_clause; } void balanced_token_sequence_delete(struct balanced_token_sequence* owner p) { - if (p) - { - struct balanced_token* owner item = p->head; - while (item) - { - struct balanced_token* owner next = item->next; - free(item); - item = next; - } - free(p); - } + if (p) + { + struct balanced_token* owner item = p->head; + while (item) + { + struct balanced_token* owner next = item->next; + free(item); + item = next; + } + free(p); + } } struct balanced_token_sequence* owner balanced_token_sequence_opt(struct parser_ctx* ctx) { - struct balanced_token_sequence* owner p_balanced_token_sequence = calloc(1, sizeof(struct balanced_token_sequence)); - //balanced_token - //balanced_token_sequence balanced_token - int count1 = 0; - int count2 = 0; - int count3 = 0; - for (; ctx->current;) - { - if (ctx->current->type == '(') - count1++; - else if (ctx->current->type == '[') - count2++; - else if (ctx->current->type == '{') - count3++; - else if (ctx->current->type == ')') - { - if (count1 == 0) - { - //parser_match(ctx); - break; - } - count1--; - } - else if (ctx->current->type == '[') - count2--; - else if (ctx->current->type == '{') - count3--; - parser_match(ctx); - } - if (count2 != 0) - { - compiler_set_error_with_token(C_ATTR_UNBALANCED, ctx, ctx->current, "expected ']' before ')'"); - - } - if (count3 != 0) - { - compiler_set_error_with_token(C_ATTR_UNBALANCED, ctx, ctx->current, "expected '}' before ')'"); - - } - return p_balanced_token_sequence; + struct balanced_token_sequence* owner p_balanced_token_sequence = calloc(1, sizeof(struct balanced_token_sequence)); + //balanced_token + //balanced_token_sequence balanced_token + int count1 = 0; + int count2 = 0; + int count3 = 0; + for (; ctx->current;) + { + if (ctx->current->type == '(') + count1++; + else if (ctx->current->type == '[') + count2++; + else if (ctx->current->type == '{') + count3++; + else if (ctx->current->type == ')') + { + if (count1 == 0) + { + //parser_match(ctx); + break; + } + count1--; + } + else if (ctx->current->type == '[') + count2--; + else if (ctx->current->type == '{') + count3--; + parser_match(ctx); + } + if (count2 != 0) + { + compiler_diagnostic_message(ERROR_ATTR_UNBALANCED, ctx, ctx->current, "expected ']' before ')'"); + + } + if (count3 != 0) + { + compiler_diagnostic_message(ERROR_ATTR_UNBALANCED, ctx, ctx->current, "expected '}' before ')'"); + + } + return p_balanced_token_sequence; } void statement_delete(struct statement* owner p) { - if (p) - { - labeled_statement_delete(p->labeled_statement); - unlabeled_statement_delete(p->unlabeled_statement); - free(p); - } + if (p) + { + labeled_statement_delete(p->labeled_statement); + unlabeled_statement_delete(p->unlabeled_statement); + free(p); + } } struct statement* owner statement(struct parser_ctx* ctx) { - struct statement* owner p_statement = calloc(1, sizeof(struct statement)); - if (first_of_labeled_statement(ctx)) - { - p_statement->labeled_statement = labeled_statement(ctx); - } - else - { - p_statement->unlabeled_statement = unlabeled_statement(ctx); - } + struct statement* owner p_statement = calloc(1, sizeof(struct statement)); + if (first_of_labeled_statement(ctx)) + { + p_statement->labeled_statement = labeled_statement(ctx); + } + else + { + p_statement->unlabeled_statement = unlabeled_statement(ctx); + } - return p_statement; + return p_statement; } struct primary_block* owner primary_block(struct parser_ctx* ctx) { - assert(ctx->current != NULL); - struct primary_block* owner p_primary_block = calloc(1, sizeof(struct primary_block)); - if (first_of_compound_statement(ctx)) - { - p_primary_block->compound_statement = compound_statement(ctx); - } - else if (first_of_selection_statement(ctx)) - { - p_primary_block->selection_statement = selection_statement(ctx); - } - else if (first_of_iteration_statement(ctx)) - { - p_primary_block->iteration_statement = iteration_statement(ctx); - } - else if (ctx->current->type == TK_KEYWORD_DEFER) - { - p_primary_block->defer_statement = defer_statement(ctx); - } - else if (ctx->current->type == TK_KEYWORD_TRY) - { - p_primary_block->try_statement = try_statement(ctx); - } - else - { - compiler_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, ctx->current, "unexpected token"); - } - return p_primary_block; + assert(ctx->current != NULL); + struct primary_block* owner p_primary_block = calloc(1, sizeof(struct primary_block)); + if (first_of_compound_statement(ctx)) + { + p_primary_block->compound_statement = compound_statement(ctx); + } + else if (first_of_selection_statement(ctx)) + { + p_primary_block->selection_statement = selection_statement(ctx); + } + else if (first_of_iteration_statement(ctx)) + { + p_primary_block->iteration_statement = iteration_statement(ctx); + } + else if (ctx->current->type == TK_KEYWORD_DEFER) + { + p_primary_block->defer_statement = defer_statement(ctx); + } + else if (ctx->current->type == TK_KEYWORD_TRY) + { + p_primary_block->try_statement = try_statement(ctx); + } + else + { + compiler_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, ctx->current, "unexpected token"); + } + return p_primary_block; } struct secondary_block* owner secondary_block(struct parser_ctx* ctx) { - check_open_brace_style(ctx, ctx->current); + check_open_brace_style(ctx, ctx->current); - struct secondary_block* owner p_secondary_block = calloc(1, sizeof(struct secondary_block)); - p_secondary_block->first_token = ctx->current; + struct secondary_block* owner p_secondary_block = calloc(1, sizeof(struct secondary_block)); + p_secondary_block->first_token = ctx->current; - p_secondary_block->statement = statement(ctx); + p_secondary_block->statement = statement(ctx); - p_secondary_block->last_token = ctx->previous; + p_secondary_block->last_token = ctx->previous; - check_close_brace_style(ctx, p_secondary_block->last_token); + check_close_brace_style(ctx, p_secondary_block->last_token); - return p_secondary_block; + return p_secondary_block; } void secondary_block_delete(struct secondary_block* owner opt p) { - if (p) - { - statement_delete(p->statement); - free(p); - } + if (p) + { + statement_delete(p->statement); + free(p); + } } void primary_block_delete(struct primary_block* owner p) { - if (p) - { - compound_statement_delete(p->compound_statement); - defer_statement_delete(p->defer_statement); - iteration_statement_delete(p->iteration_statement); - selection_statement_delete(p->selection_statement); - try_statement_delete(p->try_statement); - free(p); - } + if (p) + { + compound_statement_delete(p->compound_statement); + defer_statement_delete(p->defer_statement); + iteration_statement_delete(p->iteration_statement); + selection_statement_delete(p->selection_statement); + try_statement_delete(p->try_statement); + free(p); + } } bool first_of_primary_block(struct parser_ctx* ctx) { - if (first_of_compound_statement(ctx) || - first_of_selection_statement(ctx) || - first_of_iteration_statement(ctx) || - ctx->current->type == TK_KEYWORD_DEFER /*extension*/ || - ctx->current->type == TK_KEYWORD_TRY/*extension*/ - ) - { - return true; - } - return false; + if (first_of_compound_statement(ctx) || + first_of_selection_statement(ctx) || + first_of_iteration_statement(ctx) || + ctx->current->type == TK_KEYWORD_DEFER /*extension*/ || + ctx->current->type == TK_KEYWORD_TRY/*extension*/ + ) + { + return true; + } + return false; } void unlabeled_statement_delete(struct unlabeled_statement* owner p) { - if (p) - { - expression_statement_delete(p->expression_statement); - jump_statement_delete(p->jump_statement); - primary_block_delete(p->primary_block); - free(p); - } + if (p) + { + expression_statement_delete(p->expression_statement); + jump_statement_delete(p->jump_statement); + primary_block_delete(p->primary_block); + free(p); + } } struct unlabeled_statement* owner unlabeled_statement(struct parser_ctx* ctx) { - /* - unlabeled-statement: - expression-statement - attribute-specifier-sequence opt primary-block - attribute-specifier-sequence opt jump-statement - */ - struct unlabeled_statement* owner p_unlabeled_statement = calloc(1, sizeof(struct unlabeled_statement)); - - if (first_of_primary_block(ctx)) - { - p_unlabeled_statement->primary_block = primary_block(ctx); - } - else if (first_of_jump_statement(ctx)) - { - p_unlabeled_statement->jump_statement = jump_statement(ctx); - } - else - { - p_unlabeled_statement->expression_statement = expression_statement(ctx); - if (p_unlabeled_statement->expression_statement) - { - if (p_unlabeled_statement->expression_statement->expression_opt) - { - if (!type_is_void(&p_unlabeled_statement->expression_statement->expression_opt->type) && - type_is_nodiscard(&p_unlabeled_statement->expression_statement->expression_opt->type) && - p_unlabeled_statement->expression_statement->expression_opt->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) - { - - if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) - { - compiler_set_warning_with_token(W_ATTRIBUTES, ctx, - p_unlabeled_statement->expression_statement->expression_opt->first_token, - "ignoring return value of function declared with 'nodiscard' attribute"); - } - - } - if (type_is_owner(&p_unlabeled_statement->expression_statement->expression_opt->type) && - p_unlabeled_statement->expression_statement->expression_opt->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) - { - - if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) - { - compiler_set_warning_with_token(W_ATTRIBUTES, ctx, - p_unlabeled_statement->expression_statement->expression_opt->first_token, - "ignoring the result of owner type "); - } - - } - } - if (p_unlabeled_statement->expression_statement->expression_opt && - p_unlabeled_statement->expression_statement->expression_opt->expression_type == POSTFIX_FUNCTION_CALL) - { - - } - else - { - /* - * The objective here is to detect expression with not effect - * a == b; etc - */ - if (p_unlabeled_statement != NULL && - p_unlabeled_statement->jump_statement == NULL && - p_unlabeled_statement->expression_statement != NULL && - p_unlabeled_statement->expression_statement->expression_opt && - !type_is_void(&p_unlabeled_statement->expression_statement->expression_opt->type) && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != ASSIGNMENT_EXPRESSION && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_FUNCTION_CALL && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_INCREMENT && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_DECREMENT && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_INCREMENT && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_DECREMENT && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_DECLARATOR_ATTRIBUTE_EXPR && - p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_ASSERT) - { - if (ctx->current && - ctx->current->level == 0) - { + /* + unlabeled-statement: + expression-statement + attribute-specifier-sequence opt primary-block + attribute-specifier-sequence opt jump-statement + */ + struct unlabeled_statement* owner p_unlabeled_statement = calloc(1, sizeof(struct unlabeled_statement)); + + if (first_of_primary_block(ctx)) + { + p_unlabeled_statement->primary_block = primary_block(ctx); + } + else if (first_of_jump_statement(ctx)) + { + p_unlabeled_statement->jump_statement = jump_statement(ctx); + } + else + { + p_unlabeled_statement->expression_statement = expression_statement(ctx); + if (p_unlabeled_statement->expression_statement) + { + if (p_unlabeled_statement->expression_statement->expression_opt) + { + if (!type_is_void(&p_unlabeled_statement->expression_statement->expression_opt->type) && + type_is_nodiscard(&p_unlabeled_statement->expression_statement->expression_opt->type) && + p_unlabeled_statement->expression_statement->expression_opt->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) + { + + if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) + { + compiler_diagnostic_message(W_ATTRIBUTES, ctx, + p_unlabeled_statement->expression_statement->expression_opt->first_token, + "ignoring return value of function declared with 'nodiscard' attribute"); + } + + } + if (type_is_owner(&p_unlabeled_statement->expression_statement->expression_opt->type) && + p_unlabeled_statement->expression_statement->expression_opt->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) + { + + if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) + { + compiler_diagnostic_message(W_ATTRIBUTES, ctx, + p_unlabeled_statement->expression_statement->expression_opt->first_token, + "ignoring the result of owner type "); + } + + } + } + if (p_unlabeled_statement->expression_statement->expression_opt && + p_unlabeled_statement->expression_statement->expression_opt->expression_type == POSTFIX_FUNCTION_CALL) + { + + } + else + { + /* + * The objective here is to detect expression with not effect + * a == b; etc + */ + if (p_unlabeled_statement != NULL && + p_unlabeled_statement->jump_statement == NULL && + p_unlabeled_statement->expression_statement != NULL && + p_unlabeled_statement->expression_statement->expression_opt && + !type_is_void(&p_unlabeled_statement->expression_statement->expression_opt->type) && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != ASSIGNMENT_EXPRESSION && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_FUNCTION_CALL && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_INCREMENT && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != POSTFIX_DECREMENT && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_INCREMENT && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_DECREMENT && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_DECLARATOR_ATTRIBUTE_EXPR && + p_unlabeled_statement->expression_statement->expression_opt->expression_type != UNARY_EXPRESSION_ASSERT) + { + if (ctx->current && + ctx->current->level == 0) + { #if 0 - //too many false..alerts. - //make list of for sure ... - compiler_set_warning_with_token(W_UNUSED_VALUE, - ctx, - p_unlabeled_statement->expression_statement->expression_opt->first_token, - "expression not used"); + //too many false..alerts. + //make list of for sure ... + compiler_diagnostic_message(W_UNUSED_VALUE, + ctx, + p_unlabeled_statement->expression_statement->expression_opt->first_token, + "expression not used"); #endif - } - } - } - } - } - - return p_unlabeled_statement; + } + } + } + } } + return p_unlabeled_statement; + } + void label_delete(struct label* owner p) { - if (p) - { - expression_delete(p->constant_expression); - free(p); - } + if (p) + { + expression_delete(p->constant_expression); + free(p); + } } struct label* owner label(struct parser_ctx* ctx) { - struct label* owner p_label = calloc(1, sizeof(struct label)); - if (ctx->current->type == TK_IDENTIFIER) - { - p_label->name = ctx->current; - parser_match(ctx); - parser_match_tk(ctx, ':'); - } - else if (ctx->current->type == TK_KEYWORD_CASE) - { - parser_match(ctx); - p_label->constant_expression = constant_expression(ctx, true); - parser_match_tk(ctx, ':'); - } - else if (ctx->current->type == TK_KEYWORD_DEFAULT) - { - parser_match(ctx); - parser_match_tk(ctx, ':'); - } - //attribute_specifier_sequence_opt identifier ':' - //attribute_specifier_sequence_opt 'case' constant_expression ':' - //attribute_specifier_sequence_opt 'default' ':' - return p_label; + struct label* owner p_label = calloc(1, sizeof(struct label)); + if (ctx->current->type == TK_IDENTIFIER) + { + p_label->name = ctx->current; + parser_match(ctx); + parser_match_tk(ctx, ':'); + } + else if (ctx->current->type == TK_KEYWORD_CASE) + { + parser_match(ctx); + p_label->constant_expression = constant_expression(ctx, true); + parser_match_tk(ctx, ':'); + } + else if (ctx->current->type == TK_KEYWORD_DEFAULT) + { + parser_match(ctx); + parser_match_tk(ctx, ':'); + } + //attribute_specifier_sequence_opt identifier ':' + //attribute_specifier_sequence_opt 'case' constant_expression ':' + //attribute_specifier_sequence_opt 'default' ':' + return p_label; } void labeled_statement_delete(struct labeled_statement* owner p) { - if (p) - { - label_delete(p->label); - statement_delete(p->statement); - free(p); - } + if (p) + { + label_delete(p->label); + statement_delete(p->statement); + free(p); + } } struct labeled_statement* owner labeled_statement(struct parser_ctx* ctx) { - struct labeled_statement* owner p_labeled_statement = calloc(1, sizeof(struct labeled_statement)); - //label statement - p_labeled_statement->label = label(ctx); - p_labeled_statement->statement = statement(ctx); - return p_labeled_statement; + struct labeled_statement* owner p_labeled_statement = calloc(1, sizeof(struct labeled_statement)); + //label statement + p_labeled_statement->label = label(ctx); + p_labeled_statement->statement = statement(ctx); + return p_labeled_statement; } void compound_statement_delete(struct compound_statement* owner p) { - if (p) - { - block_item_list_destroy(&p->block_item_list); - free(p); - } + if (p) + { + block_item_list_destroy(&p->block_item_list); + free(p); + } } struct compound_statement* owner compound_statement(struct parser_ctx* ctx) { - //'{' block_item_list_opt '}' - struct compound_statement* owner p_compound_statement = calloc(1, sizeof(struct compound_statement)); - struct scope block_scope = { .variables.capacity = 10 }; - scope_list_push(&ctx->scopes, &block_scope); - - p_compound_statement->first_token = ctx->current; - parser_match_tk(ctx, '{'); - - if (ctx->current->type != '}') - { - p_compound_statement->block_item_list = block_item_list(ctx); - } - - p_compound_statement->last_token = ctx->current; - parser_match_tk(ctx, '}'); - - //TODO ver quem nao foi usado. - - for (int i = 0; i < block_scope.variables.capacity; i++) - { - if (block_scope.variables.table == NULL) - continue; - struct map_entry* entry = block_scope.variables.table[i]; - while (entry) - { - - if (entry->type != TAG_TYPE_ONLY_DECLARATOR && - entry->type != TAG_TYPE_INIT_DECLARATOR) - { - entry = entry->next; - continue; - } - - struct declarator* p_declarator = NULL; - struct init_declarator* p_init_declarator = NULL; - if (entry->type == TAG_TYPE_INIT_DECLARATOR) - { - p_init_declarator = entry->p; - p_declarator = p_init_declarator->p_declarator; - } - else - { - p_declarator = entry->p; - } - - if (p_declarator) - { - - - if (!type_is_maybe_unused(&p_declarator->type) && - p_declarator->num_uses == 0) - { - if (p_declarator->name->token_origin->level == 0) - { - compiler_set_warning_with_token(W_UNUSED_VARIABLE, - ctx, - p_declarator->name, - "'%s': unreferenced declarator", - p_declarator->name->lexeme); - } - } - } - - entry = entry->next; - } - } - - scope_list_pop(&ctx->scopes); - - scope_destroy(&block_scope); - - return p_compound_statement; + + + //'{' block_item_list_opt '}' + struct compound_statement* owner p_compound_statement = calloc(1, sizeof(struct compound_statement)); + + if (p_compound_statement == NULL) + return NULL; + + p_compound_statement->diagnostic_flags = ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index]; + + struct scope block_scope = {.variables.capacity = 10}; + scope_list_push(&ctx->scopes, &block_scope); + + p_compound_statement->first_token = ctx->current; + parser_match_tk(ctx, '{'); + + if (ctx->current->type != '}') + { + p_compound_statement->block_item_list = block_item_list(ctx); + } + + p_compound_statement->last_token = ctx->current; + parser_match_tk(ctx, '}'); + + //TODO ver quem nao foi usado. + + for (int i = 0; i < block_scope.variables.capacity; i++) + { + if (block_scope.variables.table == NULL) + continue; + struct map_entry* entry = block_scope.variables.table[i]; + while (entry) + { + + if (entry->type != TAG_TYPE_ONLY_DECLARATOR && + entry->type != TAG_TYPE_INIT_DECLARATOR) + { + entry = entry->next; + continue; + } + + struct declarator* p_declarator = NULL; + struct init_declarator* p_init_declarator = NULL; + if (entry->type == TAG_TYPE_INIT_DECLARATOR) + { + p_init_declarator = entry->p; + p_declarator = p_init_declarator->p_declarator; + } + else + { + p_declarator = entry->p; + } + + if (p_declarator) + { + + + if (!type_is_maybe_unused(&p_declarator->type) && + p_declarator->num_uses == 0) + { + if (p_declarator->name->token_origin->level == 0) + { + compiler_diagnostic_message(W_UNUSED_VARIABLE, + ctx, + p_declarator->name, + "'%s': unreferenced declarator", + p_declarator->name->lexeme); + } + } + } + + entry = entry->next; + } + } + + scope_list_pop(&ctx->scopes); + + scope_destroy(&block_scope); + + return p_compound_statement; } void block_item_list_destroy(struct block_item_list* obj_owner list) { - struct block_item* owner item = list->head; - while (item) - { - struct block_item* owner next = item->next; - item->next = NULL; - block_item_delete(item); - item = next; - } + struct block_item* owner item = list->head; + while (item) + { + struct block_item* owner next = item->next; + item->next = NULL; + block_item_delete(item); + item = next; + } } struct block_item_list block_item_list(struct parser_ctx* ctx) { - /* - block_item_list: - block_item - block_item_list block_item - */ - struct block_item_list block_item_list = { 0 }; - struct block_item* owner p_block_item = NULL; - try - { - p_block_item = block_item(ctx); - if (p_block_item == NULL) throw; - LIST_ADD(&block_item_list, p_block_item); - p_block_item = NULL; /*MOVED*/ - - while (ctx->current != NULL && ctx->current->type != '}') //follow - { - p_block_item = block_item(ctx); - if (p_block_item == NULL) throw; - LIST_ADD(&block_item_list, p_block_item); - p_block_item = NULL; /*MOVED*/ - } - } - catch - { - } - - return block_item_list; + /* + block_item_list: + block_item + block_item_list block_item + */ + struct block_item_list block_item_list = { 0 }; + struct block_item* owner p_block_item = NULL; + try + { + p_block_item = block_item(ctx); + if (p_block_item == NULL) throw; + LIST_ADD(&block_item_list, p_block_item); + p_block_item = NULL; /*MOVED*/ + + while (ctx->current != NULL && ctx->current->type != '}') //follow + { + p_block_item = block_item(ctx); + if (p_block_item == NULL) throw; + LIST_ADD(&block_item_list, p_block_item); + p_block_item = NULL; /*MOVED*/ + } + } + catch + { + } + + return block_item_list; } void block_item_delete(struct block_item* owner p) { - if (p) - { - declaration_delete(p->declaration); - label_delete(p->label); - unlabeled_statement_delete(p->unlabeled_statement); - assert(p->next == NULL); - free(p); - } + if (p) + { + declaration_delete(p->declaration); + label_delete(p->label); + unlabeled_statement_delete(p->unlabeled_statement); + assert(p->next == NULL); + free(p); + } } struct block_item* owner block_item(struct parser_ctx* ctx) { - // declaration - // unlabeled_statement - // label - struct block_item* owner p_block_item = calloc(1, sizeof(struct block_item)); + // declaration + // unlabeled_statement + // label + struct block_item* owner p_block_item = calloc(1, sizeof(struct block_item)); - /* - * Attributes can be first of declaration, labels etc.. - * so it is better to parse it in advance. - */ - struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + /* + * Attributes can be first of declaration, labels etc.. + * so it is better to parse it in advance. + */ + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - p_block_item->first_token = ctx->current; + p_block_item->first_token = ctx->current; - if (ctx->current->type == TK_KEYWORD__ASM) - { /* - asm-block: - __asm assembly-instruction ;opt - __asm { assembly-instruction-list } ;opt + if (ctx->current->type == TK_KEYWORD__ASM) + { /* + asm-block: + __asm assembly-instruction ;opt + __asm { assembly-instruction-list } ;opt assembly-instruction-list: - assembly-instruction ;opt - assembly-instruction ; assembly-instruction-list ;opt - */ - - parser_match(ctx); - if (ctx->current->type == '{') - { - parser_match(ctx); - while (ctx->current->type != '}') - { - parser_match(ctx); - } - parser_match(ctx); - } - else - { - while (ctx->current->type != TK_NEWLINE) - { - ctx->current = ctx->current->next; - } - parser_match(ctx); - - } - if (ctx->current->type == ';') - parser_match(ctx); - } - else if (first_of_declaration_specifier(ctx) || - first_of_static_assert_declaration(ctx)) - { - p_block_item->declaration = declaration(ctx, p_attribute_specifier_sequence_opt, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); - - p_attribute_specifier_sequence_opt = NULL; /*MOVED*/ - - struct init_declarator* p = p_block_item->declaration->init_declarator_list.head; - while (p) - { - if (p->p_declarator && p->p_declarator->name) - { - naming_convention_local_var(ctx, p->p_declarator->name, &p->p_declarator->type); - } - p = p->next; - } - } - else if (first_of_label(ctx)) - { - //so identifier confunde com expression - p_block_item->label = label(ctx); - } - else - { - p_block_item->unlabeled_statement = unlabeled_statement(ctx); - } - /* - declaration-specifiers init-declarator-list_opt; - attribute-specifier-sequence declaration-specifiers init-declarator-list; - static_assert-declaration attribute_declaration - */ - /* - unlabeled-statement: - expression-statement - attribute-specifier-sequenceopt compound-statement - attribute-specifier-sequenceopt selection-statement - attribute-specifier-sequenceopt iteration-statement - attribute-specifier-sequenceopt jump-statement - - label: - attribute-specifier-sequenceopt identifier : - attribute-specifier-sequenceopt case constant-expression : - attribute-specifier-sequenceopt default : - */ - - attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); - return p_block_item; + assembly-instruction ;opt + assembly-instruction ; assembly-instruction-list ;opt + */ + + parser_match(ctx); + if (ctx->current->type == '{') + { + parser_match(ctx); + while (ctx->current->type != '}') + { + parser_match(ctx); + } + parser_match(ctx); + } + else + { + while (ctx->current->type != TK_NEWLINE) + { + ctx->current = ctx->current->next; + } + parser_match(ctx); + + } + if (ctx->current->type == ';') + parser_match(ctx); + } + else if (first_of_declaration_specifier(ctx) || + first_of_static_assert_declaration(ctx)) + { + p_block_item->declaration = declaration(ctx, p_attribute_specifier_sequence_opt, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); + + p_attribute_specifier_sequence_opt = NULL; /*MOVED*/ + + struct init_declarator* p = p_block_item->declaration->init_declarator_list.head; + while (p) + { + if (p->p_declarator && p->p_declarator->name) + { + naming_convention_local_var(ctx, p->p_declarator->name, &p->p_declarator->type); + } + p = p->next; + } + } + else if (first_of_label(ctx)) + { + //so identifier confunde com expression + p_block_item->label = label(ctx); + } + else + { + p_block_item->unlabeled_statement = unlabeled_statement(ctx); + } + /* + declaration-specifiers init-declarator-list_opt; + attribute-specifier-sequence declaration-specifiers init-declarator-list; + static_assert-declaration attribute_declaration + */ + /* + unlabeled-statement: + expression-statement + attribute-specifier-sequenceopt compound-statement + attribute-specifier-sequenceopt selection-statement + attribute-specifier-sequenceopt iteration-statement + attribute-specifier-sequenceopt jump-statement + + label: + attribute-specifier-sequenceopt identifier : + attribute-specifier-sequenceopt case constant-expression : + attribute-specifier-sequenceopt default : + */ + + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + return p_block_item; } void try_statement_delete(struct try_statement* owner p) { - if (p) - { - secondary_block_delete(p->catch_secondary_block_opt); - secondary_block_delete(p->secondary_block); - free(p); - } + if (p) + { + secondary_block_delete(p->catch_secondary_block_opt); + secondary_block_delete(p->secondary_block); + free(p); + } } struct try_statement* owner try_statement(struct parser_ctx* ctx) { - struct try_statement* owner p_try_statement = calloc(1, sizeof(struct try_statement)); + struct try_statement* owner p_try_statement = calloc(1, sizeof(struct try_statement)); - p_try_statement->first_token = ctx->current; + p_try_statement->first_token = ctx->current; - assert(ctx->current->type == TK_KEYWORD_TRY); - const struct try_statement* try_statement_copy_opt = ctx->p_current_try_statement_opt; - ctx->p_current_try_statement_opt = p_try_statement; - ctx->try_catch_block_index++; - p_try_statement->try_catch_block_index = ctx->try_catch_block_index; - parser_match_tk(ctx, TK_KEYWORD_TRY); + assert(ctx->current->type == TK_KEYWORD_TRY); + const struct try_statement* try_statement_copy_opt = ctx->p_current_try_statement_opt; + ctx->p_current_try_statement_opt = p_try_statement; + ctx->try_catch_block_index++; + p_try_statement->try_catch_block_index = ctx->try_catch_block_index; + parser_match_tk(ctx, TK_KEYWORD_TRY); - p_try_statement->secondary_block = secondary_block(ctx); - /*retores the previous one*/ - ctx->p_current_try_statement_opt = try_statement_copy_opt; + p_try_statement->secondary_block = secondary_block(ctx); + /*retores the previous one*/ + ctx->p_current_try_statement_opt = try_statement_copy_opt; - if (ctx->current->type == TK_KEYWORD_CATCH) - { - p_try_statement->catch_token_opt = ctx->current; - parser_match(ctx); + if (ctx->current->type == TK_KEYWORD_CATCH) + { + p_try_statement->catch_token_opt = ctx->current; + parser_match(ctx); - p_try_statement->catch_secondary_block_opt = secondary_block(ctx); - } - p_try_statement->last_token = ctx->previous; + p_try_statement->catch_secondary_block_opt = secondary_block(ctx); + } + p_try_statement->last_token = ctx->previous; - return p_try_statement; + return p_try_statement; } void selection_statement_delete(struct selection_statement* owner p) { - if (p) - { - secondary_block_delete(p->else_secondary_block_opt); - init_declarator_delete(p->init_declarator); - secondary_block_delete(p->secondary_block); - declaration_specifiers_delete(p->declaration_specifiers); - expression_delete(p->expression); - free(p); - } + if (p) + { + secondary_block_delete(p->else_secondary_block_opt); + init_declarator_delete(p->init_declarator); + secondary_block_delete(p->secondary_block); + declaration_specifiers_delete(p->declaration_specifiers); + expression_delete(p->expression); + free(p); + } } struct selection_statement* owner selection_statement(struct parser_ctx* ctx) { - /* - init-statement: - expression-statement - simple-declaration - */ - /* - 'if' '(' init_statement_opt expression ')' statement - 'if' '(' init_statement_opt expression ')' statement 'else' statement - 'switch' '(' expression ')' statement - */ - /* - 'if' '(' expression ')' statement - 'if' '(' expression ')' statement 'else' statement - 'switch' '(' expression ')' statement - */ - struct selection_statement* owner p_selection_statement = calloc(1, sizeof(struct selection_statement)); - - p_selection_statement->first_token = ctx->current; - - struct scope if_scope = { 0 }; - scope_list_push(&ctx->scopes, &if_scope); //variaveis decladas no if - - if (ctx->current->type == TK_KEYWORD_IF) - { - parser_match(ctx); - - if (!(ctx->current->flags & TK_FLAG_MACRO_EXPANDED) - && !style_has_one_space(ctx->current)) - { - compiler_set_info_with_token(W_STYLE, ctx, ctx->current, "one space"); - } - - parser_match_tk(ctx, '('); - if (first_of_declaration_specifier(ctx)) - { - p_selection_statement->declaration_specifiers = declaration_specifiers(ctx, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); - struct init_declarator_list list = init_declarator_list(ctx, p_selection_statement->declaration_specifiers); - p_selection_statement->init_declarator = list.head; //only one - parser_match_tk(ctx, ';'); - } - - - p_selection_statement->expression = expression(ctx); - - if (constant_value_is_valid(&p_selection_statement->expression->constant_value)) - { - //parser_setwarning_with_token(ctx, p_selection_statement->expression->first_token, "conditional expression is constant"); - } - - - if (type_is_function(&p_selection_statement->expression->type) || - type_is_array(&p_selection_statement->expression->type)) - { - compiler_set_warning_with_token(W_ADDRESS, ctx, ctx->current, "always true"); - } - - parser_match_tk(ctx, ')'); - - p_selection_statement->secondary_block = secondary_block(ctx); - - if (ctx->current) - { - if (ctx->current->type == TK_KEYWORD_ELSE) - { - p_selection_statement->else_token_opt = ctx->current; - parser_match(ctx); - p_selection_statement->else_secondary_block_opt = secondary_block(ctx); - } - } - else - { - compiler_set_error_with_token(C_UNEXPECTED_END_OF_FILE, ctx, ctx->input_list.tail, "unexpected end of file"); - } - } - else if (ctx->current->type == TK_KEYWORD_SWITCH) - { - parser_match(ctx); - parser_match_tk(ctx, '('); - - p_selection_statement->expression = expression(ctx); - parser_match_tk(ctx, ')'); - - p_selection_statement->secondary_block = secondary_block(ctx); - - } - else - { - assert(false); - compiler_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, ctx->input_list.tail, "unexpected token"); - } - - p_selection_statement->last_token = ctx->previous; - - scope_list_pop(&ctx->scopes); - - scope_destroy(&if_scope); - - return p_selection_statement; + /* + init-statement: + expression-statement + simple-declaration + */ + /* + 'if' '(' init_statement_opt expression ')' statement + 'if' '(' init_statement_opt expression ')' statement 'else' statement + 'switch' '(' expression ')' statement + */ + /* + 'if' '(' expression ')' statement + 'if' '(' expression ')' statement 'else' statement + 'switch' '(' expression ')' statement + */ + struct selection_statement* owner p_selection_statement = calloc(1, sizeof(struct selection_statement)); + + p_selection_statement->first_token = ctx->current; + + struct scope if_scope = { 0 }; + scope_list_push(&ctx->scopes, &if_scope); //variaveis decladas no if + + if (ctx->current->type == TK_KEYWORD_IF) + { + parser_match(ctx); + + if (!(ctx->current->flags & TK_FLAG_MACRO_EXPANDED) + && !style_has_one_space(ctx->current)) + { + compiler_diagnostic_message(W_STYLE, ctx, ctx->current, "one space"); + } + + parser_match_tk(ctx, '('); + if (first_of_declaration_specifier(ctx)) + { + p_selection_statement->declaration_specifiers = declaration_specifiers(ctx, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); + struct init_declarator_list list = init_declarator_list(ctx, p_selection_statement->declaration_specifiers); + p_selection_statement->init_declarator = list.head; //only one + parser_match_tk(ctx, ';'); + } + + + p_selection_statement->expression = expression(ctx); + + if (p_selection_statement->expression && constant_value_is_valid(&p_selection_statement->expression->constant_value)) + { + //parser_setwarning_with_token(ctx, p_selection_statement->expression->first_token, "conditional expression is constant"); + } + + + if (p_selection_statement->expression && + (type_is_function(&p_selection_statement->expression->type) || + type_is_array(&p_selection_statement->expression->type))) + { + compiler_diagnostic_message(W_ADDRESS, ctx, ctx->current, "always true"); + } + + parser_match_tk(ctx, ')'); + + p_selection_statement->secondary_block = secondary_block(ctx); + + if (ctx->current) + { + if (ctx->current->type == TK_KEYWORD_ELSE) + { + p_selection_statement->else_token_opt = ctx->current; + parser_match(ctx); + p_selection_statement->else_secondary_block_opt = secondary_block(ctx); + } + } + else + { + compiler_diagnostic_message(ERROR_UNEXPECTED_END_OF_FILE, ctx, ctx->input_list.tail, "unexpected end of file"); + } + } + else if (ctx->current->type == TK_KEYWORD_SWITCH) + { + parser_match(ctx); + parser_match_tk(ctx, '('); + + p_selection_statement->expression = expression(ctx); + parser_match_tk(ctx, ')'); + + p_selection_statement->secondary_block = secondary_block(ctx); + + } + else + { + assert(false); + compiler_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, ctx->input_list.tail, "unexpected token"); + } + + p_selection_statement->last_token = ctx->previous; + + scope_list_pop(&ctx->scopes); + + scope_destroy(&if_scope); + + return p_selection_statement; } struct defer_statement* owner defer_statement(struct parser_ctx* ctx) { - struct defer_statement* owner p_defer_statement = calloc(1, sizeof(struct defer_statement)); - if (ctx->current->type == TK_KEYWORD_DEFER) - { - p_defer_statement->first_token = ctx->current; - parser_match(ctx); - p_defer_statement->secondary_block = secondary_block(ctx); - p_defer_statement->last_token = ctx->previous; - } - return p_defer_statement; + struct defer_statement* owner p_defer_statement = calloc(1, sizeof(struct defer_statement)); + if (ctx->current->type == TK_KEYWORD_DEFER) + { + p_defer_statement->first_token = ctx->current; + parser_match(ctx); + p_defer_statement->secondary_block = secondary_block(ctx); + p_defer_statement->last_token = ctx->previous; + } + return p_defer_statement; } void iteration_statement_delete(struct iteration_statement* owner p) { - if (p) - { - expression_delete(p->expression0); - expression_delete(p->expression1); - expression_delete(p->expression2); - declaration_delete(p->declaration); - secondary_block_delete(p->secondary_block); - free(p); - } + if (p) + { + expression_delete(p->expression0); + expression_delete(p->expression1); + expression_delete(p->expression2); + declaration_delete(p->declaration); + secondary_block_delete(p->secondary_block); + free(p); + } } struct iteration_statement* owner iteration_statement(struct parser_ctx* ctx) { - /* - iteration-statement: - while ( expression ) statement - do statement while ( expression ) ; - for ( expressionopt ; expressionopt ; expressionopt ) statement - for ( declaration expressionopt ; expressionopt ) statement - */ - struct iteration_statement* owner p_iteration_statement = calloc(1, sizeof(struct iteration_statement)); - - - p_iteration_statement->first_token = ctx->current; - if (ctx->current->type == TK_KEYWORD_DO) - { - parser_match(ctx); - p_iteration_statement->secondary_block = secondary_block(ctx); - p_iteration_statement->second_token = ctx->current; - parser_match_tk(ctx, TK_KEYWORD_WHILE); - parser_match_tk(ctx, '('); - - p_iteration_statement->expression1 = expression(ctx); - parser_match_tk(ctx, ')'); - parser_match_tk(ctx, ';'); - } - else if (ctx->current->type == TK_KEYWORD_WHILE) - { - parser_match(ctx); - parser_match_tk(ctx, '('); - - p_iteration_statement->expression1 = expression(ctx); - parser_match_tk(ctx, ')'); - p_iteration_statement->secondary_block = secondary_block(ctx); - } - else if (ctx->current->type == TK_KEYWORD_FOR) - { - parser_match(ctx); - parser_match_tk(ctx, '('); - if (first_of_declaration_specifier(ctx)) - { - struct scope for_scope = { 0 }; - scope_list_push(&ctx->scopes, &for_scope); - - p_iteration_statement->declaration = declaration(ctx, NULL, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); - if (ctx->current->type != ';') - { - p_iteration_statement->expression1 = expression(ctx); - } - parser_match_tk(ctx, ';'); - if (ctx->current->type != ')') - p_iteration_statement->expression2 = expression(ctx); - - parser_match_tk(ctx, ')'); - - p_iteration_statement->secondary_block = secondary_block(ctx); - - scope_list_pop(&ctx->scopes); - - scope_destroy(&for_scope); - } - else - { - /* - * int i; - * for (i = 0; i < 10; i++) - * { - * } - */ - - if (ctx->current->type != ';') - p_iteration_statement->expression0 = expression(ctx); - parser_match_tk(ctx, ';'); - if (ctx->current->type != ';') - p_iteration_statement->expression1 = expression(ctx); - parser_match_tk(ctx, ';'); - if (ctx->current->type != ')') - p_iteration_statement->expression2 = expression(ctx); - parser_match_tk(ctx, ')'); - - p_iteration_statement->secondary_block = secondary_block(ctx); - } - } - return p_iteration_statement; + /* + iteration-statement: + while ( expression ) statement + do statement while ( expression ) ; + for ( expressionopt ; expressionopt ; expressionopt ) statement + for ( declaration expressionopt ; expressionopt ) statement + */ + struct iteration_statement* owner p_iteration_statement = calloc(1, sizeof(struct iteration_statement)); + + + p_iteration_statement->first_token = ctx->current; + if (ctx->current->type == TK_KEYWORD_DO) + { + parser_match(ctx); + p_iteration_statement->secondary_block = secondary_block(ctx); + p_iteration_statement->second_token = ctx->current; + parser_match_tk(ctx, TK_KEYWORD_WHILE); + parser_match_tk(ctx, '('); + + p_iteration_statement->expression1 = expression(ctx); + parser_match_tk(ctx, ')'); + parser_match_tk(ctx, ';'); + } + else if (ctx->current->type == TK_KEYWORD_WHILE) + { + parser_match(ctx); + parser_match_tk(ctx, '('); + + p_iteration_statement->expression1 = expression(ctx); + parser_match_tk(ctx, ')'); + p_iteration_statement->secondary_block = secondary_block(ctx); + } + else if (ctx->current->type == TK_KEYWORD_FOR) + { + parser_match(ctx); + parser_match_tk(ctx, '('); + if (first_of_declaration_specifier(ctx)) + { + struct scope for_scope = { 0 }; + scope_list_push(&ctx->scopes, &for_scope); + + p_iteration_statement->declaration = declaration(ctx, NULL, STORAGE_SPECIFIER_AUTOMATIC_STORAGE); + if (ctx->current->type != ';') + { + p_iteration_statement->expression1 = expression(ctx); + } + parser_match_tk(ctx, ';'); + if (ctx->current->type != ')') + p_iteration_statement->expression2 = expression(ctx); + + parser_match_tk(ctx, ')'); + + p_iteration_statement->secondary_block = secondary_block(ctx); + + scope_list_pop(&ctx->scopes); + + scope_destroy(&for_scope); + } + else + { + /* + * int i; + * for (i = 0; i < 10; i++) + * { + * } + */ + + if (ctx->current->type != ';') + p_iteration_statement->expression0 = expression(ctx); + parser_match_tk(ctx, ';'); + if (ctx->current->type != ';') + p_iteration_statement->expression1 = expression(ctx); + parser_match_tk(ctx, ';'); + if (ctx->current->type != ')') + p_iteration_statement->expression2 = expression(ctx); + parser_match_tk(ctx, ')'); + + p_iteration_statement->secondary_block = secondary_block(ctx); + } + } + return p_iteration_statement; } void jump_statement_delete(struct jump_statement* owner p) { - if (p) - { - expression_delete(p->expression_opt); - free(p); - } + if (p) + { + expression_delete(p->expression_opt); + free(p); + } } struct jump_statement* owner jump_statement(struct parser_ctx* ctx) { - /* - jump-statement: - goto identifier ; - continue ; - break ; - return expressionopt ; - */ - - /* - throw; (extension) - */ - - struct jump_statement* owner p_jump_statement = calloc(1, sizeof(struct jump_statement)); - - p_jump_statement->first_token = ctx->current; - - if (ctx->current->type == TK_KEYWORD_GOTO) - { - parser_match(ctx); - p_jump_statement->label = ctx->current; - parser_match_tk(ctx, TK_IDENTIFIER); - } - else if (ctx->current->type == TK_KEYWORD_CONTINUE) - { - parser_match(ctx); - } - else if (ctx->current->type == TK_KEYWORD_BREAK) - { - parser_match(ctx); - } - else if (ctx->current->type == TK_KEYWORD_THROW) - { - if (ctx->p_current_try_statement_opt == NULL) - { - - compiler_set_error_with_token(C_THROW_STATEMENT_NOT_WITHIN_TRY_BLOCK, ctx, ctx->current, "throw statement not within try block"); - } - else - { - p_jump_statement->try_catch_block_index = ctx->p_current_try_statement_opt->try_catch_block_index; - } - - parser_match(ctx); - } - else if (ctx->current->type == TK_KEYWORD_RETURN) - { - const struct token* const p_return_token = ctx->current; - parser_match(ctx); - - - if (ctx->current->type != ';') - { - p_jump_statement->expression_opt = expression(ctx); - - - if (p_jump_statement->expression_opt) - { - /* - * Check is return type is compatible with function return - */ - struct type return_type = - get_function_return_type(&ctx->p_current_function_opt->init_declarator_list.head->p_declarator->type); - - if (type_is_void(&return_type)) - { - compiler_set_error_with_token(C_VOID_FUNCTION_SHOULD_NOT_RETURN_VALUE, - ctx, - p_return_token, - "void function '%s' should not return a value", - ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme); - } - else - { - if (p_jump_statement->expression_opt) - { - check_assigment(ctx, - &return_type, - p_jump_statement->expression_opt, - true); - - } - } - - - type_destroy(&return_type); - } - } - } - else - { - assert(false); - } - p_jump_statement->last_token = ctx->current; - parser_match_tk(ctx, ';'); - return p_jump_statement; + /* + jump-statement: + goto identifier ; + continue ; + break ; + return expressionopt ; + */ + + /* + throw; (extension) + */ + + struct jump_statement* owner p_jump_statement = calloc(1, sizeof(struct jump_statement)); + + p_jump_statement->first_token = ctx->current; + + if (ctx->current->type == TK_KEYWORD_GOTO) + { + parser_match(ctx); + p_jump_statement->label = ctx->current; + parser_match_tk(ctx, TK_IDENTIFIER); + } + else if (ctx->current->type == TK_KEYWORD_CONTINUE) + { + parser_match(ctx); + } + else if (ctx->current->type == TK_KEYWORD_BREAK) + { + parser_match(ctx); + } + else if (ctx->current->type == TK_KEYWORD_THROW) + { + if (ctx->p_current_try_statement_opt == NULL) + { + + compiler_diagnostic_message(ERROR_THROW_STATEMENT_NOT_WITHIN_TRY_BLOCK, ctx, ctx->current, "throw statement not within try block"); + } + else + { + p_jump_statement->try_catch_block_index = ctx->p_current_try_statement_opt->try_catch_block_index; + } + + parser_match(ctx); + } + else if (ctx->current->type == TK_KEYWORD_RETURN) + { + const struct token* const p_return_token = ctx->current; + parser_match(ctx); + + + if (ctx->current->type != ';') + { + p_jump_statement->expression_opt = expression(ctx); + + + if (p_jump_statement->expression_opt) + { + /* + * Check is return type is compatible with function return + */ + struct type return_type = + get_function_return_type(&ctx->p_current_function_opt->init_declarator_list.head->p_declarator->type); + + if (type_is_void(&return_type)) + { + compiler_diagnostic_message(ERROR_VOID_FUNCTION_SHOULD_NOT_RETURN_VALUE, + ctx, + p_return_token, + "void function '%s' should not return a value", + ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name->lexeme); + } + else + { + if (p_jump_statement->expression_opt) + { + check_assigment(ctx, + &return_type, + p_jump_statement->expression_opt, + true); + + } + } + + + type_destroy(&return_type); + } + } + } + else + { + assert(false); + } + p_jump_statement->last_token = ctx->current; + parser_match_tk(ctx, ';'); + return p_jump_statement; } void expression_statement_delete(struct expression_statement* owner p) { - if (p) - { - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - expression_delete(p->expression_opt); - free(p); - } + if (p) + { + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + expression_delete(p->expression_opt); + free(p); + } } struct expression_statement* owner expression_statement(struct parser_ctx* ctx) { - struct expression_statement* owner p_expression_statement = calloc(1, sizeof(struct expression_statement)); - /* - expression-statement: - expression opt ; - attribute-specifier-sequence expression ; - */ + struct expression_statement* owner p_expression_statement = calloc(1, sizeof(struct expression_statement)); + /* + expression-statement: + expression opt ; + attribute-specifier-sequence expression ; + */ - p_expression_statement->p_attribute_specifier_sequence_opt = - attribute_specifier_sequence_opt(ctx); + p_expression_statement->p_attribute_specifier_sequence_opt = + attribute_specifier_sequence_opt(ctx); - if (ctx->current->type != ';') - { - p_expression_statement->expression_opt = expression(ctx); - } + if (ctx->current->type != ';') + { + p_expression_statement->expression_opt = expression(ctx); + } - parser_match_tk(ctx, ';'); + parser_match_tk(ctx, ';'); - return p_expression_statement; + return p_expression_statement; } void declaration_list_add(struct declaration_list* list, struct declaration* owner p_declaration) { - if (list->head == NULL) - { - list->head = p_declaration; - } - else - { - assert(list->tail->next == NULL); - list->tail->next = p_declaration; - } - list->tail = p_declaration; + if (list->head == NULL) + { + list->head = p_declaration; + } + else + { + assert(list->tail->next == NULL); + list->tail->next = p_declaration; + } + list->tail = p_declaration; } void declaration_delete(struct declaration* owner p) { - if (p) - { + if (p) + { - attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); - static_assert_declaration_delete(p->static_assert_declaration); + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + static_assert_declaration_delete(p->static_assert_declaration); - declaration_specifiers_delete(p->declaration_specifiers); + declaration_specifiers_delete(p->declaration_specifiers); - compound_statement_delete(p->function_body); + compound_statement_delete(p->function_body); - init_declarator_list_destroy(&p->init_declarator_list); - assert(p->next == NULL); - free(p); - } + init_declarator_list_destroy(&p->init_declarator_list); + assert(p->next == NULL); + free(p); + } } void declaration_list_destroy(struct declaration_list* obj_owner list) { - struct declaration* owner p = list->head; - while (p) - { - struct declaration* owner next = p->next; - p->next = NULL; - declaration_delete(p); - p = next; - } + struct declaration* owner p = list->head; + while (p) + { + struct declaration* owner next = p->next; + p->next = NULL; + declaration_delete(p); + p = next; + } } struct declaration_list translation_unit(struct parser_ctx* ctx) { - struct declaration_list declaration_list = { 0 }; - /* - translation_unit: - external_declaration - translation_unit external_declaration - */ - while (ctx->current != NULL) - { - declaration_list_add(&declaration_list, external_declaration(ctx)); - } - return declaration_list; + struct declaration_list declaration_list = { 0 }; + /* + translation_unit: + external_declaration + translation_unit external_declaration + */ + while (ctx->current != NULL) + { + declaration_list_add(&declaration_list, external_declaration(ctx)); + } + return declaration_list; } struct declaration* owner external_declaration(struct parser_ctx* ctx) { - /* - function_definition - declaration - */ - return function_definition_or_declaration(ctx); + /* + function_definition + declaration + */ + return function_definition_or_declaration(ctx); } struct compound_statement* owner function_body(struct parser_ctx* ctx) { - /* - * Used to give an unique index (inside the function) - * for try-catch blocks - */ - ctx->try_catch_block_index = 0; - ctx->p_current_try_statement_opt = NULL; - return compound_statement(ctx); + + /* + * Used to give an unique index (inside the function) + * for try-catch blocks + */ + ctx->try_catch_block_index = 0; + ctx->p_current_try_statement_opt = NULL; + return compound_statement(ctx); } static void show_unused_file_scope(struct parser_ctx* ctx) { - for (int i = 0; i < ctx->scopes.head->variables.capacity; i++) - { - if (ctx->scopes.head->variables.table == NULL) - continue; - struct map_entry* entry = ctx->scopes.head->variables.table[i]; - while (entry) - { - - if (entry->type != TAG_TYPE_ONLY_DECLARATOR && - entry->type != TAG_TYPE_INIT_DECLARATOR) - { - entry = entry->next; - continue; - } - - struct declarator* p_declarator = NULL; - struct init_declarator* p_init_declarator = NULL; - if (entry->type == TAG_TYPE_INIT_DECLARATOR) - { - p_init_declarator = entry->p; - p_declarator = p_init_declarator->p_declarator; - } - else - { - p_declarator = entry->p; - } - - if (p_declarator && - p_declarator->first_token && - p_declarator->first_token->level == 0 && - declarator_is_function(p_declarator) && - (p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_STATIC)) - { - if (!type_is_maybe_unused(&p_declarator->type) && - p_declarator->num_uses == 0) - { - compiler_set_warning_with_token(W_UNUSED_VARIABLE, - ctx, - p_declarator->name, - "declarator '%s' not used", p_declarator->name->lexeme); - } - } - - entry = entry->next; - } - } + for (int i = 0; i < ctx->scopes.head->variables.capacity; i++) + { + if (ctx->scopes.head->variables.table == NULL) + continue; + struct map_entry* entry = ctx->scopes.head->variables.table[i]; + while (entry) + { + + if (entry->type != TAG_TYPE_ONLY_DECLARATOR && + entry->type != TAG_TYPE_INIT_DECLARATOR) + { + entry = entry->next; + continue; + } + + struct declarator* p_declarator = NULL; + struct init_declarator* p_init_declarator = NULL; + if (entry->type == TAG_TYPE_INIT_DECLARATOR) + { + p_init_declarator = entry->p; + p_declarator = p_init_declarator->p_declarator; + } + else + { + p_declarator = entry->p; + } + + if (p_declarator && + p_declarator->first_token && + p_declarator->first_token->level == 0 && + declarator_is_function(p_declarator) && + (p_declarator->declaration_specifiers->storage_class_specifier_flags & STORAGE_SPECIFIER_STATIC)) + { + if (!type_is_maybe_unused(&p_declarator->type) && + p_declarator->num_uses == 0) + { + compiler_diagnostic_message(W_UNUSED_VARIABLE, + ctx, + p_declarator->name, + "declarator '%s' not used", p_declarator->name->lexeme); + } + } + + entry = entry->next; + } + } } struct declaration_list parse(struct parser_ctx* ctx, - struct token_list* list) + struct token_list* list) { - s_anonymous_struct_count = 0; + s_anonymous_struct_count = 0; - struct scope file_scope = { 0 }; + struct scope file_scope = { 0 }; - scope_list_push(&ctx->scopes, &file_scope); - ctx->input_list = *list; - ctx->current = ctx->input_list.head; - parser_skip_blanks(ctx); + scope_list_push(&ctx->scopes, &file_scope); + ctx->input_list = *list; + ctx->current = ctx->input_list.head; + parser_skip_blanks(ctx); - struct declaration_list l = translation_unit(ctx); - show_unused_file_scope(ctx); + struct declaration_list l = translation_unit(ctx); + show_unused_file_scope(ctx); - scope_destroy(&file_scope); + scope_destroy(&file_scope); - return l; + return l; } int fill_preprocessor_options(int argc, const char** argv, struct preprocessor_ctx* prectx) { - /*first loop used to collect options*/ - for (int i = 1; i < argc; i++) - { - if (argv[i][0] != '-') - continue; - - - if (argv[i][1] == 'I') - { - include_dir_add(&prectx->include_dir, argv[i] + 2); - continue; - } - if (argv[i][1] == 'D') - { - char buffer[200]; - snprintf(buffer, sizeof buffer, "#define %s \n", argv[i] + 2); - - /*TODO make it more precise*/ - char* p = &buffer[7]; - while (*p) - { - if (*p == '=') - { - *p = ' '; - break; - } - p++; - } - - struct tokenizer_ctx tctx = { 0 }; - struct token_list l1 = tokenizer(&tctx, buffer, "", 0, TK_FLAG_NONE); - struct token_list r = preprocessor(prectx, &l1, 0); - token_list_destroy(&l1); - token_list_destroy(&r); - continue; - } - } - return 0; + /*first loop used to collect options*/ + for (int i = 1; i < argc; i++) + { + if (argv[i][0] != '-') + continue; + + + if (argv[i][1] == 'I') + { + include_dir_add(&prectx->include_dir, argv[i] + 2); + continue; + } + if (argv[i][1] == 'D') + { + char buffer[200] = { 0 }; + snprintf(buffer, sizeof buffer, "#define %s \n", argv[i] + 2); + + /*TODO make it more precise*/ + char* p = &buffer[7]; + while (*p) + { + if (*p == '=') + { + *p = ' '; + break; + } + p++; + } + + struct tokenizer_ctx tctx = { 0 }; + struct token_list l1 = tokenizer(&tctx, buffer, "", 0, TK_FLAG_NONE); + struct token_list r = preprocessor(prectx, &l1, 0); + token_list_destroy(&l1); + token_list_destroy(&r); + continue; + } + } + return 0; } #ifdef _WIN32 unsigned long __stdcall GetEnvironmentVariableA( - const char* lpname, - char* lpbuffer, - unsigned long nsize + const char* lpname, + char* lpbuffer, + unsigned long nsize ); #else unsigned long GetEnvironmentVariableA( - const char* lpname, - char* lpbuffer, - unsigned long nsize + const char* lpname, + char* lpbuffer, + unsigned long nsize ) { - + return 0; } #endif @@ -6540,105 +6471,105 @@ void append_msvc_include_dir(struct preprocessor_ctx* prectx) #ifdef _WIN32 - char env[2000] = { 0 }; - int n = GetEnvironmentVariableA("INCLUDE", env, sizeof(env)); - - if (n > 0) - { - - const char* p = env; - for (;;) - { - if (*p == '\0') - { - break; - } - char filename_local[500] = { 0 }; - int count = 0; - while (*p != '\0' && (*p != ';' && *p != '\n')) - { - filename_local[count] = *p; - p++; - count++; - } - filename_local[count] = 0; - if (count > 0) - { - strcat(filename_local, "/"); - include_dir_add(&prectx->include_dir, filename_local); - } - if (*p == '\0') - { - break; - } - p++; - } - } + char env[2000] = { 0 }; + int n = GetEnvironmentVariableA("INCLUDE", env, sizeof(env)); + + if (n > 0) + { + + const char* p = env; + for (;;) + { + if (*p == '\0') + { + break; + } + char filename_local[500] = { 0 }; + int count = 0; + while (*p != '\0' && (*p != ';' && *p != '\n')) + { + filename_local[count] = *p; + p++; + count++; + } + filename_local[count] = 0; + if (count > 0) + { + strcat(filename_local, "/"); + include_dir_add(&prectx->include_dir, filename_local); + } + if (*p == '\0') + { + break; + } + p++; + } + } #endif } const char* owner format_code(struct options* options, const char* content) { - struct ast ast = { 0 }; - const char* owner s = NULL; + struct ast ast = { 0 }; + const char* owner s = NULL; - struct preprocessor_ctx prectx = { 0 }; + struct preprocessor_ctx prectx = { 0 }; - prectx.macros.capacity = 5000; - add_standard_macros(&prectx); + prectx.macros.capacity = 5000; + add_standard_macros(&prectx); - struct report report = { 0 }; - struct parser_ctx ctx = { 0 }; - ctx.options = *options; - ctx.p_report = &report; - struct tokenizer_ctx tctx = { 0 }; - struct token_list tokens = { 0 }; + struct report report = { 0 }; + struct parser_ctx ctx = { 0 }; + ctx.options = *options; + ctx.p_report = &report; + struct tokenizer_ctx tctx = { 0 }; + struct token_list tokens = { 0 }; - try - { - prectx.options = *options; - append_msvc_include_dir(&prectx); + try + { + prectx.options = *options; + append_msvc_include_dir(&prectx); - tokens = tokenizer(&tctx, content, "", 0, TK_FLAG_NONE); - ast.token_list = preprocessor(&prectx, &tokens, 0); - if (prectx.n_errors != 0) throw; + tokens = tokenizer(&tctx, content, "", 0, TK_FLAG_NONE); + ast.token_list = preprocessor(&prectx, &tokens, 0); + if (prectx.n_errors != 0) throw; - ast.declaration_list = parse(&ctx, &ast.token_list); - if (report.error_count > 0) throw; + ast.declaration_list = parse(&ctx, &ast.token_list); + if (report.error_count > 0) throw; - struct format_visit_ctx visit_ctx = { 0 }; - visit_ctx.ast = ast; - format_visit(&visit_ctx); + struct format_visit_ctx visit_ctx = { 0 }; + visit_ctx.ast = ast; + format_visit(&visit_ctx); - if (options->direct_compilation) - s = get_code_as_compiler_see(&visit_ctx.ast.token_list); - else - s = get_code_as_we_see(&visit_ctx.ast.token_list, options->remove_comments); + if (options->direct_compilation) + s = get_code_as_compiler_see(&visit_ctx.ast.token_list); + else + s = get_code_as_we_see(&visit_ctx.ast.token_list, options->remove_comments); - } - catch - { + } + catch + { - } + } - token_list_destroy(&tokens); + token_list_destroy(&tokens); - parser_ctx_destroy(&ctx); - ast_destroy(&ast); - preprocessor_ctx_destroy(&prectx); - return s; + parser_ctx_destroy(&ctx); + ast_destroy(&ast); + preprocessor_ctx_destroy(&prectx); + return s; } void ast_format_visit(struct ast* ast) { - /*format input source before transformation*/ - struct format_visit_ctx visit_ctx = { 0 }; - visit_ctx.ast = *ast; - format_visit(&visit_ctx); + /*format input source before transformation*/ + struct format_visit_ctx visit_ctx = { 0 }; + visit_ctx.ast = *ast; + format_visit(&visit_ctx); } void c_visit(struct ast* ast) @@ -6647,160 +6578,170 @@ void c_visit(struct ast* ast) } int compile_one_file(const char* file_name, - struct options* options, - const char* out_file_name, - int argc, - const char** argv, - struct report* report) -{ - printf("%s\n", file_name); - struct preprocessor_ctx prectx = { 0 }; - - prectx.macros.capacity = 5000; - - add_standard_macros(&prectx); - - include_config_header(&prectx); - //print_all_macros(&prectx); - - struct ast ast = { 0 }; - - const char* owner s = NULL; - - struct parser_ctx ctx = { 0 }; - struct visit_ctx visit_ctx = { 0 }; - struct tokenizer_ctx tctx = { 0 }; - struct token_list tokens = { 0 }; - - ctx.options = *options; - ctx.p_report = report; - char* owner content = NULL; - - try - { - - - if (fill_preprocessor_options(argc, argv, &prectx) != 0) - { - throw; - } - - prectx.options = *options; - append_msvc_include_dir(&prectx); - - - - content = read_file(file_name); - if (content == NULL) - { - report->error_count++; - printf("file not found '%s'\n", file_name); - throw; - } - - if (options->sarif_output) - { - char sarif_file_name[260] = { 0 }; - strcpy(sarif_file_name, file_name); - strcat(sarif_file_name, ".sarif"); - ctx.sarif_file = (FILE * owner) fopen(sarif_file_name, "w"); - if (ctx.sarif_file) - { - const char* begin_sarif = - "{\n" - " \"version\": \"2.1.0\",\n" - //" \"$schema\": \"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json\",\n" - " \"$schema\": \"https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json\",\n" - " \"runs\": [\n" - " {\n" - " \"results\": [\n" - "\n"; - - fprintf(ctx.sarif_file, "%s", begin_sarif); - } - else - { - report->error_count++; - printf("cannot open sarif output file '%s'\n", sarif_file_name); - throw; - } - } - - tokens = tokenizer(&tctx, content, file_name, 0, TK_FLAG_NONE); - - ast.token_list = preprocessor(&prectx, &tokens, 0); - if (prectx.n_errors > 0) throw; - - if (options->preprocess_only) - { - const char* owner s2 = print_preprocessed_to_string2(ast.token_list.head); - printf("%s", s2); - free((void* owner)s2); - } - else - { - - ast.declaration_list = parse(&ctx, &ast.token_list); - if (report->error_count > 0) throw; - - //ast_wasm_visit(&ast); - - if (!options->no_output) - { - if (options->format_input) - { - struct format_visit_ctx f = { .ast = ast, .indentation = 4 }; - format_visit(&f); - } - - visit_ctx.target = options->target; - visit_ctx.hide_non_used_declarations = options->direct_compilation; - - visit_ctx.ast = ast; - visit(&visit_ctx); - - if (options->direct_compilation) - s = get_code_as_compiler_see(&visit_ctx.ast.token_list); - else - s = get_code_as_we_see(&visit_ctx.ast.token_list, options->remove_comments); - - if (options->format_ouput) - { - /*re-parser ouput and format*/ - const char* owner s2 = format_code(options, s); - free((void* owner)s); - s = s2; - } - - FILE* owner outfile = fopen(out_file_name, "w"); - if (outfile) - { - if (s) - fprintf(outfile, "%s", s); - - fclose(outfile); - //printf("%-30s ", path); - } - else - { - report->error_count++; - printf("cannot open output file '%s' - %s\n", out_file_name, get_posix_error_message(errno)); - throw; - } - - - } - } - } - catch - { - //printf("Error %s\n", error->message); - } - - if (ctx.sarif_file) - { - if (ctx.sarif_file) - { + struct options* options, + const char* out_file_name, + int argc, + const char** argv, + struct report* report) +{ + printf("%s\n", file_name); + struct preprocessor_ctx prectx = { 0 }; + + prectx.macros.capacity = 5000; + + add_standard_macros(&prectx); + + include_config_header(&prectx); + //print_all_macros(&prectx); + + struct ast ast = { 0 }; + + const char* owner s = NULL; + + struct parser_ctx ctx = { 0 }; + struct visit_ctx visit_ctx = { 0 }; + struct tokenizer_ctx tctx = { 0 }; + struct token_list tokens = { 0 }; + + ctx.options = *options; + ctx.p_report = report; + char* owner content = NULL; + + try + { + + + if (fill_preprocessor_options(argc, argv, &prectx) != 0) + { + throw; + } + + prectx.options = *options; + append_msvc_include_dir(&prectx); + + + + content = read_file(file_name); + if (content == NULL) + { + report->error_count++; + printf("file not found '%s'\n", file_name); + throw; + } + + if (options->sarif_output) + { + char sarif_file_name[260] = { 0 }; + strcpy(sarif_file_name, file_name); + strcat(sarif_file_name, ".sarif"); + ctx.sarif_file = (FILE * owner) fopen(sarif_file_name, "w"); + if (ctx.sarif_file) + { + const char* begin_sarif = + "{\n" + " \"version\": \"2.1.0\",\n" + //" \"$schema\": \"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json\",\n" + " \"$schema\": \"https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json\",\n" + " \"runs\": [\n" + " {\n" + " \"results\": [\n" + "\n"; + + fprintf(ctx.sarif_file, "%s", begin_sarif); + } + else + { + report->error_count++; + printf("cannot open sarif output file '%s'\n", sarif_file_name); + throw; + } + } + + tokens = tokenizer(&tctx, content, file_name, 0, TK_FLAG_NONE); + + if (options->dump_tokens) + { + print_tokens(tokens.head); + } + + ast.token_list = preprocessor(&prectx, &tokens, 0); + if (prectx.n_errors > 0) throw; + + if (options->dump_pptokens) + { + print_tokens(ast.token_list.head); + } + + if (options->preprocess_only) + { + const char* owner s2 = print_preprocessed_to_string2(ast.token_list.head); + printf("%s", s2); + free((void* owner)s2); + } + else + { + + ast.declaration_list = parse(&ctx, &ast.token_list); + if (report->error_count > 0) throw; + + //ast_wasm_visit(&ast); + + if (!options->no_output) + { + if (options->format_input) + { + struct format_visit_ctx f = {.ast = ast, .indentation = 4}; + format_visit(&f); + } + + visit_ctx.target = options->target; + visit_ctx.hide_non_used_declarations = options->direct_compilation; + + visit_ctx.ast = ast; + visit(&visit_ctx); + + if (options->direct_compilation) + s = get_code_as_compiler_see(&visit_ctx.ast.token_list); + else + s = get_code_as_we_see(&visit_ctx.ast.token_list, options->remove_comments); + + if (options->format_ouput) + { + /*re-parser ouput and format*/ + const char* owner s2 = format_code(options, s); + free((void* owner)s); + s = s2; + } + + FILE* owner outfile = fopen(out_file_name, "w"); + if (outfile) + { + if (s) + fprintf(outfile, "%s", s); + + fclose(outfile); + //printf("%-30s ", path); + } + else + { + report->error_count++; + printf("cannot open output file '%s' - %s\n", out_file_name, get_posix_error_message(errno)); + throw; + } + + + } + } + } + catch + { + //printf("Error %s\n", error->message); + } + + if (ctx.sarif_file) + { + if (ctx.sarif_file) + { #define END \ " ],\n"\ " \"tool\": {\n"\ @@ -6815,203 +6756,212 @@ int compile_one_file(const char* file_name, " ]\n"\ "}\n"\ "\n" - fprintf(ctx.sarif_file, "%s", END); - } - fclose(ctx.sarif_file); - ctx.sarif_file = NULL; - } - token_list_destroy(&tokens); - visit_ctx_destroy(&visit_ctx); - parser_ctx_destroy(&ctx); - free((void* owner)s); - free(content); - ast_destroy(&ast); - preprocessor_ctx_destroy(&prectx); - - return report->error_count > 0; -} - -static void longest_common_path(int argc, const char** argv, char root_dir[MAX_PATH]) -{ - /* - find the longest common path - */ - for (int i = 1; i < argc; i++) - { - if (argv[i][0] == '-') - continue; - - char fullpath_i[MAX_PATH] = { 0 }; - realpath(argv[i], fullpath_i); - strcpy(root_dir, fullpath_i); - dirname(root_dir); - - for (int k = 0; ; k++) - { - const char ch = fullpath_i[k]; - for (int j = 2; j < argc; j++) - { - if (argv[j][0] == '-') - continue; - - char fullpath_j[MAX_PATH] = { 0 }; - realpath(argv[j], fullpath_j); - if (fullpath_j[k] != ch) - { - strncpy(root_dir, fullpath_j, k); - root_dir[k] = '\0'; - dirname(root_dir); - goto exit; - } - } - if (ch == '\0') - break; - } - } + fprintf(ctx.sarif_file, "%s", END); + } + fclose(ctx.sarif_file); + ctx.sarif_file = NULL; + } + token_list_destroy(&tokens); + visit_ctx_destroy(&visit_ctx); + parser_ctx_destroy(&ctx); + free((void* owner)s); + free(content); + ast_destroy(&ast); + preprocessor_ctx_destroy(&prectx); + + return report->error_count > 0; +} + +static void longest_common_path(int argc, const char** argv, char root_dir[MYMAX_PATH]) +{ + /* + find the longest common path + */ + for (int i = 1; i < argc; i++) + { + if (argv[i][0] == '-') + continue; + + char fullpath_i[MYMAX_PATH]; + if(!realpath(argv[i], fullpath_i)) + fullpath_i[0] = '\0'; + strcpy(root_dir, fullpath_i); + dirname(root_dir); + + for (int k = 0; k < MYMAX_PATH; k++) + { + const char ch = fullpath_i[k]; + for (int j = 2; j < argc; j++) + { + if (argv[j][0] == '-') + continue; + + char fullpath_j[MYMAX_PATH]; + if(!realpath(argv[j], fullpath_j)) + fullpath_j[0] = '\0'; + if (fullpath_j[k] != ch) + { + strncpy(root_dir, fullpath_j, k); + root_dir[k] = '\0'; + dirname(root_dir); + goto exit; + } + } + if (ch == '\0') + break; + } + } exit:; } static int create_multiple_paths(const char* root, const char* outdir) { - /* - This function creates all dirs (folder1, forder2 ..) after root - root : C:/folder - outdir : C:/folder/folder1/folder2 ... - */ - - const char* p = outdir + strlen(root) + 1; - for (;;) - { - if (*p != '\0' && *p != '/' && *p != '\\') - { - p++; - continue; - } - - char temp[MAX_PATH] = { 0 }; - strncpy(temp, outdir, p - outdir); - - int er = mkdir(temp, 0777); - if (er != 0) - { - er = errno; - if (er != EEXIST) - { - printf("error creating output folder '%s' - %s\n", temp, get_posix_error_message(er)); - return er; - } - } - if (*p == '\0') - break; - p++; - } - return 0; -} + /* + This function creates all dirs (folder1, forder2 ..) after root + root : C:/folder + outdir : C:/folder/folder1/folder2 ... + */ +#if !defined __EMSCRIPTEN__ + const char* p = outdir + strlen(root) + 1; + for (;;) + { + if (*p != '\0' && *p != '/' && *p != '\\') + { + p++; + continue; + } + + char temp[MYMAX_PATH] = { 0 }; + strncpy(temp, outdir, p - outdir); + + int er = mkdir(temp, 0777); + if (er != 0) + { + er = errno; + if (er != EEXIST) + { + printf("error creating output folder '%s' - %s\n", temp, get_posix_error_message(er)); + return er; + } + } + if (*p == '\0') + break; + p++; + } + return 0; +#else + return -1; +#endif + } int compile(int argc, const char** argv, struct report* report) { - struct options options = { 0 }; - if (fill_options(&options, argc, argv) != 0) - { - return 1; - } - - clock_t begin_clock = clock(); - int no_files = 0; - - char root_dir[MAX_PATH] = { 0 }; - - if (!options.no_output) - { - longest_common_path(argc, argv, root_dir); - } - - const int root_dir_len = strlen(root_dir); - - /*second loop to compile each file*/ - for (int i = 1; i < argc; i++) - { - if (argv[i][0] == '-') - continue; - no_files++; - char output_file[400] = { 0 }; - - if (!options.no_output) - { - if (no_files == 1 && options.output[0] != '\0') - { - /* - -o outputname - works when we compile just one file - */ - strcat(output_file, options.output); - } - else - { - char fullpath[MAX_PATH] = { 0 }; - realpath(argv[i], fullpath); - - strcpy(output_file, root_dir); - strcat(output_file, "/out"); - - strcat(output_file, fullpath + root_dir_len); - - char outdir[MAX_PATH]; - strcpy(outdir, output_file); - dirname(outdir); - if (create_multiple_paths(root_dir, outdir) != 0) - { - return 1; - } - } - } - - char fullpath[260]; - realpath(argv[i], fullpath); - compile_one_file(fullpath, &options, output_file, argc, argv, report); - } - - - clock_t end_clock = clock(); - double cpu_time_used = ((double)(end_clock - begin_clock)) / CLOCKS_PER_SEC; - report->no_files = no_files; - report->cpu_time_used_sec = cpu_time_used; - return 0; + struct options options = { 0 }; + if (fill_options(&options, argc, argv) != 0) + { + return 1; + } + + clock_t begin_clock = clock(); + int no_files = 0; + + char root_dir[MYMAX_PATH]; + root_dir[0] = '\0'; + + if (!options.no_output) + { + longest_common_path(argc, argv, root_dir); + } + + const int root_dir_len = strlen(root_dir); + + /*second loop to compile each file*/ + for (int i = 1; i < argc; i++) + { + if (argv[i][0] == '-') + continue; + no_files++; + char output_file[MYMAX_PATH]; + output_file[0] = '\0'; + + if (!options.no_output) + { + if (no_files == 1 && options.output[0] != '\0') + { + /* + -o outputname + works when we compile just one file + */ + strcat(output_file, options.output); + } + else + { + char fullpath[MYMAX_PATH]; + if(!realpath(argv[i], fullpath)) + fullpath[0] = '\0'; + + strcpy(output_file, root_dir); + strcat(output_file, "/out"); + + strcat(output_file, fullpath + root_dir_len); + + char outdir[MYMAX_PATH]; + strcpy(outdir, output_file); + dirname(outdir); + if (create_multiple_paths(root_dir, outdir) != 0) + { + return 1; + } + } + } + + char fullpath[MYMAX_PATH]; + if(!realpath(argv[i], fullpath)) + fullpath[0] = '\0'; + compile_one_file(fullpath, &options, output_file, argc, argv, report); + } + + + clock_t end_clock = clock(); + double cpu_time_used = ((double) (end_clock - begin_clock)) / CLOCKS_PER_SEC; + report->no_files = no_files; + report->cpu_time_used_sec = cpu_time_used; + return 0; } struct ast get_ast(struct options* options, - const char* filename, - const char* source, - struct report* report) + const char* filename, + const char* source, + struct report* report) { - struct ast ast = { 0 }; - struct tokenizer_ctx tctx = { 0 }; + struct ast ast = { 0 }; + struct tokenizer_ctx tctx = { 0 }; - struct token_list list = tokenizer(&tctx, source, filename, 0, TK_FLAG_NONE); + struct token_list list = tokenizer(&tctx, source, filename, 0, TK_FLAG_NONE); - struct preprocessor_ctx prectx = { 0 }; - prectx.options = *options; - prectx.macros.capacity = 5000; + struct preprocessor_ctx prectx = { 0 }; + prectx.options = *options; + prectx.macros.capacity = 5000; - add_standard_macros(&prectx); + add_standard_macros(&prectx); - ast.token_list = preprocessor(&prectx, &list, 0); + ast.token_list = preprocessor(&prectx, &list, 0); - if (prectx.n_errors == 0) - { - struct parser_ctx ctx = { 0 }; - ctx.options = *options; - ctx.p_report = report; - ast.declaration_list = parse(&ctx, &ast.token_list); - parser_ctx_destroy(&ctx); - } + if (prectx.n_errors == 0) + { + struct parser_ctx ctx = { 0 }; + ctx.options = *options; + ctx.p_report = report; + ast.declaration_list = parse(&ctx, &ast.token_list); + parser_ctx_destroy(&ctx); + } - token_list_destroy(&list); - preprocessor_ctx_destroy(&prectx); + token_list_destroy(&list); + preprocessor_ctx_destroy(&prectx); - return ast; + return ast; } /* @@ -7020,220 +6970,220 @@ struct ast get_ast(struct options* options, */ int strtoargv(char* s, int n, const char* argv[/*n*/]) { - int argvc = 0; - char* p = s; - while (*p) - { - while (*p == ' ') - p++; - if (*p == 0) - break; - argv[argvc] = p; - argvc++; - while (*p != ' ' && *p != '\0') - p++; - if (*p == 0) - break; - *p = 0; - p++; - if (argvc >= n) - break;/*nao tem mais lugares*/ - } - return argvc; + int argvc = 0; + char* p = s; + while (*p) + { + while (*p == ' ') + p++; + if (*p == 0) + break; + argv[argvc] = p; + argvc++; + while (*p != ' ' && *p != '\0') + p++; + if (*p == 0) + break; + *p = 0; + p++; + if (argvc >= n) + break;/*nao tem mais lugares*/ + } + return argvc; } const char* owner compile_source(const char* pszoptions, const char* content, struct report* report) { - const char* argv[100] = { 0 }; - char string[200] = { 0 }; - snprintf(string, sizeof string, "exepath %s", pszoptions); + const char* argv[100] = { 0 }; + char string[200] = { 0 }; + snprintf(string, sizeof string, "exepath %s", pszoptions); - const int argc = strtoargv(string, 10, argv); + const int argc = strtoargv(string, 10, argv); - const char* owner s = NULL; + const char* owner s = NULL; - struct preprocessor_ctx prectx = { 0 }; - struct ast ast = { 0 }; - struct options options = { .input = LANGUAGE_CXX }; + struct preprocessor_ctx prectx = { 0 }; + struct ast ast = { 0 }; + struct options options = {.input = LANGUAGE_CXX}; - struct visit_ctx visit_ctx = { 0 }; - try - { - if (fill_options(&options, argc, argv) != 0) - { - throw; - } + struct visit_ctx visit_ctx = { 0 }; + try + { + if (fill_options(&options, argc, argv) != 0) + { + throw; + } - visit_ctx.target = options.target; - visit_ctx.hide_non_used_declarations = options.direct_compilation; - prectx.options = options; - add_standard_macros(&prectx); + visit_ctx.target = options.target; + visit_ctx.hide_non_used_declarations = options.direct_compilation; + prectx.options = options; + add_standard_macros(&prectx); - if (options.preprocess_only) - { - struct tokenizer_ctx tctx = { 0 }; - struct token_list tokens = tokenizer(&tctx, content, "c:/main.c", 0, TK_FLAG_NONE); + if (options.preprocess_only) + { + struct tokenizer_ctx tctx = { 0 }; + struct token_list tokens = tokenizer(&tctx, content, "c:/main.c", 0, TK_FLAG_NONE); - struct token_list token_list = preprocessor(&prectx, &tokens, 0); - if (prectx.n_errors == 0) - { - s = print_preprocessed_to_string2(token_list.head); - } + struct token_list token_list = preprocessor(&prectx, &tokens, 0); + if (prectx.n_errors == 0) + { + s = print_preprocessed_to_string2(token_list.head); + } - token_list_destroy(&tokens); - token_list_destroy(&token_list); - } - else - { + token_list_destroy(&tokens); + token_list_destroy(&token_list); + } + else + { - ast = get_ast(&options, "c:/main.c", content, report); - if (report->error_count > 0) throw; + ast = get_ast(&options, "c:/main.c", content, report); + if (report->error_count > 0) throw; - visit_ctx.ast = ast; - visit(&visit_ctx); + visit_ctx.ast = ast; + visit(&visit_ctx); - if (options.direct_compilation) - { - s = get_code_as_compiler_see(&visit_ctx.ast.token_list); - } - else - { - s = get_code_as_we_see(&visit_ctx.ast.token_list, options.remove_comments); - } - if (options.format_ouput) - { + if (options.direct_compilation) + { + s = get_code_as_compiler_see(&visit_ctx.ast.token_list); + } + else + { + s = get_code_as_we_see(&visit_ctx.ast.token_list, options.remove_comments); + } + if (options.format_ouput) + { - /*re-parser ouput and format*/ - const char* owner s2 = format_code(&options, s); - free((void* owner) s); - s = s2; - } + /*re-parser ouput and format*/ + const char* owner s2 = format_code(&options, s); + free((void* owner) s); + s = s2; + } - } - } - catch - { - } + } + } + catch + { + } - preprocessor_ctx_destroy(&prectx); - visit_ctx_destroy(&visit_ctx); - ast_destroy(&ast); + preprocessor_ctx_destroy(&prectx); + visit_ctx_destroy(&visit_ctx); + ast_destroy(&ast); - return s; + return s; } char* owner CompileText(const char* pszoptions, const char* content) { - /* - This function is called by the web playground - */ - printf(WHITE "Cake " CAKE_VERSION RESET "\n"); - struct report report = { 0 }; - return (char* owner) compile_source(pszoptions, content, &report); + /* + This function is called by the web playground + */ + printf(WHITE "Cake " CAKE_VERSION RESET "\n"); + struct report report = { 0 }; + return (char* owner) compile_source(pszoptions, content, &report); } void ast_destroy(struct ast* obj_owner ast) { - token_list_destroy(&ast->token_list); - declaration_list_destroy(&ast->declaration_list); + token_list_destroy(&ast->token_list); + declaration_list_destroy(&ast->declaration_list); } static bool is_all_upper(const char* text) { - const char* p = text; - while (*p) - { - if (*p != toupper(*p)) - { - return false; - } - p++; - } - return true; + const char* p = text; + while (*p) + { + if (*p != toupper(*p)) + { + return false; + } + p++; + } + return true; } static bool is_snake_case(const char* text) { - if (text == NULL) - return true; + if (text == NULL) + return true; - if (!(*text >= 'a' && *text <= 'z')) - { - return false; - } + if (!(*text >= 'a' && *text <= 'z')) + { + return false; + } - while (*text) - { - if ((*text >= 'a' && *text <= 'z') || - *text == '_' || - (*text >= '0' && *text <= '9')) + while (*text) + { + if ((*text >= 'a' && *text <= 'z') || + *text == '_' || + (*text >= '0' && *text <= '9')) - { - //ok - } - else - return false; - text++; - } + { + //ok + } + else + return false; + text++; + } - return true; + return true; } static bool is_camel_case(const char* text) { - if (text == NULL) - return true; + if (text == NULL) + return true; - if (!(*text >= 'a' && *text <= 'z')) - { - return false; - } + if (!(*text >= 'a' && *text <= 'z')) + { + return false; + } - while (*text) - { - if ((*text >= 'a' && *text <= 'z') || - (*text >= 'A' && *text <= 'Z') || - (*text >= '0' && *text <= '9')) - { - //ok - } - else - return false; - text++; - } + while (*text) + { + if ((*text >= 'a' && *text <= 'z') || + (*text >= 'A' && *text <= 'Z') || + (*text >= '0' && *text <= '9')) + { + //ok + } + else + return false; + text++; + } - return true; + return true; } static bool is_pascal_case(const char* text) { - if (text == NULL) - return true; + if (text == NULL) + return true; - if (!(text[0] >= 'A' && text[0] <= 'Z')) - { - /*first letter uppepr case*/ - return false; - } + if (!(text[0] >= 'A' && text[0] <= 'Z')) + { + /*first letter uppepr case*/ + return false; + } - while (*text) - { - if ((*text >= 'a' && *text <= 'z') || - (*text >= 'A' && *text <= 'Z') || - (*text >= '0' && *text <= '9')) - { - //ok - } - else - return false; - text++; - } + while (*text) + { + if ((*text >= 'a' && *text <= 'z') || + (*text >= 'A' && *text <= 'Z') || + (*text >= '0' && *text <= '9')) + { + //ok + } + else + return false; + text++; + } - return true; + return true; } /* @@ -7242,163 +7192,163 @@ static bool is_pascal_case(const char* text) */ void naming_convention_struct_tag(struct parser_ctx* ctx, struct token* token) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } - - if (ctx->options.style == STYLE_CAKE) - { - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for struct/union tags"); - } - } - else if (ctx->options.style == STYLE_MICROSOFT) - { - if (!is_pascal_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use camelCase for struct/union tags"); - } - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } + + if (ctx->options.style == STYLE_CAKE) + { + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for struct/union tags"); + } + } + else if (ctx->options.style == STYLE_MICROSOFT) + { + if (!is_pascal_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use camelCase for struct/union tags"); + } + } } void naming_convention_enum_tag(struct parser_ctx* ctx, struct token* token) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (ctx->options.style == STYLE_CAKE) - { - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for enum tags"); - } - } - else if (ctx->options.style == STYLE_MICROSOFT) - { - if (!is_pascal_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use PascalCase for enum tags"); - } - } + if (ctx->options.style == STYLE_CAKE) + { + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for enum tags"); + } + } + else if (ctx->options.style == STYLE_MICROSOFT) + { + if (!is_pascal_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use PascalCase for enum tags"); + } + } } void naming_convention_function(struct parser_ctx* ctx, struct token* token) { - if (token == NULL) - return; - - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } - - if (ctx->options.style == STYLE_CAKE) - { - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for functions"); - } - } - else if (ctx->options.style == STYLE_MICROSOFT) - { - if (!is_pascal_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use PascalCase for functions"); - } - } + if (token == NULL) + return; + + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } + + if (ctx->options.style == STYLE_CAKE) + { + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for functions"); + } + } + else if (ctx->options.style == STYLE_MICROSOFT) + { + if (!is_pascal_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use PascalCase for functions"); + } + } } void naming_convention_global_var(struct parser_ctx* ctx, struct token* token, struct type* type, enum storage_class_specifier_flags storage) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (!type_is_function_or_function_pointer(type)) - { - if (storage & STORAGE_SPECIFIER_STATIC) - { - if (token->lexeme[0] != 's' || token->lexeme[1] != '_') - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use prefix s_ for static global variables"); - } - } - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case global variables"); - } - } + if (!type_is_function_or_function_pointer(type)) + { + if (storage & STORAGE_SPECIFIER_STATIC) + { + if (token->lexeme[0] != 's' || token->lexeme[1] != '_') + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use prefix s_ for static global variables"); + } + } + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case global variables"); + } + } } void naming_convention_local_var(struct parser_ctx* ctx, struct token* token, struct type* type) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (ctx->options.style == STYLE_CAKE) - { - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for local variables"); - } - } - else if (ctx->options.style == STYLE_MICROSOFT) - { - if (!is_camel_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use camelCase for local variables"); - } - } + if (ctx->options.style == STYLE_CAKE) + { + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for local variables"); + } + } + else if (ctx->options.style == STYLE_MICROSOFT) + { + if (!is_camel_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use camelCase for local variables"); + } + } } void naming_convention_enumerator(struct parser_ctx* ctx, struct token* token) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (!is_all_upper(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use UPPERCASE for enumerators"); - } + if (!is_all_upper(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use UPPERCASE for enumerators"); + } } void naming_convention_struct_member(struct parser_ctx* ctx, struct token* token, struct type* type) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for struct members"); - } + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for struct members"); + } } void naming_convention_parameter(struct parser_ctx* ctx, struct token* token, struct type* type) { - if (!parser_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!parser_is_diagnostic_enabled(ctx, W_STYLE) || token->level != 0) + { + return; + } - if (!is_snake_case(token->lexeme)) - { - compiler_set_info_with_token(W_STYLE, ctx, token, "use snake_case for arguments"); - } + if (!is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(W_STYLE, ctx, token, "use snake_case for arguments"); + } } diff --git a/src/parser.h b/src/parser.h index 97ff5f46..3e594f99 100644 --- a/src/parser.h +++ b/src/parser.h @@ -20,12 +20,12 @@ struct scope int scope_level; struct hash_map tags; struct hash_map variables; - + struct scope* next; - struct scope* previous; + struct scope* previous; }; -void scope_destroy( struct scope* obj_owner p); +void scope_destroy(struct scope* obj_owner p); struct scope_list { @@ -42,8 +42,8 @@ struct report int error_count; int warnings_count; int info_count; - enum error last_error; - enum warning last_warning; + + enum diagnostic_id last_diagnostic_id; }; @@ -52,12 +52,12 @@ struct report struct parser_ctx { struct options options; - + /* file scope -> function params -> function -> inner scope */ struct scope_list scopes; - + /* * Points to the function we're in. Or null in file scope. */ @@ -81,12 +81,12 @@ struct parser_ctx bool evaluation_is_disabled; struct report* p_report; - + }; /////////////////////////////////////////////////////// -void parser_ctx_destroy( struct parser_ctx* obj_owner ctx); +void parser_ctx_destroy(struct parser_ctx* obj_owner ctx); struct token* parser_look_ahead(struct parser_ctx* ctx); @@ -105,9 +105,7 @@ void print_scope(struct scope_list* e); char* CompileText(const char* options, const char* content); -void compiler_set_error_with_token(enum error error, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...); -_Bool compiler_set_warning_with_token(enum warning w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...); -void compiler_set_info_with_token(enum warning w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...); +_Bool compiler_diagnostic_message(enum diagnostic_id w, struct parser_ctx* ctx, const struct token* p_token, const char* fmt, ...); int compile(int argc, const char** argv, struct report* error); @@ -131,7 +129,7 @@ struct declaration_specifier struct storage_class_specifier* owner storage_class_specifier; struct type_specifier_qualifier* owner type_specifier_qualifier; - + struct function_specifier* owner function_specifier; struct declaration_specifier* owner next; @@ -181,20 +179,20 @@ struct static_assert_declaration /* I am keeping the name static_assert_declaration but better is - + static_declaration: static_assert_declaration static_debug_declaration extension: - "static_debug" ( constant-expression ) ; - "static_debug" ( constant-expression , string-literal) ; + "static_debug" ( constant-expression ) ; + "static_debug" ( constant-expression , string-literal) ; */ - - struct token* first_token; - struct token* last_token; + + struct token* first_token; + struct token* last_token; struct expression* owner constant_expression; - struct token* string_literal_opt; + struct token* string_literal_opt; }; struct static_assert_declaration* owner static_assert_declaration(struct parser_ctx* ctx); void static_assert_declaration_delete(struct static_assert_declaration* owner p); @@ -214,7 +212,7 @@ struct attribute_specifier_sequence struct attribute_specifier* tail; }; struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt(struct parser_ctx* ctx); -void attribute_specifier_sequence_delete( struct attribute_specifier_sequence* owner p); +void attribute_specifier_sequence_delete(struct attribute_specifier_sequence* owner p); struct attribute_specifier { @@ -228,8 +226,8 @@ struct attribute_specifier struct attribute_specifier* owner next; }; -struct attribute_specifier* owner attribute_specifier(struct parser_ctx* ctx); -void attribute_specifier_delete( struct attribute_specifier* owner p); +struct attribute_specifier* owner attribute_specifier(struct parser_ctx* ctx); +void attribute_specifier_delete(struct attribute_specifier* owner p); struct attribute* owner attribute(struct parser_ctx* ctx); @@ -262,8 +260,8 @@ struct function_specifier */ struct token* token; }; -struct function_specifier* owner function_specifier(struct parser_ctx* ctx); -void function_specifier_delete(struct function_specifier* owner p); +struct function_specifier* owner function_specifier(struct parser_ctx* ctx); +void function_specifier_delete(struct function_specifier* owner p); struct typeof_specifier_argument { @@ -286,10 +284,10 @@ struct typeof_specifier */ struct token* first_token; struct token* last_token; - struct typeof_specifier_argument* owner typeof_specifier_argument; - struct type type; + struct typeof_specifier_argument* owner typeof_specifier_argument; + struct type type; }; -void typeof_specifier_delete(struct typeof_specifier * owner p); +void typeof_specifier_delete(struct typeof_specifier* owner p); struct type_specifier { @@ -319,14 +317,14 @@ struct type_specifier enum type_specifier_flags flags; struct token* token; struct struct_or_union_specifier* owner struct_or_union_specifier; - struct typeof_specifier* owner typeof_specifier; - struct enum_specifier* owner enum_specifier; - struct declarator* view typedef_declarator; + struct typeof_specifier* owner typeof_specifier; + struct enum_specifier* owner enum_specifier; + struct declarator* view typedef_declarator; struct atomic_type_specifier* owner atomic_type_specifier; }; -struct type_specifier* owner type_specifier(struct parser_ctx* ctx); -void type_specifier_delete(struct type_specifier* owner p); +struct type_specifier* owner type_specifier(struct parser_ctx* ctx); +void type_specifier_delete(struct type_specifier* owner p); struct init_declarator_list { @@ -336,13 +334,13 @@ struct init_declarator_list init-declarator-list , init-declarator */ struct init_declarator* owner head; - struct init_declarator* tail; + struct init_declarator* tail; }; struct init_declarator_list init_declarator_list(struct parser_ctx* ctx, struct declaration_specifiers* p_declaration_specifiers); -void init_declarator_list_destroy(struct init_declarator_list * obj_owner p); +void init_declarator_list_destroy(struct init_declarator_list* obj_owner p); struct declaration { @@ -354,23 +352,23 @@ struct declaration attribute-declaration */ struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt; - + struct static_assert_declaration* owner static_assert_declaration; - + struct declaration_specifiers* owner declaration_specifiers; struct init_declarator_list init_declarator_list; struct compound_statement* owner function_body; - struct declarator* contract_declarator; + struct declarator* contract_declarator; struct token* first_token; struct token* last_token; struct declaration* owner next; }; -void declaration_delete( struct declaration* owner p); -struct declaration* owner external_declaration(struct parser_ctx* ctx); +void declaration_delete(struct declaration* owner p); +struct declaration* owner external_declaration(struct parser_ctx* ctx); struct atomic_type_specifier { @@ -382,8 +380,8 @@ struct atomic_type_specifier struct type_name* owner type_name; }; -struct atomic_type_specifier* owner atomic_type_specifier(struct parser_ctx* ctx); -void atomic_type_specifier_delete(struct atomic_type_specifier* owner p); +struct atomic_type_specifier* owner atomic_type_specifier(struct parser_ctx* ctx); +void atomic_type_specifier_delete(struct atomic_type_specifier* owner p); struct enumerator_list { @@ -397,36 +395,36 @@ struct enumerator_list }; struct enumerator_list enumerator_list(struct parser_ctx* ctx, - const struct enum_specifier* p_enum_specifier - ); + const struct enum_specifier* p_enum_specifier +); + +void enumerator_list_destroy(struct enumerator_list* obj_owner p_enum_specifier); -void enumerator_list_destroy(struct enumerator_list* obj_owner p_enum_specifier); - struct enum_specifier { /* enum-type-specifier: : specifier-qualifier-lis - + enum-specifier: "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt { enumerator-list } "enum" attribute-specifier-sequence opt identifier opt enum-type-specifier opt { enumerator-list , } "enum" identifier enum-type-specifier opt */ - struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; - struct specifier_qualifier_list* owner specifier_qualifier_list; - + struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; + struct specifier_qualifier_list* owner specifier_qualifier_list; + struct enumerator_list enumerator_list; - + struct token* tag_token; struct token* first_token; /*points to the complete enum (can be self pointed)*/ struct enum_specifier* complete_enum_specifier; }; -struct enum_specifier* owner enum_specifier(struct parser_ctx*); -void enum_specifier_delete(struct enum_specifier* owner p); +struct enum_specifier* owner enum_specifier(struct parser_ctx*); +void enum_specifier_delete(struct enum_specifier* owner p); struct member_declaration_list { @@ -442,8 +440,8 @@ struct member_declaration_list struct member_declaration* tail; }; -struct member_declaration_list member_declaration_list(struct parser_ctx* ctx, const struct struct_or_union_specifier*); -void member_declaration_list_destroy(struct member_declaration_list * obj_owner p ); +struct member_declaration_list member_declaration_list(struct parser_ctx* ctx, struct struct_or_union_specifier*); +void member_declaration_list_destroy(struct member_declaration_list* obj_owner p); struct member_declarator* find_member_declarator(struct member_declaration_list* list, const char* name, int* p_member_index); @@ -456,10 +454,10 @@ struct struct_or_union_specifier */ struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; struct member_declaration_list member_declaration_list; - + struct token* first_token; struct token* last_token; - + bool is_owner; /* @@ -475,7 +473,7 @@ struct struct_or_union_specifier int scope_level; /*nivel escopo 0 global*/ int visit_moved; /*nivel escopo 0 global*/ - + /* * This points to the first struct_or_union_specifier that will have it´s * complete_struct_or_union_specifier_indirection pointing to the complete @@ -500,13 +498,13 @@ struct init_declarator struct declarator* owner p_declarator; struct initializer* owner initializer; - struct init_declarator* owner next; + struct init_declarator* owner next; }; -void init_declarator_delete(struct init_declarator* owner p); -struct init_declarator* owner init_declarator(struct parser_ctx* ctx, +void init_declarator_delete(struct init_declarator* owner p); +struct init_declarator* owner init_declarator(struct parser_ctx* ctx, struct declaration_specifiers* p_declaration_specifiers - ); +); struct initializer { @@ -516,11 +514,11 @@ struct initializer braced-initializer */ struct token* first_token; - struct designation* owner designation; /*auxiliar para list??*/ - struct braced_initializer* owner braced_initializer; - struct expression* owner assignment_expression; + struct designation* owner designation; /*auxiliar para list??*/ + struct braced_initializer* owner braced_initializer; + struct expression* owner assignment_expression; struct initializer* owner next; - + /* cake extension int * p = [[cake::move]] p2; @@ -544,24 +542,24 @@ struct declarator struct token* last_token; - struct pointer* owner pointer; - struct direct_declarator* owner direct_declarator; + struct pointer* owner pointer; + struct direct_declarator* owner direct_declarator; + - struct declaration_specifiers* view declaration_specifiers; const struct specifier_qualifier_list* view specifier_qualifier_list; struct token* name; //shortcut struct compound_statement* view function_body; - + int num_uses; /*used to show not used warnings*/ - + /*user by flow analysis*/ struct object object; /*final declarator type (after auto, typeof etc)*/ - struct type type; + struct type type; }; enum type_specifier_flags declarator_get_type_specifier_flags(const struct declarator* p); @@ -589,7 +587,7 @@ struct array_declarator struct expression* owner assignment_expression; struct expression* owner expression; struct type_qualifier_list* owner type_qualifier_list_opt; - + struct token* token; struct token* static_token_opt; }; @@ -609,7 +607,7 @@ struct function_declarator struct scope parameters_scope; //usado para escopo parametros struct parameter_type_list* owner parameter_type_list_opt; }; -void function_declarator_delete(struct function_declarator * owner p); +void function_declarator_delete(struct function_declarator* owner p); struct direct_declarator { @@ -624,17 +622,17 @@ struct direct_declarator struct declarator* owner declarator; struct array_declarator* owner array_declarator; struct function_declarator* owner function_declarator; - struct attribute_specifier_sequence * owner p_attribute_specifier_sequence_opt; + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt; }; void direct_declarator_delete(struct direct_declarator* owner p); -struct direct_declarator* owner direct_declarator(struct parser_ctx* ctx, +struct direct_declarator* owner direct_declarator(struct parser_ctx* ctx, const struct specifier_qualifier_list* specifier_qualifier_list, struct declaration_specifiers* declaration_specifiers, bool abstract_acceptable, struct token** pptoken_name - ); +); struct parameter_type_list { @@ -649,15 +647,15 @@ struct parameter_type_list struct parameter_list* owner parameter_list; }; -struct parameter_type_list* owner parameter_type_list(struct parser_ctx* ctx); -void parameter_type_list_delete(struct parameter_type_list* owner p); +struct parameter_type_list* owner parameter_type_list(struct parser_ctx* ctx); +void parameter_type_list_delete(struct parameter_type_list* owner p); struct pointer { /* pointer: * attribute-specifier-sequence opt type-qualifier-list opt - * attribute-specifier-sequence opt type-qualifier-list opt pointer + * attribute-specifier-sequence opt type-qualifier-list opt pointer */ struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; struct type_qualifier_list* owner type_qualifier_list_opt; @@ -665,8 +663,8 @@ struct pointer struct pointer* owner pointer; }; -struct pointer* owner pointer_opt(struct parser_ctx* ctx); -void pointer_delete(struct pointer* owner p); +struct pointer* owner pointer_opt(struct parser_ctx* ctx); +void pointer_delete(struct pointer* owner p); struct parameter_list { /* @@ -677,8 +675,8 @@ struct parameter_list struct parameter_declaration* owner head; struct parameter_declaration* tail; }; -struct parameter_list* owner parameter_list(struct parser_ctx* ctx); -void parameter_list_delete(struct parameter_list* owner p); +struct parameter_list* owner parameter_list(struct parser_ctx* ctx); +void parameter_list_delete(struct parameter_list* owner p); struct parameter_declaration { @@ -688,14 +686,14 @@ struct parameter_declaration attribute-specifier-sequence opt declaration-specifiers abstract-declarator opt */ struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; - + struct declaration_specifiers* owner declaration_specifiers; struct declarator* owner declarator; - struct token * implicit_token; + struct token* implicit_token; struct parameter_declaration* owner next; }; -struct parameter_declaration* owner parameter_declaration(struct parser_ctx* ctx); -void parameter_declaration_delete(struct parameter_declaration* owner p); +struct parameter_declaration* owner parameter_declaration(struct parser_ctx* ctx); +void parameter_declaration_delete(struct parameter_declaration* owner p); struct type_name @@ -712,12 +710,12 @@ struct type_name struct type type; }; -struct type_name* owner type_name(struct parser_ctx* ctx); -void type_name_delete(struct type_name* owner p); +struct type_name* owner type_name(struct parser_ctx* ctx); +void type_name_delete(struct type_name* owner p); void print_type_name(struct osstream* ss, struct type_name* p); struct argument_expression -{ +{ struct expression* owner expression; struct argument_expression* owner next; }; @@ -725,7 +723,7 @@ struct argument_expression void argument_expression_delete(struct argument_expression* owner p); struct braced_initializer -{ +{ /* { } { initializer-list } @@ -735,8 +733,8 @@ struct braced_initializer struct token* first_token; struct initializer_list* owner initializer_list; }; -struct braced_initializer* owner braced_initializer(struct parser_ctx* ctx); -void braced_initializer_delete(struct braced_initializer* owner p); +struct braced_initializer* owner braced_initializer(struct parser_ctx* ctx); +void braced_initializer_delete(struct braced_initializer* owner opt p); struct type_specifier_qualifier { @@ -753,8 +751,8 @@ struct type_specifier_qualifier struct type_specifier_qualifier* owner next; }; -struct type_specifier_qualifier* owner type_specifier_qualifier(struct parser_ctx* ctx); -void type_specifier_qualifier_delete(struct type_specifier_qualifier* owner p); +struct type_specifier_qualifier* owner type_specifier_qualifier(struct parser_ctx* ctx); +void type_specifier_qualifier_delete(struct type_specifier_qualifier* owner p); struct specifier_qualifier_list @@ -774,13 +772,13 @@ struct specifier_qualifier_list struct enum_specifier* view enum_specifier; struct typeof_specifier* view typeof_specifier; struct declarator* view typedef_declarator; - + struct type_specifier_qualifier* owner head; struct type_specifier_qualifier* tail; struct token* first_token; struct token* last_token; - struct attribute_specifier_sequence * owner p_attribute_specifier_sequence; + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence; }; @@ -797,12 +795,12 @@ struct alignment_specifier "alignas" ( type-name ) "alignas" ( constant-expression ) */ - struct type_name * owner type_name; - struct expression * owner constant_expression; + struct type_name* owner type_name; + struct expression* owner constant_expression; struct token* token; }; -struct alignment_specifier* owner alignment_specifier(struct parser_ctx* ctx); -void alignment_specifier_delete(struct alignment_specifier* owner p); +struct alignment_specifier* owner alignment_specifier(struct parser_ctx* ctx); +void alignment_specifier_delete(struct alignment_specifier* owner p); struct type_qualifier @@ -819,12 +817,12 @@ struct type_qualifier /* Next is used when inside struct type_qualifier_list - Not used when inside struct type_specifier_qualifier + Not used when inside struct type_specifier_qualifier */ struct type_qualifier* owner next; }; -struct type_qualifier* owner type_qualifier(struct parser_ctx* ctx); +struct type_qualifier* owner type_qualifier(struct parser_ctx* ctx); struct member_declaration { @@ -839,29 +837,29 @@ struct member_declaration struct static_assert_declaration* owner static_assert_declaration; struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt; struct member_declaration* owner next; - + }; -struct member_declaration* owner member_declaration(struct parser_ctx* ctx, struct struct_or_union_specifier*); -void member_declaration_delete(struct member_declaration* owner p); +struct member_declaration* owner member_declaration(struct parser_ctx* ctx, struct struct_or_union_specifier*); +void member_declaration_delete(struct member_declaration* owner p); struct member_declarator { - /* + /* member-declarator: declarator declarator opt : constant-expression */ - + struct declarator* owner declarator; struct expression* owner constant_expression; struct member_declarator* owner next; }; -void member_declarator_delete(struct member_declarator * owner p); +void member_declarator_delete(struct member_declarator* owner p); struct member_declarator_list { - /* + /* member-declarator-list: member-declarator member-declarator-list , member-declarator @@ -871,11 +869,11 @@ struct member_declarator_list struct member_declarator* tail; }; -struct member_declarator_list* owner member_declarator_list(struct parser_ctx* ctx, - struct struct_or_union_specifier* , +struct member_declarator_list* owner member_declarator_list(struct parser_ctx* ctx, + struct struct_or_union_specifier*, const struct specifier_qualifier_list* specifier_qualifier_list - ); -void member_declarator_list_delete(struct member_declarator_list* owner p); +); +void member_declarator_list_delete(struct member_declarator_list* owner opt p); struct block_item_list { @@ -889,7 +887,7 @@ struct block_item_list }; struct block_item_list block_item_list(struct parser_ctx* ctx); -void block_item_list_destroy( struct block_item_list * obj_owner p); +void block_item_list_destroy(struct block_item_list* obj_owner p); struct compound_statement { @@ -901,41 +899,44 @@ struct compound_statement struct token* last_token; /*}*/ struct block_item_list block_item_list; + + //flow analysys flags + struct diagnostic diagnostic_flags; }; -struct compound_statement* owner compound_statement(struct parser_ctx* ctx); -void compound_statement_delete( struct compound_statement* owner p); +struct compound_statement* owner compound_statement(struct parser_ctx* ctx); +void compound_statement_delete(struct compound_statement* owner p); struct defer_statement { /* defer-statement: (extension) - "defer" secondary-block + "defer" secondary-block */ struct token* first_token; struct token* last_token; struct secondary_block* owner secondary_block; }; -void defer_statement_delete(struct defer_statement * owner opt p); +void defer_statement_delete(struct defer_statement* owner opt p); struct try_statement -{ - /* - try-statement: (extension) - "try" secondary-block - "try" secondary-block "catch" secondary-block - */ +{ + /* + try-statement: (extension) + "try" secondary-block + "try" secondary-block "catch" secondary-block + */ struct secondary_block* owner secondary_block; struct secondary_block* owner catch_secondary_block_opt; struct token* first_token; /*try*/ struct token* last_token; - struct token* catch_token_opt; /*catch*/ + struct token* catch_token_opt; /*catch*/ /*Used to generate label names*/ int try_catch_block_index; }; -struct try_statement* owner try_statement(struct parser_ctx* ctx); -void try_statement_delete(struct try_statement* owner p); +struct try_statement* owner try_statement(struct parser_ctx* ctx); +void try_statement_delete(struct try_statement* owner p); struct selection_statement { @@ -956,10 +957,10 @@ struct selection_statement struct token* first_token; struct token* last_token; - struct token* else_token_opt; + struct token* else_token_opt; }; -struct selection_statement* owner selection_statement(struct parser_ctx* ctx); +struct selection_statement* owner selection_statement(struct parser_ctx* ctx); void selection_statement_delete(struct selection_statement* owner p); struct iteration_statement { @@ -971,7 +972,7 @@ struct iteration_statement "for" ( declaration expression opt ; expression opt ) secondary-block "repeat" secondary-block (extension) */ - + struct token* first_token; struct token* second_token; /*do {} while*/ @@ -979,11 +980,11 @@ struct iteration_statement struct expression* owner expression1; struct expression* owner expression2; struct expression* owner expression0; - struct declaration * owner declaration; + struct declaration* owner declaration; }; -struct iteration_statement* owner iteration_statement(struct parser_ctx* ctx); -void iteration_statement_delete(struct iteration_statement*owner p); +struct iteration_statement* owner iteration_statement(struct parser_ctx* ctx); +void iteration_statement_delete(struct iteration_statement* owner p); struct jump_statement { @@ -994,17 +995,17 @@ struct jump_statement "break" ; "return" expression opt ; */ - + struct token* label; struct token* first_token; struct token* last_token; struct expression* owner expression_opt; - + int try_catch_block_index; }; -struct jump_statement* owner jump_statement(struct parser_ctx* ctx); -void jump_statement_delete(struct jump_statement* owner p); +struct jump_statement* owner jump_statement(struct parser_ctx* ctx); +void jump_statement_delete(struct jump_statement* owner p); struct expression_statement { @@ -1013,13 +1014,13 @@ struct expression_statement expression opt; attribute-specifier-sequence expression ; */ - + struct attribute_specifier_sequence* owner p_attribute_specifier_sequence_opt; struct expression* owner expression_opt; }; -struct expression_statement* owner expression_statement(struct parser_ctx* ctx); -void expression_statement_delete(struct expression_statement* owner p); +struct expression_statement* owner expression_statement(struct parser_ctx* ctx); +void expression_statement_delete(struct expression_statement* owner p); struct block_item { @@ -1030,17 +1031,17 @@ struct block_item label */ struct token* first_token; //?necessary - struct declaration* owner declaration; + struct declaration* owner declaration; struct unlabeled_statement* owner unlabeled_statement; struct label* owner label; struct block_item* owner next; }; -struct block_item* owner block_item(struct parser_ctx* ctx); -void block_item_delete( struct block_item* owner p); +struct block_item* owner block_item(struct parser_ctx* ctx); +void block_item_delete(struct block_item* owner p); -struct compound_statement* owner function_body(struct parser_ctx* ctx); +struct compound_statement* owner function_body(struct parser_ctx* ctx); struct designator { @@ -1053,8 +1054,8 @@ struct designator struct token* token; struct designator* owner next; }; -struct designator* owner designator(struct parser_ctx* ctx); -void designator_delete(struct designator* owner p); +struct designator* owner designator(struct parser_ctx* ctx); +void designator_delete(struct designator* owner p); struct initializer_list { /* @@ -1067,8 +1068,8 @@ struct initializer_list struct initializer* tail; int size; }; -struct initializer_list* owner initializer_list(struct parser_ctx* ctx); -void initializer_list_delete(struct initializer_list* owner p); +struct initializer_list* owner initializer_list(struct parser_ctx* ctx); +void initializer_list_delete(struct initializer_list* owner p); struct primary_block { @@ -1080,7 +1081,7 @@ struct primary_block defer-statement (extension) try-statement (extension) */ - + struct compound_statement* owner compound_statement; struct selection_statement* owner selection_statement; struct iteration_statement* owner iteration_statement; @@ -1088,7 +1089,7 @@ struct primary_block struct try_statement* owner try_statement; }; -void primary_block_delete(struct primary_block * owner p); +void primary_block_delete(struct primary_block* owner p); struct secondary_block { @@ -1101,7 +1102,7 @@ struct secondary_block struct statement* owner statement; }; -void secondary_block_delete(struct secondary_block * owner opt p); +void secondary_block_delete(struct secondary_block* owner opt p); struct unlabeled_statement { @@ -1112,13 +1113,13 @@ struct unlabeled_statement attribute-specifier-sequence opt jump-statement */ - struct expression_statement* owner expression_statement; - struct primary_block* owner primary_block; - struct jump_statement* owner jump_statement; + struct expression_statement* owner expression_statement; + struct primary_block* owner primary_block; + struct jump_statement* owner jump_statement; }; struct unlabeled_statement* owner unlabeled_statement(struct parser_ctx* ctx); -void unlabeled_statement_delete( struct unlabeled_statement* owner p); +void unlabeled_statement_delete(struct unlabeled_statement* owner p); struct labeled_statement { @@ -1130,10 +1131,10 @@ struct labeled_statement struct statement* owner statement; }; struct labeled_statement* owner labeled_statement(struct parser_ctx* ctx); -void labeled_statement_delete(struct labeled_statement * owner p); +void labeled_statement_delete(struct labeled_statement* owner p); struct statement -{ +{ /* statement: labeled-statement @@ -1165,7 +1166,7 @@ struct designation designation: designator-list = */ - struct designator_list * owner designator_list; + struct designator_list* owner designator_list; struct token* token; }; struct designation* owner designation(struct parser_ctx* ctx); @@ -1200,7 +1201,7 @@ struct attribute struct attribute_argument_clause* owner attribute_argument_clause; struct attribute* owner next; }; -void attribute_delete(struct attribute * owner p); +void attribute_delete(struct attribute* owner p); struct attribute_list { @@ -1209,34 +1210,34 @@ struct attribute_list struct attribute* tail; }; struct attribute_list* owner attribute_list(struct parser_ctx* ctx); -void attribute_list_destroy( struct attribute_list* obj_owner p); +void attribute_list_destroy(struct attribute_list* obj_owner p); struct enumerator { /* enumeration-constant: identifier - + enumerator: enumeration-constant attribute-specifier-sequence opt enumeration-constant attribute-specifier-sequence opt = constant-expression */ - + struct token* token; struct attribute_specifier_sequence* owner attribute_specifier_sequence_opt; struct expression* owner constant_expression_opt; - + /* having the enum specifier we have better information about the type */ const struct enum_specifier* view enum_specifier; struct enumerator* owner next; - long long value; + long long value; }; -struct enumerator* owner enumerator(struct parser_ctx* ctx, const struct enum_specifier* p_enum_specifier, long long *p_enumerator_value); +struct enumerator* owner enumerator(struct parser_ctx* ctx, const struct enum_specifier* p_enum_specifier, long long* p_enumerator_value); void enumerator_delete(struct enumerator* owner p); struct attribute_argument_clause @@ -1245,7 +1246,7 @@ struct attribute_argument_clause attribute-argument-clause: ( balanced-token-sequence opt ) */ - struct balanced_token_sequence * owner p_balanced_token_sequence; + struct balanced_token_sequence* owner p_balanced_token_sequence; struct token* token; }; @@ -1256,7 +1257,7 @@ bool first_of_attribute(struct parser_ctx* ctx); struct balanced_token { - struct token * token; + struct token* token; struct balanced_token* owner next; }; @@ -1281,7 +1282,7 @@ struct declaration_list }; struct declaration_list translation_unit(struct parser_ctx* ctx); -void declaration_list_destroy( struct declaration_list* obj_owner list); +void declaration_list_destroy(struct declaration_list* obj_owner list); struct label { @@ -1296,7 +1297,7 @@ struct label }; struct label* owner label(struct parser_ctx* ctx); -void label_delete( struct label* owner p); +void label_delete(struct label* owner p); struct ast { @@ -1306,7 +1307,7 @@ struct ast struct ast get_ast(struct options* options, const char* filename, const char* source, struct report* report); -void ast_destroy( struct ast* obj_owner ast); +void ast_destroy(struct ast* obj_owner ast); struct type make_type_using_declarator(struct parser_ctx* ctx, struct declarator* pdeclarator); diff --git a/src/pre_expressions.c b/src/pre_expressions.c index 4a8dab65..ef269163 100644 --- a/src/pre_expressions.c +++ b/src/pre_expressions.c @@ -3,11 +3,9 @@ */ #include -#include -#include #include "tokenizer.h" #include "pre_expressions.h" -#include + #ifdef _WIN32 #include #endif @@ -17,7 +15,6 @@ #include #endif - /*contexto expressoes preprocessador*/ struct pre_expression_ctx { @@ -25,38 +22,35 @@ struct pre_expression_ctx long long value; }; - -static void pre_postfix_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_cast_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_multiplicative_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_additive_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_shift_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_and_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_exclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_inclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_logical_and_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_logical_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); -static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx); - - +static void pre_postfix_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_cast_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_multiplicative_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_unary_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_additive_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_shift_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_relational_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_equality_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_and_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_exclusive_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_inclusive_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_logical_and_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_logical_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_conditional_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); +static void pre_conditional_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx); /* -* preprocessor uses long long -*/ -static int ppnumber_to_longlong(struct token* token, long long* result) + * preprocessor uses long long + */ +static int ppnumber_to_longlong(struct token *token, long long *result) { /*copia removendo os separadores*/ - //um dos maiores buffer necessarios seria 128 bits binario... - //0xb1'1'1.... + // um dos maiores buffer necessarios seria 128 bits binario... + // 0xb1'1'1.... int c = 0; - char buffer[128 * 2 + 4] = { 0 }; - const char* s = token->lexeme; + char buffer[128 * 2 + 4] = {0}; + const char *s = token->lexeme; while (*s) { if (*s != '\'') @@ -70,27 +64,26 @@ static int ppnumber_to_longlong(struct token* token, long long* result) if (buffer[0] == '0' && buffer[1] == 'x') { - //hex + // hex *result = strtoll(buffer + 2, 0, 16); } else if (buffer[0] == '0' && - buffer[1] == 'b') + buffer[1] == 'b') { - //binario + // binario *result = strtoll(buffer + 2, 0, 2); } else if (buffer[0] == '0') { - //octal + // octal *result = strtoll(buffer, 0, 8); } else { - //decimal + // decimal *result = strtoll(buffer, 0, 10); } - return 0; } @@ -100,7 +93,7 @@ static int ppnumber_to_longlong(struct token* token, long long* result) into another so the head of the input list is the current. We could use the same concept here removing current. */ -static struct token* pre_match(struct preprocessor_ctx* ctx) +static struct token *pre_match(struct preprocessor_ctx *ctx) { ctx->current = ctx->current->next; @@ -112,7 +105,7 @@ static struct token* pre_match(struct preprocessor_ctx* ctx) return ctx->current; } -static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_primary_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* primary-expression: @@ -126,7 +119,7 @@ static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expre { if (ctx->current->type == TK_CHAR_CONSTANT) { - const char* p = ctx->current->lexeme + 1; + const char *p = ctx->current->lexeme + 1; ectx->value = 0; int count = 0; while (*p != '\'') @@ -136,7 +129,7 @@ static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expre count++; if (count > 4) { - preprocessor_set_warning_with_token(W_NONE, ctx, ctx->current, "character constant too long for its type"); + preprocessor_diagnostic_message(W_NOTE, ctx, ctx->current, "character constant too long for its type"); } } @@ -150,24 +143,24 @@ static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expre else if (ctx->current->type == '(') { pre_match(ctx); - pre_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (ctx->current && ctx->current->type != ')') { - preprocessor_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "expected )"); + preprocessor_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "expected )"); throw; } pre_match(ctx); } else { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, - ctx, - ctx->current, - "token '%s' is not valid in preprocessor expressions", - ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, + ctx, + ctx->current, + "token '%s' is not valid in preprocessor expressions", + ctx->current->lexeme); throw; - } } catch @@ -175,10 +168,7 @@ static void pre_primary_expression(struct preprocessor_ctx* ctx,struct pre_expre } } - - - -static void pre_postfix_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_postfix_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* postfix-expression: @@ -198,16 +188,16 @@ static void pre_postfix_expression(struct preprocessor_ctx* ctx,struct pre_expre */ try { - pre_primary_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_primary_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; } catch { } } - -static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_unary_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* unary-expression: @@ -225,25 +215,21 @@ static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_express { if (ctx->current->type == '++' || ctx->current->type == '--') { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, - ctx, - ctx->current, - "token '%s' is not valid in preprocessor expressions", - ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, + ctx, + ctx->current, + "token '%s' is not valid in preprocessor expressions", + ctx->current->lexeme); throw; } else if (ctx->current != NULL && - (ctx->current->type == '&' - || ctx->current->type == '*' - || ctx->current->type == '+' - || ctx->current->type == '-' - || ctx->current->type == '~' - || ctx->current->type == '!')) + (ctx->current->type == '&' || ctx->current->type == '*' || ctx->current->type == '+' || ctx->current->type == '-' || ctx->current->type == '~' || ctx->current->type == '!')) { enum token_type op = ctx->current->type; pre_match(ctx); - pre_cast_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_cast_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '!') ectx->value = !ectx->value; @@ -255,20 +241,20 @@ static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_express ectx->value = +ectx->value; else if (op == '*') { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); } else if (op == '&') { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); } else { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); } } - else + else { - pre_postfix_expression(ctx, ectx); + pre_postfix_expression(ctx, ectx); } } catch @@ -276,17 +262,17 @@ static void pre_unary_expression(struct preprocessor_ctx* ctx,struct pre_express } } -static void pre_cast_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_cast_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* cast-expression: unary-expression ( type-name ) cast-expression */ - pre_unary_expression(ctx, ectx); + pre_unary_expression(ctx, ectx); } -static void pre_multiplicative_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_multiplicative_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* multiplicative-expression: @@ -297,19 +283,21 @@ static void pre_multiplicative_expression(struct preprocessor_ctx* ctx,struct pr */ try { - pre_cast_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_cast_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '*' || + (ctx->current->type == '*' || ctx->current->type == '/' || ctx->current->type == '%')) { enum token_type op = ctx->current->type; pre_match(ctx); long long left_value = ectx->value; - pre_cast_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_cast_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '*') { @@ -330,7 +318,7 @@ static void pre_multiplicative_expression(struct preprocessor_ctx* ctx,struct pr } } -static void pre_additive_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_additive_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* additive-expression: @@ -340,23 +328,25 @@ static void pre_additive_expression(struct preprocessor_ctx* ctx,struct pre_expr */ try { - pre_multiplicative_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '+' || + (ctx->current->type == '+' || ctx->current->type == '-')) { enum token_type op = ctx->current->type; pre_match(ctx); if (ctx->current == NULL) { - preprocessor_set_error_with_token(C_UNEXPECTED_END_OF_FILE, ctx, ctx->current, "unexpected end of file"); + preprocessor_diagnostic_message(ERROR_UNEXPECTED_END_OF_FILE, ctx, ctx->current, "unexpected end of file"); throw; } long long left_value = ectx->value; - pre_multiplicative_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '+') { @@ -373,7 +363,7 @@ static void pre_additive_expression(struct preprocessor_ctx* ctx,struct pre_expr } } -static void pre_shift_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_shift_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* shift-expression: @@ -383,18 +373,20 @@ static void pre_shift_expression(struct preprocessor_ctx* ctx,struct pre_express */ try { - pre_additive_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_additive_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '>>' || + (ctx->current->type == '>>' || ctx->current->type == '<<')) { enum token_type op = ctx->current->type; pre_match(ctx); long long left_value = ectx->value; - pre_multiplicative_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '>>') { @@ -411,7 +403,7 @@ static void pre_shift_expression(struct preprocessor_ctx* ctx,struct pre_express } } -static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_relational_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* relational-expression: @@ -423,11 +415,12 @@ static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_ex */ try { - pre_shift_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_shift_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '>' || + (ctx->current->type == '>' || ctx->current->type == '<' || ctx->current->type == '>=' || ctx->current->type == '<=')) @@ -435,8 +428,9 @@ static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_ex enum token_type op = ctx->current->type; pre_match(ctx); long long left_value = ectx->value; - pre_shift_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_shift_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '>') { @@ -461,7 +455,7 @@ static void pre_relational_expression(struct preprocessor_ctx* ctx,struct pre_ex } } -static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_equality_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* equality-expression: @@ -481,18 +475,20 @@ static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expr */ try { - pre_relational_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_relational_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '==' || + (ctx->current->type == '==' || ctx->current->type == '!=')) { enum token_type op = ctx->current->type; pre_match(ctx); long long left_value = ectx->value; - pre_multiplicative_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; if (op == '==') { @@ -501,7 +497,7 @@ static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expr else if (op == '!=') { ectx->value = left_value != ectx->value; - } + } } } catch @@ -509,7 +505,7 @@ static void pre_equality_expression(struct preprocessor_ctx* ctx,struct pre_expr } } -static void pre_and_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_and_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* AND-expression: @@ -518,15 +514,17 @@ static void pre_and_expression(struct preprocessor_ctx* ctx,struct pre_expressio */ try { - pre_equality_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_equality_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '&')) + (ctx->current->type == '&')) { pre_match(ctx); long long left_value = ectx->value; - pre_equality_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_equality_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; ectx->value = left_value & ectx->value; } } @@ -535,7 +533,7 @@ static void pre_and_expression(struct preprocessor_ctx* ctx,struct pre_expressio } } -static void pre_exclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_exclusive_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* exclusive-OR-expression: @@ -545,16 +543,17 @@ static void pre_exclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_ try { pre_and_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; - while (ctx->current != NULL && - (ctx->current->type == '^')) + (ctx->current->type == '^')) { pre_match(ctx); long long left_value = ectx->value; - pre_and_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; ectx->value = left_value ^ ectx->value; } } @@ -563,7 +562,7 @@ static void pre_exclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_ } } -static void pre_inclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_inclusive_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* inclusive-OR-expression: @@ -573,15 +572,17 @@ static void pre_inclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_ try { pre_exclusive_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '|')) + (ctx->current->type == '|')) { pre_match(ctx); long long left_value = ectx->value; pre_exclusive_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; ectx->value = left_value | ectx->value; } @@ -591,7 +592,7 @@ static void pre_inclusive_or_expression(struct preprocessor_ctx* ctx,struct pre_ } } -static void pre_logical_and_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_logical_and_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* logical-AND-expression: @@ -601,15 +602,17 @@ static void pre_logical_and_expression(struct preprocessor_ctx* ctx,struct pre_e try { pre_inclusive_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '&&')) + (ctx->current->type == '&&')) { pre_match(ctx); long long left_value = ectx->value; - pre_inclusive_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_inclusive_or_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; ectx->value = left_value && ectx->value; } @@ -619,7 +622,7 @@ static void pre_logical_and_expression(struct preprocessor_ctx* ctx,struct pre_e } } -static void pre_logical_or_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_logical_or_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* logical-OR-expression: @@ -628,19 +631,20 @@ static void pre_logical_or_expression(struct preprocessor_ctx* ctx,struct pre_ex */ try { - pre_logical_and_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_logical_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; while (ctx->current != NULL && - (ctx->current->type == '||')) + (ctx->current->type == '||')) { pre_match(ctx); long long left_value = ectx->value; - pre_logical_and_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + pre_logical_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + throw; ectx->value = left_value || ectx->value; - } } catch @@ -648,30 +652,28 @@ static void pre_logical_or_expression(struct preprocessor_ctx* ctx,struct pre_ex } } - - -static void pre_assignment_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_assignment_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* assignment-expression: conditional-expression unary-expression assignment-operator assignment-expression */ - /* - assignment-operator: one of - = *= /= %= += -= <<= >>= &= ^= |= - */ - //aqui eh duvidoso mas conditional faz a unary tb. - //a diferenca q nao eh qualquer expressao - //que pode ser de atribuicao + /* + assignment-operator: one of + = *= /= %= += -= <<= >>= &= ^= |= + */ + // aqui eh duvidoso mas conditional faz a unary tb. + // a diferenca q nao eh qualquer expressao + // que pode ser de atribuicao try { pre_conditional_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; - while (ctx->current != NULL && - (ctx->current->type == '=' || + (ctx->current->type == '=' || ctx->current->type == '*=' || ctx->current->type == '/=' || ctx->current->type == '+=' || @@ -682,7 +684,7 @@ static void pre_assignment_expression(struct preprocessor_ctx* ctx,struct pre_ex ctx->current->type == '^=' || ctx->current->type == '|=')) { - preprocessor_set_error_with_token(C_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + preprocessor_diagnostic_message(ERROR_TOKEN_NOT_VALID_IN_PREPROCESSOR_EXPRESSIONS, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); throw; } } @@ -691,7 +693,7 @@ static void pre_assignment_expression(struct preprocessor_ctx* ctx,struct pre_ex } } -static void pre_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /*expression: assignment-expression @@ -700,13 +702,15 @@ static void pre_expression(struct preprocessor_ctx* ctx,struct pre_expression_ct try { pre_assignment_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; - + if (ctx->n_errors > 0) + throw; + while (ctx->current->type == ',') { pre_match(ctx); pre_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; } } catch @@ -714,9 +718,7 @@ static void pre_expression(struct preprocessor_ctx* ctx,struct pre_expression_ct } } - - -static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_expression_ctx* ectx) +static void pre_conditional_expression(struct preprocessor_ctx *ctx, struct pre_expression_ctx *ectx) { /* conditional-expression: @@ -726,7 +728,8 @@ static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_e try { pre_logical_or_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; if (ctx->current && ctx->current->type == '?') { @@ -734,22 +737,26 @@ static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_e if (ectx->value) { pre_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; pre_match(ctx); //: struct pre_expression_ctx temp = {0}; - pre_conditional_expression(ctx, &temp); - if (ctx->n_errors > 0) throw; + pre_conditional_expression(ctx, &temp); + if (ctx->n_errors > 0) + throw; } else { struct pre_expression_ctx temp = {0}; pre_expression(ctx, &temp); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; pre_match(ctx); //: pre_conditional_expression(ctx, ectx); - if (ctx->n_errors > 0) throw; + if (ctx->n_errors > 0) + throw; } } } @@ -758,11 +765,10 @@ static void pre_conditional_expression(struct preprocessor_ctx* ctx,struct pre_e } } -int pre_constant_expression(struct preprocessor_ctx* ctx,long long* pvalue) +int pre_constant_expression(struct preprocessor_ctx *ctx, long long *pvalue) { - struct pre_expression_ctx ectx = { 0 }; + struct pre_expression_ctx ectx = {0}; pre_conditional_expression(ctx, &ectx); *pvalue = ectx.value; return ctx->n_errors > 0; } - diff --git a/src/tests.c b/src/tests.c index c9c2317b..5507b926 100644 --- a/src/tests.c +++ b/src/tests.c @@ -3,921 +3,947 @@ #ifdef TEST + #include "parser.h" #include #include "unit_test.h" - +#define WARNING_FLAG(x) (1ULL << (x)) static bool compile_without_errors(bool flow_analysis, bool nullchecks, const char* src) { - struct options options = { .input = LANGUAGE_C99, .flow_analysis = flow_analysis, .null_checks = nullchecks }; - struct report report = { 0 }; - get_ast(&options, "source", src, &report); - return report.error_count == 0; + struct options options = { .input = LANGUAGE_C99, + .flow_analysis = flow_analysis, + .null_checks = nullchecks, + .diagnostic_stack[0] = default_diagnostic + }; + struct report report = { 0 }; + get_ast(&options, "source", src, &report); + return report.error_count == 0; } static bool compile_with_errors(bool flow_analysis, bool nullchecks, const char* src) { + struct options options = + { + .input = LANGUAGE_C99, + .flow_analysis = flow_analysis, + .null_checks = nullchecks, + .diagnostic_stack[0].warnings = ~0ULL + }; + struct report report = { 0 }; + get_ast(&options, "source", src, &report); + return report.error_count != 0; +} - struct options options = { .input = LANGUAGE_C99, .flow_analysis = flow_analysis, .null_checks = nullchecks }; - struct report report = { 0 }; - get_ast(&options, "source", src, &report); - return report.error_count != 0; +static bool compile_with_warnings(bool flow_analysis, bool nullchecks, const char* src) +{ + struct options options = + { + .input = LANGUAGE_C99, + .flow_analysis = flow_analysis, + .null_checks = nullchecks + }; + struct report report = { 0 }; + get_ast(&options, "source", src, &report); + return report.warnings_count != 0; } + void parser_specifier_test() { - const char* src = "long long long i;"; - assert(compile_with_errors(false, false, src)); + const char* src = "long long long i;"; + assert(compile_with_errors(false, false, src)); } void char_constants() { - const char* source - = - "#define TYPE_IS(e, T) _Generic(typeof(e), T : 1, default: 0)\n" - "\n" - "static_assert(U'ç' == 231);\n" - "static_assert(u'ç' == 231);\n" - "//static_assert('ç' == 231);\n" - "\n" - "static_assert(TYPE_IS('a', int));\n" - "static_assert(TYPE_IS(u8'a', unsigned char));\n" - "static_assert(TYPE_IS(u'a', unsigned short));\n" - "static_assert(TYPE_IS(U'a', unsigned int));"; + const char* source + = + "#define TYPE_IS(e, T) _Generic(typeof(e), T : 1, default: 0)\n" + "\n" + "static_assert(U'ç' == 231);\n" + "static_assert(u'ç' == 231);\n" + "//static_assert('ç' == 231);\n" + "\n" + "static_assert(TYPE_IS('a', int));\n" + "static_assert(TYPE_IS(u8'a', unsigned char));\n" + "static_assert(TYPE_IS(u'a', unsigned short));\n" + "static_assert(TYPE_IS(U'a', unsigned int));"; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void array_item_type_test() { - const char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "void (*pf[10])(void* val);\n" - "static_assert(_is_same(typeof(pf[0]), void (*)(void* val)));\n"; - assert(compile_without_errors(false, false, src)); + const char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "void (*pf[10])(void* val);\n" + "static_assert(_is_same(typeof(pf[0]), void (*)(void* val)));\n"; + assert(compile_without_errors(false, false, src)); } void take_address_type_test() { - const char* src = - "void F(char(*p)[10])" - "{" - " (*p)[0] = 'a';" - "}"; - assert(compile_without_errors(false, false, src)); + const char* src = + "void F(char(*p)[10])" + "{" + " (*p)[0] = 'a';" + "}"; + assert(compile_without_errors(false, false, src)); } void parser_scope_test() { - const char* src = "void f() {int i; char i;}"; - assert(compile_with_errors(false, false, src)); + const char* src = "void f() {int i; char i;}"; + assert(compile_with_errors(false, false, src)); } void parser_tag_test() { - //mudou tipo do tag no mesmo escopo - const char* src = "enum E { A }; struct E { int i; };"; - assert(compile_with_errors(false, false, src)); + //mudou tipo do tag no mesmo escopo + const char* src = "enum E { A }; struct E { int i; };"; + assert(compile_with_errors(false, false, src)); } void string_concatenation_test() { - const char* src = " const char* s = \"part1\" \"part2\";"; - assert(compile_without_errors(false, false, src)); + const char* src = " const char* s = \"part1\" \"part2\";"; + assert(compile_without_errors(false, false, src)); } void test_digit_separator() { - struct report report = { 0 }; - char* result = compile_source("-std=c99", "int i = 1'000;", &report); - assert(strcmp(result, "int i = 1000;") == 0); - free(result); + struct report report = { 0 }; + char* result = compile_source("-std=c99", "int i = 1'000;", &report); + assert(strcmp(result, "int i = 1000;") == 0); + free(result); } void test_lit() { - struct report report = { 0 }; - char* result = compile_source("-std=c99", "char * s = u8\"maçã\";", &report); - assert(strcmp(result, "char * s = \"ma\\xc3\\xa7\\xc3\\xa3\";") == 0); - free(result); + struct report report = { 0 }; + char* result = compile_source("-std=c99", "char * s = u8\"maçã\";", &report); + assert(strcmp(result, "char * s = \"ma\\xc3\\xa7\\xc3\\xa3\";") == 0); + free(result); } void type_test2() { - char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "int a[10];\n" - " static_assert(_is_same(typeof(&a) ,int (*)[10]));\n" - ; + char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "int a[10];\n" + " static_assert(_is_same(typeof(&a) ,int (*)[10]));\n" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void type_test3() { - char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "int i;" - "int (*f)(void);" - " static_assert(_is_same(typeof(&i), int *));" - " static_assert(_is_same(typeof(&f), int (**)(void)));" - ; + char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "int i;" + "int (*f)(void);" + " static_assert(_is_same(typeof(&i), int *));" + " static_assert(_is_same(typeof(&f), int (**)(void)));" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void crazy_decl() { - const char* src = - "void (*f(int i))(void)\n" - "{\n" - " i = 1; \n" - " return 0;\n" - "}\n"; + const char* src = + "void (*f(int i))(void)\n" + "{\n" + " i = 1; \n" + " return 0;\n" + "}\n"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void crazy_decl2() { - const char* src = - "void (*f(int i))(void)\n" - "{\n" - " i = 1; \n" - " return 0;\n" - "}\n" - "int main()\n" - "{\n" - " f(1);\n" - "}\n"; + const char* src = + "void (*f(int i))(void)\n" + "{\n" + " i = 1; \n" + " return 0;\n" + "}\n" + "int main()\n" + "{\n" + " f(1);\n" + "}\n"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void crazy_decl4() { - const char* src = - "void (*F(int a, int b))(void) { return 0; }\n" - "void (*(*PF)(int a, int b))(void) = F;\n" - "int main() {\n" - " PF(1, 2);\n" - "}\n"; + const char* src = + "void (*F(int a, int b))(void) { return 0; }\n" + "void (*(*PF)(int a, int b))(void) = F;\n" + "int main() {\n" + " PF(1, 2);\n" + "}\n"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void sizeof_not_evaluated() { - assert(compile_without_errors(false, false, "int i = sizeof(1/0);\n")); + assert(compile_without_errors(false, false, "int i = sizeof(1/0);\n")); } void sizeof_array_test() { - assert(compile_without_errors(false, - false, - "int main() {\n" - "int a[] = { 1, 2, 3 };\n" - "static_assert(sizeof(a) == sizeof(int) * 3);\n" - "}\n" - )); + assert(compile_without_errors(false, + false, + "int main() {\n" + "int a[] = { 1, 2, 3 };\n" + "static_assert(sizeof(a) == sizeof(int) * 3);\n" + "}\n" + )); } void sizeof_test() { - const char* src = - "static_assert(sizeof(\"ABC\") == 4);" - "char a[10];" - "char b[10][2];" - "static_assert(sizeof(a) == 10);" - "static_assert(sizeof(b) == sizeof(char)*10*2);" - "char *p[10];" - "static_assert(sizeof(p) == 40);" - "static_assert(sizeof(int) == 4);" - "static_assert(sizeof(long) == 4);" - "static_assert(sizeof(char) == 1);" - "static_assert(sizeof(short) == 4);" - "static_assert(sizeof(unsigned int) == 4);" - "static_assert(sizeof(void (*pf)(int i)) == sizeof(void*));" - ; + const char* src = + "static_assert(sizeof(\"ABC\") == 4);" + "char a[10];" + "char b[10][2];" + "static_assert(sizeof(a) == 10);" + "static_assert(sizeof(b) == sizeof(char)*10*2);" + "char *p[10];" + "static_assert(sizeof(p) == 40);" + "static_assert(sizeof(int) == 4);" + "static_assert(sizeof(long) == 4);" + "static_assert(sizeof(char) == 1);" + "static_assert(sizeof(short) == 4);" + "static_assert(sizeof(unsigned int) == 4);" + "static_assert(sizeof(void (*pf)(int i)) == sizeof(void*));" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void alignof_test() { - const char* src = - "struct X { char s; double c; char s2;};\n" - "static_assert(alignof(struct X) == 8);" - "static_assert(sizeof(struct X) == 24);" - ; + const char* src = + "struct X { char s; double c; char s2;};\n" + "static_assert(alignof(struct X) == 8);" + "static_assert(sizeof(struct X) == 24);" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void indirection_struct_size() { - const char* src = - "typedef struct X X;\n" - "struct X {\n" - " void* data;\n" - "};\n" - "static_assert(sizeof(X) == sizeof(void*));" - ; + const char* src = + "typedef struct X X;\n" + "struct X {\n" + " void* data;\n" + "};\n" + "static_assert(sizeof(X) == sizeof(void*));" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void traits_test() { - //https://en.cppreference.com/w/cpp/header/type_traits - const char* src = - "void (*F)();\n" - "static_assert(_is_pointer(F));\n" - "static_assert(_is_integral(1));\n" - "int a[2];\n" - "static_assert(_is_array(a));\n" - "int((a2))[10];\n" - "static_assert(_is_array(a2));" - ; - assert(compile_without_errors(false, false, src)); + //https://en.cppreference.com/w/cpp/header/type_traits + const char* src = + "void (*F)();\n" + "static_assert(_is_pointer(F));\n" + "static_assert(_is_integral(1));\n" + "int a[2];\n" + "static_assert(_is_array(a));\n" + "int((a2))[10];\n" + "static_assert(_is_array(a2));" + ; + assert(compile_without_errors(false, false, src)); } void comp_error1() { - const char* src = - "void F() {\n" - " char* z;\n" - " *z-- = '\\0';\n" - "}\n"; + const char* src = + "void F() {\n" + " char* z;\n" + " *z-- = '\\0';\n" + "}\n"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void array_size() { - const char* src = - "void (*f[2][3])(int i);\n" - "int main() {\n" - "static_assert(sizeof(void (*[2])(int i)) == sizeof(void*) * 2);\n" - "static_assert(sizeof(f) == sizeof(void (*[2])(int i)) * 3);\n" - "}" - ; + const char* src = + "void (*f[2][3])(int i);\n" + "int main() {\n" + "static_assert(sizeof(void (*[2])(int i)) == sizeof(void*) * 2);\n" + "static_assert(sizeof(f) == sizeof(void (*[2])(int i)) * 3);\n" + "}" + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void expr_type() { - const char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "static_assert(_is_same(typeof(1 + 2.0), double));"; + const char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "static_assert(_is_same(typeof(1 + 2.0), double));"; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); } void expand_test() { - char* src = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "typedef int A[2];" - "typedef A *B [1];" - "static_assert(_is_same(typeof(B), int (*[1])[2]));"; - ; + char* src = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "typedef int A[2];" + "typedef A *B [1];" + "static_assert(_is_same(typeof(B), int (*[1])[2]));"; + ; - assert(compile_without_errors(false, false, src)); + assert(compile_without_errors(false, false, src)); - //https://godbolt.org/z/WbK9zP7zM + //https://godbolt.org/z/WbK9zP7zM } void expand_test2() { - const char* source - = - "\n" - "\n" - "typedef char* A;\n" - "typedef const A* B; \n" - "static_assert(_Generic(typeof(B), char * const * : 1));\n" - "\n" - "typedef const int T;\n" - "T i;\n" - "static_assert(_Generic(typeof(i), const int : 1));\n" - "\n" - "const T i2;\n" - "static_assert(_Generic(typeof(i2), const int : 1));\n" - "\n" - "typedef int T3;\n" - "const T3 i3;\n" - "static_assert(_Generic(typeof(i3), const int : 1));\n" - ""; + const char* source + = + "\n" + "\n" + "typedef char* A;\n" + "typedef const A* B; \n" + "static_assert(_Generic(typeof(B), char * const * : 1));\n" + "\n" + "typedef const int T;\n" + "T i;\n" + "static_assert(_Generic(typeof(i), const int : 1));\n" + "\n" + "const T i2;\n" + "static_assert(_Generic(typeof(i2), const int : 1));\n" + "\n" + "typedef int T3;\n" + "const T3 i3;\n" + "static_assert(_Generic(typeof(i3), const int : 1));\n" + ""; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); - //https://godbolt.org/z/WbK9zP7zM + //https://godbolt.org/z/WbK9zP7zM } void expand_test3() { - char* src3 = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "typedef char* T1;" - "typedef T1(*f[3])(int); " - "static_assert(_is_same(typeof(f), char* (* [3])(int)));"; + char* src3 = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "typedef char* T1;" + "typedef T1(*f[3])(int); " + "static_assert(_is_same(typeof(f), char* (* [3])(int)));"; - assert(compile_without_errors(false, false, src3)); + assert(compile_without_errors(false, false, src3)); - //https://godbolt.org/z/WbK9zP7zM + //https://godbolt.org/z/WbK9zP7zM } void bigtest() { - const char* str = - "\n" - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "\n" - "struct X { int i; };\n" - "\n" - "struct Y { double d;};\n" - "\n" - "enum E { A = 1 };\n" - "enum E e1;\n" - "\n" - "struct X* F() { return 0; }\n" - "\n" - "int main()\n" - "{\n" - " enum E { B } e2;\n" - " static_assert(_is_same(typeof(e2), enum E));\n" - "\n" - " static_assert(!_is_same(typeof(e2), typeof(e1)));\n" - "\n" - "\n" - " struct X x;\n" - " struct Y y;\n" - "\n" - " static_assert(_is_same(typeof(x), struct X));\n" - " static_assert(!_is_same(typeof(x), struct Y));\n" - "\n" - " static_assert(!_is_same(int(double), int()));\n" - "\n" - " int aa[10];\n" - "\n" - " static_assert(_is_same(typeof(*F()), struct X));\n" - " static_assert(_is_same(typeof(&aa), int(*)[10]));\n" - "\n" - " int* p = 0;\n" - " static_assert(_is_same(typeof(*(p + 1)), int));\n" - "\n" - " static_assert(_is_same(typeof(1), int));\n" - "\n" - " static_assert(_is_same(typeof(main), int()));\n" - "\n" - "\n" - " static_assert(!_is_same(typeof(main), int(double)));\n" - " static_assert(!_is_same(typeof(main), int));\n" - "\n" - "\n" - " struct X x2;\n" - " enum E e;\n" - " static_assert(_is_same(typeof(e), enum E));\n" - " static_assert(_is_same(typeof(x2), struct X));\n" - " static_assert(!_is_same(typeof(e), struct X));\n" - "\n" - "\n" - "\n" - " static_assert(_is_same(typeof(1L), long));\n" - " static_assert(_is_same(typeof(1UL) , unsigned long));\n" - " static_assert(_is_same(typeof(1ULL), unsigned long long));\n" - " \n" - " //static_assert(_is_same(typeof(A), int));\n" - "\n" - " static_assert(_is_same(typeof(1.0), double));\n" - " static_assert(_is_same(typeof(1.0f), float));\n" - " static_assert(_is_same(typeof(1.0L), long double));\n" - " \n" - " \n" - " static_assert(_is_same(typeof(((int*)0) + 1), int*));\n" - " static_assert(_is_same(typeof(*(((int*)0) + 1)), int));\n" - "\n" - "}\n" - "\n" - "\n" - ; - assert(compile_without_errors(false, false, str)); + const char* str = + "\n" + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "\n" + "struct X { int i; };\n" + "\n" + "struct Y { double d;};\n" + "\n" + "enum E { A = 1 };\n" + "enum E e1;\n" + "\n" + "struct X* F() { return 0; }\n" + "\n" + "int main()\n" + "{\n" + " enum E { B } e2;\n" + " static_assert(_is_same(typeof(e2), enum E));\n" + "\n" + " static_assert(!_is_same(typeof(e2), typeof(e1)));\n" + "\n" + "\n" + " struct X x;\n" + " struct Y y;\n" + "\n" + " static_assert(_is_same(typeof(x), struct X));\n" + " static_assert(!_is_same(typeof(x), struct Y));\n" + "\n" + " static_assert(!_is_same(int(double), int()));\n" + "\n" + " int aa[10];\n" + "\n" + " static_assert(_is_same(typeof(*F()), struct X));\n" + " static_assert(_is_same(typeof(&aa), int(*)[10]));\n" + "\n" + " int* p = 0;\n" + " static_assert(_is_same(typeof(*(p + 1)), int));\n" + "\n" + " static_assert(_is_same(typeof(1), int));\n" + "\n" + " static_assert(_is_same(typeof(main), int()));\n" + "\n" + "\n" + " static_assert(!_is_same(typeof(main), int(double)));\n" + " static_assert(!_is_same(typeof(main), int));\n" + "\n" + "\n" + " struct X x2;\n" + " enum E e;\n" + " static_assert(_is_same(typeof(e), enum E));\n" + " static_assert(_is_same(typeof(x2), struct X));\n" + " static_assert(!_is_same(typeof(e), struct X));\n" + "\n" + "\n" + "\n" + " static_assert(_is_same(typeof(1L), long));\n" + " static_assert(_is_same(typeof(1UL) , unsigned long));\n" + " static_assert(_is_same(typeof(1ULL), unsigned long long));\n" + " \n" + " //static_assert(_is_same(typeof(A), int));\n" + "\n" + " static_assert(_is_same(typeof(1.0), double));\n" + " static_assert(_is_same(typeof(1.0f), float));\n" + " static_assert(_is_same(typeof(1.0L), long double));\n" + " \n" + " \n" + " static_assert(_is_same(typeof(((int*)0) + 1), int*));\n" + " static_assert(_is_same(typeof(*(((int*)0) + 1)), int));\n" + "\n" + "}\n" + "\n" + "\n" + ; + assert(compile_without_errors(false, false, str)); } void literal_string_type() { - const char* source = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - " static_assert(_is_same(typeof(\"A\"), char [2]));\n" - " static_assert(_is_same(typeof(\"AB\"), char [3]));\n" - ; + const char* source = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + " static_assert(_is_same(typeof(\"A\"), char [2]));\n" + " static_assert(_is_same(typeof(\"AB\"), char [3]));\n" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void digit_separator_test() { - const char* source = - "static_assert(1'00'00 == 10000);" - ; + const char* source = + "static_assert(1'00'00 == 10000);" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void numbers_test() { - const char* source = - "#if 0xA1 == 161\n" - "_Static_assert(0xA1 == 161); \n" - "#endif" - ; + const char* source = + "#if 0xA1 == 161\n" + "_Static_assert(0xA1 == 161); \n" + "#endif" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void binary_digits_test() { - const char* source = - "_Static_assert(0b101010 == 42);" - "_Static_assert(0b1010'10 == 42);" - "_Static_assert(052 == 42);" - ; + const char* source = + "_Static_assert(0b101010 == 42);" + "_Static_assert(0b1010'10 == 42);" + "_Static_assert(052 == 42);" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void type_suffix_test() { - const char* source = - "\n" - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "\n" - "static_assert(_is_same(typeof(1), int));\n" - "static_assert(_is_same(typeof(1L), long));\n" - "static_assert(_is_same(typeof(1LL), long long));\n" - "static_assert(_is_same(typeof(1U), unsigned int));\n" - "static_assert(_is_same(typeof(1ULL), unsigned long long));\n" - "static_assert(_is_same(typeof(1), int));\n" - "static_assert(_is_same(typeof(1l), long));\n" - "static_assert(_is_same(typeof(1ll), long long) );\n" - "static_assert(_is_same(typeof(1u), unsigned int));\n" - "static_assert(_is_same(typeof(1ull), unsigned long long));\n" - "static_assert(_is_same(typeof(0x1), int));\n" - "static_assert(_is_same(typeof(0x1L), long));\n" - "static_assert(_is_same(typeof(0x1LL), long long));\n" - "static_assert(_is_same(typeof(0x1U), unsigned int));\n" - "static_assert(_is_same(typeof(0x1ULL), unsigned long long)); \n" - "static_assert(_is_same(typeof(0x1), int));\n" - "static_assert(_is_same(typeof(0x1l), long));\n" - "static_assert(_is_same(typeof(0x1ll), long long));\n" - "static_assert(_is_same(typeof(0x1u), unsigned int));\n" - "static_assert(_is_same(typeof(0x1ull), unsigned long long));\n" - "static_assert(_is_same(typeof(0b1), int));\n" - "static_assert(_is_same(typeof(0b1L), long));\n" - "static_assert(_is_same(typeof(0b1LL), long long));\n" - "static_assert(_is_same(typeof(0b1U), unsigned int));\n" - "static_assert(_is_same(typeof(0b1ULL), unsigned long long));\n" - "static_assert(_is_same(typeof(0b1l), long));\n" - "static_assert(_is_same(typeof(0b1ll), long long));\n" - "static_assert(_is_same(typeof(0b1ul), unsigned long));\n" - "static_assert(_is_same(typeof(0b1ull), unsigned long long));\n" - "static_assert(_is_same(typeof(1.0f), float));\n" - "static_assert(_is_same(typeof(1.0), double));\n" - "static_assert(_is_same(typeof(1.0L), long double));\n" - ; - - - assert(compile_without_errors(false, false, source)); + const char* source = + "\n" + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "\n" + "static_assert(_is_same(typeof(1), int));\n" + "static_assert(_is_same(typeof(1L), long));\n" + "static_assert(_is_same(typeof(1LL), long long));\n" + "static_assert(_is_same(typeof(1U), unsigned int));\n" + "static_assert(_is_same(typeof(1ULL), unsigned long long));\n" + "static_assert(_is_same(typeof(1), int));\n" + "static_assert(_is_same(typeof(1l), long));\n" + "static_assert(_is_same(typeof(1ll), long long) );\n" + "static_assert(_is_same(typeof(1u), unsigned int));\n" + "static_assert(_is_same(typeof(1ull), unsigned long long));\n" + "static_assert(_is_same(typeof(0x1), int));\n" + "static_assert(_is_same(typeof(0x1L), long));\n" + "static_assert(_is_same(typeof(0x1LL), long long));\n" + "static_assert(_is_same(typeof(0x1U), unsigned int));\n" + "static_assert(_is_same(typeof(0x1ULL), unsigned long long)); \n" + "static_assert(_is_same(typeof(0x1), int));\n" + "static_assert(_is_same(typeof(0x1l), long));\n" + "static_assert(_is_same(typeof(0x1ll), long long));\n" + "static_assert(_is_same(typeof(0x1u), unsigned int));\n" + "static_assert(_is_same(typeof(0x1ull), unsigned long long));\n" + "static_assert(_is_same(typeof(0b1), int));\n" + "static_assert(_is_same(typeof(0b1L), long));\n" + "static_assert(_is_same(typeof(0b1LL), long long));\n" + "static_assert(_is_same(typeof(0b1U), unsigned int));\n" + "static_assert(_is_same(typeof(0b1ULL), unsigned long long));\n" + "static_assert(_is_same(typeof(0b1l), long));\n" + "static_assert(_is_same(typeof(0b1ll), long long));\n" + "static_assert(_is_same(typeof(0b1ul), unsigned long));\n" + "static_assert(_is_same(typeof(0b1ull), unsigned long long));\n" + "static_assert(_is_same(typeof(1.0f), float));\n" + "static_assert(_is_same(typeof(1.0), double));\n" + "static_assert(_is_same(typeof(1.0L), long double));\n" + ; + + + assert(compile_without_errors(false, false, source)); } void type_test() { - const char* source = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "int * p = 0;" - "static_assert(_is_same( typeof( *(p + 1) ), int) );" - ; + const char* source = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "int * p = 0;" + "static_assert(_is_same( typeof( *(p + 1) ), int) );" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void is_pointer_test() { - const char* source = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - "\n" - "int main()\n" - "{\n" - " int i;\n" - " static_assert(_is_integral(i));\n" - " static_assert(_is_floating_point(double) && _is_floating_point(float));\n" - " static_assert(_is_function(main));\n" - "\n" - " char * p;\n" - " static_assert(_is_scalar(p));\n" - " static_assert(_is_scalar(nullptr));\n" - "\n" - " int a[10];\n" - " static_assert(_is_array(a));\n" - "\n" - " /*pf = pointer to function (void) returning array 10 of int*/\n" - " int (*pf)(void)[10];\n" - " static_assert(!_is_array(pf));\n" - " static_assert(_is_pointer(pf));\n" - "\n" - " static_assert(_is_same(int, typeof(i)));\n" - "\n" - " static_assert(_is_const(const int));\n" - " static_assert(!_is_const(const int*));\n" - " static_assert(_is_const(int* const));\n" - "\n" - "}\n" - ; - assert(compile_without_errors(false, false, source)); + const char* source = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + "\n" + "int main()\n" + "{\n" + " int i;\n" + " static_assert(_is_integral(i));\n" + " static_assert(_is_floating_point(double) && _is_floating_point(float));\n" + " static_assert(_is_function(main));\n" + "\n" + " char * p;\n" + " static_assert(_is_scalar(p));\n" + " static_assert(_is_scalar(nullptr));\n" + "\n" + " int a[10];\n" + " static_assert(_is_array(a));\n" + "\n" + " /*pf = pointer to function (void) returning array 10 of int*/\n" + " int (*pf)(void)[10];\n" + " static_assert(!_is_array(pf));\n" + " static_assert(_is_pointer(pf));\n" + "\n" + " static_assert(_is_same(int, typeof(i)));\n" + "\n" + " static_assert(_is_const(const int));\n" + " static_assert(!_is_const(const int*));\n" + " static_assert(_is_const(int* const));\n" + "\n" + "}\n" + ; + assert(compile_without_errors(false, false, source)); } void params_test() { - const char* source = - "void f1();" - "void f2(void);" - "void f3(char * s, ...);" - "int main()" - "{" - " f1();" - " f2();" - " f3(\"\");" - " f3(\"\", 1, 2, 3);" - "}" - ; + const char* source = + "void f1();" + "void f2(void);" + "void f3(char * s, ...);" + "int main()" + "{" + " f1();" + " f2();" + " f3(\"\");" + " f3(\"\", 1, 2, 3);" + "}" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void test_compiler_constant_expression() { - const char* source = - "int main()" - "{" - " static_assert('ab' == 'a'*256+'b');\n" - " static_assert(sizeof(char) == 1);\n" - " static_assert(true == 1);\n" - " static_assert(false == 0);\n" - "}" - ; + const char* source = + "int main()" + "{" + " static_assert('ab' == 'a'*256+'b');\n" + " static_assert(sizeof(char) == 1);\n" + " static_assert(true == 1);\n" + " static_assert(false == 0);\n" + "}" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void zerodiv() { - const char* source = - "int main()" - "{" - " int a = 2/0;\n" - "}" - ; + const char* source + = + "int main()\n" + "{\n" + " int a = 2/0;\n" + "#pragma cake diagnostic check \"-Wdiv-by-zero\"\n" + "}\n" + ""; - assert(compile_with_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void function_result_test() { - const char* source = - "int (*(*F1)(void))(int, int*);\n" - "int (* F2(void) )(int, int*);\n" - "static_assert(_Generic(F1(), int (*)(int, int*) : 1));\n" - "static_assert(_Generic(F2(), int (*)(int, int*) : 1));\n" - ; + const char* source = + "int (*(*F1)(void))(int, int*);\n" + "int (* F2(void) )(int, int*);\n" + "static_assert(_Generic(F1(), int (*)(int, int*) : 1));\n" + "static_assert(_Generic(F2(), int (*)(int, int*) : 1));\n" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void type_normalization() { - const char* source = - "char ((a1));\n" - "char b1;\n" - "static_assert((typeof(a1)) == (typeof(b1)));\n" - "\n" - "char ((a2))[2];\n" - "char b2[2];\n" - "static_assert((typeof(a2)) == (typeof(b2)));\n" - "\n" - "char ((a3))(int (a));\n" - "char (b3)(int a);\n" - "static_assert((typeof(a3)) == (typeof(b3)));\n" - ; + const char* source = + "char ((a1));\n" + "char b1;\n" + "static_assert((typeof(a1)) == (typeof(b1)));\n" + "\n" + "char ((a2))[2];\n" + "char b2[2];\n" + "static_assert((typeof(a2)) == (typeof(b2)));\n" + "\n" + "char ((a3))(int (a));\n" + "char (b3)(int a);\n" + "static_assert((typeof(a3)) == (typeof(b3)));\n" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void auto_test() { - const char* source = - "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" - " int main()\n" - " {\n" - " double const x = 78.9;\n" - " double y = 78.9;\n" - " auto q = x;\n" - " static_assert( (typeof(q)) == (double));\n" - " auto const p = &x;\n" - " static_assert( (typeof(p)) == (const double * const));\n" - " auto const r = &y;\n" - " static_assert( (typeof(r)) == (double * const));\n" - " auto s = \"test\";\n" - " static_assert(_is_same(typeof(s), char *));\n" - " }\n" - ; + const char* source = + "#define _is_same(T1, T2) _Generic(T1, T2 : 1, default: 0)\n" + " int main()\n" + " {\n" + " double const x = 78.9;\n" + " double y = 78.9;\n" + " auto q = x;\n" + " static_assert( (typeof(q)) == (double));\n" + " auto const p = &x;\n" + " static_assert( (typeof(p)) == (const double * const));\n" + " auto const r = &y;\n" + " static_assert( (typeof(r)) == (double * const));\n" + " auto s = \"test\";\n" + " static_assert(_is_same(typeof(s), char *));\n" + " }\n" + ; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void visit_test_auto_typeof() { - const char* source = "auto p2 = (typeof(int[2])*) 0;"; + const char* source = "auto p2 = (typeof(int[2])*) 0;"; - struct report report = { 0 }; - char* result = compile_source("-std=c99", source, &report); - assert(strcmp(result, "int (* p2)[2] = (int(*)[2]) 0;") == 0); - free(result); + struct report report = { 0 }; + char* result = compile_source("-std=c99", source, &report); + assert(strcmp(result, "int (* p2)[2] = (int(*)[2]) 0;") == 0); + free(result); } void enum_scope() { - const char* source = - "enum E { A = 1 };\n" - "int main()\n" - "{\n" - " enum E { B } e2; \n" - " static_assert( (typeof(e2)), (enum E) ); \n" - "}\n"; - assert(compile_without_errors(false, false, source)); + const char* source = + "enum E { A = 1 };\n" + "int main()\n" + "{\n" + " enum E { B } e2; \n" + " static_assert( (typeof(e2)), (enum E) ); \n" + "}\n"; + assert(compile_without_errors(false, false, source)); } void const_member() { - const char* source - = - "struct X {\n" - " int i;\n" - "};\n" - "void f() {\n" - " const struct X x = {0};\n" - " x.i = 1;\n" //error x.i is constant - "}\n" - ""; + const char* source + = + "struct X {\n" + " int i;\n" + "};\n" + "void f() {\n" + " const struct X x = {0};\n" + " x.i = 1;\n" //error x.i is constant + "}\n" + ""; - struct options options = { .input = LANGUAGE_C99 }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && - report.last_error == C_ASSIGNMENT_OF_READ_ONLY_OBJECT); + struct options options = { .input = LANGUAGE_C99 }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& + report.last_error == ERROR_ASSIGNMENT_OF_READ_ONLY_OBJECT*/); } void register_struct_member() { - const char* source - = - "struct X {\n" - " int i;\n" - "};\n" - "\n" - "int main() {\n" - " register struct X x = {0};\n" - " int * p = &x.i;\n" //error: address of register variable 'x' requested - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1); + const char* source + = + "struct X {\n" + " int i;\n" + "};\n" + "\n" + "int main() {\n" + " register struct X x = {0};\n" + " int * p = &x.i;\n" //error: address of register variable 'x' requested + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1); } void address_of_const() { - const char* source = - "const int i;\n" - "static_assert(_Generic(&i, const int * : 1 ));\n" - "\n" - "const int * const p;\n" - "static_assert(_Generic(&p, const int * const * : 1 ));\n" - ""; + const char* source = + "const int i;\n" + "static_assert(_Generic(&i, const int * : 1 ));\n" + "\n" + "const int * const p;\n" + "static_assert(_Generic(&p, const int * const * : 1 ));\n" + ""; - assert(compile_without_errors(false, false, source)); + assert(compile_without_errors(false, false, source)); } void lvalue_test() { - //https://en.cppreference.com/w/c/language/value_category - - const char* source - = - "//https://en.cppreference.com/w/c/language/value_category\n" - "\n" - "struct X\n" - "{\n" - " int i;\n" - "};\n" - "\n" - "struct X f() { struct X x = {0}; return x; }\n" - "\n" - "const int i;\n" - "static_assert(_Generic(&i, const int* : 1));\n" - "\n" - "const int* const p;\n" - "static_assert(_Generic(&p, const int* const* : 1));\n" - "\n" - "\n" - "int main() {\n" - " static_assert(!_is_lvalue(1));\n" - " static_assert(_is_lvalue(\"a\"));\n" - " static_assert(_is_lvalue((int) { 0 }));\n" - "\n" - " int a;\n" - " static_assert(_is_lvalue(a));\n" - " static_assert(_is_lvalue((a)));\n" - "\n" - " enum E { A };\n" - " static_assert(!_is_lvalue(A));\n" - "\n" - "\n" - " struct X x = {0};\n" - " static_assert(_is_lvalue(x.i));\n" - "\n" - " struct X *px = 0;\n" - " static_assert(_is_lvalue(px->i));\n" - "\n" - " //== Non-lvalue object expressions ==\n" - " // \n" - " //integer, character, and floating constants \n" - " static_assert(!_is_lvalue(1));\n" - " static_assert(!_is_lvalue(1.2));\n" - " static_assert(!_is_lvalue('a'));\n" - "\n" - " //any function call expression\n" - " static_assert(!_is_lvalue(f()));\n" - " \n" - " //any cast expression\n" - " static_assert(!_is_lvalue((int)(0)));\n" - "\n" - " //member access operator (dot) applied to a non-lvalue structure/union\n" - " static_assert(!_is_lvalue(f().i));\n" - " \n" - " //results of all arithmetic, relational, logical, and bitwise operators\n" - " static_assert(!_is_lvalue(1 + 2));\n" - " static_assert(!_is_lvalue(1 && 2));\n" - " static_assert(!_is_lvalue(~1));\n" - "\n" - " //results of increment and decrement operators \n" - " static_assert(!_is_lvalue(a++));\n" - " \n" - " //results of assignment operators\n" - "\n" - " //the conditional operator\n" - " static_assert(!_is_lvalue(a ? a : a));\n" - "\n" - " //the comma operator\n" - " static_assert(!_is_lvalue(a , a)); \n" - " \n" - " //the address-of operator, even if neutralized by application to the result of unary * operator \n" - " static_assert(!_is_lvalue(&a));\n" - "\n" - "}\n" - ""; - ; - - - assert(compile_without_errors(false, false, source)); + //https://en.cppreference.com/w/c/language/value_category + + const char* source + = + "//https://en.cppreference.com/w/c/language/value_category\n" + "\n" + "struct X\n" + "{\n" + " int i;\n" + "};\n" + "\n" + "struct X f() { struct X x = {0}; return x; }\n" + "\n" + "const int i;\n" + "static_assert(_Generic(&i, const int* : 1));\n" + "\n" + "const int* const p;\n" + "static_assert(_Generic(&p, const int* const* : 1));\n" + "\n" + "\n" + "int main() {\n" + " static_assert(!_is_lvalue(1));\n" + " static_assert(_is_lvalue(\"a\"));\n" + " static_assert(_is_lvalue((int) { 0 }));\n" + "\n" + " int a;\n" + " static_assert(_is_lvalue(a));\n" + " static_assert(_is_lvalue((a)));\n" + "\n" + " enum E { A };\n" + " static_assert(!_is_lvalue(A));\n" + "\n" + "\n" + " struct X x = {0};\n" + " static_assert(_is_lvalue(x.i));\n" + "\n" + " struct X *px = 0;\n" + " static_assert(_is_lvalue(px->i));\n" + "\n" + " //== Non-lvalue object expressions ==\n" + " // \n" + " //integer, character, and floating constants \n" + " static_assert(!_is_lvalue(1));\n" + " static_assert(!_is_lvalue(1.2));\n" + " static_assert(!_is_lvalue('a'));\n" + "\n" + " //any function call expression\n" + " static_assert(!_is_lvalue(f()));\n" + " \n" + " //any cast expression\n" + " static_assert(!_is_lvalue((int)(0)));\n" + "\n" + " //member access operator (dot) applied to a non-lvalue structure/union\n" + " static_assert(!_is_lvalue(f().i));\n" + " \n" + " //results of all arithmetic, relational, logical, and bitwise operators\n" + " static_assert(!_is_lvalue(1 + 2));\n" + " static_assert(!_is_lvalue(1 && 2));\n" + " static_assert(!_is_lvalue(~1));\n" + "\n" + " //results of increment and decrement operators \n" + " static_assert(!_is_lvalue(a++));\n" + " \n" + " //results of assignment operators\n" + "\n" + " //the conditional operator\n" + " static_assert(!_is_lvalue(a ? a : a));\n" + "\n" + " //the comma operator\n" + " static_assert(!_is_lvalue(a , a)); \n" + " \n" + " //the address-of operator, even if neutralized by application to the result of unary * operator \n" + " static_assert(!_is_lvalue(&a));\n" + "\n" + "}\n" + ""; + ; + + + assert(compile_without_errors(false, false, source)); } void simple_no_discard_test() { - const char* source - = - "[[nodiscard]] int destroy();\n" - "\n" - "int main()\n" - "{\n" - " destroy();\n" - "}\n" - ""; + const char* source + = + "[[nodiscard]] int destroy();\n" + "\n" + "int main()\n" + "{\n" + " destroy();\n" + "}\n" + ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 1 && report.last_warning == W_ATTRIBUTES); + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1 /*&& report.last_warning == W_ATTRIBUTES*/); } void simple_no_discard_test2() { - const char* source - = - "[[nodiscard]] int destroy();\n" - "\n" - "int main()\n" - "{\n" - " int i;\n" - " i = destroy();\n" - "}\n" - ""; + const char* source + = + "[[nodiscard]] int destroy();\n" + "\n" + "int main()\n" + "{\n" + " int i;\n" + " i = destroy();\n" + "}\n" + ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 0 && report.error_count == 0); + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 0 && report.error_count == 0); } void address_of_register() { - const char* source - = - "struct X\n" - "{\n" - " int i;\n" - "};\n" - "\n" - "void f()\n" - "{\n" - " register struct X x;\n" - " &x;\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_ADDRESS_OF_REGISTER); + const char* source + = + "struct X\n" + "{\n" + " int i;\n" + "};\n" + "\n" + "void f()\n" + "{\n" + " register struct X x;\n" + " &x;\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& report.last_error == ERROR_ADDRESS_OF_REGISTER*/); } void return_address_of_local() { - const char* source - = - "struct X\n" - "{\n" - " int i;\n" - "};\n" - "\n" - "int* f()\n" - "{\n" - " struct X x;\n" - " return &x.i;\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 1 && report.last_warning == W_RETURN_LOCAL_ADDR); + const char* source + = + "struct X\n" + "{\n" + " int i;\n" + "};\n" + "\n" + "int* f()\n" + "{\n" + " struct X x;\n" + " return &x.i;\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1 /*&& report.last_warning == W_RETURN_LOCAL_ADDR*/); } void return_address_of_local2() { - const char* source - = - "\n" - "char* f() {\n" - " char str[] = \".\";\n" - " return str;\n" - "}\n" - ; + const char* source + = + "\n" + "char* f() {\n" + " char str[] = \".\";\n" + " return str;\n" + "}\n" + ; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 1 && report.last_warning == W_RETURN_LOCAL_ADDR); + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1 /*&& report.last_warning == W_RETURN_LOCAL_ADDR*/); } void assignment_of_read_only_object() { - const char* source - = - "struct X\n" - "{\n" - " int i;\n" - "};\n" - "\n" - "int* f()\n" - "{\n" - " const struct X * p;\n" - " p->i = 1;\n" - "}\n"; - - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_ASSIGNMENT_OF_READ_ONLY_OBJECT); + const char* source + = + "struct X\n" + "{\n" + " int i;\n" + "};\n" + "\n" + "int* f()\n" + "{\n" + " const struct X * p;\n" + " p->i = 1;\n" + "}\n"; + + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& report.last_error == ERROR_ASSIGNMENT_OF_READ_ONLY_OBJECT*/); } ////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -928,971 +954,993 @@ void assignment_of_read_only_object() void simple_move() { - const char* source - = - "char * _Owner f() {\n" - " char * _Owner p = 0;\n" - " return p; /*implicit move*/\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "char * _Owner f() {\n" + " char * _Owner p = 0;\n" + " return p; /*implicit move*/\n" + "}"; + assert(compile_without_errors(true, false, source)); } void simple_move_error() { - const char* source - = - "char * f() {\n" - " char * _Owner p = 0;\n" - " return p; \n" - "}"; + const char* source = + "char* f() {\n" + " char* _Owner p = 0;\n" + " return p;\n" + "#pragma cake diagnostic check \"-Wnon-owner-move\"\n" + "}\n"; - struct options options = { .input = LANGUAGE_C99 }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && - report.last_error == C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER); + assert(compile_without_errors(true, false, source)); } void parameter_view() { - const char* source - = - "\n" - "struct X { char * _Owner owner_variable; };\n" - "char * f(struct X *parameter) \n" - "{\n" - " return parameter->owner_variable;\n" //ok to move from parameter - "}\n"; + const char* source + = + "\n" + "struct X { char * _Owner owner_variable; };\n" + "char * f(struct X *parameter) \n" + "{\n" + " return parameter->owner_variable;\n" //ok to move from parameter + "}\n"; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void move_from_extern() { - const char* source - = - "struct X { char * _Owner owner_variable; };\n" - "struct X global;\n" - "char * f() \n" - "{\n" - " return global.owner_variable;\n" /*makes a _View*/ - "}\n"; + const char* source + = + "struct X { char * _Owner owner_variable; };\n" + "struct X global;\n" + "char * f() \n" + "{\n" + " return global.owner_variable;\n" /*makes a _View*/ + "}\n"; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void owner_type_test() { - const char* source - = - "\n" - "struct Y { \n" - " char * _Owner owner_variable; \n" - " char * non_owner_variable; \n" - "};\n" - "\n" - "struct X { \n" - " char * _Owner owner_variable; \n" - " char * non_owner_variable; \n" - " struct Y y1;\n" - " _View struct Y y2;\n" - "};\n" - "\n" - "void f()\n" - "{\n" - " struct X x;\n" - " \n" - " static_assert(_is_owner(typeof(x)));\n" - " static_assert(_is_owner(typeof(x.owner_variable)));\n" - " static_assert(!_is_owner(typeof(x.non_owner_variable)));\n" - " static_assert(_is_owner(struct X));\n" - " static_assert(_is_owner(typeof(x.y1)));\n" - " static_assert(!_is_owner(typeof(x.y2)));\n" - " \n" - " static_assert(_is_owner(typeof(x.y1.owner_variable)));\n" - " static_assert(!_is_owner(typeof(x.y1.non_owner_variable)));\n" - "\n" - " static_assert(!_is_owner(typeof(x.y2.owner_variable)));\n" - " static_assert(!_is_owner(typeof(x.y2.non_owner_variable)));\n" - "\n" - " _View struct X x2;\n" - " static_assert(!_is_owner(typeof(x2)));\n" - " static_assert(!_is_owner(typeof(x2.owner_variable)));\n" - " static_assert(!_is_owner(typeof(x2.non_owner_variable)));\n" - "\n" - " _Owner char * p;\n" - " static_assert(!_is_owner(typeof(p)));\n" - " static_assert(_is_owner(typeof(*p))); \n" - "}\n"; - - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "struct Y { \n" + " char * _Owner owner_variable; \n" + " char * non_owner_variable; \n" + "};\n" + "\n" + "struct X { \n" + " char * _Owner owner_variable; \n" + " char * non_owner_variable; \n" + " struct Y y1;\n" + " _View struct Y y2;\n" + "};\n" + "\n" + "void f()\n" + "{\n" + " struct X x;\n" + " \n" + " static_assert(_is_owner(typeof(x)));\n" + " static_assert(_is_owner(typeof(x.owner_variable)));\n" + " static_assert(!_is_owner(typeof(x.non_owner_variable)));\n" + " static_assert(_is_owner(struct X));\n" + " static_assert(_is_owner(typeof(x.y1)));\n" + " static_assert(!_is_owner(typeof(x.y2)));\n" + " \n" + " static_assert(_is_owner(typeof(x.y1.owner_variable)));\n" + " static_assert(!_is_owner(typeof(x.y1.non_owner_variable)));\n" + "\n" + " static_assert(!_is_owner(typeof(x.y2.owner_variable)));\n" + " static_assert(!_is_owner(typeof(x.y2.non_owner_variable)));\n" + "\n" + " _View struct X x2;\n" + " static_assert(!_is_owner(typeof(x2)));\n" + " static_assert(!_is_owner(typeof(x2.owner_variable)));\n" + " static_assert(!_is_owner(typeof(x2.non_owner_variable)));\n" + "\n" + " _Owner char * p;\n" + " static_assert(!_is_owner(typeof(p)));\n" + " static_assert(_is_owner(typeof(*p))); \n" + "}\n"; + + assert(compile_without_errors(true, false, source)); } void correct_move_assigment() { - const char* source - = - "\n" - "struct Y { \n" - " int i;\n" - "};\n" - "\n" - "struct X { \n" - " char * _Owner name;\n" - "};\n" - "\n" - "int main()\n" - "{\n" - " struct Y y1 = {};\n" - " struct Y y2 = {};\n" - " y1 = y2; //ok\n" - "\n" - " struct X x1 = {};\n" - " struct X x2 = {};\n" - " x1 = x2; //ok\n" - "\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "struct Y { \n" + " int i;\n" + "};\n" + "\n" + "struct X { \n" + " char * _Owner name;\n" + "};\n" + "\n" + "int main()\n" + "{\n" + " struct Y y1 = {};\n" + " struct Y y2 = {};\n" + " y1 = y2; //ok\n" + "\n" + " struct X x1 = {};\n" + " struct X x2 = {};\n" + " x1 = x2; //ok\n" + "\n" + "}"; + assert(compile_without_errors(true, false, source)); } void no_explicit_move_required() { - const char* source - = - "char * _Owner create();\n" - "void f(char * _Owner p);\n" - "\n" - "int main()\n" - "{\n" - " f(create());\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "char * _Owner create();\n" + "void f(char * _Owner p);\n" + "\n" + "int main()\n" + "{\n" + " f(create());\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void no_explicit_move_with_function_result() { - const char* source - = - "void destroy(char* _Owner x);\n" - "char * _Owner get();\n" - "\n" - "int main()\n" - "{\n" - " destroy(get());\n" - "}\n"; + const char* source + = + "void destroy(char* _Owner x);\n" + "char * _Owner get();\n" + "\n" + "int main()\n" + "{\n" + " destroy(get());\n" + "}\n"; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void cannot_ignore_owner_result() { - const char* source - = - "struct X {\n" - " char * _Owner name;\n" - "};\n" - "\n" - "struct X f();\n" - "\n" - "int main()\n" - "{\n" - " f();\n" - "}\n"; - - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.warnings_count == 1); + const char* source + = + "struct X {\n" + " char * _Owner name;\n" + "};\n" + "\n" + "struct X f();\n" + "\n" + "int main()\n" + "{\n" + " f();\n" + "}\n"; + + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1); } void can_ignore_owner_result() { - const char* source - = - "struct X {\n" - " char * _Owner name;\n" - "};\n" - "\n" - "_View struct X f();\n" - "\n" - "int main()\n" - "{\n" - " f();\n" - "}\n"; + const char* source + = + "struct X {\n" + " char * _Owner name;\n" + "};\n" + "\n" + "_View struct X f();\n" + "\n" + "int main()\n" + "{\n" + " f();\n" + "}\n"; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void move_not_necessary_on_return() { - const char* source - = - "struct X {\n" - " char * _Owner name;\n" - "};\n" - "\n" - "struct X f();\n" - "struct X f2()\n" - "{\n" - " return f();\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct X {\n" + " char * _Owner name;\n" + "};\n" + "\n" + "struct X f();\n" + "struct X f2()\n" + "{\n" + " return f();\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void explicit_move_not_required() { - const char* source - = - "#define NULL ((void*)0)\n" - "\n" - "int main()\n" - "{\n" - " const char * _Owner s;\n" - " s = NULL; \n" - " s = 0; \n" - " s = nullptr; \n" - "}\n" - ; - assert(compile_without_errors(true, false, source)); + const char* source + = + "#define NULL ((void*)0)\n" + "\n" + "int main()\n" + "{\n" + " const char * _Owner s;\n" + " s = NULL; \n" + " s = 0; \n" + " s = nullptr; \n" + "}\n" + ; + assert(compile_without_errors(true, false, source)); } void error_using_temporary_owner() { - const char* source - = - "\n" - "void F(int i);\n" - "_Owner int make();\n" - "int main()\n" - "{\n" - " F(make());\n" - "}"; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_USING_TEMPORARY_OWNER); + const char* source + = + "\n" + "void F(int i);\n" + "_Owner int make();\n" + "int main()\n" + "{\n" + " F(make());\n" + "}\n" + "#pragma cake diagnostic check \"-Wtemp-owner\"\n" + ""; + assert(compile_without_errors(true, false, source)); } void passing_view_to_owner() { - const char* source - = - "void destroy(_Owner int i);\n" - "\n" - "int main()\n" - "{\n" - " _Owner int i = 0;\n" - " int v = i;\n" - " destroy(v);\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER); + const char* source + = + "void destroy(_Owner int i);\n" + "\n" + "int main()\n" + "{\n" + " _Owner int i = 0;\n" + " int v = i;\n" + " destroy(v);\n" + "}\n" + "\n" + "#pragma cake diagnostic check \"-Wnon-owner-move\""; + assert(compile_without_errors(true, false, source)); } void obj_owner_cannot_be_used_in_non_pointer() { - const char* source - = - "void f() {\n" - " _Obj_owner int i;\n" - "}\n" - ; - struct options options = { .input = LANGUAGE_C99, .enabled_warnings_stack[0] = (~0 & ~W_STYLE) }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER); + const char* source + = + "void f() {\n" + " _Obj_owner int i;\n" + "}\n" + ; + struct options options = { .input = LANGUAGE_C99, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& report.last_error == ERROR_OBJ_OWNER_CAN_BE_USED_ONLY_IN_POINTER*/); } void ownership_flow_test_null_ptr_at_end_of_scope() { - const char* source - = - "void f() {\n" - " _Owner int * p = 0;\n" - "}\n" - " "; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void f() {\n" + " _Owner int * p = 0;\n" + "}\n" + " "; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_pointer_must_be_deleted() { - const char* source - = - "\n" - "int* _Owner get();\n" - "\n" - "void f() {\n" - " int * _Owner p = 0;\n" - " p = get();\n" - "}\n" - " "; - struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_FLOW_MISSING_DTOR); + const char* source + = + "\n" + "int* _Owner get();\n" + "\n" + "void f() \n" + "{\n" + " int* _Owner p = 0;\n" + " p = get();\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + "\n" + ""; + + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_basic_pointer_check() { - const char* source - = - "\n" - "int* _Owner get();\n" - "void dtor(int* _Owner p);\n" - "\n" - "void f(int a)\n" - "{\n" - " int* _Owner p = 0;\n" - " p = get(); \n" - " dtor(p); \n" - "}\n" - ""; + const char* source + = + "\n" + "int* _Owner get();\n" + "void dtor(int* _Owner p);\n" + "\n" + "void f(int a)\n" + "{\n" + " int* _Owner p = 0;\n" + " p = get(); \n" + " dtor(p); \n" + "}\n" + ""; - assert(compile_without_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_struct_member_missing_free() { - const char* source - = - "\n" - "char * _Owner strdup(const char* s);\n" - "void free(void* _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void f(int a)\n" - "{\n" - " struct X x = {0};\n" - " x.text = strdup(\"a\");\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_FLOW_MISSING_DTOR); - ////TODO return ROOT object! + const char* source + = + "char* _Owner strdup(const char* s);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X \n" + "{\n" + " char* _Owner text;\n" + "};\n" + "\n" + "void f(int a)\n" + "{\n" + " struct X x = { 0 };\n" + " x.text = strdup(\"a\");\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_struct_member_free() { - const char* source - = - "\n" - "char * _Owner strdup(const char* s);\n" - "void free(void* _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void f(int a)\n" - "{\n" - " struct X x = {0};\n" - " x.text = strdup(\"a\");\n" - " free(x.text);\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "char * _Owner strdup(const char* s);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + "};\n" + "\n" + "void f(int a)\n" + "{\n" + " struct X x = {0};\n" + " x.text = strdup(\"a\");\n" + " free(x.text);\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_move_inside_if() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "void f(int c) \n" - "{\n" - " int * _Owner p = malloc(sizeof (int)); \n" - " if (c) {\n" - " free(p);\n" - " }\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1); + const char* source + = + "void free(void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "void f(int c)\n" + "{\n" + " int* _Owner p = malloc(sizeof(int));\n" + " if (c) {\n" + " free(p);\n" + " }\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + ""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_goto_same_scope() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "void f(int condition) \n" - "{\n" - " int * _Owner p = malloc(sizeof(int));\n" - " \n" - " if (condition)\n" - " goto end;\n" - " end:\n" - " free(p);\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "void f(int condition) \n" + "{\n" + " int * _Owner p = malloc(sizeof(int));\n" + " \n" + " if (condition)\n" + " goto end;\n" + " end:\n" + " free(p);\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_jump_labels() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "void f(int condition)\n" - "{\n" - " int* _Owner p = malloc(sizeof(int));\n" - "\n" - " if (condition)\n" - " goto end;\n" - "\n" - " free(p);\n" - "end:\n" - "\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_FLOW_MISSING_DTOR); + const char* source + = + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "void f(int condition)\n" + "{\n" + " int* _Owner p = malloc(sizeof(int));\n" + "\n" + " if (condition)\n" + " goto end;\n" + "\n" + " free(p);\n" + "end:\n" + "\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C2X, .flow_analysis = true }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1 /*&& report.last_error == W_ANALYZER_OWNERSHIP_FLOW_MISSING_DTOR*/); } void ownership_flow_test_owner_if_pattern_1() { - const char* source - = - "\n" - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "int main()\n" - "{\n" - " int* _Owner p = malloc(sizeof(int));\n" - " if (p)\n" - " {\n" - " free(p); \n" - " }\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "int main()\n" + "{\n" + " int* _Owner p = malloc(sizeof(int));\n" + " if (p)\n" + " {\n" + " free(p); \n" + " }\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_owner_if_pattern_2() { - const char* source - = - "\n" - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "\n" - "int main()\n" - "{\n" - " int* _Owner p = malloc(sizeof(int));\n" - " if (p != 0)\n" - " {\n" - " free(p); \n" - " }\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "\n" + "int main()\n" + "{\n" + " int* _Owner p = malloc(sizeof(int));\n" + " if (p != 0)\n" + " {\n" + " free(p); \n" + " }\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_missing_destructor() { - const char* source - = - "struct X {\n" - " _Owner i;\n" - "};\n" - "void f() {\n" - " const struct X x = {0};\n" - "}\n" - ""; - - - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.last_error == C_OWNERSHIP_FLOW_MISSING_DTOR); + const char* source + = + "struct X {\n" + " _Owner i;\n" + "};\n" + "void f() {\n" + " const struct X x = { 0 };\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_no_warning() { - const char* source - = - "void free( void * _Owner p);\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "void x_delete( struct X * _Owner p)\n" - "{\n" - " if (p)\n" - " {\n" - " free(p->text);\n" - " free(p);\n" - " }\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free( void * _Owner p);\n" + "struct X {\n" + " char * _Owner text;\n" + "};\n" + "void x_delete( struct X * _Owner p)\n" + "{\n" + " if (p)\n" + " {\n" + " free(p->text);\n" + " free(p);\n" + " }\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_moved_if_not_null() { - const char* source - = - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X { int i; };\n" - "struct Y { struct X * _Owner p; };\n" - "\n" - "int main() {\n" - " struct Y y = {0};\n" - " struct X * _Owner p = malloc(sizeof(struct X));\n" - " if (p){\n" - " y.p = p;\n" - " }\n" - " free(y.p);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void * _Owner malloc(int i);\n" + "void free( void * _Owner p);\n" + "\n" + "struct X { int i; };\n" + "struct Y { struct X * _Owner p; };\n" + "\n" + "int main() {\n" + " struct Y y = {0};\n" + " struct X * _Owner p = malloc(sizeof(struct X));\n" + " if (p){\n" + " y.p = p;\n" + " }\n" + " free(y.p);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_struct_moved() { - const char* source - = - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name;\n" - "};\n" - "\n" - "void x_destroy( struct X * _Obj_owner p);\n" - "\n" - "struct Y {\n" - " struct X x;\n" - "};\n" - "\n" - "void y_destroy(struct Y * _Obj_owner p) {\n" - " x_destroy(&p->x);\n" - "}\n" - ; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free( void * _Owner p);\n" + "\n" + "struct X {\n" + " char * _Owner name;\n" + "};\n" + "\n" + "void x_destroy( struct X * _Obj_owner p);\n" + "\n" + "struct Y {\n" + " struct X x;\n" + "};\n" + "\n" + "void y_destroy(struct Y * _Obj_owner p) {\n" + " x_destroy(&p->x);\n" + "}\n" + ; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_scope_error() { - const char* source - = - "void * _Owner malloc(int i);\n" - "void free( void* _Owner p);\n" - "\n" - "int main() {\n" - " try\n" - " {\n" - " if (1)\n" - " {\n" - " char * _Owner s = malloc(1);\n" - " free(s);\n" - " }\n" - " else\n" - " {\n" - " throw;\n" - " }\n" - " }\n" - " catch\n" - " {\n" - " }\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void * _Owner malloc(int i);\n" + "void free( void* _Owner p);\n" + "\n" + "int main() {\n" + " try\n" + " {\n" + " if (1)\n" + " {\n" + " char * _Owner s = malloc(1);\n" + " free(s);\n" + " }\n" + " else\n" + " {\n" + " throw;\n" + " }\n" + " }\n" + " catch\n" + " {\n" + " }\n" + "}"; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_void_destroy() { - /*TODO moving to void* requires object is moved before*/ - const char* source - = - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "int main() {\n" - " struct X * _Owner p = malloc(sizeof * p);\n" - " free(p); \n" - "} \n" - ; - - assert(compile_without_errors(true, false, source)); + /*TODO moving to void* requires object is moved before*/ + const char* source + = + "void * _Owner malloc(int i);\n" + "void free( void * _Owner p);\n" + "\n" + "struct X {\n" + " char * _Owner name; \n" + "};\n" + "\n" + "int main() {\n" + " struct X * _Owner p = malloc(sizeof * p);\n" + " free(p); \n" + "} \n" + ; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_void_destroy_ok() { - /*TODO moving to void* requires object is moved before*/ - const char* source - = - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "int main() {\n" - " struct X * _Owner p = malloc(sizeof * p);\n" - " p->name = malloc(10);\n" - " free(p->name);\n" - " free(p); \n" - "} \n" - ; - assert(compile_without_errors(true, false, source)); + /*TODO moving to void* requires object is moved before*/ + const char* source + = + "void * _Owner malloc(int i);\n" + "void free( void * _Owner p);\n" + "\n" + "struct X {\n" + " char * _Owner name; \n" + "};\n" + "\n" + "int main() {\n" + " struct X * _Owner p = malloc(sizeof * p);\n" + " p->name = malloc(10);\n" + " free(p->name);\n" + " free(p); \n" + "} \n" + ; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_moving_owner_pointer() { - const char* source - = - "\n" - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "void x_delete( struct X * _Owner p)\n" - "{\n" - " if (p) {\n" - " free(p->name);\n" - " free(p);\n" - " }\n" - "}\n" - "\n" - "int main() {\n" - " struct X * _Owner p = malloc(sizeof * p); \n" - " x_delete(p); \n" - "} \n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(int i);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "void x_delete(struct X* _Owner p)\n" + "{\n" + " if (p) {\n" + " free(p->name);\n" + " free(p);\n" + " }\n" + "}\n" + "\n" + "int main() {\n" + " struct X* _Owner p = malloc(sizeof * p);\n" + " x_delete(p);\n" + "}\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); + } void ownership_flow_test_moving_owner_pointer_missing() { - const char* source - = - "\n" - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "void x_delete( struct X * _Owner p)\n" - "{\n" - " if (p) {\n" - " //free(p->name);\n" - " free(p);\n" - " }\n" - "}\n" - "\n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + const char* source + = + "\n" + "void* _Owner malloc(int i);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "void x_delete(struct X* _Owner p)\n" + "{\n" + " if (p) {\n" + " //free(p->name);\n" + " free(p);\n" + " }\n" + "}\n" + "\n" + "\n" + "void dummy() {}\n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_error() { - const char* source - = - "\n" - "void* _Owner malloc(int size);\n" - "\n" - "struct X { \n" - " char * _Owner name;\n" - "};\n" - "\n" - "void * _Owner f1(){\n" - " struct X * _Owner p = malloc(sizeof (struct X));\n" - " p->name = malloc(1); \n" - " return p;\n" - "}\n" - ""; - - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + const char* source + = + "\n" + "void* _Owner malloc(int size);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "void* _Owner f1() {\n" + " struct X* _Owner p = malloc(sizeof(struct X));\n" + " p->name = malloc(1);\n" + " return p;\n" + "}\n" + "\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_setting_owner_pointer_to_null() { - const char* source - = - "\n" - "void * _Owner malloc(int i);\n" - "void free( void * _Owner p);\n" - "\n" - "struct X {\n" - " char * _Owner name; \n" - "};\n" - "\n" - "int main() {\n" - " struct X * _Owner p = malloc(sizeof * p); \n" - " p = 0;\n" - "} \n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + const char* source + = + "\n" + "void* _Owner malloc(int i);\n" + "void free(void* _Owner p);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "int main() {\n" + " struct X* _Owner p = malloc(sizeof * p);\n" + " p = 0;\n" + "}\n" + "\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_while_not_null() { - const char* source - = - "struct item {\n" - " struct item * _Owner next;\n" - "};\n" - "void item_delete( struct item * _Owner p);\n" - "\n" - "struct list {\n" - " struct item * _Owner head;\n" - " struct item * tail;\n" - "};\n" - "int main()\n" - "{\n" - " struct list list = {0};\n" - " struct item * _Owner p = list.head;\n" - " while (p){\n" - " struct item * _Owner next = p->next;\n" - " p->next = 0;\n" - " item_delete(p);\n" - " p = next;\n" - " } \n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct item {\n" + " struct item * _Owner next;\n" + "};\n" + "void item_delete( struct item * _Owner p);\n" + "\n" + "struct list {\n" + " struct item * _Owner head;\n" + " struct item * tail;\n" + "};\n" + "int main()\n" + "{\n" + " struct list list = {0};\n" + " struct item * _Owner p = list.head;\n" + " while (p){\n" + " struct item * _Owner next = p->next;\n" + " p->next = 0;\n" + " item_delete(p);\n" + " p = next;\n" + " } \n" + "}"; + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_if_state() { - const char* source - = - "\n" - "int* _Owner make();\n" - "void free(int * _Owner p);\n" - "\n" - "\n" - "void f(int condition)\n" - "{\n" - " int * _Owner p = 0;\n" - " static_state(p, \"null\");\n" - " \n" - " if (condition)\n" - " {\n" - " static_state(p, \"null\"); \n" - " p = make();\n" - " static_state(p, \"maybe-null\");\n" - " }\n" - " else\n" - " {\n" - " static_state(p, \"null\");\n" - " }\n" - " free(p);\n" - "}\n" - "\n" - ""; - - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "int* _Owner make();\n" + "void free(int * _Owner p);\n" + "\n" + "\n" + "void f(int condition)\n" + "{\n" + " int * _Owner p = 0;\n" + " static_state(p, \"null\");\n" + " \n" + " if (condition)\n" + " {\n" + " static_state(p, \"null\"); \n" + " p = make();\n" + " static_state(p, \"maybe-null\");\n" + " }\n" + " else\n" + " {\n" + " static_state(p, \"null\");\n" + " }\n" + " free(p);\n" + "}\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void ownership_types_test_error_owner() { - const char* source - = - "void * f();\n" - "int main() {\n" - " void * _Owner p = f(); \n" - "}\n" - ; - struct options options = { .input = LANGUAGE_C99 }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + const char* source + = + "void* f();\n" + "int main() {\n" + " void* _Owner p = f();\n" + "#pragma cake diagnostic check \"-Wmissing-owner-qualifier\"\n" + "}\n" + "\n" + "\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_if_variant() { - const char* source - = - "void * _Owner f();\n" - "void free( void *_Owner p);\n" - "int main() {\n" - " void * _Owner p = f(); \n" - " if (p)\n" - " {\n" - " free(p);\n" - " p = f(); \n" - " }\n" - "}\n" - ""; - + const char* source + = + "void* _Owner f();\n" + "void free(void* _Owner p);\n" + "int main() {\n" + " void* _Owner p = f();\n" + " if (p)\n" + " {\n" + " free(p);\n" + " p = f();\n" + " }\n" + "}\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + assert(compile_without_errors(true, false, source)); } void check_leaks_on_else_block() { - const char* source - = - "void * _Owner malloc(int sz);\n" - "\n" - "void f(int i) { \n" - " if (i){\n" - " } \n" - " else {\n" - " int * _Owner p3 = malloc(1);\n" - " }\n" - "}\n" - ; - - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1 && report.warnings_count == 0); + const char* source + = + "void* _Owner malloc(int sz);\n" + "\n" + "void f(int i) {\n" + " if (i) {\n" + " }\n" + " else {\n" + " int* _Owner p3 = malloc(1);\n" + " }\n" + "}\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; + + assert(compile_without_errors(true, false, source)); } void ownership_flow_test_two_ifs() { - const char* source - = - "void * _Owner malloc(int sz);\n" - "void free( void * _Owner opt p);\n" - "\n" - "\n" - "void f(int i) { \n" - " void * _Owner p = 0;\n" - " if (i)\n" - " {\n" - " if (i)\n" - " {\n" - " p = malloc(1);\n" - " }\n" - " else\n" - " {\n" - " p = malloc(1);\n" - " } \n" - " }\n" - " \n" - " free(p);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void * _Owner malloc(int sz);\n" + "void free( void * _Owner _Opt p);\n" + "\n" + "\n" + "void f(int i) { \n" + " void * _Owner p = 0;\n" + " if (i)\n" + " {\n" + " if (i)\n" + " {\n" + " p = malloc(1);\n" + " }\n" + " else\n" + " {\n" + " p = malloc(1);\n" + " } \n" + " }\n" + " \n" + " free(p);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void ownership_no_name_parameter() { - const char* source - = - "void free( void * _Owner){ }\n" - ""; + const char* source + = + "void free(void* _Owner) { }\n" + "void dummy() {}\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\""; - assert(compile_with_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void ownership_flow_switch_case() { - const char* source - = - "void* _Owner make();\n" - "void free( void* _Owner p);\n" - "\n" - "void f(condition)\n" - "{\n" - " void* _Owner p = make();\n" - "\n" - "\n" - " switch (condition)\n" - " {\n" - " case 1:\n" - " {\n" - " free(p);\n" - " }\n" - " break;\n" - " case 2:\n" - " {\n" - " free(p);\n" - " }\n" - " break;\n" - "\n" - " default:\n" - " free(p);\n" - " break;\n" - " } \n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void* _Owner make();\n" + "void free( void* _Owner p);\n" + "\n" + "void f(condition)\n" + "{\n" + " void* _Owner p = make();\n" + "\n" + "\n" + " switch (condition)\n" + " {\n" + " case 1:\n" + " {\n" + " free(p);\n" + " }\n" + " break;\n" + " case 2:\n" + " {\n" + " free(p);\n" + " }\n" + " break;\n" + "\n" + " default:\n" + " free(p);\n" + " break;\n" + " } \n" + "}"; + assert(compile_without_errors(true, false, source)); } void state_inner_objects_preserved() { - const char* source - = - "void *_Owner malloc(int i);\n" - "void free(void *_Owner);\n" - "\n" - "struct X{\n" - " char * _Owner name;\n" - "};\n" - "\n" - "int main()\n" - "{\n" - " struct X * _Owner p = malloc(sizeof(struct X)); \n" - " if (p)\n" - " {\n" - " p->name = malloc(1);\n" - " }\n" - " else \n" - " { \n" - " p->name = malloc(1);\n" - " }\n" - " free(p->name);\n" - " free(p);\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void *_Owner malloc(int i);\n" + "void free(void *_Owner);\n" + "\n" + "struct X{\n" + " char * _Owner name;\n" + "};\n" + "\n" + "int main()\n" + "{\n" + " struct X * _Owner p = malloc(sizeof(struct X)); \n" + " if (p)\n" + " {\n" + " p->name = malloc(1);\n" + " }\n" + " else \n" + " { \n" + " p->name = malloc(1);\n" + " }\n" + " free(p->name);\n" + " free(p);\n" + "}"; + assert(compile_without_errors(true, false, source)); } //TODO make test with @@ -1900,1308 +1948,1449 @@ void state_inner_objects_preserved() // void owner_parameter_must_be_ignored() { - const char* source = "void f(void (*pf)(void* _Owner p)){}"; - assert(compile_without_errors(true, false, source)); + const char* source = "void f(void (*pf)(void* _Owner p)){}"; + assert(compile_without_errors(true, false, source)); } void taking_address() { - const char* source - = - "struct X {\n" - " void * _Owner text;\n" - "};\n" - "\n" - "void x_change(struct X* list);\n" - "void x_destroy(struct X* _Obj_owner p);\n" - "\n" - "int main()\n" - "{\n" - " struct X x = {};\n" - " static_debug(x);\n" - " x_change(&x);\n" - " //list_destroy(&list);\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 1); + const char* source + = + "struct X {\n" + " void * _Owner text;\n" + "};\n" + "\n" + "void x_change(struct X* list);\n" + "void x_destroy(struct X* _Obj_owner p);\n" + "\n" + "int main()\n" + "{\n" + " struct X x = {};\n" + " static_debug(x);\n" + " x_change(&x);\n" + " //list_destroy(&list);\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.error_count == 1); } void taking_address_const() { - const char* source - = - "struct X {\n" - " void * _Owner text;\n" - "};\n" - "\n" - "void f(const struct X* list);\n" - "\n" - "int main()\n" - "{\n" - " struct X x = {};\n" - " f(&x);\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct X {\n" + " void * _Owner text;\n" + "};\n" + "\n" + "void f(const struct X* list);\n" + "\n" + "int main()\n" + "{\n" + " struct X x = {};\n" + " f(&x);\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void pointer_argument() { - const char* source - = - "void * _Owner malloc(int i);\n" - "\n" - "struct X {\n" - " void * _Owner text;\n" - "};\n" - "\n" - "void x_change( struct X* list);\n" - "\n" - "int main()\n" - "{\n" - " struct X * _Owner x = malloc(sizeof * x);\n" - " x_change(x);\n" - "}\n" - ""; - struct options options = { .input = LANGUAGE_C99, .flow_analysis = true }; - struct report report = { 0 }; - get_ast(&options, "source", source, &report); - assert(report.error_count == 3); + const char* source + = + "void * _Owner malloc(int i);\n" + "\n" + "struct X {\n" + " void * _Owner text;\n" + "};\n" + "\n" + "void x_change( struct X* list);\n" + "\n" + "int main()\n" + "{\n" + " struct X * _Owner x = malloc(sizeof * x);\n" + " x_change(x);\n" + "}\n" + ""; + struct options options = { .input = LANGUAGE_C99, .flow_analysis = true , .diagnostic_stack[0] = default_diagnostic }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 3); } void do_while() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "int main() {\n" - " void * _Owner p = malloc(1);\n" - " do{\n" - " free(p);\n" - " }\n" - " while(0); \n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "int main() {\n" + " void * _Owner p = malloc(1);\n" + " do{\n" + " free(p);\n" + " }\n" + " while(0); \n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void switch_cases_state() { - const char* source - = - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "void* _Owner f(int i)\n" - "{\n" - " void* _Owner p = malloc(1);\n" - " switch (i)\n" - " {\n" - " case 1:\n" - " break;\n" - " case 2:\n" - " break;\n" - " }\n" - "\n" - " return p;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "void* _Owner f(int i)\n" + "{\n" + " void* _Owner p = malloc(1);\n" + " switch (i)\n" + " {\n" + " case 1:\n" + " break;\n" + " case 2:\n" + " break;\n" + " }\n" + "\n" + " return p;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void switch_break() { - const char* source - = - "void * _Owner malloc(int i);\n" - "\n" - "void* _Owner f(int i)\n" - "{\n" - " void* _Owner p = malloc(1); \n" - " switch (i) {\n" - " case 1: break;\n" - " }\n" - " return p;\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void * _Owner malloc(int i);\n" + "\n" + "void* _Owner f(int i)\n" + "{\n" + " void* _Owner p = malloc(1); \n" + " switch (i) {\n" + " case 1: break;\n" + " }\n" + " return p;\n" + "}"; + assert(compile_without_errors(true, false, source)); } void passing_non_owner() { - /* - We need to analuse better this case... - - */ - const char* source - = - "struct X { \n" - " char * _Owner p;\n" - "};\n" - "void x_destroy(struct X * _Obj_owner p);\n" - "void f(struct X* x)\n" - "{\n" - " x_destroy(x); \n" - "}\n" - ""; + const char* source + = + "struct X {\n" + " char* _Owner p;\n" + "};\n" + "void x_destroy(struct X* _Obj_owner p);\n" + "void f(struct X* x)\n" + "{\n" + " x_destroy(x);\n" + "}\n" + "\n" + "#pragma cake diagnostic check \"-Wmust-use-address-of\"\n" + ""; - assert(compile_with_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void flow_analysis_else() { - const char* source - - = - "void * _Owner malloc(int i);\n" - "void free(void * _Owner p);\n" - "\n" - "int main() {\n" - " int * _Owner p1 = 0;\n" - " int * _Owner p2 = malloc(1);\n" - "\n" - " if (p2 == 0) {\n" - " return 1;\n" - " }\n" - " else\n" - " {\n" - " p1 = p2;\n" - " }\n" - " static_state(p2, \"moved\");\n" - " free(p1);\n" - " return 0;\n" - "}"; - - "}"; - - assert(compile_without_errors(true, false, source)); + const char* source + + = + "void * _Owner malloc(int i);\n" + "void free(void * _Owner p);\n" + "\n" + "int main() {\n" + " int * _Owner p1 = 0;\n" + " int * _Owner p2 = malloc(1);\n" + "\n" + " if (p2 == 0) {\n" + " return 1;\n" + " }\n" + " else\n" + " {\n" + " p1 = p2;\n" + " }\n" + " static_state(p2, \"moved\");\n" + " free(p1);\n" + " return 0;\n" + "}"; + + "}"; + + assert(compile_without_errors(true, false, source)); } void moving_content_of_owner() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "\n" - "struct X { char *_Owner name; };\n" - "struct Y { struct X x; };\n" - "\n" - "void f(struct Y * y, struct X * _Obj_owner p) \n" - "{\n" - " free(y->x.name);\n" - " y->x = *p;\n" - "}\n" - ; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "\n" + "struct X { char *_Owner name; };\n" + "struct Y { struct X x; };\n" + "\n" + "void f(struct Y * y, struct X * _Obj_owner p) \n" + "{\n" + " free(y->x.name);\n" + " y->x = *p;\n" + "}\n" + ; + assert(compile_without_errors(true, false, source)); } void switch_scope() { - const char* source - = - "\n" - "void* _Owner calloc(unsigned n, unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char* _Owner name;\n" - "};\n" - "\n" - "struct X* _Owner F(int i)\n" - "{\n" - " struct X* _Owner p1 = 0;\n" - "\n" - " switch (i)\n" - " {\n" - " case 1:\n" - " struct X* _Owner p2 = calloc(1, sizeof * p2);\n" - " if (p2)\n" - " {\n" - " static_set(*p2, \"zero\");\n" - " p1 = p2;\n" - " }\n" - " break;\n" - " case 2:\n" - " break;\n" - " }\n" - "\n" - " return p1;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner calloc(unsigned n, unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "struct X* _Owner F(int i)\n" + "{\n" + " struct X* _Owner p1 = 0;\n" + "\n" + " switch (i)\n" + " {\n" + " case 1:\n" + " struct X* _Owner p2 = calloc(1, sizeof * p2);\n" + " if (p2)\n" + " {\n" + " static_set(*p2, \"zero\");\n" + " p1 = p2;\n" + " }\n" + " break;\n" + " case 2:\n" + " break;\n" + " }\n" + "\n" + " return p1;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void swith_and_while() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char* _Owner name;\n" - "};\n" - "\n" - "struct X* _Owner F(int i)\n" - "{\n" - "\n" - " struct X* _Owner p1 = 0;\n" - " try\n" - " {\n" - " if (i == 1)\n" - " {\n" - " p1 = malloc(sizeof * p1); \n" - " while (0){} \n" - " }\n" - " else if (i == 3)\n" - " {\n" - " p1 = malloc(sizeof * p1);\n" - " }\n" - " }\n" - " catch\n" - " {\n" - " }\n" - "\n" - " return p1;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "struct X* _Owner F(int i)\n" + "{\n" + "\n" + " struct X* _Owner p1 = 0;\n" + " try\n" + " {\n" + " if (i == 1)\n" + " {\n" + " p1 = malloc(sizeof * p1); \n" + " while (0){} \n" + " }\n" + " else if (i == 3)\n" + " {\n" + " p1 = malloc(sizeof * p1);\n" + " }\n" + " }\n" + " catch\n" + " {\n" + " }\n" + "\n" + " return p1;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void owner_to_non_owner() { - const char* source - = - "void * f();\n" - "int main() {\n" - " void * _Owner p = f();\n" - "}"; + const char* source + = + "\n" + "void* f();\n" + "int main() {\n" + " void* _Owner p = f();\n" + " #pragma cake diagnostic check \"-Wmissing-owner-qualifier\"\n" + "}\n" + "\n" + "void dummy() {}\n" + "\n" + "#pragma cake diagnostic check \"-Wmissing-destructor\"\n" + ""; - assert(compile_with_errors(true, false, source)); + assert(compile_without_errors(true, false, source)); } void owner_to_non_owner_zero() { - const char* source - = - "void * f();\n" - "int main() {\n" - " void * _Owner p = 0;\n" - "}"; - assert(compile_without_errors(true, false, source)); + + const char* source + = + "void * f();\n" + "int main() {\n" + " void * _Owner p = 0;\n" + "}"; + + assert(compile_without_errors(true, false, source)); } void incomplete_struct() { - const char* source - = - "void free(void * _Owner p);\n" - "struct X;\n" - "struct X f();\n" - "struct X { char * _Owner p; };\n" - "int main()\n" - "{\n" - " struct X x = 1 ? f() : f(); \n" - " free(x.p);\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free(void * _Owner p);\n" + "struct X;\n" + "struct X f();\n" + "struct X { char * _Owner p; };\n" + "int main()\n" + "{\n" + " struct X x = 1 ? f() : f(); \n" + " free(x.p);\n" + "}"; + assert(compile_without_errors(true, false, source)); } void switch_pop_problem() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "\n" - "void f(int i)\n" - "{\n" - " void * _Owner p1 = malloc(1);\n" - " switch(i)\n" - " {\n" - " case 1:\n" - " {\n" - " void * _Owner p2 = malloc(1);\n" - " free(p2);\n" - " }\n" - " break;\n" - "\n" - " case 2:\n" - " {\n" - " void * _Owner p3 = malloc(1);\n" - " free(p3);\n" - " }\n" - " break;\n" - " }\n" - "\n" - " free(p1);\n" - " \n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "\n" + "void f(int i)\n" + "{\n" + " void * _Owner p1 = malloc(1);\n" + " switch(i)\n" + " {\n" + " case 1:\n" + " {\n" + " void * _Owner p2 = malloc(1);\n" + " free(p2);\n" + " }\n" + " break;\n" + "\n" + " case 2:\n" + " {\n" + " void * _Owner p3 = malloc(1);\n" + " free(p3);\n" + " }\n" + " break;\n" + " }\n" + "\n" + " free(p1);\n" + " \n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void switch_pop2() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "\n" - "void f(int i)\n" - "{\n" - " void* _Owner p1 = malloc(1);\n" - " switch (i)\n" - " {\n" - " case 1:\n" - " void* _Owner p2 = malloc(1);\n" - " free(p2);\n" - " break;\n" - "\n" - " case 3:\n" - " void* _Owner p3 = malloc(1);\n" - " free(p3);\n" - " break;\n" - " }\n" - "\n" - " free(p1);\n" - "\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "\n" + "void f(int i)\n" + "{\n" + " void* _Owner p1 = malloc(1);\n" + " switch (i)\n" + " {\n" + " case 1:\n" + " void* _Owner p2 = malloc(1);\n" + " free(p2);\n" + " break;\n" + "\n" + " case 3:\n" + " void* _Owner p3 = malloc(1);\n" + " free(p3);\n" + " break;\n" + " }\n" + "\n" + " free(p1);\n" + "\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void scopes_pop() { - const char* source - = - "\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X { char* _Owner name; };\n" - "\n" - "void x_destroy(struct X* _Obj_owner p);\n" - "struct X f();\n" - "\n" - "void f()\n" - "{\n" - " {\n" - " struct X x = {0}; \n" - " \n" - " if (1)\n" - " { \n" - " x = f();\n" - " }\n" - " else\n" - " { \n" - " x = f();\n" - " }\n" - " x_destroy(&x);\n" - " }\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X { char* _Owner name; };\n" + "\n" + "void x_destroy(struct X* _Obj_owner p);\n" + "struct X f();\n" + "\n" + "void f()\n" + "{\n" + " {\n" + " struct X x = {0}; \n" + " \n" + " if (1)\n" + " { \n" + " x = f();\n" + " }\n" + " else\n" + " { \n" + " x = f();\n" + " }\n" + " x_destroy(&x);\n" + " }\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void owner_moved() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "struct X { char * _Owner text; };\n" - "\n" - "void x_destroy(struct X* _Obj_owner p)\n" - "{\n" - " free(p->text);\n" - "}\n" - "\n" - "void x_delete(struct X* _Owner p)\n" - "{\n" - " if (p)\n" - " {\n" - " x_destroy(p);\n" - " free(p);\n" - " }\n" - "}"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free( void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "struct X { char * _Owner text; };\n" + "\n" + "void x_destroy(struct X* _Obj_owner p)\n" + "{\n" + " free(p->text);\n" + "}\n" + "\n" + "void x_delete(struct X* _Owner p)\n" + "{\n" + " if (p)\n" + " {\n" + " x_destroy(p);\n" + " free(p);\n" + " }\n" + "}"; + assert(compile_without_errors(true, false, source)); } void partially_owner_moved() { - const char* source - = - "void free( void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "struct X { char * _Owner text; };\n" - "\n" - "void x_destroy(struct X* _Obj_owner p)\n" - "{\n" - " free(p->text);\n" - "}\n" - "\n" - "void x_delete(struct X* _Owner p)\n" - "{\n" - " if (p)\n" - " {\n" - " x_destroy(p);\n" - " }\n" - "}"; - assert(compile_with_errors(true, false, source)); + const char* source + = + "#pragma cake diagnostic error \"-Wmissing-destructor\"\n" + "\n" + "void free(void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "struct X { char* _Owner text; };\n" + "\n" + "void x_destroy(struct X* _Obj_owner p)\n" + "{\n" + " free(p->text);\n" + "}\n" + "\n" + "void x_delete(struct X* _Owner p)\n" + "{\n" + " if (p)\n" + " {\n" + " x_destroy(p);\n" + " }\n" + "}\n" + "\n" + "\n" + "\n" + ""; + + assert(compile_with_errors(true, false, source)); } void use_after_destroy() { - const char* source - = - "\n" - "char* _Owner strdup(const char* s);\n" - "void* _Owner malloc(unsigned size);\n" - "void free(void* _Owner ptr);" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "void x_destroy(struct X * _Obj_owner p) {\n" - " free(p->name);\n" - "}\n" - "\n" - "void x_print(struct X * p) \n" - "{\n" - " //printf(\"%s\", p->name);\n" - "}\n" - "\n" - "int main() {\n" - " struct X x = {0};\n" - " x.name = strdup(\"a\");\n" - " x_destroy(&x);\n" - " x_print(&x);\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); - + const char* source + = + "\n" + "char* _Owner strdup(const char* s);\n" + "void* _Owner malloc(unsigned size);\n" + "void free(void* _Owner ptr);\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "void x_destroy(struct X* _Obj_owner p) {\n" + " free(p->name);\n" + "}\n" + "\n" + "void x_print(struct X* p)\n" + "{\n" + " //printf(\"%s\", p->name);\n" + "}\n" + "\n" + "int main() {\n" + " struct X x = { 0 };\n" + " x.name = strdup(\"a\");\n" + " x_destroy(&x);\n" + " x_print(&x);\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void obj_owner_must_be_from_addressof() { - const char* source - = - "void free(void* _Owner ptr);\n" - "void* _Owner malloc(int size);\n" - "char * _Owner strdup(const char* );\n" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "struct Y {\n" - " struct X x;\n" - " struct X * px;\n" - "};\n" - "\n" - "void x_destroy(struct X * _Obj_owner p) \n" - "{\n" - " free(p->name);\n" - "}\n" - "\n" - "void f(struct Y * p)\n" - "{ \n" - " x_destroy(p->px);\n" - "}\n" - "\n" - "int main() {\n" - " struct Y y = {}; \n" - " struct * p = &y.x;\n" - " x_destroy(&y.x);\n" - "}\n" - "\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "void free(void* _Owner ptr);\n" + "void* _Owner malloc(int size);\n" + "char* _Owner strdup(const char*);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "struct Y {\n" + " struct X x;\n" + " struct X* px;\n" + "};\n" + "\n" + "void x_destroy(struct X* _Obj_owner p)\n" + "{\n" + " free(p->name);\n" + "}\n" + "\n" + "void f(struct Y* p)\n" + "{\n" + " x_destroy(p->px);\n" + "}\n" + "\n" + "int main() {\n" + " struct Y y = {};\n" + " struct* p = &y.x;\n" + " x_destroy(&y.x);\n" + "}\n" + "\n" + "\n" + "\n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmust-use-address-of\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void discarding_owner() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "int main()\n" - "{ \n" - " struct X * p = (struct X * _Owner) malloc(1);\n" - "}"; - assert(compile_with_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char* _Owner name;\n" + "};\n" + "\n" + "int main()\n" + "{\n" + " struct X* p = (struct X* _Owner) malloc(1);\n" + "}\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmissing-owner-qualifier\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void using_uninitialized() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void x_delete(struct X * _Owner p);\n" - "\n" - "int main() { \n" - " struct X * _Owner p = malloc(sizeof(struct X)); \n" - " x_delete(p); /*uninitialized*/\n" - "}\n" - "\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char* _Owner text;\n" + "};\n" + "\n" + "void x_delete(struct X* _Owner p);\n" + "\n" + "int main() {\n" + " struct X* _Owner p = malloc(sizeof(struct X));\n" + " x_delete(p); /*uninitialized*/\n" + "}\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void using_uninitialized_struct() { - const char* source - = - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void x_destroy(struct X * _Obj_owner p);\n" - "\n" - "\n" - "int main() { \n" - " struct X x;\n" - " x_destroy(&x);\n" - "}\n" - "\n" - ""; - - assert(compile_with_errors(true, false, source)); + const char* source + = + "struct X {\n" + " char* _Owner text;\n" + "};\n" + "\n" + "void x_destroy(struct X* _Obj_owner p);\n" + "\n" + "\n" + "int main() {\n" + " struct X x;\n" + " x_destroy(&x);\n" + "}\n" + "\n" + "\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + ""; + + + assert(compile_without_errors(true, false, source)); } void zero_initialized() { - const char* source - = - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "int main() { \n" - " struct X x = {0}; \n" - " static_state(x.text, \"null\");\n" - " static_state(x.p1, \"null\");\n" - " static_state(x.i, \"zero\");\n" - " static_state(x.pY, \"null\");\n" - " static_state(x.pY->p0, \"\");\n" - " static_state(x.pY->p2, \"\");\n" - " static_state(x.pY->i2, \"\");\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "int main() { \n" + " struct X x = {0}; \n" + " static_state(x.text, \"null\");\n" + " static_state(x.p1, \"null\");\n" + " static_state(x.i, \"zero\");\n" + " static_state(x.pY, \"null\");\n" + " static_state(x.pY->p0, \"\");\n" + " static_state(x.pY->p2, \"\");\n" + " static_state(x.pY->i2, \"\");\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void empty_initialized() { - const char* source - = - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "int main() { \n" - " struct X x = {}; \n" - " static_state(x.text, \"null\");\n" - " static_state(x.p1, \"null\");\n" - " static_state(x.i, \"zero\");\n" - " static_state(x.pY, \"null\");\n" - " static_state(x.pY->p0, \"\");\n" - " static_state(x.pY->p2, \"\");\n" - " static_state(x.pY->i2, \"\");\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "int main() { \n" + " struct X x = {}; \n" + " static_state(x.text, \"null\");\n" + " static_state(x.p1, \"null\");\n" + " static_state(x.i, \"zero\");\n" + " static_state(x.pY, \"null\");\n" + " static_state(x.pY->p0, \"\");\n" + " static_state(x.pY->p2, \"\");\n" + " static_state(x.pY->i2, \"\");\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void calloc_state() { - const char* source - = - "\n" - "void* _Owner calloc(unsigned long n , unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "int main() { \n" - " struct X * _Owner x = calloc(1,sizeof * x);\n" - " static_state(x, \"maybe-null\");\n" - "\n" - " static_state(x->p1, \"null\");\n" - " static_state(x->i, \"zero\");\n" - " static_state(x->pY, \"null\");\n" - " static_state(x->pY->p0, \"uninitialized\");\n" - " static_state(x->pY->p2, \"uninitialized\");\n" - " static_state(x->pY->i2, \"uninitialized\"); \n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner calloc(unsigned long n , unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "int main() { \n" + " struct X * _Owner x = calloc(1,sizeof * x);\n" + " static_state(x, \"maybe-null\");\n" + "\n" + " static_state(x->p1, \"null\");\n" + " static_state(x->i, \"zero\");\n" + " static_state(x->pY, \"null\");\n" + " static_state(x->pY->p0, \"uninitialized\");\n" + " static_state(x->pY->p2, \"uninitialized\");\n" + " static_state(x->pY->i2, \"uninitialized\"); \n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void malloc_initialization() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "int main() { \n" - " struct X * _Owner x = malloc(sizeof * x);\n" - " static_state(x, \"maybe-null\");\n" - "\n" - " static_state(x->p1, \"uninitialized\");\n" - " static_state(x->i, \"uninitialized\");\n" - " static_state(x->pY, \"uninitialized\");\n" - " static_state(x->pY->p0, \"\");\n" - " static_state(x->pY->p2, \"\");\n" - " static_state(x->pY->i2, \"\"); \n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "int main() { \n" + " struct X * _Owner x = malloc(sizeof * x);\n" + " static_state(x, \"maybe-null\");\n" + "\n" + " static_state(x->p1, \"uninitialized\");\n" + " static_state(x->i, \"uninitialized\");\n" + " static_state(x->pY, \"uninitialized\");\n" + " static_state(x->pY->p0, \"\");\n" + " static_state(x->pY->p2, \"\");\n" + " static_state(x->pY->i2, \"\"); \n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void valid_but_unkown_result() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "struct X f();\n" - "\n" - "int main() { \n" - " struct X x;\n" - " x = f();\n" - "\n" - " static_state(x.p1, \"maybe-null\");\n" - " static_state(x.i, \"any\");\n" - " static_state(x.pY, \"maybe-null\");\n" - " static_state(x.pY->p0, \"maybe-null\");\n" - " static_state(x.pY->p2, \"maybe-null\");\n" - " static_state(x.pY->i2, \"any\"); \n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "struct X f();\n" + "\n" + "int main() { \n" + " struct X x;\n" + " x = f();\n" + "\n" + " static_state(x.p1, \"maybe-null\");\n" + " static_state(x.i, \"any\");\n" + " static_state(x.pY, \"maybe-null\");\n" + " static_state(x.pY->p0, \"maybe-null\");\n" + " static_state(x.pY->p2, \"maybe-null\");\n" + " static_state(x.pY->i2, \"any\"); \n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void calling_non_const_func() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char * _Owner p0;\n" - " int * _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - " int * _Owner p1;\n" - " int i;\n" - " struct Y *pY;\n" - "};\n" - "\n" - "void init(struct X * p);\n" - "\n" - "int main() { \n" - " struct X x;\n" - " /*lying here, to avoid error of using uninitialized*/\n" - " static_set(x,\"zero\");\n" - " init(&x);\n" - "\n" - " static_state(x.p1, \"maybe-null\");\n" - " static_state(x.i, \"any\");\n" - " static_state(x.pY, \"maybe-null\");\n" - " static_state(x.pY->p0, \"maybe-null\");\n" - " static_state(x.pY->p2, \"maybe-null\");\n" - " static_state(x.pY->i2, \"any\"); \n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char * _Owner p0;\n" + " int * _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + " int * _Owner p1;\n" + " int i;\n" + " struct Y *pY;\n" + "};\n" + "\n" + "void init(struct X * p);\n" + "\n" + "int main() { \n" + " struct X x;\n" + " /*lying here, to avoid error of using uninitialized*/\n" + " static_set(x,\"zero\");\n" + " init(&x);\n" + "\n" + " static_state(x.p1, \"maybe-null\");\n" + " static_state(x.i, \"any\");\n" + " static_state(x.pY, \"maybe-null\");\n" + " static_state(x.pY->p0, \"maybe-null\");\n" + " static_state(x.pY->p2, \"maybe-null\");\n" + " static_state(x.pY->i2, \"any\"); \n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void calling_const_func() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct Y {\n" - " char* _Owner p0;\n" - " int* _Owner p2;\n" - " double i2;\n" - "};\n" - "\n" - "struct X {\n" - " char* _Owner text;\n" - " int* _Owner p1;\n" - " int i;\n" - " struct Y* pY;\n" - "};\n" - "\n" - "void f(const struct X* p);\n" - "\n" - "int main()\n" - "{\n" - " struct X x = {0};\n" - " f(&x);\n" - "\n" - " static_state(x.p1, \"null\");\n" - " static_state(x.i, \"zero\");\n" - " static_state(x.pY, \"null\");\n" - " static_state(x.pY->p0, \"\");\n" - " static_state(x.pY->p2, \"\");\n" - " static_state(x.pY->i2, \"\");\n" - "\n" - " free(x);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct Y {\n" + " char* _Owner p0;\n" + " int* _Owner p2;\n" + " double i2;\n" + "};\n" + "\n" + "struct X {\n" + " char* _Owner text;\n" + " int* _Owner p1;\n" + " int i;\n" + " struct Y* pY;\n" + "};\n" + "\n" + "void f(const struct X* p);\n" + "\n" + "int main()\n" + "{\n" + " struct X x = {0};\n" + " f(&x);\n" + "\n" + " static_state(x.p1, \"null\");\n" + " static_state(x.i, \"zero\");\n" + " static_state(x.pY, \"null\");\n" + " static_state(x.pY->p0, \"\");\n" + " static_state(x.pY->p2, \"\");\n" + " static_state(x.pY->i2, \"\");\n" + "\n" + " free(x);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void pointer_to_owner() { - const char* source - = - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "struct X {\n" - " char * _Owner text;\n" - "};\n" - "\n" - "void f(struct X * _Owner p1, struct X * _Owner* p2){\n" - " *p2 = p1;\n" - "}\n" - "\n" - "int main() { \n" - " struct X * _Owner p1 = malloc(sizeof * p1);\n" - " p1->text = 0;\n" - " struct X * _Owner p2 = 0;\n" - " f(p1, &p2);\n" - " \n" - " free(p2->text);\n" - " free(p2);\n" - "}\n" - "\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "struct X {\n" + " char * _Owner text;\n" + "};\n" + "\n" + "void f(struct X * _Owner p1, struct X * _Owner* p2){\n" + " *p2 = p1;\n" + "}\n" + "\n" + "int main() { \n" + " struct X * _Owner p1 = malloc(sizeof * p1);\n" + " p1->text = 0;\n" + " struct X * _Owner p2 = 0;\n" + " f(p1, &p2);\n" + " \n" + " free(p2->text);\n" + " free(p2);\n" + "}\n" + "\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void socket_sample() { - const char* source - = - "_Owner int socket();\n" - "void close(_Owner int fd);\n" - "\n" - "int main()\n" - "{\n" - " _Owner int fd;\n" - " \n" - " fd = socket();\n" - " if (fd < 0)\n" - " {\n" - " static_set(fd, \"null\"); \n" - " return 1;\n" - " }\n" - " close(fd);\n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "_Owner int socket();\n" + "void close(_Owner int fd);\n" + "\n" + "int main()\n" + "{\n" + " _Owner int fd;\n" + " \n" + " fd = socket();\n" + " if (fd < 0)\n" + " {\n" + " static_set(fd, \"null\"); \n" + " return 1;\n" + " }\n" + " close(fd);\n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void return_object() { - const char* source - = - "char * _Owner strdup(const char* s);\n" - "void free(void * _Owner p);\n" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "struct X make()\n" - "{\n" - " struct X x = {0};\n" - " x.name = strdup(\"text\"); \n" - " return x;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "char * _Owner strdup(const char* s);\n" + "void free(void * _Owner p);\n" + "\n" + "struct X {\n" + " char *_Owner name;\n" + "};\n" + "\n" + "struct X make()\n" + "{\n" + " struct X x = {0};\n" + " x.name = strdup(\"text\"); \n" + " return x;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void return_bad_object() { - const char* source - = - "char * _Owner strdup(const char* s);\n" - "void free(void * _Owner p);\n" - "\n" - "struct X {\n" - " char *_Owner name;\n" - "};\n" - "\n" - "struct X make()\n" - "{\n" - " struct X x = {0};\n" - " x.name = strdup(\"text\"); \n" - " free(x.name)\n" - " return x;\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "char * _Owner strdup(const char* s);\n" + "void free(void * _Owner p);\n" + "\n" + "struct X {\n" + " char *_Owner name;\n" + "};\n" + "\n" + "struct X make()\n" + "{\n" + " struct X x = {0};\n" + " x.name = strdup(\"text\"); \n" + " free(x.name)\n" + " return x;\n" + "}\n" + ""; + assert(compile_with_errors(true, false, source)); } void null_to_owner() { - const char* source - = - "\n" - "void f(int * _Owner p);\n" - "int main()\n" - "{\n" - " int * _Owner p = 0;\n" - " p = ((void *) 0); \n" - " f(0);\n" - " f((void *) 0);\n" - " f(nullptr);\n" - "}\n"; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "void f(int * _Owner p);\n" + "int main()\n" + "{\n" + " int * _Owner p = 0;\n" + " p = ((void *) 0); \n" + " f(0);\n" + " f((void *) 0);\n" + " f(nullptr);\n" + "}\n"; + assert(compile_without_errors(true, false, source)); } void return_true_branch() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "void f5()\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (p) {\n" - " free(p);\n" - " return;\n" - " }\n" - " \n" - " static_state(p, \"null\"); \n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "void f5()\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (p) {\n" + " free(p);\n" + " return;\n" + " }\n" + " \n" + " static_state(p, \"null\"); \n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void flow_tests() { - const char* source - = - "\n" - "\n" - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "void f1()\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " if (p) {\n" - " static_state(p, \"not-null\");\n" - " }\n" - "\n" - " static_state(p, \"maybe-null\");\n" - " free(p);\n" - "}\n" - "\n" - "void f2(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " if (condition) {\n" - " static_state(p, \"maybe-null\");\n" - " }\n" - "\n" - " static_state(p, \"maybe-null\");\n" - " static_set(p, \"null\");\n" - "}\n" - "\n" - "void f3(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (condition) {\n" - " free(p);\n" - " }\n" - " else {\n" - " free(p);\n" - " }\n" - "\n" - " static_state(p, \"uninitialized\"); \n" - "}\n" - "\n" - "void f3(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (condition) {\n" - " \n" - " }\n" - " else {\n" - " free(p);\n" - " }\n" - "\n" - " static_state(p, \"uninitialized or maybe_null\"); \n" - " static_set(p, \"null\");\n" - "}\n" - "\n" - "\n" - "void f4(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (condition) {\n" - " free(p);\n" - " }\n" - " else {\n" - " \n" - " }\n" - "\n" - " static_state(p, \"uninitialized or maybe_null\"); \n" - " static_set(p, \"null\");\n" - "}\n" - "\n" - "void f5(int condition)\n" - "{\n" - " void * _Owner p = malloc(1);\n" - " \n" - " if (p) {\n" - " free(p);\n" - " return;\n" - " }\n" - " \n" - " static_state(p, \"null\"); \n" - "}\n" - "\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "\n" + "\n" + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "void f1()\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " if (p) {\n" + " static_state(p, \"not-null\");\n" + " }\n" + "\n" + " static_state(p, \"maybe-null\");\n" + " free(p);\n" + "}\n" + "\n" + "void f2(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " if (condition) {\n" + " static_state(p, \"maybe-null\");\n" + " }\n" + "\n" + " static_state(p, \"maybe-null\");\n" + " static_set(p, \"null\");\n" + "}\n" + "\n" + "void f3(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (condition) {\n" + " free(p);\n" + " }\n" + " else {\n" + " free(p);\n" + " }\n" + "\n" + " static_state(p, \"uninitialized\"); \n" + "}\n" + "\n" + "void f3(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (condition) {\n" + " \n" + " }\n" + " else {\n" + " free(p);\n" + " }\n" + "\n" + " static_state(p, \"uninitialized or maybe_null\"); \n" + " static_set(p, \"null\");\n" + "}\n" + "\n" + "\n" + "void f4(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (condition) {\n" + " free(p);\n" + " }\n" + " else {\n" + " \n" + " }\n" + "\n" + " static_state(p, \"uninitialized or maybe_null\"); \n" + " static_set(p, \"null\");\n" + "}\n" + "\n" + "void f5(int condition)\n" + "{\n" + " void * _Owner p = malloc(1);\n" + " \n" + " if (p) {\n" + " free(p);\n" + " return;\n" + " }\n" + " \n" + " static_state(p, \"null\"); \n" + "}\n" + "\n" + ""; + assert(compile_without_errors(true, false, source)); } void member() { - const char* source - = - "struct X {\n" - " union {\n" - " struct {\n" - " int *pSelect;\n" - " } view;\n" - " }u;\n" - "};\n" - "\n" - "int main()\n" - "{\n" - " struct X t;\n" - " t.u.view.pSelect = 0;\n" - "}\n" - ""; - assert(compile_without_errors(true, false, source)); + const char* source + = + "struct X {\n" + " union {\n" + " struct {\n" + " int *pSelect;\n" + " } view;\n" + " }u;\n" + "};\n" + "\n" + "int main()\n" + "{\n" + " struct X t;\n" + " t.u.view.pSelect = 0;\n" + "}\n" + ""; + assert(compile_without_errors(true, false, source)); } void loop_leak() { - const char* source - = - "void* _Owner malloc(unsigned long size);\n" - "void free(void* _Owner ptr);\n" - "\n" - "int main() {\n" - " void * _Owner p = 0;\n" - " for (int i=0; i < 2; i++) {\n" - " p = malloc(1);\n" - " }\n" - " free(p);\n" - "}"; - assert(compile_with_errors(true, false, source)); + const char* source + = + "void* _Owner malloc(unsigned long size);\n" + "void free(void* _Owner ptr);\n" + "\n" + "int main() {\n" + " void * _Owner p = 0;\n" + " for (int i=0; i < 2; i++) {\n" + " p = malloc(1);\n" + " }\n" + " free(p);\n" + "}"; + assert(compile_with_errors(true, false, source)); } void out_parameter() { - const char* source - = - "void free(void* _Owner p);\n" - "char* _Owner strdup(const char* s);\n" - "\n" - "struct X {\n" - " char* _Owner s;\n" - "};\n" - "void init(_Out struct X * px)\n" - "{\n" - " static_state(px, \"maybe-null\");\n" - " static_state(px->s, \"uninitialized\");\n" - " px->s = strdup(\"a\");\n" - "}\n" - "\n" - "int main() {\n" - " struct X x;\n" - " init(&x);\n" - " free(x.s);\n" - "}"; - - assert(compile_without_errors(true, false, source)); + const char* source + = + "void free(void* _Owner p);\n" + "char* _Owner strdup(const char* s);\n" + "\n" + "struct X {\n" + " char* _Owner s;\n" + "};\n" + "void init(_Out struct X * px)\n" + "{\n" + " static_state(px, \"maybe-null\");\n" + " static_state(px->s, \"uninitialized\");\n" + " px->s = strdup(\"a\");\n" + "}\n" + "\n" + "int main() {\n" + " struct X x;\n" + " init(&x);\n" + " free(x.s);\n" + "}"; + + assert(compile_without_errors(true, false, source)); } void lvalue_required_1() { - const char* source - = - "int main()\n" - "{\n" - " 1++;\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "int main()\n" + "{\n" + " 1++;\n" + "}\n" + ""; + assert(compile_with_errors(true, false, source)); } void lvalue_required_2() { - const char* source - = - "int main()\n" - "{\n" - " 1--;\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "int main()\n" + "{\n" + " 1--;\n" + "}\n" + ""; + assert(compile_with_errors(true, false, source)); } void lvalue_required_3() { - const char* source - = - "int main()\n" - "{\n" - " int * p = &1;\n" - "}\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "int main()\n" + "{\n" + " int * p = &1;\n" + "}\n" + ""; + assert(compile_with_errors(true, false, source)); } void lvalue_required_4() { - const char* source - = - "struct X { int i; };\n" - "struct X f() {\n" - " struct X x = {};\n" - " return x;\n" - "}\n" - "int main() {\n" - " f().i = 1;\n" - "}\n" - "\n" - ""; - assert(compile_with_errors(true, false, source)); + const char* source + = + "struct X { int i; };\n" + "struct X f() {\n" + " struct X x = {};\n" + " return x;\n" + "}\n" + "int main() {\n" + " f().i = 1;\n" + "}\n" + "\n" + ""; + assert(compile_with_errors(true, false, source)); } void null_check_1() { - const char* source - = - "void f(int *p)\n" - "{\n" - " static_state(p, \"not-null\");\n" - "}\n" - ""; - assert(compile_without_errors(true, true, source)); + const char* source + = + "void f(int *p)\n" + "{\n" + " static_state(p, \"not-null\");\n" + "}\n" + ""; + assert(compile_without_errors(true, true, source)); } void null_check_2() { - const char* source - = - "void f(int *p)\n" - "{\n" - " static_state(p, \"maybe-null\");\n" - "}\n" - ""; - assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "void f(int *p)\n" + "{\n" + " static_state(p, \"maybe-null\");\n" + "}\n" + ""; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } void compound_literal_object() { - const char* source - = - "struct X { int i; void* p; }\n" - "int main() {\n" - " struct X x;\n" - " x = (struct X){ 0 };\n" - " static_state(x.i, \"zero\");\n" - " static_state(x.p, \"null\");\n" - "}"; - assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "struct X { int i; void* p; }\n" + "int main() {\n" + " struct X x;\n" + " x = (struct X){ 0 };\n" + " static_state(x.i, \"zero\");\n" + " static_state(x.p, \"null\");\n" + "}"; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } void bounds_check1() { - const char* source - = - "int main() {\n" - " int a[5];\n" - " int i = a[5];\n" - "}"; - assert(compile_with_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "int main() {\n" + " int a[5] = {0};\n" + " int i = a[5];\n" + "}\n" + "#pragma cake diagnostic check \"-Wout-of-bounds\""; + + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } void bounds_check2() { - const char* source - = - "void f1(int array[5])\n" - "{\n" - " int i = array[5];\n" - "}\n" - ""; - - assert(compile_with_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "void f1(int array[5])\n" + "{\n" + " int i = array[5];\n" + "}\n" + "#pragma cake diagnostic check \"-Wout-of-bounds\"\n"; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } void uninitialized_objects_passed_to_variadic_function() { - const char* source - = - "void f(char* s, ...);\n" - "int main() {\n" - " int i;\n" - " f(\"\", i);\n" - " return 0;\n" - "}"; - assert(compile_with_errors(true, false /*nullcheck disabled*/, source)); + const char* source + = + "void f(char* s, ...);\n" + "int main() {\n" + " int i;\n" + " f(\"\", i);\n" + "//first pass analyze\n" + "#pragma cake diagnostic check \"-uninitialized\"\n" + " return 0;\n" + "}\n" + "void dummy()\n" + "{\n" + "} \n" + "//flow analyze\n" + "#pragma cake diagnostic check \"-Wmaybe-uninitialized\"\n" + "\n" + ""; + + assert(compile_without_errors(true, false, source)); } void nullderef() { - const char* source - = - "\n" - "int main() {\n" - " int* ptr = 0;\n" - " int k = *ptr;\n" - " k = 0;\n" - " return 0;\n" - "}"; + const char* source + = + "\n" + "int main() {\n" + " int* ptr = 0;\n" + " int k = *ptr;\n" + " k = 0;\n" + " return 0;\n" + "}\n" + "\n" + "void dummy()\n" + "{\n" + "} \n" + "\n" + "#pragma cake diagnostic check \"-Wanalyzer-null-dereference\"\n" + ""; + + - assert(compile_with_errors(true, false /*nullcheck disabled*/, source)); + assert(compile_without_errors(true, false, source)); } void for_loop_visit() { - /* checks state of j #84 */ - const char* source - = - "int main()\n" - "{\n" - " int j;\n" - " for (j = 0; j <10; j++) {}\n" - " return j;\n" - "}"; - assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); + /* checks state of j #84 */ + const char* source + = + "int main()\n" + "{\n" + " int j;\n" + " for (j = 0; j <10; j++) {}\n" + " return j;\n" + "}"; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); +} + +void uninitialized_object() +{ + const char* source + = + "int main() {\n" + " int i;\n" + " int k;\n" + " k = 1 + i;\n" + "}"; + + struct options options = { .input = LANGUAGE_C99, .flow_analysis = true, .diagnostic_stack[0].warnings = (~0 & ~WARNING_FLAG(W_STYLE)) }; + struct report report = { 0 }; + get_ast(&options, "source", source, &report); + assert(report.warnings_count == 1); +} + +void calloc_builtin_semantics() { + const char* source + = + "struct X { int i; void* p; };\n" + "void* _Owner calloc(int i, int sz);\n" + "int main() \n" + "{\n" + " struct X* _Owner p = calloc(1, 1);\n" + " static_state(p, \"maybe-null\");\n" + " static_state(p->i, \"zero\");\n" //if p is not null then.. + " static_state(p->p, \"null\");\n" //if p is not null then.. + "}\n" + ""; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); +} +void malloc_builtin_semantics() { +const char* source += +"struct X { int i; void* p; };\n" +"void* _Owner malloc(int sz);\n" +"int main() \n" +"{\n" +" struct X* _Owner p = malloc(1);\n" +" static_state(p, \"maybe-null\");\n" +" static_state(p->i, \"uninitialized\");\n" +" static_state(p->p, \"uninitialized\");\n" +"}\n" +"\n" +"\n" +"void dummy() {}\n" +"#pragma cake diagnostic check \"-Wmissing-destructor\""; +assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); +} +void discard_qualifier_test() +{ + const char* source + = + "struct X { int i; void* p; };\n" + "void f(struct X* p) {}\n" + "\n" + "int main()\n" + "{\n" + " const struct X x = {0};\n" + " f(&x);\n" + "}\n" + "#pragma cake diagnostic check \"-Wdiscarded-qualifiers\""; + assert(compile_without_errors(true, false /*nullcheck disabled*/, source)); } #endif diff --git a/src/token.c b/src/token.c index 209df51e..7985ba9c 100644 --- a/src/token.c +++ b/src/token.c @@ -1,12 +1,14 @@ #include "ownership.h" -#include #include #include #include +#include + #include "console.h" #include "osstream.h" #include "tokenizer.h" + #ifdef _WIN32 #include #endif @@ -20,6 +22,20 @@ #include #endif +/* + PROVISORY - unchecked was removed, now we control flow ownerhip error with pragma + TODO review alternatives from Domingo's branch. +*/ +#ifdef __CAKE__ +#pragma cake diagnostic push +#pragma cake diagnostic ignored "-Wdiscard-owner" +#pragma cake diagnostic ignored "-Wmissing-destructor" +#pragma cake diagnostic ignored "-Wnon-owner-move" +#pragma cake diagnostic ignored "-Wnon-owner-to-owner-move" +#endif + +//#pragma cake diagnostic pop + bool style_has_space(const struct token* token) { return token_is_blank(token->prev); @@ -79,33 +95,31 @@ void token_range_add_flag(struct token* first, struct token* last, enum token_fl } } -void token_list_pop_back(struct token_list* list) unchecked +void token_list_pop_back(struct token_list* list) /*unchecked*/ { if (list->head == NULL) - return ; + return; - struct token* p = list->tail; if (list->head == list->tail) { + token_delete(list->head); list->head = NULL; list->tail = NULL; } else { - list->tail = list->tail->prev; + struct token* owner p = list->tail->prev->next; + list->tail = p->prev; list->tail->next = NULL; if (list->tail == list->head) { list->tail->prev = NULL; } + token_delete(p); } - p->next = NULL; - p->prev = NULL; - p->next = NULL; - token_delete(p); } -void token_list_pop_front(struct token_list* list) unchecked +void token_list_pop_front(struct token_list* list) /*unchecked*/ { if (list->head == NULL) return; @@ -119,19 +133,19 @@ void token_list_pop_front(struct token_list* list) unchecked } else { - list->head = list->head->next; + list->head = p->next; } p->next = NULL; - p->prev = NULL; + p->prev = NULL; token_delete(p); } -struct token* owner token_list_pop_front_get(struct token_list* list) unchecked +struct token* owner token_list_pop_front_get(struct token_list* list) /*unchecked*/ { if (list->head == NULL) return NULL; - struct token* p = list->head; + struct token* owner p = list->head; if (list->head == list->tail) { @@ -140,7 +154,7 @@ struct token* owner token_list_pop_front_get(struct token_list* list) unchecked } else { - list->head = list->head->next; + list->head = p->next; } p->next = NULL; p->prev = NULL; @@ -148,7 +162,7 @@ struct token* owner token_list_pop_front_get(struct token_list* list) unchecked return p; } -void token_list_swap(struct token_list* a, struct token_list* b) +void token_list_swap(struct token_list* a, struct token_list* b) { struct token_list temp = *a; *a = *b; @@ -196,7 +210,7 @@ void token_list_destroy(struct token_list* obj_owner list) char* owner token_list_join_tokens(struct token_list* list, bool bliteral) { - struct osstream ss = {0}; + struct osstream ss = { 0 }; if (bliteral) ss_fprintf(&ss, "\""); bool has_space = false; @@ -241,7 +255,7 @@ char* owner token_list_join_tokens(struct token_list* list, bool bliteral) return cstr; } -void token_list_insert_after(struct token_list* token_list, struct token* after, struct token_list* append_list) +void token_list_insert_after(struct token_list* token_list, struct token* after, struct token_list* append_list) { if (append_list->head == NULL) return; @@ -278,7 +292,7 @@ void token_list_insert_after(struct token_list* token_list, struct token* after, } -struct token* token_list_add(struct token_list* list, struct token* owner pnew) unchecked +struct token* token_list_add(struct token_list* list, struct token* owner pnew) /*unchecked*/ { /*evitar que sem querer esteja em 2 listas diferentes*/ assert(pnew->next == NULL); @@ -349,7 +363,7 @@ void token_list_append_list_at_beginning(struct token_list* dest, struct token_l source->tail = NULL; } -void token_list_append_list(struct token_list* dest, struct token_list* source) +void token_list_append_list(struct token_list* dest, struct token_list* source) { if (source->head == NULL) { @@ -372,12 +386,12 @@ void token_list_append_list(struct token_list* dest, struct token_list* source) } -struct token* owner clone_token(struct token* p) unchecked +struct token* owner clone_token(struct token* p) /*unchecked*/ { struct token* owner token = calloc(1, sizeof * token); if (token) { - *token = *p; + *token = *p; token->lexeme = strdup(p->lexeme); token->next = NULL; token->prev = NULL; @@ -385,10 +399,12 @@ struct token* owner clone_token(struct token* p) unchecked return token; } -struct token_list token_list_remove_get(struct token_list* list, struct token* first, struct token* last) unchecked + + +struct token_list token_list_remove_get(struct token_list* list, struct token* first, struct token* last) /*unchecked*/ { - struct token_list r = {0}; + struct token_list r = { 0 }; struct token* before_first = first->prev; struct token* owner after_last = last->next; @@ -406,6 +422,7 @@ struct token_list token_list_remove_get(struct token_list* list, struct token* f } + void token_list_remove(struct token_list* list, struct token* first, struct token* last) { struct token_list r = token_list_remove_get(list, first, last); @@ -434,7 +451,7 @@ void print_list(struct token_list* list) //printf("`"); } print_literal2(current->lexeme); - printf(RESET); + COLOR_ESC_PRINT(printf(RESET)); if (current == list->tail) { //printf("`"); @@ -457,11 +474,11 @@ void print_literal2(const char* s) { switch (*s) { - case '\n': - printf("\\n"); - break; - default: - printf("%c", *s); + case '\n': + printf("\\n"); + break; + default: + printf("%c", *s); } s++; } @@ -476,18 +493,18 @@ void print_token(struct token* p_token) printf(" "); } if (p_token->flags & TK_FLAG_FINAL) - printf(LIGHTGREEN); + COLOR_ESC_PRINT(printf(LIGHTGREEN)); else - printf(LIGHTGRAY); - char buffer0[50] = {0}; + COLOR_ESC_PRINT(printf(LIGHTGRAY)); + char buffer0[50] = { 0 }; snprintf(buffer0, sizeof buffer0, "%d:%d", p_token->line, p_token->col); printf("%-6s ", buffer0); printf("%-20s ", get_token_name(p_token->type)); if (p_token->flags & TK_FLAG_MACRO_EXPANDED) { - printf(LIGHTCYAN); + COLOR_ESC_PRINT(printf(LIGHTCYAN)); } - char buffer[50] = {0}; + char buffer[50] = { 0 }; strcat(buffer, "["); if (p_token->flags & TK_FLAG_FINAL) { @@ -513,7 +530,7 @@ void print_token(struct token* p_token) printf("%-20s ", buffer); print_literal2(p_token->lexeme); printf("\n"); - printf(RESET); + COLOR_ESC_PRINT(printf(RESET)); } void print_tokens(struct token* p_token) @@ -527,7 +544,7 @@ void print_tokens(struct token* p_token) } printf("\n"); printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" RESET); - printf(RESET); + COLOR_ESC_PRINT(printf(RESET)); } @@ -641,9 +658,9 @@ void print_line_and_token(const struct token* p_token, bool visual_studio_ouput_ int line = p_token->line; if (!visual_studio_ouput_format) - printf(LIGHTGRAY); + COLOR_ESC_PRINT(printf(LIGHTGRAY)); - char nbuffer[20] = {0}; + char nbuffer[20] = { 0 }; int n = snprintf(nbuffer, sizeof nbuffer, "%d", line); printf(" %s |", nbuffer); @@ -688,7 +705,7 @@ void print_line_and_token(const struct token* p_token, bool visual_studio_ouput_ printf("\n"); if (!visual_studio_ouput_format) - printf(LIGHTGRAY); + COLOR_ESC_PRINT(printf(LIGHTGRAY)); printf(" %*s |", n, " "); if (p_token) @@ -700,11 +717,11 @@ void print_line_and_token(const struct token* p_token, bool visual_studio_ouput_ } if (!visual_studio_ouput_format) - printf(LIGHTGREEN); + COLOR_ESC_PRINT(printf(LIGHTGREEN)); printf("^"); - char* p = p_token->lexeme + 1; + char* p = (p_token->lexeme && *p_token->lexeme) ? p_token->lexeme + 1 : NULL; while (p && *p) { printf("~"); @@ -712,7 +729,9 @@ void print_line_and_token(const struct token* p_token, bool visual_studio_ouput_ } if (!visual_studio_ouput_format) - printf(RESET); + COLOR_ESC_PRINT(printf(RESET)); printf("\n"); } + + diff --git a/src/token.h b/src/token.h index 1dd11024..b7277f48 100644 --- a/src/token.h +++ b/src/token.h @@ -4,6 +4,7 @@ enum token_type { + /*When changing here we need also change in tokenizer.c::get_token_name*/ TK_NONE = 0, TK_NEWLINE = '\n', TK_WHITE_SPACE = ' ', diff --git a/src/tokenizer.c b/src/tokenizer.c index 014ca914..bdeae4fb 100644 --- a/src/tokenizer.c +++ b/src/tokenizer.c @@ -77,11 +77,7 @@ void naming_convention_macro(struct preprocessor_ctx* ctx, struct token* token); /////////////////////////////////////////////////////////////////////////////// -static bool preprocessor_is_warning_enabled(const struct preprocessor_ctx* ctx, enum warning w) -{ - return - (ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] & w) != 0; -} + struct macro_parameter { @@ -178,81 +174,63 @@ static void tokenizer_set_warning(struct tokenizer_ctx* ctx, struct stream* stre #endif } -void preprocessor_set_info_with_token(struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...) + +bool preprocessor_diagnostic_message(enum diagnostic_id w, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...) { -#ifndef TEST - if (p_token) - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); + bool is_error = false; + bool is_warning = false; + bool is_note = false; - char buffer[200] = { 0 }; - va_list args; - va_start(args, fmt); - /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); + if (p_token && p_token->level != 0) + { + //no message for include dir + return false; + } - if (ctx->options.visual_studio_ouput_format) - { - printf("note: " "%s\n", buffer); - } - else - { - printf(LIGHTCYAN "note: " WHITE "%s\n", buffer); - } - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); -#endif + if (w > W_NOTE) + { + is_error = true; + } + else + { + is_error = + (ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].errors & (1ULL << w)) != 0; -} + is_warning = + (ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings & (1ULL << w)) != 0; -void preprocessor_set_warning_with_token(enum warning w, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...) -{ - if (w != W_NONE) - { - /* - we dont warn ing code inside includes, except #warning (w == 0) - */ - if (p_token->level != 0) - return; + is_note = + ((ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].notes & (1ULL << w)) != 0); + } - if (!preprocessor_is_warning_enabled(ctx, w)) - { - return; - } - } - ctx->n_warnings++; -#ifndef TEST - if (p_token) - print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); - char buffer[200] = { 0 }; - va_list args; - va_start(args, fmt); - /*int n =*/ vsnprintf(buffer, sizeof(buffer), fmt, args); - va_end(args); - if (ctx->options.visual_studio_ouput_format) - { - printf("warning: " "%s\n", buffer); - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); - } - else - { - printf(LIGHTMAGENTA "warning: " WHITE "%s\n", buffer); - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); + if (is_error) + { + ctx->n_errors++; + } + else if (is_warning) + { + ctx->n_warnings++; + } + else if (is_note) + { + + } + else + { + return false; + } + - } -#endif -} -void preprocessor_set_error_with_token(enum error error, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...) -{ - ctx->n_errors++; #ifndef TEST - if (p_token) + if (p_token && p_token->token_origin) print_position(p_token->token_origin->lexeme, p_token->line, p_token->col, ctx->options.visual_studio_ouput_format); char buffer[200] = { 0 }; @@ -263,20 +241,33 @@ void preprocessor_set_error_with_token(enum error error, struct preprocessor_ctx if (ctx->options.visual_studio_ouput_format) { - printf("error: " "%s\n", buffer); + if (is_warning) + printf("warning: " "%s\n", buffer); + else if (is_error) + printf("warning: " "%s\n", buffer); + else if (is_note) + printf("note: " "%s\n", buffer); + + print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); } else { - printf(LIGHTRED"error: " WHITE "%s\n", buffer); - } + if (is_error) + printf(LIGHTRED "error: " WHITE "%s\n", buffer); + else if (is_warning) + printf(LIGHTMAGENTA "warning: " WHITE "%s\n", buffer); + else if (is_note) + printf(LIGHTCYAN "note: " WHITE "%s\n", buffer); - print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); + print_line_and_token(p_token, ctx->options.visual_studio_ouput_format); + + } #endif + return true; } - struct include_dir* include_dir_add(struct include_dir_list* list, const char* path) { struct include_dir* owner p_new_include_dir = calloc(1, sizeof * p_new_include_dir); @@ -295,15 +286,43 @@ struct include_dir* include_dir_add(struct include_dir_list* list, const char* p return list->tail; } +static char * owner readFilePath(struct preprocessor_ctx* ctx, + const char *current_file_dir, const char *path, + bool* p_already_included, + char full_path_out[], /*this is the final full path of the file*/ + int full_path_out_size) +{ + char newpath[200] = { 0 }; + snprintf(newpath, sizeof newpath, "%s/%s", current_file_dir, path); + +#ifdef __EMSCRIPTEN__ + /*realpath returns empty on emscriptem*/ + snprintf(full_path_out, full_path_out_size, "%s", newpath); +#else + if(!realpath(newpath, full_path_out)) + full_path_out[0] = '\0'; +#endif + + + if (hashmap_find(&ctx->pragma_once_map, full_path_out) != NULL) + { + *p_already_included = true; + return NULL; + } + + return read_file(full_path_out); +} + const char* owner find_and_read_include_file(struct preprocessor_ctx* ctx, const char* path, /*as in include*/ const char* current_file_dir, /*this is the dir of the file that includes*/ bool* p_already_included, /*out file alread included pragma once*/ + bool is_system_include, /* to decide the search order */ char full_path_out[], /*this is the final full path of the file*/ int full_path_out_size) { - + char* owner content; full_path_out[0] = '\0'; if (path_is_absolute(path)) @@ -325,28 +344,15 @@ const char* owner find_and_read_include_file(struct preprocessor_ctx* ctx, } - - char newpath[200] = { 0 }; - snprintf(newpath, sizeof newpath, "%s/%s", current_file_dir, path); - -#ifdef __EMSCRIPTEN__ - /*realpath returns empty on emscriptem*/ - snprintf(full_path_out, full_path_out_size, "%s", newpath); -#else - realpath(newpath, full_path_out); -#endif - - - if (hashmap_find(&ctx->pragma_once_map, full_path_out) != NULL) - { - *p_already_included = true; - return NULL; - } - - char* owner content = read_file(full_path_out); - if (content != NULL) - return content; - + if(!is_system_include) + { + content = readFilePath(ctx, current_file_dir, path, + p_already_included, full_path_out, full_path_out_size); + if (content != NULL) + return content; + if (*p_already_included) + return NULL; + } struct include_dir* current = ctx->include_dir.head; while (current) @@ -374,6 +380,15 @@ const char* owner find_and_read_include_file(struct preprocessor_ctx* ctx, } current = current->next; } + if(is_system_include) + { + content = readFilePath(ctx, current_file_dir, path, + p_already_included, full_path_out, full_path_out_size); + if (content != NULL) + return content; + if (*p_already_included) + return NULL; + } full_path_out[0] = '\0'; return NULL; } @@ -1248,11 +1263,11 @@ struct token* owner ppnumber(struct stream* stream) (stream->current[1] == '+' || stream->current[1] == '-')) { stream_match(stream);//e E p P - stream_match(stream);//sign + stream_match(stream);//sign } else if (stream->current[0] == '.') { - stream_match(stream);//. + stream_match(stream);//. } else if (is_digit(stream) || is_nondigit(stream)) { @@ -1288,15 +1303,15 @@ struct token_list embed_tokenizer(struct preprocessor_ctx* ctx, const char* file file = (FILE * owner)fopen(filename_opt, "rb"); if (file == NULL) { - preprocessor_set_error_with_token(C_FILE_NOT_FOUND, ctx, ctx->current, "file '%s' not found", filename_opt); + preprocessor_diagnostic_message(ERROR_FILE_NOT_FOUND, ctx, ctx->current, "file '%s' not found", filename_opt); throw; } #else /*web versions only text files that are included*/ - const char* textfile = read_file(filename_opt); + char* textfile = read_file(filename_opt); if (textfile == NULL) { - preprocessor_set_error_with_token(C_FILE_NOT_FOUND, ctx, ctx->current, "file '%s' not found", filename_opt); + preprocessor_diagnostic_message(ERROR_FILE_NOT_FOUND, ctx, ctx->current, "file '%s' not found", filename_opt); throw; } @@ -1312,7 +1327,7 @@ struct token_list embed_tokenizer(struct preprocessor_ctx* ctx, const char* file { ch = *pch; pch++; -#endif +#endif if (b_first) { b_first = false; @@ -1355,7 +1370,7 @@ struct token_list embed_tokenizer(struct preprocessor_ctx* ctx, const char* file count++; } -#ifdef MOCKFILES +#ifdef MOCKFILES free(textfile); #endif } @@ -1435,7 +1450,7 @@ struct token_list tokenizer(struct tokenizer_ctx* ctx, const char* text, const c //windows have case insensive paths for (char* p = p_new->lexeme; *p; p++) { - *p = tolower(*p); + *p = (char)tolower(*p); } #endif p_new->level = level; @@ -1999,7 +2014,7 @@ struct token_list process_defined(struct preprocessor_ctx* ctx, struct token_lis { if (input_list->head->type != ')') { - preprocessor_set_error_with_token(C_MISSING_CLOSE_PARENTHESIS, ctx, input_list->head, "missing )"); + preprocessor_diagnostic_message(ERROR_MISSING_CLOSE_PARENTHESIS, ctx, input_list->head, "missing )"); throw; } token_list_pop_front(input_list); @@ -2034,7 +2049,7 @@ struct token_list process_defined(struct preprocessor_ctx* ctx, struct token_lis strcat(path, input_list->head->lexeme); token_list_pop_front(input_list); //pop ( } - token_list_pop_front(input_list); //pop > + token_list_pop_front(input_list); //pop > } char fullpath[300] = { 0 }; @@ -2046,7 +2061,7 @@ struct token_list process_defined(struct preprocessor_ctx* ctx, struct token_lis const char* owner s = find_and_read_include_file(ctx, path, fullpath, - &already_included, + &already_included, false, full_path_result, sizeof full_path_result); @@ -2076,7 +2091,7 @@ struct token_list process_defined(struct preprocessor_ctx* ctx, struct token_lis strcat(path, input_list->head->lexeme); token_list_pop_front(input_list); //pop ( } - token_list_pop_front(input_list); //pop > + token_list_pop_front(input_list); //pop > /*nodiscard * The __has_c_attribute conditional inclusion expression (6.10.1) shall @@ -2269,7 +2284,7 @@ long long preprocessor_constant_expression(struct preprocessor_ctx* ctx, long long value = 0; if (pre_constant_expression(&pre_ctx, &value) != 0) { - preprocessor_set_error_with_token(C_EXPRESSION_ERROR, ctx, first, "expression error"); + preprocessor_diagnostic_message(ERROR_EXPRESSION_ERROR, ctx, first, "expression error"); } ctx->conditional_inclusion = false; @@ -2307,9 +2322,9 @@ int match_token_level(struct token_list* dest, struct token_list* input_list, en else { if (input_list->head) - preprocessor_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, input_list->head, "expected token %s got %s\n", get_token_name(type), get_token_name(input_list->head->type)); + preprocessor_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, input_list->head, "expected token %s got %s\n", get_token_name(type), get_token_name(input_list->head->type)); else - preprocessor_set_error_with_token(C_UNEXPECTED_TOKEN, ctx, dest->tail, "expected EOF \n"); + preprocessor_diagnostic_message(ERROR_UNEXPECTED_TOKEN, ctx, dest->tail, "expected EOF \n"); throw; } @@ -2394,7 +2409,7 @@ struct token_list if_group(struct preprocessor_ctx* ctx, struct token_list* inpu else { - preprocessor_set_error_with_token(C_UNEXPECTED, ctx, input_list->head, "unexpected"); + preprocessor_diagnostic_message(C_UNEXPECTED, ctx, input_list->head, "unexpected"); throw; } struct token_list r2 = group_opt(ctx, input_list, is_active && *p_result, level); @@ -2678,7 +2693,7 @@ struct token_list replacement_list(struct preprocessor_ctx* ctx, struct macro* m struct token_list pp_tokens_opt(struct preprocessor_ctx* ctx, struct token_list* input_list, int level) { struct token_list r = { 0 }; - while (input_list->head->type != TK_NEWLINE) + while (input_list->head && input_list->head->type != TK_NEWLINE) { prematch_level(&r, input_list, level); } @@ -2794,6 +2809,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* match_token_level(&r, input_list, TK_NEWLINE, level, ctx); path[strlen(path) - 1] = '\0'; + bool is_system_included = path[0] == '<'; /*this is the dir of the current file*/ char current_file_dir[300] = { 0 }; @@ -2807,6 +2823,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* path + 1, current_file_dir, &already_included, + is_system_included, full_path_result, sizeof full_path_result); @@ -2833,12 +2850,12 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* { if (!already_included) { - preprocessor_set_error_with_token(C_FILE_NOT_FOUND, ctx, r.tail, "file %s not found", path + 1); + preprocessor_diagnostic_message(ERROR_FILE_NOT_FOUND, ctx, r.tail, "file %s not found", path + 1); for (struct include_dir* p = ctx->include_dir.head; p; p = p->next) { /*let's print the include path*/ - preprocessor_set_info_with_token(ctx, r.tail, "dir = '%s'", p->path); + preprocessor_diagnostic_message(W_NOTE, ctx, r.tail, "dir = '%s'", p->path); } } else @@ -2938,7 +2955,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* struct macro* owner macro = calloc(1, sizeof * macro); if (macro == NULL) { - preprocessor_set_error_with_token(C_UNEXPECTED, ctx, ctx->current, "out of mem"); + preprocessor_diagnostic_message(C_UNEXPECTED, ctx, ctx->current, "out of mem"); throw; } @@ -2970,6 +2987,11 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* macro->name = strdup(input_list->head->lexeme); struct macro* owner previous = owner_hashmap_set(&ctx->macros, input_list->head->lexeme, (void* owner)macro, 0); + + + /*macro still alive...but flow analsys will (correclty) think it is not*/ + + if (previous) { delete_macro(previous); @@ -3007,7 +3029,16 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* skip_blanks_level(ctx, &r, input_list, level); } else +#ifdef __CAKE__ +#pragma cake diagnostic push +#pragma cake diagnostic ignored "-Wuninitialized" +#endif + /* + flow analysys says macro is unitialized, this is because it has been moved + to a map, but we know it still exist. A refactroing map returning a view solve. + */ { + struct token_list r3 = identifier_list(ctx, macro, input_list, level); token_list_append_list(&r, &r3); token_list_destroy(&r3); @@ -3030,6 +3061,9 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* skip_blanks_level(ctx, &r, input_list, level); match_token_level(&r, input_list, ')', level, ctx); } +#ifdef __CAKE__ +#pragma cake diagnostic pop +#endif } else { @@ -3041,15 +3075,16 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* token_list_destroy(&r4); match_token_level(&r, input_list, TK_NEWLINE, level, ctx); - +#ifdef CAKE_ASSERT_IS_KEYWORD if (strcmp(macro->name, "assert") == 0) { // TODO create option for this? - // Cake overrides the definition of macro to be + // Cake overrides the definition of macro to be // #define assert(...) assert(__VA_ARGS__) // and assert is a keyword. The reason is the send // information to the static analyzer + //TODO detect GCC ((void)0) if (!is_empty_assert(¯o->replacement_list)) { @@ -3064,6 +3099,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* macro->replacement_list = tokenizer(&tctx, "assert(__VA_ARGS__)", NULL, level, TK_FLAG_NONE); } } +#endif if (macro_name_token) naming_convention_macro(ctx, macro_name_token); @@ -3110,7 +3146,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* ctx->n_warnings++; match_token_level(&r, input_list, TK_IDENTIFIER, level, ctx);//error struct token_list r6 = pp_tokens_opt(ctx, input_list, level); - preprocessor_set_error_with_token(C_PREPROCESSOR_ERROR_DIRECTIVE, ctx, input_list->head, "#error"); + preprocessor_diagnostic_message(ERROR_PREPROCESSOR_ERROR_DIRECTIVE, ctx, input_list->head, "#error"); token_list_append_list(&r, &r6); token_list_destroy(&r6); match_token_level(&r, input_list, TK_NEWLINE, level, ctx); @@ -3132,7 +3168,7 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* match_token_level(&r, input_list, TK_IDENTIFIER, level, ctx);//warning struct token_list r6 = pp_tokens_opt(ctx, input_list, level); - preprocessor_set_warning_with_token(W_NONE, ctx, input_list->head, "#warning"); + preprocessor_diagnostic_message(W_NONE, ctx, input_list->head, "#warning"); token_list_append_list(&r, &r6); match_token_level(&r, input_list, TK_NEWLINE, level, ctx); token_list_destroy(&r6); @@ -3197,21 +3233,22 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* { match_token_level(&r, input_list, TK_IDENTIFIER, level, ctx);//diagnostic //#pragma GCC diagnostic push - if (ctx->options.enabled_warnings_stack_top_index < - sizeof(ctx->options.enabled_warnings_stack) / sizeof(ctx->options.enabled_warnings_stack[0])) + if (ctx->options.diagnostic_stack_top_index < + sizeof(ctx->options.diagnostic_stack) / sizeof(ctx->options.diagnostic_stack[0])) { - ctx->options.enabled_warnings_stack_top_index++; - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index - 1]; + ctx->options.diagnostic_stack_top_index++; + + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index] = + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index - 1]; } } else if (input_list->head && strcmp(input_list->head->lexeme, "pop") == 0) { //#pragma GCC diagnostic pop match_token_level(&r, input_list, TK_IDENTIFIER, level, ctx);//pop - if (ctx->options.enabled_warnings_stack_top_index > 0) + if (ctx->options.diagnostic_stack_top_index > 0) { - ctx->options.enabled_warnings_stack_top_index--; + ctx->options.diagnostic_stack_top_index--; } } else if (input_list->head && strcmp(input_list->head->lexeme, "warning") == 0) @@ -3225,8 +3262,8 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* { match_token_level(&r, input_list, TK_STRING_LITERAL, level, ctx);//"" - enum warning w = get_warning_flag(input_list->head->lexeme + 1 + 2); - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] |= w; + unsigned long long w = get_warning_bit_mask(input_list->head->lexeme + 1 + 2); + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings |= w; } } else if (input_list->head && strcmp(input_list->head->lexeme, "ignore") == 0) @@ -3238,8 +3275,8 @@ struct token_list control_line(struct preprocessor_ctx* ctx, struct token_list* if (input_list->head && input_list->head->type == TK_STRING_LITERAL) { - enum warning w = get_warning_flag(input_list->head->lexeme + 1 + 2); - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] &= ~w; + unsigned long long w = get_warning_bit_mask(input_list->head->lexeme + 1 + 2); + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings &= ~w; } } } @@ -3337,7 +3374,7 @@ static struct macro_argument_list collect_macro_arguments(struct preprocessor_ct } else { - preprocessor_set_error_with_token(C_TOO_FEW_ARGUMENTS_TO_FUNCTION_LIKE_MACRO, ctx, macro_name_token, "too few arguments provided to function-like macro invocation\n"); + preprocessor_diagnostic_message(ERROR_TOO_FEW_ARGUMENTS_TO_FUNCTION_LIKE_MACRO, ctx, macro_name_token, "too few arguments provided to function-like macro invocation\n"); throw; } } @@ -3368,7 +3405,7 @@ static struct macro_argument_list collect_macro_arguments(struct preprocessor_ct p_current_parameter = p_current_parameter->next; if (p_current_parameter == NULL) { - preprocessor_set_error_with_token(C_MACRO_INVALID_ARG, ctx, macro_name_token, "invalid args"); + preprocessor_diagnostic_message(ERROR_PREPROCESSOR_MACRO_INVALID_ARG, ctx, macro_name_token, "invalid args"); macro_argument_delete(p_argument); p_argument = NULL; //DELETED throw; @@ -3425,7 +3462,7 @@ static struct token_list concatenate(struct preprocessor_ctx* ctx, struct token_ { if (r.tail == NULL) { - preprocessor_set_error_with_token(C_MISSING_MACRO_ARGUMENT, ctx, input_list->head, "missing macro argument (should be checked before)"); + preprocessor_diagnostic_message(ERROR_PREPROCESSOR_MISSING_MACRO_ARGUMENT, ctx, input_list->head, "missing macro argument (should be checked before)"); break; } /* @@ -3608,7 +3645,7 @@ static struct token_list replace_macro_arguments(struct preprocessor_ctx* ctx, s if (s == NULL) { token_list_destroy(&argumentlist); - preprocessor_set_error_with_token(C_UNEXPECTED, ctx, input_list->head, "unexpected"); + preprocessor_diagnostic_message(C_UNEXPECTED, ctx, input_list->head, "unexpected"); throw; } struct token* owner p_new_token = calloc(1, sizeof * p_new_token); @@ -4224,13 +4261,12 @@ static struct token_list text_line(struct preprocessor_ctx* ctx, struct token_li */ if (input_list->head->type == TK_STRING_LITERAL) { - if (preprocessor_is_warning_enabled(ctx, W_STRING_SLICED)) - preprocessor_set_info_with_token(ctx, input_list->head, "you can use \"adjacent\" \"strings\""); + preprocessor_diagnostic_message(W_NOTE, ctx, input_list->head, "you can use \"adjacent\" \"strings\""); } else if (input_list->head->type == TK_LINE_COMMENT) - preprocessor_set_warning_with_token(W_COMMENT, ctx, input_list->head, "multi-line //comment"); + preprocessor_diagnostic_message(W_COMMENT, ctx, input_list->head, "multi-line //comment"); else - preprocessor_set_warning_with_token(W_LINE_SLICING, ctx, input_list->head, "unnecessary line-slicing"); + preprocessor_diagnostic_message(W_LINE_SLICING, ctx, input_list->head, "unnecessary line-slicing"); } bool blanks = token_is_blank(input_list->head) || input_list->head->type == TK_NEWLINE; @@ -4418,11 +4454,13 @@ void check_unused_macros(struct owner_hash_map* map) void include_config_header(struct preprocessor_ctx* ctx) { - char executable_path[MAX_PATH] = { 0 }; +#define CAKE_CFG_FNAME "/cakeconfig.h" + char executable_path[MAX_PATH - sizeof(CAKE_CFG_FNAME)] = { 0 }; get_self_path(executable_path, sizeof(executable_path)); dirname(executable_path); char path[MAX_PATH] = { 0 }; - snprintf(path, sizeof path, "%s/cakeconfig.h", executable_path); + snprintf(path, sizeof path, "%s" CAKE_CFG_FNAME, executable_path); +#undef CAKE_CFG_FNAME /* * windows echo %INCLUDE% @@ -4433,8 +4471,8 @@ void include_config_header(struct preprocessor_ctx* ctx) char* owner str = read_file(path); - const enum warning w = - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index]; + const enum diagnostic_id w = + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings; @@ -4447,7 +4485,7 @@ void include_config_header(struct preprocessor_ctx* ctx) token_list_destroy(&l10); /*restore*/ - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = w; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index].warnings = w; } void add_standard_macros(struct preprocessor_ctx* ctx) @@ -4456,11 +4494,12 @@ void add_standard_macros(struct preprocessor_ctx* ctx) This command prints all macros used by gcc echo | gcc -dM -E - */ - const enum warning w = - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index]; + const struct diagnostic w = + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index]; /*we dont want warnings here*/ - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = W_NONE; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index] = + (struct diagnostic){0}; static char mon[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", @@ -4503,6 +4542,7 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define __COUNT__ 0\n" "#define _CONSOLE\n" "#define __STDC_OWNERSHIP__\n" + "#define _W_DIVIZION_BY_ZERO_ 29\n" #ifdef WIN32 @@ -4513,7 +4553,7 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define _WIN32 " TOSTRING(_WIN32) "\n" #endif -#ifdef _WIN64 +#ifdef _WIN64 "#define _WIN64 " TOSTRING(_WIN64) "\n" #endif @@ -4527,7 +4567,7 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define __pragma(a)\n" "#define __declspec(a)\n" "#define __crt_va_start(X) \n" - "#define __builtin_offsetof(type, member) 0\n"; //como nao defini msver ele pensa que eh gcc aqui + "#define __builtin_offsetof(type, member) 0\n"; #endif @@ -4539,8 +4579,9 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define __builtin_va_list\n" "#define __builtin_va_start(a, b)\n" "#define __builtin_va_end(a)\n" - "#define __builtin_va_arg(a, b)\n" + "#define __builtin_va_arg(a, b) ((b)a)\n" "#define __builtin_va_copy(a, b)\n" + "#define __builtin_offsetof(type, member) 0\n" "#define __CHAR_BIT__ " TOSTRING(__CHAR_BIT__) "\n" "#define __SIZE_TYPE__ " TOSTRING(__SIZE_TYPE__) "\n" @@ -4577,6 +4618,17 @@ void add_standard_macros(struct preprocessor_ctx* ctx) "#define __INTPTR_TYPE__ " TOSTRING(__INTPTR_TYPE__) "\n" "#define __UINTPTR_TYPE__ " TOSTRING(__UINTPTR_TYPE__) "\n" + "#define __DBL_MAX__ " TOSTRING(__DBL_MAX__) "\n" + "#define __DBL_MIN__ " TOSTRING(__DBL_MIN__) "\n" + "#define __FLT_RADIX__ " TOSTRING(__FLT_RADIX__) "\n" + "#define __FLT_EPSILON__ " TOSTRING(__FLT_EPSILON__) "\n" + "#define __DBL_EPSILON__ " TOSTRING(__DBL_EPSILON__) "\n" + "#define __LDBL_EPSILON__ " TOSTRING(__LDBL_EPSILON__) "\n" + "#define __DBL_DECIMAL_DIG__ " TOSTRING(__DBL_DECIMAL_DIG__) "\n" + "#define __FLT_EVAL_METHOD__ " TOSTRING(__FLT_EVAL_METHOD__) "\n" + "#define __FLT_RADIX__ " TOSTRING(__FLT_RADIX__) "\n" + + "#define __SCHAR_MAX__ " TOSTRING(__SCHAR_MAX__) "\n" "#define __WCHAR_MAX__ " TOSTRING(__WCHAR_MAX__) "\n" "#define __SHRT_MAX__ " TOSTRING(__SHRT_MAX__) "\n" @@ -4676,7 +4728,7 @@ void add_standard_macros(struct preprocessor_ctx* ctx) token_list_destroy(&l10); /*restore*/ - ctx->options.enabled_warnings_stack[ctx->options.enabled_warnings_stack_top_index] = w; + ctx->options.diagnostic_stack[ctx->options.diagnostic_stack_top_index] = w; } @@ -4686,9 +4738,9 @@ const char* get_token_name(enum token_type tk) { switch (tk) { - case TK_NONE: return "NONE"; - case TK_NEWLINE: return "NEWLINE"; - case TK_WHITE_SPACE: return "SPACE"; + case TK_NONE: return "TK_NONE"; + case TK_NEWLINE: return "TK_NEWLINE"; + case TK_WHITE_SPACE: return "TK_WHITE_SPACE"; case TK_EXCLAMATION_MARK: return "TK_EXCLAMATION_MARK"; case TK_QUOTATION_MARK: return "TK_QUOTATION_MARK"; case TK_NUMBER_SIGN: return "TK_NUMBER_SIGN"; @@ -4722,11 +4774,16 @@ const char* get_token_name(enum token_type tk) case TK_RIGHT_CURLY_BRACKET: return "TK_RIGHT_CURLY_BRACKET"; case TK_TILDE: return "TK_TILDE"; case TK_PREPROCESSOR_LINE: return "TK_PREPROCESSOR_LINE"; + case TK_PRAGMA: return "TK_PRAGMA"; case TK_STRING_LITERAL: return "TK_STRING_LITERAL"; + case TK_CHAR_CONSTANT: return "TK_CHAR_CONSTANT"; case TK_LINE_COMMENT: return "TK_LINE_COMMENT"; - case TK_COMMENT: return "TK_COMENT"; + case TK_COMMENT: return "TK_COMMENT"; case TK_PPNUMBER: return "TK_PPNUMBER"; - case ANY_OTHER_PP_TOKEN: return "ANY_OTHER_PP_TOKEN"; + + case ANY_OTHER_PP_TOKEN: return "ANY_OTHER_PP_TOKEN"; //@ por ex + + /*PPNUMBER sao convertidos para constantes antes do parse*/ case TK_COMPILER_DECIMAL_CONSTANT: return "TK_COMPILER_DECIMAL_CONSTANT"; case TK_COMPILER_OCTAL_CONSTANT: return "TK_COMPILER_OCTAL_CONSTANT"; case TK_COMPILER_HEXADECIMAL_CONSTANT: return "TK_COMPILER_HEXADECIMAL_CONSTANT"; @@ -4734,7 +4791,9 @@ const char* get_token_name(enum token_type tk) case TK_COMPILER_DECIMAL_FLOATING_CONSTANT: return "TK_COMPILER_DECIMAL_FLOATING_CONSTANT"; case TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT: return "TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT"; + case TK_PLACEMARKER: return "TK_PLACEMARKER"; + case TK_BLANKS: return "TK_BLANKS"; case TK_PLUSPLUS: return "TK_PLUSPLUS"; case TK_MINUSMINUS: return "TK_MINUSMINUS"; @@ -4743,10 +4802,15 @@ const char* get_token_name(enum token_type tk) case TK_SHIFTRIGHT: return "TK_SHIFTRIGHT"; case TK_LOGICAL_OPERATOR_OR: return "TK_LOGICAL_OPERATOR_OR"; case TK_LOGICAL_OPERATOR_AND: return "TK_LOGICAL_OPERATOR_AND"; + case TK_MACRO_CONCATENATE_OPERATOR: return "TK_MACRO_CONCATENATE_OPERATOR"; + case TK_IDENTIFIER: return "TK_IDENTIFIER"; - case TK_IDENTIFIER_RECURSIVE_MACRO: return "TK_IDENTIFIER_RECURSIVE_MACRO"; + case TK_IDENTIFIER_RECURSIVE_MACRO: return "TK_IDENTIFIER_RECURSIVE_MACRO"; /*usado para evitar recursao expansao macro*/ + case TK_BEGIN_OF_FILE: return "TK_BEGIN_OF_FILE"; + + //C23 keywords case TK_KEYWORD_AUTO: return "TK_KEYWORD_AUTO"; case TK_KEYWORD_BREAK: return "TK_KEYWORD_BREAK"; case TK_KEYWORD_CASE: return "TK_KEYWORD_CASE"; @@ -4754,8 +4818,10 @@ const char* get_token_name(enum token_type tk) case TK_KEYWORD_CHAR: return "TK_KEYWORD_CHAR"; case TK_KEYWORD_CONST: return "TK_KEYWORD_CONST"; case TK_KEYWORD_CONTINUE: return "TK_KEYWORD_CONTINUE"; + case TK_KEYWORD_CATCH: return "TK_KEYWORD_CATCH"; /*extension*/ case TK_KEYWORD_DEFAULT: return "TK_KEYWORD_DEFAULT"; case TK_KEYWORD_DO: return "TK_KEYWORD_DO"; + case TK_KEYWORD_DEFER: return "TK_KEYWORD_DEFER"; /*extension*/ case TK_KEYWORD_DOUBLE: return "TK_KEYWORD_DOUBLE"; case TK_KEYWORD_ELSE: return "TK_KEYWORD_ELSE"; case TK_KEYWORD_ENUM: return "TK_KEYWORD_ENUM"; @@ -4771,27 +4837,35 @@ const char* get_token_name(enum token_type tk) case TK_KEYWORD__INT16: return "TK_KEYWORD__INT16"; case TK_KEYWORD__INT32: return "TK_KEYWORD__INT32"; case TK_KEYWORD__INT64: return "TK_KEYWORD__INT64"; + case TK_KEYWORD_REGISTER: return "TK_KEYWORD_REGISTER"; case TK_KEYWORD_RESTRICT: return "TK_KEYWORD_RESTRICT"; case TK_KEYWORD_RETURN: return "TK_KEYWORD_RETURN"; case TK_KEYWORD_SHORT: return "TK_KEYWORD_SHORT"; case TK_KEYWORD_SIGNED: return "TK_KEYWORD_SIGNED"; case TK_KEYWORD_SIZEOF: return "TK_KEYWORD_SIZEOF"; - case TK_KEYWORD_STATIC_DEBUG: return "TK_KEYWORD_STATIC_DEBUG"; - case TK_KEYWORD_STATIC_STATE: return "TK_KEYWORD_STATIC_STATE"; - case TK_KEYWORD_STATIC_SET: return "TK_KEYWORD_STATIC_SET"; + case TK_KEYWORD_STATIC: return "TK_KEYWORD_STATIC"; case TK_KEYWORD_STRUCT: return "TK_KEYWORD_STRUCT"; case TK_KEYWORD_SWITCH: return "TK_KEYWORD_SWITCH"; case TK_KEYWORD_TYPEDEF: return "TK_KEYWORD_TYPEDEF"; + case TK_KEYWORD_TRY: return "TK_KEYWORD_TRY"; /*extension*/ + case TK_KEYWORD_THROW: return "TK_KEYWORD_THROW"; /*extension*/ case TK_KEYWORD_UNION: return "TK_KEYWORD_UNION"; case TK_KEYWORD_UNSIGNED: return "TK_KEYWORD_UNSIGNED"; case TK_KEYWORD_VOID: return "TK_KEYWORD_VOID"; case TK_KEYWORD_VOLATILE: return "TK_KEYWORD_VOLATILE"; case TK_KEYWORD_WHILE: return "TK_KEYWORD_WHILE"; + case TK_KEYWORD__ALIGNAS: return "TK_KEYWORD__ALIGNAS"; case TK_KEYWORD__ALIGNOF: return "TK_KEYWORD__ALIGNOF"; case TK_KEYWORD__ATOMIC: return "TK_KEYWORD__ATOMIC"; + //microsoft + //KEYWORD__FASTCALL, + //KEYWORD__STDCALL + // + case TK_KEYWORD__ASM: return "TK_KEYWORD__ASM"; + //end microsoft case TK_KEYWORD__BOOL: return "TK_KEYWORD__BOOL"; case TK_KEYWORD__COMPLEX: return "TK_KEYWORD__COMPLEX"; case TK_KEYWORD__DECIMAL128: return "TK_KEYWORD__DECIMAL128"; @@ -4801,23 +4875,50 @@ const char* get_token_name(enum token_type tk) case TK_KEYWORD__IMAGINARY: return "TK_KEYWORD__IMAGINARY"; case TK_KEYWORD__NORETURN: return "TK_KEYWORD__NORETURN"; case TK_KEYWORD__STATIC_ASSERT: return "TK_KEYWORD__STATIC_ASSERT"; + case TK_KEYWORD_ASSERT: return "TK_KEYWORD_ASSERT"; /*extension*/ case TK_KEYWORD__THREAD_LOCAL: return "TK_KEYWORD__THREAD_LOCAL"; - case TK_KEYWORD_TYPEOF: return "TK_KEYWORD_TYPEOF"; + case TK_KEYWORD_TYPEOF: return "TK_KEYWORD_TYPEOF"; /*C23*/ - case TK_KEYWORD_TRUE: return "TK_KEYWORD_TRUE"; - case TK_KEYWORD_FALSE: return "TK_KEYWORD_FALSE"; - case TK_KEYWORD_NULLPTR: return "TK_KEYWORD_NULLPTR"; - case TK_KEYWORD_DEFER: return "TK_KEYWORD_DEFER"; - case TK_KEYWORD__BITINT: return "TK_KEYWORD__BITINT"; - case TK_KEYWORD__ASM: return "TK_KEYWORD__ASM"; - case TK_KEYWORD_CATCH: return "TK_KEYWORD_CATCH"; - case TK_KEYWORD_TRY: return "TK_KEYWORD_TRY"; - case TK_KEYWORD_THROW: return "TK_KEYWORD_THROW"; + case TK_KEYWORD_TRUE: return "TK_KEYWORD_TRUE"; /*C23*/ + case TK_KEYWORD_FALSE: return "TK_KEYWORD_FALSE"; /*C23*/ + case TK_KEYWORD_NULLPTR: return "TK_KEYWORD_NULLPTR"; /*C23*/ + case TK_KEYWORD_TYPEOF_UNQUAL: return "TK_KEYWORD_TYPEOF_UNQUAL"; /*C23*/ + case TK_KEYWORD__BITINT: return "TK_KEYWORD__BITINT"; /*C23*/ + + + + /*cake extension*/ + case TK_KEYWORD__OWNER: return "TK_KEYWORD__OWNER"; + case TK_KEYWORD__OUT: return "TK_KEYWORD__OUT"; + case TK_KEYWORD__OBJ_OWNER: return "TK_KEYWORD__OBJ_OWNER"; + case TK_KEYWORD__VIEW: return "TK_KEYWORD__VIEW"; + case TK_KEYWORD__OPT: return "TK_KEYWORD__OPT"; + + /*extension compile time functions*/ + case TK_KEYWORD_STATIC_DEBUG: return "TK_KEYWORD_STATIC_DEBUG"; /*extension*/ + case TK_KEYWORD_STATIC_STATE: return "TK_KEYWORD_STATIC_STATE"; /*extension*/ + case TK_KEYWORD_STATIC_SET: return "TK_KEYWORD_STATIC_SET"; /*extension*/ + case TK_KEYWORD_ATTR_ADD: return "TK_KEYWORD_ATTR_ADD"; /*extension*/ + case TK_KEYWORD_ATTR_REMOVE: return "TK_KEYWORD_ATTR_REMOVE"; /*extension*/ + case TK_KEYWORD_ATTR_HAS: return "TK_KEYWORD_ATTR_HAS"; /*extension*/ + + /*https://en.cppreference.com/w/cpp/header/type_traits*/ + + case TK_KEYWORD_IS_POINTER: return "TK_KEYWORD_IS_POINTER"; + case TK_KEYWORD_IS_LVALUE: return "TK_KEYWORD_IS_LVALUE"; + case TK_KEYWORD_IS_CONST: return "TK_KEYWORD_IS_CONST"; + case TK_KEYWORD_IS_OWNER: return "TK_KEYWORD_IS_OWNER"; + case TK_KEYWORD_IS_ARRAY: return "TK_KEYWORD_IS_ARRAY"; + case TK_KEYWORD_IS_FUNCTION: return "TK_KEYWORD_IS_FUNCTION"; + case TK_KEYWORD_IS_SCALAR: return "TK_KEYWORD_IS_SCALAR"; + case TK_KEYWORD_IS_ARITHMETIC: return "TK_KEYWORD_IS_ARITHMETIC"; + case TK_KEYWORD_IS_FLOATING_POINT: return "TK_KEYWORD_IS_FLOATING_POINT"; + case TK_KEYWORD_IS_INTEGRAL: return "TK_KEYWORD_IS_INTEGRAL"; - case TK_KEYWORD_TYPEOF_UNQUAL: return "TK_KEYWORD_TYPEOF_UNQUAL"; + default: + return "TK_X_MISSING_NAME"; } - assert(false); return ""; }; @@ -5094,11 +5195,7 @@ static bool is_screaming_case(const char* text) if (text == NULL) return true; - if (!(text[0] >= 'A' && text[0] <= 'Z')) - { - /*first letter lower case*/ - return false; - } + bool screaming_case = false; while (*text) { @@ -5107,14 +5204,14 @@ static bool is_screaming_case(const char* text) (*text == '_')) { //ok + screaming_case = true; } else return false; text++; } - return true; - + return screaming_case; } void print_all_macros(struct preprocessor_ctx* prectx) @@ -5156,14 +5253,11 @@ void print_all_macros(struct preprocessor_ctx* prectx) } void naming_convention_macro(struct preprocessor_ctx* ctx, struct token* token) { - if (!preprocessor_is_warning_enabled(ctx, W_STYLE) || token->level != 0) - { - return; - } + if (!is_screaming_case(token->lexeme)) { - preprocessor_set_info_with_token(ctx, token, "use SCREAMING_CASE for macros"); + preprocessor_diagnostic_message(W_NOTE, ctx, token, "use SCREAMING_CASE for macros"); } } diff --git a/src/tokenizer.h b/src/tokenizer.h index 58caa077..66f31f00 100644 --- a/src/tokenizer.h +++ b/src/tokenizer.h @@ -43,9 +43,7 @@ struct preprocessor_ctx }; void preprocessor_ctx_destroy( struct preprocessor_ctx* obj_owner p); -void preprocessor_set_info_with_token(struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...); -void preprocessor_set_warning_with_token(enum warning w, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...); -void preprocessor_set_error_with_token(enum error error, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...); +bool preprocessor_diagnostic_message(enum diagnostic_id w, struct preprocessor_ctx* ctx, const struct token* p_token, const char* fmt, ...); struct tokenizer_ctx @@ -93,4 +91,4 @@ void print_all_macros(struct preprocessor_ctx* prectx); int string_literal_byte_size(const char* s); int get_char_type(const char* s); -void include_config_header(struct preprocessor_ctx* ctx); \ No newline at end of file +void include_config_header(struct preprocessor_ctx* ctx); diff --git a/src/tools/amalgamator.c b/src/tools/amalgamator.c index 13da2f9b..b658261e 100644 --- a/src/tools/amalgamator.c +++ b/src/tools/amalgamator.c @@ -131,6 +131,7 @@ bool Write(const char* name, bool bHeaderMode, FILE* out, struct strlist_node** if (input) { + fprintf(out, "/* Start of: %s */\n", name); found = true; char c = '\0'; @@ -295,6 +296,7 @@ bool Write(const char* name, bool bHeaderMode, FILE* out, struct strlist_node** free(pCurrent); pCurrent = pNext; } + fprintf(out, "/* End of: %s */\n", name); fclose(input); } diff --git a/src/type.c b/src/type.c index 6082b6bd..4e6715e6 100644 --- a/src/type.c +++ b/src/type.c @@ -1,13 +1,14 @@ #include "ownership.h" +#include #include -#include "type.h" -#include "parser.h" -#include "error.h" +#include +#include #include -#include +#include "error.h" #include "hash.h" -#include -#include +#include "parser.h" +#include "type.h" + void print_item(struct osstream* ss, bool* first, const char* item) { @@ -23,58 +24,58 @@ bool print_type_specifier_flags(struct osstream* ss, bool* first, enum type_spec if (e_type_specifier_flags & TYPE_SPECIFIER_VOID) print_item(ss, first, "void"); - if (e_type_specifier_flags & TYPE_SPECIFIER_SIGNED) + else if (e_type_specifier_flags & TYPE_SPECIFIER_SIGNED) print_item(ss, first, "signed"); - if (e_type_specifier_flags & TYPE_SPECIFIER_UNSIGNED) + else if (e_type_specifier_flags & TYPE_SPECIFIER_UNSIGNED) print_item(ss, first, "unsigned"); - if (e_type_specifier_flags & TYPE_SPECIFIER_INT) + else if (e_type_specifier_flags & TYPE_SPECIFIER_INT) print_item(ss, first, "int"); - if (e_type_specifier_flags & TYPE_SPECIFIER_SHORT) + else if (e_type_specifier_flags & TYPE_SPECIFIER_SHORT) print_item(ss, first, "short"); - if (e_type_specifier_flags & TYPE_SPECIFIER_LONG) + else if (e_type_specifier_flags & TYPE_SPECIFIER_LONG) print_item(ss, first, "long"); - if (e_type_specifier_flags & TYPE_SPECIFIER_LONG_LONG) + else if (e_type_specifier_flags & TYPE_SPECIFIER_LONG_LONG) print_item(ss, first, "long long"); - if (e_type_specifier_flags & TYPE_SPECIFIER_INT16) + else if (e_type_specifier_flags & TYPE_SPECIFIER_INT16) print_item(ss, first, "__int16"); - if (e_type_specifier_flags & TYPE_SPECIFIER_INT32) + else if (e_type_specifier_flags & TYPE_SPECIFIER_INT32) print_item(ss, first, "__int32"); - if (e_type_specifier_flags & TYPE_SPECIFIER_INT64) + else if (e_type_specifier_flags & TYPE_SPECIFIER_INT64) print_item(ss, first, "__int64"); - if (e_type_specifier_flags & TYPE_SPECIFIER_CHAR) + else if (e_type_specifier_flags & TYPE_SPECIFIER_CHAR) print_item(ss, first, "char"); - if (e_type_specifier_flags & TYPE_SPECIFIER_DOUBLE) + else if (e_type_specifier_flags & TYPE_SPECIFIER_DOUBLE) print_item(ss, first, "double"); - if (e_type_specifier_flags & TYPE_SPECIFIER_FLOAT) + else if (e_type_specifier_flags & TYPE_SPECIFIER_FLOAT) print_item(ss, first, "float"); - if (e_type_specifier_flags & TYPE_SPECIFIER_BOOL) + else if (e_type_specifier_flags & TYPE_SPECIFIER_BOOL) print_item(ss, first, "_Bool"); - if (e_type_specifier_flags & TYPE_SPECIFIER_COMPLEX) + else if (e_type_specifier_flags & TYPE_SPECIFIER_COMPLEX) print_item(ss, first, "_Complex"); - if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL32) + else if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL32) print_item(ss, first, "_Decimal32"); - if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL64) + else if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL64) print_item(ss, first, "_Decimal64"); - if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL128) + else if (e_type_specifier_flags & TYPE_SPECIFIER_DECIMAL128) print_item(ss, first, "_Decimal128"); - if (e_type_specifier_flags & TYPE_SPECIFIER_NULLPTR_T) + else if (e_type_specifier_flags & TYPE_SPECIFIER_NULLPTR_T) print_item(ss, first, "nullptr_t"); return *first; @@ -88,10 +89,10 @@ void print_type_qualifier_flags(struct osstream* ss, bool* first, enum type_qual if (e_type_qualifier_flags & TYPE_QUALIFIER_CONST) print_item(ss, first, "const"); - if (e_type_qualifier_flags & TYPE_QUALIFIER_RESTRICT) + else if (e_type_qualifier_flags & TYPE_QUALIFIER_RESTRICT) print_item(ss, first, "restrict"); - if (e_type_qualifier_flags & TYPE_QUALIFIER_VOLATILE) + else if (e_type_qualifier_flags & TYPE_QUALIFIER_VOLATILE) print_item(ss, first, "volatile"); } @@ -263,7 +264,7 @@ void print_type_core(struct osstream* ss, const struct type* p_type, bool onlyde ss_fprintf(ss, " "); first = false; } - ss_fprintf(ss, "%s", p->name_opt); + ss_fprintf(ss, " => %s", p->name_opt); } struct osstream local2 = { 0 }; @@ -402,7 +403,7 @@ void type_print(const struct type* a) struct osstream ss = { 0 }; print_type(&ss, a); puts(ss.c_str); - puts("\n"); + //puts("\n"); //it seems to have a better output without it ss_close(&ss); } @@ -810,7 +811,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx //ok if (current_argument->expression->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) { - compiler_set_error_with_token(C_OWNERSHIP_USING_TEMPORARY_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_USING_TEMPORARY_OWNER, ctx, current_argument->expression->first_token, "passing a temporary owner to a view"); @@ -819,7 +820,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx }//////////////////////////////////////////////////////////// else if (argument_is_obj_owner && paramer_is_owner) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, current_argument->expression->first_token, "cannot move obj_owner to owner"); @@ -834,7 +835,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx //ok if (current_argument->expression->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) { - compiler_set_error_with_token(C_OWNERSHIP_USING_TEMPORARY_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_USING_TEMPORARY_OWNER, ctx, current_argument->expression->first_token, "passing a temporary owner to a view"); @@ -846,7 +847,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx { if (!expression_is_zero(current_argument->expression)) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, current_argument->expression->first_token, "passing a view argument to a owner parameter"); @@ -861,7 +862,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx if (!type_is_owner(&t2)) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, current_argument->expression->first_token, "pointed object is not owner"); @@ -869,11 +870,11 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx } else { - //pointer object is owner + //pointer object is owner if (!argument_type->address_of) { //we need something created with address of. - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_MUST_USE_ADDRESSOF, ctx, current_argument->expression->first_token, "obj_owner pointer must be created using address of operator &"); @@ -886,7 +887,7 @@ void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx* ctx { if (!expression_is_zero(current_argument->expression)) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, current_argument->expression->first_token, "passing a view argument to a obj_owner parameter"); @@ -915,7 +916,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (type_is_pointer(¤t_argument->expression->type) && !type_is_pointer_to_owner(¤t_argument->expression->type)) { - compiler_set_error_with_token(C_OWNERSHIP_NOT_OWNER, ctx, + compiler_diagnostic_message(W_OWNERSHIP_NOT_OWNER, ctx, current_argument->expression->first_token, "parameter %d requires a pointer to owner object", param_num); @@ -923,7 +924,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, } else { - compiler_set_error_with_token(C_OWNERSHIP_NOT_OWNER, ctx, + compiler_diagnostic_message(W_OWNERSHIP_NOT_OWNER, ctx, current_argument->expression->first_token, "parameter %d requires a pointer to owner type", param_num); @@ -942,7 +943,8 @@ void check_argument_and_parameter(struct parser_ctx* ctx, type_lvalue_conversion(paramer_type) : type_dup(paramer_type); - + //why we get current_argument->expression == NULL here ? + assert(current_argument->expression != NULL); struct type argument_type_converted = expression_is_subjected_to_lvalue_conversion(current_argument->expression) ? type_lvalue_conversion(argument_type) : @@ -956,7 +958,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, { if (!type_is_same(argument_type, paramer_type, false)) { - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, current_argument->expression->first_token, " incompatible types at argument %d", param_num); } @@ -988,7 +990,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (is_null_pointer_constant && type_is_pointer(paramer_type)) { //TODO void F(int * [[opt]] p) - // F(0) when passing null we will check if the parameter + // F(0) when passing null we will check if the parameter //have the anotation [[opt]] /*can be converted to any type*/ @@ -1005,7 +1007,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (is_null_pointer_constant && type_is_array(paramer_type)) { - compiler_set_warning_with_token(W_NON_NULL, + compiler_diagnostic_message(W_NON_NULL, ctx, current_argument->expression->first_token, " passing null as array"); @@ -1066,7 +1068,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (parameter_array_size != 0 && argument_array_size < parameter_array_size) { - compiler_set_error_with_token(C_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, + compiler_diagnostic_message(ERROR_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, ctx, current_argument->expression->first_token, " argument of size [%d] is smaller than parameter of size [%d]", argument_array_size, parameter_array_size); @@ -1074,7 +1076,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, } else if (is_null_pointer_constant || type_is_nullptr_t(argument_type)) { - compiler_set_error_with_token(C_PASSING_NULL_AS_ARRAY, + compiler_diagnostic_message(W_PASSING_NULL_AS_ARRAY, ctx, current_argument->expression->first_token, " passing null as array"); @@ -1085,10 +1087,11 @@ void check_argument_and_parameter(struct parser_ctx* ctx, if (!type_is_same(&argument_type_converted, ¶meter_type_converted, false)) { + puts("type mismatch:"); type_print(&argument_type_converted); type_print(¶meter_type_converted); - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, current_argument->expression->first_token, " incompatible types at argument %d", param_num); //disabled for now util it works correctly @@ -1105,7 +1108,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, !type_is_const(¶meter_pointer_to) && !type_is_any_owner(¶meter_pointer_to)) { - compiler_set_error_with_token(C_DISCARDING_CONST_AT_ARGUMENT, ctx, + compiler_diagnostic_message(W_DISCARDED_QUALIFIERS, ctx, current_argument->expression->first_token, " discarding const at argument %d", param_num); } @@ -1118,7 +1121,7 @@ void check_argument_and_parameter(struct parser_ctx* ctx, //TODO //if (!type_is_same(paramer_type, ¤t_argument->expression->type, false)) //{ - // compiler_set_error_with_token(C1, ctx, + // compiler_diagnostic_message(C1, ctx, // current_argument->expression->first_token, // " incompatible types at argument %d ", param_num); //} @@ -1170,15 +1173,15 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, right->type.next && right->type.next->storage_class_specifier_flags & STORAGE_SPECIFIER_AUTOMATIC_STORAGE) { - compiler_set_warning_with_token(W_RETURN_LOCAL_ADDR, + compiler_diagnostic_message(W_RETURN_LOCAL_ADDR, ctx, right->first_token, "function returns address of local variable"); } - if (type_is_array(&right->type) && + if (type_is_array(&right->type) && right->type.storage_class_specifier_flags & STORAGE_SPECIFIER_AUTOMATIC_STORAGE) { - compiler_set_warning_with_token(W_RETURN_LOCAL_ADDR, + compiler_diagnostic_message(W_RETURN_LOCAL_ADDR, ctx, right->first_token, "function returns address of local variable"); @@ -1192,8 +1195,8 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, { if (type_is_owner(left_type)) { - //returning a owning variable to a owner result - // * explicit if local variable + //returning a owning variable to a owner result + // * explicit if local variable // * non explicit if param or external // ok if external @@ -1206,7 +1209,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, // * ok if external or param if (right->type.storage_class_specifier_flags & STORAGE_SPECIFIER_AUTOMATIC_STORAGE) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, right->first_token, "returning a owner variable to a non owner result"); @@ -1226,7 +1229,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, else { //returning a non owning variable to owner - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, right->first_token, "returning a non owner variable to a owner"); @@ -1253,7 +1256,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, //owner = non-owner if (!is_null_pointer_constant) { - compiler_set_error_with_token(C_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, + compiler_diagnostic_message(W_OWNERSHIP_MOVE_ASSIGNMENT_OF_NON_OWNER, ctx, right->first_token, "move assignment needs a owner type on right side"); @@ -1269,7 +1272,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, if (right->type.storage_class_specifier_flags & STORAGE_SPECIFIER_FUNCTION_RETURN) { //non owner = (owner) f() - compiler_set_error_with_token(C_OWNERSHIP_NON_OWNER_MOVE, + compiler_diagnostic_message(W_OWNERSHIP_NON_OWNER_MOVE, ctx, right->first_token, "cannot move a temporary owner to non-owner"); @@ -1293,7 +1296,7 @@ void check_owner_rules_assigment(struct parser_ctx* ctx, //p = f(); if (!type_is_owner(left_type)) { - compiler_set_error_with_token(C_OWNERSHIP_MISSING_OWNER_QUALIFIER, ctx, right->first_token, "left type must be owner qualified "); + compiler_diagnostic_message(W_OWNERSHIP_MISSING_OWNER_QUALIFIER, ctx, right->first_token, "left type must be owner qualified "); } } } @@ -1338,7 +1341,7 @@ void check_assigment(struct parser_ctx* ctx, { if (!is_null_pointer_constant) { - compiler_set_error_with_token(C_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, ctx, right->first_token, "cannot assign a non owner to owner"); + compiler_diagnostic_message(W_OWNERSHIP_NON_OWNER_TO_OWNER_ASSIGN, ctx, right->first_token, "cannot assign a non owner to owner"); check_owner_rules_assigment(ctx, left_type, @@ -1360,7 +1363,7 @@ void check_assigment(struct parser_ctx* ctx, { if (!type_is_same(p_right_type, left_type, false)) { - compiler_set_error_with_token(C_INCOMPATIBLE_ENUN_TYPES, ctx, + compiler_diagnostic_message(W_INCOMPATIBLE_ENUN_TYPES, ctx, right->first_token, " incompatible types "); } @@ -1388,7 +1391,7 @@ void check_assigment(struct parser_ctx* ctx, if (is_null_pointer_constant && type_is_pointer(left_type)) { //TODO void F(int * [[opt]] p) - // F(0) when passing null we will check if the parameter + // F(0) when passing null we will check if the parameter //have the anotation [[opt]] /*can be converted to any type*/ @@ -1403,7 +1406,7 @@ void check_assigment(struct parser_ctx* ctx, if (is_null_pointer_constant && type_is_array(left_type)) { - compiler_set_warning_with_token(W_NON_NULL, + compiler_diagnostic_message(W_NON_NULL, ctx, right->first_token, " passing null as array"); @@ -1458,14 +1461,14 @@ void check_assigment(struct parser_ctx* ctx, if (parameter_array_size != 0 && argument_array_size < parameter_array_size) { - compiler_set_error_with_token(C_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, ctx, + compiler_diagnostic_message(ERROR_ARGUMENT_SIZE_SMALLER_THAN_PARAMETER_SIZE, ctx, right->first_token, " argument of size [%d] is smaller than parameter of size [%d]", argument_array_size, parameter_array_size); } } else if (is_null_pointer_constant || type_is_nullptr_t(p_right_type)) { - compiler_set_error_with_token(C_PASSING_NULL_AS_ARRAY, ctx, + compiler_diagnostic_message(W_PASSING_NULL_AS_ARRAY, ctx, right->first_token, " passing null as array"); } @@ -1483,7 +1486,7 @@ void check_assigment(struct parser_ctx* ctx, type_print(&lvalue_right_type); type_print(&t2); - compiler_set_error_with_token(C_INCOMPATIBLE_TYPES, ctx, + compiler_diagnostic_message(ERROR_INCOMPATIBLE_TYPES, ctx, right->first_token, " incompatible types at argument "); //disabled for now util it works correctly @@ -1498,7 +1501,7 @@ void check_assigment(struct parser_ctx* ctx, struct type parameter_pointer_to = type_remove_pointer(&t2); if (type_is_const(&argument_pointer_to) && !type_is_const(¶meter_pointer_to)) { - compiler_set_error_with_token(C_DISCARDING_CONST_AT_ARGUMENT, ctx, + compiler_diagnostic_message(W_DISCARDED_QUALIFIERS, ctx, right->first_token, " discarding const at argument "); } @@ -1511,8 +1514,8 @@ void check_assigment(struct parser_ctx* ctx, if (!type_is_same(left_type, &lvalue_right_type, false)) { //TODO more rules..but it is good to check worst case! - // - // compiler_set_error_with_token(C1, ctx, + // + // compiler_diagnostic_message(C1, ctx, // right->first_token, // " incompatible types "); } @@ -2322,7 +2325,7 @@ void type_set_attributes(struct type* p_type, struct declarator* pdeclarator) struct type make_type_using_declarator(struct parser_ctx* ctx, struct declarator* pdeclarator); -#if 0 +#if 0 /*this sample is useful to try in compiler explorer*/ #include #include @@ -2612,7 +2615,7 @@ bool type_is_same(const struct type* a, const struct type* b, bool compare_quali if (pa->struct_or_union_specifier->complete_struct_or_union_specifier_indirection != pb->struct_or_union_specifier->complete_struct_or_union_specifier_indirection) { - //this should work but it is not... + //this should work but it is not... } if (strcmp(pa->struct_or_union_specifier->tag_name, pb->struct_or_union_specifier->tag_name) != 0) @@ -3154,4 +3157,4 @@ const struct type* type_get_specifer_part(const struct type* p_type) const struct type* p = p_type; while (p->next) p = p->next; return p; -} \ No newline at end of file +} diff --git a/src/type.h b/src/type.h index cdbe5a10..bd65c790 100644 --- a/src/type.h +++ b/src/type.h @@ -14,7 +14,7 @@ enum type_category TYPE_CATEGORY_ITSELF, TYPE_CATEGORY_FUNCTION, TYPE_CATEGORY_ARRAY, - TYPE_CATEGORY_POINTER, + TYPE_CATEGORY_POINTER, }; @@ -28,7 +28,7 @@ enum attribute_flags STD_ATTRIBUTE_NORETURN = 1 << 4, STD_ATTRIBUTE_UNSEQUENCED = 1 << 5, STD_ATTRIBUTE_REPRODUCIBLE = 1 << 6, - CAKE_ATTRIBUTE_IMPLICT= 1 << 7, + CAKE_ATTRIBUTE_IMPLICT = 1 << 7, /* 1 == 2 results in int in C lets add extra flag here @@ -84,11 +84,11 @@ enum type_qualifier_flags TYPE_QUALIFIER_CONST = 1 << 0, TYPE_QUALIFIER_RESTRICT = 1 << 1, TYPE_QUALIFIER_VOLATILE = 1 << 2, - TYPE_QUALIFIER__ATOMIC = 1 << 3 , - + TYPE_QUALIFIER__ATOMIC = 1 << 3, + /*ownership extensions*/ - TYPE_QUALIFIER_OWNER = 1 << 4, - TYPE_QUALIFIER_OBJ_OWNER = 1 << 5, + TYPE_QUALIFIER_OWNER = 1 << 4, + TYPE_QUALIFIER_OBJ_OWNER = 1 << 5, TYPE_QUALIFIER_VIEW = 1 << 6, TYPE_QUALIFIER_OPT = 1 << 7, TYPE_QUALIFIER_NOT_NULL = 1 << 8, @@ -105,7 +105,7 @@ enum storage_class_specifier_flags STORAGE_SPECIFIER_AUTO = 1 << 4, STORAGE_SPECIFIER_REGISTER = 1 << 5, STORAGE_SPECIFIER_CONSTEXPR = 1 << 6, - + /*extra flag just to annotate this*/ STORAGE_SPECIFIER_CONSTEXPR_STATIC = 1 << 7, @@ -140,7 +140,7 @@ struct param_list { void param_list_destroy(struct param_list* obj_owner p); -struct type +struct type { enum type_category category; @@ -156,13 +156,13 @@ struct type int array_size; bool static_array; - + /* address_of is true when the type is created by address of operator. This is used to create obj_owner pointer. */ bool address_of; - + struct param_list params; struct type* owner next; }; @@ -178,7 +178,7 @@ struct expression; void check_assigment(struct parser_ctx* ctx, struct type* left_type, - struct expression* right, + struct expression* right, bool return_assignment); void print_type(struct osstream* ss, const struct type* type); @@ -186,7 +186,7 @@ void print_item(struct osstream* ss, bool* first, const char* item); struct type type_dup(const struct type* p_type); void type_set(struct type* a, const struct type* b); -void type_destroy( struct type* obj_owner p_type); +void type_destroy(struct type* obj_owner p_type); diff --git a/src/unit_test.c b/src/unit_test.c index a1979fa2..b3db2746 100644 --- a/src/unit_test.c +++ b/src/unit_test.c @@ -66,6 +66,9 @@ int test_predefined_macros(void); int test_utf8(void); int test_line_continuation(void); +/* tests from options.c*/ +void test_get_warning_name(void); + /* tests from tests.c*/ void parser_specifier_test(void); void char_constants(void); @@ -218,6 +221,10 @@ void bounds_check2(void); void uninitialized_objects_passed_to_variadic_function(void); void nullderef(void); void for_loop_visit(void); +void uninitialized_object(void); +void calloc_builtin_semantics(void); +void malloc_builtin_semantics(void); +void discard_qualifier_test(void); /*end of forward declarations*/ @@ -278,6 +285,7 @@ g_unit_test_success_count = 0; test_predefined_macros(); test_utf8(); test_line_continuation(); + test_get_warning_name(); parser_specifier_test(); char_constants(); array_item_type_test(); @@ -429,6 +437,10 @@ g_unit_test_success_count = 0; uninitialized_objects_passed_to_variadic_function(); nullderef(); for_loop_visit(); + uninitialized_object(); + calloc_builtin_semantics(); + malloc_builtin_semantics(); + discard_qualifier_test(); return g_unit_test_error_count; } diff --git a/src/visit.c b/src/visit.c index 278e1922..dee0eb18 100644 --- a/src/visit.c +++ b/src/visit.c @@ -671,7 +671,7 @@ static void visit_generic_selection(struct visit_ctx* ctx, struct generic_select struct generic_association* p = p_generic_selection->generic_assoc_list.head; while (p) { - visit_type_name(ctx, p->p_type_name); + if(p->p_type_name) visit_type_name(ctx, p->p_type_name); visit_expression(ctx, p->expression); p = p->next; } @@ -1586,7 +1586,6 @@ static void visit_init_declarator_list(struct visit_ctx* ctx, struct init_declar } else { - assert(p_init_declarator->initializer->braced_initializer != NULL); if (p_init_declarator->initializer->braced_initializer) { visit_bracket_initializer_list(ctx, @@ -1676,7 +1675,7 @@ static void visit_struct_or_union_specifier(struct visit_ctx* ctx, struct struct struct token* first = p_struct_or_union_specifier->first_token; const char* tag = p_struct_or_union_specifier->tag_name; - char buffer[200] = { 0 }; + char buffer[sizeof(p_struct_or_union_specifier->tag_name)+8] = { 0 }; snprintf(buffer, sizeof buffer, " %s", tag); struct tokenizer_ctx tctx = { 0 }; struct token_list l2 = tokenizer(&tctx, buffer, NULL, 0, TK_FLAG_FINAL); diff --git a/src/web/cake.js b/src/web/cake.js index 013e0d57..441efab6 100644 --- a/src/web/cake.js +++ b/src/web/cake.js @@ -399,9 +399,9 @@ function Table(ret) { } } function initActiveSegments(imports) { - base64DecodeToExistingUint8Array(bufferView, 65536, "fgA7ICVzIHJldHVybiBfdG1wO30AfSBlbHNlIHtfY2F0Y2hfbGFiZWxfJWQ6O30Abm90IGZvbGxvd2luZyBjb3JyZWN0IGNsb3NlIGJyYWNlIHN0eWxlIH0AICUqcyB8ACAlcyB8AG5vdCBmb2xsb3dpbmcgY29ycmVjdCBicmFjZSBzdHlsZSB7AHRva2VuX2xpc3RfaXNfZW1wdHkAaW5maW5pdHkAdHJ5AF9JbWFnaW5hcnkAZmxvd192aXNpdF9jdHhfZGVzdHJveQBvd25lcl9oYXNobWFwX2Rlc3Ryb3kAYW55AHBfZGVjbGFyYXRpb24tPmZ1bmN0aW9uX2JvZHkAX2lzX2FycmF5ACBwYXNzaW5nIG51bGwgYXMgYXJyYXkAaW5kZXggJWQgaXMgcGFzdCB0aGUgZW5kIG9mIHRoZSBhcnJheQAtdGFyZ2V0PWN4eAAtc3RkPWN4eABfQ29tcGxleAAtdGFyZ2V0PWMyeAAtc3RkPWMyeAAtKyAgIDBYMHgALTBYKzBYIDBYLTB4KzB4IDB4AFx4JXgAMHgleAB0aHJvdwBwYXNzaW5nIGEgdGVtcG9yYXJ5IG93bmVyIHRvIGEgdmlldwBfVmlldwAtc3R5bGU9Z251ACVsbHUAci5uZXh0AC1uby1vdXRwdXQALW1zdmMtb3V0cHV0AF9PdXQAX2lzX2NvbnN0ACBjb25zdABtYWNyb19jb3B5X3JlcGxhY2VtZW50X2xpc3QAZmxvd192aXNpdF9pbml0X2RlY2xhcmF0b3JfbGlzdAB2aXNpdF9icmFja2V0X2luaXRpYWxpemVyX2xpc3QAaWRlbnRpZmllcl9saXN0AHRva2VuX2xpc3RfYXBwZW5kX2xpc3QAY29uc3RhbnRfdmFsdWVfY2FzdABzaG9ydABzdGF0aWNfYXNzZXJ0AF9TdGF0aWNfYXNzZXJ0AF9PcHQAdHlwZV9saXN0X3B1c2hfZnJvbnQAX2lzX2Zsb2F0aW5nX3BvaW50AGx2YWx1ZSByZXF1aXJlZCBhcyBsZWZ0IG9wZXJhbmQgb2YgYXNzaWdubWVudABtdWx0aS1saW5lIC8vY29tbWVudABtaXNzaW5nIGVuZCBvZiBjb21tZW50AHRyeV9zdGF0ZW1lbnQAZmxvd192aXNpdF9qdW1wX3N0YXRlbWVudABmb3JtYXRfdmlzaXRfanVtcF9zdGF0ZW1lbnQAZmxvd192aXNpdF9zZWxlY3Rpb25fc3RhdGVtZW50AGZsb3dfdmlzaXRfc3dpdGNoX3N0YXRlbWVudABmbG93X3Zpc2l0X2lmX3N0YXRlbWVudABmbG93X3Zpc2l0X3doaWxlX3N0YXRlbWVudABmbG93X3Zpc2l0X2RvX3doaWxlX3N0YXRlbWVudABmbG93X3Zpc2l0X3VubGFiZWxlZF9zdGF0ZW1lbnQAZm9ybWF0X3Zpc2l0X3VubGFiZWxlZF9zdGF0ZW1lbnQAX0JpdEludAByZXR1cm5pbmcgYSBvd25lciB2YXJpYWJsZSB0byBhIG5vbiBvd25lciByZXN1bHQAZGVmYXVsdABleHBlY3RlZCBpbnRlZ2VyIHR5cGUgb24gcmlnaHQALXN0eWxlPW1pY3Jvc29mdABleHBlY3RlZCBpbnRlZ2VyIHR5cGUgb24gbGVmdABzdGF0aWNfc2V0AGdldF9hbGlnbm9mX3N0cnVjdABnZXRfc2l6ZW9mX3N0cnVjdAB1c2luZyAnLT4nIGluIGFycmF5IGFzIHBvaW50ZXIgdG8gc3RydWN0AHJlc3RyaWN0AHNldF9vYmplY3QAZXhwcmVzc2lvbl9nZXRfb2JqZWN0AG1ha2Vfb2JqZWN0AGFzc2lnbm1lbnQgb2YgcmVhZC1vbmx5IG9iamVjdABwYXJhbWV0ZXIgJWQgcmVxdWlyZXMgYSBwb2ludGVyIHRvIG93bmVyIG9iamVjdABudWxsIG9iamVjdABtYXliZSB1c2luZyBhIHVuaW5pdGlhbGl6ZWQgb2JqZWN0AGZsb2F0AG51bGxwdHJfdABjb2xsZWN0X21hY3JvX2FyZ3VtZW50cwByZXBsYWNlX21hY3JvX2FyZ3VtZW50cwB0b28gbWFueSBhcmd1bWVudHMAdHlwZW9mIHVzZWQgaW4gYXJyYXkgYXJndW1lbnRzAHRvbyBmZXcgYXJndW1lbnRzAHVzZSBzbmFrZV9jYXNlIGZvciBhcmd1bWVudHMALXJlbW92ZS1jb21tZW50cwBhZGRyZXNzAHVzZSBVUFBFUkNBU0UgZm9yIGVudW1lcmF0b3JzAG9ial9vd25lciBxdWFsaWZpZXIgY2FuIG9ubHkgYmUgdXNlZCB3aXRoIHBvaW50ZXJzAHByb2Nlc3NfaWRlbnRpZmllcnMAZGlzY2FyZGVkLXF1YWxpZmllcnMAcHJpbnRfdHlwZV9xdWFsaWZpZXJfc3BlY2lmaWVycwB1c2Ugc25ha2VfY2FzZSBmb3Igc3RydWN0IG1lbWJlcnMAdXNlIFNDUkVBTUlOR19DQVNFIGZvciBtYWNyb3MAdG9rZW4gJyVzJyBpcyBub3QgdmFsaWQgaW4gcHJlcHJvY2Vzc29yIGV4cHJlc3Npb25zAC1udWxsY2hlY2tzAGludmFsaWQgYXJncwB1c2Ugc25ha2VfY2FzZSBmb3Igc3RydWN0L3VuaW9uIHRhZ3MAdXNlIGNhbWVsQ2FzZSBmb3Igc3RydWN0L3VuaW9uIHRhZ3MAdXNlIHNuYWtlX2Nhc2UgZm9yIGVudW0gdGFncwB1c2UgUGFzY2FsQ2FzZSBmb3IgZW51bSB0YWdzAF9Ob3JldHVybiBpcyBkZXByZWNhdGVkIHVzZSBhdHRyaWJ1dGVzAGluY29tcGF0aWJsZSBwb2ludGVyIHR5cGVzAGluY29tcGF0aWJsZSB0eXBlcwB1c2Ugc25ha2VfY2FzZSBmb3IgbG9jYWwgdmFyaWFibGVzAHVzZSBjYW1lbENhc2UgZm9yIGxvY2FsIHZhcmlhYmxlcwB1c2Ugc25ha2VfY2FzZSBnbG9iYWwgdmFyaWFibGVzAHVzZSBwcmVmaXggc18gZm9yIHN0YXRpYyBnbG9iYWwgdmFyaWFibGVzAC1zaG93SW5jbHVkZXMAYWxpZ25hcwBfQWxpZ25hcwAlcyVzACVzLT4lcwAlcy8lcwAlcy4lcwAqJXMAc3RydWN0ICVzACVzICVzAGludmFsaWQgcGFyYW1ldGVyICVzAGVudW0gJXMAZXhlcGF0aCAlcwBleHBlY3RlZCAlcwBzdGF0aWMgJXMAX2hhc19hdHRyAF9kZWxfYXR0cgBfYWRkX2F0dHIAbnVsbHB0cgBjb25zdGV4cHIAaW5pdF9kZWNsYXJhdG9yAGZpbmRfbWVtYmVyX2RlY2xhcmF0b3IAcF9kZWNsYXJhdGlvbi0+aW5pdF9kZWNsYXJhdG9yX2xpc3QuaGVhZC0+cF9kZWNsYXJhdG9yLT5kaXJlY3RfZGVjbGFyYXRvci0+ZnVuY3Rpb25fZGVjbGFyYXRvcgBtYWtlX3R5cGVfdXNpbmdfZGVjbGFyYXRvcgBoaWRlLWRlY2xhcmF0b3IAc3RhdGljIG9yIHR5cGUgcXVhbGlmaWVycyBhcmUgbm90IGFsbG93ZWQgaW4gbm9uLXBhcmFtZXRlciBhcnJheSBkZWNsYXJhdG9yACclcyc6IHVucmVmZXJlbmNlZCBkZWNsYXJhdG9yACNlcnJvcgBleHByZXNzaW9uIGVycm9yAGludGVybmFsIGVycm9yAGZvcgBkaXIAZW1iZWRfdG9rZW5pemVyAHJlZ2lzdGVyAF9pc19wb2ludGVyAHR5cGVfcGFyYW1fYXJyYXlfdG9fcG9pbnRlcgB0eXBlX3JlbW92ZV9wb2ludGVyAHN1YnNjcmlwdGVkIHZhbHVlIGlzIG5laXRoZXIgYXJyYXkgbm9yIHBvaW50ZXIAZGlzY2FyZGluZyBvd25lciBwb2ludGVyAGNhbGxlZCBvYmplY3QgaXMgbm90IGF0dHIgZnVuY3Rpb24gb3IgZnVuY3Rpb24gcG9pbnRlcgB0b2tlbl9saXN0X2luc2VydF9hZnRlcgB1bmV4cGVjdGVkIGVuZCBvZiBmaWxlIGFmdGVyAHR5cGVvZi1wYXJhbWV0ZXIAdW51c2VkLXBhcmFtZXRlcgBwYXNzaW5nIGEgdmlldyBhcmd1bWVudCB0byBhIG9ial9vd25lciBwYXJhbWV0ZXIAcGFzc2luZyBhIHZpZXcgYXJndW1lbnQgdG8gYSBvd25lciBwYXJhbWV0ZXIAJyVzJzogdW5yZWZlcmVuY2VkIGZvcm1hbCBwYXJhbWV0ZXIAbWlzc2luZyB0ZXJtaW5hdGluZyAnIGNoYXJhY3RlcgBtaXNzaW5nIHRlcm1pbmF0aW5nICIgY2hhcmFjdGVyAF9pc19vd25lcgBfT2JqX293bmVyAGNhbm5vdCBtb3ZlIGEgdGVtcG9yYXJ5IG93bmVyIHRvIG5vbi1vd25lcgBwb2ludGVkIG9iamVjdCBpcyBub3Qgb3duZXIAY2Fubm90IG1vdmUgb2JqX293bmVyIHRvIG93bmVyAGNhbm5vdCBhc3NpZ24gYSBub24gb3duZXIgdG8gb3duZXIAY2Fubm90IGluaXRpYWxpemUgYW4gb3duZXIgdHlwZSB3aXRoIGEgbm9uIG93bmVyAGRpc2NhcmRpbmcgb3duZXIAcmV0dXJuaW5nIGEgbm9uIG93bmVyIHZhcmlhYmxlIHRvIGEgb3duZXIAX093bmVyAHByZXByb2Nlc3Nvcl90b2tlbl9haGVhZF9pc19pZGVudGlmaWVyAHR5cGVfc3BlY2lmaWVyX3F1YWxpZmllcgBtaXNzaW5nIG93bmVyIHF1YWxpZmllcgBzdG9yYWdlX2NsYXNzX3NwZWNpZmllcgBzdHJ1Y3Rfb3JfdW5pb25fc3BlY2lmaWVyAHR5cGVfc3BlY2lmaWVyAGNhbm5vdCBjb21iaW5lIHdpdGggcHJldmlvdXMgJ2xvbmcgbG9uZycgZGVjbGFyYXRpb24gc3BlY2lmaWVyAHJpZ2h0IGlzIG5vdCBpbnRlZ2VyAGxlZnQgaXMgbm90IGludGVnZXIAZGVmZXIAcHBudW1iZXIAY29udmVydF90b19udW1iZXIAcmV0dXJuLWxvY2FsLWFkZHIAX2lzX3NjYWxhcgByaWdodCBvcGVyYXRvciBpcyBub3Qgc2NhbGFyAGxlZnQgb3BlcmF0b3IgaXMgbm90IHNjYWxhcgB1bnNpZ25lZCBjaGFyAGlmX2dyb3VwAHBvcABjb25zdGFudF92YWx1ZV91bmFyeV9vcABjb25zdGFudF92YWx1ZV9vcABhdXRvAGdvdG8AdHlwZV9jb252ZXJ0X3RvAG5vdC16ZXJvAGRpdml6aW9uIGJ5IHplcm8AZGl2aXNpb24gYnkgemVybwBleHBhbmRfbWFjcm8AaW5mbwAtZm8AZG8ALW8Abm9yZXR1cm4AX05vcmV0dXJuAGV4dGVybgBpbnRlcm5hbCBlcnJvciB0eXBlX2NvbW1vbgBmbG93X3Zpc2l0X2Z1bmN0aW9uAF9pc19mdW5jdGlvbgBhc3NpZ25tZW50IG9mIGZ1bmN0aW9uAHJlZGVjbGFyYXRpb24AZmxvd192aXNpdF9kZWNsYXJhdGlvbgBmdW5jdGlvbl9kZWZpbml0aW9uX29yX2RlY2xhcmF0aW9uAGRlY2xhcmF0aW9uIG9mICclcycgaGlkZXMgcHJldmlvdXMgZGVjbGFyYXRpb24AcmVwbGFjZW1lbnRfbGlzdF9yZWV4YW1pbmF0aW9uAC1kaXJlY3QtY29tcGlsYXRpb24Ac3RhbmRhcmQgbWFjcm9zIGluY2x1c2lvbgBfX0RBVEVfXyBtYWNybyBpbmNsdXNpb24AX19USU1FX18gbWFjcm8gaW5jbHVzaW9uAGVxdWFsaXR5X2V4cHJlc3Npb24AdW5hcnlfZXhwcmVzc2lvbgBwcmltYXJ5X2V4cHJlc3Npb24AcG9zdGZpeF9leHByZXNzaW9uAHByZXByb2Nlc3Nvcl9jb25zdGFudF9leHByZXNzaW9uAGZsb3dfdmlzaXRfZXhwcmVzc2lvbgBleGNsdXNpdmVfb3JfZXhwcmVzc2lvbgBjb25kaXRpb25hbF9leHByZXNzaW9uAHJlbGF0aW9uYWxfZXhwcmVzc2lvbgBhZGRpdGl2ZV9leHByZXNzaW9uAGFuZF9leHByZXNzaW9uAGV4cGVjdGVkIGNvbnN0YW50IGV4cHJlc3Npb24AaW52YWxpZCB0eXBlIHNoaWZ0IGV4cHJlc3Npb24AaW52YWxpZCB0eXBlcyBvciBleHByZXNzaW9uAHJpZ2h0IHR5cGUgaXMgbm90IHNjYWxhciBmb3Igb3IgZXhwcmVzc2lvbgBsZWZ0IHR5cGUgaXMgbm90IHNjYWxhciBmb3Igb3IgZXhwcmVzc2lvbgBpbnZhbGlkIHR5cGVzIGluY2x1c2l2ZSBvciBleHByZXNzaW9uAGludmFsaWQgdHlwZXMgYWRkaXRpdmUgZXhwcmVzc2lvbgBpbnZhbGlkIHR5cGUgbXVsdGlwbGljYXRpdmUgZXhwcmVzc2lvbgBpbnZhbGlkIHR5cGVzIGFuZCBleHByZXNzaW9uAGludmFsaWQgdHlwZXMgbG9naWNsIGFuZCBleHByZXNzaW9uAGVudW0tY29udmVyc2lvbgB1bmlvbgBpbnZhbGlkIHRva2VuAHVuZXhwZWN0ZWQgdG9rZW4AbmFuAGVudW0AX19hc20ALXJtAG91dCBvZiBtZW0AG1szN20AG1s5Mm0AG1s5MG0lcxtbMG0AG1s5NW13YXJuaW5nOiAbWzk3bSVzChtbMG0AG1s5NW13YXJuaW5nOiAbWzk3bSVzIFsbWzk1bS1XJXMbWzk3bV0KG1swbQBib29sAF9Cb29sAG5vbm51bGwAbm90LW51bGwAbWF5YmUtbnVsbAAtV2FsbAB0eXBlb2ZfdW5xdWFsAGV4cHJlc3Npb25fZXZhbHVhdGVfZXF1YWxfbm90X2VxdWFsAF9pc19pbnRlZ3JhbABwb2ludGVyIGNhbiBiZSBudWxsLCBidXQgdGhlIHBhcmFtZXRlciBpcyBub3Qgb3B0aW9uYWwAdGhyZWFkX2xvY2FsAF9UaHJlYWRfbG9jYWwAZm9ybWF0X3Zpc2l0X3ByaW1hcnlfYmxvY2sAdGhyb3cgc3RhdGVtZW50IG5vdCB3aXRoaW4gdHJ5IGJsb2NrAHR5cGVfbGlzdF9wdXNoX2JhY2sAYnJlYWsALWZpAHB1c2gAZmFsbHRocm91Z2gAc3dpdGNoAGNhdGNoAGM6L2Fzc2VydC5oAGM6L293bmVyc2hpcC5oAGM6L2Vycm5vLmgAYzovc3RkaW8uaABjOi9tYXRoLmgAYzovc3RyaW5nLmgAYzovc3RkZGVmLmgAYzovc3RkbGliLmgAc3RhdGljX2RlYnVnAGxvbmcgbG9uZwAjd2FybmluZwB0b2tlbl9saXN0X2FwcGVuZF9saXN0X2F0X2JlZ2lubmluZwB1bm5lY2Vzc2FyeSBsaW5lLXNsaWNpbmcAJUxnAHNzX3ZhZnByaW50ZgB0eXBlX2dldF9hbGlnbm9mAF9fYWxpZ25vZgBfQWxpZ25vZgB0eXBlX2dldF9zaXplb2YAdHlwZW9mAGluZgAtc2FyaWYAZWxpZgBlbmRpZgB1bmRlZgBlbGlmbmRlZgBlbGlmZGVmAHR5cGVkZWYAJWYALWFuYWx5emUAYWx3YXlzIHRydWUAY29udGludWUAX2lzX2x2YWx1ZQB1bnVzZWQtdmFsdWUAdm9pZCBmdW5jdGlvbiAnJXMnIHNob3VsZCBub3QgcmV0dXJuIGEgdmFsdWUAX19oYXNfY19hdHRyaWJ1dGUAd2FybmluZyAnJXMnIGlzIG5vdCBhbiBjYWtlIGF0dHJpYnV0ZQB3YXJuaW5nICclcycgaXMgbm90IGFuIHN0YW5kYXJkIGF0dHJpYnV0ZQBpZ25vcmluZyByZXR1cm4gdmFsdWUgb2YgZnVuY3Rpb24gZGVjbGFyZWQgd2l0aCAnbm9kaXNjYXJkJyBhdHRyaWJ1dGUAbWFjcm9fYXJndW1lbnRfZGVsZXRlAGVudW1lcmF0b3JfZGVsZXRlAGluaXRfZGVjbGFyYXRvcl9kZWxldGUAbWVtYmVyX2RlY2xhcmF0b3JfZGVsZXRlAGRlc2lnbmF0b3JfZGVsZXRlAGluaXRpYWxpemVyX2RlbGV0ZQB0eXBlX3NwZWNpZmllcl9xdWFsaWZpZXJfZGVsZXRlAGRlY2xhcmF0aW9uX3NwZWNpZmllcl9kZWxldGUAYXR0cmlidXRlX3NwZWNpZmllcl9kZWxldGUAcGFyYW1ldGVyX2RlY2xhcmF0aW9uX2RlbGV0ZQBtZW1iZXJfZGVjbGFyYXRpb25fZGVsZXRlAGdlbmVyaWNfYXNzb2NpYXRpb25fZGVsZXRlAGFyZ3VtZW50X2V4cHJlc3Npb25fZGVsZXRlAHRva2VuX2RlbGV0ZQBibG9ja19pdGVtX2RlbGV0ZQBhdHRyaWJ1dGVfZGVsZXRlAHNldF9kaXJlY3Rfc3RhdGUAc2V0X29iamVjdF9zdGF0ZQBvYmplY3RfcmVzdG9yZV9zdGF0ZQBzdGF0aWNfc3RhdGUAY29uY2F0ZW5hdGUAZWxzZQBmYWxzZQBjYXNlAGlnbm9yZQBwcmV2aW91cyBkZWNsYXJhdGlvbiBpcyBoZXJlAHR5cGVfZ2V0X2VudW1fdHlwZQBhc3NpZ25tZW50IHRvIGV4cHJlc3Npb24gd2l0aCBhcnJheSB0eXBlAGNoYXJhY3RlciBjb25zdGFudCB0b28gbG9uZyBmb3IgaXRzIHR5cGUAcGFyYW1ldGVyICVkIHJlcXVpcmVzIGEgcG9pbnRlciB0byBvd25lciB0eXBlAHJpZ2h0IG11c3QgYmUgaW50ZWdlciB0eXBlAGNvbmRpdGlvbiBtdXN0IGhhdmUgc2NhbGFyIHR5cGUAZGVmZXIgZW5kIG9mIHNjb3BlAGVuZCBvZiAnJXMnIHNjb3BlAHR5cGVfZGVzdHJveV9vbmUAZmxvd19kZWZlcl9zY29wZV9kZWxldGVfb25lAF9fZm9yY2VpbmxpbmUAX19pbmxpbmUAY29udHJvbF9saW5lAGRlZmluZQBnZXRfdG9rZW5fbmFtZQBnZXRfd2FybmluZ19uYW1lAHBvc3RmaXhfZXhwcmVzc2lvbl90eXBlX25hbWUAbWlzc2luZyBlbnVtIHRhZyBuYW1lAHN0eWxlAG1vZHVsZQB2b2xhdGlsZQB3aGlsZQB1bmV4cGVjdGVkIGVuZCBvZiBmaWxlAGRvdWJsZQByZXByb2R1Y2libGUAdW51c2VkLXZhcmlhYmxlAGZ1bmN0aW9uIHJldHVybnMgYWRkcmVzcyBvZiBsb2NhbCB2YXJpYWJsZQAtc3R5bGU9Y2FrZQBfX2hhc19pbmNsdWRlAHV0ZjhfZGVjb2RlAG1vdmUgYXNzaWdubWVudCBuZWVkcyBhIG93bmVyIHR5cGUgb24gcmlnaHQgc2lkZQBvbmNlAG9uZSBzcGFjZQBub2Rpc2NhcmQAZmlsZSAlcyBub3QgZm91bmQAZmlsZSAnJXMnIG5vdCBmb3VuZABsdmFsdWUgcmVxdWlyZWQgYXMgaW5jcmVtZW50IG9wZXJhbmQAbHZhbHVlIHJlcXVpcmVkIGFzIGRlY3JlbWVudCBvcGVyYW5kAGluZGlyZWN0aW9uIHJlcXVpcmVzIHBvaW50ZXIgb3BlcmFuZABsdmFsdWUgcmVxdWlyZWQgYXMgdW5hcnkgJyYnIG9wZXJhbmQAZXhwYW5kACVsbGQAdm9pZABzb3VyY2Ugb2JqZWN0ICclcycgaXMgdW5pbml0aWFsaXplZABzb3VyY2Ugb2JqZWN0ICclcycgbWF5IGJlIHVuaW5pdGlhbGl6ZWQAb2JqZWN0ICclcycgd2FzIG5vdCBtb3ZlZC9kZXN0cm95ZWQAb2JqZWN0ICclcycgd2FzIG1vdmVkAHNvdXJjZSBvYmplY3QgJyVzJyBtYXkgaGF2ZSBiZWVuIG1vdmVkAHNvdXJjZSBvYmplY3QgJyVzJyBoYXZlIGJlZW4gbW92ZWQAYWRkcmVzcyBvZiByZWdpc3RlciB2YXJpYWJsZSAneCcgcmVxdWVzdGVkAGVtcHR5IGRlY2xhcmF0b3IgbmFtZT8/IHVuZXhwZWN0ZWQAJyVzJyBpcyBkZXByZWNhdGVkAG1heWJlX3VudXNlZABkZWNsYXJhdG9yICclcycgbm90IHVzZWQAc3RydWN0dXJlIG9yIHVuaW9uIHJlcXVpcmVkAGRlZmluZWQAdW5zaWduZWQAX1N0YXRpY19hc3NlcnQgZmFpbGVkAHN0YXRpY19zdGF0ZSBmYWlsZWQAY29uc3QgcXVhbGlmaWVyIGRpc2NhcmRlZAB1bnNlcXVlbmNlZAB0b2tlbiBzbGljZWQAX19oYXNfZW1iZWQAYXJndW1lbnRfbGlzdF9hZGQAZGVjbGFyYXRpb25fbGlzdF9hZGQAdG9rZW5fbGlzdF9hZGQAZ2VuZXJpY19hc3NvY19saXN0X2FkZABpbmNsdWRlX2Rpcl9hZGQAXyVzJWQAX2Fub255bW91c19zdHJ1Y3RfJWQAZ290byBfY2F0Y2hfbGFiZWxfJWQAIF9saXRfZnVuY18lZAAgZGlzY2FyZGluZyBjb25zdCBhdCBhcmd1bWVudCAlZAAgaW5jb21wYXRpYmxlIHR5cGVzIGF0IGFyZ3VtZW50ICVkAG1hbGxvYwBjYWxsb2MAZGlhZ25vc3RpYwBfaXNfYXJpdGhtZXRpYwByaWdodCAvIGlzIG5vdCBhcml0aG1ldGljAGxlZnQgLyBpcyBub3QgYXJpdGhtZXRpYwByaWdodCAqIGlzIG5vdCBhcml0aG1ldGljAGxlZnQgKiBpcyBub3QgYXJpdGhtZXRpYwBzdGF0aWMAbm8gbWF0Y2ggZm9yIGdlbmVyaWMAX0dlbmVyaWMAX0F0b21pYwBjOi9tYWluLmMAbGliLmMACiUqYwAlYwBwcmFnbWEAX19mdW5jX18AX19WQV9PUFRfXwBfX0NPVU5UX18AX19WQV9BUkdTX18AX19MSU5FX18AX19GSUxFX18AXgAgYXJndW1lbnQgb2Ygc2l6ZSBbJWRdIGlzIHNtYWxsZXIgdGhhbiBwYXJhbWV0ZXIgb2Ygc2l6ZSBbJWRdAFtbbm9yZXR1cm5dXQBbAGN0eC0+Y3VycmVudC0+dHlwZSA9PSBUS19LRVlXT1JEX1RSWQBUS19LRVlXT1JEX19JTUFHSU5BUlkAVEtfS0VZV09SRF9fQ09NUExFWABUS19BUlJPVwBUS19LRVlXT1JEX1RIUk9XAFRLX0tFWVdPUkRfQ09OU1QAVEtfS0VZV09SRF9TSE9SVABUS19LRVlXT1JEX19TVEFUSUNfQVNTRVJUAFRLX0tFWVdPUkRfSU5UAFRLX0tFWVdPUkRfX0JJVElOVABUS19DT01FTlQAVEtfTElORV9DT01NRU5UAFRLX0NJUkNVTUZMRVhfQUNDRU5UAFRLX0dSQVZFX0FDQ0VOVABUS19DT01QSUxFUl9CSU5BUllfQ09OU1RBTlQAVEtfQ09NUElMRVJfT0NUQUxfQ09OU1RBTlQAVEtfQ09NUElMRVJfREVDSU1BTF9DT05TVEFOVABUS19DT01QSUxFUl9IRVhBREVDSU1BTF9DT05TVEFOVABUS19DT01QSUxFUl9ERUNJTUFMX0ZMT0FUSU5HX0NPTlNUQU5UAFRLX0NPTVBJTEVSX0hFWEFERUNJTUFMX0ZMT0FUSU5HX0NPTlNUQU5UAFRLX0tFWVdPUkRfREVGQVVMVABUS19TSElGVFJJR0hUAFRLX1NISUZUTEVGVABUS19LRVlXT1JEX1NUQVRJQ19TRVQAVEtfUklHSFRfQ1VSTFlfQlJBQ0tFVABUS19MRUZUX0NVUkxZX0JSQUNLRVQAVEtfUklHSFRfU1FVQVJFX0JSQUNLRVQAVEtfTEVGVF9TUVVBUkVfQlJBQ0tFVABUS19LRVlXT1JEX1NUUlVDVABUS19LRVlXT1JEX1JFU1RSSUNUAFRLX0NPTU1FUkNJQUxfQVQAVEtfS0VZV09SRF9GTE9BVABUS19IWVBIRU5fTUlOVVMAVEtfTUlOVVNNSU5VUwBUS19QTFVTUExVUwBUS19TT0xJRFVTAFRLX1JFVkVSU0VfU09MSURVUwBUS19CTEFOS1MAVEtfUklHSFRfUEFSRU5USEVTSVMAVEtfTEVGVF9QQVJFTlRIRVNJUwBUS19LRVlXT1JEX19BTElHTkFTAFRLX0tFWVdPUkRfTlVMTFBUUgBUS19LRVlXT1JEX0NPTlNURVhQUgBUS19MT0dJQ0FMX09QRVJBVE9SX09SAFRLX01BQ1JPX0NPTkNBVEVOQVRFX09QRVJBVE9SAFRLX0tFWVdPUkRfRk9SAFRLX0tFWVdPUkRfUkVHSVNURVIAVEtfUExBQ0VNQVJLRVIAaW5wdXRfbGlzdC0+aGVhZC0+dHlwZSA9PSBUS19JREVOVElGSUVSAFRLX0tFWVdPUkRfREVGRVIAVEtfUFBOVU1CRVIAVEtfS0VZV09SRF9DSEFSAFRLX0ZVTExfU1RPUABUS19LRVlXT1JEX0FVVE8AVEtfS0VZV09SRF9HT1RPAFRLX0lERU5USUZJRVJfUkVDVVJTSVZFX01BQ1JPAHBfaXRlcmF0aW9uX3N0YXRlbWVudC0+Zmlyc3RfdG9rZW4tPnR5cGUgPT0gVEtfS0VZV09SRF9ETwBUS19LRVlXT1JEX1JFVFVSTgBUS19LRVlXT1JEX19OT1JFVFVSTgBUS19LRVlXT1JEX0VYVEVSTgBUS19DT0xPTgBUS19TRU1JQ09MT04AVEtfS0VZV09SRF9VTklPTgBUS19QRVJDRU5UX1NJR04AVEtfUExVU19TSUdOAFRLX0VRVUFMU19TSUdOAFRLX05VTUJFUl9TSUdOAFRLX0RPTExBUl9TSUdOAFRLX0xFU1NfVEhBTl9TSUdOAFRLX0dSRUFURVJfVEhBTl9TSUdOAEFOWV9PVEhFUl9QUF9UT0tFTgBOQU4AVEtfS0VZV09SRF9FTlVNAFRLX0tFWVdPUkRfX0FTTQBUS19LRVlXT1JEX19CT09MAHBfZGVjbGFyYXRpb24tPmZ1bmN0aW9uX2JvZHkgPT0gTlVMTABwbmV3LT5wcmV2ID09IE5VTEwAcG5ldy0+bmV4dCA9PSBOVUxMAHBfbGFzdF9wYXJhbWV0ZXItPm5leHQgPT0gTlVMTABwLT50eXBlX3F1YWxpZmllci0+bmV4dCA9PSBOVUxMAHAtPm5leHQgPT0gTlVMTAB0eXBlX2xpc3QtPnRhaWwtPm5leHQgPT0gTlVMTABhcHBlbmRfbGlzdC0+dGFpbC0+bmV4dCA9PSBOVUxMAGRlc3QtPnRhaWwtPm5leHQgPT0gTlVMTABzb3VyY2UtPnRhaWwtPm5leHQgPT0gTlVMTABsaXN0LnRhaWwtPm5leHQgPT0gTlVMTABuZXdfYm9vay0+bmV4dCA9PSBOVUxMAHBfdHlwZS0+bmV4dCA9PSBOVUxMAHQubmFtZV9vcHQgPT0gTlVMTABwX2FyZ3VtZW50ID09IE5VTEwAcF9leHByZXNzaW9uLT5yaWdodCA9PSBOVUxMAHBfZXhwcmVzc2lvbi0+bGVmdCA9PSBOVUxMAHBfYmxvY2stPnByZXZpb3VzID09IE5VTEwAbWFjcm8tPnBhcmFtZXRlcnMgPT0gTlVMTABwX2luaXRpYWxpemVyLT5kZXNpZ25hdGlvbiA9PSBOVUxMAHBfaW5pdGlhbGl6ZXIyLT5kZXNpZ25hdGlvbiA9PSBOVUxMAG5ld19leHByZXNzaW9uID09IE5VTEwAbGlzdC0+dGFpbCA9PSBOVUxMAHIyLnRhaWwgPT0gTlVMTABjdHgtPnRhaWxfYmxvY2sgPT0gTlVMTABwLT50YWlsX2Jsb2NrID09IE5VTEwAY3R4LT5wX3JldHVybl90eXBlID09IE5VTEwAcF9leHByZXNzaW9uX25vZGUtPnR5cGVfbmFtZSA9PSBOVUxMAG1hY3JvLT5uYW1lID09IE5VTEwAbWFwLT50YWJsZSA9PSBOVUxMAHR5cGVfbGlzdC0+aGVhZCA9PSBOVUxMAG1hY3JvLT5yZXBsYWNlbWVudF9saXN0LmhlYWQgPT0gTlVMTAByMi5oZWFkID09IE5VTEwAZmluZF9tYWNybyhjdHgsIGlucHV0X2xpc3QtPmhlYWQtPmxleGVtZSkgPT0gTlVMTAB0eXBlX2xpc3QgIT0gTlVMTABwX2xhc3QgIT0gTlVMTABjdHgtPmN1cnJlbnQgIT0gTlVMTABib29rcyAhPSBOVUxMAHBfdHlwZV9zcGVjaWZpZXItPnR5cGVkZWZfZGVjbGFyYXRvciAhPSBOVUxMAHBfaW5pdF9kZWNsYXJhdG9yLT5pbml0aWFsaXplci0+YnJhY2VkX2luaXRpYWxpemVyICE9IE5VTEwAcF90eXBlLT5lbnVtX3NwZWNpZmllciAhPSBOVUxMAHAgIT0gTlVMTABwX21lbWJlcl9kZWNsYXJhdGlvbi0+c3RhdGljX2Fzc2VydF9kZWNsYXJhdGlvbiAhPSBOVUxMAG5ld19ib29rICE9IE5VTEwAbGlzdC5oZWFkICE9IE5VTEwAbGlzdDQuaGVhZCAhPSBOVUxMAFRLX0tFWVdPUkRfVFlQRU9GX1VOUVVBTABUS19TVFJJTkdfTElURVJBTABUS19LRVlXT1JEX19USFJFQURfTE9DQUwAVEtfQVNURVJJU0sAVEtfUVVFU1RJT05fTUFSSwBUS19RVU9UQVRJT05fTUFSSwBUS19FWENMQU1BVElPTl9NQVJLAFRLX0tFWVdPUkRfQlJFQUsAcF9zZWxlY3Rpb25fc3RhdGVtZW50LT5maXJzdF90b2tlbi0+dHlwZSA9PSBUS19LRVlXT1JEX1NXSVRDSABUS19LRVlXT1JEX0NBVENIAFRLX0tFWVdPUkRfU1RBVElDX0RFQlVHAFRLX0tFWVdPUkRfTE9ORwBUS19LRVlXT1JEX19BTElHTk9GAFRLX0tFWVdPUkRfU0laRU9GAFRLX0tFWVdPUkRfVFlQRU9GAElORgBwX3NlbGVjdGlvbl9zdGF0ZW1lbnQtPmZpcnN0X3Rva2VuLT50eXBlID09IFRLX0tFWVdPUkRfSUYAbnVsbGNoZWNrcyBwcmFnbWEgbmVlZHMgdG8gdXNlIE9OIE9GRgAqYyA+PSAweDA4MDAgJiYgKmMgPD0gMHhGRkZGACpjID49IDB4MTAwMDAwICYmICpjIDw9IDB4MTBGRkZGACpjID49IDB4MDA4MCAmJiAqYyA8PSAweDA3RkYAVEtfS0VZV09SRF9UWVBFREVGACpjID49IDB4MDAwMCAmJiAqYyA8PSAweDAwN0YAVEtfS0VZV09SRF9UUlVFAFRLX0tFWVdPUkRfQ09OVElOVUUAVEtfS0VZV09SRF9TVEFUSUNfU1RBVEUAVEtfS0VZV09SRF9FTFNFAFRLX0tFWVdPUkRfRkFMU0UAVEtfS0VZV09SRF9DQVNFAE5PTkUAVEtfRkxPV19MSU5FAFRLX1BSRVBST0NFU1NPUl9MSU5FAFRLX1ZFUlRJQ0FMX0xJTkUATkVXTElORQBUS19LRVlXT1JEX0lOTElORQBUS19LRVlXT1JEX1ZPTEFUSUxFAHBfaXRlcmF0aW9uX3N0YXRlbWVudC0+Zmlyc3RfdG9rZW4tPnR5cGUgPT0gVEtfS0VZV09SRF9XSElMRQBUS19CRUdJTl9PRl9GSUxFAFRLX0tFWVdPUkRfRE9VQkxFAENBS0UAVEtfQVBPU1RST1BIRQBUS19USUxERQBTUEFDRQAtRQBUS19MT0dJQ0FMX09QRVJBVE9SX0FORABUS19BTVBFUlNBTkQAVEtfS0VZV09SRF9WT0lEAFRLX0tFWVdPUkRfU0lHTkVEAFRLX0tFWVdPUkRfVU5TSUdORUQAVEtfS0VZV09SRF9TVEFUSUMAVEtfS0VZV09SRF9fR0VORVJJQwBUS19LRVlXT1JEX19BVE9NSUMAVEtfQ09NTUEAYWRkcmVzcyBvZiByZWdpc3RlciB2YXJpYWJsZSByZXF1ZXN0ZWQgLSBkZWNsYXJhdG9yPwBpbmNvbXBhdGlibGUgdHlwZXM/PwA8PgBicmVhazsAZ290byBfY2F0Y2hfbGFiZWxfJWQ7AHR5cGVkZWYgbG9uZyBsb25nIGZwb3NfdDsKdHlwZWRlZiB1bnNpZ25lZCBzaXplX3Q7CgojZGVmaW5lIE5VTEwgKCh2b2lkKikwKQp0eXBlZGVmIGludCB3Y2hhcl90OwpbW25vZGlzY2FyZF1dIGRvdWJsZSBhdG9mKGNvbnN0IGNoYXIqIG5wdHIpOwpbW25vZGlzY2FyZF1dIGludCBhdG9pKGNvbnN0IGNoYXIqIG5wdHIpOwpbW25vZGlzY2FyZF1dIGxvbmcgaW50IGF0b2woY29uc3QgY2hhciogbnB0cik7Cltbbm9kaXNjYXJkXV0gbG9uZyBsb25nIGludCBhdG9sbChjb25zdCBjaGFyKiBucHRyKTsKZG91YmxlIHN0cnRvZChjb25zdCBjaGFyKiByZXN0cmljdCBucHRyLCBjaGFyKiogcmVzdHJpY3QgZW5kcHRyKTsKZmxvYXQgc3RydG9mKGNvbnN0IGNoYXIqIHJlc3RyaWN0IG5wdHIsIGNoYXIqKiByZXN0cmljdCBlbmRwdHIpOwpsb25nIGRvdWJsZSBzdHJ0b2xkKGNvbnN0IGNoYXIqIHJlc3RyaWN0IG5wdHIsIGNoYXIqKiByZXN0cmljdCBlbmRwdHIpOwpsb25nIGludCBzdHJ0b2woY29uc3QgY2hhciogcmVzdHJpY3QgbnB0ciwgY2hhcioqIHJlc3RyaWN0IGVuZHB0ciwgaW50IGJhc2UpOwpsb25nIGxvbmcgaW50IHN0cnRvbGwoY29uc3QgY2hhciogcmVzdHJpY3QgbnB0ciwgY2hhcioqIHJlc3RyaWN0IGVuZHB0ciwgaW50IGJhc2UpOwp1bnNpZ25lZCBsb25nIGludCBzdHJ0b3VsKGNvbnN0IGNoYXIqIHJlc3RyaWN0IG5wdHIsIGNoYXIqKiByZXN0cmljdCBlbmRwdHIsIGludCBiYXNlKTsKdW5zaWduZWQgbG9uZyBsb25nIGludCBzdHJ0b3VsbChjb25zdCBjaGFyKiByZXN0cmljdCBucHRyLCBjaGFyKiogcmVzdHJpY3QgZW5kcHRyLCBpbnQgYmFzZSk7CmludCByYW5kKHZvaWQpOwp2b2lkIHNyYW5kKHVuc2lnbmVkIGludCBzZWVkKTsKdm9pZCogYWxpZ25lZF9hbGxvYyhzaXplX3QgYWxpZ25tZW50LCBzaXplX3Qgc2l6ZSk7CiNpZiBkZWZpbmVkKF9fU1REQ19PV05FUlNISVBfXykgJiYgZGVmaW5lZChfX09XTkVSU0hJUF9IX18pCltbbm9kaXNjYXJkXV0gdm9pZCogX093bmVyIGNhbGxvYyhzaXplX3Qgbm1lbWIsIHNpemVfdCBzaXplKTsKdm9pZCBmcmVlKHZvaWQqIF9Pd25lciBwdHIpOwpbW25vZGlzY2FyZF1dIHZvaWQqIF9Pd25lciBtYWxsb2Moc2l6ZV90IHNpemUpOwpbW25vZGlzY2FyZF1dIHZvaWQqIF9Pd25lciByZWFsbG9jKHZvaWQqIHB0ciwgc2l6ZV90IHNpemUpOwojZWxzZQpbW25vZGlzY2FyZF1dIHZvaWQqIGNhbGxvYyhzaXplX3Qgbm1lbWIsIHNpemVfdCBzaXplKTsKdm9pZCBmcmVlKHZvaWQqIHB0cik7Cltbbm9kaXNjYXJkXV0gdm9pZCogbWFsbG9jKHNpemVfdCBzaXplKTsKW1tub2Rpc2NhcmRdXSB2b2lkKiByZWFsbG9jKHZvaWQqIHB0ciwgc2l6ZV90IHNpemUpOwojZW5kaWYKW1tub3JldHVybl1dIHZvaWQgYWJvcnQodm9pZCk7CmludCBhdGV4aXQodm9pZCAoKmZ1bmMpKHZvaWQpKTsKaW50IGF0X3F1aWNrX2V4aXQodm9pZCAoKmZ1bmMpKHZvaWQpKTsKW1tub3JldHVybl1dIHZvaWQgZXhpdChpbnQgc3RhdHVzKTsKW1tub3JldHVybl1dIHZvaWQgX0V4aXQoaW50IHN0YXR1cyk7CmNoYXIqIGdldGVudihjb25zdCBjaGFyKiBuYW1lKTsKW1tub3JldHVybl1dIHZvaWQgcXVpY2tfZXhpdChpbnQgc3RhdHVzKTsKaW50IHN5c3RlbShjb25zdCBjaGFyKiBzdHJpbmcpOwAgCnR5cGVkZWYgaW50IGVycm5vX3Q7CnR5cGVkZWYgdW5zaWduZWQgbG9uZyBsb25nIHNpemVfdDsKdHlwZWRlZiB1bnNpZ25lZCBsb25nIGxvbmcgcnNpemVfdDsKdHlwZWRlZiB1bnNpZ25lZCBzaG9ydCB3Y2hhcl90Owp2b2lkKiBtZW1jaHIodm9pZCBjb25zdCogX0J1ZiwgaW50IF9WYWwsIHNpemVfdCBfTWF4Q291bnQpOwppbnQgbWVtY21wKHZvaWQgY29uc3QqIF9CdWYxLCB2b2lkIGNvbnN0KiBfQnVmMiwgc2l6ZV90IF9TaXplKTsKdm9pZCogbWVtY3B5KHZvaWQqIF9Ec3QsIHZvaWQgY29uc3QqIF9TcmMsIHNpemVfdCBfU2l6ZSk7CnZvaWQqIG1lbW1vdmUodm9pZCogX0RzdCwgdm9pZCBjb25zdCogX1NyYywgc2l6ZV90IF9TaXplKTsKdm9pZCogbWVtc2V0KHZvaWQqIF9Ec3QsIGludCBfVmFsLCBzaXplX3QgX1NpemUpOwpjaGFyKiBzdHJjaHIoY2hhciBjb25zdCogX1N0ciwgaW50IF9WYWwpOwpjaGFyKiBzdHJyY2hyKGNoYXIgY29uc3QqIF9TdHIsIGludCBfQ2gpOwpjaGFyKiBzdHJzdHIoY2hhciBjb25zdCogX1N0ciwgY2hhciBjb25zdCogX1N1YlN0cik7CndjaGFyX3QqIHdjc2Nocih3Y2hhcl90IGNvbnN0KiBfU3RyLCB3Y2hhcl90IF9DaCk7CndjaGFyX3QqIHdjc3JjaHIod2NoYXJfdCBjb25zdCogX1N0ciwgd2NoYXJfdCBfQ2gpOwp3Y2hhcl90KiB3Y3NzdHIod2NoYXJfdCBjb25zdCogX1N0ciwgd2NoYXJfdCBjb25zdCogX1N1YlN0cik7CnN0YXRpYyBfX2lubGluZSBlcnJub190IG1lbWNweV9zKHZvaWQqIGNvbnN0IF9EZXN0aW5hdGlvbiwgcnNpemVfdCBjb25zdCBfRGVzdGluYXRpb25TaXplLCB2b2lkIGNvbnN0KiBjb25zdCBfU291cmNlLCByc2l6ZV90IGNvbnN0IF9Tb3VyY2VTaXplKTsKc3RhdGljIF9faW5saW5lIGVycm5vX3QgbWVtbW92ZV9zKHZvaWQqIGNvbnN0IF9EZXN0aW5hdGlvbiwgcnNpemVfdCBjb25zdCBfRGVzdGluYXRpb25TaXplLCB2b2lkIGNvbnN0KiBjb25zdCBfU291cmNlLCByc2l6ZV90IGNvbnN0IF9Tb3VyY2VTaXplKTsKaW50IF9tZW1pY21wKHZvaWQgY29uc3QqIF9CdWYxLCB2b2lkIGNvbnN0KiBfQnVmMiwgc2l6ZV90IF9TaXplKTsKdm9pZCogbWVtY2NweSh2b2lkKiBfRHN0LCB2b2lkIGNvbnN0KiBfU3JjLCBpbnQgX1ZhbCwgc2l6ZV90IF9TaXplKTsKaW50IG1lbWljbXAodm9pZCBjb25zdCogX0J1ZjEsIHZvaWQgY29uc3QqIF9CdWYyLCBzaXplX3QgX1NpemUpOwplcnJub190IHdjc2NhdF9zKHdjaGFyX3QqIF9EZXN0aW5hdGlvbiwgcnNpemVfdCBfU2l6ZUluV29yZHMsIHdjaGFyX3QgY29uc3QqIF9Tb3VyY2UpOwplcnJub190IHdjc2NweV9zKHdjaGFyX3QqIF9EZXN0aW5hdGlvbiwgcnNpemVfdCBfU2l6ZUluV29yZHMsIHdjaGFyX3QgY29uc3QqIF9Tb3VyY2UpOwplcnJub190IHdjc25jYXRfcyh3Y2hhcl90KiBfRGVzdGluYXRpb24sIHJzaXplX3QgX1NpemVJbldvcmRzLCB3Y2hhcl90IGNvbnN0KiBfU291cmNlLCByc2l6ZV90IF9NYXhDb3VudCk7CmVycm5vX3Qgd2NzbmNweV9zKHdjaGFyX3QqIF9EZXN0aW5hdGlvbiwgcnNpemVfdCBfU2l6ZUluV29yZHMsIHdjaGFyX3QgY29uc3QqIF9Tb3VyY2UsIHJzaXplX3QgX01heENvdW50KTsKd2NoYXJfdCogd2NzdG9rX3Mod2NoYXJfdCogX1N0cmluZywgd2NoYXJfdCBjb25zdCogX0RlbGltaXRlciwgd2NoYXJfdCoqIF9Db250ZXh0KTsKd2NoYXJfdCogX3djc2R1cCh3Y2hhcl90IGNvbnN0KiBfU3RyaW5nKTsKd2NoYXJfdCogd2NzY2F0KHdjaGFyX3QqIF9EZXN0aW5hdGlvbiwgd2NoYXJfdCBjb25zdCogX1NvdXJjZSk7IGludCB3Y3NjbXAod2NoYXJfdCBjb25zdCogX1N0cmluZzEsIHdjaGFyX3QgY29uc3QqIF9TdHJpbmcyKTsKd2NoYXJfdCogd2NzY3B5KHdjaGFyX3QqIF9EZXN0aW5hdGlvbiwgd2NoYXJfdCBjb25zdCogX1NvdXJjZSk7IHNpemVfdCB3Y3Njc3BuKHdjaGFyX3QgY29uc3QqIF9TdHJpbmcsIHdjaGFyX3QgY29uc3QqIF9Db250cm9sKTsKc2l6ZV90IHdjc2xlbih3Y2hhcl90IGNvbnN0KiBfU3RyaW5nKTsKc2l6ZV90IHdjc25sZW4od2NoYXJfdCBjb25zdCogX1NvdXJjZSwgc2l6ZV90IF9NYXhDb3VudCk7CnN0YXRpYyBfX2lubGluZSBzaXplX3Qgd2Nzbmxlbl9zKHdjaGFyX3QgY29uc3QqIF9Tb3VyY2UsIHNpemVfdCBfTWF4Q291bnQpOwp3Y2hhcl90KiB3Y3NuY2F0KHdjaGFyX3QqIF9EZXN0aW5hdGlvbiwgd2NoYXJfdCBjb25zdCogX1NvdXJjZSwgc2l6ZV90IF9Db3VudCk7CmludCB3Y3NuY21wKHdjaGFyX3QgY29uc3QqIF9TdHJpbmcxLCB3Y2hhcl90IGNvbnN0KiBfU3RyaW5nMiwgc2l6ZV90IF9NYXhDb3VudCk7CndjaGFyX3QqIHdjc25jcHkod2NoYXJfdCogX0Rlc3RpbmF0aW9uLCB3Y2hhcl90IGNvbnN0KiBfU291cmNlLCBzaXplX3QgX0NvdW50KTsKd2NoYXJfdCogd2NzcGJyayh3Y2hhcl90IGNvbnN0KiBfU3RyaW5nLCB3Y2hhcl90IGNvbnN0KiBfQ29udHJvbCk7CnNpemVfdCB3Y3NzcG4od2NoYXJfdCBjb25zdCogX1N0cmluZywgd2NoYXJfdCBjb25zdCogX0NvbnRyb2wpOwp3Y2hhcl90KiB3Y3N0b2sod2NoYXJfdCogX1N0cmluZywgd2NoYXJfdCBjb25zdCogX0RlbGltaXRlciwgd2NoYXJfdCoqIF9Db250ZXh0KTsKc2l6ZV90IHdjc3hmcm0od2NoYXJfdCogX0Rlc3RpbmF0aW9uLCB3Y2hhcl90IGNvbnN0KiBfU291cmNlLCBzaXplX3QgX01heENvdW50KTsKaW50IHdjc2NvbGwod2NoYXJfdCBjb25zdCogX1N0cmluZzEsIHdjaGFyX3QgY29uc3QqIF9TdHJpbmcyKTsKd2NoYXJfdCogd2NzZHVwKHdjaGFyX3QgY29uc3QqIF9TdHJpbmcpOwppbnQgd2NzaWNtcCh3Y2hhcl90IGNvbnN0KiBfU3RyaW5nMSwgd2NoYXJfdCBjb25zdCogX1N0cmluZzIpOwppbnQgd2NzbmljbXAod2NoYXJfdCBjb25zdCogX1N0cmluZzEsIHdjaGFyX3QgY29uc3QqIF9TdHJpbmcyLCBzaXplX3QgX01heENvdW50KTsKd2NoYXJfdCogd2NzbnNldCh3Y2hhcl90KiBfU3RyaW5nLCB3Y2hhcl90IF9WYWx1ZSwgc2l6ZV90IF9NYXhDb3VudCk7CndjaGFyX3QqIHdjc3Jldih3Y2hhcl90KiBfU3RyaW5nKTsKd2NoYXJfdCogd2Nzc2V0KHdjaGFyX3QqIF9TdHJpbmcsIHdjaGFyX3QgX1ZhbHVlKTsKd2NoYXJfdCogd2NzbHdyKHdjaGFyX3QqIF9TdHJpbmcpOyB3Y2hhcl90KiB3Y3N1cHIod2NoYXJfdCogX1N0cmluZyk7CmludCB3Y3NpY29sbCh3Y2hhcl90IGNvbnN0KiBfU3RyaW5nMSwgd2NoYXJfdCBjb25zdCogX1N0cmluZzIpOwpjaGFyKiBzdHJ0b2tfcyhjaGFyKiBfU3RyaW5nLCBjaGFyIGNvbnN0KiBfRGVsaW1pdGVyLCBjaGFyKiogX0NvbnRleHQpOwp2b2lkKiBfbWVtY2NweSh2b2lkKiBfRHN0LCB2b2lkIGNvbnN0KiBfU3JjLCBpbnQgX1ZhbCwgc2l6ZV90IF9NYXhDb3VudCk7CmNoYXIqIHN0cmNhdChjaGFyKiBfRGVzdGluYXRpb24sIGNoYXIgY29uc3QqIF9Tb3VyY2UpOwppbnQgc3RyY21wKGNoYXIgY29uc3QqIF9TdHIxLCBjaGFyIGNvbnN0KiBfU3RyMik7CmludCBzdHJjb2xsKGNoYXIgY29uc3QqIF9TdHJpbmcxLCBjaGFyIGNvbnN0KiBfU3RyaW5nMik7CmNoYXIqIHN0cmVycm9yKGludCBfRXJyb3JNZXNzYWdlKTsKc2l6ZV90IHN0cmxlbihjaGFyIGNvbnN0KiBfU3RyKTsKY2hhciogc3RybmNhdChjaGFyKiBfRGVzdGluYXRpb24sIGNoYXIgY29uc3QqIF9Tb3VyY2UsIHNpemVfdCBfQ291bnQpOwppbnQgc3RybmNtcChjaGFyIGNvbnN0KiBfU3RyMSwgY2hhciBjb25zdCogX1N0cjIsIHNpemVfdCBfTWF4Q291bnQpOwpjaGFyKiBzdHJuY3B5KGNoYXIqIF9EZXN0aW5hdGlvbiwgY2hhciBjb25zdCogX1NvdXJjZSwgc2l6ZV90IF9Db3VudCk7CnNpemVfdCBzdHJubGVuKGNoYXIgY29uc3QqIF9TdHJpbmcsIHNpemVfdCBfTWF4Q291bnQpOwpzdGF0aWMgX19pbmxpbmUgc2l6ZV90IHN0cm5sZW5fcyhjaGFyIGNvbnN0KiBfU3RyaW5nLCBzaXplX3QgX01heENvdW50KTsKY2hhciogc3RycGJyayhjaGFyIGNvbnN0KiBfU3RyLCBjaGFyIGNvbnN0KiBfQ29udHJvbCk7CnNpemVfdCBzdHJzcG4oY2hhciBjb25zdCogX1N0ciwgY2hhciBjb25zdCogX0NvbnRyb2wpOwpjaGFyKiBzdHJ0b2soY2hhciogX1N0cmluZywgY2hhciBjb25zdCogX0RlbGltaXRlcik7CiNpZiBkZWZpbmVkKF9fU1REQ19PV05FUlNISVBfXykgJiYgZGVmaW5lZChfX09XTkVSU0hJUF9IX18pCmNoYXIqIF9Pd25lciBzdHJkdXAoY2hhciBjb25zdCogX1N0cmluZyk7CiNlbHNlCmNoYXIqIHN0cmR1cChjaGFyIGNvbnN0KiBfU3RyaW5nKTsKI2VuZGlmCmludCBzdHJjbXBpKGNoYXIgY29uc3QqIF9TdHJpbmcxLCBjaGFyIGNvbnN0KiBfU3RyaW5nMik7CmludCBzdHJpY21wKGNoYXIgY29uc3QqIF9TdHJpbmcxLCBjaGFyIGNvbnN0KiBfU3RyaW5nMik7CmNoYXIqIHN0cmx3cihjaGFyKiBfU3RyaW5nKTsKaW50IHN0cm5pY21wKGNoYXIgY29uc3QqIF9TdHJpbmcxLCBjaGFyIGNvbnN0KiBfU3RyaW5nMiwgc2l6ZV90IF9NYXhDb3VudCk7CmNoYXIqIHN0cm5zZXQoY2hhciogX1N0cmluZywgaW50IF9WYWx1ZSwgc2l6ZV90IF9NYXhDb3VudCk7CmNoYXIqIHN0cnJldihjaGFyKiBfU3RyaW5nKTsKY2hhciogc3Ryc2V0KGNoYXIqIF9TdHJpbmcsIGludCBfVmFsdWUpOyBjaGFyKiBzdHJ1cHIoY2hhciogX1N0cmluZyk7AE5vdGU6IGluY2x1ZGluZyBmaWxlOgBlbHNlIF9jYXRjaF9sYWJlbF8lZDoALXRhcmdldD1jOTkALXN0ZD1jOTkALXRhcmdldD1jODkAX19pbnQ4AFRLX0tFWVdPUkRfX0lOVDgAX0RlY2ltYWwxMjgAVEtfS0VZV09SRF9fREVDSU1BTDEyOABfX2ludDE2AFRLX0tFWVdPUkRfX0lOVDE2AF9faW50NjQAX0RlY2ltYWw2NABUS19LRVlXT1JEX19JTlQ2NABUS19LRVlXT1JEX19ERUNJTUFMNjQAX19pbnQzMgBfRGVjaW1hbDMyAFRLX0tFWVdPUkRfX0lOVDMyAFRLX0tFWVdPUkRfX0RFQ0lNQUwzMgAtdGFyZ2V0PWMxMQAtc3RkPWMxMQBhbGlnbiA+IDAAc3RhdGVfdG9fcmVzdG9yZSA+IDAAbGlzdC50YWlsLT5uZXh0ID09IDAAcF9pbml0X2RlY2xhcmF0b3ItPnBfZGVjbGFyYXRvci0+dHlwZS50eXBlX3NwZWNpZmllcl9mbGFncyA9PSAwAHBfb2JqZWN0LT5tZW1iZXJzLnNpemUgPT0gMABmbXQgIT0gMABhbGlnbiAhPSAwAGlmICgxKSAvKnRyeSovAC8qX0ltcGxpY2l0Ki8ALypyZXN0cmljdCovAC8qJXMqLwAvKltbbm9yZXR1cm5dXSovAHByZXZpb3VzIG1lbWJlcnMgb2YgJyVzJyB3ZXJlIG5vdCBtb3ZlZCBiZWZvcmUgdGhpcyBhc3NpZ25tZW50LgBtZW1vcnkgcG9pbnRlZCBieSAnJXMnIHdhcyBub3QgcmVsZWFzZWQgYmVmb3JlIGFzc2lnbm1lbnQuAFVuaWNvZGUgY2hhcmFjdGVyIGxpdGVyYWxzIG1heSBub3QgY29udGFpbiBtdWx0aXBsZSBjaGFyYWN0ZXJzLgB1c2Ugb2YgJyVzJyB3aXRoIHRhZyB0eXBlIHRoYXQgZG9lcyBub3QgbWF0Y2ggcHJldmlvdXMgZGVjbGFyYXRpb24uAHN0cnVjdCAnJXMnIGlzIGluY29tcGxldGUuAENoYXJhY3RlciB0b28gbGFyZ2UgZm9yIGVuY2xvc2luZyBjaGFyYWN0ZXIgbGl0ZXJhbCB0eXBlLgBvYmplY3QgJyVzJyB3YXMgbm90IG1vdmVkLgBtZW1vcnkgcG9pbnRlZCBieSAnJXMnIHdhcyBub3QgcmVsZWFzZWQuAE9iamVjdCBtdXN0IGJlIG93bmVyIHF1YWxpZmllZC4AaW52YWxpZCB0eXBlcyBmb3Igb3BlcmF0b3IgLQAsACoAIXRva2VuX2xpc3RfaXNfZW1wdHkobGlzdCkAKCglcyklcykAcF9leHByZXNzaW9uX25vZGUgPT0gTlVMTCB8fCAocF9leHByZXNzaW9uX25vZGUtPmZpcnN0X3Rva2VuICYmIHBfZXhwcmVzc2lvbl9ub2RlLT5sYXN0X3Rva2VuKQAobnVsbCkAci50YWlsID09IE5VTEwgfHwgIXRva2VuX2lzX2JsYW5rKHIudGFpbCkAbWlzc2luZyBtYWNybyBhcmd1bWVudCAoc2hvdWxkIGJlIGNoZWNrZWQgYmVmb3JlKQB0eXBlX2lzX2FycmF5KHBfdHlwZSkAdHlwZV9pc19wb2ludGVyKHBfdHlwZSkAIW1hY3JvX2FscmVhZHlfZXhwYW5kZWQobGlzdCwgbWFjcm8tPm5hbWUpACF0b2tlbl9pc19ibGFuayhpbnB1dF9saXN0LT5oZWFkKQAhdG9rZW5faXNfYmxhbmsobmV3X2xpc3QuaGVhZCkAYXNzZXJ0KF9fVkFfQVJHU19fKQAocC0+aGVhZCA9PSBOVUxMICYmIHAtPnRhaWwgPT0gTlVMTCkgfHwgKHAtPmhlYWQgIT0gTlVMTCAmJiBwLT50YWlsICE9IE5VTEwpACEoaW5wdXRfbGlzdC0+aGVhZC0+ZmxhZ3MgJiBUS19GTEFHX0hBU19ORVdMSU5FX0JFRk9SRSkAIShuZXdfbGlzdC5oZWFkLT5mbGFncyAmIFRLX0ZMQUdfSEFTX05FV0xJTkVfQkVGT1JFKQAhdG9rZW5fbGlzdF9pc19lbXB0eSgmbGlzdDIpACgoX0Jvb2wpMSkAKChfQm9vbCkwKQAoKHZvaWQqKTApAG1pc3NpbmcgKQBleHBlY3RlZCApACgAcF9icmFja2V0X2luaXRpYWxpemVyX2xpc3QtPmZpcnN0X3Rva2VuLT50eXBlID09ICd7JwBleHBlY3RlZCBkZWNsYXJhdGlvbiBub3QgJyVzJwBtZW1iZXIgJyVzJyBub3QgZm91bmQgaW4gc3RydWN0ICclcycAcGFyYW1ldGVyICclcycgaXMgbGVhdmluZyBzY29wZWQgd2l0aCBhIHVuaW5pdGlhbGl6ZWQgb2JqZWN0ICclcycAcGFyYW1ldGVyICclcycgaXMgbGVhdmluZyBzY29wZWQgd2l0aCBhIG1vdmVkIG9iamVjdCAnJXMnAHVua25vd24gb3B0aW9uICclcycAc3RydWN0IG1lbWJlciAnJXMnIG5vdCBmb3VuZCBpbiAnJXMnAHVua25vd24gd2FybmluZyAnJXMnAGludmFsaWQgdHlwZSAnJXMnAG5vdCBmb3VuZCAnJXMnAGRpciA9ICclcycAaW1wbGljaXQgY29udmVyc2lvbiBmcm9tICdlbnVtICVzJyB0byAnZW51bSAlcycAbXVsdGlwbGUgZGVmaW5pdGlvbiBvZiAnZW51bSAlcycAb3AgPT0gJz09JyB8fCBvcCA9PSAnIT0nAGV4cGVjdGVkICd9JyBiZWZvcmUgJyknAGV4cGVjdGVkICddJyBiZWZvcmUgJyknAHBfZXhwcmVzc2lvbl9ub2RlLT5maXJzdF90b2tlbi0+dHlwZSA9PSAnKCcAb2JqX293bmVyIHBvaW50ZXIgbXVzdCBiZSBjcmVhdGVkIHVzaW5nIGFkZHJlc3Mgb2Ygb3BlcmF0b3IgJgAvLyMAeW91IGNhbiB1c2UgImFkamFjZW50IiAic3RyaW5ncyIALCAiZXJyb3IiACJ6ZXJvIgAiZmlsZSIAInVuY2hlY2tlZCIAXCIAeyAAIGRpc2NhcmRpbmcgY29uc3QgYXQgYXJndW1lbnQgACBpbmNvbXBhdGlibGUgdHlwZXMgYXQgYXJndW1lbnQgAHN0cnVjdCAAIGluY29tcGF0aWJsZSB0eXBlcyAAeyAlcyAAIG9yIABlbnVtIABpZ25vcmluZyB0aGUgcmVzdWx0IG9mIG93bmVyIHR5cGUgAGVsaWYgZGVmaW5lZCAAZWxpZiAhIGRlZmluZWQgAGxlZnQgdHlwZSBtdXN0IGJlIG93bmVyIHF1YWxpZmllZCAAJXA6JXMgPT0gACAlcyBfdG1wID0gABtbOTdtJXM6JWQ6JWQ6IAAlcyglZCwlZCk6IAAgICAgICAgICAgICAgICB9CgAgICAgICAgICAgICAgImFydGlmYWN0TG9jYXRpb24iOiB7CgAgICAgICAgInBoeXNpY2FsTG9jYXRpb24iOiB7CgAgICAgICAgICAgICAgICJyZWdpb24iOiB7CgAgICAgICJtZXNzYWdlIjogewoAICAgICAgICAgIHsKABtbOTFtZXJyb3I6IBtbOTdtJXMKABtbOTVtd2FybmluZzogG1s5N20lcwoAG1szNjsxbW5vdGU6IBtbOTdtJXMKAGV4cGVjdGVkIHRva2VuICVzIGdvdCAlcwoAJXMgJXMKAHRhZyAlcwoAX1N0YXRpY19hc3NlcnQgZmFpbGVkICVzCgByZWFkICVzCgBlcnJvcjogJXMKAHdhcm5pbmc6ICVzCgBub3RlOiAlcwoAdG9vIGZldyBhcmd1bWVudHMgcHJvdmlkZWQgdG8gZnVuY3Rpb24tbGlrZSBtYWNybyBpbnZvY2F0aW9uCgAbWzk3bUNha2UgMC43LjQbWzBtCgAjcHJhZ21hIG9uY2UKI2RlZmluZSBfSU9GQkYgMHgwMDAwCiNkZWZpbmUgX0lPTEJGIDB4MDA0MAojZGVmaW5lIF9JT05CRiAweDAwMDQKCiNkZWZpbmUgQlVGU0laICA1MTIKCiNkZWZpbmUgRU9GICAgICgtMSkKCiNkZWZpbmUgRklMRU5BTUVfTUFYICAgIDI2MAojZGVmaW5lIEZPUEVOX01BWCAgICAgICAyMAoKI2RlZmluZSBMX3RtcG5hbSAgIDI2MCAvLyBfTUFYX1BBVEgKCi8qIFNlZWsgbWV0aG9kIGNvbnN0YW50cyAqLwoKI2RlZmluZSBTRUVLX0NVUiAgICAxCiNkZWZpbmUgU0VFS19FTkQgICAgMgojZGVmaW5lIFNFRUtfU0VUICAgIDAKCgojZGVmaW5lIFRNUF9NQVggICAgICAgICAyMTQ3NDgzNjQ3CgoKI2RlZmluZSBzdGRpbiAgKChGSUxFKikwKQojZGVmaW5lIHN0ZG91dCAoKEZJTEUqKTEpCiNkZWZpbmUgc3RkZXJyICgoRklMRSopMikKCnR5cGVkZWYgbG9uZyBsb25nIGZwb3NfdDsKdHlwZWRlZiBpbnQgRklMRTsKCmV4dGVybiBGSUxFKiBzdGRpbjsKZXh0ZXJuIEZJTEUqIHN0ZG91dDsKZXh0ZXJuIEZJTEUqIHN0ZGVycjsKCnR5cGVkZWYgaW50IHNpemVfdDsKdHlwZWRlZiB2b2lkKiB2YV9saXN0OwppbnQgcmVtb3ZlKGNvbnN0IGNoYXIqIGZpbGVuYW1lKTsKaW50IHJlbmFtZShjb25zdCBjaGFyKiBvbGQsIGNvbnN0IGNoYXIqIG5ld3MpOwpGSUxFKiB0bXBmaWxlKHZvaWQpOwpjaGFyKiB0bXBuYW0oY2hhciogcyk7CiNpZiBkZWZpbmVkKF9fU1REQ19PV05FUlNISVBfXykgJiYgZGVmaW5lZChfX09XTkVSU0hJUF9IX18pCmludCBmY2xvc2UoRklMRSogX093bmVyIHN0cmVhbSk7CiNlbHNlCmludCBmY2xvc2UoRklMRSogc3RyZWFtKTsKI2VuZGlmCmludCBmZmx1c2goRklMRSogc3RyZWFtKTsKI2lmIGRlZmluZWQoX19TVERDX09XTkVSU0hJUF9fKSAmJiBkZWZpbmVkKF9fT1dORVJTSElQX0hfXykKRklMRSogX093bmVyIGZvcGVuKGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZpbGVuYW1lLCBjb25zdCBjaGFyKiByZXN0cmljdCBtb2RlKTsKRklMRSogX093bmVyIGZyZW9wZW4oY29uc3QgY2hhciogcmVzdHJpY3QgZmlsZW5hbWUsIGNvbnN0IGNoYXIqIHJlc3RyaWN0IG1vZGUsIEZJTEUqIHJlc3RyaWN0IHN0cmVhbSk7CiNlbHNlCkZJTEUqIGZvcGVuKGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZpbGVuYW1lLCBjb25zdCBjaGFyKiByZXN0cmljdCBtb2RlKTsKRklMRSogZnJlb3Blbihjb25zdCBjaGFyKiByZXN0cmljdCBmaWxlbmFtZSwgY29uc3QgY2hhciogcmVzdHJpY3QgbW9kZSwgRklMRSogcmVzdHJpY3Qgc3RyZWFtKTsKI2VuZGlmCnZvaWQgc2V0YnVmKEZJTEUqIHJlc3RyaWN0IHN0cmVhbSwgY2hhciogcmVzdHJpY3QgYnVmKTsKaW50IHNldHZidWYoRklMRSogcmVzdHJpY3Qgc3RyZWFtLCBjaGFyKiByZXN0cmljdCBidWYsIGludCBtb2RlLCBzaXplX3Qgc2l6ZSk7CmludCBmcHJpbnRmKEZJTEUqIHJlc3RyaWN0IHN0cmVhbSwgY29uc3QgY2hhciogcmVzdHJpY3QgZm9ybWF0LCAuLi4pOwppbnQgZnNjYW5mKEZJTEUqIHJlc3RyaWN0IHN0cmVhbSwgY29uc3QgY2hhciogcmVzdHJpY3QgZm9ybWF0LCAuLi4pOwppbnQgcHJpbnRmKGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZvcm1hdCwgLi4uKTsKaW50IHNjYW5mKGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZvcm1hdCwgLi4uKTsKaW50IHNucHJpbnRmKGNoYXIqIHJlc3RyaWN0IHMsIHNpemVfdCBuLCBjb25zdCBjaGFyKiByZXN0cmljdCBmb3JtYXQsIC4uLik7CmludCBzcHJpbnRmKGNoYXIqIHJlc3RyaWN0IHMsIGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZvcm1hdCwgLi4uKTsKaW50IHNzY2FuZihjb25zdCBjaGFyKiByZXN0cmljdCBzLCBjb25zdCBjaGFyKiByZXN0cmljdCBmb3JtYXQsIC4uLik7CmludCB2ZnByaW50ZihGSUxFKiByZXN0cmljdCBzdHJlYW0sIGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZvcm1hdCwgdmFfbGlzdCBhcmcpOwppbnQgdmZzY2FuZihGSUxFKiByZXN0cmljdCBzdHJlYW0sIGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZvcm1hdCwgdmFfbGlzdCBhcmcpOwppbnQgdnByaW50Zihjb25zdCBjaGFyKiByZXN0cmljdCBmb3JtYXQsIHZhX2xpc3QgYXJnKTsKaW50IHZzY2FuZihjb25zdCBjaGFyKiByZXN0cmljdCBmb3JtYXQsIHZhX2xpc3QgYXJnKTsKaW50IHB1dHMoY29uc3QgY2hhciogc3RyKTsKaW50IGZwdXRzKGNvbnN0IGNoYXIqIHJlc3RyaWN0IHMsIEZJTEUqIHJlc3RyaWN0IHN0cmVhbSk7CmludCBnZXRjKEZJTEUqIHN0cmVhbSk7CmludCBnZXRjaGFyKHZvaWQpOwppbnQgcHV0YyhpbnQgYywgRklMRSogc3RyZWFtKTsKaW50IHB1dGNoYXIoaW50IGMpOwppbnQgcHV0cyhjb25zdCBjaGFyKiBzKTsKaW50IHVuZ2V0YyhpbnQgYywgRklMRSogc3RyZWFtKTsKaW50IGZnZXRjKEZJTEUqIHN0cmVhbSk7CnNpemVfdCBmcmVhZCh2b2lkKiByZXN0cmljdCBwdHIsIHNpemVfdCBzaXplLCBzaXplX3Qgbm1lbWIsIEZJTEUqIHJlc3RyaWN0IHN0cmVhbSk7CnNpemVfdCBmd3JpdGUoY29uc3Qgdm9pZCogcmVzdHJpY3QgcHRyLCBzaXplX3Qgc2l6ZSwgc2l6ZV90IG5tZW1iLCBGSUxFKiByZXN0cmljdCBzdHJlYW0pOwppbnQgZmdldHBvcyhGSUxFKiByZXN0cmljdCBzdHJlYW0sIGZwb3NfdCogcmVzdHJpY3QgcG9zKTsKaW50IGZzZWVrKEZJTEUqIHN0cmVhbSwgbG9uZyBpbnQgb2Zmc2V0LCBpbnQgd2hlbmNlKTsKaW50IGZzZXRwb3MoRklMRSogc3RyZWFtLCBjb25zdCBmcG9zX3QqIHBvcyk7CmxvbmcgaW50IGZ0ZWxsKEZJTEUqIHN0cmVhbSk7CnZvaWQgcmV3aW5kKEZJTEUqIHN0cmVhbSk7CnZvaWQgY2xlYXJlcnIoRklMRSogc3RyZWFtKTsKaW50IGZlb2YoRklMRSogc3RyZWFtKTsKaW50IGZlcnJvcihGSUxFKiBzdHJlYW0pOwp2b2lkIHBlcnJvcihjb25zdCBjaGFyKiBzKTsKCgoKI2lmbmRlZiBOVUxMCiNkZWZpbmUgTlVMTCAoKHZvaWQqKTApCiNlbmRpZgoAICAgICAgICAgICAgICAgICAgImVuZENvbHVtbiI6ICVkCgB3YXJuaW5nOiAlcyBbLVclc10KACAgICAgICAgIF0KACAgICAgICJsb2NhdGlvbnMiOiBbCgAgICAgICAgICAibG9naWNhbExvY2F0aW9ucyI6IFsKACNwcmFnbWEgb25jZQoKZG91YmxlIGFjb3MoZG91YmxlIF9feCk7CmRvdWJsZSBhc2luKGRvdWJsZSBfX3gpOwpkb3VibGUgYXRhbihkb3VibGUgX194KTsKZG91YmxlIGF0YW4yKGRvdWJsZSBfX3ksIGRvdWJsZSBfX3gpOwpkb3VibGUgY29zKGRvdWJsZSBfX3gpOwpkb3VibGUgc2luKGRvdWJsZSBfX3gpOwpkb3VibGUgdGFuKGRvdWJsZSBfX3gpOwpkb3VibGUgY29zaChkb3VibGUgX194KTsKZG91YmxlIHNpbmgoZG91YmxlIF9feCk7CmRvdWJsZSB0YW5oKGRvdWJsZSBfX3gpOwpkb3VibGUgYWNvc2goZG91YmxlIF9feCk7CmRvdWJsZSBhc2luaChkb3VibGUgX194KTsKZG91YmxlIGF0YW5oKGRvdWJsZSBfX3gpOwpkb3VibGUgZXhwKGRvdWJsZSBfX3gpOwpkb3VibGUgZnJleHAoZG91YmxlIF9feCwgaW50KiBfX2V4cG9uZW50KTsKZG91YmxlIGxkZXhwKGRvdWJsZSBfX3gsIGludCBfX2V4cG9uZW50KTsKZG91YmxlIGxvZyhkb3VibGUgX194KTsKZG91YmxlIGxvZzEwKGRvdWJsZSBfX3gpOwpkb3VibGUgbW9kZihkb3VibGUgX194LCBkb3VibGUqIF9faXB0cik7CmRvdWJsZSBleHBtMShkb3VibGUgX194KTsKZG91YmxlIGxvZzFwKGRvdWJsZSBfX3gpOwpkb3VibGUgbG9nYihkb3VibGUgX194KTsKZG91YmxlIGV4cDIoZG91YmxlIF9feCk7CmRvdWJsZSBsb2cyKGRvdWJsZSBfX3gpOwpkb3VibGUgcG93KGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwpkb3VibGUgc3FydChkb3VibGUgX194KTsKZG91YmxlIGh5cG90KGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwpkb3VibGUgY2JydChkb3VibGUgX194KTsKZG91YmxlIGNlaWwoZG91YmxlIF9feCk7CmRvdWJsZSBmYWJzKGRvdWJsZSBfX3gpOwpkb3VibGUgZmxvb3IoZG91YmxlIF9feCk7CmRvdWJsZSBmbW9kKGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwppbnQgaXNpbmYoZG91YmxlIF9fdmFsdWUpOwppbnQgZmluaXRlKGRvdWJsZSBfX3ZhbHVlKTsKZG91YmxlIGRyZW0oZG91YmxlIF9feCwgZG91YmxlIF9feSk7CmRvdWJsZSBzaWduaWZpY2FuZChkb3VibGUgX194KTsKZG91YmxlIGNvcHlzaWduKGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwpkb3VibGUgbmFuKGNvbnN0IGNoYXIqIF9fdGFnYik7CmludCBpc25hbihkb3VibGUgX192YWx1ZSk7CmRvdWJsZSBqMChkb3VibGUpOwpkb3VibGUgajEoZG91YmxlKTsKZG91YmxlIGpuKGludCwgZG91YmxlKTsKZG91YmxlIHkwKGRvdWJsZSk7CmRvdWJsZSB5MShkb3VibGUpOwpkb3VibGUgeW4oaW50LCBkb3VibGUpOwpkb3VibGUgZXJmKGRvdWJsZSk7CmRvdWJsZSBlcmZjKGRvdWJsZSk7CmRvdWJsZSBsZ2FtbWEoZG91YmxlKTsKZG91YmxlIHRnYW1tYShkb3VibGUpOwpkb3VibGUgZ2FtbWEoZG91YmxlKTsKZG91YmxlIGxnYW1tYV9yKGRvdWJsZSwgaW50KiBfX3NpZ25nYW1wKTsKZG91YmxlIHJpbnQoZG91YmxlIF9feCk7CmRvdWJsZSBuZXh0YWZ0ZXIoZG91YmxlIF9feCwgZG91YmxlIF9feSk7CmRvdWJsZSBuZXh0dG93YXJkKGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7CmRvdWJsZSByZW1haW5kZXIoZG91YmxlIF9feCwgZG91YmxlIF9feSk7CmRvdWJsZSBzY2FsYm4oZG91YmxlIF9feCwgaW50IF9fbik7CmludCBpbG9nYihkb3VibGUgX194KTsKZG91YmxlIHNjYWxibG4oZG91YmxlIF9feCwgbG9uZyBpbnQgX19uKTsKZG91YmxlIG5lYXJieWludChkb3VibGUgX194KTsKZG91YmxlIHJvdW5kKGRvdWJsZSBfX3gpOwpkb3VibGUgdHJ1bmMoZG91YmxlIF9feCk7CmRvdWJsZSByZW1xdW8oZG91YmxlIF9feCwgZG91YmxlIF9feSwgaW50KiBfX3F1byk7CmxvbmcgaW50IGxyaW50KGRvdWJsZSBfX3gpOwpsb25nIGxvbmcgaW50IGxscm91bmQoZG91YmxlIF9feCk7CmRvdWJsZSBmZGltKGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwpkb3VibGUgZm1heChkb3VibGUgX194LCBkb3VibGUgX195KTsKZG91YmxlIGZtaW4oZG91YmxlIF9feCwgZG91YmxlIF9feSk7CmRvdWJsZSBmbWEoZG91YmxlIF9feCwgZG91YmxlIF9feSwgZG91YmxlIF9feik7CmRvdWJsZSBzY2FsYihkb3VibGUgX194LCBkb3VibGUgX19uKTsKZmxvYXQgYWNvc2YoZmxvYXQgX194KTsKZmxvYXQgYXNpbmYoZmxvYXQgX194KTsKZmxvYXQgYXRhbmYoZmxvYXQgX194KTsKZmxvYXQgYXRhbjJmKGZsb2F0IF9feSwgZmxvYXQgX194KTsKZmxvYXQgY29zZihmbG9hdCBfX3gpOwpmbG9hdCBzaW5mKGZsb2F0IF9feCk7CmZsb2F0IHRhbmYoZmxvYXQgX194KTsKZmxvYXQgY29zaGYoZmxvYXQgX194KTsKZmxvYXQgc2luaGYoZmxvYXQgX194KTsKZmxvYXQgdGFuaGYoZmxvYXQgX194KTsKZmxvYXQgYWNvc2hmKGZsb2F0IF9feCk7CmZsb2F0IGFzaW5oZihmbG9hdCBfX3gpOwpmbG9hdCBhdGFuaGYoZmxvYXQgX194KTsKZmxvYXQgZXhwZihmbG9hdCBfX3gpOwpmbG9hdCBmcmV4cGYoZmxvYXQgX194LCBpbnQqIF9fZXhwb25lbnQpOwpmbG9hdCBsZGV4cGYoZmxvYXQgX194LCBpbnQgX19leHBvbmVudCk7CmZsb2F0IGxvZ2YoZmxvYXQgX194KTsKZmxvYXQgbG9nMTBmKGZsb2F0IF9feCk7IGZsb2F0IF9fbG9nMTBmKGZsb2F0IF9feCk7CmZsb2F0IG1vZGZmKGZsb2F0IF9feCwgZmxvYXQqIF9faXB0cik7CmZsb2F0IGV4cG0xZihmbG9hdCBfX3gpOwpmbG9hdCBsb2cxcGYoZmxvYXQgX194KTsKZmxvYXQgbG9nYmYoZmxvYXQgX194KTsKZmxvYXQgZXhwMmYoZmxvYXQgX194KTsKZmxvYXQgbG9nMmYoZmxvYXQgX194KTsKZmxvYXQgcG93ZihmbG9hdCBfX3gsIGZsb2F0IF9feSk7CmZsb2F0IHNxcnRmKGZsb2F0IF9feCk7CmZsb2F0IGh5cG90ZihmbG9hdCBfX3gsIGZsb2F0IF9feSk7CmZsb2F0IGNicnRmKGZsb2F0IF9feCk7CmZsb2F0IGNlaWxmKGZsb2F0IF9feCk7CmZsb2F0IGZhYnNmKGZsb2F0IF9feCk7CmZsb2F0IGZsb29yZihmbG9hdCBfX3gpOwpmbG9hdCBmbW9kZihmbG9hdCBfX3gsIGZsb2F0IF9feSk7IAppbnQgaXNpbmZmKGZsb2F0IF9fdmFsdWUpOwppbnQgZmluaXRlZihmbG9hdCBfX3ZhbHVlKTsKZmxvYXQgZHJlbWYoZmxvYXQgX194LCBmbG9hdCBfX3kpOwpmbG9hdCBzaWduaWZpY2FuZGYoZmxvYXQgX194KTsgCmZsb2F0IGNvcHlzaWduZihmbG9hdCBfX3gsIGZsb2F0IF9feSk7IApmbG9hdCBuYW5mKGNvbnN0IGNoYXIqIF9fdGFnYik7IAppbnQgaXNuYW5mKGZsb2F0IF9fdmFsdWUpOwpmbG9hdCBqMGYoZmxvYXQpOyAKZmxvYXQgajFmKGZsb2F0KTsgCmZsb2F0IGpuZihpbnQsIGZsb2F0KTsgCmZsb2F0IHkwZihmbG9hdCk7IApmbG9hdCB5MWYoZmxvYXQpOyAKZmxvYXQgeW5mKGludCwgZmxvYXQpOyAKZmxvYXQgZXJmZihmbG9hdCk7IApmbG9hdCBlcmZjZihmbG9hdCk7CmZsb2F0IGxnYW1tYWYoZmxvYXQpOwpmbG9hdCB0Z2FtbWFmKGZsb2F0KTsKZmxvYXQgZ2FtbWFmKGZsb2F0KTsgCmZsb2F0IGxnYW1tYWZfcihmbG9hdCwgaW50KiBfX3NpZ25nYW1wKTsgCmZsb2F0IHJpbnRmKGZsb2F0IF9feCk7IApmbG9hdCBuZXh0YWZ0ZXJmKGZsb2F0IF9feCwgZmxvYXQgX195KTsgCmZsb2F0IG5leHR0b3dhcmRmKGZsb2F0IF9feCwgbG9uZyBkb3VibGUgX195KTsgCmZsb2F0IHJlbWFpbmRlcmYoZmxvYXQgX194LCBmbG9hdCBfX3kpOyAKZmxvYXQgc2NhbGJuZihmbG9hdCBfX3gsIGludCBfX24pOyAKaW50IGlsb2diZihmbG9hdCBfX3gpOyAKZmxvYXQgc2NhbGJsbmYoZmxvYXQgX194LCBsb25nIGludCBfX24pOyAKZmxvYXQgbmVhcmJ5aW50ZihmbG9hdCBfX3gpOyAKZmxvYXQgcm91bmRmKGZsb2F0IF9feCk7IApmbG9hdCB0cnVuY2YoZmxvYXQgX194KTsgCmZsb2F0IHJlbXF1b2YoZmxvYXQgX194LCBmbG9hdCBfX3ksIGludCogX19xdW8pOyAKbG9uZyBpbnQgbHJpbnRmKGZsb2F0IF9feCk7IApsb25nIGxvbmcgaW50IGxscm91bmRmKGZsb2F0IF9feCk7IApmbG9hdCBmZGltZihmbG9hdCBfX3gsIGZsb2F0IF9feSk7CmZsb2F0IGZtYXhmKGZsb2F0IF9feCwgZmxvYXQgX195KTsgCmZsb2F0IGZtaW5mKGZsb2F0IF9feCwgZmxvYXQgX195KTsKZmxvYXQgZm1hZihmbG9hdCBfX3gsIGZsb2F0IF9feSwgZmxvYXQgX196KTsgCmZsb2F0IHNjYWxiZihmbG9hdCBfX3gsIGZsb2F0IF9fbik7IApsb25nIGRvdWJsZSBhY29zbChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgYXNpbmwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGF0YW5sKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBhdGFuMmwobG9uZyBkb3VibGUgX195LCBsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgY29zbChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgc2lubChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgdGFubChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgY29zaGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgc2luaGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgdGFuaGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgYWNvc2hsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBhc2luaGwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGF0YW5obChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgZXhwbChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgZnJleHBsKGxvbmcgZG91YmxlIF9feCwgaW50KiBfX2V4cG9uZW50KTsgCmxvbmcgZG91YmxlIGxkZXhwbChsb25nIGRvdWJsZSBfX3gsIGludCBfX2V4cG9uZW50KTsgCmxvbmcgZG91YmxlIGxvZ2wobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGxvZzEwbChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgbW9kZmwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSogX19pcHRyKTsgCmxvbmcgZG91YmxlIGV4cG0xbChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgbG9nMXBsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBsb2dibChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgZXhwMmwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGxvZzJsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBwb3dsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsgCmxvbmcgZG91YmxlIHNxcnRsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBoeXBvdGwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOyAKbG9uZyBkb3VibGUgY2JydGwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGNlaWxsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBmYWJzbChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgZmxvb3JsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIGZtb2RsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsgCmludCBpc2luZmwobG9uZyBkb3VibGUgX192YWx1ZSk7CmludCBmaW5pdGVsKGxvbmcgZG91YmxlIF9fdmFsdWUpOwpsb25nIGRvdWJsZSBkcmVtbChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7IApsb25nIGRvdWJsZSBzaWduaWZpY2FuZGwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGNvcHlzaWdubChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7IApsb25nIGRvdWJsZSBuYW5sKGNvbnN0IGNoYXIqIF9fdGFnYik7IAppbnQgaXNuYW5sKGxvbmcgZG91YmxlIF9fdmFsdWUpOwpsb25nIGRvdWJsZSBqMGwobG9uZyBkb3VibGUpOyAKbG9uZyBkb3VibGUgajFsKGxvbmcgZG91YmxlKTsgCmxvbmcgZG91YmxlIGpubChpbnQsIGxvbmcgZG91YmxlKTsKbG9uZyBkb3VibGUgeTBsKGxvbmcgZG91YmxlKTsgCmxvbmcgZG91YmxlIHkxbChsb25nIGRvdWJsZSk7IApsb25nIGRvdWJsZSB5bmwoaW50LCBsb25nIGRvdWJsZSk7CmxvbmcgZG91YmxlIGVyZmwobG9uZyBkb3VibGUpOyAKbG9uZyBkb3VibGUgZXJmY2wobG9uZyBkb3VibGUpOwpsb25nIGRvdWJsZSBsZ2FtbWFsKGxvbmcgZG91YmxlKTsgCmxvbmcgZG91YmxlIHRnYW1tYWwobG9uZyBkb3VibGUpOyAKbG9uZyBkb3VibGUgZ2FtbWFsKGxvbmcgZG91YmxlKTsgCmxvbmcgZG91YmxlIGxnYW1tYWxfcihsb25nIGRvdWJsZSwgaW50KiBfX3NpZ25nYW1wKTsgCmxvbmcgZG91YmxlIHJpbnRsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBuZXh0YWZ0ZXJsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsgCmxvbmcgZG91YmxlIG5leHR0b3dhcmRsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsKbG9uZyBkb3VibGUgcmVtYWluZGVybChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7IApsb25nIGRvdWJsZSBzY2FsYm5sKGxvbmcgZG91YmxlIF9feCwgaW50IF9fbik7IAppbnQgaWxvZ2JsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBzY2FsYmxubChsb25nIGRvdWJsZSBfX3gsIGxvbmcgaW50IF9fbik7IApsb25nIGRvdWJsZSBuZWFyYnlpbnRsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIHJvdW5kbChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSB0cnVuY2wobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgcmVtcXVvbChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSwgaW50KiBfX3F1byk7CmxvbmcgaW50IGxyaW50bChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGxvbmcgaW50IGxscm91bmRsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIGZkaW1sKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsKbG9uZyBkb3VibGUgZm1heGwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOwpsb25nIGRvdWJsZSBmbWlubChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7CmxvbmcgZG91YmxlIGZtYWwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3ksIGxvbmcgZG91YmxlIF9feik7CmxvbmcgZG91YmxlIHNjYWxibChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9fbik7CgAtLS0gYmVnaW4gb2Ygc2NvcGUtLS0KAC0tLSBlbmQgb2Ygc2NvcGUtLS0KACAgICAgICAgICAgICAgfSwKACAgICAgICAgICAgICAgICAgICJzdGFydENvbHVtbiI6ICVkLAoAICAgICAgICAgICAgICAgICAgInN0YXJ0TGluZSI6ICVkLAoAICAgICAgICAgICAgICAgICAgImVuZExpbmUiOiAlZCwKACAgICAgInJ1bGVJZCI6IiVzIiwKACAgICAgICAgICAgICAgImRlY29yYXRlZE5hbWUiOiAiJXMiLAoAICAgICAgICAgICAgICAiZnVsbHlRdWFsaWZpZWROYW1lIjogIiVzIiwKACAgICAgImxldmVsIjoiZXJyb3IiLAoAICAgICAibGV2ZWwiOiJ3YXJuaW5nIiwKACAgICAgImxldmVsIjoibm90ZSIsCgAgICAgICAgICAgICAgICAgICJ1cmkiOiAiZmlsZTovLy8lcyIKACAgICAgICAgICAgICJ0ZXh0IjogIiVzIgoAICAgICAgICAgICAgICAia2luZCI6ICIlcyIKACNkZWZpbmUgX19USU1FX18gIiUwMmQ6JTAyZDolMDJkIgoAI2RlZmluZSBfX0RBVEVfXyAiJXMgJTJkICVkIgoAZXhwZWN0ZWQgRU9GIAoACiNpZmRlZiBOREVCVUcKI2RlZmluZSBhc3NlcnQoLi4uKSAoKHZvaWQpMCkjZWxzZSNkZWZpbmUgYXNzZXJ0KC4uLikgYXNzZXJ0KF9fVkFfQVJHU19fKQojZW5kaWYKCgAjaWZuZGVmIF9fT1dORVJTSElQX0hfXwojZGVmaW5lIF9fT1dORVJTSElQX0hfXwoKI2lmZGVmIF9fU1REQ19PV05FUlNISVBfXwojZGVmaW5lIG91dCBfT3V0CiNkZWZpbmUgb3B0IF9PcHQKI2RlZmluZSBvd25lciBfT3duZXIKI2RlZmluZSBvYmpfb3duZXIgIF9PYmpfb3duZXIKI2RlZmluZSB2aWV3IF9WaWV3CiNkZWZpbmUgdW5jaGVja2VkICJ1bmNoZWNrZWQiCgojZWxzZQojZGVmaW5lIG91dCAKI2RlZmluZSBvcHQgCiNkZWZpbmUgb3duZXIKI2RlZmluZSBvYmpfb3duZXIKI2RlZmluZSB2aWV3CiNkZWZpbmUgc3RhdGljX2RlYnVnKHgpCiNkZWZpbmUgc3RhdGljX3NldCh4LCBzKQojZGVmaW5lIHVuY2hlY2tlZAojZW5kaWYKCiNlbmRpZgoKACNkZWZpbmUgX19DQUtFX18gMjAyMzExTAojZGVmaW5lIF9fU1REQ19WRVJTSU9OX18gMjAyMzExTAojZGVmaW5lIF9fRklMRV9fICJfX0ZJTEVfXyIKI2RlZmluZSBfX0xJTkVfXyAwCiNkZWZpbmUgX19DT1VOVF9fIDAKI2RlZmluZSBfQ09OU09MRQojZGVmaW5lIF9fU1REQ19PV05FUlNISVBfXwoKAAp0eXBlZGVmIGxvbmcgaW50IHB0cmRpZmZfdDsKdHlwZWRlZiBsb25nIHVuc2lnbmVkIGludCBzaXplX3Q7CnR5cGVkZWYgaW50IHdjaGFyX3Q7CnR5cGVkZWYgc3RydWN0IHsKICBsb25nIGxvbmcgX19tYXhfYWxpZ25fbGw7CiAgbG9uZyBkb3VibGUgX19tYXhfYWxpZ25fbGQ7Cn0gbWF4X2FsaWduX3Q7Cgp0eXBlZGVmIHR5cGVvZihudWxscHRyKSBudWxscHRyX3Q7CgoAI3ByYWdtYSBvbmNlCgppbnQqIF9lcnJubyh2b2lkKTsKI2RlZmluZSBlcnJubyAoKl9lcnJubygpKQoKCiNkZWZpbmUgRVBFUk0gICAgICAgICAgIDEKI2RlZmluZSBFTk9FTlQgICAgICAgICAgMgojZGVmaW5lIEVTUkNIICAgICAgICAgICAzCiNkZWZpbmUgRUlOVFIgICAgICAgICAgIDQKI2RlZmluZSBFSU8gICAgICAgICAgICAgNQojZGVmaW5lIEVOWElPICAgICAgICAgICA2CiNkZWZpbmUgRTJCSUcgICAgICAgICAgIDcKI2RlZmluZSBFTk9FWEVDICAgICAgICAgOAojZGVmaW5lIEVCQURGICAgICAgICAgICA5CiNkZWZpbmUgRUNISUxEICAgICAgICAgIDEwCiNkZWZpbmUgRUFHQUlOICAgICAgICAgIDExCiNkZWZpbmUgRU5PTUVNICAgICAgICAgIDEyCiNkZWZpbmUgRUFDQ0VTICAgICAgICAgIDEzCiNkZWZpbmUgRUZBVUxUICAgICAgICAgIDE0CiNkZWZpbmUgRUJVU1kgICAgICAgICAgIDE2CiNkZWZpbmUgRUVYSVNUICAgICAgICAgIDE3CiNkZWZpbmUgRVhERVYgICAgICAgICAgIDE4CiNkZWZpbmUgRU5PREVWICAgICAgICAgIDE5CiNkZWZpbmUgRU5PVERJUiAgICAgICAgIDIwCiNkZWZpbmUgRUlTRElSICAgICAgICAgIDIxCiNkZWZpbmUgRU5GSUxFICAgICAgICAgIDIzCiNkZWZpbmUgRU1GSUxFICAgICAgICAgIDI0CiNkZWZpbmUgRU5PVFRZICAgICAgICAgIDI1CiNkZWZpbmUgRUZCSUcgICAgICAgICAgIDI3CiNkZWZpbmUgRU5PU1BDICAgICAgICAgIDI4CiNkZWZpbmUgRVNQSVBFICAgICAgICAgIDI5CiNkZWZpbmUgRVJPRlMgICAgICAgICAgIDMwCiNkZWZpbmUgRU1MSU5LICAgICAgICAgIDMxCiNkZWZpbmUgRVBJUEUgICAgICAgICAgIDMyCiNkZWZpbmUgRURPTSAgICAgICAgICAgIDMzCiNkZWZpbmUgRURFQURMSyAgICAgICAgIDM2CiNkZWZpbmUgRU5BTUVUT09MT05HICAgIDM4CiNkZWZpbmUgRU5PTENLICAgICAgICAgIDM5CiNkZWZpbmUgRU5PU1lTICAgICAgICAgIDQwCiNkZWZpbmUgRU5PVEVNUFRZICAgICAgIDQxCgoKLy8gU3VwcG9ydCBFREVBRExPQ0sgZm9yIGNvbXBhdGliaWxpdHkgd2l0aCBvbGRlciBNaWNyb3NvZnQgQyB2ZXJzaW9ucwojZGVmaW5lIEVERUFETE9DSyAgICAgICBFREVBRExLCgojZGVmaW5lIEVBRERSSU5VU0UgICAgICAxMDAKI2RlZmluZSBFQUREUk5PVEFWQUlMICAgMTAxCiNkZWZpbmUgRUFGTk9TVVBQT1JUICAgIDEwMgojZGVmaW5lIEVBTFJFQURZICAgICAgICAxMDMKI2RlZmluZSBFQkFETVNHICAgICAgICAgMTA0CiNkZWZpbmUgRUNBTkNFTEVEICAgICAgIDEwNQojZGVmaW5lIEVDT05OQUJPUlRFRCAgICAxMDYKI2RlZmluZSBFQ09OTlJFRlVTRUQgICAgMTA3CiNkZWZpbmUgRUNPTk5SRVNFVCAgICAgIDEwOAojZGVmaW5lIEVERVNUQUREUlJFUSAgICAxMDkKI2RlZmluZSBFSE9TVFVOUkVBQ0ggICAgMTEwCiNkZWZpbmUgRUlEUk0gICAgICAgICAgIDExMQojZGVmaW5lIEVJTlBST0dSRVNTICAgICAxMTIKI2RlZmluZSBFSVNDT05OICAgICAgICAgMTEzCiNkZWZpbmUgRUxPT1AgICAgICAgICAgIDExNAojZGVmaW5lIEVNU0dTSVpFICAgICAgICAxMTUKI2RlZmluZSBFTkVURE9XTiAgICAgICAgMTE2CiNkZWZpbmUgRU5FVFJFU0VUICAgICAgIDExNwojZGVmaW5lIEVORVRVTlJFQUNIICAgICAxMTgKI2RlZmluZSBFTk9CVUZTICAgICAgICAgMTE5CiNkZWZpbmUgRU5PREFUQSAgICAgICAgIDEyMAojZGVmaW5lIEVOT0xJTksgICAgICAgICAxMjEKI2RlZmluZSBFTk9NU0cgICAgICAgICAgMTIyCiNkZWZpbmUgRU5PUFJPVE9PUFQgICAgIDEyMwojZGVmaW5lIEVOT1NSICAgICAgICAgICAxMjQKI2RlZmluZSBFTk9TVFIgICAgICAgICAgMTI1CiNkZWZpbmUgRU5PVENPTk4gICAgICAgIDEyNgojZGVmaW5lIEVOT1RSRUNPVkVSQUJMRSAxMjcKI2RlZmluZSBFTk9UU09DSyAgICAgICAgMTI4CiNkZWZpbmUgRU5PVFNVUCAgICAgICAgIDEyOQojZGVmaW5lIEVPUE5PVFNVUFAgICAgICAxMzAKI2RlZmluZSBFT1RIRVIgICAgICAgICAgMTMxCiNkZWZpbmUgRU9WRVJGTE9XICAgICAgIDEzMgojZGVmaW5lIEVPV05FUkRFQUQgICAgICAxMzMKI2RlZmluZSBFUFJPVE8gICAgICAgICAgMTM0CiNkZWZpbmUgRVBST1RPTk9TVVBQT1JUIDEzNQojZGVmaW5lIEVQUk9UT1RZUEUgICAgICAxMzYKI2RlZmluZSBFVElNRSAgICAgICAgICAgMTM3CiNkZWZpbmUgRVRJTUVET1VUICAgICAgIDEzOAojZGVmaW5lIEVUWFRCU1kgICAgICAgICAxMzkKI2RlZmluZSBFV09VTERCTE9DSyAgICAgMTQwCgoAv4oBAAAAAAAAAAAAAAAAANF0ngBXnb0qgHBSD///PicKAAAAZAAAAOgDAAAQJwAAoIYBAEBCDwCAlpgAAOH1BRgAAAA1AAAAcQAAAGv////O+///kr///wAAAAAAAAAAGQAKABkZGQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAAZABEKGRkZAwoHAAEACQsYAAAJBgsAAAsABhkAAAAZGRkAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAGQAKDRkZGQANAAACAAkOAAAACQAOAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAABMAAAAAEwAAAAAJDAAAAAAADAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAPAAAABA8AAAAACRAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAEQAAAAARAAAAAAkSAAAAAAASAAASAAAaAAAAGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoAAAAaGhoAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAXAAAAABcAAAAACRQAAAAAABQAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgAAAAAAAAAAAAAAFQAAAAAVAAAAAAkWAAAAAAAWAAAWAAAwMTIzNDU2Nzg5QUJDREVG"); - base64DecodeToExistingUint8Array(bufferView, 101632, "SmFuAEZlYgBNYXIAQXByAE1heQBKdW4ASnVsAEF1ZwBTZXAAT2N0AE5vdgBEZWMAAX8BAFhVAQDiMAEAH4EBAEVhAQDzgQEAWDcBAJ9+AQACAAAAKRwBAAQAAADFHgEACAAAABcUAQAQAAAA1BQBACAAAAC5BgEAQAAAAGwMAQCAAAAAqQoBAAABAABbDAEAAAIAAIcIAQAABAAAbBcBAAAIAADiGwEAAIAAACYHAQAAAAIA3R0BAAAAEAByDwEABQAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAQAAAB4jwEAAAQAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAP////8KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwI0BAJCVAQA="); - base64DecodeToExistingUint8Array(bufferView, 101984, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="); + base64DecodeToExistingUint8Array(bufferView, 65536, "fgA7ICVzIHJldHVybiBfdG1wO30AfSBlbHNlIHtfY2F0Y2hfbGFiZWxfJWQ6O30Abm90IGZvbGxvd2luZyBjb3JyZWN0IGNsb3NlIGJyYWNlIHN0eWxlIH0AICUqcyB8ACAlcyB8AG5vdCBmb2xsb3dpbmcgY29ycmVjdCBicmFjZSBzdHlsZSB7AHRva2VuX2xpc3RfaXNfZW1wdHkAaW5maW5pdHkAdHJ5AF9JbWFnaW5hcnkAZmxvd192aXNpdF9jdHhfZGVzdHJveQBvd25lcl9oYXNobWFwX2Rlc3Ryb3kAYW55AHBfZGVjbGFyYXRpb24tPmZ1bmN0aW9uX2JvZHkAX2lzX2FycmF5ACBwYXNzaW5nIG51bGwgYXMgYXJyYXkAaW5kZXggJWQgaXMgcGFzdCB0aGUgZW5kIG9mIHRoZSBhcnJheQAtdGFyZ2V0PWN4eAAtc3RkPWN4eABfQ29tcGxleAAtdGFyZ2V0PWMyeAAtc3RkPWMyeAAtKyAgIDBYMHgALTBYKzBYIDBYLTB4KzB4IDB4AFx4JXgAMHgleAB0aHJvdwBwYXNzaW5nIGEgdGVtcG9yYXJ5IG93bmVyIHRvIGEgdmlldwBfVmlldwAtc3R5bGU9Z251ACVsbHUAci5uZXh0AC1uby1vdXRwdXQALW1zdmMtb3V0cHV0AF9PdXQAX2lzX2NvbnN0ACBjb25zdABtYWNyb19jb3B5X3JlcGxhY2VtZW50X2xpc3QAZmxvd192aXNpdF9pbml0X2RlY2xhcmF0b3JfbGlzdAB2aXNpdF9icmFja2V0X2luaXRpYWxpemVyX2xpc3QAaWRlbnRpZmllcl9saXN0AHRva2VuX2xpc3RfYXBwZW5kX2xpc3QAY29uc3RhbnRfdmFsdWVfY2FzdABzaG9ydABzdGF0aWNfYXNzZXJ0AF9TdGF0aWNfYXNzZXJ0AF9PcHQAdHlwZV9saXN0X3B1c2hfZnJvbnQAX2lzX2Zsb2F0aW5nX3BvaW50AGx2YWx1ZSByZXF1aXJlZCBhcyBsZWZ0IG9wZXJhbmQgb2YgYXNzaWdubWVudABtdWx0aS1saW5lIC8vY29tbWVudABtaXNzaW5nIGVuZCBvZiBjb21tZW50AHRyeV9zdGF0ZW1lbnQAZmxvd192aXNpdF9mb3Jfc3RhdGVtZW50AGZsb3dfdmlzaXRfanVtcF9zdGF0ZW1lbnQAZm9ybWF0X3Zpc2l0X2p1bXBfc3RhdGVtZW50AGZsb3dfdmlzaXRfc2VsZWN0aW9uX3N0YXRlbWVudABmbG93X3Zpc2l0X2l0ZXJhdGlvbl9zdGF0ZW1lbnQAZmxvd192aXNpdF9zd2l0Y2hfc3RhdGVtZW50AGZsb3dfdmlzaXRfaWZfc3RhdGVtZW50AGZsb3dfdmlzaXRfd2hpbGVfc3RhdGVtZW50AGZsb3dfdmlzaXRfZG9fd2hpbGVfc3RhdGVtZW50AGZsb3dfdmlzaXRfdW5sYWJlbGVkX3N0YXRlbWVudABmb3JtYXRfdmlzaXRfdW5sYWJlbGVkX3N0YXRlbWVudABfQml0SW50AHJldHVybmluZyBhIG93bmVyIHZhcmlhYmxlIHRvIGEgbm9uIG93bmVyIHJlc3VsdABkZWZhdWx0AGV4cGVjdGVkIGludGVnZXIgdHlwZSBvbiByaWdodAAtc3R5bGU9bWljcm9zb2Z0AGV4cGVjdGVkIGludGVnZXIgdHlwZSBvbiBsZWZ0AHN0YXRpY19zZXQAZ2V0X2FsaWdub2Zfc3RydWN0AGdldF9zaXplb2Zfc3RydWN0AHVzaW5nICctPicgaW4gYXJyYXkgYXMgcG9pbnRlciB0byBzdHJ1Y3QAcmVzdHJpY3QAc2V0X29iamVjdABtYWtlX29iamVjdABhc3NpZ25tZW50IG9mIHJlYWQtb25seSBvYmplY3QAcGFyYW1ldGVyICVkIHJlcXVpcmVzIGEgcG9pbnRlciB0byBvd25lciBvYmplY3QAbnVsbCBvYmplY3QAbWF5YmUgdXNpbmcgYSB1bmluaXRpYWxpemVkIG9iamVjdABkZXJlZmVyZW5jZSBhIE5VTEwgb2JqZWN0AGZsb2F0AG51bGxwdHJfdABjb2xsZWN0X21hY3JvX2FyZ3VtZW50cwByZXBsYWNlX21hY3JvX2FyZ3VtZW50cwB0b28gbWFueSBhcmd1bWVudHMAdHlwZW9mIHVzZWQgaW4gYXJyYXkgYXJndW1lbnRzAHRvbyBmZXcgYXJndW1lbnRzAHVzZSBzbmFrZV9jYXNlIGZvciBhcmd1bWVudHMALXJlbW92ZS1jb21tZW50cwBhZGRyZXNzAHVzZSBVUFBFUkNBU0UgZm9yIGVudW1lcmF0b3JzAG9ial9vd25lciBxdWFsaWZpZXIgY2FuIG9ubHkgYmUgdXNlZCB3aXRoIHBvaW50ZXJzAHByb2Nlc3NfaWRlbnRpZmllcnMAZGlzY2FyZGVkLXF1YWxpZmllcnMAcHJpbnRfdHlwZV9xdWFsaWZpZXJfc3BlY2lmaWVycwB1c2Ugc25ha2VfY2FzZSBmb3Igc3RydWN0IG1lbWJlcnMAdXNlIFNDUkVBTUlOR19DQVNFIGZvciBtYWNyb3MAdG9rZW4gJyVzJyBpcyBub3QgdmFsaWQgaW4gcHJlcHJvY2Vzc29yIGV4cHJlc3Npb25zAC1kdW1wLXRva2VucwAtbnVsbGNoZWNrcwBpbnZhbGlkIGFyZ3MAdXNlIHNuYWtlX2Nhc2UgZm9yIHN0cnVjdC91bmlvbiB0YWdzAHVzZSBjYW1lbENhc2UgZm9yIHN0cnVjdC91bmlvbiB0YWdzAHVzZSBzbmFrZV9jYXNlIGZvciBlbnVtIHRhZ3MAdXNlIFBhc2NhbENhc2UgZm9yIGVudW0gdGFncwBfTm9yZXR1cm4gaXMgZGVwcmVjYXRlZCB1c2UgYXR0cmlidXRlcwBpbmNvbXBhdGlibGUgcG9pbnRlciB0eXBlcwBpbmNvbXBhdGlibGUgdHlwZXMAdXNlIHNuYWtlX2Nhc2UgZm9yIGxvY2FsIHZhcmlhYmxlcwB1c2UgY2FtZWxDYXNlIGZvciBsb2NhbCB2YXJpYWJsZXMAdXNlIHNuYWtlX2Nhc2UgZ2xvYmFsIHZhcmlhYmxlcwB1c2UgcHJlZml4IHNfIGZvciBzdGF0aWMgZ2xvYmFsIHZhcmlhYmxlcwAtc2hvd0luY2x1ZGVzAGFsaWduYXMAX0FsaWduYXMAJXMlcwAlcy0+JXMAJXMvJXMAJXMuJXMAKiVzAHN0cnVjdCAlcwAlcyAlcwBpbnZhbGlkIHBhcmFtZXRlciAlcwBlbnVtICVzAGV4ZXBhdGggJXMAZXhwZWN0ZWQgJXMAc3RhdGljICVzAF9oYXNfYXR0cgBfZGVsX2F0dHIAX2FkZF9hdHRyAG51bGxwdHIAY29uc3RleHByAGluaXRfZGVjbGFyYXRvcgBmaW5kX21lbWJlcl9kZWNsYXJhdG9yAHBfZGVjbGFyYXRpb24tPmluaXRfZGVjbGFyYXRvcl9saXN0LmhlYWQtPnBfZGVjbGFyYXRvci0+ZGlyZWN0X2RlY2xhcmF0b3ItPmZ1bmN0aW9uX2RlY2xhcmF0b3IAbWFrZV90eXBlX3VzaW5nX2RlY2xhcmF0b3IAaGlkZS1kZWNsYXJhdG9yAHN0YXRpYyBvciB0eXBlIHF1YWxpZmllcnMgYXJlIG5vdCBhbGxvd2VkIGluIG5vbi1wYXJhbWV0ZXIgYXJyYXkgZGVjbGFyYXRvcgAnJXMnOiB1bnJlZmVyZW5jZWQgZGVjbGFyYXRvcgAjZXJyb3IAZXhwcmVzc2lvbiBlcnJvcgBpbnRlcm5hbCBlcnJvcgBmb3IAZGlyAGVtYmVkX3Rva2VuaXplcgByZWdpc3RlcgBfaXNfcG9pbnRlcgB0eXBlX3BhcmFtX2FycmF5X3RvX3BvaW50ZXIAdHlwZV9yZW1vdmVfcG9pbnRlcgBzdWJzY3JpcHRlZCB2YWx1ZSBpcyBuZWl0aGVyIGFycmF5IG5vciBwb2ludGVyAGRpc2NhcmRpbmcgb3duZXIgcG9pbnRlcgBjYWxsZWQgb2JqZWN0IGlzIG5vdCBhdHRyIGZ1bmN0aW9uIG9yIGZ1bmN0aW9uIHBvaW50ZXIAdG9rZW5fbGlzdF9pbnNlcnRfYWZ0ZXIAdW5leHBlY3RlZCBlbmQgb2YgZmlsZSBhZnRlcgB0eXBlb2YtcGFyYW1ldGVyAHVudXNlZC1wYXJhbWV0ZXIAcGFzc2luZyBhIHZpZXcgYXJndW1lbnQgdG8gYSBvYmpfb3duZXIgcGFyYW1ldGVyAHBhc3NpbmcgYSB2aWV3IGFyZ3VtZW50IHRvIGEgb3duZXIgcGFyYW1ldGVyACclcyc6IHVucmVmZXJlbmNlZCBmb3JtYWwgcGFyYW1ldGVyAG1pc3NpbmcgdGVybWluYXRpbmcgJyBjaGFyYWN0ZXIAbWlzc2luZyB0ZXJtaW5hdGluZyAiIGNoYXJhY3RlcgBfaXNfb3duZXIAX09ial9vd25lcgBjYW5ub3QgbW92ZSBhIHRlbXBvcmFyeSBvd25lciB0byBub24tb3duZXIAcG9pbnRlZCBvYmplY3QgaXMgbm90IG93bmVyAGNhbm5vdCBtb3ZlIG9ial9vd25lciB0byBvd25lcgBjYW5ub3QgYXNzaWduIGEgbm9uIG93bmVyIHRvIG93bmVyAGNhbm5vdCBpbml0aWFsaXplIGFuIG93bmVyIHR5cGUgd2l0aCBhIG5vbiBvd25lcgBkaXNjYXJkaW5nIG93bmVyAHJldHVybmluZyBhIG5vbiBvd25lciB2YXJpYWJsZSB0byBhIG93bmVyAF9Pd25lcgBwcmVwcm9jZXNzb3JfdG9rZW5fYWhlYWRfaXNfaWRlbnRpZmllcgB0eXBlX3NwZWNpZmllcl9xdWFsaWZpZXIAbWlzc2luZyBvd25lciBxdWFsaWZpZXIAc3RvcmFnZV9jbGFzc19zcGVjaWZpZXIAc3RydWN0X29yX3VuaW9uX3NwZWNpZmllcgB0eXBlX3NwZWNpZmllcgBjYW5ub3QgY29tYmluZSB3aXRoIHByZXZpb3VzICdsb25nIGxvbmcnIGRlY2xhcmF0aW9uIHNwZWNpZmllcgByaWdodCBpcyBub3QgaW50ZWdlcgBsZWZ0IGlzIG5vdCBpbnRlZ2VyAGRlZmVyAHBwbnVtYmVyAGNvbnZlcnRfdG9fbnVtYmVyAHJldHVybi1sb2NhbC1hZGRyAF9pc19zY2FsYXIAcmlnaHQgb3BlcmF0b3IgaXMgbm90IHNjYWxhcgBsZWZ0IG9wZXJhdG9yIGlzIG5vdCBzY2FsYXIAdW5zaWduZWQgY2hhcgBpZl9ncm91cABwb3AAY29uc3RhbnRfdmFsdWVfdW5hcnlfb3AAY29uc3RhbnRfdmFsdWVfb3AAYXV0bwBnb3RvAHR5cGVfY29udmVydF90bwBub3QtemVybwBkaXZpemlvbiBieSB6ZXJvAGRpdmlzaW9uIGJ5IHplcm8AZXhwYW5kX21hY3JvAGluZm8ALWZvAGRvAC1vAG5vcmV0dXJuAF9Ob3JldHVybgBleHRlcm4AaW50ZXJuYWwgZXJyb3IgdHlwZV9jb21tb24AZmxvd192aXNpdF9mdW5jdGlvbgBfaXNfZnVuY3Rpb24AYXNzaWdubWVudCBvZiBmdW5jdGlvbgByZWRlY2xhcmF0aW9uAGZsb3dfdmlzaXRfZGVjbGFyYXRpb24AZnVuY3Rpb25fZGVmaW5pdGlvbl9vcl9kZWNsYXJhdGlvbgBkZWNsYXJhdGlvbiBvZiAnJXMnIGhpZGVzIHByZXZpb3VzIGRlY2xhcmF0aW9uAHJlcGxhY2VtZW50X2xpc3RfcmVleGFtaW5hdGlvbgAtZGlyZWN0LWNvbXBpbGF0aW9uAHN0YW5kYXJkIG1hY3JvcyBpbmNsdXNpb24AX19EQVRFX18gbWFjcm8gaW5jbHVzaW9uAF9fVElNRV9fIG1hY3JvIGluY2x1c2lvbgBlcXVhbGl0eV9leHByZXNzaW9uAHVuYXJ5X2V4cHJlc3Npb24AcHJpbWFyeV9leHByZXNzaW9uAHBvc3RmaXhfZXhwcmVzc2lvbgBwcmVwcm9jZXNzb3JfY29uc3RhbnRfZXhwcmVzc2lvbgBmbG93X3Zpc2l0X2V4cHJlc3Npb24AZXhjbHVzaXZlX29yX2V4cHJlc3Npb24AY29uZGl0aW9uYWxfZXhwcmVzc2lvbgByZWxhdGlvbmFsX2V4cHJlc3Npb24AYWRkaXRpdmVfZXhwcmVzc2lvbgBhbmRfZXhwcmVzc2lvbgBleHBlY3RlZCBjb25zdGFudCBleHByZXNzaW9uAGludmFsaWQgdHlwZSBzaGlmdCBleHByZXNzaW9uAGludmFsaWQgdHlwZXMgb3IgZXhwcmVzc2lvbgByaWdodCB0eXBlIGlzIG5vdCBzY2FsYXIgZm9yIG9yIGV4cHJlc3Npb24AbGVmdCB0eXBlIGlzIG5vdCBzY2FsYXIgZm9yIG9yIGV4cHJlc3Npb24AaW52YWxpZCB0eXBlcyBpbmNsdXNpdmUgb3IgZXhwcmVzc2lvbgBpbnZhbGlkIHR5cGVzIGFkZGl0aXZlIGV4cHJlc3Npb24AaW52YWxpZCB0eXBlIG11bHRpcGxpY2F0aXZlIGV4cHJlc3Npb24AaW52YWxpZCB0eXBlcyBhbmQgZXhwcmVzc2lvbgBpbnZhbGlkIHR5cGVzIGxvZ2ljbCBhbmQgZXhwcmVzc2lvbgBlbnVtLWNvbnZlcnNpb24AdW5pb24AaW52YWxpZCB0b2tlbgB1bmV4cGVjdGVkIHRva2VuAG5hbgBlbnVtAF9fYXNtAC1ybQBvdXQgb2YgbWVtABtbMzdtABtbOTJtABtbOTBtJXMbWzBtABtbOTVtd2FybmluZzogG1s5N20lcwobWzBtABtbOTVtd2FybmluZzogG1s5N20lcyBbG1s5NW0tVyVzG1s5N21dChtbMG0AYm9vbABfQm9vbABub25udWxsAG5vdC1udWxsAG1heWJlLW51bGwALVdhbGwAdHlwZW9mX3VucXVhbABleHByZXNzaW9uX2V2YWx1YXRlX2VxdWFsX25vdF9lcXVhbABfaXNfaW50ZWdyYWwAcG9pbnRlciBjYW4gYmUgbnVsbCwgYnV0IHRoZSBwYXJhbWV0ZXIgaXMgbm90IG9wdGlvbmFsAHRocmVhZF9sb2NhbABfVGhyZWFkX2xvY2FsAGZvcm1hdF92aXNpdF9wcmltYXJ5X2Jsb2NrAHRocm93IHN0YXRlbWVudCBub3Qgd2l0aGluIHRyeSBibG9jawB0eXBlX2xpc3RfcHVzaF9iYWNrAGJyZWFrAC1maQBwdXNoAGZhbGx0aHJvdWdoAHN3aXRjaABjYXRjaABjOi9hc3NlcnQuaABjOi9vd25lcnNoaXAuaABjOi9lcnJuby5oAGM6L3N0ZGlvLmgAYzovbWF0aC5oAGM6L3N0cmluZy5oAGM6L3N0ZGRlZi5oAGM6L3N0ZGxpYi5oAHN0YXRpY19kZWJ1ZwBsb25nIGxvbmcAI3dhcm5pbmcAdG9rZW5fbGlzdF9hcHBlbmRfbGlzdF9hdF9iZWdpbm5pbmcAdW5uZWNlc3NhcnkgbGluZS1zbGljaW5nACVMZwBzc192YWZwcmludGYAdHlwZV9nZXRfYWxpZ25vZgBfX2FsaWdub2YAX0FsaWdub2YAdHlwZV9nZXRfc2l6ZW9mAHR5cGVvZgBpbmYALXNhcmlmAGVsaWYAZW5kaWYAdW5kZWYAZWxpZm5kZWYAZWxpZmRlZgB0eXBlZGVmACVmAC1hbmFseXplAGFsd2F5cyB0cnVlAGNvbnRpbnVlAF9pc19sdmFsdWUAdW51c2VkLXZhbHVlAHZvaWQgZnVuY3Rpb24gJyVzJyBzaG91bGQgbm90IHJldHVybiBhIHZhbHVlAF9faGFzX2NfYXR0cmlidXRlAHdhcm5pbmcgJyVzJyBpcyBub3QgYW4gY2FrZSBhdHRyaWJ1dGUAd2FybmluZyAnJXMnIGlzIG5vdCBhbiBzdGFuZGFyZCBhdHRyaWJ1dGUAaWdub3JpbmcgcmV0dXJuIHZhbHVlIG9mIGZ1bmN0aW9uIGRlY2xhcmVkIHdpdGggJ25vZGlzY2FyZCcgYXR0cmlidXRlAG1hY3JvX2FyZ3VtZW50X2RlbGV0ZQBlbnVtZXJhdG9yX2RlbGV0ZQBpbml0X2RlY2xhcmF0b3JfZGVsZXRlAG1lbWJlcl9kZWNsYXJhdG9yX2RlbGV0ZQBkZXNpZ25hdG9yX2RlbGV0ZQBpbml0aWFsaXplcl9kZWxldGUAdHlwZV9zcGVjaWZpZXJfcXVhbGlmaWVyX2RlbGV0ZQBkZWNsYXJhdGlvbl9zcGVjaWZpZXJfZGVsZXRlAGF0dHJpYnV0ZV9zcGVjaWZpZXJfZGVsZXRlAHBhcmFtZXRlcl9kZWNsYXJhdGlvbl9kZWxldGUAbWVtYmVyX2RlY2xhcmF0aW9uX2RlbGV0ZQBnZW5lcmljX2Fzc29jaWF0aW9uX2RlbGV0ZQBhcmd1bWVudF9leHByZXNzaW9uX2RlbGV0ZQB0b2tlbl9kZWxldGUAYmxvY2tfaXRlbV9kZWxldGUAYXR0cmlidXRlX2RlbGV0ZQBzZXRfZGlyZWN0X3N0YXRlAHNldF9vYmplY3Rfc3RhdGUAb2JqZWN0X3Jlc3RvcmVfc3RhdGUAc3RhdGljX3N0YXRlAGNvbmNhdGVuYXRlAGVsc2UAZmFsc2UAY2FzZQBpZ25vcmUAcHJldmlvdXMgZGVjbGFyYXRpb24gaXMgaGVyZQB0eXBlX2dldF9lbnVtX3R5cGUAYXNzaWdubWVudCB0byBleHByZXNzaW9uIHdpdGggYXJyYXkgdHlwZQBjaGFyYWN0ZXIgY29uc3RhbnQgdG9vIGxvbmcgZm9yIGl0cyB0eXBlAHBhcmFtZXRlciAlZCByZXF1aXJlcyBhIHBvaW50ZXIgdG8gb3duZXIgdHlwZQByaWdodCBtdXN0IGJlIGludGVnZXIgdHlwZQBjb25kaXRpb24gbXVzdCBoYXZlIHNjYWxhciB0eXBlAGRlZmVyIGVuZCBvZiBzY29wZQBlbmQgb2YgJyVzJyBzY29wZQB0eXBlX2Rlc3Ryb3lfb25lAGZsb3dfZGVmZXJfc2NvcGVfZGVsZXRlX29uZQBfX2ZvcmNlaW5saW5lAF9faW5saW5lAGNvbnRyb2xfbGluZQBkZWZpbmUAZ2V0X3dhcm5pbmdfbmFtZQBwb3N0Zml4X2V4cHJlc3Npb25fdHlwZV9uYW1lAG1pc3NpbmcgZW51bSB0YWcgbmFtZQBzdHlsZQBtb2R1bGUAdm9sYXRpbGUAd2hpbGUAdW5leHBlY3RlZCBlbmQgb2YgZmlsZQBkb3VibGUAcmVwcm9kdWNpYmxlAHVudXNlZC12YXJpYWJsZQBmdW5jdGlvbiByZXR1cm5zIGFkZHJlc3Mgb2YgbG9jYWwgdmFyaWFibGUALXN0eWxlPWNha2UAX19oYXNfaW5jbHVkZQB1dGY4X2RlY29kZQBtb3ZlIGFzc2lnbm1lbnQgbmVlZHMgYSBvd25lciB0eXBlIG9uIHJpZ2h0IHNpZGUAb25jZQBvbmUgc3BhY2UAbm9kaXNjYXJkAGZpbGUgJXMgbm90IGZvdW5kAGZpbGUgJyVzJyBub3QgZm91bmQAbHZhbHVlIHJlcXVpcmVkIGFzIGluY3JlbWVudCBvcGVyYW5kAGx2YWx1ZSByZXF1aXJlZCBhcyBkZWNyZW1lbnQgb3BlcmFuZABpbmRpcmVjdGlvbiByZXF1aXJlcyBwb2ludGVyIG9wZXJhbmQAbHZhbHVlIHJlcXVpcmVkIGFzIHVuYXJ5ICcmJyBvcGVyYW5kAGV4cGFuZAAlbGxkAHZvaWQAc291cmNlIG9iamVjdCAnJXMnIGlzIHVuaW5pdGlhbGl6ZWQAc291cmNlIG9iamVjdCAnJXMnIG1heSBiZSB1bmluaXRpYWxpemVkAG9iamVjdCAnJXMnIHdhcyBub3QgbW92ZWQvZGVzdHJveWVkAG9iamVjdCAnJXMnIHdhcyBtb3ZlZABzb3VyY2Ugb2JqZWN0ICclcycgbWF5IGhhdmUgYmVlbiBtb3ZlZABzb3VyY2Ugb2JqZWN0ICclcycgaGF2ZSBiZWVuIG1vdmVkAGFkZHJlc3Mgb2YgcmVnaXN0ZXIgdmFyaWFibGUgJ3gnIHJlcXVlc3RlZABlbXB0eSBkZWNsYXJhdG9yIG5hbWU/PyB1bmV4cGVjdGVkACclcycgaXMgZGVwcmVjYXRlZABtYXliZV91bnVzZWQAZGVjbGFyYXRvciAnJXMnIG5vdCB1c2VkAHN0cnVjdHVyZSBvciB1bmlvbiByZXF1aXJlZABkZWZpbmVkAHVuc2lnbmVkAF9TdGF0aWNfYXNzZXJ0IGZhaWxlZABzdGF0aWNfc3RhdGUgZmFpbGVkAGNvbnN0IHF1YWxpZmllciBkaXNjYXJkZWQAdW5zZXF1ZW5jZWQAdG9rZW4gc2xpY2VkAF9faGFzX2VtYmVkAGFyZ3VtZW50X2xpc3RfYWRkAGRlY2xhcmF0aW9uX2xpc3RfYWRkAHRva2VuX2xpc3RfYWRkAGdlbmVyaWNfYXNzb2NfbGlzdF9hZGQAaW5jbHVkZV9kaXJfYWRkAF8lcyVkAF9hbm9ueW1vdXNfc3RydWN0XyVkAGdvdG8gX2NhdGNoX2xhYmVsXyVkACBfbGl0X2Z1bmNfJWQAIGRpc2NhcmRpbmcgY29uc3QgYXQgYXJndW1lbnQgJWQAIGluY29tcGF0aWJsZSB0eXBlcyBhdCBhcmd1bWVudCAlZABtYWxsb2MAY2FsbG9jAGRpYWdub3N0aWMAX2lzX2FyaXRobWV0aWMAcmlnaHQgLyBpcyBub3QgYXJpdGhtZXRpYwBsZWZ0IC8gaXMgbm90IGFyaXRobWV0aWMAcmlnaHQgKiBpcyBub3QgYXJpdGhtZXRpYwBsZWZ0ICogaXMgbm90IGFyaXRobWV0aWMAc3RhdGljAG5vIG1hdGNoIGZvciBnZW5lcmljAF9HZW5lcmljAF9BdG9taWMAYzovbWFpbi5jAGxpYi5jAAolKmMAJWMAcHJhZ21hAF9fZnVuY19fAF9fVkFfT1BUX18AX19DT1VOVF9fAF9fVkFfQVJHU19fAF9fTElORV9fAF9fRklMRV9fAF4AIGFyZ3VtZW50IG9mIHNpemUgWyVkXSBpcyBzbWFsbGVyIHRoYW4gcGFyYW1ldGVyIG9mIHNpemUgWyVkXQBbW25vcmV0dXJuXV0AWwBjdHgtPmN1cnJlbnQtPnR5cGUgPT0gVEtfS0VZV09SRF9UUlkAVEtfS0VZV09SRF9fSU1BR0lOQVJZAFRLX0tFWVdPUkRfSVNfQVJSQVkAVEtfS0VZV09SRF9fQ09NUExFWABUS19BUlJPVwBUS19LRVlXT1JEX1RIUk9XAFRLX0tFWVdPUkRfX1ZJRVcAVEtfS0VZV09SRF9fT1VUAFRLX0tFWVdPUkRfSVNfQ09OU1QAVEtfS0VZV09SRF9DT05TVABUS19LRVlXT1JEX1NIT1JUAFRLX0tFWVdPUkRfQVNTRVJUAFRLX0tFWVdPUkRfX1NUQVRJQ19BU1NFUlQAVEtfS0VZV09SRF9fT1BUAFRLX0tFWVdPUkRfSU5UAFRLX0tFWVdPUkRfX0JJVElOVABUS19LRVlXT1JEX0lTX0ZMT0FUSU5HX1BPSU5UAFRLX0NPTU1FTlQAVEtfTElORV9DT01NRU5UAFRLX0NJUkNVTUZMRVhfQUNDRU5UAFRLX0dSQVZFX0FDQ0VOVABUS19DT01QSUxFUl9CSU5BUllfQ09OU1RBTlQAVEtfQ0hBUl9DT05TVEFOVABUS19DT01QSUxFUl9PQ1RBTF9DT05TVEFOVABUS19DT01QSUxFUl9ERUNJTUFMX0NPTlNUQU5UAFRLX0NPTVBJTEVSX0hFWEFERUNJTUFMX0NPTlNUQU5UAFRLX0NPTVBJTEVSX0RFQ0lNQUxfRkxPQVRJTkdfQ09OU1RBTlQAVEtfQ09NUElMRVJfSEVYQURFQ0lNQUxfRkxPQVRJTkdfQ09OU1RBTlQAVEtfS0VZV09SRF9ERUZBVUxUAFRLX1NISUZUUklHSFQAVEtfU0hJRlRMRUZUAFRLX0tFWVdPUkRfU1RBVElDX1NFVABUS19SSUdIVF9DVVJMWV9CUkFDS0VUAFRLX0xFRlRfQ1VSTFlfQlJBQ0tFVABUS19SSUdIVF9TUVVBUkVfQlJBQ0tFVABUS19MRUZUX1NRVUFSRV9CUkFDS0VUAFRLX0tFWVdPUkRfU1RSVUNUAFRLX0tFWVdPUkRfUkVTVFJJQ1QAVEtfQ09NTUVSQ0lBTF9BVABUS19LRVlXT1JEX0ZMT0FUAFRLX0hZUEhFTl9NSU5VUwBUS19NSU5VU01JTlVTAFRLX1BMVVNQTFVTAFRLX1NPTElEVVMAVEtfUkVWRVJTRV9TT0xJRFVTAFRLX0JMQU5LUwBUS19SSUdIVF9QQVJFTlRIRVNJUwBUS19MRUZUX1BBUkVOVEhFU0lTAFRLX0tFWVdPUkRfX0FMSUdOQVMAVEtfS0VZV09SRF9BVFRSX0hBUwBUS19LRVlXT1JEX05VTExQVFIAVEtfS0VZV09SRF9DT05TVEVYUFIAVEtfTE9HSUNBTF9PUEVSQVRPUl9PUgBUS19NQUNST19DT05DQVRFTkFURV9PUEVSQVRPUgBwX2l0ZXJhdGlvbl9zdGF0ZW1lbnQtPmZpcnN0X3Rva2VuLT50eXBlID09IFRLX0tFWVdPUkRfRk9SAFRLX0tFWVdPUkRfUkVHSVNURVIAVEtfS0VZV09SRF9JU19QT0lOVEVSAFRLX0tFWVdPUkRfX09XTkVSAFRLX0tFWVdPUkRfSVNfT1dORVIAVEtfS0VZV09SRF9fT0JKX09XTkVSAFRLX1BMQUNFTUFSS0VSAGlucHV0X2xpc3QtPmhlYWQtPnR5cGUgPT0gVEtfSURFTlRJRklFUgBUS19LRVlXT1JEX0RFRkVSAFRLX1BQTlVNQkVSAFRLX0tFWVdPUkRfSVNfU0NBTEFSAFRLX0tFWVdPUkRfQ0hBUgBUS19GVUxMX1NUT1AAVEtfS0VZV09SRF9BVVRPAFRLX0tFWVdPUkRfR09UTwBUS19JREVOVElGSUVSX1JFQ1VSU0lWRV9NQUNSTwBwX2l0ZXJhdGlvbl9zdGF0ZW1lbnQtPmZpcnN0X3Rva2VuLT50eXBlID09IFRLX0tFWVdPUkRfRE8AVEtfS0VZV09SRF9SRVRVUk4AVEtfS0VZV09SRF9fTk9SRVRVUk4AVEtfS0VZV09SRF9FWFRFUk4AVEtfQ09MT04AVEtfU0VNSUNPTE9OAFRLX0tFWVdPUkRfSVNfRlVOQ1RJT04AVEtfS0VZV09SRF9VTklPTgBUS19QRVJDRU5UX1NJR04AVEtfUExVU19TSUdOAFRLX0VRVUFMU19TSUdOAFRLX05VTUJFUl9TSUdOAFRLX0RPTExBUl9TSUdOAFRLX0xFU1NfVEhBTl9TSUdOAFRLX0dSRUFURVJfVEhBTl9TSUdOAEFOWV9PVEhFUl9QUF9UT0tFTgBOQU4AVEtfS0VZV09SRF9FTlVNAFRLX0tFWVdPUkRfX0FTTQBUS19LRVlXT1JEX19CT09MAHBfZGVjbGFyYXRpb24tPmZ1bmN0aW9uX2JvZHkgPT0gTlVMTABwbmV3LT5wcmV2ID09IE5VTEwAcG5ldy0+bmV4dCA9PSBOVUxMAHBfbGFzdF9wYXJhbWV0ZXItPm5leHQgPT0gTlVMTABwLT50eXBlX3F1YWxpZmllci0+bmV4dCA9PSBOVUxMAHAtPm5leHQgPT0gTlVMTAB0eXBlX2xpc3QtPnRhaWwtPm5leHQgPT0gTlVMTABhcHBlbmRfbGlzdC0+dGFpbC0+bmV4dCA9PSBOVUxMAGRlc3QtPnRhaWwtPm5leHQgPT0gTlVMTABzb3VyY2UtPnRhaWwtPm5leHQgPT0gTlVMTABsaXN0LnRhaWwtPm5leHQgPT0gTlVMTABuZXdfYm9vay0+bmV4dCA9PSBOVUxMAHBfdHlwZS0+bmV4dCA9PSBOVUxMAHQubmFtZV9vcHQgPT0gTlVMTABwX2FyZ3VtZW50ID09IE5VTEwAcF9leHByZXNzaW9uLT5yaWdodCA9PSBOVUxMAHBfZXhwcmVzc2lvbi0+bGVmdCA9PSBOVUxMAHBfYmxvY2stPnByZXZpb3VzID09IE5VTEwAbWFjcm8tPnBhcmFtZXRlcnMgPT0gTlVMTABwX2luaXRpYWxpemVyLT5kZXNpZ25hdGlvbiA9PSBOVUxMAHBfaW5pdGlhbGl6ZXIyLT5kZXNpZ25hdGlvbiA9PSBOVUxMAG5ld19leHByZXNzaW9uID09IE5VTEwAbGlzdC0+dGFpbCA9PSBOVUxMAHIyLnRhaWwgPT0gTlVMTABjdHgtPnRhaWxfYmxvY2sgPT0gTlVMTABwLT50YWlsX2Jsb2NrID09IE5VTEwAY3R4LT5wX3JldHVybl90eXBlID09IE5VTEwAcF9leHByZXNzaW9uX25vZGUtPnR5cGVfbmFtZSA9PSBOVUxMAG1hY3JvLT5uYW1lID09IE5VTEwAbWFwLT50YWJsZSA9PSBOVUxMAHR5cGVfbGlzdC0+aGVhZCA9PSBOVUxMAG1hY3JvLT5yZXBsYWNlbWVudF9saXN0LmhlYWQgPT0gTlVMTAByMi5oZWFkID09IE5VTEwAZmluZF9tYWNybyhjdHgsIGlucHV0X2xpc3QtPmhlYWQtPmxleGVtZSkgPT0gTlVMTAB0eXBlX2xpc3QgIT0gTlVMTABwX2xhc3QgIT0gTlVMTABjdHgtPmN1cnJlbnQgIT0gTlVMTABib29rcyAhPSBOVUxMAHBfdHlwZV9zcGVjaWZpZXItPnR5cGVkZWZfZGVjbGFyYXRvciAhPSBOVUxMAHBfaW5pdF9kZWNsYXJhdG9yLT5pbml0aWFsaXplci0+YnJhY2VkX2luaXRpYWxpemVyICE9IE5VTEwAcF90eXBlLT5lbnVtX3NwZWNpZmllciAhPSBOVUxMAHAgIT0gTlVMTABwX21lbWJlcl9kZWNsYXJhdGlvbi0+c3RhdGljX2Fzc2VydF9kZWNsYXJhdGlvbiAhPSBOVUxMAG5ld19ib29rICE9IE5VTEwAbGlzdC5oZWFkICE9IE5VTEwAbGlzdDQuaGVhZCAhPSBOVUxMAFRLX0tFWVdPUkRfVFlQRU9GX1VOUVVBTABUS19LRVlXT1JEX0lTX0lOVEVHUkFMAFRLX1NUUklOR19MSVRFUkFMAFRLX0tFWVdPUkRfX1RIUkVBRF9MT0NBTABUS19BU1RFUklTSwBUS19RVUVTVElPTl9NQVJLAFRLX1FVT1RBVElPTl9NQVJLAFRLX0VYQ0xBTUFUSU9OX01BUksAVEtfS0VZV09SRF9CUkVBSwBwX3NlbGVjdGlvbl9zdGF0ZW1lbnQtPmZpcnN0X3Rva2VuLT50eXBlID09IFRLX0tFWVdPUkRfU1dJVENIAFRLX0tFWVdPUkRfQ0FUQ0gAVEtfS0VZV09SRF9TVEFUSUNfREVCVUcAVEtfS0VZV09SRF9MT05HAFRLX0tFWVdPUkRfX0FMSUdOT0YAVEtfS0VZV09SRF9TSVpFT0YAVEtfS0VZV09SRF9UWVBFT0YASU5GAHBfc2VsZWN0aW9uX3N0YXRlbWVudC0+Zmlyc3RfdG9rZW4tPnR5cGUgPT0gVEtfS0VZV09SRF9JRgBudWxsY2hlY2tzIHByYWdtYSBuZWVkcyB0byB1c2UgT04gT0ZGACpjID49IDB4MDgwMCAmJiAqYyA8PSAweEZGRkYAKmMgPj0gMHgxMDAwMDAgJiYgKmMgPD0gMHgxMEZGRkYAKmMgPj0gMHgwMDgwICYmICpjIDw9IDB4MDdGRgBUS19LRVlXT1JEX1RZUEVERUYAKmMgPj0gMHgwMDAwICYmICpjIDw9IDB4MDA3RgBUS19LRVlXT1JEX0FUVFJfUkVNT1ZFAFRLX0tFWVdPUkRfVFJVRQBUS19LRVlXT1JEX0NPTlRJTlVFAFRLX0tFWVdPUkRfSVNfTFZBTFVFAFRLX0tFWVdPUkRfU1RBVElDX1NUQVRFAFRLX0tFWVdPUkRfRUxTRQBUS19LRVlXT1JEX0ZBTFNFAFRLX0tFWVdPUkRfQ0FTRQBUS19OT05FAFRLX0ZMT1dfTElORQBUS19QUkVQUk9DRVNTT1JfTElORQBUS19WRVJUSUNBTF9MSU5FAFRLX05FV0xJTkUAVEtfS0VZV09SRF9JTkxJTkUAVEtfWF9NSVNTSU5HX05BTUUAVEtfS0VZV09SRF9WT0xBVElMRQBwX2l0ZXJhdGlvbl9zdGF0ZW1lbnQtPmZpcnN0X3Rva2VuLT50eXBlID09IFRLX0tFWVdPUkRfV0hJTEUAVEtfQkVHSU5fT0ZfRklMRQBUS19LRVlXT1JEX0RPVUJMRQBDQUtFAFRLX0FQT1NUUk9QSEUAVEtfVElMREUAVEtfV0hJVEVfU1BBQ0UALUUAVEtfTE9HSUNBTF9PUEVSQVRPUl9BTkQAVEtfQU1QRVJTQU5EAFRLX0tFWVdPUkRfVk9JRABUS19LRVlXT1JEX1NJR05FRABUS19LRVlXT1JEX1VOU0lHTkVEAFRLX0tFWVdPUkRfQVRUUl9BREQAVEtfS0VZV09SRF9JU19BUklUSE1FVElDAFRLX0tFWVdPUkRfU1RBVElDAFRLX0tFWVdPUkRfX0dFTkVSSUMAVEtfS0VZV09SRF9fQVRPTUlDAFRLX0NPTU1BAFRLX1BSQUdNQQBhZGRyZXNzIG9mIHJlZ2lzdGVyIHZhcmlhYmxlIHJlcXVlc3RlZCAtIGRlY2xhcmF0b3I/AGluY29tcGF0aWJsZSB0eXBlcz8/ADw+AGJyZWFrOwBnb3RvIF9jYXRjaF9sYWJlbF8lZDsAdHlwZWRlZiBsb25nIGxvbmcgZnBvc190Owp0eXBlZGVmIHVuc2lnbmVkIHNpemVfdDsKCiNkZWZpbmUgTlVMTCAoKHZvaWQqKTApCnR5cGVkZWYgaW50IHdjaGFyX3Q7Cltbbm9kaXNjYXJkXV0gZG91YmxlIGF0b2YoY29uc3QgY2hhciogbnB0cik7Cltbbm9kaXNjYXJkXV0gaW50IGF0b2koY29uc3QgY2hhciogbnB0cik7Cltbbm9kaXNjYXJkXV0gbG9uZyBpbnQgYXRvbChjb25zdCBjaGFyKiBucHRyKTsKW1tub2Rpc2NhcmRdXSBsb25nIGxvbmcgaW50IGF0b2xsKGNvbnN0IGNoYXIqIG5wdHIpOwpkb3VibGUgc3RydG9kKGNvbnN0IGNoYXIqIHJlc3RyaWN0IG5wdHIsIGNoYXIqKiByZXN0cmljdCBlbmRwdHIpOwpmbG9hdCBzdHJ0b2YoY29uc3QgY2hhciogcmVzdHJpY3QgbnB0ciwgY2hhcioqIHJlc3RyaWN0IGVuZHB0cik7CmxvbmcgZG91YmxlIHN0cnRvbGQoY29uc3QgY2hhciogcmVzdHJpY3QgbnB0ciwgY2hhcioqIHJlc3RyaWN0IGVuZHB0cik7CmxvbmcgaW50IHN0cnRvbChjb25zdCBjaGFyKiByZXN0cmljdCBucHRyLCBjaGFyKiogcmVzdHJpY3QgZW5kcHRyLCBpbnQgYmFzZSk7CmxvbmcgbG9uZyBpbnQgc3RydG9sbChjb25zdCBjaGFyKiByZXN0cmljdCBucHRyLCBjaGFyKiogcmVzdHJpY3QgZW5kcHRyLCBpbnQgYmFzZSk7CnVuc2lnbmVkIGxvbmcgaW50IHN0cnRvdWwoY29uc3QgY2hhciogcmVzdHJpY3QgbnB0ciwgY2hhcioqIHJlc3RyaWN0IGVuZHB0ciwgaW50IGJhc2UpOwp1bnNpZ25lZCBsb25nIGxvbmcgaW50IHN0cnRvdWxsKGNvbnN0IGNoYXIqIHJlc3RyaWN0IG5wdHIsIGNoYXIqKiByZXN0cmljdCBlbmRwdHIsIGludCBiYXNlKTsKaW50IHJhbmQodm9pZCk7CnZvaWQgc3JhbmQodW5zaWduZWQgaW50IHNlZWQpOwp2b2lkKiBhbGlnbmVkX2FsbG9jKHNpemVfdCBhbGlnbm1lbnQsIHNpemVfdCBzaXplKTsKI2lmIGRlZmluZWQoX19TVERDX09XTkVSU0hJUF9fKSAmJiBkZWZpbmVkKF9fT1dORVJTSElQX0hfXykKW1tub2Rpc2NhcmRdXSB2b2lkKiBfT3duZXIgY2FsbG9jKHNpemVfdCBubWVtYiwgc2l6ZV90IHNpemUpOwp2b2lkIGZyZWUodm9pZCogX093bmVyIHB0cik7Cltbbm9kaXNjYXJkXV0gdm9pZCogX093bmVyIG1hbGxvYyhzaXplX3Qgc2l6ZSk7Cltbbm9kaXNjYXJkXV0gdm9pZCogX093bmVyIHJlYWxsb2Modm9pZCogcHRyLCBzaXplX3Qgc2l6ZSk7CiNlbHNlCltbbm9kaXNjYXJkXV0gdm9pZCogY2FsbG9jKHNpemVfdCBubWVtYiwgc2l6ZV90IHNpemUpOwp2b2lkIGZyZWUodm9pZCogcHRyKTsKW1tub2Rpc2NhcmRdXSB2b2lkKiBtYWxsb2Moc2l6ZV90IHNpemUpOwpbW25vZGlzY2FyZF1dIHZvaWQqIHJlYWxsb2Modm9pZCogcHRyLCBzaXplX3Qgc2l6ZSk7CiNlbmRpZgpbW25vcmV0dXJuXV0gdm9pZCBhYm9ydCh2b2lkKTsKaW50IGF0ZXhpdCh2b2lkICgqZnVuYykodm9pZCkpOwppbnQgYXRfcXVpY2tfZXhpdCh2b2lkICgqZnVuYykodm9pZCkpOwpbW25vcmV0dXJuXV0gdm9pZCBleGl0KGludCBzdGF0dXMpOwpbW25vcmV0dXJuXV0gdm9pZCBfRXhpdChpbnQgc3RhdHVzKTsKY2hhciogZ2V0ZW52KGNvbnN0IGNoYXIqIG5hbWUpOwpbW25vcmV0dXJuXV0gdm9pZCBxdWlja19leGl0KGludCBzdGF0dXMpOwppbnQgc3lzdGVtKGNvbnN0IGNoYXIqIHN0cmluZyk7ACAKdHlwZWRlZiBpbnQgZXJybm9fdDsKdHlwZWRlZiB1bnNpZ25lZCBsb25nIGxvbmcgc2l6ZV90Owp0eXBlZGVmIHVuc2lnbmVkIGxvbmcgbG9uZyByc2l6ZV90Owp0eXBlZGVmIHVuc2lnbmVkIHNob3J0IHdjaGFyX3Q7CnZvaWQqIG1lbWNocih2b2lkIGNvbnN0KiBfQnVmLCBpbnQgX1ZhbCwgc2l6ZV90IF9NYXhDb3VudCk7CmludCBtZW1jbXAodm9pZCBjb25zdCogX0J1ZjEsIHZvaWQgY29uc3QqIF9CdWYyLCBzaXplX3QgX1NpemUpOwp2b2lkKiBtZW1jcHkodm9pZCogX0RzdCwgdm9pZCBjb25zdCogX1NyYywgc2l6ZV90IF9TaXplKTsKdm9pZCogbWVtbW92ZSh2b2lkKiBfRHN0LCB2b2lkIGNvbnN0KiBfU3JjLCBzaXplX3QgX1NpemUpOwp2b2lkKiBtZW1zZXQodm9pZCogX0RzdCwgaW50IF9WYWwsIHNpemVfdCBfU2l6ZSk7CmNoYXIqIHN0cmNocihjaGFyIGNvbnN0KiBfU3RyLCBpbnQgX1ZhbCk7CmNoYXIqIHN0cnJjaHIoY2hhciBjb25zdCogX1N0ciwgaW50IF9DaCk7CmNoYXIqIHN0cnN0cihjaGFyIGNvbnN0KiBfU3RyLCBjaGFyIGNvbnN0KiBfU3ViU3RyKTsKd2NoYXJfdCogd2NzY2hyKHdjaGFyX3QgY29uc3QqIF9TdHIsIHdjaGFyX3QgX0NoKTsKd2NoYXJfdCogd2NzcmNocih3Y2hhcl90IGNvbnN0KiBfU3RyLCB3Y2hhcl90IF9DaCk7CndjaGFyX3QqIHdjc3N0cih3Y2hhcl90IGNvbnN0KiBfU3RyLCB3Y2hhcl90IGNvbnN0KiBfU3ViU3RyKTsKc3RhdGljIF9faW5saW5lIGVycm5vX3QgbWVtY3B5X3Modm9pZCogY29uc3QgX0Rlc3RpbmF0aW9uLCByc2l6ZV90IGNvbnN0IF9EZXN0aW5hdGlvblNpemUsIHZvaWQgY29uc3QqIGNvbnN0IF9Tb3VyY2UsIHJzaXplX3QgY29uc3QgX1NvdXJjZVNpemUpOwpzdGF0aWMgX19pbmxpbmUgZXJybm9fdCBtZW1tb3ZlX3Modm9pZCogY29uc3QgX0Rlc3RpbmF0aW9uLCByc2l6ZV90IGNvbnN0IF9EZXN0aW5hdGlvblNpemUsIHZvaWQgY29uc3QqIGNvbnN0IF9Tb3VyY2UsIHJzaXplX3QgY29uc3QgX1NvdXJjZVNpemUpOwppbnQgX21lbWljbXAodm9pZCBjb25zdCogX0J1ZjEsIHZvaWQgY29uc3QqIF9CdWYyLCBzaXplX3QgX1NpemUpOwp2b2lkKiBtZW1jY3B5KHZvaWQqIF9Ec3QsIHZvaWQgY29uc3QqIF9TcmMsIGludCBfVmFsLCBzaXplX3QgX1NpemUpOwppbnQgbWVtaWNtcCh2b2lkIGNvbnN0KiBfQnVmMSwgdm9pZCBjb25zdCogX0J1ZjIsIHNpemVfdCBfU2l6ZSk7CmVycm5vX3Qgd2NzY2F0X3Mod2NoYXJfdCogX0Rlc3RpbmF0aW9uLCByc2l6ZV90IF9TaXplSW5Xb3Jkcywgd2NoYXJfdCBjb25zdCogX1NvdXJjZSk7CmVycm5vX3Qgd2NzY3B5X3Mod2NoYXJfdCogX0Rlc3RpbmF0aW9uLCByc2l6ZV90IF9TaXplSW5Xb3Jkcywgd2NoYXJfdCBjb25zdCogX1NvdXJjZSk7CmVycm5vX3Qgd2NzbmNhdF9zKHdjaGFyX3QqIF9EZXN0aW5hdGlvbiwgcnNpemVfdCBfU2l6ZUluV29yZHMsIHdjaGFyX3QgY29uc3QqIF9Tb3VyY2UsIHJzaXplX3QgX01heENvdW50KTsKZXJybm9fdCB3Y3NuY3B5X3Mod2NoYXJfdCogX0Rlc3RpbmF0aW9uLCByc2l6ZV90IF9TaXplSW5Xb3Jkcywgd2NoYXJfdCBjb25zdCogX1NvdXJjZSwgcnNpemVfdCBfTWF4Q291bnQpOwp3Y2hhcl90KiB3Y3N0b2tfcyh3Y2hhcl90KiBfU3RyaW5nLCB3Y2hhcl90IGNvbnN0KiBfRGVsaW1pdGVyLCB3Y2hhcl90KiogX0NvbnRleHQpOwp3Y2hhcl90KiBfd2NzZHVwKHdjaGFyX3QgY29uc3QqIF9TdHJpbmcpOwp3Y2hhcl90KiB3Y3NjYXQod2NoYXJfdCogX0Rlc3RpbmF0aW9uLCB3Y2hhcl90IGNvbnN0KiBfU291cmNlKTsgaW50IHdjc2NtcCh3Y2hhcl90IGNvbnN0KiBfU3RyaW5nMSwgd2NoYXJfdCBjb25zdCogX1N0cmluZzIpOwp3Y2hhcl90KiB3Y3NjcHkod2NoYXJfdCogX0Rlc3RpbmF0aW9uLCB3Y2hhcl90IGNvbnN0KiBfU291cmNlKTsgc2l6ZV90IHdjc2NzcG4od2NoYXJfdCBjb25zdCogX1N0cmluZywgd2NoYXJfdCBjb25zdCogX0NvbnRyb2wpOwpzaXplX3Qgd2NzbGVuKHdjaGFyX3QgY29uc3QqIF9TdHJpbmcpOwpzaXplX3Qgd2Nzbmxlbih3Y2hhcl90IGNvbnN0KiBfU291cmNlLCBzaXplX3QgX01heENvdW50KTsKc3RhdGljIF9faW5saW5lIHNpemVfdCB3Y3NubGVuX3Mod2NoYXJfdCBjb25zdCogX1NvdXJjZSwgc2l6ZV90IF9NYXhDb3VudCk7CndjaGFyX3QqIHdjc25jYXQod2NoYXJfdCogX0Rlc3RpbmF0aW9uLCB3Y2hhcl90IGNvbnN0KiBfU291cmNlLCBzaXplX3QgX0NvdW50KTsKaW50IHdjc25jbXAod2NoYXJfdCBjb25zdCogX1N0cmluZzEsIHdjaGFyX3QgY29uc3QqIF9TdHJpbmcyLCBzaXplX3QgX01heENvdW50KTsKd2NoYXJfdCogd2NzbmNweSh3Y2hhcl90KiBfRGVzdGluYXRpb24sIHdjaGFyX3QgY29uc3QqIF9Tb3VyY2UsIHNpemVfdCBfQ291bnQpOwp3Y2hhcl90KiB3Y3NwYnJrKHdjaGFyX3QgY29uc3QqIF9TdHJpbmcsIHdjaGFyX3QgY29uc3QqIF9Db250cm9sKTsKc2l6ZV90IHdjc3Nwbih3Y2hhcl90IGNvbnN0KiBfU3RyaW5nLCB3Y2hhcl90IGNvbnN0KiBfQ29udHJvbCk7CndjaGFyX3QqIHdjc3Rvayh3Y2hhcl90KiBfU3RyaW5nLCB3Y2hhcl90IGNvbnN0KiBfRGVsaW1pdGVyLCB3Y2hhcl90KiogX0NvbnRleHQpOwpzaXplX3Qgd2NzeGZybSh3Y2hhcl90KiBfRGVzdGluYXRpb24sIHdjaGFyX3QgY29uc3QqIF9Tb3VyY2UsIHNpemVfdCBfTWF4Q291bnQpOwppbnQgd2NzY29sbCh3Y2hhcl90IGNvbnN0KiBfU3RyaW5nMSwgd2NoYXJfdCBjb25zdCogX1N0cmluZzIpOwp3Y2hhcl90KiB3Y3NkdXAod2NoYXJfdCBjb25zdCogX1N0cmluZyk7CmludCB3Y3NpY21wKHdjaGFyX3QgY29uc3QqIF9TdHJpbmcxLCB3Y2hhcl90IGNvbnN0KiBfU3RyaW5nMik7CmludCB3Y3NuaWNtcCh3Y2hhcl90IGNvbnN0KiBfU3RyaW5nMSwgd2NoYXJfdCBjb25zdCogX1N0cmluZzIsIHNpemVfdCBfTWF4Q291bnQpOwp3Y2hhcl90KiB3Y3Nuc2V0KHdjaGFyX3QqIF9TdHJpbmcsIHdjaGFyX3QgX1ZhbHVlLCBzaXplX3QgX01heENvdW50KTsKd2NoYXJfdCogd2NzcmV2KHdjaGFyX3QqIF9TdHJpbmcpOwp3Y2hhcl90KiB3Y3NzZXQod2NoYXJfdCogX1N0cmluZywgd2NoYXJfdCBfVmFsdWUpOwp3Y2hhcl90KiB3Y3Nsd3Iod2NoYXJfdCogX1N0cmluZyk7IHdjaGFyX3QqIHdjc3Vwcih3Y2hhcl90KiBfU3RyaW5nKTsKaW50IHdjc2ljb2xsKHdjaGFyX3QgY29uc3QqIF9TdHJpbmcxLCB3Y2hhcl90IGNvbnN0KiBfU3RyaW5nMik7CmNoYXIqIHN0cnRva19zKGNoYXIqIF9TdHJpbmcsIGNoYXIgY29uc3QqIF9EZWxpbWl0ZXIsIGNoYXIqKiBfQ29udGV4dCk7CnZvaWQqIF9tZW1jY3B5KHZvaWQqIF9Ec3QsIHZvaWQgY29uc3QqIF9TcmMsIGludCBfVmFsLCBzaXplX3QgX01heENvdW50KTsKY2hhciogc3RyY2F0KGNoYXIqIF9EZXN0aW5hdGlvbiwgY2hhciBjb25zdCogX1NvdXJjZSk7CmludCBzdHJjbXAoY2hhciBjb25zdCogX1N0cjEsIGNoYXIgY29uc3QqIF9TdHIyKTsKaW50IHN0cmNvbGwoY2hhciBjb25zdCogX1N0cmluZzEsIGNoYXIgY29uc3QqIF9TdHJpbmcyKTsKY2hhciogc3RyZXJyb3IoaW50IF9FcnJvck1lc3NhZ2UpOwpzaXplX3Qgc3RybGVuKGNoYXIgY29uc3QqIF9TdHIpOwpjaGFyKiBzdHJuY2F0KGNoYXIqIF9EZXN0aW5hdGlvbiwgY2hhciBjb25zdCogX1NvdXJjZSwgc2l6ZV90IF9Db3VudCk7CmludCBzdHJuY21wKGNoYXIgY29uc3QqIF9TdHIxLCBjaGFyIGNvbnN0KiBfU3RyMiwgc2l6ZV90IF9NYXhDb3VudCk7CmNoYXIqIHN0cm5jcHkoY2hhciogX0Rlc3RpbmF0aW9uLCBjaGFyIGNvbnN0KiBfU291cmNlLCBzaXplX3QgX0NvdW50KTsKc2l6ZV90IHN0cm5sZW4oY2hhciBjb25zdCogX1N0cmluZywgc2l6ZV90IF9NYXhDb3VudCk7CnN0YXRpYyBfX2lubGluZSBzaXplX3Qgc3Rybmxlbl9zKGNoYXIgY29uc3QqIF9TdHJpbmcsIHNpemVfdCBfTWF4Q291bnQpOwpjaGFyKiBzdHJwYnJrKGNoYXIgY29uc3QqIF9TdHIsIGNoYXIgY29uc3QqIF9Db250cm9sKTsKc2l6ZV90IHN0cnNwbihjaGFyIGNvbnN0KiBfU3RyLCBjaGFyIGNvbnN0KiBfQ29udHJvbCk7CmNoYXIqIHN0cnRvayhjaGFyKiBfU3RyaW5nLCBjaGFyIGNvbnN0KiBfRGVsaW1pdGVyKTsKI2lmIGRlZmluZWQoX19TVERDX09XTkVSU0hJUF9fKSAmJiBkZWZpbmVkKF9fT1dORVJTSElQX0hfXykKY2hhciogX093bmVyIHN0cmR1cChjaGFyIGNvbnN0KiBfU3RyaW5nKTsKI2Vsc2UKY2hhciogc3RyZHVwKGNoYXIgY29uc3QqIF9TdHJpbmcpOwojZW5kaWYKaW50IHN0cmNtcGkoY2hhciBjb25zdCogX1N0cmluZzEsIGNoYXIgY29uc3QqIF9TdHJpbmcyKTsKaW50IHN0cmljbXAoY2hhciBjb25zdCogX1N0cmluZzEsIGNoYXIgY29uc3QqIF9TdHJpbmcyKTsKY2hhciogc3RybHdyKGNoYXIqIF9TdHJpbmcpOwppbnQgc3RybmljbXAoY2hhciBjb25zdCogX1N0cmluZzEsIGNoYXIgY29uc3QqIF9TdHJpbmcyLCBzaXplX3QgX01heENvdW50KTsKY2hhciogc3RybnNldChjaGFyKiBfU3RyaW5nLCBpbnQgX1ZhbHVlLCBzaXplX3QgX01heENvdW50KTsKY2hhciogc3RycmV2KGNoYXIqIF9TdHJpbmcpOwpjaGFyKiBzdHJzZXQoY2hhciogX1N0cmluZywgaW50IF9WYWx1ZSk7IGNoYXIqIHN0cnVwcihjaGFyKiBfU3RyaW5nKTsATm90ZTogaW5jbHVkaW5nIGZpbGU6AGVsc2UgX2NhdGNoX2xhYmVsXyVkOgAtdGFyZ2V0PWM5OQAtc3RkPWM5OQAtdGFyZ2V0PWM4OQBfX2ludDgAVEtfS0VZV09SRF9fSU5UOABfRGVjaW1hbDEyOABUS19LRVlXT1JEX19ERUNJTUFMMTI4AF9faW50MTYAVEtfS0VZV09SRF9fSU5UMTYAX19pbnQ2NABfRGVjaW1hbDY0AFRLX0tFWVdPUkRfX0lOVDY0AFRLX0tFWVdPUkRfX0RFQ0lNQUw2NABfX2ludDMyAF9EZWNpbWFsMzIAVEtfS0VZV09SRF9fSU5UMzIAVEtfS0VZV09SRF9fREVDSU1BTDMyAC10YXJnZXQ9YzExAC1zdGQ9YzExAGFsaWduID4gMABzdGF0ZV90b19yZXN0b3JlID4gMABsaXN0LnRhaWwtPm5leHQgPT0gMABwX2luaXRfZGVjbGFyYXRvci0+cF9kZWNsYXJhdG9yLT50eXBlLnR5cGVfc3BlY2lmaWVyX2ZsYWdzID09IDAAcF9vYmplY3QtPm1lbWJlcnMuc2l6ZSA9PSAwAGZtdCAhPSAwAGFsaWduICE9IDAAaWYgKDEpIC8qdHJ5Ki8ALypfSW1wbGljaXQqLwAvKnJlc3RyaWN0Ki8ALyolcyovAC8qW1tub3JldHVybl1dKi8AcHJldmlvdXMgbWVtYmVycyBvZiAnJXMnIHdlcmUgbm90IG1vdmVkIGJlZm9yZSB0aGlzIGFzc2lnbm1lbnQuAG1lbW9yeSBwb2ludGVkIGJ5ICclcycgd2FzIG5vdCByZWxlYXNlZCBiZWZvcmUgYXNzaWdubWVudC4AVW5pY29kZSBjaGFyYWN0ZXIgbGl0ZXJhbHMgbWF5IG5vdCBjb250YWluIG11bHRpcGxlIGNoYXJhY3RlcnMuAHVzZSBvZiAnJXMnIHdpdGggdGFnIHR5cGUgdGhhdCBkb2VzIG5vdCBtYXRjaCBwcmV2aW91cyBkZWNsYXJhdGlvbi4Ac3RydWN0ICclcycgaXMgaW5jb21wbGV0ZS4AQ2hhcmFjdGVyIHRvbyBsYXJnZSBmb3IgZW5jbG9zaW5nIGNoYXJhY3RlciBsaXRlcmFsIHR5cGUuAG9iamVjdCAnJXMnIHdhcyBub3QgbW92ZWQuAG1lbW9yeSBwb2ludGVkIGJ5ICclcycgd2FzIG5vdCByZWxlYXNlZC4AT2JqZWN0IG11c3QgYmUgb3duZXIgcXVhbGlmaWVkLgBpbnZhbGlkIHR5cGVzIGZvciBvcGVyYXRvciAtACwAKgAhdG9rZW5fbGlzdF9pc19lbXB0eShsaXN0KQAoKCVzKSVzKQBwX2V4cHJlc3Npb25fbm9kZSA9PSBOVUxMIHx8IChwX2V4cHJlc3Npb25fbm9kZS0+Zmlyc3RfdG9rZW4gJiYgcF9leHByZXNzaW9uX25vZGUtPmxhc3RfdG9rZW4pAChudWxsKQByLnRhaWwgPT0gTlVMTCB8fCAhdG9rZW5faXNfYmxhbmsoci50YWlsKQBtaXNzaW5nIG1hY3JvIGFyZ3VtZW50IChzaG91bGQgYmUgY2hlY2tlZCBiZWZvcmUpAHR5cGVfaXNfYXJyYXkocF90eXBlKQB0eXBlX2lzX3BvaW50ZXIocF90eXBlKQAhbWFjcm9fYWxyZWFkeV9leHBhbmRlZChsaXN0LCBtYWNyby0+bmFtZSkAIXRva2VuX2lzX2JsYW5rKGlucHV0X2xpc3QtPmhlYWQpACF0b2tlbl9pc19ibGFuayhuZXdfbGlzdC5oZWFkKQBhc3NlcnQoX19WQV9BUkdTX18pAChwLT5oZWFkID09IE5VTEwgJiYgcC0+dGFpbCA9PSBOVUxMKSB8fCAocC0+aGVhZCAhPSBOVUxMICYmIHAtPnRhaWwgIT0gTlVMTCkAIShpbnB1dF9saXN0LT5oZWFkLT5mbGFncyAmIFRLX0ZMQUdfSEFTX05FV0xJTkVfQkVGT1JFKQAhKG5ld19saXN0LmhlYWQtPmZsYWdzICYgVEtfRkxBR19IQVNfTkVXTElORV9CRUZPUkUpACF0b2tlbl9saXN0X2lzX2VtcHR5KCZsaXN0MikAKChfQm9vbCkxKQAoKF9Cb29sKTApACgodm9pZCopMCkAbWlzc2luZyApAGV4cGVjdGVkICkAKABwX2JyYWNrZXRfaW5pdGlhbGl6ZXJfbGlzdC0+Zmlyc3RfdG9rZW4tPnR5cGUgPT0gJ3snAGV4cGVjdGVkIGRlY2xhcmF0aW9uIG5vdCAnJXMnAG1lbWJlciAnJXMnIG5vdCBmb3VuZCBpbiBzdHJ1Y3QgJyVzJwBwYXJhbWV0ZXIgJyVzJyBpcyBsZWF2aW5nIHNjb3BlZCB3aXRoIGEgdW5pbml0aWFsaXplZCBvYmplY3QgJyVzJwBwYXJhbWV0ZXIgJyVzJyBpcyBsZWF2aW5nIHNjb3BlZCB3aXRoIGEgbW92ZWQgb2JqZWN0ICclcycAdW5rbm93biBvcHRpb24gJyVzJwBzdHJ1Y3QgbWVtYmVyICclcycgbm90IGZvdW5kIGluICclcycAdW5rbm93biB3YXJuaW5nICclcycAaW52YWxpZCB0eXBlICclcycAbm90IGZvdW5kICclcycAZGlyID0gJyVzJwBpbXBsaWNpdCBjb252ZXJzaW9uIGZyb20gJ2VudW0gJXMnIHRvICdlbnVtICVzJwBtdWx0aXBsZSBkZWZpbml0aW9uIG9mICdlbnVtICVzJwBvcCA9PSAnPT0nIHx8IG9wID09ICchPScAZXhwZWN0ZWQgJ30nIGJlZm9yZSAnKScAZXhwZWN0ZWQgJ10nIGJlZm9yZSAnKScAcF9leHByZXNzaW9uX25vZGUtPmZpcnN0X3Rva2VuLT50eXBlID09ICcoJwBvYmpfb3duZXIgcG9pbnRlciBtdXN0IGJlIGNyZWF0ZWQgdXNpbmcgYWRkcmVzcyBvZiBvcGVyYXRvciAmAC8vIwB5b3UgY2FuIHVzZSAiYWRqYWNlbnQiICJzdHJpbmdzIgAsICJlcnJvciIAInplcm8iACJmaWxlIgAidW5jaGVja2VkIgBcIgB7IAAgZGlzY2FyZGluZyBjb25zdCBhdCBhcmd1bWVudCAAIGluY29tcGF0aWJsZSB0eXBlcyBhdCBhcmd1bWVudCAAc3RydWN0IAAgaW5jb21wYXRpYmxlIHR5cGVzIAB7ICVzIAAgb3IgAGVudW0gAGlnbm9yaW5nIHRoZSByZXN1bHQgb2Ygb3duZXIgdHlwZSAAJyVzJyBpcyB1bmluaXRpYWxpemVkIABlbGlmIGRlZmluZWQgAGVsaWYgISBkZWZpbmVkIABsZWZ0IHR5cGUgbXVzdCBiZSBvd25lciBxdWFsaWZpZWQgACVwOiVzID09IAAgJXMgX3RtcCA9IAAbWzk3bSVzOiVkOiVkOiAAJXMoJWQsJWQpOiAAICAgICAgICAgICAgICAgfQoAICAgICAgICAgICAgICJhcnRpZmFjdExvY2F0aW9uIjogewoAICAgICAgICJwaHlzaWNhbExvY2F0aW9uIjogewoAICAgICAgICAgICAgICAicmVnaW9uIjogewoAICAgICAibWVzc2FnZSI6IHsKACAgICAgICAgICB7CgAbWzkxbWVycm9yOiAbWzk3bSVzCgAbWzk1bXdhcm5pbmc6IBtbOTdtJXMKABtbMzY7MW1ub3RlOiAbWzk3bSVzCgBleHBlY3RlZCB0b2tlbiAlcyBnb3QgJXMKACVzICVzCgB0YWcgJXMKAF9TdGF0aWNfYXNzZXJ0IGZhaWxlZCAlcwoAcmVhZCAlcwoAZXJyb3I6ICVzCgB3YXJuaW5nOiAlcwoAbm90ZTogJXMKAHRvbyBmZXcgYXJndW1lbnRzIHByb3ZpZGVkIHRvIGZ1bmN0aW9uLWxpa2UgbWFjcm8gaW52b2NhdGlvbgoAG1s5N21DYWtlIDAuNy40G1swbQoAI3ByYWdtYSBvbmNlCiNkZWZpbmUgX0lPRkJGIDB4MDAwMAojZGVmaW5lIF9JT0xCRiAweDAwNDAKI2RlZmluZSBfSU9OQkYgMHgwMDA0CgojZGVmaW5lIEJVRlNJWiAgNTEyCgojZGVmaW5lIEVPRiAgICAoLTEpCgojZGVmaW5lIEZJTEVOQU1FX01BWCAgICAyNjAKI2RlZmluZSBGT1BFTl9NQVggICAgICAgMjAKCiNkZWZpbmUgTF90bXBuYW0gICAyNjAgLy8gX01BWF9QQVRICgovKiBTZWVrIG1ldGhvZCBjb25zdGFudHMgKi8KCiNkZWZpbmUgU0VFS19DVVIgICAgMQojZGVmaW5lIFNFRUtfRU5EICAgIDIKI2RlZmluZSBTRUVLX1NFVCAgICAwCgoKI2RlZmluZSBUTVBfTUFYICAgICAgICAgMjE0NzQ4MzY0NwoKCiNkZWZpbmUgc3RkaW4gICgoRklMRSopMCkKI2RlZmluZSBzdGRvdXQgKChGSUxFKikxKQojZGVmaW5lIHN0ZGVyciAoKEZJTEUqKTIpCgp0eXBlZGVmIGxvbmcgbG9uZyBmcG9zX3Q7CnR5cGVkZWYgaW50IEZJTEU7CgpleHRlcm4gRklMRSogc3RkaW47CmV4dGVybiBGSUxFKiBzdGRvdXQ7CmV4dGVybiBGSUxFKiBzdGRlcnI7Cgp0eXBlZGVmIGludCBzaXplX3Q7CnR5cGVkZWYgdm9pZCogdmFfbGlzdDsKaW50IHJlbW92ZShjb25zdCBjaGFyKiBmaWxlbmFtZSk7CmludCByZW5hbWUoY29uc3QgY2hhciogb2xkLCBjb25zdCBjaGFyKiBuZXdzKTsKRklMRSogdG1wZmlsZSh2b2lkKTsKY2hhciogdG1wbmFtKGNoYXIqIHMpOwojaWYgZGVmaW5lZChfX1NURENfT1dORVJTSElQX18pICYmIGRlZmluZWQoX19PV05FUlNISVBfSF9fKQppbnQgZmNsb3NlKEZJTEUqIF9Pd25lciBzdHJlYW0pOwojZWxzZQppbnQgZmNsb3NlKEZJTEUqIHN0cmVhbSk7CiNlbmRpZgppbnQgZmZsdXNoKEZJTEUqIHN0cmVhbSk7CiNpZiBkZWZpbmVkKF9fU1REQ19PV05FUlNISVBfXykgJiYgZGVmaW5lZChfX09XTkVSU0hJUF9IX18pCkZJTEUqIF9Pd25lciBmb3Blbihjb25zdCBjaGFyKiByZXN0cmljdCBmaWxlbmFtZSwgY29uc3QgY2hhciogcmVzdHJpY3QgbW9kZSk7CkZJTEUqIF9Pd25lciBmcmVvcGVuKGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZpbGVuYW1lLCBjb25zdCBjaGFyKiByZXN0cmljdCBtb2RlLCBGSUxFKiByZXN0cmljdCBzdHJlYW0pOwojZWxzZQpGSUxFKiBmb3Blbihjb25zdCBjaGFyKiByZXN0cmljdCBmaWxlbmFtZSwgY29uc3QgY2hhciogcmVzdHJpY3QgbW9kZSk7CkZJTEUqIGZyZW9wZW4oY29uc3QgY2hhciogcmVzdHJpY3QgZmlsZW5hbWUsIGNvbnN0IGNoYXIqIHJlc3RyaWN0IG1vZGUsIEZJTEUqIHJlc3RyaWN0IHN0cmVhbSk7CiNlbmRpZgp2b2lkIHNldGJ1ZihGSUxFKiByZXN0cmljdCBzdHJlYW0sIGNoYXIqIHJlc3RyaWN0IGJ1Zik7CmludCBzZXR2YnVmKEZJTEUqIHJlc3RyaWN0IHN0cmVhbSwgY2hhciogcmVzdHJpY3QgYnVmLCBpbnQgbW9kZSwgc2l6ZV90IHNpemUpOwppbnQgZnByaW50ZihGSUxFKiByZXN0cmljdCBzdHJlYW0sIGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZvcm1hdCwgLi4uKTsKaW50IGZzY2FuZihGSUxFKiByZXN0cmljdCBzdHJlYW0sIGNvbnN0IGNoYXIqIHJlc3RyaWN0IGZvcm1hdCwgLi4uKTsKaW50IHByaW50Zihjb25zdCBjaGFyKiByZXN0cmljdCBmb3JtYXQsIC4uLik7CmludCBzY2FuZihjb25zdCBjaGFyKiByZXN0cmljdCBmb3JtYXQsIC4uLik7CmludCBzbnByaW50ZihjaGFyKiByZXN0cmljdCBzLCBzaXplX3QgbiwgY29uc3QgY2hhciogcmVzdHJpY3QgZm9ybWF0LCAuLi4pOwppbnQgc3ByaW50ZihjaGFyKiByZXN0cmljdCBzLCBjb25zdCBjaGFyKiByZXN0cmljdCBmb3JtYXQsIC4uLik7CmludCBzc2NhbmYoY29uc3QgY2hhciogcmVzdHJpY3QgcywgY29uc3QgY2hhciogcmVzdHJpY3QgZm9ybWF0LCAuLi4pOwppbnQgdmZwcmludGYoRklMRSogcmVzdHJpY3Qgc3RyZWFtLCBjb25zdCBjaGFyKiByZXN0cmljdCBmb3JtYXQsIHZhX2xpc3QgYXJnKTsKaW50IHZmc2NhbmYoRklMRSogcmVzdHJpY3Qgc3RyZWFtLCBjb25zdCBjaGFyKiByZXN0cmljdCBmb3JtYXQsIHZhX2xpc3QgYXJnKTsKaW50IHZwcmludGYoY29uc3QgY2hhciogcmVzdHJpY3QgZm9ybWF0LCB2YV9saXN0IGFyZyk7CmludCB2c2NhbmYoY29uc3QgY2hhciogcmVzdHJpY3QgZm9ybWF0LCB2YV9saXN0IGFyZyk7CmludCBwdXRzKGNvbnN0IGNoYXIqIHN0cik7CmludCBmcHV0cyhjb25zdCBjaGFyKiByZXN0cmljdCBzLCBGSUxFKiByZXN0cmljdCBzdHJlYW0pOwppbnQgZ2V0YyhGSUxFKiBzdHJlYW0pOwppbnQgZ2V0Y2hhcih2b2lkKTsKaW50IHB1dGMoaW50IGMsIEZJTEUqIHN0cmVhbSk7CmludCBwdXRjaGFyKGludCBjKTsKaW50IHB1dHMoY29uc3QgY2hhciogcyk7CmludCB1bmdldGMoaW50IGMsIEZJTEUqIHN0cmVhbSk7CmludCBmZ2V0YyhGSUxFKiBzdHJlYW0pOwpzaXplX3QgZnJlYWQodm9pZCogcmVzdHJpY3QgcHRyLCBzaXplX3Qgc2l6ZSwgc2l6ZV90IG5tZW1iLCBGSUxFKiByZXN0cmljdCBzdHJlYW0pOwpzaXplX3QgZndyaXRlKGNvbnN0IHZvaWQqIHJlc3RyaWN0IHB0ciwgc2l6ZV90IHNpemUsIHNpemVfdCBubWVtYiwgRklMRSogcmVzdHJpY3Qgc3RyZWFtKTsKaW50IGZnZXRwb3MoRklMRSogcmVzdHJpY3Qgc3RyZWFtLCBmcG9zX3QqIHJlc3RyaWN0IHBvcyk7CmludCBmc2VlayhGSUxFKiBzdHJlYW0sIGxvbmcgaW50IG9mZnNldCwgaW50IHdoZW5jZSk7CmludCBmc2V0cG9zKEZJTEUqIHN0cmVhbSwgY29uc3QgZnBvc190KiBwb3MpOwpsb25nIGludCBmdGVsbChGSUxFKiBzdHJlYW0pOwp2b2lkIHJld2luZChGSUxFKiBzdHJlYW0pOwp2b2lkIGNsZWFyZXJyKEZJTEUqIHN0cmVhbSk7CmludCBmZW9mKEZJTEUqIHN0cmVhbSk7CmludCBmZXJyb3IoRklMRSogc3RyZWFtKTsKdm9pZCBwZXJyb3IoY29uc3QgY2hhciogcyk7CgoKCiNpZm5kZWYgTlVMTAojZGVmaW5lIE5VTEwgKCh2b2lkKikwKQojZW5kaWYKACAgICAgICAgICAgICAgICAgICJlbmRDb2x1bW4iOiAlZAoAd2FybmluZzogJXMgWy1XJXNdCgAgICAgICAgICBdCgAgICAgICAibG9jYXRpb25zIjogWwoAICAgICAgICAgImxvZ2ljYWxMb2NhdGlvbnMiOiBbCgAjcHJhZ21hIG9uY2UKCmRvdWJsZSBhY29zKGRvdWJsZSBfX3gpOwpkb3VibGUgYXNpbihkb3VibGUgX194KTsKZG91YmxlIGF0YW4oZG91YmxlIF9feCk7CmRvdWJsZSBhdGFuMihkb3VibGUgX195LCBkb3VibGUgX194KTsKZG91YmxlIGNvcyhkb3VibGUgX194KTsKZG91YmxlIHNpbihkb3VibGUgX194KTsKZG91YmxlIHRhbihkb3VibGUgX194KTsKZG91YmxlIGNvc2goZG91YmxlIF9feCk7CmRvdWJsZSBzaW5oKGRvdWJsZSBfX3gpOwpkb3VibGUgdGFuaChkb3VibGUgX194KTsKZG91YmxlIGFjb3NoKGRvdWJsZSBfX3gpOwpkb3VibGUgYXNpbmgoZG91YmxlIF9feCk7CmRvdWJsZSBhdGFuaChkb3VibGUgX194KTsKZG91YmxlIGV4cChkb3VibGUgX194KTsKZG91YmxlIGZyZXhwKGRvdWJsZSBfX3gsIGludCogX19leHBvbmVudCk7CmRvdWJsZSBsZGV4cChkb3VibGUgX194LCBpbnQgX19leHBvbmVudCk7CmRvdWJsZSBsb2coZG91YmxlIF9feCk7CmRvdWJsZSBsb2cxMChkb3VibGUgX194KTsKZG91YmxlIG1vZGYoZG91YmxlIF9feCwgZG91YmxlKiBfX2lwdHIpOwpkb3VibGUgZXhwbTEoZG91YmxlIF9feCk7CmRvdWJsZSBsb2cxcChkb3VibGUgX194KTsKZG91YmxlIGxvZ2IoZG91YmxlIF9feCk7CmRvdWJsZSBleHAyKGRvdWJsZSBfX3gpOwpkb3VibGUgbG9nMihkb3VibGUgX194KTsKZG91YmxlIHBvdyhkb3VibGUgX194LCBkb3VibGUgX195KTsKZG91YmxlIHNxcnQoZG91YmxlIF9feCk7CmRvdWJsZSBoeXBvdChkb3VibGUgX194LCBkb3VibGUgX195KTsKZG91YmxlIGNicnQoZG91YmxlIF9feCk7CmRvdWJsZSBjZWlsKGRvdWJsZSBfX3gpOwpkb3VibGUgZmFicyhkb3VibGUgX194KTsKZG91YmxlIGZsb29yKGRvdWJsZSBfX3gpOwpkb3VibGUgZm1vZChkb3VibGUgX194LCBkb3VibGUgX195KTsKaW50IGlzaW5mKGRvdWJsZSBfX3ZhbHVlKTsKaW50IGZpbml0ZShkb3VibGUgX192YWx1ZSk7CmRvdWJsZSBkcmVtKGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwpkb3VibGUgc2lnbmlmaWNhbmQoZG91YmxlIF9feCk7CmRvdWJsZSBjb3B5c2lnbihkb3VibGUgX194LCBkb3VibGUgX195KTsKZG91YmxlIG5hbihjb25zdCBjaGFyKiBfX3RhZ2IpOwppbnQgaXNuYW4oZG91YmxlIF9fdmFsdWUpOwpkb3VibGUgajAoZG91YmxlKTsKZG91YmxlIGoxKGRvdWJsZSk7CmRvdWJsZSBqbihpbnQsIGRvdWJsZSk7CmRvdWJsZSB5MChkb3VibGUpOwpkb3VibGUgeTEoZG91YmxlKTsKZG91YmxlIHluKGludCwgZG91YmxlKTsKZG91YmxlIGVyZihkb3VibGUpOwpkb3VibGUgZXJmYyhkb3VibGUpOwpkb3VibGUgbGdhbW1hKGRvdWJsZSk7CmRvdWJsZSB0Z2FtbWEoZG91YmxlKTsKZG91YmxlIGdhbW1hKGRvdWJsZSk7CmRvdWJsZSBsZ2FtbWFfcihkb3VibGUsIGludCogX19zaWduZ2FtcCk7CmRvdWJsZSByaW50KGRvdWJsZSBfX3gpOwpkb3VibGUgbmV4dGFmdGVyKGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwpkb3VibGUgbmV4dHRvd2FyZChkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOwpkb3VibGUgcmVtYWluZGVyKGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwpkb3VibGUgc2NhbGJuKGRvdWJsZSBfX3gsIGludCBfX24pOwppbnQgaWxvZ2IoZG91YmxlIF9feCk7CmRvdWJsZSBzY2FsYmxuKGRvdWJsZSBfX3gsIGxvbmcgaW50IF9fbik7CmRvdWJsZSBuZWFyYnlpbnQoZG91YmxlIF9feCk7CmRvdWJsZSByb3VuZChkb3VibGUgX194KTsKZG91YmxlIHRydW5jKGRvdWJsZSBfX3gpOwpkb3VibGUgcmVtcXVvKGRvdWJsZSBfX3gsIGRvdWJsZSBfX3ksIGludCogX19xdW8pOwpsb25nIGludCBscmludChkb3VibGUgX194KTsKbG9uZyBsb25nIGludCBsbHJvdW5kKGRvdWJsZSBfX3gpOwpkb3VibGUgZmRpbShkb3VibGUgX194LCBkb3VibGUgX195KTsKZG91YmxlIGZtYXgoZG91YmxlIF9feCwgZG91YmxlIF9feSk7CmRvdWJsZSBmbWluKGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwpkb3VibGUgZm1hKGRvdWJsZSBfX3gsIGRvdWJsZSBfX3ksIGRvdWJsZSBfX3opOwpkb3VibGUgc2NhbGIoZG91YmxlIF9feCwgZG91YmxlIF9fbik7CmZsb2F0IGFjb3NmKGZsb2F0IF9feCk7CmZsb2F0IGFzaW5mKGZsb2F0IF9feCk7CmZsb2F0IGF0YW5mKGZsb2F0IF9feCk7CmZsb2F0IGF0YW4yZihmbG9hdCBfX3ksIGZsb2F0IF9feCk7CmZsb2F0IGNvc2YoZmxvYXQgX194KTsKZmxvYXQgc2luZihmbG9hdCBfX3gpOwpmbG9hdCB0YW5mKGZsb2F0IF9feCk7CmZsb2F0IGNvc2hmKGZsb2F0IF9feCk7CmZsb2F0IHNpbmhmKGZsb2F0IF9feCk7CmZsb2F0IHRhbmhmKGZsb2F0IF9feCk7CmZsb2F0IGFjb3NoZihmbG9hdCBfX3gpOwpmbG9hdCBhc2luaGYoZmxvYXQgX194KTsKZmxvYXQgYXRhbmhmKGZsb2F0IF9feCk7CmZsb2F0IGV4cGYoZmxvYXQgX194KTsKZmxvYXQgZnJleHBmKGZsb2F0IF9feCwgaW50KiBfX2V4cG9uZW50KTsKZmxvYXQgbGRleHBmKGZsb2F0IF9feCwgaW50IF9fZXhwb25lbnQpOwpmbG9hdCBsb2dmKGZsb2F0IF9feCk7CmZsb2F0IGxvZzEwZihmbG9hdCBfX3gpOyBmbG9hdCBfX2xvZzEwZihmbG9hdCBfX3gpOwpmbG9hdCBtb2RmZihmbG9hdCBfX3gsIGZsb2F0KiBfX2lwdHIpOwpmbG9hdCBleHBtMWYoZmxvYXQgX194KTsKZmxvYXQgbG9nMXBmKGZsb2F0IF9feCk7CmZsb2F0IGxvZ2JmKGZsb2F0IF9feCk7CmZsb2F0IGV4cDJmKGZsb2F0IF9feCk7CmZsb2F0IGxvZzJmKGZsb2F0IF9feCk7CmZsb2F0IHBvd2YoZmxvYXQgX194LCBmbG9hdCBfX3kpOwpmbG9hdCBzcXJ0ZihmbG9hdCBfX3gpOwpmbG9hdCBoeXBvdGYoZmxvYXQgX194LCBmbG9hdCBfX3kpOwpmbG9hdCBjYnJ0ZihmbG9hdCBfX3gpOwpmbG9hdCBjZWlsZihmbG9hdCBfX3gpOwpmbG9hdCBmYWJzZihmbG9hdCBfX3gpOwpmbG9hdCBmbG9vcmYoZmxvYXQgX194KTsKZmxvYXQgZm1vZGYoZmxvYXQgX194LCBmbG9hdCBfX3kpOyAKaW50IGlzaW5mZihmbG9hdCBfX3ZhbHVlKTsKaW50IGZpbml0ZWYoZmxvYXQgX192YWx1ZSk7CmZsb2F0IGRyZW1mKGZsb2F0IF9feCwgZmxvYXQgX195KTsKZmxvYXQgc2lnbmlmaWNhbmRmKGZsb2F0IF9feCk7IApmbG9hdCBjb3B5c2lnbmYoZmxvYXQgX194LCBmbG9hdCBfX3kpOyAKZmxvYXQgbmFuZihjb25zdCBjaGFyKiBfX3RhZ2IpOyAKaW50IGlzbmFuZihmbG9hdCBfX3ZhbHVlKTsKZmxvYXQgajBmKGZsb2F0KTsgCmZsb2F0IGoxZihmbG9hdCk7IApmbG9hdCBqbmYoaW50LCBmbG9hdCk7IApmbG9hdCB5MGYoZmxvYXQpOyAKZmxvYXQgeTFmKGZsb2F0KTsgCmZsb2F0IHluZihpbnQsIGZsb2F0KTsgCmZsb2F0IGVyZmYoZmxvYXQpOyAKZmxvYXQgZXJmY2YoZmxvYXQpOwpmbG9hdCBsZ2FtbWFmKGZsb2F0KTsKZmxvYXQgdGdhbW1hZihmbG9hdCk7CmZsb2F0IGdhbW1hZihmbG9hdCk7IApmbG9hdCBsZ2FtbWFmX3IoZmxvYXQsIGludCogX19zaWduZ2FtcCk7IApmbG9hdCByaW50ZihmbG9hdCBfX3gpOyAKZmxvYXQgbmV4dGFmdGVyZihmbG9hdCBfX3gsIGZsb2F0IF9feSk7IApmbG9hdCBuZXh0dG93YXJkZihmbG9hdCBfX3gsIGxvbmcgZG91YmxlIF9feSk7IApmbG9hdCByZW1haW5kZXJmKGZsb2F0IF9feCwgZmxvYXQgX195KTsgCmZsb2F0IHNjYWxibmYoZmxvYXQgX194LCBpbnQgX19uKTsgCmludCBpbG9nYmYoZmxvYXQgX194KTsgCmZsb2F0IHNjYWxibG5mKGZsb2F0IF9feCwgbG9uZyBpbnQgX19uKTsgCmZsb2F0IG5lYXJieWludGYoZmxvYXQgX194KTsgCmZsb2F0IHJvdW5kZihmbG9hdCBfX3gpOyAKZmxvYXQgdHJ1bmNmKGZsb2F0IF9feCk7IApmbG9hdCByZW1xdW9mKGZsb2F0IF9feCwgZmxvYXQgX195LCBpbnQqIF9fcXVvKTsgCmxvbmcgaW50IGxyaW50ZihmbG9hdCBfX3gpOyAKbG9uZyBsb25nIGludCBsbHJvdW5kZihmbG9hdCBfX3gpOyAKZmxvYXQgZmRpbWYoZmxvYXQgX194LCBmbG9hdCBfX3kpOwpmbG9hdCBmbWF4ZihmbG9hdCBfX3gsIGZsb2F0IF9feSk7IApmbG9hdCBmbWluZihmbG9hdCBfX3gsIGZsb2F0IF9feSk7CmZsb2F0IGZtYWYoZmxvYXQgX194LCBmbG9hdCBfX3ksIGZsb2F0IF9feik7IApmbG9hdCBzY2FsYmYoZmxvYXQgX194LCBmbG9hdCBfX24pOyAKbG9uZyBkb3VibGUgYWNvc2wobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGFzaW5sKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBhdGFubChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgYXRhbjJsKGxvbmcgZG91YmxlIF9feSwgbG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGNvc2wobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIHNpbmwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIHRhbmwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGNvc2hsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIHNpbmhsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIHRhbmhsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIGFjb3NobChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgYXNpbmhsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBhdGFuaGwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGV4cGwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGZyZXhwbChsb25nIGRvdWJsZSBfX3gsIGludCogX19leHBvbmVudCk7IApsb25nIGRvdWJsZSBsZGV4cGwobG9uZyBkb3VibGUgX194LCBpbnQgX19leHBvbmVudCk7IApsb25nIGRvdWJsZSBsb2dsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBsb2cxMGwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIG1vZGZsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUqIF9faXB0cik7IApsb25nIGRvdWJsZSBleHBtMWwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGxvZzFwbChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgbG9nYmwobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGV4cDJsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBsb2cybChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgcG93bChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7IApsb25nIGRvdWJsZSBzcXJ0bChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgaHlwb3RsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsgCmxvbmcgZG91YmxlIGNicnRsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBjZWlsbChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgZmFic2wobG9uZyBkb3VibGUgX194KTsgCmxvbmcgZG91YmxlIGZsb29ybChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSBmbW9kbChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7IAppbnQgaXNpbmZsKGxvbmcgZG91YmxlIF9fdmFsdWUpOwppbnQgZmluaXRlbChsb25nIGRvdWJsZSBfX3ZhbHVlKTsKbG9uZyBkb3VibGUgZHJlbWwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOyAKbG9uZyBkb3VibGUgc2lnbmlmaWNhbmRsKGxvbmcgZG91YmxlIF9feCk7IApsb25nIGRvdWJsZSBjb3B5c2lnbmwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOyAKbG9uZyBkb3VibGUgbmFubChjb25zdCBjaGFyKiBfX3RhZ2IpOyAKaW50IGlzbmFubChsb25nIGRvdWJsZSBfX3ZhbHVlKTsKbG9uZyBkb3VibGUgajBsKGxvbmcgZG91YmxlKTsgCmxvbmcgZG91YmxlIGoxbChsb25nIGRvdWJsZSk7IApsb25nIGRvdWJsZSBqbmwoaW50LCBsb25nIGRvdWJsZSk7CmxvbmcgZG91YmxlIHkwbChsb25nIGRvdWJsZSk7IApsb25nIGRvdWJsZSB5MWwobG9uZyBkb3VibGUpOyAKbG9uZyBkb3VibGUgeW5sKGludCwgbG9uZyBkb3VibGUpOwpsb25nIGRvdWJsZSBlcmZsKGxvbmcgZG91YmxlKTsgCmxvbmcgZG91YmxlIGVyZmNsKGxvbmcgZG91YmxlKTsKbG9uZyBkb3VibGUgbGdhbW1hbChsb25nIGRvdWJsZSk7IApsb25nIGRvdWJsZSB0Z2FtbWFsKGxvbmcgZG91YmxlKTsgCmxvbmcgZG91YmxlIGdhbW1hbChsb25nIGRvdWJsZSk7IApsb25nIGRvdWJsZSBsZ2FtbWFsX3IobG9uZyBkb3VibGUsIGludCogX19zaWduZ2FtcCk7IApsb25nIGRvdWJsZSByaW50bChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgbmV4dGFmdGVybChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7IApsb25nIGRvdWJsZSBuZXh0dG93YXJkbChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7CmxvbmcgZG91YmxlIHJlbWFpbmRlcmwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOyAKbG9uZyBkb3VibGUgc2NhbGJubChsb25nIGRvdWJsZSBfX3gsIGludCBfX24pOyAKaW50IGlsb2dibChsb25nIGRvdWJsZSBfX3gpOyAKbG9uZyBkb3VibGUgc2NhbGJsbmwobG9uZyBkb3VibGUgX194LCBsb25nIGludCBfX24pOyAKbG9uZyBkb3VibGUgbmVhcmJ5aW50bChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSByb3VuZGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgdHJ1bmNsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIHJlbXF1b2wobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3ksIGludCogX19xdW8pOwpsb25nIGludCBscmludGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBsb25nIGludCBsbHJvdW5kbChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSBmZGltbChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7CmxvbmcgZG91YmxlIGZtYXhsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsKbG9uZyBkb3VibGUgZm1pbmwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOwpsb25nIGRvdWJsZSBmbWFsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195LCBsb25nIGRvdWJsZSBfX3opOwpsb25nIGRvdWJsZSBzY2FsYmwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX24pOwoALS0tIGJlZ2luIG9mIHNjb3BlLS0tCgAtLS0gZW5kIG9mIHNjb3BlLS0tCgAgICAgICAgICAgICAgIH0sCgAgICAgICAgICAgICAgICAgICAic3RhcnRDb2x1bW4iOiAlZCwKACAgICAgICAgICAgICAgICAgICJzdGFydExpbmUiOiAlZCwKACAgICAgICAgICAgICAgICAgICJlbmRMaW5lIjogJWQsCgAgICAgICJydWxlSWQiOiIlcyIsCgAgICAgICAgICAgICAgICJkZWNvcmF0ZWROYW1lIjogIiVzIiwKACAgICAgICAgICAgICAgImZ1bGx5UXVhbGlmaWVkTmFtZSI6ICIlcyIsCgAgICAgICJsZXZlbCI6ImVycm9yIiwKACAgICAgImxldmVsIjoid2FybmluZyIsCgAgICAgICJsZXZlbCI6Im5vdGUiLAoAICAgICAgICAgICAgICAgICAidXJpIjogImZpbGU6Ly8vJXMiCgAgICAgICAgICAgICAidGV4dCI6ICIlcyIKACAgICAgICAgICAgICAgImtpbmQiOiAiJXMiCgAjZGVmaW5lIF9fVElNRV9fICIlMDJkOiUwMmQ6JTAyZCIKACNkZWZpbmUgX19EQVRFX18gIiVzICUyZCAlZCIKAGV4cGVjdGVkIEVPRiAKAAojaWZkZWYgTkRFQlVHCiNkZWZpbmUgYXNzZXJ0KC4uLikgKCh2b2lkKTApI2Vsc2UjZGVmaW5lIGFzc2VydCguLi4pIGFzc2VydChfX1ZBX0FSR1NfXykKI2VuZGlmCgoAI2lmbmRlZiBfX09XTkVSU0hJUF9IX18KI2RlZmluZSBfX09XTkVSU0hJUF9IX18KCiNpZmRlZiBfX1NURENfT1dORVJTSElQX18KI2RlZmluZSBvdXQgX091dAojZGVmaW5lIG9wdCBfT3B0CiNkZWZpbmUgb3duZXIgX093bmVyCiNkZWZpbmUgb2JqX293bmVyICBfT2JqX293bmVyCiNkZWZpbmUgdmlldyBfVmlldwojZGVmaW5lIHVuY2hlY2tlZCAidW5jaGVja2VkIgoKI2Vsc2UKI2RlZmluZSBvdXQgCiNkZWZpbmUgb3B0IAojZGVmaW5lIG93bmVyCiNkZWZpbmUgb2JqX293bmVyCiNkZWZpbmUgdmlldwojZGVmaW5lIHN0YXRpY19kZWJ1Zyh4KQojZGVmaW5lIHN0YXRpY19zZXQoeCwgcykKI2RlZmluZSB1bmNoZWNrZWQKI2VuZGlmCgojZW5kaWYKCgAjZGVmaW5lIF9fQ0FLRV9fIDIwMjMxMUwKI2RlZmluZSBfX1NURENfVkVSU0lPTl9fIDIwMjMxMUwKI2RlZmluZSBfX0ZJTEVfXyAiX19GSUxFX18iCiNkZWZpbmUgX19MSU5FX18gMAojZGVmaW5lIF9fQ09VTlRfXyAwCiNkZWZpbmUgX0NPTlNPTEUKI2RlZmluZSBfX1NURENfT1dORVJTSElQX18KCgAKdHlwZWRlZiBsb25nIGludCBwdHJkaWZmX3Q7CnR5cGVkZWYgbG9uZyB1bnNpZ25lZCBpbnQgc2l6ZV90Owp0eXBlZGVmIGludCB3Y2hhcl90Owp0eXBlZGVmIHN0cnVjdCB7CiAgbG9uZyBsb25nIF9fbWF4X2FsaWduX2xsOwogIGxvbmcgZG91YmxlIF9fbWF4X2FsaWduX2xkOwp9IG1heF9hbGlnbl90OwoKdHlwZWRlZiB0eXBlb2YobnVsbHB0cikgbnVsbHB0cl90OwoKACNwcmFnbWEgb25jZQoKaW50KiBfZXJybm8odm9pZCk7CiNkZWZpbmUgZXJybm8gKCpfZXJybm8oKSkKCgojZGVmaW5lIEVQRVJNICAgICAgICAgICAxCiNkZWZpbmUgRU5PRU5UICAgICAgICAgIDIKI2RlZmluZSBFU1JDSCAgICAgICAgICAgMwojZGVmaW5lIEVJTlRSICAgICAgICAgICA0CiNkZWZpbmUgRUlPICAgICAgICAgICAgIDUKI2RlZmluZSBFTlhJTyAgICAgICAgICAgNgojZGVmaW5lIEUyQklHICAgICAgICAgICA3CiNkZWZpbmUgRU5PRVhFQyAgICAgICAgIDgKI2RlZmluZSBFQkFERiAgICAgICAgICAgOQojZGVmaW5lIEVDSElMRCAgICAgICAgICAxMAojZGVmaW5lIEVBR0FJTiAgICAgICAgICAxMQojZGVmaW5lIEVOT01FTSAgICAgICAgICAxMgojZGVmaW5lIEVBQ0NFUyAgICAgICAgICAxMwojZGVmaW5lIEVGQVVMVCAgICAgICAgICAxNAojZGVmaW5lIEVCVVNZICAgICAgICAgICAxNgojZGVmaW5lIEVFWElTVCAgICAgICAgICAxNwojZGVmaW5lIEVYREVWICAgICAgICAgICAxOAojZGVmaW5lIEVOT0RFViAgICAgICAgICAxOQojZGVmaW5lIEVOT1RESVIgICAgICAgICAyMAojZGVmaW5lIEVJU0RJUiAgICAgICAgICAyMQojZGVmaW5lIEVORklMRSAgICAgICAgICAyMwojZGVmaW5lIEVNRklMRSAgICAgICAgICAyNAojZGVmaW5lIEVOT1RUWSAgICAgICAgICAyNQojZGVmaW5lIEVGQklHICAgICAgICAgICAyNwojZGVmaW5lIEVOT1NQQyAgICAgICAgICAyOAojZGVmaW5lIEVTUElQRSAgICAgICAgICAyOQojZGVmaW5lIEVST0ZTICAgICAgICAgICAzMAojZGVmaW5lIEVNTElOSyAgICAgICAgICAzMQojZGVmaW5lIEVQSVBFICAgICAgICAgICAzMgojZGVmaW5lIEVET00gICAgICAgICAgICAzMwojZGVmaW5lIEVERUFETEsgICAgICAgICAzNgojZGVmaW5lIEVOQU1FVE9PTE9ORyAgICAzOAojZGVmaW5lIEVOT0xDSyAgICAgICAgICAzOQojZGVmaW5lIEVOT1NZUyAgICAgICAgICA0MAojZGVmaW5lIEVOT1RFTVBUWSAgICAgICA0MQoKCi8vIFN1cHBvcnQgRURFQURMT0NLIGZvciBjb21wYXRpYmlsaXR5IHdpdGggb2xkZXIgTWljcm9zb2Z0IEMgdmVyc2lvbnMKI2RlZmluZSBFREVBRExPQ0sgICAgICAgRURFQURMSwoKI2RlZmluZSBFQUREUklOVVNFICAgICAgMTAwCiNkZWZpbmUgRUFERFJOT1RBVkFJTCAgIDEwMQojZGVmaW5lIEVBRk5PU1VQUE9SVCAgICAxMDIKI2RlZmluZSBFQUxSRUFEWSAgICAgICAgMTAzCiNkZWZpbmUgRUJBRE1TRyAgICAgICAgIDEwNAojZGVmaW5lIEVDQU5DRUxFRCAgICAgICAxMDUKI2RlZmluZSBFQ09OTkFCT1JURUQgICAgMTA2CiNkZWZpbmUgRUNPTk5SRUZVU0VEICAgIDEwNwojZGVmaW5lIEVDT05OUkVTRVQgICAgICAxMDgKI2RlZmluZSBFREVTVEFERFJSRVEgICAgMTA5CiNkZWZpbmUgRUhPU1RVTlJFQUNIICAgIDExMAojZGVmaW5lIEVJRFJNICAgICAgICAgICAxMTEKI2RlZmluZSBFSU5QUk9HUkVTUyAgICAgMTEyCiNkZWZpbmUgRUlTQ09OTiAgICAgICAgIDExMwojZGVmaW5lIEVMT09QICAgICAgICAgICAxMTQKI2RlZmluZSBFTVNHU0laRSAgICAgICAgMTE1CiNkZWZpbmUgRU5FVERPV04gICAgICAgIDExNgojZGVmaW5lIEVORVRSRVNFVCAgICAgICAxMTcKI2RlZmluZSBFTkVUVU5SRUFDSCAgICAgMTE4CiNkZWZpbmUgRU5PQlVGUyAgICAgICAgIDExOQojZGVmaW5lIEVOT0RBVEEgICAgICAgICAxMjAKI2RlZmluZSBFTk9MSU5LICAgICAgICAgMTIxCiNkZWZpbmUgRU5PTVNHICAgICAgICAgIDEyMgojZGVmaW5lIEVOT1BST1RPT1BUICAgICAxMjMKI2RlZmluZSBFTk9TUiAgICAgICAgICAgMTI0CiNkZWZpbmUgRU5PU1RSICAgICAgICAgIDEyNQojZGVmaW5lIEVOT1RDT05OICAgICAgICAxMjYKI2RlZmluZSBFTk9UUkVDT1ZFUkFCTEUgMTI3CiNkZWZpbmUgRU5PVFNPQ0sgICAgICAgIDEyOAojZGVmaW5lIEVOT1RTVVAgICAgICAgICAxMjkKI2RlZmluZSBFT1BOT1RTVVBQICAgICAgMTMwCiNkZWZpbmUgRU9USEVSICAgICAgICAgIDEzMQojZGVmaW5lIEVPVkVSRkxPVyAgICAgICAxMzIKI2RlZmluZSBFT1dORVJERUFEICAgICAgMTMzCiNkZWZpbmUgRVBST1RPICAgICAgICAgIDEzNAojZGVmaW5lIEVQUk9UT05PU1VQUE9SVCAxMzUKI2RlZmluZSBFUFJPVE9UWVBFICAgICAgMTM2CiNkZWZpbmUgRVRJTUUgICAgICAgICAgIDEzNwojZGVmaW5lIEVUSU1FRE9VVCAgICAgICAxMzgKI2RlZmluZSBFVFhUQlNZICAgICAgICAgMTM5CiNkZWZpbmUgRVdPVUxEQkxPQ0sgICAgIDE0MAoKAAONAQAAAAAAAAAAANF0ngBXnb0qgHBSD///PicKAAAAZAAAAOgDAAAQJwAAoIYBAEBCDwCAlpgAAOH1BRgAAAA1AAAAcQAAAGv////O+///kr///wAAAAAAAAAAGQAKABkZGQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAAZABEKGRkZAwoHAAEACQsYAAAJBgsAAAsABhkAAAAZGRkAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAGQAKDRkZGQANAAACAAkOAAAACQAOAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAABMAAAAAEwAAAAAJDAAAAAAADAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAPAAAABA8AAAAACRAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAEQAAAAARAAAAAAkSAAAAAAASAAASAAAaAAAAGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABoAAAAaGhoAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAXAAAAABcAAAAACRQAAAAAABQAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgAAAAAAAAAAAAAAFQAAAAAVAAAAAAkWAAAAAAAWAAAWAAAwMTIzNDU2Nzg5QUJDREVG"); + base64DecodeToExistingUint8Array(bufferView, 102208, "SmFuAEZlYgBNYXIAQXByAE1heQBKdW4ASnVsAEF1ZwBTZXAAT2N0AE5vdgBEZWMARYEBAJxXAQAPMwEAY4MBAIljAQA3hAEAhTkBAOOAAQACAAAAYxwBAAQAAAD/HgEACAAAAGAUAQAQAAAAHRUBACAAAAD1BgEAQAAAALUMAQCAAAAA8goBAAABAACkDAEAAAIAANAIAQAABAAAtRcBAAAIAAAcHAEAAIAAAGIHAQAAAAIAFx4BAAAAEAC7DwEABQAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAQAAAC4kQEAAAQAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAP////8KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJABANCXAQA="); + base64DecodeToExistingUint8Array(bufferView, 102560, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="); } var scratchBuffer = new ArrayBuffer(16); @@ -470,8 +470,8 @@ function asmFunc(imports) { // EMSCRIPTEN_START_FUNCS ; function $0() { - $840(); - $752(); + $841(); + $753(); } function $1($0_1) { @@ -526,11 +526,11 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 1055 | 0, 72080 | 0); + fimport$0(76208 | 0, 74090 | 0, 1032 | 0, 72153 | 0); wasm2js_trap(); } - $817(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -786,7 +786,7 @@ function asmFunc(imports) { if (!((HEAPU8[($4_1 + 43 | 0) >> 0] | 0) & 1 | 0)) { break label$1 } - $13($4_1 + 24 | 0 | 0, 86717 | 0, 0 | 0) | 0; + $13($4_1 + 24 | 0 | 0, 87274 | 0, 0 | 0) | 0; } HEAP8[($4_1 + 23 | 0) >> 0] = 0; HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[(HEAP32[($4_1 + 44 | 0) >> 2] | 0) >> 2] | 0; @@ -807,7 +807,7 @@ function asmFunc(imports) { if (!((HEAPU8[($4_1 + 23 | 0) >> 0] | 0) & 1 | 0)) { break label$5 } - $13($4_1 + 24 | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13($4_1 + 24 | 0 | 0, 87560 | 0, 0 | 0) | 0; } HEAP32[($4_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; label$6 : { @@ -821,12 +821,12 @@ function asmFunc(imports) { if (!((((HEAPU8[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 0] | 0) << $54_1 | 0) >> $54_1 | 0 | 0) == (34 | 0) & 1 | 0)) { break label$9 } - $13($4_1 + 24 | 0 | 0, 86716 | 0, 0 | 0) | 0; + $13($4_1 + 24 | 0 | 0, 87273 | 0, 0 | 0) | 0; break label$8; } $69_1 = 24; HEAP32[$4_1 >> 2] = ((HEAPU8[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 0] | 0) << $69_1 | 0) >> $69_1 | 0; - $13($4_1 + 24 | 0 | 0, 74043 | 0, $4_1 | 0) | 0; + $13($4_1 + 24 | 0 | 0, 74101 | 0, $4_1 | 0) | 0; } HEAP32[($4_1 + 12 | 0) >> 2] = (HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 1 | 0; continue label$7; @@ -846,7 +846,7 @@ function asmFunc(imports) { if (!((HEAPU8[($4_1 + 43 | 0) >> 0] | 0) & 1 | 0)) { break label$11 } - $13($4_1 + 24 | 0 | 0, 86717 | 0, 0 | 0) | 0; + $13($4_1 + 24 | 0 | 0, 87274 | 0, 0 | 0) | 0; } HEAP32[($4_1 + 8 | 0) >> 2] = HEAP32[($4_1 + 24 | 0) >> 2] | 0; HEAP32[($4_1 + 24 | 0) >> 2] = 0; @@ -878,7 +878,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $817(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); global$0 = $3_1 + 16 | 0; return; } @@ -897,12 +897,12 @@ function asmFunc(imports) { if ((HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(84783 | 0, 74032 | 0, 8478 | 0, 71363 | 0); + fimport$0(85340 | 0, 74090 | 0, 8508 | 0, 71436 | 0); wasm2js_trap(); } HEAP32[($5_1 + 12 | 0) >> 2] = 0; HEAP32[($5_1 + 8 | 0) >> 2] = HEAP32[($5_1 + 16 | 0) >> 2] | 0; - HEAP32[($5_1 + 12 | 0) >> 2] = $807((HEAP32[(HEAP32[($5_1 + 24 | 0) >> 2] | 0) >> 2] | 0) + (HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) | 0 | 0, (HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) - (HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) | 0 | 0, HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($5_1 + 12 | 0) >> 2] = $808((HEAP32[(HEAP32[($5_1 + 24 | 0) >> 2] | 0) >> 2] | 0) + (HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) | 0 | 0, (HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) - (HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) | 0 | 0, HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0) | 0; label$2 : { label$3 : { if (!((HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0) < (0 | 0) & 1 | 0)) { @@ -918,7 +918,7 @@ function asmFunc(imports) { HEAP32[($5_1 + 28 | 0) >> 2] = -1; break label$2; } - HEAP32[($5_1 + 12 | 0) >> 2] = $809((HEAP32[(HEAP32[($5_1 + 24 | 0) >> 2] | 0) >> 2] | 0) + (HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) | 0 | 0, HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($5_1 + 12 | 0) >> 2] = $810((HEAP32[(HEAP32[($5_1 + 24 | 0) >> 2] | 0) >> 2] | 0) + (HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) | 0 | 0, HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0) | 0; label$5 : { if (!((HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$5 @@ -959,7 +959,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$5 } - fimport$0(75852 | 0, 74032 | 0, 1140 | 0, 68646 | 0); + fimport$0(76254 | 0, 74090 | 0, 1117 | 0, 68719 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 12 | 0) >> 2] | 0) >> 2] | 0; @@ -987,7 +987,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$9 } - fimport$0(75852 | 0, 74032 | 0, 1157 | 0, 68646 | 0); + fimport$0(76254 | 0, 74090 | 0, 1134 | 0, 68719 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[$5_1 >> 2] | 0; @@ -1014,14 +1014,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(75724 | 0, 74032 | 0, 1173 | 0, 73651 | 0); + fimport$0(76126 | 0, 74090 | 0, 1150 | 0, 73709 | 0); wasm2js_trap(); } label$2 : { if ((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75705 | 0, 74032 | 0, 1174 | 0, 73651 | 0); + fimport$0(76107 | 0, 74090 | 0, 1151 | 0, 73709 | 0); wasm2js_trap(); } label$3 : { @@ -1043,7 +1043,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$5 } - fimport$0(75859 | 0, 74032 | 0, 1191 | 0, 73651 | 0); + fimport$0(76261 | 0, 74090 | 0, 1168 | 0, 73709 | 0); wasm2js_trap(); } $67_1 = HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; @@ -1088,7 +1088,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 40 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 40 | 0) | 0; label$1 : { if (!((HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 @@ -1134,7 +1134,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $14_1 + $25_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $115_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - $30_1 = $763(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $30_1 = $764(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $30_1; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 32 | 0) >> 2] = 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 36 | 0) >> 2] = 0; @@ -1172,7 +1172,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$5 } - fimport$0(75909 | 0, 74032 | 0, 1232 | 0, 71298 | 0); + fimport$0(76311 | 0, 74090 | 0, 1209 | 0, 71371 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] | 0; @@ -1213,7 +1213,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$5 } - fimport$0(75884 | 0, 74032 | 0, 1254 | 0, 66182 | 0); + fimport$0(76286 | 0, 74090 | 0, 1231 | 0, 66182 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0; @@ -1290,7 +1290,7 @@ function asmFunc(imports) { break label$1 } } - fimport$0(85746 | 0, 74032 | 0, 1308 | 0, 65675 | 0); + fimport$0(86303 | 0, 74090 | 0, 1285 | 0, 65675 | 0); wasm2js_trap(); } $47_1 = (HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0; @@ -1300,9 +1300,8 @@ function asmFunc(imports) { function $26($0_1) { $0_1 = $0_1 | 0; - var $3_1 = 0, $4_1 = 0, $385_1 = 0; + var $3_1 = 0, $4_1 = 0; $3_1 = global$0 - 16 | 0; - global$0 = $3_1; HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; $4_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; label$1 : { @@ -1433,770 +1432,914 @@ function asmFunc(imports) { label$126 : { label$127 : { label$128 : { - if (!$4_1) { - break label$128 - } - if (($4_1 | 0) == (10 | 0)) { - break label$127 - } - if (($4_1 | 0) == (32 | 0)) { - break label$126 - } - if (($4_1 | 0) == (33 | 0)) { - break label$125 - } - if (($4_1 | 0) == (34 | 0)) { - break label$124 - } - if (($4_1 | 0) == (35 | 0)) { - break label$123 - } - if (($4_1 | 0) == (36 | 0)) { - break label$122 - } - if (($4_1 | 0) == (37 | 0)) { - break label$121 - } - if (($4_1 | 0) == (38 | 0)) { - break label$120 - } - if (($4_1 | 0) == (39 | 0)) { - break label$119 - } - if (($4_1 | 0) == (40 | 0)) { - break label$118 - } - if (($4_1 | 0) == (41 | 0)) { - break label$117 - } - if (($4_1 | 0) == (42 | 0)) { - break label$116 - } - if (($4_1 | 0) == (43 | 0)) { - break label$115 - } - if (($4_1 | 0) == (44 | 0)) { - break label$114 - } - if (($4_1 | 0) == (45 | 0)) { - break label$113 - } - if (($4_1 | 0) == (46 | 0)) { - break label$112 - } - if (($4_1 | 0) == (47 | 0)) { - break label$111 - } - if (($4_1 | 0) == (58 | 0)) { - break label$110 - } - if (($4_1 | 0) == (59 | 0)) { - break label$109 - } - if (($4_1 | 0) == (60 | 0)) { - break label$108 - } - if (($4_1 | 0) == (61 | 0)) { - break label$107 - } - if (($4_1 | 0) == (62 | 0)) { - break label$106 - } - if (($4_1 | 0) == (63 | 0)) { - break label$105 - } - if (($4_1 | 0) == (64 | 0)) { - break label$104 - } - if (($4_1 | 0) == (91 | 0)) { - break label$103 - } - if (($4_1 | 0) == (93 | 0)) { - break label$101 - } - if (($4_1 | 0) == (94 | 0)) { - break label$100 - } - if (($4_1 | 0) == (95 | 0)) { - break label$99 - } - if (($4_1 | 0) == (96 | 0)) { - break label$98 - } - if (($4_1 | 0) == (123 | 0)) { - break label$97 - } - if (($4_1 | 0) == (124 | 0)) { - break label$96 - } - if (($4_1 | 0) == (125 | 0)) { - break label$95 - } - if (($4_1 | 0) == (126 | 0)) { - break label$94 - } - if (($4_1 | 0) == (127 | 0)) { - break label$93 - } - if (($4_1 | 0) == (129 | 0)) { - break label$92 - } - if (($4_1 | 0) == (131 | 0)) { - break label$91 - } - if (($4_1 | 0) == (132 | 0)) { - break label$90 - } - if (($4_1 | 0) == (133 | 0)) { - break label$89 - } - if (($4_1 | 0) == (134 | 0)) { - break label$88 - } - if (($4_1 | 0) == (135 | 0)) { - break label$87 - } - if (($4_1 | 0) == (136 | 0)) { - break label$86 - } - if (($4_1 | 0) == (137 | 0)) { - break label$85 - } - if (($4_1 | 0) == (138 | 0)) { - break label$84 - } - if (($4_1 | 0) == (139 | 0)) { - break label$83 - } - if (($4_1 | 0) == (140 | 0)) { - break label$82 - } - if (($4_1 | 0) == (141 | 0)) { - break label$81 - } - if (($4_1 | 0) == (142 | 0)) { - break label$80 - } - if (($4_1 | 0) == (8995 | 0)) { - break label$72 - } - if (($4_1 | 0) == (8996 | 0)) { - break label$71 - } - if (($4_1 | 0) == (8997 | 0)) { - break label$70 - } - if (($4_1 | 0) == (8998 | 0)) { - break label$69 - } - if (($4_1 | 0) == (8999 | 0)) { - break label$68 - } - if (($4_1 | 0) == (9e3 | 0)) { - break label$67 - } - if (($4_1 | 0) == (9001 | 0)) { - break label$66 - } - if (($4_1 | 0) == (9002 | 0)) { - break label$65 - } - if (($4_1 | 0) == (9003 | 0)) { - break label$64 - } - if (($4_1 | 0) == (9004 | 0)) { - break label$63 - } - if (($4_1 | 0) == (9005 | 0)) { - break label$62 - } - if (($4_1 | 0) == (9006 | 0)) { - break label$6 - } - if (($4_1 | 0) == (9007 | 0)) { - break label$61 - } - if (($4_1 | 0) == (9008 | 0)) { - break label$60 - } - if (($4_1 | 0) == (9009 | 0)) { - break label$9 - } - if (($4_1 | 0) == (9010 | 0)) { - break label$59 - } - if (($4_1 | 0) == (9011 | 0)) { - break label$58 + label$129 : { + label$130 : { + label$131 : { + label$132 : { + label$133 : { + label$134 : { + label$135 : { + label$136 : { + label$137 : { + label$138 : { + label$139 : { + label$140 : { + label$141 : { + label$142 : { + label$143 : { + label$144 : { + label$145 : { + label$146 : { + label$147 : { + label$148 : { + label$149 : { + if (!$4_1) { + break label$149 + } + if (($4_1 | 0) == (10 | 0)) { + break label$148 + } + if (($4_1 | 0) == (32 | 0)) { + break label$147 + } + if (($4_1 | 0) == (33 | 0)) { + break label$146 + } + if (($4_1 | 0) == (34 | 0)) { + break label$145 + } + if (($4_1 | 0) == (35 | 0)) { + break label$144 + } + if (($4_1 | 0) == (36 | 0)) { + break label$143 + } + if (($4_1 | 0) == (37 | 0)) { + break label$142 + } + if (($4_1 | 0) == (38 | 0)) { + break label$141 + } + if (($4_1 | 0) == (39 | 0)) { + break label$140 + } + if (($4_1 | 0) == (40 | 0)) { + break label$139 + } + if (($4_1 | 0) == (41 | 0)) { + break label$138 + } + if (($4_1 | 0) == (42 | 0)) { + break label$137 + } + if (($4_1 | 0) == (43 | 0)) { + break label$136 + } + if (($4_1 | 0) == (44 | 0)) { + break label$135 + } + if (($4_1 | 0) == (45 | 0)) { + break label$134 + } + if (($4_1 | 0) == (46 | 0)) { + break label$133 + } + if (($4_1 | 0) == (47 | 0)) { + break label$132 + } + if (($4_1 | 0) == (58 | 0)) { + break label$131 + } + if (($4_1 | 0) == (59 | 0)) { + break label$130 + } + if (($4_1 | 0) == (60 | 0)) { + break label$129 + } + if (($4_1 | 0) == (61 | 0)) { + break label$128 + } + if (($4_1 | 0) == (62 | 0)) { + break label$127 + } + if (($4_1 | 0) == (63 | 0)) { + break label$126 + } + if (($4_1 | 0) == (64 | 0)) { + break label$125 + } + if (($4_1 | 0) == (91 | 0)) { + break label$124 + } + if (($4_1 | 0) == (93 | 0)) { + break label$122 + } + if (($4_1 | 0) == (94 | 0)) { + break label$121 + } + if (($4_1 | 0) == (95 | 0)) { + break label$120 + } + if (($4_1 | 0) == (96 | 0)) { + break label$119 + } + if (($4_1 | 0) == (123 | 0)) { + break label$118 + } + if (($4_1 | 0) == (124 | 0)) { + break label$117 + } + if (($4_1 | 0) == (125 | 0)) { + break label$116 + } + if (($4_1 | 0) == (126 | 0)) { + break label$115 + } + if (($4_1 | 0) == (127 | 0)) { + break label$114 + } + if (($4_1 | 0) == (128 | 0)) { + break label$113 + } + if (($4_1 | 0) == (129 | 0)) { + break label$112 + } + if (($4_1 | 0) == (130 | 0)) { + break label$111 + } + if (($4_1 | 0) == (131 | 0)) { + break label$110 + } + if (($4_1 | 0) == (132 | 0)) { + break label$109 + } + if (($4_1 | 0) == (133 | 0)) { + break label$108 + } + if (($4_1 | 0) == (134 | 0)) { + break label$107 + } + if (($4_1 | 0) == (135 | 0)) { + break label$106 + } + if (($4_1 | 0) == (136 | 0)) { + break label$105 + } + if (($4_1 | 0) == (137 | 0)) { + break label$104 + } + if (($4_1 | 0) == (138 | 0)) { + break label$103 + } + if (($4_1 | 0) == (139 | 0)) { + break label$102 + } + if (($4_1 | 0) == (140 | 0)) { + break label$101 + } + if (($4_1 | 0) == (141 | 0)) { + break label$100 + } + if (($4_1 | 0) == (142 | 0)) { + break label$99 + } + if (($4_1 | 0) == (8995 | 0)) { + break label$91 + } + if (($4_1 | 0) == (8996 | 0)) { + break label$90 + } + if (($4_1 | 0) == (8997 | 0)) { + break label$89 + } + if (($4_1 | 0) == (8998 | 0)) { + break label$88 + } + if (($4_1 | 0) == (8999 | 0)) { + break label$87 + } + if (($4_1 | 0) == (9e3 | 0)) { + break label$86 + } + if (($4_1 | 0) == (9001 | 0)) { + break label$85 + } + if (($4_1 | 0) == (9002 | 0)) { + break label$84 + } + if (($4_1 | 0) == (9003 | 0)) { + break label$83 + } + if (($4_1 | 0) == (9004 | 0)) { + break label$82 + } + if (($4_1 | 0) == (9005 | 0)) { + break label$81 + } + if (($4_1 | 0) == (9006 | 0)) { + break label$80 + } + if (($4_1 | 0) == (9007 | 0)) { + break label$79 + } + if (($4_1 | 0) == (9008 | 0)) { + break label$78 + } + if (($4_1 | 0) == (9009 | 0)) { + break label$77 + } + if (($4_1 | 0) == (9010 | 0)) { + break label$76 + } + if (($4_1 | 0) == (9011 | 0)) { + break label$75 + } + if (($4_1 | 0) == (9012 | 0)) { + break label$74 + } + if (($4_1 | 0) == (9013 | 0)) { + break label$73 + } + if (($4_1 | 0) == (9014 | 0)) { + break label$72 + } + if (($4_1 | 0) == (9015 | 0)) { + break label$71 + } + if (($4_1 | 0) == (9016 | 0)) { + break label$70 + } + if (($4_1 | 0) == (9017 | 0)) { + break label$69 + } + if (($4_1 | 0) == (9018 | 0)) { + break label$68 + } + if (($4_1 | 0) == (9019 | 0)) { + break label$67 + } + if (($4_1 | 0) == (9020 | 0)) { + break label$66 + } + if (($4_1 | 0) == (9021 | 0)) { + break label$65 + } + if (($4_1 | 0) == (9022 | 0)) { + break label$64 + } + if (($4_1 | 0) == (9023 | 0)) { + break label$63 + } + if (($4_1 | 0) == (9024 | 0)) { + break label$62 + } + if (($4_1 | 0) == (9025 | 0)) { + break label$61 + } + if (($4_1 | 0) == (9026 | 0)) { + break label$60 + } + if (($4_1 | 0) == (9027 | 0)) { + break label$59 + } + if (($4_1 | 0) == (9028 | 0)) { + break label$58 + } + if (($4_1 | 0) == (9029 | 0)) { + break label$57 + } + if (($4_1 | 0) == (9030 | 0)) { + break label$56 + } + if (($4_1 | 0) == (9031 | 0)) { + break label$55 + } + if (($4_1 | 0) == (9032 | 0)) { + break label$54 + } + if (($4_1 | 0) == (9033 | 0)) { + break label$53 + } + if (($4_1 | 0) == (9034 | 0)) { + break label$52 + } + if (($4_1 | 0) == (9035 | 0)) { + break label$51 + } + if (($4_1 | 0) == (9036 | 0)) { + break label$50 + } + if (($4_1 | 0) == (9037 | 0)) { + break label$49 + } + if (($4_1 | 0) == (9038 | 0)) { + break label$48 + } + if (($4_1 | 0) == (9039 | 0)) { + break label$47 + } + if (($4_1 | 0) == (9040 | 0)) { + break label$46 + } + if (($4_1 | 0) == (9041 | 0)) { + break label$45 + } + if (($4_1 | 0) == (9042 | 0)) { + break label$44 + } + if (($4_1 | 0) == (9043 | 0)) { + break label$43 + } + if (($4_1 | 0) == (9044 | 0)) { + break label$42 + } + if (($4_1 | 0) == (9045 | 0)) { + break label$41 + } + if (($4_1 | 0) == (9046 | 0)) { + break label$40 + } + if (($4_1 | 0) == (9047 | 0)) { + break label$39 + } + if (($4_1 | 0) == (9048 | 0)) { + break label$38 + } + if (($4_1 | 0) == (9049 | 0)) { + break label$37 + } + if (($4_1 | 0) == (9050 | 0)) { + break label$36 + } + if (($4_1 | 0) == (9051 | 0)) { + break label$35 + } + if (($4_1 | 0) == (9052 | 0)) { + break label$34 + } + if (($4_1 | 0) == (9053 | 0)) { + break label$33 + } + if (($4_1 | 0) == (9054 | 0)) { + break label$32 + } + if (($4_1 | 0) == (9055 | 0)) { + break label$31 + } + if (($4_1 | 0) == (9056 | 0)) { + break label$30 + } + if (($4_1 | 0) == (9057 | 0)) { + break label$29 + } + if (($4_1 | 0) == (9058 | 0)) { + break label$28 + } + if (($4_1 | 0) == (9059 | 0)) { + break label$27 + } + if (($4_1 | 0) == (9060 | 0)) { + break label$26 + } + if (($4_1 | 0) == (9061 | 0)) { + break label$25 + } + if (($4_1 | 0) == (9062 | 0)) { + break label$24 + } + if (($4_1 | 0) == (9063 | 0)) { + break label$23 + } + if (($4_1 | 0) == (9064 | 0)) { + break label$22 + } + if (($4_1 | 0) == (9065 | 0)) { + break label$21 + } + if (($4_1 | 0) == (9066 | 0)) { + break label$20 + } + if (($4_1 | 0) == (9067 | 0)) { + break label$19 + } + if (($4_1 | 0) == (9068 | 0)) { + break label$18 + } + if (($4_1 | 0) == (9069 | 0)) { + break label$17 + } + if (($4_1 | 0) == (9070 | 0)) { + break label$16 + } + if (($4_1 | 0) == (9071 | 0)) { + break label$15 + } + if (($4_1 | 0) == (9072 | 0)) { + break label$14 + } + if (($4_1 | 0) == (9073 | 0)) { + break label$13 + } + if (($4_1 | 0) == (9074 | 0)) { + break label$12 + } + if (($4_1 | 0) == (9075 | 0)) { + break label$11 + } + if (($4_1 | 0) == (9076 | 0)) { + break label$10 + } + if (($4_1 | 0) == (9077 | 0)) { + break label$9 + } + if (($4_1 | 0) == (9078 | 0)) { + break label$8 + } + if (($4_1 | 0) == (9079 | 0)) { + break label$7 + } + if (($4_1 | 0) == (9080 | 0)) { + break label$6 + } + if (($4_1 | 0) == (9081 | 0)) { + break label$5 + } + if (($4_1 | 0) == (9082 | 0)) { + break label$4 + } + if (($4_1 | 0) == (9083 | 0)) { + break label$3 + } + if (($4_1 | 0) == (9766 | 0)) { + break label$92 + } + if (($4_1 | 0) == (11051 | 0)) { + break label$98 + } + if (($4_1 | 0) == (11565 | 0)) { + break label$97 + } + if (($4_1 | 0) == (11582 | 0)) { + break label$96 + } + if (($4_1 | 0) == (12079 | 0)) { + break label$123 + } + if (($4_1 | 0) == (15420 | 0)) { + break label$95 + } + if (($4_1 | 0) == (15934 | 0)) { + break label$94 + } + if (($4_1 | 0) == (31868 | 0)) { + break label$93 + } + break label$2; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 78021; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 78080; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 78271; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 77417; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 77399; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75929; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75944; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75885; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 78313; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 78248; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75198; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75177; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 77370; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75901; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 78482; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75095; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75633; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75137; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75823; + break label$1; + } + HEAP32[($3_1 + 12 | 0) >> 2] = 75832; + break label$1; } - if (($4_1 | 0) == (9012 | 0)) { - break label$57 - } - if (($4_1 | 0) == (9013 | 0)) { - break label$56 - } - if (($4_1 | 0) == (9014 | 0)) { - break label$55 - } - if (($4_1 | 0) == (9015 | 0)) { - break label$54 - } - if (($4_1 | 0) == (9016 | 0)) { - break label$53 - } - if (($4_1 | 0) == (9017 | 0)) { - break label$52 - } - if (($4_1 | 0) == (9018 | 0)) { - break label$51 - } - if (($4_1 | 0) == (9019 | 0)) { - break label$50 - } - if (($4_1 | 0) == (9020 | 0)) { - break label$49 - } - if (($4_1 | 0) == (9021 | 0)) { - break label$48 - } - if (($4_1 | 0) == (9022 | 0)) { - break label$47 - } - if (($4_1 | 0) == (9023 | 0)) { - break label$46 - } - if (($4_1 | 0) == (9024 | 0)) { - break label$45 - } - if (($4_1 | 0) == (9025 | 0)) { - break label$44 - } - if (($4_1 | 0) == (9026 | 0)) { - break label$43 - } - if (($4_1 | 0) == (9027 | 0)) { - break label$42 - } - if (($4_1 | 0) == (9028 | 0)) { - break label$41 - } - if (($4_1 | 0) == (9029 | 0)) { - break label$40 - } - if (($4_1 | 0) == (9030 | 0)) { - break label$39 - } - if (($4_1 | 0) == (9031 | 0)) { - break label$35 - } - if (($4_1 | 0) == (9032 | 0)) { - break label$34 - } - if (($4_1 | 0) == (9033 | 0)) { - break label$33 - } - if (($4_1 | 0) == (9034 | 0)) { - break label$32 - } - if (($4_1 | 0) == (9035 | 0)) { - break label$5 - } - if (($4_1 | 0) == (9036 | 0)) { - break label$4 - } - if (($4_1 | 0) == (9037 | 0)) { - break label$31 - } - if (($4_1 | 0) == (9038 | 0)) { - break label$30 - } - if (($4_1 | 0) == (9039 | 0)) { - break label$29 - } - if (($4_1 | 0) == (9040 | 0)) { - break label$28 - } - if (($4_1 | 0) == (9041 | 0)) { - break label$27 - } - if (($4_1 | 0) == (9042 | 0)) { - break label$26 - } - if (($4_1 | 0) == (9043 | 0)) { - break label$25 - } - if (($4_1 | 0) == (9044 | 0)) { - break label$24 - } - if (($4_1 | 0) == (9045 | 0)) { - break label$7 - } - if (($4_1 | 0) == (9046 | 0)) { - break label$23 - } - if (($4_1 | 0) == (9047 | 0)) { - break label$22 - } - if (($4_1 | 0) == (9048 | 0)) { - break label$21 - } - if (($4_1 | 0) == (9049 | 0)) { - break label$20 - } - if (($4_1 | 0) == (9050 | 0)) { - break label$19 - } - if (($4_1 | 0) == (9051 | 0)) { - break label$18 - } - if (($4_1 | 0) == (9052 | 0)) { - break label$17 - } - if (($4_1 | 0) == (9053 | 0)) { - break label$16 - } - if (($4_1 | 0) == (9054 | 0)) { - break label$15 - } - if (($4_1 | 0) == (9056 | 0)) { - break label$14 - } - if (($4_1 | 0) == (9057 | 0)) { - break label$13 - } - if (($4_1 | 0) == (9058 | 0)) { - break label$12 - } - if (($4_1 | 0) == (9059 | 0)) { - break label$11 - } - if (($4_1 | 0) == (9060 | 0)) { - break label$10 - } - if (($4_1 | 0) == (9061 | 0)) { - break label$3 - } - if (($4_1 | 0) == (9062 | 0)) { - break label$8 - } - if (($4_1 | 0) == (9068 | 0)) { - break label$38 - } - if (($4_1 | 0) == (9069 | 0)) { - break label$37 - } - if (($4_1 | 0) == (9070 | 0)) { - break label$36 - } - if (($4_1 | 0) == (9766 | 0)) { - break label$73 - } - if (($4_1 | 0) == (11051 | 0)) { - break label$79 - } - if (($4_1 | 0) == (11565 | 0)) { - break label$78 - } - if (($4_1 | 0) == (11582 | 0)) { - break label$77 - } - if (($4_1 | 0) == (12079 | 0)) { - break label$102 - } - if (($4_1 | 0) == (15420 | 0)) { - break label$76 - } - if (($4_1 | 0) == (15934 | 0)) { - break label$75 - } - if (($4_1 | 0) == (31868 | 0)) { - break label$74 - } - break label$2; + HEAP32[($3_1 + 12 | 0) >> 2] = 75959; + break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77552; + HEAP32[($3_1 + 12 | 0) >> 2] = 75914; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77608; + HEAP32[($3_1 + 12 | 0) >> 2] = 75977; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77778; + HEAP32[($3_1 + 12 | 0) >> 2] = 77382; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 76992; + HEAP32[($3_1 + 12 | 0) >> 2] = 75061; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 76974; + HEAP32[($3_1 + 12 | 0) >> 2] = 75e3; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75527; + HEAP32[($3_1 + 12 | 0) >> 2] = 75148; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75542; + HEAP32[($3_1 + 12 | 0) >> 2] = 74976; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75483; + HEAP32[($3_1 + 12 | 0) >> 2] = 74612; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77811; + HEAP32[($3_1 + 12 | 0) >> 2] = 78029; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77755; + HEAP32[($3_1 + 12 | 0) >> 2] = 74633; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74986; + HEAP32[($3_1 + 12 | 0) >> 2] = 74954; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74965; + HEAP32[($3_1 + 12 | 0) >> 2] = 78063; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 76945; + HEAP32[($3_1 + 12 | 0) >> 2] = 74931; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75499; + HEAP32[($3_1 + 12 | 0) >> 2] = 78262; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77935; + HEAP32[($3_1 + 12 | 0) >> 2] = 78042; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74883; + HEAP32[($3_1 + 12 | 0) >> 2] = 78491; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75254; + HEAP32[($3_1 + 12 | 0) >> 2] = 77327; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74925; + HEAP32[($3_1 + 12 | 0) >> 2] = 74677; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75444; + HEAP32[($3_1 + 12 | 0) >> 2] = 74596; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75453; + HEAP32[($3_1 + 12 | 0) >> 2] = 74585; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75557; + HEAP32[($3_1 + 12 | 0) >> 2] = 75584; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75512; + HEAP32[($3_1 + 12 | 0) >> 2] = 75998; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75575; + HEAP32[($3_1 + 12 | 0) >> 2] = 74721; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 76957; + HEAP32[($3_1 + 12 | 0) >> 2] = 74694; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74849; + HEAP32[($3_1 + 12 | 0) >> 2] = 74750; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74788; + HEAP32[($3_1 + 12 | 0) >> 2] = 74649; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74936; + HEAP32[($3_1 + 12 | 0) >> 2] = 74783; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74764; + HEAP32[($3_1 + 12 | 0) >> 2] = 74821; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74417; + HEAP32[($3_1 + 12 | 0) >> 2] = 75512; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77557; + HEAP32[($3_1 + 12 | 0) >> 2] = 75167; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74438; + HEAP32[($3_1 + 12 | 0) >> 2] = 75125; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74742; + HEAP32[($3_1 + 12 | 0) >> 2] = 75111; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77591; + HEAP32[($3_1 + 12 | 0) >> 2] = 74349; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74719; + HEAP32[($3_1 + 12 | 0) >> 2] = 74896; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77769; + HEAP32[($3_1 + 12 | 0) >> 2] = 74882; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77570; + HEAP32[($3_1 + 12 | 0) >> 2] = 75298; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 76902; + HEAP32[($3_1 + 12 | 0) >> 2] = 78289; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74401; + HEAP32[($3_1 + 12 | 0) >> 2] = 75321; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74391; + HEAP32[($3_1 + 12 | 0) >> 2] = 75553; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75226; + HEAP32[($3_1 + 12 | 0) >> 2] = 75678; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75596; + HEAP32[($3_1 + 12 | 0) >> 2] = 78208; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74509; + HEAP32[($3_1 + 12 | 0) >> 2] = 75646; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74482; + HEAP32[($3_1 + 12 | 0) >> 2] = 77437; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74538; + HEAP32[($3_1 + 12 | 0) >> 2] = 78005; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74454; + HEAP32[($3_1 + 12 | 0) >> 2] = 75277; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74571; + HEAP32[($3_1 + 12 | 0) >> 2] = 75617; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74609; + HEAP32[($3_1 + 12 | 0) >> 2] = 74428; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75154; + HEAP32[($3_1 + 12 | 0) >> 2] = 77907; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74955; + HEAP32[($3_1 + 12 | 0) >> 2] = 77516; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74913; + HEAP32[($3_1 + 12 | 0) >> 2] = 74863; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74899; + HEAP32[($3_1 + 12 | 0) >> 2] = 75752; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74271; + HEAP32[($3_1 + 12 | 0) >> 2] = 75567; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74684; + HEAP32[($3_1 + 12 | 0) >> 2] = 78225; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74670; + HEAP32[($3_1 + 12 | 0) >> 2] = 77972; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75066; + HEAP32[($3_1 + 12 | 0) >> 2] = 76021; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77787; + HEAP32[($3_1 + 12 | 0) >> 2] = 75805; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75089; + HEAP32[($3_1 + 12 | 0) >> 2] = 75078; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75195; + HEAP32[($3_1 + 12 | 0) >> 2] = 75395; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75299; + HEAP32[($3_1 + 12 | 0) >> 2] = 75662; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77715; + HEAP32[($3_1 + 12 | 0) >> 2] = 77677; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75267; + HEAP32[($3_1 + 12 | 0) >> 2] = 78091; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77012; + HEAP32[($3_1 + 12 | 0) >> 2] = 74522; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77536; + HEAP32[($3_1 + 12 | 0) >> 2] = 77557; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75045; + HEAP32[($3_1 + 12 | 0) >> 2] = 84979; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75238; + HEAP32[($3_1 + 12 | 0) >> 2] = 85039; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74297; + HEAP32[($3_1 + 12 | 0) >> 2] = 85135; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77459; + HEAP32[($3_1 + 12 | 0) >> 2] = 85076; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74651; + HEAP32[($3_1 + 12 | 0) >> 2] = 75410; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75373; + HEAP32[($3_1 + 12 | 0) >> 2] = 75041; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77732; + HEAP32[($3_1 + 12 | 0) >> 2] = 75766; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77503; + HEAP32[($3_1 + 12 | 0) >> 2] = 74445; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75619; + HEAP32[($3_1 + 12 | 0) >> 2] = 78342; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75426; + HEAP32[($3_1 + 12 | 0) >> 2] = 77593; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74866; + HEAP32[($3_1 + 12 | 0) >> 2] = 78425; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75119; + HEAP32[($3_1 + 12 | 0) >> 2] = 75023; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75283; + HEAP32[($3_1 + 12 | 0) >> 2] = 77498; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77252; + HEAP32[($3_1 + 12 | 0) >> 2] = 77820; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77616; + HEAP32[($3_1 + 12 | 0) >> 2] = 74272; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74357; + HEAP32[($3_1 + 12 | 0) >> 2] = 74358; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77132; + HEAP32[($3_1 + 12 | 0) >> 2] = 75868; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 84422; + HEAP32[($3_1 + 12 | 0) >> 2] = 78360; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 84482; + HEAP32[($3_1 + 12 | 0) >> 2] = 78326; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 84578; + HEAP32[($3_1 + 12 | 0) >> 2] = 78127; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 84519; + HEAP32[($3_1 + 12 | 0) >> 2] = 78191; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75134; + HEAP32[($3_1 + 12 | 0) >> 2] = 75218; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74829; + HEAP32[($3_1 + 12 | 0) >> 2] = 77573; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75387; + HEAP32[($3_1 + 12 | 0) >> 2] = 78463; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74314; + HEAP32[($3_1 + 12 | 0) >> 2] = 76037; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77840; + HEAP32[($3_1 + 12 | 0) >> 2] = 76053; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77168; + HEAP32[($3_1 + 12 | 0) >> 2] = 74329; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77108; + HEAP32[($3_1 + 12 | 0) >> 2] = 85008; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77479; + HEAP32[($3_1 + 12 | 0) >> 2] = 85153; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74697; + HEAP32[($3_1 + 12 | 0) >> 2] = 85094; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77878; + HEAP32[($3_1 + 12 | 0) >> 2] = 78443; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74811; + HEAP32[($3_1 + 12 | 0) >> 2] = 74287; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77073; + HEAP32[($3_1 + 12 | 0) >> 2] = 75784; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77395; + HEAP32[($3_1 + 12 | 0) >> 2] = 74480; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75466; + HEAP32[($3_1 + 12 | 0) >> 2] = 74462; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77858; + HEAP32[($3_1 + 12 | 0) >> 2] = 77345; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77824; + HEAP32[($3_1 + 12 | 0) >> 2] = 77611; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77634; + HEAP32[($3_1 + 12 | 0) >> 2] = 77891; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77698; + HEAP32[($3_1 + 12 | 0) >> 2] = 77988; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75006; + HEAP32[($3_1 + 12 | 0) >> 2] = 75258; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77148; + HEAP32[($3_1 + 12 | 0) >> 2] = 77279; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77916; + HEAP32[($3_1 + 12 | 0) >> 2] = 74537; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75651; + HEAP32[($3_1 + 12 | 0) >> 2] = 75452; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74251; + HEAP32[($3_1 + 12 | 0) >> 2] = 74392; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 84451; + HEAP32[($3_1 + 12 | 0) >> 2] = 75490; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 84596; + HEAP32[($3_1 + 12 | 0) >> 2] = 74375; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 84537; + HEAP32[($3_1 + 12 | 0) >> 2] = 74506; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77896; + HEAP32[($3_1 + 12 | 0) >> 2] = 77533; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74229; + HEAP32[($3_1 + 12 | 0) >> 2] = 77948; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75405; + HEAP32[($3_1 + 12 | 0) >> 2] = 74909; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74331; + HEAP32[($3_1 + 12 | 0) >> 2] = 78380; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 76920; + HEAP32[($3_1 + 12 | 0) >> 2] = 77868; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77186; + HEAP32[($3_1 + 12 | 0) >> 2] = 75238; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77443; + HEAP32[($3_1 + 12 | 0) >> 2] = 75430; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77519; + HEAP32[($3_1 + 12 | 0) >> 2] = 77927; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75026; + HEAP32[($3_1 + 12 | 0) >> 2] = 74408; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75209; + HEAP32[($3_1 + 12 | 0) >> 2] = 75470; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74372; + HEAP32[($3_1 + 12 | 0) >> 2] = 74309; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 75635; + HEAP32[($3_1 + 12 | 0) >> 2] = 75845; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 77091; + HEAP32[($3_1 + 12 | 0) >> 2] = 75596; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74214; + HEAP32[($3_1 + 12 | 0) >> 2] = 78400; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 74280; + HEAP32[($3_1 + 12 | 0) >> 2] = 74556; break label$1; } - HEAP32[($3_1 + 12 | 0) >> 2] = 76877; + HEAP32[($3_1 + 12 | 0) >> 2] = 77304; break label$1; } - fimport$0(72213 | 0, 74032 | 0, 6957 | 0, 72591 | 0); - wasm2js_trap(); + HEAP32[($3_1 + 12 | 0) >> 2] = 78109; } - $385_1 = HEAP32[($3_1 + 12 | 0) >> 2] | 0; - global$0 = $3_1 + 16 | 0; - return $385_1 | 0; + return HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0; } function $27($0_1, $1_1, $2_1, $3_1) { @@ -2224,13 +2367,13 @@ function asmFunc(imports) { $19_1 = HEAP32[($6_1 + 44 | 0) >> 2] | 0; break label$3; } - $19_1 = 78018; + $19_1 = 78575; } $22_1 = HEAP32[($6_1 + 40 | 0) >> 2] | 0; HEAP32[($6_1 + 8 | 0) >> 2] = HEAP32[($6_1 + 36 | 0) >> 2] | 0; HEAP32[($6_1 + 4 | 0) >> 2] = $22_1; HEAP32[$6_1 >> 2] = $19_1; - $748(86970 | 0, $6_1 | 0) | 0; + $749(87550 | 0, $6_1 | 0) | 0; break label$1; } label$5 : { @@ -2241,13 +2384,13 @@ function asmFunc(imports) { $33_1 = HEAP32[($6_1 + 44 | 0) >> 2] | 0; break label$5; } - $33_1 = 78018; + $33_1 = 78575; } $36_1 = HEAP32[($6_1 + 40 | 0) >> 2] | 0; HEAP32[($6_1 + 24 | 0) >> 2] = HEAP32[($6_1 + 36 | 0) >> 2] | 0; HEAP32[($6_1 + 20 | 0) >> 2] = $36_1; HEAP32[($6_1 + 16 | 0) >> 2] = $33_1; - $748(86954 | 0, $6_1 + 16 | 0 | 0) | 0; + $749(87534 | 0, $6_1 + 16 | 0 | 0) | 0; } global$0 = $6_1 + 48 | 0; return; @@ -2273,7 +2416,7 @@ function asmFunc(imports) { if ((HEAPU8[($4_1 + 139 | 0) >> 0] | 0) & 1 | 0) { break label$3 } - $748(70762 | 0, 0 | 0) | 0; + $749(70835 | 0, 0 | 0) | 0; } HEAP32[($4_1 + 128 | 0) >> 2] = 0; i64toi32_i32$0 = 0; @@ -2283,9 +2426,9 @@ function asmFunc(imports) { HEAP32[($4_1 + 112 | 0) >> 2] = $250_1; HEAP32[($4_1 + 116 | 0) >> 2] = i64toi32_i32$0; HEAP32[($4_1 + 64 | 0) >> 2] = HEAP32[($4_1 + 132 | 0) >> 2] | 0; - HEAP32[($4_1 + 108 | 0) >> 2] = $756($4_1 + 112 | 0 | 0, 20 | 0, 73832 | 0, $4_1 + 64 | 0 | 0) | 0; + HEAP32[($4_1 + 108 | 0) >> 2] = $757($4_1 + 112 | 0 | 0, 20 | 0, 73890 | 0, $4_1 + 64 | 0 | 0) | 0; HEAP32[($4_1 + 80 | 0) >> 2] = $4_1 + 112 | 0; - $748(65633 | 0, $4_1 + 80 | 0 | 0) | 0; + $749(65633 | 0, $4_1 + 80 | 0 | 0) | 0; HEAP32[($4_1 + 104 | 0) >> 2] = 0; HEAP8[($4_1 + 103 | 0) >> 0] = 0; HEAP32[($4_1 + 96 | 0) >> 2] = HEAP32[($4_1 + 140 | 0) >> 2] | 0; @@ -2357,7 +2500,7 @@ function asmFunc(imports) { } HEAP32[($4_1 + 104 | 0) >> 2] = (HEAP32[($4_1 + 104 | 0) >> 2] | 0) + 1 | 0; } - $748(86980 | 0, 0 | 0) | 0; + $749(87560 | 0, 0 | 0) | 0; } } label$16 : { @@ -2369,7 +2512,7 @@ function asmFunc(imports) { if ((HEAPU8[($4_1 + 103 | 0) >> 0] | 0) & 1 | 0) { break label$18 } - $146_1 = $764(HEAP32[((HEAP32[($4_1 + 92 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $146_1 = $765(HEAP32[((HEAP32[($4_1 + 92 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; HEAP32[($4_1 + 104 | 0) >> 2] = (HEAP32[($4_1 + 104 | 0) >> 2] | 0) + $146_1 | 0; } label$19 : { @@ -2378,33 +2521,33 @@ function asmFunc(imports) { break label$20 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 92 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $748(70774 | 0, $4_1 + 16 | 0 | 0) | 0; + $749(70847 | 0, $4_1 + 16 | 0 | 0) | 0; break label$19; } HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[($4_1 + 92 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $748(68053 | 0, $4_1 | 0) | 0; + $749(68126 | 0, $4_1 | 0) | 0; } break label$16; } HEAP32[($4_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 92 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $748(68053 | 0, $4_1 + 32 | 0 | 0) | 0; + $749(68126 | 0, $4_1 + 32 | 0 | 0) | 0; } HEAP32[($4_1 + 92 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 92 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; continue label$8; } break label$8; }; - $748(101054 | 0, 0 | 0) | 0; + $749(101634 | 0, 0 | 0) | 0; label$21 : { if ((HEAPU8[($4_1 + 139 | 0) >> 0] | 0) & 1 | 0) { break label$21 } - $748(70762 | 0, 0 | 0) | 0; + $749(70835 | 0, 0 | 0) | 0; } $174_1 = HEAP32[($4_1 + 108 | 0) >> 2] | 0; - HEAP32[($4_1 + 52 | 0) >> 2] = 86980; + HEAP32[($4_1 + 52 | 0) >> 2] = 87560; HEAP32[($4_1 + 48 | 0) >> 2] = $174_1; - $748(65626 | 0, $4_1 + 48 | 0 | 0) | 0; + $749(65626 | 0, $4_1 + 48 | 0 | 0) | 0; label$22 : { if (!((HEAP32[($4_1 + 140 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$22 @@ -2415,7 +2558,7 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 88 | 0) >> 2] | 0 | 0) <= (((HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) - 1 | 0) + (HEAP32[($4_1 + 104 | 0) >> 2] | 0) | 0 | 0) & 1 | 0)) { break label$23 } - $748(86980 | 0, 0 | 0) | 0; + $749(87560 | 0, 0 | 0) | 0; HEAP32[($4_1 + 88 | 0) >> 2] = (HEAP32[($4_1 + 88 | 0) >> 2] | 0) + 1 | 0; continue label$24; }; @@ -2425,9 +2568,9 @@ function asmFunc(imports) { if ((HEAPU8[($4_1 + 139 | 0) >> 0] | 0) & 1 | 0) { break label$25 } - $748(70768 | 0, 0 | 0) | 0; + $749(70841 | 0, 0 | 0) | 0; } - $748(74113 | 0, 0 | 0) | 0; + $749(74171 | 0, 0 | 0) | 0; HEAP32[($4_1 + 84 | 0) >> 2] = (HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0; label$26 : while (1) { $223_1 = 0; @@ -2442,7 +2585,7 @@ function asmFunc(imports) { if (!($223_1 & 1 | 0)) { break label$28 } - $748(65536 | 0, 0 | 0) | 0; + $749(65536 | 0, 0 | 0) | 0; HEAP32[($4_1 + 84 | 0) >> 2] = (HEAP32[($4_1 + 84 | 0) >> 2] | 0) + 1 | 0; continue label$26; } @@ -2452,9 +2595,9 @@ function asmFunc(imports) { if ((HEAPU8[($4_1 + 139 | 0) >> 0] | 0) & 1 | 0) { break label$29 } - $748(70852 | 0, 0 | 0) | 0; + $749(70925 | 0, 0 | 0) | 0; } - $748(101054 | 0, 0 | 0) | 0; + $749(101634 | 0, 0 | 0) | 0; } global$0 = $4_1 + 144 | 0; return; @@ -2468,7 +2611,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 28 | 0) >> 2] = $0_1; HEAP32[($3_1 + 24 | 0) >> 2] = -2128831035; HEAP32[($3_1 + 20 | 0) >> 2] = 0; - HEAP32[($3_1 + 16 | 0) >> 2] = $764(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 16 | 0) >> 2] = $765(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = (((HEAP32[($3_1 + 16 | 0) >> 2] | 0) >>> 0) / (10 >>> 0) | 0) + 1 | 0; label$1 : { label$2 : while (1) { @@ -2509,8 +2652,8 @@ function asmFunc(imports) { break label$4 } HEAP32[$3_1 >> 2] = HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] | 0; - $817(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 0); HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[$3_1 >> 2] | 0; continue label$5; }; @@ -2519,7 +2662,7 @@ function asmFunc(imports) { continue label$3; }; } - $817(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] = 0; HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] = 0; } @@ -2538,7 +2681,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(76408 | 0, 74032 | 0, 1670 | 0, 65748 | 0); + fimport$0(76810 | 0, 74090 | 0, 1647 | 0, 65748 | 0); wasm2js_trap(); } global$0 = $3_1 + 16 | 0; @@ -2573,7 +2716,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$5 } - if ($760(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 20 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 20 | 0) >> 2] | 0 | 0) | 0) { break label$5 } HEAP32[($4_1 + 28 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -2613,7 +2756,7 @@ function asmFunc(imports) { } HEAP32[((HEAP32[($6_1 + 44 | 0) >> 2] | 0) + 4 | 0) >> 2] = 1e3; } - $29_1 = $821(HEAP32[((HEAP32[($6_1 + 44 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 4 | 0) | 0; + $29_1 = $822(HEAP32[((HEAP32[($6_1 + 44 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 4 | 0) | 0; HEAP32[(HEAP32[($6_1 + 44 | 0) >> 2] | 0) >> 2] = $29_1; } label$3 : { @@ -2632,7 +2775,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($6_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$6 } - if ($760(HEAP32[((HEAP32[($6_1 + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($6_1 + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0) | 0) { break label$6 } break label$4; @@ -2646,11 +2789,11 @@ function asmFunc(imports) { if (!((HEAP32[($6_1 + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$8 } - HEAP32[($6_1 + 12 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; + HEAP32[($6_1 + 12 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; HEAP32[((HEAP32[($6_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($6_1 + 24 | 0) >> 2] | 0; HEAP32[((HEAP32[($6_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($6_1 + 36 | 0) >> 2] | 0; HEAP32[((HEAP32[($6_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[($6_1 + 32 | 0) >> 2] | 0; - $90_1 = $763(HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0) | 0; + $90_1 = $764(HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($6_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] = $90_1; HEAP32[(HEAP32[($6_1 + 12 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($6_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + ((HEAP32[($6_1 + 20 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; HEAP32[((HEAP32[(HEAP32[($6_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + ((HEAP32[($6_1 + 20 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] = HEAP32[($6_1 + 12 | 0) >> 2] | 0; @@ -2695,8 +2838,8 @@ function asmFunc(imports) { } HEAP32[($4_1 + 12 | 0) >> 2] = HEAP32[(HEAP32[($4_1 + 16 | 0) >> 2] | 0) >> 2] | 0; FUNCTION_TABLE[HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0](HEAP32[((HEAP32[($4_1 + 16 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0); - $817(HEAP32[((HEAP32[($4_1 + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($4_1 + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 0); HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 12 | 0) >> 2] | 0; continue label$5; }; @@ -2705,7 +2848,7 @@ function asmFunc(imports) { continue label$3; }; } - $817(HEAP32[(HEAP32[($4_1 + 28 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($4_1 + 28 | 0) >> 2] | 0) >> 2] | 0 | 0); HEAP32[(HEAP32[($4_1 + 28 | 0) >> 2] | 0) >> 2] = 0; HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 8 | 0) >> 2] = 0; } @@ -2726,7 +2869,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(76408 | 0, 74032 | 0, 1813 | 0, 65742 | 0); + fimport$0(76810 | 0, 74090 | 0, 1790 | 0, 65742 | 0); wasm2js_trap(); } global$0 = $4_1 + 16 | 0; @@ -2761,7 +2904,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$5 } - if ($760(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 20 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 20 | 0) >> 2] | 0 | 0) | 0) { break label$5 } HEAP32[($4_1 + 28 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -2805,7 +2948,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$5 } - if ($760(HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0) | 0) { break label$5 } HEAP32[(HEAP32[($5_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0; @@ -2816,8 +2959,8 @@ function asmFunc(imports) { HEAP32[(HEAP32[($5_1 + 16 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; } HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; - $817(HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($5_1 + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[($5_1 + 4 | 0) >> 2] | 0 | 0); HEAP32[($5_1 + 28 | 0) >> 2] = HEAP32[$5_1 >> 2] | 0; break label$1; } @@ -2857,7 +3000,7 @@ function asmFunc(imports) { } HEAP32[((HEAP32[($6_1 + 44 | 0) >> 2] | 0) + 4 | 0) >> 2] = 1e3; } - $29_1 = $821(HEAP32[((HEAP32[($6_1 + 44 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 4 | 0) | 0; + $29_1 = $822(HEAP32[((HEAP32[($6_1 + 44 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 4 | 0) | 0; HEAP32[(HEAP32[($6_1 + 44 | 0) >> 2] | 0) >> 2] = $29_1; } label$3 : { @@ -2877,7 +3020,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($6_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$7 } - if ($760(HEAP32[((HEAP32[($6_1 + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($6_1 + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0) | 0) { break label$7 } break label$5; @@ -2891,11 +3034,11 @@ function asmFunc(imports) { if (!((HEAP32[($6_1 + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$9 } - HEAP32[($6_1 + 12 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; + HEAP32[($6_1 + 12 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; HEAP32[((HEAP32[($6_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($6_1 + 24 | 0) >> 2] | 0; HEAP32[((HEAP32[($6_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($6_1 + 36 | 0) >> 2] | 0; HEAP32[((HEAP32[($6_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[($6_1 + 32 | 0) >> 2] | 0; - $90_1 = $763(HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0) | 0; + $90_1 = $764(HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($6_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] = $90_1; HEAP32[(HEAP32[($6_1 + 12 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($6_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + ((HEAP32[($6_1 + 20 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; HEAP32[((HEAP32[(HEAP32[($6_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + ((HEAP32[($6_1 + 20 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] = HEAP32[($6_1 + 12 | 0) >> 2] | 0; @@ -2928,8 +3071,8 @@ function asmFunc(imports) { break label$1 } HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $817(HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; continue label$2; }; @@ -2944,10 +3087,10 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $35((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 272 | 0 | 0, 1 | 0); - $39((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 284 | 0 | 0); - $31((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 292 | 0 | 0); - $11((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0 | 0); + $35((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 276 | 0 | 0, 1 | 0); + $39((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 288 | 0 | 0); + $31((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0 | 0); + $11((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 312 | 0 | 0); global$0 = $3_1 + 16 | 0; return; } @@ -2982,14 +3125,14 @@ function asmFunc(imports) { break label$2 } HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $817(HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; continue label$3; }; } - $817(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -3012,20 +3155,20 @@ function asmFunc(imports) { } $27(HEAP32[((HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($6_1 + 252 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); } - $724($6_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($6_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; HEAP32[($6_1 + 28 | 0) >> 2] = $3_1; - $807($6_1 + 32 | 0 | 0, 200 | 0, HEAP32[($6_1 + 244 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0) | 0; + $808($6_1 + 32 | 0 | 0, 200 | 0, HEAP32[($6_1 + 244 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0) | 0; label$2 : { label$3 : { if (!((HEAPU8[((HEAP32[($6_1 + 252 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0)) { break label$3 } HEAP32[$6_1 >> 2] = $6_1 + 32 | 0; - $748(87291 | 0, $6_1 | 0) | 0; + $749(87871 | 0, $6_1 | 0) | 0; break label$2; } HEAP32[($6_1 + 16 | 0) >> 2] = $6_1 + 32 | 0; - $748(87169 | 0, $6_1 + 16 | 0 | 0) | 0; + $749(87749 | 0, $6_1 + 16 | 0 | 0) | 0; } $28(HEAP32[($6_1 + 248 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($6_1 + 252 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); global$0 = $6_1 + 256 | 0; @@ -3064,27 +3207,27 @@ function asmFunc(imports) { } } $16_1 = HEAP32[($7_1 + 248 | 0) >> 2] | 0; - HEAP32[($16_1 + 320 | 0) >> 2] = (HEAP32[($16_1 + 320 | 0) >> 2] | 0) + 1 | 0; + HEAP32[($16_1 + 324 | 0) >> 2] = (HEAP32[($16_1 + 324 | 0) >> 2] | 0) + 1 | 0; label$5 : { if (!((HEAP32[($7_1 + 244 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $27(HEAP32[((HEAP32[((HEAP32[($7_1 + 244 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 244 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 244 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 248 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); } - $724($7_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($7_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; HEAP32[($7_1 + 28 | 0) >> 2] = $4_1; - $807($7_1 + 32 | 0 | 0, 200 | 0, HEAP32[($7_1 + 240 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0) | 0; + $808($7_1 + 32 | 0 | 0, 200 | 0, HEAP32[($7_1 + 240 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0) | 0; label$6 : { if (!((HEAPU8[((HEAP32[($7_1 + 248 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0)) { break label$6 } HEAP32[$7_1 >> 2] = $7_1 + 32 | 0; - $748(87278 | 0, $7_1 | 0) | 0; + $749(87858 | 0, $7_1 | 0) | 0; $28(HEAP32[($7_1 + 244 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 248 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); break label$1; } HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 32 | 0; - $748(87146 | 0, $7_1 + 16 | 0 | 0) | 0; + $749(87726 | 0, $7_1 + 16 | 0 | 0) | 0; $28(HEAP32[($7_1 + 244 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 248 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); } global$0 = $7_1 + 256 | 0; @@ -3115,27 +3258,27 @@ function asmFunc(imports) { HEAP32[($7_1 + 244 | 0) >> 2] = $2_1; HEAP32[($7_1 + 240 | 0) >> 2] = $3_1; $8_1 = HEAP32[($7_1 + 248 | 0) >> 2] | 0; - HEAP32[($8_1 + 324 | 0) >> 2] = (HEAP32[($8_1 + 324 | 0) >> 2] | 0) + 1 | 0; + HEAP32[($8_1 + 328 | 0) >> 2] = (HEAP32[($8_1 + 328 | 0) >> 2] | 0) + 1 | 0; label$1 : { if (!((HEAP32[($7_1 + 244 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } $27(HEAP32[((HEAP32[((HEAP32[($7_1 + 244 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 244 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 244 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 248 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); } - $724($7_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($7_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; HEAP32[($7_1 + 28 | 0) >> 2] = $4_1; - $807($7_1 + 32 | 0 | 0, 200 | 0, HEAP32[($7_1 + 240 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0) | 0; + $808($7_1 + 32 | 0 | 0, 200 | 0, HEAP32[($7_1 + 240 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0) | 0; label$2 : { label$3 : { if (!((HEAPU8[((HEAP32[($7_1 + 248 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0)) { break label$3 } HEAP32[$7_1 >> 2] = $7_1 + 32 | 0; - $748(87267 | 0, $7_1 | 0) | 0; + $749(87847 | 0, $7_1 | 0) | 0; break label$2; } HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 32 | 0; - $748(87125 | 0, $7_1 + 16 | 0 | 0) | 0; + $749(87705 | 0, $7_1 + 16 | 0 | 0) | 0; } $28(HEAP32[($7_1 + 244 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 248 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); global$0 = $7_1 + 256 | 0; @@ -3150,8 +3293,8 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 12 | 0) >> 2] = $0_1; HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; - HEAP32[($4_1 + 4 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; - $9_1 = $763(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; + $9_1 = $764(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($4_1 + 4 | 0) >> 2] | 0) >> 2] = $9_1; label$1 : { label$2 : { @@ -3166,7 +3309,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - fimport$0(75859 | 0, 74032 | 0, 2428 | 0, 73689 | 0); + fimport$0(76261 | 0, 74090 | 0, 2407 | 0, 73747 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 4 | 0) >> 2] | 0; @@ -3200,7 +3343,7 @@ function asmFunc(imports) { break label$2 } label$3 : { - if (!(($32((HEAP32[($8_1 + 312 | 0) >> 2] | 0) + 292 | 0 | 0, HEAP32[($8_1 + 308 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!(($32((HEAP32[($8_1 + 312 | 0) >> 2] | 0) + 296 | 0 | 0, HEAP32[($8_1 + 308 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } HEAP8[(HEAP32[($8_1 + 300 | 0) >> 2] | 0) >> 0] = 1; @@ -3215,24 +3358,24 @@ function asmFunc(imports) { $38_1 = HEAP32[($8_1 + 296 | 0) >> 2] | 0; $39_1 = HEAP32[($8_1 + 292 | 0) >> 2] | 0; HEAP32[$8_1 >> 2] = HEAP32[($8_1 + 308 | 0) >> 2] | 0; - $756($38_1 | 0, $39_1 | 0, 68053 | 0, $8_1 | 0) | 0; + $757($38_1 | 0, $39_1 | 0, 68126 | 0, $8_1 | 0) | 0; HEAP32[($8_1 + 316 | 0) >> 2] = HEAP32[($8_1 + 288 | 0) >> 2] | 0; break label$1; } HEAP32[($8_1 + 316 | 0) >> 2] = 0; break label$1; } - $724($8_1 + 80 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($8_1 + 80 | 0 | 0, 0 | 0, 200 | 0) | 0; $51_1 = HEAP32[($8_1 + 304 | 0) >> 2] | 0; HEAP32[($8_1 + 52 | 0) >> 2] = HEAP32[($8_1 + 308 | 0) >> 2] | 0; HEAP32[($8_1 + 48 | 0) >> 2] = $51_1; - $756($8_1 + 80 | 0 | 0, 200 | 0, 67962 | 0, $8_1 + 48 | 0 | 0) | 0; + $757($8_1 + 80 | 0 | 0, 200 | 0, 68035 | 0, $8_1 + 48 | 0 | 0) | 0; $57_1 = HEAP32[($8_1 + 296 | 0) >> 2] | 0; $58_1 = HEAP32[($8_1 + 292 | 0) >> 2] | 0; HEAP32[($8_1 + 64 | 0) >> 2] = $8_1 + 80 | 0; - $756($57_1 | 0, $58_1 | 0, 68053 | 0, $8_1 + 64 | 0 | 0) | 0; + $757($57_1 | 0, $58_1 | 0, 68126 | 0, $8_1 + 64 | 0 | 0) | 0; label$5 : { - if (!(($32((HEAP32[($8_1 + 312 | 0) >> 2] | 0) + 292 | 0 | 0, HEAP32[($8_1 + 296 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!(($32((HEAP32[($8_1 + 312 | 0) >> 2] | 0) + 296 | 0 | 0, HEAP32[($8_1 + 296 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } HEAP8[(HEAP32[($8_1 + 300 | 0) >> 2] | 0) >> 0] = 1; @@ -3247,13 +3390,13 @@ function asmFunc(imports) { HEAP32[($8_1 + 316 | 0) >> 2] = HEAP32[($8_1 + 76 | 0) >> 2] | 0; break label$1; } - HEAP32[($8_1 + 72 | 0) >> 2] = HEAP32[((HEAP32[($8_1 + 312 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + HEAP32[($8_1 + 72 | 0) >> 2] = HEAP32[((HEAP32[($8_1 + 312 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; label$7 : { label$8 : while (1) { if (!((HEAP32[($8_1 + 72 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - HEAP32[($8_1 + 68 | 0) >> 2] = $764(HEAP32[(HEAP32[($8_1 + 72 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; + HEAP32[($8_1 + 68 | 0) >> 2] = $765(HEAP32[(HEAP32[($8_1 + 72 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; $108_1 = 24; label$9 : { label$10 : { @@ -3265,7 +3408,7 @@ function asmFunc(imports) { $120_1 = HEAP32[(HEAP32[($8_1 + 72 | 0) >> 2] | 0) >> 2] | 0; HEAP32[($8_1 + 20 | 0) >> 2] = HEAP32[($8_1 + 308 | 0) >> 2] | 0; HEAP32[($8_1 + 16 | 0) >> 2] = $120_1; - $756($117_1 | 0, $118_1 | 0, 67950 | 0, $8_1 + 16 | 0 | 0) | 0; + $757($117_1 | 0, $118_1 | 0, 68023 | 0, $8_1 + 16 | 0 | 0) | 0; break label$9; } $125_1 = HEAP32[($8_1 + 296 | 0) >> 2] | 0; @@ -3273,10 +3416,10 @@ function asmFunc(imports) { $128_1 = HEAP32[(HEAP32[($8_1 + 72 | 0) >> 2] | 0) >> 2] | 0; HEAP32[($8_1 + 36 | 0) >> 2] = HEAP32[($8_1 + 308 | 0) >> 2] | 0; HEAP32[($8_1 + 32 | 0) >> 2] = $128_1; - $756($125_1 | 0, $126_1 | 0, 67962 | 0, $8_1 + 32 | 0 | 0) | 0; + $757($125_1 | 0, $126_1 | 0, 68035 | 0, $8_1 + 32 | 0 | 0) | 0; } label$11 : { - if (!(($32((HEAP32[($8_1 + 312 | 0) >> 2] | 0) + 292 | 0 | 0, HEAP32[($8_1 + 296 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!(($32((HEAP32[($8_1 + 312 | 0) >> 2] | 0) + 296 | 0 | 0, HEAP32[($8_1 + 296 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0)) { break label$11 } HEAP8[(HEAP32[($8_1 + 300 | 0) >> 2] | 0) >> 0] = 1; @@ -3320,63 +3463,63 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if ($760(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71209 | 0) | 0) { + if ($761(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71282 | 0) | 0) { break label$2 } - HEAP32[($3_1 + 12 | 0) >> 2] = $763(HEAP32[(0 + 101684 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = $764(HEAP32[(0 + 102260 | 0) >> 2] | 0 | 0) | 0; break label$1; } label$3 : { - if ($760(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71254 | 0) | 0) { + if ($761(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71327 | 0) | 0) { break label$3 } - HEAP32[($3_1 + 12 | 0) >> 2] = $763(HEAP32[(0 + 101688 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = $764(HEAP32[(0 + 102264 | 0) >> 2] | 0 | 0) | 0; break label$1; } label$4 : { - if ($760(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71242 | 0) | 0) { + if ($761(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71315 | 0) | 0) { break label$4 } - HEAP32[($3_1 + 12 | 0) >> 2] = $763(HEAP32[(0 + 101692 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = $764(HEAP32[(0 + 102268 | 0) >> 2] | 0 | 0) | 0; break label$1; } label$5 : { - if ($760(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71220 | 0) | 0) { + if ($761(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71293 | 0) | 0) { break label$5 } - HEAP32[($3_1 + 12 | 0) >> 2] = $763(HEAP32[(0 + 101696 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = $764(HEAP32[(0 + 102272 | 0) >> 2] | 0 | 0) | 0; break label$1; } label$6 : { - if ($760(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71198 | 0) | 0) { + if ($761(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71271 | 0) | 0) { break label$6 } - HEAP32[($3_1 + 12 | 0) >> 2] = $763(HEAP32[(0 + 101700 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = $764(HEAP32[(0 + 102276 | 0) >> 2] | 0 | 0) | 0; break label$1; } label$7 : { - if ($760(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71230 | 0) | 0) { + if ($761(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71303 | 0) | 0) { break label$7 } - HEAP32[($3_1 + 12 | 0) >> 2] = $763(HEAP32[(0 + 101704 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = $764(HEAP32[(0 + 102280 | 0) >> 2] | 0 | 0) | 0; break label$1; } label$8 : { - if ($760(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71171 | 0) | 0) { + if ($761(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71244 | 0) | 0) { break label$8 } - HEAP32[($3_1 + 12 | 0) >> 2] = $763(HEAP32[(0 + 101708 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = $764(HEAP32[(0 + 102284 | 0) >> 2] | 0 | 0) | 0; break label$1; } label$9 : { - if ($760(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71183 | 0) | 0) { + if ($761(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, 71256 | 0) | 0) { break label$9 } - HEAP32[($3_1 + 12 | 0) >> 2] = $763(HEAP32[(0 + 101680 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = $764(HEAP32[(0 + 102256 | 0) >> 2] | 0 | 0) | 0; break label$1; } HEAP32[$3_1 >> 2] = HEAP32[($3_1 + 8 | 0) >> 2] | 0; - $748(87258 | 0, $3_1 | 0) | 0; + $749(87838 | 0, $3_1 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = 0; } $55_1 = HEAP32[($3_1 + 12 | 0) >> 2] | 0; @@ -3529,12 +3672,12 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 2609 | 0, 71758 | 0); + fimport$0(76208 | 0, 74090 | 0, 2588 | 0, 71831 | 0); wasm2js_trap(); } $11((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0 | 0); - $817(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -3552,8 +3695,8 @@ function asmFunc(imports) { if (!((HEAP32[$0_1 >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$1 } - HEAP32[($4_1 + 8 | 0) >> 2] = $821(1 | 0, 40 | 0) | 0; - $19_1 = $763(101055 | 0) | 0; + HEAP32[($4_1 + 8 | 0) >> 2] = $822(1 | 0, 40 | 0) | 0; + $19_1 = $764(101635 | 0) | 0; HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $19_1; HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] = 141; $17($0_1 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; @@ -3602,7 +3745,7 @@ function asmFunc(imports) { break label$2 } label$4 : { - if ($760(HEAP32[(HEAP32[$4_1 >> 2] | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[(HEAP32[$4_1 >> 2] | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0) { break label$4 } HEAP32[($4_1 + 12 | 0) >> 2] = HEAP32[$4_1 >> 2] | 0; @@ -3631,7 +3774,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(75724 | 0, 74032 | 0, 2684 | 0, 73612 | 0); + fimport$0(76126 | 0, 74090 | 0, 2663 | 0, 73670 | 0); wasm2js_trap(); } label$2 : { @@ -3644,7 +3787,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(76243 | 0, 74032 | 0, 2688 | 0, 73612 | 0); + fimport$0(76645 | 0, 74090 | 0, 2667 | 0, 73670 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -3654,7 +3797,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$5 } - fimport$0(75859 | 0, 74032 | 0, 2693 | 0, 73612 | 0); + fimport$0(76261 | 0, 74090 | 0, 2672 | 0, 73670 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -3677,8 +3820,8 @@ function asmFunc(imports) { break label$1 } HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $817(HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; continue label$2; }; @@ -3695,7 +3838,7 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 8 | 0) >> 2] = $0_1; HEAP32[($4_1 + 4 | 0) >> 2] = $1_1; - HEAP32[$4_1 >> 2] = $36((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 272 | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0; + HEAP32[$4_1 >> 2] = $36((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 276 | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0; label$1 : { label$2 : { if (!((HEAP32[$4_1 >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -4151,12 +4294,12 @@ function asmFunc(imports) { HEAP32[($5_1 + 28 | 0) >> 2] = $0_1; HEAP32[($5_1 + 24 | 0) >> 2] = $1_1; HEAP32[($5_1 + 20 | 0) >> 2] = $2_1; - HEAP32[($5_1 + 16 | 0) >> 2] = $821(1 | 0, 40 | 0) | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = $822(1 | 0, 40 | 0) | 0; HEAP32[($5_1 + 12 | 0) >> 2] = (HEAP32[($5_1 + 24 | 0) >> 2] | 0) - (HEAP32[($5_1 + 28 | 0) >> 2] | 0) | 0; - $16_1 = $821((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 1 | 0 | 0, 1 | 0) | 0; + $16_1 = $822((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 1 | 0 | 0, 1 | 0) | 0; HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] = $16_1; HEAP32[(HEAP32[($5_1 + 16 | 0) >> 2] | 0) >> 2] = HEAP32[($5_1 + 20 | 0) >> 2] | 0; - $767(HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0) | 0; + $768(HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0) | 0; $24_1 = HEAP32[($5_1 + 16 | 0) >> 2] | 0; global$0 = $5_1 + 32 | 0; return $24_1 | 0; @@ -4324,7 +4467,7 @@ function asmFunc(imports) { break label$10 } } - $67(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 68863 | 0, 0 | 0); + $67(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 68936 | 0, 0 | 0); break label$6; } continue label$7; @@ -4349,10 +4492,10 @@ function asmFunc(imports) { HEAP32[($6_1 + 248 | 0) >> 2] = $1_1; HEAP32[($6_1 + 244 | 0) >> 2] = $2_1; $7_1 = HEAP32[($6_1 + 252 | 0) >> 2] | 0; - HEAP32[($7_1 + 268 | 0) >> 2] = (HEAP32[($7_1 + 268 | 0) >> 2] | 0) + 1 | 0; - $724($6_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; + HEAP32[($7_1 + 272 | 0) >> 2] = (HEAP32[($7_1 + 272 | 0) >> 2] | 0) + 1 | 0; + $725($6_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; HEAP32[($6_1 + 28 | 0) >> 2] = $3_1; - $807($6_1 + 32 | 0 | 0, 200 | 0, HEAP32[($6_1 + 244 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0) | 0; + $808($6_1 + 32 | 0 | 0, 200 | 0, HEAP32[($6_1 + 244 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0) | 0; $27(HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($6_1 + 252 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); label$1 : { label$2 : { @@ -4360,11 +4503,11 @@ function asmFunc(imports) { break label$2 } HEAP32[$6_1 >> 2] = $6_1 + 32 | 0; - $748(87278 | 0, $6_1 | 0) | 0; + $749(87858 | 0, $6_1 | 0) | 0; break label$1; } HEAP32[($6_1 + 16 | 0) >> 2] = $6_1 + 32 | 0; - $748(87146 | 0, $6_1 + 16 | 0 | 0) | 0; + $749(87726 | 0, $6_1 + 16 | 0 | 0) | 0; } global$0 = $6_1 + 256 | 0; return; @@ -4492,7 +4635,7 @@ function asmFunc(imports) { break label$10 } } - $70(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 68895 | 0, 0 | 0); + $70(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 68968 | 0, 0 | 0); break label$7; } $97_1 = 24; @@ -4534,10 +4677,10 @@ function asmFunc(imports) { HEAP32[($6_1 + 248 | 0) >> 2] = $1_1; HEAP32[($6_1 + 244 | 0) >> 2] = $2_1; $7_1 = HEAP32[($6_1 + 252 | 0) >> 2] | 0; - HEAP32[($7_1 + 272 | 0) >> 2] = (HEAP32[($7_1 + 272 | 0) >> 2] | 0) + 1 | 0; - $724($6_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; + HEAP32[($7_1 + 276 | 0) >> 2] = (HEAP32[($7_1 + 276 | 0) >> 2] | 0) + 1 | 0; + $725($6_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; HEAP32[($6_1 + 28 | 0) >> 2] = $3_1; - $807($6_1 + 32 | 0 | 0, 200 | 0, HEAP32[($6_1 + 244 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0) | 0; + $808($6_1 + 32 | 0 | 0, 200 | 0, HEAP32[($6_1 + 244 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0) | 0; $27(HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($6_1 + 252 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); label$1 : { label$2 : { @@ -4545,11 +4688,11 @@ function asmFunc(imports) { break label$2 } HEAP32[$6_1 >> 2] = $6_1 + 32 | 0; - $748(87267 | 0, $6_1 | 0) | 0; + $749(87847 | 0, $6_1 | 0) | 0; break label$1; } HEAP32[($6_1 + 16 | 0) >> 2] = $6_1 + 32 | 0; - $748(87125 | 0, $6_1 + 16 | 0 | 0) | 0; + $749(87705 | 0, $6_1 + 16 | 0 | 0) | 0; } global$0 = $6_1 + 256 | 0; return; @@ -4695,7 +4838,7 @@ function asmFunc(imports) { $60(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); break label$3; } - fimport$0(72213 | 0, 74032 | 0, 3358 | 0, 69463 | 0); + fimport$0(72286 | 0, 74090 | 0, 3337 | 0, 69536 | 0); wasm2js_trap(); } } @@ -4724,7 +4867,7 @@ function asmFunc(imports) { $60(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); break label$11; } - fimport$0(72213 | 0, 74032 | 0, 3377 | 0, 69463 | 0); + fimport$0(72286 | 0, 74090 | 0, 3356 | 0, 69536 | 0); wasm2js_trap(); } } @@ -4830,9 +4973,9 @@ function asmFunc(imports) { break label$3 } $22_1 = HEAP32[($7_1 + 140 | 0) >> 2] | 0; - $24_1 = HEAP32[((HEAP32[($7_1 + 140 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; + $24_1 = HEAP32[((HEAP32[($7_1 + 140 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0; HEAP32[$7_1 >> 2] = HEAP32[($7_1 + 136 | 0) >> 2] | 0; - $46(53 | 0, $22_1 | 0, $24_1 | 0, 72934 | 0, $7_1 | 0); + $46(53 | 0, $22_1 | 0, $24_1 | 0, 72992 | 0, $7_1 | 0); break label$2; } HEAP32[($7_1 + 100 | 0) >> 2] = HEAP32[($7_1 + 104 | 0) >> 2] | 0; @@ -4853,7 +4996,7 @@ function asmFunc(imports) { break label$6; } $13_1 = 0; - HEAP16[($7_1 + 96 | 0) >> 1] = HEAPU8[($13_1 + 85338 | 0) >> 0] | 0 | ((HEAPU8[($13_1 + 85339 | 0) >> 0] | 0) << 8 | 0) | 0; + HEAP16[($7_1 + 96 | 0) >> 1] = HEAPU8[($13_1 + 85895 | 0) >> 0] | 0 | ((HEAPU8[($13_1 + 85896 | 0) >> 0] | 0) << 8 | 0) | 0; HEAP32[($7_1 + 92 | 0) >> 2] = $63($7_1 + 96 | 0 | 0, ($7_1 + 96 | 0) + 1 | 0 | 0, 44 | 0) | 0; $62_1 = HEAP32[($7_1 + 92 | 0) >> 2] | 0; HEAP32[($62_1 + 24 | 0) >> 2] = HEAP32[($62_1 + 24 | 0) >> 2] | 0 | (HEAP32[($7_1 + 128 | 0) >> 2] | 0) | 0; @@ -4870,7 +5013,7 @@ function asmFunc(imports) { break label$8 } $14_1 = 0; - HEAP16[($7_1 + 90 | 0) >> 1] = HEAPU8[($14_1 + 101054 | 0) >> 0] | 0 | ((HEAPU8[($14_1 + 101055 | 0) >> 0] | 0) << 8 | 0) | 0; + HEAP16[($7_1 + 90 | 0) >> 1] = HEAPU8[($14_1 + 101634 | 0) >> 0] | 0 | ((HEAPU8[($14_1 + 101635 | 0) >> 0] | 0) << 8 | 0) | 0; HEAP32[($7_1 + 84 | 0) >> 2] = $63($7_1 + 90 | 0 | 0, ($7_1 + 90 | 0) + 1 | 0 | 0, 10 | 0) | 0; HEAP32[((HEAP32[($7_1 + 84 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[($7_1 + 132 | 0) >> 2] | 0; HEAP32[((HEAP32[($7_1 + 84 | 0) >> 2] | 0) + 28 | 0) >> 2] = 0; @@ -4896,7 +5039,7 @@ function asmFunc(imports) { HEAP32[($7_1 + 48 | 0) >> 2] = $193_1; HEAP32[($7_1 + 52 | 0) >> 2] = i64toi32_i32$0; HEAP32[($7_1 + 16 | 0) >> 2] = (HEAPU8[($7_1 + 99 | 0) >> 0] | 0) & 255 | 0; - HEAP32[($7_1 + 44 | 0) >> 2] = $756($7_1 + 48 | 0 | 0, 30 | 0, 73832 | 0, $7_1 + 16 | 0 | 0) | 0; + HEAP32[($7_1 + 44 | 0) >> 2] = $757($7_1 + 48 | 0 | 0, 30 | 0, 73890 | 0, $7_1 + 16 | 0 | 0) | 0; HEAP32[($7_1 + 40 | 0) >> 2] = $63($7_1 + 48 | 0 | 0, ($7_1 + 48 | 0) + (HEAP32[($7_1 + 44 | 0) >> 2] | 0) | 0 | 0, 133 | 0) | 0; $131_1 = HEAP32[($7_1 + 40 | 0) >> 2] | 0; HEAP32[($131_1 + 24 | 0) >> 2] = HEAP32[($131_1 + 24 | 0) >> 2] | 0 | (HEAP32[($7_1 + 128 | 0) >> 2] | 0) | 0; @@ -4909,14 +5052,14 @@ function asmFunc(imports) { continue label$5; }; } - $817(HEAP32[($7_1 + 104 | 0) >> 2] | 0 | 0); + $818(HEAP32[($7_1 + 104 | 0) >> 2] | 0 | 0); if (!(0 & 1 | 0)) { break label$1 } } } $15_1 = 0; - HEAP16[($7_1 + 38 | 0) >> 1] = HEAPU8[($15_1 + 101054 | 0) >> 0] | 0 | ((HEAPU8[($15_1 + 101055 | 0) >> 0] | 0) << 8 | 0) | 0; + HEAP16[($7_1 + 38 | 0) >> 1] = HEAPU8[($15_1 + 101634 | 0) >> 0] | 0 | ((HEAPU8[($15_1 + 101635 | 0) >> 0] | 0) << 8 | 0) | 0; HEAP32[($7_1 + 32 | 0) >> 2] = $63($7_1 + 38 | 0 | 0, ($7_1 + 38 | 0) + 1 | 0 | 0, 10 | 0) | 0; HEAP32[((HEAP32[($7_1 + 32 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[($7_1 + 132 | 0) >> 2] | 0; HEAP32[((HEAP32[($7_1 + 32 | 0) >> 2] | 0) + 28 | 0) >> 2] = 0; @@ -4927,13 +5070,13 @@ function asmFunc(imports) { if (!((HEAP32[($7_1 + 124 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } - $729(HEAP32[($7_1 + 124 | 0) >> 2] | 0 | 0) | 0; + $730(HEAP32[($7_1 + 124 | 0) >> 2] | 0 | 0) | 0; } label$10 : { if ((HEAP32[$0_1 >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$10 } - fimport$0(76840 | 0, 74032 | 0, 3516 | 0, 68434 | 0); + fimport$0(77242 | 0, 74090 | 0, 3495 | 0, 68507 | 0); wasm2js_trap(); } global$0 = $7_1 + 144 | 0; @@ -4979,7 +5122,7 @@ function asmFunc(imports) { $34_1 = HEAP32[($8_1 + 132 | 0) >> 2] | 0; break label$3; } - $34_1 = 101055; + $34_1 = 101635; } HEAP32[$25_1 >> 2] = $34_1; HEAP32[($8_1 + 96 | 0) >> 2] = 0; @@ -4988,7 +5131,7 @@ function asmFunc(imports) { break label$5 } HEAP32[($8_1 + 92 | 0) >> 2] = HEAP32[($8_1 + 132 | 0) >> 2] | 0; - HEAP32[($8_1 + 88 | 0) >> 2] = (HEAP32[($8_1 + 132 | 0) >> 2] | 0) + ($764(HEAP32[($8_1 + 132 | 0) >> 2] | 0 | 0) | 0) | 0; + HEAP32[($8_1 + 88 | 0) >> 2] = (HEAP32[($8_1 + 132 | 0) >> 2] | 0) + ($765(HEAP32[($8_1 + 132 | 0) >> 2] | 0 | 0) | 0) | 0; HEAP32[($8_1 + 84 | 0) >> 2] = $63(HEAP32[($8_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 88 | 0) >> 2] | 0 | 0, 8998 | 0) | 0; HEAP32[((HEAP32[($8_1 + 84 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[($8_1 + 128 | 0) >> 2] | 0; HEAP32[($8_1 + 96 | 0) >> 2] = $17($0_1 | 0, HEAP32[($8_1 + 84 | 0) >> 2] | 0 | 0) | 0; @@ -5020,7 +5163,7 @@ function asmFunc(imports) { break label$11 } $88_1 = 24; - if (!($739(((HEAPU8[(HEAP32[($8_1 + 104 | 0) >> 2] | 0) >> 0] | 0) << $88_1 | 0) >> $88_1 | 0 | 0) | 0)) { + if (!($740(((HEAPU8[(HEAP32[($8_1 + 104 | 0) >> 2] | 0) >> 0] | 0) << $88_1 | 0) >> $88_1 | 0 | 0) | 0)) { break label$11 } } @@ -5114,7 +5257,7 @@ function asmFunc(imports) { if (!(($76($8_1 + 100 | 0 | 0, HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$17 } - $67(HEAP32[($8_1 + 140 | 0) >> 2] | 0 | 0, $8_1 + 100 | 0 | 0, 73587 | 0, 0 | 0); + $67(HEAP32[($8_1 + 140 | 0) >> 2] | 0 | 0, $8_1 + 100 | 0 | 0, 73645 | 0, 0 | 0); } $17($0_1 | 0, HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0) | 0; continue label$9; @@ -5339,7 +5482,7 @@ function asmFunc(imports) { $60($8_1 + 100 | 0 | 0); } $70_1 = 0; - HEAP16[($8_1 + 22 | 0) >> 1] = HEAPU8[($70_1 + 101054 | 0) >> 0] | 0 | ((HEAPU8[($70_1 + 101055 | 0) >> 0] | 0) << 8 | 0) | 0; + HEAP16[($8_1 + 22 | 0) >> 1] = HEAPU8[($70_1 + 101634 | 0) >> 0] | 0 | ((HEAPU8[($70_1 + 101635 | 0) >> 0] | 0) << 8 | 0) | 0; HEAP32[($8_1 + 16 | 0) >> 2] = $63($8_1 + 22 | 0 | 0, ($8_1 + 22 | 0) + 1 | 0 | 0, 10 | 0) | 0; $744_1 = HEAP32[($8_1 + 16 | 0) >> 2] | 0; HEAP32[($744_1 + 24 | 0) >> 2] = HEAP32[($744_1 + 24 | 0) >> 2] | 0 | ((HEAPU8[($8_1 + 82 | 0) >> 0] | 0) & 1 | 0 ? 4 : 0) | 0; @@ -5408,7 +5551,7 @@ function asmFunc(imports) { if ((HEAP32[$0_1 >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$39 } - fimport$0(76840 | 0, 74032 | 0, 3896 | 0, 68440 | 0); + fimport$0(77242 | 0, 74090 | 0, 3875 | 0, 68513 | 0); wasm2js_trap(); } } @@ -5435,7 +5578,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { break label$3 } - HEAP32[($4_1 + 4 | 0) >> 2] = $764(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = $765(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; $35_1 = 24; label$4 : { label$5 : { @@ -5493,19 +5636,19 @@ function asmFunc(imports) { break label$7 } label$8 : { - if (($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 71451 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 71524 | 0) | 0) & 1 | 0) { break label$8 } - if (($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 72208 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 72281 | 0) | 0) & 1 | 0) { break label$8 } - if (($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 71446 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 71519 | 0) | 0) & 1 | 0) { break label$8 } - if (($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 71472 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 71545 | 0) | 0) & 1 | 0) { break label$8 } - if (!(($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 71463 | 0) | 0) & 1 | 0)) { + if (!(($78(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 71536 | 0) | 0) & 1 | 0)) { break label$7 } } @@ -5515,7 +5658,7 @@ function asmFunc(imports) { $22($0_1 | 0, $7_1 + 8 | 0 | 0); $11($7_1 + 8 | 0 | 0); label$9 : { - if (!((HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$9 } break label$4; @@ -5545,7 +5688,7 @@ function asmFunc(imports) { if ((HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(76757 | 0, 74032 | 0, 4046 | 0, 69200 | 0); + fimport$0(77159 | 0, 74090 | 0, 4025 | 0, 69273 | 0); wasm2js_trap(); } HEAP32[$4_1 >> 2] = $80(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; @@ -5557,7 +5700,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[$4_1 >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$3 } - HEAP8[($4_1 + 15 | 0) >> 0] = ($760(HEAP32[((HEAP32[$4_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0 | 0) == (0 | 0) & 1 | 0; + HEAP8[($4_1 + 15 | 0) >> 0] = ($761(HEAP32[((HEAP32[$4_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0 | 0) == (0 | 0) & 1 | 0; break label$2; } HEAP8[($4_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -5587,13 +5730,13 @@ function asmFunc(imports) { } label$3 : { label$4 : { - if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71454 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71527 | 0) | 0) & 1 | 0) { break label$4 } - if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71474 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71547 | 0) | 0) & 1 | 0) { break label$4 } - if (!(($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71465 | 0) | 0) & 1 | 0)) { + if (!(($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71538 | 0) | 0) & 1 | 0)) { break label$3 } } @@ -5602,28 +5745,28 @@ function asmFunc(imports) { } label$5 : { label$6 : { - if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 72822 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 72880 | 0) | 0) & 1 | 0) { break label$6 } - if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 73606 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 73664 | 0) | 0) & 1 | 0) { break label$6 } - if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 72584 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 72657 | 0) | 0) & 1 | 0) { break label$6 } - if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71457 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71530 | 0) | 0) & 1 | 0) { break label$6 } - if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71290 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 71363 | 0) | 0) & 1 | 0) { break label$6 } - if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 72579 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 72652 | 0) | 0) & 1 | 0) { break label$6 } - if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 68420 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 68493 | 0) | 0) & 1 | 0) { break label$6 } - if (!(($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 74046 | 0) | 0) & 1 | 0)) { + if (!(($78(HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, 74104 | 0) | 0) & 1 | 0)) { break label$5 } } @@ -5718,7 +5861,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } $11($7_1 + 36 | 0 | 0); @@ -5731,13 +5874,13 @@ function asmFunc(imports) { break label$4 } label$5 : { - if (($78(HEAP32[(HEAP32[($7_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 71446 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 71519 | 0) | 0) & 1 | 0) { break label$5 } - if (($78(HEAP32[(HEAP32[($7_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 71472 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($7_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 71545 | 0) | 0) & 1 | 0) { break label$5 } - if (!(($78(HEAP32[(HEAP32[($7_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 71463 | 0) | 0) & 1 | 0)) { + if (!(($78(HEAP32[(HEAP32[($7_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 71536 | 0) | 0) & 1 | 0)) { break label$4 } } @@ -5758,7 +5901,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 56 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (127 | 0) & 1 | 0)) { break label$7 } - if (!(($78(HEAP32[(HEAP32[($7_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 72208 | 0) | 0) & 1 | 0)) { + if (!(($78(HEAP32[(HEAP32[($7_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 72281 | 0) | 0) & 1 | 0)) { break label$7 } $105_1 = HEAP32[($7_1 + 60 | 0) >> 2] | 0; @@ -5779,7 +5922,7 @@ function asmFunc(imports) { $11($7_1 + 16 | 0 | 0); } label$9 : { - if (!((HEAP32[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$9 } $11($7_1 + 36 | 0 | 0); @@ -5805,131 +5948,131 @@ function asmFunc(imports) { $3_1 = $3_1 | 0; $4_1 = $4_1 | 0; var $7_1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $697_1 = 0, $795_1 = 0, $830_1 = 0, $861 = 0, $1086 = 0, $1134 = 0, $1195 = 0, $1253 = 0, $183_1 = 0, $233_1 = 0, $234_1 = 0, $253_1 = 0, $254_1 = 0, $281_1 = 0, $484_1 = 0, $539_1 = 0, $599_1 = 0, $675_1 = 0, $688_1 = 0, $2757 = 0, $845_1 = 0; - $7_1 = global$0 - 2048 | 0; + $7_1 = global$0 - 2064 | 0; global$0 = $7_1; - HEAP32[($7_1 + 2044 | 0) >> 2] = $1_1; - HEAP32[($7_1 + 2040 | 0) >> 2] = $2_1; - HEAP8[($7_1 + 2039 | 0) >> 0] = $3_1; - HEAP32[($7_1 + 2032 | 0) >> 2] = $4_1; + HEAP32[($7_1 + 2060 | 0) >> 2] = $1_1; + HEAP32[($7_1 + 2056 | 0) >> 2] = $2_1; + HEAP8[($7_1 + 2055 | 0) >> 0] = $3_1; + HEAP32[($7_1 + 2048 | 0) >> 2] = $4_1; i64toi32_i32$0 = 0; i64toi32_i32$1 = $0_1; HEAP32[$0_1 >> 2] = 0; HEAP32[($0_1 + 4 | 0) >> 2] = i64toi32_i32$0; label$1 : { label$2 : { - if ((HEAPU8[($7_1 + 2039 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[($7_1 + 2055 | 0) >> 0] | 0) & 1 | 0) { break label$2 } - $108($7_1 + 2024 | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $22($0_1 | 0, $7_1 + 2024 | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $11($7_1 + 2024 | 0 | 0); + $108($7_1 + 2040 | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $22($0_1 | 0, $7_1 + 2040 | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $11($7_1 + 2040 | 0 | 0); break label$1; } - HEAP32[($7_1 + 2020 | 0) >> 2] = HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0; - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 127 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + HEAP32[($7_1 + 2036 | 0) >> 2] = HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 127 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); label$3 : { label$4 : { label$5 : { label$6 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72822 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72880 | 0) | 0) { break label$6 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $724($7_1 + 1920 | 0 | 0, 0 | 0, 100 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $725($7_1 + 1936 | 0 | 0, 0 | 0, 100 | 0) | 0; label$7 : { label$8 : { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { break label$8 } - $759($7_1 + 1920 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; - $87($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $760($7_1 + 1936 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $87($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); break label$7; } label$9 : { label$10 : while (1) { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (62 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (62 | 0) & 1 | 0)) { break label$9 } - $759($7_1 + 1920 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; - $87($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $760($7_1 + 1936 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $87($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); continue label$10; }; } - $759($7_1 + 1920 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; - $87($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $760($7_1 + 1936 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $87($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); } label$11 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$11 } label$12 : { label$13 : while (1) { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (10 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (10 | 0) & 1 | 0)) { break label$12 } - $87($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $87($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); continue label$13; }; } } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - HEAP8[(($7_1 + 1920 | 0) + (($764($7_1 + 1920 | 0 | 0) | 0) - 1 | 0) | 0) >> 0] = 0; - $724($7_1 + 1616 | 0 | 0, 0 | 0, 300 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + HEAP8[(($7_1 + 1936 | 0) + (($765($7_1 + 1936 | 0 | 0) | 0) - 1 | 0) | 0) >> 0] = 0; + $725($7_1 + 1632 | 0 | 0, 0 | 0, 300 | 0) | 0; HEAP32[($7_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $756($7_1 + 1616 | 0 | 0, 300 | 0, 68053 | 0, $7_1 + 64 | 0 | 0) | 0; - $722($7_1 + 1616 | 0 | 0) | 0; - $724($7_1 + 1408 | 0 | 0, 0 | 0, 200 | 0) | 0; - HEAP8[($7_1 + 1407 | 0) >> 0] = 0; - HEAP32[($7_1 + 1400 | 0) >> 2] = $48(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, ($7_1 + 1920 | 0) + 1 | 0 | 0, $7_1 + 1616 | 0 | 0, $7_1 + 1407 | 0 | 0, $7_1 + 1408 | 0 | 0, 200 | 0) | 0; + $757($7_1 + 1632 | 0 | 0, 300 | 0, 68126 | 0, $7_1 + 64 | 0 | 0) | 0; + $723($7_1 + 1632 | 0 | 0) | 0; + $725($7_1 + 1424 | 0 | 0, 0 | 0, 200 | 0) | 0; + HEAP8[($7_1 + 1423 | 0) >> 0] = 0; + HEAP32[($7_1 + 1416 | 0) >> 2] = $48(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, ($7_1 + 1936 | 0) + 1 | 0 | 0, $7_1 + 1632 | 0 | 0, $7_1 + 1423 | 0 | 0, $7_1 + 1424 | 0 | 0, 200 | 0) | 0; label$14 : { label$15 : { - if (!((HEAP32[($7_1 + 1400 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($7_1 + 1416 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$15 } label$16 : { - if (!((HEAPU8[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 56 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 56 | 0) >> 0] | 0) & 1 | 0)) { break label$16 } - $748(84338 | 0, 0 | 0) | 0; - $183_1 = (HEAP32[($7_1 + 2032 | 0) >> 2] | 0) + 1 | 0; + $749(84895 | 0, 0 | 0) | 0; + $183_1 = (HEAP32[($7_1 + 2048 | 0) >> 2] | 0) + 1 | 0; HEAP32[($7_1 + 4 | 0) >> 2] = 32; HEAP32[$7_1 >> 2] = $183_1; - $748(74039 | 0, $7_1 | 0) | 0; - HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 1408 | 0; - $748(87297 | 0, $7_1 + 16 | 0 | 0) | 0; + $749(74097 | 0, $7_1 | 0) | 0; + HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 1424 | 0; + $749(87877 | 0, $7_1 + 16 | 0 | 0) | 0; } - $724($7_1 + 1124 | 0 | 0, 0 | 0, 276 | 0) | 0; - $75($7_1 + 1116 | 0 | 0, $7_1 + 1124 | 0 | 0, HEAP32[($7_1 + 1400 | 0) >> 2] | 0 | 0, $7_1 + 1408 | 0 | 0, (HEAP32[($7_1 + 2032 | 0) >> 2] | 0) + 1 | 0 | 0, 0 | 0); - $817(HEAP32[($7_1 + 1400 | 0) >> 2] | 0 | 0); - $95($7_1 + 1108 | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $7_1 + 1116 | 0 | 0, (HEAP32[($7_1 + 2032 | 0) >> 2] | 0) + 1 | 0 | 0); - $22($0_1 | 0, $7_1 + 1108 | 0 | 0); - $11($7_1 + 1108 | 0 | 0); - $11($7_1 + 1116 | 0 | 0); + $725($7_1 + 1136 | 0 | 0, 0 | 0, 280 | 0) | 0; + $75($7_1 + 1128 | 0 | 0, $7_1 + 1136 | 0 | 0, HEAP32[($7_1 + 1416 | 0) >> 2] | 0 | 0, $7_1 + 1424 | 0 | 0, (HEAP32[($7_1 + 2048 | 0) >> 2] | 0) + 1 | 0 | 0, 0 | 0); + $818(HEAP32[($7_1 + 1416 | 0) >> 2] | 0 | 0); + $95($7_1 + 1120 | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $7_1 + 1128 | 0 | 0, (HEAP32[($7_1 + 2048 | 0) >> 2] | 0) + 1 | 0 | 0); + $22($0_1 | 0, $7_1 + 1120 | 0 | 0); + $11($7_1 + 1120 | 0 | 0); + $11($7_1 + 1128 | 0 | 0); break label$14; } label$17 : { label$18 : { - if ((HEAPU8[($7_1 + 1407 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[($7_1 + 1423 | 0) >> 0] | 0) & 1 | 0) { break label$18 } - $233_1 = HEAP32[($7_1 + 2044 | 0) >> 2] | 0; + $233_1 = HEAP32[($7_1 + 2060 | 0) >> 2] | 0; $234_1 = HEAP32[($0_1 + 4 | 0) >> 2] | 0; - HEAP32[($7_1 + 48 | 0) >> 2] = ($7_1 + 1920 | 0) + 1 | 0; - $46(53 | 0, $233_1 | 0, $234_1 | 0, 72916 | 0, $7_1 + 48 | 0 | 0); - HEAP32[($7_1 + 1104 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + HEAP32[($7_1 + 48 | 0) >> 2] = ($7_1 + 1936 | 0) + 1 | 0; + $46(53 | 0, $233_1 | 0, $234_1 | 0, 72974 | 0, $7_1 + 48 | 0 | 0); + HEAP32[($7_1 + 1116 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; label$19 : { label$20 : while (1) { - if (!((HEAP32[($7_1 + 1104 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($7_1 + 1116 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$19 } - $253_1 = HEAP32[($7_1 + 2044 | 0) >> 2] | 0; + $253_1 = HEAP32[($7_1 + 2060 | 0) >> 2] | 0; $254_1 = HEAP32[($0_1 + 4 | 0) >> 2] | 0; - HEAP32[($7_1 + 32 | 0) >> 2] = HEAP32[(HEAP32[($7_1 + 1104 | 0) >> 2] | 0) >> 2] | 0; - $43($253_1 | 0, $254_1 | 0, 86372 | 0, $7_1 + 32 | 0 | 0); - HEAP32[($7_1 + 1104 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 1104 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($7_1 + 32 | 0) >> 2] = HEAP32[(HEAP32[($7_1 + 1116 | 0) >> 2] | 0) >> 2] | 0; + $43($253_1 | 0, $254_1 | 0, 86929 | 0, $7_1 + 32 | 0 | 0); + HEAP32[($7_1 + 1116 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 1116 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; continue label$20; }; } @@ -5941,72 +6084,72 @@ function asmFunc(imports) { } label$21 : { label$22 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73606 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73664 | 0) | 0) { break label$22 } i64toi32_i32$0 = 0; i64toi32_i32$1 = $7_1; - HEAP32[($7_1 + 1096 | 0) >> 2] = 0; - HEAP32[($7_1 + 1100 | 0) >> 2] = i64toi32_i32$0; - HEAP32[($7_1 + 1092 | 0) >> 2] = $0_1; + HEAP32[($7_1 + 1104 | 0) >> 2] = 0; + HEAP32[($7_1 + 1108 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($7_1 + 1100 | 0) >> 2] = $0_1; label$23 : { - if (!((HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$23 } - HEAP32[($7_1 + 1092 | 0) >> 2] = $7_1 + 1096 | 0; - $817(HEAP32[((HEAP32[($7_1 + 2020 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $281_1 = $763(86980 | 0) | 0; - HEAP32[((HEAP32[($7_1 + 2020 | 0) >> 2] | 0) + 4 | 0) >> 2] = $281_1; - } - $99(HEAP32[($7_1 + 1092 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 1092 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $724($7_1 + 992 | 0 | 0, 0 | 0, 100 | 0) | 0; + HEAP32[($7_1 + 1100 | 0) >> 2] = $7_1 + 1104 | 0; + $818(HEAP32[((HEAP32[($7_1 + 2036 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $281_1 = $764(87560 | 0) | 0; + HEAP32[((HEAP32[($7_1 + 2036 | 0) >> 2] | 0) + 4 | 0) >> 2] = $281_1; + } + $99(HEAP32[($7_1 + 1100 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 1100 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $725($7_1 + 992 | 0 | 0, 0 | 0, 100 | 0) | 0; label$24 : { label$25 : { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { break label$25 } - $759($7_1 + 992 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; - $87(HEAP32[($7_1 + 1092 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $760($7_1 + 992 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $87(HEAP32[($7_1 + 1100 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); break label$24; } label$26 : { label$27 : while (1) { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (62 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (62 | 0) & 1 | 0)) { break label$26 } - $759($7_1 + 992 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; - $87(HEAP32[($7_1 + 1092 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $760($7_1 + 992 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $87(HEAP32[($7_1 + 1100 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); continue label$27; }; } - $759($7_1 + 992 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; - $87(HEAP32[($7_1 + 1092 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $760($7_1 + 992 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $87(HEAP32[($7_1 + 1100 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); } label$28 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$28 } label$29 : { label$30 : while (1) { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (10 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (10 | 0) & 1 | 0)) { break label$29 } - $87(HEAP32[($7_1 + 1092 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $87(HEAP32[($7_1 + 1100 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); continue label$30; }; } } - $99(HEAP32[($7_1 + 1092 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $724($7_1 + 688 | 0 | 0, 0 | 0, 300 | 0) | 0; - HEAP8[(($7_1 + 992 | 0) + (($764($7_1 + 992 | 0 | 0) | 0) - 1 | 0) | 0) >> 0] = 0; + $99(HEAP32[($7_1 + 1100 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $725($7_1 + 688 | 0 | 0, 0 | 0, 300 | 0) | 0; + HEAP8[(($7_1 + 992 | 0) + (($765($7_1 + 992 | 0 | 0) | 0) - 1 | 0) | 0) >> 0] = 0; HEAP32[($7_1 + 80 | 0) >> 2] = ($7_1 + 992 | 0) + 1 | 0; - $756($7_1 + 688 | 0 | 0, 300 | 0, 68053 | 0, $7_1 + 80 | 0 | 0) | 0; - HEAP32[($7_1 + 684 | 0) >> 2] = HEAP32[($7_1 + 2032 | 0) >> 2] | 0; + $757($7_1 + 688 | 0 | 0, 300 | 0, 68126 | 0, $7_1 + 80 | 0 | 0) | 0; + HEAP32[($7_1 + 684 | 0) >> 2] = HEAP32[($7_1 + 2048 | 0) >> 2] | 0; HEAP32[($7_1 + 680 | 0) >> 2] = 0; label$31 : { label$32 : { - if (!((HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$32 } HEAP32[($7_1 + 680 | 0) >> 2] = 1; @@ -6015,30 +6158,30 @@ function asmFunc(imports) { HEAP32[($7_1 + 680 | 0) >> 2] = 1; HEAP32[($7_1 + 684 | 0) >> 2] = (HEAP32[($7_1 + 684 | 0) >> 2] | 0) + 1 | 0; } - $74($7_1 + 672 | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $7_1 + 688 | 0 | 0, HEAP32[($7_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 680 | 0) >> 2] | 0 | 0); + $74($7_1 + 672 | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $7_1 + 688 | 0 | 0, HEAP32[($7_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 680 | 0) >> 2] | 0 | 0); $22($0_1 | 0, $7_1 + 672 | 0 | 0); $11($7_1 + 672 | 0 | 0); - $11($7_1 + 1096 | 0 | 0); + $11($7_1 + 1104 | 0 | 0); break label$21; } label$33 : { label$34 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72584 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72657 | 0) | 0) { break label$34 } - HEAP32[($7_1 + 668 | 0) >> 2] = $821(1 | 0, 28 | 0) | 0; + HEAP32[($7_1 + 668 | 0) >> 2] = $822(1 | 0, 28 | 0) | 0; label$35 : { if (!((HEAP32[($7_1 + 668 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$35 } - $46(1 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0, 70751 | 0, 0 | 0); + $46(1 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0, 70824 | 0, 0 | 0); break label$4; } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - HEAP32[($7_1 + 664 | 0) >> 2] = HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + HEAP32[($7_1 + 664 | 0) >> 2] = HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0; label$36 : { - if (!(($36((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 272 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!(($36((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 276 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0)) { break label$36 } } @@ -6046,12 +6189,12 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[($7_1 + 668 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$37 } - fimport$0(76388 | 0, 74032 | 0, 5106 | 0, 72571 | 0); + fimport$0(76790 | 0, 74090 | 0, 5085 | 0, 72644 | 0); wasm2js_trap(); } - $484_1 = $763(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $484_1 = $764(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($7_1 + 668 | 0) >> 2] | 0) >> 2] = $484_1; - HEAP32[($7_1 + 660 | 0) >> 2] = $38((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 272 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 668 | 0) >> 2] | 0 | 0, 0 | 0) | 0; + HEAP32[($7_1 + 660 | 0) >> 2] = $38((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 276 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 668 | 0) >> 2] | 0 | 0, 0 | 0) | 0; label$38 : { if (!((HEAP32[($7_1 + 660 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$38 @@ -6059,55 +6202,55 @@ function asmFunc(imports) { $42(HEAP32[($7_1 + 660 | 0) >> 2] | 0 | 0); HEAP32[($7_1 + 660 | 0) >> 2] = 0; } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; label$39 : { label$40 : { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { break label$40 } HEAP8[((HEAP32[($7_1 + 668 | 0) >> 2] | 0) + 16 | 0) >> 0] = 1; - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 40 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 40 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); label$41 : { label$42 : { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (3026478 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (3026478 | 0) & 1 | 0)) { break label$42 } - HEAP32[($7_1 + 656 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; - $539_1 = $763(74083 | 0) | 0; + HEAP32[($7_1 + 656 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; + $539_1 = $764(74141 | 0) | 0; HEAP32[(HEAP32[($7_1 + 656 | 0) >> 2] | 0) >> 2] = $539_1; HEAP32[((HEAP32[($7_1 + 668 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($7_1 + 656 | 0) >> 2] | 0; - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 3026478 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 41 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 3026478 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 41 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; break label$41; } label$43 : { label$44 : { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (41 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (41 | 0) & 1 | 0)) { break label$44 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 41 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 41 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); break label$43; } - $106($7_1 + 648 | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 668 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $106($7_1 + 648 | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 668 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); $22($0_1 | 0, $7_1 + 648 | 0 | 0); $11($7_1 + 648 | 0 | 0); - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); label$45 : { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (3026478 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (3026478 | 0) & 1 | 0)) { break label$45 } - HEAP32[($7_1 + 644 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; - $599_1 = $763(74083 | 0) | 0; + HEAP32[($7_1 + 644 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; + $599_1 = $764(74141 | 0) | 0; HEAP32[(HEAP32[($7_1 + 644 | 0) >> 2] | 0) >> 2] = $599_1; HEAP32[($7_1 + 640 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 668 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; label$46 : { if ((HEAP32[($7_1 + 640 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$46 } - fimport$0(76572 | 0, 74032 | 0, 5158 | 0, 72571 | 0); + fimport$0(76974 | 0, 74090 | 0, 5137 | 0, 72644 | 0); wasm2js_trap(); } label$47 : { @@ -6120,23 +6263,23 @@ function asmFunc(imports) { }; } HEAP32[((HEAP32[($7_1 + 640 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($7_1 + 644 | 0) >> 2] | 0; - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 3026478 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 3026478 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; } - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 41 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 41 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; } } break label$39; } HEAP8[((HEAP32[($7_1 + 668 | 0) >> 2] | 0) + 16 | 0) >> 0] = 0; } - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $107($7_1 + 632 | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 668 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $107($7_1 + 632 | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 668 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); $22($0_1 | 0, $7_1 + 632 | 0 | 0); $11($7_1 + 632 | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; label$49 : { - if ($760(HEAP32[(HEAP32[($7_1 + 668 | 0) >> 2] | 0) >> 2] | 0 | 0, 66253 | 0) | 0) { + if ($761(HEAP32[(HEAP32[($7_1 + 668 | 0) >> 2] | 0) >> 2] | 0 | 0, 66253 | 0) | 0) { break label$49 } label$50 : { @@ -6144,17 +6287,17 @@ function asmFunc(imports) { break label$50 } $58(HEAP32[((HEAP32[($7_1 + 668 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); - HEAP32[($7_1 + 628 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; - $675_1 = $763(74083 | 0) | 0; + HEAP32[($7_1 + 628 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; + $675_1 = $764(74141 | 0) | 0; HEAP32[(HEAP32[($7_1 + 628 | 0) >> 2] | 0) >> 2] = $675_1; HEAP32[((HEAP32[($7_1 + 668 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($7_1 + 628 | 0) >> 2] | 0; $11((HEAP32[($7_1 + 668 | 0) >> 2] | 0) + 4 | 0 | 0); - $724($7_1 + 352 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($7_1 + 348 | 0 | 0, 0 | 0, 280 | 0) | 0; $688_1 = (HEAP32[($7_1 + 668 | 0) >> 2] | 0) + 4 | 0; $697_1 = 0; - $75($7_1 + 344 | 0 | 0, $7_1 + 352 | 0 | 0, 85726 | 0, $697_1 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, $697_1 | 0); - i64toi32_i32$0 = HEAP32[($7_1 + 344 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[($7_1 + 348 | 0) >> 2] | 0; + $75($7_1 + 340 | 0 | 0, $7_1 + 348 | 0 | 0, 86283 | 0, $697_1 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, $697_1 | 0); + i64toi32_i32$0 = HEAP32[($7_1 + 340 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($7_1 + 344 | 0) >> 2] | 0; $2757 = i64toi32_i32$0; i64toi32_i32$0 = $688_1; HEAP32[i64toi32_i32$0 >> 2] = $2757; @@ -6165,259 +6308,259 @@ function asmFunc(imports) { if (!((HEAP32[($7_1 + 664 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$51 } - $110(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 664 | 0) >> 2] | 0 | 0); + $110(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 664 | 0) >> 2] | 0 | 0); } break label$33; } label$52 : { label$53 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71457 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71530 | 0) | 0) { break label$53 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - HEAP32[($7_1 + 340 | 0) >> 2] = $37((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 272 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + HEAP32[($7_1 + 336 | 0) >> 2] = $37((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 276 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 0 | 0) | 0; label$54 : { - if (($59(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) == (0 | 0) & 1 | 0) { + if (($59(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) == (0 | 0) & 1 | 0) { break label$54 } - fimport$0(76504 | 0, 74032 | 0, 5217 | 0, 72571 | 0); + fimport$0(76906 | 0, 74090 | 0, 5196 | 0, 72644 | 0); wasm2js_trap(); } label$55 : { label$56 : { - if (!((HEAP32[($7_1 + 340 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($7_1 + 336 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$56 } - $42(HEAP32[($7_1 + 340 | 0) >> 2] | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $42(HEAP32[($7_1 + 336 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; break label$55; } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; } - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; break label$52; } label$57 : { label$58 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72579 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72652 | 0) | 0) { break label$58 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $108($7_1 + 332 | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $22($0_1 | 0, $7_1 + 332 | 0 | 0); - $11($7_1 + 332 | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $108($7_1 + 328 | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $22($0_1 | 0, $7_1 + 328 | 0 | 0); + $11($7_1 + 328 | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; break label$57; } label$59 : { label$60 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 68420 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 68493 | 0) | 0) { break label$60 } - $795_1 = HEAP32[($7_1 + 2044 | 0) >> 2] | 0; - HEAP32[($795_1 + 320 | 0) >> 2] = (HEAP32[($795_1 + 320 | 0) >> 2] | 0) + 1 | 0; - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $108($7_1 + 324 | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $46(56 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0, 68387 | 0, 0 | 0); - $22($0_1 | 0, $7_1 + 324 | 0 | 0); - $11($7_1 + 324 | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $795_1 = HEAP32[($7_1 + 2060 | 0) >> 2] | 0; + HEAP32[($795_1 + 324 | 0) >> 2] = (HEAP32[($795_1 + 324 | 0) >> 2] | 0) + 1 | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $108($7_1 + 320 | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $46(56 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0, 68460 | 0, 0 | 0); + $22($0_1 | 0, $7_1 + 320 | 0 | 0); + $11($7_1 + 320 | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; break label$59; } label$61 : { label$62 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71290 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71363 | 0) | 0) { break label$62 } - $830_1 = HEAP32[($7_1 + 2044 | 0) >> 2] | 0; - HEAP32[($830_1 + 320 | 0) >> 2] = (HEAP32[($830_1 + 320 | 0) >> 2] | 0) + 1 | 0; + $830_1 = HEAP32[($7_1 + 2060 | 0) >> 2] | 0; + HEAP32[($830_1 + 324 | 0) >> 2] = (HEAP32[($830_1 + 324 | 0) >> 2] | 0) + 1 | 0; label$63 : { - if (!((HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$63 } - $817(HEAP32[((HEAP32[($7_1 + 2020 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $845_1 = $763(86643 | 0) | 0; - HEAP32[((HEAP32[($7_1 + 2020 | 0) >> 2] | 0) + 4 | 0) >> 2] = $845_1; + $818(HEAP32[((HEAP32[($7_1 + 2036 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $845_1 = $764(87200 | 0) | 0; + HEAP32[((HEAP32[($7_1 + 2036 | 0) >> 2] | 0) + 4 | 0) >> 2] = $845_1; } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $108($7_1 + 316 | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $108($7_1 + 312 | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); $861 = 0; - $44($861 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0, 71289 | 0, $861 | 0); - $22($0_1 | 0, $7_1 + 316 | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $11($7_1 + 316 | 0 | 0); + $44($861 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0, 71362 | 0, $861 | 0); + $22($0_1 | 0, $7_1 + 312 | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $11($7_1 + 312 | 0 | 0); break label$61; } label$64 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 74046 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 74104 | 0) | 0) { break label$64 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($0_1 + 4 | 0) >> 2] | 0) >> 2] = 128; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); label$65 : { - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$65 } label$66 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 77750 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 78243 | 0) | 0) { break label$66 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); } label$67 : { label$68 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$68 } - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72891 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72949 | 0) | 0) { break label$68 } - $33((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 292 | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 1 | 0, 0 | 0) | 0; - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $33((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 296 | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 1 | 0, 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; break label$67; } label$69 : { label$70 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$70 } - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 68430 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 68503 | 0) | 0) { break label$70 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - $724($7_1 + 112 | 0 | 0, 0 | 0, 200 | 0) | 0; - $767($7_1 + 112 | 0 | 0, (HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0 | 0, ($764(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) - 2 | 0 | 0) | 0; - $47((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 284 | 0 | 0, $7_1 + 112 | 0 | 0) | 0; - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 129 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + $725($7_1 + 112 | 0 | 0, 0 | 0, 200 | 0) | 0; + $768($7_1 + 112 | 0 | 0, (HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0 | 0, ($765(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) - 2 | 0 | 0) | 0; + $47((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 288 | 0 | 0, $7_1 + 112 | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 129 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; break label$69; } label$71 : { label$72 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$72 } - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73102 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73160 | 0) | 0) { break label$72 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - HEAP32[($7_1 + 108 | 0) >> 2] = $59(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + HEAP32[($7_1 + 108 | 0) >> 2] = $59(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; label$73 : { if (!((HEAP32[($7_1 + 108 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$73 } HEAP8[((HEAP32[($7_1 + 108 | 0) >> 2] | 0) + 24 | 0) >> 0] = 1; } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; break label$71; } label$74 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$74 } - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 67536 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 67609 | 0) | 0) { break label$74 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); - HEAP8[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 66 | 0) >> 0] = 1; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); + HEAP8[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 66 | 0) >> 0] = 1; } } } } label$75 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$75 } - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73849 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73907 | 0) | 0) { break label$75 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); label$76 : { label$77 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$77 } - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71141 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71214 | 0) | 0) { break label$77 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; label$78 : { - if (!((HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >>> 0 < 10 >>> 0 & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >>> 0 < 10 >>> 0 & 1 | 0)) { break label$78 } - $1086 = HEAP32[($7_1 + 2044 | 0) >> 2] | 0; + $1086 = HEAP32[($7_1 + 2060 | 0) >> 2] | 0; HEAP32[($1086 + 8 | 0) >> 2] = (HEAP32[($1086 + 8 | 0) >> 2] | 0) + 1 | 0; - HEAP32[(((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] = HEAP32[(((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 12 | 0) + (((HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) - 1 | 0) << 2 | 0) | 0) >> 2] | 0; + HEAP32[(((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] = HEAP32[(((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 12 | 0) + (((HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) - 1 | 0) << 2 | 0) | 0) >> 2] | 0; } break label$76; } label$79 : { label$80 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$80 } - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 69599 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 69672 | 0) | 0) { break label$80 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; label$81 : { - if (!((HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$81 } - $1134 = HEAP32[($7_1 + 2044 | 0) >> 2] | 0; + $1134 = HEAP32[($7_1 + 2060 | 0) >> 2] | 0; HEAP32[($1134 + 8 | 0) >> 2] = (HEAP32[($1134 + 8 | 0) >> 2] | 0) + -1 | 0; } break label$79; } label$82 : { label$83 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$83 } - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71290 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71363 | 0) | 0) { break label$83 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); label$84 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$84 } - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { break label$84 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 129 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($7_1 + 104 | 0) >> 2] = $111(((HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0) + 2 | 0 | 0) | 0; - $1195 = ((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 129 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($7_1 + 104 | 0) >> 2] = $111(((HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0) + 2 | 0 | 0) | 0; + $1195 = ((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0; HEAP32[$1195 >> 2] = HEAP32[$1195 >> 2] | 0 | (HEAP32[($7_1 + 104 | 0) >> 2] | 0) | 0; } break label$82; } label$85 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$85 } - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72224 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72297 | 0) | 0) { break label$85 } - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; - $101(HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; + $101(HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); label$86 : { - if (!((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$86 } - if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { break label$86 } - HEAP32[($7_1 + 100 | 0) >> 2] = $111(((HEAP32[((HEAP32[(HEAP32[($7_1 + 2040 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0) + 2 | 0 | 0) | 0; - $1253 = ((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($7_1 + 2044 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0; + HEAP32[($7_1 + 100 | 0) >> 2] = $111(((HEAP32[((HEAP32[(HEAP32[($7_1 + 2056 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0) + 2 | 0 | 0) | 0; + $1253 = ((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($7_1 + 2060 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0; HEAP32[$1253 >> 2] = (HEAP32[$1253 >> 2] | 0) & ((HEAP32[($7_1 + 100 | 0) >> 2] | 0) ^ -1 | 0) | 0; } } @@ -6426,9 +6569,9 @@ function asmFunc(imports) { } } } - $108($7_1 + 92 | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0); + $108($7_1 + 92 | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0); $22($0_1 | 0, $7_1 + 92 | 0 | 0); - $99($0_1 | 0, HEAP32[($7_1 + 2040 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2032 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2044 | 0) >> 2] | 0 | 0) | 0; + $99($0_1 | 0, HEAP32[($7_1 + 2056 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($7_1 + 2048 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 2060 | 0) >> 2] | 0 | 0) | 0; $11($7_1 + 92 | 0 | 0); } } @@ -6444,7 +6587,7 @@ function asmFunc(imports) { } } } - global$0 = $7_1 + 2048 | 0; + global$0 = $7_1 + 2064 | 0; return; } @@ -6519,7 +6662,7 @@ function asmFunc(imports) { HEAP32[($7_1 + 76 | 0) >> 2] = 0; } label$8 : { - if (!((HEAPU8[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 316 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 320 | 0) >> 0] | 0) & 1 | 0)) { break label$8 } label$9 : { @@ -6530,7 +6673,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($0_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$10 } - if ($760(HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73490 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73548 | 0) | 0) { break label$10 } HEAP32[($7_1 + 76 | 0) >> 2] = 0; @@ -6551,7 +6694,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($7_1 + 68 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$12 } - if ($760(HEAP32[((HEAP32[($7_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73490 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($7_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73548 | 0) | 0) { break label$12 } HEAP32[($7_1 + 76 | 0) >> 2] = 0; @@ -6567,7 +6710,7 @@ function asmFunc(imports) { HEAP32[($7_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($7_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; $116($7_1 + 48 | 0 | 0, HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 88 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 80 | 0) >> 2] | 0 | 0); label$14 : { - if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$14 } $55($7_1 + 48 | 0 | 0); @@ -6614,7 +6757,7 @@ function asmFunc(imports) { $21(HEAP32[($7_1 + 88 | 0) >> 2] | 0 | 0, $7_1 + 40 | 0 | 0); label$21 : { label$22 : { - if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 268 | 0) >> 2] | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) & 1 | 0)) { break label$22 } break label$21; @@ -6661,7 +6804,7 @@ function asmFunc(imports) { HEAP32[($7_1 + 28 | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($7_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; $116($7_1 + 12 | 0 | 0, HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 88 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 80 | 0) >> 2] | 0 | 0); label$30 : { - if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$30 } $55($7_1 + 12 | 0 | 0); @@ -6671,7 +6814,7 @@ function asmFunc(imports) { } label$31 : { label$32 : { - if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 268 | 0) >> 2] | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) & 1 | 0)) { break label$32 } break label$31; @@ -6690,7 +6833,7 @@ function asmFunc(imports) { } $117($7_1 + 4 | 0 | 0, HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, 0 | 0, HEAP32[($7_1 + 76 | 0) >> 2] | 0 | 0, $7_1 + 12 | 0 | 0, HEAP32[($7_1 + 80 | 0) >> 2] | 0 | 0); label$35 : { - if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$35 } $55($7_1 + 12 | 0 | 0); @@ -6734,7 +6877,7 @@ function asmFunc(imports) { if (!(($45(HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, 16384 | 0) | 0) & 1 | 0)) { break label$40 } - $43(HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 88 | 0) >> 2] | 0) >> 2] | 0 | 0, 86647 | 0, 0 | 0); + $43(HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 88 | 0) >> 2] | 0) >> 2] | 0 | 0, 87204 | 0, 0 | 0); } break label$38; } @@ -6746,7 +6889,7 @@ function asmFunc(imports) { $44(4096 | 0, HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 88 | 0) >> 2] | 0) >> 2] | 0 | 0, 66351 | 0, 0 | 0); break label$41; } - $44(8192 | 0, HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 88 | 0) >> 2] | 0) >> 2] | 0 | 0, 71334 | 0, 0 | 0); + $44(8192 | 0, HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 88 | 0) >> 2] | 0) >> 2] | 0 | 0, 71407 | 0, 0 | 0); } } } @@ -6768,7 +6911,7 @@ function asmFunc(imports) { HEAP8[($7_1 + 2 | 0) >> 0] = $455_1 & 1 | 0; label$45 : { label$46 : { - if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 268 | 0) >> 2] | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) & 1 | 0)) { break label$46 } label$47 : { @@ -6965,7 +7108,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$6 } - if ($760(HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73490 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73548 | 0) | 0) { break label$6 } $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); @@ -6982,17 +7125,17 @@ function asmFunc(imports) { HEAP32[($5_1 + 768 | 0) >> 2] = $59(HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; HEAP32[($5_1 + 764 | 0) >> 2] = $8(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($5_1 + 764 | 0) >> 2] | 0) >> 2] = 133; - $817(HEAP32[((HEAP32[($5_1 + 764 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($5_1 + 764 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); label$8 : { label$9 : { if (!((HEAP32[($5_1 + 768 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } - $64_1 = $763(84637 | 0) | 0; + $64_1 = $764(85194 | 0) | 0; HEAP32[((HEAP32[($5_1 + 764 | 0) >> 2] | 0) + 4 | 0) >> 2] = $64_1; break label$8; } - $67_1 = $763(84801 | 0) | 0; + $67_1 = $764(85358 | 0) | 0; HEAP32[((HEAP32[($5_1 + 764 | 0) >> 2] | 0) + 4 | 0) >> 2] = $67_1; } $17($0_1 | 0, HEAP32[($5_1 + 764 | 0) >> 2] | 0 | 0) | 0; @@ -7004,7 +7147,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { break label$11 } - $46(54 | 0, HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0 | 0, 85994 | 0, 0 | 0); + $46(54 | 0, HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0 | 0, 86551 | 0, 0 | 0); break label$2; } $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); @@ -7017,10 +7160,10 @@ function asmFunc(imports) { break label$13 } label$14 : { - if (!($760(HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72816 | 0) | 0)) { + if (!($761(HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72874 | 0) | 0)) { break label$14 } - if ($760(HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73600 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73658 | 0) | 0) { break label$13 } } @@ -7028,13 +7171,13 @@ function asmFunc(imports) { $90(HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); $90(HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); - $724($5_1 + 656 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($5_1 + 656 | 0 | 0, 0 | 0, 100 | 0) | 0; label$15 : { label$16 : { if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { break label$16 } - $759($5_1 + 656 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $760($5_1 + 656 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); break label$15; } @@ -7044,22 +7187,22 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (62 | 0) & 1 | 0)) { break label$17 } - $759($5_1 + 656 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $760($5_1 + 656 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); continue label$18; }; } $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); } - $724($5_1 + 352 | 0 | 0, 0 | 0, 300 | 0) | 0; - $724($5_1 + 144 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($5_1 + 352 | 0 | 0, 0 | 0, 300 | 0) | 0; + $725($5_1 + 144 | 0 | 0, 0 | 0, 200 | 0) | 0; HEAP8[($5_1 + 143 | 0) >> 0] = 0; HEAP32[($5_1 + 136 | 0) >> 2] = $48(HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, $5_1 + 656 | 0 | 0, $5_1 + 352 | 0 | 0, $5_1 + 143 | 0 | 0, $5_1 + 144 | 0 | 0, 200 | 0) | 0; HEAP8[($5_1 + 135 | 0) >> 0] = (HEAP32[($5_1 + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0; - $817(HEAP32[($5_1 + 136 | 0) >> 2] | 0 | 0); - HEAP32[($5_1 + 128 | 0) >> 2] = $821(1 | 0, 40 | 0) | 0; + $818(HEAP32[($5_1 + 136 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 128 | 0) >> 2] = $822(1 | 0, 40 | 0) | 0; HEAP32[(HEAP32[($5_1 + 128 | 0) >> 2] | 0) >> 2] = 133; - $195_1 = $763(((HEAPU8[($5_1 + 135 | 0) >> 0] | 0) & 1 | 0 ? 84637 : 84801) | 0) | 0; + $195_1 = $764(((HEAPU8[($5_1 + 135 | 0) >> 0] | 0) & 1 | 0 ? 85194 : 85358) | 0) | 0; HEAP32[((HEAP32[($5_1 + 128 | 0) >> 2] | 0) + 4 | 0) >> 2] = $195_1; $197_1 = HEAP32[($5_1 + 128 | 0) >> 2] | 0; HEAP32[($197_1 + 24 | 0) >> 2] = HEAP32[($197_1 + 24 | 0) >> 2] | 0 | 1 | 0; @@ -7072,29 +7215,29 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$20 } - if ($760(HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71590 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71663 | 0) | 0) { break label$20 } $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); $90(HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); $90(HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); - $724($5_1 + 16 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($5_1 + 16 | 0 | 0, 0 | 0, 100 | 0) | 0; label$21 : { label$22 : while (1) { if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { break label$21 } - $759($5_1 + 16 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $760($5_1 + 16 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); continue label$22; }; } $7(HEAP32[($5_1 + 776 | 0) >> 2] | 0 | 0); HEAP8[($5_1 + 15 | 0) >> 0] = 0; - HEAP32[($5_1 + 8 | 0) >> 2] = $821(1 | 0, 40 | 0) | 0; + HEAP32[($5_1 + 8 | 0) >> 2] = $822(1 | 0, 40 | 0) | 0; HEAP32[(HEAP32[($5_1 + 8 | 0) >> 2] | 0) >> 2] = 133; - $256_1 = $763(((HEAPU8[($5_1 + 15 | 0) >> 0] | 0) & 1 | 0 ? 84637 : 84801) | 0) | 0; + $256_1 = $764(((HEAPU8[($5_1 + 15 | 0) >> 0] | 0) & 1 | 0 ? 85194 : 85358) | 0) | 0; HEAP32[((HEAP32[($5_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $256_1; $258_1 = HEAP32[($5_1 + 8 | 0) >> 2] | 0; HEAP32[($258_1 + 24 | 0) >> 2] = HEAP32[($258_1 + 24 | 0) >> 2] | 0 | 1 | 0; @@ -7160,7 +7303,7 @@ function asmFunc(imports) { if (!(($25(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$1 } - fimport$0(85342 | 0, 74032 | 0, 4273 | 0, 67346 | 0); + fimport$0(85899 | 0, 74090 | 0, 4252 | 0, 67406 | 0); wasm2js_trap(); } i64toi32_i32$0 = 0; @@ -7184,14 +7327,14 @@ function asmFunc(imports) { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - $817(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $50_1 = $763(84637 | 0) | 0; + $818(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $50_1 = $764(85194 | 0) | 0; HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] = $50_1; break label$6; } label$8 : { label$9 : { - if ($760(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71507 | 0) | 0) { + if ($761(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71580 | 0) | 0) { break label$9 } HEAP8[(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0) >> 0] = 49; @@ -7200,15 +7343,15 @@ function asmFunc(imports) { } label$10 : { label$11 : { - if ($760(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72213 | 0) | 0) { + if ($761(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72286 | 0) | 0) { break label$11 } HEAP8[(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0) >> 0] = 48; HEAP8[((HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0) >> 0] = 0; break label$10; } - $817(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $75_1 = $763(84801 | 0) | 0; + $818(HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $75_1 = $764(85358 | 0) | 0; HEAP32[((HEAP32[$5_1 >> 2] | 0) + 4 | 0) >> 2] = $75_1; } } @@ -7225,7 +7368,7 @@ function asmFunc(imports) { if (!(($25($0_1 | 0) | 0) & 1 | 0)) { break label$12 } - fimport$0(85932 | 0, 74032 | 0, 4324 | 0, 67346 | 0); + fimport$0(86489 | 0, 74090 | 0, 4303 | 0, 67406 | 0); wasm2js_trap(); } global$0 = $5_1 + 16 | 0; @@ -7268,7 +7411,7 @@ function asmFunc(imports) { HEAP32[($6_1 + 404 | 0) >> 2] = $2_1; HEAP32[($6_1 + 400 | 0) >> 2] = $3_1; HEAP32[($6_1 + 396 | 0) >> 2] = HEAP32[(HEAP32[($6_1 + 404 | 0) >> 2] | 0) >> 2] | 0; - HEAP8[((HEAP32[($6_1 + 412 | 0) >> 2] | 0) + 316 | 0) >> 0] = 1; + HEAP8[((HEAP32[($6_1 + 412 | 0) >> 2] | 0) + 320 | 0) >> 0] = 1; i64toi32_i32$0 = 0; i64toi32_i32$1 = $6_1; HEAP32[($6_1 + 384 | 0) >> 2] = 0; @@ -7294,25 +7437,25 @@ function asmFunc(imports) { }; $94($6_1 + 376 | 0 | 0, $6_1 + 384 | 0 | 0); $9(HEAP32[($6_1 + 408 | 0) >> 2] | 0 | 0, $6_1 + 384 | 0 | 0); - HEAP32[($6_1 + 372 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 412 | 0) >> 2] | 0) + 268 | 0) >> 2] | 0; + HEAP32[($6_1 + 372 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 412 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0; $52_1 = HEAP32[($6_1 + 412 | 0) >> 2] | 0; - HEAP32[($52_1 + 268 | 0) >> 2] = HEAP32[($52_1 + 268 | 0) >> 2] | 0 | 1 | 0; + HEAP32[($52_1 + 272 | 0) >> 2] = HEAP32[($52_1 + 272 | 0) >> 2] | 0 | 1 | 0; $95($6_1 + 364 | 0 | 0, HEAP32[($6_1 + 412 | 0) >> 2] | 0 | 0, $6_1 + 376 | 0 | 0, 1 | 0); - HEAP32[((HEAP32[($6_1 + 412 | 0) >> 2] | 0) + 268 | 0) >> 2] = HEAP32[($6_1 + 372 | 0) >> 2] | 0; + HEAP32[((HEAP32[($6_1 + 412 | 0) >> 2] | 0) + 272 | 0) >> 2] = HEAP32[($6_1 + 372 | 0) >> 2] | 0; $89($6_1 + 356 | 0 | 0, HEAP32[($6_1 + 412 | 0) >> 2] | 0 | 0, $6_1 + 364 | 0 | 0); $91($6_1 + 348 | 0 | 0, HEAP32[($6_1 + 412 | 0) >> 2] | 0 | 0, $6_1 + 356 | 0 | 0); label$4 : { if ((HEAP32[($6_1 + 348 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$4 } - fimport$0(76858 | 0, 74032 | 0, 4397 | 0, 70172 | 0); + fimport$0(77260 | 0, 74090 | 0, 4376 | 0, 70245 | 0); wasm2js_trap(); } - $724($6_1 + 20 | 0 | 0, 0 | 0, 328 | 0) | 0; + $725($6_1 + 16 | 0 | 0, 0 | 0, 332 | 0) | 0; i64toi32_i32$0 = HEAP32[($6_1 + 348 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($6_1 + 352 | 0) >> 2] | 0; $319_1 = i64toi32_i32$0; - i64toi32_i32$0 = ($6_1 + 20 | 0) + 308 | 0; + i64toi32_i32$0 = ($6_1 + 16 | 0) + 312 | 0; HEAP32[i64toi32_i32$0 >> 2] = $319_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; HEAP32[($6_1 + 324 | 0) >> 2] = HEAP32[($6_1 + 328 | 0) >> 2] | 0; @@ -7321,13 +7464,13 @@ function asmFunc(imports) { HEAP32[($6_1 + 8 | 0) >> 2] = 0; HEAP32[($6_1 + 12 | 0) >> 2] = i64toi32_i32$1; label$5 : { - if (!($96($6_1 + 20 | 0 | 0, $6_1 + 8 | 0 | 0) | 0)) { + if (!($96($6_1 + 16 | 0 | 0, $6_1 + 8 | 0 | 0) | 0)) { break label$5 } - $46(55 | 0, HEAP32[($6_1 + 412 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 396 | 0) >> 2] | 0 | 0, 68394 | 0, 0 | 0); + $46(55 | 0, HEAP32[($6_1 + 412 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 396 | 0) >> 2] | 0 | 0, 68467 | 0, 0 | 0); } - HEAP8[((HEAP32[($6_1 + 412 | 0) >> 2] | 0) + 316 | 0) >> 0] = 0; - $40($6_1 + 20 | 0 | 0); + HEAP8[((HEAP32[($6_1 + 412 | 0) >> 2] | 0) + 320 | 0) >> 0] = 0; + $40($6_1 + 16 | 0 | 0); $11($6_1 + 376 | 0 | 0); $11($6_1 + 384 | 0 | 0); i64toi32_i32$1 = HEAP32[($6_1 + 8 | 0) >> 2] | 0; @@ -7473,7 +7616,7 @@ function asmFunc(imports) { i64toi32_i32$0 = HEAP32[($4_1 + 8 | 0) >> 2] | 0; HEAP32[i64toi32_i32$0 >> 2] = $41_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - $15_1 = (HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0; + $15_1 = (HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0; global$0 = $4_1 + 16 | 0; return $15_1 | 0; } @@ -7490,16 +7633,16 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; } label$4 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (63 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (63 | 0) & 1 | 0)) { break label$4 } $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; @@ -7521,7 +7664,7 @@ function asmFunc(imports) { } $299(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); label$7 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$7 } break label$2; @@ -7533,7 +7676,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 20 | 0) >> 2] = i64toi32_i32$2; $97(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, $4_1 + 16 | 0 | 0); label$8 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$8 } break label$2; @@ -7546,7 +7689,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = i64toi32_i32$2; $299(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); label$9 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$9 } break label$2; @@ -7554,7 +7697,7 @@ function asmFunc(imports) { $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; $97(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); label$10 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$10 } break label$2; @@ -7630,10 +7773,10 @@ function asmFunc(imports) { $52_1 = $26(HEAP32[($7_1 + 20 | 0) >> 2] | 0 | 0) | 0; HEAP32[($7_1 + 4 | 0) >> 2] = $26(HEAP32[(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; HEAP32[$7_1 >> 2] = $52_1; - $46(34 | 0, $48_1 | 0, $50_1 | 0, 87191 | 0, $7_1 | 0); + $46(34 | 0, $48_1 | 0, $50_1 | 0, 87771 | 0, $7_1 | 0); break label$7; } - $46(34 | 0, HEAP32[($7_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 97936 | 0, 0 | 0); + $46(34 | 0, HEAP32[($7_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 98516 | 0, 0 | 0); } break label$2; } @@ -7649,7 +7792,7 @@ function asmFunc(imports) { } } } - $86_1 = (HEAP32[((HEAP32[($7_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0; + $86_1 = (HEAP32[((HEAP32[($7_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0; global$0 = $7_1 + 32 | 0; return $86_1 | 0; } @@ -7680,14 +7823,14 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0) { break label$1 } - fimport$0(75169 | 0, 74032 | 0, 4484 | 0, 69590 | 0); + fimport$0(75527 | 0, 74090 | 0, 4463 | 0, 69663 | 0); wasm2js_trap(); } label$2 : { label$3 : { label$4 : { label$5 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71474 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71547 | 0) | 0) { break label$5 } $99($0_1 | 0, HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($8_1 + 48 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -7706,7 +7849,7 @@ function asmFunc(imports) { } label$7 : { label$8 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71465 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71538 | 0) | 0) { break label$8 } $99($0_1 | 0, HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($8_1 + 48 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -7725,7 +7868,7 @@ function asmFunc(imports) { } label$10 : { label$11 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71454 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71527 | 0) | 0) { break label$11 } $99($0_1 | 0, HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($8_1 + 48 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -7763,7 +7906,7 @@ function asmFunc(imports) { $99($0_1 | 0, HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0, 10 | 0, HEAP32[($8_1 + 48 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0) | 0; break label$10; } - $46(1 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 73394 | 0, 0 | 0); + $46(1 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0 | 0, 73452 | 0, 0 | 0); break label$3; } } @@ -7783,14 +7926,14 @@ function asmFunc(imports) { if ((HEAP32[($8_1 + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$15 } - fimport$0(76488 | 0, 74032 | 0, 4539 | 0, 69590 | 0); + fimport$0(76890 | 0, 74090 | 0, 4518 | 0, 69663 | 0); wasm2js_trap(); } label$16 : { if ((HEAP32[($8_1 + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$16 } - fimport$0(76262 | 0, 74032 | 0, 4540 | 0, 69590 | 0); + fimport$0(76664 | 0, 74090 | 0, 4519 | 0, 69663 | 0); wasm2js_trap(); } if (!(0 & 1 | 0)) { @@ -7861,7 +8004,7 @@ function asmFunc(imports) { HEAP32[($8_1 + 36 | 0) >> 2] = i64toi32_i32$0; label$1 : { label$2 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71446 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71519 | 0) | 0) { break label$2 } $99($0_1 | 0, HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($8_1 + 48 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -7893,7 +8036,7 @@ function asmFunc(imports) { } label$5 : { label$6 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71472 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71545 | 0) | 0) { break label$6 } $99($0_1 | 0, HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($8_1 + 48 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -7902,7 +8045,7 @@ function asmFunc(imports) { if (!((HEAPU8[($8_1 + 55 | 0) >> 0] | 0) & 1 | 0)) { break label$7 } - i64toi32_i32$0 = ($36((HEAP32[($8_1 + 60 | 0) >> 2] | 0) + 272 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0 ? 1 : 0; + i64toi32_i32$0 = ($36((HEAP32[($8_1 + 60 | 0) >> 2] | 0) + 276 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0 ? 1 : 0; i64toi32_i32$1 = i64toi32_i32$0 >> 31 | 0; $362_1 = i64toi32_i32$0; i64toi32_i32$0 = $8_1; @@ -7913,7 +8056,7 @@ function asmFunc(imports) { break label$5; } label$8 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71463 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71536 | 0) | 0) { break label$8 } $99($0_1 | 0, HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0, 8996 | 0, HEAP32[($8_1 + 48 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -7922,7 +8065,7 @@ function asmFunc(imports) { if (!((HEAPU8[($8_1 + 55 | 0) >> 0] | 0) & 1 | 0)) { break label$9 } - i64toi32_i32$0 = ($36((HEAP32[($8_1 + 60 | 0) >> 2] | 0) + 272 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) == (0 | 0) & 1 | 0 ? 1 : 0; + i64toi32_i32$0 = ($36((HEAP32[($8_1 + 60 | 0) >> 2] | 0) + 276 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($8_1 + 56 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) == (0 | 0) & 1 | 0 ? 1 : 0; i64toi32_i32$1 = i64toi32_i32$0 >> 31 | 0; $441_1 = i64toi32_i32$0; i64toi32_i32$0 = $8_1; @@ -7997,13 +8140,13 @@ function asmFunc(imports) { break label$2 } label$3 : { - if (($78(HEAP32[(HEAP32[($8_1 + 40 | 0) >> 2] | 0) >> 2] | 0 | 0, 71446 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($8_1 + 40 | 0) >> 2] | 0) >> 2] | 0 | 0, 71519 | 0) | 0) & 1 | 0) { break label$3 } - if (($78(HEAP32[(HEAP32[($8_1 + 40 | 0) >> 2] | 0) >> 2] | 0 | 0, 71472 | 0) | 0) & 1 | 0) { + if (($78(HEAP32[(HEAP32[($8_1 + 40 | 0) >> 2] | 0) >> 2] | 0 | 0, 71545 | 0) | 0) & 1 | 0) { break label$3 } - if (!(($78(HEAP32[(HEAP32[($8_1 + 40 | 0) >> 2] | 0) >> 2] | 0 | 0, 71463 | 0) | 0) & 1 | 0)) { + if (!(($78(HEAP32[(HEAP32[($8_1 + 40 | 0) >> 2] | 0) >> 2] | 0 | 0, 71536 | 0) | 0) & 1 | 0)) { break label$2 } } @@ -8100,14 +8243,14 @@ function asmFunc(imports) { HEAP32[$0_1 >> 2] = 0; HEAP32[($0_1 + 4 | 0) >> 2] = i64toi32_i32$0; $90(HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0, $0_1 | 0, HEAP32[($7_1 + 20 | 0) >> 2] | 0 | 0); - HEAP32[($7_1 + 12 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; - $16_1 = $763(HEAP32[((HEAP32[(HEAP32[($7_1 + 20 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($7_1 + 12 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; + $16_1 = $764(HEAP32[((HEAP32[(HEAP32[($7_1 + 20 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($7_1 + 12 | 0) >> 2] | 0) >> 2] = $16_1; label$1 : { if ((HEAP32[((HEAP32[($7_1 + 24 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(76123 | 0, 74032 | 0, 4764 | 0, 66166 | 0); + fimport$0(76525 | 0, 74090 | 0, 4743 | 0, 66166 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($7_1 + 24 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($7_1 + 12 | 0) >> 2] | 0; @@ -8127,14 +8270,14 @@ function asmFunc(imports) { } break label$2; } - HEAP32[($7_1 + 4 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; - $70_1 = $763(HEAP32[((HEAP32[(HEAP32[($7_1 + 20 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($7_1 + 4 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; + $70_1 = $764(HEAP32[((HEAP32[(HEAP32[($7_1 + 20 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($7_1 + 4 | 0) >> 2] | 0) >> 2] = $70_1; label$5 : { if ((HEAP32[((HEAP32[($7_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$5 } - fimport$0(75743 | 0, 74032 | 0, 4784 | 0, 66166 | 0); + fimport$0(76145 | 0, 74090 | 0, 4763 | 0, 66166 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($7_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($7_1 + 4 | 0) >> 2] | 0; @@ -8182,7 +8325,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($7_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(76451 | 0, 74032 | 0, 4808 | 0, 66086 | 0); + fimport$0(76853 | 0, 74090 | 0, 4787 | 0, 66086 | 0); wasm2js_trap(); } $94($7_1 + 8 | 0 | 0, $0_1 | 0); @@ -8197,7 +8340,7 @@ function asmFunc(imports) { $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; $3_1 = $3_1 | 0; - var $6_1 = 0, i64toi32_i32$0 = 0; + var $6_1 = 0, $16_1 = 0, i64toi32_i32$0 = 0; $6_1 = global$0 - 16 | 0; global$0 = $6_1; HEAP32[($6_1 + 12 | 0) >> 2] = $1_1; @@ -8206,15 +8349,23 @@ function asmFunc(imports) { i64toi32_i32$0 = 0; HEAP32[$0_1 >> 2] = 0; HEAP32[($0_1 + 4 | 0) >> 2] = i64toi32_i32$0; - label$1 : { - label$2 : while (1) { - if (!((HEAP32[(HEAP32[(HEAP32[($6_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (10 | 0) & 1 | 0)) { - break label$1 + label$1 : while (1) { + $16_1 = 0; + label$2 : { + if (!((HEAP32[(HEAP32[($6_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$2 + } + $16_1 = (HEAP32[(HEAP32[(HEAP32[($6_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (10 | 0); + } + label$3 : { + if (!($16_1 & 1 | 0)) { + break label$3 } $87($0_1 | 0, HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 4 | 0) >> 2] | 0 | 0); - continue label$2; - }; - } + continue label$1; + } + break label$1; + }; global$0 = $6_1 + 16 | 0; return; } @@ -8235,7 +8386,7 @@ function asmFunc(imports) { break label$1; } label$3 : { - if (!($760(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86015 | 0) | 0)) { + if (!($761(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86572 | 0) | 0)) { break label$3 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -8250,7 +8401,7 @@ function asmFunc(imports) { break label$1; } label$5 : { - if (!($760(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86015 | 0) | 0)) { + if (!($761(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86572 | 0) | 0)) { break label$5 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -8265,7 +8416,7 @@ function asmFunc(imports) { break label$1; } label$7 : { - if (!($760(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73114 | 0) | 0)) { + if (!($761(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73172 | 0) | 0)) { break label$7 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -8280,7 +8431,7 @@ function asmFunc(imports) { break label$1; } label$9 : { - if (!($760(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86013 | 0) | 0)) { + if (!($761(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86570 | 0) | 0)) { break label$9 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -8295,7 +8446,7 @@ function asmFunc(imports) { break label$1; } label$11 : { - if (!($760(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 84801 | 0) | 0)) { + if (!($761(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 85358 | 0) | 0)) { break label$11 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -8310,7 +8461,7 @@ function asmFunc(imports) { break label$1; } label$13 : { - if (!($760(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86013 | 0) | 0)) { + if (!($761(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86570 | 0) | 0)) { break label$13 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -8354,7 +8505,7 @@ function asmFunc(imports) { if (($112(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$1 } - $43(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67453 | 0, 0 | 0); + $43(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67513 | 0, 0 | 0); } global$0 = $4_1 + 16 | 0; return; @@ -8374,10 +8525,10 @@ function asmFunc(imports) { break label$2 } label$4 : { - if ($765(HEAP32[((101712 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, $764(HEAP32[((101712 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) | 0) { + if ($766(HEAP32[((102288 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, $765(HEAP32[((102288 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) | 0) { break label$4 } - HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[(101712 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) >> 2] | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[(102288 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) >> 2] | 0; break label$1; } HEAP32[($3_1 + 4 | 0) >> 2] = (HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 1 | 0; @@ -8493,14 +8644,14 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($7_1 + 40 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$5 } - fimport$0(85879 | 0, 74032 | 0, 5853 | 0, 69970 | 0); + fimport$0(86436 | 0, 74090 | 0, 5832 | 0, 70043 | 0); wasm2js_trap(); } label$6 : { if (!(($1(HEAP32[($7_1 + 40 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$6 } - fimport$0(85695 | 0, 74032 | 0, 5854 | 0, 69970 | 0); + fimport$0(86252 | 0, 74090 | 0, 5833 | 0, 70043 | 0); wasm2js_trap(); } HEAP32[($7_1 + 36 | 0) >> 2] = 0; @@ -8532,7 +8683,7 @@ function asmFunc(imports) { HEAP32[($7_1 + 36 | 0) >> 2] = 0; } label$10 : { - if (!((HEAPU8[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 316 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 320 | 0) >> 0] | 0) & 1 | 0)) { break label$10 } label$11 : { @@ -8543,7 +8694,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($0_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$12 } - if ($760(HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73490 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73548 | 0) | 0) { break label$12 } HEAP32[($7_1 + 36 | 0) >> 2] = 0; @@ -8564,7 +8715,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($7_1 + 32 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$14 } - if ($760(HEAP32[((HEAP32[($7_1 + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73490 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($7_1 + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73548 | 0) | 0) { break label$14 } HEAP32[($7_1 + 36 | 0) >> 2] = 0; @@ -8581,7 +8732,7 @@ function asmFunc(imports) { HEAP32[($7_1 + 28 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 40 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; $116($7_1 + 12 | 0 | 0, HEAP32[($7_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 36 | 0) >> 2] | 0 | 0, $7_1 + 40 | 0 | 0, HEAP32[($7_1 + 48 | 0) >> 2] | 0 | 0); label$17 : { - if (!((HEAP32[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$17 } $55($7_1 + 12 | 0 | 0); @@ -8590,7 +8741,7 @@ function asmFunc(imports) { } $117($7_1 + 4 | 0 | 0, HEAP32[($7_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 56 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 36 | 0) >> 2] | 0 | 0, $7_1 + 12 | 0 | 0, HEAP32[($7_1 + 48 | 0) >> 2] | 0 | 0); label$18 : { - if (!((HEAP32[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 60 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$18 } $11($7_1 + 40 | 0 | 0); @@ -8616,7 +8767,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($7_1 + 40 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$20 } - fimport$0(85879 | 0, 74032 | 0, 5936 | 0, 69970 | 0); + fimport$0(86436 | 0, 74090 | 0, 5915 | 0, 70043 | 0); wasm2js_trap(); } $88($0_1 | 0, $7_1 + 40 | 0 | 0); @@ -8638,109 +8789,109 @@ function asmFunc(imports) { $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; var $5_1 = 0, i64toi32_i32$0 = 0, $52_1 = 0, $74_1 = 0, $94_1 = 0, $110_1 = 0, $125_1 = 0; - $5_1 = global$0 - 336 | 0; + $5_1 = global$0 - 352 | 0; global$0 = $5_1; - HEAP32[($5_1 + 332 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 328 | 0) >> 2] = $2_1; + HEAP32[($5_1 + 348 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 344 | 0) >> 2] = $2_1; i64toi32_i32$0 = 0; HEAP32[$0_1 >> 2] = 0; HEAP32[($0_1 + 4 | 0) >> 2] = i64toi32_i32$0; label$1 : { label$2 : while (1) { - if (!((HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } label$3 : { - if (!((HEAP32[((HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { + if (!((HEAP32[((HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$3 } - fimport$0(85823 | 0, 74032 | 0, 5560 | 0, 72196 | 0); + fimport$0(86380 | 0, 74090 | 0, 5539 | 0, 72269 | 0); wasm2js_trap(); } label$4 : { label$5 : { - if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (8995 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (8995 | 0) & 1 | 0)) { break label$5 } label$6 : { if (!((HEAP32[($0_1 + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$6 } - $46(59 | 0, HEAP32[($5_1 + 332 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0 | 0, 85522 | 0, 0 | 0); + $46(59 | 0, HEAP32[($5_1 + 348 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0 | 0, 86079 | 0, 0 | 0); break label$1; } - $7(HEAP32[($5_1 + 328 | 0) >> 2] | 0 | 0); - HEAP32[($5_1 + 320 | 0) >> 2] = 0; + $7(HEAP32[($5_1 + 344 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 336 | 0) >> 2] = 0; i64toi32_i32$0 = 0; - HEAP32[($5_1 + 312 | 0) >> 2] = 0; - HEAP32[($5_1 + 316 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($5_1 + 328 | 0) >> 2] = 0; + HEAP32[($5_1 + 332 | 0) >> 2] = i64toi32_i32$0; $52_1 = 24; label$7 : { if (!(((HEAPU8[(HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 0] | 0) << $52_1 | 0) >> $52_1 | 0)) { break label$7 } HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $13($5_1 + 312 | 0 | 0, 68053 | 0, $5_1 + 16 | 0 | 0) | 0; + $13($5_1 + 328 | 0 | 0, 68126 | 0, $5_1 + 16 | 0 | 0) | 0; } label$8 : { - if (!((HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } $74_1 = 24; - if (!(((HEAPU8[(HEAP32[((HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 0] | 0) << $74_1 | 0) >> $74_1 | 0)) { + if (!(((HEAPU8[(HEAP32[((HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 0] | 0) << $74_1 | 0) >> $74_1 | 0)) { break label$8 } - HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $13($5_1 + 312 | 0 | 0, 68053 | 0, $5_1 | 0) | 0; + HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $13($5_1 + 328 | 0 | 0, 68126 | 0, $5_1 | 0) | 0; } label$9 : { label$10 : { - if (!((HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - $94_1 = HEAP32[((HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; + $94_1 = HEAP32[((HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; break label$9; } $94_1 = 0; } - HEAP32[($5_1 + 308 | 0) >> 2] = $94_1; - $7(HEAP32[($5_1 + 328 | 0) >> 2] | 0 | 0); - $724($5_1 + 32 | 0 | 0, 0 | 0, 276 | 0) | 0; + HEAP32[($5_1 + 324 | 0) >> 2] = $94_1; + $7(HEAP32[($5_1 + 344 | 0) >> 2] | 0 | 0); + $725($5_1 + 44 | 0 | 0, 0 | 0, 280 | 0) | 0; $110_1 = 0; - $75($5_1 + 24 | 0 | 0, $5_1 + 32 | 0 | 0, HEAP32[($5_1 + 312 | 0) >> 2] | 0 | 0, $110_1 | 0, HEAP32[($5_1 + 308 | 0) >> 2] | 0 | 0, $110_1 | 0); + $75($5_1 + 36 | 0 | 0, $5_1 + 44 | 0 | 0, HEAP32[($5_1 + 328 | 0) >> 2] | 0 | 0, $110_1 | 0, HEAP32[($5_1 + 324 | 0) >> 2] | 0 | 0, $110_1 | 0); label$11 : { label$12 : { - if (!((HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$12 } - HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; + HEAP32[((HEAP32[($5_1 + 36 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; break label$11; } - HEAP32[($5_1 + 20 | 0) >> 2] = $821(1 | 0, 40 | 0) | 0; - $125_1 = $763(101055 | 0) | 0; - HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] = $125_1; - HEAP32[(HEAP32[($5_1 + 20 | 0) >> 2] | 0) >> 2] = 141; - $17($5_1 + 24 | 0 | 0, HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0) | 0; - HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; + HEAP32[($5_1 + 32 | 0) >> 2] = $822(1 | 0, 40 | 0) | 0; + $125_1 = $764(101635 | 0) | 0; + HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] = $125_1; + HEAP32[(HEAP32[($5_1 + 32 | 0) >> 2] | 0) >> 2] = 141; + $17($5_1 + 36 | 0 | 0, HEAP32[($5_1 + 32 | 0) >> 2] | 0 | 0) | 0; + HEAP32[((HEAP32[($5_1 + 36 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($0_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; } $6($0_1 | 0); - $22($0_1 | 0, $5_1 + 24 | 0 | 0); - $14($5_1 + 312 | 0 | 0); - $11($5_1 + 24 | 0 | 0); + $22($0_1 | 0, $5_1 + 36 | 0 | 0); + $14($5_1 + 328 | 0 | 0); + $11($5_1 + 36 | 0 | 0); label$13 : { - if (!((HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($5_1 + 344 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$13 } break label$1; } break label$4; } - $88($0_1 | 0, HEAP32[($5_1 + 328 | 0) >> 2] | 0 | 0); + $88($0_1 | 0, HEAP32[($5_1 + 344 | 0) >> 2] | 0 | 0); } continue label$2; }; } - global$0 = $5_1 + 336 | 0; + global$0 = $5_1 + 352 | 0; return; } @@ -8760,7 +8911,7 @@ function asmFunc(imports) { break label$2 } label$4 : { - if ($760(HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[$4_1 >> 2] | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[$4_1 >> 2] | 0) >> 2] | 0 | 0) | 0) { break label$4 } HEAP8[($4_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -8802,7 +8953,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($7_1 + 36 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0) { break label$1 } - fimport$0(75169 | 0, 74032 | 0, 5418 | 0, 67095 | 0); + fimport$0(75527 | 0, 74090 | 0, 5397 | 0, 67155 | 0); wasm2js_trap(); } HEAP32[($7_1 + 28 | 0) >> 2] = HEAP32[(HEAP32[($7_1 + 36 | 0) >> 2] | 0) >> 2] | 0; @@ -8827,16 +8978,16 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($7_1 + 40 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - HEAP32[($7_1 + 16 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; - $66_1 = $763(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; + HEAP32[($7_1 + 16 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; + $66_1 = $764(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($7_1 + 16 | 0) >> 2] | 0) >> 2] = $66_1; $57($0_1 | 0, HEAP32[($7_1 + 16 | 0) >> 2] | 0 | 0); } $99($0_1 | 0, HEAP32[($7_1 + 36 | 0) >> 2] | 0 | 0, 41 | 0, HEAP32[($7_1 + 32 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0) | 0; break label$2; } - HEAP32[($7_1 + 12 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; - $78_1 = $763(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; + HEAP32[($7_1 + 12 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; + $78_1 = $764(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($7_1 + 12 | 0) >> 2] | 0) >> 2] = $78_1; label$6 : { label$7 : { @@ -8875,17 +9026,17 @@ function asmFunc(imports) { } label$16 : { label$17 : { - if ($760(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 74083 | 0) | 0) { + if ($761(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 74141 | 0) | 0) { break label$17 } - HEAP32[($7_1 + 12 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; - $146_1 = $763(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; + HEAP32[($7_1 + 12 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; + $146_1 = $764(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($7_1 + 12 | 0) >> 2] | 0) >> 2] = $146_1; $57($0_1 | 0, HEAP32[($7_1 + 12 | 0) >> 2] | 0 | 0); HEAP32[($7_1 + 12 | 0) >> 2] = 0; break label$16; } - $46(57 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0, 87301 | 0, 0 | 0); + $46(57 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0, 87881 | 0, 0 | 0); break label$7; } } @@ -8905,7 +9056,7 @@ function asmFunc(imports) { } label$20 : { label$21 : { - if ($760(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 74083 | 0) | 0) { + if ($761(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0, 74141 | 0) | 0) { break label$21 } $19((HEAP32[($7_1 + 12 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[(HEAP32[($7_1 + 36 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; @@ -8915,18 +9066,18 @@ function asmFunc(imports) { $99($0_1 | 0, HEAP32[($7_1 + 36 | 0) >> 2] | 0 | 0, 44 | 0, HEAP32[($7_1 + 32 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0) | 0; $57($0_1 | 0, HEAP32[($7_1 + 12 | 0) >> 2] | 0 | 0); HEAP32[($7_1 + 12 | 0) >> 2] = 0; - HEAP32[($7_1 + 12 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; + HEAP32[($7_1 + 12 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; HEAP32[($7_1 + 24 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; label$22 : { if (!((HEAP32[($7_1 + 24 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$22 } - $46(58 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0, 67547 | 0, 0 | 0); + $46(58 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0, 67620 | 0, 0 | 0); $53(HEAP32[($7_1 + 12 | 0) >> 2] | 0 | 0); HEAP32[($7_1 + 12 | 0) >> 2] = 0; break label$7; } - $220_1 = $763(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; + $220_1 = $764(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($7_1 + 12 | 0) >> 2] | 0) >> 2] = $220_1; } break label$18; @@ -8943,7 +9094,7 @@ function asmFunc(imports) { if ((HEAP32[($7_1 + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$23 } - fimport$0(76023 | 0, 74032 | 0, 5524 | 0, 67095 | 0); + fimport$0(76425 | 0, 74090 | 0, 5503 | 0, 67155 | 0); wasm2js_trap(); } if (!(0 & 1 | 0)) { @@ -8981,7 +9132,7 @@ function asmFunc(imports) { if (!(($115(HEAP32[($8_1 + 72 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($8_1 + 68 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$1 } - fimport$0(85618 | 0, 74032 | 0, 6118 | 0, 69714 | 0); + fimport$0(86175 | 0, 74090 | 0, 6097 | 0, 69787 | 0); wasm2js_trap(); } i64toi32_i32$0 = 0; @@ -9005,7 +9156,7 @@ function asmFunc(imports) { $11($8_1 + 32 | 0 | 0); $11($8_1 + 24 | 0 | 0); label$6 : { - if (!((HEAP32[((HEAP32[($8_1 + 76 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($8_1 + 76 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$6 } break label$3; @@ -9015,7 +9166,7 @@ function asmFunc(imports) { $118($8_1 + 16 | 0 | 0, HEAP32[($8_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 68 | 0) >> 2] | 0 | 0); $113($8_1 + 8 | 0 | 0, HEAP32[($8_1 + 76 | 0) >> 2] | 0 | 0, $8_1 + 48 | 0 | 0, $8_1 + 16 | 0 | 0, HEAP32[($8_1 + 60 | 0) >> 2] | 0 | 0); label$7 : { - if (!((HEAP32[((HEAP32[($8_1 + 76 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($8_1 + 76 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$7 } $11($8_1 + 16 | 0 | 0); @@ -9046,32 +9197,32 @@ function asmFunc(imports) { HEAP32[($5_1 + 840 | 0) >> 2] = $2_1; label$1 : { label$2 : { - if ($760(HEAP32[(HEAP32[($5_1 + 840 | 0) >> 2] | 0) >> 2] | 0 | 0, 74095 | 0) | 0) { + if ($761(HEAP32[(HEAP32[($5_1 + 840 | 0) >> 2] | 0) >> 2] | 0 | 0, 74153 | 0) | 0) { break label$2 } - $724($5_1 + 564 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($5_1 + 560 | 0 | 0, 0 | 0, 280 | 0) | 0; $19_1 = 0; - $75($0_1 | 0, $5_1 + 564 | 0 | 0, 84637 | 0, 101055 | 0, $19_1 | 0, $19_1 | 0); + $75($0_1 | 0, $5_1 + 560 | 0 | 0, 85194 | 0, 101635 | 0, $19_1 | 0, $19_1 | 0); $7($0_1 | 0); HEAP32[((HEAP32[$0_1 >> 2] | 0) + 24 | 0) >> 2] = 0; break label$1; } label$3 : { - if ($760(HEAP32[(HEAP32[($5_1 + 840 | 0) >> 2] | 0) >> 2] | 0 | 0, 74104 | 0) | 0) { + if ($761(HEAP32[(HEAP32[($5_1 + 840 | 0) >> 2] | 0) >> 2] | 0 | 0, 74162 | 0) | 0) { break label$3 } - $724($5_1 + 288 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($5_1 + 280 | 0 | 0, 0 | 0, 280 | 0) | 0; $35_1 = 0; - $75($0_1 | 0, $5_1 + 288 | 0 | 0, 86697 | 0, 101055 | 0, $35_1 | 0, $35_1 | 0); + $75($0_1 | 0, $5_1 + 280 | 0 | 0, 87254 | 0, 101635 | 0, $35_1 | 0, $35_1 | 0); $7($0_1 | 0); HEAP32[((HEAP32[$0_1 >> 2] | 0) + 24 | 0) >> 2] = 0; break label$1; } label$4 : { - if ($760(HEAP32[(HEAP32[($5_1 + 840 | 0) >> 2] | 0) >> 2] | 0 | 0, 74073 | 0) | 0) { + if ($761(HEAP32[(HEAP32[($5_1 + 840 | 0) >> 2] | 0) >> 2] | 0 | 0, 74131 | 0) | 0) { break label$4 } - fimport$0(72213 | 0, 74032 | 0, 6087 | 0, 66075 | 0); + fimport$0(72286 | 0, 74090 | 0, 6066 | 0, 66075 | 0); wasm2js_trap(); } $94($0_1 | 0, (HEAP32[($5_1 + 840 | 0) >> 2] | 0) + 4 | 0 | 0); @@ -9107,14 +9258,14 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[(HEAP32[($7_1 + 84 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$5 } - fimport$0(85823 | 0, 74032 | 0, 5674 | 0, 67119 | 0); + fimport$0(86380 | 0, 74090 | 0, 5653 | 0, 67179 | 0); wasm2js_trap(); } label$6 : { if (!(($1(HEAP32[(HEAP32[($7_1 + 84 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$6 } - fimport$0(85661 | 0, 74032 | 0, 5675 | 0, 67119 | 0); + fimport$0(86218 | 0, 74090 | 0, 5654 | 0, 67179 | 0); wasm2js_trap(); } label$7 : { @@ -9124,7 +9275,7 @@ function asmFunc(imports) { if (!(($1(HEAP32[($0_1 + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$7 } - fimport$0(85480 | 0, 74032 | 0, 5676 | 0, 67119 | 0); + fimport$0(86037 | 0, 74090 | 0, 5655 | 0, 67179 | 0); wasm2js_trap(); } HEAP32[($7_1 + 76 | 0) >> 2] = 0; @@ -9133,7 +9284,7 @@ function asmFunc(imports) { break label$8 } label$9 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($7_1 + 84 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 74062 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($7_1 + 84 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 74120 | 0) | 0) { break label$9 } $7(HEAP32[($7_1 + 84 | 0) >> 2] | 0 | 0); @@ -9245,10 +9396,10 @@ function asmFunc(imports) { break label$29 } $11($7_1 + 52 | 0 | 0); - $46(1 | 0, HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 84 | 0) >> 2] | 0) >> 2] | 0 | 0, 73394 | 0, 0 | 0); + $46(1 | 0, HEAP32[($7_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 84 | 0) >> 2] | 0) >> 2] | 0 | 0, 73452 | 0, 0 | 0); break label$2; } - HEAP32[($7_1 + 44 | 0) >> 2] = $821(1 | 0, 40 | 0) | 0; + HEAP32[($7_1 + 44 | 0) >> 2] = $822(1 | 0, 40 | 0) | 0; HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($7_1 + 48 | 0) >> 2] | 0; HEAP32[(HEAP32[($7_1 + 44 | 0) >> 2] | 0) >> 2] = 129; HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[($7_1 + 60 | 0) >> 2] | 0; @@ -9305,7 +9456,7 @@ function asmFunc(imports) { $22($0_1 | 0, $7_1 + 4 | 0 | 0); $11($7_1 + 4 | 0 | 0); label$36 : { - if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 92 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$36 } $11($7_1 + 12 | 0 | 0); @@ -9348,7 +9499,7 @@ function asmFunc(imports) { HEAP8[($5_1 + 47 | 0) >> 0] = 1 & 1 | 0; break label$1; } - HEAP32[($5_1 + 28 | 0) >> 2] = $56(HEAP32[($5_1 + 32 | 0) >> 2] | 0 | 0, 74083 | 0) | 0; + HEAP32[($5_1 + 28 | 0) >> 2] = $56(HEAP32[($5_1 + 32 | 0) >> 2] | 0 | 0, 74141 | 0) | 0; label$3 : { if (!((HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 @@ -9425,43 +9576,43 @@ function asmFunc(imports) { HEAP32[($3_1 + 588 | 0) >> 2] = $0_1; HEAP32[($3_1 + 584 | 0) >> 2] = HEAP32[(((HEAP32[($3_1 + 588 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($3_1 + 588 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; HEAP32[(((HEAP32[($3_1 + 588 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($3_1 + 588 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] = 0; - i64toi32_i32$0 = $725(0 | 0) | 0; + i64toi32_i32$0 = $726(0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $204_1 = i64toi32_i32$0; i64toi32_i32$0 = $3_1; HEAP32[($3_1 + 576 | 0) >> 2] = $204_1; HEAP32[($3_1 + 580 | 0) >> 2] = i64toi32_i32$1; - HEAP32[($3_1 + 572 | 0) >> 2] = $744($3_1 + 576 | 0 | 0) | 0; - $724($3_1 + 296 | 0 | 0, 0 | 0, 276 | 0) | 0; - $724($3_1 + 192 | 0 | 0, 0 | 0, 100 | 0) | 0; - $43_1 = 101632 + ((HEAP32[((HEAP32[($3_1 + 572 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) << 2 | 0) | 0; + HEAP32[($3_1 + 572 | 0) >> 2] = $745($3_1 + 576 | 0 | 0) | 0; + $725($3_1 + 292 | 0 | 0, 0 | 0, 280 | 0) | 0; + $725($3_1 + 192 | 0 | 0, 0 | 0, 100 | 0) | 0; + $43_1 = 102208 + ((HEAP32[((HEAP32[($3_1 + 572 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) << 2 | 0) | 0; $45_1 = HEAP32[((HEAP32[($3_1 + 572 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; HEAP32[($3_1 + 8 | 0) >> 2] = (HEAP32[((HEAP32[($3_1 + 572 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 1900 | 0; HEAP32[($3_1 + 4 | 0) >> 2] = $45_1; HEAP32[$3_1 >> 2] = $43_1; - $756($3_1 + 192 | 0 | 0, 100 | 0, 97906 | 0, $3_1 | 0) | 0; + $757($3_1 + 192 | 0 | 0, 100 | 0, 98486 | 0, $3_1 | 0) | 0; $62_1 = 0; - $75($3_1 + 184 | 0 | 0, $3_1 + 296 | 0 | 0, $3_1 + 192 | 0 | 0, 70047 | 0, $62_1 | 0, $62_1 | 0); + $75($3_1 + 184 | 0 | 0, $3_1 + 292 | 0 | 0, $3_1 + 192 | 0 | 0, 70120 | 0, $62_1 | 0, $62_1 | 0); $95($3_1 + 176 | 0 | 0, HEAP32[($3_1 + 588 | 0) >> 2] | 0 | 0, $3_1 + 184 | 0 | 0, 0 | 0); $11($3_1 + 176 | 0 | 0); $11($3_1 + 184 | 0 | 0); - $724($3_1 + 64 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($3_1 + 64 | 0 | 0, 0 | 0, 100 | 0) | 0; $85_1 = HEAP32[((HEAP32[($3_1 + 572 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; $87_1 = HEAP32[((HEAP32[($3_1 + 572 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[($3_1 + 24 | 0) >> 2] = HEAP32[(HEAP32[($3_1 + 572 | 0) >> 2] | 0) >> 2] | 0; HEAP32[($3_1 + 20 | 0) >> 2] = $87_1; HEAP32[($3_1 + 16 | 0) >> 2] = $85_1; - $756($3_1 + 64 | 0 | 0, 100 | 0, 97871 | 0, $3_1 + 16 | 0 | 0) | 0; + $757($3_1 + 64 | 0 | 0, 100 | 0, 98451 | 0, $3_1 + 16 | 0 | 0) | 0; $104_1 = 0; - $75($3_1 + 56 | 0 | 0, $3_1 + 296 | 0 | 0, $3_1 + 64 | 0 | 0, 70072 | 0, $104_1 | 0, $104_1 | 0); + $75($3_1 + 56 | 0 | 0, $3_1 + 292 | 0 | 0, $3_1 + 64 | 0 | 0, 70145 | 0, $104_1 | 0, $104_1 | 0); $95($3_1 + 48 | 0 | 0, HEAP32[($3_1 + 588 | 0) >> 2] | 0 | 0, $3_1 + 56 | 0 | 0, 0 | 0); $11($3_1 + 48 | 0 | 0); $11($3_1 + 56 | 0 | 0); - HEAP32[($3_1 + 44 | 0) >> 2] = 98420; + HEAP32[($3_1 + 44 | 0) >> 2] = 99e3; $128_1 = 0; - $75($3_1 + 36 | 0 | 0, $3_1 + 296 | 0 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 70021 | 0, $128_1 | 0, $128_1 | 0); + $75($3_1 + 36 | 0 | 0, $3_1 + 292 | 0 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 70094 | 0, $128_1 | 0, $128_1 | 0); $95($3_1 + 28 | 0 | 0, HEAP32[($3_1 + 588 | 0) >> 2] | 0 | 0, $3_1 + 36 | 0 | 0, 0 | 0); - $121((HEAP32[($3_1 + 588 | 0) >> 2] | 0) + 272 | 0 | 0); + $121((HEAP32[($3_1 + 588 | 0) >> 2] | 0) + 276 | 0 | 0); $11($3_1 + 36 | 0 | 0); $11($3_1 + 28 | 0 | 0); HEAP32[(((HEAP32[($3_1 + 588 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($3_1 + 588 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] = HEAP32[($3_1 + 584 | 0) >> 2] | 0; @@ -9510,7 +9661,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 36 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0) >> 2] | 0 | 0) != (142 | 0) & 1 | 0)) { break label$4 } - $13($4_1 + 40 | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13($4_1 + 40 | 0 | 0, 87560 | 0, 0 | 0) | 0; } label$5 : { label$6 : { @@ -9522,7 +9673,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($4_1 + 36 | 0) >> 2] | 0) >> 2] | 0 | 0) == (131 | 0) & 1 | 0)) { break label$8 } - $13($4_1 + 40 | 0 | 0, 101054 | 0, 0 | 0) | 0; + $13($4_1 + 40 | 0 | 0, 101634 | 0, 0 | 0) | 0; break label$7; } label$9 : { @@ -9530,17 +9681,17 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($4_1 + 36 | 0) >> 2] | 0) >> 2] | 0 | 0) == (132 | 0) & 1 | 0)) { break label$10 } - $13($4_1 + 40 | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13($4_1 + 40 | 0 | 0, 87560 | 0, 0 | 0) | 0; break label$9; } HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[($4_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $13($4_1 + 40 | 0 | 0, 68053 | 0, $4_1 | 0) | 0; + $13($4_1 + 40 | 0 | 0, 68126 | 0, $4_1 | 0) | 0; } } break label$5; } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $13($4_1 + 40 | 0 | 0, 68053 | 0, $4_1 + 16 | 0 | 0) | 0; + $13($4_1 + 40 | 0 | 0, 68126 | 0, $4_1 + 16 | 0 | 0) | 0; } } HEAP32[($4_1 + 36 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 36 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; @@ -9585,20 +9736,20 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 4 | 0)) { break label$4 } - $13($3_1 + 16 | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13($3_1 + 16 | 0 | 0, 87560 | 0, 0 | 0) | 0; } label$5 : { if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$5 } - $13($3_1 + 16 | 0 | 0, 101054 | 0, 0 | 0) | 0; + $13($3_1 + 16 | 0 | 0, 101634 | 0, 0 | 0) | 0; } label$6 : { label$7 : { if (!((HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) == (131 | 0) & 1 | 0)) { break label$7 } - $13($3_1 + 16 | 0 | 0, 101054 | 0, 0 | 0) | 0; + $13($3_1 + 16 | 0 | 0, 101634 | 0, 0 | 0) | 0; break label$6; } label$8 : { @@ -9606,11 +9757,11 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) == (132 | 0) & 1 | 0)) { break label$9 } - $13($3_1 + 16 | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13($3_1 + 16 | 0 | 0, 87560 | 0, 0 | 0) | 0; break label$8; } HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $13($3_1 + 16 | 0 | 0, 68053 | 0, $3_1 | 0) | 0; + $13($3_1 + 16 | 0 | 0, 68126 | 0, $3_1 | 0) | 0; } } } @@ -9634,7 +9785,7 @@ function asmFunc(imports) { if (!((HEAP32[($3_1 + 40 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } - HEAP32[($3_1 + 44 | 0) >> 2] = $763(85473 | 0) | 0; + HEAP32[($3_1 + 44 | 0) >> 2] = $764(86030 | 0) | 0; break label$1; } HEAP32[($3_1 + 32 | 0) >> 2] = 0; @@ -9663,14 +9814,14 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$10 } - $13($3_1 + 24 | 0 | 0, 101054 | 0, 0 | 0) | 0; + $13($3_1 + 24 | 0 | 0, 101634 | 0, 0 | 0) | 0; break label$9; } label$11 : { if (!((HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 4 | 0)) { break label$11 } - $13($3_1 + 24 | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13($3_1 + 24 | 0 | 0, 87560 | 0, 0 | 0) | 0; } } break label$7; @@ -9683,7 +9834,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 4 | 0)) { break label$13 } - $13($3_1 + 24 | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13($3_1 + 24 | 0 | 0, 87560 | 0, 0 | 0) | 0; } } } @@ -9693,7 +9844,7 @@ function asmFunc(imports) { break label$14 } HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $13($3_1 + 24 | 0 | 0, 68053 | 0, $3_1 | 0) | 0; + $13($3_1 + 24 | 0 | 0, 68126 | 0, $3_1 | 0) | 0; } HEAP32[($3_1 + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; break label$5; @@ -9712,7 +9863,7 @@ function asmFunc(imports) { } } HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $13($3_1 + 24 | 0 | 0, 68053 | 0, $3_1 + 16 | 0 | 0) | 0; + $13($3_1 + 24 | 0 | 0, 68126 | 0, $3_1 + 16 | 0 | 0) | 0; } } HEAP32[($3_1 + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; @@ -9778,7 +9929,7 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) > (HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$1 } - HEAP32[$4_1 >> 2] = $818(HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0, ((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 1 | 0) << 0 | 0 | 0) | 0; + HEAP32[$4_1 >> 2] = $819(HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0, ((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 1 | 0) << 0 | 0 | 0) | 0; label$2 : { label$3 : { if (!((HEAP32[$4_1 >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -9789,7 +9940,7 @@ function asmFunc(imports) { HEAP8[((HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] | 0) + (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0) >> 0] = 0; break label$2; } - HEAP32[($721() | 0) >> 2] = 48; + HEAP32[($722() | 0) >> 2] = 48; HEAP32[($4_1 + 4 | 0) >> 2] = 1; } } @@ -9836,12 +9987,12 @@ function asmFunc(imports) { break label$1 } HEAP32[($3_1 + 16 | 0) >> 2] = ((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + (HEAP32[($3_1 + 20 | 0) >> 2] | 0) | 0 | 0) / (2 | 0) | 0; - HEAP32[($3_1 + 12 | 0) >> 2] = (HEAP32[($3_1 + 28 | 0) >> 2] | 0) - (HEAP32[(101712 + ((HEAP32[($3_1 + 16 | 0) >> 2] | 0) << 3 | 0) | 0) >> 2] | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = (HEAP32[($3_1 + 28 | 0) >> 2] | 0) - (HEAP32[(102288 + ((HEAP32[($3_1 + 16 | 0) >> 2] | 0) << 3 | 0) | 0) >> 2] | 0) | 0; label$3 : { if (HEAP32[($3_1 + 12 | 0) >> 2] | 0) { break label$3 } - $32_1 = HEAP32[((101712 + ((HEAP32[($3_1 + 16 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0; + $32_1 = HEAP32[((102288 + ((HEAP32[($3_1 + 16 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0; global$0 = $3_1 + 32 | 0; return $32_1 | 0; } @@ -9858,7 +10009,7 @@ function asmFunc(imports) { continue label$2; }; } - fimport$0(72213 | 0, 74032 | 0, 9593 | 0, 72606 | 0); + fimport$0(72286 | 0, 74090 | 0, 9629 | 0, 72664 | 0); wasm2js_trap(); } @@ -9866,7 +10017,7 @@ function asmFunc(imports) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; - var $5_1 = 0, $8_1 = 0, $29_1 = 0, $45_1 = 0, $61_1 = 0, $346_1 = 0, $372_1 = 0, $382_1 = 0, $390_1 = 0, $437_1 = 0, $441_1 = 0, $458_1 = 0; + var $5_1 = 0, $8_1 = 0, $29_1 = 0, $45_1 = 0, $61_1 = 0, $346_1 = 0, $372_1 = 0, $382_1 = 0, $390_1 = 0, $437_1 = 0, $441_1 = 0, $468_1 = 0; $5_1 = global$0 - 48 | 0; global$0 = $5_1; HEAP32[($5_1 + 40 | 0) >> 2] = $0_1; @@ -9905,14 +10056,14 @@ function asmFunc(imports) { break label$4; } label$8 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 66029 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 66029 | 0) | 0) { break label$8 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 65 | 0) >> 0] = 1; break label$4; } label$9 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 69739 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 69812 | 0) | 0) { break label$9 } label$10 : { @@ -9920,7 +10071,7 @@ function asmFunc(imports) { if (!(((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 1 | 0 | 0) < (HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$11 } - $762((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 68 | 0 | 0, HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + (((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 1 | 0) << 2 | 0) | 0) >> 2] | 0 | 0) | 0; + $763((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 69 | 0 | 0, HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + (((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 1 | 0) << 2 | 0) | 0) >> 2] | 0 | 0) | 0; HEAP32[($5_1 + 28 | 0) >> 2] = (HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 1 | 0; break label$10; } @@ -9928,35 +10079,35 @@ function asmFunc(imports) { break label$4; } label$12 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 67919 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 67992 | 0) | 0) { break label$12 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 56 | 0) >> 0] = 1; break label$4; } label$13 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 77784 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 78286 | 0) | 0) { break label$13 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 59 | 0) >> 0] = 1; break label$4; } label$14 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 71439 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 71512 | 0) | 0) { break label$14 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 62 | 0) >> 0] = 1; break label$4; } label$15 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 71491 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 71564 | 0) | 0) { break label$15 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 58 | 0) >> 0] = 1; break label$4; } label$16 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 67240 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 67300 | 0) | 0) { break label$16 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 57 | 0) >> 0] = 1; @@ -9964,10 +10115,10 @@ function asmFunc(imports) { } label$17 : { label$18 : { - if (!($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 70001 | 0) | 0)) { + if (!($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 70074 | 0) | 0)) { break label$18 } - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 70747 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 70820 | 0) | 0) { break label$17 } } @@ -9975,112 +10126,112 @@ function asmFunc(imports) { break label$4; } label$19 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 71137 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 71210 | 0) | 0) { break label$19 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 63 | 0) >> 0] = 1; break label$4; } label$20 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 69732 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 69805 | 0) | 0) { break label$20 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 64 | 0) >> 0] = 1; break label$4; } label$21 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 67535 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 67608 | 0) | 0) { break label$21 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 66 | 0) >> 0] = 1; break label$4; } label$22 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 66040 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 66040 | 0) | 0) { break label$22 } HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 67 | 0) >> 0] = 1; break label$4; } label$23 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 72804 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 72862 | 0) | 0) { break label$23 } HEAP32[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 52 | 0) >> 2] = 0; break label$4; } label$24 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 66006 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 66006 | 0) | 0) { break label$24 } HEAP32[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 52 | 0) >> 2] = 7; break label$4; } label$25 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 66763 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 66819 | 0) | 0) { break label$25 } HEAP32[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 52 | 0) >> 2] = 7; break label$4; } label$26 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 84403 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 84960 | 0) | 0) { break label$26 } HEAP32[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] = -1; break label$4; } label$27 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 84382 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 84939 | 0) | 0) { break label$27 } HEAP32[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] = 0; break label$4; } label$28 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 84618 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 85175 | 0) | 0) { break label$28 } HEAP32[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] = 1; break label$4; } label$29 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 65898 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 65898 | 0) | 0) { break label$29 } HEAP32[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] = 2; break label$4; } label$30 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 65868 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 65868 | 0) | 0) { break label$30 } HEAP32[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] = 3; break label$4; } label$31 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 84394 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 84951 | 0) | 0) { break label$31 } HEAP32[(HEAP32[($5_1 + 40 | 0) >> 2] | 0) >> 2] = 0; break label$4; } label$32 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 84630 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 85187 | 0) | 0) { break label$32 } HEAP32[(HEAP32[($5_1 + 40 | 0) >> 2] | 0) >> 2] = 1; break label$4; } label$33 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 65910 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 65910 | 0) | 0) { break label$33 } HEAP32[(HEAP32[($5_1 + 40 | 0) >> 2] | 0) >> 2] = 2; break label$4; } label$34 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 65880 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 65880 | 0) | 0) { break label$34 } HEAP32[(HEAP32[($5_1 + 40 | 0) >> 2] | 0) >> 2] = 3; @@ -10092,7 +10243,7 @@ function asmFunc(imports) { break label$35 } label$36 : { - if ($760(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 70896 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 70969 | 0) | 0) { break label$36 } HEAP32[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 12 | 0) >> 2] = -1; @@ -10124,7 +10275,7 @@ function asmFunc(imports) { break label$40 } HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; - $748(86318 | 0, $5_1 | 0) | 0; + $749(86875 | 0, $5_1 | 0) | 0; HEAP32[($5_1 + 44 | 0) >> 2] = 1; break label$1; } @@ -10142,8 +10293,15 @@ function asmFunc(imports) { } break label$4; } + label$43 : { + if ($761(HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0, 67595 | 0) | 0) { + break label$43 + } + HEAP8[((HEAP32[($5_1 + 40 | 0) >> 2] | 0) + 68 | 0) >> 0] = 1; + break label$4; + } HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 32 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; - $748(86261 | 0, $5_1 + 16 | 0 | 0) | 0; + $749(86818 | 0, $5_1 + 16 | 0 | 0) | 0; HEAP32[($5_1 + 44 | 0) >> 2] = 1; break label$1; } @@ -10153,9 +10311,9 @@ function asmFunc(imports) { } HEAP32[($5_1 + 44 | 0) >> 2] = 0; } - $458_1 = HEAP32[($5_1 + 44 | 0) >> 2] | 0; + $468_1 = HEAP32[($5_1 + 44 | 0) >> 2] | 0; global$0 = $5_1 + 48 | 0; - return $458_1 | 0; + return $468_1 | 0; } function $131($0_1, $1_1, $2_1) { @@ -10338,30 +10496,30 @@ function asmFunc(imports) { i64toi32_i32$0 = $5_1; HEAP32[$5_1 >> 2] = $69_1; HEAP32[($5_1 + 4 | 0) >> 2] = i64toi32_i32$1; - $756($13_1 | 0, $14_1 | 0, 73109 | 0, $5_1 | 0) | 0; + $757($13_1 | 0, $14_1 | 0, 73167 | 0, $5_1 | 0) | 0; break label$1; case 1: $17_1 = HEAP32[($5_1 + 56 | 0) >> 2] | 0; $18_1 = HEAP32[($5_1 + 52 | 0) >> 2] | 0; HEAPF64[($5_1 + 16 | 0) >> 3] = +HEAPF64[((HEAP32[($5_1 + 60 | 0) >> 2] | 0) + 8 | 0) >> 3]; - $756($17_1 | 0, $18_1 | 0, 71488 | 0, $5_1 + 16 | 0 | 0) | 0; + $757($17_1 | 0, $18_1 | 0, 71561 | 0, $5_1 + 16 | 0 | 0) | 0; break label$1; case 2: - break label$2; - default: + $23_1 = HEAP32[($5_1 + 56 | 0) >> 2] | 0; + $24_1 = HEAP32[($5_1 + 52 | 0) >> 2] | 0; + i64toi32_i32$2 = HEAP32[($5_1 + 60 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 8 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 12 | 0) >> 2] | 0; + $102_1 = i64toi32_i32$1; + i64toi32_i32$1 = $5_1; + HEAP32[($5_1 + 32 | 0) >> 2] = $102_1; + HEAP32[($5_1 + 36 | 0) >> 2] = i64toi32_i32$0; + $757($23_1 | 0, $24_1 | 0, 66017 | 0, $5_1 + 32 | 0 | 0) | 0; break label$1; + default: + break label$2; }; } - $23_1 = HEAP32[($5_1 + 56 | 0) >> 2] | 0; - $24_1 = HEAP32[($5_1 + 52 | 0) >> 2] | 0; - i64toi32_i32$2 = HEAP32[($5_1 + 60 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 8 | 0) >> 2] | 0; - i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 12 | 0) >> 2] | 0; - $102_1 = i64toi32_i32$1; - i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 32 | 0) >> 2] = $102_1; - HEAP32[($5_1 + 36 | 0) >> 2] = i64toi32_i32$0; - $756($23_1 | 0, $24_1 | 0, 66017 | 0, $5_1 + 32 | 0 | 0) | 0; } global$0 = $5_1 + 64 | 0; return; @@ -10614,7 +10772,7 @@ function asmFunc(imports) { switch ($20_1 | 0) { case 0: case 1: - fimport$0(72213 | 0, 74032 | 0, 11966 | 0, 66205 | 0); + fimport$0(72286 | 0, 74090 | 0, 12020 | 0, 66205 | 0); wasm2js_trap(); case 2: HEAP32[$0_1 >> 2] = 2; @@ -10694,7 +10852,7 @@ function asmFunc(imports) { break label$5; }; } - fimport$0(72213 | 0, 74032 | 0, 12003 | 0, 69603 | 0); + fimport$0(72286 | 0, 74090 | 0, 12057 | 0, 69676 | 0); wasm2js_trap(); } break label$1; @@ -10778,7 +10936,7 @@ function asmFunc(imports) { HEAPF64[($0_1 + 8 | 0) >> 3] = +(0 | 0); break label$10; } - fimport$0(72213 | 0, 74032 | 0, 12021 | 0, 69603 | 0); + fimport$0(72286 | 0, 74090 | 0, 12075 | 0, 69676 | 0); wasm2js_trap(); } break label$1; @@ -10879,7 +11037,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$2 + 12 | 0) >> 2] = i64toi32_i32$5; break label$17; } - fimport$0(72213 | 0, 74032 | 0, 12036 | 0, 69603 | 0); + fimport$0(72286 | 0, 74090 | 0, 12090 | 0, 69676 | 0); wasm2js_trap(); } break label$1; @@ -11044,7 +11202,7 @@ function asmFunc(imports) { HEAPF64[($0_1 + 8 | 0) >> 3] = +($100_1 & 1 | 0 | 0); break label$6; } - fimport$0(72213 | 0, 74032 | 0, 12096 | 0, 69627 | 0); + fimport$0(72286 | 0, 74090 | 0, 12150 | 0, 69700 | 0); wasm2js_trap(); } break label$1; @@ -11664,7 +11822,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$0 + 12 | 0) >> 2] = i64toi32_i32$3; break label$26; } - fimport$0(72213 | 0, 74032 | 0, 12149 | 0, 69627 | 0); + fimport$0(72286 | 0, 74090 | 0, 12203 | 0, 69700 | 0); wasm2js_trap(); } break label$1; @@ -12280,7 +12438,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$3 + 12 | 0) >> 2] = i64toi32_i32$5; break label$52; } - fimport$0(72213 | 0, 74032 | 0, 12200 | 0, 69627 | 0); + fimport$0(72286 | 0, 74090 | 0, 12254 | 0, 69700 | 0); wasm2js_trap(); } } @@ -12296,37 +12454,37 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (8996 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; break label$1; } label$3 : { - if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 128 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 128 | 0)) { break label$3 } HEAP8[($3_1 + 15 | 0) >> 0] = 1 & 1 | 0; break label$1; } label$4 : { - if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 256 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 256 | 0)) { break label$4 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; break label$1; } - HEAP8[($3_1 + 7 | 0) >> 0] = ($144(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0; + HEAP8[($3_1 + 7 | 0) >> 0] = ($144(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 0 | 0) | 0 | 0) != (0 | 0) & 1 | 0; label$5 : { label$6 : { if (!((HEAPU8[($3_1 + 7 | 0) >> 0] | 0) & 1 | 0)) { break label$6 } - $48_1 = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + $48_1 = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[($48_1 + 24 | 0) >> 2] = HEAP32[($48_1 + 24 | 0) >> 2] | 0 | 128 | 0; break label$5; } - $53_1 = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + $53_1 = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[($53_1 + 24 | 0) >> 2] = HEAP32[($53_1 + 24 | 0) >> 2] | 0 | 256 | 0; } HEAP8[($3_1 + 15 | 0) >> 0] = (HEAPU8[($3_1 + 7 | 0) >> 0] | 0) & 1 | 0; @@ -12381,7 +12539,7 @@ function asmFunc(imports) { } HEAP32[(HEAP32[($5_1 + 16 | 0) >> 2] | 0) >> 2] = 0; } - HEAP32[($5_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0; + HEAP32[($5_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0; label$2 : { label$3 : { label$4 : while (1) { @@ -12420,10 +12578,10 @@ function asmFunc(imports) { HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; $14_1 = 1; label$1 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (139 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (139 | 0) & 1 | 0) { break label$1 } - $14_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (140 | 0); + $14_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (140 | 0); } return $14_1 & 1 | 0 | 0; } @@ -12435,18 +12593,18 @@ function asmFunc(imports) { HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; $14_1 = 1; label$1 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (135 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (135 | 0) & 1 | 0) { break label$1 } $14_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (136 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (136 | 0) & 1 | 0) { break label$1 } $14_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (137 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (137 | 0) & 1 | 0) { break label$1 } - $14_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (138 | 0); + $14_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (138 | 0); } return $14_1 & 1 | 0 | 0; } @@ -12458,14 +12616,14 @@ function asmFunc(imports) { HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; $14_1 = 1; label$1 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9058 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9058 | 0) & 1 | 0) { break label$1 } $14_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9059 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9059 | 0) & 1 | 0) { break label$1 } - $14_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9060 | 0); + $14_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9060 | 0); } return $14_1 & 1 | 0 | 0; } @@ -12490,7 +12648,7 @@ function asmFunc(imports) { break label$1 } $9_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (130 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (130 | 0) & 1 | 0) { break label$1 } $9_1 = $148(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -12507,7 +12665,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -12515,7 +12673,7 @@ function asmFunc(imports) { } $25_1 = 1; label$3 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0) { break label$3 } $25_1 = 1; @@ -12523,14 +12681,14 @@ function asmFunc(imports) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0) { break label$3 } - $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9051 | 0); + $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9051 | 0); } HEAP8[($3_1 + 15 | 0) >> 0] = $25_1 & 1 | 0; } @@ -12546,7 +12704,7 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 60 | 0) >> 2] = $0_1; HEAP32[($3_1 + 56 | 0) >> 2] = 0; - HEAP32[($3_1 + 56 | 0) >> 2] = $821(1 | 0, 76 | 0) | 0; + HEAP32[($3_1 + 56 | 0) >> 2] = $822(1 | 0, 76 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -12555,13 +12713,13 @@ function asmFunc(imports) { } break label$2; } - HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 64 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 64 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$4 : { label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9007 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9007 | 0) & 1 | 0)) { break label$5 } $152(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -12633,7 +12791,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; break label$6; } - $156(1 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73394 | 0, 0 | 0); + $156(1 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73452 | 0, 0 | 0); } } $157(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, 58 | 0) | 0; @@ -12655,10 +12813,10 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $159(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; - $13_1 = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + $13_1 = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; global$0 = $3_1 + 16 | 0; return $13_1 | 0; } @@ -12686,8 +12844,8 @@ function asmFunc(imports) { $3_1 = global$0 - 128 | 0; global$0 = $3_1; HEAP32[($3_1 + 124 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 120 | 0) >> 2] = $821(1 | 0, 72 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 120 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 124 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 120 | 0) >> 2] = $822(1 | 0, 72 | 0) | 0; + HEAP32[(HEAP32[($3_1 + 120 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 124 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $11_1 = $162(HEAP32[($3_1 + 124 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 120 | 0) >> 2] | 0) + 8 | 0) >> 2] = $11_1; $16_1 = 0; @@ -12751,7 +12909,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $29_1 + $61_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $285_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - HEAP32[((HEAP32[($3_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 124 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 124 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0; $72_1 = (HEAP32[($3_1 + 120 | 0) >> 2] | 0) + 16 | 0; $164($3_1 + 8 | 0 | 0, (HEAP32[((HEAP32[($3_1 + 120 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 72 | 0 | 0); i64toi32_i32$2 = $3_1; @@ -12835,7 +12993,7 @@ function asmFunc(imports) { break label$2 } $164($5_1 + 84 | 0 | 0, ($166(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0) | 0) + 12 | 0 | 0); - HEAP32[($5_1 + 80 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($5_1 + 80 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; $33_1 = HEAP32[($5_1 + 80 | 0) >> 2] | 0; i64toi32_i32$2 = $5_1; i64toi32_i32$0 = HEAP32[($5_1 + 84 | 0) >> 2] | 0; @@ -12908,7 +13066,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$6 } - fimport$0(75936 | 0, 74032 | 0, 19532 | 0, 68238 | 0); + fimport$0(76338 | 0, 74090 | 0, 19603 | 0, 68311 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 52 | 0) >> 2] = HEAP32[($5_1 + 80 | 0) >> 2] | 0; @@ -12925,7 +13083,7 @@ function asmFunc(imports) { } HEAP32[($5_1 + 72 | 0) >> 2] = $169(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0) | 0; $164($5_1 + 16 | 0 | 0, (HEAP32[($5_1 + 72 | 0) >> 2] | 0) + 72 | 0 | 0); - HEAP32[($5_1 + 12 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($5_1 + 12 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; $120_1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; i64toi32_i32$2 = $5_1; i64toi32_i32$1 = HEAP32[($5_1 + 16 | 0) >> 2] | 0; @@ -12992,7 +13150,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$11 } - fimport$0(84670 | 0, 74032 | 0, 19560 | 0, 68238 | 0); + fimport$0(85227 | 0, 74090 | 0, 19631 | 0, 68311 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 52 | 0) >> 2] = HEAP32[($5_1 + 12 | 0) >> 2] | 0; @@ -13002,7 +13160,7 @@ function asmFunc(imports) { } break label$7; } - HEAP32[($5_1 + 8 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($5_1 + 8 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; HEAP32[(HEAP32[($5_1 + 8 | 0) >> 2] | 0) >> 2] = 0; $171(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); $172(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); @@ -13025,8 +13183,8 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($5_1 + 152 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$13 } - $817(HEAP32[((HEAP32[($5_1 + 144 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); - $227_1 = $763(HEAP32[((HEAP32[((HEAP32[($5_1 + 152 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $818(HEAP32[((HEAP32[($5_1 + 144 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); + $227_1 = $764(HEAP32[((HEAP32[((HEAP32[($5_1 + 152 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($5_1 + 144 | 0) >> 2] | 0) + 20 | 0) >> 2] = $227_1; } $229_1 = HEAP32[($5_1 + 144 | 0) >> 2] | 0; @@ -13085,7 +13243,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $0_1 + $245_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $827_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - $817(HEAP32[($5_1 + 144 | 0) >> 2] | 0 | 0); + $818(HEAP32[($5_1 + 144 | 0) >> 2] | 0 | 0); global$0 = $5_1 + 160 | 0; return; } @@ -13125,10 +13283,10 @@ function asmFunc(imports) { } break label$1; } - $32_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0; + $32_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0; HEAP32[($32_1 + 16 | 0) >> 2] = (HEAP32[($32_1 + 16 | 0) >> 2] | 0) + 1 | 0; - HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[($7_1 + 428 | 0) >> 2] | 0; - $724($7_1 + 208 | 0 | 0, 0 | 0, 200 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[($7_1 + 428 | 0) >> 2] | 0; + $725($7_1 + 208 | 0 | 0, 0 | 0, 200 | 0) | 0; label$5 : { if (!((HEAP32[($7_1 + 420 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 @@ -13136,31 +13294,31 @@ function asmFunc(imports) { $27(HEAP32[((HEAP32[((HEAP32[($7_1 + 420 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 420 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 420 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); } HEAP32[($7_1 + 204 | 0) >> 2] = $4_1; - $807($7_1 + 208 | 0 | 0, 200 | 0, HEAP32[($7_1 + 416 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 204 | 0) >> 2] | 0 | 0) | 0; + $808($7_1 + 208 | 0 | 0, 200 | 0, HEAP32[($7_1 + 416 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 204 | 0) >> 2] | 0 | 0) | 0; label$6 : { label$7 : { if (!((HEAPU8[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0)) { break label$7 } HEAP32[($7_1 + 160 | 0) >> 2] = $7_1 + 208 | 0; - $748(87267 | 0, $7_1 + 160 | 0 | 0) | 0; + $749(87847 | 0, $7_1 + 160 | 0 | 0) | 0; break label$6; } HEAP32[($7_1 + 176 | 0) >> 2] = $7_1 + 208 | 0; - $748(87125 | 0, $7_1 + 176 | 0 | 0) | 0; + $749(87705 | 0, $7_1 + 176 | 0 | 0) | 0; } $28(HEAP32[($7_1 + 420 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); - HEAP32[($7_1 + 200 | 0) >> 2] = 72680; + HEAP32[($7_1 + 200 | 0) >> 2] = 72738; label$8 : { - if (!((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } - HEAP32[($7_1 + 200 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($7_1 + 200 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; } - if (!((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - HEAP32[($7_1 + 196 | 0) >> 2] = 78016; + HEAP32[($7_1 + 196 | 0) >> 2] = 78573; HEAP32[($7_1 + 192 | 0) >> 2] = 0; HEAP32[($7_1 + 188 | 0) >> 2] = 0; label$9 : { @@ -13172,60 +13330,60 @@ function asmFunc(imports) { HEAP32[($7_1 + 188 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 420 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; } label$10 : { - if (!((((HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) | 0 | 0) > (1 | 0) & 1 | 0)) { + if (!((((HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) | 0 | 0) > (1 | 0) & 1 | 0)) { break label$10 } - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97776 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98356 | 0, 0 | 0) | 0; } - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87119 | 0, 0 | 0) | 0; - $154_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; - HEAP32[$7_1 >> 2] = 68420; - $732($154_1 | 0, 97607 | 0, $7_1 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97709 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87093 | 0, 0 | 0) | 0; - $166_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87699 | 0, 0 | 0) | 0; + $154_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; + HEAP32[$7_1 >> 2] = 68493; + $733($154_1 | 0, 98187 | 0, $7_1 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98289 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87673 | 0, 0 | 0) | 0; + $166_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 208 | 0; - $732($166_1 | 0, 97817 | 0, $7_1 + 16 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97489 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90383 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87115 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87036 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87e3 | 0, 0 | 0) | 0; - $194_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($166_1 | 0, 98397 | 0, $7_1 + 16 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98069 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90963 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87695 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87616 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87580 | 0, 0 | 0) | 0; + $194_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 32 | 0) >> 2] = HEAP32[($7_1 + 196 | 0) >> 2] | 0; - $732($194_1 | 0, 97779 | 0, $7_1 + 32 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97481 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87066 | 0, 0 | 0) | 0; - $208_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($194_1 | 0, 98359 | 0, $7_1 + 32 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98061 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87646 | 0, 0 | 0) | 0; + $208_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 48 | 0) >> 2] = HEAP32[($7_1 + 192 | 0) >> 2] | 0; - $732($208_1 | 0, 97537 | 0, $7_1 + 48 | 0 | 0) | 0; - $214_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($208_1 | 0, 98117 | 0, $7_1 + 48 | 0 | 0) | 0; + $214_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 64 | 0) >> 2] = HEAP32[($7_1 + 188 | 0) >> 2] | 0; - $732($214_1 | 0, 97499 | 0, $7_1 + 64 | 0 | 0) | 0; - $220_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($214_1 | 0, 98079 | 0, $7_1 + 64 | 0 | 0) | 0; + $220_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 80 | 0) >> 2] = HEAP32[($7_1 + 192 | 0) >> 2] | 0; - $732($220_1 | 0, 97573 | 0, $7_1 + 80 | 0 | 0) | 0; - $226_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($220_1 | 0, 98153 | 0, $7_1 + 80 | 0 | 0) | 0; + $226_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 96 | 0) >> 2] = HEAP32[($7_1 + 188 | 0) >> 2] | 0; - $732($226_1 | 0, 90316 | 0, $7_1 + 96 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86982 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97486 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90405 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87112 | 0, 0 | 0) | 0; - $248_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($226_1 | 0, 90896 | 0, $7_1 + 96 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87562 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98066 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90985 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87692 | 0, 0 | 0) | 0; + $248_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 112 | 0) >> 2] = HEAP32[($7_1 + 200 | 0) >> 2] | 0; - $732($248_1 | 0, 97666 | 0, $7_1 + 112 | 0 | 0) | 0; - $254_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($248_1 | 0, 98246 | 0, $7_1 + 112 | 0 | 0) | 0; + $254_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 128 | 0) >> 2] = HEAP32[($7_1 + 200 | 0) >> 2] | 0; - $732($254_1 | 0, 97628 | 0, $7_1 + 128 | 0 | 0) | 0; - $260_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; - HEAP32[($7_1 + 144 | 0) >> 2] = 69842; - $732($260_1 | 0, 97843 | 0, $7_1 + 144 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86987 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90371 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86990 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90375 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86994 | 0, 0 | 0) | 0; + $733($254_1 | 0, 98208 | 0, $7_1 + 128 | 0 | 0) | 0; + $260_1 = HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; + HEAP32[($7_1 + 144 | 0) >> 2] = 69915; + $733($260_1 | 0, 98423 | 0, $7_1 + 144 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87567 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90951 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87570 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90955 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 424 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87574 | 0, 0 | 0) | 0; } global$0 = $7_1 + 432 | 0; return; @@ -13242,25 +13400,25 @@ function asmFunc(imports) { HEAP32[($4_1 + 4 | 0) >> 2] = 0; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$3 } $23_1 = HEAP32[($4_1 + 12 | 0) >> 2] | 0; - $25_1 = HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + $25_1 = HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[$4_1 >> 2] = $26(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; - $156(34 | 0, $23_1 | 0, $25_1 | 0, 68034 | 0, $4_1 | 0); + $156(34 | 0, $23_1 | 0, $25_1 | 0, 68107 | 0, $4_1 | 0); HEAP32[($4_1 + 4 | 0) >> 2] = 1; } - HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $159(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0; break label$1; } - $156(34 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 292 | 0) >> 2] | 0 | 0, 68670 | 0, 0 | 0); + $156(34 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 68743 | 0, 0 | 0); HEAP32[($4_1 + 4 | 0) >> 2] = 1; } $46_1 = HEAP32[($4_1 + 4 | 0) >> 2] | 0; @@ -13287,51 +13445,51 @@ function asmFunc(imports) { label$4 : while (1) { $23_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $34_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (61 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (61 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (10813 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (10813 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (12093 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (12093 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9533 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9533 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11069 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11069 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11581 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11581 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3947581 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3947581 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (4079165 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (4079165 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9789 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9789 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (24125 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (24125 | 0) & 1 | 0) { break label$6 } - $34_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (31805 | 0); + $34_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (31805 | 0); } $23_1 = $34_1; } @@ -13339,16 +13497,16 @@ function asmFunc(imports) { if (!($23_1 & 1 | 0)) { break label$7 } - HEAP32[($3_1 + 68 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 68 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($3_1 + 64 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 64 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$8 : { if (!((HEAP32[($3_1 + 64 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$8 } break label$2; } - HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 64 | 0) >> 2] | 0) >> 2] = 52; HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 72 | 0) >> 2] | 0; HEAP32[($3_1 + 60 | 0) >> 2] = $175((HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0) | 0; @@ -13357,7 +13515,7 @@ function asmFunc(imports) { if (!((HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { break label$10 } - $156(27 | 0, HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 69828 | 0, 0 | 0); + $156(27 | 0, HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 69901 | 0, 0 | 0); break label$9; } label$11 : { @@ -13365,14 +13523,14 @@ function asmFunc(imports) { if (!((HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) == (2 | 0) & 1 | 0)) { break label$12 } - $156(28 | 0, HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 72279 | 0, 0 | 0); + $156(28 | 0, HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 72352 | 0, 0 | 0); break label$11; } label$13 : { if (!(($176((HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0)) { break label$13 } - $156(29 | 0, HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 66953 | 0, 0 | 0); + $156(29 | 0, HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 66987 | 0, 0 | 0); } } } @@ -13484,38 +13642,38 @@ function asmFunc(imports) { label$1 : while (1) { $13_1 = 0; label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $13_1 = ((HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 1 | 0 | 0) != (0 | 0) ^ -1 | 0; + $13_1 = ((HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 1 | 0 | 0) != (0 | 0) ^ -1 | 0; } label$3 : { if (!($13_1 & 1 | 0)) { break label$3 } label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (128 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (128 | 0) & 1 | 0)) { break label$4 } - $397(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0); + $397(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0); } label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; } continue label$1; } break label$1; }; label$6 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } - $368(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0); + $368(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0); } - $63_1 = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + $63_1 = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; global$0 = $3_1 + 16 | 0; return $63_1 | 0; } @@ -13526,7 +13684,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $9_1 = ($224(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; + $9_1 = ($224(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; global$0 = $3_1 + 16 | 0; return $9_1 | 0; } @@ -13537,7 +13695,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $8_1 = ($225(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; + $8_1 = ($225(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; global$0 = $3_1 + 16 | 0; return $8_1 | 0; } @@ -13548,7 +13706,7 @@ function asmFunc(imports) { $3_1 = global$0 - 32 | 0; global$0 = $3_1; HEAP32[($3_1 + 24 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 20 | 0) >> 2] = $821(1 | 0, 44 | 0) | 0; + HEAP32[($3_1 + 20 | 0) >> 2] = $822(1 | 0, 44 | 0) | 0; label$1 : { label$2 : { if (!((HEAP32[($3_1 + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -13557,13 +13715,13 @@ function asmFunc(imports) { HEAP32[($3_1 + 28 | 0) >> 2] = 0; break label$1; } - HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$3 : { label$4 : { label$5 : while (1) { $27_1 = 0; label$6 : { - if (!((HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } $33_1 = 1; @@ -13580,7 +13738,7 @@ function asmFunc(imports) { break label$8 } label$9 : { - if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 16 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 16 | 0)) { break label$9 } label$10 : { @@ -13672,7 +13830,7 @@ function asmFunc(imports) { } } $399(HEAP32[($3_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 20 | 0) >> 2] | 0 | 0) | 0; - $163_1 = $246(HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) | 0; + $163_1 = $246(HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 36 | 0) >> 2] = $163_1; HEAP32[($3_1 + 28 | 0) >> 2] = HEAP32[($3_1 + 20 | 0) >> 2] | 0; } @@ -13695,18 +13853,18 @@ function asmFunc(imports) { HEAP32[($7_1 + 20 | 0) >> 2] = $2_1; HEAP8[($7_1 + 19 | 0) >> 0] = $3_1; HEAP32[($7_1 + 12 | 0) >> 2] = $4_1; - HEAP32[($7_1 + 8 | 0) >> 2] = $821(1 | 0, 128 | 0) | 0; - HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($7_1 + 8 | 0) >> 2] = $822(1 | 0, 128 | 0) | 0; + HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $16_1 = $438(HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($7_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = $16_1; $25_1 = $439(HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 20 | 0) >> 2] | 0 | 0, (HEAPU8[($7_1 + 19 | 0) >> 0] | 0) & 1 | 0 | 0, HEAP32[($7_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($7_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] = $25_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (HEAP32[(HEAP32[($7_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$2 } - $38_1 = $246(HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) | 0; + $38_1 = $246(HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($7_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $38_1; break label$1; } @@ -13735,7 +13893,7 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 76 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - HEAP32[($4_1 + 72 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($4_1 + 72 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; $16_1 = HEAP32[($4_1 + 72 | 0) >> 2] | 0; $17_1 = HEAP32[($4_1 + 76 | 0) >> 2] | 0; i64toi32_i32$2 = $17_1; @@ -13798,7 +13956,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } - $48_1 = $763(HEAP32[((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0; + $48_1 = $764(HEAP32[((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 72 | 0) >> 2] | 0) + 20 | 0) >> 2] = $48_1; } label$4 : { @@ -13813,7 +13971,7 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 68 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - HEAP32[($4_1 + 64 | 0) >> 2] = $821(1 | 0, 60 | 0) | 0; + HEAP32[($4_1 + 64 | 0) >> 2] = $822(1 | 0, 60 | 0) | 0; $74_1 = HEAP32[($4_1 + 64 | 0) >> 2] | 0; $164($4_1 + 8 | 0 | 0, HEAP32[($4_1 + 68 | 0) >> 2] | 0 | 0); i64toi32_i32$2 = $4_1; @@ -13950,7 +14108,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $0_1 + $151_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $571_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - $817(HEAP32[($4_1 + 80 | 0) >> 2] | 0 | 0); + $818(HEAP32[($4_1 + 80 | 0) >> 2] | 0 | 0); global$0 = $4_1 + 96 | 0; return; } @@ -13976,7 +14134,7 @@ function asmFunc(imports) { if (!((HEAP32[($6_1 + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - HEAP32[($6_1 + 16 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($6_1 + 16 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; label$3 : { if (!((HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 @@ -14097,14 +14255,14 @@ function asmFunc(imports) { if ((HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(76554 | 0, 74032 | 0, 19296 | 0, 71111 | 0); + fimport$0(76956 | 0, 74090 | 0, 19367 | 0, 71184 | 0); wasm2js_trap(); } label$2 : { if ((HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$2 } - fimport$0(76823 | 0, 74032 | 0, 19297 | 0, 71111 | 0); + fimport$0(77225 | 0, 74090 | 0, 19368 | 0, 71184 | 0); wasm2js_trap(); } label$3 : { @@ -14116,7 +14274,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$5 } - fimport$0(76427 | 0, 74032 | 0, 19301 | 0, 71111 | 0); + fimport$0(76829 | 0, 74090 | 0, 19372 | 0, 71184 | 0); wasm2js_trap(); } HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -14126,7 +14284,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$6 } - fimport$0(75822 | 0, 74032 | 0, 19306 | 0, 71111 | 0); + fimport$0(76224 | 0, 74090 | 0, 19377 | 0, 71184 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 52 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -14332,14 +14490,14 @@ function asmFunc(imports) { break label$2; } label$4 : { - if (!((HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (63 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (63 | 0) & 1 | 0)) { break label$4 } - HEAP32[($3_1 + 340 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 340 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 340 | 0) >> 2] | 0) >> 2] = 53; HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] = HEAP32[($3_1 + 456 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0) | 0; @@ -14766,7 +14924,7 @@ function asmFunc(imports) { if (($264((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$15 } - $156(31 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 72434 | 0, 0 | 0); + $156(31 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 72507 | 0, 0 | 0); break label$14; } label$16 : { @@ -14792,7 +14950,7 @@ function asmFunc(imports) { if (($198($3_1 + 400 | 0 | 0, $3_1 + 344 | 0 | 0, 1 & 1 | 0 | 0) | 0) & 1 | 0) { break label$20 } - $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67757 | 0, 0 | 0); + $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67830 | 0, 0 | 0); } $209((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 4 | 0 | 0, $3_1 + 344 | 0 | 0); break label$18; @@ -14863,7 +15021,7 @@ function asmFunc(imports) { if (($198($3_1 + 400 | 0 | 0, $3_1 + 344 | 0 | 0, 0 & 1 | 0 | 0) | 0) & 1 | 0) { break label$36 } - $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 67757 | 0, 0 | 0); + $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 460 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 67830 | 0, 0 | 0); break label$35; } $209((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 4 | 0 | 0, $3_1 + 344 | 0 | 0); @@ -14871,7 +15029,7 @@ function asmFunc(imports) { } break label$30; } - $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67757 | 0, 0 | 0); + $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67830 | 0, 0 | 0); } } break label$25; @@ -14920,7 +15078,7 @@ function asmFunc(imports) { if (($198($3_1 + 400 | 0 | 0, $3_1 + 344 | 0 | 0, 0 & 1 | 0 | 0) | 0) & 1 | 0) { break label$48 } - $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67757 | 0, 0 | 0); + $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67830 | 0, 0 | 0); break label$47; } $209((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 4 | 0 | 0, $3_1 + 344 | 0 | 0); @@ -14928,13 +15086,13 @@ function asmFunc(imports) { } break label$42; } - $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67757 | 0, 0 | 0); + $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67830 | 0, 0 | 0); } } break label$37; } - $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 77997 | 0, 0 | 0); - fimport$0(72213 | 0, 74032 | 0, 15662 | 0, 70251 | 0); + $156(32 | 0, HEAP32[($3_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 340 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 78554 | 0, 0 | 0); + fimport$0(72286 | 0, 74090 | 0, 15716 | 0, 70324 | 0); wasm2js_trap(); } } @@ -15043,7 +15201,7 @@ function asmFunc(imports) { $190(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0 | 0); $185((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0 | 0); $191((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 120 | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -15054,7 +15212,7 @@ function asmFunc(imports) { $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; $3_1 = $3_1 | 0; - var $6_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $552_1 = 0, $553_1 = 0, $549$hi = 0, $548$hi = 0, i64toi32_i32$0 = 0, $63_1 = 0, $70_1 = 0, $77_1 = 0, $84_1 = 0, $91_1 = 0, $98_1 = 0, $109_1 = 0, $116_1 = 0, $123_1 = 0, $130_1 = 0, $137_1 = 0, $144_1 = 0, $364_1 = 0, $371_1 = 0, $378_1 = 0, $385_1 = 0, $392_1 = 0, $399_1 = 0, $410_1 = 0, $417_1 = 0, $424_1 = 0, $431_1 = 0, $438_1 = 0, $445_1 = 0, $743_1 = 0, $759_1 = 0, $775_1 = 0, $791_1 = 0, $807_1 = 0, $823_1 = 0, $827_1 = 0, $851 = 0, $867 = 0, $883 = 0, $899 = 0, $915 = 0, $931 = 0, $935 = 0, $340_1 = 0, $342_1 = 0, $343_1 = 0, $1406 = 0, $1422 = 0, $1438 = 0, $1454 = 0, $1470 = 0, $1486 = 0, $1490 = 0, $1514 = 0, $1530 = 0, $1546 = 0, $1562 = 0, $1578 = 0, $1594 = 0, $1598 = 0; + var $6_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $552_1 = 0, $553_1 = 0, $549$hi = 0, $548$hi = 0, i64toi32_i32$0 = 0, $63_1 = 0, $70_1 = 0, $77_1 = 0, $84_1 = 0, $91_1 = 0, $98_1 = 0, $109_1 = 0, $116_1 = 0, $123_1 = 0, $130_1 = 0, $137_1 = 0, $144_1 = 0, $364_1 = 0, $371_1 = 0, $378_1 = 0, $385_1 = 0, $392_1 = 0, $399_1 = 0, $410_1 = 0, $417_1 = 0, $424_1 = 0, $431_1 = 0, $438_1 = 0, $445_1 = 0, $743_1 = 0, $759_1 = 0, $775_1 = 0, $791_1 = 0, $807_1 = 0, $823_1 = 0, $827_1 = 0, $851_1 = 0, $867 = 0, $883 = 0, $899 = 0, $915 = 0, $931 = 0, $935 = 0, $340_1 = 0, $342_1 = 0, $343_1 = 0, $1406 = 0, $1422 = 0, $1438 = 0, $1454 = 0, $1470 = 0, $1486 = 0, $1490 = 0, $1514 = 0, $1530 = 0, $1546 = 0, $1562 = 0, $1578 = 0, $1594 = 0, $1598 = 0; $6_1 = global$0 - 496 | 0; global$0 = $6_1; HEAP32[($6_1 + 492 | 0) >> 2] = $0_1; @@ -15204,9 +15362,9 @@ function asmFunc(imports) { i64toi32_i32$3 = ($6_1 + 248 | 0) + $109_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $851 = i64toi32_i32$1; + $851_1 = i64toi32_i32$1; i64toi32_i32$1 = ($6_1 + 416 | 0) + $109_1 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $851; + HEAP32[i64toi32_i32$1 >> 2] = $851_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; $116_1 = 40; i64toi32_i32$3 = ($6_1 + 248 | 0) + $116_1 | 0; @@ -15268,7 +15426,7 @@ function asmFunc(imports) { if ((HEAPU8[($6_1 + 475 | 0) >> 0] | 0) & 1 | 0) { break label$7 } - $156(70 | 0, HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 484 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69050 | 0, 0 | 0); + $156(70 | 0, HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 484 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69123 | 0, 0 | 0); $291(HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 488 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 484 | 0) >> 2] | 0 | 0, (HEAPU8[($6_1 + 483 | 0) >> 0] | 0) & 1 | 0 | 0); $185($6_1 + 416 | 0 | 0); $185($6_1 + 360 | 0 | 0); @@ -15286,7 +15444,7 @@ function asmFunc(imports) { if (($198(HEAP32[($6_1 + 476 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 488 | 0) >> 2] | 0 | 0, 0 & 1 | 0 | 0) | 0) & 1 | 0) { break label$9 } - $156(51 | 0, HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 484 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 86794 | 0, 0 | 0); + $156(51 | 0, HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 484 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 87351 | 0, 0 | 0); } $291(HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 488 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 484 | 0) >> 2] | 0 | 0, (HEAPU8[($6_1 + 483 | 0) >> 0] | 0) & 1 | 0 | 0); $185($6_1 + 416 | 0 | 0); @@ -15379,7 +15537,7 @@ function asmFunc(imports) { $343_1 = HEAP32[($6_1 + 240 | 0) >> 2] | 0; HEAP32[($6_1 + 4 | 0) >> 2] = HEAP32[($6_1 + 244 | 0) >> 2] | 0; HEAP32[$6_1 >> 2] = $343_1; - $156(48 | 0, $340_1 | 0, $342_1 | 0, 74115 | 0, $6_1 | 0); + $156(48 | 0, $340_1 | 0, $342_1 | 0, 74173 | 0, $6_1 | 0); } break label$18; } @@ -15516,7 +15674,7 @@ function asmFunc(imports) { } $284($6_1 + 416 | 0 | 0); $284($6_1 + 360 | 0 | 0); - $156(32 | 0, HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 484 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 86753 | 0, 0 | 0); + $156(32 | 0, HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 484 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 87310 | 0, 0 | 0); } label$24 : { if (!(($228($6_1 + 416 | 0 | 0) | 0) & 1 | 0)) { @@ -15534,7 +15692,7 @@ function asmFunc(imports) { if (($176($6_1 + 16 | 0 | 0) | 0) & 1 | 0) { break label$25 } - $156(50 | 0, HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 484 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 86722 | 0, 0 | 0); + $156(50 | 0, HEAP32[($6_1 + 492 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 484 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 87279 | 0, 0 | 0); } $185($6_1 + 72 | 0 | 0); $185($6_1 + 16 | 0 | 0); @@ -15576,14 +15734,14 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[($6_1 + 16 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$2 } - HEAP32[($6_1 + 12 | 0) >> 2] = 101055; + HEAP32[($6_1 + 12 | 0) >> 2] = 101635; label$3 : { if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } HEAP32[($6_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; } - HEAP32[($6_1 + 8 | 0) >> 2] = 101055; + HEAP32[($6_1 + 8 | 0) >> 2] = 101635; label$4 : { if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 16 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 @@ -15595,7 +15753,7 @@ function asmFunc(imports) { $56_1 = HEAP32[($6_1 + 12 | 0) >> 2] | 0; HEAP32[($6_1 + 4 | 0) >> 2] = HEAP32[($6_1 + 8 | 0) >> 2] | 0; HEAP32[$6_1 >> 2] = $56_1; - $213(8 | 0, $54_1 | 0, $55_1 | 0, 86383 | 0, $6_1 | 0) | 0; + $213(8 | 0, $54_1 | 0, $55_1 | 0, 86940 | 0, $6_1 | 0) | 0; } } global$0 = $6_1 + 32 | 0; @@ -15624,7 +15782,7 @@ function asmFunc(imports) { $182($0_1 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); label$4 : { label$5 : while (1) { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { break label$4 } $152(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -15668,7 +15826,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 72 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - fimport$0(75859 | 0, 74032 | 0, 12473 | 0, 73666 | 0); + fimport$0(76261 | 0, 74090 | 0, 12527 | 0, 73724 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 72 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -15692,13 +15850,13 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 72 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 12457 | 0, 72026 | 0); + fimport$0(76208 | 0, 74090 | 0, 12511 | 0, 72099 | 0); wasm2js_trap(); } $184(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0); $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 60 | 0) >> 2] | 0 | 0); $185(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -15717,7 +15875,7 @@ function asmFunc(imports) { $186(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $185((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0 | 0); $187(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -15729,7 +15887,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $817(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); $192((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 40 | 0 | 0); HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; label$1 : { @@ -15740,7 +15898,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 52 | 0) >> 2] = 0; $193(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; continue label$2; }; @@ -15773,7 +15931,7 @@ function asmFunc(imports) { }; } $433(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -15793,7 +15951,7 @@ function asmFunc(imports) { $434(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); $435(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $329((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 36 | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -15810,7 +15968,7 @@ function asmFunc(imports) { break label$1 } $293((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -15827,7 +15985,7 @@ function asmFunc(imports) { break label$1 } $294(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -15846,7 +16004,7 @@ function asmFunc(imports) { $178(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $184(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $194((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -15889,7 +16047,7 @@ function asmFunc(imports) { } HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0; $185(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; continue label$2; }; @@ -15904,13 +16062,13 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $817(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); $192((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 40 | 0 | 0); label$1 : { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(75983 | 0, 74032 | 0, 16938 | 0, 72503 | 0); + fimport$0(76385 | 0, 74090 | 0, 17002 | 0, 72576 | 0); wasm2js_trap(); } global$0 = $3_1 + 16 | 0; @@ -15947,7 +16105,7 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 140 | 0) >> 2] = $0_1; HEAP32[($3_1 + 136 | 0) >> 2] = 0; - HEAP32[($3_1 + 136 | 0) >> 2] = $821(1 | 0, 28 | 0) | 0; + HEAP32[($3_1 + 136 | 0) >> 2] = $822(1 | 0, 28 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -15956,7 +16114,7 @@ function asmFunc(imports) { } break label$2; } - HEAP32[((HEAP32[($3_1 + 136 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 140 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 136 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 140 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 140 | 0) >> 2] | 0 | 0, 9051 | 0) | 0; $157(HEAP32[($3_1 + 140 | 0) >> 2] | 0 | 0, 40 | 0) | 0; label$4 : { @@ -16103,7 +16261,7 @@ function asmFunc(imports) { continue label$10; }; } - HEAP32[((HEAP32[($3_1 + 136 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 140 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 136 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 140 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 140 | 0) >> 2] | 0 | 0, 41 | 0) | 0; $185($3_1 + 72 | 0 | 0); if (!(0 & 1 | 0)) { @@ -16335,7 +16493,7 @@ function asmFunc(imports) { } } label$21 : { - if (!($760((HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 36 | 0 | 0, (HEAP32[((HEAP32[($5_1 + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 36 | 0 | 0) | 0)) { + if (!($761((HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 36 | 0 | 0, (HEAP32[((HEAP32[($5_1 + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 36 | 0 | 0) | 0)) { break label$21 } HEAP8[($5_1 + 31 | 0) >> 0] = 0 & 1 | 0; @@ -16387,7 +16545,7 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 60 | 0) >> 2] = $1_1; $164($0_1 | 0, HEAP32[($4_1 + 60 | 0) >> 2] | 0 | 0); - HEAP32[($4_1 + 56 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($4_1 + 56 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; $9_1 = HEAP32[($4_1 + 56 | 0) >> 2] | 0; i64toi32_i32$2 = $0_1; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -16593,8 +16751,8 @@ function asmFunc(imports) { i64toi32_i32$0 = $0_1 + $25_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $124_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - $817(HEAP32[($4_1 + 56 | 0) >> 2] | 0 | 0); - $817(HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); + $818(HEAP32[($4_1 + 56 | 0) >> 2] | 0 | 0); + $818(HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); $192(($4_1 + 4 | 0) + 40 | 0 | 0); global$0 = $4_1 + 64 | 0; return; @@ -16642,7 +16800,7 @@ function asmFunc(imports) { break label$5 } } - fimport$0(77414 | 0, 74032 | 0, 12626 | 0, 72830 | 0); + fimport$0(77839 | 0, 74090 | 0, 12680 | 0, 72888 | 0); wasm2js_trap(); } HEAP32[$4_1 >> 2] = (HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 1 | 0; @@ -16663,7 +16821,7 @@ function asmFunc(imports) { break label$9 } } - fimport$0(77366 | 0, 74032 | 0, 12633 | 0, 72830 | 0); + fimport$0(77791 | 0, 74090 | 0, 12687 | 0, 72888 | 0); wasm2js_trap(); } HEAP32[$4_1 >> 2] = (HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 2 | 0; @@ -16684,7 +16842,7 @@ function asmFunc(imports) { break label$13 } } - fimport$0(77304 | 0, 74032 | 0, 12641 | 0, 72830 | 0); + fimport$0(77729 | 0, 74090 | 0, 12695 | 0, 72888 | 0); wasm2js_trap(); } HEAP32[$4_1 >> 2] = (HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 3 | 0; @@ -16708,7 +16866,7 @@ function asmFunc(imports) { break label$17 } } - fimport$0(77333 | 0, 74032 | 0, 12650 | 0, 72830 | 0); + fimport$0(77758 | 0, 74090 | 0, 12704 | 0, 72888 | 0); wasm2js_trap(); } HEAP32[$4_1 >> 2] = (HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0; @@ -16742,7 +16900,7 @@ function asmFunc(imports) { $3_1 = global$0 - 160 | 0; global$0 = $3_1; HEAP32[($3_1 + 152 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 148 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 148 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$1 : { label$2 : { if (!((HEAP32[($3_1 + 148 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -16752,12 +16910,12 @@ function asmFunc(imports) { break label$1; } HEAP32[(HEAP32[($3_1 + 148 | 0) >> 2] | 0) >> 2] = 5; - HEAP32[((HEAP32[($3_1 + 148 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 148 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[((HEAP32[($3_1 + 148 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 148 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; $23_1 = HEAP32[($3_1 + 148 | 0) >> 2] | 0; HEAP32[($23_1 + 8 | 0) >> 2] = HEAP32[($23_1 + 8 | 0) >> 2] | 0 | 67108864 | 0; HEAP32[((HEAP32[($3_1 + 148 | 0) >> 2] | 0) + 4 | 0) >> 2] = 0; - HEAP32[($3_1 + 144 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($3_1 + 144 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; label$3 : { label$4 : { if (!(((HEAPU8[(HEAP32[($3_1 + 144 | 0) >> 2] | 0) >> 0] | 0) & 255 | 0 | 0) == (117 | 0) & 1 | 0)) { @@ -16779,18 +16937,18 @@ function asmFunc(imports) { if (!(((HEAPU8[(HEAP32[($3_1 + 144 | 0) >> 2] | 0) >> 0] | 0) & 255 | 0 | 0) != (39 | 0) & 1 | 0)) { break label$5 } - $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 84992 | 0, 0 | 0); + $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 85549 | 0, 0 | 0); } label$6 : { if (!((HEAP32[($3_1 + 140 | 0) >> 2] | 0 | 0) > (128 | 0) & 1 | 0)) { break label$6 } - $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 85151 | 0, 0 | 0); + $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 85708 | 0, 0 | 0); } $107_1 = (HEAP32[($3_1 + 148 | 0) >> 2] | 0) + 64 | 0; i64toi32_i32$1 = HEAP32[($3_1 + 140 | 0) >> 2] | 0; i64toi32_i32$0 = i64toi32_i32$1 >> 31 | 0; - $133($3_1 + 120 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $133($3_1 + 120 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$0 = HEAP32[($3_1 + 120 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($3_1 + 124 | 0) >> 2] | 0; @@ -16825,18 +16983,18 @@ function asmFunc(imports) { if (!(((HEAPU8[(HEAP32[($3_1 + 144 | 0) >> 2] | 0) >> 0] | 0) & 255 | 0 | 0) != (39 | 0) & 1 | 0)) { break label$9 } - $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 84992 | 0, 0 | 0); + $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 85549 | 0, 0 | 0); } label$10 : { if (!((HEAP32[($3_1 + 116 | 0) >> 2] | 0 | 0) > (65535 | 0) & 1 | 0)) { break label$10 } - $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 85151 | 0, 0 | 0); + $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 85708 | 0, 0 | 0); } $184_1 = (HEAP32[($3_1 + 148 | 0) >> 2] | 0) + 64 | 0; i64toi32_i32$1 = HEAP32[($3_1 + 116 | 0) >> 2] | 0; i64toi32_i32$0 = i64toi32_i32$1 >> 31 | 0; - $133($3_1 + 96 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $133($3_1 + 96 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$0 = HEAP32[($3_1 + 96 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($3_1 + 100 | 0) >> 2] | 0; @@ -16871,12 +17029,12 @@ function asmFunc(imports) { if (!(((HEAPU8[(HEAP32[($3_1 + 144 | 0) >> 2] | 0) >> 0] | 0) & 255 | 0 | 0) != (39 | 0) & 1 | 0)) { break label$13 } - $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 84992 | 0, 0 | 0); + $156(62 | 0, HEAP32[($3_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 85549 | 0, 0 | 0); } $248_1 = (HEAP32[($3_1 + 148 | 0) >> 2] | 0) + 64 | 0; i64toi32_i32$1 = HEAP32[($3_1 + 92 | 0) >> 2] | 0; i64toi32_i32$0 = i64toi32_i32$1 >> 31 | 0; - $133($3_1 + 72 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $133($3_1 + 72 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$0 = HEAP32[($3_1 + 72 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($3_1 + 76 | 0) >> 2] | 0; @@ -16965,7 +17123,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $3_1; i64toi32_i32$5 = HEAP32[($3_1 + 64 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($3_1 + 68 | 0) >> 2] | 0; - $133($3_1 + 40 | 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$1 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $133($3_1 + 40 | 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$1 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$0 = $3_1; i64toi32_i32$1 = HEAP32[($3_1 + 40 | 0) >> 2] | 0; i64toi32_i32$5 = HEAP32[($3_1 + 44 | 0) >> 2] | 0; @@ -17048,7 +17206,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $3_1; i64toi32_i32$4 = HEAP32[($3_1 + 32 | 0) >> 2] | 0; i64toi32_i32$5 = HEAP32[($3_1 + 36 | 0) >> 2] | 0; - $133($3_1 + 8 | 0 | 0, i64toi32_i32$4 | 0, i64toi32_i32$5 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $133($3_1 + 8 | 0 | 0, i64toi32_i32$4 | 0, i64toi32_i32$5 | 0, (HEAPU8[((HEAP32[($3_1 + 152 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$1 = $3_1; i64toi32_i32$5 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; i64toi32_i32$4 = HEAP32[($3_1 + 12 | 0) >> 2] | 0; @@ -17087,7 +17245,7 @@ function asmFunc(imports) { HEAP32[($5_1 + 408 | 0) >> 2] = $1_1; HEAP8[($5_1 + 407 | 0) >> 0] = $2_1; HEAP32[($5_1 + 400 | 0) >> 2] = 0; - $724($5_1 + 128 | 0 | 0, 0 | 0, 260 | 0) | 0; + $725($5_1 + 128 | 0 | 0, 0 | 0, 260 | 0) | 0; HEAP32[($5_1 + 124 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 412 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; label$1 : { label$2 : while (1) { @@ -17120,7 +17278,7 @@ function asmFunc(imports) { break label$13 } $67_1 = (HEAP32[($5_1 + 408 | 0) >> 2] | 0) + 64 | 0; - i64toi32_i32$0 = $786($5_1 + 128 | 0 | 0, 0 | 0, 10 | 0) | 0; + i64toi32_i32$0 = $787($5_1 + 128 | 0 | 0, 0 | 0, 10 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $132($5_1 + 104 | 0 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, (HEAPU8[($5_1 + 407 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $5_1; @@ -17141,7 +17299,7 @@ function asmFunc(imports) { break label$12; } $86_1 = (HEAP32[($5_1 + 408 | 0) >> 2] | 0) + 64 | 0; - i64toi32_i32$1 = $788($5_1 + 128 | 0 | 0, 0 | 0, 10 | 0) | 0; + i64toi32_i32$1 = $789($5_1 + 128 | 0 | 0, 0 | 0, 10 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $133($5_1 + 88 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[($5_1 + 407 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $5_1; @@ -17163,7 +17321,7 @@ function asmFunc(imports) { break label$4; case 1: $105_1 = (HEAP32[($5_1 + 408 | 0) >> 2] | 0) + 64 | 0; - i64toi32_i32$0 = $788($5_1 + 128 | 0 | 0, 0 | 0, 8 | 0) | 0; + i64toi32_i32$0 = $789($5_1 + 128 | 0 | 0, 0 | 0, 8 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $133($5_1 + 72 | 0 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, (HEAPU8[($5_1 + 407 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $5_1; @@ -17184,7 +17342,7 @@ function asmFunc(imports) { break label$4; case 2: $124_1 = (HEAP32[($5_1 + 408 | 0) >> 2] | 0) + 64 | 0; - i64toi32_i32$1 = $788(($5_1 + 128 | 0) + 2 | 0 | 0, 0 | 0, 16 | 0) | 0; + i64toi32_i32$1 = $789(($5_1 + 128 | 0) + 2 | 0 | 0, 0 | 0, 16 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $133($5_1 + 56 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[($5_1 + 407 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $5_1; @@ -17205,7 +17363,7 @@ function asmFunc(imports) { break label$4; case 3: $145_1 = (HEAP32[($5_1 + 408 | 0) >> 2] | 0) + 64 | 0; - i64toi32_i32$0 = $788(($5_1 + 128 | 0) + 2 | 0 | 0, 0 | 0, 2 | 0) | 0; + i64toi32_i32$0 = $789(($5_1 + 128 | 0) + 2 | 0 | 0, 0 | 0, 2 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $133($5_1 + 40 | 0 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, (HEAPU8[($5_1 + 407 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $5_1; @@ -17226,7 +17384,7 @@ function asmFunc(imports) { break label$4; case 4: $166_1 = (HEAP32[($5_1 + 408 | 0) >> 2] | 0) + 64 | 0; - $131($5_1 + 24 | 0 | 0, +(+$784($5_1 + 128 | 0 | 0, 0 | 0)), (HEAPU8[($5_1 + 407 | 0) >> 0] | 0) & 1 | 0 | 0); + $131($5_1 + 24 | 0 | 0, +(+$785($5_1 + 128 | 0 | 0, 0 | 0)), (HEAPU8[($5_1 + 407 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $5_1; i64toi32_i32$1 = HEAP32[($5_1 + 24 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; @@ -17245,7 +17403,7 @@ function asmFunc(imports) { break label$4; case 5: $184_1 = (HEAP32[($5_1 + 408 | 0) >> 2] | 0) + 64 | 0; - $131($5_1 + 8 | 0 | 0, +(+$784(($5_1 + 128 | 0) + 2 | 0 | 0, 0 | 0)), (HEAPU8[($5_1 + 407 | 0) >> 0] | 0) & 1 | 0 | 0); + $131($5_1 + 8 | 0 | 0, +(+$785(($5_1 + 128 | 0) + 2 | 0 | 0, 0 | 0)), (HEAPU8[($5_1 + 407 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $5_1; i64toi32_i32$1 = HEAP32[($5_1 + 8 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; @@ -17266,7 +17424,7 @@ function asmFunc(imports) { break label$5; }; } - fimport$0(72213 | 0, 74032 | 0, 12873 | 0, 69472 | 0); + fimport$0(72286 | 0, 74090 | 0, 12927 | 0, 69545 | 0); wasm2js_trap(); } global$0 = $5_1 + 416 | 0; @@ -17525,7 +17683,7 @@ function asmFunc(imports) { function $207($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; - var $4_1 = 0, $271_1 = 0; + var $4_1 = 0, $268_1 = 0; $4_1 = global$0 - 32 | 0; global$0 = $4_1; HEAP32[($4_1 + 24 | 0) >> 2] = $0_1; @@ -17644,8 +17802,8 @@ function asmFunc(imports) { HEAP32[($4_1 + 28 | 0) >> 2] = (HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + Math_imul(HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 116 | 0) >> 2] | 0, 36) | 0; break label$1; } - fimport$0(72213 | 0, 74032 | 0, 12953 | 0, 66919 | 0); - wasm2js_trap(); + HEAP32[($4_1 + 28 | 0) >> 2] = 0; + break label$1; } break label$16; } @@ -17685,9 +17843,9 @@ function asmFunc(imports) { } HEAP32[($4_1 + 28 | 0) >> 2] = 0; } - $271_1 = HEAP32[($4_1 + 28 | 0) >> 2] | 0; + $268_1 = HEAP32[($4_1 + 28 | 0) >> 2] | 0; global$0 = $4_1 + 32 | 0; - return $271_1 | 0; + return $268_1 | 0; } function $208($0_1, $1_1) { @@ -17895,19 +18053,19 @@ function asmFunc(imports) { label$2 : { label$3 : { label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$4 } - HEAP32[($3_1 + 440 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 440 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$5 : { if (!((HEAP32[($3_1 + 440 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$5 } break label$2; } - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 436 | 0) >> 2] = $145(HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 0 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 436 | 0) >> 2] = $145(HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 0 | 0) | 0; label$6 : { label$7 : { if (!((HEAP32[($3_1 + 436 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -17922,7 +18080,7 @@ function asmFunc(imports) { i64toi32_i32$2 = HEAP32[($3_1 + 432 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 24 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 28 | 0) >> 2] | 0; - $133($3_1 + 416 | 0 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, (HEAPU8[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $133($3_1 + 416 | 0 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, (HEAPU8[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$1 = HEAP32[($3_1 + 416 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($3_1 + 420 | 0) >> 2] | 0; @@ -18028,9 +18186,9 @@ function asmFunc(imports) { break label$13 } $154_1 = HEAP32[($3_1 + 444 | 0) >> 2] | 0; - $156_1 = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $213(4 | 0, $154_1 | 0, $156_1 | 0, 73405 | 0, $3_1 | 0) | 0; + $156_1 = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $213(4 | 0, $154_1 | 0, $156_1 | 0, 73463 | 0, $3_1 | 0) | 0; } $162_1 = HEAP32[($3_1 + 356 | 0) >> 2] | 0; HEAP32[($162_1 + 32 | 0) >> 2] = (HEAP32[($162_1 + 32 | 0) >> 2] | 0) + 1 | 0; @@ -18137,18 +18295,18 @@ function asmFunc(imports) { } label$17 : { label$18 : { - if (!((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$18 } - if ($760(HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 74053 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 74111 | 0) | 0) { break label$18 } - HEAP32[($3_1 + 292 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($3_1 + 292 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 440 | 0) >> 2] | 0) >> 2] = 4; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $296_1 = (HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 4 | 0; - $214($3_1 + 236 | 0 | 0, ($764(HEAP32[($3_1 + 292 | 0) >> 2] | 0 | 0) | 0) + 1 | 0 | 0, 2 | 0); + $214($3_1 + 236 | 0 | 0, ($765(HEAP32[($3_1 + 292 | 0) >> 2] | 0 | 0) | 0) + 1 | 0 | 0, 2 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$1 = HEAP32[($3_1 + 236 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($3_1 + 240 | 0) >> 2] | 0; @@ -18207,9 +18365,9 @@ function asmFunc(imports) { break label$17; } $335_1 = HEAP32[($3_1 + 444 | 0) >> 2] | 0; - $337_1 = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(4 | 0, $335_1 | 0, $337_1 | 0, 86357 | 0, $3_1 + 16 | 0 | 0); + $337_1 = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $156(4 | 0, $335_1 | 0, $337_1 | 0, 86914 | 0, $3_1 + 16 | 0 | 0); break label$2; } } @@ -18219,10 +18377,10 @@ function asmFunc(imports) { } label$19 : { label$20 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { break label$20 } - HEAP32[($3_1 + 440 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 440 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$21 : { if (!((HEAP32[($3_1 + 440 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$21 @@ -18230,17 +18388,17 @@ function asmFunc(imports) { break label$2; } HEAP32[(HEAP32[($3_1 + 440 | 0) >> 2] | 0) >> 2] = 3; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[($3_1 + 232 | 0) >> 2] = 2; label$22 : { - if (!(($71(HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) == (2 | 0) & 1 | 0)) { + if (!(($71(HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) == (2 | 0) & 1 | 0)) { break label$22 } HEAP32[($3_1 + 232 | 0) >> 2] = 264; } $387_1 = (HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 4 | 0; - $214($3_1 + 176 | 0 | 0, $72(HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0, HEAP32[($3_1 + 232 | 0) >> 2] | 0 | 0); + $214($3_1 + 176 | 0 | 0, $72(HEAP32[((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0, HEAP32[($3_1 + 232 | 0) >> 2] | 0 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$0 = HEAP32[($3_1 + 176 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($3_1 + 180 | 0) >> 2] | 0; @@ -18300,10 +18458,10 @@ function asmFunc(imports) { label$23 : while (1) { $436_1 = 0; label$24 : { - if (!((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$24 } - $436_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0); + $436_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0); } label$25 : { if (!($436_1 & 1 | 0)) { @@ -18318,7 +18476,7 @@ function asmFunc(imports) { } label$26 : { label$27 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (130 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (130 | 0) & 1 | 0)) { break label$27 } HEAP32[($3_1 + 440 | 0) >> 2] = $203(HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0) | 0; @@ -18327,14 +18485,14 @@ function asmFunc(imports) { label$28 : { label$29 : { label$30 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9058 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9058 | 0) & 1 | 0) { break label$30 } - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9059 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9059 | 0) & 1 | 0)) { break label$29 } } - HEAP32[($3_1 + 440 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 440 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$31 : { if (!((HEAP32[($3_1 + 440 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$31 @@ -18342,12 +18500,12 @@ function asmFunc(imports) { break label$2; } HEAP32[(HEAP32[($3_1 + 440 | 0) >> 2] | 0) >> 2] = 6; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $497_1 = (HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 64 | 0; - i64toi32_i32$0 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9058 | 0) & 1 | 0 ? 1 : 0; + i64toi32_i32$0 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9058 | 0) & 1 | 0 ? 1 : 0; i64toi32_i32$1 = i64toi32_i32$0 >> 31 | 0; - $133($3_1 + 160 | 0 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, (HEAPU8[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $133($3_1 + 160 | 0 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, (HEAPU8[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$1 = HEAP32[($3_1 + 160 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($3_1 + 164 | 0) >> 2] | 0; @@ -18370,10 +18528,10 @@ function asmFunc(imports) { } label$32 : { label$33 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9060 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9060 | 0) & 1 | 0)) { break label$33 } - HEAP32[($3_1 + 440 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 440 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$34 : { if (!((HEAP32[($3_1 + 440 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$34 @@ -18381,11 +18539,11 @@ function asmFunc(imports) { break label$2; } HEAP32[(HEAP32[($3_1 + 440 | 0) >> 2] | 0) >> 2] = 6; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $557_1 = (HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 64 | 0; i64toi32_i32$1 = 0; - $133($3_1 + 144 | 0 | 0, 0 | 0, i64toi32_i32$1 | 0, (HEAPU8[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $133($3_1 + 144 | 0 | 0, 0 | 0, i64toi32_i32$1 | 0, (HEAPU8[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$1 = HEAP32[($3_1 + 144 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($3_1 + 148 | 0) >> 2] | 0; @@ -18408,36 +18566,36 @@ function asmFunc(imports) { } label$35 : { label$36 : { - if (!(($215(HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($215(HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$36 } - HEAP32[($3_1 + 440 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 440 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$37 : { if (!((HEAP32[($3_1 + 440 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$37 } break label$2; } - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 440 | 0) >> 2] | 0) >> 2] = 8; - $204(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 440 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0) | 0; + $204(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 440 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0) | 0; $152(HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0) | 0; break label$35; } label$38 : { label$39 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9051 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9051 | 0) & 1 | 0)) { break label$39 } - HEAP32[($3_1 + 440 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 440 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$40 : { if (!((HEAP32[($3_1 + 440 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$40 } break label$2; } - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 440 | 0) >> 2] | 0) >> 2] = 7; $632_1 = $195(HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 96 | 0) >> 2] = $632_1; @@ -18522,18 +18680,18 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; break label$41; } - $156(5 | 0, HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73984 | 0, 0 | 0); + $156(5 | 0, HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 74042 | 0, 0 | 0); } break label$38; } label$43 : { label$44 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { break label$44 } - HEAP32[($3_1 + 440 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 440 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; HEAP32[(HEAP32[($3_1 + 440 | 0) >> 2] | 0) >> 2] = 9; - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0) | 0; $724_1 = $216(HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 136 | 0) >> 2] = $724_1; @@ -18616,11 +18774,11 @@ function asmFunc(imports) { } break label$2; } - HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 440 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0, 41 | 0) | 0; break label$43; } - $156(1 | 0, HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73394 | 0, 0 | 0); + $156(1 | 0, HEAP32[($3_1 + 444 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 444 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73452 | 0, 0 | 0); } } } @@ -18646,7 +18804,7 @@ function asmFunc(imports) { break label$46 } } - fimport$0(85378 | 0, 74032 | 0, 13219 | 0, 70134 | 0); + fimport$0(85935 | 0, 74090 | 0, 13273 | 0, 70207 | 0); wasm2js_trap(); } $825_1 = HEAP32[($3_1 + 440 | 0) >> 2] | 0; @@ -18736,18 +18894,18 @@ function asmFunc(imports) { break label$1; } } - $30_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0; + $30_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0; HEAP32[($30_1 + 20 | 0) >> 2] = (HEAP32[($30_1 + 20 | 0) >> 2] | 0) + 1 | 0; - $36_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0; + $36_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0; HEAP32[($36_1 + 32 | 0) >> 2] = HEAP32[($36_1 + 32 | 0) >> 2] | 0 | (HEAP32[($7_1 + 440 | 0) >> 2] | 0) | 0; - HEAP32[($7_1 + 424 | 0) >> 2] = 72680; + HEAP32[($7_1 + 424 | 0) >> 2] = 72738; label$5 : { - if (!((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - HEAP32[($7_1 + 424 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($7_1 + 424 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; } - $724($7_1 + 224 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($7_1 + 224 | 0 | 0, 0 | 0, 200 | 0) | 0; label$6 : { if (!((HEAP32[($7_1 + 432 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 @@ -18755,7 +18913,7 @@ function asmFunc(imports) { $27(HEAP32[((HEAP32[((HEAP32[($7_1 + 432 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 432 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 432 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); } HEAP32[($7_1 + 220 | 0) >> 2] = $4_1; - $807($7_1 + 224 | 0 | 0, 200 | 0, HEAP32[($7_1 + 428 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 220 | 0) >> 2] | 0 | 0) | 0; + $808($7_1 + 224 | 0 | 0, 200 | 0, HEAP32[($7_1 + 428 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 220 | 0) >> 2] | 0 | 0) | 0; label$7 : { label$8 : { if (!(HEAP32[($7_1 + 440 | 0) >> 2] | 0)) { @@ -18768,12 +18926,12 @@ function asmFunc(imports) { } HEAP32[($7_1 + 164 | 0) >> 2] = $129(HEAP32[($7_1 + 440 | 0) >> 2] | 0 | 0) | 0; HEAP32[($7_1 + 160 | 0) >> 2] = $7_1 + 224 | 0; - $748(90351 | 0, $7_1 + 160 | 0 | 0) | 0; + $749(90931 | 0, $7_1 + 160 | 0 | 0) | 0; break label$9; } HEAP32[($7_1 + 180 | 0) >> 2] = $129(HEAP32[($7_1 + 440 | 0) >> 2] | 0 | 0) | 0; HEAP32[($7_1 + 176 | 0) >> 2] = $7_1 + 224 | 0; - $748(70813 | 0, $7_1 + 176 | 0 | 0) | 0; + $749(70886 | 0, $7_1 + 176 | 0 | 0) | 0; } break label$7; } @@ -18783,73 +18941,73 @@ function asmFunc(imports) { break label$12 } HEAP32[($7_1 + 192 | 0) >> 2] = $7_1 + 224 | 0; - $748(87278 | 0, $7_1 + 192 | 0 | 0) | 0; + $749(87858 | 0, $7_1 + 192 | 0 | 0) | 0; break label$11; } HEAP32[($7_1 + 208 | 0) >> 2] = $7_1 + 224 | 0; - $748(70786 | 0, $7_1 + 208 | 0 | 0) | 0; + $749(70859 | 0, $7_1 + 208 | 0 | 0) | 0; } } $28(HEAP32[($7_1 + 432 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); label$13 : { - if (!((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$13 } label$14 : { - if (!((((HEAP32[((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) | 0 | 0) > (1 | 0) & 1 | 0)) { + if (!((((HEAP32[((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) | 0 | 0) > (1 | 0) & 1 | 0)) { break label$14 } - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97776 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98356 | 0, 0 | 0) | 0; } - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87119 | 0, 0 | 0) | 0; - $158_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87699 | 0, 0 | 0) | 0; + $158_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[$7_1 >> 2] = $129(HEAP32[($7_1 + 440 | 0) >> 2] | 0 | 0) | 0; - $732($158_1 | 0, 97607 | 0, $7_1 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97732 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87093 | 0, 0 | 0) | 0; - $171_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($158_1 | 0, 98187 | 0, $7_1 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98312 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87673 | 0, 0 | 0) | 0; + $171_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 224 | 0; - $732($171_1 | 0, 97817 | 0, $7_1 + 16 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97489 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90383 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87115 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87036 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87e3 | 0, 0 | 0) | 0; - $199_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($171_1 | 0, 98397 | 0, $7_1 + 16 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98069 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90963 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87695 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87616 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87580 | 0, 0 | 0) | 0; + $199_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($7_1 + 432 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $732($199_1 | 0, 97779 | 0, $7_1 + 32 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97481 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87066 | 0, 0 | 0) | 0; - $215_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($199_1 | 0, 98359 | 0, $7_1 + 32 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98061 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87646 | 0, 0 | 0) | 0; + $215_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 432 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; - $732($215_1 | 0, 97537 | 0, $7_1 + 48 | 0 | 0) | 0; - $222_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($215_1 | 0, 98117 | 0, $7_1 + 48 | 0 | 0) | 0; + $222_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 432 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; - $732($222_1 | 0, 97499 | 0, $7_1 + 64 | 0 | 0) | 0; - $229_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($222_1 | 0, 98079 | 0, $7_1 + 64 | 0 | 0) | 0; + $229_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 80 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 432 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; - $732($229_1 | 0, 97573 | 0, $7_1 + 80 | 0 | 0) | 0; - $236_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($229_1 | 0, 98153 | 0, $7_1 + 80 | 0 | 0) | 0; + $236_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 96 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 432 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; - $732($236_1 | 0, 90316 | 0, $7_1 + 96 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86982 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97486 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90405 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87112 | 0, 0 | 0) | 0; - $259_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($236_1 | 0, 90896 | 0, $7_1 + 96 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87562 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98066 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90985 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87692 | 0, 0 | 0) | 0; + $259_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 112 | 0) >> 2] = HEAP32[($7_1 + 424 | 0) >> 2] | 0; - $732($259_1 | 0, 97666 | 0, $7_1 + 112 | 0 | 0) | 0; - $265_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($259_1 | 0, 98246 | 0, $7_1 + 112 | 0 | 0) | 0; + $265_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 128 | 0) >> 2] = HEAP32[($7_1 + 424 | 0) >> 2] | 0; - $732($265_1 | 0, 97628 | 0, $7_1 + 128 | 0 | 0) | 0; - $271_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; - HEAP32[($7_1 + 144 | 0) >> 2] = 69842; - $732($271_1 | 0, 97843 | 0, $7_1 + 144 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86987 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90371 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86990 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90375 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86994 | 0, 0 | 0) | 0; + $733($265_1 | 0, 98208 | 0, $7_1 + 128 | 0 | 0) | 0; + $271_1 = HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; + HEAP32[($7_1 + 144 | 0) >> 2] = 69915; + $733($271_1 | 0, 98423 | 0, $7_1 + 144 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87567 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90951 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87570 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90955 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 436 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87574 | 0, 0 | 0) | 0; } HEAP8[($7_1 + 447 | 0) >> 0] = 1 & 1 | 0; } @@ -18892,7 +19050,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; HEAP32[$0_1 >> 2] = 2; HEAP32[($0_1 + 32 | 0) >> 2] = HEAP32[($5_1 + 12 | 0) >> 2] | 0; - HEAP32[($5_1 + 4 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($5_1 + 4 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] = 0; HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[($5_1 + 8 | 0) >> 2] | 0; HEAP32[($0_1 + 52 | 0) >> 2] = HEAP32[($5_1 + 4 | 0) >> 2] | 0; @@ -18948,23 +19106,23 @@ function asmFunc(imports) { break label$2; } label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { break label$4 } label$5 : { label$6 : while (1) { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { break label$5 } $152(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($3_1 + 68 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 68 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$7 : { if (!((HEAP32[($3_1 + 68 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$7 } break label$2; } - HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 68 | 0) >> 2] | 0) >> 2] = 52; HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 72 | 0) >> 2] | 0; $51_1 = $216(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; @@ -19149,10 +19307,10 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 13231 | 0, 72053 | 0); + fimport$0(76208 | 0, 74090 | 0, 13285 | 0, 72126 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -19169,7 +19327,7 @@ function asmFunc(imports) { HEAP32[$0_1 >> 2] = 0; HEAP32[($0_1 + 4 | 0) >> 2] = i64toi32_i32$0; HEAP32[($4_1 + 24 | 0) >> 2] = 0; - HEAP32[($4_1 + 24 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($4_1 + 24 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -19195,11 +19353,11 @@ function asmFunc(imports) { } label$6 : { label$7 : while (1) { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { break label$6 } $152(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($4_1 + 16 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($4_1 + 16 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; label$8 : { if (!((HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$8 @@ -19269,14 +19427,14 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; break label$1; } label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (40 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (40 | 0) & 1 | 0)) { break label$3 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -19303,7 +19461,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; label$1 : while (1) { $15_1 = 0; label$2 : { @@ -19515,22 +19673,22 @@ function asmFunc(imports) { label$2 : { label$3 : { label$4 : while (1) { - if (!((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } label$5 : { label$6 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { break label$6 } - HEAP32[($4_1 + 676 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($4_1 + 676 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($4_1 + 676 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($4_1 + 676 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($4_1 + 676 | 0) >> 2] | 0) >> 2] = 13; label$7 : { if (($227((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$7 } - $156(6 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 68519 | 0, 0 | 0); + $156(6 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 68592 | 0, 0 | 0); } label$8 : { label$9 : { @@ -19709,7 +19867,7 @@ function asmFunc(imports) { break label$15 } $176_1 = HEAP32[($4_1 + 684 | 0) >> 2] | 0; - $178_1 = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + $178_1 = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; i64toi32_i32$3 = $4_1; i64toi32_i32$2 = HEAP32[($4_1 + 552 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($4_1 + 556 | 0) >> 2] | 0; @@ -19729,17 +19887,17 @@ function asmFunc(imports) { } label$16 : { label$17 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { break label$17 } - HEAP32[($4_1 + 548 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($4_1 + 548 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; HEAP32[((HEAP32[($4_1 + 548 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; HEAP32[(HEAP32[($4_1 + 548 | 0) >> 2] | 0) >> 2] = 12; label$18 : { if (($231((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$18 } - $156(7 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 68591 | 0, 0 | 0); + $156(7 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 68664 | 0, 0 | 0); $178(HEAP32[($4_1 + 548 | 0) >> 2] | 0 | 0); break label$2; } @@ -19802,7 +19960,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$2; $152(HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0) | 0; label$19 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { break label$19 } $267_1 = (HEAP32[($4_1 + 548 | 0) >> 2] | 0) + 120 | 0; @@ -19817,18 +19975,18 @@ function asmFunc(imports) { } $157(HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, 41 | 0) | 0; $233(HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 4 | 0 | 0, (HEAP32[($4_1 + 548 | 0) >> 2] | 0) + 120 | 0 | 0) | 0; - HEAP32[((HEAP32[($4_1 + 548 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 548 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; HEAP32[((HEAP32[($4_1 + 548 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($4_1 + 680 | 0) >> 2] | 0; HEAP32[($4_1 + 680 | 0) >> 2] = HEAP32[($4_1 + 548 | 0) >> 2] | 0; break label$16; } label$20 : { label$21 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (46 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (46 | 0) & 1 | 0)) { break label$21 } - HEAP32[($4_1 + 480 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($4_1 + 480 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($4_1 + 480 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($4_1 + 480 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($4_1 + 480 | 0) >> 2] | 0) >> 2] = 14; HEAP32[((HEAP32[($4_1 + 480 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($4_1 + 680 | 0) >> 2] | 0; HEAP32[((HEAP32[($4_1 + 480 | 0) >> 2] | 0) + 112 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 480 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0; @@ -19846,7 +20004,7 @@ function asmFunc(imports) { break label$25 } HEAP32[($4_1 + 472 | 0) >> 2] = 0; - HEAP32[($4_1 + 468 | 0) >> 2] = $236((HEAP32[($4_1 + 476 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $4_1 + 472 | 0 | 0) | 0; + HEAP32[($4_1 + 468 | 0) >> 2] = $236((HEAP32[($4_1 + 476 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $4_1 + 472 | 0 | 0) | 0; label$26 : { label$27 : { if (!((HEAP32[($4_1 + 468 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -19914,31 +20072,31 @@ function asmFunc(imports) { break label$26; } $400_1 = HEAP32[($4_1 + 684 | 0) >> 2] | 0; - $402_1 = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - $405_1 = HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $402_1 = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + $405_1 = HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[($4_1 + 20 | 0) >> 2] = (HEAP32[((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 36 | 0; HEAP32[($4_1 + 16 | 0) >> 2] = $405_1; - $156(8 | 0, $400_1 | 0, $402_1 | 0, 86281 | 0, $4_1 + 16 | 0 | 0); + $156(8 | 0, $400_1 | 0, $402_1 | 0, 86838 | 0, $4_1 + 16 | 0 | 0); } break label$24; } - $238((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 268 | 0 | 0); + $238((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 272 | 0 | 0); } $157(HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, 8996 | 0) | 0; break label$22; } - $156(9 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73462 | 0, 0 | 0); + $156(9 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73520 | 0, 0 | 0); } HEAP32[($4_1 + 680 | 0) >> 2] = HEAP32[($4_1 + 480 | 0) >> 2] | 0; break label$20; } label$28 : { label$29 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11582 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11582 | 0) & 1 | 0)) { break label$29 } - HEAP32[($4_1 + 408 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($4_1 + 408 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($4_1 + 408 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($4_1 + 408 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($4_1 + 408 | 0) >> 2] | 0) >> 2] = 15; $152(HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0) | 0; label$30 : { @@ -19974,7 +20132,7 @@ function asmFunc(imports) { if (!(($230((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0)) { break label$33 } - $239(2048 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 66858 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 66914 | 0, 0 | 0); $200($4_1 + 296 | 0 | 0, (HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 4 | 0 | 0); $480_1 = 48; i64toi32_i32$3 = ($4_1 + 296 | 0) + $480_1 | 0; @@ -20102,7 +20260,7 @@ function asmFunc(imports) { break label$37 } HEAP32[($4_1 + 232 | 0) >> 2] = 0; - HEAP32[($4_1 + 228 | 0) >> 2] = $236((HEAP32[($4_1 + 236 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $4_1 + 232 | 0 | 0) | 0; + HEAP32[($4_1 + 228 | 0) >> 2] = $236((HEAP32[($4_1 + 236 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $4_1 + 232 | 0 | 0) | 0; label$38 : { label$39 : { if (!((HEAP32[($4_1 + 228 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -20170,28 +20328,28 @@ function asmFunc(imports) { break label$38; } $655_1 = HEAP32[($4_1 + 684 | 0) >> 2] | 0; - $657_1 = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - $660_1 = HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $657_1 = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + $660_1 = HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[($4_1 + 36 | 0) >> 2] = (HEAP32[((HEAP32[((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 36 | 0; HEAP32[($4_1 + 32 | 0) >> 2] = $660_1; - $156(8 | 0, $655_1 | 0, $657_1 | 0, 86100 | 0, $4_1 + 32 | 0 | 0); + $156(8 | 0, $655_1 | 0, $657_1 | 0, 86657 | 0, $4_1 + 32 | 0 | 0); } break label$36; } $670_1 = HEAP32[($4_1 + 684 | 0) >> 2] | 0; - $672_1 = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($4_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(10 | 0, $670_1 | 0, $672_1 | 0, 85124 | 0, $4_1 + 48 | 0 | 0); + $672_1 = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($4_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $156(10 | 0, $670_1 | 0, $672_1 | 0, 85681 | 0, $4_1 + 48 | 0 | 0); } $157(HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, 8996 | 0) | 0; break label$34; } - $156(9 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73462 | 0, 0 | 0); + $156(9 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73520 | 0, 0 | 0); } $185($4_1 + 352 | 0 | 0); break label$30; } - $156(9 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73462 | 0, 0 | 0); + $156(9 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73520 | 0, 0 | 0); } HEAP32[((HEAP32[($4_1 + 408 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($4_1 + 680 | 0) >> 2] | 0; HEAP32[($4_1 + 680 | 0) >> 2] = HEAP32[($4_1 + 408 | 0) >> 2] | 0; @@ -20199,17 +20357,17 @@ function asmFunc(imports) { } label$40 : { label$41 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0)) { break label$41 } label$42 : { if (($177(HEAP32[($4_1 + 680 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$42 } - $156(61 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 72954 | 0, 0 | 0); + $156(61 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 73012 | 0, 0 | 0); } - HEAP32[($4_1 + 168 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($4_1 + 168 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($4_1 + 168 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($4_1 + 168 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($4_1 + 168 | 0) >> 2] | 0) >> 2] = 16; $729_1 = (HEAP32[($4_1 + 168 | 0) >> 2] | 0) + 4 | 0; $164($4_1 + 112 | 0 | 0, (HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 4 | 0 | 0); @@ -20275,17 +20433,17 @@ function asmFunc(imports) { } label$43 : { label$44 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11565 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11565 | 0) & 1 | 0)) { break label$44 } label$45 : { if (($177(HEAP32[($4_1 + 680 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$45 } - $156(61 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 72991 | 0, 0 | 0); + $156(61 | 0, HEAP32[($4_1 + 684 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 73049 | 0, 0 | 0); } - HEAP32[($4_1 + 108 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($4_1 + 108 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($4_1 + 108 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($4_1 + 108 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 684 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($4_1 + 108 | 0) >> 2] | 0) >> 2] = 17; $799_1 = (HEAP32[($4_1 + 108 | 0) >> 2] | 0) + 4 | 0; $164($4_1 + 52 | 0 | 0, (HEAP32[($4_1 + 680 | 0) >> 2] | 0) + 4 | 0 | 0); @@ -20425,7 +20583,7 @@ function asmFunc(imports) { if (($228(HEAP32[($4_1 + 60 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$1 } - fimport$0(85594 | 0, 74032 | 0, 18072 | 0, 68499 | 0); + fimport$0(86151 | 0, 74090 | 0, 18143 | 0, 68572 | 0); wasm2js_trap(); } $164($0_1 | 0, HEAP32[($4_1 + 60 | 0) >> 2] | 0 | 0); @@ -20433,7 +20591,7 @@ function asmFunc(imports) { if ((HEAP32[($0_1 + 52 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$2 } - fimport$0(66022 | 0, 74032 | 0, 18076 | 0, 68499 | 0); + fimport$0(66022 | 0, 74090 | 0, 18147 | 0, 68572 | 0); wasm2js_trap(); } label$3 : { @@ -20496,7 +20654,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $4_1; HEAP32[i64toi32_i32$0 >> 2] = $208_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - $817(HEAP32[($0_1 + 52 | 0) >> 2] | 0 | 0); + $818(HEAP32[($0_1 + 52 | 0) >> 2] | 0 | 0); HEAP32[($0_1 + 52 | 0) >> 2] = 0; $193($0_1 | 0); i64toi32_i32$2 = i64toi32_i32$0; @@ -20674,7 +20832,7 @@ function asmFunc(imports) { if ((HEAPU8[(HEAP32[($5_1 + 8 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { break label$8 } - $156(2 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67143 | 0, 0 | 0); + $156(2 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67203 | 0, 0 | 0); break label$7; } label$9 : { @@ -20689,10 +20847,10 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$11 } - $156(3 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67193 | 0, 0 | 0); + $156(3 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67253 | 0, 0 | 0); break label$10; } - $156(3 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 67193 | 0, 0 | 0); + $156(3 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 67253 | 0, 0 | 0); } break label$7; } @@ -20719,7 +20877,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 28 | 0) >> 2] = $0_1; HEAP32[($4_1 + 24 | 0) >> 2] = $1_1; HEAP32[($4_1 + 20 | 0) >> 2] = 0; - HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0; + HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0; label$1 : { label$2 : while (1) { if (!((HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -20824,7 +20982,7 @@ function asmFunc(imports) { break label$6 } label$8 : { - if ($760(HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 20 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 20 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0) | 0) { break label$8 } HEAP32[(HEAP32[($5_1 + 32 | 0) >> 2] | 0) >> 2] = HEAP32[($5_1 + 28 | 0) >> 2] | 0; @@ -20865,7 +21023,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$13 } - fimport$0(76767 | 0, 74032 | 0, 24863 | 0, 68120 | 0); + fimport$0(77169 | 0, 74090 | 0, 24947 | 0, 68193 | 0); wasm2js_trap(); } } @@ -20914,7 +21072,7 @@ function asmFunc(imports) { $3_1 = global$0 - 48 | 0; global$0 = $3_1; HEAP32[($3_1 + 44 | 0) >> 2] = $0_1; - $748(97437 | 0, 0 | 0) | 0; + $749(98017 | 0, 0 | 0) | 0; HEAP32[($3_1 + 40 | 0) >> 2] = HEAP32[(HEAP32[($3_1 + 44 | 0) >> 2] | 0) >> 2] | 0; HEAP32[($3_1 + 36 | 0) >> 2] = 0; label$1 : { @@ -20938,13 +21096,13 @@ function asmFunc(imports) { if (!((HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) < (HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$6 } - $748(86980 | 0, 0 | 0) | 0; + $749(87560 | 0, 0 | 0) | 0; HEAP32[($3_1 + 28 | 0) >> 2] = (HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 1 | 0; continue label$7; }; } HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 40 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + ((HEAP32[($3_1 + 32 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; - $748(87297 | 0, $3_1 | 0) | 0; + $749(87877 | 0, $3_1 | 0) | 0; } HEAP32[($3_1 + 32 | 0) >> 2] = (HEAP32[($3_1 + 32 | 0) >> 2] | 0) + 1 | 0; continue label$4; @@ -20966,13 +21124,13 @@ function asmFunc(imports) { if (!((HEAP32[($3_1 + 20 | 0) >> 2] | 0 | 0) < (HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$11 } - $748(86980 | 0, 0 | 0) | 0; + $749(87560 | 0, 0 | 0) | 0; HEAP32[($3_1 + 20 | 0) >> 2] = (HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 1 | 0; continue label$12; }; } HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + ((HEAP32[($3_1 + 24 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; - $748(87224 | 0, $3_1 + 16 | 0 | 0) | 0; + $749(87804 | 0, $3_1 + 16 | 0 | 0) | 0; } HEAP32[($3_1 + 24 | 0) >> 2] = (HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 1 | 0; continue label$9; @@ -20983,7 +21141,7 @@ function asmFunc(imports) { continue label$2; }; } - $748(97460 | 0, 0 | 0) | 0; + $749(98040 | 0, 0 | 0) | 0; global$0 = $3_1 + 48 | 0; return; } @@ -21019,92 +21177,92 @@ function asmFunc(imports) { break label$1; } } - HEAP32[($7_1 + 396 | 0) >> 2] = 72680; + HEAP32[($7_1 + 396 | 0) >> 2] = 72738; label$5 : { - if (!((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - HEAP32[($7_1 + 396 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($7_1 + 396 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; } - $32_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0; + $32_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0; HEAP32[($32_1 + 24 | 0) >> 2] = (HEAP32[($32_1 + 24 | 0) >> 2] | 0) + 1 | 0; - $38_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0; + $38_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0; HEAP32[($38_1 + 32 | 0) >> 2] = HEAP32[($38_1 + 32 | 0) >> 2] | 0 | (HEAP32[($7_1 + 412 | 0) >> 2] | 0) | 0; - $724($7_1 + 192 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($7_1 + 192 | 0 | 0, 0 | 0, 200 | 0) | 0; $27(HEAP32[((HEAP32[((HEAP32[($7_1 + 404 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 404 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 404 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); HEAP32[($7_1 + 188 | 0) >> 2] = $4_1; - $807($7_1 + 192 | 0 | 0, 200 | 0, HEAP32[($7_1 + 400 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 188 | 0) >> 2] | 0 | 0) | 0; + $808($7_1 + 192 | 0 | 0, 200 | 0, HEAP32[($7_1 + 400 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 188 | 0) >> 2] | 0 | 0) | 0; label$6 : { label$7 : { if (!((HEAPU8[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0)) { break label$7 } HEAP32[($7_1 + 160 | 0) >> 2] = $7_1 + 192 | 0; - $748(87291 | 0, $7_1 + 160 | 0 | 0) | 0; + $749(87871 | 0, $7_1 + 160 | 0 | 0) | 0; break label$6; } HEAP32[($7_1 + 176 | 0) >> 2] = $7_1 + 192 | 0; - $748(87169 | 0, $7_1 + 176 | 0 | 0) | 0; + $749(87749 | 0, $7_1 + 176 | 0 | 0) | 0; } $28(HEAP32[($7_1 + 404 | 0) >> 2] | 0 | 0, (HEAPU8[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 67 | 0) >> 0] | 0) & 1 | 0 | 0); - if (!((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } label$8 : { - if (!((((HEAP32[((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) | 0 | 0) > (1 | 0) & 1 | 0)) { + if (!((((HEAP32[((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) | 0) + (HEAP32[((HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) | 0 | 0) > (1 | 0) & 1 | 0)) { break label$8 } - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97776 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98356 | 0, 0 | 0) | 0; } - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87119 | 0, 0 | 0) | 0; - $117_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; - HEAP32[$7_1 >> 2] = 69727; - $732($117_1 | 0, 97607 | 0, $7_1 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97757 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87093 | 0, 0 | 0) | 0; - $129_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87699 | 0, 0 | 0) | 0; + $117_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; + HEAP32[$7_1 >> 2] = 69800; + $733($117_1 | 0, 98187 | 0, $7_1 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98337 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87673 | 0, 0 | 0) | 0; + $129_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 192 | 0; - $732($129_1 | 0, 97817 | 0, $7_1 + 16 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97489 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90383 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87115 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87036 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87e3 | 0, 0 | 0) | 0; - $157_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($129_1 | 0, 98397 | 0, $7_1 + 16 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98069 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90963 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87695 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87616 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87580 | 0, 0 | 0) | 0; + $157_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($7_1 + 404 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $732($157_1 | 0, 97779 | 0, $7_1 + 32 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97481 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87066 | 0, 0 | 0) | 0; - $173_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($157_1 | 0, 98359 | 0, $7_1 + 32 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98061 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87646 | 0, 0 | 0) | 0; + $173_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 404 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; - $732($173_1 | 0, 97537 | 0, $7_1 + 48 | 0 | 0) | 0; - $180_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($173_1 | 0, 98117 | 0, $7_1 + 48 | 0 | 0) | 0; + $180_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 404 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; - $732($180_1 | 0, 97499 | 0, $7_1 + 64 | 0 | 0) | 0; - $187_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($180_1 | 0, 98079 | 0, $7_1 + 64 | 0 | 0) | 0; + $187_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 80 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 404 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; - $732($187_1 | 0, 97573 | 0, $7_1 + 80 | 0 | 0) | 0; - $194_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($187_1 | 0, 98153 | 0, $7_1 + 80 | 0 | 0) | 0; + $194_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 96 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 404 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; - $732($194_1 | 0, 90316 | 0, $7_1 + 96 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86982 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 97486 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90405 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 87112 | 0, 0 | 0) | 0; - $217_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($194_1 | 0, 90896 | 0, $7_1 + 96 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87562 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 98066 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90985 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87692 | 0, 0 | 0) | 0; + $217_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 112 | 0) >> 2] = HEAP32[($7_1 + 396 | 0) >> 2] | 0; - $732($217_1 | 0, 97666 | 0, $7_1 + 112 | 0 | 0) | 0; - $223_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + $733($217_1 | 0, 98246 | 0, $7_1 + 112 | 0 | 0) | 0; + $223_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; HEAP32[($7_1 + 128 | 0) >> 2] = HEAP32[($7_1 + 396 | 0) >> 2] | 0; - $732($223_1 | 0, 97628 | 0, $7_1 + 128 | 0 | 0) | 0; - $229_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; - HEAP32[($7_1 + 144 | 0) >> 2] = 69842; - $732($229_1 | 0, 97843 | 0, $7_1 + 144 | 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86987 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90371 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86990 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 90375 | 0, 0 | 0) | 0; - $732(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0, 86994 | 0, 0 | 0) | 0; + $733($223_1 | 0, 98208 | 0, $7_1 + 128 | 0 | 0) | 0; + $229_1 = HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; + HEAP32[($7_1 + 144 | 0) >> 2] = 69915; + $733($229_1 | 0, 98423 | 0, $7_1 + 144 | 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87567 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90951 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87570 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 90955 | 0, 0 | 0) | 0; + $733(HEAP32[((HEAP32[($7_1 + 408 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0, 87574 | 0, 0 | 0) | 0; } global$0 = $7_1 + 416 | 0; return; @@ -21236,14 +21394,14 @@ function asmFunc(imports) { $38_1 = HEAP32[($6_1 + 348 | 0) >> 2] | 0; $41_1 = HEAP32[((HEAP32[(HEAP32[($6_1 + 344 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; HEAP32[($6_1 + 64 | 0) >> 2] = HEAP32[($6_1 + 336 | 0) >> 2] | 0; - $156(67 | 0, $38_1 | 0, $41_1 | 0, 66984 | 0, $6_1 + 64 | 0 | 0); + $156(67 | 0, $38_1 | 0, $41_1 | 0, 67018 | 0, $6_1 + 64 | 0 | 0); } break label$3; } $47_1 = HEAP32[($6_1 + 348 | 0) >> 2] | 0; $50_1 = HEAP32[((HEAP32[(HEAP32[($6_1 + 344 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; HEAP32[($6_1 + 80 | 0) >> 2] = HEAP32[($6_1 + 336 | 0) >> 2] | 0; - $156(67 | 0, $47_1 | 0, $50_1 | 0, 72361 | 0, $6_1 + 80 | 0 | 0); + $156(67 | 0, $47_1 | 0, $50_1 | 0, 72434 | 0, $6_1 + 80 | 0 | 0); } } } @@ -21290,7 +21448,7 @@ function asmFunc(imports) { $114_1 = HEAP32[($6_1 + 348 | 0) >> 2] | 0; $117_1 = HEAP32[((HEAP32[(HEAP32[($6_1 + 344 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; HEAP32[$6_1 >> 2] = HEAP32[($6_1 + 336 | 0) >> 2] | 0; - $156(32 | 0, $114_1 | 0, $117_1 | 0, 73800 | 0, $6_1 | 0); + $156(32 | 0, $114_1 | 0, $117_1 | 0, 73858 | 0, $6_1 | 0); } $317(HEAP32[($6_1 + 348 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 344 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 340 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 336 | 0) >> 2] | 0 | 0); $185($6_1 + 272 | 0 | 0); @@ -21382,7 +21540,7 @@ function asmFunc(imports) { $250_1 = HEAP32[($6_1 + 208 | 0) >> 2] | 0; HEAP32[($6_1 + 52 | 0) >> 2] = HEAP32[($6_1 + 212 | 0) >> 2] | 0; HEAP32[($6_1 + 48 | 0) >> 2] = $250_1; - $156(48 | 0, $246_1 | 0, $249_1 | 0, 74115 | 0, $6_1 + 48 | 0 | 0); + $156(48 | 0, $246_1 | 0, $249_1 | 0, 74173 | 0, $6_1 + 48 | 0 | 0); } break label$21; } @@ -21408,7 +21566,7 @@ function asmFunc(imports) { $288_1 = HEAP32[($6_1 + 348 | 0) >> 2] | 0; $291_1 = HEAP32[((HEAP32[(HEAP32[($6_1 + 344 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; HEAP32[($6_1 + 32 | 0) >> 2] = HEAP32[($6_1 + 336 | 0) >> 2] | 0; - $156(32 | 0, $288_1 | 0, $291_1 | 0, 73800 | 0, $6_1 + 32 | 0 | 0); + $156(32 | 0, $288_1 | 0, $291_1 | 0, 73858 | 0, $6_1 + 32 | 0 | 0); } label$27 : { if (!(($228($6_1 + 216 | 0 | 0) | 0) & 1 | 0)) { @@ -21432,7 +21590,7 @@ function asmFunc(imports) { $339_1 = HEAP32[($6_1 + 348 | 0) >> 2] | 0; $342_1 = HEAP32[((HEAP32[(HEAP32[($6_1 + 344 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; HEAP32[($6_1 + 16 | 0) >> 2] = HEAP32[($6_1 + 336 | 0) >> 2] | 0; - $156(50 | 0, $339_1 | 0, $342_1 | 0, 73767 | 0, $6_1 + 16 | 0 | 0); + $156(50 | 0, $339_1 | 0, $342_1 | 0, 73825 | 0, $6_1 + 16 | 0 | 0); } $185($6_1 + 152 | 0 | 0); $185($6_1 + 96 | 0 | 0); @@ -21455,7 +21613,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 76 | 0) >> 2] = $0_1; HEAP32[($4_1 + 72 | 0) >> 2] = $1_1; HEAP32[($4_1 + 68 | 0) >> 2] = 0; - HEAP32[($4_1 + 68 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($4_1 + 68 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -21468,7 +21626,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 68 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(76351 | 0, 74032 | 0, 13673 | 0, 72623 | 0); + fimport$0(76753 | 0, 74090 | 0, 13727 | 0, 72681 | 0); wasm2js_trap(); } $30_1 = $246(HEAP32[(HEAP32[($4_1 + 72 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; @@ -21477,7 +21635,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 68 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0) { break label$5 } - fimport$0(86537 | 0, 74032 | 0, 13676 | 0, 72623 | 0); + fimport$0(87094 | 0, 74090 | 0, 13730 | 0, 72681 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($4_1 + 68 | 0) >> 2] | 0) + 80 | 0) >> 2] = HEAP32[($4_1 + 72 | 0) >> 2] | 0; @@ -21545,17 +21703,17 @@ function asmFunc(imports) { } HEAP32[(HEAP32[($4_1 + 68 | 0) >> 2] | 0) >> 2] = 10; HEAP32[($4_1 + 8 | 0) >> 2] = (HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 68 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0; - $247((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 268 | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); + $247((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 272 | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); $108_1 = $248(HEAP32[($4_1 + 76 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 68 | 0) >> 2] | 0) + 92 | 0) >> 2] = $108_1; - $249((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 268 | 0 | 0); + $249((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 272 | 0 | 0); break label$6; } HEAP32[(HEAP32[($4_1 + 68 | 0) >> 2] | 0) >> 2] = 11; $116_1 = $250(HEAP32[($4_1 + 76 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 68 | 0) >> 2] | 0) + 88 | 0) >> 2] = $116_1; } - HEAP32[((HEAP32[($4_1 + 68 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 68 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; HEAP32[($4_1 + 68 | 0) >> 2] = $226(HEAP32[($4_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 68 | 0) >> 2] | 0 | 0) | 0; label$8 : { if (!((HEAP32[($4_1 + 68 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -21636,8 +21794,8 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] = 0; - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 280 | 0) >> 2] = 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] = 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 284 | 0) >> 2] = 0; $9_1 = $251(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; global$0 = $3_1 + 16 | 0; return $9_1 | 0; @@ -21686,11 +21844,11 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 123 | 0) | 0; label$1 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0) & 1 | 0)) { break label$1 } $22_1 = $252(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -21708,7 +21866,7 @@ function asmFunc(imports) { $3_1 = global$0 - 80 | 0; global$0 = $3_1; HEAP32[($3_1 + 76 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 72 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; + HEAP32[($3_1 + 72 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; HEAP32[($3_1 + 64 | 0) >> 2] = 0; i64toi32_i32$0 = 0; $152_1 = 0; @@ -21725,11 +21883,11 @@ function asmFunc(imports) { HEAP32[($3_1 + 32 | 0) >> 2] = $152_1; HEAP32[($3_1 + 36 | 0) >> 2] = i64toi32_i32$0; HEAP32[($3_1 + 52 | 0) >> 2] = 10; - $247((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 268 | 0 | 0, $3_1 + 32 | 0 | 0); - HEAP32[(HEAP32[($3_1 + 72 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + $247((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 272 | 0 | 0, $3_1 + 32 | 0 | 0); + HEAP32[(HEAP32[($3_1 + 72 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, 123 | 0) | 0; label$1 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0) & 1 | 0)) { break label$1 } $39_1 = (HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 8 | 0; @@ -21741,7 +21899,7 @@ function asmFunc(imports) { HEAP32[i64toi32_i32$0 >> 2] = $246_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; } - HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, 125 | 0) | 0; HEAP32[($3_1 + 20 | 0) >> 2] = 0; label$2 : { @@ -21803,7 +21961,7 @@ function asmFunc(imports) { $130_1 = HEAP32[($3_1 + 76 | 0) >> 2] | 0; $132_1 = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $213(2 | 0, $130_1 | 0, $132_1 | 0, 68357 | 0, $3_1 | 0) | 0; + $213(2 | 0, $130_1 | 0, $132_1 | 0, 68430 | 0, $3_1 | 0) | 0; } } } @@ -21816,7 +21974,7 @@ function asmFunc(imports) { continue label$3; }; } - $249((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 268 | 0 | 0); + $249((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 272 | 0 | 0); $359($3_1 + 32 | 0 | 0); $149_1 = HEAP32[($3_1 + 72 | 0) >> 2] | 0; global$0 = $3_1 + 80 | 0; @@ -21829,8 +21987,8 @@ function asmFunc(imports) { $3_1 = global$0 - 32 | 0; global$0 = $3_1; HEAP32[($3_1 + 28 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 24 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 24 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 24 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; + HEAP32[(HEAP32[($3_1 + 24 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[($3_1 + 20 | 0) >> 2] = 0; label$1 : { if (!(($385(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { @@ -21843,7 +22001,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(76149 | 0, 74032 | 0, 26342 | 0, 66149 | 0); + fimport$0(76551 | 0, 74090 | 0, 26428 | 0, 66149 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($3_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($3_1 + 20 | 0) >> 2] | 0; @@ -21865,10 +22023,10 @@ function asmFunc(imports) { label$5 : while (1) { $64_1 = 0; label$6 : { - if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } - $64_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); + $64_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); } label$7 : { if (!($64_1 & 1 | 0)) { @@ -21876,7 +22034,7 @@ function asmFunc(imports) { } $152(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) | 0; label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (125 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (125 | 0) & 1 | 0)) { break label$8 } break label$7; @@ -21893,7 +22051,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$10 } - fimport$0(76184 | 0, 74032 | 0, 26361 | 0, 66149 | 0); + fimport$0(76586 | 0, 74090 | 0, 26447 | 0, 66149 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($3_1 + 8 | 0) >> 2] | 0; @@ -21932,7 +22090,7 @@ function asmFunc(imports) { if (!(($222(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$1 } - fimport$0(72213 | 0, 74032 | 0, 13737 | 0, 70153 | 0); + fimport$0(72286 | 0, 74090 | 0, 13791 | 0, 70226 | 0); wasm2js_trap(); } HEAP32[($3_1 + 8 | 0) >> 2] = $210(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -21968,7 +22126,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -21976,58 +22134,58 @@ function asmFunc(imports) { } $25_1 = 1; label$3 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9075 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9075 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9077 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9077 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9076 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9076 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9074 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9074 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9078 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9078 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9079 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9079 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9055 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9055 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9080 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9080 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9081 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9081 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9082 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9082 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9083 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9083 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9071 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9071 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9072 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9072 | 0) & 1 | 0) { break label$3 } - $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9073 | 0); + $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9073 | 0); } HEAP8[($3_1 + 15 | 0) >> 0] = $25_1 & 1 | 0; } @@ -22042,7 +22200,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -22054,43 +22212,43 @@ function asmFunc(imports) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11565 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11565 | 0) & 1 | 0) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0) & 1 | 0) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0) & 1 | 0) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (126 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (126 | 0) & 1 | 0) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (33 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (33 | 0) & 1 | 0) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9030 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9030 | 0) & 1 | 0) { break label$3 } $20_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9043 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9043 | 0) & 1 | 0) { break label$3 } $20_1 = $254(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; @@ -22115,18 +22273,18 @@ function asmFunc(imports) { label$4 : { label$5 : { label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0) { break label$6 } - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11565 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11565 | 0) & 1 | 0)) { break label$5 } } - HEAP32[($3_1 + 944 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 944 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 944 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 944 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$7 : { label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0)) { break label$8 } HEAP32[(HEAP32[($3_1 + 944 | 0) >> 2] | 0) >> 2] = 25; @@ -22206,33 +22364,33 @@ function asmFunc(imports) { } label$10 : { label$11 : { - if (!((HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$11 } label$12 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0) & 1 | 0) { break label$12 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { break label$12 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { break label$12 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0) & 1 | 0) { break label$12 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (126 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (126 | 0) & 1 | 0) { break label$12 } - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (33 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (33 | 0) & 1 | 0)) { break label$11 } } - HEAP32[($3_1 + 884 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 880 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 876 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($3_1 + 884 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 880 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 876 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0; $152(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0; $171_1 = $257(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] = $171_1; @@ -22582,7 +22740,7 @@ function asmFunc(imports) { if (($228((HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$24 } - $156(14 | 0, HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 880 | 0) >> 2] | 0 | 0, 73028 | 0, 0 | 0); + $156(14 | 0, HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 880 | 0) >> 2] | 0 | 0, 73086 | 0, 0 | 0); } $465_1 = (HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 4 | 0; $229($3_1 + 528 | 0 | 0, (HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 4 | 0 | 0); @@ -22653,7 +22811,7 @@ function asmFunc(imports) { if (($177(HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$27 } - $156(60 | 0, HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 73065 | 0, 0 | 0); + $156(60 | 0, HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 73123 | 0, 0 | 0); } label$28 : { if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) & 32 | 0)) { @@ -22667,10 +22825,10 @@ function asmFunc(imports) { $538_1 = HEAP32[($3_1 + 952 | 0) >> 2] | 0; $541_1 = HEAP32[((HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(60 | 0, $538_1 | 0, $541_1 | 0, 73327 | 0, $3_1 | 0); + $156(60 | 0, $538_1 | 0, $541_1 | 0, 73385 | 0, $3_1 | 0); break label$29; } - $156(60 | 0, HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 77944 | 0, 0 | 0); + $156(60 | 0, HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 78501 | 0, 0 | 0); } } $558_1 = (HEAP32[($3_1 + 884 | 0) >> 2] | 0) + 4 | 0; @@ -22734,7 +22892,7 @@ function asmFunc(imports) { break label$25; } $178(HEAP32[($3_1 + 884 | 0) >> 2] | 0 | 0); - $156(15 | 0, HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70701 | 0, 0 | 0); + $156(15 | 0, HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70774 | 0, 0 | 0); break label$3; } } @@ -22747,14 +22905,14 @@ function asmFunc(imports) { } label$31 : { label$32 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9030 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9030 | 0) & 1 | 0)) { break label$32 } - HEAP8[($3_1 + 471 | 0) >> 0] = (HEAPU8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0; - HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] = 1; + HEAP8[($3_1 + 471 | 0) >> 0] = (HEAPU8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] = 1; $152(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($3_1 + 464 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 464 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 464 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 464 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$33 : { label$34 : { if (!(($222(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { @@ -22849,7 +23007,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 464 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$35 } - HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] = (HEAPU8[($3_1 + 471 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] = (HEAPU8[($3_1 + 471 | 0) >> 0] | 0) & 1 | 0; $178(HEAP32[($3_1 + 464 | 0) >> 2] | 0 | 0); break label$3; } @@ -22933,48 +23091,48 @@ function asmFunc(imports) { HEAP32[i64toi32_i32$0 >> 2] = $3173; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; HEAP32[($3_1 + 948 | 0) >> 2] = HEAP32[($3_1 + 464 | 0) >> 2] | 0; - HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] = (HEAPU8[($3_1 + 471 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] = (HEAPU8[($3_1 + 471 | 0) >> 0] | 0) & 1 | 0; break label$31; } label$36 : { label$37 : { label$38 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9075 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9075 | 0) & 1 | 0) { break label$38 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9077 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9077 | 0) & 1 | 0) { break label$38 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9076 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9076 | 0) & 1 | 0) { break label$38 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9074 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9074 | 0) & 1 | 0) { break label$38 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9078 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9078 | 0) & 1 | 0) { break label$38 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9079 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9079 | 0) & 1 | 0) { break label$38 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9081 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9081 | 0) & 1 | 0) { break label$38 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9080 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9080 | 0) & 1 | 0) { break label$38 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9082 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9082 | 0) & 1 | 0) { break label$38 } - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9083 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9083 | 0) & 1 | 0)) { break label$37 } } - HEAP8[($3_1 + 319 | 0) >> 0] = (HEAPU8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0; - HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] = 1; - HEAP32[($3_1 + 312 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 308 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP8[($3_1 + 319 | 0) >> 0] = (HEAPU8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] = 1; + HEAP32[($3_1 + 312 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 308 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 308 | 0) >> 2] | 0) >> 2] = 20; $152(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 304 | 0) >> 2] = 0; @@ -22986,7 +23144,7 @@ function asmFunc(imports) { $157(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, 40 | 0) | 0; $895 = $154(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 80 | 0) >> 2] = $895; - HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, 41 | 0) | 0; HEAP32[($3_1 + 304 | 0) >> 2] = (HEAP32[((HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 72 | 0; break label$39; @@ -22997,12 +23155,12 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$41 } - HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] = (HEAPU8[($3_1 + 319 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] = (HEAPU8[($3_1 + 319 | 0) >> 0] | 0) & 1 | 0; $178(HEAP32[($3_1 + 308 | 0) >> 2] | 0 | 0); break label$3; } HEAP32[($3_1 + 304 | 0) >> 2] = (HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 4 | 0; - HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; } $933 = (HEAP32[(HEAP32[($3_1 + 312 | 0) >> 2] | 0) >> 2] | 0) + -9074 | 0; label$42 : { @@ -23212,7 +23370,7 @@ function asmFunc(imports) { break label$43; }; } - fimport$0(72213 | 0, 74032 | 0, 14146 | 0, 70117 | 0); + fimport$0(72286 | 0, 74090 | 0, 14200 | 0, 70190 | 0); wasm2js_trap(); } $1122 = (HEAP32[($3_1 + 308 | 0) >> 2] | 0) + 4 | 0; @@ -23273,16 +23431,16 @@ function asmFunc(imports) { HEAP32[i64toi32_i32$1 >> 2] = $3995; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; HEAP32[($3_1 + 948 | 0) >> 2] = HEAP32[($3_1 + 308 | 0) >> 2] | 0; - HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] = (HEAPU8[($3_1 + 319 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] = (HEAPU8[($3_1 + 319 | 0) >> 0] | 0) & 1 | 0; break label$36; } label$54 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9055 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9055 | 0) & 1 | 0)) { break label$54 } - HEAP32[($3_1 + 84 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 84 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; HEAP32[(HEAP32[($3_1 + 84 | 0) >> 2] | 0) >> 2] = 24; - HEAP32[((HEAP32[($3_1 + 84 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 84 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0; $157(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, 40 | 0) | 0; $1182 = $216(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0; @@ -23293,25 +23451,25 @@ function asmFunc(imports) { } label$55 : { label$56 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9043 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9043 | 0) & 1 | 0)) { break label$56 } - HEAP32[($3_1 + 80 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 80 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; HEAP32[(HEAP32[($3_1 + 80 | 0) >> 2] | 0) >> 2] = 23; - HEAP32[((HEAP32[($3_1 + 80 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 80 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0; $157(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, 40 | 0) | 0; $1208 = $154(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 80 | 0) >> 2] | 0) + 80 | 0) >> 2] = $1208; $157(HEAP32[($3_1 + 952 | 0) >> 2] | 0 | 0, 41 | 0) | 0; label$57 : { - if ((HEAPU8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0) { break label$57 } $1218 = (HEAP32[($3_1 + 80 | 0) >> 2] | 0) + 64 | 0; i64toi32_i32$1 = $267((HEAP32[((HEAP32[($3_1 + 80 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 16 | 0 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$1 >> 31 | 0; - $133($3_1 + 64 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $133($3_1 + 64 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$0 | 0, (HEAPU8[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$0 = HEAP32[($3_1 + 64 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($3_1 + 68 | 0) >> 2] | 0; @@ -23385,13 +23543,13 @@ function asmFunc(imports) { i64toi32_i32$0 = $1239 + $1268 | 0; HEAP32[i64toi32_i32$0 >> 2] = $4270; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - HEAP32[((HEAP32[($3_1 + 80 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 80 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; HEAP32[($3_1 + 948 | 0) >> 2] = HEAP32[($3_1 + 80 | 0) >> 2] | 0; break label$55; } label$58 : { label$59 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9042 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 952 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9042 | 0) & 1 | 0)) { break label$59 } break label$58; @@ -23423,7 +23581,7 @@ function asmFunc(imports) { function $257($0_1) { $0_1 = $0_1 | 0; - var $3_1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, $41_1 = 0, $167_1 = 0, $277_1 = 0, $49_1 = 0, $54_1 = 0, $59_1 = 0, $64_1 = 0, $69_1 = 0, $74_1 = 0, $154_1 = 0, $159_1 = 0, $175_1 = 0, $180_1 = 0, $185_1 = 0, $190_1 = 0, $195_1 = 0, $200_1 = 0, $213_1 = 0, $221_1 = 0, $240_1 = 0, $248_1 = 0, $255_1 = 0, $263_1 = 0, $285_1 = 0, $290_1 = 0, $295_1 = 0, $300_1 = 0, $305_1 = 0, $310_1 = 0, $27_1 = 0, $489_1 = 0, $502_1 = 0, $515_1 = 0, $528_1 = 0, $541_1 = 0, $554_1 = 0, $567_1 = 0, $103_1 = 0, $734_1 = 0, $744_1 = 0, $774_1 = 0, $787_1 = 0, $800_1 = 0, $813_1 = 0, $826_1 = 0, $839 = 0, $852 = 0, $885 = 0, $898 = 0, $943 = 0, $956 = 0, $977 = 0, $990 = 0, $1030 = 0, $1043 = 0, $1056 = 0, $1069 = 0, $1082 = 0, $1095 = 0, $1108 = 0, $357_1 = 0; + var $3_1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, $41_1 = 0, $167_1 = 0, $277_1 = 0, $49_1 = 0, $54_1 = 0, $59_1 = 0, $64_1 = 0, $69_1 = 0, $74_1 = 0, $154_1 = 0, $159_1 = 0, $175_1 = 0, $180_1 = 0, $185_1 = 0, $190_1 = 0, $195_1 = 0, $200_1 = 0, $213_1 = 0, $221_1 = 0, $240_1 = 0, $248_1 = 0, $255_1 = 0, $263_1 = 0, $285_1 = 0, $290_1 = 0, $295_1 = 0, $300_1 = 0, $305_1 = 0, $310_1 = 0, $27_1 = 0, $489_1 = 0, $502_1 = 0, $515_1 = 0, $528_1 = 0, $541_1 = 0, $554_1 = 0, $567_1 = 0, $103_1 = 0, $734_1 = 0, $744_1 = 0, $774_1 = 0, $787_1 = 0, $800_1 = 0, $813_1 = 0, $826_1 = 0, $839_1 = 0, $852 = 0, $885 = 0, $898 = 0, $943 = 0, $956 = 0, $977 = 0, $990 = 0, $1030 = 0, $1043 = 0, $1056 = 0, $1069 = 0, $1082 = 0, $1095 = 0, $1108 = 0, $357_1 = 0; $3_1 = global$0 - 240 | 0; global$0 = $3_1; HEAP32[($3_1 + 236 | 0) >> 2] = $0_1; @@ -23435,14 +23593,14 @@ function asmFunc(imports) { if (!(($222(HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$4 } - HEAP32[($3_1 + 232 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 232 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$5 : { if (!((HEAP32[($3_1 + 232 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$5 } break label$2; } - HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 232 | 0) >> 2] | 0) >> 2] = 33; $157(HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0, 40 | 0) | 0; $27_1 = $154(HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0) | 0; @@ -23515,7 +23673,7 @@ function asmFunc(imports) { $157(HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0, 41 | 0) | 0; label$7 : { label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { break label$8 } HEAP32[($3_1 + 172 | 0) >> 2] = $245(HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) | 0; @@ -23555,10 +23713,10 @@ function asmFunc(imports) { if (!(($228((HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0)) { break label$15 } - $156(71 | 0, HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 68566 | 0, 0 | 0); + $156(71 | 0, HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 68639 | 0, 0 | 0); break label$14; } - $156(71 | 0, HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69134 | 0, 0 | 0); + $156(71 | 0, HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69207 | 0, 0 | 0); } } } @@ -23624,9 +23782,9 @@ function asmFunc(imports) { i64toi32_i32$2 = ($3_1 + 116 | 0) + $195_1 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; - $839 = i64toi32_i32$0; + $839_1 = i64toi32_i32$0; i64toi32_i32$0 = $167_1 + $195_1 | 0; - HEAP32[i64toi32_i32$0 >> 2] = $839; + HEAP32[i64toi32_i32$0 >> 2] = $839_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; $200_1 = 8; i64toi32_i32$2 = ($3_1 + 116 | 0) + $200_1 | 0; @@ -23788,7 +23946,7 @@ function asmFunc(imports) { } break label$21; } - $156(1 | 0, HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73394 | 0, 0 | 0); + $156(1 | 0, HEAP32[($3_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73452 | 0, 0 | 0); } } if (!(0 & 1 | 0)) { @@ -23800,10 +23958,10 @@ function asmFunc(imports) { if (!((HEAP32[($3_1 + 232 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$24 } - if (!((HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$24 } - HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 232 | 0) >> 2] | 0) + 104 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 236 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; } $357_1 = HEAP32[($3_1 + 232 | 0) >> 2] | 0; global$0 = $3_1 + 240 | 0; @@ -24049,7 +24207,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 72 | 0) >> 2] = 1; break label$41; } - fimport$0(72213 | 0, 74032 | 0, 18731 | 0, 71412 | 0); + fimport$0(72286 | 0, 74090 | 0, 18802 | 0, 71485 | 0); wasm2js_trap(); } } @@ -24461,7 +24619,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 72 | 0) >> 2] = 1; break label$41; } - fimport$0(72213 | 0, 74032 | 0, 18569 | 0, 71376 | 0); + fimport$0(72286 | 0, 74090 | 0, 18640 | 0, 71449 | 0); wasm2js_trap(); } } @@ -24497,7 +24655,7 @@ function asmFunc(imports) { if ((HEAP32[($3_1 + 72 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0) { break label$44 } - fimport$0(84639 | 0, 74032 | 0, 18579 | 0, 71376 | 0); + fimport$0(85196 | 0, 74090 | 0, 18650 | 0, 71449 | 0); wasm2js_trap(); } $157_1 = HEAP32[($3_1 + 72 | 0) >> 2] | 0; @@ -24640,7 +24798,7 @@ function asmFunc(imports) { } break label$12; } - fimport$0(72213 | 0, 74032 | 0, 18400 | 0, 66840 | 0); + fimport$0(72286 | 0, 74090 | 0, 18471 | 0, 66896 | 0); wasm2js_trap(); } $139_1 = HEAP32[($3_1 + 84 | 0) >> 2] | 0; @@ -24741,7 +24899,7 @@ function asmFunc(imports) { if (HEAP32[($3_1 + 88 | 0) >> 2] | 0) { break label$10 } - fimport$0(84792 | 0, 74032 | 0, 18464 | 0, 66821 | 0); + fimport$0(85349 | 0, 74090 | 0, 18535 | 0, 66877 | 0); wasm2js_trap(); } $98_1 = HEAP32[($3_1 + 88 | 0) >> 2] | 0; @@ -24768,19 +24926,19 @@ function asmFunc(imports) { label$4 : while (1) { $23_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $34_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { break label$6 } $34_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (47 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (47 | 0) & 1 | 0) { break label$6 } - $34_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (37 | 0); + $34_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (37 | 0); } $23_1 = $34_1; } @@ -24788,7 +24946,7 @@ function asmFunc(imports) { if (!($23_1 & 1 | 0)) { break label$7 } - HEAP32[($3_1 + 52 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 52 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$8 : { if (!((HEAP32[($3_1 + 52 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$8 @@ -24797,8 +24955,8 @@ function asmFunc(imports) { HEAP32[($3_1 + 56 | 0) >> 2] = 0; break label$2; } - HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 48 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 48 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0; $152(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 56 | 0) >> 2] | 0; $78_1 = $257(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -24826,13 +24984,13 @@ function asmFunc(imports) { if (($263((HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$13 } - $156(18 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73952 | 0, 0 | 0); + $156(18 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 74010 | 0, 0 | 0); } label$14 : { if (($263((HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$14 } - $156(19 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73926 | 0, 0 | 0); + $156(19 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73984 | 0, 0 | 0); } break label$11; } @@ -24879,19 +25037,19 @@ function asmFunc(imports) { if (!(((i64toi32_i32$2 | 0) == (i64toi32_i32$3 | 0) & (i64toi32_i32$1 | 0) == (i64toi32_i32$0 | 0) | 0) & 1 | 0)) { break label$17 } - $156(20 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 69697 | 0, 0 | 0); + $156(20 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 69770 | 0, 0 | 0); } label$18 : { if (($263((HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$18 } - $156(18 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73901 | 0, 0 | 0); + $156(18 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73959 | 0, 0 | 0); } label$19 : { if (($263((HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$19 } - $156(19 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73875 | 0, 0 | 0); + $156(19 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73933 | 0, 0 | 0); } break label$15; } @@ -24904,13 +25062,13 @@ function asmFunc(imports) { if (($266((HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$21 } - $156(21 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 69437 | 0, 0 | 0); + $156(21 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 69510 | 0, 0 | 0); } label$22 : { if (($266((HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$22 } - $156(22 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 69416 | 0, 0 | 0); + $156(22 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 69489 | 0, 0 | 0); } label$23 : { if (!(($135((HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { @@ -24932,7 +25090,7 @@ function asmFunc(imports) { if (!(((i64toi32_i32$3 | 0) == (i64toi32_i32$0 | 0) & (i64toi32_i32$1 | 0) == (i64toi32_i32$2 | 0) | 0) & 1 | 0)) { break label$23 } - $156(20 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 69680 | 0, 0 | 0); + $156(20 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 69753 | 0, 0 | 0); } } } @@ -24960,7 +25118,7 @@ function asmFunc(imports) { break label$24 } $178(HEAP32[($3_1 + 52 | 0) >> 2] | 0 | 0); - $156(23 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70575 | 0, 0 | 0); + $156(23 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70648 | 0, 0 | 0); break label$2; } HEAP32[($3_1 + 56 | 0) >> 2] = HEAP32[($3_1 + 52 | 0) >> 2] | 0; @@ -25321,15 +25479,15 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $35_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { break label$6 } - $35_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0); + $35_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0); } $24_1 = $35_1; } @@ -25337,20 +25495,20 @@ function asmFunc(imports) { if (!($24_1 & 1 | 0)) { break label$7 } - HEAP32[($3_1 + 544 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 544 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$8 : { if ((HEAP32[($3_1 + 548 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$8 } - fimport$0(76220 | 0, 74032 | 0, 14503 | 0, 70296 | 0); + fimport$0(76622 | 0, 74090 | 0, 14557 | 0, 70369 | 0); wasm2js_trap(); } - HEAP32[($3_1 + 548 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 548 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 540 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($3_1 + 548 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 548 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 540 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0; $152(HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 548 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 552 | 0) >> 2] | 0; - HEAP32[(0 + 101984 | 0) >> 2] = (HEAP32[(0 + 101984 | 0) >> 2] | 0) + 1 | 0; + HEAP32[(0 + 102560 | 0) >> 2] = (HEAP32[(0 + 102560 | 0) >> 2] | 0) + 1 | 0; $78_1 = $272(HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 548 | 0) >> 2] | 0) + 136 | 0) >> 2] = $78_1; label$9 : { @@ -25366,13 +25524,13 @@ function asmFunc(imports) { if (($264((HEAP32[((HEAP32[($3_1 + 548 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$10 } - $156(24 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 544 | 0) >> 2] | 0 | 0, 69548 | 0, 0 | 0); + $156(24 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 544 | 0) >> 2] | 0 | 0, 69621 | 0, 0 | 0); } label$11 : { if (($264((HEAP32[((HEAP32[($3_1 + 548 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0) { break label$11 } - $156(25 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 544 | 0) >> 2] | 0 | 0, 69519 | 0, 0 | 0); + $156(25 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 544 | 0) >> 2] | 0 | 0, 69592 | 0, 0 | 0); } HEAP8[($3_1 + 539 | 0) >> 0] = ($263((HEAP32[((HEAP32[($3_1 + 548 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0; HEAP8[($3_1 + 538 | 0) >> 0] = ($263((HEAP32[((HEAP32[($3_1 + 548 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0; @@ -25397,7 +25555,7 @@ function asmFunc(imports) { if (!(HEAP32[($3_1 + 524 | 0) >> 2] | 0)) { break label$16 } - $156(1 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 68411 | 0, 0 | 0); + $156(1 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 68484 | 0, 0 | 0); break label$2; } break label$14; @@ -25543,7 +25701,7 @@ function asmFunc(imports) { } break label$20; } - $156(22 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 66732 | 0, 0 | 0); + $156(22 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 66788 | 0, 0 | 0); } break label$17; } @@ -25686,11 +25844,11 @@ function asmFunc(imports) { } break label$27; } - $156(21 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 66780 | 0, 0 | 0); + $156(21 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 66836 | 0, 0 | 0); } break label$24; } - $156(23 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70541 | 0, 0 | 0); + $156(23 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70614 | 0, 0 | 0); } } } @@ -25714,7 +25872,7 @@ function asmFunc(imports) { if (!(HEAP32[($3_1 + 240 | 0) >> 2] | 0)) { break label$34 } - $156(23 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 69768 | 0, 0 | 0); + $156(23 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 69841 | 0, 0 | 0); break label$2; } break label$32; @@ -25745,7 +25903,7 @@ function asmFunc(imports) { if (($198($3_1 + 184 | 0 | 0, $3_1 + 128 | 0 | 0, 0 & 1 | 0 | 0) | 0) & 1 | 0) { break label$41 } - $156(26 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 67730 | 0, 0 | 0); + $156(26 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 67803 | 0, 0 | 0); } $515_1 = (HEAP32[($3_1 + 548 | 0) >> 2] | 0) + 4 | 0; $259($3_1 + 72 | 0 | 0); @@ -25872,12 +26030,12 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; break label$42; } - $156(22 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 72407 | 0, 0 | 0); + $156(22 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 72480 | 0, 0 | 0); } } break label$35; } - $156(23 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 85309 | 0, 0 | 0); + $156(23 | 0, HEAP32[($3_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 556 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 85866 | 0, 0 | 0); } } } @@ -25944,15 +26102,15 @@ function asmFunc(imports) { label$4 : while (1) { $23_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $34_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15934 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15934 | 0) & 1 | 0) { break label$6 } - $34_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15420 | 0); + $34_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15420 | 0); } $23_1 = $34_1; } @@ -25960,9 +26118,9 @@ function asmFunc(imports) { if (!($23_1 & 1 | 0)) { break label$7 } - HEAP32[($3_1 + 36 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 32 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($3_1 + 36 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 32 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0; $152(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 40 | 0) >> 2] | 0; $59_1 = $272(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -26018,7 +26176,7 @@ function asmFunc(imports) { break label$13 } $178(HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0); - $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70360 | 0, 0 | 0); + $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70433 | 0, 0 | 0); break label$2; } HEAP32[($3_1 + 40 | 0) >> 2] = HEAP32[($3_1 + 36 | 0) >> 2] | 0; @@ -26056,23 +26214,23 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $35_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (62 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (62 | 0) & 1 | 0) { break label$6 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (60 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (60 | 0) & 1 | 0) { break label$6 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15933 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15933 | 0) & 1 | 0) { break label$6 } - $35_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15421 | 0); + $35_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15421 | 0); } $24_1 = $35_1; } @@ -26084,18 +26242,18 @@ function asmFunc(imports) { if ((HEAP32[($3_1 + 84 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$8 } - fimport$0(76220 | 0, 74032 | 0, 14785 | 0, 70274 | 0); + fimport$0(76622 | 0, 74090 | 0, 14839 | 0, 70347 | 0); wasm2js_trap(); } - HEAP32[($3_1 + 84 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 84 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$9 : { if (!((HEAP32[($3_1 + 84 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$9 } break label$2; } - HEAP32[((HEAP32[($3_1 + 84 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 80 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 84 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 80 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0; $152(HEAP32[($3_1 + 92 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 84 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 88 | 0) >> 2] | 0; $98_1 = $276(HEAP32[($3_1 + 92 | 0) >> 2] | 0 | 0) | 0; @@ -26253,7 +26411,7 @@ function asmFunc(imports) { if ((HEAP32[($7_1 + 64 | 0) >> 2] | 0 | 0) == (8509 | 0) & 1 | 0) { break label$1 } - fimport$0(86464 | 0, 74032 | 0, 14877 | 0, 70916 | 0); + fimport$0(87021 | 0, 74090 | 0, 14931 | 0, 70989 | 0); wasm2js_trap(); } $29_1 = (HEAP32[($7_1 + 68 | 0) >> 2] | 0) + 64 | 0; @@ -26352,15 +26510,15 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $35_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15677 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15677 | 0) & 1 | 0) { break label$6 } - $35_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8509 | 0); + $35_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8509 | 0); } $24_1 = $35_1; } @@ -26372,18 +26530,18 @@ function asmFunc(imports) { if ((HEAP32[($3_1 + 68 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$8 } - fimport$0(76220 | 0, 74032 | 0, 14928 | 0, 70097 | 0); + fimport$0(76622 | 0, 74090 | 0, 14982 | 0, 70170 | 0); wasm2js_trap(); } - HEAP32[($3_1 + 68 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 68 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$9 : { if (!((HEAP32[($3_1 + 68 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$9 } break label$2; } - HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 72 | 0) >> 2] | 0; $77_1 = $277(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; @@ -26403,7 +26561,7 @@ function asmFunc(imports) { break label$12 } HEAP32[(HEAP32[($3_1 + 68 | 0) >> 2] | 0) >> 2] = 45; - $278(HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 68 | 0) >> 2] | 0 | 0, 15677 | 0, (HEAPU8[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $278(HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 68 | 0) >> 2] | 0 | 0, 15677 | 0, (HEAPU8[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); break label$11; } label$13 : { @@ -26412,10 +26570,10 @@ function asmFunc(imports) { break label$14 } HEAP32[(HEAP32[($3_1 + 68 | 0) >> 2] | 0) >> 2] = 46; - $278(HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 68 | 0) >> 2] | 0 | 0, 8509 | 0, (HEAPU8[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0 | 0); + $278(HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 68 | 0) >> 2] | 0 | 0, 8509 | 0, (HEAPU8[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0 | 0); break label$13; } - fimport$0(72213 | 0, 74032 | 0, 14965 | 0, 70097 | 0); + fimport$0(72286 | 0, 74090 | 0, 15019 | 0, 70170 | 0); wasm2js_trap(); } } @@ -26513,10 +26671,10 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $24_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0); + $24_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0); } label$6 : { if (!($24_1 & 1 | 0)) { @@ -26527,17 +26685,17 @@ function asmFunc(imports) { if ((HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$7 } - fimport$0(76220 | 0, 74032 | 0, 15001 | 0, 70316 | 0); + fimport$0(76622 | 0, 74090 | 0, 15055 | 0, 70389 | 0); wasm2js_trap(); } - HEAP32[($3_1 + 36 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 36 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$8 : { if (!((HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$8 } break label$2; } - HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 36 | 0) >> 2] | 0) >> 2] = 47; HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 40 | 0) >> 2] | 0; $65_1 = $279(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -26571,7 +26729,7 @@ function asmFunc(imports) { if (!(HEAP32[($3_1 + 12 | 0) >> 2] | 0)) { break label$10 } - $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70614 | 0, 0 | 0); + $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70687 | 0, 0 | 0); break label$2; } HEAP32[($3_1 + 40 | 0) >> 2] = HEAP32[($3_1 + 36 | 0) >> 2] | 0; @@ -26610,10 +26768,10 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $24_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (94 | 0); + $24_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (94 | 0); } label$6 : { if (!($24_1 & 1 | 0)) { @@ -26624,17 +26782,17 @@ function asmFunc(imports) { if ((HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$7 } - fimport$0(76220 | 0, 74032 | 0, 15055 | 0, 70227 | 0); + fimport$0(76622 | 0, 74090 | 0, 15109 | 0, 70300 | 0); wasm2js_trap(); } - HEAP32[($3_1 + 36 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 36 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$8 : { if (!((HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$8 } break label$2; } - HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 36 | 0) >> 2] | 0) >> 2] = 48; HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 40 | 0) >> 2] | 0; $65_1 = $280(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -26668,7 +26826,7 @@ function asmFunc(imports) { if (!(HEAP32[($3_1 + 12 | 0) >> 2] | 0)) { break label$10 } - $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70390 | 0, 0 | 0); + $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70463 | 0, 0 | 0); break label$2; } HEAP32[($3_1 + 40 | 0) >> 2] = HEAP32[($3_1 + 36 | 0) >> 2] | 0; @@ -26706,24 +26864,24 @@ function asmFunc(imports) { label$4 : while (1) { $23_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $23_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (124 | 0); + $23_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (124 | 0); } label$6 : { if (!($23_1 & 1 | 0)) { break label$6 } $152(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($3_1 + 36 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 36 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$7 : { if (!((HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$7 } break label$2; } - HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 36 | 0) >> 2] | 0) >> 2] = 49; HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 40 | 0) >> 2] | 0; $53_1 = $281(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -26759,7 +26917,7 @@ function asmFunc(imports) { break label$9 } $178(HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0); - $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70503 | 0, 0 | 0); + $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70576 | 0, 0 | 0); break label$2; } HEAP32[($3_1 + 40 | 0) >> 2] = HEAP32[($3_1 + 36 | 0) >> 2] | 0; @@ -26796,24 +26954,24 @@ function asmFunc(imports) { label$4 : while (1) { $23_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $23_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9766 | 0); + $23_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9766 | 0); } label$6 : { if (!($23_1 & 1 | 0)) { break label$6 } $152(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($3_1 + 36 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 36 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$7 : { if (!((HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$7 } break label$2; } - HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 36 | 0) >> 2] | 0) >> 2] = 50; HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 40 | 0) >> 2] | 0; $53_1 = $282(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -26851,7 +27009,7 @@ function asmFunc(imports) { $178(HEAP32[($3_1 + 36 | 0) >> 2] | 0 | 0); $284((HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0); $284((HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 4 | 0 | 0); - $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70643 | 0, 0 | 0); + $156(23 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70716 | 0, 0 | 0); break label$2; } HEAP32[($3_1 + 40 | 0) >> 2] = HEAP32[($3_1 + 36 | 0) >> 2] | 0; @@ -26880,8 +27038,8 @@ function asmFunc(imports) { HEAP32[$3_1 >> 2] = 0; HEAP32[($3_1 + 4 | 0) >> 2] = i64toi32_i32$0; $285($3_1 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); - $755(HEAP32[$3_1 >> 2] | 0 | 0) | 0; - $755(101054 | 0) | 0; + $756(HEAP32[$3_1 >> 2] | 0 | 0) | 0; + $756(101634 | 0) | 0; $14($3_1 | 0); global$0 = $3_1 + 16 | 0; return; @@ -26919,24 +27077,24 @@ function asmFunc(imports) { label$4 : while (1) { $23_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $23_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (31868 | 0); + $23_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (31868 | 0); } label$6 : { if (!($23_1 & 1 | 0)) { break label$6 } $152(HEAP32[($3_1 + 92 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($3_1 + 84 | 0) >> 2] = $821(1 | 0, 144 | 0) | 0; + HEAP32[($3_1 + 84 | 0) >> 2] = $822(1 | 0, 144 | 0) | 0; label$7 : { if (!((HEAP32[($3_1 + 84 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$7 } break label$2; } - HEAP32[((HEAP32[($3_1 + 84 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 84 | 0) >> 2] | 0) + 100 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 84 | 0) >> 2] | 0) >> 2] = 51; HEAP32[((HEAP32[($3_1 + 84 | 0) >> 2] | 0) + 132 | 0) >> 2] = HEAP32[($3_1 + 88 | 0) >> 2] | 0; $53_1 = $283(HEAP32[($3_1 + 92 | 0) >> 2] | 0 | 0) | 0; @@ -26971,7 +27129,7 @@ function asmFunc(imports) { break label$9 } $178(HEAP32[($3_1 + 84 | 0) >> 2] | 0 | 0); - $156(24 | 0, HEAP32[($3_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70461 | 0, 0 | 0); + $156(24 | 0, HEAP32[($3_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70534 | 0, 0 | 0); break label$2; } label$10 : { @@ -26979,7 +27137,7 @@ function asmFunc(imports) { break label$10 } $178(HEAP32[($3_1 + 84 | 0) >> 2] | 0 | 0); - $156(25 | 0, HEAP32[($3_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70418 | 0, 0 | 0); + $156(25 | 0, HEAP32[($3_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 92 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70491 | 0, 0 | 0); break label$2; } $118_1 = (HEAP32[($3_1 + 84 | 0) >> 2] | 0) + 4 | 0; @@ -27164,7 +27322,7 @@ function asmFunc(imports) { $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; $3_1 = $3_1 | 0; - var $6_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $294_1 = 0, $295_1 = 0, $291$hi = 0, $290$hi = 0, i64toi32_i32$0 = 0, $63_1 = 0, $70_1 = 0, $77_1 = 0, $84_1 = 0, $91_1 = 0, $98_1 = 0, $109_1 = 0, $116_1 = 0, $123_1 = 0, $130_1 = 0, $137_1 = 0, $144_1 = 0, $471_1 = 0, $487_1 = 0, $503_1 = 0, $519_1 = 0, $535_1 = 0, $551_1 = 0, $555_1 = 0, $579_1 = 0, $595_1 = 0, $611_1 = 0, $627_1 = 0, $643_1 = 0, $659_1 = 0, $663_1 = 0; + var $6_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $310_1 = 0, $311_1 = 0, $307$hi = 0, $306$hi = 0, i64toi32_i32$0 = 0, $63_1 = 0, $70_1 = 0, $77_1 = 0, $84_1 = 0, $91_1 = 0, $98_1 = 0, $109_1 = 0, $116_1 = 0, $123_1 = 0, $130_1 = 0, $137_1 = 0, $144_1 = 0, $487_1 = 0, $503_1 = 0, $519_1 = 0, $535_1 = 0, $551_1 = 0, $567_1 = 0, $571_1 = 0, $595_1 = 0, $611_1 = 0, $627_1 = 0, $643_1 = 0, $659_1 = 0, $675_1 = 0, $679_1 = 0; $6_1 = global$0 - 256 | 0; global$0 = $6_1; HEAP32[($6_1 + 252 | 0) >> 2] = $0_1; @@ -27183,68 +27341,68 @@ function asmFunc(imports) { } i64toi32_i32$0 = $137((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 64 | 0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - $290$hi = i64toi32_i32$1; + $306$hi = i64toi32_i32$1; i64toi32_i32$1 = 0; - $291$hi = i64toi32_i32$1; - i64toi32_i32$1 = $290$hi; - i64toi32_i32$1 = $291$hi; - i64toi32_i32$1 = $290$hi; - i64toi32_i32$1 = $291$hi; - i64toi32_i32$1 = $290$hi; + $307$hi = i64toi32_i32$1; + i64toi32_i32$1 = $306$hi; + i64toi32_i32$1 = $307$hi; + i64toi32_i32$1 = $306$hi; + i64toi32_i32$1 = $307$hi; + i64toi32_i32$1 = $306$hi; i64toi32_i32$2 = i64toi32_i32$0; - i64toi32_i32$0 = $291$hi; + i64toi32_i32$0 = $307$hi; i64toi32_i32$3 = 0; - if (!(((i64toi32_i32$2 | 0) == (i64toi32_i32$3 | 0) & (i64toi32_i32$1 | 0) == ($291$hi | 0) | 0) & 1 | 0)) { + if (!(((i64toi32_i32$2 | 0) == (i64toi32_i32$3 | 0) & (i64toi32_i32$1 | 0) == ($307$hi | 0) | 0) & 1 | 0)) { break label$1 } } HEAP8[($6_1 + 235 | 0) >> 0] = 1; } i64toi32_i32$2 = 0; - $294_1 = 0; + $310_1 = 0; i64toi32_i32$1 = $6_1 + 224 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $294_1; + HEAP32[i64toi32_i32$1 >> 2] = $310_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 216 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $294_1; + HEAP32[i64toi32_i32$1 >> 2] = $310_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 208 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $294_1; + HEAP32[i64toi32_i32$1 >> 2] = $310_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 200 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $294_1; + HEAP32[i64toi32_i32$1 >> 2] = $310_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 192 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $294_1; + HEAP32[i64toi32_i32$1 >> 2] = $310_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 184 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $294_1; + HEAP32[i64toi32_i32$1 >> 2] = $310_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1; - HEAP32[($6_1 + 176 | 0) >> 2] = $294_1; + HEAP32[($6_1 + 176 | 0) >> 2] = $310_1; HEAP32[($6_1 + 180 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$2 = 0; - $295_1 = 0; + $311_1 = 0; i64toi32_i32$1 = $6_1 + 168 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $295_1; + HEAP32[i64toi32_i32$1 >> 2] = $311_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 160 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $295_1; + HEAP32[i64toi32_i32$1 >> 2] = $311_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 152 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $295_1; + HEAP32[i64toi32_i32$1 >> 2] = $311_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 144 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $295_1; + HEAP32[i64toi32_i32$1 >> 2] = $311_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 136 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $295_1; + HEAP32[i64toi32_i32$1 >> 2] = $311_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1 + 128 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $295_1; + HEAP32[i64toi32_i32$1 >> 2] = $311_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $6_1; - HEAP32[($6_1 + 120 | 0) >> 2] = $295_1; + HEAP32[($6_1 + 120 | 0) >> 2] = $311_1; HEAP32[($6_1 + 124 | 0) >> 2] = i64toi32_i32$2; label$3 : { label$4 : { @@ -27256,56 +27414,56 @@ function asmFunc(imports) { i64toi32_i32$3 = ($6_1 + 64 | 0) + $63_1 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $471_1 = i64toi32_i32$2; + $487_1 = i64toi32_i32$2; i64toi32_i32$2 = ($6_1 + 176 | 0) + $63_1 | 0; - HEAP32[i64toi32_i32$2 >> 2] = $471_1; + HEAP32[i64toi32_i32$2 >> 2] = $487_1; HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] = i64toi32_i32$1; $70_1 = 40; i64toi32_i32$3 = ($6_1 + 64 | 0) + $70_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $487_1 = i64toi32_i32$1; + $503_1 = i64toi32_i32$1; i64toi32_i32$1 = ($6_1 + 176 | 0) + $70_1 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $487_1; + HEAP32[i64toi32_i32$1 >> 2] = $503_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; $77_1 = 32; i64toi32_i32$3 = ($6_1 + 64 | 0) + $77_1 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $503_1 = i64toi32_i32$2; + $519_1 = i64toi32_i32$2; i64toi32_i32$2 = ($6_1 + 176 | 0) + $77_1 | 0; - HEAP32[i64toi32_i32$2 >> 2] = $503_1; + HEAP32[i64toi32_i32$2 >> 2] = $519_1; HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] = i64toi32_i32$1; $84_1 = 24; i64toi32_i32$3 = ($6_1 + 64 | 0) + $84_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $519_1 = i64toi32_i32$1; + $535_1 = i64toi32_i32$1; i64toi32_i32$1 = ($6_1 + 176 | 0) + $84_1 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $519_1; + HEAP32[i64toi32_i32$1 >> 2] = $535_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; $91_1 = 16; i64toi32_i32$3 = ($6_1 + 64 | 0) + $91_1 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $535_1 = i64toi32_i32$2; + $551_1 = i64toi32_i32$2; i64toi32_i32$2 = ($6_1 + 176 | 0) + $91_1 | 0; - HEAP32[i64toi32_i32$2 >> 2] = $535_1; + HEAP32[i64toi32_i32$2 >> 2] = $551_1; HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] = i64toi32_i32$1; $98_1 = 8; i64toi32_i32$3 = ($6_1 + 64 | 0) + $98_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $551_1 = i64toi32_i32$1; + $567_1 = i64toi32_i32$1; i64toi32_i32$1 = ($6_1 + 176 | 0) + $98_1 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $551_1; + HEAP32[i64toi32_i32$1 >> 2] = $567_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$3 = $6_1; i64toi32_i32$2 = HEAP32[($6_1 + 64 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($6_1 + 68 | 0) >> 2] | 0; - $555_1 = i64toi32_i32$2; + $571_1 = i64toi32_i32$2; i64toi32_i32$2 = $6_1; - HEAP32[($6_1 + 176 | 0) >> 2] = $555_1; + HEAP32[($6_1 + 176 | 0) >> 2] = $571_1; HEAP32[($6_1 + 180 | 0) >> 2] = i64toi32_i32$1; break label$3; } @@ -27314,56 +27472,56 @@ function asmFunc(imports) { i64toi32_i32$3 = ($6_1 + 8 | 0) + $109_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $579_1 = i64toi32_i32$1; + $595_1 = i64toi32_i32$1; i64toi32_i32$1 = ($6_1 + 176 | 0) + $109_1 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $579_1; + HEAP32[i64toi32_i32$1 >> 2] = $595_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; $116_1 = 40; i64toi32_i32$3 = ($6_1 + 8 | 0) + $116_1 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $595_1 = i64toi32_i32$2; + $611_1 = i64toi32_i32$2; i64toi32_i32$2 = ($6_1 + 176 | 0) + $116_1 | 0; - HEAP32[i64toi32_i32$2 >> 2] = $595_1; + HEAP32[i64toi32_i32$2 >> 2] = $611_1; HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] = i64toi32_i32$1; $123_1 = 32; i64toi32_i32$3 = ($6_1 + 8 | 0) + $123_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $611_1 = i64toi32_i32$1; + $627_1 = i64toi32_i32$1; i64toi32_i32$1 = ($6_1 + 176 | 0) + $123_1 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $611_1; + HEAP32[i64toi32_i32$1 >> 2] = $627_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; $130_1 = 24; i64toi32_i32$3 = ($6_1 + 8 | 0) + $130_1 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $627_1 = i64toi32_i32$2; + $643_1 = i64toi32_i32$2; i64toi32_i32$2 = ($6_1 + 176 | 0) + $130_1 | 0; - HEAP32[i64toi32_i32$2 >> 2] = $627_1; + HEAP32[i64toi32_i32$2 >> 2] = $643_1; HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] = i64toi32_i32$1; $137_1 = 16; i64toi32_i32$3 = ($6_1 + 8 | 0) + $137_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $643_1 = i64toi32_i32$1; + $659_1 = i64toi32_i32$1; i64toi32_i32$1 = ($6_1 + 176 | 0) + $137_1 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $643_1; + HEAP32[i64toi32_i32$1 >> 2] = $659_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; $144_1 = 8; i64toi32_i32$3 = ($6_1 + 8 | 0) + $144_1 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; - $659_1 = i64toi32_i32$2; + $675_1 = i64toi32_i32$2; i64toi32_i32$2 = ($6_1 + 176 | 0) + $144_1 | 0; - HEAP32[i64toi32_i32$2 >> 2] = $659_1; + HEAP32[i64toi32_i32$2 >> 2] = $675_1; HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] = i64toi32_i32$1; i64toi32_i32$3 = $6_1; i64toi32_i32$1 = HEAP32[($6_1 + 8 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[($6_1 + 12 | 0) >> 2] | 0; - $663_1 = i64toi32_i32$1; + $679_1 = i64toi32_i32$1; i64toi32_i32$1 = $6_1; - HEAP32[($6_1 + 176 | 0) >> 2] = $663_1; + HEAP32[($6_1 + 176 | 0) >> 2] = $679_1; HEAP32[($6_1 + 180 | 0) >> 2] = i64toi32_i32$2; } label$5 : { @@ -27381,105 +27539,114 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) & 4096 | 0)) { break label$7 } - $213(1048576 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 72761 | 0, 0 | 0) | 0; + $213(1048576 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 72819 | 0, 0 | 0) | 0; } label$8 : { - label$9 : { + if (!(($230((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0)) { + break label$8 + } + if (!((HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) & 4096 | 0)) { + break label$8 + } + $213(1048576 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 72819 | 0, 0 | 0) | 0; + } + label$9 : { + label$10 : { if (!(($262((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0)) { - break label$9 + break label$10 } - label$10 : { - label$11 : { + label$11 : { + label$12 : { if (!(($262(HEAP32[($6_1 + 248 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { - break label$11 + break label$12 } - break label$10; + break label$11; } - label$12 : { + label$13 : { if (!((HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) & 4096 | 0)) { - break label$12 + break label$13 } - $156(69 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 66675 | 0, 0 | 0); + $156(69 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 66731 | 0, 0 | 0); } } - break label$8; + break label$9; } - label$13 : { - label$14 : { + label$14 : { + label$15 : { if (!(($262(HEAP32[($6_1 + 248 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { - break label$14 + break label$15 } - label$15 : { - label$16 : { + label$16 : { + label$17 : { if (!(($228(HEAP32[($6_1 + 248 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { - break label$16 + break label$17 } if (!(($135((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { - break label$16 + break label$17 } if (($139((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0) { - break label$16 + break label$17 } - break label$15; + break label$16; } - $156(69 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69151 | 0, 0 | 0); + $156(69 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69224 | 0, 0 | 0); } - break label$13; + break label$14; } } } break label$5; } - label$17 : { - label$18 : { + label$18 : { + label$19 : { if (!(($262(HEAP32[($6_1 + 248 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { - break label$18 + break label$19 } - label$19 : { - label$20 : { + label$20 : { + label$21 : { if (!(($262((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0)) { - break label$20 + break label$21 } - break label$19; + break label$20; } - label$21 : { + label$22 : { if ((HEAPU8[($6_1 + 235 | 0) >> 0] | 0) & 1 | 0) { - break label$21 + break label$22 } - $156(69 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 72842 | 0, 0 | 0); + $156(69 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 72900 | 0, 0 | 0); } } - break label$17; + break label$18; } - label$22 : { - label$23 : { + label$23 : { + label$24 : { if (!(($262((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 4 | 0 | 0) | 0) & 1 | 0)) { - break label$23 + break label$24 } - label$24 : { + label$25 : { if (!((HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) & 8192 | 0)) { - break label$24 + break label$25 } - $156(64 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 68948 | 0, 0 | 0); + $156(64 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69021 | 0, 0 | 0); } - break label$22; + break label$23; } } } } - label$25 : { + label$26 : { if (!((HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) & 16 | 0)) { - break label$25 + break label$26 } - label$26 : { + label$27 : { if (!((HEAP32[(HEAP32[($6_1 + 244 | 0) >> 2] | 0) >> 2] | 0 | 0) == (12 | 0) & 1 | 0)) { - break label$26 + break label$27 } - label$27 : { + label$28 : { if (($262(HEAP32[($6_1 + 248 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { - break label$27 + break label$28 } - $156(66 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 86897 | 0, 0 | 0); + $156(66 | 0, HEAP32[($6_1 + 252 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 244 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 87477 | 0, 0 | 0); } } } @@ -27552,7 +27719,7 @@ function asmFunc(imports) { continue label$3; }; } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -27577,7 +27744,7 @@ function asmFunc(imports) { if (($135((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0) { break label$1 } - $156(33 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70331 | 0, 0 | 0); + $156(33 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70404 | 0, 0 | 0); } $30_1 = HEAP32[($4_1 + 4 | 0) >> 2] | 0; global$0 = $4_1 + 16 | 0; @@ -27634,7 +27801,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -27642,10 +27809,10 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (31868 | 0); + $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (31868 | 0); } label$6 : { if (!($24_1 & 1 | 0)) { @@ -27661,7 +27828,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; $602(HEAP32[(i64toi32_i32$0 + 12 | 0) >> 2] | 0 | 0, HEAP32[(i64toi32_i32$0 + 8 | 0) >> 2] | 0 | 0); label$7 : { - if (!((HEAP32[((HEAP32[(i64toi32_i32$0 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[(i64toi32_i32$0 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$7 } break label$2; @@ -27726,25 +27893,25 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; label$1 : while (1) { $17_1 = 0; label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $17_1 = $1(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) | 0; + $17_1 = $1(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) | 0; } label$3 : { if (!($17_1 & 1 | 0)) { break label$3 } - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; continue label$1; } break label$1; }; - $29_1 = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; + $29_1 = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0; global$0 = $3_1 + 16 | 0; return $29_1 | 0; } @@ -27761,20 +27928,20 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; } label$4 : { label$5 : while (1) { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { break label$4 } $298(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0; $299(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); label$6 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$6 } break label$2; @@ -27805,11 +27972,11 @@ function asmFunc(imports) { if ((HEAPU8[(HEAP32[($5_1 + 8 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { break label$1 } - $13(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, 87560 | 0, 0 | 0) | 0; } $13_1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 4 | 0) >> 2] | 0; - $13($13_1 | 0, 68053 | 0, $5_1 | 0) | 0; + $13($13_1 | 0, 68126 | 0, $5_1 | 0) | 0; HEAP8[(HEAP32[($5_1 + 8 | 0) >> 2] | 0) >> 0] = 0; global$0 = $5_1 + 16 | 0; return; @@ -27829,19 +27996,19 @@ function asmFunc(imports) { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 1 | 0)) { break label$1 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 73114 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 73172 | 0); } label$2 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 128 | 0)) { break label$2 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 73500 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 73558 | 0); } label$3 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 256 | 0)) { break label$3 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 73498 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 73556 | 0); } label$4 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 8 | 0)) { @@ -27859,55 +28026,55 @@ function asmFunc(imports) { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 16 | 0)) { break label$6 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 71284 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 71357 | 0); } label$7 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 4194304 | 0)) { break label$7 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 71279 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 71352 | 0); } label$8 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 524288 | 0)) { break label$8 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 84474 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 85031 | 0); } label$9 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 1048576 | 0)) { break label$9 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 84559 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 85116 | 0); } label$10 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 2097152 | 0)) { break label$10 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 84500 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 85057 | 0); } label$11 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 2 | 0)) { break label$11 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 69585 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 69658 | 0); } label$12 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 64 | 0)) { break label$12 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 72725 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 72783 | 0); } label$13 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 32 | 0)) { break label$13 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67079 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67139 | 0); } label$14 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 512 | 0)) { break label$14 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 70862 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 70935 | 0); } label$15 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 1024 | 0)) { @@ -27919,25 +28086,25 @@ function asmFunc(imports) { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 2048 | 0)) { break label$16 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 84567 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 85124 | 0); } label$17 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 4096 | 0)) { break label$17 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 84508 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 85065 | 0); } label$18 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 8192 | 0)) { break label$18 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 84439 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 84996 | 0); } label$19 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 16777216 | 0)) { break label$19 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67085 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67145 | 0); } $123_1 = (HEAPU8[(HEAP32[($5_1 + 8 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0; global$0 = $5_1 + 16 | 0; @@ -27964,13 +28131,13 @@ function asmFunc(imports) { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 2 | 0)) { break label$2 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 66899 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 66955 | 0); } label$3 : { if (!((HEAP32[($5_1 + 4 | 0) >> 2] | 0) & 4 | 0)) { break label$3 } - $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 72687 | 0); + $300(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 72745 | 0); } global$0 = $5_1 + 16 | 0; return; @@ -27991,10 +28158,10 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) & 32768 | 0)) { break label$2 } - $300(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, $4_1 + 23 | 0 | 0, 86786 | 0); + $300(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, $4_1 + 23 | 0 | 0, 87343 | 0); $21_1 = HEAP32[($4_1 + 28 | 0) >> 2] | 0; HEAP32[$4_1 >> 2] = (HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 36 | 0; - $13($21_1 | 0, 68053 | 0, $4_1 | 0) | 0; + $13($21_1 | 0, 68126 | 0, $4_1 | 0) | 0; break label$1; } label$3 : { @@ -28002,14 +28169,14 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) & 65536 | 0)) { break label$4 } - $300(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, $4_1 + 23 | 0 | 0, 86826 | 0); + $300(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, $4_1 + 23 | 0 | 0, 87383 | 0); label$5 : { if (!((HEAP32[((HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $45_1 = HEAP32[($4_1 + 28 | 0) >> 2] | 0; HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $13($45_1 | 0, 68053 | 0, $4_1 + 16 | 0 | 0) | 0; + $13($45_1 | 0, 68126 | 0, $4_1 + 16 | 0 | 0) | 0; } break label$3; } @@ -28017,7 +28184,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) & 131072 | 0)) { break label$6 } - fimport$0(72213 | 0, 74032 | 0, 16626 | 0, 67387 | 0); + fimport$0(72286 | 0, 74090 | 0, 16690 | 0, 67447 | 0); wasm2js_trap(); } $301(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, $4_1 + 23 | 0 | 0, HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) | 0; @@ -28061,14 +28228,14 @@ function asmFunc(imports) { if ((HEAP32[($0_1 + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$5 } - fimport$0(76004 | 0, 74032 | 0, 16711 | 0, 69655 | 0); + fimport$0(76406 | 0, 74090 | 0, 16775 | 0, 69728 | 0); wasm2js_trap(); } label$6 : { if (!((HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } - HEAP32[($0_1 + 20 | 0) >> 2] = $763(HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($0_1 + 20 | 0) >> 2] = $764(HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0; } break label$1; } @@ -28124,7 +28291,7 @@ function asmFunc(imports) { HEAP32[i64toi32_i32$1 >> 2] = $27_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; HEAP32[$0_1 >> 2] = 3; - HEAP32[($3_1 + 12 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] = 0; HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] = 1; HEAP32[($0_1 + 52 | 0) >> 2] = HEAP32[($3_1 + 12 | 0) >> 2] | 0; @@ -28191,7 +28358,7 @@ function asmFunc(imports) { break label$10 } HEAP32[($5_1 + 48 | 0) >> 2] = (HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 36 | 0; - $13($5_1 + 240 | 0 | 0, 67978 | 0, $5_1 + 48 | 0 | 0) | 0; + $13($5_1 + 240 | 0 | 0, 68051 | 0, $5_1 + 48 | 0 | 0) | 0; break label$9; } label$11 : { @@ -28204,7 +28371,7 @@ function asmFunc(imports) { break label$13 } HEAP32[($5_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $13($5_1 + 240 | 0 | 0, 68015 | 0, $5_1 + 64 | 0 | 0) | 0; + $13($5_1 + 240 | 0 | 0, 68088 | 0, $5_1 + 64 | 0 | 0) | 0; } break label$11; } @@ -28219,12 +28386,12 @@ function asmFunc(imports) { if (!((HEAPU8[($5_1 + 239 | 0) >> 0] | 0) & 1 | 0)) { break label$15 } - $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 87560 | 0, 0 | 0) | 0; HEAP8[($5_1 + 239 | 0) >> 0] = 0; } $108_1 = HEAP32[($5_1 + 268 | 0) >> 2] | 0; HEAP32[($5_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $13($108_1 | 0, 68053 | 0, $5_1 + 32 | 0 | 0) | 0; + $13($108_1 | 0, 68126 | 0, $5_1 + 32 | 0 | 0) | 0; } HEAP32[($5_1 + 232 | 0) >> 2] = 0; i64toi32_i32$0 = 0; @@ -28238,11 +28405,11 @@ function asmFunc(imports) { $125_1 = HEAP32[($5_1 + 240 | 0) >> 2] | 0; HEAP32[($5_1 + 4 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 268 | 0) >> 2] | 0) >> 2] | 0; HEAP32[$5_1 >> 2] = $125_1; - $13($5_1 + 224 | 0 | 0, 67988 | 0, $5_1 | 0) | 0; + $13($5_1 + 224 | 0 | 0, 68061 | 0, $5_1 | 0) | 0; break label$16; } HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[($5_1 + 240 | 0) >> 2] | 0; - $13($5_1 + 224 | 0 | 0, 68053 | 0, $5_1 + 16 | 0 | 0) | 0; + $13($5_1 + 224 | 0 | 0, 68126 | 0, $5_1 + 16 | 0 | 0) | 0; } $126(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, $5_1 + 224 | 0 | 0); $14($5_1 + 240 | 0 | 0); @@ -28255,15 +28422,15 @@ function asmFunc(imports) { } $155_1 = HEAP32[($5_1 + 268 | 0) >> 2] | 0; HEAP32[($5_1 + 96 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $13($155_1 | 0, 68053 | 0, $5_1 + 96 | 0 | 0) | 0; + $13($155_1 | 0, 68126 | 0, $5_1 + 96 | 0 | 0) | 0; } - $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 74190 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 74248 | 0, 0 | 0) | 0; HEAP8[($5_1 + 223 | 0) >> 0] = 1; label$19 : { if (!((HEAPU8[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 36 | 0) >> 0] | 0) & 1 | 0)) { break label$19 } - $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 73977 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 74035 | 0, 0 | 0) | 0; HEAP8[($5_1 + 223 | 0) >> 0] = 0; } $302(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, $5_1 + 223 | 0 | 0, HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); @@ -28275,13 +28442,13 @@ function asmFunc(imports) { if ((HEAPU8[($5_1 + 223 | 0) >> 0] | 0) & 1 | 0) { break label$21 } - $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 87560 | 0, 0 | 0) | 0; } $193_1 = HEAP32[($5_1 + 268 | 0) >> 2] | 0; HEAP32[($5_1 + 80 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; - $13($193_1 | 0, 73832 | 0, $5_1 + 80 | 0 | 0) | 0; + $13($193_1 | 0, 73890 | 0, $5_1 + 80 | 0 | 0) | 0; } - $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 74188 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 74246 | 0, 0 | 0) | 0; break label$4; case 1: label$22 : { @@ -28290,9 +28457,9 @@ function asmFunc(imports) { } $210_1 = HEAP32[($5_1 + 268 | 0) >> 2] | 0; HEAP32[($5_1 + 128 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $13($210_1 | 0, 68053 | 0, $5_1 + 128 | 0 | 0) | 0; + $13($210_1 | 0, 68126 | 0, $5_1 + 128 | 0 | 0) | 0; } - $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 86015 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 86572 | 0, 0 | 0) | 0; HEAP32[($5_1 + 216 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0; label$23 : { label$24 : while (1) { @@ -28306,19 +28473,19 @@ function asmFunc(imports) { $285($5_1 + 200 | 0 | 0, HEAP32[($5_1 + 216 | 0) >> 2] | 0 | 0); $235_1 = HEAP32[($5_1 + 268 | 0) >> 2] | 0; HEAP32[($5_1 + 112 | 0) >> 2] = HEAP32[($5_1 + 200 | 0) >> 2] | 0; - $13($235_1 | 0, 68053 | 0, $5_1 + 112 | 0 | 0) | 0; + $13($235_1 | 0, 68126 | 0, $5_1 + 112 | 0 | 0) | 0; label$25 : { if (!((HEAP32[((HEAP32[($5_1 + 216 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$25 } - $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 85338 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 85895 | 0, 0 | 0) | 0; } $14($5_1 + 200 | 0 | 0); HEAP32[($5_1 + 216 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 216 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0; continue label$24; }; } - $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 86013 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 86570 | 0, 0 | 0) | 0; break label$4; case 3: break label$5; @@ -28342,9 +28509,9 @@ function asmFunc(imports) { break label$26 } } - $13($5_1 + 184 | 0 | 0, 86015 | 0, 0 | 0) | 0; + $13($5_1 + 184 | 0 | 0, 86572 | 0, 0 | 0) | 0; } - $13($5_1 + 184 | 0 | 0, 85340 | 0, 0 | 0) | 0; + $13($5_1 + 184 | 0 | 0, 85897 | 0, 0 | 0) | 0; HEAP8[($5_1 + 183 | 0) >> 0] = 0; $302($5_1 + 184 | 0 | 0, $5_1 + 183 | 0 | 0, HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); label$28 : { @@ -28355,11 +28522,11 @@ function asmFunc(imports) { if ((HEAPU8[($5_1 + 183 | 0) >> 0] | 0) & 1 | 0) { break label$29 } - $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, 87560 | 0, 0 | 0) | 0; } $319_1 = HEAP32[($5_1 + 268 | 0) >> 2] | 0; HEAP32[($5_1 + 176 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $13($319_1 | 0, 68053 | 0, $5_1 + 176 | 0 | 0) | 0; + $13($319_1 | 0, 68126 | 0, $5_1 + 176 | 0 | 0) | 0; HEAP8[($5_1 + 183 | 0) >> 0] = 0; } label$30 : { @@ -28367,7 +28534,7 @@ function asmFunc(imports) { break label$30 } HEAP32[($5_1 + 160 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 268 | 0) >> 2] | 0) >> 2] | 0; - $13($5_1 + 184 | 0 | 0, 68053 | 0, $5_1 + 160 | 0 | 0) | 0; + $13($5_1 + 184 | 0 | 0, 68126 | 0, $5_1 + 160 | 0 | 0) | 0; } label$31 : { if (!((HEAP32[((HEAP32[($5_1 + 256 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -28382,7 +28549,7 @@ function asmFunc(imports) { } } HEAP32[($5_1 + 144 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 268 | 0) >> 2] | 0) >> 2] | 0; - $13($5_1 + 184 | 0 | 0, 86013 | 0, $5_1 + 144 | 0 | 0) | 0; + $13($5_1 + 184 | 0 | 0, 86570 | 0, $5_1 + 144 | 0 | 0) | 0; } $126(HEAP32[($5_1 + 268 | 0) >> 2] | 0 | 0, $5_1 + 184 | 0 | 0); $14($5_1 + 184 | 0 | 0); @@ -28578,7 +28745,7 @@ function asmFunc(imports) { if (!((HEAPU8[($6_1 + 78 | 0) >> 0] | 0) & 1 | 0)) { break label$11 } - $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69019 | 0, 0 | 0); + $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69092 | 0, 0 | 0); break label$10; } label$12 : { @@ -28619,7 +28786,7 @@ function asmFunc(imports) { if (($296(HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$19 } - $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 68782 | 0, 0 | 0); + $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 68855 | 0, 0 | 0); } break label$17; } @@ -28642,14 +28809,14 @@ function asmFunc(imports) { if (($262($6_1 + 12 | 0 | 0) | 0) & 1 | 0) { break label$25 } - $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 68991 | 0, 0 | 0); + $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 69064 | 0, 0 | 0); break label$24; } label$26 : { if ((HEAPU8[((HEAP32[($6_1 + 72 | 0) >> 2] | 0) + 37 | 0) >> 0] | 0) & 1 | 0) { break label$26 } - $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 86581 | 0, 0 | 0); + $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 87138 | 0, 0 | 0); } } $185($6_1 + 12 | 0 | 0); @@ -28659,7 +28826,7 @@ function asmFunc(imports) { if (($296(HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$27 } - $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 68733 | 0, 0 | 0); + $156(69 | 0, HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($6_1 + 88 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 68806 | 0, 0 | 0); } } break label$20; @@ -28695,7 +28862,7 @@ function asmFunc(imports) { if (($230(HEAP32[($4_1 + 60 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$1 } - fimport$0(85572 | 0, 74032 | 0, 18111 | 0, 68471 | 0); + fimport$0(86129 | 0, 74090 | 0, 18182 | 0, 68544 | 0); wasm2js_trap(); } $200($4_1 + 4 | 0 | 0, HEAP32[($4_1 + 60 | 0) >> 2] | 0 | 0); @@ -28734,7 +28901,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(76726 | 0, 74032 | 0, 18916 | 0, 72260 | 0); + fimport$0(77128 | 0, 74090 | 0, 18987 | 0, 72333 | 0); wasm2js_trap(); } label$2 : { @@ -28836,21 +29003,21 @@ function asmFunc(imports) { if ((HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(76608 | 0, 74032 | 0, 19277 | 0, 66265 | 0); + fimport$0(77010 | 0, 74090 | 0, 19348 | 0, 66265 | 0); wasm2js_trap(); } label$2 : { if ((HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$2 } - fimport$0(76823 | 0, 74032 | 0, 19278 | 0, 66265 | 0); + fimport$0(77225 | 0, 74090 | 0, 19349 | 0, 66265 | 0); wasm2js_trap(); } label$3 : { if ((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - fimport$0(75960 | 0, 74032 | 0, 19279 | 0, 66265 | 0); + fimport$0(76362 | 0, 74090 | 0, 19350 | 0, 66265 | 0); wasm2js_trap(); } label$4 : { @@ -28900,7 +29067,7 @@ function asmFunc(imports) { } $323(HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[((HEAP32[($6_1 + 88 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 84 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 80 | 0) >> 2] | 0 | 0); } - HEAP32[($6_1 + 76 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($6_1 + 76 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; HEAP32[(HEAP32[($6_1 + 76 | 0) >> 2] | 0) >> 2] = 1; label$6 : { if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 88 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -28917,7 +29084,7 @@ function asmFunc(imports) { if (!((HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - HEAP32[($6_1 + 68 | 0) >> 2] = $821(1 | 0, 60 | 0) | 0; + HEAP32[($6_1 + 68 | 0) >> 2] = $822(1 | 0, 60 | 0) | 0; $96_1 = HEAP32[($6_1 + 68 | 0) >> 2] | 0; $164($6_1 + 12 | 0 | 0, (HEAP32[((HEAP32[($6_1 + 72 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 72 | 0 | 0); i64toi32_i32$2 = $6_1; @@ -29006,7 +29173,7 @@ function asmFunc(imports) { } $323(HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[((HEAP32[($6_1 + 88 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 84 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 80 | 0) >> 2] | 0 | 0); } - HEAP32[($6_1 + 4 | 0) >> 2] = $821(1 | 0, 56 | 0) | 0; + HEAP32[($6_1 + 4 | 0) >> 2] = $822(1 | 0, 56 | 0) | 0; HEAP32[(HEAP32[($6_1 + 4 | 0) >> 2] | 0) >> 2] = 2; i64toi32_i32$1 = $324(HEAP32[((HEAP32[($6_1 + 88 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; @@ -29089,7 +29256,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } - $817(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] = 0; } HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; @@ -29242,7 +29409,7 @@ function asmFunc(imports) { break label$1 } $329(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -29278,7 +29445,7 @@ function asmFunc(imports) { continue label$2; }; } - $817(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); global$0 = $3_1 + 16 | 0; return; } @@ -29289,7 +29456,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $817(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); global$0 = $3_1 + 16 | 0; return; } @@ -29314,7 +29481,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = 61; break label$1; } - HEAP32[$4_1 >> 2] = $818(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 4 | 0) >> 2] | 0) << 2 | 0 | 0) | 0; + HEAP32[$4_1 >> 2] = $819(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 4 | 0) >> 2] | 0) << 2 | 0 | 0) | 0; label$4 : { if (!((HEAP32[$4_1 >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$4 @@ -29408,7 +29575,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = 61; break label$1; } - HEAP32[$4_1 >> 2] = $818(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, Math_imul(HEAP32[($4_1 + 4 | 0) >> 2] | 0, 36) | 0) | 0; + HEAP32[$4_1 >> 2] = $819(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, Math_imul(HEAP32[($4_1 + 4 | 0) >> 2] | 0, 36) | 0) | 0; label$4 : { if (!((HEAP32[$4_1 >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$4 @@ -29534,7 +29701,7 @@ function asmFunc(imports) { break label$2 } label$4 : { - if ($760(HEAP32[(HEAP32[$4_1 >> 2] | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[(HEAP32[$4_1 >> 2] | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0) { break label$4 } HEAP8[($4_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -29739,7 +29906,7 @@ function asmFunc(imports) { if (!(($240($7_1 + 52 | 0 | 0) | 0) & 1 | 0)) { break label$22 } - HEAP32[($7_1 + 48 | 0) >> 2] = $821(1 | 0, 36 | 0) | 0; + HEAP32[($7_1 + 48 | 0) >> 2] = $822(1 | 0, 36 | 0) | 0; $241_1 = HEAP32[($7_1 + 48 | 0) >> 2] | 0; $337($7_1 + 12 | 0 | 0, $7_1 + 52 | 0 | 0, HEAP32[($7_1 + 312 | 0) >> 2] | 0 | 0, (HEAP32[($7_1 + 308 | 0) >> 2] | 0) + 1 | 0 | 0, HEAP32[($7_1 + 304 | 0) >> 2] | 0 | 0); i64toi32_i32$2 = $7_1; @@ -29802,12 +29969,12 @@ function asmFunc(imports) { if ((HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(68376 | 0, 74032 | 0, 19965 | 0, 66941 | 0); + fimport$0(68449 | 0, 74090 | 0, 20037 | 0, 66975 | 0); wasm2js_trap(); } i64toi32_i32$2 = 0; - i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 101060 | 0) >> 2] | 0; - HEAP32[$5_1 >> 2] = HEAP32[(i64toi32_i32$2 + 101056 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 101640 | 0) >> 2] | 0; + HEAP32[$5_1 >> 2] = HEAP32[(i64toi32_i32$2 + 101636 | 0) >> 2] | 0; HEAP32[($5_1 + 4 | 0) >> 2] = i64toi32_i32$1; $337($0_1 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, $5_1 | 0, 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); global$0 = $5_1 + 16 | 0; @@ -29890,7 +30057,7 @@ function asmFunc(imports) { if ((HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0) { break label$1 } - fimport$0(84649 | 0, 74032 | 0, 20013 | 0, 72162 | 0); + fimport$0(85206 | 0, 74090 | 0, 20085 | 0, 72235 | 0); wasm2js_trap(); } HEAP32[($4_1 + 20 | 0) >> 2] = (HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) - (HEAP32[($4_1 + 24 | 0) >> 2] | 0) | 0; @@ -29971,11 +30138,11 @@ function asmFunc(imports) { $51_1 = HEAP32[($8_1 + 748 | 0) >> 2] | 0; HEAP32[($8_1 + 4 | 0) >> 2] = 32; HEAP32[$8_1 >> 2] = $51_1; - $748(74039 | 0, $8_1 | 0) | 0; + $749(74097 | 0, $8_1 | 0) | 0; $54_1 = HEAP32[($8_1 + 736 | 0) >> 2] | 0; - HEAP32[($8_1 + 20 | 0) >> 2] = 85336; + HEAP32[($8_1 + 20 | 0) >> 2] = 85893; HEAP32[($8_1 + 16 | 0) >> 2] = $54_1; - $748(87217 | 0, $8_1 + 16 | 0 | 0) | 0; + $749(87797 | 0, $8_1 + 16 | 0 | 0) | 0; break label$1; } HEAP32[($8_1 + 724 | 0) >> 2] = HEAP32[((HEAP32[($8_1 + 728 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; @@ -30008,10 +30175,10 @@ function asmFunc(imports) { $108_1 = HEAP32[((HEAP32[((HEAP32[(HEAP32[($8_1 + 716 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$13; } - $108_1 = 101055; + $108_1 = 101635; } HEAP32[($8_1 + 712 | 0) >> 2] = $108_1; - $724($8_1 + 512 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($8_1 + 512 | 0 | 0, 0 | 0, 200 | 0) | 0; label$15 : { label$16 : { if (!((HEAPU8[($8_1 + 735 | 0) >> 0] | 0) & 1 | 0)) { @@ -30020,13 +30187,13 @@ function asmFunc(imports) { $121_1 = HEAP32[($8_1 + 736 | 0) >> 2] | 0; HEAP32[($8_1 + 36 | 0) >> 2] = HEAP32[($8_1 + 712 | 0) >> 2] | 0; HEAP32[($8_1 + 32 | 0) >> 2] = $121_1; - $756($8_1 + 512 | 0 | 0, 200 | 0, 67955 | 0, $8_1 + 32 | 0 | 0) | 0; + $757($8_1 + 512 | 0 | 0, 200 | 0, 68028 | 0, $8_1 + 32 | 0 | 0) | 0; break label$15; } $130_1 = HEAP32[($8_1 + 736 | 0) >> 2] | 0; HEAP32[($8_1 + 52 | 0) >> 2] = HEAP32[($8_1 + 712 | 0) >> 2] | 0; HEAP32[($8_1 + 48 | 0) >> 2] = $130_1; - $756($8_1 + 512 | 0 | 0, 200 | 0, 67968 | 0, $8_1 + 48 | 0 | 0) | 0; + $757($8_1 + 512 | 0 | 0, 200 | 0, 68041 | 0, $8_1 + 48 | 0 | 0) | 0; } $342((HEAP32[($8_1 + 748 | 0) >> 2] | 0) + 1 | 0 | 0, (HEAP32[(HEAP32[($8_1 + 716 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0, (HEAP32[((HEAP32[($8_1 + 740 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + Math_imul(HEAP32[($8_1 + 720 | 0) >> 2] | 0, 36) | 0 | 0, $8_1 + 512 | 0 | 0, ($228((HEAP32[(HEAP32[($8_1 + 716 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0) | 0) & 1 | 0 | 0, (HEAPU8[($8_1 + 734 | 0) >> 0] | 0) & 1 | 0 | 0); HEAP32[($8_1 + 720 | 0) >> 2] = (HEAP32[($8_1 + 720 | 0) >> 2] | 0) + 1 | 0; @@ -30090,7 +30257,7 @@ function asmFunc(imports) { $223_1 = HEAP32[($8_1 + 748 | 0) >> 2] | 0; HEAP32[($8_1 + 132 | 0) >> 2] = 32; HEAP32[($8_1 + 128 | 0) >> 2] = $223_1; - $748(74039 | 0, $8_1 + 128 | 0 | 0) | 0; + $749(74097 | 0, $8_1 + 128 | 0 | 0) | 0; label$21 : { if (!((HEAP32[($8_1 + 740 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$21 @@ -30101,15 +30268,15 @@ function asmFunc(imports) { break label$23 } HEAP32[($8_1 + 96 | 0) >> 2] = HEAP32[($8_1 + 736 | 0) >> 2] | 0; - $748(86935 | 0, $8_1 + 96 | 0 | 0) | 0; + $749(87515 | 0, $8_1 + 96 | 0 | 0) | 0; $343(HEAP32[(HEAP32[($8_1 + 740 | 0) >> 2] | 0) >> 2] | 0 | 0); break label$22; } $244_1 = HEAP32[($8_1 + 740 | 0) >> 2] | 0; HEAP32[($8_1 + 116 | 0) >> 2] = HEAP32[($8_1 + 736 | 0) >> 2] | 0; HEAP32[($8_1 + 112 | 0) >> 2] = $244_1; - $748(86932 | 0, $8_1 + 112 | 0 | 0) | 0; - $748(65673 | 0, 0 | 0) | 0; + $749(87512 | 0, $8_1 + 112 | 0 | 0) | 0; + $749(65673 | 0, 0 | 0) | 0; HEAP32[($8_1 + 396 | 0) >> 2] = 0; label$24 : { label$25 : while (1) { @@ -30117,33 +30284,33 @@ function asmFunc(imports) { break label$24 } $343(HEAP32[((HEAP32[((HEAP32[($8_1 + 740 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + ((HEAP32[($8_1 + 396 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0); - $748(85338 | 0, 0 | 0) | 0; + $749(85895 | 0, 0 | 0) | 0; HEAP32[($8_1 + 396 | 0) >> 2] = (HEAP32[($8_1 + 396 | 0) >> 2] | 0) + 1 | 0; continue label$25; }; } - $748(85340 | 0, 0 | 0) | 0; + $749(85897 | 0, 0 | 0) | 0; $343(HEAP32[(HEAP32[($8_1 + 740 | 0) >> 2] | 0) >> 2] | 0 | 0); - $748(65624 | 0, 0 | 0) | 0; + $749(65624 | 0, 0 | 0) | 0; } - $748(101054 | 0, 0 | 0) | 0; + $749(101634 | 0, 0 | 0) | 0; label$26 : { label$27 : { if (!((HEAP32[((HEAP32[($8_1 + 740 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$27 } - $724($8_1 + 192 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($8_1 + 192 | 0 | 0, 0 | 0, 200 | 0) | 0; label$28 : { label$29 : { if (!(($240($8_1 + 400 | 0 | 0) | 0) & 1 | 0)) { break label$29 } HEAP32[($8_1 + 64 | 0) >> 2] = HEAP32[($8_1 + 736 | 0) >> 2] | 0; - $756($8_1 + 192 | 0 | 0, 200 | 0, 68053 | 0, $8_1 + 64 | 0 | 0) | 0; + $757($8_1 + 192 | 0 | 0, 200 | 0, 68126 | 0, $8_1 + 64 | 0 | 0) | 0; break label$28; } HEAP32[($8_1 + 80 | 0) >> 2] = HEAP32[($8_1 + 736 | 0) >> 2] | 0; - $756($8_1 + 192 | 0 | 0, 200 | 0, 67974 | 0, $8_1 + 80 | 0 | 0) | 0; + $757($8_1 + 192 | 0 | 0, 200 | 0, 68047 | 0, $8_1 + 80 | 0 | 0) | 0; } $342((HEAP32[($8_1 + 748 | 0) >> 2] | 0) + 1 | 0 | 0, $8_1 + 400 | 0 | 0, HEAP32[((HEAP32[($8_1 + 740 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $8_1 + 192 | 0 | 0, (HEAPU8[($8_1 + 735 | 0) >> 0] | 0) & 1 | 0 | 0, (HEAPU8[($8_1 + 734 | 0) >> 0] | 0) & 1 | 0 | 0); break label$26; @@ -30156,7 +30323,7 @@ function asmFunc(imports) { $334_1 = HEAP32[($8_1 + 748 | 0) >> 2] | 0; HEAP32[($8_1 + 180 | 0) >> 2] = 32; HEAP32[($8_1 + 176 | 0) >> 2] = $334_1; - $748(74039 | 0, $8_1 + 176 | 0 | 0) | 0; + $749(74097 | 0, $8_1 + 176 | 0 | 0) | 0; label$30 : { if (!((HEAP32[($8_1 + 740 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$30 @@ -30167,15 +30334,15 @@ function asmFunc(imports) { break label$32 } HEAP32[($8_1 + 144 | 0) >> 2] = HEAP32[($8_1 + 736 | 0) >> 2] | 0; - $748(86935 | 0, $8_1 + 144 | 0 | 0) | 0; + $749(87515 | 0, $8_1 + 144 | 0 | 0) | 0; $343(HEAP32[(HEAP32[($8_1 + 740 | 0) >> 2] | 0) >> 2] | 0 | 0); break label$31; } $355_1 = HEAP32[($8_1 + 740 | 0) >> 2] | 0; HEAP32[($8_1 + 164 | 0) >> 2] = HEAP32[($8_1 + 736 | 0) >> 2] | 0; HEAP32[($8_1 + 160 | 0) >> 2] = $355_1; - $748(86932 | 0, $8_1 + 160 | 0 | 0) | 0; - $748(65673 | 0, 0 | 0) | 0; + $749(87512 | 0, $8_1 + 160 | 0 | 0) | 0; + $749(65673 | 0, 0 | 0) | 0; HEAP32[($8_1 + 188 | 0) >> 2] = 0; label$33 : { label$34 : while (1) { @@ -30183,15 +30350,15 @@ function asmFunc(imports) { break label$33 } $343(HEAP32[((HEAP32[((HEAP32[($8_1 + 740 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + ((HEAP32[($8_1 + 188 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0 | 0); - $748(85338 | 0, 0 | 0) | 0; + $749(85895 | 0, 0 | 0) | 0; HEAP32[($8_1 + 188 | 0) >> 2] = (HEAP32[($8_1 + 188 | 0) >> 2] | 0) + 1 | 0; continue label$34; }; } $343(HEAP32[(HEAP32[($8_1 + 740 | 0) >> 2] | 0) >> 2] | 0 | 0); - $748(65624 | 0, 0 | 0) | 0; + $749(65624 | 0, 0 | 0) | 0; } - $748(101054 | 0, 0 | 0) | 0; + $749(101634 | 0, 0 | 0) | 0; } } } @@ -30207,7 +30374,7 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; HEAP8[($3_1 + 11 | 0) >> 0] = 1; - $748(86717 | 0, 0 | 0) | 0; + $749(87274 | 0, 0 | 0) | 0; label$1 : { if (!((HEAP32[($3_1 + 12 | 0) >> 2] | 0) & 1 | 0)) { break label$1 @@ -30220,9 +30387,9 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$2; } - $748(86821 | 0, 0 | 0) | 0; + $749(87378 | 0, 0 | 0) | 0; } - $748(73181 | 0, 0 | 0) | 0; + $749(73239 | 0, 0 | 0) | 0; } label$4 : { label$5 : { @@ -30240,9 +30407,9 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$6; } - $748(86821 | 0, 0 | 0) | 0; + $749(87378 | 0, 0 | 0) | 0; } - $748(70885 | 0, 0 | 0) | 0; + $749(70958 | 0, 0 | 0) | 0; break label$4; } label$8 : { @@ -30258,9 +30425,9 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$10; } - $748(86821 | 0, 0 | 0) | 0; + $749(87378 | 0, 0 | 0) | 0; } - $748(70876 | 0, 0 | 0) | 0; + $749(70949 | 0, 0 | 0) | 0; break label$8; } label$12 : { @@ -30275,9 +30442,9 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$13; } - $748(86821 | 0, 0 | 0) | 0; + $749(87378 | 0, 0 | 0) | 0; } - $748(70891 | 0, 0 | 0) | 0; + $749(70964 | 0, 0 | 0) | 0; } } } @@ -30297,9 +30464,9 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$17; } - $748(86821 | 0, 0 | 0) | 0; + $749(87378 | 0, 0 | 0) | 0; } - $748(65764 | 0, 0 | 0) | 0; + $749(65764 | 0, 0 | 0) | 0; break label$15; } label$19 : { @@ -30315,9 +30482,9 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$21; } - $748(86821 | 0, 0 | 0) | 0; + $749(87378 | 0, 0 | 0) | 0; } - $748(69709 | 0, 0 | 0) | 0; + $749(69782 | 0, 0 | 0) | 0; break label$19; } label$23 : { @@ -30332,9 +30499,9 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$24; } - $748(86821 | 0, 0 | 0) | 0; + $749(87378 | 0, 0 | 0) | 0; } - $748(69671 | 0, 0 | 0) | 0; + $749(69744 | 0, 0 | 0) | 0; } } } @@ -30350,11 +30517,11 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$27; } - $748(86821 | 0, 0 | 0) | 0; + $749(87378 | 0, 0 | 0) | 0; } - $748(73321 | 0, 0 | 0) | 0; + $749(73379 | 0, 0 | 0) | 0; } - $748(86717 | 0, 0 | 0) | 0; + $749(87274 | 0, 0 | 0) | 0; global$0 = $3_1 + 16 | 0; return; } @@ -30374,10 +30541,10 @@ function asmFunc(imports) { if (!((HEAP32[($5_1 + 104 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } - $748(67032 | 0, 0 | 0) | 0; + $749(67066 | 0, 0 | 0) | 0; break label$1; } - $724($5_1 | 0, 0 | 0, 100 | 0) | 0; + $725($5_1 | 0, 0 | 0, 100 | 0) | 0; $345(HEAP32[($5_1 + 108 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 104 | 0) >> 2] | 0 | 0, $5_1 | 0, 100 | 0); $342(0 | 0, HEAP32[($5_1 + 108 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 104 | 0) >> 2] | 0 | 0, $5_1 | 0, ($228(HEAP32[($5_1 + 108 | 0) >> 2] | 0 | 0) | 0) & 1 | 0 | 0, (HEAPU8[($5_1 + 103 | 0) >> 0] | 0) & 1 | 0 | 0); } @@ -30414,7 +30581,7 @@ function asmFunc(imports) { $32_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 24 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$3; } - $32_1 = 78016; + $32_1 = 78573; } HEAP32[($6_1 + 12 | 0) >> 2] = $32_1; HEAP32[($6_1 + 8 | 0) >> 2] = (HEAP32[((HEAP32[($6_1 + 24 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 36 | 0; @@ -30454,7 +30621,7 @@ function asmFunc(imports) { $23_1 = HEAP32[($8_1 + 460 | 0) >> 2] | 0; $24_1 = HEAP32[($8_1 + 456 | 0) >> 2] | 0; HEAP32[$8_1 >> 2] = HEAP32[($8_1 + 464 | 0) >> 2] | 0; - $756($23_1 | 0, $24_1 | 0, 68053 | 0, $8_1 | 0) | 0; + $757($23_1 | 0, $24_1 | 0, 68126 | 0, $8_1 | 0) | 0; break label$1; } label$4 : { @@ -30494,10 +30661,10 @@ function asmFunc(imports) { $95_1 = HEAP32[((HEAP32[((HEAP32[(HEAP32[($8_1 + 440 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$11; } - $95_1 = 101055; + $95_1 = 101635; } HEAP32[($8_1 + 436 | 0) >> 2] = $95_1; - $724($8_1 + 224 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($8_1 + 224 | 0 | 0, 0 | 0, 200 | 0) | 0; label$13 : { label$14 : { if (!(($228(HEAP32[($8_1 + 476 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { @@ -30506,13 +30673,13 @@ function asmFunc(imports) { $109_1 = HEAP32[($8_1 + 464 | 0) >> 2] | 0; HEAP32[($8_1 + 20 | 0) >> 2] = HEAP32[($8_1 + 436 | 0) >> 2] | 0; HEAP32[($8_1 + 16 | 0) >> 2] = $109_1; - $756($8_1 + 224 | 0 | 0, 200 | 0, 67955 | 0, $8_1 + 16 | 0 | 0) | 0; + $757($8_1 + 224 | 0 | 0, 200 | 0, 68028 | 0, $8_1 + 16 | 0 | 0) | 0; break label$13; } $118_1 = HEAP32[($8_1 + 464 | 0) >> 2] | 0; HEAP32[($8_1 + 36 | 0) >> 2] = HEAP32[($8_1 + 436 | 0) >> 2] | 0; HEAP32[($8_1 + 32 | 0) >> 2] = $118_1; - $756($8_1 + 224 | 0 | 0, 200 | 0, 67968 | 0, $8_1 + 32 | 0 | 0) | 0; + $757($8_1 + 224 | 0 | 0, 200 | 0, 68041 | 0, $8_1 + 32 | 0 | 0) | 0; } $346((HEAP32[(HEAP32[($8_1 + 440 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0, (HEAP32[((HEAP32[($8_1 + 472 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + Math_imul(HEAP32[($8_1 + 444 | 0) >> 2] | 0, 36) | 0 | 0, HEAP32[($8_1 + 468 | 0) >> 2] | 0 | 0, $8_1 + 224 | 0 | 0, HEAP32[($8_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 456 | 0) >> 2] | 0 | 0); HEAP32[($8_1 + 444 | 0) >> 2] = (HEAP32[($8_1 + 444 | 0) >> 2] | 0) + 1 | 0; @@ -30532,9 +30699,9 @@ function asmFunc(imports) { if (!(($228(HEAP32[($8_1 + 476 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$15 } - $724($8_1 + 112 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($8_1 + 112 | 0 | 0, 0 | 0, 100 | 0) | 0; HEAP32[($8_1 + 48 | 0) >> 2] = HEAP32[($8_1 + 464 | 0) >> 2] | 0; - $756($8_1 + 112 | 0 | 0, 100 | 0, 68053 | 0, $8_1 + 48 | 0 | 0) | 0; + $757($8_1 + 112 | 0 | 0, 100 | 0, 68126 | 0, $8_1 + 48 | 0 | 0) | 0; $229($8_1 + 56 | 0 | 0, HEAP32[($8_1 + 476 | 0) >> 2] | 0 | 0); label$16 : { if (!(($262($8_1 + 56 | 0 | 0) | 0) & 1 | 0)) { @@ -30643,7 +30810,7 @@ function asmFunc(imports) { if (!(HEAP32[((HEAP32[($8_1 + 580 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0)) { break label$16 } - fimport$0(84755 | 0, 74032 | 0, 20309 | 0, 72145 | 0); + fimport$0(85312 | 0, 74090 | 0, 20381 | 0, 72218 | 0); wasm2js_trap(); } HEAP32[(HEAP32[($8_1 + 580 | 0) >> 2] | 0) >> 2] = HEAP32[(HEAP32[($8_1 + 572 | 0) >> 2] | 0) >> 2] | 0; @@ -30678,24 +30845,24 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($8_1 + 572 | 0) >> 2] | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { break label$24 } - $724($8_1 + 448 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($8_1 + 448 | 0 | 0, 0 | 0, 100 | 0) | 0; $345(HEAP32[($8_1 + 576 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 572 | 0) >> 2] | 0 | 0, $8_1 + 448 | 0 | 0, 100 | 0); $192_1 = HEAP32[($8_1 + 588 | 0) >> 2] | 0; $193_1 = HEAP32[($8_1 + 568 | 0) >> 2] | 0; HEAP32[($8_1 + 32 | 0) >> 2] = $8_1 + 448 | 0; - $156(72 | 0, $192_1 | 0, $193_1 | 0, 73119 | 0, $8_1 + 32 | 0 | 0); + $156(72 | 0, $192_1 | 0, $193_1 | 0, 73177 | 0, $8_1 + 32 | 0 | 0); break label$23; } label$25 : { if (!((HEAP32[(HEAP32[($8_1 + 572 | 0) >> 2] | 0) >> 2] | 0) & 1 | 0)) { break label$25 } - $724($8_1 + 336 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($8_1 + 336 | 0 | 0, 0 | 0, 100 | 0) | 0; $345(HEAP32[($8_1 + 576 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 572 | 0) >> 2] | 0 | 0, $8_1 + 336 | 0 | 0, 100 | 0); $215_1 = HEAP32[($8_1 + 588 | 0) >> 2] | 0; $216_1 = HEAP32[($8_1 + 568 | 0) >> 2] | 0; HEAP32[($8_1 + 48 | 0) >> 2] = $8_1 + 336 | 0; - $156(72 | 0, $215_1 | 0, $216_1 | 0, 73155 | 0, $8_1 + 48 | 0 | 0); + $156(72 | 0, $215_1 | 0, $216_1 | 0, 73213 | 0, $8_1 + 48 | 0 | 0); } } label$26 : { @@ -30710,24 +30877,24 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($8_1 + 572 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8 | 0) & 1 | 0)) { break label$28 } - $724($8_1 + 224 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($8_1 + 224 | 0 | 0, 0 | 0, 100 | 0) | 0; $345(HEAP32[($8_1 + 576 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 572 | 0) >> 2] | 0 | 0, $8_1 + 224 | 0 | 0, 100 | 0); $250_1 = HEAP32[($8_1 + 588 | 0) >> 2] | 0; $251_1 = HEAP32[($8_1 + 568 | 0) >> 2] | 0; HEAP32[$8_1 >> 2] = $8_1 + 224 | 0; - $156(72 | 0, $250_1 | 0, $251_1 | 0, 73292 | 0, $8_1 | 0); + $156(72 | 0, $250_1 | 0, $251_1 | 0, 73350 | 0, $8_1 | 0); break label$27; } label$29 : { if (!((HEAP32[(HEAP32[($8_1 + 572 | 0) >> 2] | 0) >> 2] | 0) & 8 | 0)) { break label$29 } - $724($8_1 + 112 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($8_1 + 112 | 0 | 0, 0 | 0, 100 | 0) | 0; $345(HEAP32[($8_1 + 576 | 0) >> 2] | 0 | 0, HEAP32[($8_1 + 572 | 0) >> 2] | 0 | 0, $8_1 + 112 | 0 | 0, 100 | 0); $271_1 = HEAP32[($8_1 + 588 | 0) >> 2] | 0; $272_1 = HEAP32[($8_1 + 568 | 0) >> 2] | 0; HEAP32[($8_1 + 16 | 0) >> 2] = $8_1 + 112 | 0; - $156(72 | 0, $271_1 | 0, $272_1 | 0, 73253 | 0, $8_1 + 16 | 0 | 0); + $156(72 | 0, $271_1 | 0, $272_1 | 0, 73311 | 0, $8_1 + 16 | 0 | 0); } } } @@ -30851,7 +31018,7 @@ function asmFunc(imports) { if (!(HEAP32[((HEAP32[($5_1 + 88 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0)) { break label$15 } - fimport$0(84755 | 0, 74032 | 0, 20535 | 0, 66908 | 0); + fimport$0(85312 | 0, 74090 | 0, 20607 | 0, 66964 | 0); wasm2js_trap(); } HEAP32[(HEAP32[($5_1 + 88 | 0) >> 2] | 0) >> 2] = HEAP32[($5_1 + 84 | 0) >> 2] | 0; @@ -30984,7 +31151,7 @@ function asmFunc(imports) { if (!(HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0)) { break label$15 } - fimport$0(84755 | 0, 74032 | 0, 20460 | 0, 72128 | 0); + fimport$0(85312 | 0, 74090 | 0, 20532 | 0, 72201 | 0); wasm2js_trap(); } HEAP32[(HEAP32[($5_1 + 24 | 0) >> 2] | 0) >> 2] = HEAP32[($5_1 + 20 | 0) >> 2] | 0; @@ -31336,21 +31503,21 @@ function asmFunc(imports) { $144_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 564 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$14; } - $144_1 = 78016; + $144_1 = 78573; } HEAP32[($6_1 + 480 | 0) >> 2] = $144_1; - $724($6_1 + 272 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($6_1 + 272 | 0 | 0, 0 | 0, 200 | 0) | 0; $345(HEAP32[($6_1 + 568 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 564 | 0) >> 2] | 0 | 0, $6_1 + 272 | 0 | 0, 200 | 0); $157_1 = HEAP32[($6_1 + 572 | 0) >> 2] | 0; $158_1 = HEAP32[($6_1 + 560 | 0) >> 2] | 0; $159_1 = HEAP32[($6_1 + 480 | 0) >> 2] | 0; HEAP32[($6_1 + 36 | 0) >> 2] = $6_1 + 272 | 0; HEAP32[($6_1 + 32 | 0) >> 2] = $159_1; - $156(72 | 0, $157_1 | 0, $158_1 | 0, 86203 | 0, $6_1 + 32 | 0 | 0); + $156(72 | 0, $157_1 | 0, $158_1 | 0, 86760 | 0, $6_1 + 32 | 0 | 0); $167_1 = HEAP32[($6_1 + 572 | 0) >> 2] | 0; $168_1 = HEAP32[($6_1 + 484 | 0) >> 2] | 0; HEAP32[($6_1 + 48 | 0) >> 2] = $6_1 + 272 | 0; - $239(0 | 0, $167_1 | 0, $168_1 | 0, 68853 | 0, $6_1 + 48 | 0 | 0); + $239(0 | 0, $167_1 | 0, $168_1 | 0, 68926 | 0, $6_1 + 48 | 0 | 0); } label$16 : { if (!((HEAP32[(HEAP32[($6_1 + 564 | 0) >> 2] | 0) >> 2] | 0) & 1 | 0)) { @@ -31375,21 +31542,21 @@ function asmFunc(imports) { $210_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 564 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$19; } - $210_1 = 78016; + $210_1 = 78573; } HEAP32[($6_1 + 264 | 0) >> 2] = $210_1; - $724($6_1 + 64 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($6_1 + 64 | 0 | 0, 0 | 0, 200 | 0) | 0; $345(HEAP32[($6_1 + 568 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 564 | 0) >> 2] | 0 | 0, $6_1 + 64 | 0 | 0, 200 | 0); $223_1 = HEAP32[($6_1 + 572 | 0) >> 2] | 0; $224_1 = HEAP32[($6_1 + 560 | 0) >> 2] | 0; $225_1 = HEAP32[($6_1 + 264 | 0) >> 2] | 0; HEAP32[($6_1 + 4 | 0) >> 2] = $6_1 + 64 | 0; HEAP32[$6_1 >> 2] = $225_1; - $156(72 | 0, $223_1 | 0, $224_1 | 0, 86137 | 0, $6_1 | 0); + $156(72 | 0, $223_1 | 0, $224_1 | 0, 86694 | 0, $6_1 | 0); $231_1 = HEAP32[($6_1 + 572 | 0) >> 2] | 0; $232_1 = HEAP32[($6_1 + 268 | 0) >> 2] | 0; HEAP32[($6_1 + 16 | 0) >> 2] = $6_1 + 64 | 0; - $239(0 | 0, $231_1 | 0, $232_1 | 0, 68853 | 0, $6_1 + 16 | 0 | 0); + $239(0 | 0, $231_1 | 0, $232_1 | 0, 68926 | 0, $6_1 + 16 | 0 | 0); } } global$0 = $6_1 + 576 | 0; @@ -31488,23 +31655,23 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($7_1 + 532 | 0) >> 2] | 0) >> 2] | 0) & 8 | 0)) { break label$13 } - $724($7_1 + 240 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($7_1 + 240 | 0 | 0, 0 | 0, 200 | 0) | 0; $345(HEAP32[($7_1 + 536 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 532 | 0) >> 2] | 0 | 0, $7_1 + 240 | 0 | 0, 200 | 0); $145_1 = HEAP32[($7_1 + 540 | 0) >> 2] | 0; $146_1 = HEAP32[($7_1 + 528 | 0) >> 2] | 0; HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 240 | 0; - $156(72 | 0, $145_1 | 0, $146_1 | 0, 73231 | 0, $7_1 + 16 | 0 | 0); + $156(72 | 0, $145_1 | 0, $146_1 | 0, 73289 | 0, $7_1 + 16 | 0 | 0); } label$14 : { if (!((HEAP32[(HEAP32[($7_1 + 532 | 0) >> 2] | 0) >> 2] | 0) & 1 | 0)) { break label$14 } - $724($7_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($7_1 + 32 | 0 | 0, 0 | 0, 200 | 0) | 0; $345(HEAP32[($7_1 + 536 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 532 | 0) >> 2] | 0 | 0, $7_1 + 32 | 0 | 0, 200 | 0); $168_1 = HEAP32[($7_1 + 540 | 0) >> 2] | 0; $169_1 = HEAP32[($7_1 + 528 | 0) >> 2] | 0; HEAP32[$7_1 >> 2] = $7_1 + 32 | 0; - $156(72 | 0, $168_1 | 0, $169_1 | 0, 86177 | 0, $7_1 | 0); + $156(72 | 0, $168_1 | 0, $169_1 | 0, 86734 | 0, $7_1 | 0); } } global$0 = $7_1 + 544 | 0; @@ -31580,7 +31747,7 @@ function asmFunc(imports) { $76_1 = HEAP32[($8_1 + 652 | 0) >> 2] | 0; $77_1 = HEAP32[($8_1 + 620 | 0) >> 2] | 0; HEAP32[($8_1 + 16 | 0) >> 2] = HEAP32[($8_1 + 636 | 0) >> 2] | 0; - $156(72 | 0, $76_1 | 0, $77_1 | 0, 73195 | 0, $8_1 + 16 | 0 | 0); + $156(72 | 0, $76_1 | 0, $77_1 | 0, 73253 | 0, $8_1 + 16 | 0 | 0); label$11 : { if (!((HEAP32[((HEAP32[($8_1 + 644 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$11 @@ -31588,7 +31755,7 @@ function asmFunc(imports) { $91_1 = HEAP32[($8_1 + 652 | 0) >> 2] | 0; $92_1 = HEAP32[($8_1 + 640 | 0) >> 2] | 0; HEAP32[$8_1 >> 2] = HEAP32[($8_1 + 636 | 0) >> 2] | 0; - $239(0 | 0, $91_1 | 0, $92_1 | 0, 72485 | 0, $8_1 | 0); + $239(0 | 0, $91_1 | 0, $92_1 | 0, 72558 | 0, $8_1 | 0); } break label$7; } @@ -31620,10 +31787,10 @@ function asmFunc(imports) { $143_1 = HEAP32[((HEAP32[((HEAP32[(HEAP32[($8_1 + 612 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$18; } - $143_1 = 78016; + $143_1 = 78573; } HEAP32[($8_1 + 608 | 0) >> 2] = $143_1; - $724($8_1 + 400 | 0 | 0, 0 | 0, 200 | 0) | 0; + $725($8_1 + 400 | 0 | 0, 0 | 0, 200 | 0) | 0; label$20 : { label$21 : { if (!(($228(HEAP32[($8_1 + 648 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { @@ -31632,13 +31799,13 @@ function asmFunc(imports) { $157_1 = HEAP32[($8_1 + 636 | 0) >> 2] | 0; HEAP32[($8_1 + 36 | 0) >> 2] = HEAP32[($8_1 + 608 | 0) >> 2] | 0; HEAP32[($8_1 + 32 | 0) >> 2] = $157_1; - $756($8_1 + 400 | 0 | 0, 200 | 0, 67955 | 0, $8_1 + 32 | 0 | 0) | 0; + $757($8_1 + 400 | 0 | 0, 200 | 0, 68028 | 0, $8_1 + 32 | 0 | 0) | 0; break label$20; } $166_1 = HEAP32[($8_1 + 636 | 0) >> 2] | 0; HEAP32[($8_1 + 52 | 0) >> 2] = HEAP32[($8_1 + 608 | 0) >> 2] | 0; HEAP32[($8_1 + 48 | 0) >> 2] = $166_1; - $756($8_1 + 400 | 0 | 0, 200 | 0, 67968 | 0, $8_1 + 48 | 0 | 0) | 0; + $757($8_1 + 400 | 0 | 0, 200 | 0, 68041 | 0, $8_1 + 48 | 0 | 0) | 0; } $354(HEAP32[($8_1 + 652 | 0) >> 2] | 0 | 0, (HEAP32[(HEAP32[($8_1 + 612 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0, (HEAP32[((HEAP32[($8_1 + 644 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + Math_imul(HEAP32[($8_1 + 616 | 0) >> 2] | 0, 36) | 0 | 0, HEAP32[($8_1 + 640 | 0) >> 2] | 0 | 0, $8_1 + 400 | 0 | 0, (HEAPU8[($8_1 + 635 | 0) >> 0] | 0) & 1 | 0 | 0); HEAP32[($8_1 + 616 | 0) >> 2] = (HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 1 | 0; @@ -31672,7 +31839,7 @@ function asmFunc(imports) { if (((HEAPU8[(HEAP32[($8_1 + 396 | 0) >> 2] | 0) >> 0] | 0) << $217_1 | 0) >> $217_1 | 0) { break label$24 } - HEAP32[($8_1 + 396 | 0) >> 2] = 78016; + HEAP32[($8_1 + 396 | 0) >> 2] = 78573; } HEAP8[($8_1 + 391 | 0) >> 0] = 0; label$25 : { @@ -31709,9 +31876,9 @@ function asmFunc(imports) { if (!((HEAPU8[($8_1 + 391 | 0) >> 0] | 0) & 1 | 0)) { break label$31 } - $724($8_1 + 288 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($8_1 + 288 | 0 | 0, 0 | 0, 100 | 0) | 0; HEAP32[($8_1 + 160 | 0) >> 2] = HEAP32[($8_1 + 636 | 0) >> 2] | 0; - $756($8_1 + 288 | 0 | 0, 100 | 0, 68053 | 0, $8_1 + 160 | 0 | 0) | 0; + $757($8_1 + 288 | 0 | 0, 100 | 0, 68126 | 0, $8_1 + 160 | 0 | 0) | 0; $229($8_1 + 232 | 0 | 0, HEAP32[($8_1 + 648 | 0) >> 2] | 0 | 0); label$32 : { if (!(($262($8_1 + 232 | 0 | 0) | 0) & 1 | 0)) { @@ -31753,13 +31920,13 @@ function asmFunc(imports) { $336_1 = HEAP32[($8_1 + 652 | 0) >> 2] | 0; $337_1 = HEAP32[($8_1 + 640 | 0) >> 2] | 0; HEAP32[($8_1 + 64 | 0) >> 2] = HEAP32[($8_1 + 396 | 0) >> 2] | 0; - $156(72 | 0, $336_1 | 0, $337_1 | 0, 84933 | 0, $8_1 + 64 | 0 | 0); + $156(72 | 0, $336_1 | 0, $337_1 | 0, 85490 | 0, $8_1 + 64 | 0 | 0); break label$39; } $343_1 = HEAP32[($8_1 + 652 | 0) >> 2] | 0; $344_1 = HEAP32[($8_1 + 392 | 0) >> 2] | 0; HEAP32[($8_1 + 96 | 0) >> 2] = HEAP32[($8_1 + 396 | 0) >> 2] | 0; - $156(72 | 0, $343_1 | 0, $344_1 | 0, 85236 | 0, $8_1 + 96 | 0 | 0); + $156(72 | 0, $343_1 | 0, $344_1 | 0, 85793 | 0, $8_1 + 96 | 0 | 0); label$41 : { if (!((HEAP32[((HEAP32[($8_1 + 644 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$41 @@ -31767,7 +31934,7 @@ function asmFunc(imports) { $358_1 = HEAP32[($8_1 + 652 | 0) >> 2] | 0; $359_1 = HEAP32[($8_1 + 640 | 0) >> 2] | 0; HEAP32[($8_1 + 80 | 0) >> 2] = HEAP32[($8_1 + 396 | 0) >> 2] | 0; - $239(0 | 0, $358_1 | 0, $359_1 | 0, 72485 | 0, $8_1 + 80 | 0 | 0); + $239(0 | 0, $358_1 | 0, $359_1 | 0, 72558 | 0, $8_1 + 80 | 0 | 0); } } } @@ -31781,13 +31948,13 @@ function asmFunc(imports) { $368_1 = HEAP32[($8_1 + 652 | 0) >> 2] | 0; $369_1 = HEAP32[($8_1 + 640 | 0) >> 2] | 0; HEAP32[($8_1 + 112 | 0) >> 2] = HEAP32[($8_1 + 396 | 0) >> 2] | 0; - $156(72 | 0, $368_1 | 0, $369_1 | 0, 84869 | 0, $8_1 + 112 | 0 | 0); + $156(72 | 0, $368_1 | 0, $369_1 | 0, 85426 | 0, $8_1 + 112 | 0 | 0); break label$42; } $375_1 = HEAP32[($8_1 + 652 | 0) >> 2] | 0; $376_1 = HEAP32[($8_1 + 392 | 0) >> 2] | 0; HEAP32[($8_1 + 144 | 0) >> 2] = HEAP32[($8_1 + 396 | 0) >> 2] | 0; - $156(72 | 0, $375_1 | 0, $376_1 | 0, 85209 | 0, $8_1 + 144 | 0 | 0); + $156(72 | 0, $375_1 | 0, $376_1 | 0, 85766 | 0, $8_1 + 144 | 0 | 0); label$44 : { if (!((HEAP32[((HEAP32[($8_1 + 644 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$44 @@ -31795,7 +31962,7 @@ function asmFunc(imports) { $390_1 = HEAP32[($8_1 + 652 | 0) >> 2] | 0; $391_1 = HEAP32[($8_1 + 640 | 0) >> 2] | 0; HEAP32[($8_1 + 128 | 0) >> 2] = HEAP32[($8_1 + 396 | 0) >> 2] | 0; - $239(0 | 0, $390_1 | 0, $391_1 | 0, 72485 | 0, $8_1 + 128 | 0 | 0); + $239(0 | 0, $390_1 | 0, $391_1 | 0, 72558 | 0, $8_1 + 128 | 0 | 0); } } } @@ -31837,7 +32004,7 @@ function asmFunc(imports) { if (($315(HEAP32[($10_1 + 300 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$2 } - $724($10_1 + 176 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($10_1 + 176 | 0 | 0, 0 | 0, 100 | 0) | 0; $345(HEAP32[($10_1 + 300 | 0) >> 2] | 0 | 0, HEAP32[($10_1 + 304 | 0) >> 2] | 0 | 0, $10_1 + 176 | 0 | 0, 100 | 0); $354(HEAP32[($10_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[($10_1 + 300 | 0) >> 2] | 0 | 0, HEAP32[($10_1 + 304 | 0) >> 2] | 0 | 0, HEAP32[($10_1 + 296 | 0) >> 2] | 0 | 0, $10_1 + 176 | 0 | 0, 1 & 1 | 0 | 0); } @@ -31876,7 +32043,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($10_1 + 308 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) & 8192 | 0)) { break label$8 } - $156(72 | 0, HEAP32[($10_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[($10_1 + 296 | 0) >> 2] | 0 | 0, 85277 | 0, 0 | 0); + $156(72 | 0, HEAP32[($10_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[($10_1 + 296 | 0) >> 2] | 0 | 0, 85834 | 0, 0 | 0); } label$9 : { label$10 : { @@ -31907,7 +32074,7 @@ function asmFunc(imports) { $132_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($10_1 + 312 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$14; } - $132_1 = 78016; + $132_1 = 78573; } HEAP32[($10_1 + 116 | 0) >> 2] = $132_1; $354(HEAP32[($10_1 + 316 | 0) >> 2] | 0 | 0, $10_1 + 120 | 0 | 0, HEAP32[((HEAP32[($10_1 + 312 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($10_1 + 296 | 0) >> 2] | 0 | 0, HEAP32[($10_1 + 116 | 0) >> 2] | 0 | 0, 1 & 1 | 0 | 0); @@ -31995,7 +32162,7 @@ function asmFunc(imports) { break label$1 } $357(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -32012,7 +32179,7 @@ function asmFunc(imports) { break label$1 } $358(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -32030,7 +32197,7 @@ function asmFunc(imports) { } $503(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $504(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -32055,10 +32222,10 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; label$1 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $729(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0) | 0; + $730(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0 | 0) | 0; } global$0 = $3_1 + 16 | 0; return; @@ -32098,10 +32265,10 @@ function asmFunc(imports) { HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; $14_1 = 0; label$1 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $14_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); + $14_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); } return $14_1 & 1 | 0 | 0; } @@ -32112,7 +32279,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $8_1 = ($361(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; + $8_1 = ($361(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; global$0 = $3_1 + 16 | 0; return $8_1 | 0; } @@ -32141,7 +32308,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $8_1 = ($364(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; + $8_1 = ($364(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; global$0 = $3_1 + 16 | 0; return $8_1 | 0; } @@ -32153,13 +32320,13 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; break label$1; } - HEAP8[($3_1 + 15 | 0) >> 0] = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9042 | 0) & 1 | 0; + HEAP8[($3_1 + 15 | 0) >> 0] = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9042 | 0) & 1 | 0; } return (HEAPU8[($3_1 + 15 | 0) >> 0] | 0) & 1 | 0 | 0; } @@ -32172,14 +32339,14 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; break label$1; } label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9044 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9044 | 0) & 1 | 0)) { break label$3 } HEAP32[($3_1 + 4 | 0) >> 2] = $223(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; @@ -32243,7 +32410,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -32251,30 +32418,30 @@ function asmFunc(imports) { } $25_1 = 1; label$3 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9034 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9034 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9002 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9002 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9013 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9013 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9031 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9031 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9056 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9056 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8999 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8999 | 0) & 1 | 0) { break label$3 } - $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9025 | 0); + $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9025 | 0); } HEAP8[($3_1 + 15 | 0) >> 0] = $25_1 & 1 | 0; } @@ -32302,7 +32469,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $8_1 = ($370(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; + $8_1 = ($370(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) | 0) & 1 | 0; global$0 = $3_1 + 16 | 0; return $8_1 | 0; } @@ -32316,7 +32483,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 24 | 0) >> 2] = $0_1; HEAP32[($4_1 + 20 | 0) >> 2] = $1_1; HEAP32[($4_1 + 16 | 0) >> 2] = 0; - HEAP32[($4_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 24 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0; label$1 : { label$2 : { label$3 : while (1) { @@ -32493,7 +32660,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -32501,22 +32668,22 @@ function asmFunc(imports) { } $25_1 = 1; label$3 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9016 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9016 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9005 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9005 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9e3 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9e3 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9027 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9027 | 0) & 1 | 0) { break label$3 } - $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9036 | 0); + $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9036 | 0); } HEAP8[($3_1 + 15 | 0) >> 0] = $25_1 & 1 | 0; } @@ -32530,7 +32697,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -32538,10 +32705,10 @@ function asmFunc(imports) { } $25_1 = 1; label$3 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0) { break label$3 } - $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9033 | 0); + $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9033 | 0); } HEAP8[($3_1 + 15 | 0) >> 0] = $25_1 & 1 | 0; } @@ -32555,7 +32722,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -32563,14 +32730,14 @@ function asmFunc(imports) { } $25_1 = 1; label$3 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9041 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9041 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9008 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9008 | 0) & 1 | 0) { break label$3 } - $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0); + $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0); } HEAP8[($3_1 + 15 | 0) >> 0] = $25_1 & 1 | 0; } @@ -32585,14 +32752,14 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; break label$1; } label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$3 } HEAP32[($3_1 + 4 | 0) >> 2] = $223(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; @@ -32607,14 +32774,14 @@ function asmFunc(imports) { break label$1; } label$5 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9001 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9001 | 0) & 1 | 0)) { break label$5 } HEAP8[($3_1 + 15 | 0) >> 0] = 1 & 1 | 0; break label$1; } label$6 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9007 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9007 | 0) & 1 | 0)) { break label$6 } HEAP8[($3_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -32655,7 +32822,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -32663,18 +32830,18 @@ function asmFunc(imports) { } $25_1 = 1; label$3 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9054 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9054 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9068 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9068 | 0) & 1 | 0) { break label$3 } $25_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9069 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9069 | 0) & 1 | 0) { break label$3 } - $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9070 | 0); + $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9070 | 0); } HEAP8[($3_1 + 15 | 0) >> 0] = $25_1 & 1 | 0; } @@ -32689,14 +32856,14 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; break label$1; } label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (91 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (91 | 0) & 1 | 0)) { break label$3 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -32735,7 +32902,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -32743,10 +32910,10 @@ function asmFunc(imports) { } $25_1 = 1; label$3 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0) { break label$3 } - $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (46 | 0); + $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (46 | 0); } HEAP8[($3_1 + 15 | 0) >> 0] = $25_1 & 1 | 0; } @@ -32767,7 +32934,7 @@ function asmFunc(imports) { case 2: label$20 : { label$21 : { - if ($760(71395 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71468 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$21 } HEAP32[($3_1 + 8 | 0) >> 2] = 9043; @@ -32775,7 +32942,7 @@ function asmFunc(imports) { } label$22 : { label$23 : { - if ($760(69645 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69718 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$23 } HEAP32[($3_1 + 8 | 0) >> 2] = 8999; @@ -32783,7 +32950,7 @@ function asmFunc(imports) { } label$24 : { label$25 : { - if ($760(67933 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68006 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$25 } HEAP32[($3_1 + 8 | 0) >> 2] = 9042; @@ -32791,14 +32958,14 @@ function asmFunc(imports) { } label$26 : { label$27 : { - if ($760(71395 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71468 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$27 } HEAP32[($3_1 + 8 | 0) >> 2] = 9042; break label$26; } label$28 : { - if ($760(66253 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66253 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$28 } HEAP32[($3_1 + 8 | 0) >> 2] = 9055; @@ -32811,14 +32978,14 @@ function asmFunc(imports) { case 3: label$29 : { label$30 : { - if ($760(71131 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71204 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$30 } HEAP32[($3_1 + 8 | 0) >> 2] = 9e3; break label$29; } label$31 : { - if ($760(70857 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(70930 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$31 } HEAP32[($3_1 + 8 | 0) >> 2] = 9046; @@ -32828,7 +32995,7 @@ function asmFunc(imports) { case 4: label$32 : { label$33 : { - if ($760(72219 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72292 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$33 } HEAP32[($3_1 + 8 | 0) >> 2] = 9001; @@ -32836,7 +33003,7 @@ function asmFunc(imports) { } label$34 : { label$35 : { - if ($760(69585 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69658 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$35 } HEAP32[($3_1 + 8 | 0) >> 2] = 9003; @@ -32844,7 +33011,7 @@ function asmFunc(imports) { } label$36 : { label$37 : { - if ($760(66069 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66069 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$37 } HEAP32[($3_1 + 8 | 0) >> 2] = 9004; @@ -32852,7 +33019,7 @@ function asmFunc(imports) { } label$38 : { label$39 : { - if ($760(68094 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68167 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$39 } HEAP32[($3_1 + 8 | 0) >> 2] = 9002; @@ -32860,14 +33027,14 @@ function asmFunc(imports) { } label$40 : { label$41 : { - if ($760(71512 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71585 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$41 } HEAP32[($3_1 + 8 | 0) >> 2] = 9005; break label$40; } label$42 : { - if ($760(71165 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71238 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$42 } HEAP32[($3_1 + 8 | 0) >> 2] = 9006; @@ -32881,7 +33048,7 @@ function asmFunc(imports) { case 5: label$43 : { label$44 : { - if ($760(66724 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66780 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$44 } HEAP32[($3_1 + 8 | 0) >> 2] = 9007; @@ -32889,7 +33056,7 @@ function asmFunc(imports) { } label$45 : { label$46 : { - if ($760(69736 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69809 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$46 } HEAP32[($3_1 + 8 | 0) >> 2] = 9008; @@ -32897,14 +33064,14 @@ function asmFunc(imports) { } label$47 : { label$48 : { - if ($760(69457 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69530 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$48 } HEAP32[($3_1 + 8 | 0) >> 2] = 9009; break label$47; } label$49 : { - if ($760(72725 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72783 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$49 } HEAP32[($3_1 + 8 | 0) >> 2] = 9010; @@ -32916,7 +33083,7 @@ function asmFunc(imports) { case 6: label$50 : { label$51 : { - if ($760(72208 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72281 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$51 } HEAP32[($3_1 + 8 | 0) >> 2] = 9011; @@ -32924,14 +33091,14 @@ function asmFunc(imports) { } label$52 : { label$53 : { - if ($760(70736 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(70809 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$53 } HEAP32[($3_1 + 8 | 0) >> 2] = 9012; break label$52; } label$54 : { - if ($760(69761 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69834 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$54 } HEAP32[($3_1 + 8 | 0) >> 2] = 9013; @@ -32942,7 +33109,7 @@ function asmFunc(imports) { case 7: label$55 : { label$56 : { - if ($760(67079 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(67139 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$56 } HEAP32[($3_1 + 8 | 0) >> 2] = 9014; @@ -32950,14 +33117,14 @@ function asmFunc(imports) { } label$57 : { label$58 : { - if ($760(68426 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68499 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$58 } HEAP32[($3_1 + 8 | 0) >> 2] = 9015; break label$57; } label$59 : { - if ($760(72213 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72286 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$59 } HEAP32[($3_1 + 8 | 0) >> 2] = 9059; @@ -32967,7 +33134,7 @@ function asmFunc(imports) { break label$1; case 8: label$60 : { - if ($760(69650 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69723 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$60 } HEAP32[($3_1 + 8 | 0) >> 2] = 9016; @@ -32976,7 +33143,7 @@ function asmFunc(imports) { case 10: label$61 : { label$62 : { - if ($760(71454 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71527 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$62 } HEAP32[($3_1 + 8 | 0) >> 2] = 9017; @@ -32984,14 +33151,14 @@ function asmFunc(imports) { } label$63 : { label$64 : { - if ($760(72564 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72637 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$64 } HEAP32[($3_1 + 8 | 0) >> 2] = 9018; break label$63; } label$65 : { - if ($760(66301 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66301 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$65 } HEAP32[($3_1 + 8 | 0) >> 2] = 9019; @@ -33001,7 +33168,7 @@ function asmFunc(imports) { break label$1; case 15: label$66 : { - if ($760(68086 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68159 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$66 } HEAP32[($3_1 + 8 | 0) >> 2] = 9060; @@ -33009,7 +33176,7 @@ function asmFunc(imports) { break label$1; case 13: label$67 : { - if ($760(71284 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71357 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$67 } HEAP32[($3_1 + 8 | 0) >> 2] = 9020; @@ -33018,7 +33185,7 @@ function asmFunc(imports) { case 19: label$68 : { label$69 : { - if ($760(68450 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68523 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$69 } HEAP32[($3_1 + 8 | 0) >> 2] = 9025; @@ -33026,14 +33193,14 @@ function asmFunc(imports) { } label$70 : { label$71 : { - if ($760(66899 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66955 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$71 } HEAP32[($3_1 + 8 | 0) >> 2] = 9026; break label$70; } label$72 : { - if ($760(69754 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69827 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$72 } HEAP32[($3_1 + 8 | 0) >> 2] = 9027; @@ -33044,7 +33211,7 @@ function asmFunc(imports) { case 20: label$73 : { label$74 : { - if ($760(66225 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66225 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$74 } HEAP32[($3_1 + 8 | 0) >> 2] = 9028; @@ -33052,7 +33219,7 @@ function asmFunc(imports) { } label$75 : { label$76 : { - if ($760(73500 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(73558 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$76 } HEAP32[($3_1 + 8 | 0) >> 2] = 9029; @@ -33060,7 +33227,7 @@ function asmFunc(imports) { } label$77 : { label$78 : { - if ($760(71421 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71494 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$78 } HEAP32[($3_1 + 8 | 0) >> 2] = 9030; @@ -33068,7 +33235,7 @@ function asmFunc(imports) { } label$79 : { label$80 : { - if ($760(73977 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(74035 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$80 } HEAP32[($3_1 + 8 | 0) >> 2] = 9031; @@ -33076,7 +33243,7 @@ function asmFunc(imports) { } label$81 : { label$82 : { - if ($760(66892 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66948 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$82 } HEAP32[($3_1 + 8 | 0) >> 2] = 9032; @@ -33084,7 +33251,7 @@ function asmFunc(imports) { } label$83 : { label$84 : { - if ($760(71158 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71231 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$84 } HEAP32[($3_1 + 8 | 0) >> 2] = 9033; @@ -33092,7 +33259,7 @@ function asmFunc(imports) { } label$85 : { label$86 : { - if ($760(66231 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66231 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$86 } HEAP32[($3_1 + 8 | 0) >> 2] = 9054; @@ -33100,7 +33267,7 @@ function asmFunc(imports) { } label$87 : { label$88 : { - if ($760(71266 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71339 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$88 } HEAP32[($3_1 + 8 | 0) >> 2] = 9068; @@ -33108,14 +33275,14 @@ function asmFunc(imports) { } label$89 : { label$90 : { - if ($760(72183 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72256 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$90 } HEAP32[($3_1 + 8 | 0) >> 2] = 9069; break label$89; } label$91 : { - if ($760(66810 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66866 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$91 } HEAP32[($3_1 + 8 | 0) >> 2] = 9070; @@ -33133,7 +33300,7 @@ function asmFunc(imports) { case 21: label$92 : { label$93 : { - if ($760(71480 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71553 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$93 } HEAP32[($3_1 + 8 | 0) >> 2] = 9034; @@ -33141,7 +33308,7 @@ function asmFunc(imports) { } label$94 : { label$95 : { - if ($760(71428 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71501 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$95 } HEAP32[($3_1 + 8 | 0) >> 2] = 9057; @@ -33149,7 +33316,7 @@ function asmFunc(imports) { } label$96 : { label$97 : { - if ($760(70902 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(70975 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$97 } HEAP32[($3_1 + 8 | 0) >> 2] = 9061; @@ -33157,7 +33324,7 @@ function asmFunc(imports) { } label$98 : { label$99 : { - if ($760(71507 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71580 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$99 } HEAP32[($3_1 + 8 | 0) >> 2] = 9058; @@ -33165,7 +33332,7 @@ function asmFunc(imports) { } label$100 : { label$101 : { - if ($760(71020 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71093 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$101 } HEAP32[($3_1 + 8 | 0) >> 2] = 9056; @@ -33173,14 +33340,14 @@ function asmFunc(imports) { } label$102 : { label$103 : { - if ($760(65704 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(65704 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$103 } HEAP32[($3_1 + 8 | 0) >> 2] = 9035; break label$102; } label$104 : { - if ($760(65958 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(65958 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$104 } HEAP32[($3_1 + 8 | 0) >> 2] = 9036; @@ -33195,14 +33362,14 @@ function asmFunc(imports) { case 22: label$105 : { label$106 : { - if ($760(70695 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(70768 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$106 } HEAP32[($3_1 + 8 | 0) >> 2] = 9037; break label$105; } label$107 : { - if ($760(73498 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(73556 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$107 } HEAP32[($3_1 + 8 | 0) >> 2] = 9038; @@ -33212,14 +33379,14 @@ function asmFunc(imports) { case 23: label$108 : { label$109 : { - if ($760(73114 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(73172 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$109 } HEAP32[($3_1 + 8 | 0) >> 2] = 9039; break label$108; } label$110 : { - if ($760(72687 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72745 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$110 } HEAP32[($3_1 + 8 | 0) >> 2] = 9040; @@ -33228,7 +33395,7 @@ function asmFunc(imports) { break label$1; case 24: label$111 : { - if ($760(72696 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72754 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$111 } HEAP32[($3_1 + 8 | 0) >> 2] = 9041; @@ -33237,7 +33404,7 @@ function asmFunc(imports) { case 0: label$112 : { label$113 : { - if ($760(84415 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(84972 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$113 } HEAP32[($3_1 + 8 | 0) >> 2] = 9021; @@ -33245,7 +33412,7 @@ function asmFunc(imports) { } label$114 : { label$115 : { - if ($760(84474 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(85031 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$115 } HEAP32[($3_1 + 8 | 0) >> 2] = 9022; @@ -33253,7 +33420,7 @@ function asmFunc(imports) { } label$116 : { label$117 : { - if ($760(84559 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(85116 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$117 } HEAP32[($3_1 + 8 | 0) >> 2] = 9023; @@ -33261,7 +33428,7 @@ function asmFunc(imports) { } label$118 : { label$119 : { - if ($760(84500 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(85057 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$119 } HEAP32[($3_1 + 8 | 0) >> 2] = 9024; @@ -33269,7 +33436,7 @@ function asmFunc(imports) { } label$120 : { label$121 : { - if ($760(72548 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72621 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$121 } HEAP32[($3_1 + 8 | 0) >> 2] = 9018; @@ -33277,7 +33444,7 @@ function asmFunc(imports) { } label$122 : { label$123 : { - if ($760(72562 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(72635 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$123 } HEAP32[($3_1 + 8 | 0) >> 2] = 9018; @@ -33286,10 +33453,10 @@ function asmFunc(imports) { label$124 : { label$125 : { label$126 : { - if (!($760(70742 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0)) { + if (!($761(70815 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0)) { break label$126 } - if ($760(70741 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(70814 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$125 } } @@ -33298,7 +33465,7 @@ function asmFunc(imports) { } label$127 : { label$128 : { - if ($760(71393 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71466 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$128 } HEAP32[($3_1 + 8 | 0) >> 2] = 9043; @@ -33306,7 +33473,7 @@ function asmFunc(imports) { } label$129 : { label$130 : { - if ($760(66053 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66053 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$130 } HEAP32[($3_1 + 8 | 0) >> 2] = 9064; @@ -33314,7 +33481,7 @@ function asmFunc(imports) { } label$131 : { label$132 : { - if ($760(69193 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69266 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$132 } HEAP32[($3_1 + 8 | 0) >> 2] = 9063; @@ -33322,7 +33489,7 @@ function asmFunc(imports) { } label$133 : { label$134 : { - if ($760(68937 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69010 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$134 } HEAP32[($3_1 + 8 | 0) >> 2] = 9065; @@ -33330,7 +33497,7 @@ function asmFunc(imports) { } label$135 : { label$136 : { - if ($760(66260 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66260 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$136 } HEAP32[($3_1 + 8 | 0) >> 2] = 9067; @@ -33338,7 +33505,7 @@ function asmFunc(imports) { } label$137 : { label$138 : { - if ($760(66e3 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66e3 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$138 } HEAP32[($3_1 + 8 | 0) >> 2] = 9066; @@ -33346,7 +33513,7 @@ function asmFunc(imports) { } label$139 : { label$140 : { - if ($760(68056 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68129 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$140 } HEAP32[($3_1 + 8 | 0) >> 2] = 9073; @@ -33354,7 +33521,7 @@ function asmFunc(imports) { } label$141 : { label$142 : { - if ($760(68076 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68149 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$142 } HEAP32[($3_1 + 8 | 0) >> 2] = 9071; @@ -33362,7 +33529,7 @@ function asmFunc(imports) { } label$143 : { label$144 : { - if ($760(68066 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68139 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$144 } HEAP32[($3_1 + 8 | 0) >> 2] = 9072; @@ -33370,7 +33537,7 @@ function asmFunc(imports) { } label$145 : { label$146 : { - if ($760(71521 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71594 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$146 } HEAP32[($3_1 + 8 | 0) >> 2] = 9075; @@ -33378,7 +33545,7 @@ function asmFunc(imports) { } label$147 : { label$148 : { - if ($760(66058 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66058 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$148 } HEAP32[($3_1 + 8 | 0) >> 2] = 9076; @@ -33386,7 +33553,7 @@ function asmFunc(imports) { } label$149 : { label$150 : { - if ($760(68927 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69e3 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$150 } HEAP32[($3_1 + 8 | 0) >> 2] = 9077; @@ -33394,7 +33561,7 @@ function asmFunc(imports) { } label$151 : { label$152 : { - if ($760(68459 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68532 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$152 } HEAP32[($3_1 + 8 | 0) >> 2] = 9074; @@ -33402,7 +33569,7 @@ function asmFunc(imports) { } label$153 : { label$154 : { - if ($760(65797 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(65797 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$154 } HEAP32[($3_1 + 8 | 0) >> 2] = 9078; @@ -33410,7 +33577,7 @@ function asmFunc(imports) { } label$155 : { label$156 : { - if ($760(69815 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69888 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$156 } HEAP32[($3_1 + 8 | 0) >> 2] = 9079; @@ -33418,7 +33585,7 @@ function asmFunc(imports) { } label$157 : { label$158 : { - if ($760(73860 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(73918 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$158 } HEAP32[($3_1 + 8 | 0) >> 2] = 9081; @@ -33426,7 +33593,7 @@ function asmFunc(imports) { } label$159 : { label$160 : { - if ($760(66286 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66286 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$160 } HEAP32[($3_1 + 8 | 0) >> 2] = 9082; @@ -33434,7 +33601,7 @@ function asmFunc(imports) { } label$161 : { label$162 : { - if ($760(70952 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71025 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$162 } HEAP32[($3_1 + 8 | 0) >> 2] = 9083; @@ -33442,7 +33609,7 @@ function asmFunc(imports) { } label$163 : { label$164 : { - if ($760(69508 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69581 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$164 } HEAP32[($3_1 + 8 | 0) >> 2] = 9080; @@ -33450,7 +33617,7 @@ function asmFunc(imports) { } label$165 : { label$166 : { - if ($760(71403 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71476 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$166 } HEAP32[($3_1 + 8 | 0) >> 2] = 9043; @@ -33458,7 +33625,7 @@ function asmFunc(imports) { } label$167 : { label$168 : { - if ($760(67941 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(68014 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$168 } HEAP32[($3_1 + 8 | 0) >> 2] = 9042; @@ -33466,7 +33633,7 @@ function asmFunc(imports) { } label$169 : { label$170 : { - if ($760(74014 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(74072 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$170 } HEAP32[($3_1 + 8 | 0) >> 2] = 9044; @@ -33474,7 +33641,7 @@ function asmFunc(imports) { } label$171 : { label$172 : { - if ($760(70862 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(70935 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$172 } HEAP32[($3_1 + 8 | 0) >> 2] = 9046; @@ -33482,7 +33649,7 @@ function asmFunc(imports) { } label$173 : { label$174 : { - if ($760(65889 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(65889 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$174 } HEAP32[($3_1 + 8 | 0) >> 2] = 9047; @@ -33490,7 +33657,7 @@ function asmFunc(imports) { } label$175 : { label$176 : { - if ($760(84439 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(84996 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$176 } HEAP32[($3_1 + 8 | 0) >> 2] = 9049; @@ -33498,7 +33665,7 @@ function asmFunc(imports) { } label$177 : { label$178 : { - if ($760(84508 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(85065 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$178 } HEAP32[($3_1 + 8 | 0) >> 2] = 9050; @@ -33506,7 +33673,7 @@ function asmFunc(imports) { } label$179 : { label$180 : { - if ($760(84439 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(84996 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$180 } HEAP32[($3_1 + 8 | 0) >> 2] = 9048; @@ -33514,7 +33681,7 @@ function asmFunc(imports) { } label$181 : { label$182 : { - if ($760(74005 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(74063 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$182 } HEAP32[($3_1 + 8 | 0) >> 2] = 9051; @@ -33522,7 +33689,7 @@ function asmFunc(imports) { } label$183 : { label$184 : { - if ($760(65708 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(65708 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$184 } HEAP32[($3_1 + 8 | 0) >> 2] = 9052; @@ -33530,7 +33697,7 @@ function asmFunc(imports) { } label$185 : { label$186 : { - if ($760(69751 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(69824 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$186 } HEAP32[($3_1 + 8 | 0) >> 2] = 9053; @@ -33538,7 +33705,7 @@ function asmFunc(imports) { } label$187 : { label$188 : { - if ($760(66245 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66245 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$188 } HEAP32[($3_1 + 8 | 0) >> 2] = 9054; @@ -33546,14 +33713,14 @@ function asmFunc(imports) { } label$189 : { label$190 : { - if ($760(71033 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(71106 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$190 } HEAP32[($3_1 + 8 | 0) >> 2] = 9056; break label$189; } label$191 : { - if ($760(66667 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { + if ($761(66723 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) { break label$191 } HEAP32[($3_1 + 8 | 0) >> 2] = 9062; @@ -34018,37 +34185,37 @@ function asmFunc(imports) { HEAP32[($4_1 + 28 | 0) >> 2] = $0_1; HEAP32[($4_1 + 24 | 0) >> 2] = $1_1; label$1 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (128 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (128 | 0) & 1 | 0)) { break label$1 } - HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $617(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0); label$2 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 77750 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 78243 | 0) | 0) { break label$2 } - HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $617(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0); } label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 67536 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 67609 | 0) | 0) { break label$3 } - HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $617(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0); HEAP8[($4_1 + 23 | 0) >> 0] = 0; label$4 : { label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 75480 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 75882 | 0) | 0) { break label$5 } HEAP8[($4_1 + 23 | 0) >> 0] = 1; @@ -34056,35 +34223,35 @@ function asmFunc(imports) { } label$6 : { label$7 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 77300 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 77725 | 0) | 0) { break label$7 } HEAP8[($4_1 + 23 | 0) >> 0] = 0; break label$6; } - $156(65 | 0, HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 77266 | 0, 0 | 0); + $156(65 | 0, HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 77691 | 0, 0 | 0); } } HEAP8[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 66 | 0) >> 0] = (HEAPU8[($4_1 + 23 | 0) >> 0] | 0) & 1 | 0; } label$8 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73849 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73907 | 0) | 0) { break label$8 } - HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $617(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0); label$9 : { label$10 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71141 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71214 | 0) | 0) { break label$10 } label$11 : { @@ -34095,16 +34262,16 @@ function asmFunc(imports) { HEAP32[($133_1 + 8 | 0) >> 2] = (HEAP32[($133_1 + 8 | 0) >> 2] | 0) + 1 | 0; HEAP32[(((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] = HEAP32[(((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 12 | 0) + (((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) - 1 | 0) << 2 | 0) | 0) >> 2] | 0; } - HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $617(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0); break label$9; } label$12 : { label$13 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$13 } - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 69599 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 69672 | 0) | 0) { break label$13 } label$14 : { @@ -34114,50 +34281,50 @@ function asmFunc(imports) { $182_1 = HEAP32[($4_1 + 28 | 0) >> 2] | 0; HEAP32[($182_1 + 8 | 0) >> 2] = (HEAP32[($182_1 + 8 | 0) >> 2] | 0) + -1 | 0; } - HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $617(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0); break label$12; } label$15 : { label$16 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$16 } - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71290 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71363 | 0) | 0) { break label$16 } - HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $617(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0); label$17 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$17 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { break label$17 } - HEAP32[($4_1 + 16 | 0) >> 2] = $111(((HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0) + 2 | 0 | 0) | 0; + HEAP32[($4_1 + 16 | 0) >> 2] = $111(((HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0) + 2 | 0 | 0) | 0; $242_1 = ((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0; HEAP32[$242_1 >> 2] = HEAP32[$242_1 >> 2] | 0 | (HEAP32[($4_1 + 16 | 0) >> 2] | 0) | 0; } break label$15; } label$18 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$18 } - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72224 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72297 | 0) | 0) { break label$18 } - HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; $617(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0); label$19 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$19 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { break label$19 } - HEAP32[($4_1 + 12 | 0) >> 2] = $111(((HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0) + 2 | 0 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $111(((HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0) + 2 | 0 | 0) | 0; $298_1 = ((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 12 | 0) + ((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) << 2 | 0) | 0; HEAP32[$298_1 >> 2] = (HEAP32[$298_1 >> 2] | 0) & ((HEAP32[($4_1 + 12 | 0) >> 2] | 0) ^ -1 | 0) | 0; } @@ -34267,7 +34434,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0) & 4194304 | 0)) { break label$4 } - $156(35 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 69353 | 0, 0 | 0); + $156(35 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 69426 | 0, 0 | 0); HEAP32[($5_1 + 12 | 0) >> 2] = 1; break label$1; } @@ -34320,7 +34487,7 @@ function asmFunc(imports) { continue label$3; }; } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -34336,17 +34503,17 @@ function asmFunc(imports) { if (!((HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $817(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $403(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); + $818(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); label$2 : { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 23724 | 0, 71915 | 0); + fimport$0(76208 | 0, 74090 | 0, 23805 | 0, 71988 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -34366,7 +34533,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 25008 | 0, 71883 | 0); + fimport$0(76208 | 0, 74090 | 0, 25092 | 0, 71956 | 0); wasm2js_trap(); } label$3 : { @@ -34377,14 +34544,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(75774 | 0, 74032 | 0, 25011 | 0, 71883 | 0); + fimport$0(76176 | 0, 74090 | 0, 25095 | 0, 71956 | 0); wasm2js_trap(); } - $817(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); } $425(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $426(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -34398,7 +34565,7 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 28 | 0) >> 2] = $0_1; HEAP32[($4_1 + 24 | 0) >> 2] = $1_1; - HEAP32[($4_1 + 20 | 0) >> 2] = $821(1 | 0, 48 | 0) | 0; + HEAP32[($4_1 + 20 | 0) >> 2] = $822(1 | 0, 48 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -34407,14 +34574,14 @@ function asmFunc(imports) { } break label$2; } - HEAP32[((HEAP32[($4_1 + 20 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 20 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$4 : { label$5 : while (1) { if (!(($381(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$4 } label$6 : { - if (!((HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 16 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 16 | 0)) { break label$6 } label$7 : { @@ -34518,7 +34685,7 @@ function asmFunc(imports) { HEAP32[((HEAP32[($4_1 + 20 | 0) >> 2] | 0) + 44 | 0) >> 2] = HEAP32[($4_1 + 12 | 0) >> 2] | 0; } label$25 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$25 } if (!(HEAP32[((HEAP32[($4_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0)) { @@ -34529,7 +34696,7 @@ function asmFunc(imports) { continue label$5; }; } - $202_1 = $246(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) | 0; + $202_1 = $246(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 20 | 0) >> 2] | 0) + 36 | 0) >> 2] = $202_1; if (!(0 & 1 | 0)) { break label$1 @@ -34562,7 +34729,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; label$1 : { label$2 : { if (!(($369(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { @@ -34590,7 +34757,7 @@ function asmFunc(imports) { HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = $26_1; break label$5; } - $156(1 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73394 | 0, 0 | 0); + $156(1 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73452 | 0, 0 | 0); } } } @@ -34607,13 +34774,13 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP32[($3_1 + 12 | 0) >> 2] = 0; break label$1; } - HEAP32[($3_1 + 4 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 4 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; label$3 : { if (!((HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$3 @@ -34621,8 +34788,8 @@ function asmFunc(imports) { HEAP32[($3_1 + 12 | 0) >> 2] = 0; break label$1; } - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - $31_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0) + -8999 | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + $31_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0) + -8999 | 0; label$4 : { label$5 : { switch ($31_1 | 0) { @@ -34635,7 +34802,7 @@ function asmFunc(imports) { case 3: HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 64; label$13 : { - if (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) >> 2] | 0) { + if (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) >> 2] | 0) { break label$13 } $42_1 = HEAP32[($3_1 + 4 | 0) >> 2] | 0; @@ -34658,7 +34825,7 @@ function asmFunc(imports) { break label$5; }; } - fimport$0(72213 | 0, 74032 | 0, 24111 | 0, 69288 | 0); + fimport$0(72286 | 0, 74090 | 0, 24192 | 0, 69361 | 0); wasm2js_trap(); } $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; @@ -34675,7 +34842,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; label$1 : { label$2 : { if (!(($160(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { @@ -34703,7 +34870,7 @@ function asmFunc(imports) { HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = $26_1; break label$5; } - fimport$0(72213 | 0, 74032 | 0, 25041 | 0, 69239 | 0); + fimport$0(72286 | 0, 74090 | 0, 25125 | 0, 69312 | 0); wasm2js_trap(); } } @@ -34720,13 +34887,13 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; label$1 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9053 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9053 | 0) & 1 | 0)) { break label$1 } - $239(2048 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 67691 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 67764 | 0, 0 | 0); } HEAP32[($3_1 + 8 | 0) >> 2] = 0; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 4 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 4 | 0) | 0; label$2 : { label$3 : { label$4 : { @@ -34735,7 +34902,7 @@ function asmFunc(imports) { } break label$3; } - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; if (!(0 & 1 | 0)) { break label$2 @@ -34763,12 +34930,12 @@ function asmFunc(imports) { HEAP32[($8_1 + 44 | 0) >> 2] = $3_1; HEAP32[($8_1 + 40 | 0) >> 2] = $4_1; HEAP32[($8_1 + 36 | 0) >> 2] = $5_1; - HEAP32[($8_1 + 32 | 0) >> 2] = $821(1 | 0, 40 | 0) | 0; + HEAP32[($8_1 + 32 | 0) >> 2] = $822(1 | 0, 40 | 0) | 0; HEAP32[(HEAP32[($8_1 + 32 | 0) >> 2] | 0) >> 2] = HEAP32[($8_1 + 52 | 0) >> 2] | 0; - HEAP32[((HEAP32[($8_1 + 32 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($8_1 + 32 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (59 | 0) & 1 | 0)) { break label$2 } $157(HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0, 59 | 0) | 0; @@ -34798,7 +34965,7 @@ function asmFunc(imports) { HEAP32[(HEAP32[((HEAP32[($8_1 + 32 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($8_1 + 32 | 0) >> 2] | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; } label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { break label$8 } $69_1 = (HEAP32[($8_1 + 32 | 0) >> 2] | 0) + 12 | 0; @@ -34810,10 +34977,10 @@ function asmFunc(imports) { HEAP32[i64toi32_i32$0 >> 2] = $319_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; } - HEAP32[((HEAP32[($8_1 + 32 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($8_1 + 32 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$9 : { label$10 : { - if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { break label$10 } label$11 : { @@ -34826,10 +34993,10 @@ function asmFunc(imports) { } label$12 : { label$13 : { - if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (129 | 0) & 1 | 0)) { break label$13 } - if ($760(HEAP32[((HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86704 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 87261 | 0) | 0) { break label$13 } $152(HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0) | 0; @@ -34854,19 +35021,19 @@ function asmFunc(imports) { } label$16 : { label$17 : { - if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$17 } $133_1 = HEAP32[($8_1 + 56 | 0) >> 2] | 0; - $135_1 = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[$8_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(23 | 0, $133_1 | 0, $135_1 | 0, 86339 | 0, $8_1 | 0); + $135_1 = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[$8_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $156(23 | 0, $133_1 | 0, $135_1 | 0, 86896 | 0, $8_1 | 0); break label$16; } $141_1 = HEAP32[($8_1 + 56 | 0) >> 2] | 0; - $143_1 = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($8_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(36 | 0, $141_1 | 0, $143_1 | 0, 86070 | 0, $8_1 + 16 | 0 | 0); + $143_1 = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($8_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $156(36 | 0, $141_1 | 0, $143_1 | 0, 86627 | 0, $8_1 + 16 | 0 | 0); } $152(HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0) | 0; } @@ -34885,7 +35052,7 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 28 | 0) >> 2] = $0_1; HEAP32[($3_1 + 24 | 0) >> 2] = 0; - HEAP32[($3_1 + 24 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; + HEAP32[($3_1 + 24 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -34894,8 +35061,8 @@ function asmFunc(imports) { } break label$2; } - HEAP32[(HEAP32[($3_1 + 24 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[(HEAP32[($3_1 + 24 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) | 0; $157(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, 40 | 0) | 0; HEAP8[($3_1 + 19 | 0) >> 0] = 0; @@ -34914,15 +35081,15 @@ function asmFunc(imports) { break label$2; } label$6 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { break label$6 } $152(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, 129 | 0) | 0; } $157(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, 41 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, 59 | 0) | 0; label$7 : { if (!((HEAP32[(HEAP32[($3_1 + 20 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9054 | 0) & 1 | 0)) { @@ -34940,10 +35107,10 @@ function asmFunc(imports) { $93_1 = HEAP32[($3_1 + 28 | 0) >> 2] | 0; $94_1 = HEAP32[($3_1 + 20 | 0) >> 2] | 0; HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 24 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(43 | 0, $93_1 | 0, $94_1 | 0, 87232 | 0, $3_1 | 0); + $156(43 | 0, $93_1 | 0, $94_1 | 0, 87812 | 0, $3_1 | 0); break label$9; } - $156(43 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 20 | 0) >> 2] | 0 | 0, 73507 | 0, 0 | 0); + $156(43 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 20 | 0) >> 2] | 0 | 0, 73565 | 0, 0 | 0); } } } @@ -34996,10 +35163,10 @@ function asmFunc(imports) { label$6 : while (1) { $40_1 = 0; label$7 : { - if (!((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - $40_1 = (HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); + $40_1 = (HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); } label$8 : { if (!($40_1 & 1 | 0)) { @@ -35048,7 +35215,7 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 264 | 0) >> 2] = $0_1; HEAP32[($4_1 + 260 | 0) >> 2] = $1_1; - HEAP32[($4_1 + 256 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; + HEAP32[($4_1 + 256 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; HEAP32[($4_1 + 252 | 0) >> 2] = 0; $18_1 = $163(HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, 0 | 0, HEAP32[($4_1 + 260 | 0) >> 2] | 0 | 0, 0 & 1 | 0 | 0, $4_1 + 252 | 0 | 0) | 0; HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] = $18_1; @@ -35066,7 +35233,7 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 252 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$5 } - $156(1 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73370 | 0, 0 | 0); + $156(1 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73428 | 0, 0 | 0); HEAP32[($4_1 + 268 | 0) >> 2] = HEAP32[($4_1 + 256 | 0) >> 2] | 0; break label$1; } @@ -35083,7 +35250,7 @@ function asmFunc(imports) { if (!(HEAP32[((HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) + 80 | 0) >> 2] | 0)) { break label$8 } - fimport$0(84691 | 0, 74032 | 0, 23802 | 0, 68104 | 0); + fimport$0(85248 | 0, 74090 | 0, 23883 | 0, 68177 | 0); wasm2js_trap(); } $67_1 = (HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0; @@ -35155,7 +35322,7 @@ function asmFunc(imports) { break label$11 } label$12 : { - if (HEAP32[(HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) >> 2] | 0) { + if (HEAP32[(HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) >> 2] | 0) { break label$12 } label$13 : { @@ -35179,7 +35346,7 @@ function asmFunc(imports) { } label$17 : { label$18 : { - if (!((HEAP32[(HEAP32[($4_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0) == (HEAP32[(HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($4_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0) == (HEAP32[(HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$18 } label$19 : { @@ -35194,13 +35361,13 @@ function asmFunc(imports) { } break label$19; } - $156(39 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 69851 | 0, 0 | 0); + $156(39 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 69924 | 0, 0 | 0); $201_1 = 0; - $239($201_1 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 184 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, 69949 | 0, $201_1 | 0); + $239($201_1 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 184 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, 70022 | 0, $201_1 | 0); } break label$17; } - $33((HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 16 | 0 | 0, HEAP32[($4_1 + 192 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 256 | 0) >> 2] | 0 | 0, 5 | 0) | 0; + $33((HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 16 | 0 | 0, HEAP32[($4_1 + 192 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 256 | 0) >> 2] | 0 | 0, 5 | 0) | 0; label$22 : { if (!(HEAP32[(HEAP32[($4_1 + 188 | 0) >> 2] | 0) >> 2] | 0)) { break label$22 @@ -35209,28 +35376,28 @@ function asmFunc(imports) { $214_1 = HEAP32[(HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0; HEAP32[$4_1 >> 2] = HEAP32[($4_1 + 192 | 0) >> 2] | 0; label$23 : { - if (!(($213(128 | 0, $211_1 | 0, $214_1 | 0, 69923 | 0, $4_1 | 0) | 0) & 1 | 0)) { + if (!(($213(128 | 0, $211_1 | 0, $214_1 | 0, 69996 | 0, $4_1 | 0) | 0) & 1 | 0)) { break label$23 } $225_1 = 0; - $239($225_1 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 184 | 0) >> 2] | 0) >> 2] | 0 | 0, 72231 | 0, $225_1 | 0); + $239($225_1 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 184 | 0) >> 2] | 0) >> 2] | 0 | 0, 72304 | 0, $225_1 | 0); } } } break label$15; } - $33((HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 16 | 0 | 0, HEAP32[($4_1 + 192 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 256 | 0) >> 2] | 0 | 0, 5 | 0) | 0; + $33((HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 16 | 0 | 0, HEAP32[($4_1 + 192 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 256 | 0) >> 2] | 0 | 0, 5 | 0) | 0; } break label$9; } - fimport$0(72213 | 0, 74032 | 0, 23878 | 0, 68104 | 0); + fimport$0(72286 | 0, 74090 | 0, 23959 | 0, 68177 | 0); wasm2js_trap(); } label$24 : { - if (!((HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$24 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (61 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (61 | 0) & 1 | 0)) { break label$24 } $152(HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0) | 0; @@ -35359,10 +35526,10 @@ function asmFunc(imports) { if ((HEAP32[($4_1 + 140 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$33 } - fimport$0(76004 | 0, 74032 | 0, 23925 | 0, 68104 | 0); + fimport$0(76406 | 0, 74090 | 0, 24006 | 0, 68177 | 0); wasm2js_trap(); } - HEAP32[($4_1 + 140 | 0) >> 2] = $763(HEAP32[((HEAP32[((HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 140 | 0) >> 2] = $764(HEAP32[((HEAP32[((HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; $167($4_1 + 120 | 0 | 0, HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0 | 0); $321($4_1 + 120 | 0 | 0); $209((HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0, $4_1 + 120 | 0 | 0); @@ -35379,7 +35546,7 @@ function asmFunc(imports) { if (($316((HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0) | 0) & 1 | 0) { break label$35 } - $213(32768 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 73549 | 0, 0 | 0) | 0; + $213(32768 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 264 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 73607 | 0, 0 | 0) | 0; } } label$36 : { @@ -35394,7 +35561,7 @@ function asmFunc(imports) { if (($262((HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0) | 0) & 1 | 0) { break label$38 } - $156(66 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, 69264 | 0, 0 | 0); + $156(66 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, 69337 | 0, 0 | 0); } } } @@ -35419,7 +35586,7 @@ function asmFunc(imports) { if ((HEAPU8[($4_1 + 7 | 0) >> 0] | 0) & 1 | 0) { break label$43 } - $156(66 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, 69085 | 0, 0 | 0); + $156(66 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, 69158 | 0, 0 | 0); break label$42; } } @@ -35450,7 +35617,7 @@ function asmFunc(imports) { break label$46 } } - $156(37 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, 68281 | 0, 0 | 0); + $156(37 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, 68354 | 0, 0 | 0); } } label$48 : { @@ -35460,7 +35627,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) + 84 | 0) >> 2] | 0) & 32 | 0)) { break label$48 } - $156(38 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, 67295 | 0, 0 | 0); + $156(38 | 0, HEAP32[($4_1 + 264 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[(HEAP32[($4_1 + 256 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, 67355 | 0, 0 | 0); } } HEAP32[($4_1 + 268 | 0) >> 2] = HEAP32[($4_1 + 256 | 0) >> 2] | 0; @@ -35472,7 +35639,7 @@ function asmFunc(imports) { function $413($0_1) { $0_1 = $0_1 | 0; - var $3_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $251_1 = 0, $121_1 = 0, $231_1 = 0, $234_1 = 0, $248_1 = 0; + var $3_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $250_1 = 0, $121_1 = 0, $230_1 = 0, $233_1 = 0, $247_1 = 0; $3_1 = global$0 - 80 | 0; global$0 = $3_1; HEAP32[($3_1 + 76 | 0) >> 2] = $0_1; @@ -35484,12 +35651,12 @@ function asmFunc(imports) { if (!((HEAPU8[($3_1 + 71 | 0) >> 0] | 0) & 1 | 0)) { break label$1 } - HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 276 | 0) >> 2] = HEAP32[($3_1 + 64 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 280 | 0) >> 2] = HEAP32[($3_1 + 64 | 0) >> 2] | 0; label$2 : { if ((HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$2 } - fimport$0(68143 | 0, 74032 | 0, 23604 | 0, 69888 | 0); + fimport$0(68216 | 0, 74090 | 0, 23685 | 0, 69961 | 0); wasm2js_trap(); } HEAP32[($3_1 + 60 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0; @@ -35518,8 +35685,8 @@ function asmFunc(imports) { }; } HEAP32[($3_1 + 56 | 0) >> 2] = (HEAP32[((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0; - $247((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 268 | 0 | 0, HEAP32[($3_1 + 56 | 0) >> 2] | 0 | 0); - $415(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0); + $247((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 272 | 0 | 0, HEAP32[($3_1 + 56 | 0) >> 2] | 0 | 0); + $415(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0); HEAP8[($3_1 + 55 | 0) >> 0] = (HEAPU8[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 60 | 0) >> 0] | 0) & 1 | 0; label$7 : { if ((HEAPU8[($3_1 + 70 | 0) >> 0] | 0) & 1 | 0) { @@ -35531,7 +35698,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$8 } - fimport$0(75668 | 0, 74032 | 0, 23642 | 0, 69888 | 0); + fimport$0(76070 | 0, 74090 | 0, 23723 | 0, 69961 | 0); wasm2js_trap(); } $121_1 = $248(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; @@ -35545,26 +35712,28 @@ function asmFunc(imports) { if (!((HEAPU8[($3_1 + 70 | 0) >> 0] | 0) & 1 | 0)) { break label$9 } - HEAP32[($3_1 + 48 | 0) >> 2] = 0; i64toi32_i32$0 = 0; - $251_1 = 0; + $250_1 = 0; i64toi32_i32$1 = $3_1 + 40 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $251_1; + HEAP32[i64toi32_i32$1 >> 2] = $250_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $3_1 + 32 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $251_1; + HEAP32[i64toi32_i32$1 >> 2] = $250_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $3_1 + 24 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $251_1; + HEAP32[i64toi32_i32$1 >> 2] = $250_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; + i64toi32_i32$1 = $3_1 + 16 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $250_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $3_1; - HEAP32[($3_1 + 16 | 0) >> 2] = $251_1; - HEAP32[($3_1 + 20 | 0) >> 2] = i64toi32_i32$0; - HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[($3_1 + 76 | 0) >> 2] | 0; - $416($3_1 + 16 | 0 | 0, HEAP32[($3_1 + 64 | 0) >> 2] | 0 | 0); - $417($3_1 + 16 | 0 | 0); + HEAP32[($3_1 + 8 | 0) >> 2] = $250_1; + HEAP32[($3_1 + 12 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[($3_1 + 76 | 0) >> 2] | 0; + $416($3_1 + 8 | 0 | 0, HEAP32[($3_1 + 64 | 0) >> 2] | 0 | 0); + $417($3_1 + 8 | 0 | 0); } - HEAP32[($3_1 + 12 | 0) >> 2] = 0; + HEAP32[($3_1 + 4 | 0) >> 2] = 0; label$10 : { if (!((HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 @@ -35575,43 +35744,43 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[($3_1 + 64 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0; } label$11 : { label$12 : while (1) { - if (!((HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$11 } label$13 : { - if (($310((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 72 | 0 | 0) | 0) & 1 | 0) { + if (($310((HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 72 | 0 | 0) | 0) & 1 | 0) { break label$13 } - if (HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) { + if (HEAP32[((HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) { break label$13 } label$14 : { - if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$14 } - if (HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) { + if (HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) { break label$14 } - $231_1 = HEAP32[($3_1 + 76 | 0) >> 2] | 0; - $234_1 = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; - HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $213(64 | 0, $231_1 | 0, $234_1 | 0, 68827 | 0, $3_1 | 0) | 0; + $230_1 = HEAP32[($3_1 + 76 | 0) >> 2] | 0; + $233_1 = HEAP32[((HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; + HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $213(64 | 0, $230_1 | 0, $233_1 | 0, 68900 | 0, $3_1 | 0) | 0; } } - HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; + HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; continue label$12; }; } - $249((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 268 | 0 | 0); - HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 276 | 0) >> 2] = 0; + $249((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 272 | 0 | 0); + HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 280 | 0) >> 2] = 0; } - $248_1 = HEAP32[($3_1 + 64 | 0) >> 2] | 0; + $247_1 = HEAP32[($3_1 + 64 | 0) >> 2] | 0; global$0 = $3_1 + 80 | 0; - return $248_1 | 0; + return $247_1 | 0; } function $414($0_1) { @@ -35625,12 +35794,12 @@ function asmFunc(imports) { if (!(($383(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$1 } - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$2 : while (1) { $24_1 = 0; label$3 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } $24_1 = $383(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -35659,7 +35828,7 @@ function asmFunc(imports) { } break label$2; }; - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; } $59_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; global$0 = $3_1 + 16 | 0; @@ -35718,26 +35887,34 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(65768 | 0, 74032 | 0, 33926 | 0, 69795 | 0); + fimport$0(65768 | 0, 74090 | 0, 34121 | 0, 69868 | 0); wasm2js_trap(); } label$2 : { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(76278 | 0, 74032 | 0, 33928 | 0, 69795 | 0); + fimport$0(76680 | 0, 74090 | 0, 34123 | 0, 69868 | 0); wasm2js_trap(); } HEAP32[($4_1 + 4 | 0) >> 2] = $419(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0; - HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $420(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); label$3 : { - if (($421(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { - break label$3 + label$4 : { + if (!((HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + break label$4 + } + break label$3; + } + HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; + $420(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); + label$5 : { + if (($421(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { + break label$5 + } + $422(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; } - $422(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $423(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0); } - $423(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0); global$0 = $4_1 + 16 | 0; return; } @@ -35752,7 +35929,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(76302 | 0, 74032 | 0, 33944 | 0, 65719 | 0); + fimport$0(76704 | 0, 74090 | 0, 34143 | 0, 65719 | 0); wasm2js_trap(); } global$0 = $3_1 + 16 | 0; @@ -35765,14 +35942,14 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 91 | 0) | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 91 | 0) | 0; $15_1 = $493(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = $15_1; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 93 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 93 | 0) | 0; $24_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; global$0 = $3_1 + 16 | 0; @@ -35785,7 +35962,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 48 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 48 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 44 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[($3_1 + 8 | 0) >> 2] | 0; $13_1 = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; @@ -35847,7 +36024,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$9 } - fimport$0(76324 | 0, 74032 | 0, 33906 | 0, 69865 | 0); + fimport$0(76726 | 0, 74090 | 0, 34101 | 0, 69938 | 0); wasm2js_trap(); } $232($4_1 | 0, (HEAP32[(HEAP32[((HEAP32[($4_1 + 56 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0); @@ -35915,24 +36092,24 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - HEAP32[($5_1 + 24 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; - HEAP32[($5_1 + 20 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; + HEAP32[($5_1 + 24 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; + HEAP32[($5_1 + 20 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; $598(HEAP32[($5_1 + 44 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); label$5 : { label$6 : { - if ((HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) & 1 | 0) { + if ((HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) & 1 | 0) { break label$6 } - if ((HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) & 1 | 0) { + if ((HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) & 1 | 0) { break label$6 } - if (!((HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 312 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0) + 316 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$5 } } $74_1 = 0; - $239($74_1 | 0, HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0, 72466 | 0, $74_1 | 0); + $239($74_1 | 0, HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0, 72539 | 0, $74_1 | 0); } break label$3; } @@ -35949,7 +36126,7 @@ function asmFunc(imports) { $96_1 = HEAP32[((HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$8; } - $96_1 = 78016; + $96_1 = 78573; } HEAP32[($5_1 + 8 | 0) >> 2] = $96_1; $354(HEAP32[(HEAP32[($5_1 + 44 | 0) >> 2] | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 72 | 0 | 0, (HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 36 | 0 | 0, HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 0 & 1 | 0 | 0); @@ -36012,7 +36189,7 @@ function asmFunc(imports) { } $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $184(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -36032,7 +36209,7 @@ function asmFunc(imports) { $446(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); $448(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); $449(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -36044,7 +36221,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 4 | 0) >> 2] = $821(1 | 0, 28 | 0) | 0; + HEAP32[($3_1 + 4 | 0) >> 2] = $822(1 | 0, 28 | 0) | 0; label$1 : { label$2 : { if (!((HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -36053,127 +36230,127 @@ function asmFunc(imports) { HEAP32[($3_1 + 12 | 0) >> 2] = 0; break label$1; } - $19_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0) + -9003 | 0; + $19_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0) + -9003 | 0; label$3 : { switch ($19_1 | 0) { case 36: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 1; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 0: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 2; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 25: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 4; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 16: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 8; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 18: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 262144; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 19: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 524288; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 20: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 1048576; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 21: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 2097152; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 17: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 16; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 11: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 32; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 7: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 64; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 26: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 128; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 35: HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 256; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 43: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 512; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 44: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 1024; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 46: - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 2048; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 47: HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 4096; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; case 45: HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 8192; - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; break label$1; @@ -36186,7 +36363,7 @@ function asmFunc(imports) { if (!(($443(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$23 } - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 8388608; $196_1 = $444(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] = $196_1; @@ -36197,7 +36374,7 @@ function asmFunc(imports) { if (!(($367(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$25 } - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 16384; $208_1 = $452(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] = $208_1; @@ -36208,7 +36385,7 @@ function asmFunc(imports) { if (!(($371(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$27 } - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 32768; $220_1 = $453(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] = $220_1; @@ -36219,25 +36396,25 @@ function asmFunc(imports) { if (!(($365(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$29 } - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 65536; $232_1 = $454(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] = $232_1; break label$28; } label$30 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$30 } - HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = 131072; - $253_1 = $373(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 0 | 0) | 0; + $253_1 = $373(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] = $253_1; label$31 : { if ((HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$31 } - fimport$0(76622 | 0, 74032 | 0, 24450 | 0, 69338 | 0); + fimport$0(77024 | 0, 74090 | 0, 24534 | 0, 69411 | 0); wasm2js_trap(); } $152(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; @@ -36259,8 +36436,8 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; - $11_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0) + -9004 | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; + $11_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0) + -9004 | 0; label$1 : { label$2 : { switch ($11_1 | 0) { @@ -36289,14 +36466,14 @@ function asmFunc(imports) { HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = 32; break label$1; case 62: - break label$2; - default: + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = 64; break label$1; + default: + break label$2; }; } - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = 64; } - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; $35_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; global$0 = $3_1 + 16 | 0; @@ -36309,8 +36486,8 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 9042 | 0) | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 40 | 0) | 0; label$1 : { @@ -36347,10 +36524,10 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 23760 | 0, 71798 | 0); + fimport$0(76208 | 0, 74090 | 0, 23841 | 0, 71871 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -36370,14 +36547,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 26271 | 0, 71864 | 0); + fimport$0(76208 | 0, 74090 | 0, 26357 | 0, 71937 | 0); wasm2js_trap(); } $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); $189(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $432(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $433(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -36394,7 +36571,7 @@ function asmFunc(imports) { break label$1 } $488(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -36423,7 +36600,7 @@ function asmFunc(imports) { continue label$3; }; } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -36443,7 +36620,7 @@ function asmFunc(imports) { $433(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); $473(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $474(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -36470,12 +36647,12 @@ function asmFunc(imports) { HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; $433(HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); $475(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; continue label$3; }; } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -36523,14 +36700,14 @@ function asmFunc(imports) { break label$5 } } - $239(2048 | 0, HEAP32[($6_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0, 67877 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($6_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0, 67950 | 0, 0 | 0); } } label$7 : { if (($440(HEAP32[((HEAP32[($6_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$7 } - $239(2048 | 0, HEAP32[($6_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0, 67845 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($6_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0, 67918 | 0, 0 | 0); } } global$0 = $6_1 + 16 | 0; @@ -36543,11 +36720,11 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 24 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 24 | 0) | 0; + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { break label$2 } $20_1 = $250(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -36577,16 +36754,16 @@ function asmFunc(imports) { label$3 : while (1) { $15_1 = 0; label$4 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - $15_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0); + $15_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0); } label$5 : { if (!($15_1 & 1 | 0)) { break label$5 } - HEAP32[($3_1 + 4 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; + HEAP32[($3_1 + 4 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; label$6 : { if (!((HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$6 @@ -36607,10 +36784,10 @@ function asmFunc(imports) { label$8 : while (1) { $57_1 = 0; label$9 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } - $57_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0); + $57_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0); } label$10 : { if (!($57_1 & 1 | 0)) { @@ -36656,11 +36833,11 @@ function asmFunc(imports) { HEAP32[($7_1 + 36 | 0) >> 2] = $2_1; HEAP8[($7_1 + 35 | 0) >> 0] = $3_1; HEAP32[($7_1 + 28 | 0) >> 2] = $4_1; - HEAP32[($7_1 + 24 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; + HEAP32[($7_1 + 24 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -36668,15 +36845,15 @@ function asmFunc(imports) { HEAP32[($7_1 + 20 | 0) >> 2] = $223(HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0) | 0; label$4 : { label$5 : { - if (!((HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$5 } - HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$6 : { if (!((HEAP32[($7_1 + 28 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } - HEAP32[(HEAP32[($7_1 + 28 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[(HEAP32[($7_1 + 28 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; } $152(HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0) | 0; $46_1 = $414(HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -36684,7 +36861,7 @@ function asmFunc(imports) { break label$4; } label$7 : { - if (!((HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { break label$7 } HEAP32[($7_1 + 16 | 0) >> 2] = $223(HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -36711,15 +36888,15 @@ function asmFunc(imports) { label$9 : while (1) { $104_1 = 0; label$10 : { - if (!((HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } $115_1 = 1; label$11 : { - if ((HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0) { break label$11 } - $115_1 = (HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0); + $115_1 = (HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0); } $104_1 = $115_1; } @@ -36727,10 +36904,10 @@ function asmFunc(imports) { if (!($104_1 & 1 | 0)) { break label$12 } - HEAP32[($7_1 + 12 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; + HEAP32[($7_1 + 12 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; label$13 : { label$14 : { - if (!((HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($7_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { break label$14 } $141_1 = $477(HEAP32[($7_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -36856,7 +37033,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 4 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 4 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; label$1 : { label$2 : { if (!((HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -36876,11 +37053,11 @@ function asmFunc(imports) { HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = $20_1; break label$5; } - HEAP8[($3_1 + 3 | 0) >> 0] = (HEAPU8[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0; - HEAP8[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 308 | 0) >> 0] = 1; + HEAP8[($3_1 + 3 | 0) >> 0] = (HEAPU8[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 312 | 0) >> 0] = 1; $29_1 = $216(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] = $29_1; - HEAP8[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 308 | 0) >> 0] = (HEAPU8[($3_1 + 3 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 312 | 0) >> 0] = (HEAPU8[($3_1 + 3 | 0) >> 0] | 0) & 1 | 0; label$7 : { if (!((HEAP32[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$7 @@ -36907,7 +37084,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -36915,10 +37092,10 @@ function asmFunc(imports) { } $25_1 = 1; label$3 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9057 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9057 | 0) & 1 | 0) { break label$3 } - $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9061 | 0); + $25_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9061 | 0); } HEAP8[($3_1 + 15 | 0) >> 0] = $25_1 & 1 | 0; } @@ -36932,7 +37109,7 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 188 | 0) >> 2] = $0_1; HEAP32[($3_1 + 184 | 0) >> 2] = 0; - HEAP32[($3_1 + 184 | 0) >> 2] = $821(1 | 0, 68 | 0) | 0; + HEAP32[($3_1 + 184 | 0) >> 2] = $822(1 | 0, 68 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -36941,8 +37118,8 @@ function asmFunc(imports) { } break label$2; } - HEAP32[(HEAP32[($3_1 + 184 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 188 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP8[($3_1 + 183 | 0) >> 0] = (HEAP32[(HEAP32[((HEAP32[($3_1 + 188 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9061 | 0) & 1 | 0; + HEAP32[(HEAP32[($3_1 + 184 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 188 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP8[($3_1 + 183 | 0) >> 0] = (HEAP32[(HEAP32[((HEAP32[($3_1 + 188 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9061 | 0) & 1 | 0; $152(HEAP32[($3_1 + 188 | 0) >> 2] | 0 | 0) | 0; label$4 : { if (!($157(HEAP32[($3_1 + 188 | 0) >> 2] | 0 | 0, 40 | 0) | 0)) { @@ -37089,7 +37266,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 184 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) & 2048 | 0)) { break label$9 } - $213(256 | 0, HEAP32[($3_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 188 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 67162 | 0, 0 | 0) | 0; + $213(256 | 0, HEAP32[($3_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 188 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 67222 | 0, 0 | 0) | 0; label$10 : { if (!(($230((HEAP32[($3_1 + 184 | 0) >> 2] | 0) + 12 | 0 | 0) | 0) & 1 | 0)) { break label$10 @@ -37106,9 +37283,9 @@ function asmFunc(imports) { $201((HEAP32[($3_1 + 184 | 0) >> 2] | 0) + 12 | 0 | 0); } $321((HEAP32[($3_1 + 184 | 0) >> 2] | 0) + 12 | 0 | 0); - $817(HEAP32[((HEAP32[($3_1 + 184 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($3_1 + 184 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[($3_1 + 184 | 0) >> 2] | 0) + 32 | 0) >> 2] = 0; - HEAP32[((HEAP32[($3_1 + 184 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 188 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 184 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 188 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 188 | 0) >> 2] | 0 | 0, 41 | 0) | 0; if (!(0 & 1 | 0)) { break label$1 @@ -37132,7 +37309,7 @@ function asmFunc(imports) { } $178(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $184(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -37150,7 +37327,7 @@ function asmFunc(imports) { } $445(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $185((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -37168,7 +37345,7 @@ function asmFunc(imports) { } $450((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0 | 0); $433(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -37187,7 +37364,7 @@ function asmFunc(imports) { $186(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $433(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $451((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -37204,7 +37381,7 @@ function asmFunc(imports) { break label$1 } $184(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -37262,8 +37439,8 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 9044 | 0) | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 40 | 0) | 0; $15_1 = $154(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -37280,7 +37457,7 @@ function asmFunc(imports) { $3_1 = global$0 - 112 | 0; global$0 = $3_1; HEAP32[($3_1 + 104 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 100 | 0) >> 2] = $821(1 | 0, 252 | 0) | 0; + HEAP32[($3_1 + 100 | 0) >> 2] = $822(1 | 0, 252 | 0) | 0; label$1 : { label$2 : { if (!((HEAP32[($3_1 + 100 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -37292,18 +37469,18 @@ function asmFunc(imports) { label$3 : { label$4 : { label$5 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9032 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9032 | 0) & 1 | 0) { break label$5 } - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9037 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9037 | 0) & 1 | 0)) { break label$4 } } - HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0) | 0; break label$3; } - fimport$0(72213 | 0, 74032 | 0, 24521 | 0, 69312 | 0); + fimport$0(72286 | 0, 74090 | 0, 24605 | 0, 69385 | 0); wasm2js_trap(); } $42_1 = $414(HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0) | 0; @@ -37311,14 +37488,14 @@ function asmFunc(imports) { HEAP32[($3_1 + 96 | 0) >> 2] = 0; label$6 : { label$7 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$7 } - HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $59_1 = (HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 36 | 0; - HEAP32[($3_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $756($59_1 | 0, 200 | 0, 68053 | 0, $3_1 + 32 | 0 | 0) | 0; - HEAP32[($3_1 + 92 | 0) >> 2] = $32((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $757($59_1 | 0, 200 | 0, 68126 | 0, $3_1 + 32 | 0 | 0) | 0; + HEAP32[($3_1 + 92 | 0) >> 2] = $32((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; label$8 : { label$9 : { if (!((HEAP32[($3_1 + 92 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -37334,20 +37511,20 @@ function asmFunc(imports) { break label$10; } $94_1 = HEAP32[($3_1 + 104 | 0) >> 2] | 0; - $96_1 = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(40 | 0, $94_1 | 0, $96_1 | 0, 85056 | 0, $3_1 + 16 | 0 | 0); + $96_1 = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $156(40 | 0, $94_1 | 0, $96_1 | 0, 85613 | 0, $3_1 + 16 | 0 | 0); } break label$8; } - HEAP32[($3_1 + 88 | 0) >> 2] = $234(HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 88 | 0) >> 2] = $234(HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; label$12 : { label$13 : { if (!((HEAP32[($3_1 + 88 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$13 } - HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 240 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) >> 2] | 0; - $33((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 100 | 0) >> 2] | 0 | 0, 2 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 240 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) >> 2] | 0; + $33((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 100 | 0) >> 2] | 0 | 0, 2 | 0) | 0; break label$12; } HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 248 | 0) >> 2] = HEAP32[($3_1 + 88 | 0) >> 2] | 0; @@ -37357,16 +37534,16 @@ function asmFunc(imports) { break label$6; } $134_1 = (HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 36 | 0; - HEAP32[($3_1 + 48 | 0) >> 2] = HEAP32[(0 + 101988 | 0) >> 2] | 0; - $756($134_1 | 0, 200 | 0, 73711 | 0, $3_1 + 48 | 0 | 0) | 0; - HEAP32[(0 + 101988 | 0) >> 2] = (HEAP32[(0 + 101988 | 0) >> 2] | 0) + 1 | 0; + HEAP32[($3_1 + 48 | 0) >> 2] = HEAP32[(0 + 102564 | 0) >> 2] | 0; + $757($134_1 | 0, 200 | 0, 73769 | 0, $3_1 + 48 | 0 | 0) | 0; + HEAP32[(0 + 102564 | 0) >> 2] = (HEAP32[(0 + 102564 | 0) >> 2] | 0) + 1 | 0; HEAP8[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 236 | 0) >> 0] = 1; - HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 240 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) >> 2] | 0; - $33((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 4 | 0 | 0, (HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 36 | 0 | 0, HEAP32[($3_1 + 100 | 0) >> 2] | 0 | 0, 2 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 240 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) >> 2] | 0; + $33((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 4 | 0 | 0, (HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 36 | 0 | 0, HEAP32[($3_1 + 100 | 0) >> 2] | 0 | 0, 2 | 0) | 0; } label$14 : { label$15 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { break label$15 } HEAP32[($3_1 + 84 | 0) >> 2] = $234(HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0, (HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 36 | 0 | 0) | 0; @@ -37382,7 +37559,7 @@ function asmFunc(imports) { } $455(HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0); } - HEAP32[($3_1 + 80 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 80 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0) | 0; $200_1 = (HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 4 | 0; $456($3_1 + 64 | 0 | 0, HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 100 | 0) >> 2] | 0 | 0); @@ -37402,12 +37579,12 @@ function asmFunc(imports) { HEAP32[i64toi32_i32$1 >> 2] = $712_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($3_1 + 80 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0, 125 | 0) | 0; break label$14; } - HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; } HEAP32[($3_1 + 60 | 0) >> 2] = $235(HEAP32[($3_1 + 100 | 0) >> 2] | 0 | 0) | 0; label$18 : { @@ -37429,10 +37606,10 @@ function asmFunc(imports) { $254_1 = HEAP32[($3_1 + 104 | 0) >> 2] | 0; $256_1 = HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $213(4 | 0, $254_1 | 0, $256_1 | 0, 73405 | 0, $3_1 | 0) | 0; + $213(4 | 0, $254_1 | 0, $256_1 | 0, 73463 | 0, $3_1 | 0) | 0; break label$20; } - $213(4 | 0, HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0, 73413 | 0, 0 | 0) | 0; + $213(4 | 0, HEAP32[($3_1 + 104 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 100 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0, 73471 | 0, 0 | 0) | 0; } } } @@ -37450,23 +37627,23 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 60 | 0) >> 2] = $0_1; HEAP32[($3_1 + 56 | 0) >> 2] = 0; - HEAP32[($3_1 + 56 | 0) >> 2] = $821(1 | 0, 28 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 56 | 0) >> 2] = $822(1 | 0, 28 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, 9012 | 0) | 0; $14_1 = $414(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($3_1 + 56 | 0) >> 2] | 0) >> 2] = $14_1; HEAP32[($3_1 + 52 | 0) >> 2] = 0; HEAP8[($3_1 + 51 | 0) >> 0] = 0; label$1 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$1 } HEAP8[($3_1 + 51 | 0) >> 0] = 1; - HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; } label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (58 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (58 | 0) & 1 | 0)) { break label$2 } $152(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -37477,7 +37654,7 @@ function asmFunc(imports) { label$4 : { label$5 : { label$6 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { break label$6 } label$7 : { @@ -37497,7 +37674,7 @@ function asmFunc(imports) { HEAP32[i64toi32_i32$0 >> 2] = $423_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { break label$8 } $152(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -37509,7 +37686,7 @@ function asmFunc(imports) { if ((HEAPU8[($3_1 + 51 | 0) >> 0] | 0) & 1 | 0) { break label$9 } - $156(41 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 72652 | 0, 0 | 0); + $156(41 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 72710 | 0, 0 | 0); break label$4; } } @@ -37521,7 +37698,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - HEAP32[($3_1 + 36 | 0) >> 2] = $32((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($3_1 + 36 | 0) >> 2] = $32((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; } label$11 : { label$12 : { @@ -37545,7 +37722,7 @@ function asmFunc(imports) { $157_1 = HEAP32[($3_1 + 60 | 0) >> 2] | 0; $159_1 = HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(42 | 0, $157_1 | 0, $159_1 | 0, 86431 | 0, $3_1 | 0); + $156(42 | 0, $157_1 | 0, $159_1 | 0, 86988 | 0, $3_1 | 0); break label$15; } label$17 : { @@ -37567,9 +37744,9 @@ function asmFunc(imports) { break label$13; } $185_1 = HEAP32[($3_1 + 60 | 0) >> 2] | 0; - $187_1 = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; - HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(40 | 0, $185_1 | 0, $187_1 | 0, 85056 | 0, $3_1 + 16 | 0 | 0); + $187_1 = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $156(40 | 0, $185_1 | 0, $187_1 | 0, 85613 | 0, $3_1 + 16 | 0 | 0); break label$4; } break label$11; @@ -37591,7 +37768,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$24 } - $33((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 56 | 0) >> 2] | 0 | 0, 1 | 0) | 0; + $33((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 56 | 0) >> 2] | 0 | 0, 1 | 0) | 0; break label$23; } } @@ -37651,7 +37828,7 @@ function asmFunc(imports) { if (($440(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$5 } - $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67560 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67633 | 0, 0 | 0); } break label$1; } @@ -37663,7 +37840,7 @@ function asmFunc(imports) { if (($461(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$7 } - $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67597 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67670 | 0, 0 | 0); } } } @@ -37715,10 +37892,10 @@ function asmFunc(imports) { label$6 : while (1) { $42_1 = 0; label$7 : { - if (!((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - $42_1 = (HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0); + $42_1 = (HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0); } label$8 : { if (!($42_1 & 1 | 0)) { @@ -37786,7 +37963,7 @@ function asmFunc(imports) { if (($440(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$5 } - $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67633 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67706 | 0, 0 | 0); } break label$1; } @@ -37798,7 +37975,7 @@ function asmFunc(imports) { if (($461(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$7 } - $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67662 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67735 | 0, 0 | 0); } } } @@ -37847,10 +38024,10 @@ function asmFunc(imports) { label$6 : while (1) { $42_1 = 0; label$7 : { - if (!((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - $42_1 = (HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); + $42_1 = (HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); } label$8 : { if (!($42_1 & 1 | 0)) { @@ -37858,10 +38035,10 @@ function asmFunc(imports) { } $152(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0) | 0; label$9 : { - if (!((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } - if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0) & 1 | 0)) { break label$9 } HEAP32[($5_1 + 12 | 0) >> 2] = $470(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, $5_1 + 16 | 0 | 0) | 0; @@ -37912,14 +38089,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 24775 | 0, 72e3 | 0); + fimport$0(76208 | 0, 74090 | 0, 24859 | 0, 72073 | 0); wasm2js_trap(); } $186(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $466(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $433(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); $468(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -37936,15 +38113,15 @@ function asmFunc(imports) { break label$1 } $492(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); label$2 : { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 26606 | 0, 71944 | 0); + fimport$0(76208 | 0, 74090 | 0, 26692 | 0, 72017 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38036,10 +38213,10 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 12 | 0) >> 2] = $0_1; HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; - HEAP32[($4_1 + 4 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9054 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9054 | 0) & 1 | 0)) { break label$2 } $18_1 = $410(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -38051,7 +38228,7 @@ function asmFunc(imports) { $24_1 = $162(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($4_1 + 4 | 0) >> 2] | 0) >> 2] = $24_1; label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { break label$3 } $39_1 = $467(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; @@ -38074,7 +38251,7 @@ function asmFunc(imports) { HEAP32[($5_1 + 76 | 0) >> 2] = $0_1; HEAP32[($5_1 + 72 | 0) >> 2] = $1_1; HEAP32[($5_1 + 68 | 0) >> 2] = $2_1; - HEAP32[($5_1 + 64 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; + HEAP32[($5_1 + 64 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; HEAP32[($5_1 + 60 | 0) >> 2] = 0; $19_1 = $163(HEAP32[($5_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 68 | 0) >> 2] | 0 | 0, 0 | 0, 0 & 1 | 0 | 0, $5_1 + 60 | 0 | 0) | 0; HEAP32[(HEAP32[($5_1 + 64 | 0) >> 2] | 0) >> 2] = $19_1; @@ -38150,7 +38327,7 @@ function asmFunc(imports) { $464(HEAP32[($5_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 64 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, (HEAP32[(HEAP32[($5_1 + 64 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0); } label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (58 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (58 | 0) & 1 | 0)) { break label$3 } $152(HEAP32[($5_1 + 76 | 0) >> 2] | 0 | 0) | 0; @@ -38187,7 +38364,7 @@ function asmFunc(imports) { if (($440(HEAP32[((HEAP32[($5_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$1 } - $239(2048 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67419 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67479 | 0, 0 | 0); } global$0 = $5_1 + 16 | 0; return; @@ -38208,11 +38385,11 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 24691 | 0, 71821 | 0); + fimport$0(76208 | 0, 74090 | 0, 24775 | 0, 71894 | 0); wasm2js_trap(); } $187(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38241,7 +38418,7 @@ function asmFunc(imports) { continue label$3; }; } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38257,7 +38434,7 @@ function asmFunc(imports) { HEAP32[($5_1 + 28 | 0) >> 2] = $0_1; HEAP32[($5_1 + 24 | 0) >> 2] = $1_1; HEAP32[($5_1 + 20 | 0) >> 2] = $2_1; - HEAP32[($5_1 + 16 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; HEAP32[($5_1 + 12 | 0) >> 2] = $463(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0) | 0; label$1 : { label$2 : { @@ -38273,7 +38450,7 @@ function asmFunc(imports) { } label$3 : { label$4 : while (1) { - if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { break label$3 } $152(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0) | 0; @@ -38309,7 +38486,7 @@ function asmFunc(imports) { break label$1 } $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38329,12 +38506,12 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 25282 | 0, 71780 | 0); + fimport$0(76208 | 0, 74090 | 0, 25366 | 0, 71853 | 0); wasm2js_trap(); } $433(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38350,18 +38527,18 @@ function asmFunc(imports) { HEAP32[($5_1 + 28 | 0) >> 2] = $0_1; HEAP32[($5_1 + 24 | 0) >> 2] = $1_1; HEAP32[($5_1 + 20 | 0) >> 2] = $2_1; - HEAP32[($5_1 + 16 | 0) >> 2] = $821(1 | 0, 32 | 0) | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = $822(1 | 0, 32 | 0) | 0; HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($5_1 + 24 | 0) >> 2] | 0; - HEAP32[($5_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($5_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $471(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0); $157(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, 8996 | 0) | 0; $18_1 = $414(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] = $18_1; HEAP32[(HEAP32[($5_1 + 16 | 0) >> 2] | 0) >> 2] = HEAP32[($5_1 + 12 | 0) >> 2] | 0; - $33((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 16 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 16 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0, 3 | 0) | 0; + $33((HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 16 | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 16 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0, 3 | 0) | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (61 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (61 | 0) & 1 | 0)) { break label$2 } $152(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0) | 0; @@ -38460,7 +38637,7 @@ function asmFunc(imports) { if (($472(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$1 } - $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67265 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 67325 | 0, 0 | 0); } global$0 = $4_1 + 16 | 0; return; @@ -38482,7 +38659,7 @@ function asmFunc(imports) { $17_1 = 24; $22_1 = 24; label$4 : { - if (!((((HEAPU8[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 0] | 0) << $17_1 | 0) >> $17_1 | 0 | 0) != ($791(((HEAPU8[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 0] | 0) << $22_1 | 0) >> $22_1 | 0 | 0) | 0 | 0) & 1 | 0)) { + if (!((((HEAPU8[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 0] | 0) << $17_1 | 0) >> $17_1 | 0 | 0) != ($792(((HEAPU8[(HEAP32[($3_1 + 4 | 0) >> 2] | 0) >> 0] | 0) << $22_1 | 0) >> $22_1 | 0 | 0) | 0 | 0) & 1 | 0)) { break label$4 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -38513,7 +38690,7 @@ function asmFunc(imports) { $434(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $475(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38532,7 +38709,7 @@ function asmFunc(imports) { $434(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $359((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0 | 0); $480(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38556,12 +38733,12 @@ function asmFunc(imports) { } HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = 0; - $817(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; continue label$3; }; } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38575,7 +38752,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 28 | 0) >> 2] = $0_1; HEAP32[($3_1 + 24 | 0) >> 2] = 0; HEAP32[($3_1 + 20 | 0) >> 2] = 0; - HEAP32[($3_1 + 24 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; + HEAP32[($3_1 + 24 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -38610,7 +38787,7 @@ function asmFunc(imports) { label$7 : while (1) { $58_1 = 0; label$8 : { - if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } $58_1 = $161(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) | 0; @@ -38665,7 +38842,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = $0_1; HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; HEAP32[($4_1 + 4 | 0) >> 2] = 0; - HEAP32[($4_1 + 4 | 0) >> 2] = $821(1 | 0, 24 | 0) | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = $822(1 | 0, 24 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -38678,10 +38855,10 @@ function asmFunc(imports) { $157(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 91 | 0) | 0; HEAP8[($4_1 + 3 | 0) >> 0] = 0; label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9031 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9031 | 0) & 1 | 0)) { break label$4 } - HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP8[($4_1 + 3 | 0) >> 0] = 1; } @@ -38697,7 +38874,7 @@ function asmFunc(imports) { break label$6 } label$7 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9031 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9031 | 0) & 1 | 0)) { break label$7 } $152(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; @@ -38709,11 +38886,11 @@ function asmFunc(imports) { if (!((HEAPU8[($4_1 + 3 | 0) >> 0] | 0) & 1 | 0)) { break label$9 } - HEAP8[($4_1 + 2 | 0) >> 0] = (HEAPU8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0; - HEAP8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 308 | 0) >> 0] = 0; + HEAP8[($4_1 + 2 | 0) >> 0] = (HEAPU8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 312 | 0) >> 0] = 0; $66_1 = $158(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = $66_1; - HEAP8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 308 | 0) >> 0] = (HEAPU8[($4_1 + 2 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 312 | 0) >> 0] = (HEAPU8[($4_1 + 2 | 0) >> 0] | 0) & 1 | 0; label$10 : { if (!((HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$10 @@ -38724,7 +38901,7 @@ function asmFunc(imports) { } label$11 : { label$12 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0)) { break label$12 } $152(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; @@ -38732,14 +38909,14 @@ function asmFunc(imports) { } label$13 : { label$14 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (93 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (93 | 0) & 1 | 0)) { break label$14 } - HEAP8[($4_1 + 1 | 0) >> 0] = (HEAPU8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 308 | 0) >> 0] | 0) & 1 | 0; - HEAP8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 308 | 0) >> 0] = 0; + HEAP8[($4_1 + 1 | 0) >> 0] = (HEAPU8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 312 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 312 | 0) >> 0] = 0; $106_1 = $158(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = $106_1; - HEAP8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 308 | 0) >> 0] = (HEAPU8[($4_1 + 1 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 312 | 0) >> 0] = (HEAPU8[($4_1 + 1 | 0) >> 0] | 0) & 1 | 0; label$15 : { if (!((HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$15 @@ -38775,22 +38952,22 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 12 | 0) >> 2] = $0_1; HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; - HEAP32[($4_1 + 4 | 0) >> 2] = $821(1 | 0, 44 | 0) | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = $822(1 | 0, 44 | 0) | 0; HEAP32[(HEAP32[($4_1 + 4 | 0) >> 2] | 0) >> 2] = HEAP32[($4_1 + 12 | 0) >> 2] | 0; - HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = (HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) >> 2] | 0) + 1 | 0; + HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = (HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) >> 2] | 0) + 1 | 0; HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] = 5; HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] = 1; - $247((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 268 | 0 | 0, (HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 4 | 0 | 0); + $247((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 272 | 0 | 0, (HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 4 | 0 | 0); $157(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 40 | 0) | 0; label$1 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { break label$1 } $38_1 = $482(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 40 | 0) >> 2] = $38_1; } $157(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 41 | 0) | 0; - $249((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 268 | 0 | 0); + $249((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 272 | 0 | 0); $45_1 = HEAP32[($4_1 + 4 | 0) >> 2] | 0; global$0 = $4_1 + 16 | 0; return $45_1 | 0; @@ -38822,7 +38999,7 @@ function asmFunc(imports) { break label$1 } $481(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38851,7 +39028,7 @@ function asmFunc(imports) { continue label$3; }; } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -38863,7 +39040,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; $8_1 = $483(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $8_1; label$1 : { @@ -38878,7 +39055,7 @@ function asmFunc(imports) { } } label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3026478 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3026478 | 0) & 1 | 0)) { break label$3 } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -38897,7 +39074,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 28 | 0) >> 2] = $0_1; HEAP32[($3_1 + 24 | 0) >> 2] = 0; HEAP32[($3_1 + 20 | 0) >> 2] = 0; - HEAP32[($3_1 + 24 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 24 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -38930,10 +39107,10 @@ function asmFunc(imports) { label$7 : while (1) { $53_1 = 0; label$8 : { - if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } - $53_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); + $53_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); } label$9 : { if (!($53_1 & 1 | 0)) { @@ -38941,7 +39118,7 @@ function asmFunc(imports) { } $152(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) | 0; label$10 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3026478 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3026478 | 0) & 1 | 0)) { break label$10 } break label$9; @@ -38998,10 +39175,10 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 26006 | 0, 71971 | 0); + fimport$0(76208 | 0, 74090 | 0, 26092 | 0, 72044 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39013,7 +39190,7 @@ function asmFunc(imports) { $3_1 = global$0 - 80 | 0; global$0 = $3_1; HEAP32[($3_1 + 76 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 72 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; + HEAP32[($3_1 + 72 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; $8_1 = $414(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($3_1 + 72 | 0) >> 2] | 0) >> 2] = $8_1; $12_1 = $404(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, 2048 | 0) | 0; @@ -39106,7 +39283,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - $33((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 16 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, 4 | 0) | 0; + $33((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 16 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, 4 | 0) | 0; } $144_1 = HEAP32[($3_1 + 72 | 0) >> 2] | 0; global$0 = $3_1 + 80 | 0; @@ -39138,7 +39315,7 @@ function asmFunc(imports) { if (($440(HEAP32[((HEAP32[($5_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$1 } - $239(2048 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67211 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67271 | 0, 0 | 0); } global$0 = $5_1 + 16 | 0; return; @@ -39150,7 +39327,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; $8_1 = $489(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = $8_1; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 61 | 0) | 0; @@ -39182,7 +39359,7 @@ function asmFunc(imports) { continue label$3; }; } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39196,7 +39373,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 28 | 0) >> 2] = $0_1; HEAP32[($3_1 + 24 | 0) >> 2] = 0; HEAP32[($3_1 + 20 | 0) >> 2] = 0; - HEAP32[($3_1 + 24 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 24 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; label$1 : { label$2 : { label$3 : { @@ -39229,7 +39406,7 @@ function asmFunc(imports) { label$7 : while (1) { $53_1 = 0; label$8 : { - if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } $53_1 = $385(HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0) | 0; @@ -39287,11 +39464,11 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 26440 | 0, 71846 | 0); + fimport$0(76208 | 0, 74090 | 0, 26526 | 0, 71919 | 0); wasm2js_trap(); } $178(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39303,10 +39480,10 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { break label$2 } $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 91 | 0) | 0; @@ -39316,7 +39493,7 @@ function asmFunc(imports) { break label$1; } label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (46 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (46 | 0) & 1 | 0)) { break label$3 } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -39357,11 +39534,11 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; label$1 : while (1) { $16_1 = 0; label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } $22_1 = 1; @@ -39369,7 +39546,7 @@ function asmFunc(imports) { if (($495(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$3 } - $22_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); + $22_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0); } $16_1 = $22_1; } @@ -39399,7 +39576,7 @@ function asmFunc(imports) { } } label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (44 | 0) & 1 | 0)) { break label$8 } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -39429,10 +39606,10 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 26633 | 0, 72111 | 0); + fimport$0(76208 | 0, 74090 | 0, 26719 | 0, 72184 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39445,13 +39622,13 @@ function asmFunc(imports) { HEAP32[($3_1 + 8 | 0) >> 2] = $0_1; label$1 : { label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; break label$1; } - HEAP8[($3_1 + 15 | 0) >> 0] = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0; + HEAP8[($3_1 + 15 | 0) >> 0] = (HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0; } return (HEAPU8[($3_1 + 15 | 0) >> 0] | 0) & 1 | 0 | 0; } @@ -39462,12 +39639,12 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 16 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 16 | 0) | 0; $8_1 = $500(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $8_1; HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0; label$1 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { break label$1 } $24_1 = $501(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -39488,7 +39665,7 @@ function asmFunc(imports) { if (!((HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39505,7 +39682,7 @@ function asmFunc(imports) { break label$1 } $499(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39528,12 +39705,12 @@ function asmFunc(imports) { break label$2 } HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $817(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; continue label$3; }; } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39545,12 +39722,12 @@ function asmFunc(imports) { $3_1 = global$0 - 48 | 0; global$0 = $3_1; HEAP32[($3_1 + 44 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 40 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; - HEAP32[($3_1 + 36 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 40 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 36 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP8[($3_1 + 35 | 0) >> 0] = 0; label$1 : { label$2 : { - if ($760(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73413 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73471 | 0) | 0) { break label$2 } HEAP8[($3_1 + 35 | 0) >> 0] = 1; @@ -39559,7 +39736,7 @@ function asmFunc(imports) { } label$3 : { label$4 : { - if ($760(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71146 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71219 | 0) | 0) { break label$4 } HEAP8[($3_1 + 35 | 0) >> 0] = 1; @@ -39567,7 +39744,7 @@ function asmFunc(imports) { } label$5 : { label$6 : { - if ($760(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73424 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73482 | 0) | 0) { break label$6 } HEAP8[($3_1 + 35 | 0) >> 0] = 1; @@ -39576,7 +39753,7 @@ function asmFunc(imports) { } label$7 : { label$8 : { - if ($760(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 69742 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 69815 | 0) | 0) { break label$8 } HEAP8[($3_1 + 35 | 0) >> 0] = 1; @@ -39585,7 +39762,7 @@ function asmFunc(imports) { } label$9 : { label$10 : { - if ($760(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72732 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72790 | 0) | 0) { break label$10 } HEAP8[($3_1 + 35 | 0) >> 0] = 1; @@ -39594,7 +39771,7 @@ function asmFunc(imports) { } label$11 : { label$12 : { - if ($760(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73575 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73633 | 0) | 0) { break label$12 } HEAP8[($3_1 + 35 | 0) >> 0] = 1; @@ -39602,7 +39779,7 @@ function asmFunc(imports) { break label$11; } label$13 : { - if ($760(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72906 | 0) | 0) { + if ($761(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72964 | 0) | 0) { break label$13 } HEAP8[($3_1 + 35 | 0) >> 0] = 1; @@ -39614,11 +39791,11 @@ function asmFunc(imports) { } } } - HEAP8[($3_1 + 34 | 0) >> 0] = ($760(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72811 | 0) | 0 | 0) == (0 | 0) & 1 | 0; + HEAP8[($3_1 + 34 | 0) >> 0] = ($761(HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 72869 | 0) | 0 | 0) == (0 | 0) & 1 | 0; $157(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 8996 | 0) | 0; label$14 : { label$15 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (14906 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (14906 | 0) & 1 | 0)) { break label$15 } $152(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -39628,8 +39805,8 @@ function asmFunc(imports) { } $82_1 = HEAP32[($3_1 + 44 | 0) >> 2] | 0; $83_1 = HEAP32[($3_1 + 36 | 0) >> 2] | 0; - HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $213(512 | 0, $82_1 | 0, $83_1 | 0, 71608 | 0, $3_1 | 0) | 0; + HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $213(512 | 0, $82_1 | 0, $83_1 | 0, 71681 | 0, $3_1 | 0) | 0; } $157(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 8996 | 0) | 0; break label$14; @@ -39641,7 +39818,7 @@ function asmFunc(imports) { $94_1 = HEAP32[($3_1 + 44 | 0) >> 2] | 0; $95_1 = HEAP32[($3_1 + 36 | 0) >> 2] | 0; HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $213(512 | 0, $94_1 | 0, $95_1 | 0, 71646 | 0, $3_1 + 16 | 0 | 0) | 0; + $213(512 | 0, $94_1 | 0, $95_1 | 0, 71719 | 0, $3_1 + 16 | 0 | 0) | 0; } } $102_1 = HEAP32[($3_1 + 40 | 0) >> 2] | 0; @@ -39655,7 +39832,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 40 | 0) | 0; $10_1 = $502(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = $10_1; @@ -39671,18 +39848,18 @@ function asmFunc(imports) { $3_1 = global$0 - 32 | 0; global$0 = $3_1; HEAP32[($3_1 + 28 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 24 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 24 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; HEAP32[($3_1 + 20 | 0) >> 2] = 0; HEAP32[($3_1 + 16 | 0) >> 2] = 0; HEAP32[($3_1 + 12 | 0) >> 2] = 0; label$1 : { label$2 : while (1) { - if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } label$3 : { label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { break label$4 } HEAP32[($3_1 + 20 | 0) >> 2] = (HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 1 | 0; @@ -39690,7 +39867,7 @@ function asmFunc(imports) { } label$5 : { label$6 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { break label$6 } HEAP32[($3_1 + 16 | 0) >> 2] = (HEAP32[($3_1 + 16 | 0) >> 2] | 0) + 1 | 0; @@ -39698,7 +39875,7 @@ function asmFunc(imports) { } label$7 : { label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { break label$8 } HEAP32[($3_1 + 12 | 0) >> 2] = (HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 1 | 0; @@ -39706,7 +39883,7 @@ function asmFunc(imports) { } label$9 : { label$10 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (41 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (41 | 0) & 1 | 0)) { break label$10 } label$11 : { @@ -39720,14 +39897,14 @@ function asmFunc(imports) { } label$12 : { label$13 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (91 | 0) & 1 | 0)) { break label$13 } HEAP32[($3_1 + 16 | 0) >> 2] = (HEAP32[($3_1 + 16 | 0) >> 2] | 0) + -1 | 0; break label$12; } label$14 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { break label$14 } HEAP32[($3_1 + 12 | 0) >> 2] = (HEAP32[($3_1 + 12 | 0) >> 2] | 0) + -1 | 0; @@ -39745,13 +39922,13 @@ function asmFunc(imports) { if (!(HEAP32[($3_1 + 16 | 0) >> 2] | 0)) { break label$15 } - $156(44 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 86513 | 0, 0 | 0); + $156(44 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 87070 | 0, 0 | 0); } label$16 : { if (!(HEAP32[($3_1 + 12 | 0) >> 2] | 0)) { break label$16 } - $156(44 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 86489 | 0, 0 | 0); + $156(44 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 87046 | 0, 0 | 0); } $106_1 = HEAP32[($3_1 + 24 | 0) >> 2] | 0; global$0 = $3_1 + 32 | 0; @@ -39770,7 +39947,7 @@ function asmFunc(imports) { } $505(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $358(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39789,7 +39966,7 @@ function asmFunc(imports) { $506(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $507(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $508(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39806,7 +39983,7 @@ function asmFunc(imports) { break label$1 } $178(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39824,7 +40001,7 @@ function asmFunc(imports) { } $433(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39841,7 +40018,7 @@ function asmFunc(imports) { break label$1 } $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39862,7 +40039,7 @@ function asmFunc(imports) { $525(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $526(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $527(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -39874,7 +40051,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; label$1 : { label$2 : { if (!(($384(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { @@ -39898,7 +40075,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; $8_1 = $512(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = $8_1; $11_1 = $509(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -39914,7 +40091,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; label$1 : { label$2 : { if (!(($513(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { @@ -39957,7 +40134,7 @@ function asmFunc(imports) { if (HEAP32[((HEAP32[((HEAP32[((HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) { break label$8 } - $213(512 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 71688 | 0, 0 | 0) | 0; + $213(512 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 71761 | 0, 0 | 0) | 0; } } label$9 : { @@ -39971,7 +40148,7 @@ function asmFunc(imports) { if (HEAP32[((HEAP32[((HEAP32[((HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) { break label$10 } - $213(512 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 86832 | 0, 0 | 0) | 0; + $213(512 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 87389 | 0, 0 | 0) | 0; } } } @@ -40026,10 +40203,10 @@ function asmFunc(imports) { break label$13 } label$14 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$14 } - if (HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) { + if (HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) { break label$14 } } @@ -40049,20 +40226,20 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8996 | 0) & 1 | 0)) { break label$2 } - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 58 | 0) | 0; break label$1; } label$3 : { label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9001 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9001 | 0) & 1 | 0)) { break label$4 } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -40072,7 +40249,7 @@ function asmFunc(imports) { break label$3; } label$5 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9007 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9007 | 0) & 1 | 0)) { break label$5 } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -40103,10 +40280,10 @@ function asmFunc(imports) { if (($379(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$3 } - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9009 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9009 | 0) & 1 | 0) { break label$3 } - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9035 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9035 | 0) & 1 | 0)) { break label$2 } } @@ -40127,13 +40304,13 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; label$1 : { - if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { + if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(76587 | 0, 74032 | 0, 26877 | 0, 71060 | 0); + fimport$0(76989 | 0, 74090 | 0, 26963 | 0, 71133 | 0); wasm2js_trap(); } - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; label$2 : { label$3 : { if (!(($376(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { @@ -40163,7 +40340,7 @@ function asmFunc(imports) { } label$8 : { label$9 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9009 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9009 | 0) & 1 | 0)) { break label$9 } $50_1 = $519(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -40172,14 +40349,14 @@ function asmFunc(imports) { } label$10 : { label$11 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9035 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9035 | 0) & 1 | 0)) { break label$11 } $62_1 = $520(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] = $62_1; break label$10; } - $156(34 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 70715 | 0, 0 | 0); + $156(34 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 70788 | 0, 0 | 0); } } } @@ -40196,21 +40373,21 @@ function asmFunc(imports) { $3_1 = global$0 - 80 | 0; global$0 = $3_1; HEAP32[($3_1 + 76 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 72 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 72 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9016 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9016 | 0) & 1 | 0)) { break label$2 } $152(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 72 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[(HEAP32[($3_1 + 72 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, 8996 | 0) | 0; break label$1; } label$3 : { label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9005 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9005 | 0) & 1 | 0)) { break label$4 } $152(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; @@ -40218,7 +40395,7 @@ function asmFunc(imports) { } label$5 : { label$6 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9e3 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9e3 | 0) & 1 | 0)) { break label$6 } $152(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; @@ -40226,31 +40403,31 @@ function asmFunc(imports) { } label$7 : { label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9036 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9036 | 0) & 1 | 0)) { break label$8 } label$9 : { label$10 : { - if (!((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$10 } - $156(46 | 0, HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 71074 | 0, 0 | 0); + $156(46 | 0, HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 71147 | 0, 0 | 0); break label$9; } - HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; } $152(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; break label$7; } label$11 : { label$12 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9027 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9027 | 0) & 1 | 0)) { break label$12 } - HEAP32[($3_1 + 68 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 68 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; label$13 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { break label$13 } $95_1 = $216(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) | 0; @@ -40259,7 +40436,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$14 } - $232($3_1 + 12 | 0 | 0, (HEAP32[(HEAP32[((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0); + $232($3_1 + 12 | 0 | 0, (HEAP32[(HEAP32[((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0); label$15 : { label$16 : { if (!(($287($3_1 + 12 | 0 | 0) | 0) & 1 | 0)) { @@ -40267,8 +40444,8 @@ function asmFunc(imports) { } $120_1 = HEAP32[($3_1 + 76 | 0) >> 2] | 0; $121_1 = HEAP32[($3_1 + 68 | 0) >> 2] | 0; - HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 276 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(47 | 0, $120_1 | 0, $121_1 | 0, 71545 | 0, $3_1 | 0); + HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $156(47 | 0, $120_1 | 0, $121_1 | 0, 71618 | 0, $3_1 | 0); break label$15; } label$17 : { @@ -40283,14 +40460,14 @@ function asmFunc(imports) { } break label$11; } - fimport$0(72213 | 0, 74032 | 0, 27718 | 0, 66448 | 0); + fimport$0(72286 | 0, 74090 | 0, 27804 | 0, 66473 | 0); wasm2js_trap(); } } } } } - HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 72 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 76 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0, 59 | 0) | 0; $159_1 = HEAP32[($3_1 + 72 | 0) >> 2] | 0; global$0 = $3_1 + 80 | 0; @@ -40303,11 +40480,11 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 8 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 8 | 0) | 0; $8_1 = $414(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = $8_1; label$1 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { break label$1 } $20_1 = $216(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -40325,8 +40502,8 @@ function asmFunc(imports) { $3_1 = global$0 - 64 | 0; global$0 = $3_1; HEAP32[($3_1 + 60 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 56 | 0) >> 2] = $821(1 | 0, 32 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 56 | 0) >> 2] = $822(1 | 0, 32 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; HEAP32[($3_1 + 48 | 0) >> 2] = 0; i64toi32_i32$0 = 0; $172_1 = 0; @@ -40342,21 +40519,21 @@ function asmFunc(imports) { i64toi32_i32$1 = $3_1; HEAP32[($3_1 + 16 | 0) >> 2] = $172_1; HEAP32[($3_1 + 20 | 0) >> 2] = i64toi32_i32$0; - $247((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 268 | 0 | 0, $3_1 + 16 | 0 | 0); + $247((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 272 | 0 | 0, $3_1 + 16 | 0 | 0); label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0)) { break label$2 } $152(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; label$3 : { - if ((HEAP32[((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 2 | 0) { + if ((HEAP32[((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 2 | 0) { break label$3 } - if (($2(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { + if (($2(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$3 } - $239(2048 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 72896 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 72954 | 0, 0 | 0); } $157(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, 40 | 0) | 0; label$4 : { @@ -40385,34 +40562,34 @@ function asmFunc(imports) { break label$6 } } - $213(32 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 71500 | 0, 0 | 0) | 0; + $213(32 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0, 71573 | 0, 0 | 0) | 0; } $157(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, 41 | 0) | 0; $104_1 = $522(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 12 | 0) >> 2] = $104_1; label$8 : { label$9 : { - if (!((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } label$10 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9011 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9011 | 0) & 1 | 0)) { break label$10 } - HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; $128_1 = $522(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] = $128_1; } break label$8; } - $156(45 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 292 | 0) >> 2] | 0 | 0, 72702 | 0, 0 | 0); + $156(45 | 0, HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0, 72760 | 0, 0 | 0); } break label$1; } label$11 : { label$12 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9033 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9033 | 0) & 1 | 0)) { break label$12 } $152(HEAP32[($3_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -40424,12 +40601,12 @@ function asmFunc(imports) { HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 12 | 0) >> 2] = $154_1; break label$11; } - fimport$0(72213 | 0, 74032 | 0, 27495 | 0, 66474 | 0); + fimport$0(72286 | 0, 74090 | 0, 27581 | 0, 66499 | 0); wasm2js_trap(); } } - HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; - $249((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 268 | 0 | 0); + HEAP32[((HEAP32[($3_1 + 56 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; + $249((HEAP32[($3_1 + 60 | 0) >> 2] | 0) + 272 | 0 | 0); $359($3_1 + 16 | 0 | 0); $169_1 = HEAP32[($3_1 + 56 | 0) >> 2] | 0; global$0 = $3_1 + 64 | 0; @@ -40442,17 +40619,17 @@ function asmFunc(imports) { $3_1 = global$0 - 48 | 0; global$0 = $3_1; HEAP32[($3_1 + 44 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 40 | 0) >> 2] = $821(1 | 0, 28 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 40 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 40 | 0) >> 2] = $822(1 | 0, 28 | 0) | 0; + HEAP32[(HEAP32[($3_1 + 40 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9008 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9008 | 0) & 1 | 0)) { break label$2 } $152(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; $21_1 = $522(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 40 | 0) >> 2] | 0) + 8 | 0) >> 2] = $21_1; - HEAP32[((HEAP32[($3_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 9041 | 0) | 0; $157(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 40 | 0) | 0; $31_1 = $216(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -40463,7 +40640,7 @@ function asmFunc(imports) { } label$3 : { label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9041 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9041 | 0) & 1 | 0)) { break label$4 } $152(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -40476,7 +40653,7 @@ function asmFunc(imports) { break label$3; } label$5 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0) & 1 | 0)) { break label$5 } $152(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -40501,11 +40678,11 @@ function asmFunc(imports) { i64toi32_i32$1 = $3_1; HEAP32[$3_1 >> 2] = $174_1; HEAP32[($3_1 + 4 | 0) >> 2] = i64toi32_i32$0; - $247((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 268 | 0 | 0, $3_1 | 0); + $247((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 272 | 0 | 0, $3_1 | 0); $89_1 = $424(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 0 | 0, 4096 | 0) | 0; HEAP32[((HEAP32[($3_1 + 40 | 0) >> 2] | 0) + 24 | 0) >> 2] = $89_1; label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { break label$8 } $101_1 = $216(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -40513,7 +40690,7 @@ function asmFunc(imports) { } $157(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 59 | 0) | 0; label$9 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { break label$9 } $115_1 = $216(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -40522,12 +40699,12 @@ function asmFunc(imports) { $157(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 41 | 0) | 0; $120_1 = $522(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 40 | 0) >> 2] | 0) + 8 | 0) >> 2] = $120_1; - $249((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 268 | 0 | 0); + $249((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 272 | 0 | 0); $359($3_1 | 0); break label$6; } label$10 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { break label$10 } $136_1 = $216(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -40535,7 +40712,7 @@ function asmFunc(imports) { } $157(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 59 | 0) | 0; label$11 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (59 | 0) & 1 | 0)) { break label$11 } $150_1 = $216(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -40543,7 +40720,7 @@ function asmFunc(imports) { } $157(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 59 | 0) | 0; label$12 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { break label$12 } $164_1 = $216(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; @@ -40567,16 +40744,16 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; label$1 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9009 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9009 | 0) & 1 | 0)) { break label$1 } - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; $21_1 = $522(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = $21_1; - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; } $26_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; global$0 = $3_1 + 16 | 0; @@ -40589,34 +40766,34 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 24 | 0) | 0; - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 24 | 0) | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$1 : { - if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9035 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9035 | 0) & 1 | 0) { break label$1 } - fimport$0(74192 | 0, 74032 | 0, 27370 | 0, 66395 | 0); + fimport$0(74250 | 0, 74090 | 0, 27456 | 0, 66395 | 0); wasm2js_trap(); } - HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 280 | 0) >> 2] | 0; - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 280 | 0) >> 2] = HEAP32[($3_1 + 8 | 0) >> 2] | 0; + HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 284 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 284 | 0) >> 2] = HEAP32[($3_1 + 8 | 0) >> 2] | 0; $27_1 = HEAP32[($3_1 + 12 | 0) >> 2] | 0; - HEAP32[($27_1 + 304 | 0) >> 2] = (HEAP32[($27_1 + 304 | 0) >> 2] | 0) + 1 | 0; - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; + HEAP32[($27_1 + 308 | 0) >> 2] = (HEAP32[($27_1 + 308 | 0) >> 2] | 0) + 1 | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0; $157(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 9035 | 0) | 0; $37_1 = $522(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = $37_1; - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 280 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 284 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0; label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9006 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9006 | 0) & 1 | 0)) { break label$2 } - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; $55_1 = $522(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $55_1; } - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; $60_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; global$0 = $3_1 + 16 | 0; return $60_1 | 0; @@ -40659,10 +40836,10 @@ function asmFunc(imports) { label$6 : while (1) { $38_1 = 0; label$7 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - $38_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0); + $38_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0); } label$8 : { if (!($38_1 & 1 | 0)) { @@ -40708,12 +40885,12 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $523(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0); - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 12 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + $523(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0); + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 12 | 0) | 0; + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; $14_1 = $509(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = $14_1; - HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; $524(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $22_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; global$0 = $3_1 + 16 | 0; @@ -40821,7 +40998,7 @@ function asmFunc(imports) { $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); $528(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0); $357(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -40842,7 +41019,7 @@ function asmFunc(imports) { $357(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); $401(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $178(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -40860,7 +41037,7 @@ function asmFunc(imports) { } $357(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $357(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -40885,10 +41062,10 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 27784 | 0, 72007 | 0); + fimport$0(76208 | 0, 74090 | 0, 27870 | 0, 72080 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -40911,10 +41088,10 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(75806 | 0, 74032 | 0, 27250 | 0, 72093 | 0); + fimport$0(76208 | 0, 74090 | 0, 27336 | 0, 72166 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -40926,24 +41103,24 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 20 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 20 | 0) | 0; HEAP32[($3_1 + 4 | 0) >> 2] = $414(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; - HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0; + HEAP32[(HEAP32[($3_1 + 8 | 0) >> 2] | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9045 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9045 | 0) & 1 | 0)) { break label$2 } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; label$3 : { label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0)) { break label$4 } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; label$5 : { label$6 : while (1) { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (125 | 0) & 1 | 0)) { break label$5 } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -40955,17 +41132,17 @@ function asmFunc(imports) { } label$7 : { label$8 : while (1) { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) != (10 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) != (10 | 0) & 1 | 0)) { break label$7 } - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; continue label$8; }; } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; } label$9 : { - if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (59 | 0) & 1 | 0)) { break label$9 } $152(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -41056,7 +41233,7 @@ function asmFunc(imports) { if (($440(HEAP32[((HEAP32[($5_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$5 } - $239(2048 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67776 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67849 | 0, 0 | 0); } break label$1; } @@ -41068,7 +41245,7 @@ function asmFunc(imports) { if (($532(HEAP32[((HEAP32[($5_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$7 } - $239(2048 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67811 | 0, 0 | 0); + $239(2048 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 67884 | 0, 0 | 0); } } } @@ -41174,7 +41351,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - fimport$0(75859 | 0, 74032 | 0, 27765 | 0, 73630 | 0); + fimport$0(76261 | 0, 74090 | 0, 27851 | 0, 73688 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -41219,7 +41396,7 @@ function asmFunc(imports) { HEAP32[($0_1 + 4 | 0) >> 2] = i64toi32_i32$0; label$1 : { label$2 : while (1) { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } $533($0_1 | 0, $536(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0 | 0); @@ -41250,7 +41427,7 @@ function asmFunc(imports) { global$0 = $5_1; HEAP32[($5_1 + 44 | 0) >> 2] = $1_1; HEAP32[($5_1 + 40 | 0) >> 2] = $2_1; - HEAP32[(0 + 101988 | 0) >> 2] = 0; + HEAP32[(0 + 102564 | 0) >> 2] = 0; HEAP32[($5_1 + 32 | 0) >> 2] = 0; i64toi32_i32$0 = 0; $34_1 = 0; @@ -41266,15 +41443,15 @@ function asmFunc(imports) { i64toi32_i32$1 = $5_1; HEAP32[$5_1 >> 2] = $34_1; HEAP32[($5_1 + 4 | 0) >> 2] = i64toi32_i32$0; - $247((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 268 | 0 | 0, $5_1 | 0); + $247((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 272 | 0 | 0, $5_1 | 0); i64toi32_i32$2 = HEAP32[($5_1 + 40 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $87_1 = i64toi32_i32$0; - i64toi32_i32$0 = (HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 288 | 0; + i64toi32_i32$0 = (HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 292 | 0; HEAP32[i64toi32_i32$0 >> 2] = $87_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 288 | 0) >> 2] | 0; + HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 292 | 0) >> 2] | 0; $159(HEAP32[($5_1 + 44 | 0) >> 2] | 0 | 0) | 0; $535($0_1 | 0, HEAP32[($5_1 + 44 | 0) >> 2] | 0 | 0); $538(HEAP32[($5_1 + 44 | 0) >> 2] | 0 | 0); @@ -41292,17 +41469,17 @@ function asmFunc(imports) { HEAP32[($3_1 + 24 | 0) >> 2] = 0; label$1 : { label$2 : while (1) { - if (!((HEAP32[($3_1 + 24 | 0) >> 2] | 0 | 0) < (HEAP32[((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 268 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[($3_1 + 24 | 0) >> 2] | 0 | 0) < (HEAP32[((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$1 } label$3 : { label$4 : { - if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 268 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$4 } break label$3; } - HEAP32[($3_1 + 20 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 268 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + ((HEAP32[($3_1 + 24 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; + HEAP32[($3_1 + 20 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 272 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + ((HEAP32[($3_1 + 24 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; label$5 : { label$6 : while (1) { if (!((HEAP32[($3_1 + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -41357,7 +41534,7 @@ function asmFunc(imports) { $107_1 = HEAP32[($3_1 + 28 | 0) >> 2] | 0; $109_1 = HEAP32[((HEAP32[($3_1 + 16 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; HEAP32[$3_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 16 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $213(2 | 0, $107_1 | 0, $109_1 | 0, 73437 | 0, $3_1 | 0) | 0; + $213(2 | 0, $107_1 | 0, $109_1 | 0, 73495 | 0, $3_1 | 0) | 0; } } HEAP32[($3_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[($3_1 + 20 | 0) >> 2] | 0) >> 2] | 0; @@ -41382,66 +41559,66 @@ function asmFunc(imports) { function $540($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; - var $4_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, $143_1 = 0, $142_1 = 0, $56_1 = 0, $148_1 = 0, $99_1 = 0, $100_1 = 0, $271_1 = 0, $295_1 = 0, $325_1 = 0, $357_1 = 0, $370_1 = 0, $139_1 = 0; + var $4_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, $135_1 = 0, $134_1 = 0, $56_1 = 0, $140_1 = 0, $98_1 = 0, $263_1 = 0, $287_1 = 0, $317_1 = 0, $346_1 = 0, $359_1 = 0, $131_1 = 0; $4_1 = global$0 - 1056 | 0; global$0 = $4_1; HEAP32[($4_1 + 1052 | 0) >> 2] = $0_1; HEAP32[($4_1 + 1048 | 0) >> 2] = $1_1; i64toi32_i32$0 = 0; - $142_1 = 0; + $134_1 = 0; i64toi32_i32$1 = $4_1 + 1040 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $142_1; + HEAP32[i64toi32_i32$1 >> 2] = $134_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 1032 | 0) >> 2] = $142_1; + HEAP32[($4_1 + 1032 | 0) >> 2] = $134_1; HEAP32[($4_1 + 1036 | 0) >> 2] = i64toi32_i32$0; HEAP32[($4_1 + 1028 | 0) >> 2] = 0; - $724($4_1 + 700 | 0 | 0, 0 | 0, 328 | 0) | 0; + $725($4_1 + 696 | 0 | 0, 0 | 0, 332 | 0) | 0; HEAP32[($4_1 + 976 | 0) >> 2] = 5e3; - $122($4_1 + 700 | 0 | 0); + $122($4_1 + 696 | 0 | 0); i64toi32_i32$0 = 0; - $143_1 = 0; + $135_1 = 0; i64toi32_i32$1 = $4_1 + 688 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $143_1; + HEAP32[i64toi32_i32$1 >> 2] = $135_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 680 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $143_1; + HEAP32[i64toi32_i32$1 >> 2] = $135_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 672 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $143_1; + HEAP32[i64toi32_i32$1 >> 2] = $135_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 664 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $143_1; + HEAP32[i64toi32_i32$1 >> 2] = $135_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 656 | 0) >> 2] = $143_1; + HEAP32[($4_1 + 656 | 0) >> 2] = $135_1; HEAP32[($4_1 + 660 | 0) >> 2] = i64toi32_i32$0; - $724($4_1 + 340 | 0 | 0, 0 | 0, 316 | 0) | 0; - $723($4_1 + 340 | 0 | 0, HEAP32[($4_1 + 1052 | 0) >> 2] | 0 | 0, 268 | 0) | 0; + $725($4_1 + 336 | 0 | 0, 0 | 0, 320 | 0) | 0; + $724($4_1 + 336 | 0 | 0, HEAP32[($4_1 + 1052 | 0) >> 2] | 0 | 0, 272 | 0) | 0; HEAP32[($4_1 + 652 | 0) >> 2] = $4_1 + 656 | 0; - $724($4_1 + 64 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 56 | 0 | 0, 0 | 0, 280 | 0) | 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 56 | 0) >> 2] = 0; - HEAP32[($4_1 + 60 | 0) >> 2] = i64toi32_i32$0; - $723($4_1 + 700 | 0 | 0, HEAP32[($4_1 + 1052 | 0) >> 2] | 0 | 0, 268 | 0) | 0; - $539($4_1 + 700 | 0 | 0); + HEAP32[($4_1 + 48 | 0) >> 2] = 0; + HEAP32[($4_1 + 52 | 0) >> 2] = i64toi32_i32$0; + $724($4_1 + 696 | 0 | 0, HEAP32[($4_1 + 1052 | 0) >> 2] | 0 | 0, 272 | 0) | 0; + $539($4_1 + 696 | 0 | 0); $56_1 = 0; - $75($4_1 + 48 | 0 | 0, $4_1 + 64 | 0 | 0, HEAP32[($4_1 + 1048 | 0) >> 2] | 0 | 0, 101055 | 0, $56_1 | 0, $56_1 | 0); + $75($4_1 + 40 | 0 | 0, $4_1 + 56 | 0 | 0, HEAP32[($4_1 + 1048 | 0) >> 2] | 0 | 0, 101635 | 0, $56_1 | 0, $56_1 | 0); i64toi32_i32$2 = $4_1; - i64toi32_i32$0 = HEAP32[($4_1 + 48 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[($4_1 + 52 | 0) >> 2] | 0; - $271_1 = i64toi32_i32$0; + i64toi32_i32$0 = HEAP32[($4_1 + 40 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($4_1 + 44 | 0) >> 2] | 0; + $263_1 = i64toi32_i32$0; i64toi32_i32$0 = $4_1; - HEAP32[($4_1 + 56 | 0) >> 2] = $271_1; - HEAP32[($4_1 + 60 | 0) >> 2] = i64toi32_i32$1; - $95($4_1 + 40 | 0 | 0, $4_1 + 700 | 0 | 0, $4_1 + 56 | 0 | 0, 0 | 0); + HEAP32[($4_1 + 48 | 0) >> 2] = $263_1; + HEAP32[($4_1 + 52 | 0) >> 2] = i64toi32_i32$1; + $95($4_1 + 32 | 0 | 0, $4_1 + 696 | 0 | 0, $4_1 + 48 | 0 | 0, 0 | 0); i64toi32_i32$2 = $4_1; - i64toi32_i32$1 = HEAP32[($4_1 + 40 | 0) >> 2] | 0; - i64toi32_i32$0 = HEAP32[($4_1 + 44 | 0) >> 2] | 0; - $295_1 = i64toi32_i32$1; + i64toi32_i32$1 = HEAP32[($4_1 + 32 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[($4_1 + 36 | 0) >> 2] | 0; + $287_1 = i64toi32_i32$1; i64toi32_i32$1 = $4_1 + 1032 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $295_1; + HEAP32[i64toi32_i32$1 >> 2] = $287_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; label$1 : { label$2 : { @@ -41451,13 +41628,13 @@ function asmFunc(imports) { } break label$2; } - $537($4_1 + 32 | 0 | 0, $4_1 + 340 | 0 | 0, $4_1 + 1032 | 0 | 0); + $537($4_1 + 24 | 0 | 0, $4_1 + 336 | 0 | 0, $4_1 + 1032 | 0 | 0); i64toi32_i32$2 = $4_1; - i64toi32_i32$0 = HEAP32[($4_1 + 32 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[($4_1 + 36 | 0) >> 2] | 0; - $325_1 = i64toi32_i32$0; + i64toi32_i32$0 = HEAP32[($4_1 + 24 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($4_1 + 28 | 0) >> 2] | 0; + $317_1 = i64toi32_i32$0; i64toi32_i32$0 = ($4_1 + 1032 | 0) + 8 | 0; - HEAP32[i64toi32_i32$0 >> 2] = $325_1; + HEAP32[i64toi32_i32$0 >> 2] = $317_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; label$4 : { if (!((HEAP32[($4_1 + 672 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { @@ -41465,54 +41642,53 @@ function asmFunc(imports) { } break label$2; } - HEAP32[($4_1 + 24 | 0) >> 2] = 0; + HEAP32[($4_1 + 16 | 0) >> 2] = 0; i64toi32_i32$1 = 0; - $148_1 = 0; - i64toi32_i32$0 = $4_1 + 16 | 0; - HEAP32[i64toi32_i32$0 >> 2] = $148_1; + $140_1 = 0; + i64toi32_i32$0 = $4_1 + 8 | 0; + HEAP32[i64toi32_i32$0 >> 2] = $140_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; i64toi32_i32$0 = $4_1; - HEAP32[($4_1 + 8 | 0) >> 2] = $148_1; - HEAP32[($4_1 + 12 | 0) >> 2] = i64toi32_i32$1; - $99_1 = $4_1 + 8 | 0; + HEAP32[$4_1 >> 2] = $140_1; + HEAP32[($4_1 + 4 | 0) >> 2] = i64toi32_i32$1; i64toi32_i32$2 = $4_1; i64toi32_i32$1 = HEAP32[($4_1 + 1032 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($4_1 + 1036 | 0) >> 2] | 0; - $357_1 = i64toi32_i32$1; - i64toi32_i32$1 = $99_1; - HEAP32[i64toi32_i32$1 >> 2] = $357_1; - HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - $100_1 = 8; - i64toi32_i32$2 = ($4_1 + 1032 | 0) + $100_1 | 0; + $346_1 = i64toi32_i32$1; + i64toi32_i32$1 = $4_1; + HEAP32[$4_1 >> 2] = $346_1; + HEAP32[($4_1 + 4 | 0) >> 2] = i64toi32_i32$0; + $98_1 = 8; + i64toi32_i32$2 = ($4_1 + 1032 | 0) + $98_1 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; - $370_1 = i64toi32_i32$0; - i64toi32_i32$0 = $99_1 + $100_1 | 0; - HEAP32[i64toi32_i32$0 >> 2] = $370_1; + $359_1 = i64toi32_i32$0; + i64toi32_i32$0 = $4_1 + $98_1 | 0; + HEAP32[i64toi32_i32$0 >> 2] = $359_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; - $541($4_1 + 8 | 0 | 0); + $541($4_1 | 0); label$5 : { label$6 : { if (!((HEAPU8[((HEAP32[($4_1 + 1052 | 0) >> 2] | 0) + 61 | 0) >> 0] | 0) & 1 | 0)) { break label$6 } - HEAP32[($4_1 + 1028 | 0) >> 2] = $124($4_1 + 8 | 0 | 0) | 0; + HEAP32[($4_1 + 1028 | 0) >> 2] = $124($4_1 | 0) | 0; break label$5; } - HEAP32[($4_1 + 1028 | 0) >> 2] = $123($4_1 + 8 | 0 | 0, (HEAPU8[((HEAP32[($4_1 + 1052 | 0) >> 2] | 0) + 57 | 0) >> 0] | 0) & 1 | 0 | 0) | 0; + HEAP32[($4_1 + 1028 | 0) >> 2] = $123($4_1 | 0, (HEAPU8[((HEAP32[($4_1 + 1052 | 0) >> 2] | 0) + 57 | 0) >> 0] | 0) & 1 | 0 | 0) | 0; } if (!(0 & 1 | 0)) { break label$1 } } } - $11($4_1 + 56 | 0 | 0); - $360($4_1 + 340 | 0 | 0); + $11($4_1 + 48 | 0 | 0); + $360($4_1 + 336 | 0 | 0); $542($4_1 + 1032 | 0 | 0); - $40($4_1 + 700 | 0 | 0); - $139_1 = HEAP32[($4_1 + 1028 | 0) >> 2] | 0; + $40($4_1 + 696 | 0 | 0); + $131_1 = HEAP32[($4_1 + 1028 | 0) >> 2] | 0; global$0 = $4_1 + 1056 | 0; - return $139_1 | 0; + return $131_1 | 0; } function $541($0_1) { @@ -41672,8 +41848,8 @@ function asmFunc(imports) { HEAP32[($3_1 + 184 | 0) >> 2] = 0; HEAP32[($3_1 + 188 | 0) >> 2] = i64toi32_i32$0; HEAP32[($3_1 + 48 | 0) >> 2] = (HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 2 | 0; - $13($3_1 + 184 | 0 | 0, 84845 | 0, $3_1 + 48 | 0 | 0) | 0; - $817(HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $13($3_1 + 184 | 0 | 0, 85402 | 0, $3_1 + 48 | 0 | 0) | 0; + $818(HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($3_1 + 184 | 0) >> 2] | 0; } break label$5; @@ -41703,11 +41879,11 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$12 } - if ($760(HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71472 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71545 | 0) | 0) { break label$12 } - $817(HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $110_1 = $763(86867 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $110_1 = $764(87447 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] = $110_1; HEAP32[($3_1 + 200 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; continue label$2; @@ -41716,11 +41892,11 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$13 } - if ($760(HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71463 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 71536 | 0) | 0) { break label$13 } - $817(HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $133_1 = $763(86881 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $133_1 = $764(87461 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] = $133_1; HEAP32[($3_1 + 200 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; continue label$2; @@ -41752,7 +41928,7 @@ function asmFunc(imports) { $194_1 = 24; $568(HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, (39 << $194_1 | 0) >> $194_1 | 0 | 0) | 0; HEAP32[(HEAP32[($3_1 + 200 | 0) >> 2] | 0) >> 2] = 137; - HEAP32[($3_1 + 180 | 0) >> 2] = $789((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 2 | 0 | 0, 0 | 0, 2 | 0) | 0; + HEAP32[($3_1 + 180 | 0) >> 2] = $790((HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 2 | 0 | 0, 0 | 0, 2 | 0) | 0; $28_1 = $3_1 + 175 | 0; $29_1 = 0; HEAP8[$28_1 >> 0] = $29_1; @@ -41776,9 +41952,9 @@ function asmFunc(imports) { HEAP8[($3_1 + 144 | 0) >> 0] = 48; HEAP8[($3_1 + 145 | 0) >> 0] = 120; HEAP32[$3_1 >> 2] = HEAP32[($3_1 + 180 | 0) >> 2] | 0; - $756($3_1 + 144 | 0 | 0, 35 | 0, 65953 | 0, $3_1 | 0) | 0; - $817(HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $226_1 = $763($3_1 + 144 | 0 | 0) | 0; + $757($3_1 + 144 | 0 | 0, 35 | 0, 65953 | 0, $3_1 | 0) | 0; + $818(HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $226_1 = $764($3_1 + 144 | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] = $226_1; break label$14; } @@ -41794,7 +41970,7 @@ function asmFunc(imports) { break label$19 } $252_1 = 0; - $785($3_1 + 16 | 0 | 0, HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $252_1 | 0); + $786($3_1 + 16 | 0 | 0, HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $252_1 | 0); $255_1 = 8; i64toi32_i32$2 = ($3_1 + 16 | 0) + $255_1 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -41852,9 +42028,9 @@ function asmFunc(imports) { i64toi32_i32$1 = $3_1; HEAP32[($3_1 + 40 | 0) >> 2] = $342_1; HEAP32[($3_1 + 44 | 0) >> 2] = i64toi32_i32$0; - $756($3_1 + 64 | 0 | 0, 50 | 0, 71359 | 0, $3_1 + 32 | 0 | 0) | 0; - $817(HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $284_1 = $763($3_1 + 64 | 0 | 0) | 0; + $757($3_1 + 64 | 0 | 0, 50 | 0, 71432 | 0, $3_1 + 32 | 0 | 0) | 0; + $818(HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $284_1 = $764($3_1 + 64 | 0 | 0) | 0; HEAP32[((HEAP32[($3_1 + 200 | 0) >> 2] | 0) + 4 | 0) >> 2] = $284_1; } break label$17; @@ -41895,172 +42071,172 @@ function asmFunc(imports) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0, $116_1 = 0, $138_1 = 0, $179_1 = 0, $281_1 = 0, i64toi32_i32$0 = 0; - $4_1 = global$0 - 624 | 0; + $4_1 = global$0 - 640 | 0; global$0 = $4_1; - HEAP32[($4_1 + 620 | 0) >> 2] = $0_1; - HEAP32[($4_1 + 616 | 0) >> 2] = $1_1; + HEAP32[($4_1 + 636 | 0) >> 2] = $0_1; + HEAP32[($4_1 + 632 | 0) >> 2] = $1_1; label$1 : { - if (!((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $570(HEAP32[($4_1 + 620 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $570(HEAP32[($4_1 + 636 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); } label$2 : { - if (!((HEAP32[(HEAP32[($4_1 + 616 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($4_1 + 632 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $571(HEAP32[($4_1 + 620 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 616 | 0) >> 2] | 0) >> 2] | 0 | 0); + $571(HEAP32[($4_1 + 636 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 632 | 0) >> 2] | 0) >> 2] | 0 | 0); } label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } label$4 : { label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $572(HEAP32[($4_1 + 620 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, (HEAP32[(HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0); + $572(HEAP32[($4_1 + 636 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, (HEAP32[(HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 72 | 0 | 0); break label$4; } - $572(HEAP32[($4_1 + 620 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, 0 | 0); + $572(HEAP32[($4_1 + 636 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, 0 | 0); } } label$6 : { - if (!((HEAP32[(HEAP32[($4_1 + 616 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($4_1 + 632 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } label$7 : { - if ((HEAPU8[(HEAP32[($4_1 + 620 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[(HEAP32[($4_1 + 636 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { break label$7 } - $5(HEAP32[(HEAP32[(HEAP32[($4_1 + 616 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($4_1 + 616 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 64 | 0); + $5(HEAP32[(HEAP32[(HEAP32[($4_1 + 632 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($4_1 + 632 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 64 | 0); } } label$8 : { - if (!((HEAPU8[(HEAP32[($4_1 + 620 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[(HEAP32[($4_1 + 636 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0)) { break label$8 } label$9 : { - if (!((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } - if (!((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (32768 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (32768 | 0) & 1 | 0)) { break label$9 } label$10 : { - if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 244 | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 244 | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { break label$10 } - $724($4_1 + 340 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 352 | 0 | 0, 0 | 0, 280 | 0) | 0; $116_1 = 0; - $75($4_1 + 332 | 0 | 0, $4_1 + 340 | 0 | 0, 86786 | 0, $116_1 | 0, $116_1 | 0, 1 | 0); - $22((HEAP32[($4_1 + 620 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 332 | 0 | 0); - $11($4_1 + 332 | 0 | 0); + $75($4_1 + 344 | 0 | 0, $4_1 + 352 | 0 | 0, 87343 | 0, $116_1 | 0, $116_1 | 0, 1 | 0); + $22((HEAP32[($4_1 + 636 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 344 | 0 | 0); + $11($4_1 + 344 | 0 | 0); $138_1 = 0; - $75($4_1 + 324 | 0 | 0, $4_1 + 340 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $138_1 | 0, $138_1 | 0, 1 | 0); - $22((HEAP32[($4_1 + 620 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 324 | 0 | 0); - $11($4_1 + 324 | 0 | 0); - HEAP32[($4_1 + 320 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - HEAP32[($4_1 + 316 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; - HEAP32[($4_1 + 312 | 0) >> 2] = HEAP32[($4_1 + 320 | 0) >> 2] | 0; + $75($4_1 + 336 | 0 | 0, $4_1 + 352 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $138_1 | 0, $138_1 | 0, 1 | 0); + $22((HEAP32[($4_1 + 636 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 336 | 0 | 0); + $11($4_1 + 336 | 0 | 0); + HEAP32[($4_1 + 332 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($4_1 + 328 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; + HEAP32[($4_1 + 324 | 0) >> 2] = HEAP32[($4_1 + 332 | 0) >> 2] | 0; label$11 : { label$12 : while (1) { - if (!((HEAP32[($4_1 + 312 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 324 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[($4_1 + 328 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$11 } - $19((HEAP32[($4_1 + 620 | 0) >> 2] | 0) + 12 | 0 | 0, HEAP32[($4_1 + 312 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($4_1 + 312 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + $19((HEAP32[($4_1 + 636 | 0) >> 2] | 0) + 12 | 0 | 0, HEAP32[($4_1 + 324 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 324 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 324 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; continue label$12; }; } $179_1 = 0; - $75($4_1 + 304 | 0 | 0, $4_1 + 340 | 0 | 0, 97434 | 0, $179_1 | 0, $179_1 | 0, 1 | 0); - $22((HEAP32[($4_1 + 620 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 304 | 0 | 0); + $75($4_1 + 316 | 0 | 0, $4_1 + 352 | 0 | 0, 98014 | 0, $179_1 | 0, $179_1 | 0, 1 | 0); + $22((HEAP32[($4_1 + 636 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 316 | 0 | 0); label$13 : { label$14 : { - if (!((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$14 } - $5(HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, 64 | 0); + $5(HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, 64 | 0); break label$13; } - $5(HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, 64 | 0); + $5(HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, 64 | 0); } - $11($4_1 + 304 | 0 | 0); + $11($4_1 + 316 | 0 | 0); } } } label$15 : { - if (!((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$15 } - $573(HEAP32[($4_1 + 620 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 12 | 0 | 0); + $573(HEAP32[($4_1 + 636 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 12 | 0 | 0); } label$16 : { - if (!((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$16 } - HEAP8[((HEAP32[($4_1 + 620 | 0) >> 2] | 0) + 1 | 0) >> 0] = 0; - HEAP8[(HEAP32[($4_1 + 620 | 0) >> 2] | 0) >> 0] = 0; - HEAP32[($4_1 + 300 | 0) >> 2] = $566(HEAP32[($4_1 + 620 | 0) >> 2] | 0 | 0) | 0; - HEAP32[((HEAP32[($4_1 + 300 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $574(HEAP32[($4_1 + 620 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); + HEAP8[((HEAP32[($4_1 + 636 | 0) >> 2] | 0) + 1 | 0) >> 0] = 0; + HEAP8[(HEAP32[($4_1 + 636 | 0) >> 2] | 0) >> 0] = 0; + HEAP32[($4_1 + 312 | 0) >> 2] = $566(HEAP32[($4_1 + 636 | 0) >> 2] | 0 | 0) | 0; + HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; + $574(HEAP32[($4_1 + 636 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); label$17 : { label$18 : { - if (($575(HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { + if (($575(HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$18 } - HEAP32[($4_1 + 296 | 0) >> 2] = 0; + HEAP32[($4_1 + 304 | 0) >> 2] = 0; i64toi32_i32$0 = 0; - HEAP32[($4_1 + 288 | 0) >> 2] = 0; - HEAP32[($4_1 + 292 | 0) >> 2] = i64toi32_i32$0; - $556(HEAP32[($4_1 + 300 | 0) >> 2] | 0 | 0, $4_1 + 288 | 0 | 0, 1 & 1 | 0 | 0); + HEAP32[($4_1 + 296 | 0) >> 2] = 0; + HEAP32[($4_1 + 300 | 0) >> 2] = i64toi32_i32$0; + $556(HEAP32[($4_1 + 312 | 0) >> 2] | 0 | 0, $4_1 + 296 | 0 | 0, 1 & 1 | 0 | 0); label$19 : { - if (!((HEAP32[($4_1 + 292 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 300 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$19 } - $724($4_1 + 12 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 16 | 0 | 0, 0 | 0, 280 | 0) | 0; $281_1 = 0; - $75($4_1 + 4 | 0 | 0, $4_1 + 12 | 0 | 0, HEAP32[($4_1 + 288 | 0) >> 2] | 0 | 0, $281_1 | 0, $281_1 | 0, 1 | 0); - $16((HEAP32[($4_1 + 620 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 4 | 0 | 0); - $11($4_1 + 4 | 0 | 0); + $75($4_1 + 8 | 0 | 0, $4_1 + 16 | 0 | 0, HEAP32[($4_1 + 296 | 0) >> 2] | 0 | 0, $281_1 | 0, $281_1 | 0, 1 | 0); + $16((HEAP32[($4_1 + 636 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); + $11($4_1 + 8 | 0 | 0); } - $14($4_1 + 288 | 0 | 0); + $14($4_1 + 296 | 0 | 0); break label$17; } - $557(HEAP32[($4_1 + 300 | 0) >> 2] | 0 | 0); + $557(HEAP32[($4_1 + 312 | 0) >> 2] | 0 | 0); } - $567(HEAP32[($4_1 + 620 | 0) >> 2] | 0 | 0); + $567(HEAP32[($4_1 + 636 | 0) >> 2] | 0 | 0); label$20 : { - if (!((HEAPU8[((HEAP32[($4_1 + 620 | 0) >> 2] | 0) + 1 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($4_1 + 636 | 0) >> 2] | 0) + 1 | 0) >> 0] | 0) & 1 | 0)) { break label$20 } - HEAP8[(HEAP32[($4_1 + 620 | 0) >> 2] | 0) >> 0] = 1; - $574(HEAP32[($4_1 + 620 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); + HEAP8[(HEAP32[($4_1 + 636 | 0) >> 2] | 0) >> 0] = 1; + $574(HEAP32[($4_1 + 636 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); } } label$21 : { - if (!((HEAPU8[((HEAP32[($4_1 + 620 | 0) >> 2] | 0) + 3 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($4_1 + 636 | 0) >> 2] | 0) + 3 | 0) >> 0] | 0) & 1 | 0)) { break label$21 } - if (!((HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$21 } label$22 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$22 } - if (HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) { + if (HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) { break label$22 } - if (!((HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$22 } - $5(HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 616 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0, 64 | 0); + $5(HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 632 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0, 64 | 0); } } - global$0 = $4_1 + 624 | 0; + global$0 = $4_1 + 640 | 0; return; } @@ -42093,54 +42269,54 @@ function asmFunc(imports) { $2_1 = $2_1 | 0; $3_1 = $3_1 | 0; $4_1 = $4_1 | 0; - var $7_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $74_1 = 0, $22_1 = 0, $165_1 = 0, $204_1 = 0; - $7_1 = global$0 - 960 | 0; + var $7_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $76_1 = 0, $22_1 = 0, $167_1 = 0, $209_1 = 0; + $7_1 = global$0 - 976 | 0; global$0 = $7_1; - HEAP32[($7_1 + 956 | 0) >> 2] = $1_1; - HEAP32[($7_1 + 952 | 0) >> 2] = $2_1; - HEAP32[($7_1 + 948 | 0) >> 2] = $3_1; - HEAP32[($7_1 + 944 | 0) >> 2] = $4_1; + HEAP32[($7_1 + 972 | 0) >> 2] = $1_1; + HEAP32[($7_1 + 968 | 0) >> 2] = $2_1; + HEAP32[($7_1 + 964 | 0) >> 2] = $3_1; + HEAP32[($7_1 + 960 | 0) >> 2] = $4_1; i64toi32_i32$0 = 0; - $74_1 = 0; + $76_1 = 0; i64toi32_i32$1 = $0_1; - HEAP32[i64toi32_i32$1 >> 2] = $74_1; + HEAP32[i64toi32_i32$1 >> 2] = $76_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = i64toi32_i32$1 + 8 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $74_1; + HEAP32[i64toi32_i32$1 >> 2] = $76_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - $724($7_1 + 668 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($7_1 + 680 | 0 | 0, 0 | 0, 280 | 0) | 0; $22_1 = 0; - $75($7_1 + 660 | 0 | 0, $7_1 + 668 | 0 | 0, HEAP32[($7_1 + 948 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 952 | 0) >> 2] | 0 | 0, $22_1 | 0, $22_1 | 0); - $724($7_1 + 332 | 0 | 0, 0 | 0, 328 | 0) | 0; - $723($7_1 + 332 | 0 | 0, HEAP32[($7_1 + 956 | 0) >> 2] | 0 | 0, 268 | 0) | 0; - HEAP32[($7_1 + 608 | 0) >> 2] = 5e3; - $122($7_1 + 332 | 0 | 0); - $95($7_1 + 324 | 0 | 0, $7_1 + 332 | 0 | 0, $7_1 + 660 | 0 | 0, 0 | 0); - i64toi32_i32$0 = HEAP32[($7_1 + 324 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[($7_1 + 328 | 0) >> 2] | 0; - $165_1 = i64toi32_i32$0; + $75($7_1 + 672 | 0 | 0, $7_1 + 680 | 0 | 0, HEAP32[($7_1 + 964 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 968 | 0) >> 2] | 0 | 0, $22_1 | 0, $22_1 | 0); + $725($7_1 + 340 | 0 | 0, 0 | 0, 332 | 0) | 0; + $724($7_1 + 340 | 0 | 0, HEAP32[($7_1 + 972 | 0) >> 2] | 0 | 0, 272 | 0) | 0; + HEAP32[($7_1 + 620 | 0) >> 2] = 5e3; + $122($7_1 + 340 | 0 | 0); + $95($7_1 + 332 | 0 | 0, $7_1 + 340 | 0 | 0, $7_1 + 672 | 0 | 0, 0 | 0); + i64toi32_i32$0 = HEAP32[($7_1 + 332 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($7_1 + 336 | 0) >> 2] | 0; + $167_1 = i64toi32_i32$0; i64toi32_i32$0 = $0_1; - HEAP32[i64toi32_i32$0 >> 2] = $165_1; + HEAP32[i64toi32_i32$0 >> 2] = $167_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; label$1 : { - if (HEAP32[($7_1 + 656 | 0) >> 2] | 0) { + if (HEAP32[($7_1 + 668 | 0) >> 2] | 0) { break label$1 } - $724($7_1 + 8 | 0 | 0, 0 | 0, 316 | 0) | 0; - $723($7_1 + 8 | 0 | 0, HEAP32[($7_1 + 956 | 0) >> 2] | 0 | 0, 268 | 0) | 0; - HEAP32[($7_1 + 320 | 0) >> 2] = HEAP32[($7_1 + 944 | 0) >> 2] | 0; - $537($7_1 | 0, $7_1 + 8 | 0 | 0, i64toi32_i32$0 | 0); - i64toi32_i32$1 = HEAP32[$7_1 >> 2] | 0; - i64toi32_i32$0 = HEAP32[($7_1 + 4 | 0) >> 2] | 0; - $204_1 = i64toi32_i32$1; + $725($7_1 + 12 | 0 | 0, 0 | 0, 320 | 0) | 0; + $724($7_1 + 12 | 0 | 0, HEAP32[($7_1 + 972 | 0) >> 2] | 0 | 0, 272 | 0) | 0; + HEAP32[($7_1 + 328 | 0) >> 2] = HEAP32[($7_1 + 960 | 0) >> 2] | 0; + $537($7_1 + 4 | 0 | 0, $7_1 + 12 | 0 | 0, i64toi32_i32$0 | 0); + i64toi32_i32$1 = HEAP32[($7_1 + 4 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[($7_1 + 8 | 0) >> 2] | 0; + $209_1 = i64toi32_i32$1; i64toi32_i32$1 = $0_1 + 8 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $204_1; + HEAP32[i64toi32_i32$1 >> 2] = $209_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - $360($7_1 + 8 | 0 | 0); + $360($7_1 + 12 | 0 | 0); } - $11($7_1 + 660 | 0 | 0); - $40($7_1 + 332 | 0 | 0); - global$0 = $7_1 + 960 | 0; + $11($7_1 + 672 | 0 | 0); + $40($7_1 + 340 | 0 | 0); + global$0 = $7_1 + 976 | 0; return; } @@ -42224,28 +42400,28 @@ function asmFunc(imports) { $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; var $5_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, $190_1 = 0, $189_1 = 0, $89_1 = 0, $118_1 = 0, $137_1 = 0, $138_1 = 0, $444_1 = 0, $448_1 = 0, $473_1 = 0, $486_1 = 0, $186_1 = 0; - $5_1 = global$0 - 1616 | 0; + $5_1 = global$0 - 1632 | 0; global$0 = $5_1; - HEAP32[($5_1 + 1612 | 0) >> 2] = $0_1; - HEAP32[($5_1 + 1608 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 1604 | 0) >> 2] = $2_1; - $724($5_1 + 1200 | 0 | 0, 0 | 0, 400 | 0) | 0; - $724($5_1 + 992 | 0 | 0, 0 | 0, 200 | 0) | 0; - HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 1612 | 0) >> 2] | 0; - $756($5_1 + 992 | 0 | 0, 200 | 0, 68023 | 0, $5_1 | 0) | 0; - HEAP32[($5_1 + 988 | 0) >> 2] = $550($5_1 + 992 | 0 | 0, 10 | 0, $5_1 + 1200 | 0 | 0) | 0; - HEAP32[($5_1 + 984 | 0) >> 2] = 0; - $724($5_1 + 656 | 0 | 0, 0 | 0, 328 | 0) | 0; + HEAP32[($5_1 + 1628 | 0) >> 2] = $0_1; + HEAP32[($5_1 + 1624 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 1620 | 0) >> 2] = $2_1; + $725($5_1 + 1216 | 0 | 0, 0 | 0, 400 | 0) | 0; + $725($5_1 + 1008 | 0 | 0, 0 | 0, 200 | 0) | 0; + HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 1628 | 0) >> 2] | 0; + $757($5_1 + 1008 | 0 | 0, 200 | 0, 68096 | 0, $5_1 | 0) | 0; + HEAP32[($5_1 + 1004 | 0) >> 2] = $550($5_1 + 1008 | 0 | 0, 10 | 0, $5_1 + 1216 | 0 | 0) | 0; + HEAP32[($5_1 + 1e3 | 0) >> 2] = 0; + $725($5_1 + 668 | 0 | 0, 0 | 0, 332 | 0) | 0; i64toi32_i32$0 = 0; $189_1 = 0; - i64toi32_i32$1 = $5_1 + 648 | 0; + i64toi32_i32$1 = $5_1 + 656 | 0; HEAP32[i64toi32_i32$1 >> 2] = $189_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 640 | 0) >> 2] = $189_1; - HEAP32[($5_1 + 644 | 0) >> 2] = i64toi32_i32$0; - $724($5_1 + 372 | 0 | 0, 0 | 0, 268 | 0) | 0; - HEAP32[($5_1 + 372 | 0) >> 2] = 3; + HEAP32[($5_1 + 648 | 0) >> 2] = $189_1; + HEAP32[($5_1 + 652 | 0) >> 2] = i64toi32_i32$0; + $725($5_1 + 376 | 0 | 0, 0 | 0, 272 | 0) | 0; + HEAP32[($5_1 + 376 | 0) >> 2] = 3; HEAP32[($5_1 + 368 | 0) >> 2] = 0; i64toi32_i32$0 = 0; $190_1 = 0; @@ -42270,66 +42446,66 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!($130($5_1 + 372 | 0 | 0, HEAP32[($5_1 + 988 | 0) >> 2] | 0 | 0, $5_1 + 1200 | 0 | 0) | 0)) { + if (!($130($5_1 + 376 | 0 | 0, HEAP32[($5_1 + 1004 | 0) >> 2] | 0 | 0, $5_1 + 1216 | 0 | 0) | 0)) { break label$3 } break label$2; } - HEAP32[($5_1 + 364 | 0) >> 2] = HEAP32[($5_1 + 376 | 0) >> 2] | 0; - HEAP8[($5_1 + 323 | 0) >> 0] = (HEAPU8[($5_1 + 433 | 0) >> 0] | 0) & 1 | 0; - $723($5_1 + 656 | 0 | 0, $5_1 + 372 | 0 | 0, 268 | 0) | 0; - $122($5_1 + 656 | 0 | 0); + HEAP32[($5_1 + 364 | 0) >> 2] = HEAP32[($5_1 + 380 | 0) >> 2] | 0; + HEAP8[($5_1 + 323 | 0) >> 0] = (HEAPU8[($5_1 + 437 | 0) >> 0] | 0) & 1 | 0; + $724($5_1 + 668 | 0 | 0, $5_1 + 376 | 0 | 0, 272 | 0) | 0; + $122($5_1 + 668 | 0 | 0); label$4 : { label$5 : { - if (!((HEAPU8[($5_1 + 431 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[($5_1 + 435 | 0) >> 0] | 0) & 1 | 0)) { break label$5 } - $724($5_1 + 44 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($5_1 + 40 | 0 | 0, 0 | 0, 280 | 0) | 0; $89_1 = 0; - $75($5_1 + 36 | 0 | 0, $5_1 + 44 | 0 | 0, HEAP32[($5_1 + 1608 | 0) >> 2] | 0 | 0, 74022 | 0, $89_1 | 0, $89_1 | 0); - $95($5_1 + 28 | 0 | 0, $5_1 + 656 | 0 | 0, $5_1 + 36 | 0 | 0, 0 | 0); + $75($5_1 + 32 | 0 | 0, $5_1 + 40 | 0 | 0, HEAP32[($5_1 + 1624 | 0) >> 2] | 0 | 0, 74080 | 0, $89_1 | 0, $89_1 | 0); + $95($5_1 + 24 | 0 | 0, $5_1 + 668 | 0 | 0, $5_1 + 32 | 0 | 0, 0 | 0); label$6 : { - if (HEAP32[($5_1 + 980 | 0) >> 2] | 0) { + if (HEAP32[($5_1 + 996 | 0) >> 2] | 0) { break label$6 } - HEAP32[($5_1 + 984 | 0) >> 2] = $125(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($5_1 + 1e3 | 0) >> 2] = $125(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0) | 0; } - $11($5_1 + 36 | 0 | 0); - $11($5_1 + 28 | 0 | 0); + $11($5_1 + 32 | 0 | 0); + $11($5_1 + 24 | 0 | 0); break label$4; } - $549($5_1 + 12 | 0 | 0, $5_1 + 372 | 0 | 0, 74022 | 0, HEAP32[($5_1 + 1608 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 1604 | 0) >> 2] | 0 | 0); + $549($5_1 + 8 | 0 | 0, $5_1 + 376 | 0 | 0, 74080 | 0, HEAP32[($5_1 + 1624 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 1620 | 0) >> 2] | 0 | 0); $118_1 = 8; - i64toi32_i32$2 = ($5_1 + 12 | 0) + $118_1 | 0; + i64toi32_i32$2 = ($5_1 + 8 | 0) + $118_1 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $444_1 = i64toi32_i32$0; - i64toi32_i32$0 = ($5_1 + 640 | 0) + $118_1 | 0; + i64toi32_i32$0 = ($5_1 + 648 | 0) + $118_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $444_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; i64toi32_i32$2 = $5_1; - i64toi32_i32$1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; - i64toi32_i32$0 = HEAP32[($5_1 + 16 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($5_1 + 8 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; $448_1 = i64toi32_i32$1; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 640 | 0) >> 2] = $448_1; - HEAP32[($5_1 + 644 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($5_1 + 648 | 0) >> 2] = $448_1; + HEAP32[($5_1 + 652 | 0) >> 2] = i64toi32_i32$0; label$7 : { - if (!((HEAP32[((HEAP32[($5_1 + 1604 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 1620 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$7 } break label$2; } $137_1 = ($5_1 + 320 | 0) + 28 | 0; i64toi32_i32$2 = $5_1; - i64toi32_i32$0 = HEAP32[($5_1 + 640 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[($5_1 + 644 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[($5_1 + 648 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($5_1 + 652 | 0) >> 2] | 0; $473_1 = i64toi32_i32$0; i64toi32_i32$0 = $137_1; HEAP32[i64toi32_i32$0 >> 2] = $473_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; $138_1 = 8; - i64toi32_i32$2 = ($5_1 + 640 | 0) + $138_1 | 0; + i64toi32_i32$2 = ($5_1 + 648 | 0) + $138_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $486_1 = i64toi32_i32$1; @@ -42339,21 +42515,21 @@ function asmFunc(imports) { $544($5_1 + 320 | 0 | 0); label$8 : { label$9 : { - if (!((HEAPU8[($5_1 + 433 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[($5_1 + 437 | 0) >> 0] | 0) & 1 | 0)) { break label$9 } - HEAP32[($5_1 + 984 | 0) >> 2] = $124(($5_1 + 320 | 0) + 28 | 0 | 0) | 0; + HEAP32[($5_1 + 1e3 | 0) >> 2] = $124(($5_1 + 320 | 0) + 28 | 0 | 0) | 0; break label$8; } - HEAP32[($5_1 + 984 | 0) >> 2] = $123(($5_1 + 320 | 0) + 28 | 0 | 0, (HEAPU8[($5_1 + 429 | 0) >> 0] | 0) & 1 | 0 | 0) | 0; + HEAP32[($5_1 + 1e3 | 0) >> 2] = $123(($5_1 + 320 | 0) + 28 | 0 | 0, (HEAPU8[($5_1 + 433 | 0) >> 0] | 0) & 1 | 0 | 0) | 0; } label$10 : { - if (!((HEAPU8[($5_1 + 436 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[($5_1 + 440 | 0) >> 0] | 0) & 1 | 0)) { break label$10 } - HEAP32[($5_1 + 8 | 0) >> 2] = $540($5_1 + 372 | 0 | 0, HEAP32[($5_1 + 984 | 0) >> 2] | 0 | 0) | 0; - $817(HEAP32[($5_1 + 984 | 0) >> 2] | 0 | 0); - HEAP32[($5_1 + 984 | 0) >> 2] = HEAP32[($5_1 + 8 | 0) >> 2] | 0; + HEAP32[($5_1 + 4 | 0) >> 2] = $540($5_1 + 376 | 0 | 0, HEAP32[($5_1 + 1e3 | 0) >> 2] | 0 | 0) | 0; + $818(HEAP32[($5_1 + 1e3 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 1e3 | 0) >> 2] = HEAP32[($5_1 + 4 | 0) >> 2] | 0; } } if (!(0 & 1 | 0)) { @@ -42361,11 +42537,11 @@ function asmFunc(imports) { } } } - $40($5_1 + 656 | 0 | 0); + $40($5_1 + 668 | 0 | 0); $545($5_1 + 320 | 0 | 0); - $542($5_1 + 640 | 0 | 0); - $186_1 = HEAP32[($5_1 + 984 | 0) >> 2] | 0; - global$0 = $5_1 + 1616 | 0; + $542($5_1 + 648 | 0 | 0); + $186_1 = HEAP32[($5_1 + 1e3 | 0) >> 2] | 0; + global$0 = $5_1 + 1632 | 0; return $186_1 | 0; } @@ -42377,7 +42553,7 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 44 | 0) >> 2] = $0_1; HEAP32[($4_1 + 40 | 0) >> 2] = $1_1; - $748(87363 | 0, 0 | 0) | 0; + $749(87943 | 0, 0 | 0) | 0; i64toi32_i32$0 = 0; $21_1 = 0; i64toi32_i32$1 = $4_1 + 32 | 0; @@ -42427,10 +42603,10 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(76097 | 0, 74032 | 0, 30924 | 0, 72525 | 0); + fimport$0(76499 | 0, 74090 | 0, 31018 | 0, 72598 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -42458,53 +42634,53 @@ function asmFunc(imports) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; - $4_1 = global$0 - 320 | 0; + $4_1 = global$0 - 336 | 0; global$0 = $4_1; - HEAP32[($4_1 + 316 | 0) >> 2] = $0_1; - HEAP32[($4_1 + 312 | 0) >> 2] = $1_1; + HEAP32[($4_1 + 332 | 0) >> 2] = $0_1; + HEAP32[($4_1 + 328 | 0) >> 2] = $1_1; label$1 : { label$2 : { label$3 : { - if ((HEAP32[(HEAP32[($4_1 + 312 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[($4_1 + 328 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) >> 2] | 0 | 0) != (9017 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 328 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) >> 2] | 0 | 0) != (9017 | 0) & 1 | 0)) { break label$2 } } break label$1; } - HEAP32[($4_1 + 308 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0; - HEAP32[($4_1 + 304 | 0) >> 2] = $554(HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($4_1 + 304 | 0) >> 2] = $554(HEAP32[($4_1 + 304 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($4_1 + 300 | 0) >> 2] = HEAP32[($4_1 + 304 | 0) >> 2] | 0; + HEAP32[($4_1 + 324 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 328 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0; + HEAP32[($4_1 + 320 | 0) >> 2] = $554(HEAP32[((HEAP32[($4_1 + 328 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 320 | 0) >> 2] = $554(HEAP32[($4_1 + 320 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 316 | 0) >> 2] = HEAP32[($4_1 + 320 | 0) >> 2] | 0; label$4 : { label$5 : while (1) { - if (!((HEAP32[($4_1 + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 320 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } label$6 : { - if (!((HEAP32[(HEAP32[($4_1 + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (59 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($4_1 + 320 | 0) >> 2] | 0) >> 2] | 0 | 0) == (59 | 0) & 1 | 0)) { break label$6 } break label$4; } - HEAP32[($4_1 + 304 | 0) >> 2] = $554(HEAP32[($4_1 + 304 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 320 | 0) >> 2] = $554(HEAP32[($4_1 + 320 | 0) >> 2] | 0 | 0) | 0; continue label$5; }; } - $23($4_1 + 292 | 0 | 0, (HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 300 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 304 | 0) >> 2] | 0 | 0); - $16((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 308 | 0) >> 2] | 0 | 0, $4_1 + 292 | 0 | 0); - $724($4_1 + 16 | 0 | 0, 0 | 0, 276 | 0) | 0; - $75($4_1 + 8 | 0 | 0, $4_1 + 16 | 0 | 0, 65673 | 0, 101055 | 0, 0 | 0, 1 | 0); - $16((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 308 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); - $75($4_1 | 0, $4_1 + 16 | 0 | 0, 65624 | 0, 101055 | 0, 0 | 0, 1 | 0); - $16((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, $4_1 | 0); - $11($4_1 | 0); - $11($4_1 + 8 | 0 | 0); - $11($4_1 + 292 | 0 | 0); + $23($4_1 + 308 | 0 | 0, (HEAP32[($4_1 + 332 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 320 | 0) >> 2] | 0 | 0); + $16((HEAP32[($4_1 + 332 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 324 | 0) >> 2] | 0 | 0, $4_1 + 308 | 0 | 0); + $725($4_1 + 28 | 0 | 0, 0 | 0, 280 | 0) | 0; + $75($4_1 + 20 | 0 | 0, $4_1 + 28 | 0 | 0, 65673 | 0, 101635 | 0, 0 | 0, 1 | 0); + $16((HEAP32[($4_1 + 332 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 324 | 0) >> 2] | 0 | 0, $4_1 + 20 | 0 | 0); + $75($4_1 + 12 | 0 | 0, $4_1 + 28 | 0 | 0, 65624 | 0, 101635 | 0, 0 | 0, 1 | 0); + $16((HEAP32[($4_1 + 332 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 328 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, $4_1 + 12 | 0 | 0); + $11($4_1 + 12 | 0 | 0); + $11($4_1 + 20 | 0 | 0); + $11($4_1 + 308 | 0 | 0); } - global$0 = $4_1 + 320 | 0; + global$0 = $4_1 + 336 | 0; return; } @@ -42544,8 +42720,8 @@ function asmFunc(imports) { } $43_1 = HEAP32[($5_1 + 24 | 0) >> 2] | 0; HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 4 | 0) >> 2] | 0; - $13($43_1 | 0, 68053 | 0, $5_1 | 0) | 0; - $817(HEAP32[($5_1 + 4 | 0) >> 2] | 0 | 0); + $13($43_1 | 0, 68126 | 0, $5_1 | 0) | 0; + $818(HEAP32[($5_1 + 4 | 0) >> 2] | 0 | 0); } HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 16 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0; continue label$2; @@ -42641,7 +42817,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[((HEAP32[$4_1 >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - if ($760(HEAP32[((HEAP32[((HEAP32[((HEAP32[$4_1 >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[((HEAP32[$4_1 >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0) { break label$7 } HEAP8[($4_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -42761,7 +42937,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - if ($760(HEAP32[((HEAP32[((HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) | 0) { break label$4 } HEAP8[($4_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -42993,7 +43169,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 32 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 32 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[($3_1 + 8 | 0) >> 2] | 0; $16_1 = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; @@ -43007,7 +43183,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 32 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 32 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 28 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0; HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 48 | 0) >> 2] = HEAP32[($3_1 + 8 | 0) >> 2] | 0; $13_1 = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0; @@ -43124,13 +43300,13 @@ function asmFunc(imports) { break label$5; } HEAP32[($4_1 + 16 | 0) >> 2] = (HEAPU8[(HEAP32[($4_1 + 20 | 0) >> 2] | 0) >> 0] | 0) & 255 | 0; - $13($4_1 + 24 | 0 | 0, 74043 | 0, $4_1 + 16 | 0 | 0) | 0; + $13($4_1 + 24 | 0 | 0, 74101 | 0, $4_1 + 16 | 0 | 0) | 0; } HEAP32[($4_1 + 20 | 0) >> 2] = (HEAP32[($4_1 + 20 | 0) >> 2] | 0) + 1 | 0; continue label$4; }; } - $817(HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 24 | 0) >> 2] | 0; HEAP32[($4_1 + 24 | 0) >> 2] = 0; $14($4_1 + 24 | 0 | 0); @@ -43167,23 +43343,23 @@ function asmFunc(imports) { } HEAP32[($4_1 + 292 | 0) >> 2] = $246(HEAP32[((HEAP32[($4_1 + 296 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; HEAP32[($4_1 + 292 | 0) >> 2] = $246(HEAP32[($4_1 + 292 | 0) >> 2] | 0 | 0) | 0; - $724($4_1 + 16 | 0 | 0, 0 | 0, 276 | 0) | 0; - $75($4_1 + 8 | 0 | 0, $4_1 + 16 | 0 | 0, 86680 | 0, 101055 | 0, 0 | 0, 1 | 0); - $16((HEAP32[($4_1 + 300 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 292 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); - $11($4_1 + 8 | 0 | 0); + $725($4_1 + 12 | 0 | 0, 0 | 0, 280 | 0) | 0; + $75($4_1 + 4 | 0 | 0, $4_1 + 12 | 0 | 0, 87237 | 0, 101635 | 0, 0 | 0, 1 | 0); + $16((HEAP32[($4_1 + 300 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 292 | 0) >> 2] | 0 | 0, $4_1 + 4 | 0 | 0); + $11($4_1 + 4 | 0 | 0); } label$6 : { - if ($760(HEAP32[((HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 66231 | 0) | 0) { + if ($761(HEAP32[((HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 66231 | 0) | 0) { break label$6 } - $817(HEAP32[((HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $75_1 = $763(66245 | 0) | 0; + $818(HEAP32[((HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $75_1 = $764(66245 | 0) | 0; HEAP32[((HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] = $75_1; } break label$3; } - $817(HEAP32[((HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $82_1 = $763(66231 | 0) | 0; + $818(HEAP32[((HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $82_1 = $764(66231 | 0) | 0; HEAP32[((HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] = $82_1; } } @@ -43219,245 +43395,245 @@ function asmFunc(imports) { $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; var $5_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, $349_1 = 0, $71_1 = 0, $108_1 = 0, $142_1 = 0, $149_1 = 0, $156_1 = 0, $163_1 = 0, $170_1 = 0, $177_1 = 0, $656_1 = 0, $672_1 = 0, $688_1 = 0, $704_1 = 0, $720_1 = 0, $736_1 = 0, $740_1 = 0; - $5_1 = global$0 - 464 | 0; + $5_1 = global$0 - 480 | 0; global$0 = $5_1; - HEAP32[($5_1 + 460 | 0) >> 2] = $0_1; - HEAP32[($5_1 + 456 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 452 | 0) >> 2] = $2_1; + HEAP32[($5_1 + 476 | 0) >> 2] = $0_1; + HEAP32[($5_1 + 472 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 468 | 0) >> 2] = $2_1; label$1 : { - if ((HEAPU8[(HEAP32[($5_1 + 460 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[(HEAP32[($5_1 + 476 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { break label$1 } - if (!((HEAP32[((HEAP32[($5_1 + 460 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 476 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$1 } label$2 : { - if ((HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 16 | 0) { + if ((HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 16 | 0) { break label$2 } - if (!((HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) & 8388608 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) & 8388608 | 0)) { break label$1 } } - HEAP32[($5_1 + 448 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0; + HEAP32[($5_1 + 464 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0; label$3 : { label$4 : while (1) { - if (!((HEAP32[($5_1 + 448 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 464 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } label$5 : { - if (!((HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } } label$6 : { - if (!((HEAP32[(HEAP32[($5_1 + 448 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($5_1 + 464 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } } label$7 : { - if (!((HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } label$8 : { - if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } - $71_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $71_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[($71_1 + 24 | 0) >> 2] = HEAP32[($71_1 + 24 | 0) >> 2] | 0 | 64 | 0; } label$9 : { - if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } label$10 : { - if (!((HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - $5(HEAP32[(HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 64 | 0); + $5(HEAP32[(HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 64 | 0); } - $108_1 = HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $108_1 = HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[($108_1 + 24 | 0) >> 2] = HEAP32[($108_1 + 24 | 0) >> 2] | 0 | 64 | 0; } } - HEAP32[($5_1 + 448 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 448 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; + HEAP32[($5_1 + 464 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 464 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; continue label$4; }; } - HEAP32[($5_1 + 440 | 0) >> 2] = 0; + HEAP32[($5_1 + 456 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 432 | 0) >> 2] = 0; - HEAP32[($5_1 + 436 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($5_1 + 448 | 0) >> 2] = 0; + HEAP32[($5_1 + 452 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$0 = 0; $349_1 = 0; - i64toi32_i32$1 = $5_1 + 424 | 0; + i64toi32_i32$1 = $5_1 + 440 | 0; HEAP32[i64toi32_i32$1 >> 2] = $349_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 416 | 0; + i64toi32_i32$1 = $5_1 + 432 | 0; HEAP32[i64toi32_i32$1 >> 2] = $349_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 408 | 0; + i64toi32_i32$1 = $5_1 + 424 | 0; HEAP32[i64toi32_i32$1 >> 2] = $349_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 400 | 0; + i64toi32_i32$1 = $5_1 + 416 | 0; HEAP32[i64toi32_i32$1 >> 2] = $349_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 392 | 0; + i64toi32_i32$1 = $5_1 + 408 | 0; HEAP32[i64toi32_i32$1 >> 2] = $349_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 384 | 0; + i64toi32_i32$1 = $5_1 + 400 | 0; HEAP32[i64toi32_i32$1 >> 2] = $349_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 376 | 0) >> 2] = $349_1; - HEAP32[($5_1 + 380 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($5_1 + 392 | 0) >> 2] = $349_1; + HEAP32[($5_1 + 396 | 0) >> 2] = i64toi32_i32$0; label$11 : { - if (!((HEAP32[($5_1 + 452 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 468 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$11 } - $305($5_1 + 320 | 0 | 0, HEAP32[($5_1 + 452 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 460 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0); + $305($5_1 + 336 | 0 | 0, HEAP32[($5_1 + 468 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 476 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0); $142_1 = 48; - i64toi32_i32$2 = ($5_1 + 320 | 0) + $142_1 | 0; + i64toi32_i32$2 = ($5_1 + 336 | 0) + $142_1 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $656_1 = i64toi32_i32$0; - i64toi32_i32$0 = ($5_1 + 376 | 0) + $142_1 | 0; + i64toi32_i32$0 = ($5_1 + 392 | 0) + $142_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $656_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; $149_1 = 40; - i64toi32_i32$2 = ($5_1 + 320 | 0) + $149_1 | 0; + i64toi32_i32$2 = ($5_1 + 336 | 0) + $149_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $672_1 = i64toi32_i32$1; - i64toi32_i32$1 = ($5_1 + 376 | 0) + $149_1 | 0; + i64toi32_i32$1 = ($5_1 + 392 | 0) + $149_1 | 0; HEAP32[i64toi32_i32$1 >> 2] = $672_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; $156_1 = 32; - i64toi32_i32$2 = ($5_1 + 320 | 0) + $156_1 | 0; + i64toi32_i32$2 = ($5_1 + 336 | 0) + $156_1 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $688_1 = i64toi32_i32$0; - i64toi32_i32$0 = ($5_1 + 376 | 0) + $156_1 | 0; + i64toi32_i32$0 = ($5_1 + 392 | 0) + $156_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $688_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; $163_1 = 24; - i64toi32_i32$2 = ($5_1 + 320 | 0) + $163_1 | 0; + i64toi32_i32$2 = ($5_1 + 336 | 0) + $163_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $704_1 = i64toi32_i32$1; - i64toi32_i32$1 = ($5_1 + 376 | 0) + $163_1 | 0; + i64toi32_i32$1 = ($5_1 + 392 | 0) + $163_1 | 0; HEAP32[i64toi32_i32$1 >> 2] = $704_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; $170_1 = 16; - i64toi32_i32$2 = ($5_1 + 320 | 0) + $170_1 | 0; + i64toi32_i32$2 = ($5_1 + 336 | 0) + $170_1 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $720_1 = i64toi32_i32$0; - i64toi32_i32$0 = ($5_1 + 376 | 0) + $170_1 | 0; + i64toi32_i32$0 = ($5_1 + 392 | 0) + $170_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $720_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; $177_1 = 8; - i64toi32_i32$2 = ($5_1 + 320 | 0) + $177_1 | 0; + i64toi32_i32$2 = ($5_1 + 336 | 0) + $177_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $736_1 = i64toi32_i32$1; - i64toi32_i32$1 = ($5_1 + 376 | 0) + $177_1 | 0; + i64toi32_i32$1 = ($5_1 + 392 | 0) + $177_1 | 0; HEAP32[i64toi32_i32$1 >> 2] = $736_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$2 = $5_1; - i64toi32_i32$0 = HEAP32[($5_1 + 320 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[($5_1 + 324 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[($5_1 + 336 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($5_1 + 340 | 0) >> 2] | 0; $740_1 = i64toi32_i32$0; i64toi32_i32$0 = $5_1; - HEAP32[($5_1 + 376 | 0) >> 2] = $740_1; - HEAP32[($5_1 + 380 | 0) >> 2] = i64toi32_i32$1; - } - HEAP32[($5_1 + 316 | 0) >> 2] = $326($5_1 + 376 | 0 | 0) | 0; - $303($5_1 + 432 | 0 | 0, HEAP32[($5_1 + 316 | 0) >> 2] | 0 | 0); - HEAP32[($5_1 + 312 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $724($5_1 + 36 | 0 | 0, 0 | 0, 276 | 0) | 0; - $75($5_1 + 28 | 0 | 0, $5_1 + 36 | 0 | 0, HEAP32[($5_1 + 432 | 0) >> 2] | 0 | 0, 0 | 0, HEAP32[($5_1 + 312 | 0) >> 2] | 0 | 0, 1 | 0); - $16((HEAP32[($5_1 + 460 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $5_1 + 28 | 0 | 0); - $185($5_1 + 376 | 0 | 0); - $14($5_1 + 432 | 0 | 0); - $11($5_1 + 28 | 0 | 0); - } - HEAP32[($5_1 + 24 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0; - HEAP32[($5_1 + 20 | 0) >> 2] = 0; + HEAP32[($5_1 + 392 | 0) >> 2] = $740_1; + HEAP32[($5_1 + 396 | 0) >> 2] = i64toi32_i32$1; + } + HEAP32[($5_1 + 332 | 0) >> 2] = $326($5_1 + 392 | 0 | 0) | 0; + $303($5_1 + 448 | 0 | 0, HEAP32[($5_1 + 332 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 328 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; + $725($5_1 + 48 | 0 | 0, 0 | 0, 280 | 0) | 0; + $75($5_1 + 40 | 0 | 0, $5_1 + 48 | 0 | 0, HEAP32[($5_1 + 448 | 0) >> 2] | 0 | 0, 0 | 0, HEAP32[($5_1 + 328 | 0) >> 2] | 0 | 0, 1 | 0); + $16((HEAP32[($5_1 + 476 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $5_1 + 40 | 0 | 0); + $185($5_1 + 392 | 0 | 0); + $14($5_1 + 448 | 0 | 0); + $11($5_1 + 40 | 0 | 0); + } + HEAP32[($5_1 + 36 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0; + HEAP32[($5_1 + 32 | 0) >> 2] = 0; label$12 : { label$13 : while (1) { - if (!((HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$12 } label$14 : { - if (!((HEAP32[(HEAP32[($5_1 + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($5_1 + 36 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$14 } - if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 24 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0) & 64 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 36 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0) & 64 | 0)) { break label$14 } - HEAP32[($5_1 + 20 | 0) >> 2] = HEAP32[($5_1 + 24 | 0) >> 2] | 0; + HEAP32[($5_1 + 32 | 0) >> 2] = HEAP32[($5_1 + 36 | 0) >> 2] | 0; } - $620(HEAP32[($5_1 + 460 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); - HEAP32[($5_1 + 24 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 24 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; + $620(HEAP32[($5_1 + 476 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 36 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 36 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; continue label$13; }; } label$15 : { - if (!((HEAP32[((HEAP32[($5_1 + 460 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 476 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$15 } label$16 : { - if (!((HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 32 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$16 } - if (!((HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 64 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 64 | 0)) { break label$16 } - HEAP32[($5_1 + 16 | 0) >> 2] = 0; + HEAP32[($5_1 + 24 | 0) >> 2] = 0; i64toi32_i32$1 = 0; i64toi32_i32$0 = $5_1; - HEAP32[($5_1 + 8 | 0) >> 2] = 0; - HEAP32[($5_1 + 12 | 0) >> 2] = i64toi32_i32$1; - HEAP8[($5_1 + 7 | 0) >> 0] = ((HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 128 | 0 | 0) != (0 | 0) & 1 | 0; - HEAP8[($5_1 + 6 | 0) >> 0] = ((HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 4 | 0 | 0) != (0 | 0) & 1 | 0; - HEAP8[($5_1 + 5 | 0) >> 0] = ((HEAP32[((HEAP32[($5_1 + 456 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) & 1 | 0 | 0) != (0 | 0) & 1 | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = 0; + HEAP32[($5_1 + 20 | 0) >> 2] = i64toi32_i32$1; + HEAP8[($5_1 + 15 | 0) >> 0] = ((HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 128 | 0 | 0) != (0 | 0) & 1 | 0; + HEAP8[($5_1 + 14 | 0) >> 0] = ((HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 4 | 0 | 0) != (0 | 0) & 1 | 0; + HEAP8[($5_1 + 13 | 0) >> 0] = ((HEAP32[((HEAP32[($5_1 + 472 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) & 1 | 0 | 0) != (0 | 0) & 1 | 0; label$17 : { label$18 : { - if (!((HEAPU8[($5_1 + 7 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[($5_1 + 15 | 0) >> 0] | 0) & 1 | 0)) { break label$18 } - if ((HEAPU8[($5_1 + 6 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[($5_1 + 14 | 0) >> 0] | 0) & 1 | 0) { break label$18 } - $13($5_1 + 8 | 0 | 0, 73977 | 0, 0 | 0) | 0; + $13($5_1 + 16 | 0 | 0, 74035 | 0, 0 | 0) | 0; label$19 : { - if ((HEAPU8[($5_1 + 5 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[($5_1 + 13 | 0) >> 0] | 0) & 1 | 0) { break label$19 } - $13($5_1 + 8 | 0 | 0, 66068 | 0, 0 | 0) | 0; + $13($5_1 + 16 | 0 | 0, 66068 | 0, 0 | 0) | 0; } break label$17; } label$20 : { label$21 : { - if ((HEAPU8[($5_1 + 5 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[($5_1 + 13 | 0) >> 0] | 0) & 1 | 0) { break label$21 } - $13($5_1 + 8 | 0 | 0, 66069 | 0, 0 | 0) | 0; + $13($5_1 + 16 | 0 | 0, 66069 | 0, 0 | 0) | 0; break label$20; } - $13($5_1 + 8 | 0 | 0, 86980 | 0, 0 | 0) | 0; + $13($5_1 + 16 | 0 | 0, 87560 | 0, 0 | 0) | 0; } } - $817(HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 20 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 20 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($5_1 + 8 | 0) >> 2] | 0; - HEAP32[($5_1 + 8 | 0) >> 2] = 0; - $14($5_1 + 8 | 0 | 0); + $818(HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 32 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 32 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($5_1 + 16 | 0) >> 2] | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = 0; + $14($5_1 + 16 | 0 | 0); } } - global$0 = $5_1 + 464 | 0; + global$0 = $5_1 + 480 | 0; return; } @@ -43497,7 +43673,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$7 } - fimport$0(76667 | 0, 74032 | 0, 30422 | 0, 66108 | 0); + fimport$0(77069 | 0, 74090 | 0, 30516 | 0, 66108 | 0); wasm2js_trap(); } label$8 : { @@ -43612,7 +43788,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($3_1 + 8 | 0) >> 2] = $821(1 | 0, 48 | 0) | 0; + HEAP32[($3_1 + 8 | 0) >> 2] = $822(1 | 0, 48 | 0) | 0; HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 44 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0; HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 40 | 0) >> 2] = HEAP32[($3_1 + 8 | 0) >> 2] | 0; $16_1 = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0; @@ -43648,10 +43824,10 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(76097 | 0, 74032 | 0, 31379 | 0, 72520 | 0); + fimport$0(76499 | 0, 74090 | 0, 31475 | 0, 72593 | 0); wasm2js_trap(); } - $817(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); + $818(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); } global$0 = $3_1 + 16 | 0; return; @@ -44111,7 +44287,7 @@ function asmFunc(imports) { $21_1 = 24; label$4 : { label$5 : { - if (!($738(((HEAPU8[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 0] | 0) << $21_1 | 0) >> $21_1 | 0 | 0) | 0)) { + if (!($739(((HEAPU8[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 0] | 0) << $21_1 | 0) >> $21_1 | 0 | 0) | 0)) { break label$5 } HEAP32[($4_1 + 8 | 0) >> 2] = HEAP32[($4_1 + 12 | 0) >> 2] | 0; @@ -44119,7 +44295,7 @@ function asmFunc(imports) { $28_1 = 24; $33_1 = 1; label$7 : { - if ($738(((HEAPU8[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 0] | 0) << $28_1 | 0) >> $28_1 | 0 | 0) | 0) { + if ($739(((HEAPU8[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 0] | 0) << $28_1 | 0) >> $28_1 | 0 | 0) | 0) { break label$7 } $36_1 = 24; @@ -44136,7 +44312,7 @@ function asmFunc(imports) { }; label$9 : { label$10 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73321 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73379 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$10 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 8 | 0; @@ -44144,7 +44320,7 @@ function asmFunc(imports) { } label$11 : { label$12 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 70891 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 70964 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$12 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 2 | 0; @@ -44152,7 +44328,7 @@ function asmFunc(imports) { } label$13 : { label$14 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 70876 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 70949 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$14 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 4 | 0; @@ -44160,7 +44336,7 @@ function asmFunc(imports) { } label$15 : { label$16 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 70885 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 70958 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$16 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 6 | 0; @@ -44168,7 +44344,7 @@ function asmFunc(imports) { } label$17 : { label$18 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73181 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73239 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$18 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 1 | 0; @@ -44176,7 +44352,7 @@ function asmFunc(imports) { } label$19 : { label$20 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 69709 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 69782 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$20 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 16 | 0; @@ -44184,7 +44360,7 @@ function asmFunc(imports) { } label$21 : { label$22 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 69671 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 69744 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$22 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 32 | 0; @@ -44192,7 +44368,7 @@ function asmFunc(imports) { } label$23 : { label$24 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 65764 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 65764 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$24 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 48 | 0; @@ -44200,7 +44376,7 @@ function asmFunc(imports) { } label$25 : { label$26 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73321 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73379 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$26 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 16 | 0) >> 2] | 0 | 8 | 0; @@ -44208,7 +44384,7 @@ function asmFunc(imports) { } label$27 : { label$28 : { - if ($765(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 68427 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { + if ($766(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 68500 | 0, (HEAP32[($4_1 + 12 | 0) >> 2] | 0) - (HEAP32[($4_1 + 8 | 0) >> 2] | 0) | 0 | 0) | 0) { break label$28 } break label$27; @@ -44255,7 +44431,7 @@ function asmFunc(imports) { break label$2 } $22_1 = 0; - $239($22_1 | 0, HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 232 | 0) >> 2] | 0) >> 2] | 0 | 0, 71266 | 0, $22_1 | 0); + $239($22_1 | 0, HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 232 | 0) >> 2] | 0) >> 2] | 0 | 0, 71339 | 0, $22_1 | 0); i64toi32_i32$0 = 0; $223_1 = 0; i64toi32_i32$1 = $4_1 + 224 | 0; @@ -44337,14 +44513,14 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 100 | 0) >> 2] | 0 | 0) != (HEAP32[(HEAP32[($4_1 + 108 | 0) >> 2] | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$10 } - $156(43 | 0, HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 232 | 0) >> 2] | 0) >> 2] | 0 | 0, 73529 | 0, 0 | 0); + $156(43 | 0, HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 232 | 0) >> 2] | 0) >> 2] | 0 | 0, 73587 | 0, 0 | 0); } break label$8; } $127_1 = HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0; $129_1 = HEAP32[(HEAP32[($4_1 + 232 | 0) >> 2] | 0) >> 2] | 0; HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(43 | 0, $127_1 | 0, $129_1 | 0, 67994 | 0, $4_1 | 0); + $156(43 | 0, $127_1 | 0, $129_1 | 0, 68067 | 0, $4_1 | 0); } } } @@ -44390,7 +44566,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; label$14 : { label$15 : { - if ($760(HEAP32[($4_1 + 32 | 0) >> 2] | 0 | 0, 86690 | 0) | 0) { + if ($761(HEAP32[($4_1 + 32 | 0) >> 2] | 0 | 0, 87247 | 0) | 0) { break label$15 } $349($4_1 + 40 | 0 | 0, HEAP32[($4_1 + 36 | 0) >> 2] | 0 | 0, 16 | 0); @@ -44409,7 +44585,7 @@ function asmFunc(imports) { $208_1 = HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0; $210_1 = HEAP32[(HEAP32[($4_1 + 232 | 0) >> 2] | 0) >> 2] | 0; HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $156(43 | 0, $208_1 | 0, $210_1 | 0, 67994 | 0, $4_1 + 16 | 0 | 0); + $156(43 | 0, $208_1 | 0, $210_1 | 0, 68067 | 0, $4_1 + 16 | 0 | 0); } } } @@ -44506,7 +44682,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 196 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$7 } - fimport$0(76667 | 0, 74032 | 0, 33516 | 0, 66103 | 0); + fimport$0(77069 | 0, 74090 | 0, 33711 | 0, 66103 | 0); wasm2js_trap(); } label$8 : { @@ -44590,7 +44766,7 @@ function asmFunc(imports) { } label$15 : { label$16 : { - if ($760(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 196 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73842 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 196 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73900 | 0) | 0) { break label$16 } HEAP32[((HEAP32[(HEAP32[($4_1 + 196 | 0) >> 2] | 0) >> 2] | 0) + 36 | 0) >> 2] = 6; @@ -44606,7 +44782,7 @@ function asmFunc(imports) { } label$18 : { label$19 : { - if ($760(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 196 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73835 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 196 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73893 | 0) | 0) { break label$19 } HEAP32[((HEAP32[(HEAP32[($4_1 + 196 | 0) >> 2] | 0) >> 2] | 0) + 36 | 0) >> 2] = 6; @@ -44740,19 +44916,19 @@ function asmFunc(imports) { function $592($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; - var $4_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $496_1 = 0, $497_1 = 0, $498_1 = 0, $499$hi = 0, $500$hi = 0, $13_1 = 0, $328_1 = 0, i64toi32_i32$2 = 0; - $4_1 = global$0 - 240 | 0; + var $4_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $651_1 = 0, $652_1 = 0, $653_1 = 0, $654_1 = 0, $655$hi = 0, $656$hi = 0, $13_1 = 0, $483_1 = 0, $29_1 = 0, $31_1 = 0, i64toi32_i32$2 = 0; + $4_1 = global$0 - 320 | 0; global$0 = $4_1; - HEAP32[($4_1 + 236 | 0) >> 2] = $0_1; - HEAP32[($4_1 + 232 | 0) >> 2] = $1_1; + HEAP32[($4_1 + 316 | 0) >> 2] = $0_1; + HEAP32[($4_1 + 312 | 0) >> 2] = $1_1; label$1 : { label$2 : { - if (!((HEAP32[($4_1 + 232 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 312 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } break label$1; } - $13_1 = HEAP32[(HEAP32[($4_1 + 232 | 0) >> 2] | 0) >> 2] | 0; + $13_1 = HEAP32[(HEAP32[($4_1 + 312 | 0) >> 2] | 0) >> 2] | 0; label$3 : { switch ($13_1 | 0) { case 4: @@ -44762,14 +44938,26 @@ function asmFunc(imports) { case 1: break label$1; case 2: - label$33 : { - if (!((HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0) & 1 | 0)) { - break label$33 + label$35 : { + if (!((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0) & 1 | 0)) { + break label$35 + } + label$36 : { + if ((HEAPU8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 36 | 0) >> 0] | 0) & 1 | 0) { + break label$36 + } + if ((HEAPU8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 37 | 0) >> 0] | 0) & 1 | 0) { + break label$36 + } + $29_1 = HEAP32[(HEAP32[($4_1 + 316 | 0) >> 2] | 0) >> 2] | 0; + $31_1 = HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; + HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $213(131072 | 0, $29_1 | 0, $31_1 | 0, 87424 | 0, $4_1 | 0) | 0; } } break label$1; case 9: - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); break label$1; case 3: break label$1; @@ -44780,7 +44968,7 @@ function asmFunc(imports) { case 6: break label$1; case 7: - $659(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0 | 0); + $659(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0 | 0); break label$1; case 14: break label$1; @@ -44791,139 +44979,155 @@ function asmFunc(imports) { case 17: break label$1; case 13: - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); i64toi32_i32$0 = 0; - $496_1 = 0; - i64toi32_i32$1 = $4_1 + 224 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $496_1; + $651_1 = 0; + i64toi32_i32$1 = $4_1 + 304 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $651_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $4_1 + 216 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $496_1; + i64toi32_i32$1 = $4_1 + 296 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $651_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $4_1 + 208 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $496_1; + i64toi32_i32$1 = $4_1 + 288 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $651_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $4_1 + 200 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $496_1; + i64toi32_i32$1 = $4_1 + 280 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $651_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $4_1 + 192 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $496_1; + i64toi32_i32$1 = $4_1 + 272 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $651_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $4_1 + 184 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $496_1; + i64toi32_i32$1 = $4_1 + 264 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $651_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 176 | 0) >> 2] = $496_1; - HEAP32[($4_1 + 180 | 0) >> 2] = i64toi32_i32$0; - HEAP32[($4_1 + 172 | 0) >> 2] = $207(HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0, $4_1 + 176 | 0 | 0) | 0; - label$34 : { - label$35 : { - if (!((HEAP32[($4_1 + 172 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$35 + HEAP32[($4_1 + 256 | 0) >> 2] = $651_1; + HEAP32[($4_1 + 260 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($4_1 + 252 | 0) >> 2] = $207(HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0, $4_1 + 256 | 0 | 0) | 0; + label$37 : { + label$38 : { + if (!((HEAP32[($4_1 + 252 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$38 } - if (!((HEAP32[(HEAP32[($4_1 + 172 | 0) >> 2] | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { - break label$35 + if (!((HEAP32[(HEAP32[($4_1 + 252 | 0) >> 2] | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { + break label$38 } - $156(43 | 0, HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67050 | 0, 0 | 0); - break label$34; + $156(43 | 0, HEAP32[(HEAP32[($4_1 + 316 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67084 | 0, 0 | 0); + break label$37; } - label$36 : { - if (!((HEAP32[($4_1 + 172 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$36 + label$39 : { + if (!((HEAP32[($4_1 + 252 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$39 } - if (!((HEAP32[(HEAP32[($4_1 + 172 | 0) >> 2] | 0) >> 2] | 0) & 1 | 0)) { - break label$36 + if (!((HEAP32[(HEAP32[($4_1 + 252 | 0) >> 2] | 0) >> 2] | 0) & 1 | 0)) { + break label$39 } - $156(43 | 0, HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67044 | 0, 0 | 0); + $156(43 | 0, HEAP32[(HEAP32[($4_1 + 316 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67078 | 0, 0 | 0); } } - $185($4_1 + 176 | 0 | 0); + $185($4_1 + 256 | 0 | 0); break label$1; case 12: - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); - $660(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 120 | 0 | 0); - $661(HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0, (HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 120 | 0 | 0) | 0; + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + $660(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 120 | 0 | 0); + $661(HEAP32[(HEAP32[($4_1 + 316 | 0) >> 2] | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 4 | 0 | 0, (HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 120 | 0 | 0) | 0; break label$1; case 10: - $591(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); + $591(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); break label$1; case 11: - label$37 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$37 + label$40 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$40 } - $662(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + $662(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); } - $596(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 88 | 0) >> 2] | 0 | 0); - $338($4_1 + 136 | 0 | 0, (HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); - $327($4_1 + 136 | 0 | 0, (HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 36 | 0 | 0); - $329($4_1 + 136 | 0 | 0); - $349((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 4 | 0 | 0, (HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 36 | 0 | 0, 16 | 0); - label$38 : { - if ((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { - break label$38 + $596(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 88 | 0) >> 2] | 0 | 0); + $338($4_1 + 216 | 0 | 0, (HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + $327($4_1 + 216 | 0 | 0, (HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 36 | 0 | 0); + $329($4_1 + 216 | 0 | 0); + $349((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 4 | 0 | 0, (HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 36 | 0 | 0, 16 | 0); + label$41 : { + if ((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { + break label$41 } - fimport$0(76070 | 0, 74032 | 0, 32685 | 0, 70205 | 0); + fimport$0(76472 | 0, 74090 | 0, 32788 | 0, 70278 | 0); wasm2js_trap(); } - label$39 : { - if ((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { - break label$39 + label$42 : { + if ((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { + break label$42 } - fimport$0(76042 | 0, 74032 | 0, 32686 | 0, 70205 | 0); + fimport$0(76444 | 0, 74090 | 0, 32789 | 0, 70278 | 0); wasm2js_trap(); } break label$1; case 23: - label$40 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$40 + label$43 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$43 } - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); } - label$41 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$41 + label$44 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$44 } - $662(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + $662(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); } break label$1; case 24: - label$42 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$42 + label$45 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$45 } - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); - HEAP32[($4_1 + 132 | 0) >> 2] = 0; - label$43 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$43 + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + HEAP32[($4_1 + 212 | 0) >> 2] = 0; + label$46 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$46 } - HEAP32[($4_1 + 132 | 0) >> 2] = $663(HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 212 | 0) >> 2] = $663(HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) | 0; } - HEAP32[($4_1 + 128 | 0) >> 2] = 0; - label$44 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$44 + HEAP32[($4_1 + 208 | 0) >> 2] = 0; + label$47 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$47 } - HEAP32[($4_1 + 128 | 0) >> 2] = $664(HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 208 | 0) >> 2] = $664(HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) | 0; } - label$45 : { - if (!((HEAP32[($4_1 + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$45 + label$48 : { + if (!((HEAP32[($4_1 + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$48 } - HEAP32[(HEAP32[($4_1 + 132 | 0) >> 2] | 0) >> 2] = 2; + HEAP32[(HEAP32[($4_1 + 212 | 0) >> 2] | 0) >> 2] = 2; } - label$46 : { - if (!((HEAP32[($4_1 + 128 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$46 + label$49 : { + if (!((HEAP32[($4_1 + 208 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$49 } - HEAP32[(HEAP32[($4_1 + 128 | 0) >> 2] | 0) >> 2] = 4; + HEAP32[(HEAP32[($4_1 + 208 | 0) >> 2] | 0) >> 2] = 4; } } break label$1; case 18: + label$50 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$50 + } + HEAP8[($4_1 + 207 | 0) >> 0] = (HEAPU8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 37 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 37 | 0) >> 0] = 1; + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + HEAP8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 37 | 0) >> 0] = (HEAPU8[($4_1 + 207 | 0) >> 0] | 0) & 1 | 0; + } + label$51 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$51 + } + $662(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + } + break label$1; case 19: case 25: case 26: @@ -44931,118 +45135,191 @@ function asmFunc(imports) { case 28: case 29: case 30: - case 31: case 32: - label$47 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$47 + label$52 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$52 } - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); } - label$48 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$48 + label$53 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$53 } - $662(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + $662(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); } break label$1; + case 31: + label$54 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$54 + } + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + } + i64toi32_i32$0 = 0; + $652_1 = 0; + i64toi32_i32$1 = $4_1 + 192 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $652_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; + i64toi32_i32$1 = $4_1 + 184 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $652_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; + i64toi32_i32$1 = $4_1 + 176 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $652_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; + i64toi32_i32$1 = $4_1 + 168 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $652_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; + i64toi32_i32$1 = $4_1 + 160 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $652_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; + i64toi32_i32$1 = $4_1 + 152 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $652_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; + i64toi32_i32$1 = $4_1; + HEAP32[($4_1 + 144 | 0) >> 2] = $652_1; + HEAP32[($4_1 + 148 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($4_1 + 140 | 0) >> 2] = $207(HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0, $4_1 + 144 | 0 | 0) | 0; + label$55 : { + label$56 : { + if (!((HEAP32[($4_1 + 140 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$56 + } + if (!((HEAP32[(HEAP32[($4_1 + 140 | 0) >> 2] | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { + break label$56 + } + $156(43 | 0, HEAP32[(HEAP32[($4_1 + 316 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67084 | 0, 0 | 0); + break label$55; + } + label$57 : { + if (!((HEAP32[($4_1 + 140 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$57 + } + if (!((HEAP32[(HEAP32[($4_1 + 140 | 0) >> 2] | 0) >> 2] | 0) & 2 | 0)) { + break label$57 + } + label$58 : { + if ((HEAPU8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 36 | 0) >> 0] | 0) & 1 | 0) { + break label$58 + } + if ((HEAPU8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 37 | 0) >> 0] | 0) & 1 | 0) { + break label$58 + } + label$59 : { + if (!((HEAP32[($4_1 + 140 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$59 + } + if ((HEAP32[(HEAP32[($4_1 + 140 | 0) >> 2] | 0) >> 2] | 0) & 4 | 0) { + break label$59 + } + $156(43 | 0, HEAP32[(HEAP32[($4_1 + 316 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 67113 | 0, 0 | 0); + } + } + } + } + $185($4_1 + 144 | 0 | 0); + break label$1; case 52: i64toi32_i32$0 = 0; - $497_1 = 0; + $653_1 = 0; + i64toi32_i32$1 = $4_1 + 128 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $653_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 120 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $497_1; + HEAP32[i64toi32_i32$1 >> 2] = $653_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 112 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $497_1; + HEAP32[i64toi32_i32$1 >> 2] = $653_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 104 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $497_1; + HEAP32[i64toi32_i32$1 >> 2] = $653_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 96 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $497_1; + HEAP32[i64toi32_i32$1 >> 2] = $653_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 88 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $497_1; - HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $4_1 + 80 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $497_1; + HEAP32[i64toi32_i32$1 >> 2] = $653_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 72 | 0) >> 2] = $497_1; - HEAP32[($4_1 + 76 | 0) >> 2] = i64toi32_i32$0; - HEAP32[($4_1 + 68 | 0) >> 2] = $207(HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0, $4_1 + 72 | 0 | 0) | 0; + HEAP32[($4_1 + 80 | 0) >> 2] = $653_1; + HEAP32[($4_1 + 84 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($4_1 + 76 | 0) >> 2] = $207(HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0, $4_1 + 80 | 0 | 0) | 0; i64toi32_i32$0 = 0; - $498_1 = 0; + $654_1 = 0; + i64toi32_i32$1 = $4_1 + 64 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $654_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 56 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $498_1; + HEAP32[i64toi32_i32$1 >> 2] = $654_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 48 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $498_1; + HEAP32[i64toi32_i32$1 >> 2] = $654_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 40 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $498_1; + HEAP32[i64toi32_i32$1 >> 2] = $654_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 32 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $498_1; + HEAP32[i64toi32_i32$1 >> 2] = $654_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1 + 24 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $498_1; - HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $4_1 + 16 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $498_1; + HEAP32[i64toi32_i32$1 >> 2] = $654_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 8 | 0) >> 2] = $498_1; - HEAP32[($4_1 + 12 | 0) >> 2] = i64toi32_i32$0; - HEAP32[($4_1 + 4 | 0) >> 2] = $207(HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0) | 0; - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); - $328_1 = 0; - label$49 : { - if (!(($135((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { - break label$49 + HEAP32[($4_1 + 16 | 0) >> 2] = $654_1; + HEAP32[($4_1 + 20 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($4_1 + 12 | 0) >> 2] = $207(HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0, $4_1 + 16 | 0 | 0) | 0; + HEAP8[($4_1 + 11 | 0) >> 0] = (HEAPU8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 36 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 36 | 0) >> 0] = 1; + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + HEAP8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 36 | 0) >> 0] = 0; + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + HEAP8[((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 36 | 0) >> 0] = (HEAPU8[($4_1 + 11 | 0) >> 0] | 0) & 1 | 0; + $483_1 = 0; + label$60 : { + if (!(($135((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { + break label$60 } - i64toi32_i32$0 = $137((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 64 | 0 | 0) | 0; + i64toi32_i32$0 = $137((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 64 | 0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - $499$hi = i64toi32_i32$1; + $655$hi = i64toi32_i32$1; i64toi32_i32$1 = 0; - $500$hi = i64toi32_i32$1; - i64toi32_i32$1 = $499$hi; - i64toi32_i32$1 = $500$hi; - i64toi32_i32$1 = $499$hi; - i64toi32_i32$1 = $500$hi; - i64toi32_i32$1 = $499$hi; + $656$hi = i64toi32_i32$1; + i64toi32_i32$1 = $655$hi; + i64toi32_i32$1 = $656$hi; + i64toi32_i32$1 = $655$hi; + i64toi32_i32$1 = $656$hi; + i64toi32_i32$1 = $655$hi; i64toi32_i32$2 = i64toi32_i32$0; - i64toi32_i32$0 = $500$hi; - $328_1 = (i64toi32_i32$2 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (i64toi32_i32$0 | 0) | 0; + i64toi32_i32$0 = $656$hi; + $483_1 = (i64toi32_i32$2 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (i64toi32_i32$0 | 0) | 0; } - HEAP8[($4_1 + 3 | 0) >> 0] = $328_1 & 1 | 0; - label$50 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$50 + HEAP8[($4_1 + 10 | 0) >> 0] = $483_1 & 1 | 0; + label$61 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$61 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) >> 2] | 0 | 0) == (12 | 0) & 1 | 0)) { - break label$50 + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) >> 2] | 0 | 0) == (12 | 0) & 1 | 0)) { + break label$61 } - label$51 : { - if (!((HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$51 + label$62 : { + if (!((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$62 } - if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$51 + if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$62 } - if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$51 + if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$62 } - if ($760(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73842 | 0) | 0) { - break label$51 + if ($761(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 112 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 73900 | 0) | 0) { + break label$62 } - HEAP8[($4_1 + 3 | 0) >> 0] = 1; + HEAP8[($4_1 + 10 | 0) >> 0] = 1; } } - $355(HEAP32[(HEAP32[($4_1 + 236 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 68 | 0) >> 2] | 0 | 0, $4_1 + 72 | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, (HEAPU8[($4_1 + 3 | 0) >> 0] | 0) & 1 | 0 | 0, 8 | 0); - $185($4_1 + 72 | 0 | 0); - $185($4_1 + 8 | 0 | 0); + $355(HEAP32[(HEAP32[($4_1 + 316 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 76 | 0) >> 2] | 0 | 0, $4_1 + 80 | 0 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, $4_1 + 16 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, (HEAPU8[($4_1 + 10 | 0) >> 0] | 0) & 1 | 0 | 0, 8 | 0); + $185($4_1 + 80 | 0 | 0); + $185($4_1 + 16 | 0 | 0); break label$1; case 33: case 34: @@ -45055,12 +45332,12 @@ function asmFunc(imports) { case 41: case 42: case 45: - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); break label$1; case 46: - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); break label$1; case 43: case 44: @@ -45069,23 +45346,23 @@ function asmFunc(imports) { case 49: case 50: case 51: - label$52 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$52 + label$63 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$63 } - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); } - label$53 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$53 + label$64 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$64 } - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); } - label$54 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$54 + label$65 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$65 } - $662(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + $662(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); } break label$1; case 20: @@ -45095,23 +45372,23 @@ function asmFunc(imports) { case 22: break label$1; case 53: - label$55 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$55 + label$66 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$66 } - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0 | 0); } - label$56 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$56 + label$67 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$67 } - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); } - label$57 : { - if (!((HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$57 + label$68 : { + if (!((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$68 } - $592(HEAP32[($4_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 232 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $592(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); } break label$1; default: @@ -45119,7 +45396,7 @@ function asmFunc(imports) { }; } } - global$0 = $4_1 + 240 | 0; + global$0 = $4_1 + 320 | 0; return; } @@ -45283,7 +45560,7 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 12 | 0) >> 2] = $0_1; HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; - $703(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $704(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); global$0 = $4_1 + 16 | 0; return; } @@ -45341,21 +45618,21 @@ function asmFunc(imports) { $56_1 = (HEAP32[((HEAP32[($4_1 + 728 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) << 2 | 0; HEAP32[($4_1 + 4 | 0) >> 2] = 32; HEAP32[$4_1 >> 2] = $56_1; - $756($4_1 + 672 | 0 | 0, 50 | 0, 74039 | 0, $4_1 | 0) | 0; + $757($4_1 + 672 | 0 | 0, 50 | 0, 74097 | 0, $4_1 | 0) | 0; } - $817(HEAP32[((HEAP32[($4_1 + 724 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $65_1 = $763($4_1 + 672 | 0 | 0) | 0; + $818(HEAP32[((HEAP32[($4_1 + 724 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $65_1 = $764($4_1 + 672 | 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 724 | 0) >> 2] | 0) + 4 | 0) >> 2] = $65_1; HEAP32[($4_1 + 668 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 724 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0; label$6 : { if (!((HEAP32[(HEAP32[($4_1 + 668 | 0) >> 2] | 0) >> 2] | 0 | 0) != (10 | 0) & 1 | 0)) { break label$6 } - $724($4_1 + 392 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 388 | 0 | 0, 0 | 0, 280 | 0) | 0; $88_1 = 0; - $75($4_1 + 384 | 0 | 0, $4_1 + 392 | 0 | 0, 101054 | 0, $88_1 | 0, $88_1 | 0, $88_1 | 0); - $16(HEAP32[($4_1 + 728 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 668 | 0) >> 2] | 0 | 0, $4_1 + 384 | 0 | 0); - $11($4_1 + 384 | 0 | 0); + $75($4_1 + 380 | 0 | 0, $4_1 + 388 | 0 | 0, 101634 | 0, $88_1 | 0, $88_1 | 0, $88_1 | 0); + $16(HEAP32[($4_1 + 728 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 668 | 0) >> 2] | 0 | 0, $4_1 + 380 | 0 | 0); + $11($4_1 + 380 | 0 | 0); } break label$3; } @@ -45392,16 +45669,16 @@ function asmFunc(imports) { $130_1 = (HEAP32[((HEAP32[($4_1 + 728 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) << 2 | 0; HEAP32[($4_1 + 20 | 0) >> 2] = 32; HEAP32[($4_1 + 16 | 0) >> 2] = $130_1; - $756($4_1 + 320 | 0 | 0, 50 | 0, 74038 | 0, $4_1 + 16 | 0 | 0) | 0; + $757($4_1 + 320 | 0 | 0, 50 | 0, 74096 | 0, $4_1 + 16 | 0 | 0) | 0; break label$8; } - $756($4_1 + 320 | 0 | 0, 50 | 0, 101054 | 0, 0 | 0) | 0; + $757($4_1 + 320 | 0 | 0, 50 | 0, 101634 | 0, 0 | 0) | 0; } - $724($4_1 + 44 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 40 | 0 | 0, 0 | 0, 280 | 0) | 0; $155_1 = 0; - $75($4_1 + 36 | 0 | 0, $4_1 + 44 | 0 | 0, $4_1 + 320 | 0 | 0, $155_1 | 0, $155_1 | 0, $155_1 | 0); - $16(HEAP32[($4_1 + 728 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 724 | 0) >> 2] | 0 | 0, $4_1 + 36 | 0 | 0); - $11($4_1 + 36 | 0 | 0); + $75($4_1 + 32 | 0 | 0, $4_1 + 40 | 0 | 0, $4_1 + 320 | 0 | 0, $155_1 | 0, $155_1 | 0, $155_1 | 0); + $16(HEAP32[($4_1 + 728 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 724 | 0) >> 2] | 0 | 0, $4_1 + 32 | 0 | 0); + $11($4_1 + 32 | 0 | 0); } } } @@ -45469,10 +45746,10 @@ function asmFunc(imports) { $73_1 = (HEAP32[((HEAP32[($4_1 + 88 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) << 2 | 0; HEAP32[($4_1 + 4 | 0) >> 2] = 32; HEAP32[$4_1 >> 2] = $73_1; - $756($4_1 + 16 | 0 | 0, 50 | 0, 74039 | 0, $4_1 | 0) | 0; + $757($4_1 + 16 | 0 | 0, 50 | 0, 74097 | 0, $4_1 | 0) | 0; } - $817(HEAP32[((HEAP32[($4_1 + 84 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $82_1 = $763($4_1 + 16 | 0 | 0) | 0; + $818(HEAP32[((HEAP32[($4_1 + 84 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $82_1 = $764($4_1 + 16 | 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 84 | 0) >> 2] | 0) + 4 | 0) >> 2] = $82_1; } } @@ -45492,7 +45769,7 @@ function asmFunc(imports) { $599(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0); $8_1 = HEAP32[($4_1 + 12 | 0) >> 2] | 0; HEAP32[($8_1 + 16 | 0) >> 2] = (HEAP32[($8_1 + 16 | 0) >> 2] | 0) + 1 | 0; - $709(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0 | 0); + $710(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0 | 0); $16_1 = HEAP32[($4_1 + 12 | 0) >> 2] | 0; HEAP32[($16_1 + 16 | 0) >> 2] = (HEAP32[($16_1 + 16 | 0) >> 2] | 0) + 1 | 0; HEAP32[($4_1 + 4 | 0) >> 2] = HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0; @@ -45537,7 +45814,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -45545,10 +45822,10 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9766 | 0); + $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9766 | 0); } label$6 : { if (!($24_1 & 1 | 0)) { @@ -45564,7 +45841,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; $604(HEAP32[(i64toi32_i32$0 + 12 | 0) >> 2] | 0 | 0, HEAP32[(i64toi32_i32$0 + 8 | 0) >> 2] | 0 | 0); label$7 : { - if (!((HEAP32[((HEAP32[(i64toi32_i32$0 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[(i64toi32_i32$0 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$7 } break label$2; @@ -45635,54 +45912,54 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; } $24_1 = 0; label$4 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } $35_1 = 1; label$5 : { - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (61 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (61 | 0) & 1 | 0) { break label$5 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (10813 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (10813 | 0) & 1 | 0) { break label$5 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (12093 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (12093 | 0) & 1 | 0) { break label$5 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11069 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11069 | 0) & 1 | 0) { break label$5 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11581 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11581 | 0) & 1 | 0) { break label$5 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3947581 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3947581 | 0) & 1 | 0) { break label$5 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (4079165 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (4079165 | 0) & 1 | 0) { break label$5 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9789 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9789 | 0) & 1 | 0) { break label$5 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (24125 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (24125 | 0) & 1 | 0) { break label$5 } - $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (31805 | 0); + $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (31805 | 0); } $24_1 = $35_1; } @@ -45691,9 +45968,9 @@ function asmFunc(imports) { break label$6 } $127_1 = HEAP32[($4_1 + 12 | 0) >> 2] | 0; - $129_1 = HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; - HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $46(52 | 0, $127_1 | 0, $129_1 | 0, 67483 | 0, $4_1 | 0); + $129_1 = HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0; + HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $46(52 | 0, $127_1 | 0, $129_1 | 0, 67543 | 0, $4_1 | 0); break label$2; } if (!(0 & 1 | 0)) { @@ -45717,7 +45994,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -45725,10 +46002,10 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (124 | 0); + $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (124 | 0); } label$6 : { if (!($24_1 & 1 | 0)) { @@ -45744,7 +46021,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 4 | 0) >> 2] = i64toi32_i32$1; $605(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); label$7 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$7 } break label$2; @@ -45794,7 +46071,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -45802,10 +46079,10 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (94 | 0); + $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (94 | 0); } label$6 : { if (!($24_1 & 1 | 0)) { @@ -45821,7 +46098,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 4 | 0) >> 2] = i64toi32_i32$1; $606(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); label$7 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$7 } break label$2; @@ -45871,7 +46148,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -45879,10 +46156,10 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } - $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0); + $24_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0); } label$6 : { if (!($24_1 & 1 | 0)) { @@ -45898,7 +46175,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 4 | 0) >> 2] = i64toi32_i32$1; $607(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); label$7 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$7 } break label$2; @@ -45948,7 +46225,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -45956,15 +46233,15 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $35_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15677 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15677 | 0) & 1 | 0) { break label$6 } - $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8509 | 0); + $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (8509 | 0); } $24_1 = $35_1; } @@ -45972,7 +46249,7 @@ function asmFunc(imports) { if (!($24_1 & 1 | 0)) { break label$7 } - HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0; $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; i64toi32_i32$2 = HEAP32[($4_1 + 24 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -45983,7 +46260,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = i64toi32_i32$1; $609(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); label$8 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$8 } break label$2; @@ -46074,7 +46351,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -46082,23 +46359,23 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $35_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (62 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (62 | 0) & 1 | 0) { break label$6 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (60 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (60 | 0) & 1 | 0) { break label$6 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15933 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15933 | 0) & 1 | 0) { break label$6 } - $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15421 | 0); + $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15421 | 0); } $24_1 = $35_1; } @@ -46106,7 +46383,7 @@ function asmFunc(imports) { if (!($24_1 & 1 | 0)) { break label$7 } - HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0; $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; i64toi32_i32$2 = HEAP32[($4_1 + 24 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -46117,7 +46394,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = i64toi32_i32$1; $610(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); label$8 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$8 } break label$2; @@ -46332,7 +46609,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -46340,19 +46617,19 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $35_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { break label$6 } $35_1 = 1; - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (47 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (47 | 0) & 1 | 0) { break label$6 } - $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (37 | 0); + $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (37 | 0); } $24_1 = $35_1; } @@ -46360,7 +46637,7 @@ function asmFunc(imports) { if (!($24_1 & 1 | 0)) { break label$7 } - HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0; $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; i64toi32_i32$2 = HEAP32[($4_1 + 24 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -46371,7 +46648,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = i64toi32_i32$1; $611(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); label$8 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$8 } break label$2; @@ -46482,7 +46759,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -46490,15 +46767,15 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $35_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15934 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15934 | 0) & 1 | 0) { break label$6 } - $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15420 | 0); + $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (15420 | 0); } $24_1 = $35_1; } @@ -46506,7 +46783,7 @@ function asmFunc(imports) { if (!($24_1 & 1 | 0)) { break label$7 } - HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0; $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; i64toi32_i32$2 = HEAP32[($4_1 + 24 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -46517,7 +46794,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = i64toi32_i32$1; $609(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); label$8 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$8 } break label$2; @@ -46627,7 +46904,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -46635,15 +46912,15 @@ function asmFunc(imports) { label$4 : while (1) { $24_1 = 0; label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } $35_1 = 1; label$6 : { - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { break label$6 } - $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0); + $35_1 = (HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0); } $24_1 = $35_1; } @@ -46651,13 +46928,13 @@ function asmFunc(imports) { if (!($24_1 & 1 | 0)) { break label$7 } - HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0; $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; label$8 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$8 } - $46(45 | 0, HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0, 72702 | 0, 0 | 0); + $46(45 | 0, HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0, 72760 | 0, 0 | 0); break label$2; } i64toi32_i32$2 = HEAP32[($4_1 + 24 | 0) >> 2] | 0; @@ -46669,7 +46946,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = i64toi32_i32$1; $609(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); label$9 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$9 } break label$2; @@ -46758,49 +47035,49 @@ function asmFunc(imports) { label$2 : { label$3 : { label$4 : { - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11051 | 0) & 1 | 0) { break label$4 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11565 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (11565 | 0) & 1 | 0)) { break label$3 } } $23_1 = HEAP32[($4_1 + 60 | 0) >> 2] | 0; - $25_1 = HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; - HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $46(52 | 0, $23_1 | 0, $25_1 | 0, 67483 | 0, $4_1 | 0); + $25_1 = HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0; + HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $46(52 | 0, $23_1 | 0, $25_1 | 0, 67543 | 0, $4_1 | 0); break label$2; } label$5 : { label$6 : { - if (!((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } label$7 : { - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (38 | 0) & 1 | 0) { break label$7 } - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (42 | 0) & 1 | 0) { break label$7 } - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (43 | 0) & 1 | 0) { break label$7 } - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (45 | 0) & 1 | 0) { break label$7 } - if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (126 | 0) & 1 | 0) { + if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (126 | 0) & 1 | 0) { break label$7 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (33 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (33 | 0) & 1 | 0)) { break label$6 } } - HEAP32[($4_1 + 52 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($4_1 + 52 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0; $298(HEAP32[($4_1 + 60 | 0) >> 2] | 0 | 0) | 0; $611(HEAP32[($4_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 56 | 0) >> 2] | 0 | 0); label$8 : { - if (!((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$8 } break label$2; @@ -46901,9 +47178,9 @@ function asmFunc(imports) { break label$18 } $156_1 = HEAP32[($4_1 + 60 | 0) >> 2] | 0; - $158_1 = HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; - HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $46(52 | 0, $156_1 | 0, $158_1 | 0, 67483 | 0, $4_1 + 16 | 0 | 0); + $158_1 = HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0; + HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $46(52 | 0, $156_1 | 0, $158_1 | 0, 67543 | 0, $4_1 + 16 | 0 | 0); break label$17; } label$19 : { @@ -46912,15 +47189,15 @@ function asmFunc(imports) { break label$20 } $173_1 = HEAP32[($4_1 + 60 | 0) >> 2] | 0; - $175_1 = HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; - HEAP32[($4_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $46(52 | 0, $173_1 | 0, $175_1 | 0, 67483 | 0, $4_1 + 32 | 0 | 0); + $175_1 = HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0; + HEAP32[($4_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $46(52 | 0, $173_1 | 0, $175_1 | 0, 67543 | 0, $4_1 + 32 | 0 | 0); break label$19; } $183_1 = HEAP32[($4_1 + 60 | 0) >> 2] | 0; - $185_1 = HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; - HEAP32[($4_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $46(52 | 0, $183_1 | 0, $185_1 | 0, 67483 | 0, $4_1 + 48 | 0 | 0); + $185_1 = HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0; + HEAP32[($4_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $46(52 | 0, $183_1 | 0, $185_1 | 0, 67543 | 0, $4_1 + 48 | 0 | 0); } } } @@ -46952,7 +47229,7 @@ function asmFunc(imports) { label$1 : { label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } break label$2; @@ -46978,10 +47255,10 @@ function asmFunc(imports) { label$2 : { label$3 : { label$4 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (130 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (130 | 0) & 1 | 0)) { break label$4 } - HEAP32[($4_1 + 20 | 0) >> 2] = (HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0; + HEAP32[($4_1 + 20 | 0) >> 2] = (HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 1 | 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = HEAP32[($4_1 + 24 | 0) >> 2] | 0; HEAP32[i64toi32_i32$1 >> 2] = 0; @@ -47040,7 +47317,7 @@ function asmFunc(imports) { break label$7 } $56_1 = 0; - $44($56_1 | 0, HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0, 72320 | 0, $56_1 | 0); + $44($56_1 | 0, HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0, 72393 | 0, $56_1 | 0); } continue label$6; }; @@ -47050,43 +47327,43 @@ function asmFunc(imports) { } label$8 : { label$9 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (133 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (133 | 0) & 1 | 0)) { break label$9 } - $616(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0) | 0; + $616(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0) | 0; $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; break label$8; } label$10 : { label$11 : { - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0)) { break label$11 } $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; $299(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0); label$12 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 324 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 328 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$12 } break label$2; } label$13 : { - if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$13 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { break label$13 } - $46(1 | 0, HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0 | 0, 86004 | 0, 0 | 0); + $46(1 | 0, HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0 | 0, 86561 | 0, 0 | 0); break label$2; } $298(HEAP32[($4_1 + 28 | 0) >> 2] | 0 | 0) | 0; break label$10; } $115_1 = HEAP32[($4_1 + 28 | 0) >> 2] | 0; - $117_1 = HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0; - HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 304 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $46(52 | 0, $115_1 | 0, $117_1 | 0, 67483 | 0, $4_1 | 0); + $117_1 = HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0; + HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $46(52 | 0, $115_1 | 0, $117_1 | 0, 67543 | 0, $4_1 | 0); break label$2; } } @@ -47109,7 +47386,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 284 | 0) >> 2] = $0_1; HEAP32[($4_1 + 280 | 0) >> 2] = $1_1; HEAP32[($4_1 + 276 | 0) >> 2] = 0; - $724($4_1 + 16 | 0 | 0, 0 | 0, 260 | 0) | 0; + $725($4_1 + 16 | 0 | 0, 0 | 0, 260 | 0) | 0; HEAP32[($4_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 284 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; label$1 : { label$2 : while (1) { @@ -47138,7 +47415,7 @@ function asmFunc(imports) { if (!((((HEAPU8[($4_1 + 17 | 0) >> 0] | 0) << $57_1 | 0) >> $57_1 | 0 | 0) == (120 | 0) & 1 | 0)) { break label$5 } - i64toi32_i32$0 = $788(($4_1 + 16 | 0) + 2 | 0 | 0, 0 | 0, 16 | 0) | 0; + i64toi32_i32$0 = $789(($4_1 + 16 | 0) + 2 | 0 | 0, 0 | 0, 16 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $272_1 = i64toi32_i32$0; i64toi32_i32$0 = HEAP32[($4_1 + 280 | 0) >> 2] | 0; @@ -47156,7 +47433,7 @@ function asmFunc(imports) { if (!((((HEAPU8[($4_1 + 17 | 0) >> 0] | 0) << $85_1 | 0) >> $85_1 | 0 | 0) == (98 | 0) & 1 | 0)) { break label$7 } - i64toi32_i32$1 = $788(($4_1 + 16 | 0) + 2 | 0 | 0, 0 | 0, 2 | 0) | 0; + i64toi32_i32$1 = $789(($4_1 + 16 | 0) + 2 | 0 | 0, 0 | 0, 2 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $323_1 = i64toi32_i32$1; i64toi32_i32$1 = HEAP32[($4_1 + 280 | 0) >> 2] | 0; @@ -47170,7 +47447,7 @@ function asmFunc(imports) { if (!((((HEAPU8[($4_1 + 16 | 0) >> 0] | 0) << $103_1 | 0) >> $103_1 | 0 | 0) == (48 | 0) & 1 | 0)) { break label$9 } - i64toi32_i32$0 = $788($4_1 + 16 | 0 | 0, 0 | 0, 8 | 0) | 0; + i64toi32_i32$0 = $789($4_1 + 16 | 0 | 0, 0 | 0, 8 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $353_1 = i64toi32_i32$0; i64toi32_i32$0 = HEAP32[($4_1 + 280 | 0) >> 2] | 0; @@ -47178,7 +47455,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; break label$8; } - i64toi32_i32$1 = $788($4_1 + 16 | 0 | 0, 0 | 0, 10 | 0) | 0; + i64toi32_i32$1 = $789($4_1 + 16 | 0 | 0, 0 | 0, 10 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $365_1 = i64toi32_i32$1; i64toi32_i32$1 = HEAP32[($4_1 + 280 | 0) >> 2] | 0; @@ -47199,16 +47476,16 @@ function asmFunc(imports) { label$1 : while (1) { $13_1 = 0; label$2 : { - if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $13_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) >> 2] | 0 | 0) == (142 | 0); + $13_1 = (HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) >> 2] | 0 | 0) == (142 | 0); } label$3 : { if (!($13_1 & 1 | 0)) { break label$3 } - HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 296 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 300 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; continue label$1; } break label$1; @@ -47220,11 +47497,11 @@ function asmFunc(imports) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $713_1 = 0, $716_1 = 0, $414_1 = 0, $6_1 = 0, $299_1 = 0, $369_1 = 0, $433_1 = 0, $647_1 = 0, $656_1 = 0, $41_1 = 0, $110_1 = 0, $160_1 = 0, $192_1 = 0, $207_1 = 0, $239_1 = 0, $254_1 = 0, $334_1 = 0, $1734 = 0, $2007 = 0, $2025 = 0; - $4_1 = global$0 - 1328 | 0; + $4_1 = global$0 - 1344 | 0; global$0 = $4_1; - HEAP32[($4_1 + 1324 | 0) >> 2] = $0_1; - HEAP32[($4_1 + 1320 | 0) >> 2] = $1_1; - $6_1 = HEAP32[(HEAP32[($4_1 + 1320 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($4_1 + 1340 | 0) >> 2] = $0_1; + HEAP32[($4_1 + 1336 | 0) >> 2] = $1_1; + $6_1 = HEAP32[(HEAP32[($4_1 + 1336 | 0) >> 2] | 0) >> 2] | 0; label$1 : { label$2 : { switch ($6_1 | 0) { @@ -47234,88 +47511,88 @@ function asmFunc(imports) { break label$1; case 1: label$28 : { - if (!((HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$28 } - $320($4_1 + 1264 | 0 | 0, (HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 4 | 0 | 0); + $320($4_1 + 1280 | 0 | 0, (HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 4 | 0 | 0); label$29 : { - if (!((HEAP32[($4_1 + 1272 | 0) >> 2] | 0 | 0) != (8 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 1288 | 0) >> 2] | 0 | 0) != (8 | 0) & 1 | 0)) { break label$29 } + HEAP32[($4_1 + 1272 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + i64toi32_i32$1 = $4_1; + HEAP32[($4_1 + 1264 | 0) >> 2] = 0; + HEAP32[($4_1 + 1268 | 0) >> 2] = i64toi32_i32$0; + $285($4_1 + 1264 | 0 | 0, $4_1 + 1280 | 0 | 0); HEAP32[($4_1 + 1256 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $4_1; HEAP32[($4_1 + 1248 | 0) >> 2] = 0; HEAP32[($4_1 + 1252 | 0) >> 2] = i64toi32_i32$0; - $285($4_1 + 1248 | 0 | 0, $4_1 + 1264 | 0 | 0); - HEAP32[($4_1 + 1240 | 0) >> 2] = 0; - i64toi32_i32$0 = 0; - i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 1232 | 0) >> 2] = 0; - HEAP32[($4_1 + 1236 | 0) >> 2] = i64toi32_i32$0; - $41_1 = HEAP32[($4_1 + 1248 | 0) >> 2] | 0; - HEAP32[($4_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $41_1 = HEAP32[($4_1 + 1264 | 0) >> 2] | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[$4_1 >> 2] = $41_1; - $13($4_1 + 1232 | 0 | 0, 85369 | 0, $4_1 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 1232 | 0) >> 2] | 0; - HEAP32[($4_1 + 1232 | 0) >> 2] = 0; - $14($4_1 + 1232 | 0 | 0); + $13($4_1 + 1248 | 0 | 0, 85926 | 0, $4_1 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 1248 | 0) >> 2] | 0; + HEAP32[($4_1 + 1248 | 0) >> 2] = 0; $14($4_1 + 1248 | 0 | 0); + $14($4_1 + 1264 | 0 | 0); } - $185($4_1 + 1264 | 0 | 0); + $185($4_1 + 1280 | 0 | 0); } break label$1; case 2: label$30 : { - if (!((HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$30 } label$31 : { - if (!(($135((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { + if (!(($135((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { break label$31 } - $817(HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0); - HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 24 | 0) >> 2] = 0; + $818(HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0); + HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 24 | 0) >> 2] = 0; + HEAP32[($4_1 + 1240 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + i64toi32_i32$1 = $4_1; + HEAP32[($4_1 + 1232 | 0) >> 2] = 0; + HEAP32[($4_1 + 1236 | 0) >> 2] = i64toi32_i32$0; HEAP32[($4_1 + 1224 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $4_1; HEAP32[($4_1 + 1216 | 0) >> 2] = 0; HEAP32[($4_1 + 1220 | 0) >> 2] = i64toi32_i32$0; - HEAP32[($4_1 + 1208 | 0) >> 2] = 0; - i64toi32_i32$0 = 0; - i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 1200 | 0) >> 2] = 0; - HEAP32[($4_1 + 1204 | 0) >> 2] = i64toi32_i32$0; - $285($4_1 + 1200 | 0 | 0, (HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 4 | 0 | 0); + $285($4_1 + 1216 | 0 | 0, (HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 4 | 0 | 0); i64toi32_i32$0 = 0; $713_1 = 0; - i64toi32_i32$1 = $4_1 + 1184 | 0; + i64toi32_i32$1 = $4_1 + 1200 | 0; HEAP32[i64toi32_i32$1 >> 2] = $713_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $4_1 + 1176 | 0; + i64toi32_i32$1 = $4_1 + 1192 | 0; HEAP32[i64toi32_i32$1 >> 2] = $713_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $4_1 + 1168 | 0; + i64toi32_i32$1 = $4_1 + 1184 | 0; HEAP32[i64toi32_i32$1 >> 2] = $713_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 1160 | 0) >> 2] = $713_1; - HEAP32[($4_1 + 1164 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($4_1 + 1176 | 0) >> 2] = $713_1; + HEAP32[($4_1 + 1180 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 1152 | 0) >> 2] = $713_1; - HEAP32[($4_1 + 1156 | 0) >> 2] = i64toi32_i32$0; - $136((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 64 | 0 | 0, $4_1 + 1152 | 0 | 0, 40 | 0); - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $110_1 = HEAP32[($4_1 + 1200 | 0) >> 2] | 0; - HEAP32[($4_1 + 20 | 0) >> 2] = $4_1 + 1152 | 0; + HEAP32[($4_1 + 1168 | 0) >> 2] = $713_1; + HEAP32[($4_1 + 1172 | 0) >> 2] = i64toi32_i32$0; + $136((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 64 | 0 | 0, $4_1 + 1168 | 0 | 0, 40 | 0); + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $110_1 = HEAP32[($4_1 + 1216 | 0) >> 2] | 0; + HEAP32[($4_1 + 20 | 0) >> 2] = $4_1 + 1168 | 0; HEAP32[($4_1 + 16 | 0) >> 2] = $110_1; - $13($4_1 + 1216 | 0 | 0, 85369 | 0, $4_1 + 16 | 0 | 0) | 0; - HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 1216 | 0) >> 2] | 0; - HEAP32[($4_1 + 1216 | 0) >> 2] = 0; - HEAP32[(HEAP32[($4_1 + 1320 | 0) >> 2] | 0) >> 2] = 8; - $14($4_1 + 1200 | 0 | 0); + $13($4_1 + 1232 | 0 | 0, 85926 | 0, $4_1 + 16 | 0 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 1232 | 0) >> 2] | 0; + HEAP32[($4_1 + 1232 | 0) >> 2] = 0; + HEAP32[(HEAP32[($4_1 + 1336 | 0) >> 2] | 0) >> 2] = 8; $14($4_1 + 1216 | 0 | 0); + $14($4_1 + 1232 | 0 | 0); } } break label$1; @@ -47328,75 +47605,75 @@ function asmFunc(imports) { case 6: label$32 : { label$33 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$33 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9060 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9060 | 0) & 1 | 0)) { break label$33 } label$34 : { - if (!((HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$34 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $160_1 = $763(85983 | 0) | 0; - HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $160_1; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $160_1 = $764(86540 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $160_1; } break label$32; } label$35 : { label$36 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$36 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9058 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9058 | 0) & 1 | 0)) { break label$36 } label$37 : { label$38 : { - if (!((HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (0 | 0) & 1 | 0)) { break label$38 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $192_1 = $763(84637 | 0) | 0; - HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $192_1; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $192_1 = $764(85194 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $192_1; break label$37; } label$39 : { - if (!((HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$39 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $207_1 = $763(85961 | 0) | 0; - HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $207_1; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $207_1 = $764(86518 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $207_1; } } break label$35; } label$40 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$40 } - if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9059 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9059 | 0) & 1 | 0)) { break label$40 } label$41 : { label$42 : { - if (!((HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (0 | 0) & 1 | 0)) { break label$42 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $239_1 = $763(84801 | 0) | 0; - HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $239_1; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $239_1 = $764(85358 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $239_1; break label$41; } label$43 : { - if (!((HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (2 | 0) & 1 | 0)) { break label$43 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $254_1 = $763(85972 | 0) | 0; - HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $254_1; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $254_1 = $764(86529 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 4 | 0) >> 2] = $254_1; } } } @@ -47404,10 +47681,10 @@ function asmFunc(imports) { } break label$1; case 9: - $618(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $618(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); break label$1; case 7: - $624(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0 | 0); + $624(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0 | 0); break label$1; case 14: break label$1; @@ -47420,142 +47697,142 @@ function asmFunc(imports) { case 13: break label$1; case 12: - $618(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); - $625(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 120 | 0 | 0); + $618(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + $625(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 120 | 0 | 0); break label$1; case 10: - HEAP8[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 1 | 0) >> 0] = 1; - HEAP8[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 2 | 0) >> 0] = 1; - $626(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); - $574(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); - HEAP8[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 2 | 0) >> 0] = 0; + HEAP8[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 1 | 0) >> 0] = 1; + HEAP8[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 2 | 0) >> 0] = 1; + $626(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + $574(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); + HEAP8[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 2 | 0) >> 0] = 0; label$44 : { - if (!((HEAPU8[(HEAP32[($4_1 + 1324 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[(HEAP32[($4_1 + 1340 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0)) { break label$44 } - $724($4_1 + 1040 | 0 | 0, 0 | 0, 100 | 0) | 0; - HEAP32[($4_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; - $756($4_1 + 1040 | 0 | 0, 100 | 0, 73753 | 0, $4_1 + 32 | 0 | 0) | 0; - $299_1 = HEAP32[($4_1 + 1324 | 0) >> 2] | 0; + $725($4_1 + 1056 | 0 | 0, 0 | 0, 100 | 0) | 0; + HEAP32[($4_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; + $757($4_1 + 1056 | 0 | 0, 100 | 0, 73811 | 0, $4_1 + 32 | 0 | 0) | 0; + $299_1 = HEAP32[($4_1 + 1340 | 0) >> 2] | 0; HEAP32[($299_1 + 8 | 0) >> 2] = (HEAP32[($299_1 + 8 | 0) >> 2] | 0) + 1 | 0; + HEAP32[($4_1 + 1048 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + i64toi32_i32$1 = $4_1; + HEAP32[($4_1 + 1040 | 0) >> 2] = 0; + HEAP32[($4_1 + 1044 | 0) >> 2] = i64toi32_i32$0; + HEAP8[($4_1 + 1039 | 0) >> 0] = 1; + $302($4_1 + 1040 | 0 | 0, $4_1 + 1039 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 84 | 0) >> 2] | 0 | 0); + $301($4_1 + 1040 | 0 | 0, $4_1 + 1039 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); + $334_1 = $764($4_1 + 1056 | 0 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 92 | 0) >> 2] = $334_1; HEAP32[($4_1 + 1032 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $4_1; HEAP32[($4_1 + 1024 | 0) >> 2] = 0; HEAP32[($4_1 + 1028 | 0) >> 2] = i64toi32_i32$0; - HEAP8[($4_1 + 1023 | 0) >> 0] = 1; - $302($4_1 + 1024 | 0 | 0, $4_1 + 1023 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 84 | 0) >> 2] | 0 | 0); - $301($4_1 + 1024 | 0 | 0, $4_1 + 1023 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); - $334_1 = $763($4_1 + 1040 | 0 | 0) | 0; - HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 92 | 0) >> 2] = $334_1; - HEAP32[($4_1 + 1016 | 0) >> 2] = 0; - i64toi32_i32$0 = 0; - i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 1008 | 0) >> 2] = 0; - HEAP32[($4_1 + 1012 | 0) >> 2] = i64toi32_i32$0; - $285($4_1 + 1008 | 0 | 0, (HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 72 | 0 | 0); - HEAP32[($4_1 + 48 | 0) >> 2] = HEAP32[($4_1 + 1008 | 0) >> 2] | 0; - $13($4_1 + 1024 | 0 | 0, 68046 | 0, $4_1 + 48 | 0 | 0) | 0; - $14($4_1 + 1008 | 0 | 0); - $724($4_1 + 732 | 0 | 0, 0 | 0, 276 | 0) | 0; - $369_1 = 0; - $75($4_1 + 724 | 0 | 0, $4_1 + 732 | 0 | 0, HEAP32[($4_1 + 1024 | 0) >> 2] | 0 | 0, $369_1 | 0, $369_1 | 0, 1 | 0); - $22((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 724 | 0 | 0); + $285($4_1 + 1024 | 0 | 0, (HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 72 | 0 | 0); + HEAP32[($4_1 + 48 | 0) >> 2] = HEAP32[($4_1 + 1024 | 0) >> 2] | 0; + $13($4_1 + 1040 | 0 | 0, 68119 | 0, $4_1 + 48 | 0 | 0) | 0; $14($4_1 + 1024 | 0 | 0); - $11($4_1 + 724 | 0 | 0); - HEAP32[($4_1 + 720 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) >> 2] | 0; + $725($4_1 + 744 | 0 | 0, 0 | 0, 280 | 0) | 0; + $369_1 = 0; + $75($4_1 + 736 | 0 | 0, $4_1 + 744 | 0 | 0, HEAP32[($4_1 + 1040 | 0) >> 2] | 0 | 0, $369_1 | 0, $369_1 | 0, 1 | 0); + $22((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 736 | 0 | 0); + $14($4_1 + 1040 | 0 | 0); + $11($4_1 + 736 | 0 | 0); + HEAP32[($4_1 + 732 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) >> 2] | 0; label$45 : { label$46 : while (1) { - if (!((HEAP32[($4_1 + 720 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 732 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$45 } - $19((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 12 | 0 | 0, HEAP32[($4_1 + 720 | 0) >> 2] | 0 | 0) | 0; - HEAP32[($4_1 + 720 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 720 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; + $19((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 12 | 0 | 0, HEAP32[($4_1 + 732 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 732 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 732 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0; continue label$46; }; } - $5(HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, 64 | 0); + $5(HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, 64 | 0); $414_1 = 0; - $75($4_1 + 712 | 0 | 0, $4_1 + 732 | 0 | 0, 101053 | 0, $414_1 | 0, $414_1 | 0, $414_1 | 0); - $22((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 712 | 0 | 0); - $11($4_1 + 712 | 0 | 0); + $75($4_1 + 724 | 0 | 0, $4_1 + 744 | 0 | 0, 101633 | 0, $414_1 | 0, $414_1 | 0, $414_1 | 0); + $22((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 12 | 0 | 0, $4_1 + 724 | 0 | 0); + $11($4_1 + 724 | 0 | 0); $433_1 = 0; - $75($4_1 + 704 | 0 | 0, $4_1 + 732 | 0 | 0, $4_1 + 1040 | 0 | 0, $433_1 | 0, $433_1 | 0, 1 | 0); - $16((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, $4_1 + 704 | 0 | 0); - $11($4_1 + 704 | 0 | 0); + $75($4_1 + 716 | 0 | 0, $4_1 + 744 | 0 | 0, $4_1 + 1056 | 0 | 0, $433_1 | 0, $433_1 | 0, 1 | 0); + $16((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, $4_1 + 716 | 0 | 0); + $11($4_1 + 716 | 0 | 0); } break label$1; case 11: label$47 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$47 } - $626(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + $626(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); } - $622(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 88 | 0) >> 2] | 0 | 0); + $622(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 88 | 0) >> 2] | 0 | 0); label$48 : { - if ((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { + if ((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$48 } - fimport$0(76070 | 0, 74032 | 0, 29733 | 0, 70210 | 0); + fimport$0(76472 | 0, 74090 | 0, 29827 | 0, 70283 | 0); wasm2js_trap(); } label$49 : { - if ((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { + if ((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$49 } - fimport$0(76042 | 0, 74032 | 0, 29734 | 0, 70210 | 0); + fimport$0(76444 | 0, 74090 | 0, 29828 | 0, 70283 | 0); wasm2js_trap(); } break label$1; case 23: label$50 : { - if (!((HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (1 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (1 | 0) & 1 | 0)) { break label$50 } - HEAP32[($4_1 + 700 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $5(HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, 64 | 0); + HEAP32[($4_1 + 712 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; + $5(HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, 64 | 0); i64toi32_i32$0 = 0; $716_1 = 0; - i64toi32_i32$1 = $4_1 + 678 | 0; + i64toi32_i32$1 = $4_1 + 694 | 0; HEAP16[i64toi32_i32$1 >> 1] = $716_1; HEAP16[(i64toi32_i32$1 + 2 | 0) >> 1] = $716_1 >>> 16 | 0; HEAP16[(i64toi32_i32$1 + 4 | 0) >> 1] = i64toi32_i32$0; HEAP16[(i64toi32_i32$1 + 6 | 0) >> 1] = i64toi32_i32$0 >>> 16 | 0; - i64toi32_i32$1 = $4_1 + 672 | 0; + i64toi32_i32$1 = $4_1 + 688 | 0; HEAP32[i64toi32_i32$1 >> 2] = $716_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 664 | 0) >> 2] = $716_1; - HEAP32[($4_1 + 668 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($4_1 + 680 | 0) >> 2] = $716_1; + HEAP32[($4_1 + 684 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 656 | 0) >> 2] = $716_1; - HEAP32[($4_1 + 660 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$0 = $138((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 64 | 0 | 0) | 0; + HEAP32[($4_1 + 672 | 0) >> 2] = $716_1; + HEAP32[($4_1 + 676 | 0) >> 2] = i64toi32_i32$0; + i64toi32_i32$0 = $138((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 64 | 0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $1734 = i64toi32_i32$0; i64toi32_i32$0 = $4_1; HEAP32[($4_1 + 64 | 0) >> 2] = $1734; HEAP32[($4_1 + 68 | 0) >> 2] = i64toi32_i32$1; - $756($4_1 + 656 | 0 | 0, 30 | 0, 73109 | 0, $4_1 + 64 | 0 | 0) | 0; - $724($4_1 + 380 | 0 | 0, 0 | 0, 276 | 0) | 0; - $75($4_1 + 372 | 0 | 0, $4_1 + 380 | 0 | 0, $4_1 + 656 | 0 | 0, 0 | 0, HEAP32[($4_1 + 700 | 0) >> 2] | 0 | 0, 1 | 0); - HEAP32[((HEAP32[($4_1 + 372 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; - $16((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, $4_1 + 372 | 0 | 0); - $11($4_1 + 372 | 0 | 0); + $757($4_1 + 672 | 0 | 0, 30 | 0, 73167 | 0, $4_1 + 64 | 0 | 0) | 0; + $725($4_1 + 392 | 0 | 0, 0 | 0, 280 | 0) | 0; + $75($4_1 + 384 | 0 | 0, $4_1 + 392 | 0 | 0, $4_1 + 672 | 0 | 0, 0 | 0, HEAP32[($4_1 + 712 | 0) >> 2] | 0 | 0, 1 | 0); + HEAP32[((HEAP32[($4_1 + 384 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; + $16((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, $4_1 + 384 | 0 | 0); + $11($4_1 + 384 | 0 | 0); } label$51 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$51 } - $618(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $618(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); } label$52 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$52 } - $626(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + $626(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); } break label$1; case 18: @@ -47569,16 +47846,16 @@ function asmFunc(imports) { case 31: case 32: label$53 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$53 } - $618(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $618(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); } label$54 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$54 } - $626(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + $626(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); } break label$1; case 33: @@ -47602,61 +47879,61 @@ function asmFunc(imports) { case 51: case 52: label$55 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$55 } - $618(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + $618(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); } label$56 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$56 } - $618(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $618(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); } label$57 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$57 } - $626(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); + $626(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0); } break label$1; case 20: label$58 : { - if (!((HEAP32[((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (3 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (3 | 0) & 1 | 0)) { break label$58 } - $724($4_1 + 96 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 104 | 0 | 0, 0 | 0, 280 | 0) | 0; i64toi32_i32$1 = 0; i64toi32_i32$0 = $4_1; - HEAP32[($4_1 + 88 | 0) >> 2] = 0; - HEAP32[($4_1 + 92 | 0) >> 2] = i64toi32_i32$1; + HEAP32[($4_1 + 96 | 0) >> 2] = 0; + HEAP32[($4_1 + 100 | 0) >> 2] = i64toi32_i32$1; label$59 : { label$60 : { - if (!(($139((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { + if (!(($139((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { break label$60 } $647_1 = 0; - $75($4_1 + 80 | 0 | 0, $4_1 + 96 | 0 | 0, 84637 | 0, $647_1 | 0, $647_1 | 0, 1 | 0); - i64toi32_i32$1 = HEAP32[($4_1 + 80 | 0) >> 2] | 0; - i64toi32_i32$0 = HEAP32[($4_1 + 84 | 0) >> 2] | 0; + $75($4_1 + 88 | 0 | 0, $4_1 + 104 | 0 | 0, 85194 | 0, $647_1 | 0, $647_1 | 0, 1 | 0); + i64toi32_i32$1 = HEAP32[($4_1 + 88 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[($4_1 + 92 | 0) >> 2] | 0; $2007 = i64toi32_i32$1; i64toi32_i32$1 = $4_1; - HEAP32[($4_1 + 88 | 0) >> 2] = $2007; - HEAP32[($4_1 + 92 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($4_1 + 96 | 0) >> 2] = $2007; + HEAP32[($4_1 + 100 | 0) >> 2] = i64toi32_i32$0; break label$59; } $656_1 = 0; - $75($4_1 + 72 | 0 | 0, $4_1 + 96 | 0 | 0, 84801 | 0, $656_1 | 0, $656_1 | 0, 1 | 0); - i64toi32_i32$0 = HEAP32[($4_1 + 72 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[($4_1 + 76 | 0) >> 2] | 0; + $75($4_1 + 80 | 0 | 0, $4_1 + 104 | 0 | 0, 85358 | 0, $656_1 | 0, $656_1 | 0, 1 | 0); + i64toi32_i32$0 = HEAP32[($4_1 + 80 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($4_1 + 84 | 0) >> 2] | 0; $2025 = i64toi32_i32$0; i64toi32_i32$0 = $4_1; - HEAP32[($4_1 + 88 | 0) >> 2] = $2025; - HEAP32[($4_1 + 92 | 0) >> 2] = i64toi32_i32$1; + HEAP32[($4_1 + 96 | 0) >> 2] = $2025; + HEAP32[($4_1 + 100 | 0) >> 2] = i64toi32_i32$1; } - $16((HEAP32[($4_1 + 1324 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, $4_1 + 88 | 0 | 0); - $5(HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, 64 | 0); - $11($4_1 + 88 | 0 | 0); + $16((HEAP32[($4_1 + 1340 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, $4_1 + 96 | 0 | 0); + $5(HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0 | 0, 64 | 0); + $11($4_1 + 96 | 0 | 0); } break label$1; case 21: @@ -47665,22 +47942,22 @@ function asmFunc(imports) { break label$1; case 53: label$61 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$61 } - $618(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0 | 0); + $618(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0 | 0); } label$62 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$62 } - $618(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); + $618(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 132 | 0) >> 2] | 0 | 0); } label$63 : { - if (!((HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$63 } - $618(HEAP32[($4_1 + 1324 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1320 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); + $618(HEAP32[($4_1 + 1340 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 1336 | 0) >> 2] | 0) + 136 | 0) >> 2] | 0 | 0); } break label$1; default: @@ -47688,7 +47965,7 @@ function asmFunc(imports) { }; } } - global$0 = $4_1 + 1328 | 0; + global$0 = $4_1 + 1344 | 0; return; } @@ -47731,8 +48008,8 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (1 | 0) & 1 | 0)) { break label$4 } - $817(HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $36_1 = $763(84852 | 0) | 0; + $818(HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $36_1 = $764(85409 | 0) | 0; HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] = $36_1; break label$3; } @@ -47747,8 +48024,8 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) > (1 | 0) & 1 | 0)) { break label$7 } - $817(HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $61_1 = $763(74177 | 0) | 0; + $818(HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $61_1 = $764(74235 | 0) | 0; HEAP32[((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] = $61_1; } } @@ -47856,8 +48133,8 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$13 } - $817(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0); - HEAP32[($4_1 + 316 | 0) >> 2] = $763(HEAP32[((HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $818(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0); + HEAP32[($4_1 + 316 | 0) >> 2] = $764(HEAP32[((HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; } $309($4_1 + 352 | 0 | 0, $4_1 + 296 | 0 | 0); label$14 : { @@ -47875,8 +48152,8 @@ function asmFunc(imports) { $143_1 = 0; } HEAP32[($4_1 + 292 | 0) >> 2] = $143_1; - $724($4_1 + 16 | 0 | 0, 0 | 0, 276 | 0) | 0; - $75($4_1 + 8 | 0 | 0, $4_1 + 16 | 0 | 0, HEAP32[($4_1 + 352 | 0) >> 2] | 0 | 0, 0 | 0, HEAP32[($4_1 + 292 | 0) >> 2] | 0 | 0, 1 | 0); + $725($4_1 + 12 | 0 | 0, 0 | 0, 280 | 0) | 0; + $75($4_1 + 4 | 0 | 0, $4_1 + 12 | 0 | 0, HEAP32[($4_1 + 352 | 0) >> 2] | 0 | 0, 0 | 0, HEAP32[($4_1 + 292 | 0) >> 2] | 0 | 0, 1 | 0); label$17 : { label$18 : { if (!((HEAP32[(HEAP32[($4_1 + 376 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -47885,8 +48162,8 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($4_1 + 376 | 0) >> 2] | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$18 } - HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($4_1 + 376 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; - $16((HEAP32[($4_1 + 380 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); + HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($4_1 + 376 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; + $16((HEAP32[($4_1 + 380 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $4_1 + 4 | 0 | 0); $5(HEAP32[(HEAP32[($4_1 + 376 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 64 | 0); break label$17; } @@ -47895,16 +48172,16 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($4_1 + 376 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$20 } - HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; - $16((HEAP32[($4_1 + 380 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); + HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; + $16((HEAP32[($4_1 + 380 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 4 | 0 | 0); break label$19; } - HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($4_1 + 376 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; - $16((HEAP32[($4_1 + 380 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); + HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($4_1 + 376 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; + $16((HEAP32[($4_1 + 380 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $4_1 + 4 | 0 | 0); $5(HEAP32[(HEAP32[($4_1 + 376 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 376 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 64 | 0); } } - $11($4_1 + 8 | 0 | 0); + $11($4_1 + 4 | 0 | 0); } $185($4_1 + 296 | 0 | 0); $14($4_1 + 352 | 0 | 0); @@ -47940,14 +48217,14 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (123 | 0) & 1 | 0) { break label$4 } - fimport$0(86017 | 0, 74032 | 0, 29322 | 0, 66135 | 0); + fimport$0(86574 | 0, 74090 | 0, 29416 | 0, 66135 | 0); wasm2js_trap(); } HEAP32[($4_1 + 292 | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $724($4_1 + 16 | 0 | 0, 0 | 0, 276 | 0) | 0; - $75($4_1 + 8 | 0 | 0, $4_1 + 16 | 0 | 0, 84801 | 0, 0 | 0, HEAP32[($4_1 + 292 | 0) >> 2] | 0 | 0, 1 | 0); - $16((HEAP32[($4_1 + 300 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); - $11($4_1 + 8 | 0 | 0); + $725($4_1 + 12 | 0 | 0, 0 | 0, 280 | 0) | 0; + $75($4_1 + 4 | 0 | 0, $4_1 + 12 | 0 | 0, 85358 | 0, 0 | 0, HEAP32[($4_1 + 292 | 0) >> 2] | 0 | 0, 1 | 0); + $16((HEAP32[($4_1 + 300 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[(HEAP32[($4_1 + 296 | 0) >> 2] | 0) >> 2] | 0 | 0, $4_1 + 4 | 0 | 0); + $11($4_1 + 4 | 0 | 0); } break label$1; } @@ -48073,72 +48350,72 @@ function asmFunc(imports) { $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; var $5_1 = 0, i64toi32_i32$0 = 0; - $5_1 = global$0 - 320 | 0; + $5_1 = global$0 - 336 | 0; global$0 = $5_1; - HEAP32[($5_1 + 316 | 0) >> 2] = $0_1; - HEAP32[($5_1 + 312 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 308 | 0) >> 2] = $2_1; + HEAP32[($5_1 + 332 | 0) >> 2] = $0_1; + HEAP32[($5_1 + 328 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 324 | 0) >> 2] = $2_1; label$1 : { - if (!((HEAP32[(HEAP32[($5_1 + 312 | 0) >> 2] | 0) >> 2] | 0) & 8388608 | 0)) { + if (!((HEAP32[(HEAP32[($5_1 + 328 | 0) >> 2] | 0) >> 2] | 0) & 8388608 | 0)) { break label$1 } - HEAP32[($5_1 + 304 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $5(HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, 64 | 0); - HEAP32[($5_1 + 296 | 0) >> 2] = 0; + HEAP32[($5_1 + 320 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; + $5(HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, 64 | 0); + HEAP32[($5_1 + 312 | 0) >> 2] = 0; i64toi32_i32$0 = 0; - HEAP32[($5_1 + 288 | 0) >> 2] = 0; - HEAP32[($5_1 + 292 | 0) >> 2] = i64toi32_i32$0; - $285($5_1 + 288 | 0 | 0, $326(HEAP32[($5_1 + 308 | 0) >> 2] | 0 | 0) | 0 | 0); - $724($5_1 + 12 | 0 | 0, 0 | 0, 276 | 0) | 0; - $75($5_1 + 4 | 0 | 0, $5_1 + 12 | 0 | 0, HEAP32[($5_1 + 288 | 0) >> 2] | 0 | 0, 0 | 0, HEAP32[($5_1 + 304 | 0) >> 2] | 0 | 0, 1 | 0); - $16((HEAP32[($5_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $5_1 + 4 | 0 | 0); - $14($5_1 + 288 | 0 | 0); - $11($5_1 + 4 | 0 | 0); + HEAP32[($5_1 + 304 | 0) >> 2] = 0; + HEAP32[($5_1 + 308 | 0) >> 2] = i64toi32_i32$0; + $285($5_1 + 304 | 0 | 0, $326(HEAP32[($5_1 + 324 | 0) >> 2] | 0 | 0) | 0 | 0); + $725($5_1 + 24 | 0 | 0, 0 | 0, 280 | 0) | 0; + $75($5_1 + 16 | 0 | 0, $5_1 + 24 | 0 | 0, HEAP32[($5_1 + 304 | 0) >> 2] | 0 | 0, 0 | 0, HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0, 1 | 0); + $16((HEAP32[($5_1 + 332 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $5_1 + 16 | 0 | 0); + $14($5_1 + 304 | 0 | 0); + $11($5_1 + 16 | 0 | 0); } label$2 : { label$3 : { - if (!((HEAP32[($5_1 + 312 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 328 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$3 } break label$2; } label$4 : { - if (!((HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - $629(HEAP32[($5_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $629(HEAP32[($5_1 + 332 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$2; } label$5 : { label$6 : { - if (!((HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } - $630(HEAP32[($5_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + $630(HEAP32[($5_1 + 332 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); break label$5; } label$7 : { label$8 : { - if (!((HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } break label$7; } - HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; + HEAP32[($5_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 328 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0; label$9 : { label$10 : while (1) { - if (!((HEAP32[$5_1 >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } - $631(HEAP32[($5_1 + 316 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0); - HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[$5_1 >> 2] | 0) + 12 | 0) >> 2] | 0; + $631(HEAP32[($5_1 + 332 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; continue label$10; }; } } } } - global$0 = $5_1 + 320 | 0; + global$0 = $5_1 + 336 | 0; return; } @@ -48169,90 +48446,90 @@ function asmFunc(imports) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0, $56_1 = 0, $108_1 = 0, $103_1 = 0, $118_1 = 0, $148_1 = 0; - $4_1 = global$0 - 752 | 0; + $4_1 = global$0 - 768 | 0; global$0 = $4_1; - HEAP32[($4_1 + 748 | 0) >> 2] = $0_1; - HEAP32[($4_1 + 744 | 0) >> 2] = $1_1; + HEAP32[($4_1 + 764 | 0) >> 2] = $0_1; + HEAP32[($4_1 + 760 | 0) >> 2] = $1_1; label$1 : { - if (!((HEAP32[(HEAP32[($4_1 + 744 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($4_1 + 760 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $571(HEAP32[($4_1 + 748 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 744 | 0) >> 2] | 0) >> 2] | 0 | 0); + $571(HEAP32[($4_1 + 764 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 760 | 0) >> 2] | 0) >> 2] | 0 | 0); } - HEAP32[($4_1 + 740 | 0) >> 2] = $235(HEAP32[($4_1 + 744 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($4_1 + 756 | 0) >> 2] = $235(HEAP32[($4_1 + 760 | 0) >> 2] | 0 | 0) | 0; label$2 : { - if (!((HEAPU8[((HEAP32[($4_1 + 744 | 0) >> 2] | 0) + 237 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($4_1 + 760 | 0) >> 2] | 0) + 237 | 0) >> 0] | 0) & 1 | 0)) { break label$2 } - if ((HEAPU8[(HEAP32[($4_1 + 748 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[(HEAP32[($4_1 + 764 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { break label$2 } - HEAP32[($4_1 + 736 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 744 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - HEAP32[($4_1 + 732 | 0) >> 2] = (HEAP32[($4_1 + 744 | 0) >> 2] | 0) + 36 | 0; - $724($4_1 + 528 | 0 | 0, 0 | 0, 200 | 0) | 0; - HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 732 | 0) >> 2] | 0; - $756($4_1 + 528 | 0 | 0, 200 | 0, 68052 | 0, $4_1 + 16 | 0 | 0) | 0; - $724($4_1 + 252 | 0 | 0, 0 | 0, 276 | 0) | 0; + HEAP32[($4_1 + 752 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 760 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; + HEAP32[($4_1 + 748 | 0) >> 2] = (HEAP32[($4_1 + 760 | 0) >> 2] | 0) + 36 | 0; + $725($4_1 + 544 | 0 | 0, 0 | 0, 200 | 0) | 0; + HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[($4_1 + 748 | 0) >> 2] | 0; + $757($4_1 + 544 | 0 | 0, 200 | 0, 68125 | 0, $4_1 + 16 | 0 | 0) | 0; + $725($4_1 + 264 | 0 | 0, 0 | 0, 280 | 0) | 0; $56_1 = 0; - $75($4_1 + 244 | 0 | 0, $4_1 + 252 | 0 | 0, $4_1 + 528 | 0 | 0, $56_1 | 0, $56_1 | 0, 1 | 0); - $16((HEAP32[($4_1 + 748 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 736 | 0) >> 2] | 0 | 0, $4_1 + 244 | 0 | 0); - $11($4_1 + 244 | 0 | 0); + $75($4_1 + 256 | 0 | 0, $4_1 + 264 | 0 | 0, $4_1 + 544 | 0 | 0, $56_1 | 0, $56_1 | 0, 1 | 0); + $16((HEAP32[($4_1 + 764 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[($4_1 + 752 | 0) >> 2] | 0 | 0, $4_1 + 256 | 0 | 0); + $11($4_1 + 256 | 0 | 0); } label$3 : { - if (!((HEAP32[($4_1 + 740 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 756 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } label$4 : { label$5 : { - if (!((HEAPU8[((HEAP32[($4_1 + 748 | 0) >> 2] | 0) + 2 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($4_1 + 764 | 0) >> 2] | 0) + 2 | 0) >> 0] | 0) & 1 | 0)) { break label$5 } - if ((HEAPU8[(HEAP32[($4_1 + 748 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[(HEAP32[($4_1 + 764 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { break label$5 } label$6 : { - if (!((HEAP32[((HEAP32[($4_1 + 740 | 0) >> 2] | 0) + 240 | 0) >> 2] | 0 | 0) > (HEAP32[((HEAP32[($4_1 + 744 | 0) >> 2] | 0) + 240 | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 756 | 0) >> 2] | 0) + 240 | 0) >> 2] | 0 | 0) > (HEAP32[((HEAP32[($4_1 + 760 | 0) >> 2] | 0) + 240 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$6 } - if (HEAP32[((HEAP32[($4_1 + 740 | 0) >> 2] | 0) + 244 | 0) >> 2] | 0) { + if (HEAP32[((HEAP32[($4_1 + 756 | 0) >> 2] | 0) + 244 | 0) >> 2] | 0) { break label$6 } - $724($4_1 + 32 | 0 | 0, 0 | 0, 212 | 0) | 0; - $103_1 = (HEAP32[($4_1 + 744 | 0) >> 2] | 0) + 36 | 0; - HEAP32[($4_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 748 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $725($4_1 + 32 | 0 | 0, 0 | 0, 212 | 0) | 0; + $103_1 = (HEAP32[($4_1 + 760 | 0) >> 2] | 0) + 36 | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 764 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[$4_1 >> 2] = $103_1; - $756($4_1 + 32 | 0 | 0, 212 | 0, 73705 | 0, $4_1 | 0) | 0; - $108_1 = HEAP32[($4_1 + 748 | 0) >> 2] | 0; + $757($4_1 + 32 | 0 | 0, 212 | 0, 73763 | 0, $4_1 | 0) | 0; + $108_1 = HEAP32[($4_1 + 764 | 0) >> 2] | 0; HEAP32[($108_1 + 4 | 0) >> 2] = (HEAP32[($108_1 + 4 | 0) >> 2] | 0) + 1 | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 740 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $118_1 = $763($4_1 + 32 | 0 | 0) | 0; - HEAP32[((HEAP32[((HEAP32[($4_1 + 740 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] = $118_1; - HEAP32[((HEAP32[($4_1 + 740 | 0) >> 2] | 0) + 244 | 0) >> 2] = 1; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 756 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $118_1 = $764($4_1 + 32 | 0 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[($4_1 + 756 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] = $118_1; + HEAP32[((HEAP32[($4_1 + 756 | 0) >> 2] | 0) + 244 | 0) >> 2] = 1; } break label$4; } label$7 : { - if (!((HEAPU8[(HEAP32[($4_1 + 748 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[(HEAP32[($4_1 + 764 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0)) { break label$7 } label$8 : { - if (!((HEAP32[((HEAP32[($4_1 + 740 | 0) >> 2] | 0) + 244 | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 756 | 0) >> 2] | 0) + 244 | 0) >> 2] | 0 | 0) == (1 | 0) & 1 | 0)) { break label$8 } label$9 : { - if (!((HEAP32[($4_1 + 744 | 0) >> 2] | 0 | 0) != (HEAP32[($4_1 + 740 | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 760 | 0) >> 2] | 0 | 0) != (HEAP32[($4_1 + 756 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$9 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 744 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $148_1 = $763(HEAP32[((HEAP32[((HEAP32[($4_1 + 740 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; - HEAP32[((HEAP32[((HEAP32[($4_1 + 744 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] = $148_1; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 760 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $148_1 = $764(HEAP32[((HEAP32[((HEAP32[($4_1 + 756 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + HEAP32[((HEAP32[((HEAP32[($4_1 + 760 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 4 | 0) >> 2] = $148_1; } } } } } - $634(HEAP32[($4_1 + 748 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 744 | 0) >> 2] | 0) + 4 | 0 | 0); - global$0 = $4_1 + 752 | 0; + $634(HEAP32[($4_1 + 764 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 760 | 0) >> 2] | 0) + 4 | 0 | 0); + global$0 = $4_1 + 768 | 0; return; } @@ -48316,12 +48593,12 @@ function asmFunc(imports) { HEAP8[($4_1 + 295 | 0) >> 0] = 1; $302($4_1 + 296 | 0 | 0, $4_1 + 295 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); $301($4_1 + 296 | 0 | 0, $4_1 + 295 | 0 | 0, HEAP32[(HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; - $724($4_1 + 16 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 12 | 0 | 0, 0 | 0, 280 | 0) | 0; $124_1 = 0; - $75($4_1 + 8 | 0 | 0, $4_1 + 16 | 0 | 0, HEAP32[($4_1 + 296 | 0) >> 2] | 0 | 0, $124_1 | 0, $124_1 | 0, $124_1 | 0); - $16((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); + $75($4_1 + 4 | 0 | 0, $4_1 + 12 | 0 | 0, HEAP32[($4_1 + 296 | 0) >> 2] | 0 | 0, $124_1 | 0, $124_1 | 0, $124_1 | 0); + $16((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0, $4_1 + 4 | 0 | 0); $14($4_1 + 296 | 0 | 0); - $11($4_1 + 8 | 0 | 0); + $11($4_1 + 4 | 0 | 0); } } label$8 : { @@ -48378,8 +48655,8 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9026 | 0) & 1 | 0)) { break label$2 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $34_1 = $763(84832 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $34_1 = $764(85389 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = $34_1; } label$3 : { @@ -48397,11 +48674,11 @@ function asmFunc(imports) { break label$3 } } - $724($4_1 + 16 | 0 | 0, 0 | 0, 100 | 0) | 0; + $725($4_1 + 16 | 0 | 0, 0 | 0, 100 | 0) | 0; HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $756($4_1 + 16 | 0 | 0, 100 | 0, 84845 | 0, $4_1 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $91_1 = $763($4_1 + 16 | 0 | 0) | 0; + $757($4_1 + 16 | 0 | 0, 100 | 0, 85402 | 0, $4_1 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $91_1 = $764($4_1 + 16 | 0 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 120 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = $91_1; } } @@ -48438,8 +48715,8 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $47_1 = $763(84818 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $47_1 = $764(85375 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] = $47_1; } label$7 : { @@ -48587,8 +48864,8 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) < (0 | 0) & 1 | 0)) { break label$7 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $62_1 = $763(69576 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $62_1 = $764(69649 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = $62_1; break label$6; } @@ -48598,17 +48875,17 @@ function asmFunc(imports) { break label$9 } label$10 : { - if ($760(HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 70857 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 70930 | 0) | 0) { break label$10 } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $82_1 = $763(70862 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $82_1 = $764(70935 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = $82_1; } break label$8; } - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $89_1 = $763(70857 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $89_1 = $764(70930 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = $89_1; } } @@ -48889,7 +49166,7 @@ function asmFunc(imports) { $651(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$5; } - fimport$0(72213 | 0, 74032 | 0, 30138 | 0, 66641 | 0); + fimport$0(72286 | 0, 74090 | 0, 30232 | 0, 66697 | 0); wasm2js_trap(); } } @@ -49008,11 +49285,11 @@ function asmFunc(imports) { HEAP32[($4_1 + 360 | 0) >> 2] = 0; HEAP32[($4_1 + 364 | 0) >> 2] = i64toi32_i32$0; HEAP32[$4_1 >> 2] = HEAP32[($4_1 + 376 | 0) >> 2] | 0; - $13($4_1 + 360 | 0 | 0, 86815 | 0, $4_1 | 0) | 0; + $13($4_1 + 360 | 0 | 0, 87372 | 0, $4_1 | 0) | 0; HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; - $13($4_1 + 360 | 0 | 0, 78028 | 0, $4_1 + 16 | 0 | 0) | 0; + $13($4_1 + 360 | 0 | 0, 78585 | 0, $4_1 + 16 | 0 | 0) | 0; $13($4_1 + 360 | 0 | 0, 65624 | 0, 0 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 360 | 0) >> 2] | 0; $54_1 = HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; HEAP32[($54_1 + 24 | 0) >> 2] = HEAP32[($54_1 + 24 | 0) >> 2] | 0 | 64 | 0; @@ -49023,8 +49300,8 @@ function asmFunc(imports) { HEAP32[($4_1 + 344 | 0) >> 2] = 0; HEAP32[($4_1 + 348 | 0) >> 2] = i64toi32_i32$0; HEAP32[($4_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; - $13($4_1 + 344 | 0 | 0, 73732 | 0, $4_1 + 32 | 0 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $13($4_1 + 344 | 0 | 0, 73790 | 0, $4_1 + 32 | 0 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 344 | 0) >> 2] | 0; } $14($4_1 + 376 | 0 | 0); @@ -49062,13 +49339,13 @@ function asmFunc(imports) { HEAP32[($4_1 + 312 | 0) >> 2] = 0; HEAP32[($4_1 + 316 | 0) >> 2] = i64toi32_i32$0; HEAP32[($4_1 + 48 | 0) >> 2] = HEAP32[($4_1 + 328 | 0) >> 2] | 0; - $13($4_1 + 312 | 0 | 0, 86815 | 0, $4_1 + 48 | 0 | 0) | 0; - $13($4_1 + 312 | 0 | 0, 69754 | 0, 0 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $13($4_1 + 312 | 0 | 0, 87372 | 0, $4_1 + 48 | 0 | 0) | 0; + $13($4_1 + 312 | 0 | 0, 69827 | 0, 0 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 312 | 0) >> 2] | 0; HEAP32[($4_1 + 312 | 0) >> 2] = 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $146_1 = $763(65581 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $146_1 = $764(65581 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $146_1; $14($4_1 + 312 | 0 | 0); } @@ -49092,14 +49369,14 @@ function asmFunc(imports) { HEAP32[($4_1 + 224 | 0) >> 2] = 0; HEAP32[($4_1 + 228 | 0) >> 2] = i64toi32_i32$0; $285($4_1 + 224 | 0 | 0, $4_1 + 240 | 0 | 0); - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); HEAP32[($4_1 + 216 | 0) >> 2] = 0; i64toi32_i32$0 = 0; HEAP32[($4_1 + 208 | 0) >> 2] = 0; HEAP32[($4_1 + 212 | 0) >> 2] = i64toi32_i32$0; - $13($4_1 + 208 | 0 | 0, 86719 | 0, 0 | 0) | 0; + $13($4_1 + 208 | 0 | 0, 87276 | 0, 0 | 0) | 0; HEAP32[($4_1 + 64 | 0) >> 2] = HEAP32[($4_1 + 224 | 0) >> 2] | 0; - $13($4_1 + 208 | 0 | 0, 86942 | 0, $4_1 + 64 | 0 | 0) | 0; + $13($4_1 + 208 | 0 | 0, 87522 | 0, $4_1 + 64 | 0 | 0) | 0; $14($4_1 + 224 | 0 | 0); HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 208 | 0) >> 2] | 0; HEAP32[($4_1 + 208 | 0) >> 2] = 0; @@ -49109,7 +49386,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 196 | 0) >> 2] = i64toi32_i32$0; HEAP32[($4_1 + 80 | 0) >> 2] = HEAP32[($4_1 + 296 | 0) >> 2] | 0; $13($4_1 + 192 | 0 | 0, 65538 | 0, $4_1 + 80 | 0 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 192 | 0) >> 2] | 0; HEAP32[($4_1 + 192 | 0) >> 2] = 0; $14($4_1 + 192 | 0 | 0); @@ -49143,10 +49420,10 @@ function asmFunc(imports) { HEAP32[($4_1 + 160 | 0) >> 2] = 0; HEAP32[($4_1 + 164 | 0) >> 2] = i64toi32_i32$0; HEAP32[($4_1 + 96 | 0) >> 2] = HEAP32[($4_1 + 176 | 0) >> 2] | 0; - $13($4_1 + 160 | 0 | 0, 86815 | 0, $4_1 + 96 | 0 | 0) | 0; - $13($4_1 + 160 | 0 | 0, 78021 | 0, 0 | 0) | 0; + $13($4_1 + 160 | 0 | 0, 87372 | 0, $4_1 + 96 | 0 | 0) | 0; + $13($4_1 + 160 | 0 | 0, 78578 | 0, 0 | 0) | 0; $13($4_1 + 160 | 0 | 0, 65624 | 0, 0 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 160 | 0) >> 2] | 0; HEAP32[($4_1 + 160 | 0) >> 2] = 0; $298_1 = HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; @@ -49175,20 +49452,20 @@ function asmFunc(imports) { HEAP32[($4_1 + 128 | 0) >> 2] = 0; HEAP32[($4_1 + 132 | 0) >> 2] = i64toi32_i32$0; HEAP32[($4_1 + 112 | 0) >> 2] = HEAP32[($4_1 + 144 | 0) >> 2] | 0; - $13($4_1 + 128 | 0 | 0, 86815 | 0, $4_1 + 112 | 0 | 0) | 0; - $13($4_1 + 128 | 0 | 0, 69650 | 0, 0 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $13($4_1 + 128 | 0 | 0, 87372 | 0, $4_1 + 112 | 0 | 0) | 0; + $13($4_1 + 128 | 0 | 0, 69723 | 0, 0 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] = HEAP32[($4_1 + 128 | 0) >> 2] | 0; HEAP32[($4_1 + 128 | 0) >> 2] = 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $359_1 = $763(65581 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $359_1 = $764(65581 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $359_1; $14($4_1 + 128 | 0 | 0); } $14($4_1 + 144 | 0 | 0); break label$16; } - fimport$0(72213 | 0, 74032 | 0, 30076 | 0, 66442 | 0); + fimport$0(72286 | 0, 74090 | 0, 30170 | 0, 66467 | 0); wasm2js_trap(); } } @@ -49264,13 +49541,13 @@ function asmFunc(imports) { HEAP32[($4_1 + 296 | 0) >> 2] = 0; HEAP32[($4_1 + 300 | 0) >> 2] = i64toi32_i32$0; $556(HEAP32[($4_1 + 308 | 0) >> 2] | 0 | 0, $4_1 + 296 | 0 | 0, 1 & 1 | 0 | 0); - $724($4_1 + 20 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 16 | 0 | 0, 0 | 0, 280 | 0) | 0; $63_1 = 0; - $75($4_1 + 12 | 0 | 0, $4_1 + 20 | 0 | 0, HEAP32[($4_1 + 296 | 0) >> 2] | 0 | 0, $63_1 | 0, $63_1 | 0, 1 | 0); - $16((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 12 | 0 | 0); + $75($4_1 + 8 | 0 | 0, $4_1 + 16 | 0 | 0, HEAP32[($4_1 + 296 | 0) >> 2] | 0 | 0, $63_1 | 0, $63_1 | 0, 1 | 0); + $16((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); $567(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0); $14($4_1 + 296 | 0 | 0); - $11($4_1 + 12 | 0 | 0); + $11($4_1 + 8 | 0 | 0); } global$0 = $4_1 + 320 | 0; return; @@ -49302,11 +49579,11 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 300 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$2 } - $724($4_1 + 20 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 16 | 0 | 0, 0 | 0, 280 | 0) | 0; $50_1 = 0; - $75($4_1 + 12 | 0 | 0, $4_1 + 20 | 0 | 0, HEAP32[($4_1 + 296 | 0) >> 2] | 0 | 0, $50_1 | 0, $50_1 | 0, 1 | 0); - $16((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 12 | 0 | 0); - $11($4_1 + 12 | 0 | 0); + $75($4_1 + 8 | 0 | 0, $4_1 + 16 | 0 | 0, HEAP32[($4_1 + 296 | 0) >> 2] | 0 | 0, $50_1 | 0, $50_1 | 0, 1 | 0); + $16((HEAP32[($4_1 + 316 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 312 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 8 | 0 | 0); + $11($4_1 + 8 | 0 | 0); } $567(HEAP32[($4_1 + 316 | 0) >> 2] | 0 | 0); label$3 : { @@ -49346,13 +49623,13 @@ function asmFunc(imports) { HEAP32[($4_1 + 376 | 0) >> 2] = 0; HEAP32[($4_1 + 380 | 0) >> 2] = i64toi32_i32$0; $556(HEAP32[($4_1 + 388 | 0) >> 2] | 0 | 0, $4_1 + 376 | 0 | 0, 1 & 1 | 0 | 0); - $724($4_1 + 100 | 0 | 0, 0 | 0, 276 | 0) | 0; + $725($4_1 + 96 | 0 | 0, 0 | 0, 280 | 0) | 0; $45_1 = 0; - $75($4_1 + 92 | 0 | 0, $4_1 + 100 | 0 | 0, HEAP32[($4_1 + 376 | 0) >> 2] | 0 | 0, $45_1 | 0, $45_1 | 0, 1 | 0); - $16((HEAP32[($4_1 + 396 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[($4_1 + 392 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 92 | 0 | 0); + $75($4_1 + 88 | 0 | 0, $4_1 + 96 | 0 | 0, HEAP32[($4_1 + 376 | 0) >> 2] | 0 | 0, $45_1 | 0, $45_1 | 0, 1 | 0); + $16((HEAP32[($4_1 + 396 | 0) >> 2] | 0) + 28 | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[($4_1 + 392 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0, $4_1 + 88 | 0 | 0); $567(HEAP32[($4_1 + 396 | 0) >> 2] | 0 | 0); - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $62_1 = $763(84803 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $62_1 = $764(85360 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] = $62_1; HEAP16[($4_1 + 80 | 0) >> 1] = 0; i64toi32_i32$0 = 0; @@ -49381,21 +49658,21 @@ function asmFunc(imports) { break label$4 } HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $756($4_1 + 32 | 0 | 0, 50 | 0, 84360 | 0, $4_1 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $97_1 = $763($4_1 + 32 | 0 | 0) | 0; + $757($4_1 + 32 | 0 | 0, 50 | 0, 84917 | 0, $4_1 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $97_1 = $764($4_1 + 32 | 0 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] = $97_1; $656(HEAP32[($4_1 + 396 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); break label$3; } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $756($4_1 + 32 | 0 | 0, 50 | 0, 65557 | 0, $4_1 + 16 | 0 | 0) | 0; - $817(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $118_1 = $763($4_1 + 32 | 0 | 0) | 0; + $757($4_1 + 32 | 0 | 0, 50 | 0, 65557 | 0, $4_1 + 16 | 0 | 0) | 0; + $818(HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $118_1 = $764($4_1 + 32 | 0 | 0) | 0; HEAP32[((HEAP32[((HEAP32[($4_1 + 392 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] = $118_1; } $14($4_1 + 376 | 0 | 0); - $11($4_1 + 92 | 0 | 0); + $11($4_1 + 88 | 0 | 0); } global$0 = $4_1 + 400 | 0; return; @@ -49513,203 +49790,237 @@ function asmFunc(imports) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; - var $5_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, $256_1 = 0, $261_1 = 0, $257$hi = 0, $258$hi = 0, $29_1 = 0, $64_1 = 0; - $5_1 = global$0 - 336 | 0; + var $5_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, $294_1 = 0, $299_1 = 0, $300_1 = 0, $295$hi = 0, $296$hi = 0, $29_1 = 0, $64_1 = 0; + $5_1 = global$0 - 400 | 0; global$0 = $5_1; - HEAP32[($5_1 + 332 | 0) >> 2] = $0_1; - HEAP32[($5_1 + 328 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 324 | 0) >> 2] = $2_1; - HEAP32[($5_1 + 320 | 0) >> 2] = 0; - HEAP32[($5_1 + 316 | 0) >> 2] = $243(HEAP32[($5_1 + 328 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($5_1 + 396 | 0) >> 2] = $0_1; + HEAP32[($5_1 + 392 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 388 | 0) >> 2] = $2_1; + HEAP32[($5_1 + 384 | 0) >> 2] = 0; + HEAP32[($5_1 + 380 | 0) >> 2] = $243(HEAP32[($5_1 + 392 | 0) >> 2] | 0 | 0) | 0; label$1 : { - if (!((HEAP32[($5_1 + 316 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 380 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - HEAP32[($5_1 + 320 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 316 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($5_1 + 384 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 380 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; } - HEAP32[($5_1 + 312 | 0) >> 2] = 1; - HEAP32[($5_1 + 308 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 324 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($5_1 + 376 | 0) >> 2] = 1; + HEAP32[($5_1 + 372 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 388 | 0) >> 2] | 0) >> 2] | 0; label$2 : while (1) { $29_1 = 0; label$3 : { - if (!((HEAP32[($5_1 + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 372 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } - $29_1 = (HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0) != (0 | 0); + $29_1 = (HEAP32[($5_1 + 384 | 0) >> 2] | 0 | 0) != (0 | 0); } label$4 : { if (!($29_1 & 1 | 0)) { break label$4 } i64toi32_i32$0 = 0; - $256_1 = 0; - i64toi32_i32$1 = $5_1 + 296 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $256_1; + $294_1 = 0; + i64toi32_i32$1 = $5_1 + 360 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $294_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 288 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $256_1; + i64toi32_i32$1 = $5_1 + 352 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $294_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 280 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $256_1; + i64toi32_i32$1 = $5_1 + 344 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $294_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 272 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $256_1; + i64toi32_i32$1 = $5_1 + 336 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $294_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 264 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $256_1; + i64toi32_i32$1 = $5_1 + 328 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $294_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 256 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $256_1; + i64toi32_i32$1 = $5_1 + 320 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $294_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 248 | 0) >> 2] = $256_1; - HEAP32[($5_1 + 252 | 0) >> 2] = i64toi32_i32$0; - HEAP32[($5_1 + 244 | 0) >> 2] = $207(HEAP32[(HEAP32[($5_1 + 308 | 0) >> 2] | 0) >> 2] | 0 | 0, $5_1 + 248 | 0 | 0) | 0; + HEAP32[($5_1 + 312 | 0) >> 2] = $294_1; + HEAP32[($5_1 + 316 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($5_1 + 308 | 0) >> 2] = $207(HEAP32[(HEAP32[($5_1 + 372 | 0) >> 2] | 0) >> 2] | 0 | 0, $5_1 + 312 | 0 | 0) | 0; $64_1 = 0; label$5 : { - if (!(($135((HEAP32[(HEAP32[($5_1 + 308 | 0) >> 2] | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { + if (!(($135((HEAP32[(HEAP32[($5_1 + 372 | 0) >> 2] | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { break label$5 } - i64toi32_i32$0 = $137((HEAP32[(HEAP32[($5_1 + 308 | 0) >> 2] | 0) >> 2] | 0) + 64 | 0 | 0) | 0; + i64toi32_i32$0 = $137((HEAP32[(HEAP32[($5_1 + 372 | 0) >> 2] | 0) >> 2] | 0) + 64 | 0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; - $257$hi = i64toi32_i32$1; + $295$hi = i64toi32_i32$1; i64toi32_i32$1 = 0; - $258$hi = i64toi32_i32$1; - i64toi32_i32$1 = $257$hi; - i64toi32_i32$1 = $258$hi; - i64toi32_i32$1 = $257$hi; - i64toi32_i32$1 = $258$hi; - i64toi32_i32$1 = $257$hi; + $296$hi = i64toi32_i32$1; + i64toi32_i32$1 = $295$hi; + i64toi32_i32$1 = $296$hi; + i64toi32_i32$1 = $295$hi; + i64toi32_i32$1 = $296$hi; + i64toi32_i32$1 = $295$hi; i64toi32_i32$2 = i64toi32_i32$0; - i64toi32_i32$0 = $258$hi; + i64toi32_i32$0 = $296$hi; $64_1 = (i64toi32_i32$2 | 0) == (0 | 0) & (i64toi32_i32$1 | 0) == (i64toi32_i32$0 | 0) | 0; } - HEAP8[($5_1 + 243 | 0) >> 0] = $64_1 & 1 | 0; + HEAP8[($5_1 + 307 | 0) >> 0] = $64_1 & 1 | 0; i64toi32_i32$2 = 0; - $261_1 = 0; - i64toi32_i32$1 = $5_1 + 232 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $261_1; + $299_1 = 0; + i64toi32_i32$1 = $5_1 + 296 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $299_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; - i64toi32_i32$1 = $5_1 + 224 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $261_1; + i64toi32_i32$1 = $5_1 + 288 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $299_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; - i64toi32_i32$1 = $5_1 + 216 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $261_1; + i64toi32_i32$1 = $5_1 + 280 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $299_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; - i64toi32_i32$1 = $5_1 + 208 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $261_1; + i64toi32_i32$1 = $5_1 + 272 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $299_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; - i64toi32_i32$1 = $5_1 + 200 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $261_1; + i64toi32_i32$1 = $5_1 + 264 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $299_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; - i64toi32_i32$1 = $5_1 + 192 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $261_1; + i64toi32_i32$1 = $5_1 + 256 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $299_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 184 | 0) >> 2] = $261_1; - HEAP32[($5_1 + 188 | 0) >> 2] = i64toi32_i32$2; - HEAP32[($5_1 + 180 | 0) >> 2] = $207(HEAP32[(HEAP32[($5_1 + 308 | 0) >> 2] | 0) >> 2] | 0 | 0, $5_1 + 184 | 0 | 0) | 0; + HEAP32[($5_1 + 248 | 0) >> 2] = $299_1; + HEAP32[($5_1 + 252 | 0) >> 2] = i64toi32_i32$2; + HEAP32[($5_1 + 244 | 0) >> 2] = $207(HEAP32[(HEAP32[($5_1 + 372 | 0) >> 2] | 0) >> 2] | 0 | 0, $5_1 + 248 | 0 | 0) | 0; label$6 : { - if (!((HEAPU8[((HEAP32[($5_1 + 332 | 0) >> 2] | 0) + 66 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($5_1 + 396 | 0) >> 2] | 0) + 66 | 0) >> 0] | 0) & 1 | 0)) { break label$6 } label$7 : { - if (!(($228(HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($228(HEAP32[($5_1 + 384 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$7 } - if ((HEAP32[((HEAP32[($5_1 + 320 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 128 | 0) { + if ((HEAP32[((HEAP32[($5_1 + 384 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 128 | 0) { break label$7 } label$8 : { - if (!((HEAP32[($5_1 + 180 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 244 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } - if (!((HEAP32[(HEAP32[($5_1 + 180 | 0) >> 2] | 0) >> 2] | 0) & 2 | 0)) { + if (!((HEAP32[(HEAP32[($5_1 + 244 | 0) >> 2] | 0) >> 2] | 0) & 2 | 0)) { break label$8 } - $156(72 | 0, HEAP32[($5_1 + 332 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 308 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 70965 | 0, 0 | 0); + $156(72 | 0, HEAP32[($5_1 + 396 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 372 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 71038 | 0, 0 | 0); } - $185($5_1 + 184 | 0 | 0); + $185($5_1 + 248 | 0 | 0); } } label$9 : { - if (!((HEAP32[($5_1 + 244 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } - HEAP8[($5_1 + 179 | 0) >> 0] = (($290(HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0) | 0) ^ -1 | 0) & 1 | 0; - HEAP8[($5_1 + 178 | 0) >> 0] = 0; + HEAP8[($5_1 + 243 | 0) >> 0] = (($290(HEAP32[($5_1 + 384 | 0) >> 2] | 0 | 0) | 0) ^ -1 | 0) & 1 | 0; + HEAP8[($5_1 + 242 | 0) >> 0] = 0; label$10 : { - if (!(($228(HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($228(HEAP32[($5_1 + 384 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$10 } - if (!((HEAPU8[($5_1 + 179 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[($5_1 + 243 | 0) >> 0] | 0) & 1 | 0)) { break label$10 } - $229($5_1 + 120 | 0 | 0, HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0); + $229($5_1 + 184 | 0 | 0, HEAP32[($5_1 + 384 | 0) >> 2] | 0 | 0); label$11 : { - if (!(($315($5_1 + 120 | 0 | 0) | 0) & 1 | 0)) { + if (!(($315($5_1 + 184 | 0 | 0) | 0) & 1 | 0)) { break label$11 } - HEAP8[($5_1 + 178 | 0) >> 0] = 1; - $185($5_1 + 120 | 0 | 0); + HEAP8[($5_1 + 242 | 0) >> 0] = 1; + $185($5_1 + 184 | 0 | 0); } } label$12 : { - if ((HEAPU8[($5_1 + 178 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[($5_1 + 242 | 0) >> 0] | 0) & 1 | 0) { break label$12 } - $353(HEAP32[($5_1 + 332 | 0) >> 2] | 0 | 0, $5_1 + 248 | 0 | 0, HEAP32[($5_1 + 244 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 308 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, (HEAPU8[($5_1 + 179 | 0) >> 0] | 0) & 1 | 0 | 0); + $353(HEAP32[($5_1 + 396 | 0) >> 2] | 0 | 0, $5_1 + 312 | 0 | 0, HEAP32[($5_1 + 308 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 372 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, (HEAPU8[($5_1 + 243 | 0) >> 0] | 0) & 1 | 0 | 0); } } label$13 : { label$14 : { - if (!(($312(HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($312(HEAP32[($5_1 + 384 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$14 } - $355(HEAP32[($5_1 + 332 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 244 | 0) >> 2] | 0 | 0, $5_1 + 248 | 0 | 0, 0 | 0, HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 308 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, (HEAPU8[($5_1 + 243 | 0) >> 0] | 0) & 1 | 0 | 0, 1 | 0); + $355(HEAP32[($5_1 + 396 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 308 | 0) >> 2] | 0 | 0, $5_1 + 312 | 0 | 0, 0 | 0, HEAP32[($5_1 + 384 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 372 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, (HEAPU8[($5_1 + 307 | 0) >> 0] | 0) & 1 | 0 | 0, 1 | 0); break label$13; } label$15 : { - if (!((HEAP32[($5_1 + 244 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 308 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$15 } - if (!(($228(HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($228(HEAP32[($5_1 + 384 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$15 } - $229($5_1 + 64 | 0 | 0, HEAP32[($5_1 + 320 | 0) >> 2] | 0 | 0); + $229($5_1 + 128 | 0 | 0, HEAP32[($5_1 + 384 | 0) >> 2] | 0 | 0); label$16 : { - if (($176($5_1 + 64 | 0 | 0) | 0) & 1 | 0) { + if (($176($5_1 + 128 | 0 | 0) | 0) & 1 | 0) { break label$16 } label$17 : { label$18 : { - if (!(($287($5_1 + 64 | 0 | 0) | 0) & 1 | 0)) { + if (!(($287($5_1 + 128 | 0 | 0) | 0) & 1 | 0)) { break label$18 } break label$17; } label$19 : { - if (!((HEAP32[((HEAP32[($5_1 + 244 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$19 } - $229($5_1 + 8 | 0 | 0, $5_1 + 248 | 0 | 0); - $350($5_1 + 8 | 0 | 0, HEAP32[((HEAP32[($5_1 + 244 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $185($5_1 + 8 | 0 | 0); + $229($5_1 + 72 | 0 | 0, $5_1 + 312 | 0 | 0); + $350($5_1 + 72 | 0 | 0, HEAP32[((HEAP32[($5_1 + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $185($5_1 + 72 | 0 | 0); } } } - $185($5_1 + 64 | 0 | 0); + $185($5_1 + 128 | 0 | 0); } } - HEAP32[($5_1 + 308 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 308 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - HEAP32[($5_1 + 320 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 320 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0; - HEAP32[($5_1 + 312 | 0) >> 2] = (HEAP32[($5_1 + 312 | 0) >> 2] | 0) + 1 | 0; - $185($5_1 + 248 | 0 | 0); + HEAP32[($5_1 + 372 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 372 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($5_1 + 384 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 384 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0; + HEAP32[($5_1 + 376 | 0) >> 2] = (HEAP32[($5_1 + 376 | 0) >> 2] | 0) + 1 | 0; + $185($5_1 + 312 | 0 | 0); continue label$2; } break label$2; }; - global$0 = $5_1 + 336 | 0; + label$20 : { + label$21 : while (1) { + if (!((HEAP32[($5_1 + 372 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$20 + } + i64toi32_i32$2 = 0; + $300_1 = 0; + i64toi32_i32$1 = $5_1 + 64 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $300_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; + i64toi32_i32$1 = $5_1 + 56 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $300_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; + i64toi32_i32$1 = $5_1 + 48 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $300_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; + i64toi32_i32$1 = $5_1 + 40 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $300_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; + i64toi32_i32$1 = $5_1 + 32 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $300_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; + i64toi32_i32$1 = $5_1 + 24 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $300_1; + HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$2; + i64toi32_i32$1 = $5_1; + HEAP32[($5_1 + 16 | 0) >> 2] = $300_1; + HEAP32[($5_1 + 20 | 0) >> 2] = i64toi32_i32$2; + HEAP32[($5_1 + 12 | 0) >> 2] = $207(HEAP32[(HEAP32[($5_1 + 372 | 0) >> 2] | 0) >> 2] | 0 | 0, $5_1 + 16 | 0 | 0) | 0; + $353(HEAP32[($5_1 + 396 | 0) >> 2] | 0 | 0, $5_1 + 16 | 0 | 0, HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($5_1 + 372 | 0) >> 2] | 0) >> 2] | 0) + 100 | 0) >> 2] | 0 | 0, 0 & 1 | 0 | 0); + HEAP32[($5_1 + 372 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 372 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + continue label$21; + }; + } + global$0 = $5_1 + 400 | 0; return 0 | 0; } @@ -50527,7 +50838,7 @@ function asmFunc(imports) { $689(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$5; } - fimport$0(72213 | 0, 74032 | 0, 33182 | 0, 66603 | 0); + fimport$0(72286 | 0, 74090 | 0, 33377 | 0, 66659 | 0); wasm2js_trap(); } } @@ -50725,7 +51036,7 @@ function asmFunc(imports) { $698(HEAP32[($4_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($4_1 + 72 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 72 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; break label$12; } - fimport$0(72213 | 0, 74032 | 0, 33118 | 0, 66409 | 0); + fimport$0(72286 | 0, 74090 | 0, 33313 | 0, 66434 | 0); wasm2js_trap(); } } @@ -50753,33 +51064,36 @@ function asmFunc(imports) { function $691($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; - var $4_1 = 0; + var $4_1 = 0, $7_1 = 0; $4_1 = global$0 - 16 | 0; global$0 = $4_1; HEAP32[($4_1 + 12 | 0) >> 2] = $0_1; HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; + $7_1 = HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0; label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9041 | 0) & 1 | 0)) { - break label$2 - } - $699(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); - break label$1; - } - label$3 : { - label$4 : { - if (!((HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9008 | 0) & 1 | 0)) { - break label$4 + label$3 : { + label$4 : { + if (($7_1 | 0) == (9008 | 0)) { + break label$4 + } + if (($7_1 | 0) == (9015 | 0)) { + break label$3 + } + if (($7_1 | 0) != (9041 | 0)) { + break label$2 + } + $699(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); + break label$1; } $700(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); - break label$3; - } - label$5 : { - if (!((HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0) & 1 | 0)) { - break label$5 - } + break label$1; } + $701(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); + break label$1; } + fimport$0(72286 | 0, 74090 | 0, 33245 | 0, 66519 | 0); + wasm2js_trap(); } global$0 = $4_1 + 16 | 0; return; @@ -50800,7 +51114,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0)) { break label$2 } - $701(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); + $702(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); break label$1; } label$3 : { @@ -50808,10 +51122,10 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9033 | 0) & 1 | 0)) { break label$4 } - $702(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); + $703(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); break label$3; } - fimport$0(72213 | 0, 74032 | 0, 32293 | 0, 66463 | 0); + fimport$0(72286 | 0, 74090 | 0, 32378 | 0, 66488 | 0); wasm2js_trap(); } } @@ -51016,7 +51330,7 @@ function asmFunc(imports) { } label$3 : { label$4 : { - if (($705(HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 20 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { + if (($706(HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 20 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$4 } $26_1 = 1; @@ -51052,7 +51366,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($4_1 + 24 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9041 | 0) & 1 | 0) { break label$1 } - fimport$0(77654 | 0, 74032 | 0, 32967 | 0, 66546 | 0); + fimport$0(78147 | 0, 74090 | 0, 33128 | 0, 66602 | 0); wasm2js_trap(); } HEAP32[($4_1 + 20 | 0) >> 2] = 0; @@ -51123,7 +51437,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($4_1 + 24 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9008 | 0) & 1 | 0) { break label$1 } - fimport$0(75329 | 0, 74032 | 0, 32913 | 0, 66573 | 0); + fimport$0(75708 | 0, 74090 | 0, 33073 | 0, 66629 | 0); wasm2js_trap(); } HEAP32[($4_1 + 20 | 0) >> 2] = 0; @@ -51185,6 +51499,53 @@ function asmFunc(imports) { } function $701($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + var $4_1 = 0; + $4_1 = global$0 - 16 | 0; + global$0 = $4_1; + HEAP32[($4_1 + 12 | 0) >> 2] = $0_1; + HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; + label$1 : { + if ((HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0) & 1 | 0) { + break label$1 + } + fimport$0(75351 | 0, 74090 | 0, 33202 | 0, 66409 | 0); + wasm2js_trap(); + } + label$2 : { + if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$2 + } + $592(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); + } + label$3 : { + if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$3 + } + $592(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + } + label$4 : { + if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$4 + } + $592(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); + } + label$5 : { + if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$5 + } + HEAP32[($4_1 + 4 | 0) >> 2] = $419(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0; + HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; + $598(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $422(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; + $423(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0); + } + global$0 = $4_1 + 16 | 0; + return; + } + + function $702($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0, $93_1 = 0, $183_1 = 0, $231_1 = 0; @@ -51196,7 +51557,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0) { break label$1 } - fimport$0(77208 | 0, 74032 | 0, 32052 | 0, 66522 | 0); + fimport$0(77633 | 0, 74090 | 0, 32137 | 0, 66578 | 0); wasm2js_trap(); } HEAP32[($4_1 + 36 | 0) >> 2] = 0; @@ -51333,7 +51694,7 @@ function asmFunc(imports) { return; } - function $702($0_1, $1_1) { + function $703($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0, $173_1 = 0; @@ -51345,7 +51706,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9033 | 0) & 1 | 0) { break label$1 } - fimport$0(77029 | 0, 74032 | 0, 32188 | 0, 66494 | 0); + fimport$0(77454 | 0, 74090 | 0, 32273 | 0, 66550 | 0); wasm2js_trap(); } HEAP32[($4_1 + 36 | 0) >> 2] = 1; @@ -51440,7 +51801,7 @@ function asmFunc(imports) { return; } - function $703($0_1, $1_1) { + function $704($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -51454,7 +51815,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $704(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); + $705(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); break label$1; } label$3 : { @@ -51468,7 +51829,7 @@ function asmFunc(imports) { return; } - function $704($0_1, $1_1) { + function $705($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -51486,13 +51847,13 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $703(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $704(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); } global$0 = $4_1 + 16 | 0; return; } - function $705($0_1, $1_1, $2_1) { + function $706($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -51513,7 +51874,7 @@ function asmFunc(imports) { break label$4 } label$5 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$5 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51532,7 +51893,7 @@ function asmFunc(imports) { break label$8 } label$9 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$9 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51544,7 +51905,7 @@ function asmFunc(imports) { break label$10 } label$11 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$11 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51563,7 +51924,7 @@ function asmFunc(imports) { break label$14 } label$15 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$15 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51575,7 +51936,7 @@ function asmFunc(imports) { break label$16 } label$17 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$17 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51590,7 +51951,7 @@ function asmFunc(imports) { break label$19 } label$20 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$20 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51604,7 +51965,7 @@ function asmFunc(imports) { break label$22 } label$23 : { - if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 8 | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($708(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 8 | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$23 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51617,7 +51978,7 @@ function asmFunc(imports) { break label$24 } label$25 : { - if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 8 | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($708(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 8 | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$25 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51636,7 +51997,7 @@ function asmFunc(imports) { return $198_1 | 0; } - function $706($0_1, $1_1, $2_1) { + function $707($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -51659,7 +52020,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - if ($760(HEAP32[((HEAP32[((HEAP32[(HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[(HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) { break label$4 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51672,7 +52033,7 @@ function asmFunc(imports) { break label$5 } label$6 : { - if (!(($708(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($709(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$6 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51687,7 +52048,7 @@ function asmFunc(imports) { return $64_1 | 0; } - function $707($0_1, $1_1, $2_1) { + function $708($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -51714,7 +52075,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - if ($760(HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0) | 0) { + if ($761(HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0) | 0) { break label$4 } HEAP8[($5_1 + 31 | 0) >> 0] = 1 & 1 | 0; @@ -51725,7 +52086,7 @@ function asmFunc(imports) { break label$5 } label$6 : { - if (!(($708(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($709(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 16 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$6 } HEAP8[($5_1 + 31 | 0) >> 0] = 1 & 1 | 0; @@ -51743,7 +52104,7 @@ function asmFunc(imports) { return $73_1 | 0; } - function $708($0_1, $1_1, $2_1) { + function $709($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -51764,7 +52125,7 @@ function asmFunc(imports) { break label$4 } label$5 : { - if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[(HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 8 | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($708(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[(HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0) + 8 | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$5 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51778,7 +52139,7 @@ function asmFunc(imports) { break label$7 } label$8 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$8 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51789,7 +52150,7 @@ function asmFunc(imports) { break label$9 } label$10 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$10 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51804,7 +52165,7 @@ function asmFunc(imports) { break label$12 } label$13 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$13 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51815,7 +52176,7 @@ function asmFunc(imports) { break label$14 } label$15 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$15 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51829,7 +52190,7 @@ function asmFunc(imports) { break label$16 } label$17 : { - if (!(($706(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($707(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$17 } HEAP8[($5_1 + 15 | 0) >> 0] = 1 & 1 | 0; @@ -51847,7 +52208,7 @@ function asmFunc(imports) { return $153_1 | 0; } - function $709($0_1, $1_1) { + function $710($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -51861,7 +52222,7 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $710(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0); + $711(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0); HEAP32[($4_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; continue label$2; }; @@ -51870,7 +52231,7 @@ function asmFunc(imports) { return; } - function $710($0_1, $1_1) { + function $711($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -51891,7 +52252,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - $711(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $712(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$3; } label$5 : { @@ -51905,7 +52266,7 @@ function asmFunc(imports) { return; } - function $711($0_1, $1_1) { + function $712($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -51918,7 +52279,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $712(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $713(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); break label$1; } label$3 : { @@ -51926,7 +52287,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - $713(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); + $714(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); break label$3; } label$5 : { @@ -51934,10 +52295,10 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } - $714(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $715(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$5; } - fimport$0(72213 | 0, 74032 | 0, 34681 | 0, 66634 | 0); + fimport$0(72286 | 0, 74090 | 0, 34880 | 0, 66690 | 0); wasm2js_trap(); } } @@ -51946,7 +52307,7 @@ function asmFunc(imports) { return; } - function $712($0_1, $1_1) { + function $713($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -51967,7 +52328,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - $715(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $716(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$3; } label$5 : { @@ -51975,7 +52336,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } - $716(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $717(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); break label$5; } label$7 : { @@ -51990,10 +52351,10 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - $717(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); + $718(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); break label$9; } - fimport$0(72213 | 0, 74032 | 0, 34644 | 0, 71047 | 0); + fimport$0(72286 | 0, 74090 | 0, 34843 | 0, 71120 | 0); wasm2js_trap(); } } @@ -52004,7 +52365,7 @@ function asmFunc(imports) { return; } - function $713($0_1, $1_1) { + function $714($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -52019,7 +52380,7 @@ function asmFunc(imports) { return; } - function $714($0_1, $1_1) { + function $715($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -52049,14 +52410,14 @@ function asmFunc(imports) { $599(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0); break label$1; } - fimport$0(72213 | 0, 74032 | 0, 34570 | 0, 66435 | 0); + fimport$0(72286 | 0, 74090 | 0, 34769 | 0, 66460 | 0); wasm2js_trap(); } global$0 = $4_1 + 16 | 0; return; } - function $715($0_1, $1_1) { + function $716($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -52085,13 +52446,13 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - $718(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $719(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); } global$0 = $4_1 + 16 | 0; return; } - function $716($0_1, $1_1) { + function $717($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -52121,11 +52482,11 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } - $719(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $720(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$2; } $599(HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0); - $719(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $720(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); } } label$4 : { @@ -52148,17 +52509,17 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$6 } - $719(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $720(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$5; } - $719(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $720(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); } } global$0 = $4_1 + 16 | 0; return; } - function $717($0_1, $1_1) { + function $718($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -52170,19 +52531,19 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $718(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); + $719(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); } label$2 : { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $718(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $719(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); } global$0 = $4_1 + 16 | 0; return; } - function $718($0_1, $1_1) { + function $719($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -52190,12 +52551,12 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 12 | 0) >> 2] = $0_1; HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; - $719(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $720(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); global$0 = $4_1 + 16 | 0; return; } - function $719($0_1, $1_1) { + function $720($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -52208,21 +52569,21 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $720(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); + $721(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0 | 0); break label$1; } label$3 : { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } - $711(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $712(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); } } global$0 = $4_1 + 16 | 0; return; } - function $720($0_1, $1_1) { + function $721($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0; @@ -52235,17 +52596,17 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $719(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $720(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); } global$0 = $4_1 + 16 | 0; return; } - function $721() { - return 101992 | 0; + function $722() { + return 102568 | 0; } - function $722($0_1) { + function $723($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, $2_1 = 0; label$1 : { @@ -52255,7 +52616,7 @@ function asmFunc(imports) { if (!(HEAPU8[$0_1 >> 0] | 0)) { break label$1 } - $1_1 = $764($0_1 | 0) | 0; + $1_1 = $765($0_1 | 0) | 0; label$2 : { label$3 : { label$4 : while (1) { @@ -52296,12 +52657,12 @@ function asmFunc(imports) { HEAP8[($2_1 + 1 | 0) >> 0] = 0; return $0_1 | 0; } - return 84867 | 0; + return 85424 | 0; } - return 85307 | 0; + return 85864 | 0; } - function $723($0_1, $1_1, $2_1) { + function $724($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -52441,7 +52802,7 @@ function asmFunc(imports) { return $0_1 | 0; } - function $724($0_1, $1_1, $2_1) { + function $725($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -52530,7 +52891,7 @@ function asmFunc(imports) { return $0_1 | 0; } - function $725($0_1) { + function $726($0_1) { $0_1 = $0_1 | 0; var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0.0, i64toi32_i32$2 = 0, $2_1 = 0, $2$hi = 0, $1_1 = 0.0, $7_1 = 0, $8_1 = 0; label$1 : { @@ -52574,20 +52935,20 @@ function asmFunc(imports) { return i64toi32_i32$2 | 0; } - function $726($0_1) { + function $727($0_1) { $0_1 = $0_1 | 0; return 1 | 0; } - function $727($0_1) { + function $728($0_1) { $0_1 = $0_1 | 0; } - function $728($0_1) { + function $729($0_1) { $0_1 = $0_1 | 0; } - function $729($0_1) { + function $730($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, $5_1 = 0, $4_1 = 0, $2_1 = 0, $3_1 = 0; label$1 : { @@ -52598,22 +52959,22 @@ function asmFunc(imports) { $1_1 = 1; break label$1; } - $1_1 = !($726($0_1 | 0) | 0); + $1_1 = !($727($0_1 | 0) | 0); } - $2_1 = $730($0_1 | 0) | 0; + $2_1 = $731($0_1 | 0) | 0; $3_1 = FUNCTION_TABLE[HEAP32[($0_1 + 12 | 0) >> 2] | 0 | 0]($0_1) | 0; label$3 : { if ($1_1) { break label$3 } - $727($0_1 | 0); + $728($0_1 | 0); } label$4 : { if ((HEAPU8[$0_1 >> 0] | 0) & 1 | 0) { break label$4 } - $728($0_1 | 0); - $4_1 = $746() | 0; + $729($0_1 | 0); + $4_1 = $747() | 0; $1_1 = HEAP32[($0_1 + 56 | 0) >> 2] | 0; label$5 : { $5_1 = HEAP32[($0_1 + 52 | 0) >> 2] | 0; @@ -52634,14 +52995,14 @@ function asmFunc(imports) { } HEAP32[$4_1 >> 2] = $1_1; } - $747(); - $817(HEAP32[($0_1 + 96 | 0) >> 2] | 0 | 0); - $817($0_1 | 0); + $748(); + $818(HEAP32[($0_1 + 96 | 0) >> 2] | 0 | 0); + $818($0_1 | 0); } return $3_1 | $2_1 | 0 | 0; } - function $730($0_1) { + function $731($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, i64toi32_i32$1 = 0, $2_1 = 0, i64toi32_i32$0 = 0, $3_1 = 0; label$1 : { @@ -52650,19 +53011,19 @@ function asmFunc(imports) { } $1_1 = 0; label$2 : { - if (!(HEAP32[(0 + 101968 | 0) >> 2] | 0)) { + if (!(HEAP32[(0 + 102544 | 0) >> 2] | 0)) { break label$2 } - $1_1 = $730(HEAP32[(0 + 101968 | 0) >> 2] | 0 | 0) | 0; + $1_1 = $731(HEAP32[(0 + 102544 | 0) >> 2] | 0 | 0) | 0; } label$3 : { - if (!(HEAP32[(0 + 102012 | 0) >> 2] | 0)) { + if (!(HEAP32[(0 + 102588 | 0) >> 2] | 0)) { break label$3 } - $1_1 = $730(HEAP32[(0 + 102012 | 0) >> 2] | 0 | 0) | 0 | $1_1 | 0; + $1_1 = $731(HEAP32[(0 + 102588 | 0) >> 2] | 0 | 0) | 0 | $1_1 | 0; } label$4 : { - $0_1 = HEAP32[($746() | 0) >> 2] | 0; + $0_1 = HEAP32[($747() | 0) >> 2] | 0; if (!$0_1) { break label$4 } @@ -52672,19 +53033,19 @@ function asmFunc(imports) { if ((HEAP32[($0_1 + 76 | 0) >> 2] | 0 | 0) < (0 | 0)) { break label$6 } - $2_1 = $726($0_1 | 0) | 0; + $2_1 = $727($0_1 | 0) | 0; } label$7 : { if ((HEAP32[($0_1 + 20 | 0) >> 2] | 0 | 0) == (HEAP32[($0_1 + 28 | 0) >> 2] | 0 | 0)) { break label$7 } - $1_1 = $730($0_1 | 0) | 0 | $1_1 | 0; + $1_1 = $731($0_1 | 0) | 0 | $1_1 | 0; } label$8 : { if (!$2_1) { break label$8 } - $727($0_1 | 0); + $728($0_1 | 0); } $0_1 = HEAP32[($0_1 + 56 | 0) >> 2] | 0; if ($0_1) { @@ -52693,7 +53054,7 @@ function asmFunc(imports) { break label$5; }; } - $747(); + $748(); return $1_1 | 0; } label$9 : { @@ -52704,7 +53065,7 @@ function asmFunc(imports) { $2_1 = 1; break label$9; } - $2_1 = !($726($0_1 | 0) | 0); + $2_1 = !($727($0_1 | 0) | 0); } label$11 : { label$12 : { @@ -52747,12 +53108,12 @@ function asmFunc(imports) { break label$11 } } - $727($0_1 | 0); + $728($0_1 | 0); } return $1_1 | 0; } - function $731($0_1, $1_1, $2_1) { + function $732($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -52774,7 +53135,7 @@ function asmFunc(imports) { label$3 : { label$4 : { label$5 : { - if (!($810(fimport$3(HEAP32[($0_1 + 60 | 0) >> 2] | 0 | 0, $3_1 + 16 | 0 | 0, 2 | 0, $3_1 + 12 | 0 | 0) | 0 | 0) | 0)) { + if (!($811(fimport$3(HEAP32[($0_1 + 60 | 0) >> 2] | 0 | 0, $3_1 + 16 | 0 | 0, 2 | 0, $3_1 + 12 | 0 | 0) | 0 | 0) | 0)) { break label$5 } $5_1 = $4_1; @@ -52802,7 +53163,7 @@ function asmFunc(imports) { $6_1 = $6_1 - $1_1 | 0; $4_1 = $5_1; $7_1 = $7_1 - $9_1 | 0; - if (!($810(fimport$3(HEAP32[($0_1 + 60 | 0) >> 2] | 0 | 0, $4_1 | 0, $7_1 | 0, $3_1 + 12 | 0 | 0) | 0 | 0) | 0)) { + if (!($811(fimport$3(HEAP32[($0_1 + 60 | 0) >> 2] | 0 | 0, $4_1 | 0, $7_1 | 0, $3_1 + 12 | 0 | 0) | 0 | 0) | 0)) { continue label$6 } break label$6; @@ -52833,7 +53194,7 @@ function asmFunc(imports) { return $1_1 | 0; } - function $732($0_1, $1_1, $2_1) { + function $733($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -52841,12 +53202,12 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $2_1; - $2_1 = $803($0_1 | 0, $1_1 | 0, $2_1 | 0) | 0; + $2_1 = $804($0_1 | 0, $1_1 | 0, $2_1 | 0) | 0; global$0 = $3_1 + 16 | 0; return $2_1 | 0; } - function $733($0_1) { + function $734($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, $2_1 = 0; $1_1 = HEAP32[($0_1 + 72 | 0) >> 2] | 0; @@ -52874,7 +53235,7 @@ function asmFunc(imports) { return ($1_1 << 27 | 0) >> 31 | 0 | 0; } - function $734($0_1) { + function $735($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0; $1_1 = HEAP32[($0_1 + 72 | 0) >> 2] | 0; @@ -52896,7 +53257,7 @@ function asmFunc(imports) { return 0 | 0; } - function $735($0_1, $1_1, $2_1) { + function $736($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -52908,7 +53269,7 @@ function asmFunc(imports) { break label$2 } $4_1 = 0; - if ($734($2_1 | 0) | 0) { + if ($735($2_1 | 0) | 0) { break label$1 } $3_1 = HEAP32[($2_1 + 16 | 0) >> 2] | 0; @@ -52953,14 +53314,14 @@ function asmFunc(imports) { $5_1 = $0_1; $3_1 = 0; } - $723($4_1 | 0, $5_1 | 0, $1_1 | 0) | 0; + $724($4_1 | 0, $5_1 | 0, $1_1 | 0) | 0; HEAP32[($2_1 + 20 | 0) >> 2] = (HEAP32[($2_1 + 20 | 0) >> 2] | 0) + $1_1 | 0; $4_1 = $3_1 + $1_1 | 0; } return $4_1 | 0; } - function $736($0_1, $1_1, $2_1, $3_1) { + function $737($0_1, $1_1, $2_1, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -52972,15 +53333,15 @@ function asmFunc(imports) { if ((HEAP32[($3_1 + 76 | 0) >> 2] | 0 | 0) > (-1 | 0)) { break label$2 } - $0_1 = $735($0_1 | 0, $4_1 | 0, $3_1 | 0) | 0; + $0_1 = $736($0_1 | 0, $4_1 | 0, $3_1 | 0) | 0; break label$1; } - $5_1 = $726($3_1 | 0) | 0; - $0_1 = $735($0_1 | 0, $4_1 | 0, $3_1 | 0) | 0; + $5_1 = $727($3_1 | 0) | 0; + $0_1 = $736($0_1 | 0, $4_1 | 0, $3_1 | 0) | 0; if (!$5_1) { break label$1 } - $727($3_1 | 0); + $728($3_1 | 0); } label$3 : { if (($0_1 | 0) != ($4_1 | 0)) { @@ -52991,14 +53352,14 @@ function asmFunc(imports) { return ($0_1 >>> 0) / ($1_1 >>> 0) | 0 | 0; } - function $737($0_1) { + function $738($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, $2_1 = 0; $1_1 = global$0 - 16 | 0; global$0 = $1_1; $2_1 = -1; label$1 : { - if ($733($0_1 | 0) | 0) { + if ($734($0_1 | 0) | 0) { break label$1 } if ((FUNCTION_TABLE[HEAP32[($0_1 + 32 | 0) >> 2] | 0 | 0]($0_1, $1_1 + 15 | 0, 1) | 0 | 0) != (1 | 0)) { @@ -53010,19 +53371,14 @@ function asmFunc(imports) { return $2_1 | 0; } - function $738($0_1) { - $0_1 = $0_1 | 0; - return (($0_1 | 32 | 0) + -97 | 0) >>> 0 < 26 >>> 0 | 0; - } - function $739($0_1) { $0_1 = $0_1 | 0; - return ($0_1 + -48 | 0) >>> 0 < 10 >>> 0 | 0; + return (($0_1 | 32 | 0) + -97 | 0) >>> 0 < 26 >>> 0 | 0; } function $740($0_1) { $0_1 = $0_1 | 0; - return 0 | 0; + return ($0_1 + -48 | 0) >>> 0 < 10 >>> 0 | 0; } function $741($0_1) { @@ -53032,6 +53388,7 @@ function asmFunc(imports) { function $742($0_1) { $0_1 = $0_1 | 0; + return 0 | 0; } function $743($0_1) { @@ -53040,68 +53397,72 @@ function asmFunc(imports) { function $744($0_1) { $0_1 = $0_1 | 0; - return $745($0_1 | 0, 102072 | 0) | 0 | 0; } - function $745($0_1, $1_1) { + function $745($0_1) { + $0_1 = $0_1 | 0; + return $746($0_1 | 0, 102648 | 0) | 0 | 0; + } + + function $746($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var i64toi32_i32$2 = 0, i64toi32_i32$1 = 0; - $792(); + $793(); i64toi32_i32$2 = $0_1; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; - $850(HEAP32[i64toi32_i32$2 >> 2] | 0 | 0, i64toi32_i32$1 | 0, $1_1 | 0); - HEAP32[($1_1 + 40 | 0) >> 2] = HEAP32[(HEAP32[($1_1 + 32 | 0) >> 2] | 0 ? 102004 + 4 | 0 : 102004) >> 2] | 0; + $851(HEAP32[i64toi32_i32$2 >> 2] | 0 | 0, i64toi32_i32$1 | 0, $1_1 | 0); + HEAP32[($1_1 + 40 | 0) >> 2] = HEAP32[(HEAP32[($1_1 + 32 | 0) >> 2] | 0 ? 102580 + 4 | 0 : 102580) >> 2] | 0; return $1_1 | 0; } - function $746() { - $742(102116 | 0); - return 102120 | 0; + function $747() { + $743(102692 | 0); + return 102696 | 0; } - function $747() { - $743(102116 | 0); + function $748() { + $744(102692 | 0); } - function $748($0_1, $1_1) { + function $749($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $2_1 = 0; $2_1 = global$0 - 16 | 0; global$0 = $2_1; HEAP32[($2_1 + 12 | 0) >> 2] = $1_1; - $1_1 = $803(101824 | 0, $0_1 | 0, $1_1 | 0) | 0; + $1_1 = $804(102400 | 0, $0_1 | 0, $1_1 | 0) | 0; global$0 = $2_1 + 16 | 0; return $1_1 | 0; } - function $749() { - return 42 | 0; - } - function $750() { - return $749() | 0 | 0; + return 42 | 0; } function $751() { - return 102124 | 0; + return $750() | 0 | 0; } function $752() { - HEAP32[(0 + 102220 | 0) >> 2] = 102048; - HEAP32[(0 + 102148 | 0) >> 2] = $750() | 0; + return 102700 | 0; + } + + function $753() { + HEAP32[(0 + 102796 | 0) >> 2] = 102624; + HEAP32[(0 + 102724 | 0) >> 2] = $751() | 0; } - function $753($0_1, $1_1) { + function $754($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $2_1 = 0; - $2_1 = $764($0_1 | 0) | 0; - return (($2_1 | 0) != ($736($0_1 | 0, 1 | 0, $2_1 | 0, $1_1 | 0) | 0 | 0) ? -1 : 0) | 0; + $2_1 = $765($0_1 | 0) | 0; + return (($2_1 | 0) != ($737($0_1 | 0, 1 | 0, $2_1 | 0, $1_1 | 0) | 0 | 0) ? -1 : 0) | 0; } - function $754($0_1, $1_1) { + function $755($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $3_1 = 0, $2_1 = 0, $4_1 = 0; @@ -53115,7 +53476,7 @@ function asmFunc(imports) { break label$2 } $3_1 = -1; - if ($734($0_1 | 0) | 0) { + if ($735($0_1 | 0) | 0) { break label$1 } $3_1 = HEAP32[($0_1 + 16 | 0) >> 2] | 0; @@ -53143,52 +53504,52 @@ function asmFunc(imports) { return $3_1 | 0; } - function $755($0_1) { + function $756($0_1) { $0_1 = $0_1 | 0; var $2_1 = 0, $1_1 = 0; label$1 : { label$2 : { - if ((HEAP32[(0 + 101900 | 0) >> 2] | 0 | 0) >= (0 | 0)) { + if ((HEAP32[(0 + 102476 | 0) >> 2] | 0 | 0) >= (0 | 0)) { break label$2 } $1_1 = 1; break label$1; } - $1_1 = !($726(101824 | 0) | 0); + $1_1 = !($727(102400 | 0) | 0); } label$3 : { label$4 : { - if (($753($0_1 | 0, 101824 | 0) | 0 | 0) >= (0 | 0)) { + if (($754($0_1 | 0, 102400 | 0) | 0 | 0) >= (0 | 0)) { break label$4 } $0_1 = -1; break label$3; } label$5 : { - if ((HEAP32[(0 + 101904 | 0) >> 2] | 0 | 0) == (10 | 0)) { + if ((HEAP32[(0 + 102480 | 0) >> 2] | 0 | 0) == (10 | 0)) { break label$5 } - $2_1 = HEAP32[(0 + 101844 | 0) >> 2] | 0; - if (($2_1 | 0) == (HEAP32[(0 + 101840 | 0) >> 2] | 0 | 0)) { + $2_1 = HEAP32[(0 + 102420 | 0) >> 2] | 0; + if (($2_1 | 0) == (HEAP32[(0 + 102416 | 0) >> 2] | 0 | 0)) { break label$5 } $0_1 = 0; - HEAP32[(0 + 101844 | 0) >> 2] = $2_1 + 1 | 0; + HEAP32[(0 + 102420 | 0) >> 2] = $2_1 + 1 | 0; HEAP8[$2_1 >> 0] = 10; break label$3; } - $0_1 = ($754(101824 | 0, 10 | 0) | 0) >> 31 | 0; + $0_1 = ($755(102400 | 0, 10 | 0) | 0) >> 31 | 0; } label$6 : { if ($1_1) { break label$6 } - $727(101824 | 0); + $728(102400 | 0); } return $0_1 | 0; } - function $756($0_1, $1_1, $2_1, $3_1) { + function $757($0_1, $1_1, $2_1, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -53197,17 +53558,17 @@ function asmFunc(imports) { $4_1 = global$0 - 16 | 0; global$0 = $4_1; HEAP32[($4_1 + 12 | 0) >> 2] = $3_1; - $3_1 = $807($0_1 | 0, $1_1 | 0, $2_1 | 0, $3_1 | 0) | 0; + $3_1 = $808($0_1 | 0, $1_1 | 0, $2_1 | 0, $3_1 | 0) | 0; global$0 = $4_1 + 16 | 0; return $3_1 | 0; } - function $757($0_1) { + function $758($0_1) { $0_1 = $0_1 | 0; return 0 | 0; } - function $758($0_1, $1_1, $1$hi, $2_1) { + function $759($0_1, $1_1, $1$hi, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -53216,14 +53577,14 @@ function asmFunc(imports) { return 0 | 0; } - function $759($0_1, $1_1) { + function $760($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; - $762($0_1 + ($764($0_1 | 0) | 0) | 0 | 0, $1_1 | 0) | 0; + $763($0_1 + ($765($0_1 | 0) | 0) | 0 | 0, $1_1 | 0) | 0; return $0_1 | 0; } - function $760($0_1, $1_1) { + function $761($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $3_1 = 0, $2_1 = 0; @@ -53253,7 +53614,7 @@ function asmFunc(imports) { return $3_1 - ($2_1 & 255 | 0) | 0 | 0; } - function $761($0_1, $1_1) { + function $762($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $2_1 = 0; @@ -53317,28 +53678,28 @@ function asmFunc(imports) { return $0_1 | 0; } - function $762($0_1, $1_1) { + function $763($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; - $761($0_1 | 0, $1_1 | 0) | 0; + $762($0_1 | 0, $1_1 | 0) | 0; return $0_1 | 0; } - function $763($0_1) { + function $764($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, $2_1 = 0; label$1 : { - $1_1 = ($764($0_1 | 0) | 0) + 1 | 0; - $2_1 = $815($1_1 | 0) | 0; + $1_1 = ($765($0_1 | 0) | 0) + 1 | 0; + $2_1 = $816($1_1 | 0) | 0; if ($2_1) { break label$1 } return 0 | 0; } - return $723($2_1 | 0, $0_1 | 0, $1_1 | 0) | 0 | 0; + return $724($2_1 | 0, $0_1 | 0, $1_1 | 0) | 0 | 0; } - function $764($0_1) { + function $765($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, $2_1 = 0, $3_1 = 0; $1_1 = $0_1; @@ -53386,7 +53747,7 @@ function asmFunc(imports) { return $1_1 - $0_1 | 0 | 0; } - function $765($0_1, $1_1, $2_1) { + function $766($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -53434,7 +53795,7 @@ function asmFunc(imports) { return $0_1 - (HEAPU8[$1_1 >> 0] | 0) | 0 | 0; } - function $766($0_1, $1_1, $2_1) { + function $767($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -53518,19 +53879,19 @@ function asmFunc(imports) { } $2_1 = 0; } - $724($0_1 | 0, 0 | 0, $2_1 | 0) | 0; + $725($0_1 | 0, 0 | 0, $2_1 | 0) | 0; return $0_1 | 0; } - function $767($0_1, $1_1, $2_1) { + function $768($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; - $766($0_1 | 0, $1_1 | 0, $2_1 | 0) | 0; + $767($0_1 | 0, $1_1 | 0, $2_1 | 0) | 0; return $0_1 | 0; } - function $768($0_1, $1_1, $2_1) { + function $769($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -53609,15 +53970,15 @@ function asmFunc(imports) { return 0 | 0; } - function $769($0_1, $1_1) { + function $770($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $2_1 = 0; - $2_1 = $768($0_1 | 0, 0 | 0, $1_1 | 0) | 0; + $2_1 = $769($0_1 | 0, 0 | 0, $1_1 | 0) | 0; return ($2_1 ? $2_1 - $0_1 | 0 : $1_1) | 0; } - function $770($0_1, $1_1, $1$hi) { + function $771($0_1, $1_1, $1$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -53671,7 +54032,7 @@ function asmFunc(imports) { HEAP32[($0_1 + 104 | 0) >> 2] = $3_1; } - function $771($0_1) { + function $772($0_1) { $0_1 = $0_1 | 0; var i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$5 = 0, i64toi32_i32$0 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, $1_1 = 0, $4$hi = 0, $2_1 = 0, $5$hi = 0, $3_1 = 0, $5_1 = 0, $4_1 = 0, $26_1 = 0, $27_1 = 0, $28_1 = 0, $29_1 = 0, $30_1 = 0, $31_1 = 0, $7_1 = 0, $7$hi = 0, $15_1 = 0, $15$hi = 0, $35_1 = 0, $40_1 = 0, $40$hi = 0, $59_1 = 0, $59$hi = 0, $67_1 = 0, $74_1 = 0, $74$hi = 0; i64toi32_i32$2 = $0_1; @@ -53732,7 +54093,7 @@ function asmFunc(imports) { break label$2 } } - $2_1 = $737($0_1 | 0) | 0; + $2_1 = $738($0_1 | 0) | 0; if (($2_1 | 0) > (-1 | 0)) { break label$1 } @@ -53858,12 +54219,12 @@ function asmFunc(imports) { return $2_1 | 0; } - function $772($0_1) { + function $773($0_1) { $0_1 = $0_1 | 0; return ($0_1 | 0) == (32 | 0) | ($0_1 + -9 | 0) >>> 0 < 5 >>> 0 | 0 | 0; } - function $773($0_1, $1_1) { + function $774($0_1, $1_1) { $0_1 = +$0_1; $1_1 = $1_1 | 0; var i64toi32_i32$4 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $8_1 = 0, $32_1 = 0.0, i64toi32_i32$0 = 0; @@ -53916,7 +54277,7 @@ function asmFunc(imports) { return +($32_1 * +wasm2js_scratch_load_f64()); } - function $774($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { + function $775($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -53992,7 +54353,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$1 + 12 | 0) >> 2] = i64toi32_i32$0; } - function $775($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1) { + function $776($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -54013,7 +54374,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $2$hi; i64toi32_i32$2 = 0; i64toi32_i32$3 = 2147352576; - $834($4_1 + 32 | 0 | 0, $1_1 | 0, i64toi32_i32$0 | 0, $2_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); + $835($4_1 + 32 | 0 | 0, $1_1 | 0, i64toi32_i32$0 | 0, $2_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); i64toi32_i32$1 = ($4_1 + 32 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -54037,7 +54398,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $2$hi; i64toi32_i32$1 = 0; i64toi32_i32$0 = 2147352576; - $834($4_1 + 16 | 0 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0); + $835($4_1 + 16 | 0 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0); $3_1 = (($3_1 | 0) < (49149 | 0) ? $3_1 : 49149) + -32766 | 0; i64toi32_i32$2 = ($4_1 + 16 | 0) + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -54060,7 +54421,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $2$hi; i64toi32_i32$2 = 0; i64toi32_i32$3 = 7471104; - $834($4_1 + 64 | 0 | 0, $1_1 | 0, i64toi32_i32$0 | 0, $2_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); + $835($4_1 + 64 | 0 | 0, $1_1 | 0, i64toi32_i32$0 | 0, $2_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); i64toi32_i32$1 = ($4_1 + 64 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -54084,7 +54445,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $2$hi; i64toi32_i32$1 = 0; i64toi32_i32$0 = 7471104; - $834($4_1 + 48 | 0 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0); + $835($4_1 + 48 | 0 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0); $3_1 = (($3_1 | 0) > (-48920 | 0) ? $3_1 : -48920) + 32538 | 0; i64toi32_i32$2 = ($4_1 + 48 | 0) + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -54121,7 +54482,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $72$hi; i64toi32_i32$0 = 0; i64toi32_i32$3 = $76$hi; - $834($70_1 | 0, $71_1 | 0, i64toi32_i32$1 | 0, $72_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0, $20_1 | 0, i64toi32_i32$3 | 0); + $835($70_1 | 0, $71_1 | 0, i64toi32_i32$1 | 0, $72_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0, $20_1 | 0, i64toi32_i32$3 | 0); i64toi32_i32$2 = $4_1 + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -54139,7 +54500,7 @@ function asmFunc(imports) { global$0 = i64toi32_i32$2 + 80 | 0; } - function $776($0_1, $0$hi, $1_1, $1$hi) { + function $777($0_1, $0$hi, $1_1, $1$hi) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; $1_1 = $1_1 | 0; @@ -54195,7 +54556,7 @@ function asmFunc(imports) { return $4_1 | 0; } - function $777($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { + function $778($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -54217,14 +54578,14 @@ function asmFunc(imports) { i64toi32_i32$1 = $4$hi; i64toi32_i32$2 = 0; i64toi32_i32$3 = 0; - if (!($824($3_1 | 0, i64toi32_i32$0 | 0, $4_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0) | 0)) { + if (!($825($3_1 | 0, i64toi32_i32$0 | 0, $4_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0) | 0)) { break label$3 } i64toi32_i32$3 = i64toi32_i32$0; i64toi32_i32$3 = i64toi32_i32$1; i64toi32_i32$3 = i64toi32_i32$0; i64toi32_i32$2 = i64toi32_i32$1; - $6_1 = $776($3_1 | 0, i64toi32_i32$0 | 0, $4_1 | 0, i64toi32_i32$1 | 0) | 0; + $6_1 = $777($3_1 | 0, i64toi32_i32$0 | 0, $4_1 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$2 = $2$hi; i64toi32_i32$1 = $2_1; i64toi32_i32$3 = 0; @@ -54254,7 +54615,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $2$hi; i64toi32_i32$2 = $3$hi; i64toi32_i32$0 = $4$hi; - $834($5_1 + 16 | 0 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $2_1 | 0, i64toi32_i32$1 | 0, $3_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$0 | 0); + $835($5_1 + 16 | 0 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $2_1 | 0, i64toi32_i32$1 | 0, $3_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$0 | 0); i64toi32_i32$1 = $5_1; i64toi32_i32$0 = HEAP32[(i64toi32_i32$1 + 16 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$1 + 20 | 0) >> 2] | 0; @@ -54271,7 +54632,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $3$hi; i64toi32_i32$1 = i64toi32_i32$0; i64toi32_i32$3 = i64toi32_i32$2; - $826($5_1 | 0, $4_1 | 0, i64toi32_i32$0 | 0, $3_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$0 | 0, $3_1 | 0, i64toi32_i32$2 | 0); + $827($5_1 | 0, $4_1 | 0, i64toi32_i32$0 | 0, $3_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$0 | 0, $3_1 | 0, i64toi32_i32$2 | 0); i64toi32_i32$2 = $5_1 + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -54305,7 +54666,7 @@ function asmFunc(imports) { i64toi32_i32$3 = $9$hi; i64toi32_i32$1 = $3$hi; i64toi32_i32$0 = $10$hi; - if (($824($1_1 | 0, i64toi32_i32$2 | 0, $9_1 | 0, i64toi32_i32$3 | 0, $3_1 | 0, i64toi32_i32$1 | 0, $10_1 | 0, i64toi32_i32$0 | 0) | 0 | 0) > (0 | 0)) { + if (($825($1_1 | 0, i64toi32_i32$2 | 0, $9_1 | 0, i64toi32_i32$3 | 0, $3_1 | 0, i64toi32_i32$1 | 0, $10_1 | 0, i64toi32_i32$0 | 0) | 0 | 0) > (0 | 0)) { break label$4 } label$5 : { @@ -54317,7 +54678,7 @@ function asmFunc(imports) { i64toi32_i32$1 = i64toi32_i32$3; i64toi32_i32$3 = $3$hi; i64toi32_i32$2 = $10$hi; - if (!($824($1_1 | 0, i64toi32_i32$0 | 0, $9_1 | 0, i64toi32_i32$1 | 0, $3_1 | 0, i64toi32_i32$3 | 0, $10_1 | 0, i64toi32_i32$2 | 0) | 0)) { + if (!($825($1_1 | 0, i64toi32_i32$0 | 0, $9_1 | 0, i64toi32_i32$1 | 0, $3_1 | 0, i64toi32_i32$3 | 0, $10_1 | 0, i64toi32_i32$2 | 0) | 0)) { break label$5 } i64toi32_i32$2 = i64toi32_i32$0; @@ -54332,7 +54693,7 @@ function asmFunc(imports) { i64toi32_i32$3 = $2$hi; i64toi32_i32$1 = 0; i64toi32_i32$0 = 0; - $834($5_1 + 112 | 0 | 0, $1_1 | 0, i64toi32_i32$2 | 0, $2_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0); + $835($5_1 + 112 | 0 | 0, $1_1 | 0, i64toi32_i32$2 | 0, $2_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0); i64toi32_i32$3 = $5_1 + 120 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; @@ -54374,7 +54735,7 @@ function asmFunc(imports) { i64toi32_i32$3 = $9$hi; i64toi32_i32$0 = 0; i64toi32_i32$2 = 1081540608; - $834($5_1 + 96 | 0 | 0, $1_1 | 0, i64toi32_i32$1 | 0, $9_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$2 | 0); + $835($5_1 + 96 | 0 | 0, $1_1 | 0, i64toi32_i32$1 | 0, $9_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$2 | 0); i64toi32_i32$3 = $5_1 + 104 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; @@ -54408,7 +54769,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $10$hi; i64toi32_i32$0 = 0; i64toi32_i32$1 = 1081540608; - $834($5_1 + 80 | 0 | 0, $3_1 | 0, i64toi32_i32$3 | 0, $10_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0); + $835($5_1 + 80 | 0 | 0, $3_1 | 0, i64toi32_i32$3 | 0, $10_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0); i64toi32_i32$2 = $5_1 + 88 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -54543,7 +54904,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $2$hi; i64toi32_i32$3 = 0; i64toi32_i32$1 = 0; - $834($5_1 + 32 | 0 | 0, $1_1 | 0, i64toi32_i32$0 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$1 | 0); + $835($5_1 + 32 | 0 | 0, $1_1 | 0, i64toi32_i32$0 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$1 | 0); i64toi32_i32$2 = $5_1 + 40 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$3 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -54737,7 +55098,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $2$hi; i64toi32_i32$0 = 0; i64toi32_i32$3 = 0; - $834($5_1 + 48 | 0 | 0, $1_1 | 0, i64toi32_i32$2 | 0, $2_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$3 | 0); + $835($5_1 + 48 | 0 | 0, $1_1 | 0, i64toi32_i32$2 | 0, $2_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$3 | 0); i64toi32_i32$1 = $5_1 + 56 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -54860,7 +55221,7 @@ function asmFunc(imports) { i64toi32_i32$3 = $221$hi; i64toi32_i32$0 = 0; i64toi32_i32$2 = 1065811968; - $834($211_1 | 0, $212_1 | 0, i64toi32_i32$1 | 0, $221_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$2 | 0); + $835($211_1 | 0, $212_1 | 0, i64toi32_i32$1 | 0, $221_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$2 | 0); i64toi32_i32$3 = $5_1 + 72 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; @@ -54911,7 +55272,7 @@ function asmFunc(imports) { global$0 = $5_1 + 128 | 0; } - function $778($0_1, $1_1, $1$hi, $2_1, $2$hi) { + function $779($0_1, $1_1, $1$hi, $2_1, $2$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -54931,7 +55292,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] = i64toi32_i32$1; } - function $779($0_1, $1_1, $2_1, $3_1) { + function $780($0_1, $1_1, $2_1, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -54948,8 +55309,8 @@ function asmFunc(imports) { break label$2 } $2_1 = $2_1 << 2 | 0; - $5_1 = HEAP32[($2_1 + 101132 | 0) >> 2] | 0; - $6_1 = HEAP32[($2_1 + 101120 | 0) >> 2] | 0; + $5_1 = HEAP32[($2_1 + 101708 | 0) >> 2] | 0; + $6_1 = HEAP32[($2_1 + 101696 | 0) >> 2] | 0; label$3 : while (1) { label$4 : { label$5 : { @@ -54961,9 +55322,9 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$4; } - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; } - if ($772($2_1 | 0) | 0) { + if ($773($2_1 | 0) | 0) { continue label$3 } break label$3; @@ -54989,7 +55350,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$6; } - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; } $8_1 = 0; label$9 : { @@ -55012,7 +55373,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$13; } - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; } $8_1 = $8_1 + 1 | 0; if (($8_1 | 0) != (8 | 0)) { @@ -55107,7 +55468,7 @@ function asmFunc(imports) { break label$17; }; } - $828($4_1 | 0, Math_fround(Math_fround(Math_fround($7_1 | 0) * Math_fround(Infinity)))); + $829($4_1 | 0, Math_fround(Math_fround(Math_fround($7_1 | 0) * Math_fround(Infinity)))); i64toi32_i32$0 = $4_1 + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -55128,7 +55489,7 @@ function asmFunc(imports) { } $8_1 = 0; label$22 : while (1) { - if (($2_1 | 32 | 0 | 0) != (HEAP8[($8_1 + 70732 | 0) >> 0] | 0 | 0)) { + if (($2_1 | 32 | 0 | 0) != (HEAP8[($8_1 + 70805 | 0) >> 0] | 0 | 0)) { break label$21 } label$23 : { @@ -55144,7 +55505,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$23; } - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; } $8_1 = $8_1 + 1 | 0; if (($8_1 | 0) != (3 | 0)) { @@ -55170,13 +55531,13 @@ function asmFunc(imports) { $8_1 = HEAPU8[$8_1 >> 0] | 0; break label$28; } - $8_1 = $771($1_1 | 0) | 0; + $8_1 = $772($1_1 | 0) | 0; } label$30 : { if (($8_1 & -33 | 0 | 0) != (88 | 0)) { break label$30 } - $780($4_1 + 16 | 0 | 0, $1_1 | 0, $6_1 | 0, $5_1 | 0, $7_1 | 0, $3_1 | 0); + $781($4_1 + 16 | 0 | 0, $1_1 | 0, $6_1 | 0, $5_1 | 0, $7_1 | 0, $3_1 | 0); i64toi32_i32$0 = $4_1 + 24 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -55215,7 +55576,7 @@ function asmFunc(imports) { } HEAP32[($1_1 + 4 | 0) >> 2] = (HEAP32[($1_1 + 4 | 0) >> 2] | 0) + -1 | 0; } - $781($4_1 + 32 | 0 | 0, $1_1 | 0, $2_1 | 0, $6_1 | 0, $5_1 | 0, $7_1 | 0, $3_1 | 0); + $782($4_1 + 32 | 0 | 0, $1_1 | 0, $2_1 | 0, $6_1 | 0, $5_1 | 0, $7_1 | 0, $3_1 | 0); i64toi32_i32$1 = $4_1 + 40 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -55263,7 +55624,7 @@ function asmFunc(imports) { } HEAP32[($1_1 + 4 | 0) >> 2] = (HEAP32[($1_1 + 4 | 0) >> 2] | 0) + -1 | 0; } - HEAP32[($721() | 0) >> 2] = 28; + HEAP32[($722() | 0) >> 2] = 28; break label$19; } label$32 : { @@ -55276,7 +55637,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$32; } - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; } label$34 : { label$35 : { @@ -55330,7 +55691,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$37; } - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; } $7_1 = $2_1 + -65 | 0; label$39 : { @@ -55402,7 +55763,7 @@ function asmFunc(imports) { $9$hi = i64toi32_i32$0; break label$1; } - HEAP32[($721() | 0) >> 2] = 28; + HEAP32[($722() | 0) >> 2] = 28; i64toi32_i32$0 = 0; $9_1 = 0; $9$hi = i64toi32_i32$0; @@ -55445,7 +55806,7 @@ function asmFunc(imports) { }; } i64toi32_i32$1 = $9$hi; - $770($1_1 | 0, $9_1 | 0, i64toi32_i32$1 | 0); + $771($1_1 | 0, $9_1 | 0, i64toi32_i32$1 | 0); } i64toi32_i32$1 = 0; $10_1 = 0; @@ -55461,7 +55822,7 @@ function asmFunc(imports) { global$0 = $4_1 + 48 | 0; } - function $780($0_1, $1_1, $2_1, $3_1, $4_1, $5_1) { + function $781($0_1, $1_1, $2_1, $3_1, $4_1, $5_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -55481,7 +55842,7 @@ function asmFunc(imports) { $7_1 = HEAPU8[$7_1 >> 0] | 0; break label$1; } - $7_1 = $771($1_1 | 0) | 0; + $7_1 = $772($1_1 | 0) | 0; } $8_1 = 0; i64toi32_i32$0 = 0; @@ -55518,11 +55879,11 @@ function asmFunc(imports) { continue label$6; } $9_1 = 1; - $7_1 = $771($1_1 | 0) | 0; + $7_1 = $772($1_1 | 0) | 0; continue label$6; }; } - $7_1 = $771($1_1 | 0) | 0; + $7_1 = $772($1_1 | 0) | 0; } $8_1 = 1; i64toi32_i32$0 = 0; @@ -55542,7 +55903,7 @@ function asmFunc(imports) { $7_1 = HEAPU8[$7_1 >> 0] | 0; break label$10; } - $7_1 = $771($1_1 | 0) | 0; + $7_1 = $772($1_1 | 0) | 0; } i64toi32_i32$0 = $14$hi; i64toi32_i32$2 = $14_1; @@ -55645,14 +56006,14 @@ function asmFunc(imports) { if (i64toi32_i32$0 >>> 0 > i64toi32_i32$5 >>> 0 | ((i64toi32_i32$0 | 0) == (i64toi32_i32$5 | 0) & i64toi32_i32$3 >>> 0 > i64toi32_i32$2 >>> 0 | 0) | 0) { break label$19 } - $829($6_1 + 48 | 0 | 0, $7_1 | 0); + $830($6_1 + 48 | 0 | 0, $7_1 | 0); i64toi32_i32$3 = $18$hi; i64toi32_i32$3 = $15$hi; i64toi32_i32$3 = $18$hi; i64toi32_i32$0 = $15$hi; i64toi32_i32$2 = 0; i64toi32_i32$5 = 1073414144; - $834($6_1 + 32 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $15_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$5 | 0); + $835($6_1 + 32 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $15_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$5 | 0); i64toi32_i32$0 = $6_1; i64toi32_i32$5 = HEAP32[(i64toi32_i32$0 + 48 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$0 + 52 | 0) >> 2] | 0; @@ -55677,7 +56038,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $129$hi; i64toi32_i32$0 = $18$hi; i64toi32_i32$3 = $15$hi; - $834($6_1 + 16 | 0 | 0, $125_1 | 0, i64toi32_i32$5 | 0, $129_1 | 0, i64toi32_i32$2 | 0, $18_1 | 0, i64toi32_i32$0 | 0, $15_1 | 0, i64toi32_i32$3 | 0); + $835($6_1 + 16 | 0 | 0, $125_1 | 0, i64toi32_i32$5 | 0, $129_1 | 0, i64toi32_i32$2 | 0, $18_1 | 0, i64toi32_i32$0 | 0, $15_1 | 0, i64toi32_i32$3 | 0); i64toi32_i32$2 = $6_1; i64toi32_i32$3 = HEAP32[(i64toi32_i32$2 + 16 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 20 | 0) >> 2] | 0; @@ -55694,7 +56055,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $144$hi; i64toi32_i32$2 = $16$hi; i64toi32_i32$5 = $17$hi; - $822($6_1 | 0, $140_1 | 0, i64toi32_i32$3 | 0, $144_1 | 0, i64toi32_i32$0 | 0, $16_1 | 0, i64toi32_i32$2 | 0, $17_1 | 0, i64toi32_i32$5 | 0); + $823($6_1 | 0, $140_1 | 0, i64toi32_i32$3 | 0, $144_1 | 0, i64toi32_i32$0 | 0, $16_1 | 0, i64toi32_i32$2 | 0, $17_1 | 0, i64toi32_i32$5 | 0); i64toi32_i32$0 = $6_1 + 8 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -55719,7 +56080,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $15$hi; i64toi32_i32$0 = 0; i64toi32_i32$3 = 1073610752; - $834($6_1 + 80 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $15_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$3 | 0); + $835($6_1 + 80 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $15_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$3 | 0); i64toi32_i32$2 = $6_1; i64toi32_i32$3 = HEAP32[(i64toi32_i32$2 + 80 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 84 | 0) >> 2] | 0; @@ -55736,7 +56097,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $166$hi; i64toi32_i32$2 = $16$hi; i64toi32_i32$5 = $17$hi; - $822($6_1 + 64 | 0 | 0, $162_1 | 0, i64toi32_i32$3 | 0, $166_1 | 0, i64toi32_i32$0 | 0, $16_1 | 0, i64toi32_i32$2 | 0, $17_1 | 0, i64toi32_i32$5 | 0); + $823($6_1 + 64 | 0 | 0, $162_1 | 0, i64toi32_i32$3 | 0, $166_1 | 0, i64toi32_i32$0 | 0, $16_1 | 0, i64toi32_i32$2 | 0, $17_1 | 0, i64toi32_i32$5 | 0); i64toi32_i32$0 = ($6_1 + 64 | 0) + 8 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -55771,7 +56132,7 @@ function asmFunc(imports) { $7_1 = HEAPU8[$7_1 >> 0] | 0; continue label$13; } - $7_1 = $771($1_1 | 0) | 0; + $7_1 = $772($1_1 | 0) | 0; continue label$13; }; } @@ -55824,9 +56185,9 @@ function asmFunc(imports) { } } i64toi32_i32$5 = 0; - $770($1_1 | 0, 0 | 0, i64toi32_i32$5 | 0); + $771($1_1 | 0, 0 | 0, i64toi32_i32$5 | 0); } - $827($6_1 + 96 | 0 | 0, +(+($4_1 | 0) * 0.0)); + $828($6_1 + 96 | 0 | 0, +(+($4_1 | 0) * 0.0)); i64toi32_i32$3 = $6_1 + 104 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; @@ -55894,7 +56255,7 @@ function asmFunc(imports) { if (($7_1 & -33 | 0 | 0) != (80 | 0)) { break label$31 } - i64toi32_i32$3 = $782($1_1 | 0, $5_1 | 0) | 0; + i64toi32_i32$3 = $783($1_1 | 0, $5_1 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $15_1 = i64toi32_i32$3; $15$hi = i64toi32_i32$1; @@ -55938,7 +56299,7 @@ function asmFunc(imports) { $16_1 = 0; $16$hi = i64toi32_i32$4; i64toi32_i32$4 = 0; - $770($1_1 | 0, 0 | 0, i64toi32_i32$4 | 0); + $771($1_1 | 0, 0 | 0, i64toi32_i32$4 | 0); i64toi32_i32$4 = 0; $19_1 = 0; $19$hi = i64toi32_i32$4; @@ -55982,7 +56343,7 @@ function asmFunc(imports) { if ($10_1) { break label$33 } - $827($6_1 + 112 | 0 | 0, +(+($4_1 | 0) * 0.0)); + $828($6_1 + 112 | 0 | 0, +(+($4_1 | 0) * 0.0)); i64toi32_i32$0 = $6_1 + 120 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -56059,8 +56420,8 @@ function asmFunc(imports) { if ($120_1) { break label$34 } - HEAP32[($721() | 0) >> 2] = 68; - $829($6_1 + 160 | 0 | 0, $4_1 | 0); + HEAP32[($722() | 0) >> 2] = 68; + $830($6_1 + 160 | 0 | 0, $4_1 | 0); i64toi32_i32$1 = $6_1; i64toi32_i32$2 = HEAP32[($6_1 + 160 | 0) >> 2] | 0; i64toi32_i32$3 = HEAP32[($6_1 + 164 | 0) >> 2] | 0; @@ -56075,7 +56436,7 @@ function asmFunc(imports) { i64toi32_i32$3 = $286$hi; i64toi32_i32$1 = -1; i64toi32_i32$4 = 2147418111; - $834($6_1 + 144 | 0 | 0, $282_1 | 0, i64toi32_i32$2 | 0, $286_1 | 0, i64toi32_i32$3 | 0, -1 | 0, i64toi32_i32$1 | 0, -1 | 0, i64toi32_i32$4 | 0); + $835($6_1 + 144 | 0 | 0, $282_1 | 0, i64toi32_i32$2 | 0, $286_1 | 0, i64toi32_i32$3 | 0, -1 | 0, i64toi32_i32$1 | 0, -1 | 0, i64toi32_i32$4 | 0); i64toi32_i32$3 = $6_1; i64toi32_i32$4 = HEAP32[(i64toi32_i32$3 + 144 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$3 + 148 | 0) >> 2] | 0; @@ -56090,7 +56451,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $294$hi; i64toi32_i32$3 = -1; i64toi32_i32$2 = 2147418111; - $834($6_1 + 128 | 0 | 0, $290_1 | 0, i64toi32_i32$4 | 0, $294_1 | 0, i64toi32_i32$1 | 0, -1 | 0, i64toi32_i32$3 | 0, -1 | 0, i64toi32_i32$2 | 0); + $835($6_1 + 128 | 0 | 0, $290_1 | 0, i64toi32_i32$4 | 0, $294_1 | 0, i64toi32_i32$1 | 0, -1 | 0, i64toi32_i32$3 | 0, -1 | 0, i64toi32_i32$2 | 0); i64toi32_i32$1 = ($6_1 + 128 | 0) + 8 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$3 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -56142,14 +56503,14 @@ function asmFunc(imports) { i64toi32_i32$2 = $17$hi; i64toi32_i32$4 = 0; i64toi32_i32$3 = -1073807360; - $822($6_1 + 416 | 0 | 0, $16_1 | 0, i64toi32_i32$1 | 0, $17_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$3 | 0); + $823($6_1 + 416 | 0 | 0, $16_1 | 0, i64toi32_i32$1 | 0, $17_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$3 | 0); i64toi32_i32$3 = i64toi32_i32$1; i64toi32_i32$3 = i64toi32_i32$2; i64toi32_i32$3 = i64toi32_i32$1; i64toi32_i32$4 = i64toi32_i32$2; i64toi32_i32$2 = 0; i64toi32_i32$1 = 1073610752; - $7_1 = $825($16_1 | 0, i64toi32_i32$3 | 0, $17_1 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0) | 0; + $7_1 = $826($16_1 | 0, i64toi32_i32$3 | 0, $17_1 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$3; i64toi32_i32$1 = i64toi32_i32$4; i64toi32_i32$4 = $6_1; @@ -56183,7 +56544,7 @@ function asmFunc(imports) { i64toi32_i32$1 = i64toi32_i32$4; i64toi32_i32$2 = $325$hi; i64toi32_i32$4 = $332$hi; - $822($6_1 + 400 | 0 | 0, $16_1 | 0, i64toi32_i32$0 | 0, $17_1 | 0, i64toi32_i32$1 | 0, $325_1 | 0, i64toi32_i32$2 | 0, $332_1 | 0, i64toi32_i32$4 | 0); + $823($6_1 + 400 | 0 | 0, $16_1 | 0, i64toi32_i32$0 | 0, $17_1 | 0, i64toi32_i32$1 | 0, $325_1 | 0, i64toi32_i32$2 | 0, $332_1 | 0, i64toi32_i32$4 | 0); i64toi32_i32$4 = $19$hi; i64toi32_i32$1 = $19_1; i64toi32_i32$2 = -1; @@ -56263,7 +56624,7 @@ function asmFunc(imports) { if (($7_1 | 0) < (113 | 0)) { break label$39 } - $829($6_1 + 384 | 0 | 0, $4_1 | 0); + $830($6_1 + 384 | 0 | 0, $4_1 | 0); i64toi32_i32$0 = $6_1 + 392 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -56282,8 +56643,8 @@ function asmFunc(imports) { $20$hi = i64toi32_i32$3; break label$38; } - $827($6_1 + 352 | 0 | 0, +(+$773(+(1.0), 144 - $7_1 | 0 | 0))); - $829($6_1 + 336 | 0 | 0, $4_1 | 0); + $828($6_1 + 352 | 0 | 0, +(+$774(+(1.0), 144 - $7_1 | 0 | 0))); + $830($6_1 + 336 | 0 | 0, $4_1 | 0); i64toi32_i32$0 = $6_1; i64toi32_i32$3 = HEAP32[(i64toi32_i32$0 + 352 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$0 + 356 | 0) >> 2] | 0; @@ -56308,7 +56669,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $389$hi; i64toi32_i32$0 = $18$hi; i64toi32_i32$5 = $14$hi; - $774($6_1 + 368 | 0 | 0, $385_1 | 0, i64toi32_i32$3 | 0, $389_1 | 0, i64toi32_i32$2 | 0, $18_1 | 0, i64toi32_i32$0 | 0, $14_1 | 0, i64toi32_i32$5 | 0); + $775($6_1 + 368 | 0 | 0, $385_1 | 0, i64toi32_i32$3 | 0, $389_1 | 0, i64toi32_i32$2 | 0, $18_1 | 0, i64toi32_i32$0 | 0, $14_1 | 0, i64toi32_i32$5 | 0); i64toi32_i32$2 = ($6_1 + 368 | 0) + 8 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -56326,8 +56687,8 @@ function asmFunc(imports) { i64toi32_i32$0 = $17$hi; i64toi32_i32$2 = 0; i64toi32_i32$3 = 0; - $7_1 = !($10_1 & 1 | 0) & (($7_1 | 0) < (32 | 0) & ($824($16_1 | 0, i64toi32_i32$5 | 0, $17_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0) | 0 | 0) != (0 | 0) | 0) | 0; - $830($6_1 + 320 | 0 | 0, $10_1 + $7_1 | 0 | 0); + $7_1 = !($10_1 & 1 | 0) & (($7_1 | 0) < (32 | 0) & ($825($16_1 | 0, i64toi32_i32$5 | 0, $17_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0) | 0 | 0) != (0 | 0) | 0) | 0; + $831($6_1 + 320 | 0 | 0, $10_1 + $7_1 | 0 | 0); i64toi32_i32$3 = $18$hi; i64toi32_i32$3 = $14$hi; i64toi32_i32$0 = $6_1; @@ -56344,7 +56705,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $14$hi; i64toi32_i32$0 = $425$hi; i64toi32_i32$5 = $429$hi; - $834($6_1 + 304 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $14_1 | 0, i64toi32_i32$2 | 0, $425_1 | 0, i64toi32_i32$0 | 0, $429_1 | 0, i64toi32_i32$5 | 0); + $835($6_1 + 304 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $14_1 | 0, i64toi32_i32$2 | 0, $425_1 | 0, i64toi32_i32$0 | 0, $429_1 | 0, i64toi32_i32$5 | 0); i64toi32_i32$2 = $6_1; i64toi32_i32$5 = HEAP32[(i64toi32_i32$2 + 304 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 308 | 0) >> 2] | 0; @@ -56361,7 +56722,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $437$hi; i64toi32_i32$2 = $15$hi; i64toi32_i32$3 = $20$hi; - $822($6_1 + 272 | 0 | 0, $433_1 | 0, i64toi32_i32$5 | 0, $437_1 | 0, i64toi32_i32$0 | 0, $15_1 | 0, i64toi32_i32$2 | 0, $20_1 | 0, i64toi32_i32$3 | 0); + $823($6_1 + 272 | 0 | 0, $433_1 | 0, i64toi32_i32$5 | 0, $437_1 | 0, i64toi32_i32$0 | 0, $15_1 | 0, i64toi32_i32$2 | 0, $20_1 | 0, i64toi32_i32$3 | 0); i64toi32_i32$3 = $18$hi; i64toi32_i32$3 = $14$hi; i64toi32_i32$3 = $16$hi; @@ -56384,7 +56745,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $14$hi; i64toi32_i32$3 = $446$hi; i64toi32_i32$5 = $449$hi; - $834($6_1 + 288 | 0 | 0, $18_1 | 0, i64toi32_i32$4 | 0, $14_1 | 0, i64toi32_i32$2 | 0, $446_1 | 0, i64toi32_i32$3 | 0, $449_1 | 0, i64toi32_i32$5 | 0); + $835($6_1 + 288 | 0 | 0, $18_1 | 0, i64toi32_i32$4 | 0, $14_1 | 0, i64toi32_i32$2 | 0, $446_1 | 0, i64toi32_i32$3 | 0, $449_1 | 0, i64toi32_i32$5 | 0); i64toi32_i32$2 = $6_1; i64toi32_i32$5 = HEAP32[(i64toi32_i32$2 + 288 | 0) >> 2] | 0; i64toi32_i32$3 = HEAP32[(i64toi32_i32$2 + 292 | 0) >> 2] | 0; @@ -56409,7 +56770,7 @@ function asmFunc(imports) { i64toi32_i32$3 = $457$hi; i64toi32_i32$2 = $459$hi; i64toi32_i32$4 = $463$hi; - $822($6_1 + 256 | 0 | 0, $453_1 | 0, i64toi32_i32$5 | 0, $457_1 | 0, i64toi32_i32$3 | 0, $459_1 | 0, i64toi32_i32$2 | 0, $463_1 | 0, i64toi32_i32$4 | 0); + $823($6_1 + 256 | 0 | 0, $453_1 | 0, i64toi32_i32$5 | 0, $457_1 | 0, i64toi32_i32$3 | 0, $459_1 | 0, i64toi32_i32$2 | 0, $463_1 | 0, i64toi32_i32$4 | 0); i64toi32_i32$3 = $6_1; i64toi32_i32$4 = HEAP32[(i64toi32_i32$3 + 256 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$3 + 260 | 0) >> 2] | 0; @@ -56426,7 +56787,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $471$hi; i64toi32_i32$3 = $15$hi; i64toi32_i32$5 = $20$hi; - $836($6_1 + 240 | 0 | 0, $467_1 | 0, i64toi32_i32$4 | 0, $471_1 | 0, i64toi32_i32$2 | 0, $15_1 | 0, i64toi32_i32$3 | 0, $20_1 | 0, i64toi32_i32$5 | 0); + $837($6_1 + 240 | 0 | 0, $467_1 | 0, i64toi32_i32$4 | 0, $471_1 | 0, i64toi32_i32$2 | 0, $15_1 | 0, i64toi32_i32$3 | 0, $20_1 | 0, i64toi32_i32$5 | 0); label$40 : { i64toi32_i32$2 = $6_1; i64toi32_i32$5 = HEAP32[(i64toi32_i32$2 + 240 | 0) >> 2] | 0; @@ -56442,17 +56803,17 @@ function asmFunc(imports) { i64toi32_i32$3 = $17$hi; i64toi32_i32$2 = 0; i64toi32_i32$4 = 0; - if ($824($16_1 | 0, i64toi32_i32$5 | 0, $17_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$4 | 0) | 0) { + if ($825($16_1 | 0, i64toi32_i32$5 | 0, $17_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$4 | 0) | 0) { break label$40 } - HEAP32[($721() | 0) >> 2] = 68; + HEAP32[($722() | 0) >> 2] = 68; } i64toi32_i32$4 = $16$hi; i64toi32_i32$4 = $17$hi; i64toi32_i32$4 = $19$hi; i64toi32_i32$4 = $16$hi; i64toi32_i32$2 = $17$hi; - $775($6_1 + 224 | 0 | 0, $16_1 | 0, i64toi32_i32$4 | 0, $17_1 | 0, i64toi32_i32$2 | 0, $19_1 | 0); + $776($6_1 + 224 | 0 | 0, $16_1 | 0, i64toi32_i32$4 | 0, $17_1 | 0, i64toi32_i32$2 | 0, $19_1 | 0); i64toi32_i32$3 = ($6_1 + 224 | 0) + 8 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$4 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; @@ -56465,8 +56826,8 @@ function asmFunc(imports) { $16$hi = i64toi32_i32$2; break label$21; } - HEAP32[($721() | 0) >> 2] = 68; - $829($6_1 + 208 | 0 | 0, $4_1 | 0); + HEAP32[($722() | 0) >> 2] = 68; + $830($6_1 + 208 | 0 | 0, $4_1 | 0); i64toi32_i32$3 = $6_1; i64toi32_i32$2 = HEAP32[(i64toi32_i32$3 + 208 | 0) >> 2] | 0; i64toi32_i32$4 = HEAP32[(i64toi32_i32$3 + 212 | 0) >> 2] | 0; @@ -56481,7 +56842,7 @@ function asmFunc(imports) { i64toi32_i32$4 = $507$hi; i64toi32_i32$3 = 0; i64toi32_i32$5 = 65536; - $834($6_1 + 192 | 0 | 0, $503_1 | 0, i64toi32_i32$2 | 0, $507_1 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$5 | 0); + $835($6_1 + 192 | 0 | 0, $503_1 | 0, i64toi32_i32$2 | 0, $507_1 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$5 | 0); i64toi32_i32$4 = $6_1; i64toi32_i32$5 = HEAP32[(i64toi32_i32$4 + 192 | 0) >> 2] | 0; i64toi32_i32$3 = HEAP32[(i64toi32_i32$4 + 196 | 0) >> 2] | 0; @@ -56496,7 +56857,7 @@ function asmFunc(imports) { i64toi32_i32$3 = $515$hi; i64toi32_i32$4 = 0; i64toi32_i32$2 = 65536; - $834($6_1 + 176 | 0 | 0, $511_1 | 0, i64toi32_i32$5 | 0, $515_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$2 | 0); + $835($6_1 + 176 | 0 | 0, $511_1 | 0, i64toi32_i32$5 | 0, $515_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$2 | 0); i64toi32_i32$3 = ($6_1 + 176 | 0) + 8 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$4 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; @@ -56518,7 +56879,7 @@ function asmFunc(imports) { global$0 = $6_1 + 432 | 0; } - function $781($0_1, $1_1, $2_1, $3_1, $4_1, $5_1, $6_1) { + function $782($0_1, $1_1, $2_1, $3_1, $4_1, $5_1, $6_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -56566,11 +56927,11 @@ function asmFunc(imports) { continue label$4; } $11_1 = 1; - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; continue label$4; }; } - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; } $8_1 = 1; i64toi32_i32$0 = 0; @@ -56590,7 +56951,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$8; } - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; } i64toi32_i32$0 = $18$hi; i64toi32_i32$2 = $18_1; @@ -56709,7 +57070,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$23; } - $2_1 = $771($1_1 | 0) | 0; + $2_1 = $772($1_1 | 0) | 0; } $13_1 = $2_1 + -48 | 0; $14_1 = ($2_1 | 0) == (46 | 0); @@ -56739,7 +57100,7 @@ function asmFunc(imports) { break label$25 } label$26 : { - i64toi32_i32$5 = $782($1_1 | 0, $6_1 | 0) | 0; + i64toi32_i32$5 = $783($1_1 | 0, $6_1 | 0) | 0; i64toi32_i32$3 = i64toi32_i32$HIGH_BITS; $20_1 = i64toi32_i32$5; $20$hi = i64toi32_i32$3; @@ -56830,13 +57191,13 @@ function asmFunc(imports) { if (!$14_1) { break label$11 } - HEAP32[($721() | 0) >> 2] = 28; + HEAP32[($722() | 0) >> 2] = 28; } i64toi32_i32$0 = 0; $19_1 = 0; $19$hi = i64toi32_i32$0; i64toi32_i32$0 = 0; - $770($1_1 | 0, 0 | 0, i64toi32_i32$0 | 0); + $771($1_1 | 0, 0 | 0, i64toi32_i32$0 | 0); i64toi32_i32$0 = 0; $18_1 = 0; $18$hi = i64toi32_i32$0; @@ -56847,7 +57208,7 @@ function asmFunc(imports) { if ($1_1) { break label$27 } - $827($7_1 | 0, +(+($5_1 | 0) * 0.0)); + $828($7_1 | 0, +(+($5_1 | 0) * 0.0)); i64toi32_i32$2 = $7_1 + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$5 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -56900,8 +57261,8 @@ function asmFunc(imports) { break label$28 } } - $829($7_1 + 48 | 0 | 0, $5_1 | 0); - $830($7_1 + 32 | 0 | 0, $1_1 | 0); + $830($7_1 + 48 | 0 | 0, $5_1 | 0); + $831($7_1 + 32 | 0 | 0, $1_1 | 0); i64toi32_i32$5 = $7_1; i64toi32_i32$1 = HEAP32[(i64toi32_i32$5 + 48 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$5 + 52 | 0) >> 2] | 0; @@ -56926,7 +57287,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $234$hi; i64toi32_i32$5 = $236$hi; i64toi32_i32$0 = $240$hi; - $834($7_1 + 16 | 0 | 0, $230_1 | 0, i64toi32_i32$1 | 0, $234_1 | 0, i64toi32_i32$2 | 0, $236_1 | 0, i64toi32_i32$5 | 0, $240_1 | 0, i64toi32_i32$0 | 0); + $835($7_1 + 16 | 0 | 0, $230_1 | 0, i64toi32_i32$1 | 0, $234_1 | 0, i64toi32_i32$2 | 0, $236_1 | 0, i64toi32_i32$5 | 0, $240_1 | 0, i64toi32_i32$0 | 0); i64toi32_i32$2 = ($7_1 + 16 | 0) + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$5 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -56965,8 +57326,8 @@ function asmFunc(imports) { if ($174_1) { break label$30 } - HEAP32[($721() | 0) >> 2] = 68; - $829($7_1 + 96 | 0 | 0, $5_1 | 0); + HEAP32[($722() | 0) >> 2] = 68; + $830($7_1 + 96 | 0 | 0, $5_1 | 0); i64toi32_i32$1 = $7_1; i64toi32_i32$2 = HEAP32[($7_1 + 96 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($7_1 + 100 | 0) >> 2] | 0; @@ -56981,7 +57342,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $263$hi; i64toi32_i32$1 = -1; i64toi32_i32$5 = 2147418111; - $834($7_1 + 80 | 0 | 0, $259_1 | 0, i64toi32_i32$2 | 0, $263_1 | 0, i64toi32_i32$0 | 0, -1 | 0, i64toi32_i32$1 | 0, -1 | 0, i64toi32_i32$5 | 0); + $835($7_1 + 80 | 0 | 0, $259_1 | 0, i64toi32_i32$2 | 0, $263_1 | 0, i64toi32_i32$0 | 0, -1 | 0, i64toi32_i32$1 | 0, -1 | 0, i64toi32_i32$5 | 0); i64toi32_i32$0 = $7_1; i64toi32_i32$5 = HEAP32[(i64toi32_i32$0 + 80 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 84 | 0) >> 2] | 0; @@ -56996,7 +57357,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $271$hi; i64toi32_i32$0 = -1; i64toi32_i32$2 = 2147418111; - $834($7_1 + 64 | 0 | 0, $267_1 | 0, i64toi32_i32$5 | 0, $271_1 | 0, i64toi32_i32$1 | 0, -1 | 0, i64toi32_i32$0 | 0, -1 | 0, i64toi32_i32$2 | 0); + $835($7_1 + 64 | 0 | 0, $267_1 | 0, i64toi32_i32$5 | 0, $271_1 | 0, i64toi32_i32$1 | 0, -1 | 0, i64toi32_i32$0 | 0, -1 | 0, i64toi32_i32$2 | 0); i64toi32_i32$1 = ($7_1 + 64 | 0) + 8 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -57037,8 +57398,8 @@ function asmFunc(imports) { if ($177_1) { break label$31 } - HEAP32[($721() | 0) >> 2] = 68; - $829($7_1 + 144 | 0 | 0, $5_1 | 0); + HEAP32[($722() | 0) >> 2] = 68; + $830($7_1 + 144 | 0 | 0, $5_1 | 0); i64toi32_i32$5 = $7_1; i64toi32_i32$1 = HEAP32[(i64toi32_i32$5 + 144 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$5 + 148 | 0) >> 2] | 0; @@ -57053,7 +57414,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $294$hi; i64toi32_i32$5 = 0; i64toi32_i32$0 = 65536; - $834($7_1 + 128 | 0 | 0, $290_1 | 0, i64toi32_i32$1 | 0, $294_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$5 | 0, 0 | 0, i64toi32_i32$0 | 0); + $835($7_1 + 128 | 0 | 0, $290_1 | 0, i64toi32_i32$1 | 0, $294_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$5 | 0, 0 | 0, i64toi32_i32$0 | 0); i64toi32_i32$2 = $7_1; i64toi32_i32$0 = HEAP32[($7_1 + 128 | 0) >> 2] | 0; i64toi32_i32$5 = HEAP32[($7_1 + 132 | 0) >> 2] | 0; @@ -57068,7 +57429,7 @@ function asmFunc(imports) { i64toi32_i32$5 = $302$hi; i64toi32_i32$2 = 0; i64toi32_i32$1 = 65536; - $834($7_1 + 112 | 0 | 0, $298_1 | 0, i64toi32_i32$0 | 0, $302_1 | 0, i64toi32_i32$5 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0); + $835($7_1 + 112 | 0 | 0, $298_1 | 0, i64toi32_i32$0 | 0, $302_1 | 0, i64toi32_i32$5 | 0, 0 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0); i64toi32_i32$5 = ($7_1 + 112 | 0) + 8 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$5 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$5 + 4 | 0) >> 2] | 0; @@ -57119,8 +57480,8 @@ function asmFunc(imports) { if (($16_1 | 0) != (9 | 0)) { break label$36 } - $829($7_1 + 192 | 0 | 0, $5_1 | 0); - $830($7_1 + 176 | 0 | 0, HEAP32[($7_1 + 784 | 0) >> 2] | 0 | 0); + $830($7_1 + 192 | 0 | 0, $5_1 | 0); + $831($7_1 + 176 | 0 | 0, HEAP32[($7_1 + 784 | 0) >> 2] | 0 | 0); i64toi32_i32$5 = $7_1; i64toi32_i32$1 = HEAP32[(i64toi32_i32$5 + 192 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$5 + 196 | 0) >> 2] | 0; @@ -57145,7 +57506,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $355$hi; i64toi32_i32$5 = $357$hi; i64toi32_i32$0 = $361$hi; - $834($7_1 + 160 | 0 | 0, $351_1 | 0, i64toi32_i32$1 | 0, $355_1 | 0, i64toi32_i32$2 | 0, $357_1 | 0, i64toi32_i32$5 | 0, $361_1 | 0, i64toi32_i32$0 | 0); + $835($7_1 + 160 | 0 | 0, $351_1 | 0, i64toi32_i32$1 | 0, $355_1 | 0, i64toi32_i32$2 | 0, $357_1 | 0, i64toi32_i32$5 | 0, $361_1 | 0, i64toi32_i32$0 | 0); i64toi32_i32$2 = ($7_1 + 160 | 0) + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$5 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -57162,8 +57523,8 @@ function asmFunc(imports) { if (($16_1 | 0) > (8 | 0)) { break label$37 } - $829($7_1 + 272 | 0 | 0, $5_1 | 0); - $830($7_1 + 256 | 0 | 0, HEAP32[($7_1 + 784 | 0) >> 2] | 0 | 0); + $830($7_1 + 272 | 0 | 0, $5_1 | 0); + $831($7_1 + 256 | 0 | 0, HEAP32[($7_1 + 784 | 0) >> 2] | 0 | 0); i64toi32_i32$2 = $7_1; i64toi32_i32$0 = HEAP32[($7_1 + 272 | 0) >> 2] | 0; i64toi32_i32$5 = HEAP32[($7_1 + 276 | 0) >> 2] | 0; @@ -57188,8 +57549,8 @@ function asmFunc(imports) { i64toi32_i32$5 = $384$hi; i64toi32_i32$2 = $386$hi; i64toi32_i32$1 = $390$hi; - $834($7_1 + 240 | 0 | 0, $380_1 | 0, i64toi32_i32$0 | 0, $384_1 | 0, i64toi32_i32$5 | 0, $386_1 | 0, i64toi32_i32$2 | 0, $390_1 | 0, i64toi32_i32$1 | 0); - $829($7_1 + 224 | 0 | 0, HEAP32[(((8 - $16_1 | 0) << 2 | 0) + 101088 | 0) >> 2] | 0 | 0); + $835($7_1 + 240 | 0 | 0, $380_1 | 0, i64toi32_i32$0 | 0, $384_1 | 0, i64toi32_i32$5 | 0, $386_1 | 0, i64toi32_i32$2 | 0, $390_1 | 0, i64toi32_i32$1 | 0); + $830($7_1 + 224 | 0 | 0, HEAP32[(((8 - $16_1 | 0) << 2 | 0) + 101664 | 0) >> 2] | 0 | 0); i64toi32_i32$5 = $7_1; i64toi32_i32$1 = HEAP32[($7_1 + 240 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[($7_1 + 244 | 0) >> 2] | 0; @@ -57214,7 +57575,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $405$hi; i64toi32_i32$5 = $407$hi; i64toi32_i32$0 = $411$hi; - $826($7_1 + 208 | 0 | 0, $401_1 | 0, i64toi32_i32$1 | 0, $405_1 | 0, i64toi32_i32$2 | 0, $407_1 | 0, i64toi32_i32$5 | 0, $411_1 | 0, i64toi32_i32$0 | 0); + $827($7_1 + 208 | 0 | 0, $401_1 | 0, i64toi32_i32$1 | 0, $405_1 | 0, i64toi32_i32$2 | 0, $407_1 | 0, i64toi32_i32$5 | 0, $411_1 | 0, i64toi32_i32$0 | 0); i64toi32_i32$2 = ($7_1 + 208 | 0) + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$5 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -57237,8 +57598,8 @@ function asmFunc(imports) { break label$35 } } - $829($7_1 + 352 | 0 | 0, $5_1 | 0); - $830($7_1 + 336 | 0 | 0, $1_1 | 0); + $830($7_1 + 352 | 0 | 0, $5_1 | 0); + $831($7_1 + 336 | 0 | 0, $1_1 | 0); i64toi32_i32$2 = $7_1; i64toi32_i32$0 = HEAP32[($7_1 + 352 | 0) >> 2] | 0; i64toi32_i32$5 = HEAP32[($7_1 + 356 | 0) >> 2] | 0; @@ -57263,8 +57624,8 @@ function asmFunc(imports) { i64toi32_i32$5 = $443$hi; i64toi32_i32$2 = $445$hi; i64toi32_i32$1 = $449$hi; - $834($7_1 + 320 | 0 | 0, $439_1 | 0, i64toi32_i32$0 | 0, $443_1 | 0, i64toi32_i32$5 | 0, $445_1 | 0, i64toi32_i32$2 | 0, $449_1 | 0, i64toi32_i32$1 | 0); - $829($7_1 + 304 | 0 | 0, HEAP32[(($16_1 << 2 | 0) + 101048 | 0) >> 2] | 0 | 0); + $835($7_1 + 320 | 0 | 0, $439_1 | 0, i64toi32_i32$0 | 0, $443_1 | 0, i64toi32_i32$5 | 0, $445_1 | 0, i64toi32_i32$2 | 0, $449_1 | 0, i64toi32_i32$1 | 0); + $830($7_1 + 304 | 0 | 0, HEAP32[(($16_1 << 2 | 0) + 101624 | 0) >> 2] | 0 | 0); i64toi32_i32$5 = $7_1; i64toi32_i32$1 = HEAP32[($7_1 + 320 | 0) >> 2] | 0; i64toi32_i32$2 = HEAP32[($7_1 + 324 | 0) >> 2] | 0; @@ -57289,7 +57650,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $463$hi; i64toi32_i32$5 = $465$hi; i64toi32_i32$0 = $469$hi; - $834($7_1 + 288 | 0 | 0, $459_1 | 0, i64toi32_i32$1 | 0, $463_1 | 0, i64toi32_i32$2 | 0, $465_1 | 0, i64toi32_i32$5 | 0, $469_1 | 0, i64toi32_i32$0 | 0); + $835($7_1 + 288 | 0 | 0, $459_1 | 0, i64toi32_i32$1 | 0, $463_1 | 0, i64toi32_i32$2 | 0, $465_1 | 0, i64toi32_i32$5 | 0, $469_1 | 0, i64toi32_i32$0 | 0); i64toi32_i32$2 = ($7_1 + 288 | 0) + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$5 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -57330,7 +57691,7 @@ function asmFunc(imports) { $14_1 = 0; break label$42; } - $11_1 = HEAP32[(((8 - $9_1 | 0) << 2 | 0) + 101088 | 0) >> 2] | 0; + $11_1 = HEAP32[(((8 - $9_1 | 0) << 2 | 0) + 101664 | 0) >> 2] | 0; $6_1 = (1e9 | 0) / ($11_1 | 0) | 0; $2_1 = 0; $1_1 = 0; @@ -57499,7 +57860,7 @@ function asmFunc(imports) { break label$60 } $2_1 = HEAP32[(($7_1 + 784 | 0) + ($2_1 << 2 | 0) | 0) >> 2] | 0; - $13_1 = HEAP32[(($1_1 << 2 | 0) + 101072 | 0) >> 2] | 0; + $13_1 = HEAP32[(($1_1 << 2 | 0) + 101648 | 0) >> 2] | 0; if ($2_1 >>> 0 < $13_1 >>> 0) { break label$60 } @@ -57532,14 +57893,14 @@ function asmFunc(imports) { $14_1 = ($14_1 + 1 | 0) & 2047 | 0; HEAP32[((($14_1 << 2 | 0) + ($7_1 + 784 | 0) | 0) + -4 | 0) >> 2] = 0; } - $830($7_1 + 768 | 0 | 0, HEAP32[(($7_1 + 784 | 0) + ($2_1 << 2 | 0) | 0) >> 2] | 0 | 0); + $831($7_1 + 768 | 0 | 0, HEAP32[(($7_1 + 784 | 0) + ($2_1 << 2 | 0) | 0) >> 2] | 0 | 0); i64toi32_i32$3 = $18$hi; i64toi32_i32$3 = $19$hi; i64toi32_i32$3 = $18$hi; i64toi32_i32$1 = $19$hi; i64toi32_i32$0 = 0; i64toi32_i32$5 = 1075633366; - $834($7_1 + 752 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0, 1342177280 | 0, i64toi32_i32$5 | 0); + $835($7_1 + 752 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0, 1342177280 | 0, i64toi32_i32$5 | 0); i64toi32_i32$1 = $7_1; i64toi32_i32$5 = HEAP32[($7_1 + 752 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($7_1 + 756 | 0) >> 2] | 0; @@ -57564,7 +57925,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $742$hi; i64toi32_i32$1 = $744$hi; i64toi32_i32$3 = $748$hi; - $822($7_1 + 736 | 0 | 0, $738_1 | 0, i64toi32_i32$5 | 0, $742_1 | 0, i64toi32_i32$0 | 0, $744_1 | 0, i64toi32_i32$1 | 0, $748_1 | 0, i64toi32_i32$3 | 0); + $823($7_1 + 736 | 0 | 0, $738_1 | 0, i64toi32_i32$5 | 0, $742_1 | 0, i64toi32_i32$0 | 0, $744_1 | 0, i64toi32_i32$1 | 0, $748_1 | 0, i64toi32_i32$3 | 0); i64toi32_i32$0 = ($7_1 + 736 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -57581,7 +57942,7 @@ function asmFunc(imports) { } break label$62; }; - $829(i64toi32_i32$0 + 720 | 0 | 0, $5_1 | 0); + $830(i64toi32_i32$0 + 720 | 0 | 0, $5_1 | 0); i64toi32_i32$3 = $19$hi; i64toi32_i32$3 = HEAP32[(i64toi32_i32$0 + 720 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 724 | 0) >> 2] | 0; @@ -57596,7 +57957,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $19$hi; i64toi32_i32$0 = $767$hi; i64toi32_i32$5 = $771$hi; - $834($7_1 + 704 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0, $767_1 | 0, i64toi32_i32$0 | 0, $771_1 | 0, i64toi32_i32$5 | 0); + $835($7_1 + 704 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0, $767_1 | 0, i64toi32_i32$0 | 0, $771_1 | 0, i64toi32_i32$5 | 0); i64toi32_i32$1 = ($7_1 + 704 | 0) + 8 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -57673,7 +58034,7 @@ function asmFunc(imports) { }; break label$55; }; - $827($7_1 + 656 | 0 | 0, +(+$773(+(1.0), 225 - $2_1 | 0 | 0))); + $828($7_1 + 656 | 0 | 0, +(+$774(+(1.0), 225 - $2_1 | 0 | 0))); i64toi32_i32$1 = $7_1; i64toi32_i32$5 = HEAP32[($7_1 + 656 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($7_1 + 660 | 0) >> 2] | 0; @@ -57690,7 +58051,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $878$hi; i64toi32_i32$1 = $20$hi; i64toi32_i32$3 = $19$hi; - $774($7_1 + 688 | 0 | 0, $874 | 0, i64toi32_i32$5 | 0, $878 | 0, i64toi32_i32$0 | 0, $20_1 | 0, i64toi32_i32$1 | 0, $19_1 | 0, i64toi32_i32$3 | 0); + $775($7_1 + 688 | 0 | 0, $874 | 0, i64toi32_i32$5 | 0, $878 | 0, i64toi32_i32$0 | 0, $20_1 | 0, i64toi32_i32$1 | 0, $19_1 | 0, i64toi32_i32$3 | 0); i64toi32_i32$0 = ($7_1 + 688 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -57701,7 +58062,7 @@ function asmFunc(imports) { i64toi32_i32$3 = HEAP32[(i64toi32_i32$0 + 692 | 0) >> 2] | 0; $22_1 = i64toi32_i32$1; $22$hi = i64toi32_i32$3; - $827(i64toi32_i32$0 + 640 | 0 | 0, +(+$773(+(1.0), 113 - $2_1 | 0 | 0))); + $828(i64toi32_i32$0 + 640 | 0 | 0, +(+$774(+(1.0), 113 - $2_1 | 0 | 0))); i64toi32_i32$3 = $20$hi; i64toi32_i32$3 = $19$hi; i64toi32_i32$3 = HEAP32[(i64toi32_i32$0 + 640 | 0) >> 2] | 0; @@ -57717,7 +58078,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $19$hi; i64toi32_i32$0 = $897$hi; i64toi32_i32$5 = $901$hi; - $777($7_1 + 672 | 0 | 0, $20_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0, $897 | 0, i64toi32_i32$0 | 0, $901 | 0, i64toi32_i32$5 | 0); + $778($7_1 + 672 | 0 | 0, $20_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0, $897 | 0, i64toi32_i32$0 | 0, $901 | 0, i64toi32_i32$5 | 0); i64toi32_i32$5 = i64toi32_i32$3; i64toi32_i32$5 = i64toi32_i32$1; i64toi32_i32$1 = $7_1; @@ -57734,7 +58095,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $19$hi; i64toi32_i32$1 = $18$hi; i64toi32_i32$3 = $21$hi; - $836($7_1 + 624 | 0 | 0, $20_1 | 0, i64toi32_i32$5 | 0, $19_1 | 0, i64toi32_i32$0 | 0, $18_1 | 0, i64toi32_i32$1 | 0, $21_1 | 0, i64toi32_i32$3 | 0); + $837($7_1 + 624 | 0 | 0, $20_1 | 0, i64toi32_i32$5 | 0, $19_1 | 0, i64toi32_i32$0 | 0, $18_1 | 0, i64toi32_i32$1 | 0, $21_1 | 0, i64toi32_i32$3 | 0); i64toi32_i32$3 = $22$hi; i64toi32_i32$3 = $23$hi; i64toi32_i32$0 = $7_1; @@ -57751,7 +58112,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $23$hi; i64toi32_i32$0 = $919$hi; i64toi32_i32$5 = $923$hi; - $822($7_1 + 608 | 0 | 0, $22_1 | 0, i64toi32_i32$3 | 0, $23_1 | 0, i64toi32_i32$1 | 0, $919 | 0, i64toi32_i32$0 | 0, $923 | 0, i64toi32_i32$5 | 0); + $823($7_1 + 608 | 0 | 0, $22_1 | 0, i64toi32_i32$3 | 0, $23_1 | 0, i64toi32_i32$1 | 0, $919 | 0, i64toi32_i32$0 | 0, $923 | 0, i64toi32_i32$5 | 0); i64toi32_i32$1 = ($7_1 + 608 | 0) + 8 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -57782,7 +58143,7 @@ function asmFunc(imports) { break label$67 } } - $827($7_1 + 496 | 0 | 0, +(+($5_1 | 0) * .25)); + $828($7_1 + 496 | 0 | 0, +(+($5_1 | 0) * .25)); i64toi32_i32$5 = $18$hi; i64toi32_i32$5 = $21$hi; i64toi32_i32$1 = $7_1; @@ -57799,7 +58160,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $21$hi; i64toi32_i32$1 = $960$hi; i64toi32_i32$3 = $964$hi; - $822($7_1 + 480 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $21_1 | 0, i64toi32_i32$0 | 0, $960 | 0, i64toi32_i32$1 | 0, $964 | 0, i64toi32_i32$3 | 0); + $823($7_1 + 480 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $21_1 | 0, i64toi32_i32$0 | 0, $960 | 0, i64toi32_i32$1 | 0, $964 | 0, i64toi32_i32$3 | 0); i64toi32_i32$0 = ($7_1 + 480 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -57816,7 +58177,7 @@ function asmFunc(imports) { if (($15_1 | 0) == (5e8 | 0)) { break label$70 } - $827($7_1 + 592 | 0 | 0, +(+($5_1 | 0) * .75)); + $828($7_1 + 592 | 0 | 0, +(+($5_1 | 0) * .75)); i64toi32_i32$3 = $18$hi; i64toi32_i32$3 = $21$hi; i64toi32_i32$0 = $7_1; @@ -57833,7 +58194,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $21$hi; i64toi32_i32$0 = $983$hi; i64toi32_i32$5 = $987$hi; - $822($7_1 + 576 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $21_1 | 0, i64toi32_i32$1 | 0, $983 | 0, i64toi32_i32$0 | 0, $987 | 0, i64toi32_i32$5 | 0); + $823($7_1 + 576 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $21_1 | 0, i64toi32_i32$1 | 0, $983 | 0, i64toi32_i32$0 | 0, $987 | 0, i64toi32_i32$5 | 0); i64toi32_i32$1 = ($7_1 + 576 | 0) + 8 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -57851,7 +58212,7 @@ function asmFunc(imports) { if ((($11_1 + 5 | 0) & 2047 | 0 | 0) != ($14_1 | 0)) { break label$71 } - $827($7_1 + 528 | 0 | 0, +($24_1 * .5)); + $828($7_1 + 528 | 0 | 0, +($24_1 * .5)); i64toi32_i32$5 = $18$hi; i64toi32_i32$5 = $21$hi; i64toi32_i32$1 = $7_1; @@ -57868,7 +58229,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $21$hi; i64toi32_i32$1 = $1010$hi; i64toi32_i32$3 = $1014$hi; - $822($7_1 + 512 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $21_1 | 0, i64toi32_i32$0 | 0, $1010 | 0, i64toi32_i32$1 | 0, $1014 | 0, i64toi32_i32$3 | 0); + $823($7_1 + 512 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $21_1 | 0, i64toi32_i32$0 | 0, $1010 | 0, i64toi32_i32$1 | 0, $1014 | 0, i64toi32_i32$3 | 0); i64toi32_i32$0 = ($7_1 + 512 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -57881,7 +58242,7 @@ function asmFunc(imports) { $18$hi = i64toi32_i32$3; break label$67; } - $827($7_1 + 560 | 0 | 0, +($24_1 * .75)); + $828($7_1 + 560 | 0 | 0, +($24_1 * .75)); i64toi32_i32$3 = $18$hi; i64toi32_i32$3 = $21$hi; i64toi32_i32$0 = $7_1; @@ -57898,7 +58259,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $21$hi; i64toi32_i32$0 = $1030$hi; i64toi32_i32$5 = $1034$hi; - $822($7_1 + 544 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $21_1 | 0, i64toi32_i32$1 | 0, $1030 | 0, i64toi32_i32$0 | 0, $1034 | 0, i64toi32_i32$5 | 0); + $823($7_1 + 544 | 0 | 0, $18_1 | 0, i64toi32_i32$3 | 0, $21_1 | 0, i64toi32_i32$1 | 0, $1030 | 0, i64toi32_i32$0 | 0, $1034 | 0, i64toi32_i32$5 | 0); i64toi32_i32$1 = ($7_1 + 544 | 0) + 8 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -57919,7 +58280,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $21$hi; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1073676288; - $777($7_1 + 464 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $21_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$3 | 0); + $778($7_1 + 464 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $21_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$3 | 0); i64toi32_i32$0 = $7_1; i64toi32_i32$3 = HEAP32[(i64toi32_i32$0 + 464 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 468 | 0) >> 2] | 0; @@ -57934,7 +58295,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $1052$hi; i64toi32_i32$0 = 0; i64toi32_i32$5 = 0; - if ($824($1048 | 0, i64toi32_i32$3 | 0, $1052 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$5 | 0) | 0) { + if ($825($1048 | 0, i64toi32_i32$3 | 0, $1052 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$5 | 0) | 0) { break label$66 } i64toi32_i32$5 = $18$hi; @@ -57943,7 +58304,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $21$hi; i64toi32_i32$1 = 0; i64toi32_i32$3 = 1073676288; - $822($7_1 + 448 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $21_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$3 | 0); + $823($7_1 + 448 | 0 | 0, $18_1 | 0, i64toi32_i32$5 | 0, $21_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$3 | 0); i64toi32_i32$0 = ($7_1 + 448 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -57963,7 +58324,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $19$hi; i64toi32_i32$0 = $18$hi; i64toi32_i32$5 = $21$hi; - $822($7_1 + 432 | 0 | 0, $20_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0, $18_1 | 0, i64toi32_i32$0 | 0, $21_1 | 0, i64toi32_i32$5 | 0); + $823($7_1 + 432 | 0 | 0, $20_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0, $18_1 | 0, i64toi32_i32$0 | 0, $21_1 | 0, i64toi32_i32$5 | 0); i64toi32_i32$1 = $7_1; i64toi32_i32$5 = HEAP32[($7_1 + 432 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($7_1 + 436 | 0) >> 2] | 0; @@ -57980,7 +58341,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $1077$hi; i64toi32_i32$1 = $22$hi; i64toi32_i32$3 = $23$hi; - $836($7_1 + 416 | 0 | 0, $1073 | 0, i64toi32_i32$5 | 0, $1077 | 0, i64toi32_i32$0 | 0, $22_1 | 0, i64toi32_i32$1 | 0, $23_1 | 0, i64toi32_i32$3 | 0); + $837($7_1 + 416 | 0 | 0, $1073 | 0, i64toi32_i32$5 | 0, $1077 | 0, i64toi32_i32$0 | 0, $22_1 | 0, i64toi32_i32$1 | 0, $23_1 | 0, i64toi32_i32$3 | 0); i64toi32_i32$0 = ($7_1 + 416 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -57998,14 +58359,14 @@ function asmFunc(imports) { i64toi32_i32$3 = $19$hi; i64toi32_i32$3 = $20$hi; i64toi32_i32$1 = $19$hi; - $778(i64toi32_i32$0 + 400 | 0 | 0, $20_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0); + $779(i64toi32_i32$0 + 400 | 0 | 0, $20_1 | 0, i64toi32_i32$3 | 0, $19_1 | 0, i64toi32_i32$1 | 0); i64toi32_i32$1 = i64toi32_i32$3; i64toi32_i32$1 = $19$hi; i64toi32_i32$1 = i64toi32_i32$3; i64toi32_i32$3 = $19$hi; i64toi32_i32$0 = 0; i64toi32_i32$5 = 1073610752; - $834($7_1 + 384 | 0 | 0, $20_1 | 0, i64toi32_i32$1 | 0, $19_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$5 | 0); + $835($7_1 + 384 | 0 | 0, $20_1 | 0, i64toi32_i32$1 | 0, $19_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$5 | 0); i64toi32_i32$3 = $7_1; i64toi32_i32$5 = HEAP32[($7_1 + 400 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[($7_1 + 404 | 0) >> 2] | 0; @@ -58020,7 +58381,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $1104$hi; i64toi32_i32$3 = 0; i64toi32_i32$1 = 1081081856; - $13_1 = $825($1100 | 0, i64toi32_i32$5 | 0, $1104 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$1 | 0) | 0; + $13_1 = $826($1100 | 0, i64toi32_i32$5 | 0, $1104 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$1 | 0) | 0; i64toi32_i32$0 = ($7_1 + 384 | 0) + 8 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$3 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -58054,7 +58415,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $21$hi; i64toi32_i32$3 = 0; i64toi32_i32$0 = 0; - $11_1 = $824($18_1 | 0, $18$hi | 0, $21_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0) | 0; + $11_1 = $825($18_1 | 0, $18$hi | 0, $21_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0) | 0; label$73 : { $12_1 = $12_1 + $14_1 | 0; if (($12_1 + 110 | 0 | 0) > ($10_1 | 0)) { @@ -58064,13 +58425,13 @@ function asmFunc(imports) { break label$72 } } - HEAP32[($721() | 0) >> 2] = 68; + HEAP32[($722() | 0) >> 2] = 68; } i64toi32_i32$0 = $20$hi; i64toi32_i32$0 = $19$hi; i64toi32_i32$0 = $20$hi; i64toi32_i32$3 = $19$hi; - $775($7_1 + 368 | 0 | 0, $20_1 | 0, i64toi32_i32$0 | 0, $19_1 | 0, i64toi32_i32$3 | 0, $12_1 | 0); + $776($7_1 + 368 | 0 | 0, $20_1 | 0, i64toi32_i32$0 | 0, $19_1 | 0, i64toi32_i32$3 | 0, $12_1 | 0); i64toi32_i32$1 = ($7_1 + 368 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$1 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] | 0; @@ -58092,7 +58453,7 @@ function asmFunc(imports) { global$0 = $7_1 + 8976 | 0; } - function $782($0_1, $1_1) { + function $783($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $2_1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$1 = 0, $3_1 = 0, $6$hi = 0, $6_1 = 0, $5_1 = 0, i64toi32_i32$3 = 0, $4_1 = 0, $18_1 = 0, $19_1 = 0, $20_1 = 0, $21_1 = 0, $22_1 = 0, $23_1 = 0, $24_1 = 0, $25_1 = 0, $26_1 = 0, $27_1 = 0, $28_1 = 0, $29_1 = 0, $88$hi = 0, $90_1 = 0, $90$hi = 0, $139$hi = 0; @@ -58106,7 +58467,7 @@ function asmFunc(imports) { $3_1 = HEAPU8[$2_1 >> 0] | 0; break label$1; } - $3_1 = $771($0_1 | 0) | 0; + $3_1 = $772($0_1 | 0) | 0; } label$3 : { label$4 : { @@ -58125,7 +58486,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$8; } - $2_1 = $771($0_1 | 0) | 0; + $2_1 = $772($0_1 | 0) | 0; } $4_1 = ($3_1 | 0) == (45 | 0); $5_1 = $2_1 + -58 | 0; @@ -58192,7 +58553,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$12; } - $2_1 = $771($0_1 | 0) | 0; + $2_1 = $772($0_1 | 0) | 0; } $3_1 = $3_1 + -48 | 0; label$14 : { @@ -58243,7 +58604,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$16; } - $2_1 = $771($0_1 | 0) | 0; + $2_1 = $772($0_1 | 0) | 0; } i64toi32_i32$5 = $6$hi; i64toi32_i32$2 = $6_1; @@ -58299,7 +58660,7 @@ function asmFunc(imports) { $2_1 = HEAPU8[$2_1 >> 0] | 0; break label$20; } - $2_1 = $771($0_1 | 0) | 0; + $2_1 = $772($0_1 | 0) | 0; } if (($2_1 + -48 | 0) >>> 0 < 10 >>> 0) { continue label$19 @@ -58392,7 +58753,7 @@ function asmFunc(imports) { return i64toi32_i32$4 | 0; } - function $783($0_1, $1_1, $2_1, $3_1) { + function $784($0_1, $1_1, $2_1, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -58404,8 +58765,8 @@ function asmFunc(imports) { HEAP32[($4_1 + 20 | 0) >> 2] = $1_1; HEAP32[($4_1 + 24 | 0) >> 2] = -1; i64toi32_i32$0 = 0; - $770($4_1 + 16 | 0 | 0, 0 | 0, i64toi32_i32$0 | 0); - $779($4_1 | 0, $4_1 + 16 | 0 | 0, $3_1 | 0, 1 | 0); + $771($4_1 + 16 | 0 | 0, 0 | 0, i64toi32_i32$0 | 0); + $780($4_1 | 0, $4_1 + 16 | 0 | 0, $3_1 | 0, 1 | 0); i64toi32_i32$2 = $4_1 + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -58432,13 +58793,13 @@ function asmFunc(imports) { global$0 = $4_1 + 160 | 0; } - function $784($0_1, $1_1) { + function $785($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $2_1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, $11_1 = 0, $11$hi = 0, $14_1 = 0, $14$hi = 0, $3_1 = 0.0; $2_1 = global$0 - 16 | 0; global$0 = $2_1; - $783($2_1 | 0, $0_1 | 0, $1_1 | 0, 1 | 0); + $784($2_1 | 0, $0_1 | 0, $1_1 | 0, 1 | 0); i64toi32_i32$2 = $2_1; i64toi32_i32$0 = HEAP32[$2_1 >> 2] | 0; i64toi32_i32$1 = HEAP32[($2_1 + 4 | 0) >> 2] | 0; @@ -58451,19 +58812,19 @@ function asmFunc(imports) { $14$hi = i64toi32_i32$0; i64toi32_i32$0 = $11$hi; i64toi32_i32$1 = $14$hi; - $3_1 = +$837($11_1 | 0, i64toi32_i32$0 | 0, $14_1 | 0, i64toi32_i32$1 | 0); + $3_1 = +$838($11_1 | 0, i64toi32_i32$0 | 0, $14_1 | 0, i64toi32_i32$1 | 0); global$0 = $2_1 + 16 | 0; return +$3_1; } - function $785($0_1, $1_1, $2_1) { + function $786($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; var i64toi32_i32$1 = 0, $3_1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, $4_1 = 0, $4$hi = 0, $16_1 = 0; $3_1 = global$0 - 16 | 0; global$0 = $3_1; - $783($3_1 | 0, $1_1 | 0, $2_1 | 0, 2 | 0); + $784($3_1 | 0, $1_1 | 0, $2_1 | 0, 2 | 0); i64toi32_i32$2 = $3_1; i64toi32_i32$0 = HEAP32[$3_1 >> 2] | 0; i64toi32_i32$1 = HEAP32[($3_1 + 4 | 0) >> 2] | 0; @@ -58482,19 +58843,19 @@ function asmFunc(imports) { global$0 = $3_1 + 16 | 0; } - function $786($0_1, $1_1, $2_1) { + function $787($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = -1; - i64toi32_i32$0 = $787($0_1 | 0, $1_1 | 0, $2_1 | 0, -1 | 0, i64toi32_i32$0 | 0) | 0; + i64toi32_i32$0 = $788($0_1 | 0, $1_1 | 0, $2_1 | 0, -1 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } - function $787($0_1, $1_1, $2_1, $3_1, $3$hi) { + function $788($0_1, $1_1, $2_1, $3_1, $3$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -58518,7 +58879,7 @@ function asmFunc(imports) { $7_1 = $0_1; break label$2; } - HEAP32[($721() | 0) >> 2] = 28; + HEAP32[($722() | 0) >> 2] = 28; i64toi32_i32$0 = 0; $3_1 = 0; $3$hi = i64toi32_i32$0; @@ -58527,7 +58888,7 @@ function asmFunc(imports) { $7_1 = $0_1; label$5 : { label$6 : while (1) { - if (!($772($6_1 << 24 >> 24 | 0) | 0)) { + if (!($773($6_1 << 24 >> 24 | 0) | 0)) { break label$5 } $6_1 = HEAPU8[($7_1 + 1 | 0) >> 0] | 0; @@ -58611,7 +58972,7 @@ function asmFunc(imports) { i64toi32_i32$1 = 0; i64toi32_i32$2 = $12$hi; i64toi32_i32$3 = 0; - $835($4_1 | 0, $11_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, $12_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); + $836($4_1 | 0, $11_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, $12_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); $6_1 = 1; label$14 : { i64toi32_i32$1 = $4_1; @@ -58679,7 +59040,7 @@ function asmFunc(imports) { if (!$2_1) { break label$18 } - HEAP32[($721() | 0) >> 2] = 68; + HEAP32[($722() | 0) >> 2] = 68; i64toi32_i32$5 = $3$hi; i64toi32_i32$1 = $3_1; i64toi32_i32$3 = 0; @@ -58721,7 +59082,7 @@ function asmFunc(imports) { if ($5_1) { break label$19 } - HEAP32[($721() | 0) >> 2] = 68; + HEAP32[($722() | 0) >> 2] = 68; i64toi32_i32$5 = $3$hi; i64toi32_i32$1 = $3_1; i64toi32_i32$3 = -1; @@ -58744,7 +59105,7 @@ function asmFunc(imports) { if (i64toi32_i32$4 >>> 0 < i64toi32_i32$1 >>> 0 | ((i64toi32_i32$4 | 0) == (i64toi32_i32$1 | 0) & i64toi32_i32$5 >>> 0 <= i64toi32_i32$0 >>> 0 | 0) | 0) { break label$16 } - HEAP32[($721() | 0) >> 2] = 68; + HEAP32[($722() | 0) >> 2] = 68; break label$1; } i64toi32_i32$5 = $12$hi; @@ -58775,56 +59136,56 @@ function asmFunc(imports) { return i64toi32_i32$5 | 0; } - function $788($0_1, $1_1, $2_1) { + function $789($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; i64toi32_i32$0 = -2147483648; - i64toi32_i32$0 = $787($0_1 | 0, $1_1 | 0, $2_1 | 0, 0 | 0, i64toi32_i32$0 | 0) | 0; + i64toi32_i32$0 = $788($0_1 | 0, $1_1 | 0, $2_1 | 0, 0 | 0, i64toi32_i32$0 | 0) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; i64toi32_i32$HIGH_BITS = i64toi32_i32$1; return i64toi32_i32$0 | 0; } - function $789($0_1, $1_1, $2_1) { + function $790($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; var i64toi32_i32$0 = 0; i64toi32_i32$0 = 0; - i64toi32_i32$0 = $787($0_1 | 0, $1_1 | 0, $2_1 | 0, -2147483648 | 0, i64toi32_i32$0 | 0) | 0; + i64toi32_i32$0 = $788($0_1 | 0, $1_1 | 0, $2_1 | 0, -2147483648 | 0, i64toi32_i32$0 | 0) | 0; return i64toi32_i32$0 | 0; } - function $790($0_1) { + function $791($0_1) { $0_1 = $0_1 | 0; return ($0_1 + -97 | 0) >>> 0 < 26 >>> 0 | 0; } - function $791($0_1) { + function $792($0_1) { $0_1 = $0_1 | 0; - return ($790($0_1 | 0) | 0 ? $0_1 & 95 | 0 : $0_1) | 0; + return ($791($0_1 | 0) | 0 ? $0_1 & 95 | 0 : $0_1) | 0; } - function $792() { + function $793() { label$1 : { - if ((HEAPU8[(0 + 103312 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[(0 + 103888 | 0) >> 0] | 0) & 1 | 0) { break label$1 } - $740(103288 | 0) | 0; + $741(103864 | 0) | 0; label$2 : { - if ((HEAPU8[(0 + 103312 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[(0 + 103888 | 0) >> 0] | 0) & 1 | 0) { break label$2 } - fimport$4(101996 | 0, 102e3 | 0, 102004 | 0); - HEAP8[(0 + 103312 | 0) >> 0] = 1; + fimport$4(102572 | 0, 102576 | 0, 102580 | 0); + HEAP8[(0 + 103888 | 0) >> 0] = 1; } - $741(103288 | 0) | 0; + $742(103864 | 0) | 0; } } - function $793($0_1, $1_1) { + function $794($0_1, $1_1) { $0_1 = +$0_1; $1_1 = $1_1 | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$3 = 0, $3_1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$4 = 0, $2_1 = 0, $10_1 = 0, $2$hi = 0; @@ -58860,7 +59221,7 @@ function asmFunc(imports) { $3_1 = 0; break label$3; } - $0_1 = +$793(+($0_1 * 18446744073709551615.0), $1_1 | 0); + $0_1 = +$794(+($0_1 * 18446744073709551615.0), $1_1 | 0); $3_1 = (HEAP32[$1_1 >> 2] | 0) + -64 | 0; } HEAP32[$1_1 >> 2] = $3_1; @@ -58883,7 +59244,7 @@ function asmFunc(imports) { return +$0_1; } - function $794($0_1, $1_1, $2_1, $3_1, $4_1) { + function $795($0_1, $1_1, $2_1, $3_1, $4_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -58893,11 +59254,11 @@ function asmFunc(imports) { $5_1 = global$0 - 208 | 0; global$0 = $5_1; HEAP32[($5_1 + 204 | 0) >> 2] = $2_1; - $724($5_1 + 160 | 0 | 0, 0 | 0, 40 | 0) | 0; + $725($5_1 + 160 | 0 | 0, 0 | 0, 40 | 0) | 0; HEAP32[($5_1 + 200 | 0) >> 2] = HEAP32[($5_1 + 204 | 0) >> 2] | 0; label$1 : { label$2 : { - if (($795(0 | 0, $1_1 | 0, $5_1 + 200 | 0 | 0, $5_1 + 80 | 0 | 0, $5_1 + 160 | 0 | 0, $3_1 | 0, $4_1 | 0) | 0 | 0) >= (0 | 0)) { + if (($796(0 | 0, $1_1 | 0, $5_1 + 200 | 0 | 0, $5_1 + 80 | 0 | 0, $5_1 + 160 | 0 | 0, $3_1 | 0, $4_1 | 0) | 0 | 0) >= (0 | 0)) { break label$2 } $4_1 = -1; @@ -58911,7 +59272,7 @@ function asmFunc(imports) { $6_1 = 1; break label$3; } - $6_1 = !($726($0_1 | 0) | 0); + $6_1 = !($727($0_1 | 0) | 0); } $7_1 = HEAP32[$0_1 >> 2] | 0; HEAP32[$0_1 >> 2] = $7_1 & -33 | 0; @@ -58937,11 +59298,11 @@ function asmFunc(imports) { } } $2_1 = -1; - if ($734($0_1 | 0) | 0) { + if ($735($0_1 | 0) | 0) { break label$5 } } - $2_1 = $795($0_1 | 0, $1_1 | 0, $5_1 + 200 | 0 | 0, $5_1 + 80 | 0 | 0, $5_1 + 160 | 0 | 0, $3_1 | 0, $4_1 | 0) | 0; + $2_1 = $796($0_1 | 0, $1_1 | 0, $5_1 + 200 | 0 | 0, $5_1 + 80 | 0 | 0, $5_1 + 160 | 0 | 0, $3_1 | 0, $4_1 | 0) | 0; } $4_1 = $7_1 & 32 | 0; label$9 : { @@ -58964,13 +59325,13 @@ function asmFunc(imports) { if ($6_1) { break label$1 } - $727($0_1 | 0); + $728($0_1 | 0); } global$0 = $5_1 + 208 | 0; return $4_1 | 0; } - function $795($0_1, $1_1, $2_1, $3_1, $4_1, $5_1, $6_1) { + function $796($0_1, $1_1, $2_1, $3_1, $4_1, $5_1, $6_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -59051,7 +59412,7 @@ function asmFunc(imports) { if (!$0_1) { break label$17 } - $796($0_1 | 0, $15_1 | 0, $14_1 | 0); + $797($0_1 | 0, $15_1 | 0, $14_1 | 0); } if ($14_1) { continue label$5 @@ -59060,7 +59421,7 @@ function asmFunc(imports) { $14_1 = $1_1 + 1 | 0; $18_1 = -1; label$18 : { - if (!($739(HEAP8[($1_1 + 1 | 0) >> 0] | 0 | 0) | 0)) { + if (!($740(HEAP8[($1_1 + 1 | 0) >> 0] | 0 | 0) | 0)) { break label$18 } if ((HEAPU8[($1_1 + 2 | 0) >> 0] | 0 | 0) != (36 | 0)) { @@ -59113,7 +59474,7 @@ function asmFunc(imports) { $20_1 = $17_1 + 1 | 0; label$24 : { label$25 : { - if (!($739(HEAP8[($17_1 + 1 | 0) >> 0] | 0 | 0) | 0)) { + if (!($740(HEAP8[($17_1 + 1 | 0) >> 0] | 0 | 0) | 0)) { break label$25 } if ((HEAPU8[($17_1 + 2 | 0) >> 0] | 0 | 0) != (36 | 0)) { @@ -59160,7 +59521,7 @@ function asmFunc(imports) { $19_1 = $19_1 | 8192 | 0; break label$22; } - $21_1 = $797($7_1 + 76 | 0 | 0) | 0; + $21_1 = $798($7_1 + 76 | 0 | 0) | 0; if (($21_1 | 0) < (0 | 0)) { break label$3 } @@ -59184,7 +59545,7 @@ function asmFunc(imports) { $1_1 = $20_1 + 2 | 0; label$32 : { label$33 : { - if (!($739(HEAP8[($20_1 + 2 | 0) >> 0] | 0 | 0) | 0)) { + if (!($740(HEAP8[($20_1 + 2 | 0) >> 0] | 0 | 0) | 0)) { break label$33 } if ((HEAPU8[($20_1 + 3 | 0) >> 0] | 0 | 0) != (36 | 0)) { @@ -59225,7 +59586,7 @@ function asmFunc(imports) { } HEAP32[($7_1 + 76 | 0) >> 2] = $20_1 + 1 | 0; $23_1 = 1; - $22_1 = $797($7_1 + 76 | 0 | 0) | 0; + $22_1 = $798($7_1 + 76 | 0 | 0) | 0; $1_1 = HEAP32[($7_1 + 76 | 0) >> 2] | 0; } label$37 : while (1) { @@ -59237,7 +59598,7 @@ function asmFunc(imports) { break label$2 } $1_1 = $1_1 + 1 | 0; - $14_1 = HEAPU8[(($14_1 + Math_imul($17_1, 58) | 0) + 101087 | 0) >> 0] | 0; + $14_1 = HEAPU8[(($14_1 + Math_imul($17_1, 58) | 0) + 101663 | 0) >> 0] | 0; if (($14_1 + -1 | 0) >>> 0 < 8 >>> 0) { continue label$37 } @@ -59275,7 +59636,7 @@ function asmFunc(imports) { if (!$0_1) { break label$6 } - $798($7_1 + 64 | 0 | 0, $14_1 | 0, $2_1 | 0, $6_1 | 0); + $799($7_1 + 64 | 0 | 0, $14_1 | 0, $2_1 | 0, $6_1 | 0); break label$38; } if (($18_1 | 0) > (-1 | 0)) { @@ -59437,7 +59798,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $7_1; i64toi32_i32$0 = HEAP32[($7_1 + 64 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($7_1 + 68 | 0) >> 2] | 0; - $15_1 = $799(i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, $11_1 | 0, $14_1 & 32 | 0 | 0) | 0; + $15_1 = $800(i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, $11_1 | 0, $14_1 & 32 | 0 | 0) | 0; $18_1 = 0; $26_1 = 65919; i64toi32_i32$2 = $7_1; @@ -59458,7 +59819,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $7_1; i64toi32_i32$0 = HEAP32[($7_1 + 64 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($7_1 + 68 | 0) >> 2] | 0; - $15_1 = $800(i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, $11_1 | 0) | 0; + $15_1 = $801(i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, $11_1 | 0) | 0; if (!($19_1 & 8 | 0)) { break label$49 } @@ -59521,7 +59882,7 @@ function asmFunc(imports) { $26_1 = $18_1 ? 65921 : 65919; } i64toi32_i32$5 = $28$hi; - $15_1 = $801($28_1 | 0, i64toi32_i32$5 | 0, $11_1 | 0) | 0; + $15_1 = $802($28_1 | 0, i64toi32_i32$5 | 0, $11_1 | 0) | 0; } if ($23_1 & ($22_1 | 0) < (0 | 0) | 0) { break label$3 @@ -59553,8 +59914,8 @@ function asmFunc(imports) { break label$8; } $14_1 = HEAP32[($7_1 + 64 | 0) >> 2] | 0; - $15_1 = $14_1 ? $14_1 : 85473; - $14_1 = $769($15_1 | 0, ($22_1 >>> 0 < 2147483647 >>> 0 ? $22_1 : 2147483647) | 0) | 0; + $15_1 = $14_1 ? $14_1 : 86030; + $14_1 = $770($15_1 | 0, ($22_1 >>> 0 < 2147483647 >>> 0 ? $22_1 : 2147483647) | 0) | 0; $27_1 = $15_1 + $14_1 | 0; label$69 : { if (($22_1 | 0) <= (-1 | 0)) { @@ -59579,7 +59940,7 @@ function asmFunc(imports) { break label$45; } $14_1 = 0; - $802($0_1 | 0, 32 | 0, $21_1 | 0, 0 | 0, $19_1 | 0); + $803($0_1 | 0, 32 | 0, $21_1 | 0, 0 | 0, $19_1 | 0); break label$44; } HEAP32[($7_1 + 12 | 0) >> 2] = 0; @@ -59599,7 +59960,7 @@ function asmFunc(imports) { break label$71 } label$73 : { - $17_1 = $812($7_1 + 4 | 0 | 0, $17_1 | 0) | 0; + $17_1 = $813($7_1 + 4 | 0 | 0, $17_1 | 0) | 0; $15_1 = ($17_1 | 0) < (0 | 0); if ($15_1) { break label$73 @@ -59624,7 +59985,7 @@ function asmFunc(imports) { if (($14_1 | 0) < (0 | 0)) { break label$2 } - $802($0_1 | 0, 32 | 0, $21_1 | 0, $14_1 | 0, $19_1 | 0); + $803($0_1 | 0, 32 | 0, $21_1 | 0, $14_1 | 0, $19_1 | 0); label$74 : { if ($14_1) { break label$74 @@ -59639,12 +60000,12 @@ function asmFunc(imports) { if (!$15_1) { break label$44 } - $15_1 = $812($7_1 + 4 | 0 | 0, $15_1 | 0) | 0; + $15_1 = $813($7_1 + 4 | 0 | 0, $15_1 | 0) | 0; $17_1 = $15_1 + $17_1 | 0; if ($17_1 >>> 0 > $14_1 >>> 0) { break label$44 } - $796($0_1 | 0, $7_1 + 4 | 0 | 0, $15_1 | 0); + $797($0_1 | 0, $7_1 + 4 | 0 | 0, $15_1 | 0); $16_1 = $16_1 + 4 | 0; if ($17_1 >>> 0 < $14_1 >>> 0) { continue label$75 @@ -59652,7 +60013,7 @@ function asmFunc(imports) { break label$75; }; } - $802($0_1 | 0, 32 | 0, $21_1 | 0, $14_1 | 0, $19_1 ^ 8192 | 0 | 0); + $803($0_1 | 0, 32 | 0, $21_1 | 0, $14_1 | 0, $19_1 ^ 8192 | 0 | 0); $14_1 = ($21_1 | 0) > ($14_1 | 0) ? $21_1 : $14_1; continue label$5; } @@ -59695,7 +60056,7 @@ function asmFunc(imports) { if (!$16_1) { break label$76 } - $798($3_1 + ($14_1 << 3 | 0) | 0 | 0, $16_1 | 0, $2_1 | 0, $6_1 | 0); + $799($3_1 + ($14_1 << 3 | 0) | 0 | 0, $16_1 | 0, $2_1 | 0, $6_1 | 0); $24_1 = 1; $14_1 = $14_1 + 1 | 0; if (($14_1 | 0) != (10 | 0)) { @@ -59736,12 +60097,12 @@ function asmFunc(imports) { if (($14_1 | 0) > ($16_1 | 0)) { break label$2 } - $802($0_1 | 0, 32 | 0, $14_1 | 0, $17_1 | 0, $19_1 | 0); - $796($0_1 | 0, $26_1 | 0, $18_1 | 0); - $802($0_1 | 0, 48 | 0, $14_1 | 0, $17_1 | 0, $19_1 ^ 65536 | 0 | 0); - $802($0_1 | 0, 48 | 0, $20_1 | 0, $1_1 | 0, 0 | 0); - $796($0_1 | 0, $15_1 | 0, $1_1 | 0); - $802($0_1 | 0, 32 | 0, $14_1 | 0, $17_1 | 0, $19_1 ^ 8192 | 0 | 0); + $803($0_1 | 0, 32 | 0, $14_1 | 0, $17_1 | 0, $19_1 | 0); + $797($0_1 | 0, $26_1 | 0, $18_1 | 0); + $803($0_1 | 0, 48 | 0, $14_1 | 0, $17_1 | 0, $19_1 ^ 65536 | 0 | 0); + $803($0_1 | 0, 48 | 0, $20_1 | 0, $1_1 | 0, 0 | 0); + $797($0_1 | 0, $15_1 | 0, $1_1 | 0); + $803($0_1 | 0, 32 | 0, $14_1 | 0, $17_1 | 0, $19_1 ^ 8192 | 0 | 0); $1_1 = HEAP32[($7_1 + 76 | 0) >> 2] | 0; continue label$5; } @@ -59754,14 +60115,14 @@ function asmFunc(imports) { } $24_1 = 61; } - HEAP32[($721() | 0) >> 2] = $24_1; + HEAP32[($722() | 0) >> 2] = $24_1; $24_1 = -1; } global$0 = $7_1 + 80 | 0; return $24_1 | 0; } - function $796($0_1, $1_1, $2_1) { + function $797($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -59769,16 +60130,16 @@ function asmFunc(imports) { if ((HEAPU8[$0_1 >> 0] | 0) & 32 | 0) { break label$1 } - $735($1_1 | 0, $2_1 | 0, $0_1 | 0) | 0; + $736($1_1 | 0, $2_1 | 0, $0_1 | 0) | 0; } } - function $797($0_1) { + function $798($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, $3_1 = 0, $2_1 = 0; $1_1 = 0; label$1 : { - if ($739(HEAP8[(HEAP32[$0_1 >> 2] | 0) >> 0] | 0 | 0) | 0) { + if ($740(HEAP8[(HEAP32[$0_1 >> 2] | 0) >> 0] | 0 | 0) | 0) { break label$1 } return 0 | 0; @@ -59796,7 +60157,7 @@ function asmFunc(imports) { } HEAP32[$0_1 >> 2] = $2_1 + 1 | 0; $1_1 = $3_1; - if ($739(HEAP8[($2_1 + 1 | 0) >> 0] | 0 | 0) | 0) { + if ($740(HEAP8[($2_1 + 1 | 0) >> 0] | 0 | 0) | 0) { continue label$2 } break label$2; @@ -59804,7 +60165,7 @@ function asmFunc(imports) { return $1_1 | 0; } - function $798($0_1, $1_1, $2_1, $3_1) { + function $799($0_1, $1_1, $2_1, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -59981,7 +60342,7 @@ function asmFunc(imports) { } } - function $799($0_1, $0$hi, $1_1, $2_1) { + function $800($0_1, $0$hi, $1_1, $2_1) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; $1_1 = $1_1 | 0; @@ -59995,7 +60356,7 @@ function asmFunc(imports) { label$2 : while (1) { $1_1 = $1_1 + -1 | 0; i64toi32_i32$0 = $0$hi; - HEAP8[$1_1 >> 0] = HEAPU8[(($0_1 & 15 | 0) + 101616 | 0) >> 0] | 0 | $2_1 | 0; + HEAP8[$1_1 >> 0] = HEAPU8[(($0_1 & 15 | 0) + 102192 | 0) >> 0] | 0 | $2_1 | 0; i64toi32_i32$2 = $0_1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 15; @@ -60024,7 +60385,7 @@ function asmFunc(imports) { return $1_1 | 0; } - function $800($0_1, $0$hi, $1_1) { + function $801($0_1, $0$hi, $1_1) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; $1_1 = $1_1 | 0; @@ -60066,7 +60427,7 @@ function asmFunc(imports) { return $1_1 | 0; } - function $801($0_1, $0$hi, $1_1) { + function $802($0_1, $0$hi, $1_1) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; $1_1 = $1_1 | 0; @@ -60141,7 +60502,7 @@ function asmFunc(imports) { return $1_1 | 0; } - function $802($0_1, $1_1, $2_1, $3_1, $4_1) { + function $803($0_1, $1_1, $2_1, $3_1, $4_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -60159,13 +60520,13 @@ function asmFunc(imports) { } $3_1 = $2_1 - $3_1 | 0; $2_1 = $3_1 >>> 0 < 256 >>> 0; - $724($5_1 | 0, $1_1 & 255 | 0 | 0, ($2_1 ? $3_1 : 256) | 0) | 0; + $725($5_1 | 0, $1_1 & 255 | 0 | 0, ($2_1 ? $3_1 : 256) | 0) | 0; label$2 : { if ($2_1) { break label$2 } label$3 : while (1) { - $796($0_1 | 0, $5_1 | 0, 256 | 0); + $797($0_1 | 0, $5_1 | 0, 256 | 0); $3_1 = $3_1 + -256 | 0; if ($3_1 >>> 0 > 255 >>> 0) { continue label$3 @@ -60173,19 +60534,19 @@ function asmFunc(imports) { break label$3; }; } - $796($0_1 | 0, $5_1 | 0, $3_1 | 0); + $797($0_1 | 0, $5_1 | 0, $3_1 | 0); } global$0 = $5_1 + 256 | 0; } - function $803($0_1, $1_1, $2_1) { + function $804($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; - return $794($0_1 | 0, $1_1 | 0, $2_1 | 0, 5 | 0, 6 | 0) | 0 | 0; + return $795($0_1 | 0, $1_1 | 0, $2_1 | 0, 5 | 0, 6 | 0) | 0 | 0; } - function $804($0_1, $1_1, $2_1, $3_1, $4_1, $5_1) { + function $805($0_1, $1_1, $2_1, $3_1, $4_1, $5_1) { $0_1 = $0_1 | 0; $1_1 = +$1_1; $2_1 = $2_1 | 0; @@ -60199,7 +60560,7 @@ function asmFunc(imports) { HEAP32[($6_1 + 44 | 0) >> 2] = 0; label$1 : { label$2 : { - i64toi32_i32$0 = $806(+$1_1) | 0; + i64toi32_i32$0 = $807(+$1_1) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $24_1 = i64toi32_i32$0; $24$hi = i64toi32_i32$1; @@ -60227,7 +60588,7 @@ function asmFunc(imports) { $8_1 = 1; $9_1 = 65929; $1_1 = -$1_1; - i64toi32_i32$2 = $806(+$1_1) | 0; + i64toi32_i32$2 = $807(+$1_1) | 0; i64toi32_i32$1 = i64toi32_i32$HIGH_BITS; $24_1 = i64toi32_i32$2; $24$hi = i64toi32_i32$1; @@ -60259,11 +60620,11 @@ function asmFunc(imports) { break label$5 } $10_1 = $8_1 + 3 | 0; - $802($0_1 | 0, 32 | 0, $2_1 | 0, $10_1 | 0, $4_1 & -65537 | 0 | 0); - $796($0_1 | 0, $9_1 | 0, $8_1 | 0); + $803($0_1 | 0, 32 | 0, $2_1 | 0, $10_1 | 0, $4_1 & -65537 | 0 | 0); + $797($0_1 | 0, $9_1 | 0, $8_1 | 0); $11_1 = $5_1 & 32 | 0; - $796($0_1 | 0, ($1_1 != $1_1 ? ($11_1 ? 70732 : 75615) : $11_1 ? 71435 : 77204) | 0, 3 | 0); - $802($0_1 | 0, 32 | 0, $2_1 | 0, $10_1 | 0, $4_1 ^ 8192 | 0 | 0); + $797($0_1 | 0, ($1_1 != $1_1 ? ($11_1 ? 70805 : 76017) : $11_1 ? 71508 : 77629) | 0, 3 | 0); + $803($0_1 | 0, 32 | 0, $2_1 | 0, $10_1 | 0, $4_1 ^ 8192 | 0 | 0); $12_1 = ($10_1 | 0) > ($2_1 | 0) ? $10_1 : $2_1; break label$4; } @@ -60272,7 +60633,7 @@ function asmFunc(imports) { label$7 : { label$8 : { label$9 : { - $1_1 = +$793(+$1_1, $6_1 + 44 | 0 | 0); + $1_1 = +$794(+$1_1, $6_1 + 44 | 0 | 0); $1_1 = $1_1 + $1_1; if ($1_1 == 0.0) { break label$9 @@ -60713,7 +61074,7 @@ function asmFunc(imports) { label$48 : { $10_1 = $3_1 >> 31 | 0; i64toi32_i32$4 = 0; - $10_1 = $801(($3_1 ^ $10_1 | 0) - $10_1 | 0 | 0, i64toi32_i32$4 | 0, $13_1 | 0) | 0; + $10_1 = $802(($3_1 ^ $10_1 | 0) - $10_1 | 0 | 0, i64toi32_i32$4 | 0, $13_1 | 0) | 0; if (($13_1 - $10_1 | 0 | 0) > (1 | 0)) { break label$48 } @@ -60741,9 +61102,9 @@ function asmFunc(imports) { break label$4 } $23_1 = $10_1 + $8_1 | 0; - $802($0_1 | 0, 32 | 0, $2_1 | 0, $23_1 | 0, $4_1 | 0); - $796($0_1 | 0, $9_1 | 0, $8_1 | 0); - $802($0_1 | 0, 48 | 0, $2_1 | 0, $23_1 | 0, $4_1 ^ 65536 | 0 | 0); + $803($0_1 | 0, 32 | 0, $2_1 | 0, $23_1 | 0, $4_1 | 0); + $797($0_1 | 0, $9_1 | 0, $8_1 | 0); + $803($0_1 | 0, 48 | 0, $2_1 | 0, $23_1 | 0, $4_1 ^ 65536 | 0 | 0); label$50 : { label$51 : { label$52 : { @@ -60759,7 +61120,7 @@ function asmFunc(imports) { i64toi32_i32$5 = $18_1; i64toi32_i32$4 = HEAP32[$18_1 >> 2] | 0; i64toi32_i32$0 = 0; - $10_1 = $801(i64toi32_i32$4 | 0, i64toi32_i32$0 | 0, $3_1 | 0) | 0; + $10_1 = $802(i64toi32_i32$4 | 0, i64toi32_i32$0 | 0, $3_1 | 0) | 0; label$55 : { label$56 : { if (($18_1 | 0) == ($12_1 | 0)) { @@ -60783,7 +61144,7 @@ function asmFunc(imports) { HEAP8[($6_1 + 24 | 0) >> 0] = 48; $10_1 = $21_1; } - $796($0_1 | 0, $10_1 | 0, $3_1 - $10_1 | 0 | 0); + $797($0_1 | 0, $10_1 | 0, $3_1 - $10_1 | 0 | 0); $18_1 = $18_1 + 4 | 0; if ($18_1 >>> 0 <= $17_1 >>> 0) { continue label$54 @@ -60794,7 +61155,7 @@ function asmFunc(imports) { if (!$22_1) { break label$58 } - $796($0_1 | 0, 85307 | 0, 1 | 0); + $797($0_1 | 0, 85864 | 0, 1 | 0); } if ($18_1 >>> 0 >= $11_1 >>> 0) { break label$52 @@ -60807,7 +61168,7 @@ function asmFunc(imports) { i64toi32_i32$5 = $18_1; i64toi32_i32$0 = HEAP32[$18_1 >> 2] | 0; i64toi32_i32$4 = 0; - $10_1 = $801(i64toi32_i32$0 | 0, i64toi32_i32$4 | 0, $3_1 | 0) | 0; + $10_1 = $802(i64toi32_i32$0 | 0, i64toi32_i32$4 | 0, $3_1 | 0) | 0; if ($10_1 >>> 0 <= ($6_1 + 16 | 0) >>> 0) { break label$60 } @@ -60820,7 +61181,7 @@ function asmFunc(imports) { break label$61; }; } - $796($0_1 | 0, $10_1 | 0, (($15_1 | 0) < (9 | 0) ? $15_1 : 9) | 0); + $797($0_1 | 0, $10_1 | 0, (($15_1 | 0) < (9 | 0) ? $15_1 : 9) | 0); $10_1 = $15_1 + -9 | 0; $18_1 = $18_1 + 4 | 0; if ($18_1 >>> 0 >= $11_1 >>> 0) { @@ -60847,7 +61208,7 @@ function asmFunc(imports) { i64toi32_i32$5 = $11_1; i64toi32_i32$4 = HEAP32[$11_1 >> 2] | 0; i64toi32_i32$0 = 0; - $10_1 = $801(i64toi32_i32$4 | 0, i64toi32_i32$0 | 0, $3_1 | 0) | 0; + $10_1 = $802(i64toi32_i32$4 | 0, i64toi32_i32$0 | 0, $3_1 | 0) | 0; if (($10_1 | 0) != ($3_1 | 0)) { break label$64 } @@ -60871,15 +61232,15 @@ function asmFunc(imports) { break label$65; }; } - $796($0_1 | 0, $10_1 | 0, 1 | 0); + $797($0_1 | 0, $10_1 | 0, 1 | 0); $10_1 = $10_1 + 1 | 0; if (!($15_1 | $21_1 | 0)) { break label$65 } - $796($0_1 | 0, 85307 | 0, 1 | 0); + $797($0_1 | 0, 85864 | 0, 1 | 0); } $12_1 = $3_1 - $10_1 | 0; - $796($0_1 | 0, $10_1 | 0, (($15_1 | 0) > ($12_1 | 0) ? $12_1 : $15_1) | 0); + $797($0_1 | 0, $10_1 | 0, (($15_1 | 0) > ($12_1 | 0) ? $12_1 : $15_1) | 0); $15_1 = $15_1 - $12_1 | 0; $11_1 = $11_1 + 4 | 0; if ($11_1 >>> 0 >= $22_1 >>> 0) { @@ -60891,15 +61252,15 @@ function asmFunc(imports) { break label$63; }; } - $802($0_1 | 0, 48 | 0, $15_1 + 18 | 0 | 0, 18 | 0, 0 | 0); - $796($0_1 | 0, $19_1 | 0, $13_1 - $19_1 | 0 | 0); + $803($0_1 | 0, 48 | 0, $15_1 + 18 | 0 | 0, 18 | 0, 0 | 0); + $797($0_1 | 0, $19_1 | 0, $13_1 - $19_1 | 0 | 0); break label$50; } $10_1 = $15_1; } - $802($0_1 | 0, 48 | 0, $10_1 + 9 | 0 | 0, 9 | 0, 0 | 0); + $803($0_1 | 0, 48 | 0, $10_1 + 9 | 0 | 0, 9 | 0, 0 | 0); } - $802($0_1 | 0, 32 | 0, $2_1 | 0, $23_1 | 0, $4_1 ^ 8192 | 0 | 0); + $803($0_1 | 0, 32 | 0, $2_1 | 0, $23_1 | 0, $4_1 ^ 8192 | 0 | 0); $12_1 = ($23_1 | 0) > ($2_1 | 0) ? $23_1 : $2_1; break label$4; } @@ -60932,7 +61293,7 @@ function asmFunc(imports) { $853 = $10_1; $10_1 = $10_1 >> 31 | 0; i64toi32_i32$0 = 0; - $10_1 = $801(($853 ^ $10_1 | 0) - $10_1 | 0 | 0, i64toi32_i32$0 | 0, $13_1 | 0) | 0; + $10_1 = $802(($853 ^ $10_1 | 0) - $10_1 | 0 | 0, i64toi32_i32$0 | 0, $13_1 | 0) | 0; if (($10_1 | 0) != ($13_1 | 0)) { break label$71 } @@ -60959,7 +61320,7 @@ function asmFunc(imports) { } $11_1 = -2147483648; } - HEAP8[$10_1 >> 0] = HEAPU8[($11_1 + 101616 | 0) >> 0] | 0 | $18_1 | 0; + HEAP8[$10_1 >> 0] = HEAPU8[($11_1 + 102192 | 0) >> 0] | 0 | $18_1 | 0; $1_1 = ($1_1 - +($11_1 | 0)) * 16.0; label$75 : { $11_1 = $10_1 + 1 | 0; @@ -60994,20 +61355,20 @@ function asmFunc(imports) { $10_1 = $11_1 - ($6_1 + 16 | 0) | 0; $3_1 = $3_1 ? (($10_1 + -2 | 0 | 0) < ($3_1 | 0) ? $3_1 + 2 | 0 : $10_1) : $10_1; $11_1 = $19_1 + $3_1 | 0; - $802($0_1 | 0, 32 | 0, $2_1 | 0, $11_1 | 0, $4_1 | 0); - $796($0_1 | 0, $23_1 | 0, $21_1 | 0); - $802($0_1 | 0, 48 | 0, $2_1 | 0, $11_1 | 0, $4_1 ^ 65536 | 0 | 0); - $796($0_1 | 0, $6_1 + 16 | 0 | 0, $10_1 | 0); - $802($0_1 | 0, 48 | 0, $3_1 - $10_1 | 0 | 0, 0 | 0, 0 | 0); - $796($0_1 | 0, $22_1 | 0, $18_1 | 0); - $802($0_1 | 0, 32 | 0, $2_1 | 0, $11_1 | 0, $4_1 ^ 8192 | 0 | 0); + $803($0_1 | 0, 32 | 0, $2_1 | 0, $11_1 | 0, $4_1 | 0); + $797($0_1 | 0, $23_1 | 0, $21_1 | 0); + $803($0_1 | 0, 48 | 0, $2_1 | 0, $11_1 | 0, $4_1 ^ 65536 | 0 | 0); + $797($0_1 | 0, $6_1 + 16 | 0 | 0, $10_1 | 0); + $803($0_1 | 0, 48 | 0, $3_1 - $10_1 | 0 | 0, 0 | 0, 0 | 0); + $797($0_1 | 0, $22_1 | 0, $18_1 | 0); + $803($0_1 | 0, 32 | 0, $2_1 | 0, $11_1 | 0, $4_1 ^ 8192 | 0 | 0); $12_1 = ($11_1 | 0) > ($2_1 | 0) ? $11_1 : $2_1; } global$0 = $6_1 + 560 | 0; return $12_1 | 0; } - function $805($0_1, $1_1) { + function $806($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $2_1 = 0, $12_1 = 0, $12$hi = 0, $15_1 = 0, $15$hi = 0; @@ -61025,10 +61386,10 @@ function asmFunc(imports) { $15$hi = i64toi32_i32$0; i64toi32_i32$0 = $12$hi; i64toi32_i32$1 = $15$hi; - HEAPF64[$0_1 >> 3] = +$837($12_1 | 0, i64toi32_i32$0 | 0, $15_1 | 0, i64toi32_i32$1 | 0); + HEAPF64[$0_1 >> 3] = +$838($12_1 | 0, i64toi32_i32$0 | 0, $15_1 | 0, i64toi32_i32$1 | 0); } - function $806($0_1) { + function $807($0_1) { $0_1 = +$0_1; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0; wasm2js_scratch_store_f64(+$0_1); @@ -61038,7 +61399,7 @@ function asmFunc(imports) { return i64toi32_i32$1 | 0; } - function $807($0_1, $1_1, $2_1, $3_1) { + function $808($0_1, $1_1, $2_1, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -61051,7 +61412,7 @@ function asmFunc(imports) { $0_1 = -1; $6_1 = $1_1 + -1 | 0; HEAP32[($4_1 + 152 | 0) >> 2] = $6_1 >>> 0 > $1_1 >>> 0 ? 0 : $6_1; - $4_1 = $724($4_1 | 0, 0 | 0, 144 | 0) | 0; + $4_1 = $725($4_1 | 0, 0 | 0, 144 | 0) | 0; HEAP32[($4_1 + 76 | 0) >> 2] = -1; HEAP32[($4_1 + 36 | 0) >> 2] = 7; HEAP32[($4_1 + 80 | 0) >> 2] = -1; @@ -61062,17 +61423,17 @@ function asmFunc(imports) { if (($1_1 | 0) > (-1 | 0)) { break label$2 } - HEAP32[($721() | 0) >> 2] = 61; + HEAP32[($722() | 0) >> 2] = 61; break label$1; } HEAP8[$5_1 >> 0] = 0; - $0_1 = $803($4_1 | 0, $2_1 | 0, $3_1 | 0) | 0; + $0_1 = $804($4_1 | 0, $2_1 | 0, $3_1 | 0) | 0; } global$0 = $4_1 + 160 | 0; return $0_1 | 0; } - function $808($0_1, $1_1, $2_1) { + function $809($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -61087,7 +61448,7 @@ function asmFunc(imports) { if (!$7_1) { break label$1 } - $723($4_1 | 0, $6_1 | 0, $7_1 | 0) | 0; + $724($4_1 | 0, $6_1 | 0, $7_1 | 0) | 0; $4_1 = (HEAP32[$3_1 >> 2] | 0) + $7_1 | 0; HEAP32[$3_1 >> 2] = $4_1; $5_1 = (HEAP32[($3_1 + 4 | 0) >> 2] | 0) - $7_1 | 0; @@ -61098,7 +61459,7 @@ function asmFunc(imports) { if (!$5_1) { break label$2 } - $723($4_1 | 0, $1_1 | 0, $5_1 | 0) | 0; + $724($4_1 | 0, $1_1 | 0, $5_1 | 0) | 0; $4_1 = (HEAP32[$3_1 >> 2] | 0) + $5_1 | 0; HEAP32[$3_1 >> 2] = $4_1; HEAP32[($3_1 + 4 | 0) >> 2] = (HEAP32[($3_1 + 4 | 0) >> 2] | 0) - $5_1 | 0; @@ -61110,14 +61471,14 @@ function asmFunc(imports) { return $2_1 | 0; } - function $809($0_1, $1_1, $2_1) { + function $810($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; - return $807($0_1 | 0, 2147483647 | 0, $1_1 | 0, $2_1 | 0) | 0 | 0; + return $808($0_1 | 0, 2147483647 | 0, $1_1 | 0, $2_1 | 0) | 0 | 0; } - function $810($0_1) { + function $811($0_1) { $0_1 = $0_1 | 0; label$1 : { if ($0_1) { @@ -61125,11 +61486,11 @@ function asmFunc(imports) { } return 0 | 0; } - HEAP32[($721() | 0) >> 2] = $0_1; + HEAP32[($722() | 0) >> 2] = $0_1; return -1 | 0; } - function $811($0_1, $1_1, $2_1) { + function $812($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -61145,13 +61506,13 @@ function asmFunc(imports) { } label$3 : { label$4 : { - if (HEAP32[(HEAP32[(($751() | 0) + 96 | 0) >> 2] | 0) >> 2] | 0) { + if (HEAP32[(HEAP32[(($752() | 0) + 96 | 0) >> 2] | 0) >> 2] | 0) { break label$4 } if (($1_1 & -128 | 0 | 0) == (57216 | 0)) { break label$1 } - HEAP32[($721() | 0) >> 2] = 25; + HEAP32[($722() | 0) >> 2] = 25; break label$3; } label$5 : { @@ -61186,7 +61547,7 @@ function asmFunc(imports) { HEAP8[($0_1 + 1 | 0) >> 0] = ($1_1 >>> 12 | 0) & 63 | 0 | 128 | 0; return 4 | 0; } - HEAP32[($721() | 0) >> 2] = 25; + HEAP32[($722() | 0) >> 2] = 25; } $3_1 = -1; } @@ -61196,7 +61557,7 @@ function asmFunc(imports) { return 1 | 0; } - function $812($0_1, $1_1) { + function $813($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; label$1 : { @@ -61205,17 +61566,17 @@ function asmFunc(imports) { } return 0 | 0; } - return $811($0_1 | 0, $1_1 | 0, 0 | 0) | 0 | 0; + return $812($0_1 | 0, $1_1 | 0, 0 | 0) | 0 | 0; } - function $813() { + function $814() { return __wasm_memory_size() << 16 | 0 | 0; } - function $814($0_1) { + function $815($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, $2_1 = 0; - $1_1 = HEAP32[(0 + 101972 | 0) >> 2] | 0; + $1_1 = HEAP32[(0 + 102548 | 0) >> 2] | 0; $2_1 = ($0_1 + 7 | 0) & -8 | 0; $0_1 = $1_1 + $2_1 | 0; label$1 : { @@ -61228,21 +61589,21 @@ function asmFunc(imports) { } } label$3 : { - if ($0_1 >>> 0 <= ($813() | 0) >>> 0) { + if ($0_1 >>> 0 <= ($814() | 0) >>> 0) { break label$3 } if (!(fimport$5($0_1 | 0) | 0)) { break label$1 } } - HEAP32[(0 + 101972 | 0) >> 2] = $0_1; + HEAP32[(0 + 102548 | 0) >> 2] = $0_1; return $1_1 | 0; } - HEAP32[($721() | 0) >> 2] = 48; + HEAP32[($722() | 0) >> 2] = 48; return -1 | 0; } - function $815($0_1) { + function $816($0_1) { $0_1 = $0_1 | 0; var $4_1 = 0, $5_1 = 0, $7_1 = 0, $8_1 = 0, $3_1 = 0, $2_1 = 0, $11_1 = 0, $6_1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $10_1 = 0, i64toi32_i32$2 = 0, $1_1 = 0, $9_1 = 0, $79_1 = 0, $184_1 = 0, $782_1 = 0, $784_1 = 0; $1_1 = global$0 - 16 | 0; @@ -61261,7 +61622,7 @@ function asmFunc(imports) { break label$10 } label$11 : { - $2_1 = HEAP32[(0 + 103316 | 0) >> 2] | 0; + $2_1 = HEAP32[(0 + 103892 | 0) >> 2] | 0; $3_1 = $0_1 >>> 0 < 11 >>> 0 ? 16 : ($0_1 + 11 | 0) & -8 | 0; $4_1 = $3_1 >>> 3 | 0; $0_1 = $2_1 >>> $4_1 | 0; @@ -61272,13 +61633,13 @@ function asmFunc(imports) { label$13 : { $5_1 = (($0_1 ^ -1 | 0) & 1 | 0) + $4_1 | 0; $4_1 = $5_1 << 3 | 0; - $0_1 = $4_1 + 103356 | 0; - $4_1 = HEAP32[($4_1 + 103364 | 0) >> 2] | 0; + $0_1 = $4_1 + 103932 | 0; + $4_1 = HEAP32[($4_1 + 103940 | 0) >> 2] | 0; $3_1 = HEAP32[($4_1 + 8 | 0) >> 2] | 0; if (($0_1 | 0) != ($3_1 | 0)) { break label$13 } - HEAP32[(0 + 103316 | 0) >> 2] = $2_1 & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 103892 | 0) >> 2] = $2_1 & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; break label$12; } HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; @@ -61291,7 +61652,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 4 | 0) >> 2] = HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 1 | 0; break label$1; } - $6_1 = HEAP32[(0 + 103324 | 0) >> 2] | 0; + $6_1 = HEAP32[(0 + 103900 | 0) >> 2] | 0; if ($3_1 >>> 0 <= $6_1 >>> 0) { break label$9 } @@ -61305,14 +61666,14 @@ function asmFunc(imports) { $0_1 = 2 << $4_1 | 0; $4_1 = __wasm_ctz_i32($79_1 & ($0_1 | (0 - $0_1 | 0) | 0) | 0 | 0) | 0; $0_1 = $4_1 << 3 | 0; - $5_1 = $0_1 + 103356 | 0; - $0_1 = HEAP32[($0_1 + 103364 | 0) >> 2] | 0; + $5_1 = $0_1 + 103932 | 0; + $0_1 = HEAP32[($0_1 + 103940 | 0) >> 2] | 0; $7_1 = HEAP32[($0_1 + 8 | 0) >> 2] | 0; if (($5_1 | 0) != ($7_1 | 0)) { break label$16 } $2_1 = $2_1 & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; - HEAP32[(0 + 103316 | 0) >> 2] = $2_1; + HEAP32[(0 + 103892 | 0) >> 2] = $2_1; break label$15; } HEAP32[($7_1 + 12 | 0) >> 2] = $5_1; @@ -61328,15 +61689,15 @@ function asmFunc(imports) { if (!$6_1) { break label$17 } - $3_1 = ($6_1 & -8 | 0) + 103356 | 0; - $4_1 = HEAP32[(0 + 103336 | 0) >> 2] | 0; + $3_1 = ($6_1 & -8 | 0) + 103932 | 0; + $4_1 = HEAP32[(0 + 103912 | 0) >> 2] | 0; label$18 : { label$19 : { $8_1 = 1 << ($6_1 >>> 3 | 0) | 0; if ($2_1 & $8_1 | 0) { break label$19 } - HEAP32[(0 + 103316 | 0) >> 2] = $2_1 | $8_1 | 0; + HEAP32[(0 + 103892 | 0) >> 2] = $2_1 | $8_1 | 0; $8_1 = $3_1; break label$18; } @@ -61348,15 +61709,15 @@ function asmFunc(imports) { HEAP32[($4_1 + 8 | 0) >> 2] = $8_1; } $0_1 = $0_1 + 8 | 0; - HEAP32[(0 + 103336 | 0) >> 2] = $7_1; - HEAP32[(0 + 103324 | 0) >> 2] = $5_1; + HEAP32[(0 + 103912 | 0) >> 2] = $7_1; + HEAP32[(0 + 103900 | 0) >> 2] = $5_1; break label$1; } - $9_1 = HEAP32[(0 + 103320 | 0) >> 2] | 0; + $9_1 = HEAP32[(0 + 103896 | 0) >> 2] | 0; if (!$9_1) { break label$9 } - $7_1 = HEAP32[(((__wasm_ctz_i32($9_1 | 0) | 0) << 2 | 0) + 103620 | 0) >> 2] | 0; + $7_1 = HEAP32[(((__wasm_ctz_i32($9_1 | 0) | 0) << 2 | 0) + 104196 | 0) >> 2] | 0; $4_1 = ((HEAP32[($7_1 + 4 | 0) >> 2] | 0) & -8 | 0) - $3_1 | 0; $5_1 = $7_1; label$20 : { @@ -61387,7 +61748,7 @@ function asmFunc(imports) { break label$23 } $0_1 = HEAP32[($7_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 103332 | 0) >> 2] | 0; + HEAP32[(0 + 103908 | 0) >> 2] | 0; HEAP32[($0_1 + 12 | 0) >> 2] = $8_1; HEAP32[($8_1 + 8 | 0) >> 2] = $0_1; break label$2; @@ -61428,7 +61789,7 @@ function asmFunc(imports) { } $0_1 = $0_1 + 11 | 0; $3_1 = $0_1 & -8 | 0; - $6_1 = HEAP32[(0 + 103320 | 0) >> 2] | 0; + $6_1 = HEAP32[(0 + 103896 | 0) >> 2] | 0; if (!$6_1) { break label$9 } @@ -61449,7 +61810,7 @@ function asmFunc(imports) { label$28 : { label$29 : { label$30 : { - $5_1 = HEAP32[(($11_1 << 2 | 0) + 103620 | 0) >> 2] | 0; + $5_1 = HEAP32[(($11_1 << 2 | 0) + 104196 | 0) >> 2] | 0; if ($5_1) { break label$30 } @@ -61496,7 +61857,7 @@ function asmFunc(imports) { if (!$0_1) { break label$9 } - $0_1 = HEAP32[(((__wasm_ctz_i32($0_1 | 0) | 0) << 2 | 0) + 103620 | 0) >> 2] | 0; + $0_1 = HEAP32[(((__wasm_ctz_i32($0_1 | 0) | 0) << 2 | 0) + 104196 | 0) >> 2] | 0; } if (!$0_1) { break label$27 @@ -61524,7 +61885,7 @@ function asmFunc(imports) { if (!$8_1) { break label$9 } - if ($4_1 >>> 0 >= ((HEAP32[(0 + 103324 | 0) >> 2] | 0) - $3_1 | 0) >>> 0) { + if ($4_1 >>> 0 >= ((HEAP32[(0 + 103900 | 0) >> 2] | 0) - $3_1 | 0) >>> 0) { break label$9 } $11_1 = HEAP32[($8_1 + 24 | 0) >> 2] | 0; @@ -61534,7 +61895,7 @@ function asmFunc(imports) { break label$36 } $0_1 = HEAP32[($8_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 103332 | 0) >> 2] | 0; + HEAP32[(0 + 103908 | 0) >> 2] | 0; HEAP32[($0_1 + 12 | 0) >> 2] = $7_1; HEAP32[($7_1 + 8 | 0) >> 2] = $0_1; break label$3; @@ -61570,11 +61931,11 @@ function asmFunc(imports) { break label$3; } label$39 : { - $0_1 = HEAP32[(0 + 103324 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 103900 | 0) >> 2] | 0; if ($0_1 >>> 0 < $3_1 >>> 0) { break label$39 } - $4_1 = HEAP32[(0 + 103336 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 103912 | 0) >> 2] | 0; label$40 : { label$41 : { $5_1 = $0_1 - $3_1 | 0; @@ -61593,21 +61954,21 @@ function asmFunc(imports) { $7_1 = 0; $5_1 = 0; } - HEAP32[(0 + 103324 | 0) >> 2] = $5_1; - HEAP32[(0 + 103336 | 0) >> 2] = $7_1; + HEAP32[(0 + 103900 | 0) >> 2] = $5_1; + HEAP32[(0 + 103912 | 0) >> 2] = $7_1; $0_1 = $4_1 + 8 | 0; break label$1; } label$42 : { - $7_1 = HEAP32[(0 + 103328 | 0) >> 2] | 0; + $7_1 = HEAP32[(0 + 103904 | 0) >> 2] | 0; if ($7_1 >>> 0 <= $3_1 >>> 0) { break label$42 } $4_1 = $7_1 - $3_1 | 0; - HEAP32[(0 + 103328 | 0) >> 2] = $4_1; - $0_1 = HEAP32[(0 + 103340 | 0) >> 2] | 0; + HEAP32[(0 + 103904 | 0) >> 2] = $4_1; + $0_1 = HEAP32[(0 + 103916 | 0) >> 2] | 0; $5_1 = $0_1 + $3_1 | 0; - HEAP32[(0 + 103340 | 0) >> 2] = $5_1; + HEAP32[(0 + 103916 | 0) >> 2] = $5_1; HEAP32[($5_1 + 4 | 0) >> 2] = $4_1 | 1 | 0; HEAP32[($0_1 + 4 | 0) >> 2] = $3_1 | 3 | 0; $0_1 = $0_1 + 8 | 0; @@ -61615,23 +61976,23 @@ function asmFunc(imports) { } label$43 : { label$44 : { - if (!(HEAP32[(0 + 103788 | 0) >> 2] | 0)) { + if (!(HEAP32[(0 + 104364 | 0) >> 2] | 0)) { break label$44 } - $4_1 = HEAP32[(0 + 103796 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 104372 | 0) >> 2] | 0; break label$43; } i64toi32_i32$1 = 0; i64toi32_i32$0 = -1; - HEAP32[(i64toi32_i32$1 + 103800 | 0) >> 2] = -1; - HEAP32[(i64toi32_i32$1 + 103804 | 0) >> 2] = i64toi32_i32$0; + HEAP32[(i64toi32_i32$1 + 104376 | 0) >> 2] = -1; + HEAP32[(i64toi32_i32$1 + 104380 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = 0; i64toi32_i32$0 = 4096; - HEAP32[(i64toi32_i32$1 + 103792 | 0) >> 2] = 4096; - HEAP32[(i64toi32_i32$1 + 103796 | 0) >> 2] = i64toi32_i32$0; - HEAP32[(0 + 103788 | 0) >> 2] = (($1_1 + 12 | 0) & -16 | 0) ^ 1431655768 | 0; - HEAP32[(0 + 103808 | 0) >> 2] = 0; - HEAP32[(0 + 103760 | 0) >> 2] = 0; + HEAP32[(i64toi32_i32$1 + 104368 | 0) >> 2] = 4096; + HEAP32[(i64toi32_i32$1 + 104372 | 0) >> 2] = i64toi32_i32$0; + HEAP32[(0 + 104364 | 0) >> 2] = (($1_1 + 12 | 0) & -16 | 0) ^ 1431655768 | 0; + HEAP32[(0 + 104384 | 0) >> 2] = 0; + HEAP32[(0 + 104336 | 0) >> 2] = 0; $4_1 = 4096; } $0_1 = 0; @@ -61644,11 +62005,11 @@ function asmFunc(imports) { } $0_1 = 0; label$45 : { - $4_1 = HEAP32[(0 + 103756 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 104332 | 0) >> 2] | 0; if (!$4_1) { break label$45 } - $5_1 = HEAP32[(0 + 103748 | 0) >> 2] | 0; + $5_1 = HEAP32[(0 + 104324 | 0) >> 2] | 0; $10_1 = $5_1 + $8_1 | 0; if ($10_1 >>> 0 <= $5_1 >>> 0) { break label$1 @@ -61659,7 +62020,7 @@ function asmFunc(imports) { } label$46 : { label$47 : { - if ((HEAPU8[(0 + 103760 | 0) >> 0] | 0) & 4 | 0) { + if ((HEAPU8[(0 + 104336 | 0) >> 0] | 0) & 4 | 0) { break label$47 } label$48 : { @@ -61667,11 +62028,11 @@ function asmFunc(imports) { label$50 : { label$51 : { label$52 : { - $4_1 = HEAP32[(0 + 103340 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 103916 | 0) >> 2] | 0; if (!$4_1) { break label$52 } - $0_1 = 103764; + $0_1 = 104340; label$53 : while (1) { label$54 : { $5_1 = HEAP32[$0_1 >> 2] | 0; @@ -61689,13 +62050,13 @@ function asmFunc(imports) { break label$53; }; } - $7_1 = $814(0 | 0) | 0; + $7_1 = $815(0 | 0) | 0; if (($7_1 | 0) == (-1 | 0)) { break label$48 } $2_1 = $8_1; label$55 : { - $0_1 = HEAP32[(0 + 103792 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 104368 | 0) >> 2] | 0; $4_1 = $0_1 + -1 | 0; if (!($4_1 & $7_1 | 0)) { break label$55 @@ -61706,11 +62067,11 @@ function asmFunc(imports) { break label$48 } label$56 : { - $0_1 = HEAP32[(0 + 103756 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 104332 | 0) >> 2] | 0; if (!$0_1) { break label$56 } - $4_1 = HEAP32[(0 + 103748 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 104324 | 0) >> 2] | 0; $5_1 = $4_1 + $2_1 | 0; if ($5_1 >>> 0 <= $4_1 >>> 0) { break label$48 @@ -61719,14 +62080,14 @@ function asmFunc(imports) { break label$48 } } - $0_1 = $814($2_1 | 0) | 0; + $0_1 = $815($2_1 | 0) | 0; if (($0_1 | 0) != ($7_1 | 0)) { break label$50 } break label$46; } $2_1 = ($2_1 - $7_1 | 0) & $11_1 | 0; - $7_1 = $814($2_1 | 0) | 0; + $7_1 = $815($2_1 | 0) | 0; if (($7_1 | 0) == ((HEAP32[$0_1 >> 2] | 0) + (HEAP32[($0_1 + 4 | 0) >> 2] | 0) | 0 | 0)) { break label$49 } @@ -61742,9 +62103,9 @@ function asmFunc(imports) { $7_1 = $0_1; break label$46; } - $4_1 = HEAP32[(0 + 103796 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 104372 | 0) >> 2] | 0; $4_1 = (($6_1 - $2_1 | 0) + $4_1 | 0) & (0 - $4_1 | 0) | 0; - if (($814($4_1 | 0) | 0 | 0) == (-1 | 0)) { + if (($815($4_1 | 0) | 0 | 0) == (-1 | 0)) { break label$48 } $2_1 = $4_1 + $2_1 | 0; @@ -61755,10 +62116,10 @@ function asmFunc(imports) { break label$46 } } - HEAP32[(0 + 103760 | 0) >> 2] = HEAP32[(0 + 103760 | 0) >> 2] | 0 | 4 | 0; + HEAP32[(0 + 104336 | 0) >> 2] = HEAP32[(0 + 104336 | 0) >> 2] | 0 | 4 | 0; } - $7_1 = $814($8_1 | 0) | 0; - $0_1 = $814(0 | 0) | 0; + $7_1 = $815($8_1 | 0) | 0; + $0_1 = $815(0 | 0) | 0; if (($7_1 | 0) == (-1 | 0)) { break label$4 } @@ -61773,21 +62134,21 @@ function asmFunc(imports) { break label$4 } } - $0_1 = (HEAP32[(0 + 103748 | 0) >> 2] | 0) + $2_1 | 0; - HEAP32[(0 + 103748 | 0) >> 2] = $0_1; + $0_1 = (HEAP32[(0 + 104324 | 0) >> 2] | 0) + $2_1 | 0; + HEAP32[(0 + 104324 | 0) >> 2] = $0_1; label$58 : { - if ($0_1 >>> 0 <= (HEAP32[(0 + 103752 | 0) >> 2] | 0) >>> 0) { + if ($0_1 >>> 0 <= (HEAP32[(0 + 104328 | 0) >> 2] | 0) >>> 0) { break label$58 } - HEAP32[(0 + 103752 | 0) >> 2] = $0_1; + HEAP32[(0 + 104328 | 0) >> 2] = $0_1; } label$59 : { label$60 : { - $4_1 = HEAP32[(0 + 103340 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 103916 | 0) >> 2] | 0; if (!$4_1) { break label$60 } - $0_1 = 103764; + $0_1 = 104340; label$61 : while (1) { $5_1 = HEAP32[$0_1 >> 2] | 0; $8_1 = HEAP32[($0_1 + 4 | 0) >> 2] | 0; @@ -61803,7 +62164,7 @@ function asmFunc(imports) { } label$62 : { label$63 : { - $0_1 = HEAP32[(0 + 103332 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 103908 | 0) >> 2] | 0; if (!$0_1) { break label$63 } @@ -61811,19 +62172,19 @@ function asmFunc(imports) { break label$62 } } - HEAP32[(0 + 103332 | 0) >> 2] = $7_1; + HEAP32[(0 + 103908 | 0) >> 2] = $7_1; } $0_1 = 0; - HEAP32[(0 + 103768 | 0) >> 2] = $2_1; - HEAP32[(0 + 103764 | 0) >> 2] = $7_1; - HEAP32[(0 + 103348 | 0) >> 2] = -1; - HEAP32[(0 + 103352 | 0) >> 2] = HEAP32[(0 + 103788 | 0) >> 2] | 0; - HEAP32[(0 + 103776 | 0) >> 2] = 0; + HEAP32[(0 + 104344 | 0) >> 2] = $2_1; + HEAP32[(0 + 104340 | 0) >> 2] = $7_1; + HEAP32[(0 + 103924 | 0) >> 2] = -1; + HEAP32[(0 + 103928 | 0) >> 2] = HEAP32[(0 + 104364 | 0) >> 2] | 0; + HEAP32[(0 + 104352 | 0) >> 2] = 0; label$64 : while (1) { $4_1 = $0_1 << 3 | 0; - $5_1 = $4_1 + 103356 | 0; - HEAP32[($4_1 + 103364 | 0) >> 2] = $5_1; - HEAP32[($4_1 + 103368 | 0) >> 2] = $5_1; + $5_1 = $4_1 + 103932 | 0; + HEAP32[($4_1 + 103940 | 0) >> 2] = $5_1; + HEAP32[($4_1 + 103944 | 0) >> 2] = $5_1; $0_1 = $0_1 + 1 | 0; if (($0_1 | 0) != (32 | 0)) { continue label$64 @@ -61833,12 +62194,12 @@ function asmFunc(imports) { $0_1 = $2_1 + -40 | 0; $4_1 = (-8 - $7_1 | 0) & 7 | 0; $5_1 = $0_1 - $4_1 | 0; - HEAP32[(0 + 103328 | 0) >> 2] = $5_1; + HEAP32[(0 + 103904 | 0) >> 2] = $5_1; $4_1 = $7_1 + $4_1 | 0; - HEAP32[(0 + 103340 | 0) >> 2] = $4_1; + HEAP32[(0 + 103916 | 0) >> 2] = $4_1; HEAP32[($4_1 + 4 | 0) >> 2] = $5_1 | 1 | 0; HEAP32[(($7_1 + $0_1 | 0) + 4 | 0) >> 2] = 40; - HEAP32[(0 + 103344 | 0) >> 2] = HEAP32[(0 + 103804 | 0) >> 2] | 0; + HEAP32[(0 + 103920 | 0) >> 2] = HEAP32[(0 + 104380 | 0) >> 2] | 0; break label$5; } if ($4_1 >>> 0 >= $7_1 >>> 0) { @@ -61853,13 +62214,13 @@ function asmFunc(imports) { HEAP32[($0_1 + 4 | 0) >> 2] = $8_1 + $2_1 | 0; $0_1 = (-8 - $4_1 | 0) & 7 | 0; $5_1 = $4_1 + $0_1 | 0; - HEAP32[(0 + 103340 | 0) >> 2] = $5_1; - $7_1 = (HEAP32[(0 + 103328 | 0) >> 2] | 0) + $2_1 | 0; + HEAP32[(0 + 103916 | 0) >> 2] = $5_1; + $7_1 = (HEAP32[(0 + 103904 | 0) >> 2] | 0) + $2_1 | 0; $0_1 = $7_1 - $0_1 | 0; - HEAP32[(0 + 103328 | 0) >> 2] = $0_1; + HEAP32[(0 + 103904 | 0) >> 2] = $0_1; HEAP32[($5_1 + 4 | 0) >> 2] = $0_1 | 1 | 0; HEAP32[(($4_1 + $7_1 | 0) + 4 | 0) >> 2] = 40; - HEAP32[(0 + 103344 | 0) >> 2] = HEAP32[(0 + 103804 | 0) >> 2] | 0; + HEAP32[(0 + 103920 | 0) >> 2] = HEAP32[(0 + 104380 | 0) >> 2] | 0; break label$5; } $8_1 = 0; @@ -61869,13 +62230,13 @@ function asmFunc(imports) { break label$3; } label$65 : { - if ($7_1 >>> 0 >= (HEAP32[(0 + 103332 | 0) >> 2] | 0) >>> 0) { + if ($7_1 >>> 0 >= (HEAP32[(0 + 103908 | 0) >> 2] | 0) >>> 0) { break label$65 } - HEAP32[(0 + 103332 | 0) >> 2] = $7_1; + HEAP32[(0 + 103908 | 0) >> 2] = $7_1; } $5_1 = $7_1 + $2_1 | 0; - $0_1 = 103764; + $0_1 = 104340; label$66 : { label$67 : { label$68 : { @@ -61895,7 +62256,7 @@ function asmFunc(imports) { break label$67 } } - $0_1 = 103764; + $0_1 = 104340; label$71 : { label$72 : while (1) { label$73 : { @@ -61915,33 +62276,33 @@ function asmFunc(imports) { $0_1 = $2_1 + -40 | 0; $8_1 = (-8 - $7_1 | 0) & 7 | 0; $11_1 = $0_1 - $8_1 | 0; - HEAP32[(0 + 103328 | 0) >> 2] = $11_1; + HEAP32[(0 + 103904 | 0) >> 2] = $11_1; $8_1 = $7_1 + $8_1 | 0; - HEAP32[(0 + 103340 | 0) >> 2] = $8_1; + HEAP32[(0 + 103916 | 0) >> 2] = $8_1; HEAP32[($8_1 + 4 | 0) >> 2] = $11_1 | 1 | 0; HEAP32[(($7_1 + $0_1 | 0) + 4 | 0) >> 2] = 40; - HEAP32[(0 + 103344 | 0) >> 2] = HEAP32[(0 + 103804 | 0) >> 2] | 0; + HEAP32[(0 + 103920 | 0) >> 2] = HEAP32[(0 + 104380 | 0) >> 2] | 0; $0_1 = ($5_1 + ((39 - $5_1 | 0) & 7 | 0) | 0) + -47 | 0; $8_1 = $0_1 >>> 0 < ($4_1 + 16 | 0) >>> 0 ? $4_1 : $0_1; HEAP32[($8_1 + 4 | 0) >> 2] = 27; i64toi32_i32$2 = 0; - i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 103772 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 103776 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 104348 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 104352 | 0) >> 2] | 0; $782_1 = i64toi32_i32$0; i64toi32_i32$0 = $8_1 + 16 | 0; HEAP32[i64toi32_i32$0 >> 2] = $782_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; i64toi32_i32$2 = 0; - i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 103764 | 0) >> 2] | 0; - i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 103768 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 104340 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 104344 | 0) >> 2] | 0; $784_1 = i64toi32_i32$1; i64toi32_i32$1 = $8_1; HEAP32[($8_1 + 8 | 0) >> 2] = $784_1; HEAP32[($8_1 + 12 | 0) >> 2] = i64toi32_i32$0; - HEAP32[(0 + 103772 | 0) >> 2] = $8_1 + 8 | 0; - HEAP32[(0 + 103768 | 0) >> 2] = $2_1; - HEAP32[(0 + 103764 | 0) >> 2] = $7_1; - HEAP32[(0 + 103776 | 0) >> 2] = 0; + HEAP32[(0 + 104348 | 0) >> 2] = $8_1 + 8 | 0; + HEAP32[(0 + 104344 | 0) >> 2] = $2_1; + HEAP32[(0 + 104340 | 0) >> 2] = $7_1; + HEAP32[(0 + 104352 | 0) >> 2] = 0; $0_1 = $8_1 + 24 | 0; label$74 : while (1) { HEAP32[($0_1 + 4 | 0) >> 2] = 7; @@ -61963,15 +62324,15 @@ function asmFunc(imports) { if ($7_1 >>> 0 > 255 >>> 0) { break label$75 } - $0_1 = ($7_1 & -8 | 0) + 103356 | 0; + $0_1 = ($7_1 & -8 | 0) + 103932 | 0; label$76 : { label$77 : { - $5_1 = HEAP32[(0 + 103316 | 0) >> 2] | 0; + $5_1 = HEAP32[(0 + 103892 | 0) >> 2] | 0; $7_1 = 1 << ($7_1 >>> 3 | 0) | 0; if ($5_1 & $7_1 | 0) { break label$77 } - HEAP32[(0 + 103316 | 0) >> 2] = $5_1 | $7_1 | 0; + HEAP32[(0 + 103892 | 0) >> 2] = $5_1 | $7_1 | 0; $5_1 = $0_1; break label$76; } @@ -61996,15 +62357,15 @@ function asmFunc(imports) { i64toi32_i32$0 = 0; HEAP32[($4_1 + 16 | 0) >> 2] = 0; HEAP32[($4_1 + 20 | 0) >> 2] = i64toi32_i32$0; - $5_1 = ($0_1 << 2 | 0) + 103620 | 0; + $5_1 = ($0_1 << 2 | 0) + 104196 | 0; label$79 : { label$80 : { - $8_1 = HEAP32[(0 + 103320 | 0) >> 2] | 0; + $8_1 = HEAP32[(0 + 103896 | 0) >> 2] | 0; $2_1 = 1 << $0_1 | 0; if ($8_1 & $2_1 | 0) { break label$80 } - HEAP32[(0 + 103320 | 0) >> 2] = $8_1 | $2_1 | 0; + HEAP32[(0 + 103896 | 0) >> 2] = $8_1 | $2_1 | 0; HEAP32[$5_1 >> 2] = $4_1; HEAP32[($4_1 + 24 | 0) >> 2] = $5_1; break label$79; @@ -62034,7 +62395,7 @@ function asmFunc(imports) { } HEAP32[$0_1 >> 2] = $7_1; HEAP32[($0_1 + 4 | 0) >> 2] = (HEAP32[($0_1 + 4 | 0) >> 2] | 0) + $2_1 | 0; - $0_1 = $816($7_1 | 0, $5_1 | 0, $3_1 | 0) | 0; + $0_1 = $817($7_1 | 0, $5_1 | 0, $3_1 | 0) | 0; break label$1; } $0_1 = HEAP32[($5_1 + 8 | 0) >> 2] | 0; @@ -62044,21 +62405,21 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = $5_1; HEAP32[($4_1 + 8 | 0) >> 2] = $0_1; } - $0_1 = HEAP32[(0 + 103328 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 103904 | 0) >> 2] | 0; if ($0_1 >>> 0 <= $3_1 >>> 0) { break label$4 } $4_1 = $0_1 - $3_1 | 0; - HEAP32[(0 + 103328 | 0) >> 2] = $4_1; - $0_1 = HEAP32[(0 + 103340 | 0) >> 2] | 0; + HEAP32[(0 + 103904 | 0) >> 2] = $4_1; + $0_1 = HEAP32[(0 + 103916 | 0) >> 2] | 0; $5_1 = $0_1 + $3_1 | 0; - HEAP32[(0 + 103340 | 0) >> 2] = $5_1; + HEAP32[(0 + 103916 | 0) >> 2] = $5_1; HEAP32[($5_1 + 4 | 0) >> 2] = $4_1 | 1 | 0; HEAP32[($0_1 + 4 | 0) >> 2] = $3_1 | 3 | 0; $0_1 = $0_1 + 8 | 0; break label$1; } - HEAP32[($721() | 0) >> 2] = 48; + HEAP32[($722() | 0) >> 2] = 48; $0_1 = 0; break label$1; } @@ -62069,7 +62430,7 @@ function asmFunc(imports) { label$83 : { label$84 : { $5_1 = HEAP32[($8_1 + 28 | 0) >> 2] | 0; - $0_1 = ($5_1 << 2 | 0) + 103620 | 0; + $0_1 = ($5_1 << 2 | 0) + 104196 | 0; if (($8_1 | 0) != (HEAP32[$0_1 >> 2] | 0 | 0)) { break label$84 } @@ -62078,7 +62439,7 @@ function asmFunc(imports) { break label$83 } $6_1 = $6_1 & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; - HEAP32[(0 + 103320 | 0) >> 2] = $6_1; + HEAP32[(0 + 103896 | 0) >> 2] = $6_1; break label$82; } HEAP32[($11_1 + ((HEAP32[($11_1 + 16 | 0) >> 2] | 0 | 0) == ($8_1 | 0) ? 16 : 20) | 0) >> 2] = $7_1; @@ -62121,15 +62482,15 @@ function asmFunc(imports) { if ($4_1 >>> 0 > 255 >>> 0) { break label$88 } - $0_1 = ($4_1 & -8 | 0) + 103356 | 0; + $0_1 = ($4_1 & -8 | 0) + 103932 | 0; label$89 : { label$90 : { - $5_1 = HEAP32[(0 + 103316 | 0) >> 2] | 0; + $5_1 = HEAP32[(0 + 103892 | 0) >> 2] | 0; $4_1 = 1 << ($4_1 >>> 3 | 0) | 0; if ($5_1 & $4_1 | 0) { break label$90 } - HEAP32[(0 + 103316 | 0) >> 2] = $5_1 | $4_1 | 0; + HEAP32[(0 + 103892 | 0) >> 2] = $5_1 | $4_1 | 0; $4_1 = $0_1; break label$89; } @@ -62154,7 +62515,7 @@ function asmFunc(imports) { i64toi32_i32$0 = 0; HEAP32[($7_1 + 16 | 0) >> 2] = 0; HEAP32[($7_1 + 20 | 0) >> 2] = i64toi32_i32$0; - $5_1 = ($0_1 << 2 | 0) + 103620 | 0; + $5_1 = ($0_1 << 2 | 0) + 104196 | 0; label$92 : { label$93 : { label$94 : { @@ -62162,7 +62523,7 @@ function asmFunc(imports) { if ($6_1 & $3_1 | 0) { break label$94 } - HEAP32[(0 + 103320 | 0) >> 2] = $6_1 | $3_1 | 0; + HEAP32[(0 + 103896 | 0) >> 2] = $6_1 | $3_1 | 0; HEAP32[$5_1 >> 2] = $7_1; HEAP32[($7_1 + 24 | 0) >> 2] = $5_1; break label$93; @@ -62207,7 +62568,7 @@ function asmFunc(imports) { label$97 : { label$98 : { $5_1 = HEAP32[($7_1 + 28 | 0) >> 2] | 0; - $0_1 = ($5_1 << 2 | 0) + 103620 | 0; + $0_1 = ($5_1 << 2 | 0) + 104196 | 0; if (($7_1 | 0) != (HEAP32[$0_1 >> 2] | 0 | 0)) { break label$98 } @@ -62215,7 +62576,7 @@ function asmFunc(imports) { if ($8_1) { break label$97 } - HEAP32[(0 + 103320 | 0) >> 2] = $9_1 & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 103896 | 0) >> 2] = $9_1 & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; break label$96; } HEAP32[($10_1 + ((HEAP32[($10_1 + 16 | 0) >> 2] | 0 | 0) == ($7_1 | 0) ? 16 : 20) | 0) >> 2] = $8_1; @@ -62258,15 +62619,15 @@ function asmFunc(imports) { if (!$6_1) { break label$102 } - $3_1 = ($6_1 & -8 | 0) + 103356 | 0; - $0_1 = HEAP32[(0 + 103336 | 0) >> 2] | 0; + $3_1 = ($6_1 & -8 | 0) + 103932 | 0; + $0_1 = HEAP32[(0 + 103912 | 0) >> 2] | 0; label$103 : { label$104 : { $8_1 = 1 << ($6_1 >>> 3 | 0) | 0; if ($8_1 & $2_1 | 0) { break label$104 } - HEAP32[(0 + 103316 | 0) >> 2] = $8_1 | $2_1 | 0; + HEAP32[(0 + 103892 | 0) >> 2] = $8_1 | $2_1 | 0; $8_1 = $3_1; break label$103; } @@ -62277,8 +62638,8 @@ function asmFunc(imports) { HEAP32[($0_1 + 12 | 0) >> 2] = $3_1; HEAP32[($0_1 + 8 | 0) >> 2] = $8_1; } - HEAP32[(0 + 103336 | 0) >> 2] = $5_1; - HEAP32[(0 + 103324 | 0) >> 2] = $4_1; + HEAP32[(0 + 103912 | 0) >> 2] = $5_1; + HEAP32[(0 + 103900 | 0) >> 2] = $4_1; } $0_1 = $7_1 + 8 | 0; } @@ -62286,7 +62647,7 @@ function asmFunc(imports) { return $0_1 | 0; } - function $816($0_1, $1_1, $2_1) { + function $817($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -62298,22 +62659,22 @@ function asmFunc(imports) { $2_1 = $4_1 - $5_1 | 0; label$1 : { label$2 : { - if (($4_1 | 0) != (HEAP32[(0 + 103340 | 0) >> 2] | 0 | 0)) { + if (($4_1 | 0) != (HEAP32[(0 + 103916 | 0) >> 2] | 0 | 0)) { break label$2 } - HEAP32[(0 + 103340 | 0) >> 2] = $5_1; - $2_1 = (HEAP32[(0 + 103328 | 0) >> 2] | 0) + $2_1 | 0; - HEAP32[(0 + 103328 | 0) >> 2] = $2_1; + HEAP32[(0 + 103916 | 0) >> 2] = $5_1; + $2_1 = (HEAP32[(0 + 103904 | 0) >> 2] | 0) + $2_1 | 0; + HEAP32[(0 + 103904 | 0) >> 2] = $2_1; HEAP32[($5_1 + 4 | 0) >> 2] = $2_1 | 1 | 0; break label$1; } label$3 : { - if (($4_1 | 0) != (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($4_1 | 0) != (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$3 } - HEAP32[(0 + 103336 | 0) >> 2] = $5_1; - $2_1 = (HEAP32[(0 + 103324 | 0) >> 2] | 0) + $2_1 | 0; - HEAP32[(0 + 103324 | 0) >> 2] = $2_1; + HEAP32[(0 + 103912 | 0) >> 2] = $5_1; + $2_1 = (HEAP32[(0 + 103900 | 0) >> 2] | 0) + $2_1 | 0; + HEAP32[(0 + 103900 | 0) >> 2] = $2_1; HEAP32[($5_1 + 4 | 0) >> 2] = $2_1 | 1 | 0; HEAP32[($5_1 + $2_1 | 0) >> 2] = $2_1; break label$1; @@ -62331,13 +62692,13 @@ function asmFunc(imports) { } $1_1 = HEAP32[($4_1 + 8 | 0) >> 2] | 0; $7_1 = $0_1 >>> 3 | 0; - $8_1 = ($7_1 << 3 | 0) + 103356 | 0; + $8_1 = ($7_1 << 3 | 0) + 103932 | 0; label$7 : { $0_1 = HEAP32[($4_1 + 12 | 0) >> 2] | 0; if (($0_1 | 0) != ($1_1 | 0)) { break label$7 } - HEAP32[(0 + 103316 | 0) >> 2] = (HEAP32[(0 + 103316 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $7_1 | 0) | 0) | 0; + HEAP32[(0 + 103892 | 0) >> 2] = (HEAP32[(0 + 103892 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $7_1 | 0) | 0) | 0; break label$5; } HEAP32[($1_1 + 12 | 0) >> 2] = $0_1; @@ -62352,7 +62713,7 @@ function asmFunc(imports) { break label$9 } $0_1 = HEAP32[($4_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 103332 | 0) >> 2] | 0; + HEAP32[(0 + 103908 | 0) >> 2] | 0; HEAP32[($0_1 + 12 | 0) >> 2] = $8_1; HEAP32[($8_1 + 8 | 0) >> 2] = $0_1; break label$8; @@ -62396,7 +62757,7 @@ function asmFunc(imports) { label$13 : { label$14 : { $1_1 = HEAP32[($4_1 + 28 | 0) >> 2] | 0; - $0_1 = ($1_1 << 2 | 0) + 103620 | 0; + $0_1 = ($1_1 << 2 | 0) + 104196 | 0; if (($4_1 | 0) != (HEAP32[$0_1 >> 2] | 0 | 0)) { break label$14 } @@ -62404,7 +62765,7 @@ function asmFunc(imports) { if ($8_1) { break label$13 } - HEAP32[(0 + 103320 | 0) >> 2] = (HEAP32[(0 + 103320 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $1_1 | 0) | 0) | 0; + HEAP32[(0 + 103896 | 0) >> 2] = (HEAP32[(0 + 103896 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $1_1 | 0) | 0) | 0; break label$5; } HEAP32[($9_1 + ((HEAP32[($9_1 + 16 | 0) >> 2] | 0 | 0) == ($4_1 | 0) ? 16 : 20) | 0) >> 2] = $8_1; @@ -62439,15 +62800,15 @@ function asmFunc(imports) { if ($2_1 >>> 0 > 255 >>> 0) { break label$16 } - $0_1 = ($2_1 & -8 | 0) + 103356 | 0; + $0_1 = ($2_1 & -8 | 0) + 103932 | 0; label$17 : { label$18 : { - $1_1 = HEAP32[(0 + 103316 | 0) >> 2] | 0; + $1_1 = HEAP32[(0 + 103892 | 0) >> 2] | 0; $2_1 = 1 << ($2_1 >>> 3 | 0) | 0; if ($1_1 & $2_1 | 0) { break label$18 } - HEAP32[(0 + 103316 | 0) >> 2] = $1_1 | $2_1 | 0; + HEAP32[(0 + 103892 | 0) >> 2] = $1_1 | $2_1 | 0; $2_1 = $0_1; break label$17; } @@ -62470,16 +62831,16 @@ function asmFunc(imports) { HEAP32[($5_1 + 28 | 0) >> 2] = $0_1; HEAP32[($5_1 + 16 | 0) >> 2] = 0; HEAP32[($5_1 + 20 | 0) >> 2] = 0; - $1_1 = ($0_1 << 2 | 0) + 103620 | 0; + $1_1 = ($0_1 << 2 | 0) + 104196 | 0; label$20 : { label$21 : { label$22 : { - $8_1 = HEAP32[(0 + 103320 | 0) >> 2] | 0; + $8_1 = HEAP32[(0 + 103896 | 0) >> 2] | 0; $4_1 = 1 << $0_1 | 0; if ($8_1 & $4_1 | 0) { break label$22 } - HEAP32[(0 + 103320 | 0) >> 2] = $8_1 | $4_1 | 0; + HEAP32[(0 + 103896 | 0) >> 2] = $8_1 | $4_1 | 0; HEAP32[$1_1 >> 2] = $5_1; HEAP32[($5_1 + 24 | 0) >> 2] = $1_1; break label$21; @@ -62517,7 +62878,7 @@ function asmFunc(imports) { return $3_1 + 8 | 0 | 0; } - function $817($0_1) { + function $818($0_1) { $0_1 = $0_1 | 0; var $2_1 = 0, $1_1 = 0, $6_1 = 0, $4_1 = 0, $3_1 = 0, $5_1 = 0, $7_1 = 0; label$1 : { @@ -62537,7 +62898,7 @@ function asmFunc(imports) { } $2_1 = HEAP32[$1_1 >> 2] | 0; $1_1 = $1_1 - $2_1 | 0; - $4_1 = HEAP32[(0 + 103332 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 103908 | 0) >> 2] | 0; if ($1_1 >>> 0 < $4_1 >>> 0) { break label$1 } @@ -62545,7 +62906,7 @@ function asmFunc(imports) { label$3 : { label$4 : { label$5 : { - if (($1_1 | 0) == (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($1_1 | 0) == (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$5 } label$6 : { @@ -62554,13 +62915,13 @@ function asmFunc(imports) { } $4_1 = HEAP32[($1_1 + 8 | 0) >> 2] | 0; $5_1 = $2_1 >>> 3 | 0; - $6_1 = ($5_1 << 3 | 0) + 103356 | 0; + $6_1 = ($5_1 << 3 | 0) + 103932 | 0; label$7 : { $2_1 = HEAP32[($1_1 + 12 | 0) >> 2] | 0; if (($2_1 | 0) != ($4_1 | 0)) { break label$7 } - HEAP32[(0 + 103316 | 0) >> 2] = (HEAP32[(0 + 103316 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 103892 | 0) >> 2] = (HEAP32[(0 + 103892 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; break label$2; } HEAP32[($4_1 + 12 | 0) >> 2] = $2_1; @@ -62612,7 +62973,7 @@ function asmFunc(imports) { if (($2_1 & 3 | 0 | 0) != (3 | 0)) { break label$2 } - HEAP32[(0 + 103324 | 0) >> 2] = $0_1; + HEAP32[(0 + 103900 | 0) >> 2] = $0_1; HEAP32[($3_1 + 4 | 0) >> 2] = $2_1 & -2 | 0; HEAP32[($1_1 + 4 | 0) >> 2] = $0_1 | 1 | 0; HEAP32[$3_1 >> 2] = $0_1; @@ -62626,7 +62987,7 @@ function asmFunc(imports) { label$11 : { label$12 : { $4_1 = HEAP32[($1_1 + 28 | 0) >> 2] | 0; - $2_1 = ($4_1 << 2 | 0) + 103620 | 0; + $2_1 = ($4_1 << 2 | 0) + 104196 | 0; if (($1_1 | 0) != (HEAP32[$2_1 >> 2] | 0 | 0)) { break label$12 } @@ -62634,7 +62995,7 @@ function asmFunc(imports) { if ($6_1) { break label$11 } - HEAP32[(0 + 103320 | 0) >> 2] = (HEAP32[(0 + 103320 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 103896 | 0) >> 2] = (HEAP32[(0 + 103896 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; break label$2; } HEAP32[($7_1 + ((HEAP32[($7_1 + 16 | 0) >> 2] | 0 | 0) == ($1_1 | 0) ? 16 : 20) | 0) >> 2] = $6_1; @@ -62674,27 +63035,27 @@ function asmFunc(imports) { break label$18 } label$19 : { - if (($3_1 | 0) != (HEAP32[(0 + 103340 | 0) >> 2] | 0 | 0)) { + if (($3_1 | 0) != (HEAP32[(0 + 103916 | 0) >> 2] | 0 | 0)) { break label$19 } - HEAP32[(0 + 103340 | 0) >> 2] = $1_1; - $0_1 = (HEAP32[(0 + 103328 | 0) >> 2] | 0) + $0_1 | 0; - HEAP32[(0 + 103328 | 0) >> 2] = $0_1; + HEAP32[(0 + 103916 | 0) >> 2] = $1_1; + $0_1 = (HEAP32[(0 + 103904 | 0) >> 2] | 0) + $0_1 | 0; + HEAP32[(0 + 103904 | 0) >> 2] = $0_1; HEAP32[($1_1 + 4 | 0) >> 2] = $0_1 | 1 | 0; - if (($1_1 | 0) != (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($1_1 | 0) != (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$1 } - HEAP32[(0 + 103324 | 0) >> 2] = 0; - HEAP32[(0 + 103336 | 0) >> 2] = 0; + HEAP32[(0 + 103900 | 0) >> 2] = 0; + HEAP32[(0 + 103912 | 0) >> 2] = 0; return; } label$20 : { - if (($3_1 | 0) != (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($3_1 | 0) != (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$20 } - HEAP32[(0 + 103336 | 0) >> 2] = $1_1; - $0_1 = (HEAP32[(0 + 103324 | 0) >> 2] | 0) + $0_1 | 0; - HEAP32[(0 + 103324 | 0) >> 2] = $0_1; + HEAP32[(0 + 103912 | 0) >> 2] = $1_1; + $0_1 = (HEAP32[(0 + 103900 | 0) >> 2] | 0) + $0_1 | 0; + HEAP32[(0 + 103900 | 0) >> 2] = $0_1; HEAP32[($1_1 + 4 | 0) >> 2] = $0_1 | 1 | 0; HEAP32[($1_1 + $0_1 | 0) >> 2] = $0_1; return; @@ -62706,13 +63067,13 @@ function asmFunc(imports) { } $4_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; $5_1 = $2_1 >>> 3 | 0; - $6_1 = ($5_1 << 3 | 0) + 103356 | 0; + $6_1 = ($5_1 << 3 | 0) + 103932 | 0; label$22 : { $2_1 = HEAP32[($3_1 + 12 | 0) >> 2] | 0; if (($2_1 | 0) != ($4_1 | 0)) { break label$22 } - HEAP32[(0 + 103316 | 0) >> 2] = (HEAP32[(0 + 103316 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 103892 | 0) >> 2] = (HEAP32[(0 + 103892 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; break label$15; } HEAP32[($4_1 + 12 | 0) >> 2] = $2_1; @@ -62726,7 +63087,7 @@ function asmFunc(imports) { break label$23 } $2_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 103332 | 0) >> 2] | 0; + HEAP32[(0 + 103908 | 0) >> 2] | 0; HEAP32[($2_1 + 12 | 0) >> 2] = $6_1; HEAP32[($6_1 + 8 | 0) >> 2] = $2_1; break label$16; @@ -62774,7 +63135,7 @@ function asmFunc(imports) { label$26 : { label$27 : { $4_1 = HEAP32[($3_1 + 28 | 0) >> 2] | 0; - $2_1 = ($4_1 << 2 | 0) + 103620 | 0; + $2_1 = ($4_1 << 2 | 0) + 104196 | 0; if (($3_1 | 0) != (HEAP32[$2_1 >> 2] | 0 | 0)) { break label$27 } @@ -62782,7 +63143,7 @@ function asmFunc(imports) { if ($6_1) { break label$26 } - HEAP32[(0 + 103320 | 0) >> 2] = (HEAP32[(0 + 103320 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 103896 | 0) >> 2] = (HEAP32[(0 + 103896 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; break label$15; } HEAP32[($7_1 + ((HEAP32[($7_1 + 16 | 0) >> 2] | 0 | 0) == ($3_1 | 0) ? 16 : 20) | 0) >> 2] = $6_1; @@ -62808,25 +63169,25 @@ function asmFunc(imports) { } HEAP32[($1_1 + 4 | 0) >> 2] = $0_1 | 1 | 0; HEAP32[($1_1 + $0_1 | 0) >> 2] = $0_1; - if (($1_1 | 0) != (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($1_1 | 0) != (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$14 } - HEAP32[(0 + 103324 | 0) >> 2] = $0_1; + HEAP32[(0 + 103900 | 0) >> 2] = $0_1; return; } label$29 : { if ($0_1 >>> 0 > 255 >>> 0) { break label$29 } - $2_1 = ($0_1 & -8 | 0) + 103356 | 0; + $2_1 = ($0_1 & -8 | 0) + 103932 | 0; label$30 : { label$31 : { - $4_1 = HEAP32[(0 + 103316 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 103892 | 0) >> 2] | 0; $0_1 = 1 << ($0_1 >>> 3 | 0) | 0; if ($4_1 & $0_1 | 0) { break label$31 } - HEAP32[(0 + 103316 | 0) >> 2] = $4_1 | $0_1 | 0; + HEAP32[(0 + 103892 | 0) >> 2] = $4_1 | $0_1 | 0; $0_1 = $2_1; break label$30; } @@ -62849,17 +63210,17 @@ function asmFunc(imports) { HEAP32[($1_1 + 28 | 0) >> 2] = $2_1; HEAP32[($1_1 + 16 | 0) >> 2] = 0; HEAP32[($1_1 + 20 | 0) >> 2] = 0; - $4_1 = ($2_1 << 2 | 0) + 103620 | 0; + $4_1 = ($2_1 << 2 | 0) + 104196 | 0; label$33 : { label$34 : { label$35 : { label$36 : { - $6_1 = HEAP32[(0 + 103320 | 0) >> 2] | 0; + $6_1 = HEAP32[(0 + 103896 | 0) >> 2] | 0; $3_1 = 1 << $2_1 | 0; if ($6_1 & $3_1 | 0) { break label$36 } - HEAP32[(0 + 103320 | 0) >> 2] = $6_1 | $3_1 | 0; + HEAP32[(0 + 103896 | 0) >> 2] = $6_1 | $3_1 | 0; HEAP32[$4_1 >> 2] = $1_1; HEAP32[($1_1 + 24 | 0) >> 2] = $4_1; break label$35; @@ -62894,12 +63255,12 @@ function asmFunc(imports) { HEAP32[($1_1 + 12 | 0) >> 2] = $4_1; HEAP32[($1_1 + 8 | 0) >> 2] = $0_1; } - $1_1 = (HEAP32[(0 + 103348 | 0) >> 2] | 0) + -1 | 0; - HEAP32[(0 + 103348 | 0) >> 2] = $1_1 ? $1_1 : -1; + $1_1 = (HEAP32[(0 + 103924 | 0) >> 2] | 0) + -1 | 0; + HEAP32[(0 + 103924 | 0) >> 2] = $1_1 ? $1_1 : -1; } } - function $818($0_1, $1_1) { + function $819($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $2_1 = 0, $3_1 = 0; @@ -62907,24 +63268,24 @@ function asmFunc(imports) { if ($0_1) { break label$1 } - return $815($1_1 | 0) | 0 | 0; + return $816($1_1 | 0) | 0 | 0; } label$2 : { if ($1_1 >>> 0 < -64 >>> 0) { break label$2 } - HEAP32[($721() | 0) >> 2] = 48; + HEAP32[($722() | 0) >> 2] = 48; return 0 | 0; } label$3 : { - $2_1 = $819($0_1 + -8 | 0 | 0, ($1_1 >>> 0 < 11 >>> 0 ? 16 : ($1_1 + 11 | 0) & -8 | 0) | 0) | 0; + $2_1 = $820($0_1 + -8 | 0 | 0, ($1_1 >>> 0 < 11 >>> 0 ? 16 : ($1_1 + 11 | 0) & -8 | 0) | 0) | 0; if (!$2_1) { break label$3 } return $2_1 + 8 | 0 | 0; } label$4 : { - $2_1 = $815($1_1 | 0) | 0; + $2_1 = $816($1_1 | 0) | 0; if ($2_1) { break label$4 } @@ -62932,12 +63293,12 @@ function asmFunc(imports) { } $3_1 = HEAP32[($0_1 + -4 | 0) >> 2] | 0; $3_1 = ($3_1 & 3 | 0 ? -4 : -8) + ($3_1 & -8 | 0) | 0; - $723($2_1 | 0, $0_1 | 0, ($3_1 >>> 0 < $1_1 >>> 0 ? $3_1 : $1_1) | 0) | 0; - $817($0_1 | 0); + $724($2_1 | 0, $0_1 | 0, ($3_1 >>> 0 < $1_1 >>> 0 ? $3_1 : $1_1) | 0) | 0; + $818($0_1 | 0); return $2_1 | 0; } - function $819($0_1, $1_1) { + function $820($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $3_1 = 0, $4_1 = 0, $6_1 = 0, $5_1 = 0, $2_1 = 0, $7_1 = 0, $9_1 = 0, $10_1 = 0, $8_1 = 0; @@ -62959,7 +63320,7 @@ function asmFunc(imports) { break label$4 } $4_1 = $0_1; - if (($3_1 - $1_1 | 0) >>> 0 <= ((HEAP32[(0 + 103796 | 0) >> 2] | 0) << 1 | 0) >>> 0) { + if (($3_1 - $1_1 | 0) >>> 0 <= ((HEAP32[(0 + 104372 | 0) >> 2] | 0) << 1 | 0) >>> 0) { break label$1 } } @@ -62979,15 +63340,15 @@ function asmFunc(imports) { $1_1 = $0_1 + $1_1 | 0; HEAP32[($1_1 + 4 | 0) >> 2] = $3_1 | 3 | 0; HEAP32[($5_1 + 4 | 0) >> 2] = HEAP32[($5_1 + 4 | 0) >> 2] | 0 | 1 | 0; - $820($1_1 | 0, $3_1 | 0); + $821($1_1 | 0, $3_1 | 0); break label$5; } $4_1 = 0; label$7 : { - if (($5_1 | 0) != (HEAP32[(0 + 103340 | 0) >> 2] | 0 | 0)) { + if (($5_1 | 0) != (HEAP32[(0 + 103916 | 0) >> 2] | 0 | 0)) { break label$7 } - $3_1 = (HEAP32[(0 + 103328 | 0) >> 2] | 0) + $3_1 | 0; + $3_1 = (HEAP32[(0 + 103904 | 0) >> 2] | 0) + $3_1 | 0; if ($3_1 >>> 0 <= $1_1 >>> 0) { break label$1 } @@ -62995,16 +63356,16 @@ function asmFunc(imports) { $2_1 = $0_1 + $1_1 | 0; $1_1 = $3_1 - $1_1 | 0; HEAP32[($2_1 + 4 | 0) >> 2] = $1_1 | 1 | 0; - HEAP32[(0 + 103328 | 0) >> 2] = $1_1; - HEAP32[(0 + 103340 | 0) >> 2] = $2_1; + HEAP32[(0 + 103904 | 0) >> 2] = $1_1; + HEAP32[(0 + 103916 | 0) >> 2] = $2_1; break label$5; } label$8 : { - if (($5_1 | 0) != (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($5_1 | 0) != (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$8 } $4_1 = 0; - $3_1 = (HEAP32[(0 + 103324 | 0) >> 2] | 0) + $3_1 | 0; + $3_1 = (HEAP32[(0 + 103900 | 0) >> 2] | 0) + $3_1 | 0; if ($3_1 >>> 0 < $1_1 >>> 0) { break label$1 } @@ -63028,8 +63389,8 @@ function asmFunc(imports) { $4_1 = 0; $1_1 = 0; } - HEAP32[(0 + 103336 | 0) >> 2] = $1_1; - HEAP32[(0 + 103324 | 0) >> 2] = $4_1; + HEAP32[(0 + 103912 | 0) >> 2] = $1_1; + HEAP32[(0 + 103900 | 0) >> 2] = $4_1; break label$5; } $4_1 = 0; @@ -63049,13 +63410,13 @@ function asmFunc(imports) { } $3_1 = HEAP32[($5_1 + 8 | 0) >> 2] | 0; $9_1 = $6_1 >>> 3 | 0; - $6_1 = ($9_1 << 3 | 0) + 103356 | 0; + $6_1 = ($9_1 << 3 | 0) + 103932 | 0; label$13 : { $4_1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; if (($4_1 | 0) != ($3_1 | 0)) { break label$13 } - HEAP32[(0 + 103316 | 0) >> 2] = (HEAP32[(0 + 103316 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $9_1 | 0) | 0) | 0; + HEAP32[(0 + 103892 | 0) >> 2] = (HEAP32[(0 + 103892 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $9_1 | 0) | 0) | 0; break label$11; } HEAP32[($3_1 + 12 | 0) >> 2] = $4_1; @@ -63070,7 +63431,7 @@ function asmFunc(imports) { break label$15 } $3_1 = HEAP32[($5_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 103332 | 0) >> 2] | 0; + HEAP32[(0 + 103908 | 0) >> 2] | 0; HEAP32[($3_1 + 12 | 0) >> 2] = $6_1; HEAP32[($6_1 + 8 | 0) >> 2] = $3_1; break label$14; @@ -63114,7 +63475,7 @@ function asmFunc(imports) { label$19 : { label$20 : { $4_1 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; - $3_1 = ($4_1 << 2 | 0) + 103620 | 0; + $3_1 = ($4_1 << 2 | 0) + 104196 | 0; if (($5_1 | 0) != (HEAP32[$3_1 >> 2] | 0 | 0)) { break label$20 } @@ -63122,7 +63483,7 @@ function asmFunc(imports) { if ($6_1) { break label$19 } - HEAP32[(0 + 103320 | 0) >> 2] = (HEAP32[(0 + 103320 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 103896 | 0) >> 2] = (HEAP32[(0 + 103896 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; break label$11; } HEAP32[($10_1 + ((HEAP32[($10_1 + 16 | 0) >> 2] | 0 | 0) == ($5_1 | 0) ? 16 : 20) | 0) >> 2] = $6_1; @@ -63160,14 +63521,14 @@ function asmFunc(imports) { HEAP32[($1_1 + 4 | 0) >> 2] = $8_1 | 3 | 0; $3_1 = $0_1 + $7_1 | 0; HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 1 | 0; - $820($1_1 | 0, $8_1 | 0); + $821($1_1 | 0, $8_1 | 0); } $4_1 = $0_1; } return $4_1 | 0; } - function $820($0_1, $1_1) { + function $821($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $3_1 = 0, $6_1 = 0, $4_1 = 0, $2_1 = 0, $5_1 = 0, $7_1 = 0; @@ -63188,7 +63549,7 @@ function asmFunc(imports) { label$5 : { label$6 : { $0_1 = $0_1 - $3_1 | 0; - if (($0_1 | 0) == (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($0_1 | 0) == (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$6 } label$7 : { @@ -63197,12 +63558,12 @@ function asmFunc(imports) { } $4_1 = HEAP32[($0_1 + 8 | 0) >> 2] | 0; $5_1 = $3_1 >>> 3 | 0; - $6_1 = ($5_1 << 3 | 0) + 103356 | 0; + $6_1 = ($5_1 << 3 | 0) + 103932 | 0; $3_1 = HEAP32[($0_1 + 12 | 0) >> 2] | 0; if (($3_1 | 0) != ($4_1 | 0)) { break label$5 } - HEAP32[(0 + 103316 | 0) >> 2] = (HEAP32[(0 + 103316 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 103892 | 0) >> 2] = (HEAP32[(0 + 103892 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; break label$2; } $7_1 = HEAP32[($0_1 + 24 | 0) >> 2] | 0; @@ -63212,7 +63573,7 @@ function asmFunc(imports) { break label$8 } $3_1 = HEAP32[($0_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 103332 | 0) >> 2] | 0; + HEAP32[(0 + 103908 | 0) >> 2] | 0; HEAP32[($3_1 + 12 | 0) >> 2] = $6_1; HEAP32[($6_1 + 8 | 0) >> 2] = $3_1; break label$3; @@ -63251,7 +63612,7 @@ function asmFunc(imports) { if (($3_1 & 3 | 0 | 0) != (3 | 0)) { break label$2 } - HEAP32[(0 + 103324 | 0) >> 2] = $1_1; + HEAP32[(0 + 103900 | 0) >> 2] = $1_1; HEAP32[($2_1 + 4 | 0) >> 2] = $3_1 & -2 | 0; HEAP32[($0_1 + 4 | 0) >> 2] = $1_1 | 1 | 0; HEAP32[$2_1 >> 2] = $1_1; @@ -63269,7 +63630,7 @@ function asmFunc(imports) { label$11 : { label$12 : { $4_1 = HEAP32[($0_1 + 28 | 0) >> 2] | 0; - $3_1 = ($4_1 << 2 | 0) + 103620 | 0; + $3_1 = ($4_1 << 2 | 0) + 104196 | 0; if (($0_1 | 0) != (HEAP32[$3_1 >> 2] | 0 | 0)) { break label$12 } @@ -63277,7 +63638,7 @@ function asmFunc(imports) { if ($6_1) { break label$11 } - HEAP32[(0 + 103320 | 0) >> 2] = (HEAP32[(0 + 103320 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 103896 | 0) >> 2] = (HEAP32[(0 + 103896 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; break label$2; } HEAP32[($7_1 + ((HEAP32[($7_1 + 16 | 0) >> 2] | 0 | 0) == ($0_1 | 0) ? 16 : 20) | 0) >> 2] = $6_1; @@ -63311,27 +63672,27 @@ function asmFunc(imports) { break label$18 } label$19 : { - if (($2_1 | 0) != (HEAP32[(0 + 103340 | 0) >> 2] | 0 | 0)) { + if (($2_1 | 0) != (HEAP32[(0 + 103916 | 0) >> 2] | 0 | 0)) { break label$19 } - HEAP32[(0 + 103340 | 0) >> 2] = $0_1; - $1_1 = (HEAP32[(0 + 103328 | 0) >> 2] | 0) + $1_1 | 0; - HEAP32[(0 + 103328 | 0) >> 2] = $1_1; + HEAP32[(0 + 103916 | 0) >> 2] = $0_1; + $1_1 = (HEAP32[(0 + 103904 | 0) >> 2] | 0) + $1_1 | 0; + HEAP32[(0 + 103904 | 0) >> 2] = $1_1; HEAP32[($0_1 + 4 | 0) >> 2] = $1_1 | 1 | 0; - if (($0_1 | 0) != (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($0_1 | 0) != (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$1 } - HEAP32[(0 + 103324 | 0) >> 2] = 0; - HEAP32[(0 + 103336 | 0) >> 2] = 0; + HEAP32[(0 + 103900 | 0) >> 2] = 0; + HEAP32[(0 + 103912 | 0) >> 2] = 0; return; } label$20 : { - if (($2_1 | 0) != (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($2_1 | 0) != (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$20 } - HEAP32[(0 + 103336 | 0) >> 2] = $0_1; - $1_1 = (HEAP32[(0 + 103324 | 0) >> 2] | 0) + $1_1 | 0; - HEAP32[(0 + 103324 | 0) >> 2] = $1_1; + HEAP32[(0 + 103912 | 0) >> 2] = $0_1; + $1_1 = (HEAP32[(0 + 103900 | 0) >> 2] | 0) + $1_1 | 0; + HEAP32[(0 + 103900 | 0) >> 2] = $1_1; HEAP32[($0_1 + 4 | 0) >> 2] = $1_1 | 1 | 0; HEAP32[($0_1 + $1_1 | 0) >> 2] = $1_1; return; @@ -63343,13 +63704,13 @@ function asmFunc(imports) { } $4_1 = HEAP32[($2_1 + 8 | 0) >> 2] | 0; $5_1 = $3_1 >>> 3 | 0; - $6_1 = ($5_1 << 3 | 0) + 103356 | 0; + $6_1 = ($5_1 << 3 | 0) + 103932 | 0; label$22 : { $3_1 = HEAP32[($2_1 + 12 | 0) >> 2] | 0; if (($3_1 | 0) != ($4_1 | 0)) { break label$22 } - HEAP32[(0 + 103316 | 0) >> 2] = (HEAP32[(0 + 103316 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 103892 | 0) >> 2] = (HEAP32[(0 + 103892 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; break label$15; } HEAP32[($4_1 + 12 | 0) >> 2] = $3_1; @@ -63363,7 +63724,7 @@ function asmFunc(imports) { break label$23 } $3_1 = HEAP32[($2_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 103332 | 0) >> 2] | 0; + HEAP32[(0 + 103908 | 0) >> 2] | 0; HEAP32[($3_1 + 12 | 0) >> 2] = $6_1; HEAP32[($6_1 + 8 | 0) >> 2] = $3_1; break label$16; @@ -63411,7 +63772,7 @@ function asmFunc(imports) { label$26 : { label$27 : { $4_1 = HEAP32[($2_1 + 28 | 0) >> 2] | 0; - $3_1 = ($4_1 << 2 | 0) + 103620 | 0; + $3_1 = ($4_1 << 2 | 0) + 104196 | 0; if (($2_1 | 0) != (HEAP32[$3_1 >> 2] | 0 | 0)) { break label$27 } @@ -63419,7 +63780,7 @@ function asmFunc(imports) { if ($6_1) { break label$26 } - HEAP32[(0 + 103320 | 0) >> 2] = (HEAP32[(0 + 103320 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 103896 | 0) >> 2] = (HEAP32[(0 + 103896 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; break label$15; } HEAP32[($7_1 + ((HEAP32[($7_1 + 16 | 0) >> 2] | 0 | 0) == ($2_1 | 0) ? 16 : 20) | 0) >> 2] = $6_1; @@ -63445,25 +63806,25 @@ function asmFunc(imports) { } HEAP32[($0_1 + 4 | 0) >> 2] = $1_1 | 1 | 0; HEAP32[($0_1 + $1_1 | 0) >> 2] = $1_1; - if (($0_1 | 0) != (HEAP32[(0 + 103336 | 0) >> 2] | 0 | 0)) { + if (($0_1 | 0) != (HEAP32[(0 + 103912 | 0) >> 2] | 0 | 0)) { break label$14 } - HEAP32[(0 + 103324 | 0) >> 2] = $1_1; + HEAP32[(0 + 103900 | 0) >> 2] = $1_1; return; } label$29 : { if ($1_1 >>> 0 > 255 >>> 0) { break label$29 } - $3_1 = ($1_1 & -8 | 0) + 103356 | 0; + $3_1 = ($1_1 & -8 | 0) + 103932 | 0; label$30 : { label$31 : { - $4_1 = HEAP32[(0 + 103316 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 103892 | 0) >> 2] | 0; $1_1 = 1 << ($1_1 >>> 3 | 0) | 0; if ($4_1 & $1_1 | 0) { break label$31 } - HEAP32[(0 + 103316 | 0) >> 2] = $4_1 | $1_1 | 0; + HEAP32[(0 + 103892 | 0) >> 2] = $4_1 | $1_1 | 0; $1_1 = $3_1; break label$30; } @@ -63486,16 +63847,16 @@ function asmFunc(imports) { HEAP32[($0_1 + 28 | 0) >> 2] = $3_1; HEAP32[($0_1 + 16 | 0) >> 2] = 0; HEAP32[($0_1 + 20 | 0) >> 2] = 0; - $4_1 = ($3_1 << 2 | 0) + 103620 | 0; + $4_1 = ($3_1 << 2 | 0) + 104196 | 0; label$33 : { label$34 : { label$35 : { - $6_1 = HEAP32[(0 + 103320 | 0) >> 2] | 0; + $6_1 = HEAP32[(0 + 103896 | 0) >> 2] | 0; $2_1 = 1 << $3_1 | 0; if ($6_1 & $2_1 | 0) { break label$35 } - HEAP32[(0 + 103320 | 0) >> 2] = $6_1 | $2_1 | 0; + HEAP32[(0 + 103896 | 0) >> 2] = $6_1 | $2_1 | 0; HEAP32[$4_1 >> 2] = $0_1; HEAP32[($0_1 + 24 | 0) >> 2] = $4_1; break label$34; @@ -63532,7 +63893,7 @@ function asmFunc(imports) { } } - function $821($0_1, $1_1) { + function $822($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, $2_1 = 0, i64toi32_i32$3 = 0, $11_1 = 0, $6$hi = 0, $8$hi = 0, $16_1 = 0, i64toi32_i32$2 = 0; @@ -63571,19 +63932,19 @@ function asmFunc(imports) { $2_1 = ($11_1 | 0) != (0 | 0) ? -1 : $16_1; } label$3 : { - $0_1 = $815($2_1 | 0) | 0; + $0_1 = $816($2_1 | 0) | 0; if (!$0_1) { break label$3 } if (!((HEAPU8[($0_1 + -4 | 0) >> 0] | 0) & 3 | 0)) { break label$3 } - $724($0_1 | 0, 0 | 0, $2_1 | 0) | 0; + $725($0_1 | 0, 0 | 0, $2_1 | 0) | 0; } return $0_1 | 0; } - function $822($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { + function $823($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -63979,7 +64340,7 @@ function asmFunc(imports) { $6_1 = i64toi32_i32$5; i64toi32_i32$0 = $137$hi; i64toi32_i32$2 = $138$hi; - $823($136_1 | 0, $137_1 | 0, i64toi32_i32$0 | 0, $138_1 | 0, i64toi32_i32$2 | 0, i64toi32_i32$5 + -15 | 0 | 0); + $824($136_1 | 0, $137_1 | 0, i64toi32_i32$0 | 0, $138_1 | 0, i64toi32_i32$2 | 0, i64toi32_i32$5 + -15 | 0 | 0); $6_1 = 16 - i64toi32_i32$5 | 0; i64toi32_i32$4 = $5_1 + 104 | 0; i64toi32_i32$2 = HEAP32[i64toi32_i32$4 >> 2] | 0; @@ -64049,7 +64410,7 @@ function asmFunc(imports) { $7_1 = i64toi32_i32$3; i64toi32_i32$5 = $169$hi; i64toi32_i32$0 = $170$hi; - $823($168_1 | 0, $169_1 | 0, i64toi32_i32$5 | 0, $170_1 | 0, i64toi32_i32$0 | 0, i64toi32_i32$3 + -15 | 0 | 0); + $824($168_1 | 0, $169_1 | 0, i64toi32_i32$5 | 0, $170_1 | 0, i64toi32_i32$0 | 0, i64toi32_i32$3 + -15 | 0 | 0); $8_1 = 16 - i64toi32_i32$3 | 0; i64toi32_i32$2 = $5_1 + 88 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -64178,12 +64539,12 @@ function asmFunc(imports) { i64toi32_i32$0 = $1$hi; i64toi32_i32$0 = $10$hi; i64toi32_i32$5 = $1$hi; - $823($5_1 + 64 | 0 | 0, $10_1 | 0, i64toi32_i32$0 | 0, $1_1 | 0, i64toi32_i32$5 | 0, 128 - $7_1 | 0 | 0); + $824($5_1 + 64 | 0 | 0, $10_1 | 0, i64toi32_i32$0 | 0, $1_1 | 0, i64toi32_i32$5 | 0, 128 - $7_1 | 0 | 0); i64toi32_i32$5 = i64toi32_i32$0; i64toi32_i32$5 = $1$hi; i64toi32_i32$5 = i64toi32_i32$0; i64toi32_i32$0 = $1$hi; - $833($5_1 + 48 | 0 | 0, $10_1 | 0, i64toi32_i32$5 | 0, $1_1 | 0, i64toi32_i32$0 | 0, $7_1 | 0); + $834($5_1 + 48 | 0 | 0, $10_1 | 0, i64toi32_i32$5 | 0, $1_1 | 0, i64toi32_i32$0 | 0, $7_1 | 0); i64toi32_i32$2 = $5_1; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 48 | 0) >> 2] | 0; i64toi32_i32$5 = HEAP32[(i64toi32_i32$2 + 52 | 0) >> 2] | 0; @@ -64385,7 +64746,7 @@ function asmFunc(imports) { $7_1 = i64toi32_i32$3 + -12 | 0; i64toi32_i32$2 = $272$hi; i64toi32_i32$1 = $273$hi; - $823($271_1 | 0, $272_1 | 0, i64toi32_i32$2 | 0, $273_1 | 0, i64toi32_i32$1 | 0, $7_1 | 0); + $824($271_1 | 0, $272_1 | 0, i64toi32_i32$2 | 0, $273_1 | 0, i64toi32_i32$1 | 0, $7_1 | 0); $6_1 = $6_1 - $7_1 | 0; i64toi32_i32$4 = $5_1 + 40 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$4 >> 2] | 0; @@ -64550,12 +64911,12 @@ function asmFunc(imports) { i64toi32_i32$2 = $4$hi; i64toi32_i32$2 = $2$hi; i64toi32_i32$5 = $4$hi; - $823($5_1 + 16 | 0 | 0, $2_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$5 | 0, $6_1 + 127 | 0 | 0); + $824($5_1 + 16 | 0 | 0, $2_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$5 | 0, $6_1 + 127 | 0 | 0); i64toi32_i32$5 = i64toi32_i32$2; i64toi32_i32$5 = $4$hi; i64toi32_i32$5 = i64toi32_i32$2; i64toi32_i32$2 = $4$hi; - $833($5_1 | 0, $2_1 | 0, i64toi32_i32$5 | 0, $4_1 | 0, i64toi32_i32$2 | 0, 1 - $6_1 | 0 | 0); + $834($5_1 | 0, $2_1 | 0, i64toi32_i32$5 | 0, $4_1 | 0, i64toi32_i32$2 | 0, 1 - $6_1 | 0 | 0); i64toi32_i32$3 = $5_1; i64toi32_i32$2 = HEAP32[i64toi32_i32$3 >> 2] | 0; i64toi32_i32$5 = HEAP32[(i64toi32_i32$3 + 4 | 0) >> 2] | 0; @@ -64679,7 +65040,7 @@ function asmFunc(imports) { label$17 : { label$18 : { label$19 : { - switch ($831() | 0 | 0) { + switch ($832() | 0 | 0) { case 0: i64toi32_i32$5 = $4$hi; $375_1 = $4_1; @@ -64866,7 +65227,7 @@ function asmFunc(imports) { break label$1 } } - $832() | 0; + $833() | 0; } i64toi32_i32$5 = $3$hi; i64toi32_i32$0 = $0_1; @@ -64878,7 +65239,7 @@ function asmFunc(imports) { global$0 = $5_1 + 112 | 0; } - function $823($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1) { + function $824($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -64983,7 +65344,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$0 + 12 | 0) >> 2] = i64toi32_i32$2; } - function $824($0_1, $0$hi, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi) { + function $825($0_1, $0$hi, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; $1_1 = $1_1 | 0; @@ -65235,7 +65596,7 @@ function asmFunc(imports) { return $4_1 | 0; } - function $825($0_1, $0$hi, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi) { + function $826($0_1, $0$hi, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; $1_1 = $1_1 | 0; @@ -65485,7 +65846,7 @@ function asmFunc(imports) { return $4_1 | 0; } - function $826($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { + function $827($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -65815,7 +66176,7 @@ function asmFunc(imports) { $8_1 = i64toi32_i32$1; i64toi32_i32$5 = $111$hi; i64toi32_i32$3 = $112$hi; - $823($110_1 | 0, $111_1 | 0, i64toi32_i32$5 | 0, $112_1 | 0, i64toi32_i32$3 | 0, i64toi32_i32$1 + -15 | 0 | 0); + $824($110_1 | 0, $111_1 | 0, i64toi32_i32$5 | 0, $112_1 | 0, i64toi32_i32$3 | 0, i64toi32_i32$1 + -15 | 0 | 0); $8_1 = 16 - i64toi32_i32$1 | 0; i64toi32_i32$2 = $5_1 + 328 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$2 >> 2] | 0; @@ -65872,7 +66233,7 @@ function asmFunc(imports) { $9_1 = i64toi32_i32$2; i64toi32_i32$1 = $138$hi; i64toi32_i32$5 = $139$hi; - $823($137_1 | 0, $138_1 | 0, i64toi32_i32$1 | 0, $139_1 | 0, i64toi32_i32$5 | 0, i64toi32_i32$2 + -15 | 0 | 0); + $824($137_1 | 0, $138_1 | 0, i64toi32_i32$1 | 0, $139_1 | 0, i64toi32_i32$5 | 0, i64toi32_i32$2 + -15 | 0 | 0); $8_1 = (i64toi32_i32$2 + $8_1 | 0) + -16 | 0; i64toi32_i32$4 = $5_1 + 312 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$4 >> 2] | 0; @@ -65940,7 +66301,7 @@ function asmFunc(imports) { i64toi32_i32$5 = 0; i64toi32_i32$1 = $4$hi; i64toi32_i32$3 = 0; - $835($164_1 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$3 | 0); + $836($164_1 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$3 | 0); i64toi32_i32$5 = ($5_1 + 288 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$5 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$5 + 4 | 0) >> 2] | 0; @@ -65960,7 +66321,7 @@ function asmFunc(imports) { i64toi32_i32$5 = 0; i64toi32_i32$1 = $4$hi; i64toi32_i32$2 = 0; - $835($5_1 + 272 | 0 | 0, i64toi32_i32$4 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$5 | 0, $4_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0); + $836($5_1 + 272 | 0 | 0, i64toi32_i32$4 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$5 | 0, $4_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0); $185_1 = $5_1 + 256 | 0; i64toi32_i32$5 = $5_1; i64toi32_i32$2 = HEAP32[(i64toi32_i32$5 + 272 | 0) >> 2] | 0; @@ -66005,7 +66366,7 @@ function asmFunc(imports) { i64toi32_i32$5 = 0; i64toi32_i32$2 = $2$hi; i64toi32_i32$0 = 0; - $835($185_1 | 0, $4_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$5 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0); + $836($185_1 | 0, $4_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$5 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0); i64toi32_i32$0 = i64toi32_i32$1; i64toi32_i32$5 = ($5_1 + 256 | 0) + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$5 >> 2] | 0; @@ -66025,7 +66386,7 @@ function asmFunc(imports) { i64toi32_i32$5 = 0; i64toi32_i32$2 = $204$hi; i64toi32_i32$1 = 0; - $835($5_1 + 240 | 0 | 0, $4_1 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$3 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0); + $836($5_1 + 240 | 0 | 0, $4_1 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$3 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0); $206_1 = $5_1 + 224 | 0; i64toi32_i32$5 = $5_1; i64toi32_i32$1 = HEAP32[(i64toi32_i32$5 + 240 | 0) >> 2] | 0; @@ -66070,7 +66431,7 @@ function asmFunc(imports) { i64toi32_i32$5 = 0; i64toi32_i32$1 = $2$hi; i64toi32_i32$4 = 0; - $835($206_1 | 0, $4_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$5 | 0, $2_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$4 | 0); + $836($206_1 | 0, $4_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$5 | 0, $2_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$4 | 0); i64toi32_i32$4 = i64toi32_i32$2; i64toi32_i32$5 = ($5_1 + 224 | 0) + 8 | 0; i64toi32_i32$4 = HEAP32[i64toi32_i32$5 >> 2] | 0; @@ -66090,7 +66451,7 @@ function asmFunc(imports) { i64toi32_i32$5 = 0; i64toi32_i32$1 = $225$hi; i64toi32_i32$2 = 0; - $835($5_1 + 208 | 0 | 0, $4_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0); + $836($5_1 + 208 | 0 | 0, $4_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$0 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$2 | 0); $227_1 = $5_1 + 192 | 0; i64toi32_i32$5 = $5_1; i64toi32_i32$2 = HEAP32[(i64toi32_i32$5 + 208 | 0) >> 2] | 0; @@ -66135,7 +66496,7 @@ function asmFunc(imports) { i64toi32_i32$5 = 0; i64toi32_i32$2 = $2$hi; i64toi32_i32$3 = 0; - $835($227_1 | 0, $4_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$5 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); + $836($227_1 | 0, $4_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$5 | 0, $2_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); i64toi32_i32$3 = i64toi32_i32$1; i64toi32_i32$5 = ($5_1 + 192 | 0) + 8 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$5 >> 2] | 0; @@ -66155,7 +66516,7 @@ function asmFunc(imports) { i64toi32_i32$5 = 0; i64toi32_i32$2 = $246$hi; i64toi32_i32$1 = 0; - $835($5_1 + 176 | 0 | 0, $4_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$4 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0); + $836($5_1 + 176 | 0 | 0, $4_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$4 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0); $248_1 = $5_1 + 160 | 0; i64toi32_i32$1 = $2$hi; $249_1 = $2_1; @@ -66210,7 +66571,7 @@ function asmFunc(imports) { i64toi32_i32$1 = 0; i64toi32_i32$2 = $4$hi; i64toi32_i32$0 = 0; - $835($248_1 | 0, $249_1 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$3 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0); + $836($248_1 | 0, $249_1 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$3 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$0 | 0); $262_1 = $5_1 + 144 | 0; i64toi32_i32$0 = $3$hi; i64toi32_i32$1 = $3_1; @@ -66230,7 +66591,7 @@ function asmFunc(imports) { i64toi32_i32$1 = 0; i64toi32_i32$0 = $4$hi; i64toi32_i32$4 = 0; - $835($262_1 | 0, $338_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0, $4_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$4 | 0); + $836($262_1 | 0, $338_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$1 | 0, $4_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$4 | 0); $267_1 = $5_1 + 112 | 0; i64toi32_i32$4 = i64toi32_i32$0; $268_1 = $4_1; @@ -66309,7 +66670,7 @@ function asmFunc(imports) { i64toi32_i32$0 = 0; i64toi32_i32$4 = $290$hi; i64toi32_i32$2 = 0; - $835($267_1 | 0, $268_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$2 | 0); + $836($267_1 | 0, $268_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$0 | 0, i64toi32_i32$5 | 0, i64toi32_i32$4 | 0, 0 | 0, i64toi32_i32$2 | 0); i64toi32_i32$2 = $2$hi; i64toi32_i32$2 = 0; i64toi32_i32$0 = 1; @@ -66325,7 +66686,7 @@ function asmFunc(imports) { i64toi32_i32$0 = 0; i64toi32_i32$2 = $4$hi; i64toi32_i32$3 = 0; - $835($5_1 + 128 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$5 | 0, 0 | 0, i64toi32_i32$0 | 0, $4_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); + $836($5_1 + 128 | 0 | 0, i64toi32_i32$1 | 0, i64toi32_i32$5 | 0, 0 | 0, i64toi32_i32$0 | 0, $4_1 | 0, i64toi32_i32$2 | 0, 0 | 0, i64toi32_i32$3 | 0); $6_1 = $8_1 + ($7_1 - $6_1 | 0) | 0; label$12 : { label$13 : { @@ -67351,7 +67712,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $4$hi; i64toi32_i32$5 = $3$hi; i64toi32_i32$0 = $14$hi; - $835($5_1 + 80 | 0 | 0, $2_1 | 0, i64toi32_i32$2 | 0, i64toi32_i32$4 | 0, i64toi32_i32$1 | 0, $3_1 | 0, i64toi32_i32$5 | 0, $14_1 | 0, i64toi32_i32$0 | 0); + $836($5_1 + 80 | 0 | 0, $2_1 | 0, i64toi32_i32$2 | 0, i64toi32_i32$4 | 0, i64toi32_i32$1 | 0, $3_1 | 0, i64toi32_i32$5 | 0, $14_1 | 0, i64toi32_i32$0 | 0); i64toi32_i32$0 = $1$hi; i64toi32_i32$1 = $1_1; i64toi32_i32$5 = 0; @@ -67471,7 +67832,7 @@ function asmFunc(imports) { i64toi32_i32$3 = $4$hi; i64toi32_i32$5 = $3$hi; i64toi32_i32$4 = $14$hi; - $835($558_1 | 0, $564_1 | 0, i64toi32_i32$1 | 0, $4_1 | 0, i64toi32_i32$3 | 0, $3_1 | 0, i64toi32_i32$5 | 0, $14_1 | 0, i64toi32_i32$4 | 0); + $836($558_1 | 0, $564_1 | 0, i64toi32_i32$1 | 0, $4_1 | 0, i64toi32_i32$3 | 0, $3_1 | 0, i64toi32_i32$5 | 0, $14_1 | 0, i64toi32_i32$4 | 0); i64toi32_i32$4 = $1$hi; i64toi32_i32$3 = $1_1; i64toi32_i32$5 = 0; @@ -67647,12 +68008,12 @@ function asmFunc(imports) { i64toi32_i32$2 = $4$hi; i64toi32_i32$2 = $2$hi; i64toi32_i32$5 = $4$hi; - $833($5_1 + 64 | 0 | 0, $2_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$5 | 0, 1 - $6_1 | 0 | 0); + $834($5_1 + 64 | 0 | 0, $2_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$5 | 0, 1 - $6_1 | 0 | 0); i64toi32_i32$5 = $22$hi; i64toi32_i32$5 = $19$hi; i64toi32_i32$5 = $22$hi; i64toi32_i32$2 = $19$hi; - $823($5_1 + 48 | 0 | 0, $22_1 | 0, i64toi32_i32$5 | 0, $19_1 | 0, i64toi32_i32$2 | 0, $6_1 + 112 | 0 | 0); + $824($5_1 + 48 | 0 | 0, $22_1 | 0, i64toi32_i32$5 | 0, $19_1 | 0, i64toi32_i32$2 | 0, $6_1 + 112 | 0 | 0); i64toi32_i32$2 = $3$hi; i64toi32_i32$2 = $14$hi; i64toi32_i32$3 = $5_1; @@ -67669,7 +68030,7 @@ function asmFunc(imports) { i64toi32_i32$5 = $14$hi; i64toi32_i32$3 = $2$hi; i64toi32_i32$0 = $10$hi; - $835($5_1 + 32 | 0 | 0, $3_1 | 0, i64toi32_i32$2 | 0, $14_1 | 0, i64toi32_i32$5 | 0, $2_1 | 0, i64toi32_i32$3 | 0, $10_1 | 0, i64toi32_i32$0 | 0); + $836($5_1 + 32 | 0 | 0, $3_1 | 0, i64toi32_i32$2 | 0, $14_1 | 0, i64toi32_i32$5 | 0, $2_1 | 0, i64toi32_i32$3 | 0, $10_1 | 0, i64toi32_i32$0 | 0); i64toi32_i32$5 = ($5_1 + 48 | 0) + 8 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$5 >> 2] | 0; i64toi32_i32$3 = HEAP32[(i64toi32_i32$5 + 4 | 0) >> 2] | 0; @@ -67782,14 +68143,14 @@ function asmFunc(imports) { i64toi32_i32$3 = $14$hi; i64toi32_i32$1 = 0; i64toi32_i32$0 = 0; - $835($5_1 + 16 | 0 | 0, $3_1 | 0, i64toi32_i32$5 | 0, $14_1 | 0, i64toi32_i32$3 | 0, 3 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0); + $836($5_1 + 16 | 0 | 0, $3_1 | 0, i64toi32_i32$5 | 0, $14_1 | 0, i64toi32_i32$3 | 0, 3 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$0 | 0); i64toi32_i32$0 = i64toi32_i32$5; i64toi32_i32$0 = i64toi32_i32$3; i64toi32_i32$0 = i64toi32_i32$5; i64toi32_i32$1 = i64toi32_i32$3; i64toi32_i32$3 = 0; i64toi32_i32$5 = 0; - $835($5_1 | 0, $3_1 | 0, i64toi32_i32$0 | 0, $14_1 | 0, i64toi32_i32$1 | 0, 5 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$5 | 0); + $836($5_1 | 0, $3_1 | 0, i64toi32_i32$0 | 0, $14_1 | 0, i64toi32_i32$1 | 0, 5 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$5 | 0); i64toi32_i32$5 = $10$hi; $667_1 = $10_1; $667$hi = i64toi32_i32$5; @@ -68042,7 +68403,7 @@ function asmFunc(imports) { global$0 = $5_1 + 336 | 0; } - function $827($0_1, $1_1) { + function $828($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = +$1_1; var i64toi32_i32$3 = 0, i64toi32_i32$4 = 0, i64toi32_i32$5 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, $5_1 = 0, $5$hi = 0, $2_1 = 0, $4_1 = 0, $6_1 = 0, $6$hi = 0, $4$hi = 0, $26_1 = 0, $27_1 = 0, $28_1 = 0, $29_1 = 0, $30_1 = 0, $3_1 = 0, $31_1 = 0, $32_1 = 0, $33_1 = 0, $33$hi = 0, $37_1 = 0, $50_1 = 0, $50$hi = 0, $54$hi = 0, $63_1 = 0, $63$hi = 0, $64_1 = 0; @@ -68190,7 +68551,7 @@ function asmFunc(imports) { $3_1 = i64toi32_i32$4 >>> 0 < i64toi32_i32$0 >>> 0 | ((i64toi32_i32$4 | 0) == (i64toi32_i32$0 | 0) & i64toi32_i32$3 >>> 0 < i64toi32_i32$5 >>> 0 | 0) | 0 ? $37_1 : Math_clz32($30_1); i64toi32_i32$3 = $33$hi; i64toi32_i32$4 = 0; - $823($32_1 | 0, $33_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$4 | 0, $3_1 + 49 | 0 | 0); + $824($32_1 | 0, $33_1 | 0, i64toi32_i32$3 | 0, 0 | 0, i64toi32_i32$4 | 0, $3_1 + 49 | 0 | 0); i64toi32_i32$5 = $2_1 + 8 | 0; i64toi32_i32$4 = HEAP32[i64toi32_i32$5 >> 2] | 0; i64toi32_i32$3 = HEAP32[(i64toi32_i32$5 + 4 | 0) >> 2] | 0; @@ -68250,7 +68611,7 @@ function asmFunc(imports) { global$0 = $2_1 + 16 | 0; } - function $828($0_1, $1_1) { + function $829($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = Math_fround($1_1); var i64toi32_i32$1 = 0, i64toi32_i32$5 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$3 = 0, $4_1 = 0, i64toi32_i32$4 = 0, $2_1 = 0, $5_1 = 0, $5$hi = 0, $6_1 = 0, $6$hi = 0, $3_1 = 0, $24_1 = 0, $25_1 = 0, $26_1 = 0, $27_1 = 0, $30_1 = 0, $38_1 = 0, $38$hi = 0, $42$hi = 0, $48_1 = 0, $49_1 = 0, $49$hi = 0, $53$hi = 0, $54_1 = 0; @@ -68333,7 +68694,7 @@ function asmFunc(imports) { $30_1 = $4_1; $4_1 = Math_clz32($4_1); i64toi32_i32$5 = 0; - $823($2_1 | 0, $30_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$5 | 0, $4_1 + 81 | 0 | 0); + $824($2_1 | 0, $30_1 | 0, i64toi32_i32$1 | 0, 0 | 0, i64toi32_i32$5 | 0, $4_1 + 81 | 0 | 0); i64toi32_i32$0 = $2_1 + 8 | 0; i64toi32_i32$5 = HEAP32[i64toi32_i32$0 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] | 0; @@ -68402,7 +68763,7 @@ function asmFunc(imports) { global$0 = $2_1 + 16 | 0; } - function $829($0_1, $1_1) { + function $830($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var i64toi32_i32$2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$5 = 0, i64toi32_i32$3 = 0, $3_1 = 0, i64toi32_i32$4 = 0, $2_1 = 0, $4_1 = 0, $4$hi = 0, $5_1 = 0, $5$hi = 0, $21_1 = 0, $22_1 = 0, $19_1 = 0, $27_1 = 0, $27$hi = 0, $31$hi = 0, $32_1 = 0, $32$hi = 0, $36$hi = 0; @@ -68427,7 +68788,7 @@ function asmFunc(imports) { $19_1 = $3_1; $3_1 = Math_clz32($3_1); i64toi32_i32$1 = 0; - $823($2_1 | 0, $19_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, $3_1 + 81 | 0 | 0); + $824($2_1 | 0, $19_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, $3_1 + 81 | 0 | 0); i64toi32_i32$2 = $2_1 + 8 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -68497,7 +68858,7 @@ function asmFunc(imports) { global$0 = $2_1 + 16 | 0; } - function $830($0_1, $1_1) { + function $831($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$5 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, $2_1 = 0, $3_1 = 0, $3$hi = 0, $4_1 = 0, $4$hi = 0, $17_1 = 0, $11_1 = 0, $20_1 = 0, $20$hi = 0, $24$hi = 0; @@ -68520,7 +68881,7 @@ function asmFunc(imports) { $11_1 = $1_1; $1_1 = Math_clz32($1_1); i64toi32_i32$1 = 0; - $823($2_1 | 0, $11_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, 112 - ($1_1 ^ 31 | 0) | 0 | 0); + $824($2_1 | 0, $11_1 | 0, i64toi32_i32$0 | 0, 0 | 0, i64toi32_i32$1 | 0, 112 - ($1_1 ^ 31 | 0) | 0 | 0); i64toi32_i32$2 = $2_1 + 8 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -68570,15 +68931,15 @@ function asmFunc(imports) { global$0 = $2_1 + 16 | 0; } - function $831() { + function $832() { return 0 | 0; } - function $832() { + function $833() { return 0 | 0; } - function $833($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1) { + function $834($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -68683,7 +69044,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$0 + 12 | 0) >> 2] = i64toi32_i32$2; } - function $834($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { + function $835($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -69022,7 +69383,7 @@ function asmFunc(imports) { $8_1 = i64toi32_i32$2; i64toi32_i32$5 = $112$hi; i64toi32_i32$3 = $113$hi; - $823($111_1 | 0, $112_1 | 0, i64toi32_i32$5 | 0, $113_1 | 0, i64toi32_i32$3 | 0, i64toi32_i32$2 + -15 | 0 | 0); + $824($111_1 | 0, $112_1 | 0, i64toi32_i32$5 | 0, $113_1 | 0, i64toi32_i32$3 | 0, i64toi32_i32$2 + -15 | 0 | 0); $8_1 = 16 - i64toi32_i32$2 | 0; i64toi32_i32$4 = $5_1 + 88 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$4 >> 2] | 0; @@ -69092,7 +69453,7 @@ function asmFunc(imports) { $9_1 = i64toi32_i32$5; i64toi32_i32$2 = $141$hi; i64toi32_i32$3 = $142$hi; - $823($140_1 | 0, $141_1 | 0, i64toi32_i32$2 | 0, $142_1 | 0, i64toi32_i32$3 | 0, i64toi32_i32$5 + -15 | 0 | 0); + $824($140_1 | 0, $141_1 | 0, i64toi32_i32$2 | 0, $142_1 | 0, i64toi32_i32$3 | 0, i64toi32_i32$5 + -15 | 0 | 0); $8_1 = ($8_1 - i64toi32_i32$5 | 0) + 16 | 0; i64toi32_i32$0 = $5_1 + 72 | 0; i64toi32_i32$3 = HEAP32[i64toi32_i32$0 >> 2] | 0; @@ -70110,22 +70471,22 @@ function asmFunc(imports) { $6_1 = $6_1 + 127 | 0; i64toi32_i32$1 = $18$hi; i64toi32_i32$3 = $1$hi; - $823($5_1 + 48 | 0 | 0, $18_1 | 0, i64toi32_i32$1 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $6_1 | 0); + $824($5_1 + 48 | 0 | 0, $18_1 | 0, i64toi32_i32$1 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $6_1 | 0); i64toi32_i32$3 = $2$hi; i64toi32_i32$3 = $4$hi; i64toi32_i32$3 = $2$hi; i64toi32_i32$1 = $4$hi; - $823($5_1 + 32 | 0 | 0, $2_1 | 0, i64toi32_i32$3 | 0, $4_1 | 0, i64toi32_i32$1 | 0, $6_1 | 0); + $824($5_1 + 32 | 0 | 0, $2_1 | 0, i64toi32_i32$3 | 0, $4_1 | 0, i64toi32_i32$1 | 0, $6_1 | 0); i64toi32_i32$1 = $18$hi; i64toi32_i32$1 = $1$hi; i64toi32_i32$1 = $18$hi; i64toi32_i32$3 = $1$hi; - $833($5_1 + 16 | 0 | 0, $18_1 | 0, i64toi32_i32$1 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $7_1 | 0); + $834($5_1 + 16 | 0 | 0, $18_1 | 0, i64toi32_i32$1 | 0, $1_1 | 0, i64toi32_i32$3 | 0, $7_1 | 0); i64toi32_i32$3 = $2$hi; i64toi32_i32$3 = $4$hi; i64toi32_i32$3 = $2$hi; i64toi32_i32$1 = $4$hi; - $833($5_1 | 0, $2_1 | 0, i64toi32_i32$3 | 0, $4_1 | 0, i64toi32_i32$1 | 0, $7_1 | 0); + $834($5_1 | 0, $2_1 | 0, i64toi32_i32$3 | 0, $4_1 | 0, i64toi32_i32$1 | 0, $7_1 | 0); i64toi32_i32$0 = $5_1; i64toi32_i32$1 = HEAP32[(i64toi32_i32$0 + 32 | 0) >> 2] | 0; i64toi32_i32$3 = HEAP32[(i64toi32_i32$0 + 36 | 0) >> 2] | 0; @@ -70376,7 +70737,7 @@ function asmFunc(imports) { global$0 = $5_1 + 96 | 0; } - function $835($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { + function $836($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -70618,7 +70979,7 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] = i64toi32_i32$4; } - function $836($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { + function $837($0_1, $1_1, $1$hi, $2_1, $2$hi, $3_1, $3$hi, $4_1, $4$hi) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $1$hi = $1$hi | 0; @@ -70645,7 +71006,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $2$hi; i64toi32_i32$0 = $3$hi; i64toi32_i32$3 = $14$hi; - $822($5_1 | 0, $1_1 | 0, i64toi32_i32$1 | 0, $2_1 | 0, i64toi32_i32$2 | 0, $3_1 | 0, i64toi32_i32$0 | 0, $14_1 | 0, i64toi32_i32$3 | 0); + $823($5_1 | 0, $1_1 | 0, i64toi32_i32$1 | 0, $2_1 | 0, i64toi32_i32$2 | 0, $3_1 | 0, i64toi32_i32$0 | 0, $14_1 | 0, i64toi32_i32$3 | 0); i64toi32_i32$2 = $5_1; i64toi32_i32$3 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -70664,7 +71025,7 @@ function asmFunc(imports) { global$0 = $5_1 + 16 | 0; } - function $837($0_1, $0$hi, $1_1, $1$hi) { + function $838($0_1, $0$hi, $1_1, $1$hi) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; $1_1 = $1_1 | 0; @@ -70912,12 +71273,12 @@ function asmFunc(imports) { $4$hi = i64toi32_i32$0; i64toi32_i32$0 = $0$hi; i64toi32_i32$2 = $4$hi; - $823($2_1 + 16 | 0 | 0, $0_1 | 0, i64toi32_i32$0 | 0, $4_1 | 0, i64toi32_i32$2 | 0, $3_1 + -15233 | 0 | 0); + $824($2_1 + 16 | 0 | 0, $0_1 | 0, i64toi32_i32$0 | 0, $4_1 | 0, i64toi32_i32$2 | 0, $3_1 + -15233 | 0 | 0); i64toi32_i32$2 = i64toi32_i32$0; i64toi32_i32$2 = $4$hi; i64toi32_i32$2 = i64toi32_i32$0; i64toi32_i32$0 = $4$hi; - $833($2_1 | 0, $0_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$0 | 0, 15361 - $3_1 | 0 | 0); + $834($2_1 | 0, $0_1 | 0, i64toi32_i32$2 | 0, $4_1 | 0, i64toi32_i32$0 | 0, 15361 - $3_1 | 0 | 0); i64toi32_i32$4 = $2_1; i64toi32_i32$0 = HEAP32[i64toi32_i32$4 >> 2] | 0; i64toi32_i32$2 = HEAP32[(i64toi32_i32$4 + 4 | 0) >> 2] | 0; @@ -71058,38 +71419,38 @@ function asmFunc(imports) { return +(+wasm2js_scratch_load_f64()); } - function $838($0_1) { + function $839($0_1) { $0_1 = $0_1 | 0; global$1 = $0_1; } - function $840() { + function $841() { global$3 = 65536; global$2 = (0 + 15 | 0) & -16 | 0; } - function $841() { + function $842() { return global$0 - global$2 | 0 | 0; } - function $842() { + function $843() { return global$3 | 0; } - function $843() { + function $844() { return global$2 | 0; } - function $844() { + function $845() { return global$0 | 0; } - function $845($0_1) { + function $846($0_1) { $0_1 = $0_1 | 0; global$0 = $0_1; } - function $846($0_1) { + function $847($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0; $1_1 = (global$0 - $0_1 | 0) & -16 | 0; @@ -71097,11 +71458,11 @@ function asmFunc(imports) { return $1_1 | 0; } - function $847() { + function $848() { return global$0 | 0; } - function $848($0_1, $1_1, $2_1, $2$hi, $3_1) { + function $849($0_1, $1_1, $2_1, $2$hi, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -71115,7 +71476,7 @@ function asmFunc(imports) { return i64toi32_i32$0 | 0; } - function $849($0_1, $1_1, $2_1, $3_1, $4_1) { + function $850($0_1, $1_1, $2_1, $3_1, $4_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -71145,7 +71506,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $12$hi; i64toi32_i32$3 = $17_1; i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - i64toi32_i32$2 = $848($6_1 | 0, $7_1 | 0, i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0, $4_1 | 0) | 0; + i64toi32_i32$2 = $849($6_1 | 0, $7_1 | 0, i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0, $4_1 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $5_1 = i64toi32_i32$2; $5$hi = i64toi32_i32$0; @@ -71160,12 +71521,12 @@ function asmFunc(imports) { i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; $18_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0; } - $838($18_1 | 0); + $839($18_1 | 0); i64toi32_i32$2 = $5$hi; return $5_1 | 0; } - function $850($0_1, $0$hi, $1_1) { + function $851($0_1, $0$hi, $1_1) { $0_1 = $0_1 | 0; $0$hi = $0$hi | 0; $1_1 = $1_1 | 0; @@ -71972,28 +72333,28 @@ function asmFunc(imports) { ; bufferView = HEAPU8; initActiveSegments(imports); - var FUNCTION_TABLE = Table([null, $41, $757, $731, $758, $804, $805, $808]); + var FUNCTION_TABLE = Table([null, $41, $758, $732, $759, $805, $806, $809]); function __wasm_memory_size() { return buffer.byteLength / 65536 | 0; } return { "__wasm_call_ctors": $0, - "fflush": $730, - "__errno_location": $721, + "fflush": $731, + "__errno_location": $722, "CompileText": $552, "__indirect_function_table": FUNCTION_TABLE, - "malloc": $815, - "setTempRet0": $838, - "emscripten_stack_init": $840, - "emscripten_stack_get_free": $841, - "emscripten_stack_get_base": $842, - "emscripten_stack_get_end": $843, - "stackSave": $844, - "stackRestore": $845, - "stackAlloc": $846, - "emscripten_stack_get_current": $847, - "dynCall_jiji": $849 + "malloc": $816, + "setTempRet0": $839, + "emscripten_stack_init": $841, + "emscripten_stack_get_free": $842, + "emscripten_stack_get_base": $843, + "emscripten_stack_get_end": $844, + "stackSave": $845, + "stackRestore": $846, + "stackAlloc": $847, + "emscripten_stack_get_current": $848, + "dynCall_jiji": $850 }; } diff --git a/src/web/manual.html b/src/web/manual.html index 61f62a05..c1d4c3ea 100644 --- a/src/web/manual.html +++ b/src/web/manual.html @@ -273,23 +273,23 @@

Cake - C23 and Beyond

Intro

-

Cake works as an extension for MSVC on Windows and as an extension for GCC on Linux. This approach makes Cake useful in real and existing programs.

+

Cake works as an extension for MSVC on Windows and as an extension for GCC on Linux. This approach makes Cake useful in real and existing programs.

When applicable, Cake uses the same command line options of MSVC and GCC.

Include directories

-

On Windows, Cake can be used on the command line in the same way as MSVC. Cake will read the variable INCLUDE, which is the same variable used by MSVC to find the include directories. Additionally, you can run Cake outside the Visual Studio command prompt by adding the file 'cakeconfig.h' and specifying the directories using pragma dir.

+

On Windows, Cake can be used on the command line in the same way as MSVC. Cake will read the variable INCLUDE, which is the same variable used by MSVC to find the include directories. Additionally, you can run Cake outside the Visual Studio command prompt by adding the file 'cakeconfig.h' and specifying the directories using pragma dir.

To discover what directories are included, you can run the command 'echo %INCLUDE%' at Visual Studio command prompt.

echo %INCLUDE%
 
-

Copy this output to cakeconfig.h.
+

Copy this output to cakeconfig.h. For instance:

-
 
+

 #pragma dir "C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.37.32820/include"
 #pragma dir "C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Auxiliary/VS/include"
 #pragma dir "C:/Program Files (x86)/Windows Kits/10/include/10.0.22000.0/ucrt"
@@ -300,7 +300,7 @@ 

Include directories

-

When cake runs it first tries to load cakeconfig.h, that must exist at same dir of cake.exe.

+

When cake runs it first tries to load cakeconfig.h, that must exist at same dir of cake.exe.

On Linux, the same file cakeconfig.h is used. To find out what are the directories used by GCC type

@@ -326,7 +326,7 @@

Command line

cake file.c -direct-compilation -o file.cc && cl file.cc Compiles file.c and outputs file.cc for direct compilation then use cl to compile file.cc - +

OPTIONS

@@ -364,6 +364,10 @@

-target=standard

Output target C standard (c89, c99, c11, c2x, cxx) C99 is the default and C89 (ANSI C) is the minimum target

+

-dump-tokens

+ +

Output tokens before preprocessor

+

-fi

Format input (format before language conversion)

@@ -391,11 +395,12 @@

-sarif

-msvc-output

-

Output is compatible with visual studio IDE. We can click on the error message and IDE selects the line.

+

Output is compatible with visual studio IDE. We can click on the error message and IDE selects the line.

-analyze

-

Runs flow analysis and ownership checks

+

This option enables an static analysis of program flow. This is required for some +ownership checks

Output

@@ -461,7 +466,7 @@

C99 Transformations

However the idea if C89 target is NOT support very old compilers, but generate code that can be compiled with C++.

-

C89 +

C89 https://port70.net/~nsz/c/c89/c89-draft.html

C99 @@ -484,7 +489,7 @@

C99 restrict pointers

C99 Variable-length array (VLA)

-

The idea is not implement variable length arrays with automatic storage duration. (__STDC_NO_VLA__ 1).

+

The idea is not implement variable length arrays with automatic storage duration. (__STDC_NO_VLA__ 1).

But there are other uses of VLA.

@@ -511,11 +516,11 @@

C99 Variable-length array (VLA)

int main() { int n = 2; int m = 3; - + /*these variables are created to store the dynamic size*/ const int vla_1_n = n; const int vla_1_m = m; - + int (*p)[n][m] = malloc((vla_1_n*vla_1_m)*sizeof(int)); printf("%zu\n", (vla_1_n*vla_1_m)*sizeof(int)); @@ -531,7 +536,7 @@

C99 Flexible array members

struct s {
     int n;
-    double d[]; 
+    double d[];
 };
 
@@ -550,17 +555,17 @@

C99 static and type qualifiers in parameter array declaratorsC99 Designated initializers

C99 Line comments

-

When compiling to C89 line comments are converted to +

When compiling to C89 line comments are converted to /comments/.

C99 inline functions

@@ -669,7 +674,7 @@

C99 inline functions

C99 _Pragma preprocessing operator

-

TODO

+

TODO

C99 __func__ predefined identifier

@@ -880,7 +885,7 @@

C11 _Alignof or C23 alignof

C11 _Alignas or C23 alignas

-

Not implemented.

+

Not implemented.

C23 Transformations

@@ -904,7 +909,7 @@

C23 static_assert / single-argument static_assert

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1330.pdf

int main()
-{    
+{
     static_assert(1 == 1, "error message");
     static_assert(1 == 1);
 }
@@ -914,7 +919,7 @@ 

C23 static_assert / single-argument static_assert

Becomes in C11

int main()
-{    
+{
     _Static_assert(1 == 1, "error message");
     _Static_assert(1 == 1, "error");
 }
@@ -936,7 +941,7 @@ 

C23 No function declarators without prototypes

}
-

See also Remove support for function definitions with identifier lists

+

See also Remove support for function definitions with identifier lists

https://open-std.org/JTC1/SC22/WG14/www/docs/n2432.pdf

@@ -989,7 +994,7 @@

C23 Digit separators

int main()
 {
     int a = 100000;
-}  
+}
 

This transformation happens at token level, so even preprocessor and inactive blocks are transformed.

@@ -1049,9 +1054,9 @@

C23 Introduce the nullptr constant

C23 Make false and true first-class language features

-

When compiling to C89 bool is replaced by unsigned char, true by 1 and false by 0.

+

When compiling to C89 bool is replaced by unsigned char, true by 1 and false by 0.

-

When compiling to C99 and C11 bool is replaced with _Bool, true is replaced with ((_Bool)1) +

When compiling to C99 and C11 bool is replaced with _Bool, true is replaced with ((_Bool)1) and false with (_Bool)0)

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2935.pdf

@@ -1071,7 +1076,7 @@

C23 {} empty initializer

{ struct X x; } y = { {} }; -} +}
@@ -1150,7 +1155,7 @@

C23 typeof / typeof_unqual

/*Things get a little more complicated*/ int *array[2]; typeof(array) a1, a2; - + typeof(array) a3[3]; typeof(array) *a4[4]; @@ -1194,13 +1199,13 @@

C23 typeof / typeof_unqual

/*Things get a little more complicated*/ int *array[2]; int *a1[2], *a2[2]; - + int *(a3[3])[2]; int *(*a4[4])[2]; /*abstract declarator*/ int k = sizeof(int*[2]); - + /*new way to declare pointer to functions?*/ void (*pf)(int) = ((void*)0); } @@ -1262,7 +1267,7 @@

C23 Enhancements to Enumerations

}; int main() { - enum X x = A; + enum X x = A; } @@ -1273,7 +1278,7 @@

C23 Enhancements to Enumerations

}; int main() { - short x = ((short)A); + short x = ((short)A); } @@ -1348,7 +1353,7 @@

C23 #warning

int main()
 {
-  #warning my warning message  
+  #warning my warning message
 }
 
@@ -1356,7 +1361,7 @@

C23 #warning

int main()
 {
-  /* #warning my warning message */  
+  /* #warning my warning message */
 }
 
@@ -1466,7 +1471,7 @@

C23 __VA_OPT__

int a = 1; int b = 2; int c = 3; - + F(a, b, c); F(); F(EMP); @@ -1500,7 +1505,7 @@

C23 __VA_OPT__

int a = 1; int b = 2; int c = 3; - + f(0, a, b, c); f(0 ); f(0); @@ -1552,7 +1557,7 @@

Extension - try catch throw

   try-statement:
       try secondary-block
-      try secondary-block catch secondary-block   
+      try secondary-block catch secondary-block
 
jump-statement:
@@ -1569,7 +1574,7 @@ 

Extension - try catch throw

{ for (int i = 0 ; i < 10; i++) { for (int j = 0 ; j < 10; j++) { - ... + ... if (error) throw; ... } @@ -1601,7 +1606,7 @@

Extension - defer

FILE* f2 = fopen("out.txt", "w"); if (f2 == NULL) break; defer fclose(f2); - //... + //... } while(0); } @@ -1618,7 +1623,7 @@

Extension - defer

FILE* f2 = fopen("out.txt", "w"); if (f2 == ((void*)0)) { fclose(f); break;} - + fclose(f2); fclose(f); } while(0); @@ -1679,8 +1684,8 @@

Extension Literal function - lambdas

} capture = { .name = strdup(appname) }; (void (void* p)) { - struct capture* capture = p; - }(&capture); + struct capture* capture = p; + }(&capture); }
@@ -1691,15 +1696,15 @@

Extension Literal function - lambdas

struct _capture0 { char * name; }; - + void _lit_func_0(void *p) { - struct _capture0* capture = p; + struct _capture0* capture = p; } void create_app(const char* appname) { struct _capture0 capture = { .name = strdup(appname) }; - _lit_func_0(&capture); + _lit_func_0(&capture); } @@ -1768,7 +1773,7 @@

Type traits

Array type _is_function -A function type describes a function with specified return type. +A function type describes a function with specified return type. _is_floating_point float, double, and long double return true @@ -1778,7 +1783,7 @@

Type traits

standard integer types; _is_arithmetic -Integer and floating types are collectively called arithmetic types. +Integer and floating types are collectively called arithmetic types. _is_scalar Arithmetic types, pointer types, and the nullptr_t type are collectively called scalar types @@ -1802,7 +1807,7 @@

Extension type-expression

    int a[2];
     static_assert( a == (int[2]) );
 
-    /* is array of ints? */    
+    /* is array of ints? */
     static_assert( _is_array(a) && a[0] == (int) );
 
@@ -1812,11 +1817,11 @@

Extension type-expression

int main() { int a; - - int t1 = + + int t1 = a == (int) ? 1 : a == (double) ? 2 : 0; - - int t2 = + + int t2 = _Generic(a, int: 1, double: 2, default: 0); typeof( 1 ? (int) : (double)) b; @@ -1841,22 +1846,22 @@

Extension typename on _Generic

-

and the lvalue conversion will not happen, allowing +

and the lvalue conversion will not happen, allowing more precise (with qualifiers) type match.

Extension assert declaration

-

Standard says "If NDEBUG is defined as a macro name at the point in the source file +

Standard says "If NDEBUG is defined as a macro name at the point in the source file where is included, the assert macro is defined simply as

-
#define assert(...) ((void)0)  
+
#define assert(...) ((void)0)
 
-

Cake keeps that.

+

Cake keeps that.

If NDEBUG is NOT defined cake defines assert as

-
#define assert(...) assert(__VA_ARGS__) 
+
#define assert(...) assert(__VA_ARGS__)
 

Because Cake can be used as a static analyzer, reading existing headers not previously known by Cake, diff --git a/src/web/ownership.html b/src/web/ownership.html index 48b73c8a..eaa144d8 100644 --- a/src/web/ownership.html +++ b/src/web/ownership.html @@ -1021,6 +1021,10 @@

Function Parameters

Rule: Arguments must be valid.

+

Exception

+ +

malloc and calloc have built in semantics.

+

Listing 35 - Function Arguments cannot be in a moved or uninitialized state

#include <ownership.h> 
diff --git a/src/web/samples.js b/src/web/samples.js
index 124ae83e..8d94712a 100644
--- a/src/web/samples.js
+++ b/src/web/samples.js
@@ -1149,11 +1149,28 @@ enum E2 { B };
 int main() {
 
 #pragma CAKE diagnostic push
-#pragma CAKE diagnostic ignore "-Wenum-compare"
+#pragma CAKE diagnostic error "-Wenum-conversion"
     if (A == B){}
 #pragma CAKE diagnostic pop
 
-    if (A == B) {}
+#pragma CAKE diagnostic push
+#pragma CAKE diagnostic warning "-Wenum-conversion"
+    if (A == B){}
+#pragma CAKE diagnostic pop
+
+#pragma CAKE diagnostic push
+#pragma CAKE diagnostic note "-Wenum-conversion"
+    if (A == B){}
+#pragma CAKE diagnostic pop
+
+
+#pragma CAKE diagnostic push
+#pragma CAKE diagnostic ignored "-Wenum-conversion"
+    if (A == B){}
+#pragma CAKE diagnostic pop
+
+
+
 
 }
 
diff --git a/vc/cprimev3.vcxproj.user b/vc/cprimev3.vcxproj.user
index ddc578c7..9ba589a7 100644
--- a/vc/cprimev3.vcxproj.user
+++ b/vc/cprimev3.vcxproj.user
@@ -6,7 +6,7 @@
     $(ProjectDir)/../src/
   
   
-    file.c
+    file.c -Wall
     WindowsLocalDebugger